@acorex/modules 20.7.16 → 20.7.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/business-core/index.d.ts +39 -2
  2. package/contact-core/index.d.ts +1 -7
  3. package/customer-management/index.d.ts +1 -27
  4. package/data-management/index.d.ts +17 -4
  5. package/fesm2022/acorex-modules-business-core.mjs +316 -4
  6. package/fesm2022/acorex-modules-business-core.mjs.map +1 -1
  7. package/fesm2022/{acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs → acorex-modules-contact-core-emergency-service.entity-l8rYNqP1.mjs} +2 -1
  8. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-l8rYNqP1.mjs.map +1 -0
  9. package/fesm2022/acorex-modules-contact-core.mjs +6 -47
  10. package/fesm2022/acorex-modules-contact-core.mjs.map +1 -1
  11. package/fesm2022/{acorex-modules-customer-management-customer.entity-CRp5g0OZ.mjs → acorex-modules-customer-management-customer.entity-B7-T9_T7.mjs} +9 -9
  12. package/fesm2022/acorex-modules-customer-management-customer.entity-B7-T9_T7.mjs.map +1 -0
  13. package/fesm2022/acorex-modules-customer-management.mjs +1 -111
  14. package/fesm2022/acorex-modules-customer-management.mjs.map +1 -1
  15. package/fesm2022/acorex-modules-data-management.mjs +56 -45
  16. package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
  17. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs → acorex-modules-human-capital-management-leave-request.entity-CS3Fr_k2.mjs} +2 -1
  18. package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CS3Fr_k2.mjs.map +1 -0
  19. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  20. package/fesm2022/acorex-modules-person-management.mjs +9 -19
  21. package/fesm2022/acorex-modules-person-management.mjs.map +1 -1
  22. package/fesm2022/acorex-modules-supplier-management.mjs +19 -229
  23. package/fesm2022/acorex-modules-supplier-management.mjs.map +1 -1
  24. package/package.json +6 -6
  25. package/supplier-management/index.d.ts +4 -50
  26. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs.map +0 -1
  27. package/fesm2022/acorex-modules-customer-management-customer-segment.entity-CoYAU5g3.mjs +0 -69
  28. package/fesm2022/acorex-modules-customer-management-customer-segment.entity-CoYAU5g3.mjs.map +0 -1
  29. package/fesm2022/acorex-modules-customer-management-customer-type.entity-pt4gpOGq.mjs +0 -79
  30. package/fesm2022/acorex-modules-customer-management-customer-type.entity-pt4gpOGq.mjs.map +0 -1
  31. package/fesm2022/acorex-modules-customer-management-customer.entity-CRp5g0OZ.mjs.map +0 -1
  32. package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, Injector, NgModule } from '@angular/core';
3
3
  import { AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER } from '@acorex/platform/core';
4
- import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER, entityMasterCrudActions, entityMasterRecordActions, entityDetailsCrudActions, entityDetailsSimpleCondition, entityMasterDeleteAction } from '@acorex/platform/layout/entity';
4
+ import { AXPEntityService, AXP_ENTITY_DEFINITION_LOADER, entityMasterCrudActions, entityMasterRecordActions, entityDetailsCrudActions, entityDetailsSimpleCondition } from '@acorex/platform/layout/entity';
5
5
  import { AXP_MENU_PROVIDER, createAllQueryView } from '@acorex/platform/common';
6
6
  import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
7
7
  import { AXP_IDENTIFIER_RULES } from '@acorex/modules/identifier-management';
8
8
  import { AXTranslationService } from '@acorex/core/translation';
9
- import { AXPWidgetsList } from '@acorex/modules/common';
9
+ import { AXPCommonMenuKeys, AXPWidgetsList } from '@acorex/modules/common';
10
10
  import { RootConfig as RootConfig$1 } from '@acorex/modules/person-management';
11
11
  import { RootConfig as RootConfig$2 } from '@acorex/modules/financial-core';
12
12
  import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
@@ -31,20 +31,6 @@ const RootConfig = {
31
31
  titlePlural: `@${config.i18n}:suppliers.entities.supplier.plural`,
32
32
  icon: 'fa-light fa-truck',
33
33
  },
34
- supplierType: {
35
- name: 'SupplierType',
36
- source: `${config.module}.SupplierType`,
37
- title: `@${config.i18n}:suppliers.entities.supplier-type.title`,
38
- titlePlural: `@${config.i18n}:suppliers.entities.supplier-type.plural`,
39
- icon: 'fa-light fa-tags',
40
- },
41
- supplierSegment: {
42
- name: 'SupplierSegment',
43
- source: `${config.module}.SupplierSegment`,
44
- title: `@${config.i18n}:suppliers.entities.supplier-segment.title`,
45
- titlePlural: `@${config.i18n}:suppliers.entities.supplier-segment.plural`,
46
- icon: 'fa-light fa-chart-pie',
47
- },
48
34
  },
49
35
  };
50
36
 
@@ -85,20 +71,6 @@ const AXPSupplierManagementPermissionKeys = {
85
71
  Edit: 'SupplierManagement:Permission:Suppliers.Edit',
86
72
  Delete: 'SupplierManagement:Permission:Suppliers.Delete',
87
73
  },
88
- SupplierTypes: {
89
- Management: 'SupplierManagement:Permission:SupplierTypes.Management',
90
- View: 'SupplierManagement:Permission:SupplierTypes.View',
91
- Create: 'SupplierManagement:Permission:SupplierTypes.Create',
92
- Edit: 'SupplierManagement:Permission:SupplierTypes.Edit',
93
- Delete: 'SupplierManagement:Permission:SupplierTypes.Delete',
94
- },
95
- SupplierSegments: {
96
- Management: 'SupplierManagement:Permission:SupplierSegments.Management',
97
- View: 'SupplierManagement:Permission:SupplierSegments.View',
98
- Create: 'SupplierManagement:Permission:SupplierSegments.Create',
99
- Edit: 'SupplierManagement:Permission:SupplierSegments.Edit',
100
- Delete: 'SupplierManagement:Permission:SupplierSegments.Delete',
101
- },
102
74
  };
103
75
  //#endregion
104
76
 
@@ -123,18 +95,6 @@ class AXMSupplierManagementPermissionDefinitionProvider {
123
95
  .addChild(keys.Suppliers.Edit, await trans('suppliers.permissions.suppliers.actions.edit.title'))
124
96
  .addChild(keys.Suppliers.Delete, await trans('suppliers.permissions.suppliers.actions.delete.title'))
125
97
  .endPermission()
126
- .addPermission(keys.SupplierTypes.Management, await trans('suppliers.permissions.supplier-types.title'))
127
- .addChild(keys.SupplierTypes.View, await trans('suppliers.permissions.supplier-types.actions.view.title'))
128
- .addChild(keys.SupplierTypes.Create, await trans('suppliers.permissions.supplier-types.actions.create.title'))
129
- .addChild(keys.SupplierTypes.Edit, await trans('suppliers.permissions.supplier-types.actions.edit.title'))
130
- .addChild(keys.SupplierTypes.Delete, await trans('suppliers.permissions.supplier-types.actions.delete.title'))
131
- .endPermission()
132
- .addPermission(keys.SupplierSegments.Management, await trans('suppliers.permissions.supplier-segments.title'))
133
- .addChild(keys.SupplierSegments.View, await trans('suppliers.permissions.supplier-segments.actions.view.title'))
134
- .addChild(keys.SupplierSegments.Create, await trans('suppliers.permissions.supplier-segments.actions.create.title'))
135
- .addChild(keys.SupplierSegments.Edit, await trans('suppliers.permissions.supplier-segments.actions.edit.title'))
136
- .addChild(keys.SupplierSegments.Delete, await trans('suppliers.permissions.supplier-segments.actions.delete.title'))
137
- .endPermission()
138
98
  .endGroup();
139
99
  }
140
100
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMSupplierManagementPermissionDefinitionProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -147,8 +107,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
147
107
  const AXPSupplierManagementMenuKeys = {
148
108
  Root: 'SupplierManagement:Menu',
149
109
  Suppliers: 'SupplierManagement:Menu:Suppliers',
150
- SupplierTypes: 'SupplierManagement:Menu:SupplierTypes',
151
- SupplierSegments: 'SupplierManagement:Menu:SupplierSegments',
152
110
  };
153
111
 
154
112
  class AXMSupplierMenuProvider {
@@ -157,38 +115,17 @@ class AXMSupplierMenuProvider {
157
115
  }
158
116
  async provide(context) {
159
117
  const module = RootConfig.module;
160
- context.addItems([
118
+ // Add Suppliers under Contacts menu
119
+ context.find(AXPCommonMenuKeys.Contacts).addItems([
161
120
  {
162
- name: AXPSupplierManagementMenuKeys.Root,
163
- priority: 9004,
164
- text: '@supplier-management:module.menus.root.title',
165
- icon: module.icon,
121
+ name: AXPSupplierManagementMenuKeys.Suppliers,
122
+ text: '@supplier-management:suppliers.entities.supplier.plural',
123
+ path: this.entityService.createPath(module.name, RootConfig.entities.supplier.name),
124
+ icon: RootConfig.entities.supplier.icon,
125
+ priority: 3,
166
126
  policy: {
167
- features: [module.name],
127
+ permissions: [AXPSupplierManagementPermissionKeys.Suppliers.View],
168
128
  },
169
- children: [
170
- {
171
- name: AXPSupplierManagementMenuKeys.Suppliers,
172
- text: '@supplier-management:suppliers.entities.supplier.plural',
173
- path: this.entityService.createPath(module.name, RootConfig.entities.supplier.name),
174
- icon: RootConfig.entities.supplier.icon,
175
- priority: 1,
176
- },
177
- {
178
- name: AXPSupplierManagementMenuKeys.SupplierTypes,
179
- text: '@supplier-management:suppliers.entities.supplier-type.plural',
180
- path: this.entityService.createPath(module.name, RootConfig.entities.supplierType.name),
181
- icon: RootConfig.entities.supplierType.icon,
182
- priority: 6,
183
- },
184
- {
185
- name: AXPSupplierManagementMenuKeys.SupplierSegments,
186
- text: '@supplier-management:suppliers.entities.supplier-segment.plural',
187
- path: this.entityService.createPath(module.name, RootConfig.entities.supplierSegment.name),
188
- icon: RootConfig.entities.supplierSegment.icon,
189
- priority: 7,
190
- },
191
- ],
192
129
  },
193
130
  ]);
194
131
  }
@@ -210,10 +147,6 @@ class AXMSupplierManagementEntityProvider {
210
147
  switch (entityName) {
211
148
  case RootConfig.entities.supplier.name:
212
149
  return (await Promise.resolve().then(function () { return supplier_entity; })).supplierFactory(this.injector);
213
- case RootConfig.entities.supplierType.name:
214
- return (await Promise.resolve().then(function () { return supplierType_entity; })).supplierTypeFactory(this.injector);
215
- case RootConfig.entities.supplierSegment.name:
216
- return (await Promise.resolve().then(function () { return supplierSegment_entity; })).supplierSegmentFactory(this.injector);
217
150
  }
218
151
  }
219
152
  return null;
@@ -386,13 +319,13 @@ async function supplierFactory(injector) {
386
319
  interface: {
387
320
  type: AXPWidgetsList.Editors.LookupBox,
388
321
  options: {
389
- entity: `${RootConfig.module.name}.${RootConfig.entities.supplierType.name}`,
322
+ entity: 'BusinessCore.PartyType',
390
323
  textField: 'title',
391
324
  valueField: 'id',
392
325
  look: 'select',
393
326
  expose: [
394
- { source: 'id', target: 'supplierType.id' },
395
- { source: 'title', target: 'supplierType.title' },
327
+ { source: 'id', target: 'partyType.id' },
328
+ { source: 'title', target: 'partyType.title' },
396
329
  ],
397
330
  },
398
331
  },
@@ -408,13 +341,13 @@ async function supplierFactory(injector) {
408
341
  interface: {
409
342
  type: AXPWidgetsList.Editors.LookupBox,
410
343
  options: {
411
- entity: `${RootConfig.module.name}.${RootConfig.entities.supplierSegment.name}`,
344
+ entity: 'BusinessCore.PartySegment',
412
345
  textField: 'title',
413
346
  valueField: 'id',
414
347
  look: 'select',
415
348
  expose: [
416
- { source: 'id', target: 'segment.id' },
417
- { source: 'title', target: 'segment.title' },
349
+ { source: 'id', target: 'partySegment.id' },
350
+ { source: 'title', target: 'partySegment.title' },
418
351
  ],
419
352
  },
420
353
  },
@@ -528,8 +461,8 @@ async function supplierFactory(injector) {
528
461
  showAs: { type: AXPWidgetsCatalog.text },
529
462
  },
530
463
  { name: 'supplierCode' },
531
- { name: 'supplierTypeId', options: { dataPath: 'supplierType.title' } },
532
- { name: 'segmentId', options: { dataPath: 'segment.title' } },
464
+ { name: 'supplierTypeId', options: { dataPath: 'partyType.title' } },
465
+ { name: 'segmentId', options: { dataPath: 'partySegment.title' } },
533
466
  { name: 'since' },
534
467
  { name: 'isPreferred' },
535
468
  { name: 'rating' },
@@ -631,152 +564,9 @@ var supplier_entity = /*#__PURE__*/Object.freeze({
631
564
  supplierFactory: supplierFactory
632
565
  });
633
566
 
634
- async function supplierTypeFactory(injector) {
635
- const i18n = RootConfig.config.i18n + ':suppliers.entities.supplier-type';
636
- const entityName = 'supplier-type';
637
- const entityDef = {
638
- module: RootConfig.module.name,
639
- name: RootConfig.entities.supplierType.name,
640
- title: RootConfig.entities.supplierType.title,
641
- icon: RootConfig.entities.supplierType.icon,
642
- plugins: [
643
- { name: 'archive' },
644
- { name: 'clone' },
645
- ],
646
- formats: {
647
- individual: RootConfig.entities.supplierType.title,
648
- plural: RootConfig.entities.supplierType.titlePlural,
649
- searchResult: { title: '{{ title }}', description: RootConfig.module.title },
650
- },
651
- groups: [
652
- { id: 'basic-info', title: `@${i18n}.groups.basic-info` },
653
- { id: 'settings', title: '@general:terms.interface.settings' },
654
- ],
655
- properties: [
656
- {
657
- name: 'title',
658
- title: `@${i18n}.fields.title.title`,
659
- groupId: 'basic-info',
660
- schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text } },
661
- validations: [{ rule: 'required' }],
662
- },
663
- {
664
- name: 'description',
665
- title: `@${i18n}.fields.description.title`,
666
- groupId: 'basic-info',
667
- schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } } },
668
- },
669
- ],
670
- columns: [{ name: 'title' }, { name: 'description' }],
671
- interfaces: {
672
- master: {
673
- create: {
674
- sections: [{ id: 'basic-info' }, { id: 'settings' }],
675
- properties: [
676
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
677
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
678
- ],
679
- },
680
- update: {
681
- sections: [{ id: 'basic-info' }, { id: 'settings' }],
682
- properties: [
683
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
684
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
685
- ],
686
- },
687
- single: {
688
- title: '{{title}}',
689
- sections: [
690
- { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },
691
- { id: 'settings', layout: { positions: { lg: { colSpan: 12 } } } },
692
- ],
693
- properties: [
694
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
695
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
696
- ],
697
- actions: [entityMasterDeleteAction()],
698
- },
699
- list: {
700
- actions: [...entityMasterCrudActions()],
701
- views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
702
- },
703
- },
704
- },
705
- };
706
- return entityDef;
707
- }
708
-
709
- var supplierType_entity = /*#__PURE__*/Object.freeze({
710
- __proto__: null,
711
- supplierTypeFactory: supplierTypeFactory
712
- });
713
-
714
- async function supplierSegmentFactory(injector) {
715
- const i18n = RootConfig.config.i18n + ':suppliers.entities.supplier-segment';
716
- const entityName = 'supplier-segment';
717
- const entityDef = {
718
- module: RootConfig.module.name,
719
- name: RootConfig.entities.supplierSegment.name,
720
- title: RootConfig.entities.supplierSegment.title,
721
- icon: RootConfig.entities.supplierSegment.icon,
722
- formats: {
723
- individual: RootConfig.entities.supplierSegment.title,
724
- plural: RootConfig.entities.supplierSegment.titlePlural,
725
- searchResult: { title: '{{ title }}', description: RootConfig.module.title },
726
- },
727
- plugins: [{ name: 'color' }, { name: 'archive' }],
728
- groups: [
729
- { id: 'basic-info', title: `@${i18n}.groups.basic-info` },
730
- { id: 'appearance', title: '@general:terms.interface.appearance' }
731
- ],
732
- properties: [
733
- { name: 'title', title: `@${i18n}.fields.title.title`, groupId: 'basic-info', schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text } }, validations: [{ rule: 'required' }] },
734
- { name: 'description', title: `@${i18n}.fields.description.title`, groupId: 'basic-info', schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } } } },
735
- ],
736
- columns: [{ name: 'title' }, { name: 'description' }],
737
- interfaces: {
738
- master: {
739
- create: {
740
- sections: [{ id: 'basic-info' }],
741
- properties: [
742
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
743
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
744
- ],
745
- },
746
- update: {
747
- sections: [{ id: 'basic-info' }],
748
- properties: [
749
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
750
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
751
- ],
752
- },
753
- single: {
754
- title: '{{title}}',
755
- sections: [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }],
756
- properties: [
757
- { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
758
- { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
759
- ],
760
- actions: [entityMasterDeleteAction()],
761
- },
762
- list: {
763
- actions: [...entityMasterCrudActions()],
764
- views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
765
- },
766
- },
767
- },
768
- };
769
- return entityDef;
770
- }
771
-
772
- var supplierSegment_entity = /*#__PURE__*/Object.freeze({
773
- __proto__: null,
774
- supplierSegmentFactory: supplierSegmentFactory
775
- });
776
-
777
567
  /**
778
568
  * Generated bundle index. Do not edit.
779
569
  */
780
570
 
781
- export { AXMSupplierManagementEntityProvider, AXMSupplierManagementModule, AXMSupplierManagementPermissionDefinitionProvider, AXMSupplierMenuProvider, AXPSupplierManagementMenuKeys, AXPSupplierManagementPermissionKeys, RootConfig, supplierFactory, supplierSegmentFactory, supplierTypeFactory };
571
+ export { AXMSupplierManagementEntityProvider, AXMSupplierManagementModule, AXMSupplierManagementPermissionDefinitionProvider, AXMSupplierMenuProvider, AXPSupplierManagementMenuKeys, AXPSupplierManagementPermissionKeys, RootConfig, supplierFactory };
782
572
  //# sourceMappingURL=acorex-modules-supplier-management.mjs.map