@acorex/modules 21.0.0-next.18 → 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 (33) 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-religion.entity-Czb5aHb6.mjs +120 -0
  28. package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs.map +1 -0
  29. package/fesm2022/acorex-modules-person-core.mjs +177 -1
  30. package/fesm2022/acorex-modules-person-core.mjs.map +1 -1
  31. package/health-core/index.d.ts +156 -0
  32. package/package.json +18 -10
  33. package/person-core/index.d.ts +16 -1
@@ -0,0 +1,487 @@
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: 'health-core',
14
+ module: 'HealthCore',
15
+ };
16
+ const RootConfig = {
17
+ config,
18
+ module: {
19
+ name: config.module,
20
+ title: `@${config.i18n}:module.title`,
21
+ icon: 'fa-light fa-heart-pulse',
22
+ },
23
+ entities: {
24
+ allergyType: {
25
+ name: 'AllergyType',
26
+ title: `@${config.i18n}:allergy-types.entities.allergy-type.title`,
27
+ titlePlural: `@${config.i18n}:allergy-types.entities.allergy-type.plural`,
28
+ icon: 'fa-light fa-allergies',
29
+ },
30
+ bloodType: {
31
+ name: 'BloodType',
32
+ title: `@${config.i18n}:blood-types.entities.blood-type.title`,
33
+ titlePlural: `@${config.i18n}:blood-types.entities.blood-type.plural`,
34
+ icon: 'fa-light fa-droplet',
35
+ },
36
+ bodyPart: {
37
+ name: 'BodyPart',
38
+ title: `@${config.i18n}:body-parts.entities.body-part.title`,
39
+ titlePlural: `@${config.i18n}:body-parts.entities.body-part.plural`,
40
+ icon: 'fa-light fa-person',
41
+ },
42
+ chronicConditionType: {
43
+ name: 'ChronicConditionType',
44
+ title: `@${config.i18n}:chronic-condition-types.entities.chronic-condition-type.title`,
45
+ titlePlural: `@${config.i18n}:chronic-condition-types.entities.chronic-condition-type.plural`,
46
+ icon: 'fa-light fa-file-medical',
47
+ },
48
+ disabilityStatus: {
49
+ name: 'DisabilityStatus',
50
+ title: `@${config.i18n}:disability-statuses.entities.disability-status.title`,
51
+ titlePlural: `@${config.i18n}:disability-statuses.entities.disability-status.plural`,
52
+ icon: 'fa-light fa-wheelchair',
53
+ },
54
+ injuryType: {
55
+ name: 'InjuryType',
56
+ title: `@${config.i18n}:injury-types.entities.injury-type.title`,
57
+ titlePlural: `@${config.i18n}:injury-types.entities.injury-type.plural`,
58
+ icon: 'fa-light fa-bandage',
59
+ },
60
+ vaccinationType: {
61
+ name: 'VaccinationType',
62
+ title: `@${config.i18n}:vaccination-types.entities.vaccination-type.title`,
63
+ titlePlural: `@${config.i18n}:vaccination-types.entities.vaccination-type.plural`,
64
+ icon: 'fa-light fa-syringe',
65
+ },
66
+ },
67
+ };
68
+
69
+ //#region ---- Imports ----
70
+ //#endregion
71
+ //#region ---- Manifest Definition ----
72
+ /**
73
+ * Health Core Module Manifest.
74
+ * Defines module metadata for health-related reference data (blood type, disability status, etc.).
75
+ */
76
+ const HealthCoreManifest = {
77
+ name: RootConfig.module.name,
78
+ version: '1.0.0',
79
+ title: RootConfig.module.title,
80
+ icon: RootConfig.module.icon,
81
+ i18n: RootConfig.config.i18n,
82
+ };
83
+ //#endregion
84
+
85
+ /**
86
+ * Medication form options datasource (Tablet, Capsule, Syrup, Injection, etc.).
87
+ */
88
+ class AXMMedicationFormOptionsDataSourceDefinition {
89
+ constructor() {
90
+ this.definition = {
91
+ name: 'medication-form-options',
92
+ title: '@health-core:datasources.medication-form-options.title',
93
+ columns: [
94
+ { name: 'value', title: '@health-core:datasources.medication-form-options.columns.value.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
95
+ { name: 'title', title: '@health-core:datasources.medication-form-options.columns.title.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
96
+ ],
97
+ filters: [],
98
+ textField: { name: 'title', title: '@health-core:datasources.medication-form-options.columns.title.title' },
99
+ valueField: { name: 'value', title: '@health-core:datasources.medication-form-options.columns.value.title' },
100
+ samples: [
101
+ { value: 'tablet', title: '@health-core:datasources.medication-form-options.samples.tablet' },
102
+ { value: 'capsule', title: '@health-core:datasources.medication-form-options.samples.capsule' },
103
+ { value: 'syrup', title: '@health-core:datasources.medication-form-options.samples.syrup' },
104
+ { value: 'injection', title: '@health-core:datasources.medication-form-options.samples.injection' },
105
+ { value: 'cream', title: '@health-core:datasources.medication-form-options.samples.cream' },
106
+ { value: 'drops', title: '@health-core:datasources.medication-form-options.samples.drops' },
107
+ { value: 'inhaler', title: '@health-core:datasources.medication-form-options.samples.inhaler' },
108
+ { value: 'patch', title: '@health-core:datasources.medication-form-options.samples.patch' },
109
+ { value: 'other', title: '@health-core:datasources.medication-form-options.samples.other' },
110
+ ],
111
+ source: () => {
112
+ const items = [
113
+ { value: 'tablet', title: '@health-core:datasources.medication-form-options.samples.tablet' },
114
+ { value: 'capsule', title: '@health-core:datasources.medication-form-options.samples.capsule' },
115
+ { value: 'syrup', title: '@health-core:datasources.medication-form-options.samples.syrup' },
116
+ { value: 'injection', title: '@health-core:datasources.medication-form-options.samples.injection' },
117
+ { value: 'cream', title: '@health-core:datasources.medication-form-options.samples.cream' },
118
+ { value: 'drops', title: '@health-core:datasources.medication-form-options.samples.drops' },
119
+ { value: 'inhaler', title: '@health-core:datasources.medication-form-options.samples.inhaler' },
120
+ { value: 'patch', title: '@health-core:datasources.medication-form-options.samples.patch' },
121
+ { value: 'other', title: '@health-core:datasources.medication-form-options.samples.other' },
122
+ ];
123
+ return new AXDataSource({ pageSize: 10, key: 'value', load: async () => ({ items, total: items.length }), byKey: async (key) => items.find((item) => item.value === key) });
124
+ },
125
+ };
126
+ }
127
+ async items() {
128
+ return [this.definition];
129
+ }
130
+ }
131
+
132
+ /**
133
+ * Health risk level options datasource (Low, Medium, High, Critical).
134
+ */
135
+ class AXMHealthRiskLevelOptionsDataSourceDefinition {
136
+ constructor() {
137
+ this.definition = {
138
+ name: 'health-risk-level-options',
139
+ title: '@health-core:datasources.health-risk-level-options.title',
140
+ columns: [
141
+ { name: 'value', title: '@health-core:datasources.health-risk-level-options.columns.value.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
142
+ { name: 'title', title: '@health-core:datasources.health-risk-level-options.columns.title.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
143
+ ],
144
+ filters: [],
145
+ textField: { name: 'title', title: '@health-core:datasources.health-risk-level-options.columns.title.title' },
146
+ valueField: { name: 'value', title: '@health-core:datasources.health-risk-level-options.columns.value.title' },
147
+ samples: [
148
+ { value: 'low', title: '@health-core:datasources.health-risk-level-options.samples.low' },
149
+ { value: 'medium', title: '@health-core:datasources.health-risk-level-options.samples.medium' },
150
+ { value: 'high', title: '@health-core:datasources.health-risk-level-options.samples.high' },
151
+ { value: 'critical', title: '@health-core:datasources.health-risk-level-options.samples.critical' },
152
+ ],
153
+ source: () => {
154
+ const items = [
155
+ { value: 'low', title: '@health-core:datasources.health-risk-level-options.samples.low' },
156
+ { value: 'medium', title: '@health-core:datasources.health-risk-level-options.samples.medium' },
157
+ { value: 'high', title: '@health-core:datasources.health-risk-level-options.samples.high' },
158
+ { value: 'critical', title: '@health-core:datasources.health-risk-level-options.samples.critical' },
159
+ ];
160
+ return new AXDataSource({ pageSize: 10, key: 'value', load: async () => ({ items, total: items.length }), byKey: async (key) => items.find((item) => item.value === key) });
161
+ },
162
+ };
163
+ }
164
+ async items() {
165
+ return [this.definition];
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Alcohol consumption options datasource (Never, Occasional, Regular, etc.).
171
+ */
172
+ class AXMAlcoholConsumptionOptionsDataSourceDefinition {
173
+ constructor() {
174
+ this.definition = {
175
+ name: 'alcohol-consumption-options',
176
+ title: '@health-core:datasources.alcohol-consumption-options.title',
177
+ columns: [
178
+ { name: 'value', title: '@health-core:datasources.alcohol-consumption-options.columns.value.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
179
+ { name: 'title', title: '@health-core:datasources.alcohol-consumption-options.columns.title.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
180
+ ],
181
+ filters: [],
182
+ textField: { name: 'title', title: '@health-core:datasources.alcohol-consumption-options.columns.title.title' },
183
+ valueField: { name: 'value', title: '@health-core:datasources.alcohol-consumption-options.columns.value.title' },
184
+ samples: [
185
+ { value: 'never', title: '@health-core:datasources.alcohol-consumption-options.samples.never' },
186
+ { value: 'occasional', title: '@health-core:datasources.alcohol-consumption-options.samples.occasional' },
187
+ { value: 'regular', title: '@health-core:datasources.alcohol-consumption-options.samples.regular' },
188
+ { value: 'heavy', title: '@health-core:datasources.alcohol-consumption-options.samples.heavy' },
189
+ { value: 'prefer-not-to-say', title: '@health-core:datasources.alcohol-consumption-options.samples.prefer-not-to-say' },
190
+ ],
191
+ source: () => {
192
+ const items = [
193
+ { value: 'never', title: '@health-core:datasources.alcohol-consumption-options.samples.never' },
194
+ { value: 'occasional', title: '@health-core:datasources.alcohol-consumption-options.samples.occasional' },
195
+ { value: 'regular', title: '@health-core:datasources.alcohol-consumption-options.samples.regular' },
196
+ { value: 'heavy', title: '@health-core:datasources.alcohol-consumption-options.samples.heavy' },
197
+ { value: 'prefer-not-to-say', title: '@health-core:datasources.alcohol-consumption-options.samples.prefer-not-to-say' },
198
+ ];
199
+ return new AXDataSource({ pageSize: 10, key: 'value', load: async () => ({ items, total: items.length }), byKey: async (key) => items.find((item) => item.value === key) });
200
+ },
201
+ };
202
+ }
203
+ async items() {
204
+ return [this.definition];
205
+ }
206
+ }
207
+
208
+ /**
209
+ * Smoking status options datasource (Never, Former, Current, Prefer not to say).
210
+ */
211
+ class AXMSmokingStatusOptionsDataSourceDefinition {
212
+ constructor() {
213
+ this.definition = {
214
+ name: 'smoking-status-options',
215
+ title: '@health-core:datasources.smoking-status-options.title',
216
+ columns: [
217
+ { name: 'value', title: '@health-core:datasources.smoking-status-options.columns.value.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
218
+ { name: 'title', title: '@health-core:datasources.smoking-status-options.columns.title.title', type: AXPWidgetsCatalog.text, datatype: 'string' },
219
+ ],
220
+ filters: [],
221
+ textField: { name: 'title', title: '@health-core:datasources.smoking-status-options.columns.title.title' },
222
+ valueField: { name: 'value', title: '@health-core:datasources.smoking-status-options.columns.value.title' },
223
+ samples: [
224
+ { value: 'never', title: '@health-core:datasources.smoking-status-options.samples.never' },
225
+ { value: 'former', title: '@health-core:datasources.smoking-status-options.samples.former' },
226
+ { value: 'current', title: '@health-core:datasources.smoking-status-options.samples.current' },
227
+ { value: 'prefer-not-to-say', title: '@health-core:datasources.smoking-status-options.samples.prefer-not-to-say' },
228
+ ],
229
+ source: () => {
230
+ const items = [
231
+ { value: 'never', title: '@health-core:datasources.smoking-status-options.samples.never' },
232
+ { value: 'former', title: '@health-core:datasources.smoking-status-options.samples.former' },
233
+ { value: 'current', title: '@health-core:datasources.smoking-status-options.samples.current' },
234
+ { value: 'prefer-not-to-say', title: '@health-core:datasources.smoking-status-options.samples.prefer-not-to-say' },
235
+ ];
236
+ return new AXDataSource({ pageSize: 10, key: 'value', load: async () => ({ items, total: items.length }), byKey: async (key) => items.find((item) => item.value === key) });
237
+ },
238
+ };
239
+ }
240
+ async items() {
241
+ return [this.definition];
242
+ }
243
+ }
244
+
245
+ //#region ---- Imports ----
246
+ //#endregion
247
+ //#region ---- Data Source Provider ----
248
+ /**
249
+ * Health Core Data Source Provider.
250
+ * Provides health-related choice datasources (medication form, risk level, alcohol, smoking).
251
+ */
252
+ class AXMHealthCoreDataSourceProvider {
253
+ constructor() {
254
+ this.medicationFormOptions = new AXMMedicationFormOptionsDataSourceDefinition();
255
+ this.healthRiskLevelOptions = new AXMHealthRiskLevelOptionsDataSourceDefinition();
256
+ this.alcoholConsumptionOptions = new AXMAlcoholConsumptionOptionsDataSourceDefinition();
257
+ this.smokingStatusOptions = new AXMSmokingStatusOptionsDataSourceDefinition();
258
+ }
259
+ async items() {
260
+ const items = await Promise.all([
261
+ this.medicationFormOptions.items(),
262
+ this.healthRiskLevelOptions.items(),
263
+ this.alcoholConsumptionOptions.items(),
264
+ this.smokingStatusOptions.items(),
265
+ ]);
266
+ return items.flat();
267
+ }
268
+ }
269
+ //#endregion
270
+
271
+ //#region ---- Imports ----
272
+ //#endregion
273
+ //#region ---- Module ----
274
+ class AXMHealthCoreModule {
275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMHealthCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
276
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMHealthCoreModule }); }
277
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMHealthCoreModule, providers: [
278
+ {
279
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
280
+ useValue: HealthCoreManifest,
281
+ multi: true,
282
+ },
283
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMHealthCorePermissionDefinitionProvider)),
284
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMHealthCoreMenuProvider)),
285
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMHealthCoreEntityProvider)),
286
+ {
287
+ provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
288
+ useClass: AXMHealthCoreDataSourceProvider,
289
+ multi: true,
290
+ },
291
+ ] }); }
292
+ }
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMHealthCoreModule, decorators: [{
294
+ type: NgModule,
295
+ args: [{
296
+ imports: [],
297
+ providers: [
298
+ {
299
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
300
+ useValue: HealthCoreManifest,
301
+ multi: true,
302
+ },
303
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return permissionDefinition_provider; }).then((m) => m.AXMHealthCorePermissionDefinitionProvider)),
304
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then((m) => m.AXMHealthCoreMenuProvider)),
305
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then((m) => m.AXMHealthCoreEntityProvider)),
306
+ {
307
+ provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
308
+ useClass: AXMHealthCoreDataSourceProvider,
309
+ multi: true,
310
+ },
311
+ ],
312
+ }]
313
+ }] });
314
+
315
+ //#region ---- Allergy Type Model ----
316
+ //#endregion
317
+
318
+ //#region ---- Blood Type Model ----
319
+ //#endregion
320
+
321
+ //#region ---- Body Part Model ----
322
+ //#endregion
323
+
324
+ //#region ---- Chronic Condition Type Model ----
325
+ //#endregion
326
+
327
+ //#region ---- Disability Status Model ----
328
+ //#endregion
329
+
330
+ //#region ---- Injury Type Model ----
331
+ //#endregion
332
+
333
+ //#region ---- Vaccination Type Model ----
334
+ //#endregion
335
+
336
+ //#region ---- Imports ----
337
+ //#endregion
338
+ //#region ---- Entity Provider ----
339
+ class AXMHealthCoreEntityProvider {
340
+ constructor() {
341
+ this.injector = inject(Injector);
342
+ }
343
+ async get(moduleName, entityName) {
344
+ if (moduleName !== RootConfig.module.name) {
345
+ return null;
346
+ }
347
+ switch (entityName) {
348
+ case RootConfig.entities.allergyType.name:
349
+ return (await import('./acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs')).allergyTypeFactory(this.injector);
350
+ case RootConfig.entities.bloodType.name:
351
+ return (await import('./acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs')).bloodTypeFactory(this.injector);
352
+ case RootConfig.entities.bodyPart.name:
353
+ return (await import('./acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs')).bodyPartFactory(this.injector);
354
+ case RootConfig.entities.chronicConditionType.name:
355
+ return (await import('./acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs')).chronicConditionTypeFactory(this.injector);
356
+ case RootConfig.entities.disabilityStatus.name:
357
+ return (await import('./acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs')).disabilityStatusFactory(this.injector);
358
+ case RootConfig.entities.injuryType.name:
359
+ return (await import('./acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs')).injuryTypeFactory(this.injector);
360
+ case RootConfig.entities.vaccinationType.name:
361
+ return (await import('./acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs')).vaccinationTypeFactory(this.injector);
362
+ }
363
+ return null;
364
+ }
365
+ async list() {
366
+ const m = RootConfig.module.name;
367
+ return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
368
+ }
369
+ }
370
+ //#endregion
371
+
372
+ var entity_provider = /*#__PURE__*/Object.freeze({
373
+ __proto__: null,
374
+ AXMHealthCoreEntityProvider: AXMHealthCoreEntityProvider
375
+ });
376
+
377
+ const AXMHealthCoreMenuKeys = {
378
+ Root: 'health-core',
379
+ AllergyTypes: 'health-core.allergy-types',
380
+ BloodTypes: 'health-core.blood-types',
381
+ BodyParts: 'health-core.body-parts',
382
+ ChronicConditionTypes: 'health-core.chronic-condition-types',
383
+ DisabilityStatuses: 'health-core.disability-statuses',
384
+ InjuryTypes: 'health-core.injury-types',
385
+ VaccinationTypes: 'health-core.vaccination-types',
386
+ };
387
+
388
+ const AXMHealthCorePermissionKeys = {
389
+ HealthCore: {
390
+ AllergyType: { Management: 'HealthCore:Permission:AllergyType.Management' },
391
+ BloodType: { Management: 'HealthCore:Permission:BloodType.Management' },
392
+ BodyPart: { Management: 'HealthCore:Permission:BodyPart.Management' },
393
+ ChronicConditionType: { Management: 'HealthCore:Permission:ChronicConditionType.Management' },
394
+ DisabilityStatus: { Management: 'HealthCore:Permission:DisabilityStatus.Management' },
395
+ InjuryType: { Management: 'HealthCore:Permission:InjuryType.Management' },
396
+ VaccinationType: { Management: 'HealthCore:Permission:VaccinationType.Management' },
397
+ },
398
+ };
399
+
400
+ //#region ---- Imports ----
401
+ //#endregion
402
+ //#region ---- Menu Provider ----
403
+ class AXMHealthCoreMenuProvider {
404
+ constructor() {
405
+ this.entityService = inject(AXPEntityService);
406
+ }
407
+ async provide(context) {
408
+ const module = RootConfig.module;
409
+ context.find(AXPCommonMenuKeys.Configuration).addItems([
410
+ {
411
+ name: AXMHealthCoreMenuKeys.Root,
412
+ priority: 8440,
413
+ text: '@health-core:module.menus.root.title',
414
+ icon: module.icon,
415
+ policy: {
416
+ features: [RootConfig.module.name],
417
+ },
418
+ children: [
419
+ { name: AXMHealthCoreMenuKeys.AllergyTypes, text: RootConfig.entities.allergyType.titlePlural, icon: RootConfig.entities.allergyType.icon, priority: 1, path: this.entityService.withEntity(module.name, RootConfig.entities.allergyType.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.AllergyType.Management] } },
420
+ { name: AXMHealthCoreMenuKeys.BloodTypes, text: RootConfig.entities.bloodType.titlePlural, icon: RootConfig.entities.bloodType.icon, priority: 2, path: this.entityService.withEntity(module.name, RootConfig.entities.bloodType.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.BloodType.Management] } },
421
+ { name: AXMHealthCoreMenuKeys.BodyParts, text: RootConfig.entities.bodyPart.titlePlural, icon: RootConfig.entities.bodyPart.icon, priority: 3, path: this.entityService.withEntity(module.name, RootConfig.entities.bodyPart.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.BodyPart.Management] } },
422
+ { name: AXMHealthCoreMenuKeys.ChronicConditionTypes, text: RootConfig.entities.chronicConditionType.titlePlural, icon: RootConfig.entities.chronicConditionType.icon, priority: 4, path: this.entityService.withEntity(module.name, RootConfig.entities.chronicConditionType.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.ChronicConditionType.Management] } },
423
+ { name: AXMHealthCoreMenuKeys.DisabilityStatuses, text: RootConfig.entities.disabilityStatus.titlePlural, icon: RootConfig.entities.disabilityStatus.icon, priority: 5, path: this.entityService.withEntity(module.name, RootConfig.entities.disabilityStatus.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.DisabilityStatus.Management] } },
424
+ { name: AXMHealthCoreMenuKeys.InjuryTypes, text: RootConfig.entities.injuryType.titlePlural, icon: RootConfig.entities.injuryType.icon, priority: 6, path: this.entityService.withEntity(module.name, RootConfig.entities.injuryType.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.InjuryType.Management] } },
425
+ { name: AXMHealthCoreMenuKeys.VaccinationTypes, text: RootConfig.entities.vaccinationType.titlePlural, icon: RootConfig.entities.vaccinationType.icon, priority: 7, path: this.entityService.withEntity(module.name, RootConfig.entities.vaccinationType.name).createPath(), policy: { permissions: [AXMHealthCorePermissionKeys.HealthCore.VaccinationType.Management] } },
426
+ ],
427
+ },
428
+ ]);
429
+ }
430
+ }
431
+ //#endregion
432
+
433
+ var menu_provider = /*#__PURE__*/Object.freeze({
434
+ __proto__: null,
435
+ AXMHealthCoreMenuProvider: AXMHealthCoreMenuProvider
436
+ });
437
+
438
+ //#region ---- Imports ----
439
+ //#endregion
440
+ //#region ---- Permission Definition Provider ----
441
+ class AXMHealthCorePermissionDefinitionProvider {
442
+ constructor() {
443
+ this.translationService = inject(AXTranslationService);
444
+ }
445
+ async define(context) {
446
+ const keys = AXMHealthCorePermissionKeys.HealthCore;
447
+ const allergyTypeTrans = (action) => this.translationService.translateAsync(`@health-core:allergy-types.permissions.allergy-type.${action}.title`);
448
+ const bloodTypeTrans = (action) => this.translationService.translateAsync(`@health-core:blood-types.permissions.blood-type.${action}.title`);
449
+ const bodyPartTrans = (action) => this.translationService.translateAsync(`@health-core:body-parts.permissions.body-part.${action}.title`);
450
+ const chronicConditionTypeTrans = (action) => this.translationService.translateAsync(`@health-core:chronic-condition-types.permissions.chronic-condition-type.${action}.title`);
451
+ const disabilityStatusTrans = (action) => this.translationService.translateAsync(`@health-core:disability-statuses.permissions.disability-status.${action}.title`);
452
+ const injuryTypeTrans = (action) => this.translationService.translateAsync(`@health-core:injury-types.permissions.injury-type.${action}.title`);
453
+ const vaccinationTypeTrans = (action) => this.translationService.translateAsync(`@health-core:vaccination-types.permissions.vaccination-type.${action}.title`);
454
+ context
455
+ .addGroup(RootConfig.module.name, await this.translationService.translateAsync('@health-core:module.title'))
456
+ .addPermission(keys.AllergyType.Management, await allergyTypeTrans('manage'))
457
+ .endPermission()
458
+ .addPermission(keys.BloodType.Management, await bloodTypeTrans('manage'))
459
+ .endPermission()
460
+ .addPermission(keys.BodyPart.Management, await bodyPartTrans('manage'))
461
+ .endPermission()
462
+ .addPermission(keys.ChronicConditionType.Management, await chronicConditionTypeTrans('manage'))
463
+ .endPermission()
464
+ .addPermission(keys.DisabilityStatus.Management, await disabilityStatusTrans('manage'))
465
+ .endPermission()
466
+ .addPermission(keys.InjuryType.Management, await injuryTypeTrans('manage'))
467
+ .endPermission()
468
+ .addPermission(keys.VaccinationType.Management, await vaccinationTypeTrans('manage'))
469
+ .endPermission()
470
+ .endGroup();
471
+ }
472
+ }
473
+ //#endregion
474
+
475
+ var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
476
+ __proto__: null,
477
+ AXMHealthCorePermissionDefinitionProvider: AXMHealthCorePermissionDefinitionProvider
478
+ });
479
+
480
+ // Main Module
481
+
482
+ /**
483
+ * Generated bundle index. Do not edit.
484
+ */
485
+
486
+ export { AXMHealthCoreEntityProvider, AXMHealthCoreMenuProvider, AXMHealthCoreModule, AXMHealthCorePermissionDefinitionProvider, AXMHealthCorePermissionKeys, RootConfig };
487
+ //# sourceMappingURL=acorex-modules-health-core.mjs.map