@acorex/platform 21.0.0-next.7 → 21.0.0-next.71

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 (126) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +281 -23
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs +163 -0
  4. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +1381 -276
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +1538 -611
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +557 -826
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +1372 -210
  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 +6298 -1929
  16. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
  18. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs +371 -0
  20. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs +100 -0
  22. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-layout-entity.mjs +22537 -9975
  24. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-layout-views.mjs +865 -218
  26. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  27. package/fesm2022/acorex-platform-layout-widget-core.mjs +2138 -487
  28. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  29. 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
  30. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
  32. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
  34. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
  36. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs} +6 -6
  38. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs} +5 -5
  40. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs.map +1 -0
  41. 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
  42. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-layout-widgets.mjs +10434 -7982
  44. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-native.mjs +8 -7
  46. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  47. package/fesm2022/acorex-platform-runtime.mjs +391 -166
  48. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  49. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs +160 -0
  50. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs +120 -0
  52. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +1 -0
  53. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +21 -28
  54. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
  55. package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
  56. package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
  57. package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
  58. package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
  60. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
  61. package/fesm2022/acorex-platform-themes-default.mjs +2289 -90
  62. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  63. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
  64. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
  65. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
  66. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
  67. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs} +52 -33
  68. package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  70. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
  72. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  73. package/fesm2022/acorex-platform-themes-shared.mjs +790 -612
  74. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  75. package/fesm2022/acorex-platform-workflow.mjs +978 -238
  76. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  77. package/fesm2022/acorex-platform.mjs.map +1 -1
  78. package/package.json +40 -38
  79. package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
  80. package/{common/index.d.ts → types/acorex-platform-common.d.ts} +833 -89
  81. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +779 -164
  82. package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
  83. package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +277 -55
  84. package/types/acorex-platform-layout-components.d.ts +3257 -0
  85. package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
  86. package/types/acorex-platform-layout-entity.d.ts +4492 -0
  87. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +247 -62
  88. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +437 -131
  89. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1140 -506
  90. package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
  91. package/types/acorex-platform-runtime.d.ts +571 -0
  92. package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +254 -7
  93. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +30 -2
  94. package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +620 -617
  95. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
  96. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
  99. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
  106. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs +0 -1542
  108. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
  110. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
  111. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
  113. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
  115. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
  118. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs +0 -65
  120. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
  121. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
  122. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
  123. package/layout/components/index.d.ts +0 -1669
  124. package/layout/entity/index.d.ts +0 -2287
  125. package/runtime/index.d.ts +0 -307
  126. /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
@@ -1,136 +1,20 @@
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';
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';
2
+ import { signal, computed, Injectable, InjectionToken, inject, ElementRef, effect, untracked, EventEmitter, Injector, ChangeDetectorRef, ViewChild, Input, Output, ChangeDetectionStrategy, Component, input, output, ViewContainerRef, Directive, NgModule } from '@angular/core';
3
+ import { convertArrayToDataSource, AXDataSource, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES } from '@acorex/cdk/common';
4
+ import { AXPContextStore, AXPDataSourceDefinitionProviderService, extractValue, AXPExpressionEvaluatorService, getSmart } from '@acorex/platform/core';
5
+ export { normalizeDefinitionCategories } from '@acorex/platform/core';
6
+ import { set, merge, cloneDeep, isNil, get, isEqual, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
6
7
  import { Subject, BehaviorSubject, filter } from 'rxjs';
7
- import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
8
8
  import * as i1$1 from '@acorex/components/skeleton';
9
9
  import { AXSkeletonModule } from '@acorex/components/skeleton';
10
10
  import * as i2 from '@acorex/core/translation';
11
11
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
12
12
  import { PortalModule } from '@angular/cdk/portal';
13
13
  import * as i1 from '@angular/common';
14
- import { CommonModule } from '@angular/common';
14
+ import { CommonModule, NgComponentOutlet } from '@angular/common';
15
15
  import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
16
16
  import { AXUnsubscriber } from '@acorex/core/utils';
17
17
 
18
- class AXPWidgetCoreContextChangeEvent {
19
- }
20
- const AXPWidgetCoreContextStore = signalStore(
21
- // Initial State
22
- withState(() => ({
23
- data: {}, // Shared context data
24
- state: 'initiated', // Current state
25
- initialSnapshot: {}, // Snapshot of the first initialized state
26
- previousSnapshot: {}, // Snapshot of the previous state
27
- lastChange: {
28
- state: 'initiated',
29
- }, // Last change event
30
- })),
31
- // Computed Signals
32
- withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
33
- isChanged: computed(() => state() === 'changed'),
34
- isReset: computed(() => state() === 'restored'),
35
- isInitiated: computed(() => state() === 'initiated'),
36
- isEmpty: computed(() => Object.keys(data()).length === 0),
37
- isDirty: computed(() => !isEqual(data(), previousSnapshot())),
38
- snapshot: computed(() => cloneDeep(data())), // Current data snapshot
39
- initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
40
- previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
41
- changeEvent: computed(() => lastChange()), // Reactive last change event
42
- })),
43
- // Methods for State Management
44
- withMethods((store) => ({
45
- // Update a specific value
46
- update(path, value) {
47
- const currentData = cloneDeep(store.data());
48
- const oldValue = get(currentData, path);
49
- // Skip if the value hasn't changed
50
- if (isEqual(oldValue, value)) {
51
- return;
52
- }
53
- // Update the value and prepare the change event
54
- const updatedData = setSmart(currentData, path, value);
55
- const changeEvent = {
56
- oldValue,
57
- newValue: value,
58
- path,
59
- state: 'changed',
60
- data: updatedData,
61
- };
62
- // Patch the state
63
- patchState(store, {
64
- previousSnapshot: store.snapshot(), // Save the previous state
65
- data: updatedData,
66
- state: 'changed',
67
- lastChange: changeEvent,
68
- });
69
- },
70
- patch(context) {
71
- const currentData = cloneDeep(store.data());
72
- // Update the value and prepare the change event
73
- const updatedData = { ...currentData, ...context };
74
- const changeEvent = {
75
- state: 'patch',
76
- data: updatedData,
77
- };
78
- // Patch the state
79
- patchState(store, {
80
- previousSnapshot: store.snapshot(), // Save the previous state
81
- data: updatedData,
82
- state: 'changed',
83
- lastChange: changeEvent,
84
- });
85
- },
86
- // Reset to the initial state
87
- reset() {
88
- const initialData = store.initial();
89
- const changeEvent = {
90
- oldValue: cloneDeep(store.data()), // Current data becomes old value
91
- newValue: cloneDeep(initialData), // Reset to the initial state
92
- path: '',
93
- state: 'restored',
94
- data: initialData,
95
- };
96
- patchState(store, {
97
- previousSnapshot: store.snapshot(), // Save the previous state
98
- data: initialData,
99
- state: 'restored',
100
- lastChange: changeEvent,
101
- });
102
- },
103
- // Initialize the state
104
- set(initialData) {
105
- const currentData = store.data();
106
- if (isEqual(currentData, initialData)) {
107
- return; // Skip if the current state matches the initial state
108
- }
109
- const changeEvent = {
110
- oldValue: null,
111
- newValue: cloneDeep(initialData),
112
- path: '',
113
- state: 'initiated',
114
- data: initialData,
115
- };
116
- patchState(store, {
117
- initialSnapshot: cloneDeep(initialData), // Save the initial state
118
- previousSnapshot: store.snapshot(), // Save the current state as the previous
119
- data: initialData,
120
- state: 'initiated',
121
- lastChange: changeEvent,
122
- });
123
- },
124
- // Get a specific value
125
- getValue(path) {
126
- return get(store.data(), path);
127
- },
128
- // Check if a path exists in the context
129
- hasValue(path) {
130
- return has(store.data(), path);
131
- },
132
- })));
133
-
134
18
  var AXPPageStatus;
135
19
  (function (AXPPageStatus) {
136
20
  // Idle statuses
@@ -170,17 +54,20 @@ class AXPWidgetCoreElement {
170
54
  }
171
55
  class AXPWidgetCoreService {
172
56
  constructor() {
173
- this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : []));
174
- this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : []));
57
+ this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : /* istanbul ignore next */ []));
58
+ this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : /* istanbul ignore next */ []));
175
59
  this.onRefresh = new Subject();
176
60
  this.widgets = new Map();
177
61
  this.onWidgetRegistered = new Subject();
178
- this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : []));
62
+ this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : /* istanbul ignore next */ []));
179
63
  this.status = this.status$.asReadonly();
180
64
  this.isBusy = computed(() => {
181
65
  return [AXPPageStatus.Processing, AXPPageStatus.Submitting, AXPPageStatus.Rendering].includes(this.status());
182
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
183
- this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : []));
66
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
67
+ this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : /* istanbul ignore next */ []));
68
+ /** Bumped when a widget reports dirty-state changes via `api().isDirty()`. */
69
+ this.dirtyWidgetsRevision = signal(0, ...(ngDevMode ? [{ debugName: "dirtyWidgetsRevision" }] : /* istanbul ignore next */ []));
70
+ this.dirtyWidgetsRevisionSignal = this.dirtyWidgetsRevision.asReadonly();
184
71
  }
185
72
  get variables() {
186
73
  return this.variables$();
@@ -284,14 +171,33 @@ class AXPWidgetCoreService {
284
171
  listRegisteredWidgetNames() {
285
172
  return Array.from(this.widgets.keys());
286
173
  }
174
+ /** Notifies listeners that a widget's composite dirty state may have changed. */
175
+ notifyWidgetDirtyChanged() {
176
+ this.dirtyWidgetsRevision.update((value) => value + 1);
177
+ }
178
+ /**
179
+ * Returns whether any registered widget reports dirty state via `api().isDirty()`.
180
+ */
181
+ hasDirtyWidgets() {
182
+ for (const widget of this.widgets.values()) {
183
+ const isDirty = widget.api()?.['isDirty'];
184
+ if (typeof isDirty === 'function' && isDirty()) {
185
+ return true;
186
+ }
187
+ }
188
+ return false;
189
+ }
287
190
  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 }); }
191
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
192
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService }); }
290
193
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
292
195
  type: Injectable
293
196
  }] });
294
197
 
198
+ //
199
+ // @deprecated
200
+ // Prefer AXPWidgetsList from @acorex/modules/common; dashboard widget type ids live in dashboard-management RootConfig.widgets.
295
201
  const AXPWidgetsCatalog = {
296
202
  timeDuration: 'time-duration',
297
203
  timeDurationFilter: 'time-duration-filter',
@@ -315,7 +221,9 @@ const AXPWidgetsCatalog = {
315
221
  pageLayout: 'page-layout',
316
222
  repeaterLayout: 'repeater-layout',
317
223
  textBlockLayout: 'text-block-layout',
318
- fileUploader: 'file-uploader',
224
+ alertBoxLayout: 'alert-box-layout',
225
+ badgeLayout: 'badge-layout',
226
+ attachments: 'attachments',
319
227
  fileTypeExtension: 'file-type-extension',
320
228
  map: 'map',
321
229
  imageMarker: 'image-marker',
@@ -343,7 +251,6 @@ const AXPWidgetsCatalog = {
343
251
  tableLayout: 'table-layout',
344
252
  tableItem: 'table-item-layout',
345
253
  avatar: 'avatar',
346
- themePaletteChooser: 'theme-palette-chooser',
347
254
  themeModeChooser: 'theme-mode-chooser',
348
255
  menuOrientationChooser: 'menu-orientation-chooser',
349
256
  fontStyleChooser: 'font-style-chooser',
@@ -371,31 +278,23 @@ const AXPWidgetsCatalog = {
371
278
  betweenValidation: 'between-validation',
372
279
  equalValidation: 'equal-validation',
373
280
  callbackValidation: 'callback-validation',
374
- donutChart: 'donut-chart',
375
- lineChart: 'line-chart',
376
- barChart: 'bar-chart',
377
- gaugeChart: 'gauge-chart',
378
- stickyNote: 'sticky-note',
379
- clockCalendar: 'clock-calendar',
380
- analogClock: 'analog-clock',
381
- weather: 'weather',
382
- minimalWeather: 'minimal-weather',
383
- advancedWeather: 'advanced-weather',
384
281
  metaData: 'meta-data-editor',
385
282
  templateEditor: 'template-box-editor',
283
+ templateContentEditor: 'template-content-editor',
386
284
  panel: 'panel',
387
285
  notification: 'notification',
388
- taskBoard: 'task-board',
389
286
  comment: 'comment',
390
287
  dataList: 'data-list',
391
288
  listToolbar: 'list-toolbar',
392
289
  entityList: 'entity-list',
290
+ pageComponent: 'page-component',
393
291
  editorJs: 'editor-js-editor',
394
292
  documentUploader: 'document-uploader',
395
- signatureList: 'signature-list',
396
293
  stepWizard: 'step-wizard',
397
294
  progressBar: 'progress-bar-editor',
398
- rate: 'rate-picker-editor'
295
+ rate: 'rate-picker-editor',
296
+ documentFileTypeFilter: 'document-file-type-filter',
297
+ entityDefinitionProvider: 'entity-definition-provider-editor',
399
298
  };
400
299
 
401
300
  function cloneProperty(property, values) {
@@ -450,7 +349,10 @@ function createBooleanProperty(ctor) {
450
349
  type: AXPWidgetsCatalog.toggle,
451
350
  },
452
351
  },
453
- visible: ctor.visible ?? true,
352
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
353
+ binding: {
354
+ enabled: true,
355
+ },
454
356
  };
455
357
  }
456
358
  function createSelectProperty(ctor) {
@@ -474,7 +376,7 @@ function createSelectProperty(ctor) {
474
376
  },
475
377
  },
476
378
  },
477
- visible: ctor.visible ?? true,
379
+ visible: !isNil(ctor.visible) ? ctor.visible : true,
478
380
  };
479
381
  }
480
382
  const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
@@ -486,22 +388,22 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
486
388
  this.token = inject(AXP_WIDGET_TOKEN);
487
389
  this.host = inject(ElementRef).nativeElement;
488
390
  this.layoutService = inject(AXPWidgetCoreService);
489
- this.contextService = inject(AXPWidgetCoreContextStore);
391
+ this.contextService = inject(AXPContextStore);
490
392
  this.config = this.token.config;
491
393
  this.node = this.token.node;
492
394
  this.name = this.token.node.name;
493
395
  this.component = this;
494
- this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
396
+ this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
495
397
  this.options = this._options.asReadonly();
496
398
  this.onOptionsChanged = new Subject();
497
- this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : []));
399
+ this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
498
400
  this.status = this._status.asReadonly();
499
401
  this.onStatusChanged = new BehaviorSubject(this._status());
500
402
  this.#statusEffect = effect(() => {
501
403
  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" }] : []));
404
+ }, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
405
+ this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
406
+ this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : /* istanbul ignore next */ []));
505
407
  this.children = this._children.asReadonly();
506
408
  }
507
409
  get id() {
@@ -530,7 +432,7 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
530
432
  output(name) {
531
433
  const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
532
434
  if (outputs.some((c) => c.name == name)) {
533
- const opt = get(this, name);
435
+ const opt = outputs.find((c) => c.name == name)?.value;
534
436
  if (typeof opt == 'function') {
535
437
  return opt();
536
438
  }
@@ -548,10 +450,10 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
548
450
  this._children.set([...children]);
549
451
  }
550
452
  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 }); }
453
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
454
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent }); }
553
455
  }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
555
457
  type: Injectable
556
458
  }] });
557
459
  class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
@@ -562,10 +464,10 @@ class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
562
464
  }
563
465
  super.ngOnInit();
564
466
  }
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 }); }
467
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
468
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
567
469
  }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
569
471
  type: Injectable
570
472
  }] });
571
473
  class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
@@ -576,11 +478,11 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
576
478
  this._isValueWidget = false;
577
479
  this.isValueWidget = () => this._isValueWidget;
578
480
  this.onValueChanged = new Subject();
579
- this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : []));
580
- this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : []));
481
+ this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : /* istanbul ignore next */ []));
482
+ this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : /* istanbul ignore next */ []));
581
483
  this.getValue = computed(() => {
582
484
  return this.fullPath() ? this.extractValue(this.fullPath()) : null;
583
- }, ...(ngDevMode ? [{ debugName: "getValue", equal: isEqual }] : [{ equal: isEqual }]));
485
+ }, { ...(ngDevMode ? { debugName: "getValue" } : /* istanbul ignore next */ {}), equal: isEqual });
584
486
  this.validationRules = computed(() => {
585
487
  const validationsRaw = this.options()['validations'];
586
488
  if (validationsRaw == null) {
@@ -593,7 +495,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
593
495
  message: c.message,
594
496
  options: c.options,
595
497
  }));
596
- }, ...(ngDevMode ? [{ debugName: "validationRules" }] : []));
498
+ }, ...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
597
499
  }
598
500
  ngOnInit() {
599
501
  this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
@@ -601,7 +503,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
601
503
  this.detectFullPath();
602
504
  // Set defaultValue if it exists and the path doesn't exist in context
603
505
  if (!isNil(this.defaultValue) && this.fullPath() && !this.contextService.hasValue(this.fullPath())) {
604
- this.setValue(this.defaultValue);
506
+ this.setValue(this.defaultValue, { origin: 'system' });
605
507
  }
606
508
  }
607
509
  //
@@ -614,7 +516,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
614
516
  }
615
517
  return rawValue;
616
518
  }
617
- setValue(value) {
519
+ setValue(value, options) {
618
520
  if (this.node.valueTransforms?.setter) {
619
521
  value = this.node.valueTransforms?.setter(value);
620
522
  }
@@ -623,14 +525,23 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
623
525
  if (isNil(value) && isNil(oldValue)) {
624
526
  return;
625
527
  }
626
- if (isEqual(oldValue, value)) {
528
+ // Reordered arrays must persist even when items are deep-equal (e.g. empty row objects).
529
+ const isArrayReorder = Array.isArray(oldValue) &&
530
+ Array.isArray(value) &&
531
+ oldValue.length === value.length &&
532
+ oldValue.some((v, i) => v !== value[i]);
533
+ if (!isArrayReorder && isEqual(oldValue, value)) {
627
534
  return;
628
535
  }
629
536
  if (this.fullPath()) {
630
- this.contextService.update(this.fullPath(), value);
537
+ this.contextService.update(this.fullPath(), value, { origin: options?.origin ?? 'user' });
631
538
  this.onValueChanged.next({ sender: this });
632
539
  }
633
540
  }
541
+ /** Persists a user-initiated value change into the shared context store. */
542
+ setUserValue(value) {
543
+ this.setValue(value, { origin: 'user' });
544
+ }
634
545
  detectFullPath() {
635
546
  const sections = [];
636
547
  const ids = [];
@@ -667,26 +578,26 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
667
578
  }
668
579
  handleValueChanged(e) {
669
580
  if (e.isUserInteraction) {
670
- this.setValue(e.value);
581
+ this.setUserValue(e.value);
671
582
  }
672
583
  }
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 }); }
584
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
585
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent }); }
675
586
  }
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
677
588
  type: Injectable
678
589
  }] });
679
590
  class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
680
591
  constructor() {
681
592
  super(...arguments);
682
593
  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" }] : []));
594
+ this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
595
+ this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
685
596
  this.textTemplate = computed(() => isNil(this.options()['textTemplate'])
686
597
  ? 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" }] : []));
598
+ : this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : /* istanbul ignore next */ []));
599
+ this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
600
+ this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
690
601
  //#region ---- DataSource Loading Effect ----
691
602
  /**
692
603
  * Track the last loaded string dataSource reference to prevent infinite loops
@@ -766,7 +677,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
766
677
  this.dataSource.set(convertArrayToDataSource([]));
767
678
  }
768
679
  });
769
- }, ...(ngDevMode ? [{ debugName: "rf" }] : []));
680
+ }, ...(ngDevMode ? [{ debugName: "rf" }] : /* istanbul ignore next */ []));
770
681
  this.effect2 = effect(async () => {
771
682
  const value = this.getValue();
772
683
  const items = [];
@@ -777,7 +688,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
777
688
  items.push(await this.extractItem(value));
778
689
  }
779
690
  this.selectedItems.set(items.filter((c) => c != null));
780
- }, ...(ngDevMode ? [{ debugName: "effect2" }] : []));
691
+ }, ...(ngDevMode ? [{ debugName: "effect2" }] : /* istanbul ignore next */ []));
781
692
  }
782
693
  //#endregion
783
694
  async extractItem(item) {
@@ -802,10 +713,10 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
802
713
  [this.textField()]: item,
803
714
  };
804
715
  }
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 }); }
716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
717
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent }); }
807
718
  }
808
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
809
720
  type: Injectable
810
721
  }] });
811
722
  class AXPColumnWidgetComponent {
@@ -813,20 +724,22 @@ class AXPColumnWidgetComponent {
813
724
  this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
814
725
  this.path = this.token.path;
815
726
  this.options = this.token.options ?? {};
727
+ /** Column header caption when rendered inside `axp-widget-column-renderer`. */
728
+ this.columnCaption = this.token.caption;
816
729
  this.rawValue = null;
817
730
  this.nullText = this.options['nullText'];
818
731
  this.nullValue = this.options['nullValue'];
819
- this.value = computed(() => {
732
+ this.value = () => {
820
733
  if (isNil(this.rawValue) && !isNil(this.nullValue)) {
821
734
  return this.nullValue;
822
735
  }
823
736
  return this.rawValue;
824
- }, ...(ngDevMode ? [{ debugName: "value" }] : []));
737
+ };
825
738
  }
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 }); }
739
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
740
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent }); }
828
741
  }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
830
743
  type: Injectable
831
744
  }] });
832
745
 
@@ -855,7 +768,7 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
855
768
  style['overflow-y'] = overflowY ?? '';
856
769
  style['direction'] = direction ?? '';
857
770
  return style;
858
- }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : []));
771
+ }, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : /* istanbul ignore next */ []));
859
772
  this.blockStyle = computed(() => {
860
773
  const options = this.options();
861
774
  const style = { ...this.hostBoxStyle() };
@@ -872,47 +785,47 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
872
785
  style['height'] = height ?? '';
873
786
  style['max-height'] = maxHeight ?? '';
874
787
  return style;
875
- }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : []));
788
+ }, ...(ngDevMode ? [{ debugName: "blockStyle" }] : /* istanbul ignore next */ []));
876
789
  this.inlineStyle = computed(() => {
877
790
  return { ...this.hostBoxStyle() };
878
- }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : []));
791
+ }, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : /* istanbul ignore next */ []));
879
792
  this.blockClass = computed(() => {
880
793
  return {
881
794
  'ax-block': true,
882
795
  'ax-w-full': true,
883
796
  // 'ax-widget-outline': true,
884
797
  };
885
- }, ...(ngDevMode ? [{ debugName: "blockClass" }] : []));
798
+ }, ...(ngDevMode ? [{ debugName: "blockClass" }] : /* istanbul ignore next */ []));
886
799
  this.inlineClass = computed(() => {
887
800
  return {
888
801
  'ax-inline-block': true,
889
802
  };
890
- }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : []));
803
+ }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : /* istanbul ignore next */ []));
891
804
  }
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 }); }
805
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
806
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
894
807
  }
895
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
896
809
  type: Injectable
897
810
  }] });
898
811
 
899
812
  class AXPBlockBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
900
813
  constructor() {
901
814
  super(...arguments);
902
- this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
903
- this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
815
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
816
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
904
817
  }
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 }); }
818
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
819
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
907
820
  }
908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
821
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
909
822
  type: Injectable
910
823
  }] });
911
824
 
912
825
  class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
913
826
  constructor() {
914
827
  super(...arguments);
915
- this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : []));
828
+ this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : /* istanbul ignore next */ []));
916
829
  this.hostFlexStyle = computed(() => {
917
830
  const blockStyle = this.blockStyle();
918
831
  const style = { ...blockStyle };
@@ -951,45 +864,45 @@ class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
951
864
  style['gap'] = flex.gap;
952
865
  }
953
866
  return style;
954
- }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : []));
867
+ }, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : /* istanbul ignore next */ []));
955
868
  this.hostFlexClass = computed(() => {
956
869
  return {
957
870
  ...this.blockClass(),
958
871
  'ax-flex': true,
959
872
  'ax-h-full': true,
960
873
  };
961
- }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : []));
874
+ }, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : /* istanbul ignore next */ []));
962
875
  this.hostClass = computed(() => {
963
876
  return this.hostFlexClass();
964
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
877
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
965
878
  this.hostStyle = computed(() => {
966
879
  return this.hostFlexStyle();
967
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
880
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
968
881
  }
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 }); }
882
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
883
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
971
884
  }
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
885
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
973
886
  type: Injectable
974
887
  }] });
975
888
 
976
889
  class AXPInlineBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
977
890
  constructor() {
978
891
  super(...arguments);
979
- this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
980
- this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
892
+ this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
893
+ this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
981
894
  }
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 }); }
895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
896
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
984
897
  }
985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
986
899
  type: Injectable
987
900
  }] });
988
901
 
989
902
  class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComponent {
990
903
  constructor() {
991
904
  super(...arguments);
992
- this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : []));
905
+ this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : /* istanbul ignore next */ []));
993
906
  this.hostFlexItemStyle = computed(() => {
994
907
  const inlineStyle = this.blockStyle();
995
908
  const style = { ...inlineStyle };
@@ -1025,37 +938,37 @@ class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComp
1025
938
  style['align-self'] = fi.alignSelf;
1026
939
  }
1027
940
  return style;
1028
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : []));
941
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : /* istanbul ignore next */ []));
1029
942
  this.hostFlexItemClass = computed(() => {
1030
943
  return {
1031
944
  ...this.blockClass(),
1032
945
  };
1033
- }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : []));
946
+ }, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : /* istanbul ignore next */ []));
1034
947
  this.hostClass = computed(() => {
1035
948
  return this.hostFlexItemClass();
1036
- }, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
949
+ }, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1037
950
  this.hostStyle = computed(() => {
1038
951
  return this.hostFlexItemStyle();
1039
- }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
952
+ }, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1040
953
  }
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 }); }
954
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
955
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
1043
956
  }
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
1045
958
  type: Injectable
1046
959
  }] });
1047
960
 
1048
961
  class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
1049
962
  constructor() {
1050
963
  super(...arguments);
1051
- this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : []));
964
+ this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
1052
965
  this.hostGridStyle = computed(() => {
1053
966
  const style = { ...this.inlineStyle() };
1054
967
  const g = this.grid()?.default;
1055
968
  if (g?.gap)
1056
969
  style['gap'] = g.gap;
1057
970
  return style;
1058
- }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : []));
971
+ }, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : /* istanbul ignore next */ []));
1059
972
  this.hostGridClass = computed(() => {
1060
973
  const cls = {
1061
974
  ...this.inlineClass(),
@@ -1064,8 +977,7 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1064
977
  const g = this.grid()?.default;
1065
978
  if (g?.columns)
1066
979
  cls[`lg:ax-grid-cols-${g.columns}`] = true;
1067
- if (g?.rows)
1068
- cls[`lg:ax-grid-rows-${g.rows}`] = true;
980
+ // if (g?.rows) cls[`lg:ax-grid-rows-${g.rows}`] = true;
1069
981
  if (g?.justifyItems)
1070
982
  cls[`lg:ax-justify-items-${g.justifyItems}`] = true;
1071
983
  if (g?.alignItems)
@@ -1073,21 +985,21 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
1073
985
  if (g?.autoFlow)
1074
986
  cls[`lg:ax-grid-flow-${g.autoFlow}`] = true;
1075
987
  return cls;
1076
- }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : []));
1077
- this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1078
- this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
988
+ }, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : /* istanbul ignore next */ []));
989
+ this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
990
+ this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1079
991
  }
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 }); }
992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
993
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
1082
994
  }
1083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
1084
996
  type: Injectable
1085
997
  }] });
1086
998
 
1087
999
  class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetComponent {
1088
1000
  constructor() {
1089
1001
  super(...arguments);
1090
- this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : []));
1002
+ this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : /* istanbul ignore next */ []));
1091
1003
  this.hostGridItemStyle = computed(() => {
1092
1004
  const style = { ...this.hostFlexStyle() };
1093
1005
  const g = this.gridItem();
@@ -1096,10 +1008,13 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1096
1008
  if (g?.justifySelf)
1097
1009
  style['justify-self'] = g.justifySelf;
1098
1010
  return style;
1099
- }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : []));
1011
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : /* istanbul ignore next */ []));
1100
1012
  this.hostGridItemClass = computed(() => {
1101
1013
  const cls = { ...this.hostFlexClass() };
1102
1014
  const g = this.gridItem();
1015
+ // Mobile-first: full width on small screens so items stack vertically and don't overflow
1016
+ cls['ax-col-span-12'] = true;
1017
+ // Large screens: apply defined placement so multi-column layout works on desktop
1103
1018
  if (g?.colSpan)
1104
1019
  cls[`lg:ax-col-span-${g.colSpan}`] = true;
1105
1020
  if (g?.colStart)
@@ -1113,14 +1028,14 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
1113
1028
  if (g?.rowEnd)
1114
1029
  cls[`lg:ax-row-end-${g.rowEnd}`] = true;
1115
1030
  return cls;
1116
- }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : []));
1117
- this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1118
- this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1031
+ }, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : /* istanbul ignore next */ []));
1032
+ this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1033
+ this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1119
1034
  }
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 }); }
1035
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1036
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
1122
1037
  }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
1124
1039
  type: Injectable
1125
1040
  }] });
1126
1041
 
@@ -1129,27 +1044,27 @@ class AXPTableBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponen
1129
1044
  super(...arguments);
1130
1045
  this.hostTableClass = computed(() => ({
1131
1046
  ...this.blockClass(),
1132
- }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : []));
1047
+ }), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : /* istanbul ignore next */ []));
1133
1048
  this.hostTableStyle = computed(() => {
1134
1049
  const style = { ...this.blockStyle() };
1135
1050
  style['overflow-x'] = 'auto';
1136
1051
  return style;
1137
- }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : []));
1138
- this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
1139
- this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
1052
+ }, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : /* istanbul ignore next */ []));
1053
+ this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1054
+ this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1140
1055
  }
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 }); }
1056
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1057
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
1143
1058
  }
1144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1059
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
1145
1060
  type: Injectable
1146
1061
  }] });
1147
1062
 
1148
1063
  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 }); }
1064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1065
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
1151
1066
  }
1152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
1153
1068
  type: Injectable
1154
1069
  }] });
1155
1070
 
@@ -1159,57 +1074,105 @@ class AXPTableItemBaseLayoutWidgetComponent extends AXPTableItemOpsBaseLayoutWid
1159
1074
  this.colSpan = computed(() => {
1160
1075
  const v = this.options()?.colSpan;
1161
1076
  return v ? Math.max(1, v) : 1;
1162
- }, ...(ngDevMode ? [{ debugName: "colSpan" }] : []));
1077
+ }, ...(ngDevMode ? [{ debugName: "colSpan" }] : /* istanbul ignore next */ []));
1163
1078
  this.rowSpan = computed(() => {
1164
1079
  const v = this.options()?.rowSpan;
1165
1080
  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" }] : []));
1081
+ }, ...(ngDevMode ? [{ debugName: "rowSpan" }] : /* istanbul ignore next */ []));
1082
+ this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
1083
+ this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
1169
1084
  }
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 }); }
1085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
1086
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
1172
1087
  }
1173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
1174
1089
  type: Injectable
1175
1090
  }] });
1176
1091
 
1092
+ //#region ---- Imports ----
1093
+ /**
1094
+ * Injection token for widget definition providers.
1095
+ * Modules register their widget providers using this token (multi: true).
1096
+ */
1097
+ const AXP_WIDGET_DEFINITION_PROVIDER = new InjectionToken('AXP_WIDGET_DEFINITION_PROVIDER', {
1098
+ factory: () => [],
1099
+ });
1100
+ //#endregion
1101
+
1102
+ //#region ---- Build widget map (shared with tooling / snapshot scripts) ----
1103
+ //TODO RECHECK THIS FUNCTION s.hosseini
1104
+ /**
1105
+ * Merges core + extended widgets the same way as AXPWidgetRegistryService.ensureBuilt().
1106
+ * Use with concrete providers (e.g. AXPCoreWidgetsProvider, AXPEntityWidgetsProvider) in Node scripts without DI.
1107
+ */
1108
+ function buildWidgetRegistryMapFromProviders(providers) {
1109
+ const types = new Map();
1110
+ const AXPExtendedWidgets = [];
1111
+ for (const provider of providers) {
1112
+ const widgets = provider.getWidgets?.() ?? [];
1113
+ for (const w of widgets) {
1114
+ types.set(w.name, w);
1115
+ }
1116
+ const extended = provider.getExtendedWidgets?.() ?? [];
1117
+ AXPExtendedWidgets.push(...extended);
1118
+ }
1119
+ for (const { parentName, widget } of AXPExtendedWidgets) {
1120
+ const parent = types.get(parentName);
1121
+ if (parent) {
1122
+ const merged = merge({}, parent, widget);
1123
+ merged.name = widget.name;
1124
+ types.set(merged.name, merged);
1125
+ }
1126
+ }
1127
+ return types;
1128
+ }
1129
+ //#endregion
1130
+ //#region ---- Widget Registry Service (Token-Based) ----
1131
+ /**
1132
+ * Aggregates widgets from all AXP_WIDGET_DEFINITION_PROVIDER instances.
1133
+ * Token-based like AXP_MENU_PROVIDER / AXP_PERMISSION_DEFINITION_PROVIDER / AXP_SETTING_DEFINITION_PROVIDER.
1134
+ * No separate registry - widgets come solely from providers.
1135
+ */
1177
1136
  class AXPWidgetRegistryService {
1178
- /**
1179
- *
1180
- */
1181
1137
  constructor() {
1182
- this.types = new Map();
1183
- AXPWidgetRegistryService.instance = this;
1138
+ this._providers = inject(AXP_WIDGET_DEFINITION_PROVIDER, { optional: true }) ?? [];
1139
+ this._types = null;
1184
1140
  }
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);
1141
+ /**
1142
+ * Lazy-build widget map from all providers.
1143
+ */
1144
+ ensureBuilt() {
1145
+ if (this._types)
1146
+ return this._types;
1147
+ this._types = buildWidgetRegistryMapFromProviders(this._providers);
1148
+ return this._types;
1193
1149
  }
1194
1150
  resolve(name) {
1195
- const widget = this.types.get(name);
1151
+ const widget = this.ensureBuilt().get(name);
1196
1152
  if (!widget) {
1197
1153
  throw new Error(`Widget with name "${name}" does not exist.`);
1198
1154
  }
1199
1155
  return widget;
1200
1156
  }
1157
+ /**
1158
+ * Registered widget config when present; otherwise `undefined`. Does not throw — use when
1159
+ * {@link resolve}'s value may be a non-widget id (e.g. data-source row id in dynamic field configurator).
1160
+ */
1161
+ getOptional(name) {
1162
+ return this.ensureBuilt().get(name);
1163
+ }
1201
1164
  all() {
1202
- return Array.from(this.types.values());
1165
+ return Array.from(this.ensureBuilt().values());
1203
1166
  }
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' }); }
1167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1168
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
1206
1169
  }
1207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
1208
1171
  type: Injectable,
1209
1172
  args: [{
1210
1173
  providedIn: 'root',
1211
1174
  }]
1212
- }], ctorParameters: () => [] });
1175
+ }] });
1213
1176
 
1214
1177
  class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1215
1178
  constructor() {
@@ -1217,13 +1180,16 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1217
1180
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1218
1181
  this.grid = inject(AXBaseDataTable);
1219
1182
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1220
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1221
- this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : []));
1183
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1184
+ this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : /* istanbul ignore next */ []));
1222
1185
  this.rowInjectorsCache = new Map();
1223
1186
  this.hasExpressions = false;
1224
1187
  this.pendingEvaluations = new Set();
1225
1188
  this.changeDetectionScheduled = false;
1226
1189
  this.MAX_CACHE_SIZE = 1000; // Limit cache size to prevent memory leaks
1190
+ /** When true, header click cycles sort (handled by parent; synced with list sort state). */
1191
+ this.sortEnabled = false;
1192
+ this.sortToggle = new EventEmitter();
1227
1193
  this.injector = inject(Injector);
1228
1194
  this.cdr = inject(ChangeDetectorRef);
1229
1195
  }
@@ -1239,6 +1205,19 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1239
1205
  get renderCellTemplate() {
1240
1206
  return this.cellTemplate ?? this._contentCellTemplate;
1241
1207
  }
1208
+ /**
1209
+ * True when the row should show the expand icon: either hasChild is true (from server/initial load)
1210
+ * or the row has loaded children (e.g. after refreshItemChildren when children go from 0 to 1).
1211
+ */
1212
+ hasExpandableRow(row) {
1213
+ const data = row?.data;
1214
+ if (!data)
1215
+ return false;
1216
+ if (data['hasChild'] === true)
1217
+ return true;
1218
+ const children = data['__meta__']?.['children'];
1219
+ return Array.isArray(children) && children.length > 0;
1220
+ }
1242
1221
  async handleExpandRow(row) {
1243
1222
  this.loadingRow.set(row);
1244
1223
  await this.grid.expandRow(row);
@@ -1250,6 +1229,73 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1250
1229
  get renderHeaderTemplate() {
1251
1230
  return this.headerTemplate ?? this._contentHeaderTemplate;
1252
1231
  }
1232
+ //#region ---- Column alignment (header / cell) ----
1233
+ /**
1234
+ * Resolves `options.align`: string applies to header and cell; object uses optional `header` / `cell` (default start).
1235
+ * Supports designer select values `{ id: 'center' }`.
1236
+ */
1237
+ getHeaderTextAlign() {
1238
+ return this.resolveAlignForSide('header');
1239
+ }
1240
+ getHeaderJustifyContent() {
1241
+ const align = this.getHeaderTextAlign();
1242
+ if (align === 'center') {
1243
+ return 'center';
1244
+ }
1245
+ if (align === 'end') {
1246
+ return 'flex-end';
1247
+ }
1248
+ return 'flex-start';
1249
+ }
1250
+ onHeaderClick(event) {
1251
+ if (!this.sortEnabled) {
1252
+ return;
1253
+ }
1254
+ event.stopPropagation();
1255
+ this.sortToggle.emit(event);
1256
+ }
1257
+ /**
1258
+ * When true, the cell body uses flex so `justify-content` can place content on the main axis.
1259
+ */
1260
+ getCellUseFlexLayout() {
1261
+ return !!this.expandHandler || this.resolveAlignForSide('cell') !== 'start';
1262
+ }
1263
+ /**
1264
+ * Flex `justify-content` for the cell wrapper; omit when not using flex layout.
1265
+ */
1266
+ getCellJustifyContent() {
1267
+ if (!this.getCellUseFlexLayout()) {
1268
+ return null;
1269
+ }
1270
+ return this.resolveAlignForSide('cell');
1271
+ }
1272
+ resolveAlignForSide(side) {
1273
+ const align = this.mergedOptions().align;
1274
+ if (align == null || align === '') {
1275
+ return 'start';
1276
+ }
1277
+ if (typeof align === 'string') {
1278
+ return this.normalizeColumnAlignment(align);
1279
+ }
1280
+ if (typeof align === 'object' && !Array.isArray(align)) {
1281
+ const raw = side === 'header' ? align.header : align.cell;
1282
+ return this.normalizeColumnAlignment(raw);
1283
+ }
1284
+ return 'start';
1285
+ }
1286
+ normalizeColumnAlignment(value) {
1287
+ if (value === 'center' || value === 'end' || value === 'start') {
1288
+ return value;
1289
+ }
1290
+ if (value && typeof value === 'object' && 'id' in value) {
1291
+ const id = value.id;
1292
+ if (id === 'center' || id === 'end' || id === 'start') {
1293
+ return id;
1294
+ }
1295
+ }
1296
+ return 'start';
1297
+ }
1298
+ //#endregion
1253
1299
  get loadingEnabled() {
1254
1300
  return true;
1255
1301
  }
@@ -1274,6 +1320,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1274
1320
  const tokenValue = {
1275
1321
  path: this.node.path,
1276
1322
  options: this.mergedOptions(),
1323
+ caption: this.caption,
1277
1324
  };
1278
1325
  this.widgetInjector = Injector.create({
1279
1326
  parent: this.injector,
@@ -1286,8 +1333,14 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1286
1333
  });
1287
1334
  this.width = this.mergedOptions().width === 'auto' ? 'auto' : this.customWidth ? this.customWidth : (this.mergedOptions().width ?? '200px');
1288
1335
  this.allowResizing = this.mergedOptions().allowResizing || true;
1336
+ this.allowSorting = this.sortEnabled;
1289
1337
  this.cdr.detectChanges();
1290
1338
  }
1339
+ ngOnChanges() {
1340
+ this.allowSorting = this.sortEnabled;
1341
+ this.sortOrder = this.headerSortDirection;
1342
+ this.sortIndex = this.headerSortPriority;
1343
+ }
1291
1344
  //#region ---- Performance Optimization Methods ----
1292
1345
  /**
1293
1346
  * Check if options contain any expressions that need evaluation
@@ -1372,6 +1425,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1372
1425
  const tokenValue = {
1373
1426
  path: this.node.path,
1374
1427
  options: this.mergedOptions(),
1428
+ caption: this.caption,
1375
1429
  };
1376
1430
  rowInjector = Injector.create({
1377
1431
  parent: this.injector,
@@ -1404,6 +1458,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1404
1458
  const tokenValue = {
1405
1459
  path: this.node.path,
1406
1460
  options: evaluatedOptions,
1461
+ caption: this.caption,
1407
1462
  };
1408
1463
  const newInjector = Injector.create({
1409
1464
  parent: this.injector,
@@ -1430,6 +1485,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1430
1485
  const tokenValue = {
1431
1486
  path: this.node.path,
1432
1487
  options: this.mergedOptions(),
1488
+ caption: this.caption,
1433
1489
  };
1434
1490
  rowInjector = Injector.create({
1435
1491
  parent: this.injector,
@@ -1446,19 +1502,49 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1446
1502
  }
1447
1503
  return rowInjector;
1448
1504
  }
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: [
1505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1506
+ 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", sortEnabled: "sortEnabled", headerSortDirection: "headerSortDirection", headerSortPriority: "headerSortPriority", cellTemplate: "cellTemplate", headerTemplate: "headerTemplate" }, outputs: { sortToggle: "sortToggle" }, providers: [
1451
1507
  AXPWidgetCoreService,
1452
1508
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1453
- ], viewQueries: [{ propertyName: "_contentFooterTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "_contentCellTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "_contentHeaderTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1454
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1509
+ ], 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, usesOnChanges: true, ngImport: i0, template: `
1510
+ <ng-template #header>
1511
+ <div
1512
+ class="axp-widget-column-header ax-w-full ax-flex ax-items-center ax-gap-1 ax-select-none"
1513
+ [class.axp-widget-column-header--sortable]="sortEnabled"
1514
+ [style.justify-content]="getHeaderJustifyContent()"
1515
+ (click)="onHeaderClick($event)"
1516
+ >
1517
+ <span class="axp-widget-column-header__caption ax-truncate">{{ caption | translate | async }}</span>
1518
+ @if (sortEnabled) {
1519
+ <span class="axp-widget-column-header__sort ax-flex ax-items-center ax-gap-0.5 ax-shrink-0">
1520
+ @if (headerSortPriority !== undefined && headerSortPriority > 1) {
1521
+ <span class="axp-widget-column-header__sort-priority ax-text-xs ax-opacity-70">{{ headerSortPriority }}</span>
1522
+ }
1523
+ <i
1524
+ class="fa-solid fa-arrow-up-long ax-text-neutral-400"
1525
+ [class.ax-text-primary]="headerSortDirection === 'asc'"
1526
+ ></i>
1527
+ <i
1528
+ class="fa-solid fa-arrow-down-long ax-text-neutral-400"
1529
+ [class.ax-text-primary]="headerSortDirection === 'desc'"
1530
+ ></i>
1531
+ </span>
1532
+ }
1533
+ </div>
1534
+ </ng-template>
1455
1535
  <ng-template #cell let-row>
1456
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1536
+ <div
1537
+ class="ax-w-full"
1538
+ [class.ax-flex]="getCellUseFlexLayout()"
1539
+ [class.ax-gap-2]="expandHandler"
1540
+ [class.ax-items-center]="getCellUseFlexLayout()"
1541
+ [style.justify-content]="getCellJustifyContent()"
1542
+ >
1457
1543
  @if (expandHandler) {
1458
1544
  <div
1459
1545
  (click)="handleExpandRow(row)"
1460
1546
  class="ax-expand-handler"
1461
- [class.ax-invisible]="row.data.hasChild === false"
1547
+ [class.ax-invisible]="!hasExpandableRow(row)"
1462
1548
  id="ax-expand-handler-container"
1463
1549
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1464
1550
  >
@@ -1481,21 +1567,49 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1481
1567
  </div>
1482
1568
  </ng-template>
1483
1569
  <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 }); }
1570
+ `, isInline: true, styles: [".axp-widget-column-header--sortable{cursor:pointer}.axp-widget-column-header__caption{min-width:0}.axp-widget-column-header__sort{opacity:0;transition:opacity .15s ease}.axp-widget-column-header--sortable:hover .axp-widget-column-header__sort,.axp-widget-column-header--sortable:focus-within .axp-widget-column-header__sort{opacity:1}.axp-widget-column-header__sort-priority{line-height:1}:host-context(.ax-data-table-head-cell.ax-interactive:hover) .axp-widget-column-header__sort,:host-context(.ax-data-table-head-cell.ax-interactive:focus-within) .axp-widget-column-header__sort{opacity:1}\n"], 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
1571
  }
1486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
1487
1573
  type: Component,
1488
- args: [{
1489
- selector: 'axp-widget-column-renderer',
1490
- template: `
1491
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1574
+ args: [{ selector: 'axp-widget-column-renderer', template: `
1575
+ <ng-template #header>
1576
+ <div
1577
+ class="axp-widget-column-header ax-w-full ax-flex ax-items-center ax-gap-1 ax-select-none"
1578
+ [class.axp-widget-column-header--sortable]="sortEnabled"
1579
+ [style.justify-content]="getHeaderJustifyContent()"
1580
+ (click)="onHeaderClick($event)"
1581
+ >
1582
+ <span class="axp-widget-column-header__caption ax-truncate">{{ caption | translate | async }}</span>
1583
+ @if (sortEnabled) {
1584
+ <span class="axp-widget-column-header__sort ax-flex ax-items-center ax-gap-0.5 ax-shrink-0">
1585
+ @if (headerSortPriority !== undefined && headerSortPriority > 1) {
1586
+ <span class="axp-widget-column-header__sort-priority ax-text-xs ax-opacity-70">{{ headerSortPriority }}</span>
1587
+ }
1588
+ <i
1589
+ class="fa-solid fa-arrow-up-long ax-text-neutral-400"
1590
+ [class.ax-text-primary]="headerSortDirection === 'asc'"
1591
+ ></i>
1592
+ <i
1593
+ class="fa-solid fa-arrow-down-long ax-text-neutral-400"
1594
+ [class.ax-text-primary]="headerSortDirection === 'desc'"
1595
+ ></i>
1596
+ </span>
1597
+ }
1598
+ </div>
1599
+ </ng-template>
1492
1600
  <ng-template #cell let-row>
1493
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1601
+ <div
1602
+ class="ax-w-full"
1603
+ [class.ax-flex]="getCellUseFlexLayout()"
1604
+ [class.ax-gap-2]="expandHandler"
1605
+ [class.ax-items-center]="getCellUseFlexLayout()"
1606
+ [style.justify-content]="getCellJustifyContent()"
1607
+ >
1494
1608
  @if (expandHandler) {
1495
1609
  <div
1496
1610
  (click)="handleExpandRow(row)"
1497
1611
  class="ax-expand-handler"
1498
- [class.ax-invisible]="row.data.hasChild === false"
1612
+ [class.ax-invisible]="!hasExpandableRow(row)"
1499
1613
  id="ax-expand-handler-container"
1500
1614
  [style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
1501
1615
  >
@@ -1518,15 +1632,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1518
1632
  </div>
1519
1633
  </ng-template>
1520
1634
  <ng-template #footer></ng-template>
1521
- `,
1522
- providers: [
1635
+ `, providers: [
1523
1636
  AXPWidgetCoreService,
1524
1637
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1525
- ],
1526
- changeDetection: ChangeDetectionStrategy.OnPush,
1527
- inputs: ['caption'],
1528
- standalone: false,
1529
- }]
1638
+ ], changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['caption'], standalone: false, styles: [".axp-widget-column-header--sortable{cursor:pointer}.axp-widget-column-header__caption{min-width:0}.axp-widget-column-header__sort{opacity:0;transition:opacity .15s ease}.axp-widget-column-header--sortable:hover .axp-widget-column-header__sort,.axp-widget-column-header--sortable:focus-within .axp-widget-column-header__sort{opacity:1}.axp-widget-column-header__sort-priority{line-height:1}:host-context(.ax-data-table-head-cell.ax-interactive:hover) .axp-widget-column-header__sort,:host-context(.ax-data-table-head-cell.ax-interactive:focus-within) .axp-widget-column-header__sort{opacity:1}\n"] }]
1530
1639
  }], propDecorators: { customExpandIcon: [{
1531
1640
  type: Input
1532
1641
  }], customCollapseIcon: [{
@@ -1543,6 +1652,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1543
1652
  args: ['footer']
1544
1653
  }], expandHandler: [{
1545
1654
  type: Input
1655
+ }], sortEnabled: [{
1656
+ type: Input
1657
+ }], headerSortDirection: [{
1658
+ type: Input
1659
+ }], headerSortPriority: [{
1660
+ type: Input
1661
+ }], sortToggle: [{
1662
+ type: Output
1546
1663
  }], cellTemplate: [{
1547
1664
  type: Input
1548
1665
  }], _contentCellTemplate: [{
@@ -1557,24 +1674,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1557
1674
 
1558
1675
  class AXPWidgetContainerComponent {
1559
1676
  set context(value) {
1677
+ // Parent re-binds the same context after widget-driven updates; avoid reset() clearing dirty paths.
1678
+ if (isEqual(this.contextService.data(), value)) {
1679
+ return;
1680
+ }
1560
1681
  this.contextService.set(value);
1561
1682
  }
1562
1683
  set functions(v) {
1563
1684
  this.builderService.setFunctions(v);
1564
1685
  }
1565
1686
  constructor() {
1566
- this.contextService = inject(AXPWidgetCoreContextStore);
1687
+ this.contextService = inject(AXPContextStore);
1567
1688
  this.builderService = inject(AXPWidgetCoreService);
1568
1689
  this.onContextChanged = new EventEmitter();
1690
+ /** True when user-edited context paths or composite widgets report dirty state. */
1691
+ this.isFormDirty = computed(() => {
1692
+ this.builderService.dirtyWidgetsRevisionSignal();
1693
+ return this.contextService.isUserDirty() || this.builderService.hasDirtyWidgets();
1694
+ }, ...(ngDevMode ? [{ debugName: "isFormDirty" }] : /* istanbul ignore next */ []));
1569
1695
  this.status = computed(() => {
1570
1696
  return this.builderService.status();
1571
- }, ...(ngDevMode ? [{ debugName: "status" }] : []));
1697
+ }, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
1572
1698
  this.isBusy = computed(() => {
1573
1699
  return this.builderService.isBusy();
1574
- }, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
1700
+ }, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
1575
1701
  effect(() => {
1576
1702
  if (this.contextService.isChanged()) {
1577
- this.onContextChanged.emit(this.contextService.changeEvent());
1703
+ const changeEvent = this.contextService.changeEvent();
1704
+ this.onContextChanged.emit({
1705
+ ...changeEvent,
1706
+ isFormDirty: this.isFormDirty(),
1707
+ });
1578
1708
  }
1579
1709
  });
1580
1710
  }
@@ -1584,17 +1714,29 @@ class AXPWidgetContainerComponent {
1584
1714
  find(name) {
1585
1715
  return this.builderService.waitForWidget(name);
1586
1716
  }
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 }); }
1717
+ /** Replaces context and clears dirty tracking (discard, save reload, external reset). */
1718
+ replaceContext(value) {
1719
+ const next = cloneDeep(value);
1720
+ this.contextService.clearUserDirtyPaths();
1721
+ // After save the parent often re-binds deeply-equal data; still reset the clean baseline.
1722
+ if (isEqual(this.contextService.data(), next)) {
1723
+ this.contextService.commitBaseline();
1724
+ this.builderService.notifyWidgetDirtyChanged();
1725
+ return;
1726
+ }
1727
+ this.contextService.set(next);
1728
+ }
1729
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1730
+ 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
1731
  }
1590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
1591
1733
  type: Component,
1592
1734
  args: [{
1593
1735
  selector: 'axp-widgets-container',
1594
1736
  template: `<ng-content></ng-content>`,
1595
1737
  changeDetection: ChangeDetectionStrategy.OnPush,
1596
1738
  host: { style: 'display: contents;' },
1597
- providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore],
1739
+ providers: [AXPWidgetCoreService, AXPContextStore],
1598
1740
  standalone: false,
1599
1741
  }]
1600
1742
  }], ctorParameters: () => [], propDecorators: { onContextChanged: [{
@@ -1606,12 +1748,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1606
1748
  }] } });
1607
1749
 
1608
1750
  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>
1751
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1752
+ 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
1753
  <ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
1612
1754
  </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1613
1755
  }
1614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
1615
1757
  type: Component,
1616
1758
  args: [{
1617
1759
  selector: 'axp-widget-placeholder',
@@ -1628,11 +1770,11 @@ class AXPWidgetRendererDirective {
1628
1770
  //#endregion
1629
1771
  //#endregion
1630
1772
  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" }] : []));
1773
+ this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : /* istanbul ignore next */ []));
1774
+ this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
1775
+ this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
1776
+ this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
1777
+ this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
1636
1778
  this.options = this._options.asReadonly();
1637
1779
  this.onOptionsChanged = output();
1638
1780
  this.onValueChanged = output();
@@ -1641,22 +1783,22 @@ class AXPWidgetRendererDirective {
1641
1783
  /**
1642
1784
  * Signal that emits the component reference when it's ready
1643
1785
  */
1644
- this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : []));
1786
+ this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : /* istanbul ignore next */ []));
1645
1787
  this.componentRefSignal = this._componentRefSignal.asReadonly();
1646
1788
  //#endregion
1647
1789
  //#region ---- Properties ----
1648
- this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
1790
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
1649
1791
  this.injector = inject(Injector);
1650
1792
  this.builderService = inject(AXPWidgetCoreService);
1651
- this.contextService = inject(AXPWidgetCoreContextStore);
1793
+ this.contextService = inject(AXPContextStore);
1652
1794
  this.widgetRegistery = inject(AXPWidgetRegistryService);
1653
1795
  this.unsubscriber = inject(AXUnsubscriber);
1654
1796
  this.translateService = inject(AXTranslationService);
1655
1797
  this.widgetService = inject(AXPWidgetRegistryService);
1656
1798
  this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
1657
1799
  this.viewContainerRef = inject(ViewContainerRef);
1658
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
1659
- this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
1800
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
1801
+ this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
1660
1802
  this.expressionEvaluators = new Map();
1661
1803
  this.renderTimeoutId = null;
1662
1804
  this.hasInitialRender = false;
@@ -1703,12 +1845,12 @@ class AXPWidgetRendererDirective {
1703
1845
  await this.updateOptionsBasedOnContext();
1704
1846
  this.applyOptions();
1705
1847
  }
1706
- await this.updateVisibility();
1707
1848
  }
1708
1849
  else if (changed.path && this.isRelevantContextChange(changed.path)) {
1709
1850
  // console.log(`🎯 [${this.node().type}] Context change detected: ${changed.path}`);
1710
1851
  this.queueContextUpdate(changed.path);
1711
1852
  }
1853
+ await this.updateVisibility();
1712
1854
  });
1713
1855
  this.builderService.onRefresh.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
1714
1856
  await this.processBatchedUpdates();
@@ -1834,77 +1976,88 @@ class AXPWidgetRendererDirective {
1834
1976
  }
1835
1977
  return false;
1836
1978
  }
1979
+ /**
1980
+ * True when a context store path used in an expression (`context.eval`, `context.options`) is
1981
+ * affected by `changedPath`.
1982
+ */
1983
+ contextStorePathDependsOnChangedPath(evalPath, changedPath) {
1984
+ const normalizePath = (p) => {
1985
+ if (!p)
1986
+ return p;
1987
+ const parts = p.split('.');
1988
+ const last = parts[parts.length - 1];
1989
+ if (last && last.endsWith('Id')) {
1990
+ parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1991
+ }
1992
+ return parts.join('.');
1993
+ };
1994
+ const isSegmentSuffix = (a, b) => {
1995
+ if (!a || !b)
1996
+ return false;
1997
+ const pa = a.split('.');
1998
+ const pb = b.split('.');
1999
+ if (pb.length > pa.length)
2000
+ return false;
2001
+ for (let i = 1; i <= pb.length; i++) {
2002
+ if (pa[pa.length - i] !== pb[pb.length - i])
2003
+ return false;
2004
+ }
2005
+ return true;
2006
+ };
2007
+ const evalNorm = normalizePath(evalPath);
2008
+ const changedNorm = normalizePath(changedPath);
2009
+ const rawMatch = evalPath === changedPath ||
2010
+ evalPath.startsWith(changedPath + '.') ||
2011
+ changedPath.startsWith(evalPath + '.') ||
2012
+ isSegmentSuffix(evalPath, changedPath) ||
2013
+ isSegmentSuffix(changedPath, evalPath);
2014
+ const normMatch = evalNorm === changedNorm ||
2015
+ evalNorm.startsWith(changedNorm + '.') ||
2016
+ changedNorm.startsWith(evalNorm + '.') ||
2017
+ isSegmentSuffix(evalNorm, changedNorm) ||
2018
+ isSegmentSuffix(changedNorm, evalNorm);
2019
+ if (rawMatch || normMatch) {
2020
+ return true;
2021
+ }
2022
+ return this.isPathAlias(evalPath, changedPath);
2023
+ }
2024
+ /**
2025
+ * Whether an expression template string reads context store paths affected by `changedPath`.
2026
+ */
2027
+ expressionTextDependsOnContextPath(expressionValue, changedPath) {
2028
+ const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
2029
+ let match;
2030
+ while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
2031
+ if (this.contextStorePathDependsOnChangedPath(match[1], changedPath)) {
2032
+ return true;
2033
+ }
2034
+ }
2035
+ const contextOptionsQuoted = /context\.options\(\s*['"]([^'"]*)['"]\s*\)/g;
2036
+ while ((match = contextOptionsQuoted.exec(expressionValue)) !== null) {
2037
+ const sub = match[1];
2038
+ const evalPath = sub === '' ? 'options' : `options.${sub}`;
2039
+ if (this.contextStorePathDependsOnChangedPath(evalPath, changedPath)) {
2040
+ return true;
2041
+ }
2042
+ }
2043
+ const contextOptionsEmpty = /context\.options\(\s*\)/g;
2044
+ while ((match = contextOptionsEmpty.exec(expressionValue)) !== null) {
2045
+ if (this.contextStorePathDependsOnChangedPath('options', changedPath)) {
2046
+ return true;
2047
+ }
2048
+ }
2049
+ return false;
2050
+ }
1837
2051
  hasExpressionDependency(changedPath) {
1838
- // Check if any cached expressions depend on the changed path
1839
2052
  for (const [path, evaluator] of this.expressionEvaluators) {
1840
- // Check if the expression path itself contains the changed path
1841
2053
  if (path.includes(changedPath)) {
1842
2054
  return true;
1843
2055
  }
1844
- // Parse the actual expression content to check for context.eval() calls
1845
- // We need to get the original expression string to analyze it
1846
2056
  const node = this.node();
1847
2057
  const expressionValue = this.getExpressionValueFromNode(node, path);
1848
2058
  if (expressionValue && typeof expressionValue === 'string') {
1849
- // Look for context.eval() calls that reference the changed path
1850
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1851
- let match;
1852
- while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
1853
- const evalPath = match[1];
1854
- // Normalize Id-suffixed segments to dot-id form (e.g., 'typeId' -> 'type.id', 'person.typeId' -> 'person.type.id')
1855
- const normalizePath = (p) => {
1856
- if (!p)
1857
- return p;
1858
- const parts = p.split('.');
1859
- const last = parts[parts.length - 1];
1860
- if (last && last.endsWith('Id')) {
1861
- parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
1862
- }
1863
- return parts.join('.');
1864
- };
1865
- const isSegmentSuffix = (a, b) => {
1866
- if (!a || !b)
1867
- return false;
1868
- const pa = a.split('.');
1869
- const pb = b.split('.');
1870
- if (pb.length > pa.length)
1871
- return false;
1872
- for (let i = 1; i <= pb.length; i++) {
1873
- if (pa[pa.length - i] !== pb[pb.length - i])
1874
- return false;
1875
- }
1876
- return true;
1877
- };
1878
- const evalNorm = normalizePath(evalPath);
1879
- const changedNorm = normalizePath(changedPath);
1880
- // Debug log for dependency check
1881
- // console.log(
1882
- // `🧭 [${this.node().type}] dep-check expr='${path}', changed='${changedPath}', eval='${evalPath}', evalNorm='${evalNorm}', changedNorm='${changedNorm}'`,
1883
- // );
1884
- // Generic direct and hierarchical dependency checks (raw and normalized)
1885
- const rawMatch = evalPath === changedPath ||
1886
- evalPath.startsWith(changedPath + '.') ||
1887
- changedPath.startsWith(evalPath + '.') ||
1888
- isSegmentSuffix(evalPath, changedPath) ||
1889
- isSegmentSuffix(changedPath, evalPath);
1890
- const normMatch = evalNorm === changedNorm ||
1891
- evalNorm.startsWith(changedNorm + '.') ||
1892
- changedNorm.startsWith(evalNorm + '.') ||
1893
- isSegmentSuffix(evalNorm, changedNorm) ||
1894
- isSegmentSuffix(changedNorm, evalNorm);
1895
- if (rawMatch || normMatch) {
1896
- // console.log(
1897
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (generic match)`,
1898
- // );
1899
- return true;
1900
- }
1901
- // Check for path aliases/mappings (e.g., typeId.id <-> type.id)
1902
- if (this.isPathAlias(evalPath, changedPath)) {
1903
- // console.log(
1904
- // `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (path alias)`,
1905
- // );
1906
- return true;
1907
- }
2059
+ if (this.expressionTextDependsOnContextPath(expressionValue, changedPath)) {
2060
+ return true;
1908
2061
  }
1909
2062
  }
1910
2063
  }
@@ -1991,20 +2144,8 @@ class AXPWidgetRendererDirective {
1991
2144
  const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
1992
2145
  if (!visibility || typeof visibility !== 'string')
1993
2146
  return false;
1994
- // Check if visibility expression depends on the changed path
1995
2147
  if (this.expressionEvaluator.isExpression(visibility)) {
1996
- // Parse the visibility expression to check for context.eval() calls
1997
- const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
1998
- let match;
1999
- while ((match = contextEvalRegex.exec(visibility)) !== null) {
2000
- const evalPath = match[1];
2001
- // Check for direct or hierarchical dependency
2002
- if (evalPath === changedPath ||
2003
- evalPath.startsWith(changedPath + '.') ||
2004
- changedPath.startsWith(evalPath + '.')) {
2005
- return true;
2006
- }
2007
- }
2148
+ return this.expressionTextDependsOnContextPath(visibility, changedPath);
2008
2149
  }
2009
2150
  return false;
2010
2151
  }
@@ -2285,8 +2426,13 @@ class AXPWidgetRendererDirective {
2285
2426
  const newValue = await evaluator();
2286
2427
  const evalTime = performance.now() - evalStartTime;
2287
2428
  // Check if result has actually changed using Lodash isEqual
2429
+ // Important: We must check if the key exists in the map, not just compare values
2430
+ // This handles the case where the expression evaluates to `undefined` for the first time
2431
+ // Without this check, `undefined` would be incorrectly treated as "no change"
2432
+ // because Map.get() returns `undefined` for non-existent keys
2433
+ const hasLastValue = this.lastExpressionResults.has(path);
2288
2434
  const lastValue = this.lastExpressionResults.get(path);
2289
- const hasChanged = !isEqual(newValue, lastValue);
2435
+ const hasChanged = !hasLastValue || !isEqual(newValue, lastValue);
2290
2436
  if (hasChanged) {
2291
2437
  // console.log(
2292
2438
  // `📝 [${this.node().type}] Expression '${path}' evaluated in ${evalTime.toFixed(2)}ms - value changed`,
@@ -2365,7 +2511,8 @@ class AXPWidgetRendererDirective {
2365
2511
  if (!this.isVisible()) {
2366
2512
  this.isVisible.set(true);
2367
2513
  if (this.componentRef && this.componentRef.location) {
2368
- this.componentRef.location.nativeElement.style.display = '';
2514
+ this.loadComponent();
2515
+ // this.componentRef.location.nativeElement.style.display = '';
2369
2516
  }
2370
2517
  }
2371
2518
  }
@@ -2373,7 +2520,8 @@ class AXPWidgetRendererDirective {
2373
2520
  if (this.isVisible()) {
2374
2521
  this.isVisible.set(false);
2375
2522
  if (this.componentRef && this.componentRef.location) {
2376
- this.componentRef.location.nativeElement.style.display = 'none';
2523
+ this.componentRef.destroy();
2524
+ // this.componentRef.location.nativeElement.style.display = 'none';
2377
2525
  }
2378
2526
  }
2379
2527
  }
@@ -2411,36 +2559,48 @@ class AXPWidgetRendererDirective {
2411
2559
  return this.contextService.data();
2412
2560
  },
2413
2561
  isDirty: () => {
2414
- return this.contextService.isDirty();
2562
+ return this.contextService.isUserDirty() || this.builderService.hasDirtyWidgets();
2563
+ },
2564
+ /**
2565
+ * Host/widget-under-edit `options` from the shared context store (same values as
2566
+ * `context.eval('options' + (path ? '.' + path : ''))`), not `widget.options` on the nested
2567
+ * property field instance. Uses one `getValue` so smart-path behavior matches `context.eval`.
2568
+ */
2569
+ options: (path) => {
2570
+ if (path == null || path === '') {
2571
+ return this.contextService.getValue('options');
2572
+ }
2573
+ return this.contextService.getValue(`options.${path}`);
2415
2574
  },
2416
2575
  };
2417
2576
  }
2418
2577
  getEventScope() {
2419
2578
  return {
2420
- context: (path) => {
2579
+ context: (...paths) => {
2421
2580
  return this.onContextChanged.pipe(filter((c) => {
2422
- // If no path filter specified, pass all events
2423
- if (path == null || path === '') {
2581
+ const activePaths = paths.filter((p) => !!p && p.trim().length > 0);
2582
+ // If no path filters specified, pass all events
2583
+ if (activePaths.length === 0) {
2424
2584
  return true;
2425
2585
  }
2426
2586
  // Ensure c.path exists
2427
2587
  if (!c.path) {
2428
2588
  return false;
2429
2589
  }
2430
- // Pattern: "prefix*" - matches paths that start with prefix
2431
- if (path.endsWith('*')) {
2432
- const prefix = path.substring(0, path.length - 1);
2433
- return c.path.startsWith(prefix);
2434
- }
2435
- // Pattern: "*suffix" - matches paths that end with suffix
2436
- else if (path.startsWith('*')) {
2437
- const suffix = path.substring(1);
2438
- return c.path.endsWith(suffix);
2439
- }
2440
- // Exact match
2441
- else {
2590
+ return activePaths.some((path) => {
2591
+ // Pattern: "prefix*" - matches paths that start with prefix
2592
+ if (path.endsWith('*')) {
2593
+ const prefix = path.substring(0, path.length - 1);
2594
+ return c.path.startsWith(prefix);
2595
+ }
2596
+ // Pattern: "*suffix" - matches paths that end with suffix
2597
+ if (path.startsWith('*')) {
2598
+ const suffix = path.substring(1);
2599
+ return c.path.endsWith(suffix);
2600
+ }
2601
+ // Exact match
2442
2602
  return c.path === path;
2443
- }
2603
+ });
2444
2604
  }));
2445
2605
  },
2446
2606
  from: (event) => get(this.instance.api(), event),
@@ -2451,6 +2611,16 @@ class AXPWidgetRendererDirective {
2451
2611
  }
2452
2612
  getWidgetScope() {
2453
2613
  return {
2614
+ /** Resolved options for this renderer's widget instance (not the host / property-viewer target). */
2615
+ options: (path) => {
2616
+ const opts = this.instance && typeof this.instance.options === 'function'
2617
+ ? this.instance.options()
2618
+ : this.mergedOptions();
2619
+ if (path == null || path === '') {
2620
+ return opts;
2621
+ }
2622
+ return getSmart(opts, path);
2623
+ },
2454
2624
  call: (name, ...args) => {
2455
2625
  this.instance.call(name, ...args);
2456
2626
  },
@@ -2471,7 +2641,7 @@ class AXPWidgetRendererDirective {
2471
2641
  }
2472
2642
  },
2473
2643
  output: (name) => {
2474
- this.instance.output(name);
2644
+ return this.instance.output(name);
2475
2645
  },
2476
2646
  find: (id) => {
2477
2647
  return this.builderService.getWidget(id);
@@ -2556,14 +2726,14 @@ class AXPWidgetRendererDirective {
2556
2726
  // console.error('Error evaluating action expression:', templateExpression, error);
2557
2727
  }
2558
2728
  }
2559
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2560
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged", onLoad: "onLoad" }, providers: [
2729
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2730
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPWidgetRendererDirective, isStandalone: false, selector: "[axp-widget-renderer]", inputs: { parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onOptionsChanged: "onOptionsChanged", onValueChanged: "onValueChanged", onLoad: "onLoad" }, providers: [
2561
2731
  {
2562
2732
  provide: AXUnsubscriber,
2563
2733
  },
2564
2734
  ], exportAs: ["widgetRenderer"], usesOnChanges: true, ngImport: i0 }); }
2565
2735
  }
2566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2736
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
2567
2737
  type: Directive,
2568
2738
  args: [{
2569
2739
  selector: '[axp-widget-renderer]',
@@ -2579,63 +2749,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2579
2749
 
2580
2750
  const COMPONENTS = [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective];
2581
2751
  class AXPWidgetCoreModule {
2582
- static forRoot(config) {
2583
- return {
2584
- ngModule: AXPWidgetCoreModule,
2585
- providers: [
2586
- {
2587
- provide: 'AXPWidgetCoreModuleFactory',
2588
- useFactory: (registry) => async () => {
2589
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2590
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2591
- },
2592
- deps: [AXPWidgetRegistryService],
2593
- multi: true,
2594
- },
2595
- ],
2596
- };
2597
- }
2598
- static forChild(config) {
2599
- return {
2600
- ngModule: AXPWidgetCoreModule,
2601
- providers: [
2602
- {
2603
- provide: 'AXPWidgetCoreModuleFactory',
2604
- useFactory: (registry) => async () => {
2605
- await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
2606
- await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
2607
- },
2608
- deps: [AXPWidgetRegistryService],
2609
- multi: true,
2610
- },
2611
- ],
2612
- };
2613
- }
2614
- /**
2615
- * @ignore
2616
- */
2617
- constructor(instances) {
2618
- instances?.forEach((f) => {
2619
- f();
2620
- });
2621
- }
2622
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, deps: [{ token: 'AXPWidgetCoreModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
2623
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
2624
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule] }); }
2752
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2753
+ 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] }); }
2754
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule] }); }
2625
2755
  }
2626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
2627
2757
  type: NgModule,
2628
2758
  args: [{
2629
- imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule],
2759
+ imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule],
2630
2760
  exports: [...COMPONENTS],
2631
2761
  declarations: [...COMPONENTS],
2762
+ providers: [],
2632
2763
  }]
2633
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2634
- type: Optional
2635
- }, {
2636
- type: Inject,
2637
- args: ['AXPWidgetCoreModuleFactory']
2638
- }] }] });
2764
+ }] });
2765
+
2766
+ //#endregion
2767
+ //#region ---- Mapping ----
2768
+ /**
2769
+ * Converts a domain {@link AXPProperty} into a {@link AXPWidgetProperty} row for
2770
+ * the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
2771
+ */
2772
+ function mapAXPPropertyToWidgetProperty(property, options) {
2773
+ const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
2774
+ const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
2775
+ const iface = property.interface;
2776
+ const widgetType = iface?.type ?? 'text-editor';
2777
+ const description = resolveDescription?.(property);
2778
+ return {
2779
+ name: property.name,
2780
+ title: resolveTitle(property),
2781
+ ...(description !== undefined && description !== '' ? { description } : {}),
2782
+ group,
2783
+ order,
2784
+ schema: {
2785
+ dataType: property.dataType,
2786
+ interface: {
2787
+ path,
2788
+ name: property.name,
2789
+ type: widgetType,
2790
+ options: iface?.options ?? {},
2791
+ ...(iface?.triggers ? { triggers: iface.triggers } : {}),
2792
+ },
2793
+ },
2794
+ validations: property.validations,
2795
+ visible: true,
2796
+ };
2797
+ }
2798
+ //#endregion
2639
2799
 
2640
2800
  class AXPPropertyEditorHelper {
2641
2801
  static expandShorthand(values) {
@@ -2919,48 +3079,1539 @@ class AXPWidgetSerializationHelper {
2919
3079
  }
2920
3080
  //#endregion
2921
3081
 
3082
+ //#region ---- Editor sub-categories (widget picker) ----
3083
+ const AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS = {
3084
+ name: 'editor-text-inputs',
3085
+ order: 1,
3086
+ title: '@platform-layout-widgets:subcategories.editor-text-inputs.title',
3087
+ };
3088
+ const AXP_WIDGETS_EDITOR_SUB_NUMERIC = {
3089
+ name: 'editor-numeric',
3090
+ order: 2,
3091
+ title: '@platform-layout-widgets:subcategories.editor-numeric.title',
3092
+ };
3093
+ const AXP_WIDGETS_EDITOR_SUB_DATETIME = {
3094
+ name: 'editor-datetime',
3095
+ order: 3,
3096
+ title: '@platform-layout-widgets:subcategories.editor-datetime.title',
3097
+ };
3098
+ const AXP_WIDGETS_EDITOR_SUB_CHOICE = {
3099
+ name: 'editor-choice',
3100
+ order: 4,
3101
+ title: '@platform-layout-widgets:subcategories.editor-choice.title',
3102
+ };
3103
+ const AXP_WIDGETS_EDITOR_SUB_RICH = {
3104
+ name: 'editor-rich',
3105
+ order: 5,
3106
+ title: '@platform-layout-widgets:subcategories.editor-rich.title',
3107
+ };
3108
+ const AXP_WIDGETS_EDITOR_SUB_VISUAL = {
3109
+ name: 'editor-visual',
3110
+ order: 6,
3111
+ title: '@platform-layout-widgets:subcategories.editor-visual.title',
3112
+ };
3113
+ const AXP_WIDGETS_EDITOR_SUB_COMPOSITE = {
3114
+ name: 'editor-composite',
3115
+ order: 7,
3116
+ title: '@platform-layout-widgets:subcategories.editor-composite.title',
3117
+ };
3118
+ const AXP_WIDGETS_EDITOR_SUB_CONFIG = {
3119
+ name: 'editor-config',
3120
+ order: 8,
3121
+ title: '@platform-layout-widgets:subcategories.editor-config.title',
3122
+ };
3123
+ //#endregion
3124
+ //#region ---- Layout sub-categories (widget picker) ----
3125
+ const AXP_WIDGETS_LAYOUT_SUB_SHELL = {
3126
+ name: 'layout-shell',
3127
+ order: 1,
3128
+ title: '@platform-layout-widgets:subcategories.layout-shell.title',
3129
+ };
3130
+ const AXP_WIDGETS_LAYOUT_SUB_GRID = {
3131
+ name: 'layout-grid',
3132
+ order: 2,
3133
+ title: '@platform-layout-widgets:subcategories.layout-grid.title',
3134
+ };
3135
+ const AXP_WIDGETS_LAYOUT_SUB_SURFACES = {
3136
+ name: 'layout-surfaces',
3137
+ order: 3,
3138
+ title: '@platform-layout-widgets:subcategories.layout-surfaces.title',
3139
+ };
3140
+ const AXP_WIDGETS_LAYOUT_SUB_TABS = {
3141
+ name: 'layout-tabs',
3142
+ order: 4,
3143
+ title: '@platform-layout-widgets:subcategories.layout-tabs.title',
3144
+ };
3145
+ const AXP_WIDGETS_LAYOUT_SUB_LISTS = {
3146
+ name: 'layout-lists',
3147
+ order: 5,
3148
+ title: '@platform-layout-widgets:subcategories.layout-lists.title',
3149
+ };
3150
+ const AXP_WIDGETS_LAYOUT_SUB_UTILITY = {
3151
+ name: 'layout-utility',
3152
+ order: 6,
3153
+ title: '@platform-layout-widgets:subcategories.layout-utility.title',
3154
+ };
3155
+ //#endregion
3156
+ //#region ---- Action sub-categories (widget picker) ----
3157
+ const AXP_WIDGETS_ACTION_SUB_CONTROLS = {
3158
+ name: 'action-controls',
3159
+ order: 1,
3160
+ title: '@platform-layout-widgets:subcategories.action-controls.title',
3161
+ };
3162
+ //#endregion
3163
+ //#region ---- Advance sub-categories (widget picker) ----
3164
+ const AXP_WIDGETS_ADVANCE_SUB_MEDIA = {
3165
+ name: 'advance-media',
3166
+ order: 1,
3167
+ title: '@platform-layout-widgets:subcategories.advance-media.title',
3168
+ };
3169
+ const AXP_WIDGETS_ADVANCE_SUB_INPUT = {
3170
+ name: 'advance-input',
3171
+ order: 2,
3172
+ title: '@platform-layout-widgets:subcategories.advance-input.title',
3173
+ };
3174
+ const AXP_WIDGETS_ADVANCE_SUB_DATA = {
3175
+ name: 'advance-data',
3176
+ order: 3,
3177
+ title: '@platform-layout-widgets:subcategories.advance-data.title',
3178
+ };
3179
+ const AXP_WIDGETS_ADVANCE_SUB_TOOLS = {
3180
+ name: 'advance-tools',
3181
+ order: 4,
3182
+ title: '@platform-layout-widgets:subcategories.advance-tools.title',
3183
+ };
3184
+ //#endregion
3185
+ /** Normalizes widget categories to an array for iteration and serialization. */
3186
+ function normalizeWidgetCategories(categories) {
3187
+ if (categories == null) {
3188
+ return [];
3189
+ }
3190
+ return Array.isArray(categories) ? categories : [categories];
3191
+ }
2922
3192
  const AXP_WIDGETS_LAYOUT_CATEGORY = {
2923
3193
  name: 'layout',
2924
3194
  order: 1,
2925
- title: 'Layout',
3195
+ title: '@platform-layout-widgets:categories.layout.title',
2926
3196
  };
2927
3197
  const AXP_WIDGETS_EDITOR_CATEGORY = {
2928
3198
  name: 'editor',
2929
3199
  order: 2,
2930
- title: 'Editors',
3200
+ title: '@platform-layout-widgets:categories.editor.title',
2931
3201
  };
2932
3202
  const AXP_WIDGETS_ACTION_CATEGORY = {
2933
3203
  name: 'action',
2934
3204
  order: 3,
2935
- title: 'Action',
3205
+ title: '@platform-layout-widgets:categories.action.title',
2936
3206
  };
2937
3207
  const AXP_WIDGETS_ADVANCE_CATEGORY = {
2938
3208
  name: 'advance',
2939
3209
  order: 4,
2940
- title: 'Advance',
3210
+ title: '@platform-layout-widgets:categories.advance.title',
3211
+ };
3212
+ /** AI category tab in the widget picker (metadata); unrelated to Widgets:GetForAI listing scope. */
3213
+ const AXP_WIDGETS_AI_CATEGORY = {
3214
+ name: 'ai',
3215
+ order: 5,
3216
+ title: '@platform-layout-widgets:categories.ai.title',
2941
3217
  };
2942
3218
  const AXP_WIDGETS_CATEGORIES = [
2943
3219
  AXP_WIDGETS_LAYOUT_CATEGORY,
2944
3220
  AXP_WIDGETS_EDITOR_CATEGORY,
2945
3221
  AXP_WIDGETS_ACTION_CATEGORY,
2946
3222
  AXP_WIDGETS_ADVANCE_CATEGORY,
3223
+ AXP_WIDGETS_AI_CATEGORY,
2947
3224
  ];
2948
3225
 
2949
- var AXPWidgetGroupEnum;
2950
- (function (AXPWidgetGroupEnum) {
2951
- AXPWidgetGroupEnum["FormElement"] = "form-element";
2952
- AXPWidgetGroupEnum["DashboardWidget"] = "dashboard-widget";
2953
- AXPWidgetGroupEnum["FormTemplate"] = "form-template";
2954
- AXPWidgetGroupEnum["PropertyEditor"] = "property-editor";
2955
- AXPWidgetGroupEnum["MetaData"] = "meta-data";
2956
- AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
2957
- AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
2958
- AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
2959
- })(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
3226
+ /**
3227
+ * Standalone cell renderer using the same column-mode widget pipeline as {@link AXPWidgetColumnRendererComponent}.
3228
+ */
3229
+ class AXPWidgetColumnCellComponent {
3230
+ constructor() {
3231
+ this.caption = '';
3232
+ this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
3233
+ this.rowInjectorsCache = new Map();
3234
+ this.hasExpressions = false;
3235
+ this.pendingEvaluations = new Set();
3236
+ this.changeDetectionScheduled = false;
3237
+ this.injector = inject(Injector);
3238
+ this.cdr = inject(ChangeDetectorRef);
3239
+ this.widgetRegistry = inject(AXPWidgetRegistryService);
3240
+ this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
3241
+ }
3242
+ async ngOnInit() {
3243
+ await this.resolveComponent();
3244
+ }
3245
+ ngOnChanges(changes) {
3246
+ if (changes['node'] && !changes['node'].firstChange) {
3247
+ void this.resolveComponent();
3248
+ }
3249
+ if (changes['rowData'] && !changes['rowData'].firstChange) {
3250
+ this.rowInjectorsCache.clear();
3251
+ this.cdr.markForCheck();
3252
+ }
3253
+ }
3254
+ getInputs(data) {
3255
+ return {
3256
+ rawValue: get(data, this.node.path),
3257
+ rowData: data,
3258
+ };
3259
+ }
3260
+ getRowInjector(data) {
3261
+ const cacheKey = this.getCacheKey(data);
3262
+ let rowInjector = this.rowInjectorsCache.get(cacheKey);
3263
+ if (!rowInjector) {
3264
+ if (!this.hasExpressions) {
3265
+ rowInjector = this.createRowInjector(this.mergedOptions());
3266
+ this.rowInjectorsCache.set(cacheKey, rowInjector);
3267
+ return rowInjector;
3268
+ }
3269
+ if (!this.pendingEvaluations.has(cacheKey)) {
3270
+ this.pendingEvaluations.add(cacheKey);
3271
+ const scope = {
3272
+ ...(data ?? {}),
3273
+ context: {
3274
+ eval: (path) => getSmart(data, path),
3275
+ },
3276
+ };
3277
+ void this.expressionEvaluator.evaluate(this.mergedOptions(), scope).then((evaluatedOptions) => {
3278
+ const newInjector = this.createRowInjector(evaluatedOptions);
3279
+ this.rowInjectorsCache.delete(cacheKey);
3280
+ this.rowInjectorsCache.set(cacheKey, newInjector);
3281
+ this.pendingEvaluations.delete(cacheKey);
3282
+ this.scheduleChangeDetection();
3283
+ }).catch(() => {
3284
+ this.pendingEvaluations.delete(cacheKey);
3285
+ });
3286
+ }
3287
+ rowInjector = this.createRowInjector(this.mergedOptions());
3288
+ this.rowInjectorsCache.set(cacheKey, rowInjector);
3289
+ }
3290
+ return rowInjector;
3291
+ }
3292
+ async resolveComponent() {
3293
+ const widget = this.widgetRegistry.resolve(this.node.type);
3294
+ const mode = 'column';
3295
+ this.component = await widget?.components[mode]?.component();
3296
+ const props = widget?.components[mode]?.properties
3297
+ ?.filter((c) => c.schema.defaultValue)
3298
+ .map((c) => ({ [c.name]: c.schema.defaultValue }))
3299
+ .reduce((acc, curr) => ({ ...acc, ...curr }), {});
3300
+ this.mergedOptions.set(merge(props, this.node.options) || {});
3301
+ this.hasExpressions = this.checkForExpressions(this.mergedOptions());
3302
+ this.rowInjectorsCache.clear();
3303
+ this.cdr.markForCheck();
3304
+ }
3305
+ createRowInjector(options) {
3306
+ return Injector.create({
3307
+ parent: this.injector,
3308
+ providers: [
3309
+ {
3310
+ provide: AXP_WIDGET_COLUMN_TOKEN,
3311
+ useValue: {
3312
+ path: this.node.path,
3313
+ options,
3314
+ caption: this.caption,
3315
+ },
3316
+ },
3317
+ ],
3318
+ });
3319
+ }
3320
+ getCacheKey(data) {
3321
+ const id = data['id'];
3322
+ if (id != null) {
3323
+ return `row-${String(id)}`;
3324
+ }
3325
+ return `row-${Object.keys(data).length}`;
3326
+ }
3327
+ checkForExpressions(obj) {
3328
+ if (typeof obj === 'string') {
3329
+ return this.expressionEvaluator.isExpression(obj);
3330
+ }
3331
+ if (Array.isArray(obj)) {
3332
+ return obj.some((item) => this.checkForExpressions(item));
3333
+ }
3334
+ if (obj && typeof obj === 'object') {
3335
+ return Object.values(obj).some((value) => this.checkForExpressions(value));
3336
+ }
3337
+ return false;
3338
+ }
3339
+ scheduleChangeDetection() {
3340
+ if (this.changeDetectionScheduled) {
3341
+ return;
3342
+ }
3343
+ this.changeDetectionScheduled = true;
3344
+ requestAnimationFrame(() => {
3345
+ this.cdr.markForCheck();
3346
+ this.changeDetectionScheduled = false;
3347
+ });
3348
+ }
3349
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3350
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPWidgetColumnCellComponent, isStandalone: true, selector: "axp-widget-column-cell", inputs: { node: "node", rowData: "rowData", caption: "caption" }, usesOnChanges: true, ngImport: i0, template: `
3351
+ @if (component && rowData) {
3352
+ <ng-container
3353
+ *ngComponentOutlet="component; injector: getRowInjector(rowData); inputs: getInputs(rowData)"
3354
+ ></ng-container>
3355
+ }
3356
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3357
+ }
3358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnCellComponent, decorators: [{
3359
+ type: Component,
3360
+ args: [{
3361
+ selector: 'axp-widget-column-cell',
3362
+ changeDetection: ChangeDetectionStrategy.OnPush,
3363
+ imports: [NgComponentOutlet],
3364
+ template: `
3365
+ @if (component && rowData) {
3366
+ <ng-container
3367
+ *ngComponentOutlet="component; injector: getRowInjector(rowData); inputs: getInputs(rowData)"
3368
+ ></ng-container>
3369
+ }
3370
+ `,
3371
+ }]
3372
+ }], propDecorators: { node: [{
3373
+ type: Input,
3374
+ args: [{ required: true }]
3375
+ }], rowData: [{
3376
+ type: Input,
3377
+ args: [{ required: true }]
3378
+ }], caption: [{
3379
+ type: Input
3380
+ }] } });
3381
+
3382
+ var AXPWidgetGroupEnum;
3383
+ (function (AXPWidgetGroupEnum) {
3384
+ AXPWidgetGroupEnum["FormElement"] = "form-element";
3385
+ AXPWidgetGroupEnum["DashboardWidget"] = "dashboard-widget";
3386
+ AXPWidgetGroupEnum["FormTemplate"] = "form-template";
3387
+ AXPWidgetGroupEnum["PropertyEditor"] = "property-editor";
3388
+ AXPWidgetGroupEnum["MetaData"] = "meta-data";
3389
+ AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
3390
+ AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
3391
+ AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
3392
+ AXPWidgetGroupEnum["BaseWidget"] = "base-widget";
3393
+ })(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
3394
+
3395
+ const AXP_STYLING_PROPERTY_GROUP = {
3396
+ name: 'styling',
3397
+ order: 1,
3398
+ title: 'Styling',
3399
+ };
3400
+ const AXP_DATA_PROPERTY_GROUP = {
3401
+ name: 'data',
3402
+ order: 7,
3403
+ title: 'Data',
3404
+ };
3405
+ const AXP_BEHAVIOR_PROPERTY_GROUP = {
3406
+ name: 'behavior',
3407
+ order: 2,
3408
+ title: 'Behavior',
3409
+ };
3410
+ const AXP_WIDGET_PROPERTY_GROUP = {
3411
+ name: 'widget',
3412
+ order: 0,
3413
+ title: 'Widget',
3414
+ };
3415
+ const AXP_VALIDATION_PROPERTY_GROUP = {
3416
+ name: 'validation',
3417
+ order: 4,
3418
+ title: 'Validation',
3419
+ };
3420
+ const AXP_APPEARANCE_PROPERTY_GROUP = {
3421
+ name: 'appearance',
3422
+ order: 2,
3423
+ title: 'Appearance',
3424
+ };
3425
+ const AXP_ANIMATION_PROPERTY_GROUP = {
3426
+ name: 'animation',
3427
+ order: 5,
3428
+ title: 'Animation',
3429
+ };
3430
+ const AXP_TRIGGERS_PROPERTY_GROUP = {
3431
+ name: 'triggers',
3432
+ order: 3,
3433
+ title: 'Triggers',
3434
+ };
3435
+
3436
+ /**
3437
+ * Single property that edits all data-source-related options (dataSource, valueField, textField, filters)
3438
+ * in one dedicated widget. Uses path: 'options' and setValue with merge (same pattern as flex-options).
3439
+ */
3440
+ const AXP_DATA_SOURCE_OPTIONS_PROPERTY = {
3441
+ name: 'dataSourceOptions',
3442
+ title: 'Data Source',
3443
+ group: AXP_DATA_PROPERTY_GROUP,
3444
+ showLabel: false,
3445
+ schema: {
3446
+ dataType: 'object',
3447
+ interface: {
3448
+ name: 'dataSourceOptions',
3449
+ path: 'options',
3450
+ type: 'data-source-options',
3451
+ options: {},
3452
+ },
3453
+ },
3454
+ visible: true,
3455
+ };
3456
+ // export const AXP_DATA_SOURCE_PROPERTY: AXPWidgetProperty = {
3457
+ // name: 'dataSource',
3458
+ // title: 'Data Source',
3459
+ // group: AXP_DATA_PROPERTY_GROUP,
3460
+ // schema: {
3461
+ // dataType: 'object',
3462
+ // interface: {
3463
+ // name: 'dataSource',
3464
+ // path: 'options.dataSource',
3465
+ // type: AXPWidgetsCatalog.select,
3466
+ // valueTransforms: objectKeyValueTransforms('name'),
3467
+ // options: {
3468
+ // valueField: 'name',
3469
+ // textField: 'title',
3470
+ // dataSource: 'dataSources',
3471
+ // hasClearButton: true,
3472
+ // allowSearch: true,
3473
+ // },
3474
+ // },
3475
+ // },
3476
+ // visible: true,
3477
+ // };
3478
+ // export const AXP_DATA_SOURCE_VALUE_FIELD: AXPWidgetProperty = {
3479
+ // name: 'valueField',
3480
+ // title: 'Value Field',
3481
+ // group: AXP_DATA_PROPERTY_GROUP,
3482
+ // schema: {
3483
+ // dataType: 'string',
3484
+ // interface: {
3485
+ // name: 'valueField',
3486
+ // path: 'options.valueField',
3487
+ // type: AXPWidgetsCatalog.text,
3488
+ // options: {
3489
+ // hasClearButton: true,
3490
+ // },
3491
+ // triggers: [
3492
+ // {
3493
+ // event: `{{ events.context('options.dataSource') }}`,
3494
+ // action: `{{ context.set('options.valueField',widget.find('dataSource').output('item').valueField?.name); }}`,
3495
+ // },
3496
+ // ],
3497
+ // },
3498
+ // },
3499
+ // visible: true,
3500
+ // };
3501
+ // export const AXP_DATA_SOURCE_TEXT_FIELD: AXPWidgetProperty = {
3502
+ // name: 'textField',
3503
+ // title: 'Text Field',
3504
+ // group: AXP_DATA_PROPERTY_GROUP,
3505
+ // schema: {
3506
+ // dataType: 'string',
3507
+ // interface: {
3508
+ // name: 'textField',
3509
+ // path: 'options.textField',
3510
+ // type: AXPWidgetsCatalog.text,
3511
+ // options: {
3512
+ // hasClearButton: true,
3513
+ // },
3514
+ // triggers: [
3515
+ // {
3516
+ // event: `{{ events.context('options.dataSource') }}`,
3517
+ // action: `{{ context.set('options.textField',widget.find('dataSource').output('item').textField?.name); }}`,
3518
+ // },
3519
+ // ],
3520
+ // },
3521
+ // },
3522
+ // visible: true,
3523
+ // };
3524
+ // /** Use AXP_DATA_SOURCE_OPTIONS_PROPERTY for a single unified data-source editor, or the three below for separate fields. */
3525
+ // export const AXP_DATA_SOURCE_PROPERTIES = [
3526
+ // AXP_DATA_SOURCE_PROPERTY,
3527
+ // AXP_DATA_SOURCE_VALUE_FIELD,
3528
+ // AXP_DATA_SOURCE_TEXT_FIELD,
3529
+ // ];
3530
+
3531
+ const AXP_NAME_PROPERTY = createStringProperty({
3532
+ name: 'name',
3533
+ title: 'Name',
3534
+ group: AXP_WIDGET_PROPERTY_GROUP,
3535
+ });
3536
+ const AXP_THEME_PROPERTY = {
3537
+ name: 'theme',
3538
+ title: 'Theme',
3539
+ group: AXP_STYLING_PROPERTY_GROUP,
3540
+ schema: {
3541
+ dataType: 'string',
3542
+ defaultValue: { id: 'default', title: 'Default' },
3543
+ interface: {
3544
+ name: 'theme',
3545
+ path: 'options.theme',
3546
+ type: AXPWidgetsCatalog.select,
3547
+ options: {
3548
+ dataSource: [
3549
+ {
3550
+ id: 'default',
3551
+ title: 'Default',
3552
+ },
3553
+ {
3554
+ id: 'light',
3555
+ title: 'Light',
3556
+ },
3557
+ {
3558
+ id: 'dark',
3559
+ title: 'Dark',
3560
+ },
3561
+ ],
3562
+ },
3563
+ },
3564
+ },
3565
+ visible: true,
3566
+ };
3567
+ const AXP_DIRECTION_PROPERTY = {
3568
+ name: 'direction',
3569
+ title: 'Direction',
3570
+ group: AXP_STYLING_PROPERTY_GROUP,
3571
+ schema: {
3572
+ dataType: 'string',
3573
+ defaultValue: { id: 'horizontal' },
3574
+ interface: {
3575
+ name: 'direction',
3576
+ path: 'options.direction',
3577
+ type: AXPWidgetsCatalog.select,
3578
+ options: {
3579
+ dataSource: [
3580
+ {
3581
+ id: 'horizontal',
3582
+ title: 'Horizontal',
3583
+ },
3584
+ {
3585
+ id: 'vertical',
3586
+ title: 'Vertical',
3587
+ },
3588
+ ],
3589
+ },
3590
+ },
3591
+ },
3592
+ visible: true,
3593
+ };
3594
+ const AXP_COLOR_PROPERTY = {
3595
+ name: 'color',
3596
+ title: 'Color',
3597
+ group: AXP_STYLING_PROPERTY_GROUP,
3598
+ schema: {
3599
+ dataType: 'string',
3600
+ interface: {
3601
+ path: 'options.color',
3602
+ options: {
3603
+ hasClearButton: true,
3604
+ },
3605
+ type: AXPWidgetsCatalog.color,
3606
+ },
3607
+ },
3608
+ visible: true,
3609
+ };
3610
+ const AXP_FONT_SIZE_PROPERTY = {
3611
+ name: 'fontSize',
3612
+ title: 'Font Size',
3613
+ group: AXP_STYLING_PROPERTY_GROUP,
3614
+ schema: {
3615
+ dataType: 'string',
3616
+ defaultValue: '12px',
3617
+ interface: {
3618
+ name: 'fontSize',
3619
+ path: 'options.fontSize',
3620
+ type: AXPWidgetsCatalog.text,
3621
+ },
3622
+ },
3623
+ visible: true,
3624
+ };
3625
+ const AXP_BG_COLOR_PROPERTY = {
3626
+ name: 'backgroundColor',
3627
+ title: 'Background Color',
3628
+ group: AXP_STYLING_PROPERTY_GROUP,
3629
+ schema: {
3630
+ dataType: 'string',
3631
+ interface: {
3632
+ path: 'options.backgroundColor',
3633
+ options: {
3634
+ hasClearButton: true,
3635
+ },
3636
+ type: AXPWidgetsCatalog.color,
3637
+ },
3638
+ },
3639
+ visible: true,
3640
+ };
3641
+
3642
+ const AXP_CONTENT_PROPERTY = createStringProperty({
3643
+ name: 'content',
3644
+ title: 'Content',
3645
+ path: 'options.content',
3646
+ group: AXP_DATA_PROPERTY_GROUP,
3647
+ });
3648
+ const AXP_PLACEHOLDER_PROPERTY = createStringProperty({
3649
+ name: 'placeholder',
3650
+ title: 'Placeholder',
3651
+ path: 'options.placeholder',
3652
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3653
+ });
3654
+ const AXP_DATA_PATH_PROPERTY = createStringProperty({
3655
+ name: 'path',
3656
+ title: 'Data Path',
3657
+ group: AXP_DATA_PROPERTY_GROUP,
3658
+ });
3659
+ const AXP_DISABLED_PROPERTY = createBooleanProperty({
3660
+ name: 'disabled',
3661
+ title: 'Disabled',
3662
+ path: 'options.disabled',
3663
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3664
+ });
3665
+ const AXP_READONLY_PROPERTY = createBooleanProperty({
3666
+ name: 'readonly',
3667
+ title: 'Readonly',
3668
+ path: 'options.readonly',
3669
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3670
+ });
3671
+ const AXP_ALLOW_MULTIPLE_PROPERTY = createBooleanProperty({
3672
+ name: 'multiple',
3673
+ title: 'Multiple',
3674
+ path: 'options.multiple',
3675
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3676
+ });
3677
+ const AXP_ALLOW_CLEAR_PROPERTY = createBooleanProperty({
3678
+ name: 'allowClear',
3679
+ title: 'Allow Clear',
3680
+ path: 'options.allowClear',
3681
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3682
+ });
3683
+ const AXP_HAS_LABEL_PROPERTY = createBooleanProperty({
3684
+ name: 'hasLabel',
3685
+ title: 'Label',
3686
+ path: 'options.hasLabel',
3687
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3688
+ defaultValue: true,
3689
+ });
3690
+ const AXP_HAS_ICON_PROPERTY = createBooleanProperty({
3691
+ name: 'hasIcon',
3692
+ title: 'Icon',
3693
+ path: 'options.hasIcon',
3694
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3695
+ defaultValue: true,
3696
+ });
3697
+ const AXP_ICON_PROPERTY = createStringProperty({
3698
+ name: 'icon',
3699
+ title: 'Icon Name',
3700
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3701
+ path: 'options.icon',
3702
+ });
3703
+ const AXP_IS_LOADING_PROPERTY = createBooleanProperty({
3704
+ name: 'loading',
3705
+ title: 'Is Loading',
3706
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3707
+ path: 'options.loading',
3708
+ });
3709
+ const AXP_HAS_CLEAR_BUTTON_PROPERTY = createBooleanProperty({
3710
+ name: 'hasClearButton',
3711
+ title: 'Clear Button',
3712
+ path: 'options.hasClearButton',
3713
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3714
+ defaultValue: false,
3715
+ });
3716
+ const AXP_ALLOW_SEARCH_PROPERTY = createBooleanProperty({
3717
+ name: 'allowSearch',
3718
+ title: 'Allow Search',
3719
+ path: 'options.allowSearch',
3720
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3721
+ defaultValue: false,
3722
+ });
3723
+ const AXP_HAS_COPY_ICON_PROPERTY = createBooleanProperty({
3724
+ name: 'hasCopyIcon',
3725
+ title: 'Copy Icon',
3726
+ path: 'options.hasCopyIcon',
3727
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3728
+ defaultValue: true,
3729
+ });
3730
+ const AXP_HAS_EYE_ICON_PROPERTY = createBooleanProperty({
3731
+ name: 'hasEyeIcon',
3732
+ title: 'Eye Icon',
3733
+ path: 'options.hasEyeIcon',
3734
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3735
+ defaultValue: true,
3736
+ });
3737
+ const AXP_DOWNLOADABLE_PROPERTY = createBooleanProperty({
3738
+ name: 'downloadable',
3739
+ title: 'Downloadable',
3740
+ path: 'options.downloadable',
3741
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3742
+ defaultValue: true,
3743
+ });
3744
+ // Converted with createStringProperty
3745
+ const AXP_TRULY_TEXT_PROPERTY = createStringProperty({
3746
+ name: 'trulyText',
3747
+ title: 'Truly Text',
3748
+ path: 'options.trulyText',
3749
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3750
+ });
3751
+ const AXP_FALSY_TEXT_PROPERTY = createStringProperty({
3752
+ name: 'falsyText',
3753
+ title: 'Falsy Text',
3754
+ path: 'options.falsyText',
3755
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3756
+ });
3757
+ const AXP_TEXT_PROPERTY = createStringProperty({
3758
+ name: 'text',
3759
+ title: 'Text',
3760
+ path: 'options.text',
3761
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3762
+ });
3763
+ const AXP_TITLE_PROPERTY = createStringProperty({
3764
+ name: 'title',
3765
+ title: 'Title',
3766
+ path: 'options.title',
3767
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3768
+ });
3769
+ const AXP_LABEL_PROPERTY = createStringProperty({
3770
+ name: 'label',
3771
+ title: 'Label',
3772
+ path: 'options.label',
3773
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3774
+ defaultValue: '',
3775
+ });
3776
+ const AXP_VALUE_FIELD_PROPERTY = createStringProperty({
3777
+ name: 'valueField',
3778
+ title: 'Value Field',
3779
+ path: 'options.valueField',
3780
+ group: AXP_DATA_PROPERTY_GROUP,
3781
+ defaultValue: 'id',
3782
+ });
3783
+ const AXP_TEXT_FIELD_PROPERTY = createStringProperty({
3784
+ name: 'textField',
3785
+ title: 'Text Field',
3786
+ path: 'options.textField',
3787
+ group: AXP_DATA_PROPERTY_GROUP,
3788
+ defaultValue: 'title',
3789
+ });
3790
+ const AXP_DESCRIPTION_PROPERTY = createStringProperty({
3791
+ name: 'description',
3792
+ title: 'Description',
3793
+ path: 'options.description',
3794
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3795
+ });
3796
+ const AXP_STYLE_COLOR_PROPERTY = createSelectProperty({
3797
+ name: 'color',
3798
+ title: 'Color',
3799
+ dataSource: AX_STYLE_COLOR_TYPES,
3800
+ defaultValue: 'primary',
3801
+ path: 'options.color',
3802
+ group: AXP_STYLING_PROPERTY_GROUP,
3803
+ });
3804
+ const AXP_STYLE_LOOK_PROPERTY = createSelectProperty({
3805
+ name: 'look',
3806
+ title: 'Look',
3807
+ dataSource: AX_STYLE_LOOK_TYPES,
3808
+ defaultValue: 'solid',
3809
+ path: 'options.look',
3810
+ group: AXP_STYLING_PROPERTY_GROUP,
3811
+ });
3812
+ const AXP_TEXT_ALIGN_PROPERTY = createSelectProperty({
3813
+ name: 'textAlign',
3814
+ title: 'Text Align',
3815
+ path: 'options.textAlign',
3816
+ group: AXP_STYLING_PROPERTY_GROUP,
3817
+ defaultValue: { id: 'left', title: 'Left' },
3818
+ dataSource: [
3819
+ { id: 'left', title: 'Left' },
3820
+ { id: 'center', title: 'Center' },
3821
+ { id: 'right', title: 'Right' },
3822
+ { id: 'justify', title: 'Justify' },
3823
+ ],
3824
+ });
3825
+ const AXP_VERTICAL_ALIGN_PROPERTY = createSelectProperty({
3826
+ name: 'verticalAlign',
3827
+ title: 'Vertical Align',
3828
+ path: 'options.verticalAlign',
3829
+ group: AXP_STYLING_PROPERTY_GROUP,
3830
+ defaultValue: { id: 'top', title: 'Top' },
3831
+ dataSource: [
3832
+ { id: 'top', title: 'Top' },
3833
+ { id: 'middle', title: 'Middle' },
3834
+ { id: 'bottom', title: 'Bottom' },
3835
+ { id: 'baseline', title: 'Baseline' },
3836
+ ],
3837
+ });
3838
+ const AXP_DATE_FORMAT_PROPERTY = createSelectProperty({
3839
+ name: 'format',
3840
+ title: 'Format',
3841
+ dataSource: [
3842
+ { id: 'date', title: 'Date' },
3843
+ { id: 'datetime', title: 'DateTime' },
3844
+ { id: 'time', title: 'Time' },
3845
+ ],
3846
+ defaultValue: { id: 'date', title: 'Date' },
3847
+ path: 'options.format',
3848
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3849
+ });
3850
+ const AXP_DATE_DEPTH_PROPERTY = createSelectProperty({
3851
+ name: 'depth',
3852
+ title: 'Input Depth',
3853
+ dataSource: [
3854
+ { id: 'year', title: 'Year' },
3855
+ { id: 'month', title: 'Month' },
3856
+ { id: 'day', title: 'Day' },
3857
+ ],
3858
+ path: 'options.depth',
3859
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3860
+ defaultValue: { id: 'day', title: 'Day' },
3861
+ });
3862
+ /** Max span in days between from/to when filter operation is `between`. */
3863
+ const AXP_DATE_RANGE_LIMIT_PROPERTY = createNumberProperty({
3864
+ name: 'limit',
3865
+ title: 'Range Limit (Days)',
3866
+ path: 'options.limit',
3867
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
3868
+ });
3869
+ function booleanDefaultProperty(defaultValue = false) {
3870
+ return {
3871
+ name: 'defaultValue',
3872
+ title: 'Default Value',
3873
+ group: AXP_DATA_PROPERTY_GROUP,
3874
+ schema: {
3875
+ dataType: 'boolean',
3876
+ defaultValue: defaultValue,
3877
+ interface: {
3878
+ name: 'defaultValue',
3879
+ path: 'defaultValue',
3880
+ type: AXPWidgetsCatalog.toggle,
3881
+ },
3882
+ },
3883
+ visible: true,
3884
+ };
3885
+ }
3886
+ function plainTextDefaultProperty() {
3887
+ return {
3888
+ name: 'defaultValue',
3889
+ title: 'Default Value',
3890
+ group: AXP_DATA_PROPERTY_GROUP,
3891
+ schema: {
3892
+ dataType: 'string',
3893
+ interface: {
3894
+ name: 'defaultValue',
3895
+ path: 'defaultValue',
3896
+ type: AXPWidgetsCatalog.text,
3897
+ options: {
3898
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-plain-text',
3899
+ },
3900
+ },
3901
+ },
3902
+ visible: true,
3903
+ };
3904
+ }
3905
+ function largeTextDefaultProperty() {
3906
+ return {
3907
+ name: 'defaultValue',
3908
+ title: 'Default Value',
3909
+ group: AXP_DATA_PROPERTY_GROUP,
3910
+ schema: {
3911
+ dataType: 'string',
3912
+ interface: {
3913
+ name: 'defaultValue',
3914
+ path: 'defaultValue',
3915
+ type: AXPWidgetsCatalog.largeText,
3916
+ options: {
3917
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-large-text',
3918
+ },
3919
+ },
3920
+ },
3921
+ visible: true,
3922
+ };
3923
+ }
3924
+ function richTextDefaultProperty() {
3925
+ return {
3926
+ name: 'defaultValue',
3927
+ title: 'Default Value',
3928
+ group: AXP_DATA_PROPERTY_GROUP,
3929
+ schema: {
3930
+ dataType: 'string',
3931
+ interface: {
3932
+ name: 'defaultValue',
3933
+ path: 'defaultValue',
3934
+ type: AXPWidgetsCatalog.richText,
3935
+ options: {
3936
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-rich-text',
3937
+ },
3938
+ },
3939
+ },
3940
+ visible: true,
3941
+ };
3942
+ }
3943
+ /**
3944
+ * Default value editor for select-editor: uses `context.options(key)` so the default picker reads
3945
+ * the **host** widget's options from the shared context (not the nested property field's `widget`).
3946
+ */
3947
+ function selectEditorDefaultValueProperty() {
3948
+ return {
3949
+ name: 'defaultValue',
3950
+ title: 'Default Value',
3951
+ group: AXP_DATA_PROPERTY_GROUP,
3952
+ schema: {
3953
+ dataType: 'object',
3954
+ interface: {
3955
+ name: 'defaultValue',
3956
+ path: 'defaultValue',
3957
+ type: AXPWidgetsCatalog.select,
3958
+ options: {
3959
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-select',
3960
+ dataSource: '{{ context.options("dataSource") }}',
3961
+ valueField: '{{ context.options("valueField") }}',
3962
+ textField: '{{ context.options("textField") }}',
3963
+ multiple: '{{ context.options("multiple") }}',
3964
+ hasClearButton: true,
3965
+ },
3966
+ },
3967
+ },
3968
+ visible: true,
3969
+ };
3970
+ }
3971
+ /**
3972
+ * Default value editor for selection-list-editor: uses the select widget in the designer so picking
3973
+ * a default matches select UX while still binding to the host's dataSource / fields via `context.options`.
3974
+ */
3975
+ function selectionListEditorDefaultValueProperty() {
3976
+ return {
3977
+ name: 'defaultValue',
3978
+ title: 'Default Value',
3979
+ group: AXP_DATA_PROPERTY_GROUP,
3980
+ schema: {
3981
+ dataType: 'object',
3982
+ interface: {
3983
+ name: 'defaultValue',
3984
+ path: 'defaultValue',
3985
+ type: AXPWidgetsCatalog.select,
3986
+ options: {
3987
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-select',
3988
+ dataSource: '{{ context.options("dataSource") }}',
3989
+ valueField: '{{ context.options("valueField") }}',
3990
+ textField: '{{ context.options("textField") }}',
3991
+ multiple: '{{ context.options("multiple") }}',
3992
+ hasClearButton: true,
3993
+ },
3994
+ },
3995
+ },
3996
+ visible: true,
3997
+ };
3998
+ }
3999
+ function numberDefaultProperty() {
4000
+ return {
4001
+ name: 'defaultValue',
4002
+ title: 'Default Value',
4003
+ group: AXP_DATA_PROPERTY_GROUP,
4004
+ schema: {
4005
+ dataType: 'number',
4006
+ interface: {
4007
+ name: 'defaultValue',
4008
+ path: 'defaultValue',
4009
+ type: AXPWidgetsCatalog.number,
4010
+ options: {
4011
+ placeholder: '@layout-designer:property-editor.placeholders.default-value-number',
4012
+ },
4013
+ },
4014
+ },
4015
+ visible: true,
4016
+ };
4017
+ }
4018
+ function numberMinValueProperty(value) {
4019
+ return {
4020
+ name: 'minValue',
4021
+ title: 'Min Value',
4022
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4023
+ order: 9,
4024
+ schema: {
4025
+ dataType: 'number',
4026
+ defaultValue: value,
4027
+ interface: {
4028
+ name: 'minValue',
4029
+ path: 'options.minValue',
4030
+ type: AXPWidgetsCatalog.number,
4031
+ options: {
4032
+ placeholder: '@layout-designer:property-editor.placeholders.number-min-value',
4033
+ },
4034
+ },
4035
+ },
4036
+ visible: true,
4037
+ };
4038
+ }
4039
+ function numberMaxValueProperty(value) {
4040
+ return {
4041
+ name: 'maxValue',
4042
+ title: 'Max Value',
4043
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4044
+ order: 10,
4045
+ schema: {
4046
+ dataType: 'number',
4047
+ defaultValue: value,
4048
+ interface: {
4049
+ name: 'maxValue',
4050
+ path: 'options.maxValue',
4051
+ type: AXPWidgetsCatalog.number,
4052
+ options: {
4053
+ placeholder: '@layout-designer:property-editor.placeholders.number-max-value',
4054
+ },
4055
+ },
4056
+ },
4057
+ visible: true,
4058
+ };
4059
+ }
4060
+ const AXP_MULTI_LANGUAGE_PROPERTY = createBooleanProperty({
4061
+ name: 'multiLanguage',
4062
+ title: 'Multi Language',
4063
+ path: 'options.multiLanguage',
4064
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4065
+ defaultValue: false,
4066
+ });
4067
+ const AXP_SPIN_BUTTON_PROPERTY = createBooleanProperty({
4068
+ name: 'spinButton',
4069
+ title: 'Spin Button',
4070
+ path: 'options.spinButton',
4071
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4072
+ });
4073
+ const AXP_NUMBER_SEPARATOR_PROPERTY = createStringProperty({
4074
+ name: 'seprator',
4075
+ title: 'Thousands Separator',
4076
+ path: 'options.seprator',
4077
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4078
+ });
4079
+ const AXP_DEFAULT_ROW_COUNT_PROPERTY = createNumberProperty({
4080
+ name: 'defaultRowCount',
4081
+ title: 'Default Row Count',
4082
+ path: 'options.defaultRowCount',
4083
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4084
+ });
4085
+ const AXP_MIN_LINE_COUNT_PROPERTY = createNumberProperty({
4086
+ name: 'minLineCount',
4087
+ title: 'Min Line Count',
4088
+ path: 'options.minLineCount',
4089
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4090
+ });
4091
+ const AXP_MAX_LINE_COUNT_PROPERTY = createNumberProperty({
4092
+ name: 'maxLineCount',
4093
+ title: 'Max Line Count',
4094
+ path: 'options.maxLineCount',
4095
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4096
+ });
4097
+ const AXP_FIT_LINE_COUNT_PROPERTY = createBooleanProperty({
4098
+ name: 'fitLineCount',
4099
+ title: 'Fit Line Count',
4100
+ path: 'options.fitLineCount',
4101
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4102
+ });
4103
+ const AXP_SHOW_PASSWORD_PROPERTY = createBooleanProperty({
4104
+ name: 'showPassword',
4105
+ title: 'Show Password',
4106
+ path: 'options.showPassword',
4107
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4108
+ });
4109
+ const AXP_TRIGGERS_PROPERTY = {
4110
+ name: 'triggers',
4111
+ title: 'Triggers',
4112
+ group: AXP_TRIGGERS_PROPERTY_GROUP,
4113
+ showLabel: false,
4114
+ schema: {
4115
+ dataType: 'object',
4116
+ interface: {
4117
+ name: 'triggers',
4118
+ path: 'triggers',
4119
+ type: 'triggers-editor',
4120
+ },
4121
+ },
4122
+ visible: true,
4123
+ };
4124
+
4125
+ const AXP_LAYOUT_GRID_PROPERTY_GROUP = {
4126
+ name: 'grid',
4127
+ order: 1,
4128
+ title: 'Grid Layout',
4129
+ };
4130
+ const AXP_LAYOUT_FLEX_PROPERTY_GROUP = {
4131
+ name: 'flex',
4132
+ order: 1,
4133
+ title: 'Flex Layout',
4134
+ };
4135
+ const AXP_BOX_MODEL_PROPERTY_GROUP = {
4136
+ name: 'box',
4137
+ order: 1,
4138
+ title: 'Box Model',
4139
+ };
4140
+ const AXP_LAYOUT_TABLE_PROPERTY_GROUP = {
4141
+ name: 'table',
4142
+ order: 1,
4143
+ title: 'Table Layout',
4144
+ };
4145
+ const AXP_LAYOUT_GAP_PROPERTY = {
4146
+ name: 'gap',
4147
+ title: 'Gap',
4148
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4149
+ schema: {
4150
+ dataType: 'number',
4151
+ defaultValue: 2,
4152
+ interface: {
4153
+ name: 'gap',
4154
+ path: 'options.gap',
4155
+ type: AXPWidgetsCatalog.number,
4156
+ options: {
4157
+ minValue: 0,
4158
+ maxValue: 12,
4159
+ },
4160
+ },
4161
+ },
4162
+ visible: true,
4163
+ };
4164
+ const AXP_LAYOUT_COLUMNS_PROPERTY = {
4165
+ name: 'cols',
4166
+ title: 'Columns',
4167
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4168
+ schema: {
4169
+ dataType: 'number',
4170
+ defaultValue: 1,
4171
+ interface: {
4172
+ name: 'cols',
4173
+ path: 'options.cols',
4174
+ type: AXPWidgetsCatalog.number,
4175
+ options: {
4176
+ minValue: 1,
4177
+ maxValue: 12,
4178
+ },
4179
+ },
4180
+ },
4181
+ visible: true,
4182
+ };
4183
+ const AXP_LAYOUT_ROWS_PROPERTY = {
4184
+ name: 'rows',
4185
+ title: 'Rows',
4186
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4187
+ schema: {
4188
+ dataType: 'number',
4189
+ defaultValue: 1,
4190
+ interface: {
4191
+ name: 'rows',
4192
+ path: 'options.rows',
4193
+ type: AXPWidgetsCatalog.number,
4194
+ options: {
4195
+ minValue: 1,
4196
+ maxValue: 100,
4197
+ },
4198
+ },
4199
+ },
4200
+ visible: true,
4201
+ };
4202
+ const AXP_LAYOUT_GRID_PROPERTIES = [
4203
+ AXP_LAYOUT_GAP_PROPERTY,
4204
+ AXP_LAYOUT_COLUMNS_PROPERTY,
4205
+ AXP_LAYOUT_ROWS_PROPERTY,
4206
+ ];
4207
+ const AXP_LAYOUT_GRID_ROW_PROPERTIES = [
4208
+ AXP_LAYOUT_GAP_PROPERTY,
4209
+ cloneProperty(AXP_LAYOUT_COLUMNS_PROPERTY, { schema: { defaultValue: 12 } }),
4210
+ ];
4211
+ const AXP_LAYOUT_GRID_ITEM_PROPERTY = {
4212
+ name: 'gridItem',
4213
+ title: 'Grid Item',
4214
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4215
+ schema: {
4216
+ dataType: 'object',
4217
+ interface: {
4218
+ name: 'gridItem',
4219
+ path: 'options',
4220
+ type: AXPWidgetsCatalog.gridItemOptions,
4221
+ options: {},
4222
+ },
4223
+ },
4224
+ visible: true,
4225
+ };
4226
+ const AXP_LAYOUT_SPACING_PROPERTY = {
4227
+ name: 'spacing',
4228
+ title: 'Spacing',
4229
+ group: AXP_BOX_MODEL_PROPERTY_GROUP,
4230
+ schema: {
4231
+ dataType: 'object',
4232
+ interface: {
4233
+ name: 'spacing',
4234
+ path: 'options.spacing',
4235
+ type: AXPWidgetsCatalog.spacing,
4236
+ options: {},
4237
+ },
4238
+ },
4239
+ visible: true,
4240
+ };
4241
+ const AXP_LAYOUT_BORDER_PROPERTY = {
4242
+ name: 'border',
4243
+ title: 'Border',
4244
+ group: AXP_BOX_MODEL_PROPERTY_GROUP,
4245
+ schema: {
4246
+ dataType: 'object',
4247
+ interface: {
4248
+ name: 'border',
4249
+ path: 'options.border',
4250
+ type: AXPWidgetsCatalog.border,
4251
+ options: {},
4252
+ },
4253
+ },
4254
+ visible: true,
4255
+ };
4256
+ const AXP_LAYOUT_FLEX_PROPERTY = {
4257
+ name: 'flex',
4258
+ title: 'Flex',
4259
+ group: AXP_LAYOUT_FLEX_PROPERTY_GROUP,
4260
+ schema: {
4261
+ dataType: 'object',
4262
+ interface: {
4263
+ name: 'flex',
4264
+ path: 'options',
4265
+ type: AXPWidgetsCatalog.flexOptions,
4266
+ options: {},
4267
+ },
4268
+ },
4269
+ visible: true,
4270
+ };
4271
+ const AXP_LAYOUT_FLEX_ITEM_PROPERTY = {
4272
+ name: 'flexItem',
4273
+ title: 'Flex Item',
4274
+ group: AXP_LAYOUT_FLEX_PROPERTY_GROUP,
4275
+ schema: {
4276
+ dataType: 'object',
4277
+ interface: {
4278
+ name: 'flexItem',
4279
+ path: 'options',
4280
+ type: AXPWidgetsCatalog.flexItemOptions,
4281
+ options: {},
4282
+ },
4283
+ },
4284
+ visible: true,
4285
+ };
4286
+ const AXP_LAYOUT_GRID_PROPERTY = {
4287
+ name: 'grid',
4288
+ title: 'Grid',
4289
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4290
+ schema: {
4291
+ dataType: 'object',
4292
+ interface: {
4293
+ name: 'grid',
4294
+ path: 'options.grid',
4295
+ type: AXPWidgetsCatalog.gridOptions,
4296
+ options: {},
4297
+ },
4298
+ },
4299
+ visible: true,
4300
+ };
4301
+ const AXP_TABLE_COLUMNS_PROPERTY = {
4302
+ name: 'columns',
4303
+ title: 'Columns',
4304
+ group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
4305
+ schema: {
4306
+ dataType: 'number',
4307
+ defaultValue: 3,
4308
+ interface: {
4309
+ name: 'columns',
4310
+ path: 'options.columns',
4311
+ type: AXPWidgetsCatalog.number,
4312
+ options: {
4313
+ minValue: 1,
4314
+ maxValue: 12,
4315
+ },
4316
+ },
4317
+ },
4318
+ visible: true,
4319
+ };
4320
+ // Removed rowHeight/rows from table properties
4321
+ const AXP_TABLE_ITEM_COLSPAN_PROPERTY = {
4322
+ name: 'colSpan',
4323
+ title: 'Column Span',
4324
+ group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
4325
+ schema: {
4326
+ dataType: 'number',
4327
+ defaultValue: 1,
4328
+ interface: {
4329
+ name: 'colSpan',
4330
+ path: 'options.colSpan',
4331
+ type: AXPWidgetsCatalog.number,
4332
+ options: {
4333
+ minValue: 1,
4334
+ maxValue: 24,
4335
+ },
4336
+ },
4337
+ },
4338
+ visible: true,
4339
+ };
4340
+ const AXP_TABLE_ITEM_ROWSPAN_PROPERTY = {
4341
+ name: 'rowSpan',
4342
+ title: 'Row Span',
4343
+ group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
4344
+ schema: {
4345
+ dataType: 'number',
4346
+ defaultValue: 1,
4347
+ interface: {
4348
+ name: 'rowSpan',
4349
+ path: 'options.rowSpan',
4350
+ type: AXPWidgetsCatalog.number,
4351
+ options: {
4352
+ minValue: 1,
4353
+ maxValue: 100,
4354
+ },
4355
+ },
4356
+ },
4357
+ visible: true,
4358
+ };
4359
+ // Removed header/footer/sticky related table properties
4360
+ const AXP_LAYOUT_ADVANCED_GRID_PROPERTY = {
4361
+ name: 'advancedGrid',
4362
+ title: 'Advanced Grid',
4363
+ group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
4364
+ schema: {
4365
+ dataType: 'object',
4366
+ interface: {
4367
+ name: 'advancedGrid',
4368
+ path: 'options.advancedGrid',
4369
+ type: AXPWidgetsCatalog.advancedGridOptions,
4370
+ options: {},
4371
+ },
4372
+ },
4373
+ visible: true,
4374
+ };
4375
+ const AXP_LAYOUT_SHOW_HEADER_PROPERTY = createBooleanProperty({
4376
+ name: 'showHeader',
4377
+ title: 'Show Header',
4378
+ group: AXP_BEHAVIOR_PROPERTY_GROUP,
4379
+ path: 'options.showHeader',
4380
+ defaultValue: true,
4381
+ });
4382
+ const AXP_LAYOUT_DIRECTION_PROPERTY = {
4383
+ name: 'direction',
4384
+ title: 'Direction',
4385
+ group: AXP_BOX_MODEL_PROPERTY_GROUP,
4386
+ order: 99,
4387
+ schema: {
4388
+ dataType: 'string',
4389
+ interface: {
4390
+ name: 'direction',
4391
+ path: 'options.direction',
4392
+ type: AXPWidgetsCatalog.direction,
4393
+ options: {},
4394
+ },
4395
+ },
4396
+ visible: true,
4397
+ };
4398
+
4399
+ const TABLE_COLUMN_ALIGN_DATA_SOURCE = [
4400
+ { id: 'start', title: 'Start' },
4401
+ { id: 'center', title: 'Center' },
4402
+ { id: 'end', title: 'End' },
4403
+ ];
4404
+ const AXP_TABLE_COLUMN_HEADER_ALIGN_PROPERTY = {
4405
+ name: 'alignHeader',
4406
+ title: 'Header alignment',
4407
+ group: AXP_STYLING_PROPERTY_GROUP,
4408
+ schema: {
4409
+ dataType: 'string',
4410
+ defaultValue: 'start',
4411
+ interface: {
4412
+ name: 'alignHeader',
4413
+ path: 'options.align.header',
4414
+ type: AXPWidgetsCatalog.select,
4415
+ options: {
4416
+ dataSource: [...TABLE_COLUMN_ALIGN_DATA_SOURCE],
4417
+ },
4418
+ },
4419
+ },
4420
+ visible: true,
4421
+ };
4422
+ const AXP_TABLE_COLUMN_CELL_ALIGN_PROPERTY = {
4423
+ name: 'alignCell',
4424
+ title: 'Cell alignment',
4425
+ group: AXP_STYLING_PROPERTY_GROUP,
4426
+ schema: {
4427
+ dataType: 'string',
4428
+ defaultValue: 'start',
4429
+ interface: {
4430
+ name: 'alignCell',
4431
+ path: 'options.align.cell',
4432
+ type: AXPWidgetsCatalog.select,
4433
+ options: {
4434
+ dataSource: [...TABLE_COLUMN_ALIGN_DATA_SOURCE],
4435
+ },
4436
+ },
4437
+ },
4438
+ visible: true,
4439
+ };
4440
+ /** Optional column designer fields; spread next to `AXP_TABLE_COLUMN_WIDTH_PROPERTY` where needed. */
4441
+ const AXP_TABLE_COLUMN_ALIGNMENT_PROPERTIES = [
4442
+ AXP_TABLE_COLUMN_HEADER_ALIGN_PROPERTY,
4443
+ AXP_TABLE_COLUMN_CELL_ALIGN_PROPERTY,
4444
+ ];
4445
+ const AXP_TABLE_COLUMN_WIDTH_PROPERTY = {
4446
+ name: 'width',
4447
+ title: 'Width',
4448
+ group: AXP_STYLING_PROPERTY_GROUP,
4449
+ schema: {
4450
+ dataType: 'string',
4451
+ defaultValue: '300px',
4452
+ interface: {
4453
+ name: 'width',
4454
+ path: 'options.width',
4455
+ type: AXPWidgetsCatalog.text,
4456
+ },
4457
+ },
4458
+ visible: true,
4459
+ };
4460
+ const AXP_TABLE_COLUMN_HEIGHT_PROPERTY = {
4461
+ name: 'height',
4462
+ title: 'Height',
4463
+ group: AXP_STYLING_PROPERTY_GROUP,
4464
+ schema: {
4465
+ dataType: 'string',
4466
+ defaultValue: '300px',
4467
+ interface: {
4468
+ name: 'height',
4469
+ path: 'options.height',
4470
+ type: AXPWidgetsCatalog.text,
4471
+ },
4472
+ },
4473
+ visible: true,
4474
+ };
4475
+
4476
+ const AXP_REQUIRED_VALIDATION_PROPERTY = {
4477
+ name: 'requiredValidation',
4478
+ title: 'Required',
4479
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4480
+ schema: {
4481
+ dataType: 'object',
4482
+ interface: {
4483
+ name: 'requiredValidation',
4484
+ path: 'options.validations.required',
4485
+ type: AXPWidgetsCatalog.requiredValidation,
4486
+ defaultValue: false,
4487
+ },
4488
+ },
4489
+ visible: true,
4490
+ };
4491
+ const AXP_MIN_LENGTH_VALIDATION_PROPERTY = {
4492
+ name: 'minLengthValidation',
4493
+ title: 'Minimum Length',
4494
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4495
+ schema: {
4496
+ dataType: 'object',
4497
+ interface: {
4498
+ name: 'minLengthValidation',
4499
+ path: 'options.validations.minLength',
4500
+ type: AXPWidgetsCatalog.minLengthValidation,
4501
+ defaultValue: null,
4502
+ },
4503
+ },
4504
+ visible: true,
4505
+ };
4506
+ const AXP_MAX_LENGTH_VALIDATION_PROPERTY = {
4507
+ name: 'maxLengthValidation',
4508
+ title: 'Maximum Length',
4509
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4510
+ schema: {
4511
+ dataType: 'object',
4512
+ interface: {
4513
+ name: 'maxLengthValidation',
4514
+ path: 'options.validations.maxLength',
4515
+ type: AXPWidgetsCatalog.maxLengthValidation,
4516
+ defaultValue: null,
4517
+ },
4518
+ },
4519
+ visible: true,
4520
+ };
4521
+ const AXP_REGULAR_EXPRESSION_VALIDATION_PROPERTY = {
4522
+ name: 'regularExpressionValidation',
4523
+ title: 'Regular Expression',
4524
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4525
+ schema: {
4526
+ dataType: 'object',
4527
+ interface: {
4528
+ name: 'regularExpressionValidation',
4529
+ path: 'options.validations.regex',
4530
+ type: AXPWidgetsCatalog.regularExpressionValidation,
4531
+ defaultValue: false,
4532
+ },
4533
+ },
4534
+ visible: true,
4535
+ };
4536
+ const AXP_LESS_THAN_VALIDATION_PROPERTY = {
4537
+ name: 'lessThanValidation',
4538
+ title: 'Less Than',
4539
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4540
+ schema: {
4541
+ dataType: 'object',
4542
+ interface: {
4543
+ name: 'lessThanValidation',
4544
+ path: 'options.validations.lessThan',
4545
+ type: AXPWidgetsCatalog.lessThanValidation,
4546
+ defaultValue: false,
4547
+ },
4548
+ },
4549
+ visible: true,
4550
+ };
4551
+ const AXP_GREATER_THAN_VALIDATION_PROPERTY = {
4552
+ name: 'greaterThanValidation',
4553
+ title: 'Greater Than',
4554
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4555
+ schema: {
4556
+ dataType: 'object',
4557
+ interface: {
4558
+ name: 'greaterThanValidation',
4559
+ path: 'options.validations.greaterThan',
4560
+ type: AXPWidgetsCatalog.greaterThanValidation,
4561
+ defaultValue: false,
4562
+ },
4563
+ },
4564
+ visible: true,
4565
+ };
4566
+ const AXP_BETWEEN_VALIDATION_PROPERTY = {
4567
+ name: 'betweenValidation',
4568
+ title: 'Between',
4569
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4570
+ schema: {
4571
+ dataType: 'object',
4572
+ interface: {
4573
+ name: 'betweenValidation',
4574
+ path: 'options.validations.between',
4575
+ type: AXPWidgetsCatalog.betweenValidation,
4576
+ defaultValue: false,
4577
+ },
4578
+ },
4579
+ visible: true,
4580
+ };
4581
+ const AXP_EQUAL_VALIDATION_PROPERTY = {
4582
+ name: 'equalValidation',
4583
+ title: 'Equal',
4584
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4585
+ schema: {
4586
+ dataType: 'object',
4587
+ interface: {
4588
+ name: 'equalValidation',
4589
+ path: 'options.validations.equal',
4590
+ type: AXPWidgetsCatalog.equalValidation,
4591
+ defaultValue: false,
4592
+ },
4593
+ },
4594
+ visible: true,
4595
+ };
4596
+ const AXP_CALLBACK_VALIDATION_PROPERTY = {
4597
+ name: 'callbackValidation',
4598
+ title: 'Callback',
4599
+ group: AXP_VALIDATION_PROPERTY_GROUP,
4600
+ schema: {
4601
+ dataType: 'object',
4602
+ interface: {
4603
+ name: 'callbackValidation',
4604
+ path: 'options.validations.callback',
4605
+ type: AXPWidgetsCatalog.callbackValidation,
4606
+ defaultValue: false,
4607
+ },
4608
+ },
4609
+ visible: true,
4610
+ };
2960
4611
 
2961
4612
  /**
2962
4613
  * Generated bundle index. Do not edit.
2963
4614
  */
2964
4615
 
2965
- 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, AXPWidgetSerializationHelper, 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 };
4616
+ export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnCellComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_ALLOW_CLEAR_PROPERTY, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_ALLOW_SEARCH_PROPERTY, AXP_ANIMATION_PROPERTY_GROUP, AXP_APPEARANCE_PROPERTY_GROUP, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_BETWEEN_VALIDATION_PROPERTY, AXP_BG_COLOR_PROPERTY, AXP_BOX_MODEL_PROPERTY_GROUP, AXP_CALLBACK_VALIDATION_PROPERTY, AXP_COLOR_PROPERTY, AXP_CONTENT_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_DATA_SOURCE_OPTIONS_PROPERTY, AXP_DATE_DEPTH_PROPERTY, AXP_DATE_FORMAT_PROPERTY, AXP_DATE_RANGE_LIMIT_PROPERTY, AXP_DEFAULT_ROW_COUNT_PROPERTY, AXP_DESCRIPTION_PROPERTY, AXP_DIRECTION_PROPERTY, AXP_DISABLED_PROPERTY, AXP_DOWNLOADABLE_PROPERTY, AXP_EQUAL_VALIDATION_PROPERTY, AXP_FALSY_TEXT_PROPERTY, AXP_FIT_LINE_COUNT_PROPERTY, AXP_FONT_SIZE_PROPERTY, AXP_GREATER_THAN_VALIDATION_PROPERTY, AXP_HAS_CLEAR_BUTTON_PROPERTY, AXP_HAS_COPY_ICON_PROPERTY, AXP_HAS_EYE_ICON_PROPERTY, AXP_HAS_ICON_PROPERTY, AXP_HAS_LABEL_PROPERTY, AXP_ICON_PROPERTY, AXP_IS_LOADING_PROPERTY, AXP_LABEL_PROPERTY, AXP_LAYOUT_ADVANCED_GRID_PROPERTY, AXP_LAYOUT_BORDER_PROPERTY, AXP_LAYOUT_COLUMNS_PROPERTY, AXP_LAYOUT_DIRECTION_PROPERTY, AXP_LAYOUT_FLEX_ITEM_PROPERTY, AXP_LAYOUT_FLEX_PROPERTY, AXP_LAYOUT_FLEX_PROPERTY_GROUP, AXP_LAYOUT_GAP_PROPERTY, AXP_LAYOUT_GRID_ITEM_PROPERTY, AXP_LAYOUT_GRID_PROPERTIES, AXP_LAYOUT_GRID_PROPERTY, AXP_LAYOUT_GRID_PROPERTY_GROUP, AXP_LAYOUT_GRID_ROW_PROPERTIES, AXP_LAYOUT_ROWS_PROPERTY, AXP_LAYOUT_SHOW_HEADER_PROPERTY, AXP_LAYOUT_SPACING_PROPERTY, AXP_LAYOUT_TABLE_PROPERTY_GROUP, AXP_LESS_THAN_VALIDATION_PROPERTY, AXP_MAX_LENGTH_VALIDATION_PROPERTY, AXP_MAX_LINE_COUNT_PROPERTY, AXP_MIN_LENGTH_VALIDATION_PROPERTY, AXP_MIN_LINE_COUNT_PROPERTY, AXP_MULTI_LANGUAGE_PROPERTY, AXP_NAME_PROPERTY, AXP_NUMBER_SEPARATOR_PROPERTY, AXP_PLACEHOLDER_PROPERTY, AXP_READONLY_PROPERTY, AXP_REGULAR_EXPRESSION_VALIDATION_PROPERTY, AXP_REQUIRED_VALIDATION_PROPERTY, AXP_SHOW_PASSWORD_PROPERTY, AXP_SPIN_BUTTON_PROPERTY, AXP_STYLE_COLOR_PROPERTY, AXP_STYLE_LOOK_PROPERTY, AXP_STYLING_PROPERTY_GROUP, AXP_TABLE_COLUMNS_PROPERTY, AXP_TABLE_COLUMN_ALIGNMENT_PROPERTIES, AXP_TABLE_COLUMN_CELL_ALIGN_PROPERTY, AXP_TABLE_COLUMN_HEADER_ALIGN_PROPERTY, AXP_TABLE_COLUMN_HEIGHT_PROPERTY, AXP_TABLE_COLUMN_WIDTH_PROPERTY, AXP_TABLE_ITEM_COLSPAN_PROPERTY, AXP_TABLE_ITEM_ROWSPAN_PROPERTY, AXP_TEXT_ALIGN_PROPERTY, AXP_TEXT_FIELD_PROPERTY, AXP_TEXT_PROPERTY, AXP_THEME_PROPERTY, AXP_TITLE_PROPERTY, AXP_TRIGGERS_PROPERTY, AXP_TRIGGERS_PROPERTY_GROUP, AXP_TRULY_TEXT_PROPERTY, AXP_VALIDATION_PROPERTY_GROUP, AXP_VALUE_FIELD_PROPERTY, AXP_VERTICAL_ALIGN_PROPERTY, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ACTION_SUB_CONTROLS, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_ADVANCE_SUB_DATA, AXP_WIDGETS_ADVANCE_SUB_INPUT, AXP_WIDGETS_ADVANCE_SUB_MEDIA, AXP_WIDGETS_ADVANCE_SUB_TOOLS, AXP_WIDGETS_AI_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_EDITOR_SUB_CHOICE, AXP_WIDGETS_EDITOR_SUB_COMPOSITE, AXP_WIDGETS_EDITOR_SUB_CONFIG, AXP_WIDGETS_EDITOR_SUB_DATETIME, AXP_WIDGETS_EDITOR_SUB_NUMERIC, AXP_WIDGETS_EDITOR_SUB_RICH, AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS, AXP_WIDGETS_EDITOR_SUB_VISUAL, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGETS_LAYOUT_SUB_GRID, AXP_WIDGETS_LAYOUT_SUB_LISTS, AXP_WIDGETS_LAYOUT_SUB_SHELL, AXP_WIDGETS_LAYOUT_SUB_SURFACES, AXP_WIDGETS_LAYOUT_SUB_TABS, AXP_WIDGETS_LAYOUT_SUB_UTILITY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DEFINITION_PROVIDER, AXP_WIDGET_PROPERTY_GROUP, AXP_WIDGET_TOKEN, booleanDefaultProperty, buildWidgetRegistryMapFromProviders, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints, largeTextDefaultProperty, mapAXPPropertyToWidgetProperty, normalizeWidgetCategories, numberDefaultProperty, numberMaxValueProperty, numberMinValueProperty, plainTextDefaultProperty, richTextDefaultProperty, selectEditorDefaultValueProperty, selectionListEditorDefaultValueProperty };
2966
4617
  //# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map