@acorex/platform 19.2.3 → 19.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/lib/search/search-definition.builder.d.ts +1 -1
- package/common/lib/search/search-definition.provider.d.ts +1 -0
- package/common/lib/search/search.types.d.ts +1 -0
- package/core/lib/types.d.ts +2 -2
- package/fesm2022/acorex-platform-common.mjs +12 -20
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +23 -7
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +39 -64
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-Cet1sYXJ.mjs → acorex-platform-themes-default-theme-palette-preview.page-C3RJdApv.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-C3RJdApv.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +1215 -38
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-groups.d.ts +2 -1
- package/layout/builder/lib/builder/widget-map.d.ts +9 -0
- package/layout/builder/lib/builder/widget.types.d.ts +1 -1
- package/package.json +5 -5
- package/widgets/lib/properties/groups.d.ts +2 -1
- package/widgets/lib/properties/validation.props.d.ts +10 -0
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/index.d.ts +9 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +0 -1
- package/widgets/lib/widgets/validations/base-validation/base-validation.component.d.ts +13 -0
- package/widgets/lib/widgets/validations/base-validation/base-validation.d.ts +8 -0
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +25 -0
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/between-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/callback-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/equal-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +24 -0
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/greater-than-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/less-than-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +24 -0
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/max-length-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/min-length-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +23 -0
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/validations/required-validation/index.d.ts +2 -0
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +21 -0
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget.config.d.ts +7 -0
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-Cet1sYXJ.mjs.map +0 -1
|
@@ -312,7 +312,9 @@ class AXPEntityDefinitionRegistryService {
|
|
|
312
312
|
this.entityResolver = inject(AXPEntityResolver); // Assuming AXPEntityLoader is the correct type
|
|
313
313
|
}
|
|
314
314
|
async preload() {
|
|
315
|
-
const providers = Array.isArray(this.providers)
|
|
315
|
+
const providers = Array.isArray(this.providers)
|
|
316
|
+
? this.providers
|
|
317
|
+
: [this.providers];
|
|
316
318
|
const promises = [];
|
|
317
319
|
providers.forEach((provider) => {
|
|
318
320
|
const items = typeof provider.preload == 'function' ? provider.preload() : [];
|
|
@@ -321,7 +323,10 @@ class AXPEntityDefinitionRegistryService {
|
|
|
321
323
|
});
|
|
322
324
|
});
|
|
323
325
|
const entities = await Promise.all(promises);
|
|
324
|
-
entities.forEach((entity) =>
|
|
326
|
+
entities.forEach((entity) => {
|
|
327
|
+
if (entity != null)
|
|
328
|
+
this.register(this.middleware.process(entity));
|
|
329
|
+
});
|
|
325
330
|
}
|
|
326
331
|
/**
|
|
327
332
|
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
@@ -632,14 +637,7 @@ class AXPEntityMasterListViewModel {
|
|
|
632
637
|
},
|
|
633
638
|
{
|
|
634
639
|
title: this.title(),
|
|
635
|
-
url: [
|
|
636
|
-
`/${this.session.application?.name}`,
|
|
637
|
-
'm',
|
|
638
|
-
`${this.entityDef.module}`,
|
|
639
|
-
'e',
|
|
640
|
-
`${this.entityDef.name}`,
|
|
641
|
-
'list',
|
|
642
|
-
],
|
|
640
|
+
url: [`/${this.session.application?.name}`, 'm', `${this.entityDef.module}`, 'e', `${this.entityDef.name}`, 'list'],
|
|
643
641
|
},
|
|
644
642
|
];
|
|
645
643
|
});
|
|
@@ -649,14 +647,10 @@ class AXPEntityMasterListViewModel {
|
|
|
649
647
|
return list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
|
|
650
648
|
});
|
|
651
649
|
this.primaryActions = computed(() => {
|
|
652
|
-
return this.allActions().filter((a) => a.priority == 'primary' &&
|
|
653
|
-
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
654
|
-
(a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
|
|
650
|
+
return this.allActions().filter((a) => a.priority == 'primary' && ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) || (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
|
|
655
651
|
});
|
|
656
652
|
this.secondaryActions = computed(() => {
|
|
657
|
-
return this.allActions().filter((a) => a.priority == 'secondary' &&
|
|
658
|
-
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
659
|
-
(a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
|
|
653
|
+
return this.allActions().filter((a) => a.priority == 'secondary' && ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) || (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
|
|
660
654
|
});
|
|
661
655
|
this.selectedScopeActionsCount = computed(() => {
|
|
662
656
|
return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Selected).length;
|
|
@@ -739,8 +733,7 @@ class AXPEntityMasterListViewModel {
|
|
|
739
733
|
const columnVisibilityMap = new Map(listViewSetting.columns.map((col) => [col.name, col.visible]));
|
|
740
734
|
this.columns.update((prev) => prev
|
|
741
735
|
.map((c) => ({ ...c, visible: columnVisibilityMap.get(c.name) ?? c.visible })) // Update visibility
|
|
742
|
-
.sort((a, b) => listViewSetting.columns.findIndex((col) => col.name === a.name) -
|
|
743
|
-
listViewSetting.columns.findIndex((col) => col.name === b.name)));
|
|
736
|
+
.sort((a, b) => listViewSetting.columns.findIndex((col) => col.name === a.name) - listViewSetting.columns.findIndex((col) => col.name === b.name)));
|
|
744
737
|
}
|
|
745
738
|
}
|
|
746
739
|
clearSelection() {
|
|
@@ -750,9 +743,7 @@ class AXPEntityMasterListViewModel {
|
|
|
750
743
|
const props = this.entityDef.properties.filter((c) => c.options?.filter?.advance?.enabled);
|
|
751
744
|
return props.map((e) => {
|
|
752
745
|
const widgetConfig = this.widgetResolver.resolve(e.schema.interface?.type);
|
|
753
|
-
const type = (e.options?.filter?.advance?.widgetType ||
|
|
754
|
-
widgetConfig?.defaultFilterWidgetName ||
|
|
755
|
-
e.schema.interface?.type);
|
|
746
|
+
const type = (e.options?.filter?.advance?.widgetType || widgetConfig?.defaultFilterWidgetName || e.schema.interface?.type);
|
|
756
747
|
return {
|
|
757
748
|
title: e.title,
|
|
758
749
|
field: e.name,
|
|
@@ -825,10 +816,7 @@ class AXPEntityMasterListViewModel {
|
|
|
825
816
|
this.dataSource.sort(...this.sortedFields()
|
|
826
817
|
.filter((sf) => sf.dir)
|
|
827
818
|
.map((s) => ({ dir: s.dir, field: s.name })));
|
|
828
|
-
const allFilters = [
|
|
829
|
-
this.inlineFilters.filters?.length && this.inlineFilters,
|
|
830
|
-
this.simpleFilters().filters?.length && this.simpleFilters(),
|
|
831
|
-
].filter(Boolean);
|
|
819
|
+
const allFilters = [this.inlineFilters.filters?.length && this.inlineFilters, this.simpleFilters().filters?.length && this.simpleFilters()].filter(Boolean);
|
|
832
820
|
const cleanedAllFilters = this.cleanNestedFilters(allFilters);
|
|
833
821
|
this.lastFiltersApplied.set(this.simpleFilters());
|
|
834
822
|
this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
|
|
@@ -846,6 +834,9 @@ class AXPEntityMasterListViewModel {
|
|
|
846
834
|
return undefined;
|
|
847
835
|
if (filter.filters?.length) {
|
|
848
836
|
const cleanedNestedFilters = this.cleanNestedFilters(filter.filters);
|
|
837
|
+
if (!filter.field && !filter.operator && cleanedNestedFilters.length === 0) {
|
|
838
|
+
return undefined;
|
|
839
|
+
}
|
|
849
840
|
return {
|
|
850
841
|
...filter,
|
|
851
842
|
filters: cleanedNestedFilters.filter(Boolean),
|
|
@@ -911,11 +902,7 @@ class AXPEntityMasterListViewModel {
|
|
|
911
902
|
}
|
|
912
903
|
//****************** Commands ******************//
|
|
913
904
|
async executeCommand(commandName, data = null) {
|
|
914
|
-
const action = this.allActions().find((c) => c.name == commandName &&
|
|
915
|
-
((this.selectedItems().length
|
|
916
|
-
? c.scope == AXPEntityCommandScope.Selected
|
|
917
|
-
: c.scope == AXPEntityCommandScope.Individual) ||
|
|
918
|
-
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
905
|
+
const action = this.allActions().find((c) => c.name == commandName && ((this.selectedItems().length ? c.scope == AXPEntityCommandScope.Selected : c.scope == AXPEntityCommandScope.Individual) || c.scope == AXPEntityCommandScope.TypeLevel));
|
|
919
906
|
await this.workflow.execute(commandName, {
|
|
920
907
|
entity: getEntityInfo(this.entityDef).source,
|
|
921
908
|
entityInfo: {
|
|
@@ -1509,7 +1496,7 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
|
|
|
1509
1496
|
|
|
1510
1497
|
class AXPEntityCommandSearchDefinitionProvider {
|
|
1511
1498
|
async provide(context) {
|
|
1512
|
-
context.addDefinition('command', 'Commands', 'fa-solid fa-command', 1, {
|
|
1499
|
+
context.addDefinition('command', 'Commands', 'command', 'fa-solid fa-command', 1, {
|
|
1513
1500
|
format: {
|
|
1514
1501
|
id: '{{id}}',
|
|
1515
1502
|
},
|
|
@@ -1529,33 +1516,21 @@ class AXPEntitySearchDefinitionProvider {
|
|
|
1529
1516
|
this.entityRegister = inject(AXPEntityDefinitionRegistryService);
|
|
1530
1517
|
}
|
|
1531
1518
|
async provide(context) {
|
|
1532
|
-
|
|
1519
|
+
console.log(this.entityRegister.getAll());
|
|
1533
1520
|
this.entityRegister.getAll().forEach((entity) => {
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
actions: [
|
|
1541
|
-
{
|
|
1542
|
-
name: 'open-entity',
|
|
1543
|
-
type: 'view',
|
|
1544
|
-
priority: 'primary',
|
|
1545
|
-
},
|
|
1546
|
-
],
|
|
1547
|
-
format: {
|
|
1548
|
-
title: entity.formats.searchResult?.title,
|
|
1549
|
-
description: (entity.formats.searchResult?.description ?? entity.module) + ' / ' + entity.title,
|
|
1550
|
-
id: '{{data.id}}',
|
|
1521
|
+
context.addDefinition(`Module.${entity.module}.${entity.name}`, entity.formats.searchResult?.description ?? entity.module, `Module.${entity.module}`, 'fa-solid fa-objects-column', 4, {
|
|
1522
|
+
actions: [
|
|
1523
|
+
{
|
|
1524
|
+
name: 'open-entity',
|
|
1525
|
+
type: 'view',
|
|
1526
|
+
priority: 'primary',
|
|
1551
1527
|
},
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
actions: definition.actions,
|
|
1528
|
+
],
|
|
1529
|
+
format: {
|
|
1530
|
+
title: entity.formats.searchResult?.title,
|
|
1531
|
+
description: (entity.formats.searchResult?.description ?? entity.module) + ' / ' + entity.title,
|
|
1532
|
+
id: '{{data.id}}',
|
|
1533
|
+
},
|
|
1559
1534
|
});
|
|
1560
1535
|
});
|
|
1561
1536
|
}
|
|
@@ -2772,14 +2747,14 @@ function routesFacory() {
|
|
|
2772
2747
|
class AXPEntityModule {
|
|
2773
2748
|
constructor(appInitService, injector) {
|
|
2774
2749
|
const service = injector.get(AXPEntityDefinitionRegistryService);
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2750
|
+
appInitService.registerTask({
|
|
2751
|
+
name: 'layout-theme',
|
|
2752
|
+
statusText: 'Preload entities ...',
|
|
2753
|
+
run: async () => {
|
|
2754
|
+
// load in background
|
|
2755
|
+
service.preload();
|
|
2756
|
+
},
|
|
2757
|
+
});
|
|
2783
2758
|
}
|
|
2784
2759
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$3.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2785
2760
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$3.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
|