Function: createProfileShadowAdapter()
ts
function createProfileShadowAdapter(params): object;Defined in: application/services/adapters/profile-shadow-adapter.ts:16
Creates helpers that look up document profiles and their schemas, and provide a cached ShadowApplicationService per profile. A cached service is rebuilt when the profile schema or the workspace type library object changes.
Profiles are looked up in profileCache first, then in workspace.value.profiles.
Parameters
| Parameter | Type |
|---|---|
params | { profileCache: Record<string, any>; workspace: { value: any; }; } |
params.profileCache | Record<string, any> |
params.workspace | { value: any; } |
params.workspace.value | any |
Returns
object
getDocumentDisplayLabel
ts
getDocumentDisplayLabel: (doc) => any;Parameters
| Parameter | Type |
|---|---|
doc | any |
Returns
any
getProfileById
ts
getProfileById: (profileId) => any;Parameters
| Parameter | Type |
|---|---|
profileId | string | null | undefined |
Returns
any
getProfileSchemaById
ts
getProfileSchemaById: (profileId) => any;Parameters
| Parameter | Type |
|---|---|
profileId | string | null | undefined |
Returns
any
getProfileSchemaForDocument
ts
getProfileSchemaForDocument: (doc) => any;Parameters
| Parameter | Type |
|---|---|
doc | any |
Returns
any
getSeedFieldAndValue
ts
getSeedFieldAndValue: (profileId, text) => object;Parameters
| Parameter | Type |
|---|---|
profileId | string | null | undefined |
text | string |
Returns
object
fieldName
ts
fieldName: string | null;seedValue
ts
seedValue: any;getShadowServiceForProfile
ts
getShadowServiceForProfile: (profileId) =>
| ShadowApplicationService
| null;Parameters
| Parameter | Type |
|---|---|
profileId | string | null | undefined |
Returns
| ShadowApplicationService | null