@acorex/platform 19.2.10 → 19.2.12

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 (58) hide show
  1. package/common/index.d.ts +1 -0
  2. package/common/lib/file-type/file-type.provider.d.ts +14 -0
  3. package/common/lib/file-type/file-type.types.d.ts +44 -0
  4. package/common/lib/file-type/index.d.ts +2 -0
  5. package/common/lib/settings/settings.service.d.ts +1 -0
  6. package/fesm2022/acorex-platform-common.mjs +49 -4
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-layout-builder.mjs +7 -2
  9. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-designer.mjs +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-entity.mjs +57 -22
  13. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  14. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs → acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs} +6 -18
  15. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs.map +1 -0
  16. package/fesm2022/{acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs → acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs} +2 -2
  17. package/fesm2022/{acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs.map → acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs.map} +1 -1
  18. package/fesm2022/{acorex-platform-themes-default-setting-page.component-DYumYm5k.mjs → acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs} +2 -2
  19. package/fesm2022/{acorex-platform-themes-default-setting-page.component-DYumYm5k.mjs.map → acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs.map} +1 -1
  20. package/fesm2022/acorex-platform-themes-default.mjs +7 -7
  21. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  22. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-2iWPztWW.mjs → acorex-platform-widgets-button-widget-designer.component-BWhqDxGH.mjs} +3 -3
  23. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-BWhqDxGH.mjs.map +1 -0
  24. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs} +2 -2
  25. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs.map} +1 -1
  26. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-BaslkAPS.mjs → acorex-platform-widgets-tabular-data-view-popup.component-Ca6Cwzez.mjs} +2 -2
  27. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-BaslkAPS.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-Ca6Cwzez.mjs.map} +1 -1
  28. package/fesm2022/acorex-platform-widgets.mjs +511 -669
  29. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  30. package/layout/builder/lib/builder/index.d.ts +3 -2
  31. package/layout/builder/lib/builder/metadata/index.d.ts +1 -0
  32. package/layout/builder/lib/builder/metadata/metadata.types.d.ts +6 -0
  33. package/layout/builder/lib/builder/widget-column-renderer.d.ts +2 -1
  34. package/layout/builder/lib/builder/widget-map.d.ts +1 -0
  35. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +2 -2
  36. package/layout/entity/lib/entity.viewmodel.d.ts +1 -0
  37. package/package.json +9 -9
  38. package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +9 -7
  39. package/widgets/lib/widgets/advance/gallery/index.d.ts +0 -3
  40. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +22 -15
  41. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +4 -12
  42. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget-edit.component.d.ts +29 -1
  43. package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +7 -3
  44. package/widgets/lib/widgets/charts/sticky-note/index.d.ts +2 -0
  45. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget-edit.component.d.ts +9 -0
  46. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.config.d.ts +7 -0
  47. package/widgets/lib/widgets/editors/tabular-data/index.d.ts +3 -3
  48. package/widgets/lib/widgets/editors/tabular-data/{table-widget-column.component.d.ts → tabular-data-column.component.d.ts} +3 -3
  49. package/widgets/lib/widgets/editors/tabular-data/tabular-data-filter.component.d.ts +6 -0
  50. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +3 -3
  51. package/widgets/lib/widgets/editors/tabular-data/{table-widget-print.component.d.ts → tabular-data-widget-print.component.d.ts} +3 -3
  52. package/widgets/lib/widgets/index.d.ts +2 -0
  53. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs.map +0 -1
  54. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-2iWPztWW.mjs.map +0 -1
  55. package/widgets/lib/widgets/advance/gallery/gallery-widget-column.component.d.ts +0 -6
  56. package/widgets/lib/widgets/advance/gallery/gallery-widget-edit.component.d.ts +0 -16
  57. package/widgets/lib/widgets/advance/gallery/gallery-widget-filter.component.d.ts +0 -6
  58. 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", "onPageChanged"] }, { 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", "type"], 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,