@acorex/platform 19.1.13 → 19.1.14
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/common.module.d.ts +2 -1
- package/fesm2022/acorex-platform-common.mjs +18 -7
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +48 -3
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-filters.mjs +46 -4
- package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs → acorex-platform-themes-default-entity-master-list-view.component-CWnQBjEa.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CWnQBjEa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2 -2
- package/fesm2022/acorex-platform-widgets.mjs +130 -62
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -3
- package/layout/filters/lib/filters.viewmodel.d.ts +1 -0
- package/package.json +1 -1
- package/widgets/lib/widgets/filters/boolean-filter/boolean-filter-widget-edit.component.d.ts +2 -1
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +10 -8
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-types.component.d.ts +10 -0
- package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +2 -2
- package/widgets/lib/widgets/property-editors/advanced-grid-options/advanced-grid-options-widget-editor.component.d.ts +4 -4
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +2 -2
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs.map +0 -1
|
@@ -756,13 +756,38 @@ class AXPEntityMasterListViewModel {
|
|
|
756
756
|
};
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
|
|
759
|
+
// const viewFilters = this.view().conditions.map((f) => ({
|
|
760
|
+
// field: f.name,
|
|
761
|
+
// operator: f.operator,
|
|
762
|
+
// value: f.value,
|
|
763
|
+
// }));
|
|
764
|
+
async applyViewFilters() {
|
|
760
765
|
const viewFilters = this.view().conditions.map((f) => ({
|
|
761
766
|
field: f.name,
|
|
762
767
|
operator: f.operator,
|
|
763
768
|
value: f.value,
|
|
764
769
|
}));
|
|
770
|
+
// console.log('this.view().conditions: ', this.view().conditions);
|
|
771
|
+
// console.log('this.filtersDef: ', this.filtersDef);
|
|
772
|
+
// let viewFilters: AXPFilterQuery[] = [];
|
|
773
|
+
// await this.filtersDef.forEach((filter) => {
|
|
774
|
+
// viewFilters.push({
|
|
775
|
+
// field: filter.field,
|
|
776
|
+
// operator: filter.operator,
|
|
777
|
+
// value: filter.value,
|
|
778
|
+
// });
|
|
779
|
+
// });
|
|
780
|
+
// await this.view().conditions.map((f) => {
|
|
781
|
+
// let viewFilter = viewFilters.find((el) => el.field === f.name) as AXPFilterQuery;
|
|
782
|
+
// viewFilter = {
|
|
783
|
+
// ...viewFilter,
|
|
784
|
+
// value: f.value,
|
|
785
|
+
// operator: f.operator,
|
|
786
|
+
// };
|
|
787
|
+
// });
|
|
788
|
+
// console.log('viewFilters: ', viewFilters);
|
|
765
789
|
this.simpleFilters.update((prev) => ({ ...prev, filters: viewFilters }));
|
|
790
|
+
// console.log('this.simpleFilters(): ', this.simpleFilters());
|
|
766
791
|
}
|
|
767
792
|
resetFilters() {
|
|
768
793
|
this.applyViewFilters();
|
|
@@ -786,7 +811,7 @@ class AXPEntityMasterListViewModel {
|
|
|
786
811
|
}
|
|
787
812
|
this.applyFilterAndSort();
|
|
788
813
|
}
|
|
789
|
-
applyFilterAndSort() {
|
|
814
|
+
async applyFilterAndSort() {
|
|
790
815
|
this.dataSource.clearFilter();
|
|
791
816
|
this.dataSource.sort(...this.sortedFields()
|
|
792
817
|
.filter((sf) => sf.dir)
|
|
@@ -795,15 +820,35 @@ class AXPEntityMasterListViewModel {
|
|
|
795
820
|
this.inlineFilters.filters?.length && this.inlineFilters,
|
|
796
821
|
this.simpleFilters().filters?.length && this.simpleFilters(),
|
|
797
822
|
].filter(Boolean);
|
|
823
|
+
const cleanedAllFilters = this.cleanNestedFilters(allFilters);
|
|
798
824
|
this.lastFiltersApplied.set(this.simpleFilters());
|
|
799
825
|
this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
|
|
800
826
|
field: null,
|
|
801
827
|
logic: 'and',
|
|
802
828
|
operator: null,
|
|
803
|
-
filters:
|
|
829
|
+
filters: cleanedAllFilters,
|
|
804
830
|
}));
|
|
805
831
|
this.dataSource.refresh();
|
|
806
832
|
}
|
|
833
|
+
cleanNestedFilters(filters) {
|
|
834
|
+
return filters
|
|
835
|
+
.map((filter) => {
|
|
836
|
+
if (!filter)
|
|
837
|
+
return undefined;
|
|
838
|
+
if (filter.filters?.length) {
|
|
839
|
+
const cleanedNestedFilters = this.cleanNestedFilters(filter.filters);
|
|
840
|
+
return {
|
|
841
|
+
...filter,
|
|
842
|
+
filters: cleanedNestedFilters.filter(Boolean),
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
if (filter.value === null || filter.value === undefined || filter.value === 'unknown') {
|
|
846
|
+
return undefined;
|
|
847
|
+
}
|
|
848
|
+
return filter;
|
|
849
|
+
})
|
|
850
|
+
.filter(Boolean);
|
|
851
|
+
}
|
|
807
852
|
resetColumns() {
|
|
808
853
|
this.applyViewColumns();
|
|
809
854
|
}
|