@acorex-platform/module-person-core-client 0.0.18 → 0.0.21
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-assign-existing-person-to-party.command-DO3Z5pPU.mjs → acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs} +13 -14
- package/fesm2022/acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client-contracts.mjs +33 -1636
- 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-CVNc2tNy.mjs → acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs} +17 -18
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-person-core-client.mjs +43 -124
- package/fesm2022/acorex-platform-module-person-core-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-person-core-client-contracts.d.ts +42 -33
- package/types/acorex-platform-module-person-core-client.d.ts +6 -13
- package/fesm2022/acorex-platform-module-person-core-client-assign-existing-person-to-party.command-DO3Z5pPU.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-person-core-client-create-contact-with-new-person.command-CVNc2tNy.mjs.map +0 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { RootConfig, buildContactAssignmentPersonSnapshot,
|
|
1
|
+
import { RootConfig, buildContactAssignmentPersonSnapshot, AXPPeopleOrganizationPermissionKeys, AXMPersonCoreMenuKeys } from '@acorex-platform/module-person-core-client/contracts';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject,
|
|
3
|
+
import { NgModule, inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';
|
|
5
|
-
import {
|
|
5
|
+
import { AXP_ENTITY_STORAGE_MIDDLEWARE, AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
6
6
|
import { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';
|
|
7
7
|
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
|
|
8
8
|
import { provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
9
9
|
import { get, set } from 'lodash';
|
|
10
|
-
import { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';
|
|
11
|
-
import { AXTranslationService } from '@acorex/core/translation';
|
|
10
|
+
import { AXPCommonMenuKeys, AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';
|
|
12
11
|
|
|
13
12
|
//#region ---- Imports ----
|
|
14
13
|
//#endregion
|
|
@@ -23,6 +22,8 @@ const PersonCoreManifest = {
|
|
|
23
22
|
title: RootConfig.module.title,
|
|
24
23
|
icon: RootConfig.module.icon,
|
|
25
24
|
i18n: RootConfig.config.i18n,
|
|
25
|
+
type: 'platform',
|
|
26
|
+
domain: 'platform',
|
|
26
27
|
dependencies: ['LocationManagement'],
|
|
27
28
|
required: true,
|
|
28
29
|
};
|
|
@@ -38,7 +39,7 @@ const PERSON_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.person.na
|
|
|
38
39
|
const contactAssignmentPersonHydrateMiddleware = {
|
|
39
40
|
target: { ops: ['getOne', 'getAll', 'query'], order: 13 },
|
|
40
41
|
execute: async (ctx, next) => {
|
|
41
|
-
const backend =
|
|
42
|
+
const backend = ctx.entities;
|
|
42
43
|
await next();
|
|
43
44
|
if (ctx.entityName !== CONTACT_ASSIGNMENT_ENTITY) {
|
|
44
45
|
return;
|
|
@@ -90,9 +91,9 @@ const contactAssignmentPersonHydrateMiddleware = {
|
|
|
90
91
|
//#endregion
|
|
91
92
|
//#region ---- Module ----
|
|
92
93
|
class AXMPersonCoreModule {
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
94
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
95
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
95
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCoreModule }); }
|
|
96
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCoreModule, providers: [
|
|
96
97
|
{
|
|
97
98
|
provide: AXP_MODULE_MANIFEST_PROVIDER,
|
|
98
99
|
useValue: PersonCoreManifest,
|
|
@@ -100,7 +101,6 @@ class AXMPersonCoreModule {
|
|
|
100
101
|
},
|
|
101
102
|
provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMPersonCorePermissionDefinitionProvider)),
|
|
102
103
|
provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMPersonCoreMenuProvider)),
|
|
103
|
-
provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMPersonCoreEntityProvider)),
|
|
104
104
|
{
|
|
105
105
|
provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
|
|
106
106
|
multi: true,
|
|
@@ -109,16 +109,16 @@ class AXMPersonCoreModule {
|
|
|
109
109
|
provideCommandSetups([
|
|
110
110
|
{
|
|
111
111
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,
|
|
112
|
-
command: () => import('./acorex-platform-module-person-core-client-assign-existing-person-to-party.command-
|
|
112
|
+
command: () => import('./acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs').then((c) => c.AXMContactAssignmentAssignExistingPersonCommand),
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,
|
|
116
|
-
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-
|
|
116
|
+
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs').then((c) => c.AXMContactAssignmentCreateWithNewPersonCommand),
|
|
117
117
|
},
|
|
118
118
|
]),
|
|
119
119
|
] }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCoreModule, decorators: [{
|
|
122
122
|
type: NgModule,
|
|
123
123
|
args: [{
|
|
124
124
|
imports: [],
|
|
@@ -130,7 +130,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
130
130
|
},
|
|
131
131
|
provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMPersonCorePermissionDefinitionProvider)),
|
|
132
132
|
provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMPersonCoreMenuProvider)),
|
|
133
|
-
provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMPersonCoreEntityProvider)),
|
|
134
133
|
{
|
|
135
134
|
provide: AXP_ENTITY_STORAGE_MIDDLEWARE,
|
|
136
135
|
multi: true,
|
|
@@ -139,88 +138,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
139
138
|
provideCommandSetups([
|
|
140
139
|
{
|
|
141
140
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:AssignExistingPerson`,
|
|
142
|
-
command: () => import('./acorex-platform-module-person-core-client-assign-existing-person-to-party.command-
|
|
141
|
+
command: () => import('./acorex-platform-module-person-core-client-assign-existing-person-to-party.command-CicvKND6.mjs').then((c) => c.AXMContactAssignmentAssignExistingPersonCommand),
|
|
143
142
|
},
|
|
144
143
|
{
|
|
145
144
|
key: `${RootConfig.module.name}.${RootConfig.entities.contactAssignment.name}:CreateWithNewPerson`,
|
|
146
|
-
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-
|
|
145
|
+
command: () => import('./acorex-platform-module-person-core-client-create-contact-with-new-person.command-DJXhGax3.mjs').then((c) => c.AXMContactAssignmentCreateWithNewPersonCommand),
|
|
147
146
|
},
|
|
148
147
|
]),
|
|
149
148
|
],
|
|
150
149
|
}]
|
|
151
150
|
}] });
|
|
152
151
|
|
|
153
|
-
//#region ----
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region ---- Entity Provider ----
|
|
156
|
-
class AXMPersonCoreEntityProvider {
|
|
157
|
-
preload() {
|
|
158
|
-
const { entities, module } = RootConfig;
|
|
159
|
-
return [
|
|
160
|
-
entities.person.name,
|
|
161
|
-
entities.educationLevel.name,
|
|
162
|
-
entities.gender.name,
|
|
163
|
-
entities.maritalStatus.name,
|
|
164
|
-
entities.personTitle.name,
|
|
165
|
-
entities.personIdentifierType.name,
|
|
166
|
-
entities.personRelationship.name,
|
|
167
|
-
entities.contactAssignment.name,
|
|
168
|
-
entities.religion.name,
|
|
169
|
-
entities.contactRole.name,
|
|
170
|
-
].map((entity) => ({
|
|
171
|
-
module: module.name,
|
|
172
|
-
entity,
|
|
173
|
-
}));
|
|
174
|
-
}
|
|
175
|
-
async get(moduleName, entityName) {
|
|
176
|
-
if (moduleName !== RootConfig.module.name) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
switch (entityName) {
|
|
180
|
-
case RootConfig.entities.person.name:
|
|
181
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).personFactory();
|
|
182
|
-
case RootConfig.entities.educationLevel.name:
|
|
183
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).educationLevelFactory();
|
|
184
|
-
case RootConfig.entities.gender.name:
|
|
185
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).genderFactory();
|
|
186
|
-
case RootConfig.entities.maritalStatus.name:
|
|
187
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).maritalStatusFactory();
|
|
188
|
-
case RootConfig.entities.personTitle.name:
|
|
189
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).personTitleFactory();
|
|
190
|
-
case RootConfig.entities.personIdentifierType.name:
|
|
191
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).personIdentifierTypeFactory();
|
|
192
|
-
case RootConfig.entities.religion.name:
|
|
193
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).religionFactory();
|
|
194
|
-
case RootConfig.entities.contactRole.name:
|
|
195
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).contactRoleFactory();
|
|
196
|
-
case RootConfig.entities.personRelationship.name:
|
|
197
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).personRelationshipFactory();
|
|
198
|
-
case RootConfig.entities.contactAssignment.name:
|
|
199
|
-
return (await import('@acorex-platform/module-person-core-client/contracts')).contactAssignmentFactory();
|
|
200
|
-
}
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
async list() {
|
|
204
|
-
const m = RootConfig.module.name;
|
|
205
|
-
return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
|
|
206
|
-
}
|
|
207
|
-
}
|
|
152
|
+
//#region ---- Imports ----
|
|
208
153
|
//#endregion
|
|
209
|
-
|
|
210
|
-
var entity_provider = /*#__PURE__*/Object.freeze({
|
|
211
|
-
__proto__: null,
|
|
212
|
-
AXMPersonCoreEntityProvider: AXMPersonCoreEntityProvider
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
//#region ---- Imports ----
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region ---- Menu Provider ----
|
|
154
|
+
//#region ---- Menu Provider ----
|
|
218
155
|
class AXMPersonCoreMenuProvider {
|
|
219
156
|
constructor() {
|
|
220
157
|
this.entityService = inject(AXPEntityService);
|
|
221
158
|
}
|
|
222
159
|
async provide(context) {
|
|
223
160
|
const module = RootConfig.module;
|
|
161
|
+
const keys = AXPPeopleOrganizationPermissionKeys;
|
|
224
162
|
context.find(AXPCommonMenuKeys.Contacts).addItems([
|
|
225
163
|
{
|
|
226
164
|
name: AXMPersonCoreMenuKeys.Persons,
|
|
@@ -230,11 +168,10 @@ class AXMPersonCoreMenuProvider {
|
|
|
230
168
|
path: this.entityService.withEntity(module.name, RootConfig.entities.person.name).createPath(),
|
|
231
169
|
policy: {
|
|
232
170
|
features: [module.name],
|
|
233
|
-
permissions: [
|
|
171
|
+
permissions: [keys.MaintainPersons],
|
|
234
172
|
},
|
|
235
173
|
},
|
|
236
174
|
]);
|
|
237
|
-
// Personal group under Configuration/People and Demographics
|
|
238
175
|
context.find(AXPCommonMenuKeys.PeopleAndDemographics).addItems([
|
|
239
176
|
{
|
|
240
177
|
name: AXMPersonCoreMenuKeys.EducationLevels,
|
|
@@ -246,7 +183,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
246
183
|
.createPath(),
|
|
247
184
|
policy: {
|
|
248
185
|
features: [RootConfig.module.name],
|
|
249
|
-
permissions: [
|
|
186
|
+
permissions: [keys.Setup],
|
|
250
187
|
},
|
|
251
188
|
},
|
|
252
189
|
{
|
|
@@ -257,7 +194,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
257
194
|
path: this.entityService.withEntity(module.name, RootConfig.entities.gender.name).createPath(),
|
|
258
195
|
policy: {
|
|
259
196
|
features: [RootConfig.module.name],
|
|
260
|
-
permissions: [
|
|
197
|
+
permissions: [keys.Setup],
|
|
261
198
|
},
|
|
262
199
|
},
|
|
263
200
|
{
|
|
@@ -270,7 +207,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
270
207
|
.createPath(),
|
|
271
208
|
policy: {
|
|
272
209
|
features: [RootConfig.module.name],
|
|
273
|
-
permissions: [
|
|
210
|
+
permissions: [keys.Setup],
|
|
274
211
|
},
|
|
275
212
|
},
|
|
276
213
|
{
|
|
@@ -283,7 +220,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
283
220
|
.createPath(),
|
|
284
221
|
policy: {
|
|
285
222
|
features: [RootConfig.module.name],
|
|
286
|
-
permissions: [
|
|
223
|
+
permissions: [keys.Setup],
|
|
287
224
|
},
|
|
288
225
|
},
|
|
289
226
|
{
|
|
@@ -296,7 +233,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
296
233
|
.createPath(),
|
|
297
234
|
policy: {
|
|
298
235
|
features: [RootConfig.module.name],
|
|
299
|
-
permissions: [
|
|
236
|
+
permissions: [keys.Setup],
|
|
300
237
|
},
|
|
301
238
|
},
|
|
302
239
|
{
|
|
@@ -309,7 +246,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
309
246
|
.createPath(),
|
|
310
247
|
policy: {
|
|
311
248
|
features: [RootConfig.module.name],
|
|
312
|
-
permissions: [
|
|
249
|
+
permissions: [keys.Setup],
|
|
313
250
|
},
|
|
314
251
|
},
|
|
315
252
|
{
|
|
@@ -322,7 +259,7 @@ class AXMPersonCoreMenuProvider {
|
|
|
322
259
|
.createPath(),
|
|
323
260
|
policy: {
|
|
324
261
|
features: [RootConfig.module.name],
|
|
325
|
-
permissions: [
|
|
262
|
+
permissions: [keys.Setup],
|
|
326
263
|
},
|
|
327
264
|
},
|
|
328
265
|
]);
|
|
@@ -335,48 +272,30 @@ var menu_provider = /*#__PURE__*/Object.freeze({
|
|
|
335
272
|
AXMPersonCoreMenuProvider: AXMPersonCoreMenuProvider
|
|
336
273
|
});
|
|
337
274
|
|
|
338
|
-
//#region ---- Imports ----
|
|
339
275
|
//#endregion
|
|
340
|
-
//#region ----
|
|
276
|
+
//#region ---- Permission Definition Provider ----
|
|
277
|
+
/**
|
|
278
|
+
* Registers person-core capabilities into the shared People & Organization group.
|
|
279
|
+
*/
|
|
341
280
|
class AXMPersonCorePermissionDefinitionProvider {
|
|
342
|
-
constructor() {
|
|
343
|
-
this.translationService = inject(AXTranslationService);
|
|
344
|
-
}
|
|
345
281
|
async define(context) {
|
|
346
|
-
const keys =
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
const personIdentifierTypeTrans = (action) => this.translationService.translateAsync(`@person-core:person-identifier-types.permissions.person-identifier-type.${action}.title`);
|
|
352
|
-
const personRelationshipTrans = (action) => this.translationService.translateAsync(`@person-core:person-relationships.permissions.person-relationship.${action}.title`);
|
|
353
|
-
const religionTrans = (action) => this.translationService.translateAsync(`@person-core:religions.permissions.religion.${action}.title`);
|
|
354
|
-
const contactRoleTrans = (action) => this.translationService.translateAsync(`@person-core:contact-roles.permissions.contact-role.${action}.title`);
|
|
355
|
-
const personTrans = (action) => this.translationService.translateAsync(`@person-core:persons.permissions.person.${action}.title`);
|
|
282
|
+
const keys = AXPPeopleOrganizationPermissionKeys;
|
|
283
|
+
const groups = AXPCommonPermissionGroupKeys;
|
|
284
|
+
const P = '@common:people-organization.permissions';
|
|
285
|
+
const G = '@common:permission-groups';
|
|
286
|
+
context.addGroup(groups.PeopleOrganization.Root, `${G}.people-organization.title`, `${G}.people-organization.description`, { order: 10 });
|
|
356
287
|
context
|
|
357
|
-
.addGroup(
|
|
358
|
-
.addPermission(keys.
|
|
359
|
-
.endPermission()
|
|
360
|
-
.addPermission(keys.EducationLevel.Management, await educationLevelTrans('manage'))
|
|
361
|
-
.endPermission()
|
|
362
|
-
.addPermission(keys.Gender.Management, await genderTrans('manage'))
|
|
363
|
-
.endPermission()
|
|
364
|
-
.addPermission(keys.MaritalStatus.Management, await maritalStatusTrans('manage'))
|
|
365
|
-
.endPermission()
|
|
366
|
-
.addPermission(keys.PersonTitle.Management, await personTitleTrans('manage'))
|
|
367
|
-
.endPermission()
|
|
368
|
-
.addPermission(keys.PersonIdentifierType.Management, await personIdentifierTypeTrans('manage'))
|
|
369
|
-
.endPermission()
|
|
370
|
-
.addPermission(keys.PersonRelationship.Management, await personRelationshipTrans('manage'))
|
|
371
|
-
.endPermission()
|
|
372
|
-
.addPermission(keys.Religion.Management, await religionTrans('manage'))
|
|
373
|
-
.endPermission()
|
|
374
|
-
.addPermission(keys.ContactRole.Management, await contactRoleTrans('manage'))
|
|
288
|
+
.addGroup(groups.PeopleOrganization.Workforce, `${G}.people-organization-workforce.title`, `${G}.people-organization-workforce.description`, { parent: groups.PeopleOrganization.Root, order: 20 })
|
|
289
|
+
.addPermission(keys.MaintainPersons, `${P}.maintain-persons.title`, `${P}.maintain-persons.description`)
|
|
375
290
|
.endPermission()
|
|
376
291
|
.endGroup();
|
|
377
292
|
}
|
|
293
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCorePermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
294
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCorePermissionDefinitionProvider }); }
|
|
378
295
|
}
|
|
379
|
-
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPersonCorePermissionDefinitionProvider, decorators: [{
|
|
297
|
+
type: Injectable
|
|
298
|
+
}] });
|
|
380
299
|
|
|
381
300
|
var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
|
|
382
301
|
__proto__: null,
|
|
@@ -387,5 +306,5 @@ var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
|
|
|
387
306
|
* Generated bundle index. Do not edit.
|
|
388
307
|
*/
|
|
389
308
|
|
|
390
|
-
export {
|
|
309
|
+
export { AXMPersonCoreMenuProvider, AXMPersonCoreModule, AXMPersonCorePermissionDefinitionProvider };
|
|
391
310
|
//# sourceMappingURL=acorex-platform-module-person-core-client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-person-core-client.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/manifest.ts","../../../../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/entity.provider.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":["//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\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 dependencies: ['LocationManagement'],\n required: true,\n};\n\n//#endregion\n","import {\n AXPEntityStorageMiddleware,\n AXP_ENTITY_STORAGE_BACKEND,\n} from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\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 = inject(AXP_ENTITY_STORAGE_BACKEND);\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 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 { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_DEFINITION_LOADER, 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 { PersonCoreManifest } from './manifest';\nimport { contactAssignmentPersonHydrateMiddleware } from './middlewares/contact-assignment-person-hydrate.middleware';\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: PersonCoreManifest,\n multi: true,\n },\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 provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () =>\n import('./entity.provider').then((m) => m.AXMPersonCoreEntityProvider)\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 { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { AXPEntityDefinitionLoader, AXPEntityPreloadEntity } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\n\n//#endregion\n\n//#region ---- Entity Provider ----\n\nexport class AXMPersonCoreEntityProvider implements AXPEntityDefinitionLoader {\n public preload(): AXPEntityPreloadEntity[] {\n const { entities, module } = RootConfig;\n return [\n entities.person.name,\n entities.educationLevel.name,\n entities.gender.name,\n entities.maritalStatus.name,\n entities.personTitle.name,\n entities.personIdentifierType.name,\n entities.personRelationship.name,\n entities.contactAssignment.name,\n entities.religion.name,\n entities.contactRole.name,\n ].map((entity) => ({\n module: module.name,\n entity,\n }));\n }\n\n async get(moduleName: string, entityName: string): Promise<AXPEntity | null> {\n if (moduleName !== RootConfig.module.name) {\n return null;\n }\n\n switch (entityName) {\n case RootConfig.entities.person.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).personFactory();\n case RootConfig.entities.educationLevel.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).educationLevelFactory();\n case RootConfig.entities.gender.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).genderFactory();\n case RootConfig.entities.maritalStatus.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).maritalStatusFactory();\n case RootConfig.entities.personTitle.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).personTitleFactory();\n case RootConfig.entities.personIdentifierType.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).personIdentifierTypeFactory();\n case RootConfig.entities.religion.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).religionFactory();\n case RootConfig.entities.contactRole.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).contactRoleFactory();\n case RootConfig.entities.personRelationship.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).personRelationshipFactory();\n case RootConfig.entities.contactAssignment.name:\n return (await import('@acorex-platform/module-person-core-client/contracts')).contactAssignmentFactory();\n }\n\n return null;\n }\n\n async list(): Promise<{ name: string; module: string }[]> {\n const m = RootConfig.module.name;\n return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommonMenuKeys } 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 { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\nimport { AXMPersonCoreMenuKeys } from '@acorex-platform/module-person-core-client/contracts';\nimport { AXMPersonCorePermissionKeys } 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\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: [AXMPersonCorePermissionKeys.PersonCore.Person.Management],\n },\n },\n ]);\n\n // Personal group under Configuration/People and Demographics\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: [AXMPersonCorePermissionKeys.PersonCore.EducationLevel.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.Gender.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.MaritalStatus.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.PersonTitle.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.PersonIdentifierType.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.Religion.Management],\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: [AXMPersonCorePermissionKeys.PersonCore.ContactRole.Management],\n },\n },\n ]);\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';\nimport { inject } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\nimport { AXMPersonCorePermissionKeys } from '@acorex-platform/module-person-core-client/contracts';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\nexport class AXMPersonCorePermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n private readonly translationService = inject(AXTranslationService);\n\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXMPersonCorePermissionKeys.PersonCore;\n\n const educationLevelTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:education-levels.permissions.education-level.${action}.title`\n );\n\n const genderTrans = (action: string) =>\n this.translationService.translateAsync(`@person-core:genders.permissions.gender.${action}.title`);\n\n const maritalStatusTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:marital-statuses.permissions.marital-status.${action}.title`\n );\n\n const personTitleTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:person-titles.permissions.person-title.${action}.title`\n );\n\n const personIdentifierTypeTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:person-identifier-types.permissions.person-identifier-type.${action}.title`\n );\n\n const personRelationshipTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:person-relationships.permissions.person-relationship.${action}.title`\n );\n\n const religionTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:religions.permissions.religion.${action}.title`\n );\n\n const contactRoleTrans = (action: string) =>\n this.translationService.translateAsync(\n `@person-core:contact-roles.permissions.contact-role.${action}.title`\n );\n\n const personTrans = (action: string) =>\n this.translationService.translateAsync(`@person-core:persons.permissions.person.${action}.title`);\n\n context\n .addGroup(RootConfig.module.name, await this.translationService.translateAsync('@person-core:module.title'))\n\n .addPermission(keys.Person.Management, await personTrans('manage'))\n .endPermission()\n\n .addPermission(keys.EducationLevel.Management, await educationLevelTrans('manage'))\n .endPermission()\n\n .addPermission(keys.Gender.Management, await genderTrans('manage'))\n .endPermission()\n\n .addPermission(keys.MaritalStatus.Management, await maritalStatusTrans('manage'))\n .endPermission()\n\n .addPermission(keys.PersonTitle.Management, await personTitleTrans('manage'))\n .endPermission()\n\n .addPermission(keys.PersonIdentifierType.Management, await personIdentifierTypeTrans('manage'))\n .endPermission()\n\n .addPermission(keys.PersonRelationship.Management, await personRelationshipTrans('manage'))\n .endPermission()\n\n .addPermission(keys.Religion.Management, await religionTrans('manage'))\n .endPermission()\n\n .addPermission(keys.ContactRole.Management, await contactRoleTrans('manage'))\n .endPermission()\n\n .endGroup();\n }\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,kBAAkB,GAAsB;AACnD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;IAC5B,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,IAAA,QAAQ,EAAE,IAAI;CACf;AAED;;ACdA;AAEA,MAAM,yBAAyB,GAAG,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,EAAE;AAC3G,MAAM,aAAa,GAAG,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE;AAEpF;;;AAGG;AACI,MAAM,wCAAwC,GAA+B;AAClF,IAAA,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,QAA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f;AACD;AAED;;;;;;;AC7FA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-person-core-client.mjs","sources":["../../../../libs/modules/person-core/client/src/lib/manifest.ts","../../../../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":["//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-person-core-client/contracts';\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 { 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 { AXP_MODULE_MANIFEST_PROVIDER, 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 { PersonCoreManifest } from './manifest';\nimport { contactAssignmentPersonHydrateMiddleware } from './middlewares/contact-assignment-person-hydrate.middleware';\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: PersonCoreManifest,\n multi: true,\n },\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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AA,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,5 +1,5 @@
|
|
|
1
|
-
import { AXPEntityAction, AXPQueryFilter,
|
|
2
|
-
import { AXPMultiLanguageString, AXPAddressData } from '@acorex-platform/framework-shared/core';
|
|
1
|
+
import { AXPEntityAction, AXPQueryFilter, AXPEntityModel } from '@acorex-platform/framework-shared/entity';
|
|
2
|
+
import { AXPMultiLanguageString, AXPIntegrationReference, AXPAddressData } from '@acorex-platform/framework-shared/core';
|
|
3
3
|
|
|
4
4
|
declare const AXMPersonCoreMenuKeys: {
|
|
5
5
|
readonly Root: "person-core";
|
|
@@ -14,34 +14,55 @@ declare const AXMPersonCoreMenuKeys: {
|
|
|
14
14
|
readonly ContactRoles: "person-core.contact-roles";
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* People & Organization capabilities used by this module.
|
|
19
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
20
|
+
*/
|
|
21
|
+
declare const AXPPeopleOrganizationPermissionKeys: {
|
|
22
|
+
readonly Access: "PeopleOrganization:Permission:Access";
|
|
23
|
+
readonly ViewOrganization: "PeopleOrganization:Permission:ViewOrganization";
|
|
24
|
+
readonly MaintainOrganization: "PeopleOrganization:Permission:MaintainOrganization";
|
|
25
|
+
readonly MaintainTeams: "PeopleOrganization:Permission:MaintainTeams";
|
|
26
|
+
readonly MaintainEmployees: "PeopleOrganization:Permission:MaintainEmployees";
|
|
27
|
+
readonly ManageEmployeeActions: "PeopleOrganization:Permission:ManageEmployeeActions";
|
|
28
|
+
readonly MaintainPersons: "PeopleOrganization:Permission:MaintainPersons";
|
|
29
|
+
readonly MaintainAttendance: "PeopleOrganization:Permission:MaintainAttendance";
|
|
30
|
+
readonly ManageAttendanceActions: "PeopleOrganization:Permission:ManageAttendanceActions";
|
|
31
|
+
readonly DesignJobs: "PeopleOrganization:Permission:DesignJobs";
|
|
32
|
+
readonly Setup: "PeopleOrganization:Permission:Setup";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.
|
|
36
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
37
|
+
*/
|
|
17
38
|
declare const AXMPersonCorePermissionKeys: {
|
|
18
39
|
readonly PersonCore: {
|
|
19
40
|
readonly Person: {
|
|
20
|
-
readonly Management: "
|
|
41
|
+
readonly Management: "PeopleOrganization:Permission:MaintainPersons";
|
|
21
42
|
};
|
|
22
43
|
readonly EducationLevel: {
|
|
23
|
-
readonly Management: "
|
|
44
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
24
45
|
};
|
|
25
46
|
readonly Gender: {
|
|
26
|
-
readonly Management: "
|
|
47
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
27
48
|
};
|
|
28
49
|
readonly MaritalStatus: {
|
|
29
|
-
readonly Management: "
|
|
50
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
30
51
|
};
|
|
31
52
|
readonly PersonTitle: {
|
|
32
|
-
readonly Management: "
|
|
53
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
33
54
|
};
|
|
34
55
|
readonly PersonIdentifierType: {
|
|
35
|
-
readonly Management: "
|
|
56
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
36
57
|
};
|
|
37
58
|
readonly PersonRelationship: {
|
|
38
|
-
readonly Management: "
|
|
59
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
39
60
|
};
|
|
40
61
|
readonly Religion: {
|
|
41
|
-
readonly Management: "
|
|
62
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
42
63
|
};
|
|
43
64
|
readonly ContactRole: {
|
|
44
|
-
readonly Management: "
|
|
65
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
45
66
|
};
|
|
46
67
|
};
|
|
47
68
|
};
|
|
@@ -155,8 +176,6 @@ declare const RootConfig: {
|
|
|
155
176
|
};
|
|
156
177
|
};
|
|
157
178
|
|
|
158
|
-
declare function contactAssignmentFactory(): Promise<AXPEntity>;
|
|
159
|
-
|
|
160
179
|
interface AXMPersonCoreContactAssignmentEntityModel extends AXPEntityModel<string> {
|
|
161
180
|
partyId: string;
|
|
162
181
|
personId: string;
|
|
@@ -175,43 +194,41 @@ interface AXMPersonCoreContactAssignmentEntityModel extends AXPEntityModel<strin
|
|
|
175
194
|
id: string;
|
|
176
195
|
title: AXPMultiLanguageString;
|
|
177
196
|
};
|
|
197
|
+
/** Link to remote integration record (e.g. Simpro site). */
|
|
198
|
+
integrationRef?: AXPIntegrationReference | null;
|
|
178
199
|
}
|
|
179
200
|
|
|
180
|
-
declare function contactRoleFactory(): Promise<AXPEntity>;
|
|
181
|
-
|
|
182
201
|
interface AXMPersonCoreContactRoleEntityModel {
|
|
183
202
|
id: string;
|
|
184
|
-
name: string;
|
|
185
203
|
title: AXPMultiLanguageString;
|
|
186
204
|
description?: AXPMultiLanguageString | null;
|
|
205
|
+
/**
|
|
206
|
+
* ContactRole id used when mirroring a PersonRelationship edge.
|
|
207
|
+
* Symmetric roles point at themselves (e.g. spouse → spouse).
|
|
208
|
+
* Asymmetric pairs point at each other (e.g. mother → child, employs → employee).
|
|
209
|
+
* Omit when no automatic reverse should be created (e.g. child has no unique parent role).
|
|
210
|
+
*/
|
|
211
|
+
inverseTypeId?: string | null;
|
|
187
212
|
}
|
|
188
213
|
|
|
189
|
-
declare function educationLevelFactory(): Promise<AXPEntity>;
|
|
190
|
-
|
|
191
214
|
interface AXMPersonCoreEducationLevelEntityModel {
|
|
192
215
|
id: string;
|
|
193
216
|
title: AXPMultiLanguageString;
|
|
194
217
|
description?: AXPMultiLanguageString | null;
|
|
195
218
|
}
|
|
196
219
|
|
|
197
|
-
declare function genderFactory(): Promise<AXPEntity>;
|
|
198
|
-
|
|
199
220
|
interface AXMPersonCoreGenderEntityModel {
|
|
200
221
|
id: string;
|
|
201
222
|
title: AXPMultiLanguageString;
|
|
202
223
|
description?: AXPMultiLanguageString | null;
|
|
203
224
|
}
|
|
204
225
|
|
|
205
|
-
declare function maritalStatusFactory(): Promise<AXPEntity>;
|
|
206
|
-
|
|
207
226
|
interface AXMPersonCoreMaritalStatusEntityModel {
|
|
208
227
|
id: string;
|
|
209
228
|
title: AXPMultiLanguageString;
|
|
210
229
|
description?: AXPMultiLanguageString | null;
|
|
211
230
|
}
|
|
212
231
|
|
|
213
|
-
declare function personFactory(): Promise<AXPEntity>;
|
|
214
|
-
|
|
215
232
|
interface AXMPersonCorePersonEntityModel extends AXPEntityModel<string> {
|
|
216
233
|
firstName: string;
|
|
217
234
|
lastName: string;
|
|
@@ -251,8 +268,6 @@ interface AXMPersonCorePersonEntityModel extends AXPEntityModel<string> {
|
|
|
251
268
|
userId?: string;
|
|
252
269
|
}
|
|
253
270
|
|
|
254
|
-
declare function personIdentifierTypeFactory(): Promise<AXPEntity>;
|
|
255
|
-
|
|
256
271
|
interface AXMPersonCorePersonIdentifierTypeEntityModel {
|
|
257
272
|
id: string;
|
|
258
273
|
title: AXPMultiLanguageString;
|
|
@@ -264,8 +279,6 @@ interface AXMPersonCorePersonIdentifierTypeEntityModel {
|
|
|
264
279
|
isUnique: boolean;
|
|
265
280
|
}
|
|
266
281
|
|
|
267
|
-
declare function personRelationshipFactory(): Promise<AXPEntity | null>;
|
|
268
|
-
|
|
269
282
|
interface AXMPersonCorePersonRelationshipEntityModel extends AXPEntityModel<string> {
|
|
270
283
|
fromPersonId: string;
|
|
271
284
|
toPersonId: string;
|
|
@@ -276,21 +289,17 @@ interface AXMPersonCorePersonRelationshipEntityModel extends AXPEntityModel<stri
|
|
|
276
289
|
updatedAt: Date;
|
|
277
290
|
}
|
|
278
291
|
|
|
279
|
-
declare function personTitleFactory(): Promise<AXPEntity>;
|
|
280
|
-
|
|
281
292
|
interface AXMPersonCorePersonTitleEntityModel {
|
|
282
293
|
id: string;
|
|
283
294
|
title: AXPMultiLanguageString;
|
|
284
295
|
description?: AXPMultiLanguageString | null;
|
|
285
296
|
}
|
|
286
297
|
|
|
287
|
-
declare function religionFactory(): Promise<AXPEntity>;
|
|
288
|
-
|
|
289
298
|
interface AXMPersonCoreReligionEntityModel {
|
|
290
299
|
id: string;
|
|
291
300
|
title: AXPMultiLanguageString;
|
|
292
301
|
description?: AXPMultiLanguageString | null;
|
|
293
302
|
}
|
|
294
303
|
|
|
295
|
-
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext,
|
|
304
|
+
export { AXMPersonCoreMenuKeys, AXMPersonCorePermissionKeys, AXPPeopleOrganizationPermissionKeys, RootConfig, buildContactAssignmentPersonSnapshot, contactAssignmentDetailsCrudActionsForPartyContext, contactAssignmentPartyConditions, personRelationshipDetailsCreateActions, personRelationshipMasterCreateAction, resolveContactAssignmentPartyContext, resolveContactAssignmentPartyDisplayTitle };
|
|
296
305
|
export type { AXMPersonCoreContactAssignmentEntityModel, AXMPersonCoreContactRoleEntityModel, AXMPersonCoreEducationLevelEntityModel, AXMPersonCoreGenderEntityModel, AXMPersonCoreMaritalStatusEntityModel, AXMPersonCorePersonEntityModel, AXMPersonCorePersonIdentifierTypeEntityModel, AXMPersonCorePersonRelationshipEntityModel, AXMPersonCorePersonTitleEntityModel, AXMPersonCoreReligionEntityModel };
|