@acorex/modules 21.0.0-next.17 → 21.0.0-next.19

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.
Files changed (52) hide show
  1. package/common/index.d.ts +1 -0
  2. package/contact-core/index.d.ts +90 -0
  3. package/fesm2022/acorex-modules-common.mjs +28 -0
  4. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  5. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs +318 -0
  6. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs.map +1 -0
  7. package/fesm2022/acorex-modules-contact-core.mjs +247 -0
  8. package/fesm2022/acorex-modules-contact-core.mjs.map +1 -0
  9. package/fesm2022/acorex-modules-data-management.mjs +59 -0
  10. package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
  11. package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs +65 -0
  12. package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs.map +1 -0
  13. package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs +120 -0
  14. package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs.map +1 -0
  15. package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs +65 -0
  16. package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs.map +1 -0
  17. package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs +65 -0
  18. package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs.map +1 -0
  19. package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs +120 -0
  20. package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs.map +1 -0
  21. package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs +65 -0
  22. package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs.map +1 -0
  23. package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs +65 -0
  24. package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs.map +1 -0
  25. package/fesm2022/acorex-modules-health-core.mjs +487 -0
  26. package/fesm2022/acorex-modules-health-core.mjs.map +1 -0
  27. package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs +120 -0
  28. package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs.map +1 -0
  29. package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs +120 -0
  30. package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs.map +1 -0
  31. package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs +191 -0
  32. package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs.map +1 -0
  33. package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs +119 -0
  34. package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs.map +1 -0
  35. package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs +120 -0
  36. package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs.map +1 -0
  37. package/fesm2022/acorex-modules-person-core.mjs +466 -0
  38. package/fesm2022/acorex-modules-person-core.mjs.map +1 -0
  39. package/fesm2022/{acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs → acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs} +4 -3
  40. package/fesm2022/acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs.map +1 -0
  41. package/fesm2022/{acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs → acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs} +4 -3
  42. package/fesm2022/acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs.map +1 -0
  43. package/fesm2022/acorex-modules-person-management.mjs +11 -259
  44. package/fesm2022/acorex-modules-person-management.mjs.map +1 -1
  45. package/health-core/index.d.ts +156 -0
  46. package/package.json +18 -6
  47. package/person-core/index.d.ts +132 -0
  48. package/person-management/index.d.ts +1 -25
  49. package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs +0 -498
  50. package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs.map +0 -1
  51. package/fesm2022/acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs.map +0 -1
  52. package/fesm2022/acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs.map +0 -1
@@ -0,0 +1,466 @@
1
+ import * as i0 from '@angular/core';
2
+ import { NgModule, inject, Injector } from '@angular/core';
3
+ import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider, AXP_DATASOURCE_DEFINITION_PROVIDER } from '@acorex/platform/core';
4
+ import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityService } from '@acorex/platform/layout/entity';
5
+ import { AXP_MENU_PROVIDER } from '@acorex/platform/common';
6
+ import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
7
+ import { AXDataSource } from '@acorex/cdk/common';
8
+ import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
9
+ import { AXPCommonMenuKeys } from '@acorex/modules/common';
10
+ import { AXTranslationService } from '@acorex/core/translation';
11
+
12
+ const config = {
13
+ i18n: 'person-core',
14
+ module: 'PersonCore',
15
+ };
16
+ const RootConfig = {
17
+ config,
18
+ module: {
19
+ name: config.module,
20
+ title: `@${config.i18n}:module.title`,
21
+ icon: 'fa-light fa-user',
22
+ },
23
+ entities: {
24
+ educationLevel: {
25
+ name: 'EducationLevel',
26
+ title: `@${config.i18n}:education-levels.entities.education-level.title`,
27
+ titlePlural: `@${config.i18n}:education-levels.entities.education-level.plural`,
28
+ icon: 'fa-light fa-graduation-cap',
29
+ },
30
+ maritalStatus: {
31
+ name: 'MaritalStatus',
32
+ title: `@${config.i18n}:marital-statuses.entities.marital-status.title`,
33
+ titlePlural: `@${config.i18n}:marital-statuses.entities.marital-status.plural`,
34
+ icon: 'fa-light fa-heart',
35
+ },
36
+ personIdentifierType: {
37
+ name: 'PersonIdentifierType',
38
+ title: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.title`,
39
+ titlePlural: `@${config.i18n}:person-identifier-types.entities.person-identifier-type.plural`,
40
+ icon: 'fa-light fa-id-card',
41
+ },
42
+ personRelationshipType: {
43
+ name: 'PersonRelationshipType',
44
+ title: `@${config.i18n}:person-relationship-types.entities.person-relationship-type.title`,
45
+ titlePlural: `@${config.i18n}:person-relationship-types.entities.person-relationship-type.plural`,
46
+ icon: 'fa-light fa-diagram-project',
47
+ },
48
+ religion: {
49
+ name: 'Religion',
50
+ title: `@${config.i18n}:religions.entities.religion.title`,
51
+ titlePlural: `@${config.i18n}:religions.entities.religion.plural`,
52
+ icon: 'fa-light fa-place-of-worship',
53
+ },
54
+ },
55
+ };
56
+
57
+ //#region ---- Imports ----
58
+ //#endregion
59
+ //#region ---- Manifest Definition ----
60
+ /**
61
+ * Person Core Module Manifest.
62
+ * Defines module metadata for shared person/demographic reference data.
63
+ */
64
+ const PersonCoreManifest = {
65
+ name: RootConfig.module.name,
66
+ version: '1.0.0',
67
+ title: RootConfig.module.title,
68
+ icon: RootConfig.module.icon,
69
+ i18n: RootConfig.config.i18n,
70
+ };
71
+ //#endregion
72
+
73
+ /**
74
+ * Gender options datasource for person/demographic forms (Male, Female, Non-binary, etc.).
75
+ */
76
+ class AXMGenderOptionsDataSourceDefinition {
77
+ constructor() {
78
+ this.definition = {
79
+ name: 'gender-options',
80
+ title: '@person-core:datasources.gender-options.title',
81
+ columns: [
82
+ {
83
+ name: 'value',
84
+ title: '@person-core:datasources.gender-options.columns.value.title',
85
+ type: AXPWidgetsCatalog.text,
86
+ datatype: 'string',
87
+ },
88
+ {
89
+ name: 'title',
90
+ title: '@person-core:datasources.gender-options.columns.title.title',
91
+ type: AXPWidgetsCatalog.text,
92
+ datatype: 'string',
93
+ },
94
+ ],
95
+ filters: [],
96
+ textField: { name: 'title', title: '@person-core:datasources.gender-options.columns.title.title' },
97
+ valueField: { name: 'value', title: '@person-core:datasources.gender-options.columns.value.title' },
98
+ samples: [
99
+ { value: 'male', title: '@person-core:datasources.gender-options.samples.male' },
100
+ { value: 'female', title: '@person-core:datasources.gender-options.samples.female' },
101
+ { value: 'non-binary', title: '@person-core:datasources.gender-options.samples.non-binary' },
102
+ { value: 'other', title: '@person-core:datasources.gender-options.samples.other' },
103
+ { value: 'prefer-not-to-say', title: '@person-core:datasources.gender-options.samples.prefer-not-to-say' },
104
+ ],
105
+ source: () => {
106
+ const items = [
107
+ { value: 'male', title: '@person-core:datasources.gender-options.samples.male' },
108
+ { value: 'female', title: '@person-core:datasources.gender-options.samples.female' },
109
+ { value: 'non-binary', title: '@person-core:datasources.gender-options.samples.non-binary' },
110
+ { value: 'other', title: '@person-core:datasources.gender-options.samples.other' },
111
+ { value: 'prefer-not-to-say', title: '@person-core:datasources.gender-options.samples.prefer-not-to-say' },
112
+ ];
113
+ return new AXDataSource({
114
+ pageSize: 10,
115
+ key: 'value',
116
+ load: async () => ({ items, total: items.length }),
117
+ byKey: async (key) => items.find((item) => item.value === key),
118
+ });
119
+ },
120
+ };
121
+ }
122
+ async items() {
123
+ return [this.definition];
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Person title (salutation) options datasource for forms (Mr, Mrs, Ms, Dr, etc.).
129
+ */
130
+ class AXMPersonTitleOptionsDataSourceDefinition {
131
+ constructor() {
132
+ this.definition = {
133
+ name: 'person-title-options',
134
+ title: '@person-core:datasources.person-title-options.title',
135
+ columns: [
136
+ {
137
+ name: 'value',
138
+ title: '@person-core:datasources.person-title-options.columns.value.title',
139
+ type: AXPWidgetsCatalog.text,
140
+ datatype: 'string',
141
+ },
142
+ {
143
+ name: 'title',
144
+ title: '@person-core:datasources.person-title-options.columns.title.title',
145
+ type: AXPWidgetsCatalog.text,
146
+ datatype: 'string',
147
+ },
148
+ ],
149
+ filters: [],
150
+ textField: { name: 'title', title: '@person-core:datasources.person-title-options.columns.title.title' },
151
+ valueField: { name: 'value', title: '@person-core:datasources.person-title-options.columns.value.title' },
152
+ samples: [
153
+ { value: 'mr', title: '@person-core:datasources.person-title-options.samples.mr' },
154
+ { value: 'mrs', title: '@person-core:datasources.person-title-options.samples.mrs' },
155
+ { value: 'ms', title: '@person-core:datasources.person-title-options.samples.ms' },
156
+ { value: 'miss', title: '@person-core:datasources.person-title-options.samples.miss' },
157
+ { value: 'dr', title: '@person-core:datasources.person-title-options.samples.dr' },
158
+ { value: 'prof', title: '@person-core:datasources.person-title-options.samples.prof' },
159
+ { value: 'other', title: '@person-core:datasources.person-title-options.samples.other' },
160
+ ],
161
+ source: () => {
162
+ const items = [
163
+ { value: 'mr', title: '@person-core:datasources.person-title-options.samples.mr' },
164
+ { value: 'mrs', title: '@person-core:datasources.person-title-options.samples.mrs' },
165
+ { value: 'ms', title: '@person-core:datasources.person-title-options.samples.ms' },
166
+ { value: 'miss', title: '@person-core:datasources.person-title-options.samples.miss' },
167
+ { value: 'dr', title: '@person-core:datasources.person-title-options.samples.dr' },
168
+ { value: 'prof', title: '@person-core:datasources.person-title-options.samples.prof' },
169
+ { value: 'other', title: '@person-core:datasources.person-title-options.samples.other' },
170
+ ];
171
+ return new AXDataSource({
172
+ pageSize: 10,
173
+ key: 'value',
174
+ load: async () => ({ items, total: items.length }),
175
+ byKey: async (key) => items.find((item) => item.value === key),
176
+ });
177
+ },
178
+ };
179
+ }
180
+ async items() {
181
+ return [this.definition];
182
+ }
183
+ }
184
+
185
+ //#region ---- Imports ----
186
+ //#endregion
187
+ //#region ---- Data Source Provider ----
188
+ /**
189
+ * Person Core Data Source Provider.
190
+ * Provides demographic choice datasources (gender, person title).
191
+ */
192
+ class AXMPersonCoreDataSourceProvider {
193
+ constructor() {
194
+ this.genderOptions = new AXMGenderOptionsDataSourceDefinition();
195
+ this.personTitleOptions = new AXMPersonTitleOptionsDataSourceDefinition();
196
+ }
197
+ async items() {
198
+ const items = await Promise.all([
199
+ this.genderOptions.items(),
200
+ this.personTitleOptions.items(),
201
+ ]);
202
+ return items.flat();
203
+ }
204
+ }
205
+ //#endregion
206
+
207
+ //#region ---- Imports ----
208
+ //#endregion
209
+ //#region ---- Module ----
210
+ class AXMPersonCoreModule {
211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPersonCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
212
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMPersonCoreModule }); }
213
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPersonCoreModule, providers: [
214
+ {
215
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
216
+ useValue: PersonCoreManifest,
217
+ multi: true,
218
+ },
219
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMPersonCorePermissionDefinitionProvider)),
220
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMPersonCoreMenuProvider)),
221
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMPersonCoreEntityProvider)),
222
+ {
223
+ provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
224
+ useClass: AXMPersonCoreDataSourceProvider,
225
+ multi: true,
226
+ },
227
+ ] }); }
228
+ }
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPersonCoreModule, decorators: [{
230
+ type: NgModule,
231
+ args: [{
232
+ imports: [],
233
+ providers: [
234
+ {
235
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
236
+ useValue: PersonCoreManifest,
237
+ multi: true,
238
+ },
239
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMPersonCorePermissionDefinitionProvider)),
240
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMPersonCoreMenuProvider)),
241
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMPersonCoreEntityProvider)),
242
+ {
243
+ provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
244
+ useClass: AXMPersonCoreDataSourceProvider,
245
+ multi: true,
246
+ },
247
+ ],
248
+ }]
249
+ }] });
250
+
251
+ //#region ---- Education Level Model ----
252
+ //#endregion
253
+
254
+ //#region ---- Marital Status Model ----
255
+ //#endregion
256
+
257
+ //#region ---- Person Identifier Type Model ----
258
+ //#endregion
259
+
260
+ //#region ---- Person Relationship Type Model ----
261
+ //#endregion
262
+
263
+ //#region ---- Religion Model ----
264
+ //#endregion
265
+
266
+ //#region ---- Imports ----
267
+ //#endregion
268
+ //#region ---- Entity Provider ----
269
+ class AXMPersonCoreEntityProvider {
270
+ constructor() {
271
+ this.injector = inject(Injector);
272
+ }
273
+ async get(moduleName, entityName) {
274
+ if (moduleName !== RootConfig.module.name) {
275
+ return null;
276
+ }
277
+ switch (entityName) {
278
+ case RootConfig.entities.educationLevel.name:
279
+ return (await import('./acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs')).educationLevelFactory(this.injector);
280
+ case RootConfig.entities.maritalStatus.name:
281
+ return (await import('./acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs')).maritalStatusFactory(this.injector);
282
+ case RootConfig.entities.personIdentifierType.name:
283
+ return (await import('./acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs')).personIdentifierTypeFactory(this.injector);
284
+ case RootConfig.entities.personRelationshipType.name:
285
+ return (await import('./acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs')).personRelationshipTypeFactory(this.injector);
286
+ case RootConfig.entities.religion.name:
287
+ return (await import('./acorex-modules-person-core-religion.entity-Czb5aHb6.mjs')).religionFactory(this.injector);
288
+ }
289
+ return null;
290
+ }
291
+ async list() {
292
+ const m = RootConfig.module.name;
293
+ return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
294
+ }
295
+ }
296
+ //#endregion
297
+
298
+ var entity_provider = /*#__PURE__*/Object.freeze({
299
+ __proto__: null,
300
+ AXMPersonCoreEntityProvider: AXMPersonCoreEntityProvider
301
+ });
302
+
303
+ const AXMPersonCoreMenuKeys = {
304
+ Root: 'person-core',
305
+ EducationLevels: 'person-core.education-levels',
306
+ MaritalStatuses: 'person-core.marital-statuses',
307
+ PersonIdentifierTypes: 'person-core.person-identifier-types',
308
+ PersonRelationshipTypes: 'person-core.person-relationship-types',
309
+ Religions: 'person-core.religions',
310
+ };
311
+
312
+ const AXMPersonCorePermissionKeys = {
313
+ PersonCore: {
314
+ EducationLevel: {
315
+ Management: 'PersonCore:Permission:EducationLevel.Management',
316
+ },
317
+ MaritalStatus: {
318
+ Management: 'PersonCore:Permission:MaritalStatus.Management',
319
+ },
320
+ PersonIdentifierType: {
321
+ Management: 'PersonCore:Permission:PersonIdentifierType.Management',
322
+ },
323
+ PersonRelationshipType: {
324
+ Management: 'PersonCore:Permission:PersonRelationshipType.Management',
325
+ },
326
+ Religion: {
327
+ Management: 'PersonCore:Permission:Religion.Management',
328
+ },
329
+ },
330
+ };
331
+
332
+ //#region ---- Imports ----
333
+ //#endregion
334
+ //#region ---- Menu Provider ----
335
+ class AXMPersonCoreMenuProvider {
336
+ constructor() {
337
+ this.entityService = inject(AXPEntityService);
338
+ }
339
+ async provide(context) {
340
+ const module = RootConfig.module;
341
+ context.find(AXPCommonMenuKeys.Configuration).addItems([
342
+ {
343
+ name: AXMPersonCoreMenuKeys.Root,
344
+ priority: 8450,
345
+ text: '@person-core:module.menus.root.title',
346
+ icon: module.icon,
347
+ policy: {
348
+ features: [RootConfig.module.name],
349
+ },
350
+ children: [
351
+ {
352
+ name: AXMPersonCoreMenuKeys.EducationLevels,
353
+ text: RootConfig.entities.educationLevel.titlePlural,
354
+ icon: RootConfig.entities.educationLevel.icon,
355
+ priority: 1,
356
+ path: this.entityService
357
+ .withEntity(module.name, RootConfig.entities.educationLevel.name)
358
+ .createPath(),
359
+ policy: {
360
+ permissions: [AXMPersonCorePermissionKeys.PersonCore.EducationLevel.Management],
361
+ },
362
+ },
363
+ {
364
+ name: AXMPersonCoreMenuKeys.MaritalStatuses,
365
+ text: RootConfig.entities.maritalStatus.titlePlural,
366
+ icon: RootConfig.entities.maritalStatus.icon,
367
+ priority: 2,
368
+ path: this.entityService
369
+ .withEntity(module.name, RootConfig.entities.maritalStatus.name)
370
+ .createPath(),
371
+ policy: {
372
+ permissions: [AXMPersonCorePermissionKeys.PersonCore.MaritalStatus.Management],
373
+ },
374
+ },
375
+ {
376
+ name: AXMPersonCoreMenuKeys.PersonIdentifierTypes,
377
+ text: RootConfig.entities.personIdentifierType.titlePlural,
378
+ icon: RootConfig.entities.personIdentifierType.icon,
379
+ priority: 3,
380
+ path: this.entityService
381
+ .withEntity(module.name, RootConfig.entities.personIdentifierType.name)
382
+ .createPath(),
383
+ policy: {
384
+ permissions: [AXMPersonCorePermissionKeys.PersonCore.PersonIdentifierType.Management],
385
+ },
386
+ },
387
+ {
388
+ name: AXMPersonCoreMenuKeys.PersonRelationshipTypes,
389
+ text: RootConfig.entities.personRelationshipType.titlePlural,
390
+ icon: RootConfig.entities.personRelationshipType.icon,
391
+ priority: 4,
392
+ path: this.entityService
393
+ .withEntity(module.name, RootConfig.entities.personRelationshipType.name)
394
+ .createPath(),
395
+ policy: {
396
+ permissions: [AXMPersonCorePermissionKeys.PersonCore.PersonRelationshipType.Management],
397
+ },
398
+ },
399
+ {
400
+ name: AXMPersonCoreMenuKeys.Religions,
401
+ text: RootConfig.entities.religion.titlePlural,
402
+ icon: RootConfig.entities.religion.icon,
403
+ priority: 5,
404
+ path: this.entityService
405
+ .withEntity(module.name, RootConfig.entities.religion.name)
406
+ .createPath(),
407
+ policy: {
408
+ permissions: [AXMPersonCorePermissionKeys.PersonCore.Religion.Management],
409
+ },
410
+ },
411
+ ],
412
+ },
413
+ ]);
414
+ }
415
+ }
416
+ //#endregion
417
+
418
+ var menu_provider = /*#__PURE__*/Object.freeze({
419
+ __proto__: null,
420
+ AXMPersonCoreMenuProvider: AXMPersonCoreMenuProvider
421
+ });
422
+
423
+ //#region ---- Imports ----
424
+ //#endregion
425
+ //#region ---- Permission Definition Provider ----
426
+ class AXMPersonCorePermissionDefinitionProvider {
427
+ constructor() {
428
+ this.translationService = inject(AXTranslationService);
429
+ }
430
+ async define(context) {
431
+ const keys = AXMPersonCorePermissionKeys.PersonCore;
432
+ const educationLevelTrans = (action) => this.translationService.translateAsync(`@person-core:education-levels.permissions.education-level.${action}.title`);
433
+ const maritalStatusTrans = (action) => this.translationService.translateAsync(`@person-core:marital-statuses.permissions.marital-status.${action}.title`);
434
+ const personIdentifierTypeTrans = (action) => this.translationService.translateAsync(`@person-core:person-identifier-types.permissions.person-identifier-type.${action}.title`);
435
+ const personRelationshipTypeTrans = (action) => this.translationService.translateAsync(`@person-core:person-relationship-types.permissions.person-relationship-type.${action}.title`);
436
+ const religionTrans = (action) => this.translationService.translateAsync(`@person-core:religions.permissions.religion.${action}.title`);
437
+ context
438
+ .addGroup(RootConfig.module.name, await this.translationService.translateAsync('@person-core:module.title'))
439
+ .addPermission(keys.EducationLevel.Management, await educationLevelTrans('manage'))
440
+ .endPermission()
441
+ .addPermission(keys.MaritalStatus.Management, await maritalStatusTrans('manage'))
442
+ .endPermission()
443
+ .addPermission(keys.PersonIdentifierType.Management, await personIdentifierTypeTrans('manage'))
444
+ .endPermission()
445
+ .addPermission(keys.PersonRelationshipType.Management, await personRelationshipTypeTrans('manage'))
446
+ .endPermission()
447
+ .addPermission(keys.Religion.Management, await religionTrans('manage'))
448
+ .endPermission()
449
+ .endGroup();
450
+ }
451
+ }
452
+ //#endregion
453
+
454
+ var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
455
+ __proto__: null,
456
+ AXMPersonCorePermissionDefinitionProvider: AXMPersonCorePermissionDefinitionProvider
457
+ });
458
+
459
+ // Main Module
460
+
461
+ /**
462
+ * Generated bundle index. Do not edit.
463
+ */
464
+
465
+ export { AXMPersonCoreEntityProvider, AXMPersonCoreMenuProvider, AXMPersonCoreModule, AXMPersonCorePermissionDefinitionProvider, AXMPersonCorePermissionKeys, RootConfig };
466
+ //# sourceMappingURL=acorex-modules-person-core.mjs.map