@acorex/platform 20.2.0-next.2 → 20.2.0-next.3

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 (93) hide show
  1. package/common/index.d.ts +25 -42
  2. package/core/index.d.ts +104 -9
  3. package/fesm2022/acorex-platform-auth.mjs +20 -20
  4. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-common.mjs +133 -115
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +276 -37
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +16 -16
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +88 -67
  12. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-components.mjs +137 -83
  14. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-designer.mjs +262 -218
  16. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-entity.mjs +1040 -104
  18. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-views.mjs +15 -15
  20. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-native.mjs +7 -7
  22. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-runtime.mjs +40 -40
  24. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-themes-default-create-entity-view.component-CzHp6G3a.mjs → acorex-platform-themes-default-create-entity-view.component-DBkuhSDb.mjs} +4 -4
  26. package/fesm2022/{acorex-platform-themes-default-create-entity-view.component-CzHp6G3a.mjs.map → acorex-platform-themes-default-create-entity-view.component-DBkuhSDb.mjs.map} +1 -1
  27. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-8S2CXBAi.mjs +115 -0
  28. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-8S2CXBAi.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs → acorex-platform-themes-default-entity-master-list-view.component-Bf8N5e5h.mjs} +23 -23
  30. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-C8UhVBSM.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-Bf8N5e5h.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-Cn-0fTWn.mjs → acorex-platform-themes-default-entity-master-modify-view.component-DF0gS61P.mjs} +5 -5
  32. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DF0gS61P.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B8XrO58H.mjs → acorex-platform-themes-default-entity-master-single-view.component-CEnHe_cU.mjs} +8 -8
  34. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CEnHe_cU.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-themes-default-error-401.component-Ycd9latx.mjs → acorex-platform-themes-default-error-401.component-BYI4xP23.mjs} +4 -4
  36. package/fesm2022/{acorex-platform-themes-default-error-401.component-Ycd9latx.mjs.map → acorex-platform-themes-default-error-401.component-BYI4xP23.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-themes-default-error-404.component-DHbzH27Q.mjs → acorex-platform-themes-default-error-404.component-1gM0Vlbv.mjs} +4 -4
  38. package/fesm2022/{acorex-platform-themes-default-error-404.component-DHbzH27Q.mjs.map → acorex-platform-themes-default-error-404.component-1gM0Vlbv.mjs.map} +1 -1
  39. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BSdZOCbW.mjs → acorex-platform-themes-default-error-offline.component-Y3w3K60c.mjs} +4 -4
  40. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BSdZOCbW.mjs.map → acorex-platform-themes-default-error-offline.component-Y3w3K60c.mjs.map} +1 -1
  41. package/fesm2022/acorex-platform-themes-default.mjs +39 -39
  42. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  43. package/fesm2022/{acorex-platform-themes-shared-color-chooser-column.component-EZGn900W.mjs → acorex-platform-themes-shared-color-chooser-column.component-BLFvyMvH.mjs} +4 -4
  44. package/fesm2022/{acorex-platform-themes-shared-color-chooser-column.component-EZGn900W.mjs.map → acorex-platform-themes-shared-color-chooser-column.component-BLFvyMvH.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-themes-shared-color-chooser-view.component-DTLYX00a.mjs → acorex-platform-themes-shared-color-chooser-view.component-CN1lEEOY.mjs} +4 -4
  46. package/fesm2022/{acorex-platform-themes-shared-color-chooser-view.component-DTLYX00a.mjs.map → acorex-platform-themes-shared-color-chooser-view.component-CN1lEEOY.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-DMPET9Fu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-UJ2abdzQ.mjs} +4 -4
  48. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-DMPET9Fu.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-UJ2abdzQ.mjs.map} +1 -1
  49. package/fesm2022/acorex-platform-themes-shared.mjs +41 -41
  50. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  51. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-BUx-nksc.mjs → acorex-platform-widgets-button-widget-designer.component-BMsEt6Lq.mjs} +4 -4
  52. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-BUx-nksc.mjs.map → acorex-platform-widgets-button-widget-designer.component-BMsEt6Lq.mjs.map} +1 -1
  53. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CezBQ0iO.mjs +85 -0
  54. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CezBQ0iO.mjs.map +1 -0
  55. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-Dj3Go0tj.mjs → acorex-platform-widgets-checkbox-widget-designer.component-BkH4hBUc.mjs} +4 -4
  56. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-Dj3Go0tj.mjs.map → acorex-platform-widgets-checkbox-widget-designer.component-BkH4hBUc.mjs.map} +1 -1
  57. package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-Y12esByc.mjs → acorex-platform-widgets-checkbox-widget-view.component-BwlHVBRW.mjs} +19 -6
  58. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BwlHVBRW.mjs.map +1 -0
  59. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-CihtTd0F.mjs → acorex-platform-widgets-color-box-widget-designer.component-BPLG8mY4.mjs} +4 -4
  60. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-CihtTd0F.mjs.map → acorex-platform-widgets-color-box-widget-designer.component-BPLG8mY4.mjs.map} +1 -1
  61. package/fesm2022/{acorex-platform-widgets-file-list-popup.component-n3nuXZNq.mjs → acorex-platform-widgets-file-list-popup.component-Bwbrw1xo.mjs} +4 -4
  62. package/fesm2022/{acorex-platform-widgets-file-list-popup.component-n3nuXZNq.mjs.map → acorex-platform-widgets-file-list-popup.component-Bwbrw1xo.mjs.map} +1 -1
  63. package/fesm2022/{acorex-platform-widgets-file-rename-popup.component-DBRV6X7W.mjs → acorex-platform-widgets-file-rename-popup.component-CXRHtjFu.mjs} +4 -4
  64. package/fesm2022/{acorex-platform-widgets-file-rename-popup.component-DBRV6X7W.mjs.map → acorex-platform-widgets-file-rename-popup.component-CXRHtjFu.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-D_970YBz.mjs → acorex-platform-widgets-page-widget-designer.component-Cf5bTu-k.mjs} +6 -6
  66. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-Cf5bTu-k.mjs.map +1 -0
  67. package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-DPuTM42n.mjs → acorex-platform-widgets-rich-text-popup.component-DOGwSrH1.mjs} +4 -4
  68. package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-DPuTM42n.mjs.map → acorex-platform-widgets-rich-text-popup.component-DOGwSrH1.mjs.map} +1 -1
  69. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BH1_BkJh.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CFg2-tyF.mjs} +4 -4
  70. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BH1_BkJh.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CFg2-tyF.mjs.map} +1 -1
  71. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-DCsLuXR9.mjs → acorex-platform-widgets-tabular-data-view-popup.component-BvVF-vJF.mjs} +4 -4
  72. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-DCsLuXR9.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-BvVF-vJF.mjs.map} +1 -1
  73. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-C_iu3jCG.mjs → acorex-platform-widgets-text-block-widget-designer.component-BhXq3JZ1.mjs} +4 -4
  74. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-C_iu3jCG.mjs.map → acorex-platform-widgets-text-block-widget-designer.component-BhXq3JZ1.mjs.map} +1 -1
  75. package/fesm2022/acorex-platform-widgets.mjs +744 -701
  76. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  77. package/fesm2022/acorex-platform-workflow.mjs +33 -25
  78. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  79. package/layout/builder/index.d.ts +6 -29
  80. package/layout/components/index.d.ts +62 -2
  81. package/layout/designer/index.d.ts +11 -20
  82. package/layout/entity/index.d.ts +302 -7
  83. package/package.json +5 -5
  84. package/widgets/index.d.ts +14 -16
  85. package/workflow/index.d.ts +154 -18
  86. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-nzWNHDO7.mjs +0 -115
  87. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-nzWNHDO7.mjs.map +0 -1
  88. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Cn-0fTWn.mjs.map +0 -1
  89. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B8XrO58H.mjs.map +0 -1
  90. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-C7mpTEda.mjs +0 -56
  91. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-C7mpTEda.mjs.map +0 -1
  92. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-Y12esByc.mjs.map +0 -1
  93. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-D_970YBz.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, HostBinding, ChangeDetectionStrategy, Component, viewChild, ViewChild, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, computed, signal, Injector, EnvironmentInjector, runInInjectionContext, makeEnvironmentProviders, effect, HostBinding, ChangeDetectionStrategy, Component, viewChild, ViewChild, NgModule } from '@angular/core';
3
3
  import { castArray, get, cloneDeep, set, merge, isNil, isEmpty, sortBy } from 'lodash-es';
4
4
  import * as i1$2 from '@acorex/cdk/common';
5
5
  import { AXDataSource, AXCommonModule } from '@acorex/cdk/common';
@@ -10,7 +10,7 @@ import { AXPExpressionEvaluatorService, AXPPlatformScope, extractValue, setSmart
10
10
  import * as i2$2 from '@acorex/platform/workflow';
11
11
  import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
12
12
  import * as i6 from '@acorex/platform/layout/builder';
13
- import { AXPPageStatus, AXPWidgetRegistryService, AXPValueWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXPWidgetsCatalog, AXPWidgetGroupEnum, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
13
+ import { AXPPageStatus, AXPWidgetRegistryService, AXPValueWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXPWidgetsCatalog, AXPWidgetGroupEnum, AXP_WIDGETS_EDITOR_CATEGORY, AXPLayoutWidgetComponent } from '@acorex/platform/layout/builder';
14
14
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
15
15
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
16
16
  import { Subject, takeUntil } from 'rxjs';
@@ -61,10 +61,10 @@ class AXPDataSeederService {
61
61
  await loader?.seed();
62
62
  }
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
65
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPDataSeederService, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPDataSeederService, decorators: [{
68
68
  type: Injectable,
69
69
  args: [{ providedIn: 'root' }]
70
70
  }] });
@@ -89,10 +89,10 @@ class AXPEntityResolver {
89
89
  }
90
90
  return null;
91
91
  }
92
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
93
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityResolver, providedIn: 'root' }); }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
93
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityResolver, providedIn: 'root' }); }
94
94
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityResolver, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityResolver, decorators: [{
96
96
  type: Injectable,
97
97
  args: [{ providedIn: 'root' }]
98
98
  }] });
@@ -337,6 +337,7 @@ class AXPEntityDetailListViewModel {
337
337
  return;
338
338
  const actionData = action.options?.process?.data;
339
339
  const initialData = actionData ? { ...data, ...(await this.evaluateExpressions(actionData)) } : data;
340
+ const options = await this.evaluateExpressions(action?.options);
340
341
  await this.workflow.execute(commandName.split('&')[0], {
341
342
  entity: getEntityInfo(this.detailEntity()).source,
342
343
  data: action.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : initialData,
@@ -347,7 +348,7 @@ class AXPEntityDetailListViewModel {
347
348
  parentKey: this.detailEntity()?.parentKey,
348
349
  source: this.detailEntity()?.source,
349
350
  },
350
- options: action.options,
351
+ options,
351
352
  });
352
353
  }
353
354
  }
@@ -578,10 +579,10 @@ class AXPEntityMiddleware {
578
579
  modifier(context);
579
580
  return context.toEntity();
580
581
  }
581
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMiddleware, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
582
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMiddleware, providedIn: 'root' }); }
582
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMiddleware, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
583
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMiddleware, providedIn: 'root' }); }
583
584
  }
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMiddleware, decorators: [{
585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMiddleware, decorators: [{
585
586
  type: Injectable,
586
587
  args: [{ providedIn: 'root' }]
587
588
  }], ctorParameters: () => [] });
@@ -691,10 +692,10 @@ class AXPEntityDefinitionRegistryService {
691
692
  createEntityKey(moduleName, entityName) {
692
693
  return `${moduleName}.${entityName}`;
693
694
  }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
695
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, providedIn: 'root' }); }
695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDefinitionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
696
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDefinitionRegistryService, providedIn: 'root' }); }
696
697
  }
697
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, decorators: [{
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDefinitionRegistryService, decorators: [{
698
699
  type: Injectable,
699
700
  args: [{
700
701
  providedIn: 'root',
@@ -869,10 +870,10 @@ class AXPEntityCreateViewModelFactory {
869
870
  this.layout.setNavigationLoading(false);
870
871
  return new AXPEntityMasterCreateViewModel(this.injector, config, initialData, options);
871
872
  }
872
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
873
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
873
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
874
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
874
875
  }
875
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, decorators: [{
876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateViewModelFactory, decorators: [{
876
877
  type: Injectable,
877
878
  args: [{ providedIn: 'root' }]
878
879
  }] });
@@ -1311,10 +1312,10 @@ class AXPEntityListViewModelFactory {
1311
1312
  this.layout.setNavigationLoading(false);
1312
1313
  return new AXPEntityMasterListViewModel(this.injector, config);
1313
1314
  }
1314
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityListViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1315
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityListViewModelFactory, providedIn: 'root' }); }
1315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityListViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1316
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityListViewModelFactory, providedIn: 'root' }); }
1316
1317
  }
1317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityListViewModelFactory, decorators: [{
1318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityListViewModelFactory, decorators: [{
1318
1319
  type: Injectable,
1319
1320
  args: [{ providedIn: 'root' }]
1320
1321
  }] });
@@ -1332,10 +1333,10 @@ class AXPEntityService {
1332
1333
  createPath(module, entity, path = 'list') {
1333
1334
  return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
1334
1335
  }
1335
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1336
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
1336
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1337
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
1337
1338
  }
1338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityService, decorators: [{
1339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityService, decorators: [{
1339
1340
  type: Injectable,
1340
1341
  args: [{ providedIn: 'root' }]
1341
1342
  }] });
@@ -1489,10 +1490,10 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1489
1490
  }
1490
1491
  }
1491
1492
  }
1492
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1493
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
1493
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1494
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
1494
1495
  }
1495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
1496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
1496
1497
  type: Injectable
1497
1498
  }] });
1498
1499
  const AXPDeleteEntityWorkflow = {
@@ -1654,10 +1655,10 @@ class AXPEntityMasterUpdateViewModelFactory {
1654
1655
  this.layout.setNavigationLoading(false);
1655
1656
  return Promise.reject('cannot fetch ');
1656
1657
  }
1657
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1658
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
1658
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1659
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
1659
1660
  }
1660
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
1661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
1661
1662
  type: Injectable,
1662
1663
  args: [{ providedIn: 'root' }]
1663
1664
  }] });
@@ -1700,10 +1701,10 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
1700
1701
  context.setVariable('data', cloneDeep(popup.data.context));
1701
1702
  }
1702
1703
  }
1703
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1704
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
1704
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1705
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
1705
1706
  }
1706
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
1707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
1707
1708
  type: Injectable
1708
1709
  }] });
1709
1710
  class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
@@ -1718,10 +1719,10 @@ class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
1718
1719
  },
1719
1720
  }));
1720
1721
  }
1721
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1722
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
1722
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1723
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
1723
1724
  }
1724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
1725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
1725
1726
  type: Injectable
1726
1727
  }] });
1727
1728
  const AXPModifyEntitySectionWorkflow = {
@@ -1766,6 +1767,7 @@ class AXPEntityMasterSingleViewGroupViewModel {
1766
1767
  this.group = this.entity.groups?.find((c) => c.id == this.section.id);
1767
1768
  this.name = signal(this.group.id, ...(ngDevMode ? [{ debugName: "name" }] : []));
1768
1769
  this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
1770
+ this.type = signal(this.section.type ?? 'section', ...(ngDevMode ? [{ debugName: "type" }] : []));
1769
1771
  this.title = computed(() => {
1770
1772
  return this.group.title ?? this.group.id;
1771
1773
  }, ...(ngDevMode ? [{ debugName: "title" }] : []));
@@ -1841,6 +1843,7 @@ class AXPEntityMasterSingleViewModel {
1841
1843
  this.destroyed = new Subject();
1842
1844
  this.translateService = this.injector.get(AXTranslationService);
1843
1845
  this.entityService = this.injector.get(AXPEntityService);
1846
+ this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
1844
1847
  this.context = signal(cloneDeep(this.entityData), ...(ngDevMode ? [{ debugName: "context" }] : []));
1845
1848
  this.actions = computed(() => {
1846
1849
  return (this.entityDef.interfaces?.master?.single?.actions?.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? []);
@@ -1889,6 +1892,16 @@ class AXPEntityMasterSingleViewModel {
1889
1892
  },
1890
1893
  ];
1891
1894
  }, ...(ngDevMode ? [{ debugName: "beardcrumbs" }] : []));
1895
+ this.evaluateExpressions = async (options, data) => {
1896
+ const scope = {
1897
+ context: {
1898
+ eval: (path) => {
1899
+ return get(data, path);
1900
+ },
1901
+ },
1902
+ };
1903
+ return await this.expressionEvaluator.evaluate(options, scope);
1904
+ };
1892
1905
  this.relatedEntities = computed(async () => {
1893
1906
  const relatedEntities = this.entityDef.relatedEntities?.map((re) => new AXPEntityDetailListViewModel(this.injector, re, { entity: this.entityDef, data: this.entityData })) ?? [];
1894
1907
  const filteredEntities = await Promise.all(relatedEntities.map(async (re) => ((await re.hidden()) ? null : re)));
@@ -1937,10 +1950,12 @@ class AXPEntityMasterSingleViewModel {
1937
1950
  break;
1938
1951
  }
1939
1952
  default: {
1940
- const action = this.actions().find((c) => c.name == command);
1953
+ const action = this.actions().find((c) => c.name == commandName);
1954
+ const options = await this.evaluateExpressions(action?.options, this.context());
1941
1955
  this.workflow.execute(command, {
1942
1956
  entity: getEntityInfo(this.entityDef).source,
1943
- data: action?.scope == AXPEntityCommandScope.Individual ? this.context() : null,
1957
+ data: this.context(),
1958
+ options,
1944
1959
  });
1945
1960
  }
1946
1961
  }
@@ -1984,10 +1999,10 @@ class AXPEntityDetailViewModelFactory {
1984
1999
  this.layout.setNavigationLoading(false);
1985
2000
  return Promise.reject('cannot fetch ');
1986
2001
  }
1987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1988
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, providedIn: 'root' }); }
2002
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDetailViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2003
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDetailViewModelFactory, providedIn: 'root' }); }
1989
2004
  }
1990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, decorators: [{
2005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityDetailViewModelFactory, decorators: [{
1991
2006
  type: Injectable,
1992
2007
  args: [{ providedIn: 'root' }]
1993
2008
  }] });
@@ -2067,6 +2082,10 @@ class AXMEntityCrudServiceImpl {
2067
2082
  }
2068
2083
  return this._entityDataProvider.query(request);
2069
2084
  }
2085
+ async findOne(filter) {
2086
+ const result = await this._entityDataProvider.query({ filter, skip: 0, take: 1 });
2087
+ return result.items[0];
2088
+ }
2070
2089
  async getRoots(request) {
2071
2090
  const queryRequest = {
2072
2091
  skip: 0,
@@ -2118,6 +2137,735 @@ class AXMEntityCrudServiceImpl {
2118
2137
  }
2119
2138
  }
2120
2139
 
2140
+ /**
2141
+ * Compose entity storage middlewares into a pipeline
2142
+ */
2143
+ function composeEntityStorageMiddlewares(middlewares) {
2144
+ return (handler) => {
2145
+ let composed = handler;
2146
+ // Reverse order composition for proper middleware chain
2147
+ for (let i = middlewares.length - 1; i >= 0; i--) {
2148
+ const mw = middlewares[i];
2149
+ const next = composed;
2150
+ composed = (context) => mw(context, next);
2151
+ }
2152
+ return composed;
2153
+ };
2154
+ }
2155
+ /**
2156
+ * Helper function to generate unique request ID
2157
+ */
2158
+ function generateRequestId() {
2159
+ return `req_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
2160
+ }
2161
+
2162
+ /**
2163
+ * Registry for managing entity storage middlewares
2164
+ */
2165
+ class AXPEntityStorageRegistry {
2166
+ constructor() {
2167
+ this.globalMiddlewares = [];
2168
+ this.entitySpecificMiddlewares = new Map();
2169
+ this.operationSpecificMiddlewares = new Map();
2170
+ }
2171
+ /**
2172
+ * Add a global middleware that applies to all operations
2173
+ */
2174
+ useGlobal(middleware) {
2175
+ this.globalMiddlewares.push(middleware);
2176
+ }
2177
+ /**
2178
+ * Add middleware for specific entity
2179
+ */
2180
+ useForEntity(entityName, middleware) {
2181
+ if (!this.entitySpecificMiddlewares.has(entityName)) {
2182
+ this.entitySpecificMiddlewares.set(entityName, []);
2183
+ }
2184
+ this.entitySpecificMiddlewares.get(entityName).push(middleware);
2185
+ }
2186
+ /**
2187
+ * Add middleware for specific operation (getOne, insertOne, etc.)
2188
+ */
2189
+ useForOperation(operation, middleware) {
2190
+ if (!this.operationSpecificMiddlewares.has(operation)) {
2191
+ this.operationSpecificMiddlewares.set(operation, []);
2192
+ }
2193
+ this.operationSpecificMiddlewares.get(operation).push(middleware);
2194
+ }
2195
+ /**
2196
+ * Get all applicable middlewares for a given context
2197
+ */
2198
+ getMiddlewares(entityName, operation) {
2199
+ const middlewares = [];
2200
+ // Add global middlewares
2201
+ middlewares.push(...this.globalMiddlewares);
2202
+ // Add entity-specific middlewares
2203
+ const entityMiddlewares = this.entitySpecificMiddlewares.get(entityName);
2204
+ if (entityMiddlewares) {
2205
+ middlewares.push(...entityMiddlewares);
2206
+ }
2207
+ // Add operation-specific middlewares
2208
+ const operationMiddlewares = this.operationSpecificMiddlewares.get(operation);
2209
+ if (operationMiddlewares) {
2210
+ middlewares.push(...operationMiddlewares);
2211
+ }
2212
+ return middlewares;
2213
+ }
2214
+ /**
2215
+ * Get all global middlewares
2216
+ */
2217
+ getGlobalMiddlewares() {
2218
+ return [...this.globalMiddlewares];
2219
+ }
2220
+ /**
2221
+ * Remove middleware from global middlewares
2222
+ */
2223
+ removeGlobalMiddleware(middleware) {
2224
+ const index = this.globalMiddlewares.indexOf(middleware);
2225
+ if (index > -1) {
2226
+ this.globalMiddlewares.splice(index, 1);
2227
+ return true;
2228
+ }
2229
+ return false;
2230
+ }
2231
+ /**
2232
+ * Clear all middlewares
2233
+ */
2234
+ clear() {
2235
+ this.globalMiddlewares.length = 0;
2236
+ this.entitySpecificMiddlewares.clear();
2237
+ this.operationSpecificMiddlewares.clear();
2238
+ }
2239
+ /**
2240
+ * Get registered entity names that have specific middlewares
2241
+ */
2242
+ getRegisteredEntityNames() {
2243
+ return Array.from(this.entitySpecificMiddlewares.keys());
2244
+ }
2245
+ /**
2246
+ * Get registered operation names that have specific middlewares
2247
+ */
2248
+ getRegisteredOperations() {
2249
+ return Array.from(this.operationSpecificMiddlewares.keys());
2250
+ }
2251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2252
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageRegistry, providedIn: 'root' }); }
2253
+ }
2254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageRegistry, decorators: [{
2255
+ type: Injectable,
2256
+ args: [{ providedIn: 'root' }]
2257
+ }] });
2258
+
2259
+ /**
2260
+ * Executor that wraps entity storage operations with middleware pipeline
2261
+ */
2262
+ class AXPEntityStorageExecutor {
2263
+ constructor(storageService) {
2264
+ this.storageService = storageService;
2265
+ this.injector = inject(EnvironmentInjector);
2266
+ this.registry = inject(AXPEntityStorageRegistry);
2267
+ }
2268
+ /**
2269
+ * Execute getOne operation with middleware pipeline
2270
+ */
2271
+ async getOne(entityName, id) {
2272
+ const context = {
2273
+ operation: 'getOne',
2274
+ entityName,
2275
+ dbName: this.storageService.dbName,
2276
+ input: { id },
2277
+ metadata: {
2278
+ startTime: Date.now(),
2279
+ requestId: generateRequestId(),
2280
+ },
2281
+ };
2282
+ const handler = async (ctx) => {
2283
+ return this.storageService.getOne(ctx.entityName, ctx.input.id);
2284
+ };
2285
+ return this.executeWithMiddleware(context, handler);
2286
+ }
2287
+ /**
2288
+ * Execute getAll operation with middleware pipeline
2289
+ */
2290
+ async getAll(entityName) {
2291
+ const context = {
2292
+ operation: 'getAll',
2293
+ entityName,
2294
+ dbName: this.storageService.dbName,
2295
+ input: {},
2296
+ metadata: {
2297
+ startTime: Date.now(),
2298
+ requestId: generateRequestId(),
2299
+ },
2300
+ };
2301
+ const handler = async (ctx) => {
2302
+ return this.storageService.getAll(ctx.entityName);
2303
+ };
2304
+ return this.executeWithMiddleware(context, handler);
2305
+ }
2306
+ /**
2307
+ * Execute insertOne operation with middleware pipeline
2308
+ */
2309
+ async insertOne(entityName, entity) {
2310
+ const context = {
2311
+ operation: 'insertOne',
2312
+ entityName,
2313
+ dbName: this.storageService.dbName,
2314
+ input: { entity },
2315
+ metadata: {
2316
+ startTime: Date.now(),
2317
+ requestId: generateRequestId(),
2318
+ },
2319
+ };
2320
+ const handler = async (ctx) => {
2321
+ return this.storageService.insertOne(ctx.entityName, ctx.input.entity);
2322
+ };
2323
+ return this.executeWithMiddleware(context, handler);
2324
+ }
2325
+ /**
2326
+ * Execute updateOne operation with middleware pipeline
2327
+ */
2328
+ async updateOne(entityName, id, keyValues) {
2329
+ const context = {
2330
+ operation: 'updateOne',
2331
+ entityName,
2332
+ dbName: this.storageService.dbName,
2333
+ input: { id, keyValues },
2334
+ metadata: {
2335
+ startTime: Date.now(),
2336
+ requestId: generateRequestId(),
2337
+ },
2338
+ };
2339
+ const handler = async (ctx) => {
2340
+ return this.storageService.updateOne(ctx.entityName, ctx.input.id, ctx.input.keyValues);
2341
+ };
2342
+ return this.executeWithMiddleware(context, handler);
2343
+ }
2344
+ /**
2345
+ * Execute deleteOne operation with middleware pipeline
2346
+ */
2347
+ async deleteOne(entityName, id) {
2348
+ const context = {
2349
+ operation: 'deleteOne',
2350
+ entityName,
2351
+ dbName: this.storageService.dbName,
2352
+ input: { id },
2353
+ metadata: {
2354
+ startTime: Date.now(),
2355
+ requestId: generateRequestId(),
2356
+ },
2357
+ };
2358
+ const handler = async (ctx) => {
2359
+ return this.storageService.deleteOne(ctx.entityName, ctx.input.id);
2360
+ };
2361
+ return this.executeWithMiddleware(context, handler);
2362
+ }
2363
+ /**
2364
+ * Execute query operation with middleware pipeline
2365
+ */
2366
+ async query(entityName, request) {
2367
+ const context = {
2368
+ operation: 'query',
2369
+ entityName,
2370
+ dbName: this.storageService.dbName,
2371
+ input: { request },
2372
+ metadata: {
2373
+ startTime: Date.now(),
2374
+ requestId: generateRequestId(),
2375
+ },
2376
+ };
2377
+ const handler = async (ctx) => {
2378
+ return this.storageService.query(ctx.entityName, ctx.input.request);
2379
+ };
2380
+ return this.executeWithMiddleware(context, handler);
2381
+ }
2382
+ /**
2383
+ * Execute initial operation with middleware pipeline
2384
+ */
2385
+ async initial(entityName, collection, options) {
2386
+ const context = {
2387
+ operation: 'initial',
2388
+ entityName,
2389
+ dbName: this.storageService.dbName,
2390
+ input: { collection, options },
2391
+ metadata: {
2392
+ startTime: Date.now(),
2393
+ requestId: generateRequestId(),
2394
+ },
2395
+ };
2396
+ const handler = async (ctx) => {
2397
+ return this.storageService.initial(ctx.entityName, ctx.input.collection, ctx.input.options);
2398
+ };
2399
+ return this.executeWithMiddleware(context, handler);
2400
+ }
2401
+ /**
2402
+ * Execute operation with middleware pipeline
2403
+ */
2404
+ async executeWithMiddleware(context, handler) {
2405
+ const middlewares = this.registry.getMiddlewares(context.entityName, context.operation);
2406
+ // Wrap middlewares with injection context
2407
+ const wrappedMiddlewares = middlewares.map(middleware => {
2408
+ return (ctx, next) => runInInjectionContext(this.injector, () => middleware(ctx, next));
2409
+ });
2410
+ const composed = composeEntityStorageMiddlewares(wrappedMiddlewares)(handler);
2411
+ return composed(context);
2412
+ }
2413
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageExecutor, deps: [{ token: AXPEntityStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2414
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageExecutor, providedIn: 'root' }); }
2415
+ }
2416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageExecutor, decorators: [{
2417
+ type: Injectable,
2418
+ args: [{ providedIn: 'root' }]
2419
+ }], ctorParameters: () => [{ type: AXPEntityStorageService }] });
2420
+
2421
+ /**
2422
+ * Entity Storage Service with middleware support
2423
+ *
2424
+ * This service wraps the original AXPEntityStorageService and adds middleware pipeline support.
2425
+ * It delegates all operations to the middleware executor which applies the middleware chain.
2426
+ */
2427
+ class AXPEntityStorageWithMiddlewareService extends AXPEntityStorageService {
2428
+ constructor(originalStorageService, registry) {
2429
+ super();
2430
+ this.originalStorageService = originalStorageService;
2431
+ this.registry = registry;
2432
+ this.executor = new AXPEntityStorageExecutor(originalStorageService);
2433
+ }
2434
+ get dbName() {
2435
+ return this.originalStorageService.dbName;
2436
+ }
2437
+ // Middleware Management Methods
2438
+ /**
2439
+ * Add a global middleware that applies to all operations
2440
+ */
2441
+ useGlobal(middleware) {
2442
+ this.registry.useGlobal(middleware);
2443
+ }
2444
+ /**
2445
+ * Add middleware for specific entity
2446
+ */
2447
+ useForEntity(entityName, middleware) {
2448
+ this.registry.useForEntity(entityName, middleware);
2449
+ }
2450
+ /**
2451
+ * Add middleware for specific operation
2452
+ */
2453
+ useForOperation(operation, middleware) {
2454
+ this.registry.useForOperation(operation, middleware);
2455
+ }
2456
+ // Storage Operations with Middleware Pipeline
2457
+ async initial(entityName, collection, options) {
2458
+ return this.executor.initial(entityName, collection, options);
2459
+ }
2460
+ async getOne(entityName, id) {
2461
+ return this.executor.getOne(entityName, id);
2462
+ }
2463
+ async updateOne(entityName, id, keyValues) {
2464
+ return this.executor.updateOne(entityName, id, keyValues);
2465
+ }
2466
+ async deleteOne(entityName, id) {
2467
+ return this.executor.deleteOne(entityName, id);
2468
+ }
2469
+ async insertOne(entityName, entity) {
2470
+ return this.executor.insertOne(entityName, entity);
2471
+ }
2472
+ async getAll(entityName) {
2473
+ return this.executor.getAll(entityName);
2474
+ }
2475
+ async query(entityName, request) {
2476
+ return this.executor.query(entityName, request);
2477
+ }
2478
+ // Direct access to original service (bypass middleware)
2479
+ get originalService() {
2480
+ return this.originalStorageService;
2481
+ }
2482
+ // Access to registry for advanced middleware management
2483
+ get middlewareRegistry() {
2484
+ return this.registry;
2485
+ }
2486
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageWithMiddlewareService, deps: [{ token: AXPEntityStorageService }, { token: AXPEntityStorageRegistry }], target: i0.ɵɵFactoryTarget.Injectable }); }
2487
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageWithMiddlewareService }); }
2488
+ }
2489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityStorageWithMiddlewareService, decorators: [{
2490
+ type: Injectable
2491
+ }], ctorParameters: () => [{ type: AXPEntityStorageService }, { type: AXPEntityStorageRegistry }] });
2492
+
2493
+ /**
2494
+ * Injection token for entity storage middleware setup
2495
+ */
2496
+ const AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP = new InjectionToken('AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP');
2497
+ /**
2498
+ * Injection token for entity storage middleware extensions
2499
+ */
2500
+ const AXP_ENTITY_STORAGE_EXTENSION = new InjectionToken('AXP_ENTITY_STORAGE_EXTENSION');
2501
+ /**
2502
+ * Provide entity storage middleware configuration
2503
+ */
2504
+ function provideEntityStorageMiddleware(config) {
2505
+ const providers = [];
2506
+ // Register extension middlewares
2507
+ if (config.extensions) {
2508
+ providers.push(...config.extensions.map(ext => ({
2509
+ provide: AXP_ENTITY_STORAGE_EXTENSION,
2510
+ useValue: ext,
2511
+ multi: true,
2512
+ })));
2513
+ }
2514
+ // Main setup provider
2515
+ providers.push({
2516
+ provide: AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP,
2517
+ useFactory: () => {
2518
+ const registry = inject(AXPEntityStorageRegistry);
2519
+ // Register global middlewares
2520
+ if (config.global) {
2521
+ for (const middleware of config.global) {
2522
+ registry.useGlobal(middleware);
2523
+ }
2524
+ }
2525
+ // Register entity-specific middlewares
2526
+ if (config.entities) {
2527
+ for (const [entityName, middlewares] of Object.entries(config.entities)) {
2528
+ for (const middleware of middlewares) {
2529
+ registry.useForEntity(entityName, middleware);
2530
+ }
2531
+ }
2532
+ }
2533
+ // Register operation-specific middlewares
2534
+ if (config.operations) {
2535
+ for (const [operation, middlewares] of Object.entries(config.operations)) {
2536
+ for (const middleware of middlewares) {
2537
+ registry.useForOperation(operation, middleware);
2538
+ }
2539
+ }
2540
+ }
2541
+ return true;
2542
+ },
2543
+ multi: true,
2544
+ });
2545
+ return makeEnvironmentProviders(providers);
2546
+ }
2547
+ /**
2548
+ * Simplified provider for global middleware only
2549
+ */
2550
+ function provideGlobalEntityStorageMiddleware(middlewares) {
2551
+ return provideEntityStorageMiddleware({ global: middlewares });
2552
+ }
2553
+ /**
2554
+ * Provider for entity-specific middlewares
2555
+ */
2556
+ function provideEntitySpecificMiddleware(entityName, middlewares) {
2557
+ return provideEntityStorageMiddleware({
2558
+ entities: { [entityName]: middlewares }
2559
+ });
2560
+ }
2561
+ /**
2562
+ * Provider for operation-specific middlewares
2563
+ */
2564
+ function provideOperationSpecificMiddleware(operation, middlewares) {
2565
+ return provideEntityStorageMiddleware({
2566
+ operations: { [operation]: middlewares }
2567
+ });
2568
+ }
2569
+
2570
+ /**
2571
+ * Logging middleware for entity storage operations
2572
+ */
2573
+ const loggingMiddleware = async (context, next) => {
2574
+ const startTime = Date.now();
2575
+ console.group(`🔄 Entity Storage Operation: ${context.operation}`);
2576
+ console.log('📋 Entity:', context.entityName);
2577
+ console.log('🗄️ Database:', context.dbName);
2578
+ console.log('📨 Input:', context.input);
2579
+ console.log('🆔 Request ID:', context.metadata.requestId);
2580
+ try {
2581
+ const result = await next(context);
2582
+ const duration = Date.now() - startTime;
2583
+ console.log('✅ Success');
2584
+ console.log('⏱️ Duration:', `${duration}ms`);
2585
+ console.log('📤 Result:', result);
2586
+ console.groupEnd();
2587
+ return result;
2588
+ }
2589
+ catch (error) {
2590
+ const duration = Date.now() - startTime;
2591
+ console.error('❌ Error');
2592
+ console.error('⏱️ Duration:', `${duration}ms`);
2593
+ console.error('💥 Error:', error);
2594
+ console.groupEnd();
2595
+ throw error;
2596
+ }
2597
+ };
2598
+ /**
2599
+ * Performance monitoring middleware
2600
+ */
2601
+ const performanceMiddleware = async (context, next) => {
2602
+ const startTime = performance.now();
2603
+ try {
2604
+ const result = await next(context);
2605
+ const duration = performance.now() - startTime;
2606
+ // Log slow operations (> 1000ms)
2607
+ if (duration > 1000) {
2608
+ console.warn(`⚠️ Slow operation detected: ${context.operation} on ${context.entityName} took ${duration.toFixed(2)}ms`);
2609
+ }
2610
+ // Add performance metrics to context
2611
+ context.metadata['performanceMetrics'] = {
2612
+ duration,
2613
+ operation: context.operation,
2614
+ entityName: context.entityName,
2615
+ };
2616
+ return result;
2617
+ }
2618
+ catch (error) {
2619
+ const duration = performance.now() - startTime;
2620
+ console.error(`❌ Failed operation: ${context.operation} on ${context.entityName} failed after ${duration.toFixed(2)}ms`);
2621
+ throw error;
2622
+ }
2623
+ };
2624
+ /**
2625
+ * Error handling middleware with retry logic
2626
+ */
2627
+ const errorHandlingMiddleware = async (context, next) => {
2628
+ const maxRetries = 3;
2629
+ let attempt = 0;
2630
+ while (attempt < maxRetries) {
2631
+ try {
2632
+ const result = await next(context);
2633
+ if (attempt > 0) {
2634
+ console.log(`✅ Operation succeeded on retry ${attempt}/${maxRetries}`);
2635
+ }
2636
+ return result;
2637
+ }
2638
+ catch (error) {
2639
+ attempt++;
2640
+ // Don't retry for certain operations or error types
2641
+ if (context.operation === 'deleteOne' ||
2642
+ error?.code === 'VALIDATION_ERROR' ||
2643
+ attempt >= maxRetries) {
2644
+ console.error(`❌ Operation failed after ${attempt} attempts:`, error);
2645
+ throw error;
2646
+ }
2647
+ console.warn(`⚠️ Attempt ${attempt}/${maxRetries} failed, retrying...`, error.message);
2648
+ // Wait before retry (exponential backoff)
2649
+ await new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000));
2650
+ }
2651
+ }
2652
+ throw new Error('Max retries exceeded');
2653
+ };
2654
+ /**
2655
+ * Validation middleware
2656
+ */
2657
+ const validationMiddleware = async (context, next) => {
2658
+ // Validate input based on operation
2659
+ switch (context.operation) {
2660
+ case 'insertOne':
2661
+ if (!context.input.entity) {
2662
+ throw new Error('Entity is required for insertOne operation');
2663
+ }
2664
+ break;
2665
+ case 'updateOne':
2666
+ if (!context.input.id) {
2667
+ throw new Error('ID is required for updateOne operation');
2668
+ }
2669
+ if (!context.input.keyValues) {
2670
+ throw new Error('Key values are required for updateOne operation');
2671
+ }
2672
+ break;
2673
+ case 'deleteOne':
2674
+ case 'getOne':
2675
+ if (!context.input.id) {
2676
+ throw new Error(`ID is required for ${context.operation} operation`);
2677
+ }
2678
+ break;
2679
+ case 'query':
2680
+ if (!context.input.request) {
2681
+ throw new Error('Request is required for query operation');
2682
+ }
2683
+ break;
2684
+ case 'initial':
2685
+ if (!context.input.collection || !Array.isArray(context.input.collection)) {
2686
+ throw new Error('Collection array is required for initial operation');
2687
+ }
2688
+ break;
2689
+ }
2690
+ return next(context);
2691
+ };
2692
+ /**
2693
+ * Caching middleware (simple in-memory cache)
2694
+ */
2695
+ const cachingMiddleware = (() => {
2696
+ const cache = new Map();
2697
+ const DEFAULT_TTL = 5 * 60 * 1000; // 5 minutes
2698
+ return async (context, next) => {
2699
+ // Only cache read operations
2700
+ if (!['getOne', 'getAll', 'query'].includes(context.operation)) {
2701
+ // Clear cache for write operations on the same entity
2702
+ const keysToDelete = Array.from(cache.keys()).filter(key => key.includes(`${context.entityName}:`));
2703
+ keysToDelete.forEach(key => cache.delete(key));
2704
+ return next(context);
2705
+ }
2706
+ // Generate cache key
2707
+ const cacheKey = `${context.entityName}:${context.operation}:${JSON.stringify(context.input)}`;
2708
+ // Check cache
2709
+ const cached = cache.get(cacheKey);
2710
+ if (cached && Date.now() - cached.timestamp < cached.ttl) {
2711
+ console.log(`💾 Cache hit for ${cacheKey}`);
2712
+ return cached.data;
2713
+ }
2714
+ // Execute and cache result
2715
+ const result = await next(context);
2716
+ cache.set(cacheKey, {
2717
+ data: result,
2718
+ timestamp: Date.now(),
2719
+ ttl: DEFAULT_TTL,
2720
+ });
2721
+ console.log(`💾 Cached result for ${cacheKey}`);
2722
+ return result;
2723
+ };
2724
+ })();
2725
+
2726
+ /**
2727
+ * Simple in-memory audit storage (for demo purposes)
2728
+ */
2729
+ class InMemoryAuditStorage {
2730
+ constructor() {
2731
+ this.entries = [];
2732
+ }
2733
+ async save(entry) {
2734
+ this.entries.push(entry);
2735
+ console.log('📋 Audit entry saved:', entry);
2736
+ }
2737
+ getEntries() {
2738
+ return [...this.entries];
2739
+ }
2740
+ getEntriesForEntity(entityName) {
2741
+ return this.entries.filter(entry => entry.entityName === entityName);
2742
+ }
2743
+ clear() {
2744
+ this.entries.length = 0;
2745
+ }
2746
+ }
2747
+ // Global audit storage instance
2748
+ const auditStorage = new InMemoryAuditStorage();
2749
+ /**
2750
+ * Audit middleware that tracks all entity operations
2751
+ */
2752
+ const auditMiddleware = async (context, next) => {
2753
+ const auditEntry = {
2754
+ id: `audit_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
2755
+ entityName: context.entityName,
2756
+ operation: context.operation,
2757
+ user: context.metadata.user?.id || 'system',
2758
+ timestamp: new Date(),
2759
+ requestId: context.metadata.requestId,
2760
+ };
2761
+ // Add operation-specific data
2762
+ switch (context.operation) {
2763
+ case 'insertOne':
2764
+ auditEntry.changes = { created: context.input.entity };
2765
+ break;
2766
+ case 'updateOne':
2767
+ auditEntry.entityId = context.input.id;
2768
+ auditEntry.changes = { updated: context.input.keyValues };
2769
+ break;
2770
+ case 'deleteOne':
2771
+ auditEntry.entityId = context.input.id;
2772
+ auditEntry.changes = { deleted: true };
2773
+ break;
2774
+ case 'getOne':
2775
+ auditEntry.entityId = context.input.id;
2776
+ break;
2777
+ case 'query':
2778
+ auditEntry.metadata = { queryRequest: context.input.request };
2779
+ break;
2780
+ case 'initial':
2781
+ auditEntry.metadata = {
2782
+ collectionSize: context.input.collection?.length,
2783
+ options: context.input.options
2784
+ };
2785
+ break;
2786
+ }
2787
+ try {
2788
+ const result = await next(context);
2789
+ // For insert operations, capture the generated ID
2790
+ if (context.operation === 'insertOne' && result) {
2791
+ auditEntry.entityId = result;
2792
+ }
2793
+ // Save audit entry
2794
+ await auditStorage.save(auditEntry);
2795
+ return result;
2796
+ }
2797
+ catch (error) {
2798
+ // Save audit entry even for failed operations
2799
+ auditEntry.metadata = {
2800
+ ...auditEntry.metadata,
2801
+ error: error instanceof Error ? error.message : 'Unknown error'
2802
+ };
2803
+ await auditStorage.save(auditEntry);
2804
+ throw error;
2805
+ }
2806
+ };
2807
+ /**
2808
+ * User context middleware - adds user information to context
2809
+ */
2810
+ const userContextMiddleware = async (context, next) => {
2811
+ // In a real application, you would inject your auth service here
2812
+ // const authService = inject(AuthService);
2813
+ // const user = authService.getCurrentUser();
2814
+ // For demo purposes, we'll use a mock user
2815
+ const mockUser = {
2816
+ id: 'user123',
2817
+ name: 'John Doe',
2818
+ role: 'admin',
2819
+ };
2820
+ context.metadata.user = mockUser;
2821
+ return next(context);
2822
+ };
2823
+ /**
2824
+ * Data sanitization middleware - removes sensitive data from logs
2825
+ */
2826
+ const dataSanitizationMiddleware = async (context, next) => {
2827
+ const sensitiveFields = ['password', 'ssn', 'creditCard', 'apiKey', 'token'];
2828
+ // Sanitize input data
2829
+ if (context.input.entity) {
2830
+ context.input.entity = sanitizeObject(context.input.entity, sensitiveFields);
2831
+ }
2832
+ if (context.input.keyValues) {
2833
+ context.input.keyValues = sanitizeObject(context.input.keyValues, sensitiveFields);
2834
+ }
2835
+ const result = await next(context);
2836
+ // Sanitize result data if needed
2837
+ if (result && typeof result === 'object') {
2838
+ return sanitizeObject(result, sensitiveFields);
2839
+ }
2840
+ return result;
2841
+ };
2842
+ /**
2843
+ * Helper function to sanitize objects by removing sensitive fields
2844
+ */
2845
+ function sanitizeObject(obj, sensitiveFields) {
2846
+ if (!obj || typeof obj !== 'object') {
2847
+ return obj;
2848
+ }
2849
+ if (Array.isArray(obj)) {
2850
+ return obj.map(item => sanitizeObject(item, sensitiveFields));
2851
+ }
2852
+ const sanitized = { ...obj };
2853
+ for (const field of sensitiveFields) {
2854
+ if (field in sanitized) {
2855
+ sanitized[field] = '[REDACTED]';
2856
+ }
2857
+ }
2858
+ // Recursively sanitize nested objects
2859
+ for (const [key, value] of Object.entries(sanitized)) {
2860
+ if (value && typeof value === 'object') {
2861
+ sanitized[key] = sanitizeObject(value, sensitiveFields);
2862
+ }
2863
+ }
2864
+ return sanitized;
2865
+ }
2866
+
2867
+ // Core middleware types and utilities
2868
+
2121
2869
  class AXPEntityCommandSearchDefinitionProvider {
2122
2870
  async provide(context) {
2123
2871
  context.addDefinition('command', 'Commands', 'command', 'fa-solid fa-command', 1, {
@@ -2222,8 +2970,8 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
2222
2970
  cls[`ax-gap-1`] = true;
2223
2971
  return cls;
2224
2972
  }
2225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2226
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
2973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2974
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
2227
2975
  @if(loading())
2228
2976
  {
2229
2977
  <ax-loading></ax-loading>
@@ -2243,7 +2991,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
2243
2991
  }
2244
2992
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2245
2993
  }
2246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
2994
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
2247
2995
  type: Component,
2248
2996
  args: [{
2249
2997
  selector: 'axp-lookup-widget-view',
@@ -2339,8 +3087,8 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
2339
3087
  handleSelectClick() {
2340
3088
  this.close({ items: this.selectedItems() });
2341
3089
  }
2342
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2343
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPLookupWidgetSelectorComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3091
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPLookupWidgetSelectorComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
2344
3092
  <div class="ax-p-4 ax-flex ax-flex-col ax-gap-4 ax-overflow-hidden">
2345
3093
  @if (vm.hasInlineFilters()) {
2346
3094
  <div class="ax-w-full">
@@ -2407,7 +3155,7 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
2407
3155
  </ax-footer>
2408
3156
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i1$2.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3.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: i4.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i4.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i5.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: i6.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2409
3157
  }
2410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
3158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
2411
3159
  type: Component,
2412
3160
  args: [{
2413
3161
  template: `
@@ -2512,6 +3260,7 @@ class AXPLookupWidgetSelectorViewModel {
2512
3260
  },
2513
3261
  load: (e) => {
2514
3262
  const func = this.entityDef.queries.list?.execute;
3263
+ this.mergeFilter(e, this.options.customFilter);
2515
3264
  return func(e);
2516
3265
  },
2517
3266
  pageSize: 10,
@@ -2617,6 +3366,25 @@ class AXPLookupWidgetSelectorViewModel {
2617
3366
  const func = this.entityDef.queries.list?.execute;
2618
3367
  return (await func({ filter: this.inlineFilters, take: 10 })) ?? [];
2619
3368
  }
3369
+ setCustomFilter(filter) {
3370
+ this.options.customFilter = filter;
3371
+ this.applyFilterAndSort();
3372
+ }
3373
+ mergeFilter(request, filter) {
3374
+ if (!filter) {
3375
+ return request;
3376
+ }
3377
+ if (request.filter) {
3378
+ request.filter = {
3379
+ logic: 'and',
3380
+ filters: [...[request.filter], ...(filter.filters ?? [])]
3381
+ };
3382
+ }
3383
+ else {
3384
+ request.filter = filter;
3385
+ }
3386
+ return request;
3387
+ }
2620
3388
  }
2621
3389
 
2622
3390
  class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
@@ -2662,10 +3430,19 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
2662
3430
  if (this.getValue()) {
2663
3431
  this.findByValue();
2664
3432
  }
3433
+ else {
3434
+ this.clear();
3435
+ }
2665
3436
  }, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
3437
+ this.#efCustomFilter = effect(() => {
3438
+ if (this.customFilter()) {
3439
+ this.vm()?.setCustomFilter(this.customFilter());
3440
+ }
3441
+ }, ...(ngDevMode ? [{ debugName: "#efCustomFilter" }] : []));
2666
3442
  }
2667
3443
  #efEntity;
2668
3444
  #efValue;
3445
+ #efCustomFilter;
2669
3446
  async findByValue() {
2670
3447
  this.isLoading.set(true);
2671
3448
  const rawValue = this.getValue();
@@ -2696,7 +3473,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
2696
3473
  this.popupService
2697
3474
  .open(AXPLookupWidgetSelectorComponent, {
2698
3475
  title: `${this.translateService.translateSync('widget.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
2699
- size: columnsCount < 3 ? 'sm' : columnsCount > 3 ? 'lg' : 'md',
3476
+ size: columnsCount < 4 ? 'md' : 'lg',
2700
3477
  data: {
2701
3478
  vm: new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef(), {
2702
3479
  customFilter: this.customFilter(),
@@ -2797,6 +3574,13 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
2797
3574
  handleClearClick() {
2798
3575
  this.clear();
2799
3576
  }
3577
+ refresh() {
3578
+ this.clear();
3579
+ if (this.customFilter()) {
3580
+ this.vm()?.setCustomFilter(this.customFilter());
3581
+ }
3582
+ this.vm()?.dataSource.refresh();
3583
+ }
2800
3584
  clear() {
2801
3585
  this.setValue(null);
2802
3586
  this.clearInput();
@@ -2809,8 +3593,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
2809
3593
  singleOrMultiple(values) {
2810
3594
  return this.multiple() ? values : values[0];
2811
3595
  }
2812
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2813
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3596
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3597
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
2814
3598
  @if (look() == 'select') {
2815
3599
  <ax-select-box
2816
3600
  [dataSource]="vm()?.dataSource!"
@@ -2863,7 +3647,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
2863
3647
  //
2864
3648
  AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3.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: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: 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: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2865
3649
  }
2866
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
3650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
2867
3651
  type: Component,
2868
3652
  args: [{
2869
3653
  selector: 'axp-lookup-widget-edit',
@@ -2948,9 +3732,12 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
2948
3732
  this.badgeClass = this.options['badgeClass'] ?? 'ax-accent1';
2949
3733
  this.displayItems = computed(() => isNil(this.rawValue)
2950
3734
  ? []
2951
- : castArray(this.rawValue).map((item) => this.extractItem(item)), ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
3735
+ : castArray(this.rawValue).map((item) => this.extractItem(item)).filter((c) => c != null), ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
2952
3736
  }
2953
3737
  extractItem(item) {
3738
+ if (isNil(item)) {
3739
+ return null;
3740
+ }
2954
3741
  return typeof item == 'object'
2955
3742
  ? {
2956
3743
  [this.valueField]: item?.[this.valueField],
@@ -2961,8 +3748,8 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
2961
3748
  [this.textField]: item,
2962
3749
  };
2963
3750
  }
2964
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2965
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
3751
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3752
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
2966
3753
  <div class="ax-flex ax-gap-1">
2967
3754
  @for (item of displayItems(); track $index) {
2968
3755
  <ax-badge [text]="item[this.textField]" [class]="badgeClass"></ax-badge>
@@ -2973,7 +3760,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
2973
3760
  </div>
2974
3761
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2975
3762
  }
2976
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
3763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
2977
3764
  type: Component,
2978
3765
  args: [{
2979
3766
  template: `
@@ -3073,8 +3860,8 @@ class AXPTagableBoxWidgetColumnComponent extends AXPValueWidgetComponent {
3073
3860
  return Array.isArray(value) ? value : [value];
3074
3861
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
3075
3862
  }
3076
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3077
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPTagableBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3864
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPTagableBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3078
3865
  <div class="ax-flex ax-gap-1 ax-flex-wrap">
3079
3866
  @if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
3080
3867
  <ax-badge [look]="'twotone'" [text]="item[textField()]" color="primary"></ax-badge>
@@ -3086,7 +3873,7 @@ class AXPTagableBoxWidgetColumnComponent extends AXPValueWidgetComponent {
3086
3873
  </div>
3087
3874
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3088
3875
  }
3089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
3876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
3090
3877
  type: Component,
3091
3878
  args: [{
3092
3879
  template: `
@@ -3149,8 +3936,8 @@ class AXPTagableBoxWidgetEditComponent extends AXPValueWidgetComponent {
3149
3936
  cls[`ax-flex-1`] = true;
3150
3937
  return cls;
3151
3938
  }
3152
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3153
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPTagableBoxWidgetEditComponent, isStandalone: true, selector: "axp-tagable-box-widget", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
3939
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3940
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPTagableBoxWidgetEditComponent, isStandalone: true, selector: "axp-tagable-box-widget", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
3154
3941
  <div class="ax-grid ax-grid-cols-12 ax-gap-4">
3155
3942
  <!-- نمایش Select Box با دکمه اضافه کردن آیتم -->
3156
3943
  <ax-select-box
@@ -3191,7 +3978,7 @@ class AXPTagableBoxWidgetEditComponent extends AXPValueWidgetComponent {
3191
3978
  </div>
3192
3979
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3.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: AXValidationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i5.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3193
3980
  }
3194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
3981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
3195
3982
  type: Component,
3196
3983
  args: [{
3197
3984
  selector: 'axp-tagable-box-widget',
@@ -3259,10 +4046,10 @@ var tagableBoxWidgetEdit_component = /*#__PURE__*/Object.freeze({
3259
4046
  });
3260
4047
 
3261
4048
  class AXPTagableBoxWidgetFilterComponent extends AXPValueWidgetComponent {
3262
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3263
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: AXPTagableBoxWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4049
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4050
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPTagableBoxWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3264
4051
  }
3265
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, decorators: [{
4052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, decorators: [{
3266
4053
  type: Component,
3267
4054
  args: [{
3268
4055
  template: ``,
@@ -3297,8 +4084,8 @@ class AXPTagableBoxWidgetPrintComponent extends AXPValueWidgetComponent {
3297
4084
  return Array.isArray(value) ? value : [value];
3298
4085
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
3299
4086
  }
3300
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3301
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPTagableBoxWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
4087
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4088
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPTagableBoxWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3302
4089
  <div>
3303
4090
  @if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
3304
4091
  <span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
@@ -3314,7 +4101,7 @@ class AXPTagableBoxWidgetPrintComponent extends AXPValueWidgetComponent {
3314
4101
  </div>
3315
4102
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3316
4103
  }
3317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, decorators: [{
4104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, decorators: [{
3318
4105
  type: Component,
3319
4106
  args: [{
3320
4107
  template: `
@@ -3363,14 +4150,14 @@ class AXPTagableBoxWidgetViewComponent extends AXPValueWidgetComponent {
3363
4150
  return Array.isArray(value) ? value : [value];
3364
4151
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
3365
4152
  }
3366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3367
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPTagableBoxWidgetViewComponent, isStandalone: true, selector: "axp-tagable-box-widget", usesInheritance: true, ngImport: i0, template: `
4153
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4154
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPTagableBoxWidgetViewComponent, isStandalone: true, selector: "axp-tagable-box-widget", usesInheritance: true, ngImport: i0, template: `
3368
4155
  @for (item of internalValue(); track $index) {
3369
4156
  <ax-badge [look]="'twotone'" [text]="item" color="primary"></ax-badge>
3370
4157
  }
3371
4158
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3372
4159
  }
3373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
4160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
3374
4161
  type: Component,
3375
4162
  args: [{
3376
4163
  selector: 'axp-tagable-box-widget',
@@ -3465,8 +4252,8 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
3465
4252
  const widget = this.widgetRegisteryService.resolve(e.values.type);
3466
4253
  this.setValue({ title: widget?.title, ...e.values });
3467
4254
  }
3468
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3469
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
4255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4256
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
3470
4257
  <ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
3471
4258
  @for (validation of validationRules(); track $index) {
3472
4259
  <ax-validation-rule
@@ -3487,7 +4274,7 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
3487
4274
  }
3488
4275
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.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: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3489
4276
  }
3490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
4277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
3491
4278
  type: Component,
3492
4279
  args: [{
3493
4280
  template: `
@@ -3534,10 +4321,10 @@ var widgetSelectorWidgetEdit_component = /*#__PURE__*/Object.freeze({
3534
4321
  });
3535
4322
 
3536
4323
  class AXPWidgetSelectorWidgetViewComponent extends AXPValueWidgetComponent {
3537
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3538
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4324
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4325
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3539
4326
  }
3540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
4327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
3541
4328
  type: Component,
3542
4329
  args: [{
3543
4330
  template: `{{ getValue()?.title }}`,
@@ -3614,10 +4401,10 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
3614
4401
  }
3615
4402
  }
3616
4403
  }
3617
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3618
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreatePopupAction }); }
4404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4405
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreatePopupAction }); }
3619
4406
  }
3620
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
4407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
3621
4408
  type: Injectable
3622
4409
  }] });
3623
4410
  class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
@@ -3625,10 +4412,10 @@ class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
3625
4412
  this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
3626
4413
  this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
3627
4414
  }
3628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3629
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
4415
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4416
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
3630
4417
  }
3631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
4418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
3632
4419
  type: Injectable
3633
4420
  }] });
3634
4421
  const AXPCreateEntityWorkflow = {
@@ -3687,6 +4474,7 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
3687
4474
  const data = context.getVariable('data');
3688
4475
  const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
3689
4476
  const { parentKey } = entityRef;
4477
+ console.log(data);
3690
4478
  const { id } = data;
3691
4479
  const { interfaces, title } = entityRef;
3692
4480
  const properties = interfaces?.master?.update?.properties?.map((p) => p.name) || [];
@@ -3718,10 +4506,10 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
3718
4506
  context.setVariable('data', cloneDeep(popup.data.context));
3719
4507
  }
3720
4508
  }
3721
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3722
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
4509
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4510
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
3723
4511
  }
3724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
4512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
3725
4513
  type: Injectable
3726
4514
  }] });
3727
4515
  const AXPQuickModifyEntityWorkflow = {
@@ -3778,10 +4566,10 @@ class AXPEntityApplyUpdatesAction extends AXPWorkflowAction {
3778
4566
  context.setOutput('error', error);
3779
4567
  }
3780
4568
  }
3781
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityApplyUpdatesAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3782
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityApplyUpdatesAction }); }
4569
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityApplyUpdatesAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4570
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityApplyUpdatesAction }); }
3783
4571
  }
3784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityApplyUpdatesAction, decorators: [{
4572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityApplyUpdatesAction, decorators: [{
3785
4573
  type: Injectable
3786
4574
  }] });
3787
4575
 
@@ -3800,10 +4588,10 @@ class AXPShowDetailViewAction extends AXPWorkflowAction {
3800
4588
  context.setVariable('payload', newPayload);
3801
4589
  this.navigation.execute(context);
3802
4590
  }
3803
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3804
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowDetailViewAction }); }
4591
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4592
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowDetailViewAction }); }
3805
4593
  }
3806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
4594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
3807
4595
  type: Injectable
3808
4596
  }] });
3809
4597
  const AXPShowDetailsViewWorkflow = {
@@ -3829,12 +4617,14 @@ class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
3829
4617
  const accept = context.getVariable('options.accept');
3830
4618
  const maxFileSize = context.getVariable('options.maxFileSize');
3831
4619
  const files = context.getVariable('options.files');
4620
+ const fileEditable = context.getVariable('options.fileEditable');
3832
4621
  // *********** show file list ***********
3833
4622
  const res = await this.fileUploaderWidgetService.showFileList({
3834
4623
  files: files,
3835
4624
  readOnly: readOnly,
3836
4625
  multiple: multiple,
3837
4626
  accept: accept,
4627
+ fileEditable: fileEditable,
3838
4628
  });
3839
4629
  // Handle case when result is undefined or empty array
3840
4630
  if (!res || res.length === 0) {
@@ -3854,10 +4644,10 @@ class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
3854
4644
  context.setVariable('data', cloneDeep(entityData));
3855
4645
  }
3856
4646
  }
3857
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3858
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
4647
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4648
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
3859
4649
  }
3860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
4650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
3861
4651
  type: Injectable
3862
4652
  }] });
3863
4653
  const AXPShowFileUploaderPopupWorkflow = {
@@ -3908,10 +4698,10 @@ class AXPShowListViewAction extends AXPWorkflowAction {
3908
4698
  context.setVariable('payload', newPayload);
3909
4699
  this.navigation.execute(context);
3910
4700
  }
3911
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3912
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowListViewAction }); }
4701
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4702
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowListViewAction }); }
3913
4703
  }
3914
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPShowListViewAction, decorators: [{
4704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPShowListViewAction, decorators: [{
3915
4705
  type: Injectable
3916
4706
  }] });
3917
4707
  const AXPShowListViewWorkflow = {
@@ -3924,6 +4714,147 @@ const AXPShowListViewWorkflow = {
3924
4714
  },
3925
4715
  };
3926
4716
 
4717
+ class AXPEntityReferenceWidgetViewComponent extends AXPLayoutWidgetComponent {
4718
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4719
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4720
+ }
4721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
4722
+ type: Component,
4723
+ args: [{
4724
+ template: ``,
4725
+ standalone: true,
4726
+ changeDetection: ChangeDetectionStrategy.OnPush,
4727
+ imports: [CommonModule]
4728
+ }]
4729
+ }] });
4730
+
4731
+ var entityReferenceWidgetView_component = /*#__PURE__*/Object.freeze({
4732
+ __proto__: null,
4733
+ AXPEntityReferenceWidgetViewComponent: AXPEntityReferenceWidgetViewComponent
4734
+ });
4735
+
4736
+ class AXPEntityReferenceWidgetEditComponent extends AXPLayoutWidgetComponent {
4737
+ constructor() {
4738
+ super(...arguments);
4739
+ this.injector = inject(Injector);
4740
+ this.entityResolver = inject(AXPEntityResolver);
4741
+ this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
4742
+ this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
4743
+ this.#efEntity = effect(async () => {
4744
+ const [module, entity] = this.entity().split('.');
4745
+ this.entityDef.set(await this.entityResolver.get(module, entity));
4746
+ console.log(this.entityDef());
4747
+ }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
4748
+ }
4749
+ #efEntity;
4750
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4751
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPEntityReferenceWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4752
+ }
4753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
4754
+ type: Component,
4755
+ args: [{
4756
+ template: ``,
4757
+ standalone: true,
4758
+ changeDetection: ChangeDetectionStrategy.OnPush,
4759
+ imports: [CommonModule, FormsModule],
4760
+ }]
4761
+ }] });
4762
+
4763
+ var entityReferenceWidgetEdit_component = /*#__PURE__*/Object.freeze({
4764
+ __proto__: null,
4765
+ AXPEntityReferenceWidgetEditComponent: AXPEntityReferenceWidgetEditComponent
4766
+ });
4767
+
4768
+ class AXPEntityReferenceWidgetColumnComponent extends AXPColumnWidgetComponent {
4769
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4770
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPEntityReferenceWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `{{rawValue}}`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4771
+ }
4772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
4773
+ type: Component,
4774
+ args: [{
4775
+ template: `{{rawValue}}`,
4776
+ standalone: true,
4777
+ changeDetection: ChangeDetectionStrategy.OnPush,
4778
+ imports: [CommonModule],
4779
+ inputs: ['rawValue']
4780
+ }]
4781
+ }] });
4782
+
4783
+ var entityReferenceWidgetColumn_component = /*#__PURE__*/Object.freeze({
4784
+ __proto__: null,
4785
+ AXPEntityReferenceWidgetColumnComponent: AXPEntityReferenceWidgetColumnComponent
4786
+ });
4787
+
4788
+ class AXPEntityReferenceWidgetPrintComponent extends AXPLayoutWidgetComponent {
4789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4790
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4791
+ }
4792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
4793
+ type: Component,
4794
+ args: [{
4795
+ template: ``,
4796
+ standalone: true,
4797
+ changeDetection: ChangeDetectionStrategy.OnPush,
4798
+ imports: [CommonModule],
4799
+ inputs: []
4800
+ }]
4801
+ }] });
4802
+
4803
+ var entityReferenceWidgetPrint_component = /*#__PURE__*/Object.freeze({
4804
+ __proto__: null,
4805
+ AXPEntityReferenceWidgetPrintComponent: AXPEntityReferenceWidgetPrintComponent
4806
+ });
4807
+
4808
+ class AXPEntityReferenceWidgetDesignerComponent extends AXPLayoutWidgetComponent {
4809
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4810
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4811
+ }
4812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
4813
+ type: Component,
4814
+ args: [{
4815
+ template: ``,
4816
+ standalone: true,
4817
+ changeDetection: ChangeDetectionStrategy.OnPush,
4818
+ imports: [CommonModule]
4819
+ }]
4820
+ }] });
4821
+
4822
+ var entityReferenceWidgetDesigner_component = /*#__PURE__*/Object.freeze({
4823
+ __proto__: null,
4824
+ AXPEntityReferenceWidgetDesignerComponent: AXPEntityReferenceWidgetDesignerComponent
4825
+ });
4826
+
4827
+ const AXPEntityReferenceWidget = {
4828
+ name: "entity-reference",
4829
+ title: "Entity Reference",
4830
+ description: '',
4831
+ type: 'view',
4832
+ categories: [],
4833
+ groups: [AXPWidgetGroupEnum.FormElement],
4834
+ icon: "fa-solid fa-square",
4835
+ properties: [
4836
+ AXP_NAME_PROPERTY,
4837
+ AXP_DATA_PATH_PROPERTY,
4838
+ ],
4839
+ components: {
4840
+ view: {
4841
+ component: () => Promise.resolve().then(function () { return entityReferenceWidgetView_component; }).then((c) => c.AXPEntityReferenceWidgetViewComponent),
4842
+ },
4843
+ edit: {
4844
+ component: () => Promise.resolve().then(function () { return entityReferenceWidgetEdit_component; }).then((c) => c.AXPEntityReferenceWidgetEditComponent),
4845
+ },
4846
+ column: {
4847
+ component: () => Promise.resolve().then(function () { return entityReferenceWidgetColumn_component; }).then((c) => c.AXPEntityReferenceWidgetColumnComponent),
4848
+ },
4849
+ print: {
4850
+ component: () => Promise.resolve().then(function () { return entityReferenceWidgetPrint_component; }).then((c) => c.AXPEntityReferenceWidgetPrintComponent),
4851
+ },
4852
+ designer: {
4853
+ component: () => Promise.resolve().then(function () { return entityReferenceWidgetDesigner_component; }).then((c) => c.AXPEntityReferenceWidgetDesignerComponent),
4854
+ },
4855
+ }
4856
+ };
4857
+
3927
4858
  function routesFacory() {
3928
4859
  const config = inject(AXP_ENTITY_CONFIG_TOKEN);
3929
4860
  let routes = [];
@@ -3986,9 +4917,9 @@ class AXPEntityModule {
3986
4917
  },
3987
4918
  });
3988
4919
  }
3989
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$4.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
3990
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i6.AXPLayoutBuilderModule] }); }
3991
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModule, providers: [
4920
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$4.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
4921
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i6.AXPLayoutBuilderModule] }); }
4922
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModule, providers: [
3992
4923
  {
3993
4924
  provide: ROUTES,
3994
4925
  multi: true,
@@ -4033,10 +4964,10 @@ class AXPEntityModule {
4033
4964
  functions: {},
4034
4965
  }),
4035
4966
  AXPLayoutBuilderModule.forChild({
4036
- widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget],
4967
+ widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget, AXPEntityReferenceWidget],
4037
4968
  })] }); }
4038
4969
  }
4039
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXPEntityModule, decorators: [{
4970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AXPEntityModule, decorators: [{
4040
4971
  type: NgModule,
4041
4972
  args: [{
4042
4973
  imports: [
@@ -4069,7 +5000,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
4069
5000
  functions: {},
4070
5001
  }),
4071
5002
  AXPLayoutBuilderModule.forChild({
4072
- widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget],
5003
+ widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget, AXPEntityReferenceWidget],
4073
5004
  }),
4074
5005
  ],
4075
5006
  exports: [],
@@ -4139,6 +5070,11 @@ function entityMasterCrudActions() {
4139
5070
  entityMasterDeleteAction(),
4140
5071
  ];
4141
5072
  }
5073
+ function entityMasterRecordActions() {
5074
+ return [
5075
+ entityMasterDeleteAction(),
5076
+ ];
5077
+ }
4142
5078
  // #endregion
4143
5079
  // #region Details
4144
5080
  function entityDetailsCreateActions(parentId) {
@@ -4191,5 +5127,5 @@ function entityDetailsCrudActions(parentId) {
4191
5127
  * Generated bundle index. Do not edit.
4192
5128
  */
4193
5129
 
4194
- export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, createModifierContext, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterViewAction };
5130
+ export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageExecutor, AXPEntityStorageRegistry, AXPEntityStorageService, AXPEntityStorageWithMiddlewareService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_EXTENSION, AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP, auditMiddleware, auditStorage, cachingMiddleware, composeEntityStorageMiddlewares, createModifierContext, dataSanitizationMiddleware, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, errorHandlingMiddleware, generateRequestId, loggingMiddleware, performanceMiddleware, provideEntitySpecificMiddleware, provideEntityStorageMiddleware, provideGlobalEntityStorageMiddleware, provideOperationSpecificMiddleware, userContextMiddleware, validationMiddleware };
4195
5131
  //# sourceMappingURL=acorex-platform-layout-entity.mjs.map