@acorex-platform/module-person-core-client 2.0.0-next.15 → 2.0.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs +36 -3
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs → acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs} +29 -12
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client.mjs +56 -5
- package/fesm2022/acorex-platform-module-person-core-client.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-platform-module-person-core-client-contracts.d.ts +12 -2
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs.map +0 -1
|
@@ -216,6 +216,39 @@ function contactAssignmentDetailsCrudActionsForPartyContext(partyIdContextPath =
|
|
|
216
216
|
}
|
|
217
217
|
//#endregion
|
|
218
218
|
|
|
219
|
+
//#region ----- Helpers -----
|
|
220
|
+
/** Stored person name: firstName + " " + lastName. */
|
|
221
|
+
function composePersonFullName(firstName, lastName) {
|
|
222
|
+
const first = typeof firstName === 'string' ? firstName.trim() : '';
|
|
223
|
+
const last = typeof lastName === 'string' ? lastName.trim() : '';
|
|
224
|
+
return `${first} ${last}`.trim();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Person write body. Create payloads sometimes nest fields under `data`
|
|
228
|
+
* while the runtime envelope keeps `entity` beside them.
|
|
229
|
+
*/
|
|
230
|
+
function resolvePersonWriteTarget(data) {
|
|
231
|
+
const nested = data['data'];
|
|
232
|
+
if (nested != null &&
|
|
233
|
+
typeof nested === 'object' &&
|
|
234
|
+
!Array.isArray(nested) &&
|
|
235
|
+
!('firstName' in data) &&
|
|
236
|
+
!('lastName' in data)) {
|
|
237
|
+
return nested;
|
|
238
|
+
}
|
|
239
|
+
return data;
|
|
240
|
+
}
|
|
241
|
+
/** Sets `fullName` from first and last name already on the payload, filling gaps from `existing`. */
|
|
242
|
+
function stampPersonFullName(data, existing) {
|
|
243
|
+
const target = resolvePersonWriteTarget(data);
|
|
244
|
+
const hasFirst = 'firstName' in target;
|
|
245
|
+
const hasLast = 'lastName' in target;
|
|
246
|
+
const firstName = hasFirst ? target['firstName'] : existing?.['firstName'];
|
|
247
|
+
const lastName = hasLast ? target['lastName'] : existing?.['lastName'];
|
|
248
|
+
target['fullName'] = composePersonFullName(firstName, lastName);
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
|
|
219
252
|
//#region ---- Imports ----
|
|
220
253
|
//#endregion
|
|
221
254
|
//#region ---- Display helpers ----
|
|
@@ -236,8 +269,8 @@ function resolveContactAssignmentPartyDisplayTitle(locale, ...candidates) {
|
|
|
236
269
|
//#region ---- Context helpers ----
|
|
237
270
|
/** Builds a person snapshot for nested ContactAssignment display fields. */
|
|
238
271
|
function buildContactAssignmentPersonSnapshot(personRow, personId) {
|
|
239
|
-
const
|
|
240
|
-
|
|
272
|
+
const storedFullName = typeof personRow['fullName'] === 'string' ? personRow['fullName'].trim() : '';
|
|
273
|
+
const fullName = storedFullName || composePersonFullName(personRow['firstName'], personRow['lastName']);
|
|
241
274
|
return {
|
|
242
275
|
id: personId,
|
|
243
276
|
fullName: fullName || undefined,
|
|
@@ -381,5 +414,5 @@ const PersonCoreManifest = {
|
|
|
381
414
|
* Generated bundle index. Do not edit.
|
|
382
415
|
*/
|
|
383
416
|
|
|
384
|
-
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, PersonCoreManifest, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle };
|
|
417
|
+
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, PersonCoreManifest, RootConfig, buildContactAssignmentPersonSnapshot, composePersonFullName, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle, resolvePersonWriteTarget, stampPersonFullName };
|
|
385
418
|
//# sourceMappingURL=acorex-platform-module-person-core-client-contracts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-person-core-client-contracts.mjs","sources":["../../../../libs/modules/person-core/contracts/src/menu.keys.ts","../../../../libs/modules/person-core/contracts/src/permission.keys.ts","../../../../libs/modules/person-core/contracts/src/root-config.ts","../../../../libs/modules/person-core/contracts/src/contact-assignment.actions.ts","../../../../libs/modules/person-core/contracts/src/contact-assignment.utils.ts","../../../../libs/modules/person-core/contracts/src/person-relationship.actions.ts","../../../../libs/modules/person-core/contracts/src/manifest.ts","../../../../libs/modules/person-core/contracts/src/entities/contact-assignment/contact-assignment.types.ts","../../../../libs/modules/person-core/contracts/src/entities/contact-role/contact-role.types.ts","../../../../libs/modules/person-core/contracts/src/entities/education-level/education-level.types.ts","../../../../libs/modules/person-core/contracts/src/entities/gender/gender.types.ts","../../../../libs/modules/person-core/contracts/src/entities/marital-status/marital-status.types.ts","../../../../libs/modules/person-core/contracts/src/entities/person-identifier-type/person-identifier-type.types.ts","../../../../libs/modules/person-core/contracts/src/entities/person-title/person-title.types.ts","../../../../libs/modules/person-core/contracts/src/entities/religion/religion.types.ts","../../../../libs/modules/person-core/contracts/src/index.ts","../../../../libs/modules/person-core/contracts/src/acorex-platform-module-person-core-client-contracts.ts"],"sourcesContent":["export const AXMPersonCoreMenuKeys = {\n Root: 'person-core',\n Persons: 'person-core.persons',\n PersonRelationships: 'person-core.person-relationships',\n EducationLevels: 'person-core.education-levels',\n Genders: 'person-core.genders',\n MaritalStatuses: 'person-core.marital-statuses',\n PersonTitles: 'person-core.person-titles',\n PersonIdentifierTypes: 'person-core.person-identifier-types',\n Religions: 'person-core.religions',\n ContactRoles: 'person-core.contact-roles',\n} as const;\n","/**\n * People & Organization capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPPeopleOrganizationPermissionKeys = {\n Access: 'PeopleOrganization:Permission:Access',\n ViewOrganization: 'PeopleOrganization:Permission:ViewOrganization',\n MaintainOrganization: 'PeopleOrganization:Permission:MaintainOrganization',\n MaintainTeams: 'PeopleOrganization:Permission:MaintainTeams',\n MaintainEmployees: 'PeopleOrganization:Permission:MaintainEmployees',\n ManageEmployeeActions: 'PeopleOrganization:Permission:ManageEmployeeActions',\n MaintainPersons: 'PeopleOrganization:Permission:MaintainPersons',\n MaintainAttendance: 'PeopleOrganization:Permission:MaintainAttendance',\n ManageAttendanceActions: 'PeopleOrganization:Permission:ManageAttendanceActions',\n DesignJobs: 'PeopleOrganization:Permission:DesignJobs',\n Setup: 'PeopleOrganization:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPersonCorePermissionKeys = {\n PersonCore: {\n Person: {\n Management: AXPPeopleOrganizationPermissionKeys.MaintainPersons,\n },\n EducationLevel: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n Gender: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n MaritalStatus: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonTitle: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonIdentifierType: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonRelationship: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n Religion: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n ContactRole: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n },\n} as const;\n","const config = {\n i18n: 'person-core',\n module: 'PersonCore',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-user',\n },\n entities: {\n person: {\n name: 'Person',\n title: `@${config.i18n}:persons.entities.person.title`,\n titlePlural: `@${config.i18n}:persons.entities.person.plural`,\n icon: 'fa-light fa-user',\n },\n educationLevel: {\n name: 'EducationLevel',\n title: `@${config.i18n}:education-levels.entities.education-level.title`,\n titlePlural: `@${config.i18n}:education-levels.entities.education-level.plural`,\n icon: 'fa-light fa-graduation-cap',\n },\n gender: {\n name: 'Gender',\n title: `@${config.i18n}:genders.entities.gender.title`,\n titlePlural: `@${config.i18n}:genders.entities.gender.plural`,\n icon: 'fa-light fa-venus-mars',\n },\n maritalStatus: {\n name: 'MaritalStatus',\n title: `@${config.i18n}:marital-statuses.entities.marital-status.title`,\n titlePlural: `@${config.i18n}:marital-statuses.entities.marital-status.plural`,\n icon: 'fa-light fa-ring',\n },\n personTitle: {\n name: 'PersonTitle',\n title: `@${config.i18n}:person-titles.entities.person-title.title`,\n titlePlural: `@${config.i18n}:person-titles.entities.person-title.plural`,\n icon: 'fa-light fa-user-tie',\n },\n personIdentifierType: {\n name: 'PersonIdentifierType',\n title: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.title`,\n titlePlural: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.plural`,\n icon: 'fa-light fa-id-card',\n },\n religion: {\n name: 'Religion',\n title: `@${config.i18n}:religions.entities.religion.title`,\n titlePlural: `@${config.i18n}:religions.entities.religion.plural`,\n icon: 'fa-light fa-place-of-worship',\n },\n contactRole: {\n name: 'ContactRole',\n title: `@${config.i18n}:contact-roles.entities.contact-role.title`,\n titlePlural: `@${config.i18n}:contact-roles.entities.contact-role.plural`,\n icon: 'fa-light fa-user-tag',\n },\n personRelationship: {\n name: 'PersonRelationship',\n title: `@${config.i18n}:person-relationships.entities.person-relationship.title`,\n titlePlural: `@${config.i18n}:person-relationships.entities.person-relationship.plural`,\n icon: 'fa-light fa-link',\n },\n contactAssignment: {\n name: 'ContactAssignment',\n title: `@${config.i18n}:contact-assignments.entities.contact-assignment.title`,\n titlePlural: `@${config.i18n}:contact-assignments.entities.contact-assignment.plural`,\n icon: 'fa-light fa-address-book',\n },\n },\n} as const;\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntityAction,\n AXPEntityCommandScope,\n AXPQueryFilter,\n entityDetailsEditAction,\n entityMasterCreateAction,\n entityOverrideDetailsViewAction,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Command keys ----\n\nconst ASSIGN_EXISTING_PERSON = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`;\nconst CREATE_WITH_NEW_PERSON = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`;\n\n//#endregion\n\n//#region ---- Contact assignment related-entity actions ----\n\nconst partyProcessOptions = (partyIdContextPath = 'id') => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n partyId: `{{ context.eval(\"${partyIdContextPath}\") }}`,\n 'party.title': '{{ context.eval(\"title\") }}',\n },\n },\n});\n\n/**\n * Filters ContactAssignment rows for the current row context (Party record, or Party merge-detail under Customer).\n */\nexport function contactAssignmentPartyConditions(partyIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'partyId',\n operator: { type: 'equal' },\n value: `{{ context.eval(\"${partyIdContextPath}\") }}`,\n },\n ];\n}\n\nfunction contactAssignmentPartyCreateAction(partyIdContextPath = 'id'): AXPEntityAction {\n const partyOptions = partyProcessOptions(partyIdContextPath);\n\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: 'Entity:Create' },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'AssignExistingPerson',\n title: '@person-core:contact-assignments.actions.assign-existing-person.title',\n command: { name: ASSIGN_EXISTING_PERSON, options: partyOptions },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:contact-assignments.actions.create-with-new-person.title',\n command: { name: CREATE_WITH_NEW_PERSON, options: partyOptions },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Actions for ContactAssignment when shown from Party/Customer/Supplier.\n * Create menu: assign existing person or create new person with party prefilled.\n */\nexport function contactAssignmentDetailsCrudActionsForPartyContext(\n partyIdContextPath = 'id',\n): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n contactAssignmentPartyCreateAction(partyIdContextPath),\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport { get } from 'lodash';\n\n//#endregion\n\n//#region ---- Display helpers ----\n\n/** Resolves party display title from host/process data (plain string or multi-language object). */\nexport function resolveContactAssignmentPartyDisplayTitle(locale: string, ...candidates: unknown[]): string {\n for (const candidate of candidates) {\n if (candidate == null || candidate === '') {\n continue;\n }\n\n const resolved = resolveMultiLanguageString(\n candidate as string | AXPMultiLanguageString | null | undefined,\n locale,\n ).trim();\n if (resolved) {\n return resolved;\n }\n }\n\n return '';\n}\n\n//#endregion\n\n//#region ---- Context helpers ----\n\n/** Builds a person snapshot for nested ContactAssignment display fields. */\nexport function buildContactAssignmentPersonSnapshot(\n personRow: Record<string, unknown>,\n personId: string,\n): { id: string; fullName?: string; phones?: unknown; emails?: unknown } {\n const fullName =\n (personRow['fullName'] as string | undefined) ??\n [personRow['firstName'], personRow['lastName']].filter(Boolean).join(' ').trim();\n\n return {\n id: personId,\n fullName: fullName || undefined,\n phones: personRow['phones'],\n emails: personRow['emails'],\n };\n}\n\n/** Resolves partyId and display title from command process/host payload. */\nexport function resolveContactAssignmentPartyContext(\n processData: Record<string, unknown>,\n locale: string,\n): { partyId: string; partyTitle: string } {\n const nestedParty = get(processData, 'party') as { id?: string; title?: unknown } | undefined;\n\n return {\n partyId: (processData['partyId'] as string) ?? nestedParty?.id ?? '',\n partyTitle: resolveContactAssignmentPartyDisplayTitle(\n locale,\n processData['party.title'],\n nestedParty?.title,\n get(processData, 'title'),\n ),\n };\n}\n\n//#endregion\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope, entityDetailsEditAction, entityOverrideDetailsViewAction } from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Person relationship actions ----\n\nconst CREATE_WITH_EXISTING = `${RootConfig.module.name}.PersonRelationship:CreateWithExistingPerson`;\nconst CREATE_WITH_NEW = `${RootConfig.module.name}.PersonRelationship:CreateWithNewPerson`;\n\nconst fromPersonIdOptions = (parentId: string) => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n [parentId]: '{{context.eval(\"id\")}}',\n },\n },\n});\n\n/**\n * Create action with submenu for Person Relationship entity (master list).\n */\nexport function personRelationshipMasterCreateAction(): AXPEntityAction {\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: `${RootConfig.module.name}.PersonRelationship:Create` },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'CreateWithExistingPerson',\n title: '@person-core:person-relationships.actions.choose-existing-person.title',\n command: { name: CREATE_WITH_EXISTING },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:person-relationships.actions.create-new-person.title',\n command: { name: CREATE_WITH_NEW },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Create action with submenu for Person Relationship when shown as related entity (e.g. in Person details).\n * Injects fromPersonId from parent context.\n */\nexport function personRelationshipDetailsCreateActions(parentId: string): AXPEntityAction[] {\n const createAction: AXPEntityAction = {\n ...personRelationshipMasterCreateAction(),\n items: [\n {\n name: 'CreateWithExistingPerson',\n title: '@person-core:person-relationships.actions.choose-existing-person.title',\n command: {\n name: CREATE_WITH_EXISTING,\n options: fromPersonIdOptions(parentId),\n },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:person-relationships.actions.create-new-person.title',\n command: {\n name: CREATE_WITH_NEW,\n options: fromPersonIdOptions(parentId),\n },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n\n return [createAction, entityDetailsEditAction(), entityOverrideDetailsViewAction()];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Person Core Module Manifest.\n * Defines module metadata for shared person/demographic reference data.\n */\nexport const PersonCoreManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n dependencies: ['LocationManagement'],\n required: true,\n};\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Types ----\n\nexport interface AXMPersonCoreContactAssignmentEntityModel extends AXPEntityModel<string> {\n partyId: string;\n personId: string;\n roleId: string;\n party?: { id: string; title: AXPMultiLanguageString };\n person?: { id: string; fullName?: string; phones?: unknown[]; emails?: unknown[] };\n role?: { id: string; title: AXPMultiLanguageString };\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n//#region ---- ContactRole Model ----\n\nexport interface AXMPersonCoreContactRoleEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n /**\n * ContactRole id used when mirroring a PersonRelationship edge.\n * Symmetric roles point at themselves (e.g. spouse → spouse).\n * Asymmetric pairs point at each other (e.g. mother → child, employs → employee).\n * Omit when no automatic reverse should be created (e.g. child has no unique parent role).\n */\n inverseTypeId?: string | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Education Level Model ----\n\nexport interface AXMPersonCoreEducationLevelEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Gender Model ----\n\nexport interface AXMPersonCoreGenderEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Marital Status Model ----\n\nexport interface AXMPersonCoreMaritalStatusEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Person Identifier Type Model ----\n\nexport interface AXMPersonCorePersonIdentifierTypeEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n scope: 'global' | 'national' | 'regional';\n formatRegex?: string | null;\n minLength?: number | null;\n maxLength?: number | null;\n isUnique: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Person Title Model ----\n\nexport interface AXMPersonCorePersonTitleEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Religion Model ----\n\nexport interface AXMPersonCoreReligionEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\nexport * from './contact-assignment.actions';\nexport * from './contact-assignment.utils';\nexport * from './person-relationship.actions';\n\nexport * from './root-config';\nexport * from './manifest';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAO,MAAM,qBAAqB,GAAG;AACnC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,mBAAmB,EAAE,kCAAkC;AACvD,IAAA,eAAe,EAAE,8BAA8B;AAC/C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,eAAe,EAAE,8BAA8B;AAC/C,IAAA,YAAY,EAAE,2BAA2B;AACzC,IAAA,qBAAqB,EAAE,qCAAqC;AAC5D,IAAA,SAAS,EAAE,uBAAuB;AAClC,IAAA,YAAY,EAAE,2BAA2B;;;ACV3C;;;AAGG;AACI,MAAM,mCAAmC,GAAG;AACjD,IAAA,MAAM,EAAE,sCAAsC;AAC9C,IAAA,gBAAgB,EAAE,gDAAgD;AAClE,IAAA,oBAAoB,EAAE,oDAAoD;AAC1E,IAAA,aAAa,EAAE,6CAA6C;A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,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,UAAU;IAClB,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,IAAA,QAAQ,EAAE,IAAI;;AAGhB;;ACXA;;ACGA;;ACRA;;ACAA;;ACAA;;ACKA;;ACLA;;ACAA;;ACTA;;ACAA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-person-core-client-contracts.mjs","sources":["../../../../libs/modules/person-core/contracts/src/menu.keys.ts","../../../../libs/modules/person-core/contracts/src/permission.keys.ts","../../../../libs/modules/person-core/contracts/src/root-config.ts","../../../../libs/modules/person-core/contracts/src/contact-assignment.actions.ts","../../../../libs/modules/person-core/contracts/src/person-full-name.util.ts","../../../../libs/modules/person-core/contracts/src/contact-assignment.utils.ts","../../../../libs/modules/person-core/contracts/src/person-relationship.actions.ts","../../../../libs/modules/person-core/contracts/src/manifest.ts","../../../../libs/modules/person-core/contracts/src/entities/contact-assignment/contact-assignment.types.ts","../../../../libs/modules/person-core/contracts/src/entities/contact-role/contact-role.types.ts","../../../../libs/modules/person-core/contracts/src/entities/education-level/education-level.types.ts","../../../../libs/modules/person-core/contracts/src/entities/gender/gender.types.ts","../../../../libs/modules/person-core/contracts/src/entities/marital-status/marital-status.types.ts","../../../../libs/modules/person-core/contracts/src/entities/person-identifier-type/person-identifier-type.types.ts","../../../../libs/modules/person-core/contracts/src/entities/person-title/person-title.types.ts","../../../../libs/modules/person-core/contracts/src/entities/religion/religion.types.ts","../../../../libs/modules/person-core/contracts/src/index.ts","../../../../libs/modules/person-core/contracts/src/acorex-platform-module-person-core-client-contracts.ts"],"sourcesContent":["export const AXMPersonCoreMenuKeys = {\n Root: 'person-core',\n Persons: 'person-core.persons',\n PersonRelationships: 'person-core.person-relationships',\n EducationLevels: 'person-core.education-levels',\n Genders: 'person-core.genders',\n MaritalStatuses: 'person-core.marital-statuses',\n PersonTitles: 'person-core.person-titles',\n PersonIdentifierTypes: 'person-core.person-identifier-types',\n Religions: 'person-core.religions',\n ContactRoles: 'person-core.contact-roles',\n} as const;\n","/**\n * People & Organization capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPPeopleOrganizationPermissionKeys = {\n Access: 'PeopleOrganization:Permission:Access',\n ViewOrganization: 'PeopleOrganization:Permission:ViewOrganization',\n MaintainOrganization: 'PeopleOrganization:Permission:MaintainOrganization',\n MaintainTeams: 'PeopleOrganization:Permission:MaintainTeams',\n MaintainEmployees: 'PeopleOrganization:Permission:MaintainEmployees',\n ManageEmployeeActions: 'PeopleOrganization:Permission:ManageEmployeeActions',\n MaintainPersons: 'PeopleOrganization:Permission:MaintainPersons',\n MaintainAttendance: 'PeopleOrganization:Permission:MaintainAttendance',\n ManageAttendanceActions: 'PeopleOrganization:Permission:ManageAttendanceActions',\n DesignJobs: 'PeopleOrganization:Permission:DesignJobs',\n Setup: 'PeopleOrganization:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPersonCorePermissionKeys = {\n PersonCore: {\n Person: {\n Management: AXPPeopleOrganizationPermissionKeys.MaintainPersons,\n },\n EducationLevel: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n Gender: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n MaritalStatus: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonTitle: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonIdentifierType: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n PersonRelationship: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n Religion: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n ContactRole: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n },\n} as const;\n","const config = {\n i18n: 'person-core',\n module: 'PersonCore',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-user',\n },\n entities: {\n person: {\n name: 'Person',\n title: `@${config.i18n}:persons.entities.person.title`,\n titlePlural: `@${config.i18n}:persons.entities.person.plural`,\n icon: 'fa-light fa-user',\n },\n educationLevel: {\n name: 'EducationLevel',\n title: `@${config.i18n}:education-levels.entities.education-level.title`,\n titlePlural: `@${config.i18n}:education-levels.entities.education-level.plural`,\n icon: 'fa-light fa-graduation-cap',\n },\n gender: {\n name: 'Gender',\n title: `@${config.i18n}:genders.entities.gender.title`,\n titlePlural: `@${config.i18n}:genders.entities.gender.plural`,\n icon: 'fa-light fa-venus-mars',\n },\n maritalStatus: {\n name: 'MaritalStatus',\n title: `@${config.i18n}:marital-statuses.entities.marital-status.title`,\n titlePlural: `@${config.i18n}:marital-statuses.entities.marital-status.plural`,\n icon: 'fa-light fa-ring',\n },\n personTitle: {\n name: 'PersonTitle',\n title: `@${config.i18n}:person-titles.entities.person-title.title`,\n titlePlural: `@${config.i18n}:person-titles.entities.person-title.plural`,\n icon: 'fa-light fa-user-tie',\n },\n personIdentifierType: {\n name: 'PersonIdentifierType',\n title: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.title`,\n titlePlural: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.plural`,\n icon: 'fa-light fa-id-card',\n },\n religion: {\n name: 'Religion',\n title: `@${config.i18n}:religions.entities.religion.title`,\n titlePlural: `@${config.i18n}:religions.entities.religion.plural`,\n icon: 'fa-light fa-place-of-worship',\n },\n contactRole: {\n name: 'ContactRole',\n title: `@${config.i18n}:contact-roles.entities.contact-role.title`,\n titlePlural: `@${config.i18n}:contact-roles.entities.contact-role.plural`,\n icon: 'fa-light fa-user-tag',\n },\n personRelationship: {\n name: 'PersonRelationship',\n title: `@${config.i18n}:person-relationships.entities.person-relationship.title`,\n titlePlural: `@${config.i18n}:person-relationships.entities.person-relationship.plural`,\n icon: 'fa-light fa-link',\n },\n contactAssignment: {\n name: 'ContactAssignment',\n title: `@${config.i18n}:contact-assignments.entities.contact-assignment.title`,\n titlePlural: `@${config.i18n}:contact-assignments.entities.contact-assignment.plural`,\n icon: 'fa-light fa-address-book',\n },\n },\n} as const;\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntityAction,\n AXPEntityCommandScope,\n AXPQueryFilter,\n entityDetailsEditAction,\n entityMasterCreateAction,\n entityOverrideDetailsViewAction,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Command keys ----\n\nconst ASSIGN_EXISTING_PERSON = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`;\nconst CREATE_WITH_NEW_PERSON = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`;\n\n//#endregion\n\n//#region ---- Contact assignment related-entity actions ----\n\nconst partyProcessOptions = (partyIdContextPath = 'id') => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n partyId: `{{ context.eval(\"${partyIdContextPath}\") }}`,\n 'party.title': '{{ context.eval(\"title\") }}',\n },\n },\n});\n\n/**\n * Filters ContactAssignment rows for the current row context (Party record, or Party merge-detail under Customer).\n */\nexport function contactAssignmentPartyConditions(partyIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'partyId',\n operator: { type: 'equal' },\n value: `{{ context.eval(\"${partyIdContextPath}\") }}`,\n },\n ];\n}\n\nfunction contactAssignmentPartyCreateAction(partyIdContextPath = 'id'): AXPEntityAction {\n const partyOptions = partyProcessOptions(partyIdContextPath);\n\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: 'Entity:Create' },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'AssignExistingPerson',\n title: '@person-core:contact-assignments.actions.assign-existing-person.title',\n command: { name: ASSIGN_EXISTING_PERSON, options: partyOptions },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:contact-assignments.actions.create-with-new-person.title',\n command: { name: CREATE_WITH_NEW_PERSON, options: partyOptions },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Actions for ContactAssignment when shown from Party/Customer/Supplier.\n * Create menu: assign existing person or create new person with party prefilled.\n */\nexport function contactAssignmentDetailsCrudActionsForPartyContext(\n partyIdContextPath = 'id',\n): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n contactAssignmentPartyCreateAction(partyIdContextPath),\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ----- Helpers -----\n\n/** Stored person name: firstName + \" \" + lastName. */\nexport function composePersonFullName(firstName: unknown, lastName: unknown): string {\n const first = typeof firstName === 'string' ? firstName.trim() : '';\n const last = typeof lastName === 'string' ? lastName.trim() : '';\n return `${first} ${last}`.trim();\n}\n\n/**\n * Person write body. Create payloads sometimes nest fields under `data`\n * while the runtime envelope keeps `entity` beside them.\n */\nexport function resolvePersonWriteTarget(data: Record<string, unknown>): Record<string, unknown> {\n const nested = data['data'];\n if (\n nested != null &&\n typeof nested === 'object' &&\n !Array.isArray(nested) &&\n !('firstName' in data) &&\n !('lastName' in data)\n ) {\n return nested as Record<string, unknown>;\n }\n return data;\n}\n\n/** Sets `fullName` from first and last name already on the payload, filling gaps from `existing`. */\nexport function stampPersonFullName(\n data: Record<string, unknown>,\n existing?: Record<string, unknown> | null,\n): void {\n const target = resolvePersonWriteTarget(data);\n const hasFirst = 'firstName' in target;\n const hasLast = 'lastName' in target;\n const firstName = hasFirst ? target['firstName'] : existing?.['firstName'];\n const lastName = hasLast ? target['lastName'] : existing?.['lastName'];\n target['fullName'] = composePersonFullName(firstName, lastName);\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport { get } from 'lodash';\n\nimport { composePersonFullName } from './person-full-name.util';\n\n//#endregion\n\n//#region ---- Display helpers ----\n\n/** Resolves party display title from host/process data (plain string or multi-language object). */\nexport function resolveContactAssignmentPartyDisplayTitle(locale: string, ...candidates: unknown[]): string {\n for (const candidate of candidates) {\n if (candidate == null || candidate === '') {\n continue;\n }\n\n const resolved = resolveMultiLanguageString(\n candidate as string | AXPMultiLanguageString | null | undefined,\n locale,\n ).trim();\n if (resolved) {\n return resolved;\n }\n }\n\n return '';\n}\n\n//#endregion\n\n//#region ---- Context helpers ----\n\n/** Builds a person snapshot for nested ContactAssignment display fields. */\nexport function buildContactAssignmentPersonSnapshot(\n personRow: Record<string, unknown>,\n personId: string,\n): { id: string; fullName?: string; phones?: unknown; emails?: unknown } {\n const storedFullName = typeof personRow['fullName'] === 'string' ? personRow['fullName'].trim() : '';\n const fullName = storedFullName || composePersonFullName(personRow['firstName'], personRow['lastName']);\n\n return {\n id: personId,\n fullName: fullName || undefined,\n phones: personRow['phones'],\n emails: personRow['emails'],\n };\n}\n\n/** Resolves partyId and display title from command process/host payload. */\nexport function resolveContactAssignmentPartyContext(\n processData: Record<string, unknown>,\n locale: string,\n): { partyId: string; partyTitle: string } {\n const nestedParty = get(processData, 'party') as { id?: string; title?: unknown } | undefined;\n\n return {\n partyId: (processData['partyId'] as string) ?? nestedParty?.id ?? '',\n partyTitle: resolveContactAssignmentPartyDisplayTitle(\n locale,\n processData['party.title'],\n nestedParty?.title,\n get(processData, 'title'),\n ),\n };\n}\n\n//#endregion\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityAction, AXPEntityCommandScope, entityDetailsEditAction, entityOverrideDetailsViewAction } from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Person relationship actions ----\n\nconst CREATE_WITH_EXISTING = `${RootConfig.module.name}.PersonRelationship:CreateWithExistingPerson`;\nconst CREATE_WITH_NEW = `${RootConfig.module.name}.PersonRelationship:CreateWithNewPerson`;\n\nconst fromPersonIdOptions = (parentId: string) => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n [parentId]: '{{context.eval(\"id\")}}',\n },\n },\n});\n\n/**\n * Create action with submenu for Person Relationship entity (master list).\n */\nexport function personRelationshipMasterCreateAction(): AXPEntityAction {\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: `${RootConfig.module.name}.PersonRelationship:Create` },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'CreateWithExistingPerson',\n title: '@person-core:person-relationships.actions.choose-existing-person.title',\n command: { name: CREATE_WITH_EXISTING },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:person-relationships.actions.create-new-person.title',\n command: { name: CREATE_WITH_NEW },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Create action with submenu for Person Relationship when shown as related entity (e.g. in Person details).\n * Injects fromPersonId from parent context.\n */\nexport function personRelationshipDetailsCreateActions(parentId: string): AXPEntityAction[] {\n const createAction: AXPEntityAction = {\n ...personRelationshipMasterCreateAction(),\n items: [\n {\n name: 'CreateWithExistingPerson',\n title: '@person-core:person-relationships.actions.choose-existing-person.title',\n command: {\n name: CREATE_WITH_EXISTING,\n options: fromPersonIdOptions(parentId),\n },\n icon: 'fa-light fa-user-magnifying-glass',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewPerson',\n title: '@person-core:person-relationships.actions.create-new-person.title',\n command: {\n name: CREATE_WITH_NEW,\n options: fromPersonIdOptions(parentId),\n },\n icon: 'fa-light fa-user-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n\n return [createAction, entityDetailsEditAction(), entityOverrideDetailsViewAction()];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Person Core Module Manifest.\n * Defines module metadata for shared person/demographic reference data.\n */\nexport const PersonCoreManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n dependencies: ['LocationManagement'],\n required: true,\n};\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Types ----\n\nexport interface AXMPersonCoreContactAssignmentEntityModel extends AXPEntityModel<string> {\n partyId: string;\n personId: string;\n roleId: string;\n party?: { id: string; title: AXPMultiLanguageString };\n person?: { id: string; fullName?: string; phones?: unknown[]; emails?: unknown[] };\n role?: { id: string; title: AXPMultiLanguageString };\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n//#region ---- ContactRole Model ----\n\nexport interface AXMPersonCoreContactRoleEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n /**\n * ContactRole id used when mirroring a PersonRelationship edge.\n * Symmetric roles point at themselves (e.g. spouse → spouse).\n * Asymmetric pairs point at each other (e.g. mother → child, employs → employee).\n * Omit when no automatic reverse should be created (e.g. child has no unique parent role).\n */\n inverseTypeId?: string | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Education Level Model ----\n\nexport interface AXMPersonCoreEducationLevelEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Gender Model ----\n\nexport interface AXMPersonCoreGenderEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Marital Status Model ----\n\nexport interface AXMPersonCoreMaritalStatusEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Person Identifier Type Model ----\n\nexport interface AXMPersonCorePersonIdentifierTypeEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n scope: 'global' | 'national' | 'regional';\n formatRegex?: string | null;\n minLength?: number | null;\n maxLength?: number | null;\n isUnique: boolean;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Person Title Model ----\n\nexport interface AXMPersonCorePersonTitleEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n//#region ---- Religion Model ----\n\nexport interface AXMPersonCoreReligionEntityModel {\n id: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\nexport * from './contact-assignment.actions';\nexport * from './contact-assignment.utils';\nexport * from './person-full-name.util';\nexport * from './person-relationship.actions';\n\nexport * from './root-config';\nexport * from './manifest';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAO,MAAM,qBAAqB,GAAG;AACnC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,mBAAmB,EAAE,kCAAkC;AACvD,IAAA,eAAe,EAAE,8BAA8B;AAC/C,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,eAAe,EAAE,8BAA8B;AAC/C,IAAA,YAAY,EAAE,2BAA2B;AACzC,IAAA,qBAAqB,EAAE,qCAAqC;AAC5D,IAAA,SAAS,EAAE,uBAAuB;AAClC,IAAA,YAAY,EAAE,2BAA2B;;;ACV3C;;;AAGG;AACI,MAAM,mCAAmC,GAAG;AACjD,IAAA,MAAM,EAAE,sCAAsC;AAC9C,IAAA,gBAAgB,EAAE,gDAAgD;AAClE,IAAA,oBAAoB,EAAE,oDAAoD;AAC1E,IAAA,aAAa,EAAE,6CAA6C;AAC5D,IAAA,iBAAiB,EAAE,iDAAiD;AACpE,IAAA,qBAAqB,EAAE,qDAAqD;AAC5E,IAAA,eAAe,EAAE,+CAA+C;AAChE,IAAA,kBAAkB,EAAE,kDAAkD;AACtE,IAAA,uBAAuB,EAAE,uDAAuD;AAChF,IAAA,UAAU,EAAE,0CAA0C;AACtD,IAAA,KAAK,EAAE,qCAAqC;;AAG9C;;;AAGG;AACI,MAAM,2BAA2B,GAAG;AACzC,IAAA,UAAU,EAAE;AACV,QAAA,MAAM,EAAE;YACN,UAAU,EAAE,mCAAmC,CAAC,eAAe;AAChE,SAAA;AACD,QAAA,cAAc,EAAE;YACd,UAAU,EAAE,mCAAmC,CAAC,KAAK;AACtD,SAAA;AACD,QAAA,MAAM,EAA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|
5
5
|
import { inject, Injectable } from '@angular/core';
|
|
6
6
|
import { AXPEntityFormBuilderService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
|
|
7
|
-
import { resolveContactAssignmentPartyContext, RootConfig, buildContactAssignmentPersonSnapshot } from '@acorex-platform/module-person-core-client/contracts';
|
|
7
|
+
import { resolveContactAssignmentPartyContext, RootConfig, composePersonFullName, buildContactAssignmentPersonSnapshot } from '@acorex-platform/module-person-core-client/contracts';
|
|
8
8
|
import { resolveEntityActionCommandInput, mergeEntityActionProcessData } from '@acorex-platform/framework-shared/runtime';
|
|
9
9
|
|
|
10
10
|
//#region ---- Imports ----
|
|
11
11
|
//#endregion
|
|
12
|
+
//#region ---- Helpers ----
|
|
13
|
+
/** Saved row from either a runtime command result or a plain create payload. */
|
|
14
|
+
function createdRow(result) {
|
|
15
|
+
if (!result || typeof result !== 'object') {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
const payload = runtimeCommandPayloadData(result);
|
|
19
|
+
const row = (payload ?? result);
|
|
20
|
+
const id = row['id'] ?? row['_id'];
|
|
21
|
+
if (id == null || id === '') {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return row;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
12
27
|
//#region ---- Command ----
|
|
13
28
|
class AXMContactAssignmentCreateWithNewPersonCommand {
|
|
14
29
|
constructor() {
|
|
@@ -66,10 +81,13 @@ class AXMContactAssignmentCreateWithNewPersonCommand {
|
|
|
66
81
|
}
|
|
67
82
|
dialogRef.setLoading(true);
|
|
68
83
|
try {
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
const rawContext = dialogRef.context();
|
|
85
|
+
const context = rawContext != null && typeof rawContext === 'object' && !Array.isArray(rawContext)
|
|
86
|
+
? { ...rawContext }
|
|
87
|
+
: {};
|
|
88
|
+
context['fullName'] = composePersonFullName(context['firstName'], context['lastName']);
|
|
89
|
+
const personRow = createdRow(await createPersonFn(context));
|
|
90
|
+
if (!personRow) {
|
|
73
91
|
return {
|
|
74
92
|
success: false,
|
|
75
93
|
message: {
|
|
@@ -95,7 +113,7 @@ class AXMContactAssignmentCreateWithNewPersonCommand {
|
|
|
95
113
|
}
|
|
96
114
|
})
|
|
97
115
|
.show());
|
|
98
|
-
const personRow =
|
|
116
|
+
const personRow = createdRow(personResult);
|
|
99
117
|
if (!personRow) {
|
|
100
118
|
return { success: false };
|
|
101
119
|
}
|
|
@@ -133,16 +151,15 @@ class AXMContactAssignmentCreateWithNewPersonCommand {
|
|
|
133
151
|
dialogRef.setLoading(true);
|
|
134
152
|
try {
|
|
135
153
|
const context = dialogRef.context();
|
|
136
|
-
const
|
|
154
|
+
const assignmentRow = createdRow(await createAssignmentFn({
|
|
137
155
|
...context,
|
|
138
156
|
partyId: partyContext.partyId,
|
|
139
157
|
personId,
|
|
140
158
|
person: personSnapshot,
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
if (__single_createResult) {
|
|
159
|
+
}));
|
|
160
|
+
if (assignmentRow) {
|
|
144
161
|
return { success: true, kind: 'object',
|
|
145
|
-
data:
|
|
162
|
+
data: assignmentRow,
|
|
146
163
|
message: {
|
|
147
164
|
text: await this.translationService.translateAsync('@general:messages.generic.success.description'),
|
|
148
165
|
},
|
|
@@ -182,4 +199,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
182
199
|
}] });
|
|
183
200
|
|
|
184
201
|
export { AXMContactAssignmentCreateWithNewPersonCommand };
|
|
185
|
-
//# sourceMappingURL=acorex-platform-module-person-core-client-create-contact-with-new-person.command-
|
|
202
|
+
//# sourceMappingURL=acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/commands/create-contact-with-new-person.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, runtimeCommandPayloadData} from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPEntityDefinitionRegistryService, AXPEntityFormBuilderService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { RootConfig, buildContactAssignmentPersonSnapshot, composePersonFullName, resolveContactAssignmentPartyContext } from '@acorex-platform/module-person-core-client/contracts';\nimport {\n AXPCommand,\n mergeEntityActionProcessData,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\n\n//#endregion\n\n//#region ---- Helpers ----\n\n/** Saved row from either a runtime command result or a plain create payload. */\nfunction createdRow(result: unknown): Record<string, unknown> | undefined {\n if (!result || typeof result !== 'object') {\n return undefined;\n }\n\n const payload = runtimeCommandPayloadData(result as AXPRuntimeCommandResult<Record<string, unknown>>);\n const row = (payload ?? result) as Record<string, unknown>;\n const id = row['id'] ?? row['_id'];\n if (id == null || id === '') {\n return undefined;\n }\n return row;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMContactAssignmentCreateWithNewPersonCommand implements AXPCommand<any, any> {\n private readonly entityForm = inject(AXPEntityFormBuilderService);\n private readonly entityService = inject(AXPEntityDefinitionRegistryService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: any): AXPCommandExecuteResultPromise<any> {\n const resolved = resolveEntityActionCommandInput(input);\n const processData = mergeEntityActionProcessData(input);\n const entity = resolved.entity;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n const partyContext = resolveContactAssignmentPartyContext(processData, locale);\n\n if (!partyContext.partyId) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@person-core:contact-assignments.messages.missing-party-context',\n ),\n },\n };\n }\n\n const [assignmentModuleName, assignmentEntityName] = (entity || '').split('.');\n if (!assignmentModuleName || !assignmentEntityName) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),\n },\n };\n }\n\n const personDialogTitle = await this.translationService.translateAsync(\n '@person-core:contact-assignments.actions.create-with-new-person.person-dialog-title',\n );\n\n const personResult = (await this.entityForm\n .entity(`${RootConfig.module.name}.${RootConfig.entities.person.name}`)\n .create({})\n .title(personDialogTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPRuntimeCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const personEntity = await this.entityService.resolve(\n RootConfig.module.name,\n RootConfig.entities.person.name,\n );\n const createPersonFn = personEntity?.commands?.create?.execute as\n | ((payload: unknown) => AXPCommandExecuteResultPromise<any>)\n | undefined;\n\n if (!createPersonFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const rawContext = dialogRef.context();\n const context: Record<string, unknown> =\n rawContext != null && typeof rawContext === 'object' && !Array.isArray(rawContext)\n ? { ...(rawContext as Record<string, unknown>) }\n : {};\n context['fullName'] = composePersonFullName(context['firstName'], context['lastName']);\n const personRow = createdRow(await createPersonFn(context));\n if (!personRow) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n }\n return { success: true, kind: 'object', data: personRow };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPRuntimeCommandResult<any>;\n\n const personRow = createdRow(personResult);\n if (!personRow) {\n return { success: false };\n }\n const personId = (personRow['id'] ?? personRow['_id']) as string;\n const personSnapshot = buildContactAssignmentPersonSnapshot(personRow, personId);\n\n const assignmentFormTitle = await this.translationService.translateAsync(\n '@person-core:contact-assignments.actions.create-with-new-person.assignment-dialog-title',\n );\n\n const assignmentResult = (await this.entityForm\n .entity(`${assignmentModuleName}.${assignmentEntityName}`)\n .create({\n partyId: partyContext.partyId,\n personId,\n person: personSnapshot,\n })\n .include('roleId', 'notes')\n .title(assignmentFormTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPRuntimeCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const contactAssignmentEntity = await this.entityService.resolve(\n assignmentModuleName,\n assignmentEntityName,\n );\n const createAssignmentFn = contactAssignmentEntity?.commands?.create?.execute as\n | ((payload: unknown) => AXPCommandExecuteResultPromise<any>)\n | undefined;\n\n if (!createAssignmentFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const assignmentRow = createdRow(\n await createAssignmentFn({\n ...context,\n partyId: partyContext.partyId,\n personId,\n person: personSnapshot,\n }),\n );\n if (assignmentRow) {\n return { success: true, kind: 'object',\n data: assignmentRow,\n message: {\n text: await this.translationService.translateAsync('@general:messages.generic.success.description'),\n },\n };\n }\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPRuntimeCommandResult<any>;\n\n return assignmentResult;\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAgBA;AAEA;AAEA;AACA,SAAS,UAAU,CAAC,MAAe,EAAA;IACjC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACzC,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,OAAO,GAAG,yBAAyB,CAAC,MAA0D,CAAC;AACrG,IAAA,MAAM,GAAG,IAAI,OAAO,IAAI,MAAM,CAA4B;IAC1D,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC;IAClC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,EAAE,EAAE;AAC3B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,OAAO,GAAG;AACZ;AAEA;AAEA;MAGa,8CAA8C,CAAA;AAD3D,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAChD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC1D,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmMnE,IAAA;IAjMC,MAAM,OAAO,CAAC,KAAU,EAAA;AACtB,QAAA,MAAM,QAAQ,GAAG,+BAA+B,CAAC,KAAK,CAAC;AACvD,QAAA,MAAM,WAAW,GAAG,4BAA4B,CAAC,KAAK,CAAC;AACvD,QAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM;QAC9B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SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8CAA8C,cADjC,MAAM,EAAA,CAAA,CAAA;;2FACnB,8CAA8C,EAAA,UAAA,EAAA,CAAA;kBAD1D,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RootConfig, buildContactAssignmentPersonSnapshot, AXPPeopleOrganizationPermissionKeys, AXMPersonCoreMenuKeys } from '@acorex-platform/module-person-core-client/contracts';
|
|
1
|
+
import { RootConfig, buildContactAssignmentPersonSnapshot, resolvePersonWriteTarget, stampPersonFullName, AXPPeopleOrganizationPermissionKeys, AXMPersonCoreMenuKeys } from '@acorex-platform/module-person-core-client/contracts';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { NgModule, inject, Injectable } from '@angular/core';
|
|
4
4
|
import { provideLazyProvider } from '@acorex-platform/framework-client/core';
|
|
@@ -11,7 +11,7 @@ import { AXPCommonMenuKeys, AXPCommonPermissionGroupKeys } from '@acorex-platfor
|
|
|
11
11
|
|
|
12
12
|
//#region ---- ContactAssignment person hydration ----
|
|
13
13
|
const CONTACT_ASSIGNMENT_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}`;
|
|
14
|
-
const PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;
|
|
14
|
+
const PERSON_ENTITY$1 = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;
|
|
15
15
|
/**
|
|
16
16
|
* Hydrates nested `person` on ContactAssignment rows from `personId` so consumers
|
|
17
17
|
* (e.g. party contact lists) receive Person fields such as `fullName`, `phones`, and `emails`.
|
|
@@ -39,7 +39,7 @@ const contactAssignmentPersonHydrateMiddleware = {
|
|
|
39
39
|
if (!personIds.length) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
const response = await backend.query(PERSON_ENTITY, {
|
|
42
|
+
const response = await backend.query(PERSON_ENTITY$1, {
|
|
43
43
|
skip: 0,
|
|
44
44
|
take: personIds.length,
|
|
45
45
|
filter: { field: 'id', operator: { type: 'in' }, value: personIds },
|
|
@@ -67,6 +67,47 @@ const contactAssignmentPersonHydrateMiddleware = {
|
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
69
69
|
|
|
70
|
+
//#region ----- Imports -----
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ----- Person full name -----
|
|
73
|
+
const PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;
|
|
74
|
+
/**
|
|
75
|
+
* Persists Person.fullName as firstName + " " + lastName on create and when a name changes.
|
|
76
|
+
*/
|
|
77
|
+
const personFullNameMiddleware = {
|
|
78
|
+
target: {
|
|
79
|
+
entity: PERSON_ENTITY,
|
|
80
|
+
ops: ['create', 'update', 'upsertOne'],
|
|
81
|
+
order: 80,
|
|
82
|
+
},
|
|
83
|
+
execute: async (ctx, next) => {
|
|
84
|
+
const data = ctx.data;
|
|
85
|
+
if (data && typeof data === 'object' && !Array.isArray(data)) {
|
|
86
|
+
const record = data;
|
|
87
|
+
const target = resolvePersonWriteTarget(record);
|
|
88
|
+
const creating = ctx.op === 'create' || ctx.op === 'upsertOne';
|
|
89
|
+
const renaming = 'firstName' in target || 'lastName' in target;
|
|
90
|
+
if (creating || renaming) {
|
|
91
|
+
let existing = null;
|
|
92
|
+
if (!creating && ctx.id != null && (!('firstName' in target) || !('lastName' in target))) {
|
|
93
|
+
try {
|
|
94
|
+
const row = await ctx.entities.getOne(PERSON_ENTITY, ctx.id);
|
|
95
|
+
if (row && typeof row === 'object') {
|
|
96
|
+
existing = row;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
existing = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
stampPersonFullName(record, existing);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
await next();
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
|
|
70
111
|
//#region ---- Imports ----
|
|
71
112
|
//#endregion
|
|
72
113
|
//#region ---- Module ----
|
|
@@ -81,6 +122,11 @@ class AXMPersonCoreModule {
|
|
|
81
122
|
multi: true,
|
|
82
123
|
useValue: contactAssignmentPersonHydrateMiddleware,
|
|
83
124
|
},
|
|
125
|
+
{
|
|
126
|
+
provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
|
|
127
|
+
multi: true,
|
|
128
|
+
useValue: personFullNameMiddleware,
|
|
129
|
+
},
|
|
84
130
|
provideCommandSetups([
|
|
85
131
|
{
|
|
86
132
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,
|
|
@@ -88,7 +134,7 @@ class AXMPersonCoreModule {
|
|
|
88
134
|
},
|
|
89
135
|
{
|
|
90
136
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,
|
|
91
|
-
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-
|
|
137
|
+
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs').then((c) => c.AXMContactAssignmentCreateWithNewPersonCommand),
|
|
92
138
|
},
|
|
93
139
|
]),
|
|
94
140
|
] }); }
|
|
@@ -105,6 +151,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
105
151
|
multi: true,
|
|
106
152
|
useValue: contactAssignmentPersonHydrateMiddleware,
|
|
107
153
|
},
|
|
154
|
+
{
|
|
155
|
+
provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
|
|
156
|
+
multi: true,
|
|
157
|
+
useValue: personFullNameMiddleware,
|
|
158
|
+
},
|
|
108
159
|
provideCommandSetups([
|
|
109
160
|
{
|
|
110
161
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,
|
|
@@ -112,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
112
163
|
},
|
|
113
164
|
{
|
|
114
165
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,
|
|
115
|
-
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-
|
|
166
|
+
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-DdUPrNoj.mjs').then((c) => c.AXMContactAssignmentCreateWithNewPersonCommand),
|
|
116
167
|
},
|
|
117
168
|
]),
|
|
118
169
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-person-core-client.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/middlewares/contact-assignment-person-hydrate.middleware.ts","../../../../libs/modules/person-core/client/src/lib/person-core.module.ts","../../../../libs/modules/person-core/client/src/lib/menu.provider.ts","../../../../libs/modules/person-core/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/person-core/client/src/acorex-platform-module-person-core-client.ts"],"sourcesContent":["import { AXPEntityStorageMiddleware } from '@acorex-platform/framework-client/layout/entity';\nimport { get, set } from 'lodash';\n\nimport { RootConfig, buildContactAssignmentPersonSnapshot } from '@acorex-platform/module-person-core-client/contracts';\n\n//#region ---- ContactAssignment person hydration ----\n\nconst CONTACT_ASSIGNMENT_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}`;\nconst PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;\n\n/**\n * Hydrates nested `person` on ContactAssignment rows from `personId` so consumers\n * (e.g. party contact lists) receive Person fields such as `fullName`, `phones`, and `emails`.\n */\nexport const contactAssignmentPersonHydrateMiddleware: AXPEntityStorageMiddleware = {\n target: { ops: ['getOne', 'getAll', 'query'], order: 13 },\n execute: async (ctx, next) => {\n const backend = ctx.entities;\n\n await next();\n\n if (ctx.entityName !== CONTACT_ASSIGNMENT_ENTITY) {\n return;\n }\n\n try {\n const rows: Record<string, unknown>[] = Array.isArray(ctx.result)\n ? ctx.result\n : Array.isArray((ctx.result as { items?: unknown[] })?.items)\n ? ((ctx.result as { items: Record<string, unknown>[] }).items ?? [])\n : ctx.result\n ? [ctx.result as Record<string, unknown>]\n : [];\n\n if (!rows.length) {\n return;\n }\n\n const personIds = Array.from(\n new Set(rows.map((row) => get(row, 'personId')).filter((id) => id != null)),\n );\n\n if (!personIds.length) {\n return;\n }\n\n const response = await backend.query(PERSON_ENTITY, {\n skip: 0,\n take: personIds.length,\n filter: { field: 'id', operator: { type: 'in' }, value: personIds },\n });\n\n const personMap = new Map<unknown, Record<string, unknown>>();\n for (const item of response?.items ?? []) {\n const record = item as unknown as Record<string, unknown>;\n personMap.set(get(record, 'id'), record);\n }\n\n for (const row of rows) {\n const personId = get(row, 'personId');\n if (personId == null) {\n continue;\n }\n const person = personMap.get(personId);\n if (person) {\n set(row, 'person', buildContactAssignmentPersonSnapshot(person, personId as string));\n }\n }\n } catch {\n // swallow to avoid breaking main flow\n }\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\nimport { NgModule } from '@angular/core';\nimport { provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_STORAGE_MIDDLEWARE } from '@acorex-platform/framework-client/layout/entity';\nimport { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { contactAssignmentPersonHydrateMiddleware } from './middlewares/contact-assignment-person-hydrate.middleware';\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () =>\n import('./permission-definition.provider').then((m) => m.AXMPersonCorePermissionDefinitionProvider)\n ),\n provideLazyProvider(AXP_MENU_PROVIDER, () =>\n import('./menu.provider').then((m) => m.AXMPersonCoreMenuProvider)\n ),\n \n {\n provide: AXP_ENTITY_STORAGE_MIDDLEWARE,\n multi: true,\n useValue: contactAssignmentPersonHydrateMiddleware,\n },\n provideCommandSetups([\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,\n command: () =>\n import('./commands/assign-existing-person-to-party.command').then(\n (c) => c.AXMContactAssignmentAssignExistingPersonCommand,\n ),\n },\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,\n command: () =>\n import('./commands/create-contact-with-new-person.command').then(\n (c) => c.AXMContactAssignmentCreateWithNewPersonCommand,\n ),\n },\n ]),\n ],\n})\nexport class AXMPersonCoreModule { }\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport {\n AXPPeopleOrganizationPermissionKeys,\n AXMPersonCoreMenuKeys,\n RootConfig,\n} from '@acorex-platform/module-person-core-client/contracts';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\nexport class AXMPersonCoreMenuProvider implements AXPMenuProvider {\n private readonly entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const keys = AXPPeopleOrganizationPermissionKeys;\n\n context.find(AXPCommonMenuKeys.Contacts).addItems([\n {\n name: AXMPersonCoreMenuKeys.Persons,\n text: RootConfig.entities.person.titlePlural,\n icon: RootConfig.entities.person.icon,\n priority: 30,\n path: this.entityService.withEntity(module.name, RootConfig.entities.person.name).createPath(),\n policy: {\n features: [module.name],\n permissions: [keys.MaintainPersons],\n },\n },\n ]);\n\n context.find(AXPCommonMenuKeys.PeopleAndDemographics).addItems([\n {\n name: AXMPersonCoreMenuKeys.EducationLevels,\n text: RootConfig.entities.educationLevel.titlePlural,\n icon: RootConfig.entities.educationLevel.icon,\n priority: 1,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.educationLevel.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.Genders,\n text: RootConfig.entities.gender.titlePlural,\n icon: RootConfig.entities.gender.icon,\n priority: 2,\n path: this.entityService.withEntity(module.name, RootConfig.entities.gender.name).createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.MaritalStatuses,\n text: RootConfig.entities.maritalStatus.titlePlural,\n icon: RootConfig.entities.maritalStatus.icon,\n priority: 3,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.maritalStatus.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.PersonTitles,\n text: RootConfig.entities.personTitle.titlePlural,\n icon: RootConfig.entities.personTitle.icon,\n priority: 4,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.personTitle.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.PersonIdentifierTypes,\n text: RootConfig.entities.personIdentifierType.titlePlural,\n icon: RootConfig.entities.personIdentifierType.icon,\n priority: 5,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.personIdentifierType.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.Religions,\n text: RootConfig.entities.religion.titlePlural,\n icon: RootConfig.entities.religion.icon,\n priority: 6,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.religion.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.ContactRoles,\n text: RootConfig.entities.contactRole.titlePlural,\n icon: RootConfig.entities.contactRole.icon,\n priority: 7,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.contactRole.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n ]);\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPPeopleOrganizationPermissionKeys\n} from '@acorex-platform/module-person-core-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers person-core capabilities into the shared People & Organization group.\n */\n@Injectable()\nexport class AXMPersonCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPPeopleOrganizationPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:people-organization.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.PeopleOrganization.Root, `${G}.people-organization.title`, `${G}.people-organization.description`, { order: 10 });\n\n context\n .addGroup(\n groups.PeopleOrganization.Workforce,\n `${G}.people-organization-workforce.title`,\n `${G}.people-organization-workforce.description`,\n { parent: groups.PeopleOrganization.Root, order: 20 },\n )\n .addPermission(keys.MaintainPersons, `${P}.maintain-persons.title`, `${P}.maintain-persons.description`)\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAKA;AAEA,MAAM,yBAAyB,GAAG,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,E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AAA,QAAQ,CACP,MAAM,CAAC,kBAAkB,CAAC,SAAS,EACnC,CAAA,EAAG,CAAC,CAAA,oCAAA,CAAsC,EAC1C,CAAA,EAAG,CAAC,CAAA,0CAAA,CAA4C,EAChD,EAAE,MAAM,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAEtD,aAAA,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAA,EAAG,CAAC,CAAA,uBAAA,CAAyB,EAAE,CAAA,EAAG,CAAC,CAAA,6BAAA,CAA+B;AACtG,aAAA,aAAa;AACb,aAAA,QAAQ,EAAE;IACf;8GAnBW,yCAAyC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzC,yCAAyC,EAAA,CAAA,CAAA;;2FAAzC,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBADrD;;;;;;;;ACtBD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-person-core-client.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/middlewares/contact-assignment-person-hydrate.middleware.ts","../../../../libs/modules/person-core/client/src/lib/middlewares/person-full-name.middleware.ts","../../../../libs/modules/person-core/client/src/lib/person-core.module.ts","../../../../libs/modules/person-core/client/src/lib/menu.provider.ts","../../../../libs/modules/person-core/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/person-core/client/src/acorex-platform-module-person-core-client.ts"],"sourcesContent":["import { AXPEntityStorageMiddleware } from '@acorex-platform/framework-client/layout/entity';\nimport { get, set } from 'lodash';\n\nimport { RootConfig, buildContactAssignmentPersonSnapshot } from '@acorex-platform/module-person-core-client/contracts';\n\n//#region ---- ContactAssignment person hydration ----\n\nconst CONTACT_ASSIGNMENT_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}`;\nconst PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;\n\n/**\n * Hydrates nested `person` on ContactAssignment rows from `personId` so consumers\n * (e.g. party contact lists) receive Person fields such as `fullName`, `phones`, and `emails`.\n */\nexport const contactAssignmentPersonHydrateMiddleware: AXPEntityStorageMiddleware = {\n target: { ops: ['getOne', 'getAll', 'query'], order: 13 },\n execute: async (ctx, next) => {\n const backend = ctx.entities;\n\n await next();\n\n if (ctx.entityName !== CONTACT_ASSIGNMENT_ENTITY) {\n return;\n }\n\n try {\n const rows: Record<string, unknown>[] = Array.isArray(ctx.result)\n ? ctx.result\n : Array.isArray((ctx.result as { items?: unknown[] })?.items)\n ? ((ctx.result as { items: Record<string, unknown>[] }).items ?? [])\n : ctx.result\n ? [ctx.result as Record<string, unknown>]\n : [];\n\n if (!rows.length) {\n return;\n }\n\n const personIds = Array.from(\n new Set(rows.map((row) => get(row, 'personId')).filter((id) => id != null)),\n );\n\n if (!personIds.length) {\n return;\n }\n\n const response = await backend.query(PERSON_ENTITY, {\n skip: 0,\n take: personIds.length,\n filter: { field: 'id', operator: { type: 'in' }, value: personIds },\n });\n\n const personMap = new Map<unknown, Record<string, unknown>>();\n for (const item of response?.items ?? []) {\n const record = item as unknown as Record<string, unknown>;\n personMap.set(get(record, 'id'), record);\n }\n\n for (const row of rows) {\n const personId = get(row, 'personId');\n if (personId == null) {\n continue;\n }\n const person = personMap.get(personId);\n if (person) {\n set(row, 'person', buildContactAssignmentPersonSnapshot(person, personId as string));\n }\n }\n } catch {\n // swallow to avoid breaking main flow\n }\n },\n};\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPEntityStorageMiddleware } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig, resolvePersonWriteTarget, stampPersonFullName } from '@acorex-platform/module-person-core-client/contracts';\n\n//#endregion\n\n//#region ----- Person full name -----\n\nconst PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.name}`;\n\n/**\n * Persists Person.fullName as firstName + \" \" + lastName on create and when a name changes.\n */\nexport const personFullNameMiddleware: AXPEntityStorageMiddleware = {\n target: {\n entity: PERSON_ENTITY,\n ops: ['create', 'update', 'upsertOne'],\n order: 80,\n },\n execute: async (ctx, next) => {\n const data = ctx.data;\n if (data && typeof data === 'object' && !Array.isArray(data)) {\n const record = data as Record<string, unknown>;\n const target = resolvePersonWriteTarget(record);\n const creating = ctx.op === 'create' || ctx.op === 'upsertOne';\n const renaming = 'firstName' in target || 'lastName' in target;\n\n if (creating || renaming) {\n let existing: Record<string, unknown> | null = null;\n if (!creating && ctx.id != null && (!('firstName' in target) || !('lastName' in target))) {\n try {\n const row = await ctx.entities.getOne(PERSON_ENTITY, ctx.id);\n if (row && typeof row === 'object') {\n existing = row as unknown as Record<string, unknown>;\n }\n } catch {\n existing = null;\n }\n }\n stampPersonFullName(record, existing);\n }\n }\n\n await next();\n },\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\nimport { NgModule } from '@angular/core';\nimport { provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_STORAGE_MIDDLEWARE } from '@acorex-platform/framework-client/layout/entity';\nimport { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { contactAssignmentPersonHydrateMiddleware } from './middlewares/contact-assignment-person-hydrate.middleware';\nimport { personFullNameMiddleware } from './middlewares/person-full-name.middleware';\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () =>\n import('./permission-definition.provider').then((m) => m.AXMPersonCorePermissionDefinitionProvider)\n ),\n provideLazyProvider(AXP_MENU_PROVIDER, () =>\n import('./menu.provider').then((m) => m.AXMPersonCoreMenuProvider)\n ),\n \n {\n provide: AXP_ENTITY_STORAGE_MIDDLEWARE,\n multi: true,\n useValue: contactAssignmentPersonHydrateMiddleware,\n },\n {\n provide: AXP_ENTITY_STORAGE_MIDDLEWARE,\n multi: true,\n useValue: personFullNameMiddleware,\n },\n provideCommandSetups([\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,\n command: () =>\n import('./commands/assign-existing-person-to-party.command').then(\n (c) => c.AXMContactAssignmentAssignExistingPersonCommand,\n ),\n },\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,\n command: () =>\n import('./commands/create-contact-with-new-person.command').then(\n (c) => c.AXMContactAssignmentCreateWithNewPersonCommand,\n ),\n },\n ]),\n ],\n})\nexport class AXMPersonCoreModule { }\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport {\n AXPPeopleOrganizationPermissionKeys,\n AXMPersonCoreMenuKeys,\n RootConfig,\n} from '@acorex-platform/module-person-core-client/contracts';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\nexport class AXMPersonCoreMenuProvider implements AXPMenuProvider {\n private readonly entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const keys = AXPPeopleOrganizationPermissionKeys;\n\n context.find(AXPCommonMenuKeys.Contacts).addItems([\n {\n name: AXMPersonCoreMenuKeys.Persons,\n text: RootConfig.entities.person.titlePlural,\n icon: RootConfig.entities.person.icon,\n priority: 30,\n path: this.entityService.withEntity(module.name, RootConfig.entities.person.name).createPath(),\n policy: {\n features: [module.name],\n permissions: [keys.MaintainPersons],\n },\n },\n ]);\n\n context.find(AXPCommonMenuKeys.PeopleAndDemographics).addItems([\n {\n name: AXMPersonCoreMenuKeys.EducationLevels,\n text: RootConfig.entities.educationLevel.titlePlural,\n icon: RootConfig.entities.educationLevel.icon,\n priority: 1,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.educationLevel.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.Genders,\n text: RootConfig.entities.gender.titlePlural,\n icon: RootConfig.entities.gender.icon,\n priority: 2,\n path: this.entityService.withEntity(module.name, RootConfig.entities.gender.name).createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.MaritalStatuses,\n text: RootConfig.entities.maritalStatus.titlePlural,\n icon: RootConfig.entities.maritalStatus.icon,\n priority: 3,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.maritalStatus.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.PersonTitles,\n text: RootConfig.entities.personTitle.titlePlural,\n icon: RootConfig.entities.personTitle.icon,\n priority: 4,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.personTitle.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.PersonIdentifierTypes,\n text: RootConfig.entities.personIdentifierType.titlePlural,\n icon: RootConfig.entities.personIdentifierType.icon,\n priority: 5,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.personIdentifierType.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.Religions,\n text: RootConfig.entities.religion.titlePlural,\n icon: RootConfig.entities.religion.icon,\n priority: 6,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.religion.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXMPersonCoreMenuKeys.ContactRoles,\n text: RootConfig.entities.contactRole.titlePlural,\n icon: RootConfig.entities.contactRole.icon,\n priority: 7,\n path: this.entityService\n .withEntity(module.name, RootConfig.entities.contactRole.name)\n .createPath(),\n policy: {\n features: [RootConfig.module.name],\n permissions: [keys.Setup],\n },\n },\n ]);\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPPeopleOrganizationPermissionKeys\n} from '@acorex-platform/module-person-core-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers person-core capabilities into the shared People & Organization group.\n */\n@Injectable()\nexport class AXMPersonCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPPeopleOrganizationPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:people-organization.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.PeopleOrganization.Root, `${G}.people-organization.title`, `${G}.people-organization.description`, { order: 10 });\n\n context\n .addGroup(\n groups.PeopleOrganization.Workforce,\n `${G}.people-organization-workforce.title`,\n `${G}.people-organization-workforce.description`,\n { parent: groups.PeopleOrganization.Root, order: 20 },\n )\n .addPermission(keys.MaintainPersons, `${P}.maintain-persons.title`, `${P}.maintain-persons.description`)\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["PERSON_ENTITY"],"mappings":";;;;;;;;;;;AAKA;AAEA,MAAM,yBAAyB,GAAG,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,EAAE;AAC3G,MAAMA,eAAa,GAAG,CAAA,E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CAAA;IACpD,MAAM,MAAM,CAAC,OAA+C,EAAA;QAC1D,MAAM,IAAI,GAAG,mCAAmC;QAChD,MAAM,MAAM,GAAG,4BAA4B;QAC3C,MAAM,CAAC,GAAG,yCAAyC;QACnD,MAAM,CAAC,GAAG,2BAA2B;QAErC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAA,EAAG,CAAC,4BAA4B,EAAE,CAAA,EAAG,CAAC,CAAA,gCAAA,CAAkC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAEzI;AACG,aAAA,QAAQ,CACP,MAAM,CAAC,kBAAkB,CAAC,SAAS,EACnC,CAAA,EAAG,CAAC,CAAA,oCAAA,CAAsC,EAC1C,CAAA,EAAG,CAAC,CAAA,0CAAA,CAA4C,EAChD,EAAE,MAAM,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAEtD,aAAA,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAA,EAAG,CAAC,CAAA,uBAAA,CAAyB,EAAE,CAAA,EAAG,CAAC,CAAA,6BAAA,CAA+B;AACtG,aAAA,aAAa;AACb,aAAA,QAAQ,EAAE;IACf;8GAnBW,yCAAyC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzC,yCAAyC,EAAA,CAAA,CAAA;;2FAAzC,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBADrD;;;;;;;;ACtBD;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex-platform/module-person-core-client",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.17",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@acorex-platform/module-location-management-client": "2.0.0-next.
|
|
6
|
+
"@acorex-platform/module-location-management-client": "2.0.0-next.17",
|
|
7
7
|
"@angular/common": "^21.0.0 || ^22.0.0",
|
|
8
8
|
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
9
9
|
},
|
|
@@ -92,6 +92,16 @@ declare function resolveContactAssignmentPartyContext(processData: Record<string
|
|
|
92
92
|
partyTitle: string;
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
+
/** Stored person name: firstName + " " + lastName. */
|
|
96
|
+
declare function composePersonFullName(firstName: unknown, lastName: unknown): string;
|
|
97
|
+
/**
|
|
98
|
+
* Person write body. Create payloads sometimes nest fields under `data`
|
|
99
|
+
* while the runtime envelope keeps `entity` beside them.
|
|
100
|
+
*/
|
|
101
|
+
declare function resolvePersonWriteTarget(data: Record<string, unknown>): Record<string, unknown>;
|
|
102
|
+
/** Sets `fullName` from first and last name already on the payload, filling gaps from `existing`. */
|
|
103
|
+
declare function stampPersonFullName(data: Record<string, unknown>, existing?: Record<string, unknown> | null): void;
|
|
104
|
+
|
|
95
105
|
/**
|
|
96
106
|
* Create action with submenu for Person Relationship entity (master list).
|
|
97
107
|
*/
|
|
@@ -236,7 +246,7 @@ interface AXMPersonCoreMaritalStatusEntityModel {
|
|
|
236
246
|
interface AXMPersonCorePersonEntityModel extends AXPEntityModel<string> {
|
|
237
247
|
firstName: string;
|
|
238
248
|
lastName: string;
|
|
239
|
-
/**
|
|
249
|
+
/** Persisted: firstName + " " + lastName */
|
|
240
250
|
fullName?: string;
|
|
241
251
|
personTitleId?: string;
|
|
242
252
|
personTitle?: {
|
|
@@ -307,5 +317,5 @@ interface AXMPersonCoreReligionEntityModel {
|
|
|
307
317
|
description?: AXPMultiLanguageString | null;
|
|
308
318
|
}
|
|
309
319
|
|
|
310
|
-
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, PersonCoreManifest, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle };
|
|
320
|
+
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, PersonCoreManifest, RootConfig, buildContactAssignmentPersonSnapshot, composePersonFullName, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle, resolvePersonWriteTarget, stampPersonFullName };
|
|
311
321
|
export type { AXMPersonCoreContactAssignmentEntityModel, AXMPersonCoreContactRoleEntityModel, AXMPersonCoreEducationLevelEntityModel, AXMPersonCoreGenderEntityModel, AXMPersonCoreMaritalStatusEntityModel, AXMPersonCorePersonEntityModel, AXMPersonCorePersonIdentifierTypeEntityModel, AXMPersonCorePersonRelationshipEntityModel, AXMPersonCorePersonTitleEntityModel, AXMPersonCoreReligionEntityModel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/commands/create-contact-with-new-person.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, runtimeCommandPayloadData} from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPEntityDefinitionRegistryService, AXPEntityFormBuilderService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { RootConfig, buildContactAssignmentPersonSnapshot, resolveContactAssignmentPartyContext } from '@acorex-platform/module-person-core-client/contracts';\nimport {\n AXPCommand,\n mergeEntityActionProcessData,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMContactAssignmentCreateWithNewPersonCommand implements AXPCommand<any, any> {\n private readonly entityForm = inject(AXPEntityFormBuilderService);\n private readonly entityService = inject(AXPEntityDefinitionRegistryService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: any): AXPCommandExecuteResultPromise<any> {\n const resolved = resolveEntityActionCommandInput(input);\n const processData = mergeEntityActionProcessData(input);\n const entity = resolved.entity;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n const partyContext = resolveContactAssignmentPartyContext(processData, locale);\n\n if (!partyContext.partyId) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@person-core:contact-assignments.messages.missing-party-context',\n ),\n },\n };\n }\n\n const [assignmentModuleName, assignmentEntityName] = (entity || '').split('.');\n if (!assignmentModuleName || !assignmentEntityName) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),\n },\n };\n }\n\n const personDialogTitle = await this.translationService.translateAsync(\n '@person-core:contact-assignments.actions.create-with-new-person.person-dialog-title',\n );\n\n const personResult = (await this.entityForm\n .entity(`${RootConfig.module.name}.${RootConfig.entities.person.name}`)\n .create({})\n .title(personDialogTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPRuntimeCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const personEntity = await this.entityService.resolve(\n RootConfig.module.name,\n RootConfig.entities.person.name,\n );\n const createPersonFn = personEntity?.commands?.create?.execute as\n | ((payload: unknown) => AXPCommandExecuteResultPromise<any>)\n | undefined;\n\n if (!createPersonFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const createResult = await createPersonFn(context);\n const personRow = runtimeCommandPayloadData(createResult);\n if (!personRow?.id && !personRow?._id) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n }\n return { success: true, kind: 'object', data: personRow };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPRuntimeCommandResult<any>;\n\n const personRow = runtimeCommandPayloadData(personResult) as Record<string, unknown> | undefined;\n if (!personRow) {\n return { success: false };\n }\n const personId = (personRow['id'] ?? personRow['_id']) as string;\n const personSnapshot = buildContactAssignmentPersonSnapshot(personRow, personId);\n\n const assignmentFormTitle = await this.translationService.translateAsync(\n '@person-core:contact-assignments.actions.create-with-new-person.assignment-dialog-title',\n );\n\n const assignmentResult = (await this.entityForm\n .entity(`${assignmentModuleName}.${assignmentEntityName}`)\n .create({\n partyId: partyContext.partyId,\n personId,\n person: personSnapshot,\n })\n .include('roleId', 'notes')\n .title(assignmentFormTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPRuntimeCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const contactAssignmentEntity = await this.entityService.resolve(\n assignmentModuleName,\n assignmentEntityName,\n );\n const createAssignmentFn = contactAssignmentEntity?.commands?.create?.execute as\n | ((payload: unknown) => AXPCommandExecuteResultPromise<any>)\n | undefined;\n\n if (!createAssignmentFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const createResult = await createAssignmentFn({\n ...context,\n partyId: partyContext.partyId,\n personId,\n person: personSnapshot,\n });\n const __single_createResult = runtimeCommandPayloadData(createResult);\n if (__single_createResult) {\n return { success: true, kind: 'object',\n data: runtimeCommandPayloadData(createResult),\n message: {\n text: await this.translationService.translateAsync('@general:messages.generic.success.description'),\n },\n };\n }\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPRuntimeCommandResult<any>;\n\n return assignmentResult;\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAgBA;AAEA;MAGa,8CAA8C,CAAA;AAD3D,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAChD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC1D,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA8LnE,IAAA;IA5LC,MAAM,OAAO,CAAC,KAAU,EAAA;AACtB,QAAA,MAAM,QAAQ,GAAG,+BAA+B,CAAC,KAAK,CAAC;AACvD,QAAA,MAAM,WAAW,GAAG,4BAA4B,CAAC,KAAK,CAAC;AACvD,QAAA,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,kB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