@acorex/platform 21.0.0-next.3 → 21.0.0-next.34

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 (117) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +295 -45
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/{acorex-platform-common-common-settings.provider-zhqNP3xb.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +60 -4
  4. package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +960 -319
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +1352 -832
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +554 -826
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +530 -154
  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 +5969 -2347
  16. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-designer.mjs +169 -154
  18. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity.mjs +15380 -9274
  20. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-views.mjs +393 -110
  22. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs +511 -450
  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-CxrsI6Hn.mjs → acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs} +39 -16
  28. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.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-BGQqY5Mw.mjs +111 -0
  34. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.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 +7865 -4026
  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 +220 -169
  46. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  47. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
  48. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
  50. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.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-C2z5Lq9y.mjs} +18 -25
  52. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.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 +1717 -66
  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.map +1 -1
  66. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs} +11 -11
  67. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
  68. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs} +9 -9
  69. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
  70. package/fesm2022/acorex-platform-themes-shared.mjs +563 -561
  71. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  72. package/fesm2022/acorex-platform-workflow.mjs +1735 -1750
  73. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  74. package/fesm2022/acorex-platform.mjs.map +1 -1
  75. package/package.json +31 -31
  76. package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +247 -10
  77. package/{common/index.d.ts → types/acorex-platform-common.d.ts} +492 -31
  78. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +606 -392
  79. package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +719 -413
  80. package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +128 -56
  81. package/types/acorex-platform-layout-components.d.ts +2927 -0
  82. package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +9 -3
  83. package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1133 -237
  84. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +90 -31
  85. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +206 -102
  86. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +942 -137
  87. package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
  88. package/{runtime/index.d.ts → types/acorex-platform-runtime.d.ts} +237 -74
  89. package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -5
  90. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
  91. package/types/acorex-platform-workflow.d.ts +1806 -0
  92. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
  93. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
  94. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
  95. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
  96. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
  101. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs +0 -1542
  103. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
  105. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
  108. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
  110. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
  111. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
  113. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
  115. package/layout/components/index.d.ts +0 -1669
  116. package/workflow/index.d.ts +0 -2443
  117. /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
@@ -1,10 +1,9 @@
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
+ import { set, merge, cloneDeep, isNil, get, isEqual, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
6
6
  import { Subject, BehaviorSubject, filter } from 'rxjs';
7
- import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
8
7
  import * as i1$1 from '@acorex/components/skeleton';
9
8
  import { AXSkeletonModule } from '@acorex/components/skeleton';
10
9
  import * as i2 from '@acorex/core/translation';
@@ -15,122 +14,6 @@ import { CommonModule } from '@angular/common';
15
14
  import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
16
15
  import { AXUnsubscriber } from '@acorex/core/utils';
17
16
 
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
17
  var AXPPageStatus;
135
18
  (function (AXPPageStatus) {
136
19
  // Idle statuses
@@ -170,17 +53,17 @@ class AXPWidgetCoreElement {
170
53
  }
171
54
  class AXPWidgetCoreService {
172
55
  constructor() {
173
- this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : []));
174
- this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : []));
56
+ this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : /* istanbul ignore next */ []));
57
+ this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : /* istanbul ignore next */ []));
175
58
  this.onRefresh = new Subject();
176
59
  this.widgets = new Map();
177
60
  this.onWidgetRegistered = new Subject();
178
- this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : []));
61
+ this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : /* istanbul ignore next */ []));
179
62
  this.status = this.status$.asReadonly();
180
63
  this.isBusy = computed(() => {
181
64
  return [AXPPageStatus.Processing, AXPPageStatus.Submitting, AXPPageStatus.Rendering].includes(this.status());
182
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
183
- this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : []));
65
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
66
+ this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : /* istanbul ignore next */ []));
184
67
  }
185
68
  get variables() {
186
69
  return this.variables$();
@@ -285,13 +168,16 @@ class AXPWidgetCoreService {
285
168
  return Array.from(this.widgets.keys());
286
169
  }
287
170
  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 }); }
171
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
172
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService }); }
290
173
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
292
175
  type: Injectable
293
176
  }] });
294
177
 
178
+ //
179
+ // @deprecated
180
+ // use AXPWidgetsList instead
295
181
  const AXPWidgetsCatalog = {
296
182
  timeDuration: 'time-duration',
297
183
  timeDurationFilter: 'time-duration-filter',
@@ -315,6 +201,7 @@ const AXPWidgetsCatalog = {
315
201
  pageLayout: 'page-layout',
316
202
  repeaterLayout: 'repeater-layout',
317
203
  textBlockLayout: 'text-block-layout',
204
+ alertBoxLayout: 'alert-box-layout',
318
205
  fileUploader: 'file-uploader',
319
206
  fileTypeExtension: 'file-type-extension',
320
207
  map: 'map',
@@ -383,6 +270,7 @@ const AXPWidgetsCatalog = {
383
270
  advancedWeather: 'advanced-weather',
384
271
  metaData: 'meta-data-editor',
385
272
  templateEditor: 'template-box-editor',
273
+ templateContentEditor: 'template-content-editor',
386
274
  panel: 'panel',
387
275
  notification: 'notification',
388
276
  taskBoard: 'task-board',
@@ -392,10 +280,11 @@ const AXPWidgetsCatalog = {
392
280
  entityList: 'entity-list',
393
281
  editorJs: 'editor-js-editor',
394
282
  documentUploader: 'document-uploader',
395
- signatureList: 'signature-list',
396
283
  stepWizard: 'step-wizard',
397
284
  progressBar: 'progress-bar-editor',
398
- rate: 'rate-picker-editor'
285
+ rate: 'rate-picker-editor',
286
+ documentFileTypeFilter: 'document-file-type-filter',
287
+ entityDefinitionProvider: 'entity-definition-provider-editor',
399
288
  };
400
289
 
401
290
  function cloneProperty(property, values) {
@@ -450,7 +339,10 @@ function createBooleanProperty(ctor) {
450
339
  type: AXPWidgetsCatalog.toggle,
451
340
  },
452
341
  },
453
- visible: ctor.visible ?? true,
342
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
343
+ binding: {
344
+ enabled: true,
345
+ },
454
346
  };
455
347
  }
456
348
  function createSelectProperty(ctor) {
@@ -474,7 +366,7 @@ function createSelectProperty(ctor) {
474
366
  },
475
367
  },
476
368
  },
477
- visible: ctor.visible ?? true,
369
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
478
370
  };
479
371
  }
480
372
  const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
@@ -486,22 +378,22 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
486
378
  this.token = inject(AXP_WIDGET_TOKEN);
487
379
  this.host = inject(ElementRef).nativeElement;
488
380
  this.layoutService = inject(AXPWidgetCoreService);
489
- this.contextService = inject(AXPWidgetCoreContextStore);
381
+ this.contextService = inject(AXPContextStore);
490
382
  this.config = this.token.config;
491
383
  this.node = this.token.node;
492
384
  this.name = this.token.node.name;
493
385
  this.component = this;
494
- this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
386
+ this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
495
387
  this.options = this._options.asReadonly();
496
388
  this.onOptionsChanged = new Subject();
497
- this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : []));
389
+ this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
498
390
  this.status = this._status.asReadonly();
499
391
  this.onStatusChanged = new BehaviorSubject(this._status());
500
392
  this.#statusEffect = effect(() => {
501
393
  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" }] : []));
394
+ }, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
395
+ this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
396
+ this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : /* istanbul ignore next */ []));
505
397
  this.children = this._children.asReadonly();
506
398
  }
507
399
  get id() {
@@ -548,10 +440,10 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
548
440
  this._children.set([...children]);
549
441
  }
550
442
  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 }); }
443
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
444
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent }); }
553
445
  }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
555
447
  type: Injectable
556
448
  }] });
557
449
  class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
@@ -562,10 +454,10 @@ class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
562
454
  }
563
455
  super.ngOnInit();
564
456
  }
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 }); }
457
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
458
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
567
459
  }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
569
461
  type: Injectable
570
462
  }] });
571
463
  class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
@@ -576,11 +468,11 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
576
468
  this._isValueWidget = false;
577
469
  this.isValueWidget = () => this._isValueWidget;
578
470
  this.onValueChanged = new Subject();
579
- this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : []));
580
- this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : []));
471
+ this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : /* istanbul ignore next */ []));
472
+ this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : /* istanbul ignore next */ []));
581
473
  this.getValue = computed(() => {
582
474
  return this.fullPath() ? this.extractValue(this.fullPath()) : null;
583
- }, ...(ngDevMode ? [{ debugName: "getValue", equal: isEqual }] : [{ equal: isEqual }]));
475
+ }, { ...(ngDevMode ? { debugName: "getValue" } : /* istanbul ignore next */ {}), equal: isEqual });
584
476
  this.validationRules = computed(() => {
585
477
  const validationsRaw = this.options()['validations'];
586
478
  if (validationsRaw == null) {
@@ -593,7 +485,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
593
485
  message: c.message,
594
486
  options: c.options,
595
487
  }));
596
- }, ...(ngDevMode ? [{ debugName: "validationRules" }] : []));
488
+ }, ...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
597
489
  }
598
490
  ngOnInit() {
599
491
  this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
@@ -623,7 +515,12 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
623
515
  if (isNil(value) && isNil(oldValue)) {
624
516
  return;
625
517
  }
626
- if (isEqual(oldValue, value)) {
518
+ // Reordered arrays must persist even when items are deep-equal (e.g. empty row objects).
519
+ const isArrayReorder = Array.isArray(oldValue) &&
520
+ Array.isArray(value) &&
521
+ oldValue.length === value.length &&
522
+ oldValue.some((v, i) => v !== value[i]);
523
+ if (!isArrayReorder && isEqual(oldValue, value)) {
627
524
  return;
628
525
  }
629
526
  if (this.fullPath()) {
@@ -670,23 +567,23 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
670
567
  this.setValue(e.value);
671
568
  }
672
569
  }
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 }); }
570
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
571
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent }); }
675
572
  }
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
677
574
  type: Injectable
678
575
  }] });
679
576
  class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
680
577
  constructor() {
681
578
  super(...arguments);
682
579
  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" }] : []));
580
+ this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
581
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
685
582
  this.textTemplate = computed(() => isNil(this.options()['textTemplate'])
686
583
  ? 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" }] : []));
584
+ : this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : /* istanbul ignore next */ []));
585
+ this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
586
+ this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
690
587
  //#region ---- DataSource Loading Effect ----
691
588
  /**
692
589
  * Track the last loaded string dataSource reference to prevent infinite loops
@@ -766,7 +663,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
766
663
  this.dataSource.set(convertArrayToDataSource([]));
767
664
  }
768
665
  });
769
- }, ...(ngDevMode ? [{ debugName: "rf" }] : []));
666
+ }, ...(ngDevMode ? [{ debugName: "rf" }] : /* istanbul ignore next */ []));
770
667
  this.effect2 = effect(async () => {
771
668
  const value = this.getValue();
772
669
  const items = [];
@@ -777,7 +674,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
777
674
  items.push(await this.extractItem(value));
778
675
  }
779
676
  this.selectedItems.set(items.filter((c) => c != null));
780
- }, ...(ngDevMode ? [{ debugName: "effect2" }] : []));
677
+ }, ...(ngDevMode ? [{ debugName: "effect2" }] : /* istanbul ignore next */ []));
781
678
  }
782
679
  //#endregion
783
680
  async extractItem(item) {
@@ -802,10 +699,10 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
802
699
  [this.textField()]: item,
803
700
  };
804
701
  }
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 }); }
702
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
703
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent }); }
807
704
  }
808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
809
706
  type: Injectable
810
707
  }] });
811
708
  class AXPColumnWidgetComponent {
@@ -816,17 +713,17 @@ class AXPColumnWidgetComponent {
816
713
  this.rawValue = null;
817
714
  this.nullText = this.options['nullText'];
818
715
  this.nullValue = this.options['nullValue'];
819
- this.value = computed(() => {
716
+ this.value = () => {
820
717
  if (isNil(this.rawValue) && !isNil(this.nullValue)) {
821
718
  return this.nullValue;
822
719
  }
823
720
  return this.rawValue;
824
- }, ...(ngDevMode ? [{ debugName: "value" }] : []));
721
+ };
825
722
  }
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 }); }
723
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
724
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent }); }
828
725
  }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
726
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
830
727
  type: Injectable
831
728
  }] });
832
729
 
@@ -855,7 +752,7 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
855
752
  style['overflow-y'] = overflowY ?? '';
856
753
  style['direction'] = direction ?? '';
857
754
  return style;
858
- }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : []));
755
+ }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : /* istanbul ignore next */ []));
859
756
  this.blockStyle = computed(() => {
860
757
  const options = this.options();
861
758
  const style = { ...this.hostBoxStyle() };
@@ -872,47 +769,47 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
872
769
  style['height'] = height ?? '';
873
770
  style['max-height'] = maxHeight ?? '';
874
771
  return style;
875
- }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : []));
772
+ }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : /* istanbul ignore next */ []));
876
773
  this.inlineStyle = computed(() => {
877
774
  return { ...this.hostBoxStyle() };
878
- }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : []));
775
+ }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : /* istanbul ignore next */ []));
879
776
  this.blockClass = computed(() => {
880
777
  return {
881
778
  'ax-block': true,
882
779
  'ax-w-full': true,
883
780
  // 'ax-widget-outline': true,
884
781
  };
885
- }, ...(ngDevMode ? [{ debugName: "blockClass" }] : []));
782
+ }, ...(ngDevMode ? [{ debugName: "blockClass" }] : /* istanbul ignore next */ []));
886
783
  this.inlineClass = computed(() => {
887
784
  return {
888
785
  'ax-inline-block': true,
889
786
  };
890
- }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : []));
787
+ }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : /* istanbul ignore next */ []));
891
788
  }
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 }); }
789
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
790
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
894
791
  }
895
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
792
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
896
793
  type: Injectable
897
794
  }] });
898
795
 
899
796
  class AXPBlockBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
900
797
  constructor() {
901
798
  super(...arguments);
902
- this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
903
- this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
799
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
800
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
904
801
  }
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 }); }
802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
803
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
907
804
  }
908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
909
806
  type: Injectable
910
807
  }] });
911
808
 
912
809
  class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
913
810
  constructor() {
914
811
  super(...arguments);
915
- this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : []));
812
+ this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : /* istanbul ignore next */ []));
916
813
  this.hostFlexStyle = computed(() => {
917
814
  const blockStyle = this.blockStyle();
918
815
  const style = { ...blockStyle };
@@ -951,45 +848,45 @@ class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
951
848
  style['gap'] = flex.gap;
952
849
  }
953
850
  return style;
954
- }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : []));
851
+ }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : /* istanbul ignore next */ []));
955
852
  this.hostFlexClass = computed(() => {
956
853
  return {
957
854
  ...this.blockClass(),
958
855
  'ax-flex': true,
959
856
  'ax-h-full': true,
960
857
  };
961
- }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : []));
858
+ }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : /* istanbul ignore next */ []));
962
859
  this.hostClass = computed(() => {
963
860
  return this.hostFlexClass();
964
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
861
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
965
862
  this.hostStyle = computed(() => {
966
863
  return this.hostFlexStyle();
967
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
864
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
968
865
  }
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 }); }
866
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
867
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
971
868
  }
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
973
870
  type: Injectable
974
871
  }] });
975
872
 
976
873
  class AXPInlineBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
977
874
  constructor() {
978
875
  super(...arguments);
979
- this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
980
- this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
876
+ this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
877
+ this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
981
878
  }
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 }); }
879
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
880
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
984
881
  }
985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
882
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
986
883
  type: Injectable
987
884
  }] });
988
885
 
989
886
  class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComponent {
990
887
  constructor() {
991
888
  super(...arguments);
992
- this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : []));
889
+ this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : /* istanbul ignore next */ []));
993
890
  this.hostFlexItemStyle = computed(() => {
994
891
  const inlineStyle = this.blockStyle();
995
892
  const style = { ...inlineStyle };
@@ -1025,37 +922,37 @@ class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComp
1025
922
  style['align-self'] = fi.alignSelf;
1026
923
  }
1027
924
  return style;
1028
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : []));
925
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : /* istanbul ignore next */ []));
1029
926
  this.hostFlexItemClass = computed(() => {
1030
927
  return {
1031
928
  ...this.blockClass(),
1032
929
  };
1033
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : []));
930
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : /* istanbul ignore next */ []));
1034
931
  this.hostClass = computed(() => {
1035
932
  return this.hostFlexItemClass();
1036
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
933
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1037
934
  this.hostStyle = computed(() => {
1038
935
  return this.hostFlexItemStyle();
1039
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
936
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1040
937
  }
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 }); }
938
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
939
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
1043
940
  }
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
1045
942
  type: Injectable
1046
943
  }] });
1047
944
 
1048
945
  class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
1049
946
  constructor() {
1050
947
  super(...arguments);
1051
- this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : []));
948
+ this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
1052
949
  this.hostGridStyle = computed(() => {
1053
950
  const style = { ...this.inlineStyle() };
1054
951
  const g = this.grid()?.default;
1055
952
  if (g?.gap)
1056
953
  style['gap'] = g.gap;
1057
954
  return style;
1058
- }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : []));
955
+ }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : /* istanbul ignore next */ []));
1059
956
  this.hostGridClass = computed(() => {
1060
957
  const cls = {
1061
958
  ...this.inlineClass(),
@@ -1064,8 +961,7 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1064
961
  const g = this.grid()?.default;
1065
962
  if (g?.columns)
1066
963
  cls[`lg:ax-grid-cols-${g.columns}`] = true;
1067
- if (g?.rows)
1068
- cls[`lg:ax-grid-rows-${g.rows}`] = true;
964
+ // if (g?.rows) cls[`lg:ax-grid-rows-${g.rows}`] = true;
1069
965
  if (g?.justifyItems)
1070
966
  cls[`lg:ax-justify-items-${g.justifyItems}`] = true;
1071
967
  if (g?.alignItems)
@@ -1073,21 +969,21 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1073
969
  if (g?.autoFlow)
1074
970
  cls[`lg:ax-grid-flow-${g.autoFlow}`] = true;
1075
971
  return cls;
1076
- }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : []));
1077
- this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1078
- this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
972
+ }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : /* istanbul ignore next */ []));
973
+ this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
974
+ this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1079
975
  }
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 }); }
976
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
977
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
1082
978
  }
1083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
979
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
1084
980
  type: Injectable
1085
981
  }] });
1086
982
 
1087
983
  class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetComponent {
1088
984
  constructor() {
1089
985
  super(...arguments);
1090
- this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : []));
986
+ this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : /* istanbul ignore next */ []));
1091
987
  this.hostGridItemStyle = computed(() => {
1092
988
  const style = { ...this.hostFlexStyle() };
1093
989
  const g = this.gridItem();
@@ -1096,10 +992,13 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1096
992
  if (g?.justifySelf)
1097
993
  style['justify-self'] = g.justifySelf;
1098
994
  return style;
1099
- }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : []));
995
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : /* istanbul ignore next */ []));
1100
996
  this.hostGridItemClass = computed(() => {
1101
997
  const cls = { ...this.hostFlexClass() };
1102
998
  const g = this.gridItem();
999
+ // Mobile-first: full width on small screens so items stack vertically and don't overflow
1000
+ cls['ax-col-span-12'] = true;
1001
+ // Large screens: apply defined placement so multi-column layout works on desktop
1103
1002
  if (g?.colSpan)
1104
1003
  cls[`lg:ax-col-span-${g.colSpan}`] = true;
1105
1004
  if (g?.colStart)
@@ -1113,14 +1012,14 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1113
1012
  if (g?.rowEnd)
1114
1013
  cls[`lg:ax-row-end-${g.rowEnd}`] = true;
1115
1014
  return cls;
1116
- }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : []));
1117
- this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1118
- this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1015
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : /* istanbul ignore next */ []));
1016
+ this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1017
+ this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1119
1018
  }
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 }); }
1019
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1020
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
1122
1021
  }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1022
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1124
1023
  type: Injectable
1125
1024
  }] });
1126
1025
 
@@ -1129,27 +1028,27 @@ class AXPTableBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponen
1129
1028
  super(...arguments);
1130
1029
  this.hostTableClass = computed(() => ({
1131
1030
  ...this.blockClass(),
1132
- }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : []));
1031
+ }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : /* istanbul ignore next */ []));
1133
1032
  this.hostTableStyle = computed(() => {
1134
1033
  const style = { ...this.blockStyle() };
1135
1034
  style['overflow-x'] = 'auto';
1136
1035
  return style;
1137
- }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : []));
1138
- this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1139
- this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1036
+ }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : /* istanbul ignore next */ []));
1037
+ this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1038
+ this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1140
1039
  }
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 }); }
1040
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1041
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
1143
1042
  }
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1043
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1145
1044
  type: Injectable
1146
1045
  }] });
1147
1046
 
1148
1047
  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 }); }
1048
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1049
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
1151
1050
  }
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1153
1052
  type: Injectable
1154
1053
  }] });
1155
1054
 
@@ -1159,57 +1058,105 @@ class AXPTableItemBaseLayoutWidgetComponent extends AXPTableItemOpsBaseLayoutWid
1159
1058
  this.colSpan = computed(() => {
1160
1059
  const v = this.options()?.colSpan;
1161
1060
  return v ? Math.max(1, v) : 1;
1162
- }, ...(ngDevMode ? [{ debugName: "colSpan" }] : []));
1061
+ }, ...(ngDevMode ? [{ debugName: "colSpan" }] : /* istanbul ignore next */ []));
1163
1062
  this.rowSpan = computed(() => {
1164
1063
  const v = this.options()?.rowSpan;
1165
1064
  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" }] : []));
1065
+ }, ...(ngDevMode ? [{ debugName: "rowSpan" }] : /* istanbul ignore next */ []));
1066
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1067
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1169
1068
  }
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 }); }
1069
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1070
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
1172
1071
  }
1173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1174
1073
  type: Injectable
1175
1074
  }] });
1176
1075
 
1076
+ //#region ---- Imports ----
1077
+ /**
1078
+ * Injection token for widget definition providers.
1079
+ * Modules register their widget providers using this token (multi: true).
1080
+ */
1081
+ const AXP_WIDGET_DEFINITION_PROVIDER = new InjectionToken('AXP_WIDGET_DEFINITION_PROVIDER', {
1082
+ factory: () => [],
1083
+ });
1084
+ //#endregion
1085
+
1086
+ //#region ---- Build widget map (shared with tooling / snapshot scripts) ----
1087
+ //TODO RECHECK THIS FUNCTION s.hosseini
1088
+ /**
1089
+ * Merges core + extended widgets the same way as AXPWidgetRegistryService.ensureBuilt().
1090
+ * Use with concrete providers (e.g. AXPCoreWidgetsProvider, AXPEntityWidgetsProvider) in Node scripts without DI.
1091
+ */
1092
+ function buildWidgetRegistryMapFromProviders(providers) {
1093
+ const types = new Map();
1094
+ const AXPExtendedWidgets = [];
1095
+ for (const provider of providers) {
1096
+ const widgets = provider.getWidgets?.() ?? [];
1097
+ for (const w of widgets) {
1098
+ types.set(w.name, w);
1099
+ }
1100
+ const extended = provider.getExtendedWidgets?.() ?? [];
1101
+ AXPExtendedWidgets.push(...extended);
1102
+ }
1103
+ for (const { parentName, widget } of AXPExtendedWidgets) {
1104
+ const parent = types.get(parentName);
1105
+ if (parent) {
1106
+ const merged = merge({}, parent, widget);
1107
+ merged.name = widget.name;
1108
+ types.set(merged.name, merged);
1109
+ }
1110
+ }
1111
+ return types;
1112
+ }
1113
+ //#endregion
1114
+ //#region ---- Widget Registry Service (Token-Based) ----
1115
+ /**
1116
+ * Aggregates widgets from all AXP_WIDGET_DEFINITION_PROVIDER instances.
1117
+ * Token-based like AXP_MENU_PROVIDER / AXP_PERMISSION_DEFINITION_PROVIDER / AXP_SETTING_DEFINITION_PROVIDER.
1118
+ * No separate registry - widgets come solely from providers.
1119
+ */
1177
1120
  class AXPWidgetRegistryService {
1178
- /**
1179
- *
1180
- */
1181
1121
  constructor() {
1182
- this.types = new Map();
1183
- AXPWidgetRegistryService.instance = this;
1122
+ this._providers = inject(AXP_WIDGET_DEFINITION_PROVIDER, { optional: true }) ?? [];
1123
+ this._types = null;
1184
1124
  }
1185
- register(widget) {
1186
- this.types.set(widget.name, widget);
1187
- }
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);
1125
+ /**
1126
+ * Lazy-build widget map from all providers.
1127
+ */
1128
+ ensureBuilt() {
1129
+ if (this._types)
1130
+ return this._types;
1131
+ this._types = buildWidgetRegistryMapFromProviders(this._providers);
1132
+ return this._types;
1193
1133
  }
1194
1134
  resolve(name) {
1195
- const widget = this.types.get(name);
1135
+ const widget = this.ensureBuilt().get(name);
1196
1136
  if (!widget) {
1197
1137
  throw new Error(`Widget with name "${name}" does not exist.`);
1198
1138
  }
1199
1139
  return widget;
1200
1140
  }
1141
+ /**
1142
+ * Registered widget config when present; otherwise `undefined`. Does not throw — use when
1143
+ * {@link resolve}'s value may be a non-widget id (e.g. data-source row id in dynamic field configurator).
1144
+ */
1145
+ getOptional(name) {
1146
+ return this.ensureBuilt().get(name);
1147
+ }
1201
1148
  all() {
1202
- return Array.from(this.types.values());
1149
+ return Array.from(this.ensureBuilt().values());
1203
1150
  }
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' }); }
1151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1152
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
1206
1153
  }
1207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1208
1155
  type: Injectable,
1209
1156
  args: [{
1210
1157
  providedIn: 'root',
1211
1158
  }]
1212
- }], ctorParameters: () => [] });
1159
+ }] });
1213
1160
 
1214
1161
  class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1215
1162
  constructor() {
@@ -1217,8 +1164,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1217
1164
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1218
1165
  this.grid = inject(AXBaseDataTable);
1219
1166
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1220
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1221
- this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : []));
1167
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1168
+ this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : /* istanbul ignore next */ []));
1222
1169
  this.rowInjectorsCache = new Map();
1223
1170
  this.hasExpressions = false;
1224
1171
  this.pendingEvaluations = new Set();
@@ -1239,6 +1186,19 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1239
1186
  get renderCellTemplate() {
1240
1187
  return this.cellTemplate ?? this._contentCellTemplate;
1241
1188
  }
1189
+ /**
1190
+ * True when the row should show the expand icon: either hasChild is true (from server/initial load)
1191
+ * or the row has loaded children (e.g. after refreshItemChildren when children go from 0 to 1).
1192
+ */
1193
+ hasExpandableRow(row) {
1194
+ const data = row?.data;
1195
+ if (!data)
1196
+ return false;
1197
+ if (data['hasChild'] === true)
1198
+ return true;
1199
+ const children = data['__meta__']?.['children'];
1200
+ return Array.isArray(children) && children.length > 0;
1201
+ }
1242
1202
  async handleExpandRow(row) {
1243
1203
  this.loadingRow.set(row);
1244
1204
  await this.grid.expandRow(row);
@@ -1446,8 +1406,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1446
1406
  }
1447
1407
  return rowInjector;
1448
1408
  }
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: [
1409
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1410
+ 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
1411
  AXPWidgetCoreService,
1452
1412
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1453
1413
  ], 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: `
@@ -1458,7 +1418,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1458
1418
  <div
1459
1419
  (click)="handleExpandRow(row)"
1460
1420
  class="ax-expand-handler"
1461
- [class.ax-invisible]="row.data.hasChild === false"
1421
+ [class.ax-invisible]="!hasExpandableRow(row)"
1462
1422
  id="ax-expand-handler-container"
1463
1423
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1464
1424
  >
@@ -1481,9 +1441,9 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1481
1441
  </div>
1482
1442
  </ng-template>
1483
1443
  <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 }); }
1444
+ `, 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
1445
  }
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1487
1447
  type: Component,
1488
1448
  args: [{
1489
1449
  selector: 'axp-widget-column-renderer',
@@ -1495,7 +1455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1495
1455
  <div
1496
1456
  (click)="handleExpandRow(row)"
1497
1457
  class="ax-expand-handler"
1498
- [class.ax-invisible]="row.data.hasChild === false"
1458
+ [class.ax-invisible]="!hasExpandableRow(row)"
1499
1459
  id="ax-expand-handler-container"
1500
1460
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1501
1461
  >
@@ -1563,15 +1523,15 @@ class AXPWidgetContainerComponent {
1563
1523
  this.builderService.setFunctions(v);
1564
1524
  }
1565
1525
  constructor() {
1566
- this.contextService = inject(AXPWidgetCoreContextStore);
1526
+ this.contextService = inject(AXPContextStore);
1567
1527
  this.builderService = inject(AXPWidgetCoreService);
1568
1528
  this.onContextChanged = new EventEmitter();
1569
1529
  this.status = computed(() => {
1570
1530
  return this.builderService.status();
1571
- }, ...(ngDevMode ? [{ debugName: "status" }] : []));
1531
+ }, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
1572
1532
  this.isBusy = computed(() => {
1573
1533
  return this.builderService.isBusy();
1574
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
1534
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
1575
1535
  effect(() => {
1576
1536
  if (this.contextService.isChanged()) {
1577
1537
  this.onContextChanged.emit(this.contextService.changeEvent());
@@ -1584,17 +1544,17 @@ class AXPWidgetContainerComponent {
1584
1544
  find(name) {
1585
1545
  return this.builderService.waitForWidget(name);
1586
1546
  }
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 }); }
1547
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1548
+ 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
1549
  }
1590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1591
1551
  type: Component,
1592
1552
  args: [{
1593
1553
  selector: 'axp-widgets-container',
1594
1554
  template: `<ng-content></ng-content>`,
1595
1555
  changeDetection: ChangeDetectionStrategy.OnPush,
1596
1556
  host: { style: 'display: contents;' },
1597
- providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore],
1557
+ providers: [AXPWidgetCoreService, AXPContextStore],
1598
1558
  standalone: false,
1599
1559
  }]
1600
1560
  }], ctorParameters: () => [], propDecorators: { onContextChanged: [{
@@ -1606,12 +1566,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1606
1566
  }] } });
1607
1567
 
1608
1568
  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>
1569
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1570
+ 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
1571
  <ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
1612
1572
  </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1613
1573
  }
1614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1615
1575
  type: Component,
1616
1576
  args: [{
1617
1577
  selector: 'axp-widget-placeholder',
@@ -1628,11 +1588,11 @@ class AXPWidgetRendererDirective {
1628
1588
  //#endregion
1629
1589
  //#endregion
1630
1590
  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" }] : []));
1591
+ this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : /* istanbul ignore next */ []));
1592
+ this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
1593
+ this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
1594
+ this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
1595
+ this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
1636
1596
  this.options = this._options.asReadonly();
1637
1597
  this.onOptionsChanged = output();
1638
1598
  this.onValueChanged = output();
@@ -1641,22 +1601,22 @@ class AXPWidgetRendererDirective {
1641
1601
  /**
1642
1602
  * Signal that emits the component reference when it's ready
1643
1603
  */
1644
- this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : []));
1604
+ this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : /* istanbul ignore next */ []));
1645
1605
  this.componentRefSignal = this._componentRefSignal.asReadonly();
1646
1606
  //#endregion
1647
1607
  //#region ---- Properties ----
1648
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1608
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1649
1609
  this.injector = inject(Injector);
1650
1610
  this.builderService = inject(AXPWidgetCoreService);
1651
- this.contextService = inject(AXPWidgetCoreContextStore);
1611
+ this.contextService = inject(AXPContextStore);
1652
1612
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1653
1613
  this.unsubscriber = inject(AXUnsubscriber);
1654
1614
  this.translateService = inject(AXTranslationService);
1655
1615
  this.widgetService = inject(AXPWidgetRegistryService);
1656
1616
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1657
1617
  this.viewContainerRef = inject(ViewContainerRef);
1658
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
1659
- this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
1618
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
1619
+ this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
1660
1620
  this.expressionEvaluators = new Map();
1661
1621
  this.renderTimeoutId = null;
1662
1622
  this.hasInitialRender = false;
@@ -1703,13 +1663,12 @@ class AXPWidgetRendererDirective {
1703
1663
  await this.updateOptionsBasedOnContext();
1704
1664
  this.applyOptions();
1705
1665
  }
1706
- await this.updateVisibility();
1707
- await this.updateValueBasedOnFormula();
1708
1666
  }
1709
1667
  else if (changed.path && this.isRelevantContextChange(changed.path)) {
1710
1668
  // console.log(`🎯 [${this.node().type}] Context change detected: ${changed.path}`);
1711
1669
  this.queueContextUpdate(changed.path);
1712
1670
  }
1671
+ await this.updateVisibility();
1713
1672
  });
1714
1673
  this.builderService.onRefresh.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
1715
1674
  await this.processBatchedUpdates();
@@ -1788,14 +1747,6 @@ class AXPWidgetRendererDirective {
1788
1747
  // console.log(`🔧 [${this.node().type}] Options updated (${optionsTime.toFixed(2)}ms)`);
1789
1748
  this.applyOptions();
1790
1749
  }
1791
- // Check formulas for any of the changed paths
1792
- const formulaStartTime = performance.now();
1793
- const formulaNeedsUpdate = paths.some((path) => this.checkFormulaForUpdate(this.node().formula, path));
1794
- if (formulaNeedsUpdate) {
1795
- // console.log(`🧮 [${this.node().type}] Formula needs update`);
1796
- await this.updateValueBasedOnFormula();
1797
- }
1798
- const formulaTime = performance.now() - formulaStartTime;
1799
1750
  // Check visibility for any of the changed paths
1800
1751
  const visibilityStartTime = performance.now();
1801
1752
  const visibilityNeedsUpdate = paths.some((path) => this.hasVisibilityDependency(path));
@@ -1810,7 +1761,7 @@ class AXPWidgetRendererDirective {
1810
1761
  });
1811
1762
  const totalTime = performance.now() - startTime;
1812
1763
  // console.log(
1813
- // `✅ [${this.node().type}] Batch processing completed in ${totalTime.toFixed(2)}ms (options: ${optionsTime.toFixed(2)}ms, formula: ${formulaTime.toFixed(2)}ms, visibility: ${visibilityTime.toFixed(2)}ms)`,
1764
+ // `✅ [${this.node().type}] Batch processing completed in ${totalTime.toFixed(2)}ms (options: ${optionsTime.toFixed(2)}ms, visibility: ${visibilityTime.toFixed(2)}ms)`,
1814
1765
  // );
1815
1766
  }
1816
1767
  //#endregion
@@ -1833,11 +1784,7 @@ class AXPWidgetRendererDirective {
1833
1784
  if (this.hasExpressionDependency(changedPath)) {
1834
1785
  return true;
1835
1786
  }
1836
- // 5. Formula dependency check - if widget's formula depends on this path
1837
- if (node.formula && this.checkFormulaForUpdate(node.formula, changedPath)) {
1838
- return true;
1839
- }
1840
- // 6. Trigger dependency check - if widget has triggers that depend on this path
1787
+ // 5. Trigger dependency check - if widget has triggers that depend on this path
1841
1788
  if (this.hasTriggerDependency(changedPath)) {
1842
1789
  return true;
1843
1790
  }
@@ -1847,77 +1794,88 @@ class AXPWidgetRendererDirective {
1847
1794
  }
1848
1795
  return false;
1849
1796
  }
1797
+ /**
1798
+ * True when a context store path used in an expression (`context.eval`, `context.options`) is
1799
+ * affected by `changedPath`.
1800
+ */
1801
+ contextStorePathDependsOnChangedPath(evalPath, changedPath) {
1802
+ const normalizePath = (p) => {
1803
+ if (!p)
1804
+ return p;
1805
+ const parts = p.split('.');
1806
+ const last = parts[parts.length - 1];
1807
+ if (last && last.endsWith('Id')) {
1808
+ parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1809
+ }
1810
+ return parts.join('.');
1811
+ };
1812
+ const isSegmentSuffix = (a, b) => {
1813
+ if (!a || !b)
1814
+ return false;
1815
+ const pa = a.split('.');
1816
+ const pb = b.split('.');
1817
+ if (pb.length > pa.length)
1818
+ return false;
1819
+ for (let i = 1; i <= pb.length; i++) {
1820
+ if (pa[pa.length - i] !== pb[pb.length - i])
1821
+ return false;
1822
+ }
1823
+ return true;
1824
+ };
1825
+ const evalNorm = normalizePath(evalPath);
1826
+ const changedNorm = normalizePath(changedPath);
1827
+ const rawMatch = evalPath === changedPath ||
1828
+ evalPath.startsWith(changedPath + '.') ||
1829
+ changedPath.startsWith(evalPath + '.') ||
1830
+ isSegmentSuffix(evalPath, changedPath) ||
1831
+ isSegmentSuffix(changedPath, evalPath);
1832
+ const normMatch = evalNorm === changedNorm ||
1833
+ evalNorm.startsWith(changedNorm + '.') ||
1834
+ changedNorm.startsWith(evalNorm + '.') ||
1835
+ isSegmentSuffix(evalNorm, changedNorm) ||
1836
+ isSegmentSuffix(changedNorm, evalNorm);
1837
+ if (rawMatch || normMatch) {
1838
+ return true;
1839
+ }
1840
+ return this.isPathAlias(evalPath, changedPath);
1841
+ }
1842
+ /**
1843
+ * Whether an expression template string reads context store paths affected by `changedPath`.
1844
+ */
1845
+ expressionTextDependsOnContextPath(expressionValue, changedPath) {
1846
+ const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1847
+ let match;
1848
+ while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
1849
+ if (this.contextStorePathDependsOnChangedPath(match[1], changedPath)) {
1850
+ return true;
1851
+ }
1852
+ }
1853
+ const contextOptionsQuoted = /context\.options\(\s*['"]([^'"]*)['"]\s*\)/g;
1854
+ while ((match = contextOptionsQuoted.exec(expressionValue)) !== null) {
1855
+ const sub = match[1];
1856
+ const evalPath = sub === '' ? 'options' : `options.${sub}`;
1857
+ if (this.contextStorePathDependsOnChangedPath(evalPath, changedPath)) {
1858
+ return true;
1859
+ }
1860
+ }
1861
+ const contextOptionsEmpty = /context\.options\(\s*\)/g;
1862
+ while ((match = contextOptionsEmpty.exec(expressionValue)) !== null) {
1863
+ if (this.contextStorePathDependsOnChangedPath('options', changedPath)) {
1864
+ return true;
1865
+ }
1866
+ }
1867
+ return false;
1868
+ }
1850
1869
  hasExpressionDependency(changedPath) {
1851
- // Check if any cached expressions depend on the changed path
1852
1870
  for (const [path, evaluator] of this.expressionEvaluators) {
1853
- // Check if the expression path itself contains the changed path
1854
1871
  if (path.includes(changedPath)) {
1855
1872
  return true;
1856
1873
  }
1857
- // Parse the actual expression content to check for context.eval() calls
1858
- // We need to get the original expression string to analyze it
1859
1874
  const node = this.node();
1860
1875
  const expressionValue = this.getExpressionValueFromNode(node, path);
1861
1876
  if (expressionValue && typeof expressionValue === 'string') {
1862
- // Look for context.eval() calls that reference the changed path
1863
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1864
- let match;
1865
- while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
1866
- const evalPath = match[1];
1867
- // Normalize Id-suffixed segments to dot-id form (e.g., 'typeId' -> 'type.id', 'person.typeId' -> 'person.type.id')
1868
- const normalizePath = (p) => {
1869
- if (!p)
1870
- return p;
1871
- const parts = p.split('.');
1872
- const last = parts[parts.length - 1];
1873
- if (last && last.endsWith('Id')) {
1874
- parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1875
- }
1876
- return parts.join('.');
1877
- };
1878
- const isSegmentSuffix = (a, b) => {
1879
- if (!a || !b)
1880
- return false;
1881
- const pa = a.split('.');
1882
- const pb = b.split('.');
1883
- if (pb.length > pa.length)
1884
- return false;
1885
- for (let i = 1; i <= pb.length; i++) {
1886
- if (pa[pa.length - i] !== pb[pb.length - i])
1887
- return false;
1888
- }
1889
- return true;
1890
- };
1891
- const evalNorm = normalizePath(evalPath);
1892
- const changedNorm = normalizePath(changedPath);
1893
- // Debug log for dependency check
1894
- // console.log(
1895
- // `🧭 [${this.node().type}] dep-check expr='${path}', changed='${changedPath}', eval='${evalPath}', evalNorm='${evalNorm}', changedNorm='${changedNorm}'`,
1896
- // );
1897
- // Generic direct and hierarchical dependency checks (raw and normalized)
1898
- const rawMatch = evalPath === changedPath ||
1899
- evalPath.startsWith(changedPath + '.') ||
1900
- changedPath.startsWith(evalPath + '.') ||
1901
- isSegmentSuffix(evalPath, changedPath) ||
1902
- isSegmentSuffix(changedPath, evalPath);
1903
- const normMatch = evalNorm === changedNorm ||
1904
- evalNorm.startsWith(changedNorm + '.') ||
1905
- changedNorm.startsWith(evalNorm + '.') ||
1906
- isSegmentSuffix(evalNorm, changedNorm) ||
1907
- isSegmentSuffix(changedNorm, evalNorm);
1908
- if (rawMatch || normMatch) {
1909
- // console.log(
1910
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (generic match)`,
1911
- // );
1912
- return true;
1913
- }
1914
- // Check for path aliases/mappings (e.g., typeId.id <-> type.id)
1915
- if (this.isPathAlias(evalPath, changedPath)) {
1916
- // console.log(
1917
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (path alias)`,
1918
- // );
1919
- return true;
1920
- }
1877
+ if (this.expressionTextDependsOnContextPath(expressionValue, changedPath)) {
1878
+ return true;
1921
1879
  }
1922
1880
  }
1923
1881
  }
@@ -2004,20 +1962,8 @@ class AXPWidgetRendererDirective {
2004
1962
  const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
2005
1963
  if (!visibility || typeof visibility !== 'string')
2006
1964
  return false;
2007
- // Check if visibility expression depends on the changed path
2008
1965
  if (this.expressionEvaluator.isExpression(visibility)) {
2009
- // Parse the visibility expression to check for context.eval() calls
2010
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
2011
- let match;
2012
- while ((match = contextEvalRegex.exec(visibility)) !== null) {
2013
- const evalPath = match[1];
2014
- // Check for direct or hierarchical dependency
2015
- if (evalPath === changedPath ||
2016
- evalPath.startsWith(changedPath + '.') ||
2017
- changedPath.startsWith(evalPath + '.')) {
2018
- return true;
2019
- }
2020
- }
1966
+ return this.expressionTextDependsOnContextPath(visibility, changedPath);
2021
1967
  }
2022
1968
  return false;
2023
1969
  }
@@ -2159,7 +2105,6 @@ class AXPWidgetRendererDirective {
2159
2105
  this.instance?.onValueChanged?.pipe(this.unsubscriber.takeUntilDestroy).subscribe((c) => {
2160
2106
  this.onValueChanged.emit({ sender: this, widget: c.sender });
2161
2107
  });
2162
- await this.updateValueBasedOnFormula();
2163
2108
  await this.updateVisibility();
2164
2109
  await this.assignTriggers();
2165
2110
  //
@@ -2234,16 +2179,6 @@ class AXPWidgetRendererDirective {
2234
2179
  return !isEqual(newOptions, this.lastAppliedOptions);
2235
2180
  }
2236
2181
  // Removed deepCloneValue method - now using Lodash cloneDeep
2237
- checkFormulaForUpdate(formula, path) {
2238
- if (formula) {
2239
- const regex = /context\.eval\('([^']+)'\)/g;
2240
- const matches = formula.match(regex);
2241
- const nodes = matches ? matches.map((match) => match.match(/'([^']+)'/)[1]) : [];
2242
- return nodes.includes(path);
2243
- }
2244
- else
2245
- return false;
2246
- }
2247
2182
  preprocessAndInitialOptions(obj, pathPrefix = '') {
2248
2183
  if (!obj) {
2249
2184
  return;
@@ -2309,8 +2244,13 @@ class AXPWidgetRendererDirective {
2309
2244
  const newValue = await evaluator();
2310
2245
  const evalTime = performance.now() - evalStartTime;
2311
2246
  // Check if result has actually changed using Lodash isEqual
2247
+ // Important: We must check if the key exists in the map, not just compare values
2248
+ // This handles the case where the expression evaluates to `undefined` for the first time
2249
+ // Without this check, `undefined` would be incorrectly treated as "no change"
2250
+ // because Map.get() returns `undefined` for non-existent keys
2251
+ const hasLastValue = this.lastExpressionResults.has(path);
2312
2252
  const lastValue = this.lastExpressionResults.get(path);
2313
- const hasChanged = !isEqual(newValue, lastValue);
2253
+ const hasChanged = !hasLastValue || !isEqual(newValue, lastValue);
2314
2254
  if (hasChanged) {
2315
2255
  // console.log(
2316
2256
  // `📝 [${this.node().type}] Expression '${path}' evaluated in ${evalTime.toFixed(2)}ms - value changed`,
@@ -2351,12 +2291,6 @@ class AXPWidgetRendererDirective {
2351
2291
  // );
2352
2292
  return changedUpdates.length;
2353
2293
  }
2354
- async updateValueBasedOnFormula() {
2355
- if (this.node().formula) {
2356
- const value = await this.evaluateExpression(this.node().formula);
2357
- this.instance.setValue(value);
2358
- }
2359
- }
2360
2294
  async updateVisibility() {
2361
2295
  const node = this.node();
2362
2296
  const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
@@ -2395,7 +2329,8 @@ class AXPWidgetRendererDirective {
2395
2329
  if (!this.isVisible()) {
2396
2330
  this.isVisible.set(true);
2397
2331
  if (this.componentRef && this.componentRef.location) {
2398
- this.componentRef.location.nativeElement.style.display = '';
2332
+ this.loadComponent();
2333
+ // this.componentRef.location.nativeElement.style.display = '';
2399
2334
  }
2400
2335
  }
2401
2336
  }
@@ -2403,7 +2338,8 @@ class AXPWidgetRendererDirective {
2403
2338
  if (this.isVisible()) {
2404
2339
  this.isVisible.set(false);
2405
2340
  if (this.componentRef && this.componentRef.location) {
2406
- this.componentRef.location.nativeElement.style.display = 'none';
2341
+ this.componentRef.destroy();
2342
+ // this.componentRef.location.nativeElement.style.display = 'none';
2407
2343
  }
2408
2344
  }
2409
2345
  }
@@ -2443,6 +2379,17 @@ class AXPWidgetRendererDirective {
2443
2379
  isDirty: () => {
2444
2380
  return this.contextService.isDirty();
2445
2381
  },
2382
+ /**
2383
+ * Host/widget-under-edit `options` from the shared context store (same values as
2384
+ * `context.eval('options' + (path ? '.' + path : ''))`), not `widget.options` on the nested
2385
+ * property field instance. Uses one `getValue` so smart-path behavior matches `context.eval`.
2386
+ */
2387
+ options: (path) => {
2388
+ if (path == null || path === '') {
2389
+ return this.contextService.getValue('options');
2390
+ }
2391
+ return this.contextService.getValue(`options.${path}`);
2392
+ },
2446
2393
  };
2447
2394
  }
2448
2395
  getEventScope() {
@@ -2481,6 +2428,16 @@ class AXPWidgetRendererDirective {
2481
2428
  }
2482
2429
  getWidgetScope() {
2483
2430
  return {
2431
+ /** Resolved options for this renderer's widget instance (not the host / property-viewer target). */
2432
+ options: (path) => {
2433
+ const opts = this.instance && typeof this.instance.options === 'function'
2434
+ ? this.instance.options()
2435
+ : this.mergedOptions();
2436
+ if (path == null || path === '') {
2437
+ return opts;
2438
+ }
2439
+ return getSmart(opts, path);
2440
+ },
2484
2441
  call: (name, ...args) => {
2485
2442
  this.instance.call(name, ...args);
2486
2443
  },
@@ -2586,14 +2543,14 @@ class AXPWidgetRendererDirective {
2586
2543
  // console.error('Error evaluating action expression:', templateExpression, error);
2587
2544
  }
2588
2545
  }
2589
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2590
- 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: [
2546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2547
+ 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: [
2591
2548
  {
2592
2549
  provide: AXUnsubscriber,
2593
2550
  },
2594
2551
  ], exportAs: ["widgetRenderer"], usesOnChanges: true, ngImport: i0 }); }
2595
2552
  }
2596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2597
2554
  type: Directive,
2598
2555
  args: [{
2599
2556
  selector: '[axp-widget-renderer]',
@@ -2609,63 +2566,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2609
2566
 
2610
2567
  const COMPONENTS = [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective];
2611
2568
  class AXPWidgetCoreModule {
2612
- static forRoot(config) {
2613
- return {
2614
- ngModule: AXPWidgetCoreModule,
2615
- providers: [
2616
- {
2617
- provide: 'AXPWidgetCoreModuleFactory',
2618
- useFactory: (registry) => async () => {
2619
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2620
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2621
- },
2622
- deps: [AXPWidgetRegistryService],
2623
- multi: true,
2624
- },
2625
- ],
2626
- };
2627
- }
2628
- static forChild(config) {
2629
- return {
2630
- ngModule: AXPWidgetCoreModule,
2631
- providers: [
2632
- {
2633
- provide: 'AXPWidgetCoreModuleFactory',
2634
- useFactory: (registry) => async () => {
2635
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2636
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2637
- },
2638
- deps: [AXPWidgetRegistryService],
2639
- multi: true,
2640
- },
2641
- ],
2642
- };
2643
- }
2644
- /**
2645
- * @ignore
2646
- */
2647
- constructor(instances) {
2648
- instances?.forEach((f) => {
2649
- f();
2650
- });
2651
- }
2652
- 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 }); }
2653
- 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] }); }
2654
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule] }); }
2569
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2570
+ 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] }); }
2571
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule] }); }
2655
2572
  }
2656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2657
2574
  type: NgModule,
2658
2575
  args: [{
2659
- imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule],
2576
+ imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule],
2660
2577
  exports: [...COMPONENTS],
2661
2578
  declarations: [...COMPONENTS],
2579
+ providers: [],
2662
2580
  }]
2663
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2664
- type: Optional
2665
- }, {
2666
- type: Inject,
2667
- args: ['AXPWidgetCoreModuleFactory']
2668
- }] }] });
2581
+ }] });
2669
2582
 
2670
2583
  class AXPPropertyEditorHelper {
2671
2584
  static expandShorthand(values) {
@@ -2842,6 +2755,120 @@ function findNonEmptyBreakpoints(values) {
2842
2755
  return nonEmptyBreakpoints;
2843
2756
  }
2844
2757
 
2758
+ //#region ---- Imports ----
2759
+ //#endregion
2760
+ //#region ---- Helper Class ----
2761
+ /**
2762
+ * Helper class for serializing and deserializing AXPWidgetNode to/from JSON
2763
+ */
2764
+ class AXPWidgetSerializationHelper {
2765
+ /**
2766
+ * Removes non-serializable properties from widget node
2767
+ * @param node - The widget node to clean
2768
+ * @param options - Serialization options
2769
+ * @returns Cleaned widget node ready for JSON serialization
2770
+ */
2771
+ static cleanNode(node, options = {}) {
2772
+ const { removeMeta = true, removeFunctions = true } = options;
2773
+ // Deep clone to avoid mutating original
2774
+ const cleaned = cloneDeep(node);
2775
+ // Remove meta property if requested
2776
+ if (removeMeta && 'meta' in cleaned) {
2777
+ delete cleaned.meta;
2778
+ }
2779
+ // Remove functions from options, triggers, and valueTransforms
2780
+ if (removeFunctions) {
2781
+ this.removeFunctions(cleaned);
2782
+ }
2783
+ // Recursively clean children
2784
+ if (cleaned.children && Array.isArray(cleaned.children)) {
2785
+ cleaned.children = cleaned.children.map((child) => this.cleanNode(child, options));
2786
+ }
2787
+ return cleaned;
2788
+ }
2789
+ /**
2790
+ * Recursively removes functions from object properties
2791
+ */
2792
+ static removeFunctions(obj) {
2793
+ if (obj === null || obj === undefined) {
2794
+ return;
2795
+ }
2796
+ if (Array.isArray(obj)) {
2797
+ obj.forEach((item) => this.removeFunctions(item));
2798
+ return;
2799
+ }
2800
+ if (typeof obj === 'object') {
2801
+ for (const key in obj) {
2802
+ if (typeof obj[key] === 'function') {
2803
+ delete obj[key];
2804
+ }
2805
+ else if (typeof obj[key] === 'object') {
2806
+ this.removeFunctions(obj[key]);
2807
+ }
2808
+ }
2809
+ }
2810
+ }
2811
+ /**
2812
+ * Converts AXPWidgetNode to JSON string
2813
+ * @param node - The widget node to serialize
2814
+ * @param options - Serialization options
2815
+ * @returns JSON string representation of the widget node
2816
+ */
2817
+ static toJson(node, options = {}) {
2818
+ const { pretty = false, ...cleanOptions } = options;
2819
+ const cleaned = this.cleanNode(node, cleanOptions);
2820
+ if (pretty) {
2821
+ return JSON.stringify(cleaned, null, 2);
2822
+ }
2823
+ return JSON.stringify(cleaned);
2824
+ }
2825
+ /**
2826
+ * Converts JSON string to AXPWidgetNode
2827
+ * @param json - JSON string to deserialize
2828
+ * @returns Parsed AXPWidgetNode object
2829
+ * @throws Error if JSON is invalid or doesn't match AXPWidgetNode structure
2830
+ */
2831
+ static fromJson(json) {
2832
+ try {
2833
+ const parsed = JSON.parse(json);
2834
+ // Basic validation - ensure it has at least a type property
2835
+ if (!parsed || typeof parsed !== 'object') {
2836
+ throw new Error('Invalid JSON: Expected an object');
2837
+ }
2838
+ if (!parsed.type) {
2839
+ throw new Error('Invalid AXPWidgetNode: Missing required property "type"');
2840
+ }
2841
+ // Recursively validate and parse children if they exist
2842
+ if (parsed.children && Array.isArray(parsed.children)) {
2843
+ parsed.children = parsed.children.map((child) => this.fromJson(JSON.stringify(child)));
2844
+ }
2845
+ return parsed;
2846
+ }
2847
+ catch (error) {
2848
+ if (error instanceof SyntaxError) {
2849
+ throw new Error(`Invalid JSON string: ${error.message}`);
2850
+ }
2851
+ throw error;
2852
+ }
2853
+ }
2854
+ /**
2855
+ * Removes meta property from widget node (similar to designer service)
2856
+ * @param node - The widget node to process
2857
+ * @returns Widget node without meta property
2858
+ */
2859
+ static removeMeta(node) {
2860
+ return this.cleanNode(node, { removeMeta: true, removeFunctions: false });
2861
+ }
2862
+ }
2863
+ //#endregion
2864
+
2865
+ /** Normalizes widget categories to an array for iteration and serialization. */
2866
+ function normalizeWidgetCategories(categories) {
2867
+ if (categories == null) {
2868
+ return [];
2869
+ }
2870
+ return Array.isArray(categories) ? categories : [categories];
2871
+ }
2845
2872
  const AXP_WIDGETS_LAYOUT_CATEGORY = {
2846
2873
  name: 'layout',
2847
2874
  order: 1,
@@ -2862,11 +2889,18 @@ const AXP_WIDGETS_ADVANCE_CATEGORY = {
2862
2889
  order: 4,
2863
2890
  title: 'Advance',
2864
2891
  };
2892
+ /** Widgets exposed to AI assistants for structured rendering (see Widgets:GetForAI). */
2893
+ const AXP_WIDGETS_AI_CATEGORY = {
2894
+ name: 'ai',
2895
+ order: 5,
2896
+ title: 'AI',
2897
+ };
2865
2898
  const AXP_WIDGETS_CATEGORIES = [
2866
2899
  AXP_WIDGETS_LAYOUT_CATEGORY,
2867
2900
  AXP_WIDGETS_EDITOR_CATEGORY,
2868
2901
  AXP_WIDGETS_ACTION_CATEGORY,
2869
2902
  AXP_WIDGETS_ADVANCE_CATEGORY,
2903
+ AXP_WIDGETS_AI_CATEGORY,
2870
2904
  ];
2871
2905
 
2872
2906
  var AXPWidgetGroupEnum;
@@ -2881,9 +2915,36 @@ var AXPWidgetGroupEnum;
2881
2915
  AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
2882
2916
  })(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
2883
2917
 
2918
+ //#region ---- Helpers ----
2919
+ /**
2920
+ * True when the widget declares the AI category (see {@link AXP_WIDGETS_AI_CATEGORY}).
2921
+ */
2922
+ function hasAiWidgetCategory(config) {
2923
+ return normalizeWidgetCategories(config.categories).some((c) => c.name === AXP_WIDGETS_AI_CATEGORY.name);
2924
+ }
2925
+ //#endregion
2926
+ //#region ---- Public API ----
2927
+ /**
2928
+ * Resolves AI catalog visibility using {@link AXPWidgetConfig.aiCatalog} and the AI widget category.
2929
+ * - `exclude`: never listed.
2930
+ * - `include`: always listed (override when the widget cannot declare the AI category yet).
2931
+ * - `inherit` / omitted: listed only if {@link hasAiWidgetCategory} is true.
2932
+ */
2933
+ function isWidgetAiCatalogIncluded(config) {
2934
+ const mode = config.aiCatalog ?? 'inherit';
2935
+ if (mode === 'exclude') {
2936
+ return false;
2937
+ }
2938
+ if (mode === 'include') {
2939
+ return true;
2940
+ }
2941
+ return hasAiWidgetCategory(config);
2942
+ }
2943
+ //#endregion
2944
+
2884
2945
  /**
2885
2946
  * Generated bundle index. Do not edit.
2886
2947
  */
2887
2948
 
2888
- 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 };
2949
+ 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_ADVANCE_CATEGORY, AXP_WIDGETS_AI_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DEFINITION_PROVIDER, AXP_WIDGET_TOKEN, buildWidgetRegistryMapFromProviders, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints, hasAiWidgetCategory, isWidgetAiCatalogIncluded, normalizeWidgetCategories };
2889
2950
  //# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map