@acorex/platform 19.2.5 → 19.2.7

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 (100) hide show
  1. package/common/lib/app/application.types.d.ts +3 -1
  2. package/common/lib/settings/settings.service.d.ts +3 -2
  3. package/common/lib/utils/export-popup.d.ts +2 -1
  4. package/common/lib/utils/expression-evaluator.service.d.ts +11 -0
  5. package/common/lib/utils/index.d.ts +1 -0
  6. package/common/lib/workflows/common.workflow.d.ts +2 -0
  7. package/fesm2022/acorex-platform-common.mjs +86 -28
  8. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-builder.mjs +26 -12
  10. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs +14 -14
  12. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-entity.mjs +92 -18
  14. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  15. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-CgyBuwTc.mjs → acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs} +3 -3
  16. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs +389 -0
  18. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs +130 -0
  20. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-themes-default-error-401.component-BPQ1z42t.mjs → acorex-platform-themes-default-error-401.component-Brx-zHqH.mjs} +3 -3
  22. package/fesm2022/{acorex-platform-themes-default-error-401.component-BPQ1z42t.mjs.map → acorex-platform-themes-default-error-401.component-Brx-zHqH.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-themes-default-error-404.component-CGgD5C7q.mjs → acorex-platform-themes-default-error-404.component-C8mJP9D8.mjs} +3 -3
  24. package/fesm2022/{acorex-platform-themes-default-error-404.component-CGgD5C7q.mjs.map → acorex-platform-themes-default-error-404.component-C8mJP9D8.mjs.map} +1 -1
  25. package/fesm2022/{acorex-platform-themes-default-error-offline.component-CkVGS1HQ.mjs → acorex-platform-themes-default-error-offline.component-CwBClgcf.mjs} +3 -3
  26. package/fesm2022/{acorex-platform-themes-default-error-offline.component-CkVGS1HQ.mjs.map → acorex-platform-themes-default-error-offline.component-CwBClgcf.mjs.map} +1 -1
  27. package/fesm2022/acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs +129 -0
  28. package/fesm2022/{acorex-platform-themes-default-search-popup.component-DZHRY0aM.mjs.map → acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs.map} +1 -1
  29. package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs +74 -0
  30. package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs +71 -0
  32. package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs +138 -0
  34. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-themes-default.mjs +36 -29
  36. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  37. package/fesm2022/acorex-platform-themes-shared.mjs +114 -56
  38. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  39. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs +144 -0
  40. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs +48 -0
  42. package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-widgets.mjs +586 -109
  44. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  45. package/layout/builder/lib/builder/widget-column-renderer.d.ts +3 -1
  46. package/layout/builder/lib/builder/widget-groups.d.ts +1 -0
  47. package/layout/builder/lib/builder/widget-map.d.ts +3 -0
  48. package/layout/builder/lib/builder/widget.types.d.ts +1 -1
  49. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +3 -1
  50. package/layout/entity/lib/entity.viewmodel.d.ts +2 -0
  51. package/layout/setting/lib/setting.viewmodel.d.ts +2 -2
  52. package/package.json +5 -5
  53. package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +4 -3
  54. package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +2 -2
  55. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +4 -4
  56. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +2 -2
  57. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +2 -2
  58. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +2 -2
  59. package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +2 -2
  60. package/themes/default/lib/pages/theme-palette-preview/theme-palette-preview.page.d.ts +3 -2
  61. package/themes/shared/lib/components/layout-elements/index.d.ts +1 -0
  62. package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
  63. package/themes/shared/lib/components/layout-elements/layout-footer.component.d.ts +5 -0
  64. package/themes/shared/lib/components/slots/theme-slot.component.d.ts +2 -2
  65. package/themes/shared/lib/palette.provider.d.ts +2 -2
  66. package/themes/shared/lib/theme.service.d.ts +2 -2
  67. package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +7 -2
  68. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +13 -0
  69. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.config.d.ts +7 -0
  70. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +15 -0
  71. package/widgets/lib/widgets/charts/bar-chart/index.d.ts +2 -0
  72. package/widgets/lib/widgets/charts/chart.type.d.ts +4 -0
  73. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget-edit.component.d.ts +14 -0
  74. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.config.d.ts +7 -0
  75. package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +13 -0
  76. package/widgets/lib/widgets/charts/donut-chart/index.d.ts +2 -0
  77. package/widgets/lib/widgets/editors/tabular-data/index.d.ts +6 -0
  78. package/widgets/lib/widgets/editors/tabular-data/table-widget-column.component.d.ts +6 -0
  79. package/widgets/lib/widgets/editors/tabular-data/table-widget-filter.component.d.ts +6 -0
  80. package/widgets/lib/widgets/editors/tabular-data/table-widget-print.component.d.ts +6 -0
  81. package/widgets/lib/widgets/editors/tabular-data/table-widget.config.d.ts +7 -0
  82. package/widgets/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.d.ts +18 -0
  83. package/widgets/lib/widgets/editors/tabular-data/tabular-data-view-popup.component.d.ts +10 -0
  84. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +12 -0
  85. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +13 -0
  86. package/widgets/lib/widgets/editors/tabular-data/tabular-widget.types.d.ts +11 -0
  87. package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +0 -1
  88. package/widgets/lib/widgets/index.d.ts +2 -0
  89. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CgyBuwTc.mjs.map +0 -1
  90. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Btza4YAZ.mjs +0 -369
  91. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Btza4YAZ.mjs.map +0 -1
  92. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-63iOyFsf.mjs +0 -130
  93. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-63iOyFsf.mjs.map +0 -1
  94. package/fesm2022/acorex-platform-themes-default-search-popup.component-DZHRY0aM.mjs +0 -129
  95. package/fesm2022/acorex-platform-themes-default-setting-page.component-Cj83wZbs.mjs +0 -74
  96. package/fesm2022/acorex-platform-themes-default-setting-page.component-Cj83wZbs.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-themes-default-setting-view.component-Ypj7RgOU.mjs +0 -71
  98. package/fesm2022/acorex-platform-themes-default-setting-view.component-Ypj7RgOU.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D994cHWW.mjs +0 -118
  100. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D994cHWW.mjs.map +0 -1
@@ -2,13 +2,13 @@ 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, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
5
+ import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPExpressionEvaluatorService, AXPRefreshEvent, 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';
9
9
  import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, Component, ChangeDetectionStrategy, HostBinding, DestroyRef, ViewChild, NgModule } from '@angular/core';
10
10
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
11
- import { cloneDeep, set, merge, isNil, get, sortBy } from 'lodash-es';
11
+ import { cloneDeep, set, merge, get, isNil, sortBy } from 'lodash-es';
12
12
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
13
13
  import * as i7 from '@acorex/platform/layout/builder';
14
14
  import { AXPWidgetRegistryService, AXPWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
@@ -85,6 +85,8 @@ class AXPEntityCommandTriggerViewModel {
85
85
  this.separated = action.separated ?? false;
86
86
  this.color = action.color ?? resolvedLook.color;
87
87
  this.icon = action.icon ?? resolvedLook.icon;
88
+ this.hidden = action.hidden ?? false;
89
+ this.disabled = action.disabled ?? false;
88
90
  this.scope = action.scope;
89
91
  }
90
92
  }
@@ -580,6 +582,7 @@ class AXPEntityMasterListViewModel {
580
582
  this.workflow = this.injector.get(AXPWorkflowService);
581
583
  this.settings = this.injector.get(AXPSettingService);
582
584
  this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
585
+ this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
583
586
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
584
587
  this.settingListViewKey = '';
585
588
  this.settingSelectedViewKey = '';
@@ -637,7 +640,14 @@ class AXPEntityMasterListViewModel {
637
640
  },
638
641
  {
639
642
  title: this.title(),
640
- url: [`/${this.session.application?.name}`, 'm', `${this.entityDef.module}`, 'e', `${this.entityDef.name}`, 'list'],
643
+ url: [
644
+ `/${this.session.application?.name}`,
645
+ 'm',
646
+ `${this.entityDef.module}`,
647
+ 'e',
648
+ `${this.entityDef.name}`,
649
+ 'list',
650
+ ],
641
651
  },
642
652
  ];
643
653
  });
@@ -647,16 +657,19 @@ class AXPEntityMasterListViewModel {
647
657
  return list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
648
658
  });
649
659
  this.primaryActions = computed(() => {
650
- return this.allActions().filter((a) => a.priority == 'primary' && ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) || (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
660
+ return this.allActions().filter((a) => a.priority == 'primary' &&
661
+ ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
662
+ (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
651
663
  });
652
664
  this.secondaryActions = computed(() => {
653
- return this.allActions().filter((a) => a.priority == 'secondary' && ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) || (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
665
+ return this.allActions().filter((a) => a.priority == 'secondary' &&
666
+ ((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
667
+ (a.scope == AXPEntityCommandScope.TypeLevel && !this.hasSelectedItems())));
654
668
  });
655
669
  this.selectedScopeActionsCount = computed(() => {
656
670
  return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Selected).length;
657
671
  });
658
672
  this.primaryRowActions = computed(() => this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'primary'));
659
- this.secondaryRowActions = computed(() => this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'secondary'));
660
673
  //****************** Filter ******************//
661
674
  this.simpleFilters = signal({
662
675
  field: null,
@@ -721,7 +734,7 @@ class AXPEntityMasterListViewModel {
721
734
  .subscribe((event) => {
722
735
  if (event.payload.entity == getEntityInfo(this.entityDef).source) {
723
736
  this.selectedItems.set([]);
724
- this.events$.next({ action: 'refresh' });
737
+ this.events$.next({ action: 'refresh', meta: event.payload.meta });
725
738
  }
726
739
  });
727
740
  this.sortedFields.set(this.sortableFields());
@@ -733,17 +746,44 @@ class AXPEntityMasterListViewModel {
733
746
  const columnVisibilityMap = new Map(listViewSetting.columns.map((col) => [col.name, col.visible]));
734
747
  this.columns.update((prev) => prev
735
748
  .map((c) => ({ ...c, visible: columnVisibilityMap.get(c.name) ?? c.visible })) // Update visibility
736
- .sort((a, b) => listViewSetting.columns.findIndex((col) => col.name === a.name) - listViewSetting.columns.findIndex((col) => col.name === b.name)));
749
+ .sort((a, b) => listViewSetting.columns.findIndex((col) => col.name === a.name) -
750
+ listViewSetting.columns.findIndex((col) => col.name === b.name)));
737
751
  }
738
752
  }
739
753
  clearSelection() {
740
754
  this.selectedItems.set([]);
741
755
  }
756
+ // public secondaryRowActions = computed<AXPEntityCommandTriggerViewModel[]>(() =>
757
+ // this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'secondary')
758
+ // );
759
+ async secondaryRowActions(rowData) {
760
+ const scope = {
761
+ context: {
762
+ eval: (path) => get(rowData, path),
763
+ },
764
+ };
765
+ const actions = await Promise.all(this.allActions()
766
+ .filter((a) => a.scope === AXPEntityCommandScope.Individual && a.priority === 'secondary')
767
+ .map(async (a) => {
768
+ const isHidden = typeof a.hidden === 'string' && a.hidden.includes('{{')
769
+ ? await this.expressionEvaluator.evaluateExpression(rowData, a.hidden, scope)
770
+ : a.hidden;
771
+ if (isHidden)
772
+ return null;
773
+ const disabled = typeof a.disabled === 'string' && a.disabled.includes('{{')
774
+ ? await this.expressionEvaluator.evaluateExpression(rowData, a.disabled, scope)
775
+ : a.disabled;
776
+ return { ...a, disabled };
777
+ }));
778
+ return actions.filter(Boolean);
779
+ }
742
780
  get filtersDef() {
743
781
  const props = this.entityDef.properties.filter((c) => c.options?.filter?.advance?.enabled);
744
782
  return props.map((e) => {
745
783
  const widgetConfig = this.widgetResolver.resolve(e.schema.interface?.type);
746
- const type = (e.options?.filter?.advance?.widgetType || widgetConfig?.defaultFilterWidgetName || e.schema.interface?.type);
784
+ const type = (e.options?.filter?.advance?.widgetType ||
785
+ widgetConfig?.defaultFilterWidgetName ||
786
+ e.schema.interface?.type);
747
787
  return {
748
788
  title: e.title,
749
789
  field: e.name,
@@ -816,7 +856,10 @@ class AXPEntityMasterListViewModel {
816
856
  this.dataSource.sort(...this.sortedFields()
817
857
  .filter((sf) => sf.dir)
818
858
  .map((s) => ({ dir: s.dir, field: s.name })));
819
- const allFilters = [this.inlineFilters.filters?.length && this.inlineFilters, this.simpleFilters().filters?.length && this.simpleFilters()].filter(Boolean);
859
+ const allFilters = [
860
+ this.inlineFilters.filters?.length && this.inlineFilters,
861
+ this.simpleFilters().filters?.length && this.simpleFilters(),
862
+ ].filter(Boolean);
820
863
  const cleanedAllFilters = this.cleanNestedFilters(allFilters);
821
864
  this.lastFiltersApplied.set(this.simpleFilters());
822
865
  this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
@@ -902,7 +945,11 @@ class AXPEntityMasterListViewModel {
902
945
  }
903
946
  //****************** Commands ******************//
904
947
  async executeCommand(commandName, data = null) {
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));
948
+ const action = this.allActions().find((c) => c.name == commandName &&
949
+ ((this.selectedItems().length
950
+ ? c.scope == AXPEntityCommandScope.Selected
951
+ : c.scope == AXPEntityCommandScope.Individual) ||
952
+ c.scope == AXPEntityCommandScope.TypeLevel));
906
953
  await this.workflow.execute(commandName, {
907
954
  entity: getEntityInfo(this.entityDef).source,
908
955
  entityInfo: {
@@ -967,6 +1014,9 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
967
1014
  const showResult = process?.showResult ?? true;
968
1015
  const ids = Array.isArray(data) ? data.map((c) => c.id) : [data.id];
969
1016
  const entity = await this.entityRegistery.resolve(moduleName, entityName);
1017
+ if (entity.parentKey && data[entity.parentKey]) {
1018
+ context.setVariable('meta', { ...meta, refreshTargetId: data[entity.parentKey] });
1019
+ }
970
1020
  let deletedCount = 0;
971
1021
  context.setVariable('deleteSuccessful', false);
972
1022
  const dialog = this.loadingDialog.show({
@@ -1018,7 +1068,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1018
1068
  }
1019
1069
  // Dispatch actions
1020
1070
  this.dispatch(AXPEntityDeletedEvent({ entity: moduleEntity, ids: ids, meta: meta }));
1021
- this.dispatch(AXPRefreshEvent({ entity: moduleEntity }));
1071
+ this.dispatch(AXPRefreshEvent({ entity: moduleEntity, meta: context.getVariable('meta') }));
1022
1072
  }
1023
1073
  else if (successfulPromises > 0 && failedPromises > 0) {
1024
1074
  // Some items deleted successfully, some failed
@@ -1202,7 +1252,10 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
1202
1252
  const headerTitle = decoration?.header?.title;
1203
1253
  const com = await this.config.viewers.master.modify();
1204
1254
  const popup = await this.popupService.open(com, {
1205
- title: headerTitle ? headerTitle : title ?? `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
1255
+ title: headerTitle
1256
+ ? headerTitle
1257
+ : title ??
1258
+ `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
1206
1259
  size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
1207
1260
  data: {
1208
1261
  vm,
@@ -1226,7 +1279,13 @@ class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
1226
1279
  async execute(context) {
1227
1280
  const updatedData = context.getVariable('data');
1228
1281
  this.dispatch(AXPEntityModifyEvent({ entity: context.getVariable('entity'), values: updatedData }));
1229
- this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity') }));
1282
+ const gridItemParentKey = context.getVariable('parentKey');
1283
+ this.dispatch(AXPRefreshEvent({
1284
+ entity: context.getVariable('entity'),
1285
+ meta: {
1286
+ refreshTargetId: updatedData[gridItemParentKey],
1287
+ },
1288
+ }));
1230
1289
  }
1231
1290
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1232
1291
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
@@ -1745,7 +1804,7 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
1745
1804
  }
1746
1805
  </ax-suffix>
1747
1806
  </ax-footer>
1748
- `, 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", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1807
+ `, 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 }); }
1749
1808
  }
1750
1809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
1751
1810
  type: Component,
@@ -2473,7 +2532,7 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2473
2532
  const [module, entity] = context.getVariable('entity').split('.');
2474
2533
  const data = context.getVariable('data');
2475
2534
  const options = context.getVariable('options');
2476
- console.log('options', options);
2535
+ console.log('data', data);
2477
2536
  const process = options?.['process'];
2478
2537
  const decoration = options?.['decoration'];
2479
2538
  const headerTitle = decoration?.header?.title;
@@ -2481,6 +2540,9 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2481
2540
  const canCreateNewOne = process?.canCreateNewOne;
2482
2541
  const entityRef = await this.entityRegistery.resolve(module, entity);
2483
2542
  const com = await this.config.viewers.master.create();
2543
+ if (entityRef.parentKey) {
2544
+ context.setVariable('parentKey', entityRef.parentKey);
2545
+ }
2484
2546
  const result = await this.popupService.open(com, {
2485
2547
  title: headerTitle
2486
2548
  ? headerTitle
@@ -2496,9 +2558,14 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2496
2558
  });
2497
2559
  context.setOutput('result', false);
2498
2560
  if (result.data?.save) {
2561
+ console.log(result);
2499
2562
  context.setOutput('result', true);
2500
2563
  const prevData = context.getVariable('data');
2564
+ const prevMeta = context.getVariable('meta');
2501
2565
  context.setVariable('data', { ...prevData, ...result.data.item });
2566
+ if (entityRef.parentKey && result.data.item[entityRef.parentKey]) {
2567
+ context.setVariable('meta', { ...prevMeta, refreshTargetId: result.data.item[entityRef.parentKey] });
2568
+ }
2502
2569
  }
2503
2570
  }
2504
2571
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -2510,7 +2577,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2510
2577
  class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
2511
2578
  async execute(context) {
2512
2579
  this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
2513
- this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity') }));
2580
+ this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
2514
2581
  }
2515
2582
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2516
2583
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
@@ -2573,6 +2640,7 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
2573
2640
  const [moduleName, entityName] = context.getVariable('entity').split('.');
2574
2641
  const data = context.getVariable('data');
2575
2642
  const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
2643
+ const { parentKey } = entityRef;
2576
2644
  const { id } = data;
2577
2645
  const { interfaces, title } = entityRef;
2578
2646
  const properties = interfaces?.master?.update?.properties?.map((p) => p.name) || [];
@@ -2580,9 +2648,15 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
2580
2648
  const options = context.getVariable('options');
2581
2649
  const decoration = options?.['decoration'];
2582
2650
  const headerTitle = decoration?.header?.title;
2651
+ if (parentKey) {
2652
+ context.setVariable('parentKey', parentKey);
2653
+ }
2583
2654
  const com = await this.config.viewers.master.modify();
2584
2655
  const popup = await this.popupService.open(com, {
2585
- title: headerTitle ? headerTitle : title ?? `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
2656
+ title: headerTitle
2657
+ ? headerTitle
2658
+ : title ??
2659
+ `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
2586
2660
  size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
2587
2661
  data: {
2588
2662
  vm,