@acorex/platform 19.2.10 → 19.2.11

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 (34) hide show
  1. package/common/lib/settings/settings.service.d.ts +1 -0
  2. package/fesm2022/acorex-platform-common.mjs +23 -3
  3. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  4. package/fesm2022/acorex-platform-layout-builder.mjs +5 -2
  5. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-layout-entity.mjs +57 -22
  7. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  8. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs → acorex-platform-themes-default-entity-master-list-view.component-7KY7G6qo.mjs} +6 -18
  9. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-7KY7G6qo.mjs.map +1 -0
  10. package/fesm2022/acorex-platform-themes-default.mjs +3 -3
  11. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-widgets.mjs +478 -364
  13. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  14. package/layout/builder/lib/builder/widget-column-renderer.d.ts +2 -1
  15. package/layout/builder/lib/builder/widget-map.d.ts +1 -0
  16. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +2 -2
  17. package/layout/entity/lib/entity.viewmodel.d.ts +1 -0
  18. package/package.json +9 -9
  19. package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +9 -7
  20. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +22 -15
  21. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +4 -12
  22. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget-edit.component.d.ts +29 -1
  23. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +7 -3
  24. package/widgets/lib/widgets/charts/sticky-note/index.d.ts +2 -0
  25. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget-edit.component.d.ts +9 -0
  26. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.config.d.ts +7 -0
  27. package/widgets/lib/widgets/editors/tabular-data/index.d.ts +3 -3
  28. package/widgets/lib/widgets/editors/tabular-data/{table-widget-column.component.d.ts → tabular-data-column.component.d.ts} +3 -3
  29. package/widgets/lib/widgets/editors/tabular-data/tabular-data-filter.component.d.ts +6 -0
  30. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +3 -3
  31. package/widgets/lib/widgets/editors/tabular-data/{table-widget-print.component.d.ts → tabular-data-widget-print.component.d.ts} +3 -3
  32. package/widgets/lib/widgets/index.d.ts +2 -0
  33. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs.map +0 -1
  34. package/widgets/lib/widgets/editors/tabular-data/table-widget-filter.component.d.ts +0 -6
@@ -2,7 +2,7 @@ import * as i2$1 from '@acorex/components/common';
2
2
  import { AXDataSource, AXCommonModule } from '@acorex/components/common';
3
3
  import { AXFormatService } from '@acorex/core/format';
4
4
  import * as i1$3 from '@acorex/platform/common';
5
- import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPExpressionEvaluatorService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
5
+ import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPExpressionEvaluatorService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPSettingScope, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
6
6
  import * as i2$3 from '@acorex/platform/workflow';
7
7
  import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
8
8
  import * as i0 from '@angular/core';
@@ -603,12 +603,10 @@ class AXPEntityMasterListViewQueryViewModel {
603
603
  }
604
604
  class AXPEntityMasterListViewModel {
605
605
  async setView(viewName = null) {
606
- this.settingSelectedViewKey = `${this.config.module}:${this.config.name}:selected-view`;
607
- const savedViewName = await this.settings.get(this.settingSelectedViewKey);
608
- // this.settings.set()
606
+ const entitySetting = await this.settings.get(this.settingEntityKey);
607
+ const selectedViewName = entitySetting?.list?.currentView;
609
608
  if (viewName != this.view().name) {
610
- this.view.set(this.views().find((c) => c.name == (viewName || savedViewName)) ?? this.views()[0]);
611
- this.settings.scope(AXPSettingScope.User).set(this.settingSelectedViewKey, this.view().name);
609
+ this.view.set(this.views().find((c) => c.name == (viewName || selectedViewName)) ?? this.views()[0]);
612
610
  this.applyViewSorts();
613
611
  this.applyViewColumns();
614
612
  this.applyViewFilters();
@@ -628,8 +626,7 @@ class AXPEntityMasterListViewModel {
628
626
  this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
629
627
  this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
630
628
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
631
- this.settingListViewKey = '';
632
- this.settingSelectedViewKey = '';
629
+ this.settingEntityKey = `${this.config.module}:${this.config.name}`;
633
630
  this.destroyed = new Subject();
634
631
  this.events$ = new Subject();
635
632
  //****************** Views ******************//
@@ -784,14 +781,58 @@ class AXPEntityMasterListViewModel {
784
781
  this.sortedFields.set(this.sortableFields());
785
782
  }
786
783
  async applySettings() {
787
- this.settingListViewKey = `${this.config.module}:${this.config.name}:list-view:${this.view().name}`;
788
- const listViewSetting = await this.settings.get(this.settingListViewKey);
784
+ this.saveSettings('view');
785
+ const listViewSetting = await this.settings.get(this.settingEntityKey);
789
786
  if (listViewSetting) {
790
- const columnVisibilityMap = new Map(listViewSetting.columns.map((col) => [col.name, col.visible]));
787
+ const columns = listViewSetting.list.views[this.view().name].columns;
788
+ const columnVisibilityMap = new Map(columns.map((col) => [col.name, col.visible]));
789
+ const columnWidthsMap = new Map(columns.map((col) => [col.name, col.width]));
791
790
  this.columns.update((prev) => prev
792
- .map((c) => ({ ...c, visible: columnVisibilityMap.get(c.name) ?? c.visible })) // Update visibility
793
- .sort((a, b) => listViewSetting.columns.findIndex((col) => col.name === a.name) -
794
- listViewSetting.columns.findIndex((col) => col.name === b.name)));
791
+ .map((c) => {
792
+ return { ...c, width: columnWidthsMap.get(c.name), visible: columnVisibilityMap.get(c.name) ?? c.visible };
793
+ }) // Update visibility
794
+ .sort((a, b) => columns.findIndex((col) => col.name === a.name) -
795
+ columns.findIndex((col) => col.name === b.name)));
796
+ }
797
+ }
798
+ async saveSettings(changesType, data) {
799
+ const updateSettings = (updateFn) => {
800
+ this.settings.scope(AXPSettingScope.User).update(this.settingEntityKey, updateFn);
801
+ };
802
+ switch (changesType) {
803
+ case 'columnSizes':
804
+ updateSettings((prev) => {
805
+ const field = data.dataField.split('-')[1];
806
+ const newSettings = { ...prev };
807
+ set(newSettings, `list.views.${this.view().name}.columns`, prev?.list?.views?.[this.view().name]?.columns?.map((c) => ({
808
+ ...c,
809
+ width: c.name === field ? data.width : c.width,
810
+ })));
811
+ return newSettings;
812
+ });
813
+ break;
814
+ case 'columnOrders':
815
+ updateSettings((prev) => {
816
+ const newSettings = { ...prev };
817
+ set(newSettings, `list.views.${this.view().name}.columns`, data.map((c) => ({
818
+ name: c.name,
819
+ visible: c.visible,
820
+ width: c.width,
821
+ })));
822
+ return newSettings;
823
+ });
824
+ break;
825
+ case 'view':
826
+ updateSettings((prev) => ({
827
+ ...prev,
828
+ list: {
829
+ ...prev?.list,
830
+ currentView: this.view().name,
831
+ },
832
+ }));
833
+ break;
834
+ default:
835
+ break;
795
836
  }
796
837
  }
797
838
  clearSelection() {
@@ -936,13 +977,7 @@ class AXPEntityMasterListViewModel {
936
977
  this.applyViewColumns();
937
978
  }
938
979
  async onColumnsChanged(columns) {
939
- const listViewSetting = await this.settings.get(this.settingListViewKey);
940
- if (this.settingListViewKey) {
941
- this.settings.scope(AXPSettingScope.User).set(this.settingListViewKey, {
942
- ...listViewSetting,
943
- columns: columns.map((c) => ({ name: c.name, visible: c.visible })),
944
- });
945
- }
980
+ this.saveSettings('columnOrders', columns);
946
981
  }
947
982
  applyViewColumns() {
948
983
  const cols = this.view().columns;
@@ -1851,7 +1886,7 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
1851
1886
  }
1852
1887
  </ax-suffix>
1853
1888
  </ax-footer>
1854
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i2$1.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i5.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i7.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1889
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i2$1.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i5.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i7.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1855
1890
  }
1856
1891
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
1857
1892
  type: Component,