@acorex/platform 20.3.0-next.2 → 20.3.0-next.20

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 (131) hide show
  1. package/common/index.d.ts +403 -374
  2. package/core/index.d.ts +563 -46
  3. package/fesm2022/acorex-platform-auth.mjs +19 -19
  4. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-common.mjs +124 -224
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +644 -110
  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 +1927 -1951
  12. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-components.mjs +3897 -435
  14. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-designer.mjs +96 -89
  16. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-entity-create-entity.command-BXExgI3W.mjs +52 -0
  18. package/fesm2022/acorex-platform-layout-entity-create-entity.command-BXExgI3W.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-layout-entity.mjs +1763 -1233
  20. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-views.mjs +43 -33
  22. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs +2756 -0
  24. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs → acorex-platform-layout-widgets-button-widget-designer.component-BzsfTNs2.mjs} +6 -6
  26. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-BzsfTNs2.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-Dvk76-2W.mjs} +5 -5
  28. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-Dvk76-2W.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-BYLaipWi.mjs} +5 -5
  30. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-BYLaipWi.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-DcSllNik.mjs} +5 -5
  32. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-DcSllNik.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-BT-U4BiA.mjs} +5 -5
  34. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-BT-U4BiA.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-Il7jnRBg.mjs} +5 -5
  36. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-Il7jnRBg.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-CBEPu7Fl.mjs} +5 -5
  38. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-CBEPu7Fl.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs → acorex-platform-layout-widgets-file-list-popup.component-BPzn8lr3.mjs} +10 -10
  40. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-BPzn8lr3.mjs.map +1 -0
  41. package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs → acorex-platform-layout-widgets-page-widget-designer.component-C_JrGoXy.mjs} +8 -8
  42. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-C_JrGoXy.mjs.map +1 -0
  43. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-C6DaBt_N.mjs} +14 -14
  44. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-C6DaBt_N.mjs.map +1 -0
  45. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-Bth3jI9T.mjs} +6 -5
  46. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-Bth3jI9T.mjs.map +1 -0
  47. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-CUHptbP4.mjs} +6 -7
  48. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CUHptbP4.mjs.map +1 -0
  49. package/fesm2022/{acorex-platform-widgets.mjs → acorex-platform-layout-widgets.mjs} +8362 -7479
  50. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-native.mjs +7 -7
  52. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  53. package/fesm2022/acorex-platform-runtime.mjs +40 -40
  54. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  55. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-eGzN6g2Y.mjs +115 -0
  56. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-eGzN6g2Y.mjs.map +1 -0
  57. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs → acorex-platform-themes-default-entity-master-list-view.component-nDHfQQ3O.mjs} +34 -36
  58. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-nDHfQQ3O.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-HJyalvcu.mjs +101 -0
  60. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-HJyalvcu.mjs.map +1 -0
  61. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs → acorex-platform-themes-default-entity-master-single-view.component-e7m70Wls.mjs} +17 -17
  62. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-e7m70Wls.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs → acorex-platform-themes-default-error-401.component-CoBaQFTn.mjs} +4 -4
  64. package/fesm2022/{acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs.map → acorex-platform-themes-default-error-401.component-CoBaQFTn.mjs.map} +1 -1
  65. package/fesm2022/{acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs → acorex-platform-themes-default-error-404.component-BLlVOsS2.mjs} +4 -4
  66. package/fesm2022/{acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs.map → acorex-platform-themes-default-error-404.component-BLlVOsS2.mjs.map} +1 -1
  67. package/fesm2022/{acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs → acorex-platform-themes-default-error-offline.component-CybYQI9F.mjs} +4 -4
  68. package/fesm2022/{acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs.map → acorex-platform-themes-default-error-offline.component-CybYQI9F.mjs.map} +1 -1
  69. package/fesm2022/acorex-platform-themes-default.mjs +45 -45
  70. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  71. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs → acorex-platform-themes-shared-icon-chooser-view.component-ReKSoVeN.mjs} +25 -15
  72. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-ReKSoVeN.mjs.map +1 -0
  73. package/fesm2022/{acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs → acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs} +9 -9
  74. package/fesm2022/acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-B2HDyY2z.mjs} +24 -9
  76. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-B2HDyY2z.mjs.map +1 -0
  77. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-CeZxa49U.mjs} +24 -9
  78. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-CeZxa49U.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-themes-shared.mjs +264 -86
  80. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  81. package/fesm2022/acorex-platform-workflow.mjs +27 -39
  82. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  83. package/layout/builder/README.md +2 -3
  84. package/layout/builder/index.d.ts +683 -819
  85. package/layout/components/index.d.ts +1141 -115
  86. package/layout/designer/index.d.ts +8 -6
  87. package/layout/entity/index.d.ts +979 -282
  88. package/layout/views/index.d.ts +13 -13
  89. package/layout/widget-core/README.md +4 -0
  90. package/layout/widget-core/index.d.ts +957 -0
  91. package/layout/widgets/README.md +4 -0
  92. package/{widgets → layout/widgets}/index.d.ts +1933 -770
  93. package/package.json +14 -10
  94. package/themes/shared/index.d.ts +2 -2
  95. package/workflow/index.d.ts +3 -173
  96. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs +0 -115
  97. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs +0 -101
  100. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs +0 -84
  108. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs +0 -55
  110. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs.map +0 -1
  111. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs +0 -76
  112. package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs.map +0 -1
  113. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs +0 -55
  114. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs.map +0 -1
  115. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs.map +0 -1
  118. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs.map +0 -1
  120. package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs.map +0 -1
  121. package/fesm2022/acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs.map +0 -1
  122. package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DHFMnkls.mjs +0 -211
  123. package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DHFMnkls.mjs.map +0 -1
  124. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs.map +0 -1
  125. package/fesm2022/acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs +0 -40
  126. package/fesm2022/acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs.map +0 -1
  127. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs.map +0 -1
  128. package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs.map +0 -1
  129. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs.map +0 -1
  130. package/fesm2022/acorex-platform-widgets.mjs.map +0 -1
  131. package/widgets/README.md +0 -4
@@ -1,61 +1,450 @@
1
+ import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
1
2
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, computed, signal, Injector, runInInjectionContext, EnvironmentInjector, viewChild, viewChildren, linkedSignal, effect, untracked, ChangeDetectionStrategy, Component, HostBinding, ElementRef, ViewChild, NgModule } from '@angular/core';
3
- import { castArray, get, cloneDeep, set, merge, isNil, isEmpty, sortBy } from 'lodash-es';
4
- import * as i1$2 from '@acorex/cdk/common';
5
- import { AXDataSource, AXCommonModule } from '@acorex/cdk/common';
3
+ import { inject, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, InjectionToken, computed, Injector, runInInjectionContext, viewChildren, linkedSignal, effect, untracked, HostBinding, ViewChild, NgModule } from '@angular/core';
4
+ import { Router, RouterModule, ROUTES } from '@angular/router';
5
+ import * as i3 from '@acorex/components/button';
6
+ import { AXButtonModule } from '@acorex/components/button';
7
+ import * as i4 from '@acorex/components/loading';
8
+ import { AXLoadingModule } from '@acorex/components/loading';
9
+ import * as i2 from '@acorex/components/popover';
10
+ import { AXPopoverModule } from '@acorex/components/popover';
11
+ import * as i6 from '@acorex/core/translation';
12
+ import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
13
+ import * as i3$1 from '@acorex/platform/layout/widget-core';
14
+ import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPValueWidgetComponent, AXPWidgetRendererDirective, AXPWidgetGroupEnum, AXPLayoutBaseWidgetComponent, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/widget-core';
15
+ import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
16
+ import * as i5 from '@angular/common';
17
+ import { CommonModule } from '@angular/common';
18
+ import { castArray, get, cloneDeep, set, merge, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
19
+ import { AXDataSource } from '@acorex/cdk/common';
6
20
  import { AXFormatService } from '@acorex/core/format';
7
- import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPReloadEvent, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
8
- import * as i1$4 from '@acorex/platform/core';
9
- import { AXPExpressionEvaluatorService, AXPPlatformScope, AXPDistributedEventListenerService, getChangedPaths, extractValue, setSmart } from '@acorex/platform/core';
21
+ import { AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPReloadEvent, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
22
+ import * as i1$2 from '@acorex/platform/core';
23
+ import { resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPBroadcastEventService, AXPPlatformScope, getChangedPaths, extractValue, setSmart, AXPSystemActionType } from '@acorex/platform/core';
10
24
  import * as i2$2 from '@acorex/platform/workflow';
11
25
  import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
12
- import * as i3$1 from '@acorex/platform/layout/builder';
13
- import { AXPPageStatus, AXPWidgetRegistryService, AXPWidgetsCatalog, AXPValueWidgetComponent, AXPWidgetRendererDirective, AXPLayoutBuilderModule, AXPWidgetGroupEnum, AXPLayoutBaseWidgetComponent, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
14
26
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
15
27
  import { Subject, takeUntil } from 'rxjs';
16
- import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
17
- import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
18
- import * as i8 from '@acorex/core/translation';
19
- import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
28
+ import { moveItemInArray } from '@angular/cdk/drag-drop';
20
29
  import { AXDialogService } from '@acorex/components/dialog';
21
30
  import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
22
31
  import { AXPopupService } from '@acorex/components/popup';
23
32
  import { AXPlatform } from '@acorex/core/platform';
24
- import { RouterModule, ROUTES, Router } from '@angular/router';
25
- import * as i3$2 from '@acorex/components/button';
26
- import { AXButtonModule } from '@acorex/components/button';
27
- import * as i3 from '@acorex/components/decorators';
33
+ import * as i3$2 from '@acorex/components/decorators';
28
34
  import { AXDecoratorModule } from '@acorex/components/decorators';
29
- import * as i4 from '@acorex/components/dropdown';
35
+ import * as i4$1 from '@acorex/components/dropdown';
30
36
  import { AXDropdownModule } from '@acorex/components/dropdown';
31
- import * as i7 from '@angular/common';
32
- import { CommonModule } from '@angular/common';
33
- import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY, AXP_ALLOW_CLEAR_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXPFileUploaderWidgetService } from '@acorex/platform/widgets';
34
- import * as i1$3 from '@angular/forms';
37
+ import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY, AXP_ALLOW_CLEAR_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXPFileUploaderWidgetService } from '@acorex/platform/layout/widgets';
38
+ import * as i1$1 from '@angular/forms';
35
39
  import { FormsModule } from '@angular/forms';
36
- import * as i1 from '@acorex/components/loading';
37
- import { AXLoadingModule } from '@acorex/components/loading';
38
- import * as i1$1 from '@acorex/components/badge';
39
- import { AXBadgeModule } from '@acorex/components/badge';
40
40
  import * as i5$1 from '@acorex/components/form';
41
41
  import { AXFormModule } from '@acorex/components/form';
42
- import * as i5 from '@acorex/components/search-box';
43
- import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/search-box';
44
- import * as i7$1 from '@acorex/components/select-box';
42
+ import * as i7 from '@acorex/components/select-box';
45
43
  import { AXSelectBoxModule } from '@acorex/components/select-box';
46
- import * as i6 from '@acorex/components/tag-box';
47
- import { AXTagBoxComponent, AXTagBoxModule } from '@acorex/components/tag-box';
48
- import { AXValidationModule } from '@acorex/core/validation';
49
- import * as i4$1 from '@acorex/components/data-table';
50
- import { AXDataTableModule } from '@acorex/components/data-table';
51
- import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
52
- import { AXBasePageComponent } from '@acorex/components/page';
53
- import * as i2 from '@acorex/components/popover';
54
- import { AXPopoverModule } from '@acorex/components/popover';
55
44
  import * as i2$1 from '@acorex/components/text-box';
56
45
  import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
57
- import { AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/components';
58
- import { transform, isEqual } from 'lodash';
46
+ import { AXValidationModule } from '@acorex/core/validation';
47
+ import * as i1 from '@acorex/components/badge';
48
+ import { AXBadgeModule } from '@acorex/components/badge';
49
+ import * as i6$2 from '@acorex/components/search-box';
50
+ import { AXSearchBoxComponent, AXSearchBoxModule } from '@acorex/components/search-box';
51
+ import * as i6$1 from '@acorex/components/tag-box';
52
+ import { AXTagBoxComponent, AXTagBoxModule } from '@acorex/components/tag-box';
53
+ import { AXPDataSelectorService, AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/components';
54
+ import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
55
+ import { transform, isEqual as isEqual$1 } from 'lodash';
56
+
57
+ //#endregion
58
+ //#region ---- Entity Open Details Command ----
59
+ /**
60
+ * Generic command to open entity details view
61
+ * Can be used by any entity to navigate to its detail page
62
+ */
63
+ class AXPOpenEntityDetailsCommand {
64
+ constructor() {
65
+ //#endregion
66
+ //#region ---- Services & Dependencies ----
67
+ this.router = inject(Router);
68
+ this.sessionService = inject(AXPSessionService);
69
+ }
70
+ //#endregion
71
+ //#region ---- Command Execution ----
72
+ /**
73
+ * Execute the command to navigate to entity details
74
+ * @param input - Command input containing entity and data information
75
+ */
76
+ async execute(input) {
77
+ const { entity, data } = input;
78
+ if (!entity) {
79
+ throw new Error('Entity name is required for opening details view');
80
+ }
81
+ if (!data?.id) {
82
+ throw new Error('Entity ID is required for opening details view');
83
+ }
84
+ const [module, entityName] = entity.split('.');
85
+ if (!module || !entityName) {
86
+ throw new Error('Entity must be in format "ModuleName.EntityName"');
87
+ }
88
+ const url = `/${this.sessionService.application?.name}/m/${module}/e/${entityName}/${data.id}/new-view`;
89
+ // Navigate to the entity details page
90
+ this.router.navigate([url]);
91
+ return { success: true };
92
+ }
93
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPOpenEntityDetailsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
94
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPOpenEntityDetailsCommand, providedIn: 'root' }); }
95
+ }
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPOpenEntityDetailsCommand, decorators: [{
97
+ type: Injectable,
98
+ args: [{ providedIn: 'root' }]
99
+ }] });
100
+
101
+ var openEntityDetails_command = /*#__PURE__*/Object.freeze({
102
+ __proto__: null,
103
+ AXPOpenEntityDetailsCommand: AXPOpenEntityDetailsCommand
104
+ });
105
+
106
+ class AXPEntityDetailPopoverComponent {
107
+ constructor() {
108
+ //#region ---- Dependencies ----
109
+ this.commandService = inject(AXPCommandService);
110
+ this.queryService = inject(AXPQueryService);
111
+ //#endregion
112
+ //#region ---- Inputs ----
113
+ this.entity = input.required(...(ngDevMode ? [{ debugName: "entity" }] : []));
114
+ this.entityId = input.required(...(ngDevMode ? [{ debugName: "entityId" }] : []));
115
+ this.textField = input('title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
116
+ this.valueField = input('id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
117
+ this.item = input(...(ngDevMode ? [undefined, { debugName: "item" }] : []));
118
+ //#endregion
119
+ //#region ---- View Children ----
120
+ this.detailPopover = viewChild('detailPopover', ...(ngDevMode ? [{ debugName: "detailPopover" }] : []));
121
+ //#endregion
122
+ //#region ---- Signals ----
123
+ this.entityDetails = signal(null, ...(ngDevMode ? [{ debugName: "entityDetails" }] : []));
124
+ this.isLoadingDetails = signal(false, ...(ngDevMode ? [{ debugName: "isLoadingDetails" }] : []));
125
+ this.isDetailPopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isDetailPopoverOpen" }] : []));
126
+ }
127
+ //#endregion
128
+ //#region ---- Public Methods ----
129
+ /**
130
+ * Show the entity detail popover
131
+ */
132
+ async show(target) {
133
+ this.isDetailPopoverOpen.set(true);
134
+ this.isLoadingDetails.set(true);
135
+ this.entityDetails.set(null);
136
+ // Open the popover immediately to display loading state
137
+ if (this.detailPopover()) {
138
+ const targetElement = target instanceof ElementRef ? target.nativeElement : target;
139
+ this.detailPopover().target = targetElement;
140
+ this.detailPopover().open();
141
+ }
142
+ else {
143
+ // In case the view child is not ready yet, schedule an immediate open
144
+ setTimeout(() => {
145
+ if (this.detailPopover()) {
146
+ const targetElement = target instanceof ElementRef ? target.nativeElement : target;
147
+ this.detailPopover().target = targetElement;
148
+ this.detailPopover().open();
149
+ }
150
+ }, 0);
151
+ }
152
+ // Fetch entity details using the query
153
+ try {
154
+ const result = await this.queryService.fetch('Entity:GetDetails', {
155
+ entity: this.entity(),
156
+ id: this.entityId(),
157
+ });
158
+ if (result?.success) {
159
+ this.entityDetails.set(result);
160
+ }
161
+ }
162
+ catch (error) {
163
+ console.error('Failed to fetch entity details:', error);
164
+ }
165
+ finally {
166
+ this.isLoadingDetails.set(false);
167
+ }
168
+ }
169
+ /**
170
+ * Hide the entity detail popover
171
+ */
172
+ hide() {
173
+ this.isDetailPopoverOpen.set(false);
174
+ this.entityDetails.set(null);
175
+ this.isLoadingDetails.set(false);
176
+ if (this.detailPopover()) {
177
+ this.detailPopover().close();
178
+ }
179
+ }
180
+ onDetailPopoverOpenChange(event) {
181
+ this.isDetailPopoverOpen.set(event);
182
+ if (!event) {
183
+ this.entityDetails.set(null);
184
+ this.isLoadingDetails.set(false);
185
+ }
186
+ }
187
+ async navigateToDetails() {
188
+ if (this.entityId()) {
189
+ await this.commandService.execute('Entity:OpenDetails', {
190
+ entity: this.entity(),
191
+ data: { id: this.entityId() },
192
+ });
193
+ this.hide();
194
+ }
195
+ }
196
+ //#endregion
197
+ //#region ---- Helper Methods ----
198
+ /**
199
+ * Returns true if a value is meaningful for display (non-empty/non-null).
200
+ */
201
+ hasMeaningfulValue(value) {
202
+ if (value === null || value === undefined)
203
+ return false;
204
+ if (typeof value === 'string')
205
+ return value.trim().length > 0;
206
+ if (Array.isArray(value))
207
+ return value.length > 0;
208
+ if (typeof value === 'object')
209
+ return Object.keys(value).length > 0;
210
+ return true;
211
+ }
212
+ /**
213
+ * Calculates an importance score for a property based on its widget type,
214
+ * whether it currently has a meaningful value, and metadata like title.
215
+ */
216
+ getPropertyImportanceScore(prop, data) {
217
+ const schema = prop.showAs?.type ?? prop.schema;
218
+ const importanceMap = {
219
+ [AXPWidgetsCatalog.text]: 100,
220
+ [AXPWidgetsCatalog.select]: 95,
221
+ [AXPWidgetsCatalog.number]: 90,
222
+ [AXPWidgetsCatalog.dateTime]: 85,
223
+ [AXPWidgetsCatalog.richText]: 80,
224
+ [AXPWidgetsCatalog.largeText]: 75,
225
+ [AXPWidgetsCatalog.contact]: 74,
226
+ [AXPWidgetsCatalog.toggle]: 65,
227
+ [AXPWidgetsCatalog.checkbox]: 60,
228
+ [AXPWidgetsCatalog.color]: 40,
229
+ };
230
+ let score = importanceMap[schema] ?? 50;
231
+ // Prefer fields that actually have a value for the current entity
232
+ if (this.hasMeaningfulValue(data?.[prop.name])) {
233
+ score += 20;
234
+ }
235
+ // Slight preference for human-friendly titled fields
236
+ const hasTitle = prop.title && prop.title !== prop.name;
237
+ if (hasTitle) {
238
+ score += 5;
239
+ }
240
+ return score;
241
+ }
242
+ /**
243
+ * Calculates a name-based importance score to prioritize common key fields
244
+ * like title, description, status, and important dates.
245
+ * Name priority MUST come before widget-type priority.
246
+ */
247
+ getNameImportanceScore(prop) {
248
+ const rawName = (prop.options?.dataPath ?? prop.name ?? '').toString();
249
+ const normalized = rawName.toLowerCase();
250
+ const collapsed = normalized.replace(/[^a-z0-9]/g, '');
251
+ const priorities = [
252
+ { keys: ['title', 'name', 'subject', 'code'], score: 120 },
253
+ { keys: ['description', 'details', 'summary', 'remark', 'remarks'], score: 110 },
254
+ { keys: ['status', 'state', 'phase', 'stage'], score: 105 },
255
+ { keys: ['priority', 'severity', 'rank'], score: 100 },
256
+ { keys: ['expirydate', 'expirationdate', 'expiredate', 'duedate', 'deadline', 'enddate'], score: 98 },
257
+ { keys: ['startdate', 'createdat', 'createdon', 'updatedat', 'updatedon'], score: 95 },
258
+ { keys: ['owner', 'assignee', 'assignedto'], score: 92 },
259
+ { keys: ['email', 'phone', 'mobile', 'contact'], score: 90 },
260
+ { keys: ['category', 'type', 'label', 'tag', 'note', 'notes'], score: 85 },
261
+ { keys: ['primary', 'active', 'active', 'enabled', 'archived', 'deleted', 'locked', 'disabled'], score: -2 }, // send to bottom,
262
+ ];
263
+ for (const group of priorities) {
264
+ for (const key of group.keys) {
265
+ if (collapsed === key || collapsed.endsWith(key)) {
266
+ return group.score;
267
+ }
268
+ }
269
+ }
270
+ // Pattern-based priorities (generic forms like validFrom/validTo, start*/end*)
271
+ if (collapsed.endsWith('from') || collapsed.endsWith('to')) {
272
+ return 97;
273
+ }
274
+ if (collapsed.startsWith('start') || collapsed.startsWith('end')) {
275
+ return 96;
276
+ }
277
+ return 0;
278
+ }
279
+ getEntityPropertiesWithWidgets() {
280
+ const data = this.entityDetails()?.entityData;
281
+ const entityDefinition = this.entityDetails()?.entityDefinition;
282
+ if (!data || !entityDefinition?.properties)
283
+ return [];
284
+ // Get properties from entity definition and filter by importance
285
+ const importantProperties = (entityDefinition.columns ?? [])
286
+ .map((prop, index) => {
287
+ const propName = prop.options?.dataPath ?? prop.name;
288
+ const schema = prop.showAs?.type ?? entityDefinition.properties.find((p) => p.name === propName)?.schema.interface?.type;
289
+ const title = prop.title ?? entityDefinition.properties.find((p) => p.name === propName)?.title ?? prop.name;
290
+ return {
291
+ ...prop,
292
+ schema,
293
+ title,
294
+ orderIndex: index,
295
+ };
296
+ })
297
+ .filter((prop) => {
298
+ // Exclude technical fields
299
+ if (prop.name === 'id' || prop.name === this.textField() || prop.name === this.valueField()) {
300
+ return false;
301
+ }
302
+ // Only include properties that exist in the data
303
+ if (!data.hasOwnProperty(prop.name)) {
304
+ return false;
305
+ }
306
+ // Filter by property importance based on schema and options
307
+ const schema = prop.showAs?.type ?? entityDefinition.properties.find((p) => p.name === prop.name)?.schema.interface?.type;
308
+ // Include common important field types
309
+ const importantWidgets = [
310
+ AXPWidgetsCatalog.text,
311
+ AXPWidgetsCatalog.largeText,
312
+ AXPWidgetsCatalog.richText,
313
+ //
314
+ AXPWidgetsCatalog.select,
315
+ //AXPWidgetsCatalog.lookup,
316
+ //
317
+ AXPWidgetsCatalog.number,
318
+ AXPWidgetsCatalog.toggle,
319
+ AXPWidgetsCatalog.checkbox,
320
+ //
321
+ AXPWidgetsCatalog.dateTime,
322
+ AXPWidgetsCatalog.color,
323
+ AXPWidgetsCatalog.contact,
324
+ ];
325
+ //
326
+ if (importantWidgets.includes(schema)) {
327
+ return true;
328
+ }
329
+ return false;
330
+ })
331
+ .sort((a, b) => {
332
+ // Primary: name-based importance
333
+ const nameScoreA = this.getNameImportanceScore(a);
334
+ const nameScoreB = this.getNameImportanceScore(b);
335
+ if (nameScoreA !== nameScoreB)
336
+ return nameScoreB - nameScoreA;
337
+ // Secondary: widget/value/title based importance
338
+ const widgetScoreA = this.getPropertyImportanceScore(a, data);
339
+ const widgetScoreB = this.getPropertyImportanceScore(b, data);
340
+ if (widgetScoreA !== widgetScoreB)
341
+ return widgetScoreB - widgetScoreA;
342
+ const aHasValue = this.hasMeaningfulValue(data?.[a.name]);
343
+ const bHasValue = this.hasMeaningfulValue(data?.[b.name]);
344
+ if (aHasValue !== bHasValue)
345
+ return aHasValue ? -1 : 1;
346
+ const aHasTitle = a.title && a.title !== a.name;
347
+ const bHasTitle = b.title && b.title !== b.name;
348
+ if (aHasTitle !== bHasTitle)
349
+ return aHasTitle ? -1 : 1;
350
+ if ((a.orderIndex ?? 0) !== (b.orderIndex ?? 0))
351
+ return (a.orderIndex ?? 0) - (b.orderIndex ?? 0);
352
+ return a.name.localeCompare(b.name);
353
+ })
354
+ .map((prop) => {
355
+ // Create widget node based on property schema
356
+ const widgetNode = {
357
+ type: prop.schema || AXPWidgetsCatalog.text,
358
+ path: prop.options?.dataPath || prop.name,
359
+ options: prop.options ?? {},
360
+ mode: 'view',
361
+ };
362
+ return {
363
+ name: prop.name,
364
+ title: prop.title || prop.name,
365
+ node: widgetNode,
366
+ };
367
+ })
368
+ .slice(0, 7); // Limit to 7 most important fields
369
+ return importantProperties;
370
+ }
371
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
372
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.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: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
373
+ }
374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
375
+ type: Component,
376
+ args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
377
+ CommonModule,
378
+ AXButtonModule,
379
+ AXPopoverModule,
380
+ AXPWidgetCoreModule,
381
+ AXTranslationModule,
382
+ AXLoadingModule,
383
+ ], template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n" }]
384
+ }] });
385
+
386
+ class AXPEntityDetailPopoverService {
387
+ constructor() {
388
+ //#region ---- Dependencies ----
389
+ this.applicationRef = inject(ApplicationRef);
390
+ this.environmentInjector = inject(EnvironmentInjector);
391
+ //#endregion
392
+ //#region ---- Private Properties ----
393
+ this.activePopoverRef = null;
394
+ }
395
+ //#endregion
396
+ //#region ---- Public Methods ----
397
+ /**
398
+ * Show entity detail popover
399
+ * @param target - The target element to position the popover
400
+ * @param options - Configuration options for the popover
401
+ */
402
+ async show(target, options) {
403
+ // Close any existing popover
404
+ this.hide();
405
+ // Create component dynamically
406
+ this.activePopoverRef = createComponent(AXPEntityDetailPopoverComponent, {
407
+ environmentInjector: this.environmentInjector,
408
+ });
409
+ // Set inputs
410
+ this.activePopoverRef.setInput('entity', options.entity);
411
+ this.activePopoverRef.setInput('entityId', options.id);
412
+ this.activePopoverRef.setInput('textField', options.textField || 'title');
413
+ this.activePopoverRef.setInput('valueField', options.valueField || 'id');
414
+ this.activePopoverRef.setInput('item', options.item);
415
+ // Attach to application
416
+ this.applicationRef.attachView(this.activePopoverRef.hostView);
417
+ // Append to document body
418
+ document.body.appendChild(this.activePopoverRef.location.nativeElement);
419
+ // Show the popover
420
+ await this.activePopoverRef.instance.show(target);
421
+ }
422
+ /**
423
+ * Hide the active popover
424
+ */
425
+ hide() {
426
+ if (this.activePopoverRef) {
427
+ this.activePopoverRef.instance.hide();
428
+ this.applicationRef.detachView(this.activePopoverRef.hostView);
429
+ this.activePopoverRef.destroy();
430
+ this.activePopoverRef = null;
431
+ }
432
+ }
433
+ /**
434
+ * Check if a popover is currently active
435
+ */
436
+ get isActive() {
437
+ return this.activePopoverRef !== null;
438
+ }
439
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailPopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
440
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailPopoverService, providedIn: 'root' }); }
441
+ }
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailPopoverService, decorators: [{
443
+ type: Injectable,
444
+ args: [{
445
+ providedIn: 'root'
446
+ }]
447
+ }] });
59
448
 
60
449
  const AXP_DATA_SEEDER_TOKEN = new InjectionToken('AXP_DATA_SEEDER_TOKEN');
61
450
  class AXPDataSeederService {
@@ -67,10 +456,10 @@ class AXPDataSeederService {
67
456
  await loader?.seed();
68
457
  }
69
458
  }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
71
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
459
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
460
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
72
461
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPDataSeederService, decorators: [{
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPDataSeederService, decorators: [{
74
463
  type: Injectable,
75
464
  args: [{ providedIn: 'root' }]
76
465
  }] });
@@ -95,10 +484,10 @@ class AXPEntityResolver {
95
484
  }
96
485
  return null;
97
486
  }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
99
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityResolver, providedIn: 'root' }); }
487
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
488
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityResolver, providedIn: 'root' }); }
100
489
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityResolver, decorators: [{
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityResolver, decorators: [{
102
491
  type: Injectable,
103
492
  args: [{ providedIn: 'root' }]
104
493
  }] });
@@ -108,7 +497,7 @@ class AXPEntityCommandTriggerViewModel {
108
497
  this.name = `${typeof action.command === 'string' ? action.command : action.command.name}&${action.name}`;
109
498
  this.options = typeof action.command === 'object' ? action.command.options : undefined;
110
499
  this.metadata = typeof action.command === 'object' ? action.command.metadata : undefined;
111
- const resolvedLook = resolveActionLook(action);
500
+ const resolvedLook = resolveActionLook(action.type);
112
501
  this.priority = action.priority;
113
502
  this.title = action.title;
114
503
  this.separated = action.separated ?? false;
@@ -368,7 +757,7 @@ class AXPEntityDetailListViewModel {
368
757
  module: this.detailEntity()?.module,
369
758
  title: this.detailEntity()?.title,
370
759
  parentKey: this.detailEntity()?.parentKey,
371
- source: this.detailEntity()?.source,
760
+ source: `${this.detailEntity()?.module}.${this.detailEntity()?.name}`,
372
761
  },
373
762
  options,
374
763
  });
@@ -412,14 +801,91 @@ class AXPEntityDetailListViewModel {
412
801
  }
413
802
  }
414
803
 
415
- function createModifierContext(entity) {
416
- const ctx = {
417
- entity,
418
- title: {
419
- get: () => entity.title,
420
- set: (newTitle) => {
421
- entity.title = newTitle;
422
- return ctx;
804
+ /**
805
+ * Entity Event Dispatcher - A wrapper for entity-specific events
806
+ * Handles pattern-based dispatching for entity operations with wildcard support
807
+ */
808
+ class AXPEntityEventDispatcherService {
809
+ constructor() {
810
+ this.eventService = inject(AXPDistributedEventListenerService);
811
+ }
812
+ async dispatchEntityEvent(operation, entityName, data) {
813
+ const enhancedData = {
814
+ ...data,
815
+ entityName,
816
+ operation,
817
+ timestamp: new Date(),
818
+ source: 'entity-dispatcher',
819
+ };
820
+ const eventKeysToDispatch = await this.getAllMatchingEventKeys(operation, entityName);
821
+ const dispatchPromises = eventKeysToDispatch.map((key) => this.eventService.dispatch(key, enhancedData));
822
+ await Promise.all(dispatchPromises);
823
+ }
824
+ async getAllMatchingEventKeys(operation, entityName) {
825
+ const eventKeys = new Set();
826
+ const exactKeys = this.generateEventKeys(operation, entityName);
827
+ exactKeys.forEach((key) => eventKeys.add(key));
828
+ const wildcardKeys = await this.findMatchingWildcardKeys(operation, entityName);
829
+ wildcardKeys.forEach((key) => eventKeys.add(key));
830
+ return Array.from(eventKeys);
831
+ }
832
+ async findMatchingWildcardKeys(operation, entityName) {
833
+ const matchingKeys = [];
834
+ const allListenerKeys = await this.eventService.getRegisteredKeys();
835
+ const actualEventKey = `entity.${operation}.${entityName}`;
836
+ for (const listenerKey of allListenerKeys) {
837
+ if (listenerKey.includes('*') && this.matchesEntityPattern(actualEventKey, listenerKey)) {
838
+ matchingKeys.push(listenerKey);
839
+ }
840
+ }
841
+ return matchingKeys;
842
+ }
843
+ matchesEntityPattern(eventKey, pattern) {
844
+ if (!pattern.startsWith('entity.') || !pattern.includes('*')) {
845
+ return false;
846
+ }
847
+ const regexPattern = pattern.replace(/\./g, '\\.').replace(/\*/g, '.*');
848
+ const regex = new RegExp(`^${regexPattern}$`);
849
+ return regex.test(eventKey);
850
+ }
851
+ generateEventKeys(operation, entityName) {
852
+ const keys = [];
853
+ keys.push(`entity.${operation}`);
854
+ keys.push(`entity.${operation}.${entityName}`);
855
+ const entityParts = entityName.split('.');
856
+ if (entityParts.length > 1) {
857
+ const moduleName = entityParts[0];
858
+ keys.push(`entity.${operation}.${moduleName}`);
859
+ }
860
+ return keys;
861
+ }
862
+ async dispatchInserted(entityName, data) {
863
+ await this.dispatchEntityEvent('inserted', entityName, data);
864
+ }
865
+ async dispatchUpdated(entityName, data) {
866
+ await this.dispatchEntityEvent('updated', entityName, data);
867
+ }
868
+ async dispatchDeleted(entityName, data) {
869
+ await this.dispatchEntityEvent('deleted', entityName, data);
870
+ }
871
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityEventDispatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
872
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityEventDispatcherService, providedIn: 'root' }); }
873
+ }
874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityEventDispatcherService, decorators: [{
875
+ type: Injectable,
876
+ args: [{
877
+ providedIn: 'root',
878
+ }]
879
+ }] });
880
+
881
+ function createModifierContext(entity) {
882
+ const ctx = {
883
+ entity,
884
+ title: {
885
+ get: () => entity.title,
886
+ set: (newTitle) => {
887
+ entity.title = newTitle;
888
+ return ctx;
423
889
  },
424
890
  },
425
891
  module: {
@@ -436,13 +902,6 @@ function createModifierContext(entity) {
436
902
  return ctx;
437
903
  },
438
904
  },
439
- source: {
440
- get: () => entity.source,
441
- set: (newValue) => {
442
- entity.source = newValue;
443
- return ctx;
444
- },
445
- },
446
905
  parentKey: {
447
906
  get: () => entity.parentKey,
448
907
  set: (newValue) => {
@@ -720,10 +1179,10 @@ class AXPEntityMiddleware {
720
1179
  const flags = rx.flags.replace('g', '');
721
1180
  return new RegExp(rx.source, flags);
722
1181
  }
723
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMiddleware, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
724
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMiddleware, providedIn: 'root' }); }
1182
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMiddleware, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1183
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMiddleware, providedIn: 'root' }); }
725
1184
  }
726
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMiddleware, decorators: [{
1185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMiddleware, decorators: [{
727
1186
  type: Injectable,
728
1187
  args: [{ providedIn: 'root' }]
729
1188
  }], ctorParameters: () => [] });
@@ -875,10 +1334,10 @@ class AXPEntityDefinitionRegistryService {
875
1334
  createEntityKey(moduleName, entityName) {
876
1335
  return `${moduleName}.${entityName}`;
877
1336
  }
878
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDefinitionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
879
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDefinitionRegistryService, providedIn: 'root' }); }
1337
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1338
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, providedIn: 'root' }); }
880
1339
  }
881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDefinitionRegistryService, decorators: [{
1340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDefinitionRegistryService, decorators: [{
882
1341
  type: Injectable,
883
1342
  args: [{
884
1343
  providedIn: 'root',
@@ -1039,10 +1498,10 @@ class AXPEntityCreateViewModelFactory {
1039
1498
  this.layout.setNavigationLoading(false);
1040
1499
  return new AXPEntityMasterCreateViewModel(this.injector, config, initialData, options);
1041
1500
  }
1042
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1043
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
1501
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1502
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
1044
1503
  }
1045
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateViewModelFactory, decorators: [{
1504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, decorators: [{
1046
1505
  type: Injectable,
1047
1506
  args: [{ providedIn: 'root' }]
1048
1507
  }] });
@@ -1086,6 +1545,7 @@ class AXPEntityMasterListViewModel {
1086
1545
  this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
1087
1546
  this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
1088
1547
  this.commandService = this.injector.get(AXPCommandService);
1548
+ this.eventService = this.injector.get(AXPBroadcastEventService);
1089
1549
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
1090
1550
  this.settingEntityKey = `${this.config.module}:${this.config.name}`;
1091
1551
  this.destroyed = new Subject();
@@ -1230,6 +1690,15 @@ class AXPEntityMasterListViewModel {
1230
1690
  this.events$.next({ action: 'refresh', meta: event.payload.meta });
1231
1691
  }
1232
1692
  });
1693
+ this.eventService
1694
+ .listen('REFRESH_LAYOUT')
1695
+ .pipe(takeUntil(this.destroyed))
1696
+ .subscribe((e) => {
1697
+ if (e.data.name == getEntityInfo(this.entityDef).source) {
1698
+ this.selectedItems.set([]);
1699
+ this.events$.next({ action: 'refresh' });
1700
+ }
1701
+ });
1233
1702
  this.sortedFields.set(this.sortableFields());
1234
1703
  }
1235
1704
  async applySettings() {
@@ -1252,12 +1721,12 @@ class AXPEntityMasterListViewModel {
1252
1721
  .map((c) => {
1253
1722
  return {
1254
1723
  ...c,
1255
- width: columnWidthsMap.get(c.name),
1256
- visible: columnVisibilityMap.get(c.name) ?? c.visible,
1724
+ width: columnWidthsMap.get(c.column?.options?.dataPath ?? c.name),
1725
+ visible: columnVisibilityMap.get(c.column?.options?.dataPath ?? c.name) ?? c.visible,
1257
1726
  };
1258
1727
  }) // Update visibility
1259
- .sort((a, b) => columns.findIndex((col) => col.name === a.name) -
1260
- columns.findIndex((col) => col.name === b.name)));
1728
+ .sort((a, b) => columns.findIndex((col) => col.name === (a.column?.options?.dataPath ?? a.name)) -
1729
+ columns.findIndex((col) => col.name === (b.column?.options?.dataPath ?? b.name))));
1261
1730
  }
1262
1731
  if (Array.isArray(sorts)) {
1263
1732
  // sorts are AXPSortQuery[]; ensure we map by name
@@ -1278,10 +1747,25 @@ class AXPEntityMasterListViewModel {
1278
1747
  updateSettings((prev) => {
1279
1748
  const field = data.dataField.split('-')[1];
1280
1749
  const newSettings = { ...prev };
1281
- set(newSettings, `list.views.${this.view().name}.columns`, prev?.list?.views?.[this.view().name]?.columns?.map((c) => ({
1750
+ const existingColumns = prev?.list?.views?.[this.view().name]?.columns;
1751
+ const baseColumns = Array.isArray(existingColumns) && existingColumns.length
1752
+ ? existingColumns
1753
+ : this.allAvailableColumns().map((c) => ({
1754
+ name: c.column?.options?.dataPath ?? c.name,
1755
+ visible: c.visible,
1756
+ width: c.width,
1757
+ }));
1758
+ const updatedColumns = baseColumns.map((c) => ({
1282
1759
  ...c,
1283
1760
  width: c.name === field ? data.width : c.width,
1284
- })));
1761
+ }));
1762
+ const x = this.allAvailableColumns().map((c) => ({
1763
+ name: c.column?.options?.dataPath ?? c.name,
1764
+ visible: c.visible,
1765
+ width: c.width,
1766
+ }));
1767
+ set(newSettings, `list.views.${this.view().name}.columns`, updatedColumns);
1768
+ console.log(newSettings, `list.views.${this.view().name}.columns`);
1285
1769
  return newSettings;
1286
1770
  });
1287
1771
  break;
@@ -1289,7 +1773,7 @@ class AXPEntityMasterListViewModel {
1289
1773
  updateSettings((prev) => {
1290
1774
  const newSettings = { ...prev };
1291
1775
  set(newSettings, `list.views.${this.view().name}.columns`, data.map((c) => ({
1292
- name: c.name,
1776
+ name: c.column?.options?.dataPath ?? c.name,
1293
1777
  visible: c.visible,
1294
1778
  width: c.width,
1295
1779
  })));
@@ -1485,6 +1969,12 @@ class AXPEntityMasterListViewModel {
1485
1969
  });
1486
1970
  this.columns.set(cloned);
1487
1971
  }
1972
+ onColumnsOrderChanged(event) {
1973
+ const columns = [...this.columns()];
1974
+ moveItemInArray(columns, event.previousIndex - 1, event.currentIndex - 1);
1975
+ this.columns.set(columns);
1976
+ this.saveSettings('columnOrders', columns);
1977
+ }
1488
1978
  resetSorts() {
1489
1979
  this.applyViewSorts();
1490
1980
  }
@@ -1520,7 +2010,7 @@ class AXPEntityMasterListViewModel {
1520
2010
  module: this.entityDef.module,
1521
2011
  title: this.entityDef.title,
1522
2012
  parentKey: this.entityDef.parentKey,
1523
- source: this.entityDef.source,
2013
+ source: `${this.entityDef.module}.${this.entityDef.name}`,
1524
2014
  },
1525
2015
  data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
1526
2016
  options: options,
@@ -1528,7 +2018,20 @@ class AXPEntityMasterListViewModel {
1528
2018
  });
1529
2019
  }
1530
2020
  else {
1531
- this.commandService.execute(command, options);
2021
+ // this.commandService.execute(command, options);
2022
+ this.commandService.execute(command, {
2023
+ entity: getEntityInfo(this.entityDef).source,
2024
+ entityInfo: {
2025
+ name: this.entityDef.name,
2026
+ module: this.entityDef.module,
2027
+ title: this.entityDef.title,
2028
+ parentKey: this.entityDef.parentKey,
2029
+ source: `${this.entityDef.module}.${this.entityDef.name}`,
2030
+ },
2031
+ data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
2032
+ options: options,
2033
+ metadata: action?.metadata,
2034
+ });
1532
2035
  }
1533
2036
  }
1534
2037
  async execute(command) {
@@ -1563,10 +2066,10 @@ class AXPEntityListViewModelFactory {
1563
2066
  this.layout.setNavigationLoading(false);
1564
2067
  return new AXPEntityMasterListViewModel(this.injector, config);
1565
2068
  }
1566
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1567
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListViewModelFactory, providedIn: 'root' }); }
2069
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2070
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListViewModelFactory, providedIn: 'root' }); }
1568
2071
  }
1569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListViewModelFactory, decorators: [{
2072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListViewModelFactory, decorators: [{
1570
2073
  type: Injectable,
1571
2074
  args: [{ providedIn: 'root' }]
1572
2075
  }] });
@@ -1584,10 +2087,10 @@ class AXPEntityService {
1584
2087
  createPath(module, entity, path = 'list') {
1585
2088
  return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
1586
2089
  }
1587
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1588
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
2090
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2091
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
1589
2092
  }
1590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityService, decorators: [{
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityService, decorators: [{
1591
2094
  type: Injectable,
1592
2095
  args: [{ providedIn: 'root' }]
1593
2096
  }] });
@@ -1639,14 +2142,14 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1639
2142
  // Create dialog config but don't show it yet
1640
2143
  const createDialog = async () => {
1641
2144
  dialog = this.loadingDialog.show({
1642
- title: await this.translationService.translateAsync('workflow.deleting'),
2145
+ title: await this.translationService.translateAsync('@general:workflow.deleting'),
1643
2146
  mode: 'determinate',
1644
2147
  status: 'Deleting...',
1645
2148
  progressValue: 0,
1646
2149
  text: `0/${idLength}`,
1647
2150
  buttons: [
1648
2151
  {
1649
- text: await this.translationService.translateAsync('cancel'),
2152
+ text: await this.translationService.translateAsync('@general:actions.cancel.title'),
1650
2153
  color: 'danger',
1651
2154
  onClick: () => {
1652
2155
  if (dialog) {
@@ -1707,7 +2210,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1707
2210
  if (successfulPromises > 0 && failedPromises === 0) {
1708
2211
  // All items deleted successfully
1709
2212
  if (showResult) {
1710
- await this.dialogService.alert(await this.translationService.translateAsync('workflow.success-delete-title'), await this.translationService.translateAsync('workflow.success-delete-body', {
2213
+ await this.dialogService.alert(await this.translationService.translateAsync('@general:workflow.success-delete-title'), await this.translationService.translateAsync('@general:workflow.success-delete-body', {
1711
2214
  params: { item: successfulPromises },
1712
2215
  }), //TODO test translation
1713
2216
  'success');
@@ -1719,7 +2222,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1719
2222
  else if (successfulPromises > 0 && failedPromises > 0) {
1720
2223
  // Some items deleted successfully, some failed
1721
2224
  if (showResult) {
1722
- await this.dialogService.alert(await this.translationService.translateAsync('workflow.success-partial-delete-title'), await this.translationService.translateAsync('workflow.partial-delete-body', {
2225
+ await this.dialogService.alert(await this.translationService.translateAsync('@general:workflow.success-partial-delete-title'), await this.translationService.translateAsync('@general:workflow.partial-delete-body', {
1723
2226
  params: { success: successfulPromises, fail: failedPromises },
1724
2227
  }), 'warning');
1725
2228
  }
@@ -1729,7 +2232,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1729
2232
  else if (successfulPromises === 0 && failedPromises > 0) {
1730
2233
  // No items deleted, all failed
1731
2234
  if (showResult) {
1732
- await this.dialogService.alert(await this.translationService.translateAsync('workflow.fail-delete-title'), await this.translationService.translateAsync('workflow.fail-delete-body', {
2235
+ await this.dialogService.alert(await this.translationService.translateAsync('@general:workflow.fail-delete-title'), await this.translationService.translateAsync('@general:workflow.fail-delete-body', {
1733
2236
  params: { item: failedPromises },
1734
2237
  }), 'danger');
1735
2238
  }
@@ -1737,14 +2240,14 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
1737
2240
  else {
1738
2241
  // No items to delete (no successful or failed promises)
1739
2242
  if (showResult) {
1740
- await this.dialogService.alert(await this.translationService.translateAsync('workflow.no-need'), await this.translationService.translateAsync('workflow.no-item'), 'primary');
2243
+ await this.dialogService.alert(await this.translationService.translateAsync('@general:workflow.no-need'), await this.translationService.translateAsync('@general:workflow.no-item'), 'primary');
1741
2244
  }
1742
2245
  }
1743
2246
  }
1744
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1745
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
2247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2248
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
1746
2249
  }
1747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
2250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
1748
2251
  type: Injectable
1749
2252
  }] });
1750
2253
  const AXPDeleteEntityWorkflow = {
@@ -1753,8 +2256,8 @@ const AXPDeleteEntityWorkflow = {
1753
2256
  'confirm-delete': {
1754
2257
  action: 'show-prompt-dialog',
1755
2258
  input: {
1756
- title: 'workflow.warning',
1757
- message: `workflow.confirm-delete`,
2259
+ title: '@general:workflow.warning',
2260
+ message: '@general:workflow.confirm-delete',
1758
2261
  type: 'danger',
1759
2262
  },
1760
2263
  nextSteps: [
@@ -1775,6 +2278,35 @@ const AXPDeleteEntityWorkflow = {
1775
2278
  },
1776
2279
  };
1777
2280
 
2281
+ class AXPEntityUpdateViewSectionViewModel {
2282
+ constructor(entity, section) {
2283
+ this.entity = entity;
2284
+ this.section = section;
2285
+ this.group = this.entity.groups?.find((c) => c.id == this.section.id);
2286
+ this.name = signal(this.group.id, ...(ngDevMode ? [{ debugName: "name" }] : []));
2287
+ this.title = computed(() => {
2288
+ return this.group.title ?? this.group.id;
2289
+ }, ...(ngDevMode ? [{ debugName: "title" }] : []));
2290
+ this.description = computed(() => {
2291
+ return this.group.description;
2292
+ }, ...(ngDevMode ? [{ debugName: "description" }] : []));
2293
+ this.layout = computed(() => {
2294
+ const source = cloneDeep(this.section.layout ?? {});
2295
+ set(source, 'positions.default.colSpan', 12);
2296
+ return source;
2297
+ }, ...(ngDevMode ? [{ debugName: "layout" }] : []));
2298
+ this.elements = computed(() => {
2299
+ const { interfaces, properties } = this.entity;
2300
+ const updateProps = interfaces?.master?.update?.properties ?? [];
2301
+ const updatePropNames = new Set(updateProps.map(({ name }) => name));
2302
+ const filteredProperties = properties.filter(({ groupId, schema, name }) => groupId === this.group.id && !schema.hidden && updatePropNames.has(name));
2303
+ return filteredProperties.map((property) => {
2304
+ const updateProp = updateProps.find(({ name }) => name === property.name);
2305
+ return new AXPEntityMasterUpdateElementViewModel(this.entity, property);
2306
+ });
2307
+ }, ...(ngDevMode ? [{ debugName: "elements" }] : []));
2308
+ }
2309
+ }
1778
2310
  class AXPEntityMasterUpdateElementViewModel {
1779
2311
  constructor(entity, property) {
1780
2312
  this.entity = entity;
@@ -1840,6 +2372,13 @@ class AXPEntityMasterUpdateViewModel {
1840
2372
  return new AXPEntityMasterUpdateElementViewModel(this.entityDef, e);
1841
2373
  });
1842
2374
  }, ...(ngDevMode ? [{ debugName: "elements" }] : []));
2375
+ this.sections = computed(() => {
2376
+ const { interfaces, properties } = this.entityDef;
2377
+ const updateProps = interfaces?.master?.update?.properties?.map(({ name }) => name) ?? [];
2378
+ const visibleProperties = properties.filter(({ groupId, schema, name }) => groupId && !schema.hidden && updateProps.includes(name));
2379
+ const sections = interfaces?.master?.update?.sections?.filter(({ id }) => visibleProperties.some(({ groupId }) => groupId === id)) ?? [];
2380
+ return sections.map((section) => new AXPEntityUpdateViewSectionViewModel(this.entityDef, section));
2381
+ }, ...(ngDevMode ? [{ debugName: "sections" }] : []));
1843
2382
  }
1844
2383
  async save() {
1845
2384
  this.isInProgress.set(true);
@@ -1847,10 +2386,14 @@ class AXPEntityMasterUpdateViewModel {
1847
2386
  try {
1848
2387
  const com = this.entityDef.commands?.update;
1849
2388
  if (com) {
1850
- const exec = com.execute;
1851
- const result = await exec(this.context());
1852
- this.builder.setStatus(AXPPageStatus.Submitted);
1853
- return result;
2389
+ return new Promise((resolve) => {
2390
+ setTimeout(async () => {
2391
+ const exec = com.execute;
2392
+ const result = await exec(this.context());
2393
+ this.builder.setStatus(AXPPageStatus.Submitted);
2394
+ resolve(result);
2395
+ });
2396
+ });
1854
2397
  }
1855
2398
  }
1856
2399
  catch (error) {
@@ -1883,10 +2426,10 @@ class AXPEntityMasterUpdateViewModelFactory {
1883
2426
  this.layout.setNavigationLoading(false);
1884
2427
  return Promise.reject('cannot fetch ');
1885
2428
  }
1886
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1887
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
2429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2430
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
1888
2431
  }
1889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
2432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
1890
2433
  type: Injectable,
1891
2434
  args: [{ providedIn: 'root' }]
1892
2435
  }] });
@@ -1929,10 +2472,10 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
1929
2472
  context.setVariable('data', cloneDeep(popup.data.context));
1930
2473
  }
1931
2474
  }
1932
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1933
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
2475
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2476
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
1934
2477
  }
1935
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
2478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
1936
2479
  type: Injectable
1937
2480
  }] });
1938
2481
  class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
@@ -1947,10 +2490,10 @@ class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
1947
2490
  },
1948
2491
  }));
1949
2492
  }
1950
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1951
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
2493
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2494
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
1952
2495
  }
1953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
2496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
1954
2497
  type: Injectable
1955
2498
  }] });
1956
2499
  const AXPModifyEntitySectionWorkflow = {
@@ -2003,7 +2546,7 @@ class AXPEntityMasterSingleViewGroupViewModel {
2003
2546
  }, ...(ngDevMode ? [{ debugName: "description" }] : []));
2004
2547
  this.layout = computed(() => {
2005
2548
  const source = cloneDeep(this.section.layout ?? {});
2006
- set(source, 'positions.default.colSpan', 12);
2549
+ set(source, 'positions.sm.colSpan', 12);
2007
2550
  return source;
2008
2551
  }, ...(ngDevMode ? [{ debugName: "layout" }] : []));
2009
2552
  this.props = computed(() => {
@@ -2243,10 +2786,10 @@ class AXPEntityDetailViewModelFactory {
2243
2786
  this.layout.setNavigationLoading(false);
2244
2787
  return Promise.reject('cannot fetch ');
2245
2788
  }
2246
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDetailViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2247
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDetailViewModelFactory, providedIn: 'root' }); }
2789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2790
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, providedIn: 'root' }); }
2248
2791
  }
2249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityDetailViewModelFactory, decorators: [{
2792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDetailViewModelFactory, decorators: [{
2250
2793
  type: Injectable,
2251
2794
  args: [{ providedIn: 'root' }]
2252
2795
  }] });
@@ -2258,9 +2801,6 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
2258
2801
  return service.create(moduleName, entityName, id);
2259
2802
  };
2260
2803
 
2261
- const AXP_ENTITY_STORAGE_BACKEND = new InjectionToken('AXP_ENTITY_STORAGE_BACKEND');
2262
- const AXP_ENTITY_STORAGE_MIDDLEWARE = new InjectionToken('AXP_ENTITY_STORAGE_MIDDLEWARE');
2263
-
2264
2804
  class AXPEntityStorageService {
2265
2805
  }
2266
2806
  class AXPEntityDataProvider {
@@ -2300,6 +2840,7 @@ class AXMEntityCrudServiceImpl {
2300
2840
  this._storageService = inject(AXPEntityStorageService);
2301
2841
  this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
2302
2842
  this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
2843
+ this._entityCategoryDataProvider = new AXPEntityDataProviderImpl(this._storageService, `${this.entityName}Category`);
2303
2844
  }
2304
2845
  async insertOne(request) {
2305
2846
  return this._entityDataProvider.insertOne(request);
@@ -2315,18 +2856,23 @@ class AXMEntityCrudServiceImpl {
2315
2856
  }
2316
2857
  async query(request = { skip: 0, take: 100 }) {
2317
2858
  const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
2318
- const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
2319
- if (entityRef.parentKey) {
2320
- if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
2321
- request.filter = {
2322
- value: true,
2323
- field: entityRef.parentKey,
2324
- operator: {
2325
- type: 'isEmpty',
2326
- },
2327
- };
2859
+ try {
2860
+ const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
2861
+ if (entityRef.parentKey) {
2862
+ if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
2863
+ request.filter = {
2864
+ value: true,
2865
+ field: entityRef.parentKey,
2866
+ operator: {
2867
+ type: 'isEmpty',
2868
+ },
2869
+ };
2870
+ }
2328
2871
  }
2329
2872
  }
2873
+ catch (error) {
2874
+ console.error(error);
2875
+ }
2330
2876
  return this._entityDataProvider.query(request);
2331
2877
  }
2332
2878
  async findOne(filter) {
@@ -2343,7 +2889,7 @@ class AXMEntityCrudServiceImpl {
2343
2889
  operator: {
2344
2890
  type: 'isEmpty',
2345
2891
  },
2346
- }
2892
+ },
2347
2893
  };
2348
2894
  const result = await this._entityDataProvider.query(queryRequest);
2349
2895
  return result;
@@ -2359,7 +2905,7 @@ class AXMEntityCrudServiceImpl {
2359
2905
  operator: {
2360
2906
  type: 'equal',
2361
2907
  },
2362
- }
2908
+ },
2363
2909
  };
2364
2910
  const result = await this._entityDataProvider.query(queryRequest);
2365
2911
  return result;
@@ -2374,226 +2920,60 @@ class AXMEntityCrudServiceImpl {
2374
2920
  operator: {
2375
2921
  type: 'contains',
2376
2922
  },
2377
- }
2923
+ },
2378
2924
  };
2379
2925
  const result = await this._entityDataProvider.query(queryRequest);
2380
2926
  return result;
2381
2927
  }
2928
+ async getCategoriesList(request = { skip: 0, take: 1000 }) {
2929
+ return this._entityCategoryDataProvider.query(request);
2930
+ }
2382
2931
  get storageService() {
2383
2932
  return this._storageService;
2384
2933
  }
2385
2934
  }
2386
2935
 
2387
- class AXPMiddlewareEntityStorageService extends AXPEntityStorageService {
2936
+ class AXPLayoutAdapterBuilder {
2388
2937
  constructor() {
2389
- super(...arguments);
2390
- this.backend = inject(AXP_ENTITY_STORAGE_BACKEND);
2391
- this.allMiddlewares = (inject(AXP_ENTITY_STORAGE_MIDDLEWARE, { optional: true }) || []).slice();
2392
- this.injector = inject(EnvironmentInjector);
2393
- }
2394
- get dbName() {
2395
- return this.backend.dbName;
2396
- }
2397
- filterMiddlewares(ctx) {
2398
- return this.allMiddlewares
2399
- .filter((mw) => {
2400
- const t = mw.target;
2401
- if (!t)
2402
- return true;
2403
- if (t.ops && !t.ops.includes(ctx.op))
2404
- return false;
2405
- if (t.entity) {
2406
- if (typeof t.entity === 'string' && t.entity !== ctx.entityName)
2407
- return false;
2408
- if (t.entity instanceof RegExp && !t.entity.test(ctx.entityName))
2409
- return false;
2410
- }
2411
- if (t.predicate && !t.predicate(ctx))
2412
- return false;
2413
- return true;
2414
- })
2415
- .sort((a, b) => (a.target?.order ?? 0) - (b.target?.order ?? 0));
2938
+ this.adapter = {};
2416
2939
  }
2417
- compose(mws, leaf, ctx) {
2418
- return mws
2419
- .slice()
2420
- .reverse()
2421
- .reduce((next, mw) => {
2422
- return async () => runInInjectionContext(this.injector, () => mw.execute(ctx, next));
2423
- }, leaf);
2940
+ setEntity(entity, rootContext) {
2941
+ this.entity = entity;
2942
+ this.rootContext = rootContext;
2943
+ return this;
2424
2944
  }
2425
- async run(ctx, delegate) {
2426
- const chain = this.compose(this.filterMiddlewares(ctx), async () => {
2427
- ctx.result = await delegate();
2428
- }, ctx);
2429
- await chain();
2430
- return ctx.result;
2945
+ setDependencies(dependencies) {
2946
+ this.dependencies = dependencies;
2947
+ return this;
2431
2948
  }
2432
- createCtx(op, entityName, init) {
2433
- return {
2434
- op,
2435
- entityName,
2436
- locals: new Map(),
2437
- backend: {
2438
- getOneRaw: (name, id) => this.backend.getOne(name, id),
2439
- insertOneRaw: (name, e) => this.backend.insertOne(name, e),
2440
- },
2441
- ...init,
2442
- };
2949
+ setMainPage(mainPage) {
2950
+ this.adapter.pages = [mainPage];
2951
+ return this;
2443
2952
  }
2444
- async initial(entityName, collection, options) {
2445
- const ctx = this.createCtx('initial', entityName, { data: collection });
2446
- return this.run(ctx, () => this.backend.initial(entityName, ctx.data, options));
2953
+ setRelatedPages(relatedPages) {
2954
+ this.adapter.pages = [...(this.adapter.pages || []), ...relatedPages];
2955
+ return this;
2447
2956
  }
2448
- async getOne(entityName, id) {
2449
- const ctx = this.createCtx('getOne', entityName, { id });
2450
- return this.run(ctx, () => this.backend.getOne(entityName, id));
2957
+ setPages(pages) {
2958
+ this.adapter.pages = pages;
2959
+ return this;
2451
2960
  }
2452
- async updateOne(entityName, id, keyValues) {
2453
- const ctx = this.createCtx('update', entityName, { id, data: keyValues });
2454
- return this.run(ctx, () => this.backend.updateOne(entityName, id, ctx.data));
2961
+ setExitUrl(params) {
2962
+ this.adapter.exitUrl = `/${params.applicationName}/m/${params.moduleName}/e/${params.entityName}/list`;
2963
+ return this;
2455
2964
  }
2456
- async deleteOne(entityName, id) {
2457
- const ctx = this.createCtx('delete', entityName, { id });
2458
- return this.run(ctx, () => this.backend.deleteOne(entityName, id));
2459
- }
2460
- async insertOne(entityName, entity) {
2461
- const ctx = this.createCtx('create', entityName, { data: entity });
2462
- return this.run(ctx, () => this.backend.insertOne(entityName, ctx.data));
2463
- }
2464
- async getAll(entityName) {
2465
- const ctx = this.createCtx('getAll', entityName);
2466
- return this.run(ctx, () => this.backend.getAll(entityName));
2467
- }
2468
- async query(entityName, request) {
2469
- const ctx = this.createCtx('query', entityName, { request });
2470
- return this.run(ctx, () => this.backend.query(entityName, request));
2471
- }
2472
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMiddlewareEntityStorageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
2473
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMiddlewareEntityStorageService }); }
2474
- }
2475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMiddlewareEntityStorageService, decorators: [{
2476
- type: Injectable
2477
- }] });
2478
-
2479
- /**
2480
- * Entity Event Dispatcher - A wrapper for entity-specific events
2481
- * Handles pattern-based dispatching for entity operations with wildcard support
2482
- */
2483
- class AXPEntityEventDispatcherService {
2484
- constructor() {
2485
- this.eventService = inject(AXPDistributedEventListenerService);
2486
- }
2487
- async dispatchEntityEvent(operation, entityName, data) {
2488
- const enhancedData = {
2489
- ...data,
2490
- entityName,
2491
- operation,
2492
- timestamp: new Date(),
2493
- source: 'entity-dispatcher',
2494
- };
2495
- const eventKeysToDispatch = await this.getAllMatchingEventKeys(operation, entityName);
2496
- const dispatchPromises = eventKeysToDispatch.map((key) => this.eventService.dispatch(key, enhancedData));
2497
- await Promise.all(dispatchPromises);
2498
- }
2499
- async getAllMatchingEventKeys(operation, entityName) {
2500
- const eventKeys = new Set();
2501
- const exactKeys = this.generateEventKeys(operation, entityName);
2502
- exactKeys.forEach((key) => eventKeys.add(key));
2503
- const wildcardKeys = await this.findMatchingWildcardKeys(operation, entityName);
2504
- wildcardKeys.forEach((key) => eventKeys.add(key));
2505
- return Array.from(eventKeys);
2506
- }
2507
- async findMatchingWildcardKeys(operation, entityName) {
2508
- const matchingKeys = [];
2509
- const allListenerKeys = await this.eventService.getRegisteredKeys();
2510
- const actualEventKey = `entity.${operation}.${entityName}`;
2511
- for (const listenerKey of allListenerKeys) {
2512
- if (listenerKey.includes('*') && this.matchesEntityPattern(actualEventKey, listenerKey)) {
2513
- matchingKeys.push(listenerKey);
2514
- }
2515
- }
2516
- return matchingKeys;
2517
- }
2518
- matchesEntityPattern(eventKey, pattern) {
2519
- if (!pattern.startsWith('entity.') || !pattern.includes('*')) {
2520
- return false;
2521
- }
2522
- const regexPattern = pattern.replace(/\./g, '\\.').replace(/\*/g, '.*');
2523
- const regex = new RegExp(`^${regexPattern}$`);
2524
- return regex.test(eventKey);
2525
- }
2526
- generateEventKeys(operation, entityName) {
2527
- const keys = [];
2528
- keys.push(`entity.${operation}`);
2529
- keys.push(`entity.${operation}.${entityName}`);
2530
- const entityParts = entityName.split('.');
2531
- if (entityParts.length > 1) {
2532
- const moduleName = entityParts[0];
2533
- keys.push(`entity.${operation}.${moduleName}`);
2534
- }
2535
- return keys;
2536
- }
2537
- async dispatchInserted(entityName, data) {
2538
- await this.dispatchEntityEvent('inserted', entityName, data);
2539
- }
2540
- async dispatchUpdated(entityName, data) {
2541
- await this.dispatchEntityEvent('updated', entityName, data);
2542
- }
2543
- async dispatchDeleted(entityName, data) {
2544
- await this.dispatchEntityEvent('deleted', entityName, data);
2545
- }
2546
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityEventDispatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2547
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityEventDispatcherService, providedIn: 'root' }); }
2548
- }
2549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityEventDispatcherService, decorators: [{
2550
- type: Injectable,
2551
- args: [{
2552
- providedIn: 'root',
2553
- }]
2554
- }] });
2555
-
2556
- class AXPLayoutAdapterBuilder {
2557
- constructor() {
2558
- this.adapter = {};
2559
- }
2560
- setEntity(entity, rootContext) {
2561
- this.entity = entity;
2562
- this.rootContext = rootContext;
2563
- return this;
2564
- }
2565
- setDependencies(dependencies) {
2566
- this.dependencies = dependencies;
2567
- return this;
2568
- }
2569
- setMainPage(mainPage) {
2570
- this.adapter.pages = [mainPage];
2571
- return this;
2572
- }
2573
- setRelatedPages(relatedPages) {
2574
- this.adapter.pages = [...(this.adapter.pages || []), ...relatedPages];
2575
- return this;
2576
- }
2577
- setPages(pages) {
2578
- this.adapter.pages = pages;
2579
- return this;
2580
- }
2581
- setExitUrl(params) {
2582
- this.adapter.exitUrl = `/${params.applicationName}/m/${params.moduleName}/e/${params.entityName}/list`;
2583
- return this;
2584
- }
2585
- build() {
2586
- return {
2587
- name: `${this.entity?.module}.${this.entity?.name}`,
2588
- title: `${this.entity?.interfaces?.master?.single?.title}`,
2589
- label: this.entity?.formats.plural,
2590
- actions: [],
2591
- breadcrumbs: this.createBreadcrumbs(),
2592
- execute: this.createExecuteFunction(),
2593
- load: this.createLoadFunction(),
2594
- pages: this.adapter.pages || [],
2595
- exitUrl: this.adapter.exitUrl,
2596
- };
2965
+ build() {
2966
+ return {
2967
+ name: `${this.entity?.module}.${this.entity?.name}`,
2968
+ title: `${this.entity?.interfaces?.master?.single?.title}`,
2969
+ label: this.entity?.formats.plural,
2970
+ actions: [],
2971
+ breadcrumbs: this.createBreadcrumbs(),
2972
+ execute: this.createExecuteFunction(),
2973
+ load: this.createLoadFunction(),
2974
+ pages: this.adapter.pages || [],
2975
+ exitUrl: this.adapter.exitUrl,
2976
+ };
2597
2977
  }
2598
2978
  createBreadcrumbs() {
2599
2979
  const session = this.dependencies.session;
@@ -2634,10 +3014,10 @@ class AXPLayoutAdapterBuilder {
2634
3014
  };
2635
3015
  };
2636
3016
  }
2637
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2638
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterBuilder, providedIn: 'root' }); }
3017
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3018
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterBuilder, providedIn: 'root' }); }
2639
3019
  }
2640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterBuilder, decorators: [{
3020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterBuilder, decorators: [{
2641
3021
  type: Injectable,
2642
3022
  args: [{
2643
3023
  providedIn: 'root',
@@ -2839,13 +3219,13 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
2839
3219
  return {
2840
3220
  commands: {
2841
3221
  reject: {
2842
- title: 't("discard")',
3222
+ title: '@general:actions.discard.title',
2843
3223
  color: 'default',
2844
3224
  visible: '{{context.isDirty()}}',
2845
3225
  command: { name: 'discard' },
2846
3226
  },
2847
3227
  accept: {
2848
- title: 't("confirm")',
3228
+ title: '@general:actions.confirm.title',
2849
3229
  color: 'secondary',
2850
3230
  visible: '{{context.isDirty()}}',
2851
3231
  command: { name: 'update-entity' },
@@ -2990,7 +3370,7 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
2990
3370
  module: entityDef.module,
2991
3371
  title: entityDef.title,
2992
3372
  parentKey: entityDef.parentKey,
2993
- source: entityDef.source,
3373
+ source: `${entityDef.module}.${entityDef.name}`,
2994
3374
  },
2995
3375
  data: action.scope == AXPEntityCommandScope.Selected
2996
3376
  ? executeContext
@@ -3163,10 +3543,10 @@ class AXPRelatedEntityConverterFactory {
3163
3543
  createTabListConverter() {
3164
3544
  return this.createConverter('tab-list');
3165
3545
  }
3166
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPRelatedEntityConverterFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3167
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPRelatedEntityConverterFactory, providedIn: 'root' }); }
3546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPRelatedEntityConverterFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3547
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPRelatedEntityConverterFactory, providedIn: 'root' }); }
3168
3548
  }
3169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPRelatedEntityConverterFactory, decorators: [{
3549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPRelatedEntityConverterFactory, decorators: [{
3170
3550
  type: Injectable,
3171
3551
  args: [{
3172
3552
  providedIn: 'root',
@@ -3182,6 +3562,11 @@ class AXPMainEntityContentBuilder {
3182
3562
  async build(entity, rootContext, dependencies, rootTitle) {
3183
3563
  const groups = entity?.groups ?? [];
3184
3564
  const singleInterface = entity?.interfaces?.master?.single;
3565
+ const updateInterface = entity?.interfaces?.master?.update;
3566
+ // Get list of visible property names from single interface
3567
+ const visiblePropertyNames = new Set(singleInterface?.properties?.map((p) => p.name) ?? []);
3568
+ // Get list of editable property names from update interface
3569
+ const editablePropertyNames = new Set(updateInterface?.properties?.map((p) => p.name) ?? []);
3185
3570
  // Accumulate groups from main and merge-detail related entities for validation/title lookup
3186
3571
  const allGroups = [...groups];
3187
3572
  // Create expression evaluator for actions
@@ -3432,7 +3817,7 @@ class AXPMainEntityContentBuilder {
3432
3817
  })),
3433
3818
  ];
3434
3819
  // eslint-disable-next-line no-console
3435
- console.debug('[AXP] merge-details sorted sections', debugSections);
3820
+ //console.debug('[AXP] merge-details sorted sections', debugSections);
3436
3821
  }
3437
3822
  catch { }
3438
3823
  const getVisiblePropertyByGroupId = async (groupId) => {
@@ -3462,7 +3847,7 @@ class AXPMainEntityContentBuilder {
3462
3847
  settings: {
3463
3848
  commands: {
3464
3849
  reject: {
3465
- title: 't("discard")',
3850
+ title: '@general:actions.discard.title',
3466
3851
  color: 'default',
3467
3852
  visible: '{{context.isDirty()}}',
3468
3853
  command: {
@@ -3470,7 +3855,7 @@ class AXPMainEntityContentBuilder {
3470
3855
  },
3471
3856
  },
3472
3857
  accept: {
3473
- title: 't("confirm")',
3858
+ title: '@general:actions.confirm.title',
3474
3859
  color: 'secondary',
3475
3860
  visible: '{{context.isDirty()}}',
3476
3861
  command: {
@@ -3492,57 +3877,68 @@ class AXPMainEntityContentBuilder {
3492
3877
  };
3493
3878
  },
3494
3879
  execute: async (e, context) => {
3495
- if (e.name == 'update-entity') {
3496
- const fn = entity?.commands?.update?.execute;
3497
- const result = await fn(context);
3498
- return {
3499
- success: true,
3500
- result: result,
3501
- };
3502
- }
3503
- else {
3504
- // Find action in single interface actions
3505
- const action = actions.find((a) => a.name === e.name);
3506
- if (action && dependencies?.workflowService) {
3507
- // Evaluate action options with current context
3508
- let evaluatedOptions = action.options;
3509
- if (evaluateExpressions && action.options) {
3510
- try {
3511
- evaluatedOptions = await evaluateExpressions(action.options);
3880
+ try {
3881
+ if (e.name == 'update-entity') {
3882
+ const fn = entity?.commands?.update?.execute;
3883
+ const result = await fn(context);
3884
+ return {
3885
+ success: true,
3886
+ result: result,
3887
+ };
3888
+ }
3889
+ else {
3890
+ // Find action in single interface actions
3891
+ const action = actions.find((a) => a.name === e.name);
3892
+ if (action && dependencies?.workflowService) {
3893
+ // Evaluate action options with current context
3894
+ let evaluatedOptions = action.options;
3895
+ if (evaluateExpressions && action.options) {
3896
+ try {
3897
+ evaluatedOptions = await evaluateExpressions(action.options);
3898
+ }
3899
+ catch {
3900
+ // Keep original options if evaluation fails
3901
+ }
3512
3902
  }
3513
- catch {
3514
- // Keep original options if evaluation fails
3903
+ const commandName = e.name.split('&')[0];
3904
+ if (this.workflowService.exists(commandName)) {
3905
+ await this.workflowService.execute(commandName, {
3906
+ entity: getEntityInfo(entity).source,
3907
+ data: context,
3908
+ entityInfo: {
3909
+ name: entity.name,
3910
+ module: entity.module,
3911
+ title: entity.title,
3912
+ parentKey: entity.parentKey,
3913
+ source: `${entity.module}.${entity.name}`,
3914
+ },
3915
+ options: evaluatedOptions,
3916
+ metadata: action.metadata,
3917
+ });
3918
+ return {
3919
+ success: true,
3920
+ };
3921
+ }
3922
+ if (this.commandService.exists(commandName)) {
3923
+ // check options for evaluation
3924
+ await this.commandService.execute(commandName, e.options);
3515
3925
  }
3516
3926
  }
3517
- const commandName = e.name.split('&')[0];
3518
- if (this.workflowService.exists(commandName)) {
3519
- await this.workflowService.execute(commandName, {
3520
- entity: getEntityInfo(entity).source,
3521
- data: context,
3522
- entityInfo: {
3523
- name: entity.name,
3524
- module: entity.module,
3525
- title: entity.title,
3526
- parentKey: entity.parentKey,
3527
- source: entity.source,
3528
- },
3529
- options: evaluatedOptions,
3530
- metadata: action.metadata,
3531
- });
3532
- return {
3533
- success: true,
3534
- };
3535
- }
3536
- if (this.commandService.exists(commandName)) {
3537
- // check options for evaluation
3538
- await this.commandService.execute(commandName, e.options);
3539
- }
3927
+ return {
3928
+ success: false,
3929
+ error: {
3930
+ code: 'invalid_command',
3931
+ message: 'Invalid command',
3932
+ },
3933
+ };
3540
3934
  }
3935
+ }
3936
+ catch (error) {
3541
3937
  return {
3542
3938
  success: false,
3543
3939
  error: {
3544
- code: 'invalid_command',
3545
- message: 'Invalid command',
3940
+ //TODO: handle error as object
3941
+ message: error,
3546
3942
  },
3547
3943
  };
3548
3944
  }
@@ -3590,9 +3986,15 @@ class AXPMainEntityContentBuilder {
3590
3986
  },
3591
3987
  },
3592
3988
  },
3593
- children: (await getVisiblePropertyByGroupId(s.id)).map((p) => {
3989
+ children: (await getVisiblePropertyByGroupId(s.id))
3990
+ .filter((p) => visiblePropertyNames.has(p.name))
3991
+ .map((p) => {
3594
3992
  const layout = getPropertyLayout(p.name, p);
3595
3993
  const prefixed = p.__dataPath ? `${p.__dataPath}.${p.name}` : p.name;
3994
+ // Check if property is editable (exists in update interface)
3995
+ const isEditable = editablePropertyNames.has(p.name);
3996
+ // Check if property has its own disabled option
3997
+ const hasOwnDisabled = p.schema.interface?.options?.disabled !== undefined;
3596
3998
  return {
3597
3999
  type: 'grid-item-layout',
3598
4000
  name: prefixed,
@@ -3626,7 +4028,9 @@ class AXPMainEntityContentBuilder {
3626
4028
  })),
3627
4029
  // Attach dataPath for merged properties to be available in widgets/options if needed
3628
4030
  dataPath: p.__dataPath,
3629
- }),
4031
+ },
4032
+ // Only set disabled if property doesn't have its own disabled option
4033
+ hasOwnDisabled ? {} : { disabled: !isEditable }),
3630
4034
  },
3631
4035
  ],
3632
4036
  },
@@ -3742,10 +4146,10 @@ class AXPMainEntityContentBuilder {
3742
4146
  }
3743
4147
  return tabs;
3744
4148
  }
3745
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMainEntityContentBuilder, deps: [{ token: AXPRelatedEntityConverterFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
3746
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMainEntityContentBuilder, providedIn: 'root' }); }
4149
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMainEntityContentBuilder, deps: [{ token: AXPRelatedEntityConverterFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
4150
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMainEntityContentBuilder, providedIn: 'root' }); }
3747
4151
  }
3748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPMainEntityContentBuilder, decorators: [{
4152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMainEntityContentBuilder, decorators: [{
3749
4153
  type: Injectable,
3750
4154
  args: [{
3751
4155
  providedIn: 'root',
@@ -3884,10 +4288,10 @@ class AXPLayoutAdapterFactory {
3884
4288
  const title = await dependencies.expressionEvaluator.evaluate(entity.interfaces?.master?.single?.title, rootContext);
3885
4289
  return title;
3886
4290
  }
3887
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }], target: i0.ɵɵFactoryTarget.Injectable }); }
3888
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterFactory, providedIn: 'root' }); }
4291
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }], target: i0.ɵɵFactoryTarget.Injectable }); }
4292
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterFactory, providedIn: 'root' }); }
3889
4293
  }
3890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLayoutAdapterFactory, decorators: [{
4294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLayoutAdapterFactory, decorators: [{
3891
4295
  type: Injectable,
3892
4296
  args: [{
3893
4297
  providedIn: 'root',
@@ -4080,7 +4484,6 @@ function getVisibleProperties(entity) {
4080
4484
  class AXPEntityListTableService {
4081
4485
  constructor() {
4082
4486
  //#region ---- Services & Dependencies ----
4083
- this.entityResolver = inject(AXPEntityResolver);
4084
4487
  this.workflow = inject(AXPWorkflowService);
4085
4488
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
4086
4489
  this.evaluateExpressions = async (options, data) => {
@@ -4213,7 +4616,7 @@ class AXPEntityListTableService {
4213
4616
  module: entity.module,
4214
4617
  title: entity.title,
4215
4618
  parentKey: entity.parentKey,
4216
- source: entity.source,
4619
+ source: `${entity.module}.${entity.name}`,
4217
4620
  },
4218
4621
  data: action?.scope == AXPEntityCommandScope.Selected ? selectedRows : data,
4219
4622
  options: options,
@@ -4253,10 +4656,10 @@ class AXPEntityListTableService {
4253
4656
  },
4254
4657
  };
4255
4658
  }
4256
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4257
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListTableService }); }
4659
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4660
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListTableService }); }
4258
4661
  }
4259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListTableService, decorators: [{
4662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListTableService, decorators: [{
4260
4663
  type: Injectable
4261
4664
  }] });
4262
4665
 
@@ -4275,6 +4678,9 @@ class AXPEntityListToolbarService {
4275
4678
  filterDefinitions: this.createFilterDefinitions(entity),
4276
4679
  columnDefinitions: this.createColumnDefinitions(entity, options),
4277
4680
  sortDefinitions: this.createSortDefinitions(entity),
4681
+ canFilter: true,
4682
+ canColumns: true,
4683
+ canSort: true,
4278
4684
  };
4279
4685
  return toolbarOptions;
4280
4686
  }
@@ -4347,17 +4753,17 @@ class AXPEntityListToolbarService {
4347
4753
  };
4348
4754
  });
4349
4755
  }
4350
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4351
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListToolbarService }); }
4756
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4757
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListToolbarService }); }
4352
4758
  }
4353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListToolbarService, decorators: [{
4759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListToolbarService, decorators: [{
4354
4760
  type: Injectable
4355
4761
  }] });
4356
4762
 
4357
4763
  class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4358
4764
  constructor() {
4359
4765
  super(...arguments);
4360
- this.entityResolver = inject(AXPEntityResolver);
4766
+ this.entityService = inject(AXPEntityDefinitionRegistryService);
4361
4767
  this.workflow = inject(AXPWorkflowService);
4362
4768
  this.entityListTableService = inject(AXPEntityListTableService);
4363
4769
  this.entityListToolbarService = inject(AXPEntityListToolbarService);
@@ -4367,7 +4773,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4367
4773
  this.listNode = signal(null, ...(ngDevMode ? [{ debugName: "listNode" }] : []));
4368
4774
  this.list = viewChild('list', ...(ngDevMode ? [{ debugName: "list" }] : []));
4369
4775
  this.allWidgets = viewChildren(AXPWidgetRendererDirective, ...(ngDevMode ? [{ debugName: "allWidgets" }] : []));
4370
- this.listWidget = linkedSignal(() => this.allWidgets().find((widget) => widget.node()?.type === AXPWidgetsCatalog.list));
4776
+ this.listWidget = linkedSignal(() => this.allWidgets().find((widget) => widget.node()?.type === AXPWidgetsCatalog.list), ...(ngDevMode ? [{ debugName: "listWidget" }] : []));
4371
4777
  this.toolbarWidget = computed(() => this.allWidgets().find((widget) => widget.node()?.type === AXPWidgetsCatalog.listToolbar), ...(ngDevMode ? [{ debugName: "toolbarWidget" }] : []));
4372
4778
  this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
4373
4779
  this.toolbarNode = signal(null, ...(ngDevMode ? [{ debugName: "toolbarNode" }] : []));
@@ -4446,7 +4852,8 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4446
4852
  this.#effect = effect(() => {
4447
4853
  const queries = this.getValue()?.toolbar;
4448
4854
  const listInstance = this.listWidget()?.instance;
4449
- const dataSource = this.listWidget()?.options()['dataSource'];
4855
+ // const dataSource = this.listWidget()?.options()['dataSource'] as AXDataSource;
4856
+ const dataSource = listInstance?.options()?.['dataSource'];
4450
4857
  const isMounted = this.isMounted();
4451
4858
  if (!this.hasRequiredDependencies(dataSource, queries, listInstance)) {
4452
4859
  return;
@@ -4489,7 +4896,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4489
4896
  module: this.entity()?.module,
4490
4897
  title: this.entity()?.title,
4491
4898
  parentKey: this.entity()?.parentKey,
4492
- source: this.entity()?.source,
4899
+ source: `${this.entity()?.module}.${this.entity()?.name}`,
4493
4900
  },
4494
4901
  data: action?.scope == AXPEntityCommandScope.Selected
4495
4902
  ? this.selectedItems()
@@ -4591,7 +4998,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4591
4998
  throw new Error('Invalid entity source');
4592
4999
  }
4593
5000
  // Resolve entity and set it in the signal
4594
- const resolvedEntity = await this.entityResolver.get(moduleName, entityName);
5001
+ const resolvedEntity = await this.entityService.resolve(moduleName, entityName);
4595
5002
  if (!resolvedEntity) {
4596
5003
  throw new Error(`Entity not found: ${this.entitySource()}`);
4597
5004
  }
@@ -4646,8 +5053,8 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4646
5053
  this.destroyed.next();
4647
5054
  this.destroyed.complete();
4648
5055
  }
4649
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4650
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPEntityListWidgetViewComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "\"ax-h-full\"" } }, providers: [AXPEntityListTableService, AXPEntityListToolbarService], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "allWidgets", predicate: AXPWidgetRendererDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
5056
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5057
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPEntityListWidgetViewComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "\"ax-h-full\"" } }, providers: [AXPEntityListTableService, AXPEntityListToolbarService], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "allWidgets", predicate: AXPWidgetRendererDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
4651
5058
  @if (showEntityActions()) {
4652
5059
  <div class="ax-flex ax-gap-2 ax-justify-end ax-mb-4">
4653
5060
  @for (action of primaryActions(); track $index) {
@@ -4694,7 +5101,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4694
5101
  <ax-button
4695
5102
  [class.ax-sm]="layoutThemeService.isSmall()"
4696
5103
  [iconOnly]="layoutThemeService.isSmall()"
4697
- [text]="'actions'"
5104
+ [text]="'@general:terms.interface.actions' | translate | async"
4698
5105
  [look]="layoutThemeService.isSmall() ? 'blank' : 'solid'"
4699
5106
  [color]="'default'"
4700
5107
  >
@@ -4748,9 +5155,9 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
4748
5155
  ></ng-container>
4749
5156
  }
4750
5157
  </div>
4751
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: AXPLayoutBuilderModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3$2.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: "component", type: i3$2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3$2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5158
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.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: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.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: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$1.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4752
5159
  }
4753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
5160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
4754
5161
  type: Component,
4755
5162
  args: [{
4756
5163
  template: `
@@ -4800,7 +5207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
4800
5207
  <ax-button
4801
5208
  [class.ax-sm]="layoutThemeService.isSmall()"
4802
5209
  [iconOnly]="layoutThemeService.isSmall()"
4803
- [text]="'actions'"
5210
+ [text]="'@general:terms.interface.actions' | translate | async"
4804
5211
  [look]="layoutThemeService.isSmall() ? 'blank' : 'solid'"
4805
5212
  [color]="'default'"
4806
5213
  >
@@ -4861,7 +5268,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
4861
5268
  },
4862
5269
  changeDetection: ChangeDetectionStrategy.OnPush,
4863
5270
  providers: [AXPEntityListTableService, AXPEntityListToolbarService],
4864
- imports: [CommonModule, AXDecoratorModule, AXPLayoutBuilderModule, AXButtonModule, AXDropdownModule],
5271
+ imports: [
5272
+ CommonModule,
5273
+ AXDecoratorModule,
5274
+ AXPWidgetCoreModule,
5275
+ AXButtonModule,
5276
+ AXDropdownModule,
5277
+ AXTranslationModule,
5278
+ ],
4865
5279
  }]
4866
5280
  }] });
4867
5281
 
@@ -4896,10 +5310,10 @@ const AXPEntityListWidget = {
4896
5310
  };
4897
5311
 
4898
5312
  class AXPEntityReferenceWidgetViewComponent extends AXPLayoutBaseWidgetComponent {
4899
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4900
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5313
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5314
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4901
5315
  }
4902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
5316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
4903
5317
  type: Component,
4904
5318
  args: [{
4905
5319
  template: ``,
@@ -4928,10 +5342,10 @@ class AXPEntityReferenceWidgetEditComponent extends AXPLayoutBaseWidgetComponent
4928
5342
  }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
4929
5343
  }
4930
5344
  #efEntity;
4931
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4932
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", 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 }); }
5345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5346
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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 }); }
4933
5347
  }
4934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
5348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
4935
5349
  type: Component,
4936
5350
  args: [{
4937
5351
  template: ``,
@@ -4947,10 +5361,10 @@ var entityReferenceWidgetEdit_component = /*#__PURE__*/Object.freeze({
4947
5361
  });
4948
5362
 
4949
5363
  class AXPEntityReferenceWidgetColumnComponent extends AXPColumnWidgetComponent {
4950
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4951
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", 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 }); }
5364
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5365
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", 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 }); }
4952
5366
  }
4953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
5367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
4954
5368
  type: Component,
4955
5369
  args: [{
4956
5370
  template: `{{rawValue}}`,
@@ -4967,10 +5381,10 @@ var entityReferenceWidgetColumn_component = /*#__PURE__*/Object.freeze({
4967
5381
  });
4968
5382
 
4969
5383
  class AXPEntityReferenceWidgetPrintComponent extends AXPLayoutBaseWidgetComponent {
4970
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4971
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5385
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4972
5386
  }
4973
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
5387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
4974
5388
  type: Component,
4975
5389
  args: [{
4976
5390
  template: ``,
@@ -4987,10 +5401,10 @@ var entityReferenceWidgetPrint_component = /*#__PURE__*/Object.freeze({
4987
5401
  });
4988
5402
 
4989
5403
  class AXPEntityReferenceWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
4990
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4991
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5404
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5405
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4992
5406
  }
4993
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
5407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
4994
5408
  type: Component,
4995
5409
  args: [{
4996
5410
  template: ``,
@@ -5033,6 +5447,121 @@ const AXPEntityReferenceWidget = {
5033
5447
  },
5034
5448
  };
5035
5449
 
5450
+ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
5451
+ constructor() {
5452
+ super(...arguments);
5453
+ //#region ---- Computed Properties ----
5454
+ this.editorPath = `__${this.path}EditorValue`;
5455
+ this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
5456
+ this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
5457
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
5458
+ // protected expose = computed<string | undefined | any[]>(() => this.options()['expose'] as string);
5459
+ this.customFilter = computed(() => this.options()['filter'], ...(ngDevMode ? [{ debugName: "customFilter" }] : []));
5460
+ this.multiple = computed(() => (this.options()['multiple'] ?? false), ...(ngDevMode ? [{ debugName: "multiple" }] : []));
5461
+ //#endregion
5462
+ //#region ---- Lookup Node ----
5463
+ this.lookupNode = signal({
5464
+ type: 'lookup-editor',
5465
+ defaultValue: undefined,
5466
+ path: this.path,
5467
+ options: {},
5468
+ }, ...(ngDevMode ? [{ debugName: "lookupNode" }] : []));
5469
+ //#endregion
5470
+ //#region ---- Effects ----
5471
+ this.#efUpdateLookupNode = effect(() => {
5472
+ // console.log('path:', this.path, this.expose());
5473
+ const node = {
5474
+ type: 'lookup-editor',
5475
+ // defaultValue: this.getValue()?.value,
5476
+ path: this.editorPath,
5477
+ options: {
5478
+ entity: this.entity(),
5479
+ expose: [
5480
+ {
5481
+ source: this.textField(),
5482
+ target: `${this.path}EditorObj.title`,
5483
+ },
5484
+ {
5485
+ source: this.valueField(),
5486
+ target: `${this.path}EditorObj.id`,
5487
+ },
5488
+ ],
5489
+ look: 'select',
5490
+ multiple: this.multiple(),
5491
+ textField: this.textField(),
5492
+ filter: this.customFilter(),
5493
+ allowClear: true,
5494
+ },
5495
+ };
5496
+ this.lookupNode.set(node);
5497
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateLookupNode" }] : []));
5498
+ this.#efUpdateValue = effect(() => {
5499
+ const newValueObj = this.contextService.getValue(`${this.path}EditorObj`);
5500
+ const prevValue = untracked(() => this.getValue()?.value);
5501
+ if (isEqual(prevValue, newValueObj?.[this.valueField()])) {
5502
+ return;
5503
+ }
5504
+ const value = this.multiple()
5505
+ ? newValueObj?.[this.valueField()].map((v) => v[this.valueField()])
5506
+ : newValueObj?.[this.valueField()];
5507
+ const displayText = this.multiple()
5508
+ ? newValueObj?.[this.textField()].map((v) => v[this.textField()]).join(',')
5509
+ : newValueObj?.[this.textField()];
5510
+ this.setValue({
5511
+ value: value,
5512
+ operation: {
5513
+ type: this.multiple() ? 'in' : 'equal',
5514
+ },
5515
+ displayText: displayText,
5516
+ });
5517
+ }, ...(ngDevMode ? [{ debugName: "#efUpdateValue" }] : []));
5518
+ }
5519
+ //#endregion
5520
+ //#region ---- Effects ----
5521
+ #efUpdateLookupNode;
5522
+ #efUpdateValue;
5523
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5524
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPLookupFilterWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ` <ng-container axp-widget-renderer [node]="lookupNode()" [mode]="'edit'"></ng-container> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5525
+ }
5526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
5527
+ type: Component,
5528
+ args: [{
5529
+ template: ` <ng-container axp-widget-renderer [node]="lookupNode()" [mode]="'edit'"></ng-container> `,
5530
+ changeDetection: ChangeDetectionStrategy.OnPush,
5531
+ imports: [
5532
+ FormsModule,
5533
+ AXSelectBoxModule,
5534
+ AXTextBoxModule,
5535
+ AXButtonModule,
5536
+ AXDecoratorModule,
5537
+ AXLoadingModule,
5538
+ AXValidationModule,
5539
+ AXFormModule,
5540
+ AXPWidgetCoreModule,
5541
+ ],
5542
+ }]
5543
+ }] });
5544
+
5545
+ var lookupFilterWidgetEdit_component = /*#__PURE__*/Object.freeze({
5546
+ __proto__: null,
5547
+ AXPLookupFilterWidgetEditComponent: AXPLookupFilterWidgetEditComponent
5548
+ });
5549
+
5550
+ const AXPLookupFilterWidget = {
5551
+ name: 'lookup-filter',
5552
+ title: 'Lookup Filter',
5553
+ // categories: AXP_WIDGETS_FILTER_CATEGORY,
5554
+ type: 'filter',
5555
+ groups: [AXPWidgetGroupEnum.EntityWidget],
5556
+ icon: 'fa-light fa-square',
5557
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
5558
+ components: {
5559
+ edit: {
5560
+ component: () => Promise.resolve().then(function () { return lookupFilterWidgetEdit_component; }).then((c) => c.AXPLookupFilterWidgetEditComponent),
5561
+ },
5562
+ },
5563
+ };
5564
+
5036
5565
  class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5037
5566
  constructor() {
5038
5567
  super(...arguments);
@@ -5095,8 +5624,8 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5095
5624
  cls[`ax-gap-1`] = true;
5096
5625
  return cls;
5097
5626
  }
5098
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5099
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
5627
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5628
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
5100
5629
  @if(loading())
5101
5630
  {
5102
5631
  <ax-loading></ax-loading>
@@ -5114,9 +5643,9 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5114
5643
  <span class="ax-text-muted">---</span>
5115
5644
  }
5116
5645
  }
5117
- `, 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 }); }
5646
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5118
5647
  }
5119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
5648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
5120
5649
  type: Component,
5121
5650
  args: [{
5122
5651
  selector: 'axp-lookup-widget-view',
@@ -5152,383 +5681,194 @@ var lookupWidgetView_component = /*#__PURE__*/Object.freeze({
5152
5681
  AXPLookupWidgetViewComponent: AXPLookupWidgetViewComponent
5153
5682
  });
5154
5683
 
5155
- class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
5684
+ //#endregion
5685
+ class AXPEntityDataSelectorService {
5156
5686
  constructor() {
5157
- super(...arguments);
5158
- this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : []));
5159
- this.initialSelectedItems = [];
5160
- this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
5161
- this.allowSelect = computed(() => this.selectedItems().length > 0, ...(ngDevMode ? [{ debugName: "allowSelect" }] : []));
5162
- }
5163
- ngAfterViewInit() {
5164
- if (this.initialSelectedItems.length > 0 && this.grid()) {
5165
- this.grid()?.selectRows(...this.initialSelectedItems);
5166
- }
5167
- if (this.searchTerm) {
5168
- this.vm.applyInlineFilter(this.searchTerm);
5169
- }
5170
- else {
5171
- this.vm.applyFilterAndSort();
5172
- }
5687
+ //#region ---- Services & Dependencies ----
5688
+ this.dataSelectorService = inject(AXPDataSelectorService);
5689
+ this.filterOperatorMiddleware = inject(AXPFilterOperatorMiddlewareService);
5690
+ this.widgetResolver = inject(AXPWidgetRegistryService);
5173
5691
  }
5174
- handleRowDbClick(e) {
5175
- this.close({ items: [e.data] });
5692
+ //#endregion
5693
+ //#region ---- Public Methods ----
5694
+ /**
5695
+ * Open entity data selector popup
5696
+ */
5697
+ async open(options) {
5698
+ const config = this.createDataSelectorConfig(options);
5699
+ const result = await this.dataSelectorService.open(config);
5700
+ return result;
5176
5701
  }
5177
- handleRowClick(e) {
5178
- if (this.vm.allowMultiple()) {
5179
- this.selectedItems.set([...this.selectedItems(), e.data]);
5180
- }
5181
- else if (this.selectedItems().length > 0) {
5182
- const selected = this.selectedItems().find((item) => item.id === e.data.id);
5183
- if (selected) {
5184
- this.selectedItems.set(this.selectedItems().filter((item) => item.id !== selected.id));
5185
- }
5186
- else {
5187
- this.selectedItems.set([e.data]);
5188
- }
5189
- }
5190
- else if (this.selectedItems().length === 0) {
5191
- this.selectedItems.set([e.data]);
5192
- }
5193
- else {
5194
- this.selectedItems.set([e.data]);
5195
- }
5702
+ /**
5703
+ * Open entity data selector with category filter
5704
+ */
5705
+ async openWithCategoryFilter(options, categoryFilterConfig) {
5706
+ const config = this.createDataSelectorConfig({
5707
+ ...options,
5708
+ allowCreate: false
5709
+ });
5710
+ // Add category filter to config
5711
+ config.categoryFilter = {
5712
+ enabled: true,
5713
+ ...categoryFilterConfig
5714
+ };
5715
+ const result = await this.dataSelectorService.open(config);
5716
+ return result;
5196
5717
  }
5197
- async handleSelectedRowsChange(rows) {
5198
- this.selectedItems.set(rows);
5718
+ //#endregion
5719
+ //#region ---- Private Methods ----
5720
+ /**
5721
+ * Create data selector configuration from entity options
5722
+ */
5723
+ createDataSelectorConfig(options) {
5724
+ const dataSource = this.createDataSource(options);
5725
+ const columns = this.createColumns(options);
5726
+ const searchFields = this.getSearchFields(options);
5727
+ return {
5728
+ title: options.title,
5729
+ dataSource,
5730
+ columns,
5731
+ selectionMode: options.allowMultiple ? 'multiple' : 'single',
5732
+ searchFields,
5733
+ parentField: options.entity.parentKey,
5734
+ filters: options.filters || undefined,
5735
+ allowCreate: options.allowCreate ?? this.canCreate(options.entity),
5736
+ // Note: Custom filters will be applied to the dataSource in createDataSource
5737
+ };
5199
5738
  }
5200
- handleChangeSearchValue(e) {
5201
- if (e.isUserInteraction) {
5202
- this.vm.applyInlineFilter(e.value);
5203
- }
5204
- }
5205
- async handleCreateNewClick() {
5206
- this.close();
5207
- await this.vm.create();
5208
- }
5209
- handleCloseClick() {
5210
- this.close();
5211
- }
5212
- handleSelectClick() {
5213
- this.close({ items: this.selectedItems() });
5214
- }
5215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5216
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPLookupWidgetSelectorComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
5217
- <div class="ax-p-4 ax-flex ax-flex-col ax-gap-4 ax-overflow-hidden">
5218
- @if (vm.hasInlineFilters()) {
5219
- <div class="ax-w-full">
5220
- <ax-search-box
5221
- [placeholder]="('widget.lookup.search' | translate | async) + vm.inlineFiltersPlaceholders().join(', ')"
5222
- [value]="searchTerm"
5223
- (onValueChanged)="handleChangeSearchValue($event)"
5224
- [axAutoFocus]="true"
5225
- ><ax-clear-button></ax-clear-button
5226
- ></ax-search-box>
5227
- </div>
5228
- }
5229
- <ax-data-table
5230
- #grid
5231
- [showFooter]="false"
5232
- class="ax-h-[50vh]"
5233
- [paging]="true"
5234
- [fetchDataMode]="'manual'"
5235
- [loading]="{ enabled: true, animation: true }"
5236
- [dataSource]="vm.dataSource"
5237
- [parentField]="vm.parentKey()"
5238
- (selectedRowsChange)="handleSelectedRowsChange($event)"
5239
- (onRowClick)="handleRowClick($event)"
5240
- (onRowDbClick)="handleRowDbClick($event)"
5241
- >
5242
- @if (vm.allowMultiple()) {
5243
- <ax-select-column fixed="start" [width]="'50px'"></ax-select-column>
5244
- }
5245
- @for (col of vm.columns(); track col.name) {
5246
- @if (col.visible) {
5247
- <axp-widget-column-renderer
5248
- [expandHandler]="$index === 0 && vm.parentKey() ? true : false"
5249
- [caption]="col.title | translate | async"
5250
- [node]="col.node()"
5251
- ></axp-widget-column-renderer>
5252
- }
5253
- }
5254
- </ax-data-table>
5255
- </div>
5256
- <ax-footer>
5257
- <ax-suffix>
5258
- <ax-button look="solid" [text]="('close' | translate | async)!" (onClick)="handleCloseClick()"> </ax-button>
5259
- <ax-button
5260
- look="solid"
5261
- color="primary"
5262
- [text]="('select' | translate | async)!"
5263
- (onClick)="handleSelectClick()"
5264
- [disabled]="allowSelect() === false"
5265
- >
5266
- </ax-button>
5267
- @if (!vm.canCreate()) {
5268
- <ax-button
5269
- look="solid"
5270
- color="primary"
5271
- [text]="'Create-New' | translate | async"
5272
- (onClick)="handleCreateNewClick()"
5273
- >
5274
- <ax-prefix>
5275
- <ax-icon icon="fa-solid fa-add"></ax-icon>
5276
- </ax-prefix>
5277
- </ax-button>
5278
- }
5279
- </ax-suffix>
5280
- </ax-footer>
5281
- `, 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: i3$2.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$1.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$1.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: i3$1.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 }); }
5282
- }
5283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
5284
- type: Component,
5285
- args: [{
5286
- template: `
5287
- <div class="ax-p-4 ax-flex ax-flex-col ax-gap-4 ax-overflow-hidden">
5288
- @if (vm.hasInlineFilters()) {
5289
- <div class="ax-w-full">
5290
- <ax-search-box
5291
- [placeholder]="('widget.lookup.search' | translate | async) + vm.inlineFiltersPlaceholders().join(', ')"
5292
- [value]="searchTerm"
5293
- (onValueChanged)="handleChangeSearchValue($event)"
5294
- [axAutoFocus]="true"
5295
- ><ax-clear-button></ax-clear-button
5296
- ></ax-search-box>
5297
- </div>
5298
- }
5299
- <ax-data-table
5300
- #grid
5301
- [showFooter]="false"
5302
- class="ax-h-[50vh]"
5303
- [paging]="true"
5304
- [fetchDataMode]="'manual'"
5305
- [loading]="{ enabled: true, animation: true }"
5306
- [dataSource]="vm.dataSource"
5307
- [parentField]="vm.parentKey()"
5308
- (selectedRowsChange)="handleSelectedRowsChange($event)"
5309
- (onRowClick)="handleRowClick($event)"
5310
- (onRowDbClick)="handleRowDbClick($event)"
5311
- >
5312
- @if (vm.allowMultiple()) {
5313
- <ax-select-column fixed="start" [width]="'50px'"></ax-select-column>
5314
- }
5315
- @for (col of vm.columns(); track col.name) {
5316
- @if (col.visible) {
5317
- <axp-widget-column-renderer
5318
- [expandHandler]="$index === 0 && vm.parentKey() ? true : false"
5319
- [caption]="col.title | translate | async"
5320
- [node]="col.node()"
5321
- ></axp-widget-column-renderer>
5322
- }
5323
- }
5324
- </ax-data-table>
5325
- </div>
5326
- <ax-footer>
5327
- <ax-suffix>
5328
- <ax-button look="solid" [text]="('close' | translate | async)!" (onClick)="handleCloseClick()"> </ax-button>
5329
- <ax-button
5330
- look="solid"
5331
- color="primary"
5332
- [text]="('select' | translate | async)!"
5333
- (onClick)="handleSelectClick()"
5334
- [disabled]="allowSelect() === false"
5335
- >
5336
- </ax-button>
5337
- @if (!vm.canCreate()) {
5338
- <ax-button
5339
- look="solid"
5340
- color="primary"
5341
- [text]="'Create-New' | translate | async"
5342
- (onClick)="handleCreateNewClick()"
5343
- >
5344
- <ax-prefix>
5345
- <ax-icon icon="fa-solid fa-add"></ax-icon>
5346
- </ax-prefix>
5347
- </ax-button>
5348
- }
5349
- </ax-suffix>
5350
- </ax-footer>
5351
- `,
5352
- changeDetection: ChangeDetectionStrategy.OnPush,
5353
- imports: [
5354
- CommonModule,
5355
- AXCommonModule,
5356
- AXButtonModule,
5357
- AXFormModule,
5358
- AXDecoratorModule,
5359
- AXDropdownButtonModule,
5360
- AXDataTableModule,
5361
- AXSearchBoxModule,
5362
- AXPLayoutBuilderModule,
5363
- AXTranslationModule,
5364
- ],
5365
- inputs: [],
5366
- }]
5367
- }] });
5368
-
5369
- class AXPLookupWidgetSelectorViewModel {
5370
- constructor(injector, entityDef, options = {
5371
- parentFilters: null,
5372
- customFilter: null,
5373
- sortedFields: [],
5374
- columns: [],
5375
- }) {
5376
- this.injector = injector;
5377
- this.entityDef = entityDef;
5378
- this.options = options;
5379
- this.workflow = this.injector.get(AXPWorkflowService);
5380
- this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
5381
- this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
5382
- this.dataSource = new AXDataSource({
5739
+ /**
5740
+ * Create data source from entity definition
5741
+ */
5742
+ createDataSource(options) {
5743
+ const { entity, filters, parentFilters } = options;
5744
+ return new AXDataSource({
5383
5745
  byKey: (key) => {
5384
- const func = this.entityDef.queries.byKey.execute;
5746
+ const func = entity.queries.byKey.execute;
5385
5747
  return func();
5386
5748
  },
5387
5749
  load: (e) => {
5388
- const func = this.entityDef.queries.list?.execute;
5389
- this.mergeFilter(e, this.options.customFilter);
5750
+ const func = entity.queries.list?.execute;
5751
+ this.mergeFilters(e, filters, parentFilters);
5390
5752
  return func(e);
5391
5753
  },
5392
5754
  pageSize: 10,
5393
5755
  key: 'id',
5394
5756
  });
5395
- this.canCreate = computed(() => {
5396
- return this.entityDef.commands?.create?.execute != null;
5397
- }, ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
5398
- this.parentKey = computed(() => {
5399
- return this.entityDef.parentKey;
5400
- }, ...(ngDevMode ? [{ debugName: "parentKey" }] : []));
5401
- this.allowMultiple = computed(() => {
5402
- return this.options.allowMultiple ?? false;
5403
- }, ...(ngDevMode ? [{ debugName: "allowMultiple" }] : []));
5404
- this.inlineFiltersPlaceholders = computed(() => {
5405
- return (this.entityDef?.properties.filter((p) => p.options?.filter?.inline?.enabled).map((c) => c.title ?? c.name) ?? []);
5406
- }, ...(ngDevMode ? [{ debugName: "inlineFiltersPlaceholders" }] : []));
5407
- this.hasInlineFilters = computed(() => {
5408
- return this.inlineFiltersPlaceholders().length > 0;
5409
- }, ...(ngDevMode ? [{ debugName: "hasInlineFilters" }] : []));
5410
- this.columns = () => {
5411
- const { columns = [], properties } = this.entityDef;
5412
- const visibleProperties = properties.filter(({ schema }) => !schema?.hidden);
5413
- const visiblePropNames = new Set(visibleProperties.map(({ name }) => name));
5414
- return columns
5415
- .filter(({ name, showAs }) => visiblePropNames.has(name) || showAs)
5416
- .filter(({ name }) => ((this.options.columns?.length ?? 0) == 0) || this.options.columns?.includes(name))
5417
- .map((column) => {
5418
- if (column.showAs) {
5419
- const widgetConfig = this.widgetResolver.resolve(column.showAs.type);
5420
- const property = {
5421
- ...widgetConfig,
5422
- name: column.name,
5423
- title: column.title ?? '',
5424
- schema: {
5425
- dataType: 'string',
5426
- interface: {
5427
- type: column.showAs.type,
5428
- options: column.showAs.options,
5429
- },
5757
+ }
5758
+ /**
5759
+ * Create columns configuration from entity definition
5760
+ */
5761
+ createColumns(options) {
5762
+ const { entity, columns = [] } = options;
5763
+ const { columns: entityColumns = [], properties } = entity;
5764
+ const visibleProperties = properties.filter(({ schema }) => !schema?.hidden);
5765
+ const visiblePropNames = new Set(visibleProperties.map(({ name }) => name));
5766
+ return entityColumns
5767
+ .filter(({ name, showAs }) => visiblePropNames.has(name) || showAs)
5768
+ .filter(({ name }) => columns.length === 0 || columns.includes(name))
5769
+ .map((column) => {
5770
+ let property;
5771
+ let widgetType;
5772
+ let widgetOptions;
5773
+ if (column.showAs) {
5774
+ // Use custom column configuration
5775
+ const widgetConfig = this.widgetResolver.resolve(column.showAs.type);
5776
+ property = {
5777
+ ...widgetConfig,
5778
+ name: column.name,
5779
+ title: column.title ?? '',
5780
+ schema: {
5781
+ dataType: 'string',
5782
+ interface: {
5783
+ type: column.showAs.type,
5784
+ options: column.showAs.options,
5430
5785
  },
5431
- };
5432
- return new AXPEntityListViewColumnViewModel(property, column);
5433
- }
5434
- else {
5435
- const property = visibleProperties.find(({ name }) => name === column.name);
5436
- return new AXPEntityListViewColumnViewModel(property, column);
5786
+ },
5787
+ };
5788
+ widgetType = column.showAs.type;
5789
+ widgetOptions = column.showAs.options;
5790
+ }
5791
+ else {
5792
+ // Use entity property configuration
5793
+ property = visibleProperties.find(({ name }) => name === column.name);
5794
+ widgetType = property.schema?.interface?.type || 'text';
5795
+ widgetOptions = property.schema?.interface?.options || {};
5796
+ }
5797
+ return {
5798
+ name: column.name,
5799
+ title: property.title || column.title || column.name,
5800
+ visible: true,
5801
+ widget: {
5802
+ type: widgetType,
5803
+ options: widgetOptions
5437
5804
  }
5438
- });
5439
- };
5440
- this.inlineFilters = {
5441
- field: null,
5442
- logic: 'or',
5443
- operator: null,
5444
- filters: [],
5445
- };
5446
- this.advanceFilters = {
5447
- field: null,
5448
- logic: 'and',
5449
- operator: null,
5450
- filters: [],
5451
- };
5452
- }
5453
- async create() {
5454
- await this.workflow.execute('create-entity', {
5455
- entity: getEntityInfo(this.entityDef).source,
5805
+ };
5456
5806
  });
5457
5807
  }
5458
- applyInlineFilter(value, refresh = true) {
5459
- const props = this.entityDef.properties.filter((c) => c.options?.filter?.inline?.enabled);
5460
- this.inlineFilters.filters = [];
5461
- if (value) {
5462
- props.forEach((p) => {
5463
- this.inlineFilters.filters?.push({
5464
- field: p.name,
5465
- operator: {
5466
- type: 'contains',
5467
- },
5468
- value,
5469
- });
5470
- });
5808
+ /**
5809
+ * Get searchable fields from entity properties
5810
+ */
5811
+ getSearchFields(options) {
5812
+ const { entity, searchFields } = options;
5813
+ if (searchFields && searchFields.length > 0) {
5814
+ return searchFields;
5471
5815
  }
5472
- if (refresh)
5473
- this.applyFilterAndSort();
5816
+ // Auto-detect searchable fields from entity properties
5817
+ return entity.properties
5818
+ .filter(p => p.options?.filter?.inline?.enabled)
5819
+ .map(p => p.name);
5474
5820
  }
5475
- applyFilterAndSort() {
5476
- // this.dataSource.clearFilter();
5477
- //
5478
- //this.dataSource.sort(...this.sortedFields().map(s => ({ dir: s.dir, field: s.name } as AXDataSourceSortOption)));
5479
- //
5480
- // Check if inlineFilters or parentFilters have any filters
5481
- const hasInlineFilters = (this.inlineFilters?.filters?.length ?? 0) > 0;
5482
- const hasParentFilters = (this.options.parentFilters?.filters?.length ?? 0) > 0;
5483
- // Construct the filters array based on the presence of filters
5821
+ /**
5822
+ * Check if entity supports create operation
5823
+ */
5824
+ canCreate(entity) {
5825
+ return entity.commands?.create?.execute != null;
5826
+ }
5827
+ /**
5828
+ * Merge custom and parent filters into data source query
5829
+ */
5830
+ mergeFilters(request, customFilter, parentFilters) {
5831
+ if (!customFilter && !parentFilters) {
5832
+ return request;
5833
+ }
5484
5834
  const filters = [];
5485
- if (this.options.customFilter) {
5486
- const cleanedFilters = AXPCleanNestedFilters([this.options.customFilter]);
5835
+ // Add custom filter
5836
+ if (customFilter) {
5837
+ const cleanedFilters = AXPCleanNestedFilters([customFilter]);
5487
5838
  if (cleanedFilters.length > 0) {
5488
5839
  filters.push(this.filterOperatorMiddleware.transformFilter(cleanedFilters[0]));
5489
5840
  }
5490
5841
  }
5491
- if (hasInlineFilters) {
5492
- filters.push(this.inlineFilters);
5493
- }
5494
- if (hasParentFilters && this.options.parentFilters) {
5495
- filters.push(this.options.parentFilters);
5496
- }
5497
- // Apply the filters to the dataSource
5498
- this.dataSource.filter({
5499
- field: null,
5500
- logic: 'and',
5501
- operator: null,
5502
- filters: filters,
5503
- });
5504
- // Refresh the dataSource
5505
- this.dataSource.refresh();
5506
- }
5507
- async find(value) {
5508
- this.applyInlineFilter(value.trim(), false);
5509
- const func = this.entityDef.queries.list?.execute;
5510
- return (await func({ filter: this.inlineFilters, take: 10 })) ?? [];
5511
- }
5512
- setCustomFilter(filter) {
5513
- this.options.customFilter = filter;
5514
- this.applyFilterAndSort();
5515
- }
5516
- mergeFilter(request, filter) {
5517
- if (!filter) {
5518
- return request;
5842
+ // Add parent filters
5843
+ if (parentFilters) {
5844
+ filters.push(parentFilters);
5519
5845
  }
5846
+ // Merge with existing filter
5520
5847
  if (request.filter) {
5521
5848
  request.filter = {
5522
5849
  logic: 'and',
5523
- filters: [...[request.filter], ...(filter.filters ?? [])]
5850
+ filters: [...[request.filter], ...filters]
5524
5851
  };
5525
5852
  }
5526
5853
  else {
5527
- request.filter = filter;
5854
+ request.filter = {
5855
+ field: null,
5856
+ logic: 'and',
5857
+ operator: null,
5858
+ filters: filters,
5859
+ };
5528
5860
  }
5529
5861
  return request;
5530
5862
  }
5863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDataSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5864
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDataSelectorService, providedIn: 'root' }); }
5531
5865
  }
5866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDataSelectorService, decorators: [{
5867
+ type: Injectable,
5868
+ args: [{
5869
+ providedIn: 'root'
5870
+ }]
5871
+ }] });
5532
5872
 
5533
5873
  class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5534
5874
  constructor() {
@@ -5537,6 +5877,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5537
5877
  this.entityResolver = inject(AXPEntityResolver);
5538
5878
  this.formatService = inject(AXFormatService);
5539
5879
  this.popupService = inject(AXPopupService);
5880
+ this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
5540
5881
  this.translateService = inject(AXTranslationService);
5541
5882
  this.expose = computed(() => this.options()['expose'], ...(ngDevMode ? [{ debugName: "expose" }] : []));
5542
5883
  this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
@@ -5562,24 +5903,37 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5562
5903
  }, ...(ngDevMode ? [{ debugName: "selectedItemsText" }] : []));
5563
5904
  this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
5564
5905
  this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
5906
+ this.dataSource = computed(() => {
5907
+ const entity = this.entityDef();
5908
+ if (!entity)
5909
+ return null;
5910
+ return new AXDataSource({
5911
+ byKey: (key) => {
5912
+ const func = entity.queries.byKey.execute;
5913
+ return func();
5914
+ },
5915
+ load: (e) => {
5916
+ const func = entity.queries.list?.execute;
5917
+ this.mergeFilter(e, this.customFilter());
5918
+ return func(e);
5919
+ },
5920
+ pageSize: 10,
5921
+ key: 'id',
5922
+ });
5923
+ }, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
5565
5924
  this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
5566
5925
  this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
5567
5926
  this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
5568
5927
  this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
5569
5928
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
5570
- this.vm = signal(null, ...(ngDevMode ? [{ debugName: "vm" }] : []));
5571
5929
  this.placeholder = computed(() => {
5572
5930
  return this.selectedItems().length
5573
5931
  ? ''
5574
- : this.translateService.translateSync('widget.lookup.search') + this.vm()?.inlineFiltersPlaceholders().join(', ');
5932
+ : this.translateService.translateSync('@general:widgets.lookup.search');
5575
5933
  }, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
5576
5934
  this.#efEntity = effect(async () => {
5577
5935
  const [module, entity] = this.entity().split('.');
5578
5936
  this.entityDef.set(await this.entityResolver.get(module, entity));
5579
- this.vm.set(new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef(), {
5580
- parentFilters: this.filter,
5581
- allowMultiple: this.multiple(),
5582
- }));
5583
5937
  }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
5584
5938
  this.#efValue = effect(() => {
5585
5939
  if (this.getValue()) {
@@ -5589,15 +5943,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5589
5943
  this.clear();
5590
5944
  }
5591
5945
  }, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
5592
- this.#efCustomFilter = effect(() => {
5593
- if (this.customFilter()) {
5594
- this.vm()?.setCustomFilter(this.customFilter());
5595
- }
5596
- }, ...(ngDevMode ? [{ debugName: "#efCustomFilter" }] : []));
5597
5946
  }
5598
5947
  #efEntity;
5599
5948
  #efValue;
5600
- #efCustomFilter;
5601
5949
  async findByValue() {
5602
5950
  this.isLoading.set(true);
5603
5951
  const rawValue = this.getValue();
@@ -5622,31 +5970,29 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5622
5970
  handleOnClick(e) {
5623
5971
  this.showSelector();
5624
5972
  }
5625
- showSelector() {
5973
+ async showSelector() {
5626
5974
  this.isOpen.set(true);
5627
- const columnsCount = this.columns().length > 0 ? this.columns().length : (this.vm()?.columns().length ?? 0);
5628
- this.popupService
5629
- .open(AXPLookupWidgetSelectorComponent, {
5630
- title: `${this.translateService.translateSync('widget.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
5631
- size: columnsCount < 3 ? 'md' : 'lg',
5632
- data: {
5633
- vm: new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef(), {
5634
- customFilter: this.customFilter(),
5635
- parentFilters: this.filter,
5636
- allowMultiple: this.multiple(),
5637
- columns: this.columns(),
5638
- }),
5639
- searchTerm: this.searchTerm(),
5640
- initialSelectedItems: this.selectedItems(),
5641
- },
5642
- })
5643
- .then((e) => {
5975
+ try {
5976
+ const result = await this.entityDataSelectorService.open({
5977
+ entity: this.entityDef(),
5978
+ title: `${this.translateService.translateSync('@general:widgets.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
5979
+ allowMultiple: this.multiple(),
5980
+ filters: this.customFilter(),
5981
+ parentFilters: this.filter,
5982
+ columns: this.columns(),
5983
+ allowCreate: true
5984
+ });
5985
+ if (result && 'items' in result) {
5986
+ this.setItems(result.items);
5987
+ }
5988
+ }
5989
+ catch (error) {
5990
+ console.error('Error opening entity data selector:', error);
5991
+ }
5992
+ finally {
5644
5993
  this.isOpen.set(false);
5645
5994
  this.textbox()?.focus();
5646
- if (e.data?.items) {
5647
- this.setItems(e.data?.items);
5648
- }
5649
- });
5995
+ }
5650
5996
  }
5651
5997
  selectBoxValueChange(e) {
5652
5998
  const items = e.component.selectedItems;
@@ -5675,7 +6021,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5675
6021
  this.searchTerm.set(value);
5676
6022
  if ((keyEvent.code == 'Enter' || keyEvent.code == 'NumpadEnter') && value) {
5677
6023
  this.isLoading.set(true);
5678
- const result = await this.vm()?.find(value);
6024
+ const result = await this.searchByValue(value);
5679
6025
  if (result?.total == 1) {
5680
6026
  this.setItems(result.items[0]);
5681
6027
  }
@@ -5732,10 +6078,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5732
6078
  }
5733
6079
  refresh() {
5734
6080
  this.clear();
5735
- if (this.customFilter()) {
5736
- this.vm()?.setCustomFilter(this.customFilter());
5737
- }
5738
- this.vm()?.dataSource.refresh();
6081
+ this.dataSource()?.refresh();
5739
6082
  }
5740
6083
  clear() {
5741
6084
  this.setValue(null);
@@ -5746,15 +6089,53 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5746
6089
  this.textbox()?.inputValue.set('');
5747
6090
  this.searchTerm.set('');
5748
6091
  }
6092
+ async searchByValue(value) {
6093
+ if (!this.entityDef())
6094
+ return null;
6095
+ const entity = this.entityDef();
6096
+ const searchFields = entity.properties.filter(p => p.options?.filter?.inline?.enabled);
6097
+ const inlineFilters = {
6098
+ field: null,
6099
+ logic: 'or',
6100
+ operator: null,
6101
+ filters: [],
6102
+ };
6103
+ if (value && searchFields.length > 0) {
6104
+ searchFields.forEach((p) => {
6105
+ inlineFilters.filters?.push({
6106
+ field: p.name,
6107
+ operator: { type: 'contains' },
6108
+ value,
6109
+ });
6110
+ });
6111
+ }
6112
+ const func = entity.queries.list?.execute;
6113
+ return await func({ filter: inlineFilters, take: 10 });
6114
+ }
6115
+ mergeFilter(request, filter) {
6116
+ if (!filter) {
6117
+ return request;
6118
+ }
6119
+ if (request.filter) {
6120
+ request.filter = {
6121
+ logic: 'and',
6122
+ filters: [...[request.filter], ...(filter.filters ?? [])]
6123
+ };
6124
+ }
6125
+ else {
6126
+ request.filter = filter;
6127
+ }
6128
+ return request;
6129
+ }
5749
6130
  singleOrMultiple(values) {
5750
6131
  return this.multiple() ? values : values[0];
5751
6132
  }
5752
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5753
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", 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: `
5754
- @if(vm()) {
6133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
6135
+ @if(dataSource()) {
5755
6136
  @if (look() == 'select') {
5756
6137
  <ax-select-box
5757
- [dataSource]="vm()?.dataSource!"
6138
+ [dataSource]="dataSource()!"
5758
6139
  [ngModel]="selectedItems()"
5759
6140
  [textField]="displayField()"
5760
6141
  [valueField]="valueField()"
@@ -5817,19 +6198,19 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
5817
6198
  </ax-tag-box>
5818
6199
  }
5819
6200
  }
5820
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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:
6201
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
5821
6202
  //
5822
- AXButtonModule }, { kind: "component", type: i3$2.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.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", "onItemSelected", "onItemClick"] }, { 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 }); }
6203
+ AXButtonModule }, { kind: "component", type: i3.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$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.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: i4.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.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", "onItemSelected", "onItemClick"] }, { 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: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5823
6204
  }
5824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
6205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
5825
6206
  type: Component,
5826
6207
  args: [{
5827
6208
  selector: 'axp-lookup-widget-edit',
5828
6209
  template: `
5829
- @if(vm()) {
6210
+ @if(dataSource()) {
5830
6211
  @if (look() == 'select') {
5831
6212
  <ax-select-box
5832
- [dataSource]="vm()?.dataSource!"
6213
+ [dataSource]="dataSource()!"
5833
6214
  [ngModel]="selectedItems()"
5834
6215
  [textField]="displayField()"
5835
6216
  [valueField]="valueField()"
@@ -5920,13 +6301,11 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
5920
6301
  constructor() {
5921
6302
  super(...arguments);
5922
6303
  //#region ---- Dependencies ----
5923
- this.commandService = inject(AXPCommandService);
5924
- this.queryService = inject(AXPQueryService);
6304
+ this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
5925
6305
  //#endregion
5926
6306
  //#region ---- View Children ----
5927
6307
  this.moreButton = viewChild('moreButton', ...(ngDevMode ? [{ debugName: "moreButton" }] : []));
5928
6308
  this.morePopover = viewChild('morePopover', ...(ngDevMode ? [{ debugName: "morePopover" }] : []));
5929
- this.detailPopover = viewChild('detailPopover', ...(ngDevMode ? [{ debugName: "detailPopover" }] : []));
5930
6309
  //#endregion
5931
6310
  //#region ---- Properties ----
5932
6311
  this.host = inject(ElementRef);
@@ -5938,11 +6317,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
5938
6317
  //#endregion
5939
6318
  //#region ---- Signals ----
5940
6319
  this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
5941
- this.isDetailPopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isDetailPopoverOpen" }] : []));
5942
- this.selectedItem = signal(null, ...(ngDevMode ? [{ debugName: "selectedItem" }] : []));
5943
6320
  this.selectedItemIndex = signal(-1, ...(ngDevMode ? [{ debugName: "selectedItemIndex" }] : []));
5944
- this.entityDetails = signal(null, ...(ngDevMode ? [{ debugName: "entityDetails" }] : []));
5945
- this.isLoadingDetails = signal(false, ...(ngDevMode ? [{ debugName: "isLoadingDetails" }] : []));
5946
6321
  //#endregion
5947
6322
  //#region ---- Computed Properties ----
5948
6323
  this.displayItems = computed(() => isNil(this.rawValue)
@@ -5959,247 +6334,44 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
5959
6334
  this.remainingItemsCount = computed(() => {
5960
6335
  return this.allItems().length - this.maxVisible;
5961
6336
  }, ...(ngDevMode ? [{ debugName: "remainingItemsCount" }] : []));
5962
- this.HOVER_DELAY = 3000; // 3 seconds
5963
- }
5964
- //#endregion
5965
- //#region ---- Lifecycle Methods ----
5966
- ngOnDestroy() {
5967
- this.clearHoverTimeout();
5968
- this.clearViewDetailsHoverTimeout();
5969
- this.clearVisibleItemHoverTimeout();
5970
6337
  }
5971
6338
  //#endregion
5972
6339
  //#region ---- Public Methods ----
5973
6340
  showMoreItems() {
5974
- this.closeDetailPopover();
5975
- this.clearAllHoverTimeouts(); // Clear all hover timeouts
6341
+ this.entityDetailPopoverService.hide();
5976
6342
  this.openMorePopover();
5977
6343
  }
5978
6344
  onMorePopoverOpenChange(event) {
5979
6345
  this.isMorePopoverOpen.set(event);
5980
- // Clear all hover timeouts when popover closes
5981
- if (!event) {
5982
- this.clearAllHoverTimeouts();
5983
- }
5984
6346
  }
5985
6347
  async showItemDetail(item, index) {
5986
6348
  const columnData = this.rowData[this.columnName];
5987
6349
  const id = Array.isArray(columnData) ? columnData[index] : columnData;
5988
- //
5989
- this.selectedItem.set(item);
5990
6350
  this.selectedItemIndex.set(index);
5991
- this.isDetailPopoverOpen.set(true);
5992
- this.isLoadingDetails.set(true);
5993
- this.entityDetails.set(null);
5994
6351
  this.closeMorePopover();
5995
- this.clearAllHoverTimeouts(); // Clear all hover timeouts
5996
- // Fetch entity details using the query
5997
- try {
5998
- this.detailPopover;
5999
- const result = await this.queryService.fetch('Entity:GetDetails', {
6000
- entity: this.entity,
6001
- id: id
6002
- });
6003
- if (result?.success) {
6004
- this.entityDetails.set(result);
6005
- }
6006
- }
6007
- catch (error) {
6008
- console.error('Failed to fetch entity details:', error);
6009
- }
6010
- finally {
6011
- this.isLoadingDetails.set(false);
6352
+ // Show entity detail popover using the service
6353
+ await this.entityDetailPopoverService.show(this.host, {
6354
+ entity: this.entity,
6355
+ id: id,
6356
+ textField: this.textField,
6357
+ valueField: this.valueField,
6358
+ item
6359
+ });
6360
+ }
6361
+ handleItemClick(index) {
6362
+ const items = this.allItems();
6363
+ if (index < items.length) {
6364
+ const item = items[index];
6365
+ this.showItemDetail(item, index);
6012
6366
  }
6013
- setTimeout(() => {
6014
- if (this.detailPopover()) {
6015
- this.detailPopover().target = this.host.nativeElement;
6016
- this.detailPopover().open();
6017
- }
6018
- }, 100);
6019
6367
  }
6020
- onDetailPopoverOpenChange(event) {
6021
- this.isDetailPopoverOpen.set(event);
6022
- // Clear all hover timeouts when popover closes
6023
- if (!event) {
6024
- this.clearAllHoverTimeouts();
6025
- }
6026
- }
6027
- closeDetailPopover() {
6028
- this.isDetailPopoverOpen.set(false);
6029
- this.entityDetails.set(null);
6030
- this.isLoadingDetails.set(false);
6031
- if (this.detailPopover()) {
6032
- this.detailPopover().close();
6033
- }
6034
- }
6035
- async navigateToDetails() {
6036
- const index = this.selectedItemIndex();
6037
- const columnData = this.rowData[this.columnName];
6038
- const id = Array.isArray(columnData) ? columnData[index] : columnData;
6039
- if (id) {
6040
- await this.commandService.execute("Entity:OpenDetails", {
6041
- entity: this.entity,
6042
- data: { id },
6043
- });
6044
- this.closeDetailPopover();
6045
- }
6046
- }
6047
- handleItemClick(index) {
6048
- const items = this.allItems();
6049
- if (index < items.length) {
6050
- const item = items[index];
6051
- this.showItemDetail(item, index);
6052
- }
6053
- }
6054
- //#endregion
6055
- //#region ---- Helper Methods ----
6056
- getEntityPropertiesWithWidgets() {
6057
- const data = this.entityDetails()?.entityData;
6058
- const entityDefinition = this.entityDetails()?.entityDefinition;
6059
- if (!data || !entityDefinition?.properties)
6060
- return [];
6061
- // Get properties from entity definition and filter by importance
6062
- const importantProperties = (entityDefinition.columns ?? [])
6063
- .map(prop => {
6064
- const propName = prop.options?.dataPath ?? prop.name;
6065
- const schema = prop.showAs?.type ?? entityDefinition.properties.find(p => p.name === propName)?.schema.interface?.type;
6066
- const title = prop.title ?? entityDefinition.properties.find(p => p.name === propName)?.title ?? prop.name;
6067
- return {
6068
- ...prop,
6069
- schema,
6070
- title
6071
- };
6072
- })
6073
- .filter(prop => {
6074
- // Exclude technical fields
6075
- if (prop.name === 'id' || prop.name === this.textField || prop.name === this.valueField) {
6076
- return false;
6077
- }
6078
- // Only include properties that exist in the data
6079
- if (!data.hasOwnProperty(prop.name)) {
6080
- return false;
6081
- }
6082
- // Filter by property importance based on schema and options
6083
- const schema = prop.showAs?.type ?? entityDefinition.properties.find(p => p.name === prop.name)?.schema.interface?.type;
6084
- // Include common important field types
6085
- const importantWidgets = [
6086
- AXPWidgetsCatalog.text,
6087
- AXPWidgetsCatalog.largeText,
6088
- AXPWidgetsCatalog.richText,
6089
- //
6090
- AXPWidgetsCatalog.select,
6091
- //AXPWidgetsCatalog.lookup,
6092
- //
6093
- AXPWidgetsCatalog.number,
6094
- AXPWidgetsCatalog.toggle,
6095
- AXPWidgetsCatalog.checkbox,
6096
- //
6097
- AXPWidgetsCatalog.dateTime,
6098
- AXPWidgetsCatalog.color,
6099
- AXPWidgetsCatalog.contact,
6100
- AXPWidgetsCatalog.email,
6101
- AXPWidgetsCatalog.link,
6102
- AXPWidgetsCatalog.phone,
6103
- ];
6104
- //
6105
- if (importantWidgets.includes(schema)) {
6106
- return true;
6107
- }
6108
- return false;
6109
- })
6110
- .sort((a, b) => {
6111
- // Sort by importance: properties with titles first, then by order if available
6112
- const aHasTitle = a.title && a.title !== a.name;
6113
- const bHasTitle = b.title && b.title !== b.name;
6114
- if (aHasTitle && !bHasTitle)
6115
- return -1;
6116
- if (!aHasTitle && bHasTitle)
6117
- return 1;
6118
- // If both have titles, sort alphabetically
6119
- if (aHasTitle && bHasTitle) {
6120
- return a.title.localeCompare(b.title);
6121
- }
6122
- // Otherwise sort by name
6123
- return a.name.localeCompare(b.name);
6124
- })
6125
- .map(prop => {
6126
- // Create widget node based on property schema
6127
- const widgetNode = {
6128
- type: prop.schema || AXPWidgetsCatalog.text,
6129
- path: prop.options?.dataPath || prop.name,
6130
- options: prop.options ?? {},
6131
- mode: 'view'
6132
- };
6133
- return {
6134
- name: prop.name,
6135
- title: prop.title || prop.name,
6136
- node: widgetNode,
6137
- };
6138
- })
6139
- .slice(0, 7); // Limit to 7 most important fields
6140
- return importantProperties;
6141
- }
6142
- formatEntityDataValue(value) {
6143
- if (value === null || value === undefined)
6144
- return '---';
6145
- if (typeof value === 'string')
6146
- return value;
6147
- if (typeof value === 'number')
6148
- return value.toString();
6149
- if (typeof value === 'boolean')
6150
- return value ? 'Yes' : 'No';
6151
- if (Array.isArray(value))
6152
- return `${value.length} items`;
6153
- if (typeof value === 'object')
6154
- return 'Object';
6155
- return String(value);
6156
- }
6157
- //#endregion
6158
- //#region ---- Private Methods ----
6159
- onMoreButtonMouseEnter() {
6160
- // Don't trigger hover if detail popover is already open
6161
- if (this.isDetailPopoverOpen()) {
6162
- return;
6163
- }
6164
- this.clearHoverTimeout();
6165
- this.hoverTimeout = setTimeout(() => {
6166
- this.showMoreItems();
6167
- }, this.HOVER_DELAY);
6168
- }
6169
- onMoreButtonMouseLeave() {
6170
- this.clearHoverTimeout();
6171
- }
6172
- onViewDetailsMouseEnter(item, index) {
6173
- // Don't trigger hover if any popover is already open
6174
- if (this.isMorePopoverOpen() || this.isDetailPopoverOpen()) {
6175
- return;
6176
- }
6177
- this.clearViewDetailsHoverTimeout();
6178
- this.viewDetailsHoverTimeout = setTimeout(() => {
6179
- this.showItemDetail(item, index);
6180
- }, this.HOVER_DELAY);
6181
- }
6182
- onViewDetailsMouseLeave() {
6183
- this.clearViewDetailsHoverTimeout();
6184
- }
6185
- onVisibleItemMouseEnter(item, index) {
6186
- // Don't trigger hover if any popover is already open
6187
- if (this.isMorePopoverOpen() || this.isDetailPopoverOpen()) {
6188
- return;
6189
- }
6190
- this.clearVisibleItemHoverTimeout();
6191
- this.visibleItemHoverTimeout = setTimeout(() => {
6192
- this.showItemDetail(item, index);
6193
- }, this.HOVER_DELAY);
6194
- }
6195
- onVisibleItemMouseLeave() {
6196
- this.clearVisibleItemHoverTimeout();
6197
- }
6198
- openMorePopover() {
6199
- if (this.morePopover() && this.moreButton()) {
6200
- this.morePopover().target = this.moreButton().nativeElement;
6201
- this.morePopover().open();
6202
- this.isMorePopoverOpen.set(true);
6368
+ //#endregion
6369
+ //#region ---- Private Methods ----
6370
+ openMorePopover() {
6371
+ if (this.morePopover() && this.moreButton()) {
6372
+ this.morePopover().target = this.moreButton().nativeElement;
6373
+ this.morePopover().open();
6374
+ this.isMorePopoverOpen.set(true);
6203
6375
  }
6204
6376
  }
6205
6377
  closeMorePopover() {
@@ -6208,29 +6380,6 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
6208
6380
  this.isMorePopoverOpen.set(false);
6209
6381
  }
6210
6382
  }
6211
- clearHoverTimeout() {
6212
- if (this.hoverTimeout) {
6213
- clearTimeout(this.hoverTimeout);
6214
- this.hoverTimeout = null;
6215
- }
6216
- }
6217
- clearViewDetailsHoverTimeout() {
6218
- if (this.viewDetailsHoverTimeout) {
6219
- clearTimeout(this.viewDetailsHoverTimeout);
6220
- this.viewDetailsHoverTimeout = null;
6221
- }
6222
- }
6223
- clearVisibleItemHoverTimeout() {
6224
- if (this.visibleItemHoverTimeout) {
6225
- clearTimeout(this.visibleItemHoverTimeout);
6226
- this.visibleItemHoverTimeout = null;
6227
- }
6228
- }
6229
- clearAllHoverTimeouts() {
6230
- this.clearHoverTimeout();
6231
- this.clearViewDetailsHoverTimeout();
6232
- this.clearVisibleItemHoverTimeout();
6233
- }
6234
6383
  extractItem(item) {
6235
6384
  if (isNil(item)) {
6236
6385
  return null;
@@ -6245,12 +6394,12 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
6245
6394
  [this.textField]: item,
6246
6395
  };
6247
6396
  }
6248
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6249
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }, { propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span\n class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\"\n (click)=\"handleItemClick($index)\"\n (mouseenter)=\"onVisibleItemMouseEnter(item, $index)\"\n (mouseleave)=\"onVisibleItemMouseLeave()\"\n >\n {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\"\n (mouseenter)=\"onMoreButtonMouseEnter()\"\n (mouseleave)=\"onMoreButtonMouseLeave()\"\n #moreButton\n >\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n\n<!-- Item Detail Popover -->\n<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[this.textField]) {\n {{ entityDetails()?.entityData[this.textField] }}\n } @else {\n {{ selectedItem()?.[this.textField] }}\n }\n </h3>\n </div>\n\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <div class=\"ax-text-sm\">Loading details...</div>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3$2.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: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6397
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6398
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\"\n #moreButton\n >\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6250
6399
  }
6251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
6400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
6252
6401
  type: Component,
6253
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule, AXPLayoutBuilderModule, AXPLayoutBuilderModule, AXTranslationModule], inputs: ['rawValue', 'rowData'], template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span\n class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\"\n (click)=\"handleItemClick($index)\"\n (mouseenter)=\"onVisibleItemMouseEnter(item, $index)\"\n (mouseleave)=\"onVisibleItemMouseLeave()\"\n >\n {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\"\n (mouseenter)=\"onMoreButtonMouseEnter()\"\n (mouseleave)=\"onMoreButtonMouseLeave()\"\n #moreButton\n >\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n\n<!-- Item Detail Popover -->\n<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[this.textField]) {\n {{ entityDetails()?.entityData[this.textField] }}\n } @else {\n {{ selectedItem()?.[this.textField] }}\n }\n </h3>\n </div>\n\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <div class=\"ax-text-sm\">Loading details...</div>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n </div>\n</ax-popover>\n" }]
6402
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\"\n #moreButton\n >\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n" }]
6254
6403
  }] });
6255
6404
 
6256
6405
  var lookupWidgetColumn_component = /*#__PURE__*/Object.freeze({
@@ -6265,6 +6414,7 @@ const AXPLookupWidget = {
6265
6414
  groups: [AXPWidgetGroupEnum.EntityWidget],
6266
6415
  defaultFilterWidgetName: 'lookup-filter',
6267
6416
  type: 'editor',
6417
+ icon: 'fa-light fa-list-radio',
6268
6418
  properties: [
6269
6419
  AXP_DISABLED_PROPERTY,
6270
6420
  AXP_ALLOW_CLEAR_PROPERTY,
@@ -6297,7 +6447,7 @@ const AXPLookupWidget = {
6297
6447
  },
6298
6448
  visible: true,
6299
6449
  },
6300
- AXP_ALLOW_MULTIPLE_PROPERTY
6450
+ AXP_ALLOW_MULTIPLE_PROPERTY,
6301
6451
  ],
6302
6452
  components: {
6303
6453
  view: {
@@ -6335,8 +6485,8 @@ class AXPTagableBoxWidgetColumnComponent extends AXPValueWidgetComponent {
6335
6485
  return Array.isArray(value) ? value : [value];
6336
6486
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
6337
6487
  }
6338
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6339
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPTagableBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
6488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6489
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPTagableBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
6340
6490
  <div class="ax-flex ax-gap-1 ax-flex-wrap">
6341
6491
  @if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
6342
6492
  <ax-badge [look]="'twotone'" [text]="item[textField()]" color="primary"></ax-badge>
@@ -6346,9 +6496,9 @@ class AXPTagableBoxWidgetColumnComponent extends AXPValueWidgetComponent {
6346
6496
  <span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ internalValue()[0] }}</span>
6347
6497
  } }
6348
6498
  </div>
6349
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6499
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6350
6500
  }
6351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
6501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
6352
6502
  type: Component,
6353
6503
  args: [{
6354
6504
  template: `
@@ -6411,8 +6561,8 @@ class AXPTagableBoxWidgetEditComponent extends AXPValueWidgetComponent {
6411
6561
  cls[`ax-flex-1`] = true;
6412
6562
  return cls;
6413
6563
  }
6414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6415
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPTagableBoxWidgetEditComponent, isStandalone: true, selector: "axp-tagable-box-widget", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
6564
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6565
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPTagableBoxWidgetEditComponent, isStandalone: true, selector: "axp-tagable-box-widget", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
6416
6566
  <div class="ax-grid ax-grid-cols-12 ax-gap-4">
6417
6567
  <!-- نمایش Select Box با دکمه اضافه کردن آیتم -->
6418
6568
  <ax-select-box
@@ -6451,9 +6601,9 @@ class AXPTagableBoxWidgetEditComponent extends AXPValueWidgetComponent {
6451
6601
  </ax-prefix>
6452
6602
  </ax-button>
6453
6603
  </div>
6454
- `, 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: i3$2.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", "onItemSelected", "onItemClick"] }, { 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 }); }
6604
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.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: i3.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.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", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6$2.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 }); }
6455
6605
  }
6456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
6606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
6457
6607
  type: Component,
6458
6608
  args: [{
6459
6609
  selector: 'axp-tagable-box-widget',
@@ -6521,10 +6671,10 @@ var tagableBoxWidgetEdit_component = /*#__PURE__*/Object.freeze({
6521
6671
  });
6522
6672
 
6523
6673
  class AXPTagableBoxWidgetFilterComponent extends AXPValueWidgetComponent {
6524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6525
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", type: AXPTagableBoxWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6674
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6675
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPTagableBoxWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6526
6676
  }
6527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, decorators: [{
6677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, decorators: [{
6528
6678
  type: Component,
6529
6679
  args: [{
6530
6680
  template: ``,
@@ -6559,8 +6709,8 @@ class AXPTagableBoxWidgetPrintComponent extends AXPValueWidgetComponent {
6559
6709
  return Array.isArray(value) ? value : [value];
6560
6710
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
6561
6711
  }
6562
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6563
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPTagableBoxWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
6712
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6713
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPTagableBoxWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
6564
6714
  <div>
6565
6715
  @if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
6566
6716
  <span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
@@ -6576,7 +6726,7 @@ class AXPTagableBoxWidgetPrintComponent extends AXPValueWidgetComponent {
6576
6726
  </div>
6577
6727
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6578
6728
  }
6579
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, decorators: [{
6729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, decorators: [{
6580
6730
  type: Component,
6581
6731
  args: [{
6582
6732
  template: `
@@ -6625,14 +6775,14 @@ class AXPTagableBoxWidgetViewComponent extends AXPValueWidgetComponent {
6625
6775
  return Array.isArray(value) ? value : [value];
6626
6776
  }, ...(ngDevMode ? [{ debugName: "getData" }] : []));
6627
6777
  }
6628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPTagableBoxWidgetViewComponent, isStandalone: true, selector: "axp-tagable-box-widget", usesInheritance: true, ngImport: i0, template: `
6778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6779
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPTagableBoxWidgetViewComponent, isStandalone: true, selector: "axp-tagable-box-widget", usesInheritance: true, ngImport: i0, template: `
6630
6780
  @for (item of internalValue(); track $index) {
6631
6781
  <ax-badge [look]="'twotone'" [text]="item" color="primary"></ax-badge>
6632
6782
  }
6633
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6783
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6634
6784
  }
6635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
6785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
6636
6786
  type: Component,
6637
6787
  args: [{
6638
6788
  selector: 'axp-tagable-box-widget',
@@ -6728,8 +6878,8 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
6728
6878
  const widget = this.widgetRegisteryService.resolve(e.values.type);
6729
6879
  this.setValue({ title: widget?.title, ...e.values });
6730
6880
  }
6731
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6732
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
6881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6882
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
6733
6883
  <ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
6734
6884
  @for (validation of validationRules(); track $index) {
6735
6885
  <ax-validation-rule
@@ -6748,9 +6898,9 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
6748
6898
  <axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
6749
6899
  </axp-widget-property-viewer>
6750
6900
  }
6751
- `, 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: i3$2.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 }); }
6901
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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: i3.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$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.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 }); }
6752
6902
  }
6753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
6903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
6754
6904
  type: Component,
6755
6905
  args: [{
6756
6906
  template: `
@@ -6797,10 +6947,10 @@ var widgetSelectorWidgetEdit_component = /*#__PURE__*/Object.freeze({
6797
6947
  });
6798
6948
 
6799
6949
  class AXPWidgetSelectorWidgetViewComponent extends AXPValueWidgetComponent {
6800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6801
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.8", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6950
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6951
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6802
6952
  }
6803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
6953
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
6804
6954
  type: Component,
6805
6955
  args: [{
6806
6956
  template: `{{ getValue()?.title }}`,
@@ -6859,7 +7009,7 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
6859
7009
  const result = await this.popupService.open(com, {
6860
7010
  title: headerTitle
6861
7011
  ? headerTitle
6862
- : `${await this.translateService.translateAsync('create-new')} ${await this.translateService.translateAsync(entityRef.formats.individual)}`,
7012
+ : `${await this.translateService.translateAsync('@general:actions.create.title')} ${await this.translateService.translateAsync(entityRef.formats.individual)}`,
6863
7013
  size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : size ? size : 'md',
6864
7014
  data: {
6865
7015
  vm: await this.factory.create(module, entity, data, options),
@@ -6877,10 +7027,10 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
6877
7027
  }
6878
7028
  }
6879
7029
  }
6880
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
6881
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreatePopupAction }); }
7030
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7031
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreatePopupAction }); }
6882
7032
  }
6883
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
7033
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
6884
7034
  type: Injectable
6885
7035
  }] });
6886
7036
  class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
@@ -6888,10 +7038,10 @@ class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
6888
7038
  this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
6889
7039
  this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
6890
7040
  }
6891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
6892
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
7041
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7042
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
6893
7043
  }
6894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
7044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
6895
7045
  type: Injectable
6896
7046
  }] });
6897
7047
  const AXPCreateEntityWorkflow = {
@@ -6982,10 +7132,10 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
6982
7132
  context.setVariable('data', cloneDeep(popup.data.context));
6983
7133
  }
6984
7134
  }
6985
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
6986
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
7135
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7136
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
6987
7137
  }
6988
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
7138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
6989
7139
  type: Injectable
6990
7140
  }] });
6991
7141
  const AXPQuickModifyEntityWorkflow = {
@@ -7042,10 +7192,10 @@ class AXPEntityApplyUpdatesAction extends AXPWorkflowAction {
7042
7192
  context.setOutput('error', error);
7043
7193
  }
7044
7194
  }
7045
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityApplyUpdatesAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7046
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityApplyUpdatesAction }); }
7195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityApplyUpdatesAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7196
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityApplyUpdatesAction }); }
7047
7197
  }
7048
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityApplyUpdatesAction, decorators: [{
7198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityApplyUpdatesAction, decorators: [{
7049
7199
  type: Injectable
7050
7200
  }] });
7051
7201
 
@@ -7064,10 +7214,10 @@ class AXPShowDetailViewAction extends AXPWorkflowAction {
7064
7214
  context.setVariable('payload', newPayload);
7065
7215
  this.navigation.execute(context);
7066
7216
  }
7067
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7068
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowDetailViewAction }); }
7217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7218
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowDetailViewAction }); }
7069
7219
  }
7070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
7220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
7071
7221
  type: Injectable
7072
7222
  }] });
7073
7223
  const AXPShowDetailsViewWorkflow = {
@@ -7121,10 +7271,10 @@ class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
7121
7271
  context.setVariable('data', cloneDeep(entityData));
7122
7272
  }
7123
7273
  }
7124
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7125
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
7274
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7275
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
7126
7276
  }
7127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
7277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
7128
7278
  type: Injectable
7129
7279
  }] });
7130
7280
  const AXPShowFileUploaderPopupWorkflow = {
@@ -7175,10 +7325,10 @@ class AXPShowListViewAction extends AXPWorkflowAction {
7175
7325
  context.setVariable('payload', newPayload);
7176
7326
  this.navigation.execute(context);
7177
7327
  }
7178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7179
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowListViewAction }); }
7328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
7329
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowListViewAction }); }
7180
7330
  }
7181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPShowListViewAction, decorators: [{
7331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPShowListViewAction, decorators: [{
7182
7332
  type: Injectable
7183
7333
  }] });
7184
7334
  const AXPShowListViewWorkflow = {
@@ -7267,9 +7417,9 @@ class AXPEntityModule {
7267
7417
  },
7268
7418
  });
7269
7419
  }
7270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$4.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
7271
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i3$1.AXPLayoutBuilderModule] }); }
7272
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModule, providers: [
7420
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$2.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
7421
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i3$1.AXPWidgetCoreModule] }); }
7422
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModule, providers: [
7273
7423
  {
7274
7424
  provide: ROUTES,
7275
7425
  multi: true,
@@ -7293,13 +7443,17 @@ class AXPEntityModule {
7293
7443
  provideCommandSetups([
7294
7444
  {
7295
7445
  key: 'Entity:OpenDetails',
7296
- command: () => Promise.resolve().then(function () { return openEntityDetails_command; }).then((c) => c.AXPOpenEntityDetailsCommand)
7446
+ command: () => Promise.resolve().then(function () { return openEntityDetails_command; }).then((c) => c.AXPOpenEntityDetailsCommand),
7447
+ },
7448
+ {
7449
+ key: 'Entity:Create',
7450
+ command: () => import('./acorex-platform-layout-entity-create-entity.command-BXExgI3W.mjs').then((c) => c.AXPCreateEntityCommand),
7297
7451
  },
7298
7452
  ]),
7299
7453
  provideQuerySetups([
7300
7454
  {
7301
7455
  key: 'Entity:GetDetails',
7302
- loader: () => Promise.resolve().then(function () { return getEntityDetails_query; }).then((c) => c.AXPGetEntityDetailsQuery)
7456
+ loader: () => Promise.resolve().then(function () { return getEntityDetails_query; }).then((c) => c.AXPGetEntityDetailsQuery),
7303
7457
  },
7304
7458
  ]),
7305
7459
  ], imports: [RouterModule,
@@ -7330,9 +7484,10 @@ class AXPEntityModule {
7330
7484
  },
7331
7485
  functions: {},
7332
7486
  }),
7333
- AXPLayoutBuilderModule.forChild({
7487
+ AXPWidgetCoreModule.forChild({
7334
7488
  widgets: [
7335
7489
  AXPLookupWidget,
7490
+ AXPLookupFilterWidget,
7336
7491
  AXPWidgetSelectorWidget,
7337
7492
  AXPTagableBoxWidget,
7338
7493
  AXPEntityListWidget,
@@ -7340,7 +7495,7 @@ class AXPEntityModule {
7340
7495
  ],
7341
7496
  })] }); }
7342
7497
  }
7343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityModule, decorators: [{
7498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityModule, decorators: [{
7344
7499
  type: NgModule,
7345
7500
  args: [{
7346
7501
  imports: [
@@ -7372,9 +7527,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
7372
7527
  },
7373
7528
  functions: {},
7374
7529
  }),
7375
- AXPLayoutBuilderModule.forChild({
7530
+ AXPWidgetCoreModule.forChild({
7376
7531
  widgets: [
7377
7532
  AXPLookupWidget,
7533
+ AXPLookupFilterWidget,
7378
7534
  AXPWidgetSelectorWidget,
7379
7535
  AXPTagableBoxWidget,
7380
7536
  AXPEntityListWidget,
@@ -7408,67 +7564,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImpor
7408
7564
  provideCommandSetups([
7409
7565
  {
7410
7566
  key: 'Entity:OpenDetails',
7411
- command: () => Promise.resolve().then(function () { return openEntityDetails_command; }).then((c) => c.AXPOpenEntityDetailsCommand)
7567
+ command: () => Promise.resolve().then(function () { return openEntityDetails_command; }).then((c) => c.AXPOpenEntityDetailsCommand),
7568
+ },
7569
+ {
7570
+ key: 'Entity:Create',
7571
+ command: () => import('./acorex-platform-layout-entity-create-entity.command-BXExgI3W.mjs').then((c) => c.AXPCreateEntityCommand),
7412
7572
  },
7413
7573
  ]),
7414
7574
  provideQuerySetups([
7415
7575
  {
7416
7576
  key: 'Entity:GetDetails',
7417
- loader: () => Promise.resolve().then(function () { return getEntityDetails_query; }).then((c) => c.AXPGetEntityDetailsQuery)
7577
+ loader: () => Promise.resolve().then(function () { return getEntityDetails_query; }).then((c) => c.AXPGetEntityDetailsQuery),
7418
7578
  },
7419
7579
  ]),
7420
7580
  ],
7421
7581
  }]
7422
- }], ctorParameters: () => [{ type: i1$4.AXPAppStartUpService }, { type: i0.Injector }] });
7582
+ }], ctorParameters: () => [{ type: i1$2.AXPAppStartUpService }, { type: i0.Injector }] });
7423
7583
 
7424
- //#endregion
7425
- //#region ---- Entity Open Details Command ----
7426
- /**
7427
- * Generic command to open entity details view
7428
- * Can be used by any entity to navigate to its detail page
7429
- */
7430
- class AXPOpenEntityDetailsCommand {
7431
- constructor() {
7432
- //#endregion
7433
- //#region ---- Services & Dependencies ----
7434
- this.router = inject(Router);
7435
- this.sessionService = inject(AXPSessionService);
7436
- }
7437
- //#endregion
7438
- //#region ---- Command Execution ----
7439
- /**
7440
- * Execute the command to navigate to entity details
7441
- * @param input - Command input containing entity and data information
7442
- */
7443
- async execute(input) {
7444
- const { entity, data } = input;
7445
- if (!entity) {
7446
- throw new Error('Entity name is required for opening details view');
7584
+ const eventDispatchMiddleware = {
7585
+ target: { ops: ['create', 'update', 'delete'], order: 90 },
7586
+ execute: async (ctx, next) => {
7587
+ const dispatcher = inject(AXPEntityEventDispatcherService);
7588
+ await next();
7589
+ if (ctx.op === 'create') {
7590
+ const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
7591
+ await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
7447
7592
  }
7448
- if (!data?.id) {
7449
- throw new Error('Entity ID is required for opening details view');
7593
+ else if (ctx.op === 'update') {
7594
+ await dispatcher.dispatchUpdated(ctx.entityName, {
7595
+ refType: ctx.entityName,
7596
+ data: ctx.result,
7597
+ changes: ctx.locals.get('changes'),
7598
+ });
7450
7599
  }
7451
- const [module, entityName] = entity.split('.');
7452
- if (!module || !entityName) {
7453
- throw new Error('Entity must be in format "ModuleName.EntityName"');
7600
+ else if (ctx.op === 'delete') {
7601
+ // For delete, prefer previous entity if available
7602
+ await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
7454
7603
  }
7455
- const url = `/${this.sessionService.application?.name}/m/${module}/e/${entityName}/${data.id}/new-view`;
7456
- // Navigate to the entity details page
7457
- this.router.navigate([url]);
7458
- return { success: true };
7459
- }
7460
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPOpenEntityDetailsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7461
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPOpenEntityDetailsCommand, providedIn: 'root' }); }
7462
- }
7463
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPOpenEntityDetailsCommand, decorators: [{
7464
- type: Injectable,
7465
- args: [{ providedIn: 'root' }]
7466
- }] });
7467
-
7468
- var openEntityDetails_command = /*#__PURE__*/Object.freeze({
7469
- __proto__: null,
7470
- AXPOpenEntityDetailsCommand: AXPOpenEntityDetailsCommand
7471
- });
7604
+ },
7605
+ };
7472
7606
 
7473
7607
  //#endregion
7474
7608
  //#region ---- Get Entity Details Query ----
@@ -7535,10 +7669,10 @@ class AXPGetEntityDetailsQuery {
7535
7669
  throw new Error(`Failed to fetch entity data: ${error instanceof Error ? error.message : 'Unknown error'}`);
7536
7670
  }
7537
7671
  }
7538
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPGetEntityDetailsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7539
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPGetEntityDetailsQuery, providedIn: 'root' }); }
7672
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPGetEntityDetailsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7673
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPGetEntityDetailsQuery, providedIn: 'root' }); }
7540
7674
  }
7541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPGetEntityDetailsQuery, decorators: [{
7675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPGetEntityDetailsQuery, decorators: [{
7542
7676
  type: Injectable,
7543
7677
  args: [{ providedIn: 'root' }]
7544
7678
  }] });
@@ -7548,13 +7682,417 @@ var getEntityDetails_query = /*#__PURE__*/Object.freeze({
7548
7682
  AXPGetEntityDetailsQuery: AXPGetEntityDetailsQuery
7549
7683
  });
7550
7684
 
7685
+ //#endregion
7686
+ class AXPEntityDynamicDialogService {
7687
+ constructor() {
7688
+ //#region ---- Services & Dependencies ----
7689
+ this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
7690
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
7691
+ this.layoutTheme = inject(AXPLayoutThemeService);
7692
+ }
7693
+ //#endregion
7694
+ //#region ---- Public API ----
7695
+ entity(fullName) {
7696
+ return new InterfaceSelector(this.entityRegistry, this.layoutBuilder, this.layoutTheme, fullName);
7697
+ }
7698
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDynamicDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7699
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDynamicDialogService, providedIn: 'root' }); }
7700
+ }
7701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPEntityDynamicDialogService, decorators: [{
7702
+ type: Injectable,
7703
+ args: [{ providedIn: 'root' }]
7704
+ }] });
7705
+ //#region ---- Builders ----
7706
+ class InterfaceSelector {
7707
+ constructor(entityRegistry, layoutBuilder, layoutTheme, fullName) {
7708
+ this.entityRegistry = entityRegistry;
7709
+ this.layoutBuilder = layoutBuilder;
7710
+ this.layoutTheme = layoutTheme;
7711
+ this.fullName = fullName;
7712
+ }
7713
+ create() {
7714
+ return new PropertyFilter(this.entityRegistry, this.layoutBuilder, this.layoutTheme, this.fullName, 'create');
7715
+ }
7716
+ update(id) {
7717
+ return new PropertyFilter(this.entityRegistry, this.layoutBuilder, this.layoutTheme, this.fullName, 'update', id);
7718
+ }
7719
+ }
7720
+ class PropertyFilter {
7721
+ constructor(entityRegistry, layoutBuilder, layoutTheme, fullName, kind, recordId) {
7722
+ this.entityRegistry = entityRegistry;
7723
+ this.layoutBuilder = layoutBuilder;
7724
+ this.layoutTheme = layoutTheme;
7725
+ this.fullName = fullName;
7726
+ this.kind = kind;
7727
+ this.includeList = null;
7728
+ this.excludeList = null;
7729
+ this.initialContext = {};
7730
+ this.extraFieldsByGroup = new Map();
7731
+ this.recordId = recordId;
7732
+ }
7733
+ include(...propertyNames) {
7734
+ this.includeList = new Set(propertyNames.filter(Boolean));
7735
+ return this;
7736
+ }
7737
+ exclude(...propertyNames) {
7738
+ // Ignored when include list is present
7739
+ if (!this.includeList) {
7740
+ this.excludeList = new Set(propertyNames.filter(Boolean));
7741
+ }
7742
+ return this;
7743
+ }
7744
+ title(text) {
7745
+ this.overrideTitle = text;
7746
+ return this;
7747
+ }
7748
+ context(context) {
7749
+ this.initialContext = context ?? {};
7750
+ return this;
7751
+ }
7752
+ size(size) {
7753
+ this.externalSize = size;
7754
+ return this;
7755
+ }
7756
+ actions(delegate) {
7757
+ this.externalActionsDelegate = delegate;
7758
+ return this;
7759
+ }
7760
+ field(groupId, path, delegate) {
7761
+ const list = this.extraFieldsByGroup.get(groupId) ?? [];
7762
+ list.push({ path, delegate });
7763
+ this.extraFieldsByGroup.set(groupId, list);
7764
+ return this;
7765
+ }
7766
+ mode(mode) {
7767
+ this.externalMode = mode;
7768
+ return this;
7769
+ }
7770
+ async show() {
7771
+ const { moduleName, entityName } = parseEntityFullName(this.fullName);
7772
+ const entity = await this.entityRegistry.resolve(moduleName, entityName);
7773
+ const iface = this.kind === 'create' ? entity?.interfaces?.master?.create : entity?.interfaces?.master?.update;
7774
+ if (!iface) {
7775
+ throw new Error(`Entity interface not found: ${entity.module}.${entity.name}.interfaces.master.${this.kind}`);
7776
+ }
7777
+ // Title and size
7778
+ const title = this.overrideTitle || entity.formats?.individual || entity.title || `${entity.module}.${entity.name}`;
7779
+ // Build content using LayoutBuilder
7780
+ const sections = (iface.sections ?? []).slice();
7781
+ const entityProps = (entity.properties ?? []).slice();
7782
+ const nameToViewLayout = buildViewLayoutMap(iface.properties ?? []);
7783
+ const allowedNames = this.computeAllowedNames(entityProps.map((p) => p.name));
7784
+ const dialog = this.layoutBuilder.create().dialog((d) => {
7785
+ d.setTitle(title);
7786
+ d.setSize(this.externalSize ?? (this.layoutTheme.isMobileDevice() ? 'full' : 'md'));
7787
+ d.setCloseButton(true);
7788
+ d.content((layout) => {
7789
+ layout.mode(this.externalMode ?? 'edit');
7790
+ for (const section of sections) {
7791
+ const groupId = section.id;
7792
+ const groupProps = entityProps.filter((p) => p.groupId === groupId && allowedNames.has(p.name));
7793
+ const extraFields = this.extraFieldsByGroup.get(groupId) ?? [];
7794
+ if (groupProps.length === 0 && extraFields.length === 0) {
7795
+ continue;
7796
+ }
7797
+ layout.fieldset((fs) => {
7798
+ fs.setTitle((getGroupTitle(entity, groupId) || groupId));
7799
+ // Preserve properties order as defined in interface.properties (if present), otherwise entity.properties order
7800
+ const orderedProps = orderProperties(groupProps, iface.properties ?? []);
7801
+ for (const prop of orderedProps) {
7802
+ const viewLayout = nameToViewLayout.get(prop.name);
7803
+ const fieldPath = buildFieldPath(prop, iface.properties ?? []);
7804
+ fs.formField(prop.title, (field) => {
7805
+ // Path & field-level visibility/readonly
7806
+ field.path(fieldPath);
7807
+ if (prop.schema?.hidden) {
7808
+ field.visible(false);
7809
+ }
7810
+ if (prop.schema?.readonly) {
7811
+ field.readonly(true);
7812
+ }
7813
+ // Layout mapping (per-field). Only colSpan is supported by dynamic-form per breakpoint.
7814
+ const fieldLayout = toFieldLayout(viewLayout?.layout);
7815
+ if (fieldLayout) {
7816
+ field.layout(fieldLayout);
7817
+ }
7818
+ // Widget mapping (generic to allow all widget types)
7819
+ const widgetType = prop.schema?.interface?.type || '';
7820
+ const widgetOptions = buildWidgetOptions(prop);
7821
+ field.customWidget(widgetType, widgetOptions);
7822
+ });
7823
+ }
7824
+ // Append any extra fields requested by the caller for this group
7825
+ for (const extra of extraFields) {
7826
+ const label = extra.path?.split('.').slice(-1)[0] || extra.path;
7827
+ fs.formField(label, (f) => {
7828
+ const legacy = toCompatFormFieldBuilder(f);
7829
+ legacy.path(extra.path);
7830
+ extra.delegate?.(legacy);
7831
+ });
7832
+ }
7833
+ });
7834
+ }
7835
+ });
7836
+ // Actions: external if provided, otherwise default cancel/submit
7837
+ d.setActions(this.externalActionsDelegate ?? ((a) => a.cancel().submit()));
7838
+ });
7839
+ // Context: load record by id for update and merge with provided context (context overrides)
7840
+ let baseContext = {};
7841
+ if (this.kind === 'update') {
7842
+ if (!this.recordId && typeof this['recordId'] === 'undefined') {
7843
+ // Preserve back-compat if constructor arg wasn't captured
7844
+ this['recordId'] = undefined;
7845
+ }
7846
+ }
7847
+ try {
7848
+ if (this.kind === 'update') {
7849
+ const id = this['recordId'];
7850
+ if (!id) {
7851
+ throw new Error('Record id is required for update().');
7852
+ }
7853
+ const byKeyFn = entity?.queries?.byKey?.execute;
7854
+ if (typeof byKeyFn === 'function') {
7855
+ baseContext = (await byKeyFn(id)) ?? {};
7856
+ }
7857
+ }
7858
+ }
7859
+ catch {
7860
+ baseContext = baseContext ?? {};
7861
+ }
7862
+ console.log(this['recordId']);
7863
+ const effectiveContext = merge({}, baseContext ?? {}, this.initialContext ?? {});
7864
+ dialog.setContext(effectiveContext);
7865
+ return await dialog.show();
7866
+ }
7867
+ computeAllowedNames(allNames) {
7868
+ if (this.includeList && this.includeList.size > 0) {
7869
+ return new Set(allNames.filter((n) => this.includeList.has(n)));
7870
+ }
7871
+ if (this.excludeList && this.excludeList.size > 0) {
7872
+ return new Set(allNames.filter((n) => !this.excludeList.has(n)));
7873
+ }
7874
+ return new Set(allNames);
7875
+ }
7876
+ }
7877
+ //#endregion
7878
+ //#region ---- Helpers ----
7879
+ // No extra action builders to keep API identical to dynamic-form-builder
7880
+ function parseEntityFullName(fullName) {
7881
+ const [moduleName, entityName] = (fullName || '').split('.');
7882
+ if (!moduleName || !entityName) {
7883
+ throw new Error(`Invalid entity full name: "${fullName}"`);
7884
+ }
7885
+ return { moduleName, entityName };
7886
+ }
7887
+ function buildViewLayoutMap(views) {
7888
+ const map = new Map();
7889
+ for (const v of views || []) {
7890
+ if (v?.name) {
7891
+ map.set(v.name, v);
7892
+ }
7893
+ }
7894
+ return map;
7895
+ }
7896
+ function orderProperties(props, viewProps) {
7897
+ if (!viewProps || viewProps.length === 0) {
7898
+ return props;
7899
+ }
7900
+ const orderIndex = new Map();
7901
+ viewProps.forEach((vp, idx) => orderIndex.set(vp.name, idx));
7902
+ return [...props].sort((a, b) => {
7903
+ const ai = orderIndex.has(a.name) ? orderIndex.get(a.name) : Number.MAX_SAFE_INTEGER;
7904
+ const bi = orderIndex.has(b.name) ? orderIndex.get(b.name) : Number.MAX_SAFE_INTEGER;
7905
+ if (ai !== bi)
7906
+ return ai - bi;
7907
+ return 0;
7908
+ });
7909
+ }
7910
+ function buildFieldPath(prop, viewProps) {
7911
+ const vp = (viewProps || []).find((x) => x.name === prop.name);
7912
+ const prefix = vp?.dataPath ? `${vp.dataPath}.` : '';
7913
+ return `${prefix}${prop.name}`;
7914
+ }
7915
+ function toFieldLayout(layout) {
7916
+ const positions = layout?.positions;
7917
+ if (!positions)
7918
+ return undefined;
7919
+ // Map AXPGridLayoutOptions -> AXPDynamicFormFieldDefinition['layout']
7920
+ const getSpan = (key) => positions?.[key]?.colSpan;
7921
+ const d = getSpan('sm');
7922
+ const md = getSpan('md');
7923
+ const lg = getSpan('lg');
7924
+ const xl = getSpan('xl');
7925
+ const xxl = getSpan('xxl');
7926
+ if (d == null && md == null && lg == null && xl == null && xxl == null)
7927
+ return undefined;
7928
+ return {
7929
+ default: d,
7930
+ md,
7931
+ lg,
7932
+ xl,
7933
+ xxl,
7934
+ };
7935
+ }
7936
+ function buildWidgetOptions(prop) {
7937
+ const base = prop.schema?.interface?.options || {};
7938
+ const validations = (prop.validations || []).map((c) => ({
7939
+ rule: c.rule,
7940
+ message: c.message,
7941
+ options: c.options,
7942
+ }));
7943
+ return {
7944
+ ...base,
7945
+ validations,
7946
+ };
7947
+ }
7948
+ function getGroupTitle(entity, groupId) {
7949
+ const g = (entity.groups || []).find((x) => x.id === groupId);
7950
+ return g?.title;
7951
+ }
7952
+ function toCompatFormFieldBuilder(field) {
7953
+ return {
7954
+ ...field,
7955
+ path: (p) => field.path(p),
7956
+ layout: (c) => field.layout(c),
7957
+ visible: (cond) => field.visible(cond),
7958
+ readonly: (cond) => field.readonly(cond),
7959
+ customWidget: (type, options) => field.customWidget(type, options),
7960
+ mode: (mode) => field.mode(mode),
7961
+ };
7962
+ }
7963
+
7964
+ /**
7965
+ * Error type that can be thrown by middlewares to abort the chain with a structured payload.
7966
+ */
7967
+ class AXPMiddlewareAbortError extends Error {
7968
+ constructor(message, options = {}) {
7969
+ super(message);
7970
+ this.message = message;
7971
+ this.options = options;
7972
+ this.name = 'AXPMiddlewareAbortError';
7973
+ }
7974
+ toResponse() {
7975
+ return {
7976
+ success: false,
7977
+ error: {
7978
+ code: this.options.code,
7979
+ message: this.message,
7980
+ status: this.options.status,
7981
+ details: this.options.details,
7982
+ },
7983
+ };
7984
+ }
7985
+ }
7986
+ /** Type guard for AXPMiddlewareAbortError */
7987
+ function isAXPMiddlewareAbortError(error) {
7988
+ return error instanceof AXPMiddlewareAbortError;
7989
+ }
7990
+ //#endregion
7991
+
7992
+ const AXP_ENTITY_STORAGE_BACKEND = new InjectionToken('AXP_ENTITY_STORAGE_BACKEND');
7993
+ const AXP_ENTITY_STORAGE_MIDDLEWARE = new InjectionToken('AXP_ENTITY_STORAGE_MIDDLEWARE');
7994
+
7995
+ class AXPMiddlewareEntityStorageService extends AXPEntityStorageService {
7996
+ constructor() {
7997
+ super(...arguments);
7998
+ this.backend = inject(AXP_ENTITY_STORAGE_BACKEND);
7999
+ this.allMiddlewares = (inject(AXP_ENTITY_STORAGE_MIDDLEWARE, { optional: true }) || []).slice();
8000
+ this.injector = inject(EnvironmentInjector);
8001
+ }
8002
+ get dbName() {
8003
+ return this.backend.dbName;
8004
+ }
8005
+ filterMiddlewares(ctx) {
8006
+ return this.allMiddlewares
8007
+ .filter((mw) => {
8008
+ const t = mw.target;
8009
+ if (!t)
8010
+ return true;
8011
+ if (t.ops && !t.ops.includes(ctx.op))
8012
+ return false;
8013
+ if (t.entity) {
8014
+ if (typeof t.entity === 'string' && t.entity !== ctx.entityName)
8015
+ return false;
8016
+ if (t.entity instanceof RegExp && !t.entity.test(ctx.entityName))
8017
+ return false;
8018
+ }
8019
+ if (t.predicate && !t.predicate(ctx))
8020
+ return false;
8021
+ return true;
8022
+ })
8023
+ .sort((a, b) => (a.target?.order ?? 0) - (b.target?.order ?? 0));
8024
+ }
8025
+ compose(mws, leaf, ctx) {
8026
+ return mws
8027
+ .slice()
8028
+ .reverse()
8029
+ .reduce((next, mw) => {
8030
+ return async () => runInInjectionContext(this.injector, () => mw.execute(ctx, next));
8031
+ }, leaf);
8032
+ }
8033
+ async run(ctx, delegate) {
8034
+ const chain = this.compose(this.filterMiddlewares(ctx), async () => {
8035
+ ctx.result = await delegate();
8036
+ }, ctx);
8037
+ await chain();
8038
+ return ctx.result;
8039
+ }
8040
+ createCtx(op, entityName, init) {
8041
+ return {
8042
+ op,
8043
+ entityName,
8044
+ locals: new Map(),
8045
+ backend: {
8046
+ getOne: (name, id) => this.backend.getOne(name, id),
8047
+ insertOne: (name, e) => this.backend.insertOne(name, e),
8048
+ query: (name, request) => this.backend.query(name, request),
8049
+ updateOne: (name, id, data) => this.backend.updateOne(name, id, data),
8050
+ },
8051
+ ...init,
8052
+ };
8053
+ }
8054
+ async initial(entityName, collection, options) {
8055
+ const ctx = this.createCtx('initial', entityName, { data: collection });
8056
+ return this.run(ctx, () => this.backend.initial(entityName, ctx.data, options));
8057
+ }
8058
+ async getOne(entityName, id) {
8059
+ const ctx = this.createCtx('getOne', entityName, { id });
8060
+ return this.run(ctx, () => this.backend.getOne(entityName, id));
8061
+ }
8062
+ async updateOne(entityName, id, keyValues) {
8063
+ const ctx = this.createCtx('update', entityName, { id, data: keyValues });
8064
+ return this.run(ctx, () => this.backend.updateOne(entityName, id, ctx.data));
8065
+ }
8066
+ async deleteOne(entityName, id) {
8067
+ const ctx = this.createCtx('delete', entityName, { id });
8068
+ return this.run(ctx, () => this.backend.deleteOne(entityName, id));
8069
+ }
8070
+ async insertOne(entityName, entity) {
8071
+ const ctx = this.createCtx('create', entityName, { data: entity });
8072
+ return this.run(ctx, () => this.backend.insertOne(entityName, ctx.data));
8073
+ }
8074
+ async getAll(entityName) {
8075
+ const ctx = this.createCtx('getAll', entityName);
8076
+ return this.run(ctx, () => this.backend.getAll(entityName));
8077
+ }
8078
+ async query(entityName, request) {
8079
+ const ctx = this.createCtx('query', entityName, { request });
8080
+ return this.run(ctx, () => this.backend.query(entityName, request));
8081
+ }
8082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMiddlewareEntityStorageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
8083
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMiddlewareEntityStorageService }); }
8084
+ }
8085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXPMiddlewareEntityStorageService, decorators: [{
8086
+ type: Injectable
8087
+ }] });
8088
+
7551
8089
  // #region Master
7552
8090
  function entityMasterCreateAction() {
7553
8091
  return {
7554
8092
  title: '@general:actions.create.title',
7555
8093
  command: 'create-entity',
7556
8094
  priority: 'primary',
7557
- type: 'create',
8095
+ type: AXPSystemActionType.Create,
7558
8096
  scope: AXPEntityCommandScope.TypeLevel,
7559
8097
  };
7560
8098
  }
@@ -7563,7 +8101,7 @@ function entityMasterBulkDeleteAction() {
7563
8101
  title: '@general:actions.delete-items.title',
7564
8102
  command: 'delete-entity',
7565
8103
  priority: 'primary',
7566
- type: 'delete',
8104
+ type: AXPSystemActionType.Delete,
7567
8105
  scope: AXPEntityCommandScope.Selected,
7568
8106
  };
7569
8107
  }
@@ -7572,7 +8110,7 @@ function entityMasterViewAction() {
7572
8110
  title: '@general:actions.view.title',
7573
8111
  command: 'open-entity',
7574
8112
  priority: 'secondary',
7575
- type: 'view',
8113
+ type: AXPSystemActionType.View,
7576
8114
  scope: AXPEntityCommandScope.Individual,
7577
8115
  default: true,
7578
8116
  };
@@ -7582,17 +8120,32 @@ function entityMasterDeleteAction() {
7582
8120
  title: '@general:actions.delete.title',
7583
8121
  command: 'delete-entity',
7584
8122
  priority: 'secondary',
7585
- type: 'delete',
8123
+ type: AXPSystemActionType.Delete,
7586
8124
  scope: AXPEntityCommandScope.Individual,
7587
8125
  };
7588
8126
  }
7589
- function entityMasterCrudActions() {
7590
- return [
7591
- entityMasterCreateAction(),
7592
- entityMasterBulkDeleteAction(),
7593
- entityMasterViewAction(),
7594
- entityMasterDeleteAction(),
7595
- ];
8127
+ function entityMasterCrudActions(options) {
8128
+ const opts = {
8129
+ create: true,
8130
+ delete: true,
8131
+ view: true,
8132
+ edit: true,
8133
+ ...options,
8134
+ };
8135
+ const actions = [];
8136
+ if (opts.create) {
8137
+ actions.push(entityMasterCreateAction());
8138
+ }
8139
+ if (opts.delete) {
8140
+ actions.push(entityMasterBulkDeleteAction());
8141
+ }
8142
+ if (opts.view) {
8143
+ actions.push(entityMasterViewAction());
8144
+ }
8145
+ if (opts.edit) {
8146
+ actions.push(entityMasterDeleteAction());
8147
+ }
8148
+ return actions;
7596
8149
  }
7597
8150
  function entityMasterRecordActions() {
7598
8151
  return [entityMasterDeleteAction()];
@@ -7615,7 +8168,7 @@ function entityDetailsCreateActions(parentId) {
7615
8168
  },
7616
8169
  },
7617
8170
  priority: 'primary',
7618
- type: 'create',
8171
+ type: AXPSystemActionType.Create,
7619
8172
  scope: AXPEntityCommandScope.TypeLevel,
7620
8173
  };
7621
8174
  }
@@ -7645,7 +8198,7 @@ function entityDetailsEditAction() {
7645
8198
  title: '@general:actions.edit.title',
7646
8199
  command: 'quick-modify-entity',
7647
8200
  priority: 'secondary',
7648
- type: 'update',
8201
+ type: AXPSystemActionType.Update,
7649
8202
  default: true,
7650
8203
  scope: AXPEntityCommandScope.Individual,
7651
8204
  };
@@ -7656,7 +8209,7 @@ function entityOverrideDetailsViewAction() {
7656
8209
  command: 'open-entity',
7657
8210
  priority: 'secondary',
7658
8211
  hidden: true,
7659
- type: 'view',
8212
+ type: AXPSystemActionType.View,
7660
8213
  scope: AXPEntityCommandScope.Individual,
7661
8214
  };
7662
8215
  }
@@ -7683,7 +8236,7 @@ function entityDetailsReferenceCreateActions(type) {
7683
8236
  },
7684
8237
  },
7685
8238
  priority: 'primary',
7686
- type: 'create',
8239
+ type: AXPSystemActionType.Create,
7687
8240
  scope: AXPEntityCommandScope.TypeLevel,
7688
8241
  },
7689
8242
  entityDetailsEditAction(),
@@ -7698,7 +8251,7 @@ function entityDetailsReferenceCreateActions(type) {
7698
8251
  */
7699
8252
  function detectEntityChanges(oldObj, newObj) {
7700
8253
  return transform(newObj, (result, value, key) => {
7701
- if (!isEqual(value, oldObj[key])) {
8254
+ if (!isEqual$1(value, oldObj[key])) {
7702
8255
  const oldValue = oldObj[key];
7703
8256
  if (Array.isArray(value) || Array.isArray(oldValue)) {
7704
8257
  const oldArray = Array.isArray(oldValue) ? oldValue : [];
@@ -7710,8 +8263,8 @@ function detectEntityChanges(oldObj, newObj) {
7710
8263
  result[key] = { oldValue, newValue: value, added, removed };
7711
8264
  }
7712
8265
  else {
7713
- const added = newArray.filter((item) => !oldArray.some((oldItem) => isEqual(item, oldItem)));
7714
- const removed = oldArray.filter((item) => !newArray.some((newItem) => isEqual(item, newItem)));
8266
+ const added = newArray.filter((item) => !oldArray.some((oldItem) => isEqual$1(item, oldItem)));
8267
+ const removed = oldArray.filter((item) => !newArray.some((newItem) => isEqual$1(item, newItem)));
7715
8268
  result[key] = { oldValue, newValue: value, added, removed };
7716
8269
  }
7717
8270
  }
@@ -7723,32 +8276,9 @@ function detectEntityChanges(oldObj, newObj) {
7723
8276
  }
7724
8277
  //#endregion
7725
8278
 
7726
- const eventDispatchMiddleware = {
7727
- target: { ops: ['create', 'update', 'delete'], order: 90 },
7728
- execute: async (ctx, next) => {
7729
- const dispatcher = inject(AXPEntityEventDispatcherService);
7730
- await next();
7731
- if (ctx.op === 'create') {
7732
- const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
7733
- await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
7734
- }
7735
- else if (ctx.op === 'update') {
7736
- await dispatcher.dispatchUpdated(ctx.entityName, {
7737
- refType: ctx.entityName,
7738
- data: ctx.result,
7739
- changes: ctx.locals.get('changes'),
7740
- });
7741
- }
7742
- else if (ctx.op === 'delete') {
7743
- // For delete, prefer previous entity if available
7744
- await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
7745
- }
7746
- },
7747
- };
7748
-
7749
8279
  /**
7750
8280
  * Generated bundle index. Do not edit.
7751
8281
  */
7752
8282
 
7753
- export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPGetEntityDetailsQuery, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware };
8283
+ export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityDynamicDialogService, AXPEntityEventDispatcherService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityReferenceWidget, AXPEntityReferenceWidgetColumnComponent, AXPEntityReferenceWidgetDesignerComponent, AXPEntityReferenceWidgetEditComponent, AXPEntityReferenceWidgetPrintComponent, AXPEntityReferenceWidgetViewComponent, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTagableBoxWidget, AXPTagableBoxWidgetColumnComponent, AXPTagableBoxWidgetEditComponent, AXPTagableBoxWidgetFilterComponent, AXPTagableBoxWidgetPrintComponent, AXPTagableBoxWidgetViewComponent, AXPWidgetSelectorWidget, AXPWidgetSelectorWidgetEditComponent, AXPWidgetSelectorWidgetViewComponent, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError };
7754
8284
  //# sourceMappingURL=acorex-platform-layout-entity.mjs.map