@acorex/platform 21.0.0-next.5 → 21.0.0-next.51

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 (124) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +281 -23
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs +163 -0
  4. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +1047 -263
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +1138 -510
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +557 -826
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +804 -186
  12. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
  14. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-layout-components.mjs +6208 -2344
  16. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
  18. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity.mjs +18632 -10286
  20. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-views.mjs +538 -168
  22. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs +720 -456
  24. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
  26. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs +103 -0
  28. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
  30. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
  32. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +116 -0
  34. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +6 -6
  36. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +5 -5
  38. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
  40. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-layout-widgets.mjs +8728 -4269
  42. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  43. package/fesm2022/acorex-platform-native.mjs +8 -7
  44. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-runtime.mjs +391 -166
  46. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  47. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +160 -0
  48. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +120 -0
  50. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +1 -0
  51. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +19 -26
  52. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
  53. package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
  54. package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
  55. package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
  56. package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
  57. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
  58. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default.mjs +1836 -67
  60. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  61. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
  62. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
  64. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
  65. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs} +24 -25
  66. package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +1 -0
  67. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  68. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
  70. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-themes-shared.mjs +674 -573
  72. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  73. package/fesm2022/acorex-platform-workflow.mjs +1715 -535
  74. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  75. package/fesm2022/acorex-platform.mjs.map +1 -1
  76. package/package.json +37 -37
  77. package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
  78. package/{common/index.d.ts → types/acorex-platform-common.d.ts} +598 -80
  79. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +595 -132
  80. package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
  81. package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +193 -48
  82. package/types/acorex-platform-layout-components.d.ts +2979 -0
  83. package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
  84. package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1601 -261
  85. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +116 -55
  86. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +272 -124
  87. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1055 -157
  88. package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
  89. package/types/acorex-platform-runtime.d.ts +571 -0
  90. package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +122 -5
  91. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
  92. package/types/acorex-platform-workflow.d.ts +1884 -0
  93. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
  94. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
  95. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
  96. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
  97. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
  104. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs +0 -1542
  106. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
  108. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
  110. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
  111. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
  113. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
  115. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs +0 -65
  118. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
  120. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
  121. package/layout/components/index.d.ts +0 -1669
  122. package/runtime/index.d.ts +0 -307
  123. package/workflow/index.d.ts +0 -1808
  124. /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { computed, signal, Injectable, InjectionToken, inject, ElementRef, effect, untracked, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, input, output, ViewContainerRef, Directive, Optional, Inject, NgModule } from '@angular/core';
2
+ import { signal, computed, Injectable, InjectionToken, inject, ElementRef, effect, untracked, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, input, output, ViewContainerRef, Directive, NgModule } from '@angular/core';
3
3
  import { convertArrayToDataSource, AXDataSource } from '@acorex/cdk/common';
4
- import { setSmart, AXPDataSourceDefinitionProviderService, extractValue, AXPExpressionEvaluatorService, getSmart } from '@acorex/platform/core';
5
- import { cloneDeep, isEqual, has, get, set, merge, isNil, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
4
+ import { AXPContextStore, AXPDataSourceDefinitionProviderService, extractValue, AXPExpressionEvaluatorService, getSmart } from '@acorex/platform/core';
5
+ export { normalizeDefinitionCategories } from '@acorex/platform/core';
6
+ import { set, merge, cloneDeep, isNil, get, isEqual, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
6
7
  import { Subject, BehaviorSubject, filter } from 'rxjs';
7
- import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
8
8
  import * as i1$1 from '@acorex/components/skeleton';
9
9
  import { AXSkeletonModule } from '@acorex/components/skeleton';
10
10
  import * as i2 from '@acorex/core/translation';
@@ -15,122 +15,6 @@ import { CommonModule } from '@angular/common';
15
15
  import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
16
16
  import { AXUnsubscriber } from '@acorex/core/utils';
17
17
 
18
- class AXPWidgetCoreContextChangeEvent {
19
- }
20
- const AXPWidgetCoreContextStore = signalStore(
21
- // Initial State
22
- withState(() => ({
23
- data: {}, // Shared context data
24
- state: 'initiated', // Current state
25
- initialSnapshot: {}, // Snapshot of the first initialized state
26
- previousSnapshot: {}, // Snapshot of the previous state
27
- lastChange: {
28
- state: 'initiated',
29
- }, // Last change event
30
- })),
31
- // Computed Signals
32
- withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
33
- isChanged: computed(() => state() === 'changed'),
34
- isReset: computed(() => state() === 'restored'),
35
- isInitiated: computed(() => state() === 'initiated'),
36
- isEmpty: computed(() => Object.keys(data()).length === 0),
37
- isDirty: computed(() => !isEqual(data(), previousSnapshot())),
38
- snapshot: computed(() => cloneDeep(data())), // Current data snapshot
39
- initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
40
- previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
41
- changeEvent: computed(() => lastChange()), // Reactive last change event
42
- })),
43
- // Methods for State Management
44
- withMethods((store) => ({
45
- // Update a specific value
46
- update(path, value) {
47
- const currentData = cloneDeep(store.data());
48
- const oldValue = get(currentData, path);
49
- // Skip if the value hasn't changed
50
- if (isEqual(oldValue, value)) {
51
- return;
52
- }
53
- // Update the value and prepare the change event
54
- const updatedData = setSmart(currentData, path, value);
55
- const changeEvent = {
56
- oldValue,
57
- newValue: value,
58
- path,
59
- state: 'changed',
60
- data: updatedData,
61
- };
62
- // Patch the state
63
- patchState(store, {
64
- previousSnapshot: store.snapshot(), // Save the previous state
65
- data: updatedData,
66
- state: 'changed',
67
- lastChange: changeEvent,
68
- });
69
- },
70
- patch(context) {
71
- const currentData = cloneDeep(store.data());
72
- // Update the value and prepare the change event
73
- const updatedData = { ...currentData, ...context };
74
- const changeEvent = {
75
- state: 'patch',
76
- data: updatedData,
77
- };
78
- // Patch the state
79
- patchState(store, {
80
- previousSnapshot: store.snapshot(), // Save the previous state
81
- data: updatedData,
82
- state: 'changed',
83
- lastChange: changeEvent,
84
- });
85
- },
86
- // Reset to the initial state
87
- reset() {
88
- const initialData = store.initial();
89
- const changeEvent = {
90
- oldValue: cloneDeep(store.data()), // Current data becomes old value
91
- newValue: cloneDeep(initialData), // Reset to the initial state
92
- path: '',
93
- state: 'restored',
94
- data: initialData,
95
- };
96
- patchState(store, {
97
- previousSnapshot: store.snapshot(), // Save the previous state
98
- data: initialData,
99
- state: 'restored',
100
- lastChange: changeEvent,
101
- });
102
- },
103
- // Initialize the state
104
- set(initialData) {
105
- const currentData = store.data();
106
- if (isEqual(currentData, initialData)) {
107
- return; // Skip if the current state matches the initial state
108
- }
109
- const changeEvent = {
110
- oldValue: null,
111
- newValue: cloneDeep(initialData),
112
- path: '',
113
- state: 'initiated',
114
- data: initialData,
115
- };
116
- patchState(store, {
117
- initialSnapshot: cloneDeep(initialData), // Save the initial state
118
- previousSnapshot: store.snapshot(), // Save the current state as the previous
119
- data: initialData,
120
- state: 'initiated',
121
- lastChange: changeEvent,
122
- });
123
- },
124
- // Get a specific value
125
- getValue(path) {
126
- return get(store.data(), path);
127
- },
128
- // Check if a path exists in the context
129
- hasValue(path) {
130
- return has(store.data(), path);
131
- },
132
- })));
133
-
134
18
  var AXPPageStatus;
135
19
  (function (AXPPageStatus) {
136
20
  // Idle statuses
@@ -170,17 +54,17 @@ class AXPWidgetCoreElement {
170
54
  }
171
55
  class AXPWidgetCoreService {
172
56
  constructor() {
173
- this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : []));
174
- this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : []));
57
+ this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : /* istanbul ignore next */ []));
58
+ this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : /* istanbul ignore next */ []));
175
59
  this.onRefresh = new Subject();
176
60
  this.widgets = new Map();
177
61
  this.onWidgetRegistered = new Subject();
178
- this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : []));
62
+ this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : /* istanbul ignore next */ []));
179
63
  this.status = this.status$.asReadonly();
180
64
  this.isBusy = computed(() => {
181
65
  return [AXPPageStatus.Processing, AXPPageStatus.Submitting, AXPPageStatus.Rendering].includes(this.status());
182
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
183
- this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : []));
66
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
67
+ this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : /* istanbul ignore next */ []));
184
68
  }
185
69
  get variables() {
186
70
  return this.variables$();
@@ -285,13 +169,16 @@ class AXPWidgetCoreService {
285
169
  return Array.from(this.widgets.keys());
286
170
  }
287
171
  ngOnDestroy() { }
288
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
289
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreService }); }
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
173
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService }); }
290
174
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
292
176
  type: Injectable
293
177
  }] });
294
178
 
179
+ //
180
+ // @deprecated
181
+ // Prefer AXPWidgetsList from @acorex/modules/common; dashboard widget type ids live in dashboard-management RootConfig.widgets.
295
182
  const AXPWidgetsCatalog = {
296
183
  timeDuration: 'time-duration',
297
184
  timeDurationFilter: 'time-duration-filter',
@@ -315,6 +202,7 @@ const AXPWidgetsCatalog = {
315
202
  pageLayout: 'page-layout',
316
203
  repeaterLayout: 'repeater-layout',
317
204
  textBlockLayout: 'text-block-layout',
205
+ alertBoxLayout: 'alert-box-layout',
318
206
  fileUploader: 'file-uploader',
319
207
  fileTypeExtension: 'file-type-extension',
320
208
  map: 'map',
@@ -343,7 +231,6 @@ const AXPWidgetsCatalog = {
343
231
  tableLayout: 'table-layout',
344
232
  tableItem: 'table-item-layout',
345
233
  avatar: 'avatar',
346
- themePaletteChooser: 'theme-palette-chooser',
347
234
  themeModeChooser: 'theme-mode-chooser',
348
235
  menuOrientationChooser: 'menu-orientation-chooser',
349
236
  fontStyleChooser: 'font-style-chooser',
@@ -371,31 +258,22 @@ const AXPWidgetsCatalog = {
371
258
  betweenValidation: 'between-validation',
372
259
  equalValidation: 'equal-validation',
373
260
  callbackValidation: 'callback-validation',
374
- donutChart: 'donut-chart',
375
- lineChart: 'line-chart',
376
- barChart: 'bar-chart',
377
- gaugeChart: 'gauge-chart',
378
- stickyNote: 'sticky-note',
379
- clockCalendar: 'clock-calendar',
380
- analogClock: 'analog-clock',
381
- weather: 'weather',
382
- minimalWeather: 'minimal-weather',
383
- advancedWeather: 'advanced-weather',
384
261
  metaData: 'meta-data-editor',
385
262
  templateEditor: 'template-box-editor',
263
+ templateContentEditor: 'template-content-editor',
386
264
  panel: 'panel',
387
265
  notification: 'notification',
388
- taskBoard: 'task-board',
389
266
  comment: 'comment',
390
267
  dataList: 'data-list',
391
268
  listToolbar: 'list-toolbar',
392
269
  entityList: 'entity-list',
393
270
  editorJs: 'editor-js-editor',
394
271
  documentUploader: 'document-uploader',
395
- signatureList: 'signature-list',
396
272
  stepWizard: 'step-wizard',
397
273
  progressBar: 'progress-bar-editor',
398
- rate: 'rate-picker-editor'
274
+ rate: 'rate-picker-editor',
275
+ documentFileTypeFilter: 'document-file-type-filter',
276
+ entityDefinitionProvider: 'entity-definition-provider-editor',
399
277
  };
400
278
 
401
279
  function cloneProperty(property, values) {
@@ -450,7 +328,10 @@ function createBooleanProperty(ctor) {
450
328
  type: AXPWidgetsCatalog.toggle,
451
329
  },
452
330
  },
453
- visible: ctor.visible ?? true,
331
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
332
+ binding: {
333
+ enabled: true,
334
+ },
454
335
  };
455
336
  }
456
337
  function createSelectProperty(ctor) {
@@ -474,7 +355,7 @@ function createSelectProperty(ctor) {
474
355
  },
475
356
  },
476
357
  },
477
- visible: ctor.visible ?? true,
358
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
478
359
  };
479
360
  }
480
361
  const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
@@ -486,22 +367,22 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
486
367
  this.token = inject(AXP_WIDGET_TOKEN);
487
368
  this.host = inject(ElementRef).nativeElement;
488
369
  this.layoutService = inject(AXPWidgetCoreService);
489
- this.contextService = inject(AXPWidgetCoreContextStore);
370
+ this.contextService = inject(AXPContextStore);
490
371
  this.config = this.token.config;
491
372
  this.node = this.token.node;
492
373
  this.name = this.token.node.name;
493
374
  this.component = this;
494
- this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
375
+ this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
495
376
  this.options = this._options.asReadonly();
496
377
  this.onOptionsChanged = new Subject();
497
- this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : []));
378
+ this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
498
379
  this.status = this._status.asReadonly();
499
380
  this.onStatusChanged = new BehaviorSubject(this._status());
500
381
  this.#statusEffect = effect(() => {
501
382
  this.onStatusChanged.next(this.status());
502
- }, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : []));
503
- this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
504
- this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : []));
383
+ }, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
384
+ this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
385
+ this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : /* istanbul ignore next */ []));
505
386
  this.children = this._children.asReadonly();
506
387
  }
507
388
  get id() {
@@ -530,7 +411,7 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
530
411
  output(name) {
531
412
  const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
532
413
  if (outputs.some((c) => c.name == name)) {
533
- const opt = get(this, name);
414
+ const opt = outputs.find((c) => c.name == name)?.value;
534
415
  if (typeof opt == 'function') {
535
416
  return opt();
536
417
  }
@@ -548,10 +429,10 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
548
429
  this._children.set([...children]);
549
430
  }
550
431
  onAdded() { }
551
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
552
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBaseWidgetComponent }); }
432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
433
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent }); }
553
434
  }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
555
436
  type: Injectable
556
437
  }] });
557
438
  class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
@@ -562,10 +443,10 @@ class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
562
443
  }
563
444
  super.ngOnInit();
564
445
  }
565
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
566
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
446
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
447
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
567
448
  }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
569
450
  type: Injectable
570
451
  }] });
571
452
  class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
@@ -576,11 +457,11 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
576
457
  this._isValueWidget = false;
577
458
  this.isValueWidget = () => this._isValueWidget;
578
459
  this.onValueChanged = new Subject();
579
- this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : []));
580
- this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : []));
460
+ this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : /* istanbul ignore next */ []));
461
+ this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : /* istanbul ignore next */ []));
581
462
  this.getValue = computed(() => {
582
463
  return this.fullPath() ? this.extractValue(this.fullPath()) : null;
583
- }, ...(ngDevMode ? [{ debugName: "getValue", equal: isEqual }] : [{ equal: isEqual }]));
464
+ }, { ...(ngDevMode ? { debugName: "getValue" } : /* istanbul ignore next */ {}), equal: isEqual });
584
465
  this.validationRules = computed(() => {
585
466
  const validationsRaw = this.options()['validations'];
586
467
  if (validationsRaw == null) {
@@ -593,7 +474,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
593
474
  message: c.message,
594
475
  options: c.options,
595
476
  }));
596
- }, ...(ngDevMode ? [{ debugName: "validationRules" }] : []));
477
+ }, ...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
597
478
  }
598
479
  ngOnInit() {
599
480
  this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
@@ -623,7 +504,12 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
623
504
  if (isNil(value) && isNil(oldValue)) {
624
505
  return;
625
506
  }
626
- if (isEqual(oldValue, value)) {
507
+ // Reordered arrays must persist even when items are deep-equal (e.g. empty row objects).
508
+ const isArrayReorder = Array.isArray(oldValue) &&
509
+ Array.isArray(value) &&
510
+ oldValue.length === value.length &&
511
+ oldValue.some((v, i) => v !== value[i]);
512
+ if (!isArrayReorder && isEqual(oldValue, value)) {
627
513
  return;
628
514
  }
629
515
  if (this.fullPath()) {
@@ -670,23 +556,23 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
670
556
  this.setValue(e.value);
671
557
  }
672
558
  }
673
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
674
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPValueWidgetComponent }); }
559
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
560
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent }); }
675
561
  }
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
677
563
  type: Injectable
678
564
  }] });
679
565
  class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
680
566
  constructor() {
681
567
  super(...arguments);
682
568
  this.dataService = inject(AXPDataSourceDefinitionProviderService);
683
- this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
684
- this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
569
+ this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
570
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
685
571
  this.textTemplate = computed(() => isNil(this.options()['textTemplate'])
686
572
  ? undefined
687
- : this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : []));
688
- this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
689
- this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
573
+ : this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : /* istanbul ignore next */ []));
574
+ this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
575
+ this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
690
576
  //#region ---- DataSource Loading Effect ----
691
577
  /**
692
578
  * Track the last loaded string dataSource reference to prevent infinite loops
@@ -766,7 +652,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
766
652
  this.dataSource.set(convertArrayToDataSource([]));
767
653
  }
768
654
  });
769
- }, ...(ngDevMode ? [{ debugName: "rf" }] : []));
655
+ }, ...(ngDevMode ? [{ debugName: "rf" }] : /* istanbul ignore next */ []));
770
656
  this.effect2 = effect(async () => {
771
657
  const value = this.getValue();
772
658
  const items = [];
@@ -777,7 +663,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
777
663
  items.push(await this.extractItem(value));
778
664
  }
779
665
  this.selectedItems.set(items.filter((c) => c != null));
780
- }, ...(ngDevMode ? [{ debugName: "effect2" }] : []));
666
+ }, ...(ngDevMode ? [{ debugName: "effect2" }] : /* istanbul ignore next */ []));
781
667
  }
782
668
  //#endregion
783
669
  async extractItem(item) {
@@ -802,10 +688,10 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
802
688
  [this.textField()]: item,
803
689
  };
804
690
  }
805
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
806
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataListWidgetComponent }); }
691
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
692
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent }); }
807
693
  }
808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
809
695
  type: Injectable
810
696
  }] });
811
697
  class AXPColumnWidgetComponent {
@@ -813,20 +699,22 @@ class AXPColumnWidgetComponent {
813
699
  this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
814
700
  this.path = this.token.path;
815
701
  this.options = this.token.options ?? {};
702
+ /** Column header caption when rendered inside `axp-widget-column-renderer`. */
703
+ this.columnCaption = this.token.caption;
816
704
  this.rawValue = null;
817
705
  this.nullText = this.options['nullText'];
818
706
  this.nullValue = this.options['nullValue'];
819
- this.value = computed(() => {
707
+ this.value = () => {
820
708
  if (isNil(this.rawValue) && !isNil(this.nullValue)) {
821
709
  return this.nullValue;
822
710
  }
823
711
  return this.rawValue;
824
- }, ...(ngDevMode ? [{ debugName: "value" }] : []));
712
+ };
825
713
  }
826
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
827
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColumnWidgetComponent }); }
714
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
715
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent }); }
828
716
  }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
830
718
  type: Injectable
831
719
  }] });
832
720
 
@@ -855,7 +743,7 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
855
743
  style['overflow-y'] = overflowY ?? '';
856
744
  style['direction'] = direction ?? '';
857
745
  return style;
858
- }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : []));
746
+ }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : /* istanbul ignore next */ []));
859
747
  this.blockStyle = computed(() => {
860
748
  const options = this.options();
861
749
  const style = { ...this.hostBoxStyle() };
@@ -872,47 +760,47 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
872
760
  style['height'] = height ?? '';
873
761
  style['max-height'] = maxHeight ?? '';
874
762
  return style;
875
- }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : []));
763
+ }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : /* istanbul ignore next */ []));
876
764
  this.inlineStyle = computed(() => {
877
765
  return { ...this.hostBoxStyle() };
878
- }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : []));
766
+ }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : /* istanbul ignore next */ []));
879
767
  this.blockClass = computed(() => {
880
768
  return {
881
769
  'ax-block': true,
882
770
  'ax-w-full': true,
883
771
  // 'ax-widget-outline': true,
884
772
  };
885
- }, ...(ngDevMode ? [{ debugName: "blockClass" }] : []));
773
+ }, ...(ngDevMode ? [{ debugName: "blockClass" }] : /* istanbul ignore next */ []));
886
774
  this.inlineClass = computed(() => {
887
775
  return {
888
776
  'ax-inline-block': true,
889
777
  };
890
- }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : []));
778
+ }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : /* istanbul ignore next */ []));
891
779
  }
892
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
893
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
780
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
781
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
894
782
  }
895
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
783
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
896
784
  type: Injectable
897
785
  }] });
898
786
 
899
787
  class AXPBlockBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
900
788
  constructor() {
901
789
  super(...arguments);
902
- this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
903
- this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
790
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
791
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
904
792
  }
905
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
906
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
793
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
794
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
907
795
  }
908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
909
797
  type: Injectable
910
798
  }] });
911
799
 
912
800
  class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
913
801
  constructor() {
914
802
  super(...arguments);
915
- this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : []));
803
+ this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : /* istanbul ignore next */ []));
916
804
  this.hostFlexStyle = computed(() => {
917
805
  const blockStyle = this.blockStyle();
918
806
  const style = { ...blockStyle };
@@ -951,45 +839,45 @@ class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
951
839
  style['gap'] = flex.gap;
952
840
  }
953
841
  return style;
954
- }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : []));
842
+ }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : /* istanbul ignore next */ []));
955
843
  this.hostFlexClass = computed(() => {
956
844
  return {
957
845
  ...this.blockClass(),
958
846
  'ax-flex': true,
959
847
  'ax-h-full': true,
960
848
  };
961
- }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : []));
849
+ }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : /* istanbul ignore next */ []));
962
850
  this.hostClass = computed(() => {
963
851
  return this.hostFlexClass();
964
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
852
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
965
853
  this.hostStyle = computed(() => {
966
854
  return this.hostFlexStyle();
967
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
855
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
968
856
  }
969
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
970
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
857
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
858
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
971
859
  }
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
973
861
  type: Injectable
974
862
  }] });
975
863
 
976
864
  class AXPInlineBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
977
865
  constructor() {
978
866
  super(...arguments);
979
- this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
980
- this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
867
+ this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
868
+ this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
981
869
  }
982
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
983
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
870
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
871
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
984
872
  }
985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
986
874
  type: Injectable
987
875
  }] });
988
876
 
989
877
  class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComponent {
990
878
  constructor() {
991
879
  super(...arguments);
992
- this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : []));
880
+ this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : /* istanbul ignore next */ []));
993
881
  this.hostFlexItemStyle = computed(() => {
994
882
  const inlineStyle = this.blockStyle();
995
883
  const style = { ...inlineStyle };
@@ -1025,37 +913,37 @@ class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComp
1025
913
  style['align-self'] = fi.alignSelf;
1026
914
  }
1027
915
  return style;
1028
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : []));
916
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : /* istanbul ignore next */ []));
1029
917
  this.hostFlexItemClass = computed(() => {
1030
918
  return {
1031
919
  ...this.blockClass(),
1032
920
  };
1033
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : []));
921
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : /* istanbul ignore next */ []));
1034
922
  this.hostClass = computed(() => {
1035
923
  return this.hostFlexItemClass();
1036
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
924
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1037
925
  this.hostStyle = computed(() => {
1038
926
  return this.hostFlexItemStyle();
1039
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
927
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1040
928
  }
1041
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1042
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
929
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
930
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
1043
931
  }
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
932
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
1045
933
  type: Injectable
1046
934
  }] });
1047
935
 
1048
936
  class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
1049
937
  constructor() {
1050
938
  super(...arguments);
1051
- this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : []));
939
+ this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
1052
940
  this.hostGridStyle = computed(() => {
1053
941
  const style = { ...this.inlineStyle() };
1054
942
  const g = this.grid()?.default;
1055
943
  if (g?.gap)
1056
944
  style['gap'] = g.gap;
1057
945
  return style;
1058
- }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : []));
946
+ }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : /* istanbul ignore next */ []));
1059
947
  this.hostGridClass = computed(() => {
1060
948
  const cls = {
1061
949
  ...this.inlineClass(),
@@ -1064,8 +952,7 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1064
952
  const g = this.grid()?.default;
1065
953
  if (g?.columns)
1066
954
  cls[`lg:ax-grid-cols-${g.columns}`] = true;
1067
- if (g?.rows)
1068
- cls[`lg:ax-grid-rows-${g.rows}`] = true;
955
+ // if (g?.rows) cls[`lg:ax-grid-rows-${g.rows}`] = true;
1069
956
  if (g?.justifyItems)
1070
957
  cls[`lg:ax-justify-items-${g.justifyItems}`] = true;
1071
958
  if (g?.alignItems)
@@ -1073,21 +960,21 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1073
960
  if (g?.autoFlow)
1074
961
  cls[`lg:ax-grid-flow-${g.autoFlow}`] = true;
1075
962
  return cls;
1076
- }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : []));
1077
- this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1078
- this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
963
+ }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : /* istanbul ignore next */ []));
964
+ this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
965
+ this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1079
966
  }
1080
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1081
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
967
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
968
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
1082
969
  }
1083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
1084
971
  type: Injectable
1085
972
  }] });
1086
973
 
1087
974
  class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetComponent {
1088
975
  constructor() {
1089
976
  super(...arguments);
1090
- this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : []));
977
+ this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : /* istanbul ignore next */ []));
1091
978
  this.hostGridItemStyle = computed(() => {
1092
979
  const style = { ...this.hostFlexStyle() };
1093
980
  const g = this.gridItem();
@@ -1096,10 +983,13 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1096
983
  if (g?.justifySelf)
1097
984
  style['justify-self'] = g.justifySelf;
1098
985
  return style;
1099
- }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : []));
986
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : /* istanbul ignore next */ []));
1100
987
  this.hostGridItemClass = computed(() => {
1101
988
  const cls = { ...this.hostFlexClass() };
1102
989
  const g = this.gridItem();
990
+ // Mobile-first: full width on small screens so items stack vertically and don't overflow
991
+ cls['ax-col-span-12'] = true;
992
+ // Large screens: apply defined placement so multi-column layout works on desktop
1103
993
  if (g?.colSpan)
1104
994
  cls[`lg:ax-col-span-${g.colSpan}`] = true;
1105
995
  if (g?.colStart)
@@ -1113,14 +1003,14 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1113
1003
  if (g?.rowEnd)
1114
1004
  cls[`lg:ax-row-end-${g.rowEnd}`] = true;
1115
1005
  return cls;
1116
- }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : []));
1117
- this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1118
- this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1006
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : /* istanbul ignore next */ []));
1007
+ this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1008
+ this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1119
1009
  }
1120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1121
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
1010
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1011
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
1122
1012
  }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1124
1014
  type: Injectable
1125
1015
  }] });
1126
1016
 
@@ -1129,27 +1019,27 @@ class AXPTableBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponen
1129
1019
  super(...arguments);
1130
1020
  this.hostTableClass = computed(() => ({
1131
1021
  ...this.blockClass(),
1132
- }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : []));
1022
+ }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : /* istanbul ignore next */ []));
1133
1023
  this.hostTableStyle = computed(() => {
1134
1024
  const style = { ...this.blockStyle() };
1135
1025
  style['overflow-x'] = 'auto';
1136
1026
  return style;
1137
- }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : []));
1138
- this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1139
- this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1027
+ }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : /* istanbul ignore next */ []));
1028
+ this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1029
+ this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1140
1030
  }
1141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1142
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
1031
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1032
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
1143
1033
  }
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1145
1035
  type: Injectable
1146
1036
  }] });
1147
1037
 
1148
1038
  class AXPTableItemOpsBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
1149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1150
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
1039
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1040
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
1151
1041
  }
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1153
1043
  type: Injectable
1154
1044
  }] });
1155
1045
 
@@ -1159,57 +1049,105 @@ class AXPTableItemBaseLayoutWidgetComponent extends AXPTableItemOpsBaseLayoutWid
1159
1049
  this.colSpan = computed(() => {
1160
1050
  const v = this.options()?.colSpan;
1161
1051
  return v ? Math.max(1, v) : 1;
1162
- }, ...(ngDevMode ? [{ debugName: "colSpan" }] : []));
1052
+ }, ...(ngDevMode ? [{ debugName: "colSpan" }] : /* istanbul ignore next */ []));
1163
1053
  this.rowSpan = computed(() => {
1164
1054
  const v = this.options()?.rowSpan;
1165
1055
  return v ? Math.max(1, v) : 1;
1166
- }, ...(ngDevMode ? [{ debugName: "rowSpan" }] : []));
1167
- this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1168
- this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1056
+ }, ...(ngDevMode ? [{ debugName: "rowSpan" }] : /* istanbul ignore next */ []));
1057
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1058
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1169
1059
  }
1170
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1171
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
1060
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1061
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
1172
1062
  }
1173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1174
1064
  type: Injectable
1175
1065
  }] });
1176
1066
 
1067
+ //#region ---- Imports ----
1068
+ /**
1069
+ * Injection token for widget definition providers.
1070
+ * Modules register their widget providers using this token (multi: true).
1071
+ */
1072
+ const AXP_WIDGET_DEFINITION_PROVIDER = new InjectionToken('AXP_WIDGET_DEFINITION_PROVIDER', {
1073
+ factory: () => [],
1074
+ });
1075
+ //#endregion
1076
+
1077
+ //#region ---- Build widget map (shared with tooling / snapshot scripts) ----
1078
+ //TODO RECHECK THIS FUNCTION s.hosseini
1079
+ /**
1080
+ * Merges core + extended widgets the same way as AXPWidgetRegistryService.ensureBuilt().
1081
+ * Use with concrete providers (e.g. AXPCoreWidgetsProvider, AXPEntityWidgetsProvider) in Node scripts without DI.
1082
+ */
1083
+ function buildWidgetRegistryMapFromProviders(providers) {
1084
+ const types = new Map();
1085
+ const AXPExtendedWidgets = [];
1086
+ for (const provider of providers) {
1087
+ const widgets = provider.getWidgets?.() ?? [];
1088
+ for (const w of widgets) {
1089
+ types.set(w.name, w);
1090
+ }
1091
+ const extended = provider.getExtendedWidgets?.() ?? [];
1092
+ AXPExtendedWidgets.push(...extended);
1093
+ }
1094
+ for (const { parentName, widget } of AXPExtendedWidgets) {
1095
+ const parent = types.get(parentName);
1096
+ if (parent) {
1097
+ const merged = merge({}, parent, widget);
1098
+ merged.name = widget.name;
1099
+ types.set(merged.name, merged);
1100
+ }
1101
+ }
1102
+ return types;
1103
+ }
1104
+ //#endregion
1105
+ //#region ---- Widget Registry Service (Token-Based) ----
1106
+ /**
1107
+ * Aggregates widgets from all AXP_WIDGET_DEFINITION_PROVIDER instances.
1108
+ * Token-based like AXP_MENU_PROVIDER / AXP_PERMISSION_DEFINITION_PROVIDER / AXP_SETTING_DEFINITION_PROVIDER.
1109
+ * No separate registry - widgets come solely from providers.
1110
+ */
1177
1111
  class AXPWidgetRegistryService {
1178
- /**
1179
- *
1180
- */
1181
1112
  constructor() {
1182
- this.types = new Map();
1183
- AXPWidgetRegistryService.instance = this;
1184
- }
1185
- register(widget) {
1186
- this.types.set(widget.name, widget);
1113
+ this._providers = inject(AXP_WIDGET_DEFINITION_PROVIDER, { optional: true }) ?? [];
1114
+ this._types = null;
1187
1115
  }
1188
- extend(parentName, widget) {
1189
- const parentWidget = this.resolve(parentName);
1190
- const newWidget = merge({}, parentWidget, widget);
1191
- newWidget.name = widget.name;
1192
- this.register(newWidget);
1116
+ /**
1117
+ * Lazy-build widget map from all providers.
1118
+ */
1119
+ ensureBuilt() {
1120
+ if (this._types)
1121
+ return this._types;
1122
+ this._types = buildWidgetRegistryMapFromProviders(this._providers);
1123
+ return this._types;
1193
1124
  }
1194
1125
  resolve(name) {
1195
- const widget = this.types.get(name);
1126
+ const widget = this.ensureBuilt().get(name);
1196
1127
  if (!widget) {
1197
1128
  throw new Error(`Widget with name "${name}" does not exist.`);
1198
1129
  }
1199
1130
  return widget;
1200
1131
  }
1132
+ /**
1133
+ * Registered widget config when present; otherwise `undefined`. Does not throw — use when
1134
+ * {@link resolve}'s value may be a non-widget id (e.g. data-source row id in dynamic field configurator).
1135
+ */
1136
+ getOptional(name) {
1137
+ return this.ensureBuilt().get(name);
1138
+ }
1201
1139
  all() {
1202
- return Array.from(this.types.values());
1140
+ return Array.from(this.ensureBuilt().values());
1203
1141
  }
1204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1205
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
1142
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1143
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
1206
1144
  }
1207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1208
1146
  type: Injectable,
1209
1147
  args: [{
1210
1148
  providedIn: 'root',
1211
1149
  }]
1212
- }], ctorParameters: () => [] });
1150
+ }] });
1213
1151
 
1214
1152
  class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1215
1153
  constructor() {
@@ -1217,8 +1155,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1217
1155
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1218
1156
  this.grid = inject(AXBaseDataTable);
1219
1157
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1220
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1221
- this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : []));
1158
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1159
+ this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : /* istanbul ignore next */ []));
1222
1160
  this.rowInjectorsCache = new Map();
1223
1161
  this.hasExpressions = false;
1224
1162
  this.pendingEvaluations = new Set();
@@ -1239,6 +1177,19 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1239
1177
  get renderCellTemplate() {
1240
1178
  return this.cellTemplate ?? this._contentCellTemplate;
1241
1179
  }
1180
+ /**
1181
+ * True when the row should show the expand icon: either hasChild is true (from server/initial load)
1182
+ * or the row has loaded children (e.g. after refreshItemChildren when children go from 0 to 1).
1183
+ */
1184
+ hasExpandableRow(row) {
1185
+ const data = row?.data;
1186
+ if (!data)
1187
+ return false;
1188
+ if (data['hasChild'] === true)
1189
+ return true;
1190
+ const children = data['__meta__']?.['children'];
1191
+ return Array.isArray(children) && children.length > 0;
1192
+ }
1242
1193
  async handleExpandRow(row) {
1243
1194
  this.loadingRow.set(row);
1244
1195
  await this.grid.expandRow(row);
@@ -1250,6 +1201,56 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1250
1201
  get renderHeaderTemplate() {
1251
1202
  return this.headerTemplate ?? this._contentHeaderTemplate;
1252
1203
  }
1204
+ //#region ---- Column alignment (header / cell) ----
1205
+ /**
1206
+ * Resolves `options.align`: string applies to header and cell; object uses optional `header` / `cell` (default start).
1207
+ * Supports designer select values `{ id: 'center' }`.
1208
+ */
1209
+ getHeaderTextAlign() {
1210
+ return this.resolveAlignForSide('header');
1211
+ }
1212
+ /**
1213
+ * When true, the cell body uses flex so `justify-content` can place content on the main axis.
1214
+ */
1215
+ getCellUseFlexLayout() {
1216
+ return !!this.expandHandler || this.resolveAlignForSide('cell') !== 'start';
1217
+ }
1218
+ /**
1219
+ * Flex `justify-content` for the cell wrapper; omit when not using flex layout.
1220
+ */
1221
+ getCellJustifyContent() {
1222
+ if (!this.getCellUseFlexLayout()) {
1223
+ return null;
1224
+ }
1225
+ return this.resolveAlignForSide('cell');
1226
+ }
1227
+ resolveAlignForSide(side) {
1228
+ const align = this.mergedOptions().align;
1229
+ if (align == null || align === '') {
1230
+ return 'start';
1231
+ }
1232
+ if (typeof align === 'string') {
1233
+ return this.normalizeColumnAlignment(align);
1234
+ }
1235
+ if (typeof align === 'object' && !Array.isArray(align)) {
1236
+ const raw = side === 'header' ? align.header : align.cell;
1237
+ return this.normalizeColumnAlignment(raw);
1238
+ }
1239
+ return 'start';
1240
+ }
1241
+ normalizeColumnAlignment(value) {
1242
+ if (value === 'center' || value === 'end' || value === 'start') {
1243
+ return value;
1244
+ }
1245
+ if (value && typeof value === 'object' && 'id' in value) {
1246
+ const id = value.id;
1247
+ if (id === 'center' || id === 'end' || id === 'start') {
1248
+ return id;
1249
+ }
1250
+ }
1251
+ return 'start';
1252
+ }
1253
+ //#endregion
1253
1254
  get loadingEnabled() {
1254
1255
  return true;
1255
1256
  }
@@ -1274,6 +1275,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1274
1275
  const tokenValue = {
1275
1276
  path: this.node.path,
1276
1277
  options: this.mergedOptions(),
1278
+ caption: this.caption,
1277
1279
  };
1278
1280
  this.widgetInjector = Injector.create({
1279
1281
  parent: this.injector,
@@ -1372,6 +1374,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1372
1374
  const tokenValue = {
1373
1375
  path: this.node.path,
1374
1376
  options: this.mergedOptions(),
1377
+ caption: this.caption,
1375
1378
  };
1376
1379
  rowInjector = Injector.create({
1377
1380
  parent: this.injector,
@@ -1404,6 +1407,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1404
1407
  const tokenValue = {
1405
1408
  path: this.node.path,
1406
1409
  options: evaluatedOptions,
1410
+ caption: this.caption,
1407
1411
  };
1408
1412
  const newInjector = Injector.create({
1409
1413
  parent: this.injector,
@@ -1430,6 +1434,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1430
1434
  const tokenValue = {
1431
1435
  path: this.node.path,
1432
1436
  options: this.mergedOptions(),
1437
+ caption: this.caption,
1433
1438
  };
1434
1439
  rowInjector = Injector.create({
1435
1440
  parent: this.injector,
@@ -1446,19 +1451,27 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1446
1451
  }
1447
1452
  return rowInjector;
1448
1453
  }
1449
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1450
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPWidgetColumnRendererComponent, isStandalone: false, selector: "axp-widget-column-renderer", inputs: { caption: "caption", customExpandIcon: "customExpandIcon", customCollapseIcon: "customCollapseIcon", customWidth: "customWidth", node: "node", footerTemplate: "footerTemplate", expandHandler: "expandHandler", cellTemplate: "cellTemplate", headerTemplate: "headerTemplate" }, providers: [
1454
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1455
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPWidgetColumnRendererComponent, isStandalone: false, selector: "axp-widget-column-renderer", inputs: { caption: "caption", customExpandIcon: "customExpandIcon", customCollapseIcon: "customCollapseIcon", customWidth: "customWidth", node: "node", footerTemplate: "footerTemplate", expandHandler: "expandHandler", cellTemplate: "cellTemplate", headerTemplate: "headerTemplate" }, providers: [
1451
1456
  AXPWidgetCoreService,
1452
1457
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1453
1458
  ], viewQueries: [{ propertyName: "_contentFooterTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "_contentCellTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "_contentHeaderTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1454
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1459
+ <ng-template #header>
1460
+ <div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1461
+ </ng-template>
1455
1462
  <ng-template #cell let-row>
1456
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1463
+ <div
1464
+ class="ax-w-full"
1465
+ [class.ax-flex]="getCellUseFlexLayout()"
1466
+ [class.ax-gap-2]="expandHandler"
1467
+ [class.ax-items-center]="getCellUseFlexLayout()"
1468
+ [style.justify-content]="getCellJustifyContent()"
1469
+ >
1457
1470
  @if (expandHandler) {
1458
1471
  <div
1459
1472
  (click)="handleExpandRow(row)"
1460
1473
  class="ax-expand-handler"
1461
- [class.ax-invisible]="row.data.hasChild === false"
1474
+ [class.ax-invisible]="!hasExpandableRow(row)"
1462
1475
  id="ax-expand-handler-container"
1463
1476
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1464
1477
  >
@@ -1481,21 +1494,29 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1481
1494
  </div>
1482
1495
  </ng-template>
1483
1496
  <ng-template #footer></ng-template>
1484
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1497
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1485
1498
  }
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1487
1500
  type: Component,
1488
1501
  args: [{
1489
1502
  selector: 'axp-widget-column-renderer',
1490
1503
  template: `
1491
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1504
+ <ng-template #header>
1505
+ <div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1506
+ </ng-template>
1492
1507
  <ng-template #cell let-row>
1493
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1508
+ <div
1509
+ class="ax-w-full"
1510
+ [class.ax-flex]="getCellUseFlexLayout()"
1511
+ [class.ax-gap-2]="expandHandler"
1512
+ [class.ax-items-center]="getCellUseFlexLayout()"
1513
+ [style.justify-content]="getCellJustifyContent()"
1514
+ >
1494
1515
  @if (expandHandler) {
1495
1516
  <div
1496
1517
  (click)="handleExpandRow(row)"
1497
1518
  class="ax-expand-handler"
1498
- [class.ax-invisible]="row.data.hasChild === false"
1519
+ [class.ax-invisible]="!hasExpandableRow(row)"
1499
1520
  id="ax-expand-handler-container"
1500
1521
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1501
1522
  >
@@ -1563,15 +1584,15 @@ class AXPWidgetContainerComponent {
1563
1584
  this.builderService.setFunctions(v);
1564
1585
  }
1565
1586
  constructor() {
1566
- this.contextService = inject(AXPWidgetCoreContextStore);
1587
+ this.contextService = inject(AXPContextStore);
1567
1588
  this.builderService = inject(AXPWidgetCoreService);
1568
1589
  this.onContextChanged = new EventEmitter();
1569
1590
  this.status = computed(() => {
1570
1591
  return this.builderService.status();
1571
- }, ...(ngDevMode ? [{ debugName: "status" }] : []));
1592
+ }, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
1572
1593
  this.isBusy = computed(() => {
1573
1594
  return this.builderService.isBusy();
1574
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
1595
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
1575
1596
  effect(() => {
1576
1597
  if (this.contextService.isChanged()) {
1577
1598
  this.onContextChanged.emit(this.contextService.changeEvent());
@@ -1584,17 +1605,17 @@ class AXPWidgetContainerComponent {
1584
1605
  find(name) {
1585
1606
  return this.builderService.waitForWidget(name);
1586
1607
  }
1587
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1588
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPWidgetContainerComponent, isStandalone: false, selector: "axp-widgets-container", inputs: { context: "context", functions: "functions" }, outputs: { onContextChanged: "onContextChanged" }, host: { styleAttribute: "display: contents;" }, providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1609
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPWidgetContainerComponent, isStandalone: false, selector: "axp-widgets-container", inputs: { context: "context", functions: "functions" }, outputs: { onContextChanged: "onContextChanged" }, host: { styleAttribute: "display: contents;" }, providers: [AXPWidgetCoreService, AXPContextStore], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1589
1610
  }
1590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1611
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1591
1612
  type: Component,
1592
1613
  args: [{
1593
1614
  selector: 'axp-widgets-container',
1594
1615
  template: `<ng-content></ng-content>`,
1595
1616
  changeDetection: ChangeDetectionStrategy.OnPush,
1596
1617
  host: { style: 'display: contents;' },
1597
- providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore],
1618
+ providers: [AXPWidgetCoreService, AXPContextStore],
1598
1619
  standalone: false,
1599
1620
  }]
1600
1621
  }], ctorParameters: () => [], propDecorators: { onContextChanged: [{
@@ -1606,12 +1627,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1606
1627
  }] } });
1607
1628
 
1608
1629
  class AXPWidgetPlaceholderComponent {
1609
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1610
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPWidgetPlaceholderComponent, isStandalone: true, selector: "axp-widget-placeholder", ngImport: i0, template: `<div>
1630
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1631
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPWidgetPlaceholderComponent, isStandalone: true, selector: "axp-widget-placeholder", ngImport: i0, template: `<div>
1611
1632
  <ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
1612
1633
  </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1613
1634
  }
1614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1615
1636
  type: Component,
1616
1637
  args: [{
1617
1638
  selector: 'axp-widget-placeholder',
@@ -1628,11 +1649,11 @@ class AXPWidgetRendererDirective {
1628
1649
  //#endregion
1629
1650
  //#endregion
1630
1651
  constructor() {
1631
- this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : []));
1632
- this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : []));
1633
- this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : []));
1634
- this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
1635
- this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
1652
+ this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : /* istanbul ignore next */ []));
1653
+ this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
1654
+ this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
1655
+ this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
1656
+ this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
1636
1657
  this.options = this._options.asReadonly();
1637
1658
  this.onOptionsChanged = output();
1638
1659
  this.onValueChanged = output();
@@ -1641,22 +1662,22 @@ class AXPWidgetRendererDirective {
1641
1662
  /**
1642
1663
  * Signal that emits the component reference when it's ready
1643
1664
  */
1644
- this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : []));
1665
+ this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : /* istanbul ignore next */ []));
1645
1666
  this.componentRefSignal = this._componentRefSignal.asReadonly();
1646
1667
  //#endregion
1647
1668
  //#region ---- Properties ----
1648
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1669
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1649
1670
  this.injector = inject(Injector);
1650
1671
  this.builderService = inject(AXPWidgetCoreService);
1651
- this.contextService = inject(AXPWidgetCoreContextStore);
1672
+ this.contextService = inject(AXPContextStore);
1652
1673
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1653
1674
  this.unsubscriber = inject(AXUnsubscriber);
1654
1675
  this.translateService = inject(AXTranslationService);
1655
1676
  this.widgetService = inject(AXPWidgetRegistryService);
1656
1677
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1657
1678
  this.viewContainerRef = inject(ViewContainerRef);
1658
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
1659
- this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
1679
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
1680
+ this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
1660
1681
  this.expressionEvaluators = new Map();
1661
1682
  this.renderTimeoutId = null;
1662
1683
  this.hasInitialRender = false;
@@ -1703,12 +1724,12 @@ class AXPWidgetRendererDirective {
1703
1724
  await this.updateOptionsBasedOnContext();
1704
1725
  this.applyOptions();
1705
1726
  }
1706
- await this.updateVisibility();
1707
1727
  }
1708
1728
  else if (changed.path && this.isRelevantContextChange(changed.path)) {
1709
1729
  // console.log(`🎯 [${this.node().type}] Context change detected: ${changed.path}`);
1710
1730
  this.queueContextUpdate(changed.path);
1711
1731
  }
1732
+ await this.updateVisibility();
1712
1733
  });
1713
1734
  this.builderService.onRefresh.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
1714
1735
  await this.processBatchedUpdates();
@@ -1834,77 +1855,88 @@ class AXPWidgetRendererDirective {
1834
1855
  }
1835
1856
  return false;
1836
1857
  }
1858
+ /**
1859
+ * True when a context store path used in an expression (`context.eval`, `context.options`) is
1860
+ * affected by `changedPath`.
1861
+ */
1862
+ contextStorePathDependsOnChangedPath(evalPath, changedPath) {
1863
+ const normalizePath = (p) => {
1864
+ if (!p)
1865
+ return p;
1866
+ const parts = p.split('.');
1867
+ const last = parts[parts.length - 1];
1868
+ if (last && last.endsWith('Id')) {
1869
+ parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1870
+ }
1871
+ return parts.join('.');
1872
+ };
1873
+ const isSegmentSuffix = (a, b) => {
1874
+ if (!a || !b)
1875
+ return false;
1876
+ const pa = a.split('.');
1877
+ const pb = b.split('.');
1878
+ if (pb.length > pa.length)
1879
+ return false;
1880
+ for (let i = 1; i <= pb.length; i++) {
1881
+ if (pa[pa.length - i] !== pb[pb.length - i])
1882
+ return false;
1883
+ }
1884
+ return true;
1885
+ };
1886
+ const evalNorm = normalizePath(evalPath);
1887
+ const changedNorm = normalizePath(changedPath);
1888
+ const rawMatch = evalPath === changedPath ||
1889
+ evalPath.startsWith(changedPath + '.') ||
1890
+ changedPath.startsWith(evalPath + '.') ||
1891
+ isSegmentSuffix(evalPath, changedPath) ||
1892
+ isSegmentSuffix(changedPath, evalPath);
1893
+ const normMatch = evalNorm === changedNorm ||
1894
+ evalNorm.startsWith(changedNorm + '.') ||
1895
+ changedNorm.startsWith(evalNorm + '.') ||
1896
+ isSegmentSuffix(evalNorm, changedNorm) ||
1897
+ isSegmentSuffix(changedNorm, evalNorm);
1898
+ if (rawMatch || normMatch) {
1899
+ return true;
1900
+ }
1901
+ return this.isPathAlias(evalPath, changedPath);
1902
+ }
1903
+ /**
1904
+ * Whether an expression template string reads context store paths affected by `changedPath`.
1905
+ */
1906
+ expressionTextDependsOnContextPath(expressionValue, changedPath) {
1907
+ const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1908
+ let match;
1909
+ while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
1910
+ if (this.contextStorePathDependsOnChangedPath(match[1], changedPath)) {
1911
+ return true;
1912
+ }
1913
+ }
1914
+ const contextOptionsQuoted = /context\.options\(\s*['"]([^'"]*)['"]\s*\)/g;
1915
+ while ((match = contextOptionsQuoted.exec(expressionValue)) !== null) {
1916
+ const sub = match[1];
1917
+ const evalPath = sub === '' ? 'options' : `options.${sub}`;
1918
+ if (this.contextStorePathDependsOnChangedPath(evalPath, changedPath)) {
1919
+ return true;
1920
+ }
1921
+ }
1922
+ const contextOptionsEmpty = /context\.options\(\s*\)/g;
1923
+ while ((match = contextOptionsEmpty.exec(expressionValue)) !== null) {
1924
+ if (this.contextStorePathDependsOnChangedPath('options', changedPath)) {
1925
+ return true;
1926
+ }
1927
+ }
1928
+ return false;
1929
+ }
1837
1930
  hasExpressionDependency(changedPath) {
1838
- // Check if any cached expressions depend on the changed path
1839
1931
  for (const [path, evaluator] of this.expressionEvaluators) {
1840
- // Check if the expression path itself contains the changed path
1841
1932
  if (path.includes(changedPath)) {
1842
1933
  return true;
1843
1934
  }
1844
- // Parse the actual expression content to check for context.eval() calls
1845
- // We need to get the original expression string to analyze it
1846
1935
  const node = this.node();
1847
1936
  const expressionValue = this.getExpressionValueFromNode(node, path);
1848
1937
  if (expressionValue && typeof expressionValue === 'string') {
1849
- // Look for context.eval() calls that reference the changed path
1850
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1851
- let match;
1852
- while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
1853
- const evalPath = match[1];
1854
- // Normalize Id-suffixed segments to dot-id form (e.g., 'typeId' -> 'type.id', 'person.typeId' -> 'person.type.id')
1855
- const normalizePath = (p) => {
1856
- if (!p)
1857
- return p;
1858
- const parts = p.split('.');
1859
- const last = parts[parts.length - 1];
1860
- if (last && last.endsWith('Id')) {
1861
- parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1862
- }
1863
- return parts.join('.');
1864
- };
1865
- const isSegmentSuffix = (a, b) => {
1866
- if (!a || !b)
1867
- return false;
1868
- const pa = a.split('.');
1869
- const pb = b.split('.');
1870
- if (pb.length > pa.length)
1871
- return false;
1872
- for (let i = 1; i <= pb.length; i++) {
1873
- if (pa[pa.length - i] !== pb[pb.length - i])
1874
- return false;
1875
- }
1876
- return true;
1877
- };
1878
- const evalNorm = normalizePath(evalPath);
1879
- const changedNorm = normalizePath(changedPath);
1880
- // Debug log for dependency check
1881
- // console.log(
1882
- // `🧭 [${this.node().type}] dep-check expr='${path}', changed='${changedPath}', eval='${evalPath}', evalNorm='${evalNorm}', changedNorm='${changedNorm}'`,
1883
- // );
1884
- // Generic direct and hierarchical dependency checks (raw and normalized)
1885
- const rawMatch = evalPath === changedPath ||
1886
- evalPath.startsWith(changedPath + '.') ||
1887
- changedPath.startsWith(evalPath + '.') ||
1888
- isSegmentSuffix(evalPath, changedPath) ||
1889
- isSegmentSuffix(changedPath, evalPath);
1890
- const normMatch = evalNorm === changedNorm ||
1891
- evalNorm.startsWith(changedNorm + '.') ||
1892
- changedNorm.startsWith(evalNorm + '.') ||
1893
- isSegmentSuffix(evalNorm, changedNorm) ||
1894
- isSegmentSuffix(changedNorm, evalNorm);
1895
- if (rawMatch || normMatch) {
1896
- // console.log(
1897
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (generic match)`,
1898
- // );
1899
- return true;
1900
- }
1901
- // Check for path aliases/mappings (e.g., typeId.id <-> type.id)
1902
- if (this.isPathAlias(evalPath, changedPath)) {
1903
- // console.log(
1904
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (path alias)`,
1905
- // );
1906
- return true;
1907
- }
1938
+ if (this.expressionTextDependsOnContextPath(expressionValue, changedPath)) {
1939
+ return true;
1908
1940
  }
1909
1941
  }
1910
1942
  }
@@ -1991,20 +2023,8 @@ class AXPWidgetRendererDirective {
1991
2023
  const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
1992
2024
  if (!visibility || typeof visibility !== 'string')
1993
2025
  return false;
1994
- // Check if visibility expression depends on the changed path
1995
2026
  if (this.expressionEvaluator.isExpression(visibility)) {
1996
- // Parse the visibility expression to check for context.eval() calls
1997
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1998
- let match;
1999
- while ((match = contextEvalRegex.exec(visibility)) !== null) {
2000
- const evalPath = match[1];
2001
- // Check for direct or hierarchical dependency
2002
- if (evalPath === changedPath ||
2003
- evalPath.startsWith(changedPath + '.') ||
2004
- changedPath.startsWith(evalPath + '.')) {
2005
- return true;
2006
- }
2007
- }
2027
+ return this.expressionTextDependsOnContextPath(visibility, changedPath);
2008
2028
  }
2009
2029
  return false;
2010
2030
  }
@@ -2285,8 +2305,13 @@ class AXPWidgetRendererDirective {
2285
2305
  const newValue = await evaluator();
2286
2306
  const evalTime = performance.now() - evalStartTime;
2287
2307
  // Check if result has actually changed using Lodash isEqual
2308
+ // Important: We must check if the key exists in the map, not just compare values
2309
+ // This handles the case where the expression evaluates to `undefined` for the first time
2310
+ // Without this check, `undefined` would be incorrectly treated as "no change"
2311
+ // because Map.get() returns `undefined` for non-existent keys
2312
+ const hasLastValue = this.lastExpressionResults.has(path);
2288
2313
  const lastValue = this.lastExpressionResults.get(path);
2289
- const hasChanged = !isEqual(newValue, lastValue);
2314
+ const hasChanged = !hasLastValue || !isEqual(newValue, lastValue);
2290
2315
  if (hasChanged) {
2291
2316
  // console.log(
2292
2317
  // `📝 [${this.node().type}] Expression '${path}' evaluated in ${evalTime.toFixed(2)}ms - value changed`,
@@ -2365,7 +2390,8 @@ class AXPWidgetRendererDirective {
2365
2390
  if (!this.isVisible()) {
2366
2391
  this.isVisible.set(true);
2367
2392
  if (this.componentRef && this.componentRef.location) {
2368
- this.componentRef.location.nativeElement.style.display = '';
2393
+ this.loadComponent();
2394
+ // this.componentRef.location.nativeElement.style.display = '';
2369
2395
  }
2370
2396
  }
2371
2397
  }
@@ -2373,7 +2399,8 @@ class AXPWidgetRendererDirective {
2373
2399
  if (this.isVisible()) {
2374
2400
  this.isVisible.set(false);
2375
2401
  if (this.componentRef && this.componentRef.location) {
2376
- this.componentRef.location.nativeElement.style.display = 'none';
2402
+ this.componentRef.destroy();
2403
+ // this.componentRef.location.nativeElement.style.display = 'none';
2377
2404
  }
2378
2405
  }
2379
2406
  }
@@ -2413,34 +2440,46 @@ class AXPWidgetRendererDirective {
2413
2440
  isDirty: () => {
2414
2441
  return this.contextService.isDirty();
2415
2442
  },
2443
+ /**
2444
+ * Host/widget-under-edit `options` from the shared context store (same values as
2445
+ * `context.eval('options' + (path ? '.' + path : ''))`), not `widget.options` on the nested
2446
+ * property field instance. Uses one `getValue` so smart-path behavior matches `context.eval`.
2447
+ */
2448
+ options: (path) => {
2449
+ if (path == null || path === '') {
2450
+ return this.contextService.getValue('options');
2451
+ }
2452
+ return this.contextService.getValue(`options.${path}`);
2453
+ },
2416
2454
  };
2417
2455
  }
2418
2456
  getEventScope() {
2419
2457
  return {
2420
- context: (path) => {
2458
+ context: (...paths) => {
2421
2459
  return this.onContextChanged.pipe(filter((c) => {
2422
- // If no path filter specified, pass all events
2423
- if (path == null || path === '') {
2460
+ const activePaths = paths.filter((p) => !!p && p.trim().length > 0);
2461
+ // If no path filters specified, pass all events
2462
+ if (activePaths.length === 0) {
2424
2463
  return true;
2425
2464
  }
2426
2465
  // Ensure c.path exists
2427
2466
  if (!c.path) {
2428
2467
  return false;
2429
2468
  }
2430
- // Pattern: "prefix*" - matches paths that start with prefix
2431
- if (path.endsWith('*')) {
2432
- const prefix = path.substring(0, path.length - 1);
2433
- return c.path.startsWith(prefix);
2434
- }
2435
- // Pattern: "*suffix" - matches paths that end with suffix
2436
- else if (path.startsWith('*')) {
2437
- const suffix = path.substring(1);
2438
- return c.path.endsWith(suffix);
2439
- }
2440
- // Exact match
2441
- else {
2469
+ return activePaths.some((path) => {
2470
+ // Pattern: "prefix*" - matches paths that start with prefix
2471
+ if (path.endsWith('*')) {
2472
+ const prefix = path.substring(0, path.length - 1);
2473
+ return c.path.startsWith(prefix);
2474
+ }
2475
+ // Pattern: "*suffix" - matches paths that end with suffix
2476
+ if (path.startsWith('*')) {
2477
+ const suffix = path.substring(1);
2478
+ return c.path.endsWith(suffix);
2479
+ }
2480
+ // Exact match
2442
2481
  return c.path === path;
2443
- }
2482
+ });
2444
2483
  }));
2445
2484
  },
2446
2485
  from: (event) => get(this.instance.api(), event),
@@ -2451,6 +2490,16 @@ class AXPWidgetRendererDirective {
2451
2490
  }
2452
2491
  getWidgetScope() {
2453
2492
  return {
2493
+ /** Resolved options for this renderer's widget instance (not the host / property-viewer target). */
2494
+ options: (path) => {
2495
+ const opts = this.instance && typeof this.instance.options === 'function'
2496
+ ? this.instance.options()
2497
+ : this.mergedOptions();
2498
+ if (path == null || path === '') {
2499
+ return opts;
2500
+ }
2501
+ return getSmart(opts, path);
2502
+ },
2454
2503
  call: (name, ...args) => {
2455
2504
  this.instance.call(name, ...args);
2456
2505
  },
@@ -2471,7 +2520,7 @@ class AXPWidgetRendererDirective {
2471
2520
  }
2472
2521
  },
2473
2522
  output: (name) => {
2474
- this.instance.output(name);
2523
+ return this.instance.output(name);
2475
2524
  },
2476
2525
  find: (id) => {
2477
2526
  return this.builderService.getWidget(id);
@@ -2556,14 +2605,14 @@ class AXPWidgetRendererDirective {
2556
2605
  // console.error('Error evaluating action expression:', templateExpression, error);
2557
2606
  }
2558
2607
  }
2559
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2560
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged", onLoad: "onLoad" }, providers: [
2608
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2609
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged", onLoad: "onLoad" }, providers: [
2561
2610
  {
2562
2611
  provide: AXUnsubscriber,
2563
2612
  },
2564
2613
  ], exportAs: ["widgetRenderer"], usesOnChanges: true, ngImport: i0 }); }
2565
2614
  }
2566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2567
2616
  type: Directive,
2568
2617
  args: [{
2569
2618
  selector: '[axp-widget-renderer]',
@@ -2579,63 +2628,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2579
2628
 
2580
2629
  const COMPONENTS = [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective];
2581
2630
  class AXPWidgetCoreModule {
2582
- static forRoot(config) {
2583
- return {
2584
- ngModule: AXPWidgetCoreModule,
2585
- providers: [
2586
- {
2587
- provide: 'AXPWidgetCoreModuleFactory',
2588
- useFactory: (registry) => async () => {
2589
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2590
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2591
- },
2592
- deps: [AXPWidgetRegistryService],
2593
- multi: true,
2594
- },
2595
- ],
2596
- };
2597
- }
2598
- static forChild(config) {
2599
- return {
2600
- ngModule: AXPWidgetCoreModule,
2601
- providers: [
2602
- {
2603
- provide: 'AXPWidgetCoreModuleFactory',
2604
- useFactory: (registry) => async () => {
2605
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2606
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2607
- },
2608
- deps: [AXPWidgetRegistryService],
2609
- multi: true,
2610
- },
2611
- ],
2612
- };
2613
- }
2614
- /**
2615
- * @ignore
2616
- */
2617
- constructor(instances) {
2618
- instances?.forEach((f) => {
2619
- f();
2620
- });
2621
- }
2622
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, deps: [{ token: 'AXPWidgetCoreModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
2623
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
2624
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule] }); }
2631
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2632
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
2633
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule] }); }
2625
2634
  }
2626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2627
2636
  type: NgModule,
2628
2637
  args: [{
2629
- imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule],
2638
+ imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule],
2630
2639
  exports: [...COMPONENTS],
2631
2640
  declarations: [...COMPONENTS],
2641
+ providers: [],
2632
2642
  }]
2633
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2634
- type: Optional
2635
- }, {
2636
- type: Inject,
2637
- args: ['AXPWidgetCoreModuleFactory']
2638
- }] }] });
2643
+ }] });
2644
+
2645
+ //#endregion
2646
+ //#region ---- Mapping ----
2647
+ /**
2648
+ * Converts a domain {@link AXPProperty} into a {@link AXPWidgetProperty} row for
2649
+ * the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
2650
+ */
2651
+ function mapAXPPropertyToWidgetProperty(property, options) {
2652
+ const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
2653
+ const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
2654
+ const iface = property.interface;
2655
+ const widgetType = iface?.type ?? 'text-editor';
2656
+ const description = resolveDescription?.(property);
2657
+ return {
2658
+ name: property.name,
2659
+ title: resolveTitle(property),
2660
+ ...(description !== undefined && description !== '' ? { description } : {}),
2661
+ group,
2662
+ order,
2663
+ schema: {
2664
+ dataType: property.dataType,
2665
+ interface: {
2666
+ path,
2667
+ name: property.name,
2668
+ type: widgetType,
2669
+ options: iface?.options ?? {},
2670
+ ...(iface?.triggers ? { triggers: iface.triggers } : {}),
2671
+ },
2672
+ },
2673
+ validations: property.validations,
2674
+ visible: true,
2675
+ };
2676
+ }
2677
+ //#endregion
2639
2678
 
2640
2679
  class AXPPropertyEditorHelper {
2641
2680
  static expandShorthand(values) {
@@ -2812,31 +2851,255 @@ function findNonEmptyBreakpoints(values) {
2812
2851
  return nonEmptyBreakpoints;
2813
2852
  }
2814
2853
 
2854
+ //#region ---- Imports ----
2855
+ //#endregion
2856
+ //#region ---- Helper Class ----
2857
+ /**
2858
+ * Helper class for serializing and deserializing AXPWidgetNode to/from JSON
2859
+ */
2860
+ class AXPWidgetSerializationHelper {
2861
+ /**
2862
+ * Removes non-serializable properties from widget node
2863
+ * @param node - The widget node to clean
2864
+ * @param options - Serialization options
2865
+ * @returns Cleaned widget node ready for JSON serialization
2866
+ */
2867
+ static cleanNode(node, options = {}) {
2868
+ const { removeMeta = true, removeFunctions = true } = options;
2869
+ // Deep clone to avoid mutating original
2870
+ const cleaned = cloneDeep(node);
2871
+ // Remove meta property if requested
2872
+ if (removeMeta && 'meta' in cleaned) {
2873
+ delete cleaned.meta;
2874
+ }
2875
+ // Remove functions from options, triggers, and valueTransforms
2876
+ if (removeFunctions) {
2877
+ this.removeFunctions(cleaned);
2878
+ }
2879
+ // Recursively clean children
2880
+ if (cleaned.children && Array.isArray(cleaned.children)) {
2881
+ cleaned.children = cleaned.children.map((child) => this.cleanNode(child, options));
2882
+ }
2883
+ return cleaned;
2884
+ }
2885
+ /**
2886
+ * Recursively removes functions from object properties
2887
+ */
2888
+ static removeFunctions(obj) {
2889
+ if (obj === null || obj === undefined) {
2890
+ return;
2891
+ }
2892
+ if (Array.isArray(obj)) {
2893
+ obj.forEach((item) => this.removeFunctions(item));
2894
+ return;
2895
+ }
2896
+ if (typeof obj === 'object') {
2897
+ for (const key in obj) {
2898
+ if (typeof obj[key] === 'function') {
2899
+ delete obj[key];
2900
+ }
2901
+ else if (typeof obj[key] === 'object') {
2902
+ this.removeFunctions(obj[key]);
2903
+ }
2904
+ }
2905
+ }
2906
+ }
2907
+ /**
2908
+ * Converts AXPWidgetNode to JSON string
2909
+ * @param node - The widget node to serialize
2910
+ * @param options - Serialization options
2911
+ * @returns JSON string representation of the widget node
2912
+ */
2913
+ static toJson(node, options = {}) {
2914
+ const { pretty = false, ...cleanOptions } = options;
2915
+ const cleaned = this.cleanNode(node, cleanOptions);
2916
+ if (pretty) {
2917
+ return JSON.stringify(cleaned, null, 2);
2918
+ }
2919
+ return JSON.stringify(cleaned);
2920
+ }
2921
+ /**
2922
+ * Converts JSON string to AXPWidgetNode
2923
+ * @param json - JSON string to deserialize
2924
+ * @returns Parsed AXPWidgetNode object
2925
+ * @throws Error if JSON is invalid or doesn't match AXPWidgetNode structure
2926
+ */
2927
+ static fromJson(json) {
2928
+ try {
2929
+ const parsed = JSON.parse(json);
2930
+ // Basic validation - ensure it has at least a type property
2931
+ if (!parsed || typeof parsed !== 'object') {
2932
+ throw new Error('Invalid JSON: Expected an object');
2933
+ }
2934
+ if (!parsed.type) {
2935
+ throw new Error('Invalid AXPWidgetNode: Missing required property "type"');
2936
+ }
2937
+ // Recursively validate and parse children if they exist
2938
+ if (parsed.children && Array.isArray(parsed.children)) {
2939
+ parsed.children = parsed.children.map((child) => this.fromJson(JSON.stringify(child)));
2940
+ }
2941
+ return parsed;
2942
+ }
2943
+ catch (error) {
2944
+ if (error instanceof SyntaxError) {
2945
+ throw new Error(`Invalid JSON string: ${error.message}`);
2946
+ }
2947
+ throw error;
2948
+ }
2949
+ }
2950
+ /**
2951
+ * Removes meta property from widget node (similar to designer service)
2952
+ * @param node - The widget node to process
2953
+ * @returns Widget node without meta property
2954
+ */
2955
+ static removeMeta(node) {
2956
+ return this.cleanNode(node, { removeMeta: true, removeFunctions: false });
2957
+ }
2958
+ }
2959
+ //#endregion
2960
+
2961
+ //#region ---- Editor sub-categories (widget picker) ----
2962
+ const AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS = {
2963
+ name: 'editor-text-inputs',
2964
+ order: 1,
2965
+ title: '@platform-layout-widgets:subcategories.editor-text-inputs.title',
2966
+ };
2967
+ const AXP_WIDGETS_EDITOR_SUB_NUMERIC = {
2968
+ name: 'editor-numeric',
2969
+ order: 2,
2970
+ title: '@platform-layout-widgets:subcategories.editor-numeric.title',
2971
+ };
2972
+ const AXP_WIDGETS_EDITOR_SUB_DATETIME = {
2973
+ name: 'editor-datetime',
2974
+ order: 3,
2975
+ title: '@platform-layout-widgets:subcategories.editor-datetime.title',
2976
+ };
2977
+ const AXP_WIDGETS_EDITOR_SUB_CHOICE = {
2978
+ name: 'editor-choice',
2979
+ order: 4,
2980
+ title: '@platform-layout-widgets:subcategories.editor-choice.title',
2981
+ };
2982
+ const AXP_WIDGETS_EDITOR_SUB_RICH = {
2983
+ name: 'editor-rich',
2984
+ order: 5,
2985
+ title: '@platform-layout-widgets:subcategories.editor-rich.title',
2986
+ };
2987
+ const AXP_WIDGETS_EDITOR_SUB_VISUAL = {
2988
+ name: 'editor-visual',
2989
+ order: 6,
2990
+ title: '@platform-layout-widgets:subcategories.editor-visual.title',
2991
+ };
2992
+ const AXP_WIDGETS_EDITOR_SUB_COMPOSITE = {
2993
+ name: 'editor-composite',
2994
+ order: 7,
2995
+ title: '@platform-layout-widgets:subcategories.editor-composite.title',
2996
+ };
2997
+ const AXP_WIDGETS_EDITOR_SUB_CONFIG = {
2998
+ name: 'editor-config',
2999
+ order: 8,
3000
+ title: '@platform-layout-widgets:subcategories.editor-config.title',
3001
+ };
3002
+ //#endregion
3003
+ //#region ---- Layout sub-categories (widget picker) ----
3004
+ const AXP_WIDGETS_LAYOUT_SUB_SHELL = {
3005
+ name: 'layout-shell',
3006
+ order: 1,
3007
+ title: '@platform-layout-widgets:subcategories.layout-shell.title',
3008
+ };
3009
+ const AXP_WIDGETS_LAYOUT_SUB_GRID = {
3010
+ name: 'layout-grid',
3011
+ order: 2,
3012
+ title: '@platform-layout-widgets:subcategories.layout-grid.title',
3013
+ };
3014
+ const AXP_WIDGETS_LAYOUT_SUB_SURFACES = {
3015
+ name: 'layout-surfaces',
3016
+ order: 3,
3017
+ title: '@platform-layout-widgets:subcategories.layout-surfaces.title',
3018
+ };
3019
+ const AXP_WIDGETS_LAYOUT_SUB_TABS = {
3020
+ name: 'layout-tabs',
3021
+ order: 4,
3022
+ title: '@platform-layout-widgets:subcategories.layout-tabs.title',
3023
+ };
3024
+ const AXP_WIDGETS_LAYOUT_SUB_LISTS = {
3025
+ name: 'layout-lists',
3026
+ order: 5,
3027
+ title: '@platform-layout-widgets:subcategories.layout-lists.title',
3028
+ };
3029
+ const AXP_WIDGETS_LAYOUT_SUB_UTILITY = {
3030
+ name: 'layout-utility',
3031
+ order: 6,
3032
+ title: '@platform-layout-widgets:subcategories.layout-utility.title',
3033
+ };
3034
+ //#endregion
3035
+ //#region ---- Action sub-categories (widget picker) ----
3036
+ const AXP_WIDGETS_ACTION_SUB_CONTROLS = {
3037
+ name: 'action-controls',
3038
+ order: 1,
3039
+ title: '@platform-layout-widgets:subcategories.action-controls.title',
3040
+ };
3041
+ //#endregion
3042
+ //#region ---- Advance sub-categories (widget picker) ----
3043
+ const AXP_WIDGETS_ADVANCE_SUB_MEDIA = {
3044
+ name: 'advance-media',
3045
+ order: 1,
3046
+ title: '@platform-layout-widgets:subcategories.advance-media.title',
3047
+ };
3048
+ const AXP_WIDGETS_ADVANCE_SUB_INPUT = {
3049
+ name: 'advance-input',
3050
+ order: 2,
3051
+ title: '@platform-layout-widgets:subcategories.advance-input.title',
3052
+ };
3053
+ const AXP_WIDGETS_ADVANCE_SUB_DATA = {
3054
+ name: 'advance-data',
3055
+ order: 3,
3056
+ title: '@platform-layout-widgets:subcategories.advance-data.title',
3057
+ };
3058
+ const AXP_WIDGETS_ADVANCE_SUB_TOOLS = {
3059
+ name: 'advance-tools',
3060
+ order: 4,
3061
+ title: '@platform-layout-widgets:subcategories.advance-tools.title',
3062
+ };
3063
+ //#endregion
3064
+ /** Normalizes widget categories to an array for iteration and serialization. */
3065
+ function normalizeWidgetCategories(categories) {
3066
+ if (categories == null) {
3067
+ return [];
3068
+ }
3069
+ return Array.isArray(categories) ? categories : [categories];
3070
+ }
2815
3071
  const AXP_WIDGETS_LAYOUT_CATEGORY = {
2816
3072
  name: 'layout',
2817
3073
  order: 1,
2818
- title: 'Layout',
3074
+ title: '@platform-layout-widgets:categories.layout.title',
2819
3075
  };
2820
3076
  const AXP_WIDGETS_EDITOR_CATEGORY = {
2821
3077
  name: 'editor',
2822
3078
  order: 2,
2823
- title: 'Editors',
3079
+ title: '@platform-layout-widgets:categories.editor.title',
2824
3080
  };
2825
3081
  const AXP_WIDGETS_ACTION_CATEGORY = {
2826
3082
  name: 'action',
2827
3083
  order: 3,
2828
- title: 'Action',
3084
+ title: '@platform-layout-widgets:categories.action.title',
2829
3085
  };
2830
3086
  const AXP_WIDGETS_ADVANCE_CATEGORY = {
2831
3087
  name: 'advance',
2832
3088
  order: 4,
2833
- title: 'Advance',
3089
+ title: '@platform-layout-widgets:categories.advance.title',
3090
+ };
3091
+ /** AI category tab in the widget picker (metadata); unrelated to Widgets:GetForAI listing scope. */
3092
+ const AXP_WIDGETS_AI_CATEGORY = {
3093
+ name: 'ai',
3094
+ order: 5,
3095
+ title: '@platform-layout-widgets:categories.ai.title',
2834
3096
  };
2835
3097
  const AXP_WIDGETS_CATEGORIES = [
2836
3098
  AXP_WIDGETS_LAYOUT_CATEGORY,
2837
3099
  AXP_WIDGETS_EDITOR_CATEGORY,
2838
3100
  AXP_WIDGETS_ACTION_CATEGORY,
2839
3101
  AXP_WIDGETS_ADVANCE_CATEGORY,
3102
+ AXP_WIDGETS_AI_CATEGORY,
2840
3103
  ];
2841
3104
 
2842
3105
  var AXPWidgetGroupEnum;
@@ -2849,11 +3112,12 @@ var AXPWidgetGroupEnum;
2849
3112
  AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
2850
3113
  AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
2851
3114
  AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
3115
+ AXPWidgetGroupEnum["BaseWidget"] = "base-widget";
2852
3116
  })(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
2853
3117
 
2854
3118
  /**
2855
3119
  * Generated bundle index. Do not edit.
2856
3120
  */
2857
3121
 
2858
- export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreContextChangeEvent, AXPWidgetCoreContextStore, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints };
3122
+ export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ACTION_SUB_CONTROLS, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_ADVANCE_SUB_DATA, AXP_WIDGETS_ADVANCE_SUB_INPUT, AXP_WIDGETS_ADVANCE_SUB_MEDIA, AXP_WIDGETS_ADVANCE_SUB_TOOLS, AXP_WIDGETS_AI_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_EDITOR_SUB_CHOICE, AXP_WIDGETS_EDITOR_SUB_COMPOSITE, AXP_WIDGETS_EDITOR_SUB_CONFIG, AXP_WIDGETS_EDITOR_SUB_DATETIME, AXP_WIDGETS_EDITOR_SUB_NUMERIC, AXP_WIDGETS_EDITOR_SUB_RICH, AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS, AXP_WIDGETS_EDITOR_SUB_VISUAL, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGETS_LAYOUT_SUB_GRID, AXP_WIDGETS_LAYOUT_SUB_LISTS, AXP_WIDGETS_LAYOUT_SUB_SHELL, AXP_WIDGETS_LAYOUT_SUB_SURFACES, AXP_WIDGETS_LAYOUT_SUB_TABS, AXP_WIDGETS_LAYOUT_SUB_UTILITY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DEFINITION_PROVIDER, AXP_WIDGET_TOKEN, buildWidgetRegistryMapFromProviders, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints, mapAXPPropertyToWidgetProperty, normalizeWidgetCategories };
2859
3123
  //# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map