@acorex/platform 19.1.2 → 19.1.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.
Files changed (162) hide show
  1. package/common/index.d.ts +2 -0
  2. package/common/lib/app/application.types.d.ts +12 -10
  3. package/common/lib/configs/app.config.d.ts +0 -1
  4. package/common/lib/file-storage/file-storage.service.d.ts +13 -0
  5. package/common/lib/file-storage/file-storage.types.d.ts +143 -0
  6. package/common/lib/file-storage/index.d.ts +2 -0
  7. package/common/lib/filters/filters.service.d.ts +8 -0
  8. package/common/lib/filters/filters.types.d.ts +19 -0
  9. package/common/lib/filters/index.d.ts +2 -0
  10. package/common/lib/settings/setting-definition.provider.d.ts +13 -4
  11. package/common/lib/settings/setting.builder.d.ts +7 -8
  12. package/common/lib/settings/settings.provider.d.ts +2 -7
  13. package/common/lib/settings/settings.service.d.ts +19 -7
  14. package/common/lib/settings/settings.types.d.ts +15 -2
  15. package/core/utils/highlighter.d.ts +1 -1
  16. package/fesm2022/acorex-platform-auth.mjs +5 -4
  17. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-common.mjs +264 -87
  19. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-core.mjs +2 -2
  21. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-layout-builder.mjs +286 -440
  23. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-layout-designer.mjs +18 -18
  25. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-layout-entity.mjs +335 -232
  27. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-layout-filters.mjs +124 -0
  29. package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-layout-setting.mjs +219 -132
  31. package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-layouts.mjs +4 -5
  33. package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs +108 -0
  35. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs.map +1 -0
  36. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs +369 -0
  37. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs +87 -0
  39. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs.map +1 -0
  40. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs +130 -0
  41. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs.map +1 -0
  42. package/fesm2022/acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs +74 -0
  43. package/fesm2022/acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs +73 -0
  45. package/fesm2022/acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-themes-default.mjs +40 -114
  47. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  48. package/fesm2022/acorex-platform-themes-shared.mjs +465 -157
  49. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  50. package/fesm2022/{acorex-platform-widgets-checkbox-widget-column.component-05nKV-UV.mjs → acorex-platform-widgets-checkbox-widget-column.component-jeZBOEhl.mjs} +18 -14
  51. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-jeZBOEhl.mjs.map +1 -0
  52. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-juhKoygA.mjs → acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs} +5 -5
  53. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs.map +1 -0
  54. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DU1niJES.mjs +64 -0
  55. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DU1niJES.mjs.map +1 -0
  56. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs → acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs} +4 -4
  57. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-widgets.mjs +1396 -286
  59. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  60. package/fesm2022/acorex-platform-workflow.mjs +9 -3
  61. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  62. package/layout/builder/lib/builder/builder.module.d.ts +6 -7
  63. package/layout/builder/lib/builder/builder.service.d.ts +9 -10
  64. package/layout/builder/lib/builder/context-store.service.d.ts +33 -0
  65. package/layout/builder/lib/builder/index.d.ts +4 -2
  66. package/layout/builder/lib/builder/widget-catalog.d.ts +1 -1
  67. package/layout/builder/lib/builder/widget-container.component.d.ts +34 -9
  68. package/layout/builder/lib/builder/widget-groups.d.ts +1 -0
  69. package/layout/builder/lib/builder/widget-map.d.ts +43 -0
  70. package/layout/builder/lib/builder/{widget-renderer.component.directive.d.ts → widget-renderer.directive.d.ts} +29 -4
  71. package/layout/builder/lib/builder/widget-status.types.d.ts +14 -0
  72. package/layout/builder/lib/builder/widget.types.d.ts +51 -59
  73. package/layout/designer/lib/preview/preview-viewer.component.d.ts +2 -2
  74. package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +2 -2
  75. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +8 -2
  76. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +0 -1
  77. package/layout/entity/lib/workflows/modify-entity.workflow.d.ts +14 -0
  78. package/layout/filters/README.md +3 -0
  79. package/layout/filters/index.d.ts +1 -0
  80. package/layout/filters/lib/filters.viewmodel.d.ts +30 -0
  81. package/layout/setting/lib/convert-setting-data.d.ts +0 -20
  82. package/layout/setting/lib/setting.viewmodel.d.ts +85 -22
  83. package/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.d.ts +15 -5
  84. package/package.json +13 -9
  85. package/themes/default/index.d.ts +0 -1
  86. package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +20 -10
  87. package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +15 -5
  88. package/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.d.ts +2 -1
  89. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +17 -6
  90. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-filters/list-view-option-filters.component.d.ts +14 -0
  91. package/themes/default/lib/layouts/entity-layouts/entity-master-modify-view/entity-master-modify-view.component.d.ts +2 -1
  92. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +15 -5
  93. package/themes/default/lib/layouts/filters-layout/simple-filter-builder/filters-view.component.d.ts +13 -0
  94. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +15 -5
  95. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +15 -5
  96. package/themes/default/lib/layouts/setting-layout/setting-page/setting-page.component.d.ts +2 -4
  97. package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +57 -0
  98. package/themes/shared/index.d.ts +3 -1
  99. package/themes/shared/lib/components/layout-elements/index.d.ts +5 -3
  100. package/themes/shared/lib/components/layout-elements/{layout-page-actions.component.d.ts → layout-actions.component.d.ts} +5 -5
  101. package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
  102. package/themes/shared/lib/components/layout-elements/layout-header.component.d.ts +12 -0
  103. package/themes/shared/lib/components/layout-elements/layout-list-component.d.ts +13 -0
  104. package/themes/shared/lib/components/layout-elements/layout-section.component.d.ts +9 -0
  105. package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +9 -0
  106. package/themes/shared/lib/components/theme-slot.component.d.ts +23 -13
  107. package/themes/shared/lib/palette.provider.d.ts +9 -0
  108. package/themes/shared/lib/setting.keys.d.ts +7 -2
  109. package/themes/shared/lib/setting.provider.d.ts +1 -0
  110. package/themes/shared/lib/shared.module.d.ts +5 -2
  111. package/themes/shared/lib/{services/theme.service.d.ts → theme.service.d.ts} +16 -24
  112. package/themes/shared/lib/theme.types.d.ts +25 -0
  113. package/themes/shared/lib/widgets/theme-color-selection/index.d.ts +2 -0
  114. package/themes/shared/lib/widgets/theme-color-selection/theme-color-selection-widget-edit.component.d.ts +6 -0
  115. package/themes/shared/lib/widgets/theme-color-selection/theme-color-selection-widget.config.d.ts +7 -0
  116. package/widgets/lib/properties/editors.props.d.ts +2 -0
  117. package/widgets/lib/properties/layout.props.d.ts +1 -0
  118. package/widgets/lib/widgets/advance/avatar/avatar-widget-column.component.d.ts +6 -0
  119. package/widgets/lib/widgets/advance/avatar/avatar-widget-designer.component.d.ts +6 -0
  120. package/widgets/lib/widgets/advance/avatar/avatar-widget-edit.component.d.ts +18 -0
  121. package/widgets/lib/widgets/advance/avatar/avatar-widget-print.component.d.ts +6 -0
  122. package/widgets/lib/widgets/advance/avatar/avatar-widget-view.component.d.ts +6 -0
  123. package/widgets/lib/widgets/advance/avatar/avatar-widget.config.d.ts +7 -0
  124. package/widgets/lib/widgets/advance/avatar/index.d.ts +6 -0
  125. package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +9 -5
  126. package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +6 -4
  127. package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +1 -7
  128. package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -0
  129. package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +0 -2
  130. package/widgets/lib/widgets/filters/operations/operations.component.d.ts +9 -0
  131. package/widgets/lib/widgets/filters/string-filter/index.d.ts +2 -0
  132. package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +11 -0
  133. package/widgets/lib/widgets/filters/string-filter/string-filter-widget.config.d.ts +7 -0
  134. package/widgets/lib/widgets/index.d.ts +5 -1
  135. package/widgets/lib/widgets/property-editors/border/border-widget-editor.component.d.ts +29 -6
  136. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +31 -0
  137. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.config.d.ts +7 -0
  138. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +15 -0
  139. package/widgets/lib/widgets/property-editors/flex-options/index.d.ts +3 -0
  140. package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +72 -0
  141. package/widgets/lib/widgets/property-editors/property-editor.type.d.ts +35 -0
  142. package/widgets/lib/widgets/property-editors/spacing/index.d.ts +0 -1
  143. package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +20 -7
  144. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B13KvLX4.mjs +0 -108
  145. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B13KvLX4.mjs.map +0 -1
  146. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-B6MXHPWi.mjs +0 -305
  147. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-B6MXHPWi.mjs.map +0 -1
  148. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-tKCGSRQT.mjs +0 -87
  149. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-tKCGSRQT.mjs.map +0 -1
  150. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CHvC0IAV.mjs +0 -130
  151. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CHvC0IAV.mjs.map +0 -1
  152. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-05nKV-UV.mjs.map +0 -1
  153. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-juhKoygA.mjs.map +0 -1
  154. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BkWcZ4K9.mjs +0 -72
  155. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BkWcZ4K9.mjs.map +0 -1
  156. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs.map +0 -1
  157. package/layout/builder/lib/builder/widget-renderer.component.d.ts +0 -48
  158. package/themes/default/lib/layouts/setting-layout/index.d.ts +0 -1
  159. package/themes/shared/lib/components/layout-elements/layout-page-header.component.d.ts +0 -11
  160. package/themes/shared/lib/components/layout-elements/layout-page-side.component.d.ts +0 -5
  161. package/widgets/lib/widgets/property-editors/border/border-widget-type.d.ts +0 -18
  162. package/widgets/lib/widgets/property-editors/spacing/spacing-widget-type.d.ts +0 -10
@@ -1,7 +1,7 @@
1
1
  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
- import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingValueProviderService, AXPWorkflowNavigateAction } from '@acorex/platform/common';
4
+ import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingValueProviderService, AXPWorkflowNavigateAction } from '@acorex/platform/common';
5
5
  import * as i1$3 from '@acorex/platform/workflow';
6
6
  import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, ofType, AXPWorkflowModule } from '@acorex/platform/workflow';
7
7
  import * as i0 from '@angular/core';
@@ -9,6 +9,8 @@ import { InjectionToken, inject, Injectable, computed, signal, Injector, effect,
9
9
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
10
10
  import { cloneDeep, set, merge, isNil, get, sortBy } from 'lodash-es';
11
11
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
12
+ import * as i7 from '@acorex/platform/layout/builder';
13
+ import { AXPWidgetRegistryService, AXPWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
12
14
  import { Subject, takeUntil } from 'rxjs';
13
15
  import { AXPopupService } from '@acorex/components/popup';
14
16
  import { AXPlatform } from '@acorex/core/platform';
@@ -16,8 +18,6 @@ import * as i8 from '@acorex/core/translation';
16
18
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
17
19
  import { AXDialogService } from '@acorex/components/dialog';
18
20
  import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
19
- import * as i7 from '@acorex/platform/layout/builder';
20
- import { AXPWidgetComponent, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog, AXPWidgetRegistryService } from '@acorex/platform/layout/builder';
21
21
  import { RouterModule, ROUTES } from '@angular/router';
22
22
  import * as i1 from '@acorex/components/loading';
23
23
  import { AXLoadingModule } from '@acorex/components/loading';
@@ -35,7 +35,6 @@ import { AXSelectBoxModule } from '@acorex/components/select-box';
35
35
  import * as i2$2 from '@acorex/components/text-box';
36
36
  import { AXTextBoxComponent, AXTextBoxModule } from '@acorex/components/text-box';
37
37
  import { AXValidationModule } from '@acorex/core/validation';
38
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
39
38
  import * as i1$2 from '@angular/forms';
40
39
  import { FormsModule } from '@angular/forms';
41
40
  import * as i5 from '@acorex/components/data-table';
@@ -667,7 +666,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
667
666
  }
668
667
  else {
669
668
  // No items to delete (no successful or failed promises)
670
- await this.dialogService.alert(await this.translationService.translateAsync('workflow.no-need'), await this.translationService.translateAsync('workflow.no-item'), 'info');
669
+ await this.dialogService.alert(await this.translationService.translateAsync('workflow.no-need'), await this.translationService.translateAsync('workflow.no-item'), 'primary');
671
670
  }
672
671
  }
673
672
  else {
@@ -708,6 +707,187 @@ const AXPDeleteEntityWorkflow = {
708
707
  },
709
708
  };
710
709
 
710
+ class AXPEntityMasterUpdateElementViewModel {
711
+ constructor(entity, property) {
712
+ this.entity = entity;
713
+ this.property = property;
714
+ this.name = signal(this.property.name);
715
+ this.title = signal(this.property.title);
716
+ this.description = signal(this.property.description);
717
+ this.editable = computed(() => {
718
+ return !(this.property.schema.readonly ?? false);
719
+ });
720
+ this.isRequired = computed(() => {
721
+ return this.property.validations?.some(c => c.rule == 'required') || false;
722
+ });
723
+ this.layout = computed(() => {
724
+ const updateProp = this.entity.interfaces?.master?.update?.properties?.find(c => c.name == this.property.name);
725
+ const source = cloneDeep(updateProp?.layout ?? {});
726
+ set(source, "positions.default.colSpan", 12);
727
+ return source;
728
+ });
729
+ this.node = computed(() => {
730
+ const schema = this.property.schema;
731
+ const widget = schema.interface;
732
+ return {
733
+ type: widget.type,
734
+ mode: this.editable() ? 'edit' : 'view',
735
+ path: this.name(),
736
+ children: widget.children,
737
+ formula: widget.formula,
738
+ triggers: widget.triggers,
739
+ options: merge(schema.interface?.options,
740
+ //this.property.options?.create?.widget,
741
+ { validationRules: this.property.validations })
742
+ };
743
+ });
744
+ }
745
+ }
746
+ class AXPEntityMasterUpdateViewModel {
747
+ constructor(injector, config, entityData, props) {
748
+ this.injector = injector;
749
+ this.config = config;
750
+ this.entityData = entityData;
751
+ this.props = props;
752
+ this.entityDef = cloneDeep(this.config);
753
+ this.workflow = this.injector.get(AXPWorkflowService);
754
+ this.isInProgress = signal(false);
755
+ this.context = signal(cloneDeep(this.entityData));
756
+ this.elements = computed(() => {
757
+ const props = this.entityDef.properties.filter(c => this.props.includes(c.name) &&
758
+ c.schema.hidden != true);
759
+ return props.map(e => {
760
+ return new AXPEntityMasterUpdateElementViewModel(this.entityDef, e);
761
+ });
762
+ });
763
+ }
764
+ async save() {
765
+ this.isInProgress.set(true);
766
+ try {
767
+ const com = this.entityDef.commands?.update;
768
+ if (com) {
769
+ const exec = com.execute;
770
+ return await exec(this.context());
771
+ }
772
+ }
773
+ finally {
774
+ this.isInProgress.set(false);
775
+ }
776
+ }
777
+ reset() {
778
+ this.context.set(cloneDeep(this.entityData));
779
+ }
780
+ }
781
+ class AXPEntityMasterUpdateViewModelFactory {
782
+ constructor() {
783
+ this.entityService = inject(AXPEntityDefinitionRegistryService);
784
+ this.layout = inject(AXPLayoutThemeService);
785
+ this.injector = inject(Injector);
786
+ }
787
+ async create(moduleName, entityName, id, props) {
788
+ const config = await this.entityService.resolve(moduleName, entityName);
789
+ this.layout.setNavigationLoading(true);
790
+ if (config.queries.byKey) {
791
+ const func = config.queries.byKey.execute;
792
+ const data = await func(id);
793
+ this.layout.setNavigationLoading(false);
794
+ return new AXPEntityMasterUpdateViewModel(this.injector, config, data, props);
795
+ }
796
+ this.layout.setNavigationLoading(false);
797
+ return Promise.reject('cannot fetch ');
798
+ }
799
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
800
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
801
+ }
802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
803
+ type: Injectable,
804
+ args: [{ providedIn: 'root' }]
805
+ }] });
806
+
807
+ const AXPEntityModifyEvent = createWorkFlowEvent('[Entity] Modified');
808
+ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
809
+ constructor() {
810
+ super(...arguments);
811
+ this.popupService = inject(AXPopupService);
812
+ this.platform = inject(AXPlatform);
813
+ this.translateService = inject(AXTranslationService);
814
+ this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
815
+ this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
816
+ this.factory = inject(AXPEntityMasterUpdateViewModelFactory);
817
+ }
818
+ async execute(context) {
819
+ const [moduleName, entityName] = context.getVariable('entity').split('.');
820
+ const { properties, id, title } = context.getVariable('data');
821
+ const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
822
+ const vm = await this.factory.create(moduleName, entityName, id, properties);
823
+ const com = await this.config.viewers.master.modify();
824
+ const popup = await this.popupService.open(com, {
825
+ title: title ?? `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
826
+ size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
827
+ data: {
828
+ vm,
829
+ properties,
830
+ entity: entityRef,
831
+ },
832
+ });
833
+ context.setOutput('result', false);
834
+ if (popup.data?.result == true) {
835
+ context.setOutput('result', true);
836
+ context.setVariable('data', cloneDeep(popup.data.context));
837
+ }
838
+ }
839
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
840
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
841
+ }
842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
843
+ type: Injectable
844
+ }] });
845
+ class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
846
+ async execute(context) {
847
+ const updatedData = context.getVariable('data');
848
+ this.dispatch(AXPEntityModifyEvent({ entity: context.getVariable('entity'), values: updatedData }));
849
+ }
850
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
851
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
852
+ }
853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
854
+ type: Injectable
855
+ }] });
856
+ const AXPModifyEntitySectionWorkflow = {
857
+ startStepId: 'modifyPopup',
858
+ steps: {
859
+ modifyPopup: {
860
+ id: 'modifyPopup',
861
+ action: 'AXPEntityModifySectionPopupAction',
862
+ nextSteps: [
863
+ {
864
+ conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
865
+ nextStepId: 'successToast',
866
+ },
867
+ ],
868
+ },
869
+ successToast: {
870
+ id: 'successToast',
871
+ action: 'AXPToastAction',
872
+ input: {
873
+ color: 'success',
874
+ title: 'workflow.entity-modified-title',
875
+ content: 'workflow.entity-modified-body',
876
+ },
877
+ nextSteps: [
878
+ {
879
+ conditions: [],
880
+ nextStepId: 'modifyConfirmed',
881
+ },
882
+ ],
883
+ },
884
+ modifyConfirmed: {
885
+ id: 'modifyConfirmed',
886
+ action: 'AXPEntityModifyConfirmedAction',
887
+ },
888
+ },
889
+ };
890
+
711
891
  class AXPEntityMasterListViewQueryViewModel {
712
892
  constructor(entity, section, view) {
713
893
  this.entity = entity;
@@ -729,9 +909,10 @@ class AXPEntityMasterListViewModel {
729
909
  // this.settings.set()
730
910
  if (viewName != this.view().name) {
731
911
  this.view.set(this.views().find((c) => c.name == (viewName || savedViewName)) ?? this.views()[0]);
732
- this.settings.set(this.settingSelectedViewKey, this.view().name);
912
+ this.settings.scope(AXPSettingScope.User).set(this.settingSelectedViewKey, this.view().name);
733
913
  this.applyViewSorts();
734
914
  this.applyViewColumns();
915
+ this.applyViewFilters();
735
916
  this.applyFilterAndSort();
736
917
  this.applySettings();
737
918
  }
@@ -745,6 +926,7 @@ class AXPEntityMasterListViewModel {
745
926
  this.session = this.injector.get(AXPSessionService);
746
927
  this.workflow = this.injector.get(AXPWorkflowService);
747
928
  this.settings = this.injector.get(AXPSettingValueProviderService);
929
+ this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
748
930
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
749
931
  this.settingListViewKey = '';
750
932
  this.settingSelectedViewKey = '';
@@ -834,15 +1016,20 @@ class AXPEntityMasterListViewModel {
834
1016
  this.primaryRowActions = computed(() => this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'primary'));
835
1017
  this.secondaryRowActions = computed(() => this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'secondary'));
836
1018
  //****************** Filter ******************//
837
- this.inlineFilters = {
1019
+ this.simpleFilters = signal({
838
1020
  field: null,
839
- logic: 'or',
1021
+ logic: 'and',
840
1022
  operator: null,
841
- filters: [],
842
- };
843
- this.advanceFilters = {
1023
+ filters: this.view().conditions.map((f) => ({
1024
+ field: f.name,
1025
+ operator: f.operator,
1026
+ value: f.value,
1027
+ })),
1028
+ });
1029
+ this.lastFiltersApplied = signal(this.simpleFilters());
1030
+ this.inlineFilters = {
844
1031
  field: null,
845
- logic: 'and',
1032
+ logic: 'or',
846
1033
  operator: null,
847
1034
  filters: [],
848
1035
  };
@@ -887,7 +1074,7 @@ class AXPEntityMasterListViewModel {
887
1074
  };
888
1075
  this.sortedFields = signal([]);
889
1076
  this.workflow.events$
890
- .pipe(ofType(AXPEntityDeletedEvent, AXPEntityCreateEvent))
1077
+ .pipe(ofType(AXPEntityDeletedEvent, AXPEntityCreateEvent, AXPEntityModifyEvent))
891
1078
  .pipe(takeUntil(this.destroyed))
892
1079
  .subscribe((event) => {
893
1080
  if (event.payload.entity == getEntityInfo(this.entityDef).source) {
@@ -911,6 +1098,39 @@ class AXPEntityMasterListViewModel {
911
1098
  clearSelection() {
912
1099
  this.selectedItems.set([]);
913
1100
  }
1101
+ get filtersDef() {
1102
+ const props = this.entityDef.properties.filter((c) => c.options?.filter?.advance?.enabled);
1103
+ return props.map((e) => {
1104
+ const widgetConfig = this.widgetResolver.resolve(e.schema.interface?.type);
1105
+ const type = (e.options?.filter?.advance?.widgetType ||
1106
+ widgetConfig?.defaultFilterWidgetName ||
1107
+ e.schema.interface?.type);
1108
+ return {
1109
+ title: e.title,
1110
+ field: e.name,
1111
+ operator: {
1112
+ type: 'equal',
1113
+ },
1114
+ widget: { ...e.schema.interface, path: e.name, type },
1115
+ filters: [],
1116
+ isParametric: false,
1117
+ };
1118
+ });
1119
+ }
1120
+ applyViewFilters() {
1121
+ const viewFilters = this.view().conditions.map((f) => ({
1122
+ field: f.name,
1123
+ operator: f.operator,
1124
+ value: f.value,
1125
+ }));
1126
+ this.simpleFilters.update((prev) => ({ ...prev, filters: viewFilters }));
1127
+ }
1128
+ resetFilters() {
1129
+ this.applyViewFilters();
1130
+ }
1131
+ discardFilters() {
1132
+ this.simpleFilters.set(this.lastFiltersApplied());
1133
+ }
914
1134
  applyInlineFilter(value) {
915
1135
  const props = this.entityDef.properties.filter((c) => c.options?.filter?.inline?.enabled);
916
1136
  this.inlineFilters.filters = [];
@@ -929,32 +1149,18 @@ class AXPEntityMasterListViewModel {
929
1149
  }
930
1150
  applyFilterAndSort() {
931
1151
  this.dataSource.clearFilter();
932
- //
933
1152
  this.dataSource.sort(...this.sortedFields().map((s) => ({ dir: s.dir, field: s.name })));
934
- //
935
- this.advanceFilters.filters = this.view().conditions.map((f) => ({
936
- field: f.name,
937
- operator: f.operator,
938
- value: f.value,
1153
+ const allFilters = [
1154
+ this.inlineFilters.filters?.length && this.inlineFilters,
1155
+ this.simpleFilters().filters?.length && this.simpleFilters(),
1156
+ ].filter(Boolean);
1157
+ this.lastFiltersApplied.set(this.simpleFilters());
1158
+ this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
1159
+ field: null,
1160
+ logic: 'and',
1161
+ operator: null,
1162
+ filters: allFilters,
939
1163
  }));
940
- //
941
- const inline = this.inlineFilters.filters?.length ?? 0;
942
- const advance = this.advanceFilters.filters?.length ?? 0;
943
- if (inline && !advance) {
944
- this.dataSource.filter(this.filterOperatorMiddleware.transformFilter(this.inlineFilters));
945
- }
946
- else if (!inline && advance) {
947
- this.dataSource.filter(this.filterOperatorMiddleware.transformFilter(this.advanceFilters));
948
- }
949
- else if (inline && advance) {
950
- this.dataSource.filter(this.filterOperatorMiddleware.transformFilter({
951
- field: null,
952
- logic: 'and',
953
- operator: null,
954
- filters: [this.inlineFilters, this.advanceFilters],
955
- }));
956
- }
957
- //
958
1164
  this.dataSource.refresh();
959
1165
  }
960
1166
  resetColumns() {
@@ -963,7 +1169,7 @@ class AXPEntityMasterListViewModel {
963
1169
  async onColumnsChanged(columns) {
964
1170
  const listViewSetting = await this.settings.get(this.settingListViewKey);
965
1171
  if (this.settingListViewKey) {
966
- this.settings.set(this.settingListViewKey, {
1172
+ this.settings.scope(AXPSettingScope.User).set(this.settingListViewKey, {
967
1173
  ...listViewSetting,
968
1174
  columns: columns.map((c) => ({ name: c.name, visible: c.visible })),
969
1175
  });
@@ -1015,7 +1221,6 @@ class AXPEntityMasterListViewModel {
1015
1221
  ? c.scope == AXPEntityCommandScope.Selected
1016
1222
  : c.scope == AXPEntityCommandScope.Individual) ||
1017
1223
  c.scope == AXPEntityCommandScope.TypeLevel));
1018
- console.log('action: ', action);
1019
1224
  await this.workflow.execute(commandName, {
1020
1225
  entity: getEntityInfo(this.entityDef).source,
1021
1226
  entityInfo: {
@@ -1061,187 +1266,6 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
1061
1266
  return service.create(moduleName, entityName);
1062
1267
  };
1063
1268
 
1064
- class AXPEntityMasterUpdateElementViewModel {
1065
- constructor(entity, property) {
1066
- this.entity = entity;
1067
- this.property = property;
1068
- this.name = signal(this.property.name);
1069
- this.title = signal(this.property.title);
1070
- this.description = signal(this.property.description);
1071
- this.editable = computed(() => {
1072
- return !(this.property.schema.readonly ?? false);
1073
- });
1074
- this.isRequired = computed(() => {
1075
- return this.property.validations?.some(c => c.rule == 'required') || false;
1076
- });
1077
- this.layout = computed(() => {
1078
- const updateProp = this.entity.interfaces?.master?.update?.properties?.find(c => c.name == this.property.name);
1079
- const source = cloneDeep(updateProp?.layout ?? {});
1080
- set(source, "positions.default.colSpan", 12);
1081
- return source;
1082
- });
1083
- this.node = computed(() => {
1084
- const schema = this.property.schema;
1085
- const widget = schema.interface;
1086
- return {
1087
- type: widget.type,
1088
- mode: this.editable() ? 'edit' : 'view',
1089
- path: this.name(),
1090
- children: widget.children,
1091
- formula: widget.formula,
1092
- triggers: widget.triggers,
1093
- options: merge(schema.interface?.options,
1094
- //this.property.options?.create?.widget,
1095
- { validationRules: this.property.validations })
1096
- };
1097
- });
1098
- }
1099
- }
1100
- class AXPEntityMasterUpdateViewModel {
1101
- constructor(injector, config, entityData, props) {
1102
- this.injector = injector;
1103
- this.config = config;
1104
- this.entityData = entityData;
1105
- this.props = props;
1106
- this.entityDef = cloneDeep(this.config);
1107
- this.workflow = this.injector.get(AXPWorkflowService);
1108
- this.isInProgress = signal(false);
1109
- this.context = signal(cloneDeep(this.entityData));
1110
- this.elements = computed(() => {
1111
- const props = this.entityDef.properties.filter(c => this.props.includes(c.name) &&
1112
- c.schema.hidden != true);
1113
- return props.map(e => {
1114
- return new AXPEntityMasterUpdateElementViewModel(this.entityDef, e);
1115
- });
1116
- });
1117
- }
1118
- async save() {
1119
- this.isInProgress.set(true);
1120
- try {
1121
- const com = this.entityDef.commands?.update;
1122
- if (com) {
1123
- const exec = com.execute;
1124
- return await exec(this.context());
1125
- }
1126
- }
1127
- finally {
1128
- this.isInProgress.set(false);
1129
- }
1130
- }
1131
- reset() {
1132
- this.context.set(cloneDeep(this.entityData));
1133
- }
1134
- }
1135
- class AXPEntityMasterUpdateViewModelFactory {
1136
- constructor() {
1137
- this.entityService = inject(AXPEntityDefinitionRegistryService);
1138
- this.layout = inject(AXPLayoutThemeService);
1139
- this.injector = inject(Injector);
1140
- }
1141
- async create(moduleName, entityName, id, props) {
1142
- const config = await this.entityService.resolve(moduleName, entityName);
1143
- this.layout.setNavigationLoading(true);
1144
- if (config.queries.byKey) {
1145
- const func = config.queries.byKey.execute;
1146
- const data = await func(id);
1147
- this.layout.setNavigationLoading(false);
1148
- return new AXPEntityMasterUpdateViewModel(this.injector, config, data, props);
1149
- }
1150
- this.layout.setNavigationLoading(false);
1151
- return Promise.reject('cannot fetch ');
1152
- }
1153
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1154
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
1155
- }
1156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
1157
- type: Injectable,
1158
- args: [{ providedIn: 'root' }]
1159
- }] });
1160
-
1161
- const AXPEntityModifyEvent = createWorkFlowEvent('[Entity] Modified');
1162
- class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
1163
- constructor() {
1164
- super(...arguments);
1165
- this.popupService = inject(AXPopupService);
1166
- this.platform = inject(AXPlatform);
1167
- this.translateService = inject(AXTranslationService);
1168
- this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
1169
- this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
1170
- this.factory = inject(AXPEntityMasterUpdateViewModelFactory);
1171
- }
1172
- async execute(context) {
1173
- const [moduleName, entityName] = context.getVariable('entity').split('.');
1174
- const { properties, id, title } = context.getVariable('data');
1175
- const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
1176
- const vm = await this.factory.create(moduleName, entityName, id, properties);
1177
- const com = await this.config.viewers.master.modify();
1178
- const popup = await this.popupService.open(com, {
1179
- title: title ?? `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
1180
- size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
1181
- data: {
1182
- vm,
1183
- properties,
1184
- entity: entityRef,
1185
- },
1186
- });
1187
- context.setOutput('result', false);
1188
- if (popup.data?.result == true) {
1189
- context.setOutput('result', true);
1190
- context.setVariable('data', cloneDeep(popup.data.context));
1191
- }
1192
- }
1193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1194
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
1195
- }
1196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
1197
- type: Injectable
1198
- }] });
1199
- class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
1200
- async execute(context) {
1201
- const updatedData = context.getVariable('data');
1202
- this.dispatch(AXPEntityModifyEvent({ entity: context.getVariable('entity'), values: updatedData }));
1203
- }
1204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1205
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
1206
- }
1207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
1208
- type: Injectable
1209
- }] });
1210
- const AXPModifyEntitySectionWorkflow = {
1211
- startStepId: 'modifyPopup',
1212
- steps: {
1213
- modifyPopup: {
1214
- id: 'modifyPopup',
1215
- action: 'AXPEntityModifySectionPopupAction',
1216
- nextSteps: [
1217
- {
1218
- conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
1219
- nextStepId: 'successToast',
1220
- },
1221
- ],
1222
- },
1223
- successToast: {
1224
- id: 'successToast',
1225
- action: 'AXPToastAction',
1226
- input: {
1227
- color: 'success',
1228
- title: 'workflow.entity-modified-title',
1229
- content: 'workflow.entity-modified-body',
1230
- },
1231
- nextSteps: [
1232
- {
1233
- conditions: [],
1234
- nextStepId: 'modifyConfirmed',
1235
- },
1236
- ],
1237
- },
1238
- modifyConfirmed: {
1239
- id: 'modifyConfirmed',
1240
- action: 'AXPEntityModifyConfirmedAction',
1241
- },
1242
- },
1243
- };
1244
-
1245
1269
  class AXPEntityMasterSingleViewGroupViewModel {
1246
1270
  constructor(entity, section) {
1247
1271
  this.entity = entity;
@@ -1867,7 +1891,6 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
1867
1891
  this.entityResolver = inject(AXPEntityResolver);
1868
1892
  this.formatService = inject(AXFormatService);
1869
1893
  this.popupService = inject(AXPopupService);
1870
- this.builderService = inject(AXPLayoutBuilderService);
1871
1894
  this.destroyRef = inject(DestroyRef);
1872
1895
  this.translateService = inject(AXTranslationService);
1873
1896
  this.expose = computed(() => this.options()['expose']);
@@ -1907,13 +1930,13 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
1907
1930
  ngOnInit() {
1908
1931
  super.ngOnInit();
1909
1932
  //
1910
- this.builderService.onChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async (c) => {
1911
- if (c.path == this.path) {
1912
- if (this.getValue()) {
1913
- await this.findByValue();
1914
- }
1915
- }
1916
- });
1933
+ // this.builderService.onContextChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async (c) => {
1934
+ // if (c.path == this.path) {
1935
+ // if (this.getValue()) {
1936
+ // await this.findByValue();
1937
+ // }
1938
+ // }
1939
+ // });
1917
1940
  }
1918
1941
  async findByValue() {
1919
1942
  this.isLoading.set(true);
@@ -1989,18 +2012,18 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
1989
2012
  // extract data from valueField and set context by expose path
1990
2013
  if (this.expose()) {
1991
2014
  if (typeof this.expose() == 'string') {
1992
- this.builderService.setValue(this.expose(), item);
2015
+ this.contextService.update(this.expose(), item);
1993
2016
  }
1994
2017
  // support multiple expose items
1995
2018
  else if (Array.isArray(this.expose())) {
1996
2019
  this.expose().forEach((i) => {
1997
2020
  if (typeof i == 'string') {
1998
- this.builderService.setValue(i, item);
2021
+ this.contextService.update(i, item);
1999
2022
  }
2000
2023
  else {
2001
2024
  // extract data from item by source path and set context by target path
2002
2025
  const key = get(item, i.source);
2003
- this.builderService.setValue(i.target, key);
2026
+ this.contextService.update(i.target, key);
2004
2027
  }
2005
2028
  });
2006
2029
  }
@@ -2008,7 +2031,7 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
2008
2031
  else if (typeof this.expose() == 'object') {
2009
2032
  const i = this.expose();
2010
2033
  const key = get(item, i.source);
2011
- this.builderService.setValue(i.target, key);
2034
+ this.contextService.update(i.target, key);
2012
2035
  }
2013
2036
  }
2014
2037
  }
@@ -2376,6 +2399,82 @@ const AXPWidgetSelectorWidget = {
2376
2399
  },
2377
2400
  };
2378
2401
 
2402
+ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
2403
+ constructor() {
2404
+ super(...arguments);
2405
+ this.popupService = inject(AXPopupService);
2406
+ this.platform = inject(AXPlatform);
2407
+ this.translateService = inject(AXTranslationService);
2408
+ this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
2409
+ this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
2410
+ this.factory = inject(AXPEntityMasterUpdateViewModelFactory);
2411
+ }
2412
+ async execute(context) {
2413
+ const [moduleName, entityName] = context.getVariable('entity').split('.');
2414
+ const data = context.getVariable('data');
2415
+ const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
2416
+ const { id } = data;
2417
+ const { interfaces, title } = entityRef;
2418
+ const properties = interfaces?.master?.update?.properties?.map((p) => p.name) || [];
2419
+ const vm = await this.factory.create(moduleName, entityName, id, properties);
2420
+ const com = await this.config.viewers.master.modify();
2421
+ const popup = await this.popupService.open(com, {
2422
+ title: title ??
2423
+ `${this.translateService.translateSync('entity.modify')} ${this.translateService.translateSync(entityRef.formats.individual)}`,
2424
+ size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
2425
+ data: {
2426
+ vm,
2427
+ properties,
2428
+ entity: entityRef,
2429
+ },
2430
+ });
2431
+ context.setOutput('result', false);
2432
+ if (popup.data?.result == true) {
2433
+ context.setOutput('result', true);
2434
+ context.setVariable('data', cloneDeep(popup.data.context));
2435
+ }
2436
+ }
2437
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2438
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
2439
+ }
2440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
2441
+ type: Injectable
2442
+ }] });
2443
+ const AXPQuickModifyEntityWorkflow = {
2444
+ startStepId: 'modifyPopup',
2445
+ steps: {
2446
+ modifyPopup: {
2447
+ id: 'modifyPopup',
2448
+ action: 'AXPQuickEntityModifyPopupAction',
2449
+ nextSteps: [
2450
+ {
2451
+ conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
2452
+ nextStepId: 'successToast',
2453
+ },
2454
+ ],
2455
+ },
2456
+ successToast: {
2457
+ id: 'successToast',
2458
+ action: 'AXPToastAction',
2459
+ input: {
2460
+ color: 'success',
2461
+ title: 'workflow.entity-modified-title',
2462
+ content: 'workflow.entity-modified-body',
2463
+ },
2464
+ nextSteps: [
2465
+ {
2466
+ conditions: [],
2467
+ nextStepId: 'modifyConfirmed',
2468
+ },
2469
+ ],
2470
+ },
2471
+ modifyConfirmed: {
2472
+ id: 'modifyConfirmed',
2473
+ action: 'AXPEntityModifyConfirmedAction',
2474
+ },
2475
+ },
2476
+ };
2477
+
2379
2478
  class AXPShowDetailViewAction extends AXPWorkflowAction {
2380
2479
  constructor() {
2381
2480
  super(...arguments);
@@ -2499,6 +2598,7 @@ class AXPEntityModule {
2499
2598
  AXPEntityPerformDeleteAction,
2500
2599
  'entity-perform-delete': AXPEntityPerformDeleteAction,
2501
2600
  AXPEntityModifySectionPopupAction,
2601
+ AXPQuickEntityModifyPopupAction,
2502
2602
  AXPEntityModifyConfirmedAction,
2503
2603
  AXPShowDetailViewAction,
2504
2604
  AXPEntityCreateSubmittedAction,
@@ -2508,6 +2608,7 @@ class AXPEntityModule {
2508
2608
  'create-entity': AXPCreateEntityWorkflow,
2509
2609
  'delete-entity': AXPDeleteEntityWorkflow,
2510
2610
  'modify-entity-section': AXPModifyEntitySectionWorkflow,
2611
+ 'quick-modify-entity': AXPQuickModifyEntityWorkflow,
2511
2612
  'open-entity': AXPShowDetailsViewWorkflow,
2512
2613
  'show-list-view': AXPShowListViewWorkflow,
2513
2614
  },
@@ -2527,6 +2628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2527
2628
  AXPEntityPerformDeleteAction,
2528
2629
  'entity-perform-delete': AXPEntityPerformDeleteAction,
2529
2630
  AXPEntityModifySectionPopupAction,
2631
+ AXPQuickEntityModifyPopupAction,
2530
2632
  AXPEntityModifyConfirmedAction,
2531
2633
  AXPShowDetailViewAction,
2532
2634
  AXPEntityCreateSubmittedAction,
@@ -2536,6 +2638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2536
2638
  'create-entity': AXPCreateEntityWorkflow,
2537
2639
  'delete-entity': AXPDeleteEntityWorkflow,
2538
2640
  'modify-entity-section': AXPModifyEntitySectionWorkflow,
2641
+ 'quick-modify-entity': AXPQuickModifyEntityWorkflow,
2539
2642
  'open-entity': AXPShowDetailsViewWorkflow,
2540
2643
  'show-list-view': AXPShowListViewWorkflow,
2541
2644
  },