@acorex/modules 20.0.12 → 20.0.13

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 (46) hide show
  1. package/calendar-management/README.md +271 -0
  2. package/calendar-management/index.d.ts +156 -0
  3. package/contact-management/README.md +150 -0
  4. package/contact-management/index.d.ts +15 -4
  5. package/fesm2022/acorex-modules-calendar-management.mjs +1509 -0
  6. package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -0
  7. package/fesm2022/acorex-modules-common-search-popup.component-B_bJ0ZRM.mjs +128 -0
  8. package/fesm2022/acorex-modules-common-search-popup.component-B_bJ0ZRM.mjs.map +1 -0
  9. package/fesm2022/acorex-modules-common.mjs +2 -2
  10. package/fesm2022/acorex-modules-contact-management-acorex-modules-contact-management-DVjMlS0K.mjs +2548 -0
  11. package/fesm2022/acorex-modules-contact-management-acorex-modules-contact-management-DVjMlS0K.mjs.map +1 -0
  12. package/fesm2022/{acorex-modules-contact-management-address-type.entity-QMEODkhx.mjs → acorex-modules-contact-management-address-type.entity-CWIBwWfZ.mjs} +65 -38
  13. package/fesm2022/acorex-modules-contact-management-address-type.entity-CWIBwWfZ.mjs.map +1 -0
  14. package/fesm2022/{acorex-modules-contact-management-contact-address.entity-0f4Vaw_k.mjs → acorex-modules-contact-management-contact-address.entity-DO6GizbS.mjs} +49 -95
  15. package/fesm2022/acorex-modules-contact-management-contact-address.entity-DO6GizbS.mjs.map +1 -0
  16. package/fesm2022/{acorex-modules-contact-management-contact-method.entity-ChEz1jW0.mjs → acorex-modules-contact-management-contact-method.entity-tEtMSV4f.mjs} +67 -69
  17. package/fesm2022/acorex-modules-contact-management-contact-method.entity-tEtMSV4f.mjs.map +1 -0
  18. package/fesm2022/{acorex-modules-contact-management-contact-relationship.entity-DLfiEEfk.mjs → acorex-modules-contact-management-contact-relationship.entity-C-B5aOoq.mjs} +34 -63
  19. package/fesm2022/acorex-modules-contact-management-contact-relationship.entity-C-B5aOoq.mjs.map +1 -0
  20. package/fesm2022/{acorex-modules-contact-management-contact-source.entity-hopVxiIT.mjs → acorex-modules-contact-management-contact-source.entity-Dw8jwcox.mjs} +67 -40
  21. package/fesm2022/acorex-modules-contact-management-contact-source.entity-Dw8jwcox.mjs.map +1 -0
  22. package/fesm2022/acorex-modules-contact-management-emergency-contact-category.entity-BJOOhcD1.mjs +680 -0
  23. package/fesm2022/acorex-modules-contact-management-emergency-contact-category.entity-BJOOhcD1.mjs.map +1 -0
  24. package/fesm2022/acorex-modules-contact-management-emergency-contact.entity-Cr7_5JKD.mjs +1062 -0
  25. package/fesm2022/acorex-modules-contact-management-emergency-contact.entity-Cr7_5JKD.mjs.map +1 -0
  26. package/fesm2022/acorex-modules-contact-management.mjs +1 -2331
  27. package/fesm2022/acorex-modules-contact-management.mjs.map +1 -1
  28. package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-EsaVgkdd.mjs.map +1 -1
  29. package/fesm2022/{acorex-modules-report-management-report-create-root.component-CcNJIUk2.mjs → acorex-modules-report-management-report-create-root.component-DqrLa6vh.mjs} +4 -4
  30. package/fesm2022/{acorex-modules-report-management-report-create-root.component-CcNJIUk2.mjs.map → acorex-modules-report-management-report-create-root.component-DqrLa6vh.mjs.map} +1 -1
  31. package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-CAxcD_pe.mjs → acorex-modules-report-management-report-runner-root-page.component-S8qyvs79.mjs} +41 -24
  32. package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-S8qyvs79.mjs.map +1 -0
  33. package/fesm2022/acorex-modules-report-management.mjs +670 -8
  34. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  35. package/fesm2022/acorex-modules-security-management.mjs +4 -2
  36. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  37. package/package.json +9 -5
  38. package/report-management/index.d.ts +303 -5
  39. package/fesm2022/acorex-modules-common-search-popup.component-CNh7TFpe.mjs +0 -128
  40. package/fesm2022/acorex-modules-common-search-popup.component-CNh7TFpe.mjs.map +0 -1
  41. package/fesm2022/acorex-modules-contact-management-address-type.entity-QMEODkhx.mjs.map +0 -1
  42. package/fesm2022/acorex-modules-contact-management-contact-address.entity-0f4Vaw_k.mjs.map +0 -1
  43. package/fesm2022/acorex-modules-contact-management-contact-method.entity-ChEz1jW0.mjs.map +0 -1
  44. package/fesm2022/acorex-modules-contact-management-contact-relationship.entity-DLfiEEfk.mjs.map +0 -1
  45. package/fesm2022/acorex-modules-contact-management-contact-source.entity-hopVxiIT.mjs.map +0 -1
  46. package/fesm2022/acorex-modules-report-management-report-runner-root-page.component-CAxcD_pe.mjs.map +0 -1
@@ -0,0 +1,2548 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injector, Injectable, NgModule } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
5
+ import { AXPSearchCommandProvider, createAllQueryView, AXPEntityCommandScope, AXPEntityQueryType, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
6
+ import { AXPEntityService, AXMEntityCrudServiceImpl, entityDetailsCreateActions, entityDetailsSimpleCondition, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
7
+ import { AXPWidgetsCatalog, AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
8
+ import { AXDataSource } from '@acorex/cdk/common';
9
+ import { applyQueryArray, AXPSystemActionType } from '@acorex/platform/core';
10
+ import { AXTranslationService } from '@acorex/core/translation';
11
+
12
+ const config = {
13
+ i18n: 'contact-management',
14
+ };
15
+ const RootConfig = {
16
+ config,
17
+ module: {
18
+ name: 'ContactManagement',
19
+ title: '@contact-management:module-name',
20
+ icon: 'fa-light fa-address-book',
21
+ },
22
+ entities: {
23
+ contact: {
24
+ name: 'Contact',
25
+ title: '@contact-management:contact.individual-title',
26
+ titlePlural: '@contact-management:contact.plural-title',
27
+ icon: 'fa-light fa-user',
28
+ },
29
+ contactType: {
30
+ name: 'ContactType',
31
+ title: '@contact-management:contact-type.individual-title',
32
+ titlePlural: '@contact-management:contact-type.plural-title',
33
+ icon: 'fa-light fa-tags',
34
+ },
35
+ contactSource: {
36
+ name: 'ContactSource',
37
+ title: '@contact-management:contact-source.individual-title',
38
+ titlePlural: '@contact-management:contact-source.plural-title',
39
+ icon: 'fa-light fa-bullseye',
40
+ },
41
+ contactMethodType: {
42
+ name: 'ContactMethodType',
43
+ title: '@contact-management:contact-method-type.individual-title',
44
+ titlePlural: '@contact-management:contact-method-type.plural-title',
45
+ icon: 'fa-light fa-list',
46
+ },
47
+ contactMethod: {
48
+ name: 'ContactMethod',
49
+ title: '@contact-management:contact-method.individual-title',
50
+ titlePlural: '@contact-management:contact-method.plural-title',
51
+ icon: 'fa-light fa-phone',
52
+ },
53
+ addressType: {
54
+ name: 'AddressType',
55
+ title: '@contact-management:address-type.individual-title',
56
+ titlePlural: '@contact-management:address-type.plural-title',
57
+ icon: 'fa-light fa-map-marker',
58
+ },
59
+ contactAddress: {
60
+ name: 'ContactAddress',
61
+ title: '@contact-management:contact-address.individual-title',
62
+ titlePlural: '@contact-management:contact-address.plural-title',
63
+ icon: 'fa-light fa-map',
64
+ },
65
+ contactRelationship: {
66
+ name: 'ContactRelationship',
67
+ title: '@contact-management:contact-relationship.individual-title',
68
+ titlePlural: '@contact-management:contact-relationship.plural-title',
69
+ icon: 'fa-light fa-link',
70
+ },
71
+ emergencyContactCategory: {
72
+ name: 'EmergencyContactCategory',
73
+ title: '@contact-management:emergency-contact-category.individual-title',
74
+ titlePlural: '@contact-management:emergency-contact-category.plural-title',
75
+ icon: 'fa-light fa-shield-halved',
76
+ },
77
+ emergencyContact: {
78
+ name: 'EmergencyContact',
79
+ title: '@contact-management:emergency-contact.individual-title',
80
+ titlePlural: '@contact-management:emergency-contact.plural-title',
81
+ icon: 'fa-light fa-siren',
82
+ },
83
+ },
84
+ };
85
+
86
+ class AXMContactManagementEntityProvider {
87
+ constructor() {
88
+ this.injector = inject(Injector);
89
+ }
90
+ preload() {
91
+ const module = RootConfig.module.name;
92
+ return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
93
+ module: module,
94
+ entity: entity.name,
95
+ }));
96
+ }
97
+ async get(moduleName, entityName) {
98
+ if (moduleName == RootConfig.module.name) {
99
+ switch (entityName) {
100
+ case RootConfig.entities.contact.name:
101
+ return (await Promise.resolve().then(function () { return contact_entity; })).contactFactory(this.injector);
102
+ case RootConfig.entities.contactType.name:
103
+ return (await Promise.resolve().then(function () { return contactType_entity; })).contactTypeFactory(this.injector);
104
+ case RootConfig.entities.contactSource.name:
105
+ return (await import('./acorex-modules-contact-management-contact-source.entity-Dw8jwcox.mjs')).contactSourceFactory(this.injector);
106
+ case RootConfig.entities.contactMethodType.name:
107
+ return (await Promise.resolve().then(function () { return contactMethodType_entity; })).contactMethodTypeFactory(this.injector);
108
+ case RootConfig.entities.contactMethod.name:
109
+ return (await import('./acorex-modules-contact-management-contact-method.entity-tEtMSV4f.mjs')).contactMethodFactory(this.injector);
110
+ case RootConfig.entities.addressType.name:
111
+ return (await import('./acorex-modules-contact-management-address-type.entity-CWIBwWfZ.mjs')).addressTypeFactory(this.injector);
112
+ case RootConfig.entities.contactAddress.name:
113
+ return (await import('./acorex-modules-contact-management-contact-address.entity-DO6GizbS.mjs')).contactAddressFactory(this.injector);
114
+ case RootConfig.entities.contactRelationship.name:
115
+ return (await import('./acorex-modules-contact-management-contact-relationship.entity-C-B5aOoq.mjs')).contactRelationshipFactory(this.injector);
116
+ case RootConfig.entities.emergencyContactCategory.name:
117
+ return (await import('./acorex-modules-contact-management-emergency-contact-category.entity-BJOOhcD1.mjs')).emergencyContactCategoryFactory(this.injector);
118
+ case RootConfig.entities.emergencyContact.name:
119
+ return (await import('./acorex-modules-contact-management-emergency-contact.entity-Cr7_5JKD.mjs')).emergencyContactFactory(this.injector);
120
+ }
121
+ }
122
+ return null;
123
+ }
124
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
125
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementEntityProvider }); }
126
+ }
127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementEntityProvider, decorators: [{
128
+ type: Injectable
129
+ }] });
130
+
131
+ class AXMContactManagementMenuProvider {
132
+ constructor() {
133
+ this.entityService = inject(AXPEntityService);
134
+ }
135
+ async provide(context) {
136
+ const module = RootConfig.module;
137
+ context.addItems([
138
+ {
139
+ priority: 9002,
140
+ text: '@contact-management:root-menu',
141
+ icon: module.icon,
142
+ children: [
143
+ {
144
+ text: '@contact-management:contact.plural-title',
145
+ path: this.entityService.createPath(module.name, RootConfig.entities.contact.name),
146
+ icon: RootConfig.entities.contact.icon,
147
+ priority: 1,
148
+ },
149
+ {
150
+ text: ``,
151
+ type: 'break',
152
+ priority: 2,
153
+ },
154
+ {
155
+ text: '@contact-management:contact-type.plural-title',
156
+ path: this.entityService.createPath(module.name, RootConfig.entities.contactType.name),
157
+ icon: RootConfig.entities.contactType.icon,
158
+ priority: 3,
159
+ },
160
+ {
161
+ text: '@contact-management:contact-source.plural-title',
162
+ path: this.entityService.createPath(module.name, RootConfig.entities.contactSource.name),
163
+ icon: RootConfig.entities.contactSource.icon,
164
+ priority: 4,
165
+ },
166
+ {
167
+ text: '@contact-management:contact-method-type.plural-title',
168
+ path: this.entityService.createPath(module.name, RootConfig.entities.contactMethodType.name),
169
+ icon: RootConfig.entities.contactMethodType.icon,
170
+ priority: 5,
171
+ },
172
+ {
173
+ text: '@contact-management:address-type.plural-title',
174
+ path: this.entityService.createPath(module.name, RootConfig.entities.addressType.name),
175
+ icon: RootConfig.entities.addressType.icon,
176
+ priority: 6,
177
+ },
178
+ {
179
+ text: ``,
180
+ type: 'break',
181
+ priority: 10,
182
+ },
183
+ {
184
+ text: '@contact-management:emergency-contact-category.plural-title',
185
+ path: this.entityService.createPath(module.name, RootConfig.entities.emergencyContactCategory.name),
186
+ icon: RootConfig.entities.emergencyContactCategory.icon,
187
+ priority: 11,
188
+ },
189
+ {
190
+ text: '@contact-management:emergency-contact.plural-title',
191
+ path: this.entityService.createPath(module.name, RootConfig.entities.emergencyContact.name),
192
+ icon: RootConfig.entities.emergencyContact.icon,
193
+ priority: 12,
194
+ },
195
+ ],
196
+ },
197
+ ]);
198
+ }
199
+ }
200
+
201
+ class AXMContactManagementSearchCommandProvider extends AXPSearchCommandProvider {
202
+ constructor() {
203
+ super(...arguments);
204
+ this.commands = [
205
+ // Commands will be added here following the correct pattern
206
+ ];
207
+ }
208
+ }
209
+
210
+ class AXMContactService extends AXMEntityCrudServiceImpl {
211
+ }
212
+ class AXMContactServiceImpl extends AXMContactService {
213
+ constructor() {
214
+ super(`${RootConfig.module.name}.${RootConfig.entities.contact.name}`);
215
+ }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
217
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactServiceImpl }); }
218
+ }
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactServiceImpl, decorators: [{
220
+ type: Injectable
221
+ }], ctorParameters: () => [] });
222
+
223
+ async function contactFactory(injector) {
224
+ const dataService = injector.get(AXMContactService);
225
+ const i18n = RootConfig.config.i18n;
226
+ const entityDef = {
227
+ module: RootConfig.module.name,
228
+ name: RootConfig.entities.contact.name,
229
+ source: '',
230
+ title: RootConfig.entities.contact.title,
231
+ formats: {
232
+ individual: RootConfig.entities.contact.title,
233
+ plural: RootConfig.entities.contact.titlePlural,
234
+ searchResult: {
235
+ title: '{{ displayName }}',
236
+ description: RootConfig.module.title,
237
+ },
238
+ },
239
+ relatedEntities: [
240
+ {
241
+ entity: `${RootConfig.module.name}.${RootConfig.entities.contactMethod.name}`,
242
+ title: RootConfig.entities.contactMethod.title,
243
+ columns: ['methodTypeId', 'value', 'isPrimary', 'isVerified', 'notes'],
244
+ conditions: [
245
+ entityDetailsSimpleCondition('contactId')
246
+ ],
247
+ actions: [
248
+ entityDetailsCreateActions('contactId'),
249
+ ],
250
+ },
251
+ {
252
+ entity: `${RootConfig.module.name}.${RootConfig.entities.contactAddress.name}`,
253
+ title: RootConfig.entities.contactAddress.title,
254
+ columns: ['addressTypeId', 'street1', 'city', 'isPrimary'],
255
+ conditions: [
256
+ entityDetailsSimpleCondition('contactId')
257
+ ],
258
+ actions: [
259
+ entityDetailsCreateActions('contactId'),
260
+ ],
261
+ },
262
+ {
263
+ entity: `${RootConfig.module.name}.${RootConfig.entities.contactRelationship.name}`,
264
+ title: RootConfig.entities.contactRelationship.title,
265
+ columns: ['relatedContactId', 'relationshipType', 'description'],
266
+ conditions: [
267
+ entityDetailsSimpleCondition('contactId')
268
+ ],
269
+ actions: [
270
+ entityDetailsCreateActions('contactId'),
271
+ ],
272
+ },
273
+ ],
274
+ groups: [
275
+ {
276
+ id: 'basic',
277
+ title: '@contact-management:contact.personal-information',
278
+ },
279
+ {
280
+ id: 'classification',
281
+ title: '@contact-management:contact.contact-details',
282
+ },
283
+ {
284
+ id: 'metadata',
285
+ title: '@general:terms.metadata',
286
+ },
287
+ ],
288
+ properties: [
289
+ {
290
+ name: 'displayName',
291
+ title: '@general:terms.display-name',
292
+ groupId: 'basic',
293
+ options: {
294
+ sort: {
295
+ enabled: true,
296
+ },
297
+ filter: {
298
+ advance: {
299
+ enabled: true,
300
+ },
301
+ inline: {
302
+ enabled: true,
303
+ },
304
+ },
305
+ },
306
+ schema: {
307
+ dataType: 'string',
308
+ interface: {
309
+ type: AXPWidgetsCatalog.text,
310
+ },
311
+ },
312
+ validations: [
313
+ {
314
+ rule: 'required',
315
+ },
316
+ ],
317
+ },
318
+ {
319
+ name: 'firstName',
320
+ title: '@general:terms.first-name',
321
+ groupId: 'basic',
322
+ options: {
323
+ sort: {
324
+ enabled: true,
325
+ },
326
+ filter: {
327
+ advance: {
328
+ enabled: true,
329
+ },
330
+ inline: {
331
+ enabled: true,
332
+ },
333
+ },
334
+ },
335
+ schema: {
336
+ dataType: 'string',
337
+ interface: {
338
+ type: AXPWidgetsCatalog.text,
339
+ },
340
+ },
341
+ },
342
+ {
343
+ name: 'lastName',
344
+ title: '@general:terms.last-name',
345
+ groupId: 'basic',
346
+ options: {
347
+ sort: {
348
+ enabled: true,
349
+ },
350
+ filter: {
351
+ advance: {
352
+ enabled: true,
353
+ },
354
+ inline: {
355
+ enabled: true,
356
+ },
357
+ },
358
+ },
359
+ schema: {
360
+ dataType: 'string',
361
+ interface: {
362
+ type: AXPWidgetsCatalog.text,
363
+ },
364
+ },
365
+ },
366
+ {
367
+ name: 'title',
368
+ title: '@general:terms.title',
369
+ groupId: 'basic',
370
+ options: {
371
+ sort: {
372
+ enabled: false,
373
+ },
374
+ filter: {
375
+ advance: {
376
+ enabled: true,
377
+ },
378
+ inline: {
379
+ enabled: false,
380
+ },
381
+ },
382
+ },
383
+ schema: {
384
+ dataType: 'string',
385
+ interface: {
386
+ type: AXPWidgetsCatalog.select,
387
+ options: {
388
+ valueField: 'id',
389
+ textField: 'title',
390
+ dataSource: [
391
+ { title: 'Mr.', id: 'Mr' },
392
+ { title: 'Ms.', id: 'Ms' },
393
+ { title: 'Mrs.', id: 'Mrs' },
394
+ { title: 'Dr.', id: 'Dr' },
395
+ { title: 'Prof.', id: 'Prof' },
396
+ ],
397
+ direction: 'horizontal',
398
+ multiple: false,
399
+ },
400
+ },
401
+ },
402
+ },
403
+ {
404
+ name: 'jobTitle',
405
+ title: '@contact-management:contact.job-title',
406
+ groupId: 'basic',
407
+ options: {
408
+ sort: {
409
+ enabled: true,
410
+ },
411
+ filter: {
412
+ advance: {
413
+ enabled: true,
414
+ },
415
+ inline: {
416
+ enabled: false,
417
+ },
418
+ },
419
+ },
420
+ schema: {
421
+ dataType: 'string',
422
+ interface: {
423
+ type: AXPWidgetsCatalog.text,
424
+ },
425
+ },
426
+ },
427
+ {
428
+ name: 'company',
429
+ title: '@general:terms.company',
430
+ groupId: 'basic',
431
+ options: {
432
+ sort: {
433
+ enabled: true,
434
+ },
435
+ filter: {
436
+ advance: {
437
+ enabled: true,
438
+ },
439
+ inline: {
440
+ enabled: true,
441
+ },
442
+ },
443
+ },
444
+ schema: {
445
+ dataType: 'string',
446
+ interface: {
447
+ type: AXPWidgetsCatalog.text,
448
+ },
449
+ },
450
+ },
451
+ {
452
+ name: 'contactTypeId',
453
+ title: '@contact-management:contact-type.individual-title',
454
+ groupId: 'classification',
455
+ options: {
456
+ sort: {
457
+ enabled: true,
458
+ },
459
+ filter: {
460
+ advance: {
461
+ enabled: true,
462
+ },
463
+ inline: {
464
+ enabled: true,
465
+ },
466
+ },
467
+ },
468
+ schema: {
469
+ dataType: 'object',
470
+ interface: {
471
+ type: AXPWidgetsCatalog.lookup,
472
+ options: {
473
+ entity: `${RootConfig.module.name}.${RootConfig.entities.contactType.name}`,
474
+ expose: [
475
+ { source: 'id', target: 'contactType.id' },
476
+ { source: 'title', target: 'contactType.title' },
477
+ ],
478
+ },
479
+ },
480
+ },
481
+ validations: [
482
+ {
483
+ rule: 'required',
484
+ },
485
+ ],
486
+ },
487
+ {
488
+ name: 'contactSourceId',
489
+ title: '@contact-management:contact-source.individual-title',
490
+ groupId: 'classification',
491
+ options: {
492
+ sort: {
493
+ enabled: true,
494
+ },
495
+ filter: {
496
+ advance: {
497
+ enabled: true,
498
+ },
499
+ inline: {
500
+ enabled: true,
501
+ },
502
+ },
503
+ },
504
+ schema: {
505
+ dataType: 'object',
506
+ interface: {
507
+ type: AXPWidgetsCatalog.lookup,
508
+ options: {
509
+ entity: `${RootConfig.module.name}.${RootConfig.entities.contactSource.name}`,
510
+ expose: [
511
+ { source: 'id', target: 'contactSource.id' },
512
+ { source: 'title', target: 'contactSource.title' },
513
+ ],
514
+ }
515
+ },
516
+ },
517
+ },
518
+ {
519
+ name: 'status',
520
+ title: '@general:terms.status.title',
521
+ groupId: 'classification',
522
+ options: {
523
+ sort: {
524
+ enabled: true,
525
+ },
526
+ filter: {
527
+ advance: {
528
+ enabled: true,
529
+ },
530
+ inline: {
531
+ enabled: true,
532
+ },
533
+ },
534
+ },
535
+ schema: {
536
+ dataType: 'string',
537
+ interface: {
538
+ type: AXPWidgetsCatalog.select,
539
+ options: {
540
+ valueField: 'id',
541
+ textField: 'title',
542
+ dataSource: [
543
+ { title: 'Active', id: 'Active' },
544
+ { title: 'Inactive', id: 'Inactive' },
545
+ { title: 'Blocked', id: 'Blocked' },
546
+ ],
547
+ direction: 'horizontal',
548
+ multiple: false,
549
+ },
550
+ },
551
+ },
552
+ validations: [
553
+ {
554
+ rule: 'required',
555
+ },
556
+ ],
557
+ },
558
+ {
559
+ name: 'isVip',
560
+ title: '@contact-management:contact.is-vip',
561
+ groupId: 'classification',
562
+ options: {
563
+ sort: {
564
+ enabled: true,
565
+ },
566
+ filter: {
567
+ advance: {
568
+ enabled: true,
569
+ },
570
+ inline: {
571
+ enabled: false,
572
+ },
573
+ },
574
+ },
575
+ schema: {
576
+ dataType: 'boolean',
577
+ interface: {
578
+ type: AXPWidgetsCatalog.toggle,
579
+ },
580
+ },
581
+ },
582
+ {
583
+ name: 'notes',
584
+ title: '@general:terms.notes',
585
+ groupId: 'metadata',
586
+ options: {
587
+ sort: {
588
+ enabled: false,
589
+ },
590
+ filter: {
591
+ advance: {
592
+ enabled: false,
593
+ },
594
+ inline: {
595
+ enabled: false,
596
+ },
597
+ },
598
+ },
599
+ schema: {
600
+ dataType: 'string',
601
+ interface: {
602
+ type: AXPWidgetsCatalog.largeText,
603
+ options: {
604
+ rows: 4,
605
+ },
606
+ },
607
+ },
608
+ },
609
+ {
610
+ name: 'lastContactDate',
611
+ title: '@contact-management:contact.last-contact-date',
612
+ groupId: 'metadata',
613
+ options: {
614
+ sort: {
615
+ enabled: true,
616
+ },
617
+ filter: {
618
+ advance: {
619
+ enabled: true,
620
+ },
621
+ inline: {
622
+ enabled: true,
623
+ },
624
+ },
625
+ },
626
+ schema: {
627
+ dataType: 'date',
628
+ interface: {
629
+ type: AXPWidgetsCatalog.dateTime,
630
+ },
631
+ },
632
+ },
633
+ ],
634
+ columns: [
635
+ { name: 'displayName' },
636
+ { name: 'firstName' },
637
+ { name: 'lastName' },
638
+ { name: 'company' },
639
+ { name: 'contactTypeId', options: { dataPath: 'contactType' } },
640
+ { name: 'priority' },
641
+ { name: 'status' },
642
+ { name: 'isVip' },
643
+ { name: 'lastContactDate' }
644
+ ],
645
+ commands: {
646
+ create: {
647
+ execute: async (data) => {
648
+ const res = await dataService.insertOne(data);
649
+ return { id: res };
650
+ },
651
+ },
652
+ delete: {
653
+ execute: async (id) => {
654
+ return await dataService.deleteOne(id);
655
+ },
656
+ },
657
+ update: {
658
+ execute: async (data) => {
659
+ return await dataService.updateOne(data.id, data);
660
+ },
661
+ },
662
+ },
663
+ queries: {
664
+ byKey: {
665
+ execute: async (id) => {
666
+ return await dataService.getOne(id);
667
+ },
668
+ type: AXPEntityQueryType.Single,
669
+ },
670
+ list: {
671
+ execute: async (e) => {
672
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
673
+ },
674
+ type: AXPEntityQueryType.List,
675
+ },
676
+ },
677
+ interfaces: {
678
+ master: {
679
+ create: {
680
+ sections: [
681
+ {
682
+ id: 'basic',
683
+ },
684
+ {
685
+ id: 'classification',
686
+ },
687
+ {
688
+ id: 'metadata',
689
+ },
690
+ ],
691
+ properties: [
692
+ {
693
+ name: 'displayName',
694
+ layout: {
695
+ positions: {
696
+ lg: {
697
+ colSpan: 6,
698
+ order: 1,
699
+ },
700
+ },
701
+ },
702
+ },
703
+ {
704
+ name: 'firstName',
705
+ layout: {
706
+ positions: {
707
+ lg: {
708
+ colSpan: 3,
709
+ order: 2,
710
+ },
711
+ },
712
+ },
713
+ },
714
+ {
715
+ name: 'lastName',
716
+ layout: {
717
+ positions: {
718
+ lg: {
719
+ colSpan: 3,
720
+ order: 3,
721
+ },
722
+ },
723
+ },
724
+ },
725
+ {
726
+ name: 'title',
727
+ layout: {
728
+ positions: {
729
+ lg: {
730
+ colSpan: 3,
731
+ order: 4,
732
+ },
733
+ },
734
+ },
735
+ },
736
+ {
737
+ name: 'jobTitle',
738
+ layout: {
739
+ positions: {
740
+ lg: {
741
+ colSpan: 3,
742
+ order: 5,
743
+ },
744
+ },
745
+ },
746
+ },
747
+ {
748
+ name: 'company',
749
+ layout: {
750
+ positions: {
751
+ lg: {
752
+ colSpan: 6,
753
+ order: 6,
754
+ },
755
+ },
756
+ },
757
+ },
758
+ {
759
+ name: 'contactTypeId',
760
+ layout: {
761
+ positions: {
762
+ lg: {
763
+ colSpan: 4,
764
+ order: 7,
765
+ },
766
+ },
767
+ },
768
+ },
769
+ {
770
+ name: 'contactSourceId',
771
+ layout: {
772
+ positions: {
773
+ lg: {
774
+ colSpan: 4,
775
+ order: 8,
776
+ },
777
+ },
778
+ },
779
+ },
780
+ {
781
+ name: 'priority',
782
+ layout: {
783
+ positions: {
784
+ lg: {
785
+ colSpan: 2,
786
+ order: 9,
787
+ },
788
+ },
789
+ },
790
+ },
791
+ {
792
+ name: 'status',
793
+ layout: {
794
+ positions: {
795
+ lg: {
796
+ colSpan: 2,
797
+ order: 10,
798
+ },
799
+ },
800
+ },
801
+ },
802
+ {
803
+ name: 'isVip',
804
+ layout: {
805
+ positions: {
806
+ lg: {
807
+ colSpan: 2,
808
+ order: 11,
809
+ },
810
+ },
811
+ },
812
+ },
813
+ {
814
+ name: 'notes',
815
+ layout: {
816
+ positions: {
817
+ lg: {
818
+ colSpan: 12,
819
+ order: 12,
820
+ },
821
+ },
822
+ },
823
+ },
824
+ {
825
+ name: 'lastContactDate',
826
+ layout: {
827
+ positions: {
828
+ lg: {
829
+ colSpan: 6,
830
+ order: 13,
831
+ },
832
+ },
833
+ },
834
+ },
835
+ ],
836
+ },
837
+ update: {
838
+ sections: [
839
+ {
840
+ id: 'basic',
841
+ },
842
+ {
843
+ id: 'classification',
844
+ },
845
+ {
846
+ id: 'metadata',
847
+ },
848
+ ],
849
+ properties: [
850
+ {
851
+ name: 'displayName',
852
+ layout: {
853
+ positions: {
854
+ lg: {
855
+ colSpan: 6,
856
+ order: 1,
857
+ },
858
+ },
859
+ },
860
+ },
861
+ {
862
+ name: 'firstName',
863
+ layout: {
864
+ positions: {
865
+ lg: {
866
+ colSpan: 3,
867
+ order: 2,
868
+ },
869
+ },
870
+ },
871
+ },
872
+ {
873
+ name: 'lastName',
874
+ layout: {
875
+ positions: {
876
+ lg: {
877
+ colSpan: 3,
878
+ order: 3,
879
+ },
880
+ },
881
+ },
882
+ },
883
+ {
884
+ name: 'title',
885
+ layout: {
886
+ positions: {
887
+ lg: {
888
+ colSpan: 3,
889
+ order: 4,
890
+ },
891
+ },
892
+ },
893
+ },
894
+ {
895
+ name: 'jobTitle',
896
+ layout: {
897
+ positions: {
898
+ lg: {
899
+ colSpan: 3,
900
+ order: 5,
901
+ },
902
+ },
903
+ },
904
+ },
905
+ {
906
+ name: 'company',
907
+ layout: {
908
+ positions: {
909
+ lg: {
910
+ colSpan: 6,
911
+ order: 6,
912
+ },
913
+ },
914
+ },
915
+ },
916
+ {
917
+ name: 'contactTypeId',
918
+ dataPath: 'contactType',
919
+ layout: {
920
+ positions: {
921
+ lg: {
922
+ colSpan: 4,
923
+ order: 7,
924
+ },
925
+ },
926
+ },
927
+ },
928
+ {
929
+ name: 'contactSourceId',
930
+ dataPath: 'contactSource',
931
+ layout: {
932
+ positions: {
933
+ lg: {
934
+ colSpan: 4,
935
+ order: 8,
936
+ },
937
+ },
938
+ },
939
+ },
940
+ {
941
+ name: 'priority',
942
+ layout: {
943
+ positions: {
944
+ lg: {
945
+ colSpan: 2,
946
+ order: 9,
947
+ },
948
+ },
949
+ },
950
+ },
951
+ {
952
+ name: 'status',
953
+ layout: {
954
+ positions: {
955
+ lg: {
956
+ colSpan: 2,
957
+ order: 10,
958
+ },
959
+ },
960
+ },
961
+ },
962
+ {
963
+ name: 'isVip',
964
+ layout: {
965
+ positions: {
966
+ lg: {
967
+ colSpan: 2,
968
+ order: 11,
969
+ },
970
+ },
971
+ },
972
+ },
973
+ {
974
+ name: 'notes',
975
+ layout: {
976
+ positions: {
977
+ lg: {
978
+ colSpan: 12,
979
+ order: 12,
980
+ },
981
+ },
982
+ },
983
+ },
984
+ {
985
+ name: 'lastContactDate',
986
+ layout: {
987
+ positions: {
988
+ lg: {
989
+ colSpan: 6,
990
+ order: 13,
991
+ },
992
+ },
993
+ },
994
+ },
995
+ ],
996
+ },
997
+ single: {
998
+ title: '{{displayName}}',
999
+ sections: [
1000
+ {
1001
+ id: 'basic',
1002
+ layout: {
1003
+ positions: {
1004
+ lg: {
1005
+ colSpan: 6,
1006
+ },
1007
+ },
1008
+ },
1009
+ },
1010
+ {
1011
+ id: 'classification',
1012
+ layout: {
1013
+ positions: {
1014
+ lg: {
1015
+ colSpan: 6,
1016
+ },
1017
+ },
1018
+ },
1019
+ },
1020
+ {
1021
+ id: 'metadata',
1022
+ layout: {
1023
+ positions: {
1024
+ lg: {
1025
+ colSpan: 12,
1026
+ },
1027
+ },
1028
+ },
1029
+ },
1030
+ ],
1031
+ properties: [
1032
+ {
1033
+ name: 'displayName',
1034
+ layout: {
1035
+ positions: {
1036
+ lg: {
1037
+ colSpan: 12,
1038
+ order: 1,
1039
+ },
1040
+ },
1041
+ },
1042
+ },
1043
+ {
1044
+ name: 'firstName',
1045
+ layout: {
1046
+ positions: {
1047
+ lg: {
1048
+ colSpan: 6,
1049
+ order: 2,
1050
+ },
1051
+ },
1052
+ },
1053
+ },
1054
+ {
1055
+ name: 'lastName',
1056
+ layout: {
1057
+ positions: {
1058
+ lg: {
1059
+ colSpan: 6,
1060
+ order: 3,
1061
+ },
1062
+ },
1063
+ },
1064
+ },
1065
+ {
1066
+ name: 'title',
1067
+ layout: {
1068
+ positions: {
1069
+ lg: {
1070
+ colSpan: 6,
1071
+ order: 4,
1072
+ },
1073
+ },
1074
+ },
1075
+ },
1076
+ {
1077
+ name: 'jobTitle',
1078
+ layout: {
1079
+ positions: {
1080
+ lg: {
1081
+ colSpan: 6,
1082
+ order: 5,
1083
+ },
1084
+ },
1085
+ },
1086
+ },
1087
+ {
1088
+ name: 'company',
1089
+ layout: {
1090
+ positions: {
1091
+ lg: {
1092
+ colSpan: 12,
1093
+ order: 6,
1094
+ },
1095
+ },
1096
+ },
1097
+ },
1098
+ {
1099
+ name: 'contactTypeId',
1100
+ layout: {
1101
+ positions: {
1102
+ lg: {
1103
+ colSpan: 6,
1104
+ order: 7,
1105
+ },
1106
+ },
1107
+ },
1108
+ },
1109
+ {
1110
+ name: 'contactSourceId',
1111
+ layout: {
1112
+ positions: {
1113
+ lg: {
1114
+ colSpan: 6,
1115
+ order: 8,
1116
+ },
1117
+ },
1118
+ },
1119
+ },
1120
+ {
1121
+ name: 'priority',
1122
+ layout: {
1123
+ positions: {
1124
+ lg: {
1125
+ colSpan: 4,
1126
+ order: 9,
1127
+ },
1128
+ },
1129
+ },
1130
+ },
1131
+ {
1132
+ name: 'status',
1133
+ layout: {
1134
+ positions: {
1135
+ lg: {
1136
+ colSpan: 4,
1137
+ order: 10,
1138
+ },
1139
+ },
1140
+ },
1141
+ },
1142
+ {
1143
+ name: 'isVip',
1144
+ layout: {
1145
+ positions: {
1146
+ lg: {
1147
+ colSpan: 4,
1148
+ order: 11,
1149
+ },
1150
+ },
1151
+ },
1152
+ },
1153
+ {
1154
+ name: 'notes',
1155
+ layout: {
1156
+ positions: {
1157
+ lg: {
1158
+ colSpan: 12,
1159
+ order: 12,
1160
+ },
1161
+ },
1162
+ },
1163
+ },
1164
+ {
1165
+ name: 'lastContactDate',
1166
+ layout: {
1167
+ positions: {
1168
+ lg: {
1169
+ colSpan: 12,
1170
+ order: 13,
1171
+ },
1172
+ },
1173
+ },
1174
+ },
1175
+ ],
1176
+ actions: [
1177
+ {
1178
+ title: '@general:actions.delete.title',
1179
+ command: 'delete-entity',
1180
+ priority: 'secondary',
1181
+ type: 'delete',
1182
+ scope: AXPEntityCommandScope.Individual,
1183
+ },
1184
+ ],
1185
+ },
1186
+ list: {
1187
+ actions: [
1188
+ {
1189
+ title: '@general:actions.create.title',
1190
+ command: 'create-entity',
1191
+ priority: 'primary',
1192
+ type: 'create',
1193
+ scope: AXPEntityCommandScope.TypeLevel,
1194
+ },
1195
+ {
1196
+ title: '@general:actions.delete-items.title',
1197
+ command: 'delete-entity',
1198
+ priority: 'primary',
1199
+ type: 'delete',
1200
+ scope: AXPEntityCommandScope.Selected,
1201
+ },
1202
+ {
1203
+ title: '@general:actions.detail.title',
1204
+ command: 'open-entity',
1205
+ priority: 'secondary',
1206
+ type: 'view',
1207
+ scope: AXPEntityCommandScope.Individual,
1208
+ },
1209
+ {
1210
+ title: '@general:actions.delete.title',
1211
+ command: 'delete-entity',
1212
+ priority: 'secondary',
1213
+ type: 'delete',
1214
+ scope: AXPEntityCommandScope.Individual,
1215
+ },
1216
+ ],
1217
+ views: [
1218
+ createAllQueryView({
1219
+ sorts: [{ name: 'displayName', dir: 'asc' }]
1220
+ }),
1221
+ ],
1222
+ },
1223
+ },
1224
+ },
1225
+ };
1226
+ return entityDef;
1227
+ }
1228
+
1229
+ var contact_entity = /*#__PURE__*/Object.freeze({
1230
+ __proto__: null,
1231
+ contactFactory: contactFactory
1232
+ });
1233
+
1234
+ class AXMContactTypeService extends AXMEntityCrudServiceImpl {
1235
+ }
1236
+ class AXMContactTypeServiceImpl extends AXMContactTypeService {
1237
+ constructor() {
1238
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactType.name}`);
1239
+ }
1240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1241
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactTypeServiceImpl }); }
1242
+ }
1243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactTypeServiceImpl, decorators: [{
1244
+ type: Injectable
1245
+ }], ctorParameters: () => [] });
1246
+
1247
+ async function contactTypeFactory(injector) {
1248
+ const dataService = injector.get(AXMContactTypeService);
1249
+ const i18n = RootConfig.config.i18n;
1250
+ const entityDef = {
1251
+ module: RootConfig.module.name,
1252
+ name: RootConfig.entities.contactType.name,
1253
+ source: '',
1254
+ title: RootConfig.entities.contactType.title,
1255
+ formats: {
1256
+ individual: RootConfig.entities.contactType.title,
1257
+ plural: RootConfig.entities.contactType.titlePlural,
1258
+ searchResult: {
1259
+ title: '{{ title }}',
1260
+ description: RootConfig.module.title,
1261
+ },
1262
+ },
1263
+ groups: [
1264
+ {
1265
+ id: 'basic-info',
1266
+ title: '@general:terms.basic-info',
1267
+ },
1268
+ {
1269
+ id: 'appearance',
1270
+ title: '@general:terms.appearance',
1271
+ },
1272
+ {
1273
+ id: 'settings',
1274
+ title: '@general:terms.settings',
1275
+ },
1276
+ ],
1277
+ properties: [
1278
+ {
1279
+ name: 'title',
1280
+ title: '@general:terms.title',
1281
+ groupId: 'basic-info',
1282
+ options: {
1283
+ sort: {
1284
+ enabled: true,
1285
+ },
1286
+ filter: {
1287
+ advance: {
1288
+ enabled: true,
1289
+ },
1290
+ inline: {
1291
+ enabled: true,
1292
+ },
1293
+ },
1294
+ },
1295
+ schema: {
1296
+ dataType: 'string',
1297
+ interface: {
1298
+ type: AXPWidgetsCatalog.text,
1299
+ },
1300
+ },
1301
+ validations: [
1302
+ {
1303
+ rule: 'required',
1304
+ },
1305
+ ],
1306
+ },
1307
+ {
1308
+ name: 'description',
1309
+ title: '@general:terms.description',
1310
+ groupId: 'basic-info',
1311
+ options: {
1312
+ sort: {
1313
+ enabled: false,
1314
+ },
1315
+ filter: {
1316
+ advance: {
1317
+ enabled: true,
1318
+ },
1319
+ inline: {
1320
+ enabled: false,
1321
+ },
1322
+ },
1323
+ },
1324
+ schema: {
1325
+ dataType: 'string',
1326
+ interface: {
1327
+ type: AXPWidgetsCatalog.text,
1328
+ },
1329
+ },
1330
+ },
1331
+ {
1332
+ name: 'icon',
1333
+ title: '@general:terms.icon',
1334
+ groupId: 'appearance',
1335
+ options: {
1336
+ sort: {
1337
+ enabled: false,
1338
+ },
1339
+ filter: {
1340
+ advance: {
1341
+ enabled: false,
1342
+ },
1343
+ inline: {
1344
+ enabled: false,
1345
+ },
1346
+ },
1347
+ },
1348
+ schema: {
1349
+ dataType: 'string',
1350
+ interface: {
1351
+ type: AXPWidgetsCatalog.text,
1352
+ options: {
1353
+ placeholder: 'fa-light fa-user'
1354
+ },
1355
+ },
1356
+ },
1357
+ },
1358
+ {
1359
+ name: 'isDefault',
1360
+ title: '@general:terms.is-default',
1361
+ groupId: 'settings',
1362
+ options: {
1363
+ sort: {
1364
+ enabled: true,
1365
+ },
1366
+ filter: {
1367
+ advance: {
1368
+ enabled: true,
1369
+ },
1370
+ inline: {
1371
+ enabled: false,
1372
+ },
1373
+ },
1374
+ },
1375
+ schema: {
1376
+ dataType: 'boolean',
1377
+ interface: {
1378
+ type: AXPWidgetsCatalog.checkbox,
1379
+ },
1380
+ },
1381
+ },
1382
+ {
1383
+ name: 'isActive',
1384
+ title: '@general:terms.status.options.active',
1385
+ groupId: 'settings',
1386
+ options: {
1387
+ sort: {
1388
+ enabled: true,
1389
+ },
1390
+ filter: {
1391
+ advance: {
1392
+ enabled: true,
1393
+ },
1394
+ inline: {
1395
+ enabled: true,
1396
+ },
1397
+ },
1398
+ },
1399
+ schema: {
1400
+ dataType: 'boolean',
1401
+ interface: {
1402
+ type: AXPWidgetsCatalog.checkbox,
1403
+ },
1404
+ },
1405
+ },
1406
+ {
1407
+ name: 'order',
1408
+ title: '@general:terms.order',
1409
+ groupId: 'settings',
1410
+ options: {
1411
+ sort: {
1412
+ enabled: true,
1413
+ },
1414
+ filter: {
1415
+ advance: {
1416
+ enabled: false,
1417
+ },
1418
+ inline: {
1419
+ enabled: false,
1420
+ },
1421
+ },
1422
+ },
1423
+ schema: {
1424
+ dataType: 'number',
1425
+ interface: {
1426
+ type: AXPWidgetsCatalog.number,
1427
+ options: {
1428
+ minValue: 1
1429
+ },
1430
+ },
1431
+ },
1432
+ validations: [
1433
+ {
1434
+ rule: 'required',
1435
+ },
1436
+ ],
1437
+ },
1438
+ ],
1439
+ columns: [
1440
+ { name: 'title' },
1441
+ { name: 'description' },
1442
+ { name: 'isDefault' },
1443
+ { name: 'isActive' },
1444
+ { name: 'order' }
1445
+ ],
1446
+ commands: {
1447
+ create: {
1448
+ execute: async (data) => {
1449
+ const res = await dataService.insertOne(data);
1450
+ return { id: res };
1451
+ },
1452
+ },
1453
+ delete: {
1454
+ execute: async (id) => {
1455
+ return await dataService.deleteOne(id);
1456
+ },
1457
+ },
1458
+ update: {
1459
+ execute: async (data) => {
1460
+ return await dataService.updateOne(data.id, data);
1461
+ },
1462
+ },
1463
+ },
1464
+ queries: {
1465
+ byKey: {
1466
+ execute: async (id) => {
1467
+ return await dataService.getOne(id);
1468
+ },
1469
+ type: AXPEntityQueryType.Single,
1470
+ },
1471
+ list: {
1472
+ execute: async (e) => {
1473
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1474
+ },
1475
+ type: AXPEntityQueryType.List,
1476
+ },
1477
+ },
1478
+ interfaces: {
1479
+ master: {
1480
+ create: {
1481
+ sections: [
1482
+ {
1483
+ id: 'basic-info',
1484
+ },
1485
+ {
1486
+ id: 'appearance',
1487
+ },
1488
+ {
1489
+ id: 'settings',
1490
+ },
1491
+ ],
1492
+ properties: [
1493
+ {
1494
+ name: 'title',
1495
+ layout: {
1496
+ positions: {
1497
+ lg: {
1498
+ colSpan: 6,
1499
+ order: 1,
1500
+ },
1501
+ },
1502
+ },
1503
+ },
1504
+ {
1505
+ name: 'description',
1506
+ layout: {
1507
+ positions: {
1508
+ lg: {
1509
+ colSpan: 6,
1510
+ order: 2,
1511
+ },
1512
+ },
1513
+ },
1514
+ },
1515
+ {
1516
+ name: 'icon',
1517
+ layout: {
1518
+ positions: {
1519
+ lg: {
1520
+ colSpan: 6,
1521
+ order: 3,
1522
+ },
1523
+ },
1524
+ },
1525
+ },
1526
+ {
1527
+ name: 'order',
1528
+ layout: {
1529
+ positions: {
1530
+ lg: {
1531
+ colSpan: 3,
1532
+ order: 4,
1533
+ },
1534
+ },
1535
+ },
1536
+ },
1537
+ {
1538
+ name: 'isDefault',
1539
+ layout: {
1540
+ positions: {
1541
+ lg: {
1542
+ colSpan: 3,
1543
+ order: 5,
1544
+ },
1545
+ },
1546
+ },
1547
+ },
1548
+ {
1549
+ name: 'isActive',
1550
+ layout: {
1551
+ positions: {
1552
+ lg: {
1553
+ colSpan: 3,
1554
+ order: 6,
1555
+ },
1556
+ },
1557
+ },
1558
+ },
1559
+ ],
1560
+ },
1561
+ update: {
1562
+ sections: [
1563
+ {
1564
+ id: 'basic-info',
1565
+ },
1566
+ {
1567
+ id: 'appearance',
1568
+ },
1569
+ {
1570
+ id: 'settings',
1571
+ },
1572
+ ],
1573
+ properties: [
1574
+ {
1575
+ name: 'title',
1576
+ layout: {
1577
+ positions: {
1578
+ lg: {
1579
+ colSpan: 6,
1580
+ order: 1,
1581
+ },
1582
+ },
1583
+ },
1584
+ },
1585
+ {
1586
+ name: 'description',
1587
+ layout: {
1588
+ positions: {
1589
+ lg: {
1590
+ colSpan: 6,
1591
+ order: 2,
1592
+ },
1593
+ },
1594
+ },
1595
+ },
1596
+ {
1597
+ name: 'icon',
1598
+ layout: {
1599
+ positions: {
1600
+ lg: {
1601
+ colSpan: 6,
1602
+ order: 3,
1603
+ },
1604
+ },
1605
+ },
1606
+ },
1607
+ {
1608
+ name: 'order',
1609
+ layout: {
1610
+ positions: {
1611
+ lg: {
1612
+ colSpan: 3,
1613
+ order: 4,
1614
+ },
1615
+ },
1616
+ },
1617
+ },
1618
+ {
1619
+ name: 'isDefault',
1620
+ layout: {
1621
+ positions: {
1622
+ lg: {
1623
+ colSpan: 3,
1624
+ order: 5,
1625
+ },
1626
+ },
1627
+ },
1628
+ },
1629
+ {
1630
+ name: 'isActive',
1631
+ layout: {
1632
+ positions: {
1633
+ lg: {
1634
+ colSpan: 3,
1635
+ order: 6,
1636
+ },
1637
+ },
1638
+ },
1639
+ },
1640
+ ],
1641
+ },
1642
+ single: {
1643
+ title: '{{title}}',
1644
+ sections: [
1645
+ {
1646
+ id: 'basic-info',
1647
+ },
1648
+ {
1649
+ id: 'appearance',
1650
+ },
1651
+ {
1652
+ id: 'settings',
1653
+ },
1654
+ ],
1655
+ properties: [
1656
+ {
1657
+ name: 'title',
1658
+ layout: {
1659
+ positions: {
1660
+ lg: {
1661
+ colSpan: 6,
1662
+ order: 1,
1663
+ },
1664
+ },
1665
+ },
1666
+ },
1667
+ {
1668
+ name: 'description',
1669
+ layout: {
1670
+ positions: {
1671
+ lg: {
1672
+ colSpan: 6,
1673
+ order: 2,
1674
+ },
1675
+ },
1676
+ },
1677
+ },
1678
+ {
1679
+ name: 'icon',
1680
+ layout: {
1681
+ positions: {
1682
+ lg: {
1683
+ colSpan: 6,
1684
+ order: 3,
1685
+ },
1686
+ },
1687
+ },
1688
+ },
1689
+ {
1690
+ name: 'order',
1691
+ layout: {
1692
+ positions: {
1693
+ lg: {
1694
+ colSpan: 3,
1695
+ order: 4,
1696
+ },
1697
+ },
1698
+ },
1699
+ },
1700
+ {
1701
+ name: 'isDefault',
1702
+ layout: {
1703
+ positions: {
1704
+ lg: {
1705
+ colSpan: 3,
1706
+ order: 5,
1707
+ },
1708
+ },
1709
+ },
1710
+ },
1711
+ {
1712
+ name: 'isActive',
1713
+ layout: {
1714
+ positions: {
1715
+ lg: {
1716
+ colSpan: 3,
1717
+ order: 6,
1718
+ },
1719
+ },
1720
+ },
1721
+ },
1722
+ ],
1723
+ actions: [
1724
+ {
1725
+ title: '@general:actions.delete.title',
1726
+ command: 'delete-entity',
1727
+ priority: 'secondary',
1728
+ type: 'delete',
1729
+ scope: AXPEntityCommandScope.Individual,
1730
+ },
1731
+ ],
1732
+ },
1733
+ list: {
1734
+ actions: [
1735
+ {
1736
+ title: '@general:actions.create.title',
1737
+ command: 'create-entity',
1738
+ priority: 'primary',
1739
+ type: 'create',
1740
+ scope: AXPEntityCommandScope.TypeLevel,
1741
+ },
1742
+ {
1743
+ title: '@general:actions.delete-items.title',
1744
+ command: 'delete-entity',
1745
+ priority: 'primary',
1746
+ type: 'delete',
1747
+ scope: AXPEntityCommandScope.Selected,
1748
+ },
1749
+ {
1750
+ title: '@general:actions.view.title',
1751
+ command: 'open-entity',
1752
+ priority: 'secondary',
1753
+ type: 'view',
1754
+ scope: AXPEntityCommandScope.Individual,
1755
+ },
1756
+ {
1757
+ title: '@general:actions.delete.title',
1758
+ command: 'delete-entity',
1759
+ priority: 'secondary',
1760
+ type: 'delete',
1761
+ scope: AXPEntityCommandScope.Individual,
1762
+ },
1763
+ ],
1764
+ views: [
1765
+ createAllQueryView({
1766
+ sorts: [{ name: 'order', dir: 'asc' }]
1767
+ }),
1768
+ ],
1769
+ },
1770
+ },
1771
+ },
1772
+ };
1773
+ return entityDef;
1774
+ }
1775
+
1776
+ var contactType_entity = /*#__PURE__*/Object.freeze({
1777
+ __proto__: null,
1778
+ contactTypeFactory: contactTypeFactory
1779
+ });
1780
+
1781
+ class AXMContactSourceService extends AXMEntityCrudServiceImpl {
1782
+ }
1783
+ class AXMContactSourceServiceImpl extends AXMContactSourceService {
1784
+ constructor() {
1785
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactSource.name}`);
1786
+ }
1787
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactSourceServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1788
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactSourceServiceImpl }); }
1789
+ }
1790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactSourceServiceImpl, decorators: [{
1791
+ type: Injectable
1792
+ }], ctorParameters: () => [] });
1793
+
1794
+ // Note: contact-source.entity.ts will be similar to contact-type.entity.ts
1795
+
1796
+ class AXMContactMethodTypeService extends AXMEntityCrudServiceImpl {
1797
+ }
1798
+ class AXMContactMethodTypeServiceImpl extends AXMContactMethodTypeService {
1799
+ constructor() {
1800
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactMethodType.name}`);
1801
+ }
1802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1803
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodTypeServiceImpl }); }
1804
+ }
1805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodTypeServiceImpl, decorators: [{
1806
+ type: Injectable
1807
+ }], ctorParameters: () => [] });
1808
+
1809
+ async function contactMethodTypeFactory(injector) {
1810
+ const dataService = injector.get(AXMContactMethodTypeService);
1811
+ const i18n = RootConfig.config.i18n;
1812
+ const entityDef = {
1813
+ module: RootConfig.module.name,
1814
+ name: RootConfig.entities.contactMethodType.name,
1815
+ source: '',
1816
+ title: RootConfig.entities.contactMethodType.title,
1817
+ formats: {
1818
+ individual: RootConfig.entities.contactMethodType.title,
1819
+ plural: RootConfig.entities.contactMethodType.titlePlural,
1820
+ searchResult: {
1821
+ title: '{{ title }}',
1822
+ description: RootConfig.module.title,
1823
+ },
1824
+ },
1825
+ groups: [
1826
+ {
1827
+ id: 'basic-info',
1828
+ title: '@general:terms.basic-info',
1829
+ },
1830
+ {
1831
+ id: 'validation',
1832
+ title: '@general:terms.validation',
1833
+ },
1834
+ {
1835
+ id: 'settings',
1836
+ title: '@general:terms.settings',
1837
+ },
1838
+ ],
1839
+ properties: [
1840
+ {
1841
+ name: 'title',
1842
+ title: '@general:terms.title',
1843
+ groupId: 'basic-info',
1844
+ options: {
1845
+ sort: { enabled: true },
1846
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
1847
+ },
1848
+ schema: {
1849
+ dataType: 'string',
1850
+ interface: { type: AXPWidgetsCatalog.text },
1851
+ },
1852
+ validations: [{ rule: 'required' }],
1853
+ },
1854
+ {
1855
+ name: 'validationRegex',
1856
+ title: '@general:terms.validation-regex',
1857
+ groupId: 'validation',
1858
+ options: {
1859
+ sort: { enabled: false },
1860
+ filter: { advance: { enabled: false }, inline: { enabled: false } },
1861
+ },
1862
+ schema: {
1863
+ dataType: 'string',
1864
+ interface: {
1865
+ type: AXPWidgetsCatalog.text,
1866
+ options: {
1867
+ placeholder: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'
1868
+ }
1869
+ },
1870
+ },
1871
+ },
1872
+ {
1873
+ name: 'placeholder',
1874
+ title: '@general:terms.placeholder',
1875
+ groupId: 'validation',
1876
+ options: {
1877
+ sort: { enabled: false },
1878
+ filter: { advance: { enabled: false }, inline: { enabled: false } },
1879
+ },
1880
+ schema: {
1881
+ dataType: 'string',
1882
+ interface: {
1883
+ type: AXPWidgetsCatalog.text,
1884
+ options: {
1885
+ placeholder: 'user@example.com'
1886
+ }
1887
+ },
1888
+ },
1889
+ },
1890
+ {
1891
+ name: 'isActive',
1892
+ title: '@general:terms.status.options.active',
1893
+ groupId: 'settings',
1894
+ options: {
1895
+ sort: { enabled: true },
1896
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
1897
+ },
1898
+ schema: {
1899
+ dataType: 'boolean',
1900
+ interface: { type: AXPWidgetsCatalog.toggle },
1901
+ },
1902
+ },
1903
+ ],
1904
+ columns: [
1905
+ { name: 'title' },
1906
+ { name: 'validationRegex' },
1907
+ { name: 'placeholder' },
1908
+ { name: 'isActive' }
1909
+ ],
1910
+ commands: {
1911
+ create: {
1912
+ execute: async (data) => {
1913
+ const res = await dataService.insertOne(data);
1914
+ return { id: res };
1915
+ },
1916
+ },
1917
+ delete: {
1918
+ execute: async (id) => {
1919
+ return await dataService.deleteOne(id);
1920
+ },
1921
+ },
1922
+ update: {
1923
+ execute: async (data) => {
1924
+ return await dataService.updateOne(data.id, data);
1925
+ },
1926
+ },
1927
+ },
1928
+ queries: {
1929
+ byKey: {
1930
+ execute: async (id) => {
1931
+ return await dataService.getOne(id);
1932
+ },
1933
+ type: AXPEntityQueryType.Single,
1934
+ },
1935
+ list: {
1936
+ execute: async (e) => {
1937
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1938
+ },
1939
+ type: AXPEntityQueryType.List,
1940
+ },
1941
+ },
1942
+ interfaces: {
1943
+ master: {
1944
+ create: {
1945
+ sections: [
1946
+ { id: 'basic-info' },
1947
+ { id: 'validation' },
1948
+ { id: 'settings' }
1949
+ ],
1950
+ properties: [
1951
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
1952
+ { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
1953
+ { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
1954
+ { name: 'isActive', layout: { positions: { lg: { colSpan: 3, order: 4 } } } },
1955
+ ],
1956
+ },
1957
+ update: {
1958
+ sections: [
1959
+ { id: 'basic-info' },
1960
+ { id: 'validation' },
1961
+ { id: 'settings' }
1962
+ ],
1963
+ properties: [
1964
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
1965
+ { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
1966
+ { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
1967
+ { name: 'isActive', layout: { positions: { lg: { colSpan: 3, order: 4 } } } },
1968
+ ],
1969
+ },
1970
+ single: {
1971
+ title: '{{title}}',
1972
+ sections: [
1973
+ { id: 'basic-info' },
1974
+ { id: 'validation' },
1975
+ { id: 'settings' }
1976
+ ],
1977
+ properties: [
1978
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
1979
+ { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
1980
+ { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
1981
+ { name: 'isActive', layout: { positions: { lg: { colSpan: 3, order: 4 } } } },
1982
+ ],
1983
+ actions: [],
1984
+ },
1985
+ list: {
1986
+ actions: [
1987
+ {
1988
+ title: '@general:actions.create.title',
1989
+ command: 'create-entity',
1990
+ priority: 'primary',
1991
+ type: 'create',
1992
+ scope: AXPEntityCommandScope.TypeLevel,
1993
+ },
1994
+ {
1995
+ title: '@general:actions.delete-items.title',
1996
+ command: 'delete-entity',
1997
+ priority: 'primary',
1998
+ type: 'delete',
1999
+ scope: AXPEntityCommandScope.Selected,
2000
+ },
2001
+ {
2002
+ title: '@general:actions.view.title',
2003
+ command: 'open-entity',
2004
+ priority: 'secondary',
2005
+ type: 'view',
2006
+ scope: AXPEntityCommandScope.Individual,
2007
+ },
2008
+ {
2009
+ title: '@general:actions.delete.title',
2010
+ command: 'delete-entity',
2011
+ priority: 'secondary',
2012
+ type: 'delete',
2013
+ scope: AXPEntityCommandScope.Individual,
2014
+ },
2015
+ ],
2016
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
2017
+ },
2018
+ },
2019
+ },
2020
+ };
2021
+ return entityDef;
2022
+ }
2023
+
2024
+ var contactMethodType_entity = /*#__PURE__*/Object.freeze({
2025
+ __proto__: null,
2026
+ contactMethodTypeFactory: contactMethodTypeFactory
2027
+ });
2028
+
2029
+ class AXMContactMethodService extends AXMEntityCrudServiceImpl {
2030
+ }
2031
+ class AXMContactMethodServiceImpl extends AXMContactMethodService {
2032
+ constructor() {
2033
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactMethod.name}`);
2034
+ }
2035
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2036
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodServiceImpl }); }
2037
+ }
2038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactMethodServiceImpl, decorators: [{
2039
+ type: Injectable
2040
+ }], ctorParameters: () => [] });
2041
+
2042
+ // Note: contact-method.entity.ts will reference contactMethodType lookup
2043
+
2044
+ class AXMAddressTypeService extends AXMEntityCrudServiceImpl {
2045
+ }
2046
+ class AXMAddressTypeServiceImpl extends AXMAddressTypeService {
2047
+ constructor() {
2048
+ super(`${RootConfig.module.name}.${RootConfig.entities.addressType.name}`);
2049
+ }
2050
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMAddressTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2051
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMAddressTypeServiceImpl }); }
2052
+ }
2053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMAddressTypeServiceImpl, decorators: [{
2054
+ type: Injectable
2055
+ }], ctorParameters: () => [] });
2056
+
2057
+ // Note: address-type.entity.ts will be similar to contact-type.entity.ts
2058
+
2059
+ class AXMContactAddressService extends AXMEntityCrudServiceImpl {
2060
+ }
2061
+ class AXMContactAddressServiceImpl extends AXMContactAddressService {
2062
+ constructor() {
2063
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactAddress.name}`);
2064
+ }
2065
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactAddressServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2066
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactAddressServiceImpl }); }
2067
+ }
2068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactAddressServiceImpl, decorators: [{
2069
+ type: Injectable
2070
+ }], ctorParameters: () => [] });
2071
+
2072
+ // Note: contact-address.entity.ts will include map widget and structured address fields
2073
+
2074
+ class AXMContactRelationshipService extends AXMEntityCrudServiceImpl {
2075
+ }
2076
+ class AXMContactRelationshipServiceImpl extends AXMContactRelationshipService {
2077
+ constructor() {
2078
+ super(`${RootConfig.module.name}.${RootConfig.entities.contactRelationship.name}`);
2079
+ }
2080
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactRelationshipServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2081
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactRelationshipServiceImpl }); }
2082
+ }
2083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactRelationshipServiceImpl, decorators: [{
2084
+ type: Injectable
2085
+ }], ctorParameters: () => [] });
2086
+
2087
+ // Note: contact-relationship.entity.ts will enable relationships between contacts
2088
+
2089
+ class AXMEmergencyContactCategoryService extends AXMEntityCrudServiceImpl {
2090
+ }
2091
+ class AXMEmergencyContactCategoryServiceImpl extends AXMEmergencyContactCategoryService {
2092
+ constructor() {
2093
+ super(`${RootConfig.module.name}.${RootConfig.entities.emergencyContactCategory.name}`);
2094
+ }
2095
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactCategoryServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2096
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactCategoryServiceImpl }); }
2097
+ }
2098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactCategoryServiceImpl, decorators: [{
2099
+ type: Injectable
2100
+ }], ctorParameters: () => [] });
2101
+
2102
+ class AXMEmergencyContactService extends AXMEntityCrudServiceImpl {
2103
+ }
2104
+ class AXMEmergencyContactServiceImpl extends AXMEmergencyContactService {
2105
+ constructor() {
2106
+ super(`${RootConfig.module.name}.${RootConfig.entities.emergencyContact.name}`);
2107
+ }
2108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2109
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactServiceImpl }); }
2110
+ }
2111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMEmergencyContactServiceImpl, decorators: [{
2112
+ type: Injectable
2113
+ }], ctorParameters: () => [] });
2114
+
2115
+ class AXPContactMethodDataSourceProvider {
2116
+ constructor() {
2117
+ this.contactMethodTypeMock = [
2118
+ {
2119
+ name: 'email',
2120
+ title: 'Email',
2121
+ description: 'Email addresses',
2122
+ icon: 'fa-light fa-envelope',
2123
+ validationRegex: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
2124
+ placeholder: 'user@example.com',
2125
+ isDefault: true,
2126
+ isActive: true,
2127
+ order: 1,
2128
+ },
2129
+ {
2130
+ name: 'phone',
2131
+ title: 'Phone',
2132
+ description: 'Phone numbers',
2133
+ icon: 'fa-light fa-phone',
2134
+ validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
2135
+ placeholder: '+1 (555) 123-4567',
2136
+ isDefault: false,
2137
+ isActive: true,
2138
+ order: 2,
2139
+ },
2140
+ {
2141
+ name: 'mobile',
2142
+ title: 'Mobile',
2143
+ description: 'Mobile phone numbers',
2144
+ icon: 'fa-light fa-mobile',
2145
+ validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
2146
+ placeholder: '+1 (555) 123-4567',
2147
+ isDefault: false,
2148
+ isActive: true,
2149
+ order: 3,
2150
+ },
2151
+ {
2152
+ name: 'fax',
2153
+ title: 'Fax',
2154
+ description: 'Fax numbers',
2155
+ icon: 'fa-light fa-fax',
2156
+ validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
2157
+ placeholder: '+1 (555) 123-4567',
2158
+ isDefault: false,
2159
+ isActive: true,
2160
+ order: 4,
2161
+ },
2162
+ {
2163
+ name: 'linkedin',
2164
+ title: 'LinkedIn',
2165
+ description: 'LinkedIn profiles',
2166
+ icon: 'fa-brands fa-linkedin',
2167
+ validationRegex: '^https://www\\.linkedin\\.com/in/[a-zA-Z0-9\\-]+/?$',
2168
+ placeholder: 'https://www.linkedin.com/in/username',
2169
+ isDefault: false,
2170
+ isActive: true,
2171
+ order: 5,
2172
+ },
2173
+ {
2174
+ name: 'twitter',
2175
+ title: 'Twitter',
2176
+ description: 'Twitter handles',
2177
+ icon: 'fa-brands fa-twitter',
2178
+ validationRegex: '^@[a-zA-Z0-9_]{1,15}$',
2179
+ placeholder: '@username',
2180
+ isDefault: false,
2181
+ isActive: true,
2182
+ order: 6,
2183
+ },
2184
+ {
2185
+ name: 'skype',
2186
+ title: 'Skype',
2187
+ description: 'Skype usernames',
2188
+ icon: 'fa-brands fa-skype',
2189
+ validationRegex: '^[a-zA-Z0-9._-]{6,32}$',
2190
+ placeholder: 'skype.username',
2191
+ isDefault: false,
2192
+ isActive: true,
2193
+ order: 7,
2194
+ },
2195
+ {
2196
+ name: 'whatsapp',
2197
+ title: 'WhatsApp',
2198
+ description: 'WhatsApp numbers',
2199
+ icon: 'fa-light fa-globe',
2200
+ validationRegex: '^[+]?[0-9\\s\\-\\(\\)]{7,15}$',
2201
+ placeholder: '+1 (555) 123-4567',
2202
+ isDefault: false,
2203
+ isActive: true,
2204
+ order: 8,
2205
+ },
2206
+ {
2207
+ name: 'telegram',
2208
+ title: 'Telegram',
2209
+ description: 'Telegram handles',
2210
+ icon: 'fa-brands fa-telegram',
2211
+ validationRegex: '^[a-zA-Z0-9._-]{6,32}$',
2212
+ placeholder: '@username',
2213
+ isDefault: false,
2214
+ isActive: true,
2215
+ order: 9,
2216
+ },
2217
+ ];
2218
+ //#region Contact Method Type
2219
+ this.contactMethodType = {
2220
+ name: 'contact-method-types',
2221
+ title: 'Contact Method Types',
2222
+ textField: 'title',
2223
+ valueField: 'name',
2224
+ columns: [
2225
+ {
2226
+ name: 'name',
2227
+ title: 'Name',
2228
+ },
2229
+ {
2230
+ name: 'title',
2231
+ title: 'Title',
2232
+ },
2233
+ {
2234
+ name: 'description',
2235
+ title: 'Description',
2236
+ },
2237
+ {
2238
+ name: 'icon',
2239
+ title: 'Icon',
2240
+ },
2241
+ {
2242
+ name: 'placeholder',
2243
+ title: 'Placeholder',
2244
+ },
2245
+ {
2246
+ name: 'validationRegex',
2247
+ title: 'Validation Regex',
2248
+ },
2249
+ {
2250
+ name: 'isDefault',
2251
+ title: 'Is Default',
2252
+ },
2253
+ {
2254
+ name: 'order',
2255
+ title: 'Order',
2256
+ },
2257
+ ],
2258
+ source: async () => {
2259
+ return new AXDataSource({
2260
+ pageSize: 20,
2261
+ key: 'name',
2262
+ load: (e) => {
2263
+ return applyQueryArray(this.contactMethodTypeMock, e);
2264
+ },
2265
+ byKey: async (key) => {
2266
+ return this.contactMethodTypeMock.find((c) => c.name == key);
2267
+ },
2268
+ });
2269
+ },
2270
+ samples: this.contactMethodTypeMock,
2271
+ };
2272
+ }
2273
+ //#endregion
2274
+ async items() {
2275
+ return [this.contactMethodType];
2276
+ }
2277
+ }
2278
+
2279
+ class AXMContactManagementModule {
2280
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2281
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementModule, imports: [CommonModule] }); }
2282
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementModule, providers: [
2283
+ // Entity Provider
2284
+ {
2285
+ provide: AXP_ENTITY_DEFINITION_LOADER,
2286
+ useClass: AXMContactManagementEntityProvider,
2287
+ multi: true,
2288
+ },
2289
+ // Menu Provider
2290
+ {
2291
+ provide: AXP_MENU_PROVIDER,
2292
+ useClass: AXMContactManagementMenuProvider,
2293
+ multi: true,
2294
+ },
2295
+ // Search Command Provider
2296
+ {
2297
+ provide: AXP_SEARCH_PROVIDER,
2298
+ useClass: AXMContactManagementSearchCommandProvider,
2299
+ multi: true,
2300
+ },
2301
+ // Permission Provider
2302
+ {
2303
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
2304
+ useFactory: async () => {
2305
+ const injector = inject(Injector);
2306
+ const provider = (await Promise.resolve().then(function () { return permissionDefinition_provider; })).AXMPermissionDefinitionProvider;
2307
+ return new provider(injector);
2308
+ },
2309
+ multi: true,
2310
+ },
2311
+ // Entity Services
2312
+ {
2313
+ provide: AXMContactService,
2314
+ useClass: AXMContactServiceImpl,
2315
+ },
2316
+ {
2317
+ provide: AXMContactTypeService,
2318
+ useClass: AXMContactTypeServiceImpl,
2319
+ },
2320
+ {
2321
+ provide: AXMContactSourceService,
2322
+ useClass: AXMContactSourceServiceImpl,
2323
+ },
2324
+ {
2325
+ provide: AXMContactMethodTypeService,
2326
+ useClass: AXMContactMethodTypeServiceImpl,
2327
+ },
2328
+ {
2329
+ provide: AXMContactMethodService,
2330
+ useClass: AXMContactMethodServiceImpl,
2331
+ },
2332
+ {
2333
+ provide: AXMAddressTypeService,
2334
+ useClass: AXMAddressTypeServiceImpl,
2335
+ },
2336
+ {
2337
+ provide: AXMContactAddressService,
2338
+ useClass: AXMContactAddressServiceImpl,
2339
+ },
2340
+ {
2341
+ provide: AXMContactRelationshipService,
2342
+ useClass: AXMContactRelationshipServiceImpl,
2343
+ },
2344
+ {
2345
+ provide: AXMEmergencyContactCategoryService,
2346
+ useClass: AXMEmergencyContactCategoryServiceImpl,
2347
+ },
2348
+ {
2349
+ provide: AXMEmergencyContactService,
2350
+ useClass: AXMEmergencyContactServiceImpl,
2351
+ },
2352
+ {
2353
+ provide: AXP_WIDGET_DATASOURCE_PROVIDER,
2354
+ useClass: AXPContactMethodDataSourceProvider,
2355
+ multi: true,
2356
+ },
2357
+ ], imports: [CommonModule] }); }
2358
+ }
2359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXMContactManagementModule, decorators: [{
2360
+ type: NgModule,
2361
+ args: [{
2362
+ imports: [CommonModule],
2363
+ providers: [
2364
+ // Entity Provider
2365
+ {
2366
+ provide: AXP_ENTITY_DEFINITION_LOADER,
2367
+ useClass: AXMContactManagementEntityProvider,
2368
+ multi: true,
2369
+ },
2370
+ // Menu Provider
2371
+ {
2372
+ provide: AXP_MENU_PROVIDER,
2373
+ useClass: AXMContactManagementMenuProvider,
2374
+ multi: true,
2375
+ },
2376
+ // Search Command Provider
2377
+ {
2378
+ provide: AXP_SEARCH_PROVIDER,
2379
+ useClass: AXMContactManagementSearchCommandProvider,
2380
+ multi: true,
2381
+ },
2382
+ // Permission Provider
2383
+ {
2384
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
2385
+ useFactory: async () => {
2386
+ const injector = inject(Injector);
2387
+ const provider = (await Promise.resolve().then(function () { return permissionDefinition_provider; })).AXMPermissionDefinitionProvider;
2388
+ return new provider(injector);
2389
+ },
2390
+ multi: true,
2391
+ },
2392
+ // Entity Services
2393
+ {
2394
+ provide: AXMContactService,
2395
+ useClass: AXMContactServiceImpl,
2396
+ },
2397
+ {
2398
+ provide: AXMContactTypeService,
2399
+ useClass: AXMContactTypeServiceImpl,
2400
+ },
2401
+ {
2402
+ provide: AXMContactSourceService,
2403
+ useClass: AXMContactSourceServiceImpl,
2404
+ },
2405
+ {
2406
+ provide: AXMContactMethodTypeService,
2407
+ useClass: AXMContactMethodTypeServiceImpl,
2408
+ },
2409
+ {
2410
+ provide: AXMContactMethodService,
2411
+ useClass: AXMContactMethodServiceImpl,
2412
+ },
2413
+ {
2414
+ provide: AXMAddressTypeService,
2415
+ useClass: AXMAddressTypeServiceImpl,
2416
+ },
2417
+ {
2418
+ provide: AXMContactAddressService,
2419
+ useClass: AXMContactAddressServiceImpl,
2420
+ },
2421
+ {
2422
+ provide: AXMContactRelationshipService,
2423
+ useClass: AXMContactRelationshipServiceImpl,
2424
+ },
2425
+ {
2426
+ provide: AXMEmergencyContactCategoryService,
2427
+ useClass: AXMEmergencyContactCategoryServiceImpl,
2428
+ },
2429
+ {
2430
+ provide: AXMEmergencyContactService,
2431
+ useClass: AXMEmergencyContactServiceImpl,
2432
+ },
2433
+ {
2434
+ provide: AXP_WIDGET_DATASOURCE_PROVIDER,
2435
+ useClass: AXPContactMethodDataSourceProvider,
2436
+ multi: true,
2437
+ },
2438
+ ],
2439
+ }]
2440
+ }] });
2441
+
2442
+ const moduleKey = RootConfig.module.name;
2443
+ const entitiesKey = RootConfig.entities;
2444
+ const manageKey = AXPSystemActionType.Manage;
2445
+ const viewKey = AXPSystemActionType.View;
2446
+ const updateKey = AXPSystemActionType.Update;
2447
+ const deleteKey = AXPSystemActionType.Delete;
2448
+ const createKey = AXPSystemActionType.Create;
2449
+ const AXMPermissionsKeys = {
2450
+ ContactManagement: {
2451
+ Management: `${moduleKey}:${manageKey}`,
2452
+ Contacts: {
2453
+ Management: `${moduleKey}:${entitiesKey.contact.name}:${manageKey}`,
2454
+ View: `${moduleKey}:${entitiesKey.contact.name}:${viewKey}`,
2455
+ Edit: `${moduleKey}:${entitiesKey.contact.name}:${updateKey}`,
2456
+ Delete: `${moduleKey}:${entitiesKey.contact.name}:${deleteKey}`,
2457
+ Create: `${moduleKey}:${entitiesKey.contact.name}:${createKey}`,
2458
+ },
2459
+ ContactTypes: {
2460
+ Management: `${moduleKey}:${entitiesKey.contactType.name}:${manageKey}`,
2461
+ View: `${moduleKey}:${entitiesKey.contactType.name}:${viewKey}`,
2462
+ Edit: `${moduleKey}:${entitiesKey.contactType.name}:${updateKey}`,
2463
+ Delete: `${moduleKey}:${entitiesKey.contactType.name}:${deleteKey}`,
2464
+ Create: `${moduleKey}:${entitiesKey.contactType.name}:${createKey}`,
2465
+ },
2466
+ ContactMethodTypes: {
2467
+ Management: `${moduleKey}:${entitiesKey.contactMethodType.name}:${manageKey}`,
2468
+ View: `${moduleKey}:${entitiesKey.contactMethodType.name}:${viewKey}`,
2469
+ Edit: `${moduleKey}:${entitiesKey.contactMethodType.name}:${updateKey}`,
2470
+ Delete: `${moduleKey}:${entitiesKey.contactMethodType.name}:${deleteKey}`,
2471
+ Create: `${moduleKey}:${entitiesKey.contactMethodType.name}:${createKey}`,
2472
+ },
2473
+ EmergencyContactCategories: {
2474
+ Management: `${moduleKey}:${entitiesKey.emergencyContactCategory.name}:${manageKey}`,
2475
+ View: `${moduleKey}:${entitiesKey.emergencyContactCategory.name}:${viewKey}`,
2476
+ Edit: `${moduleKey}:${entitiesKey.emergencyContactCategory.name}:${updateKey}`,
2477
+ Delete: `${moduleKey}:${entitiesKey.emergencyContactCategory.name}:${deleteKey}`,
2478
+ Create: `${moduleKey}:${entitiesKey.emergencyContactCategory.name}:${createKey}`,
2479
+ },
2480
+ EmergencyContacts: {
2481
+ Management: `${moduleKey}:${entitiesKey.emergencyContact.name}:${manageKey}`,
2482
+ View: `${moduleKey}:${entitiesKey.emergencyContact.name}:${viewKey}`,
2483
+ Edit: `${moduleKey}:${entitiesKey.emergencyContact.name}:${updateKey}`,
2484
+ Delete: `${moduleKey}:${entitiesKey.emergencyContact.name}:${deleteKey}`,
2485
+ Create: `${moduleKey}:${entitiesKey.emergencyContact.name}:${createKey}`,
2486
+ },
2487
+ },
2488
+ };
2489
+
2490
+ class AXMPermissionDefinitionProvider {
2491
+ constructor(injector) {
2492
+ this.injector = injector;
2493
+ this.translateService = this.injector.get(AXTranslationService);
2494
+ }
2495
+ async define(context) {
2496
+ const trans = async (key) => await this.translateService.translateAsync(key);
2497
+ const keys = AXMPermissionsKeys.ContactManagement;
2498
+ context.addGroup(keys.Management, await trans(RootConfig.module.title))
2499
+ // Contacts Management
2500
+ .addPermission(keys.Contacts.Management, await trans(RootConfig.entities.contact.title))
2501
+ .addChild(keys.Contacts.View, await trans('@general:actions.view.permission'))
2502
+ .addChild(keys.Contacts.Edit, await trans('@general:actions.edit.permission'))
2503
+ .addChild(keys.Contacts.Delete, await trans('@general:actions.delete.permission'))
2504
+ .addChild(keys.Contacts.Create, await trans('@general:actions.create.permission'))
2505
+ .endPermission()
2506
+ // Contact Types Management
2507
+ .addPermission(keys.ContactTypes.Management, await trans(RootConfig.entities.contactType.title))
2508
+ .addChild(keys.ContactTypes.View, await trans('@general:actions.view.permission'))
2509
+ .addChild(keys.ContactTypes.Edit, await trans('@general:actions.edit.permission'))
2510
+ .addChild(keys.ContactTypes.Delete, await trans('@general:actions.delete.permission'))
2511
+ .addChild(keys.ContactTypes.Create, await trans('@general:actions.create.permission'))
2512
+ .endPermission()
2513
+ // Contact Method Types Management
2514
+ .addPermission(keys.ContactMethodTypes.Management, await trans(RootConfig.entities.contactMethodType.title))
2515
+ .addChild(keys.ContactMethodTypes.View, await trans('@general:actions.view.permission'))
2516
+ .addChild(keys.ContactMethodTypes.Edit, await trans('@general:actions.edit.permission'))
2517
+ .addChild(keys.ContactMethodTypes.Delete, await trans('@general:actions.delete.permission'))
2518
+ .addChild(keys.ContactMethodTypes.Create, await trans('@general:actions.create.permission'))
2519
+ .endPermission()
2520
+ // Emergency Contact Categories Management
2521
+ .addPermission(keys.EmergencyContactCategories.Management, await trans(RootConfig.entities.emergencyContactCategory.title))
2522
+ .addChild(keys.EmergencyContactCategories.View, await trans('@general:actions.view.permission'))
2523
+ .addChild(keys.EmergencyContactCategories.Edit, await trans('@general:actions.edit.permission'))
2524
+ .addChild(keys.EmergencyContactCategories.Delete, await trans('@general:actions.delete.permission'))
2525
+ .addChild(keys.EmergencyContactCategories.Create, await trans('@general:actions.create.permission'))
2526
+ .endPermission()
2527
+ // Emergency Contacts Management
2528
+ .addPermission(keys.EmergencyContacts.Management, await trans(RootConfig.entities.emergencyContact.title))
2529
+ .addChild(keys.EmergencyContacts.View, await trans('@general:actions.view.permission'))
2530
+ .addChild(keys.EmergencyContacts.Edit, await trans('@general:actions.edit.permission'))
2531
+ .addChild(keys.EmergencyContacts.Delete, await trans('@general:actions.delete.permission'))
2532
+ .addChild(keys.EmergencyContacts.Create, await trans('@general:actions.create.permission'))
2533
+ .endPermission()
2534
+ .endGroup();
2535
+ }
2536
+ }
2537
+
2538
+ var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
2539
+ __proto__: null,
2540
+ AXMPermissionDefinitionProvider: AXMPermissionDefinitionProvider
2541
+ });
2542
+
2543
+ /**
2544
+ * Generated bundle index. Do not edit.
2545
+ */
2546
+
2547
+ export { AXMContactSourceService as A, RootConfig as R, AXMContactMethodService as a, AXMAddressTypeService as b, AXMContactAddressService as c, AXMContactRelationshipService as d, AXMEmergencyContactCategoryService as e, AXMEmergencyContactService as f, AXMContactManagementModule as g, AXMContactManagementEntityProvider as h, AXMContactManagementMenuProvider as i, AXMContactManagementSearchCommandProvider as j, AXMPermissionDefinitionProvider as k, contactFactory as l, AXMContactService as m, AXMContactServiceImpl as n, contactTypeFactory as o, AXMContactTypeService as p, AXMContactTypeServiceImpl as q, AXMContactSourceServiceImpl as r, contactMethodTypeFactory as s, AXMContactMethodTypeService as t, AXMContactMethodTypeServiceImpl as u, AXMContactMethodServiceImpl as v, AXMAddressTypeServiceImpl as w, AXMContactAddressServiceImpl as x, AXMContactRelationshipServiceImpl as y };
2548
+ //# sourceMappingURL=acorex-modules-contact-management-acorex-modules-contact-management-DVjMlS0K.mjs.map