@acorex/platform 21.0.0-next.8 → 21.0.0-next.85
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.
- package/contracts/README.md +3 -0
- package/fesm2022/acorex-platform-auth.mjs +201 -81
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs +177 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +4490 -880
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +38 -0
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-core.mjs +2612 -667
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +1255 -209
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +6493 -1920
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +612 -287
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs +376 -0
- package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs +100 -0
- package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +22502 -9964
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +1395 -387
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2226 -524
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- 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
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs.map +1 -0
- 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
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +18746 -16718
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +391 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +1 -0
- 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
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-B1nsdpTY.mjs +48 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-B1nsdpTY.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D4UvRe8u.mjs +42 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D4UvRe8u.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2337 -94
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs} +52 -33
- package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +793 -612
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +997 -274
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +41 -35
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +40 -19
- package/types/acorex-platform-common.d.ts +3673 -0
- package/types/acorex-platform-contracts.d.ts +940 -0
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +1029 -170
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +262 -55
- package/types/acorex-platform-layout-components.d.ts +3329 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/types/acorex-platform-layout-entity.d.ts +4512 -0
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +334 -91
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +438 -162
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1152 -507
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +571 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +268 -11
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +30 -2
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +436 -748
- package/common/index.d.ts +0 -2470
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs +0 -1542
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs +0 -31
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs +0 -25
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
- package/layout/components/index.d.ts +0 -1670
- package/layout/entity/index.d.ts +0 -2294
- package/runtime/index.d.ts +0 -307
- /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 {
|
|
3
|
-
import { convertArrayToDataSource, AXDataSource } from '@acorex/cdk/common';
|
|
4
|
-
import {
|
|
5
|
-
|
|
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, isSelectionValueEqual, isFormValueEqual, 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,19 @@ 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
|
+
this.dirtyWidgetsRevision = signal(0, ...(ngDevMode ? [{ debugName: "dirtyWidgetsRevision" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.dirtyWidgetsRevisionSignal = this.dirtyWidgetsRevision.asReadonly();
|
|
184
70
|
}
|
|
185
71
|
get variables() {
|
|
186
72
|
return this.variables$();
|
|
@@ -194,22 +80,19 @@ class AXPWidgetCoreService {
|
|
|
194
80
|
}
|
|
195
81
|
detectStatus() {
|
|
196
82
|
const statuses = Array.from(this.widgets.values()).map((c) => c.status());
|
|
197
|
-
// Rendering statuses
|
|
198
83
|
if (statuses.some((status) => status === AXPWidgetStatus.Rendering)) {
|
|
199
84
|
return AXPPageStatus.Rendering;
|
|
200
85
|
}
|
|
201
86
|
if (statuses.every((status) => status === AXPWidgetStatus.Rendered)) {
|
|
202
87
|
return AXPPageStatus.Rendered;
|
|
203
88
|
}
|
|
204
|
-
// Processing statuses
|
|
205
89
|
if (statuses.some((status) => status === AXPWidgetStatus.Processing)) {
|
|
206
90
|
return AXPPageStatus.Processing;
|
|
207
91
|
}
|
|
208
|
-
// Error handling
|
|
209
92
|
if (statuses.some((status) => status === AXPWidgetStatus.Error)) {
|
|
210
93
|
return AXPPageStatus.Error;
|
|
211
94
|
}
|
|
212
|
-
return AXPPageStatus.Rendered;
|
|
95
|
+
return AXPPageStatus.Rendered;
|
|
213
96
|
}
|
|
214
97
|
refresh() {
|
|
215
98
|
setTimeout(() => {
|
|
@@ -244,11 +127,6 @@ class AXPWidgetCoreService {
|
|
|
244
127
|
getWidget(id) {
|
|
245
128
|
return this.widgets.get(id);
|
|
246
129
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Waits until a widget with the given id is registered, then resolves with it.
|
|
249
|
-
* If the widget is already registered, resolves immediately.
|
|
250
|
-
* Optionally accepts a timeout (in ms) after which it resolves with undefined.
|
|
251
|
-
*/
|
|
252
130
|
async waitForWidget(id, timeoutMs) {
|
|
253
131
|
const existing = this.widgets.get(id);
|
|
254
132
|
if (existing) {
|
|
@@ -278,20 +156,23 @@ class AXPWidgetCoreService {
|
|
|
278
156
|
}
|
|
279
157
|
});
|
|
280
158
|
}
|
|
281
|
-
/**
|
|
282
|
-
* Returns a list of registered widget ids (names).
|
|
283
|
-
*/
|
|
284
159
|
listRegisteredWidgetNames() {
|
|
285
160
|
return Array.from(this.widgets.keys());
|
|
286
161
|
}
|
|
162
|
+
notifyWidgetDirtyChanged() {
|
|
163
|
+
this.dirtyWidgetsRevision.update((value) => value + 1);
|
|
164
|
+
}
|
|
287
165
|
ngOnDestroy() { }
|
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
289
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
167
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService }); }
|
|
290
168
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
|
|
292
170
|
type: Injectable
|
|
293
171
|
}] });
|
|
294
172
|
|
|
173
|
+
//
|
|
174
|
+
// @deprecated
|
|
175
|
+
// Prefer AXPWidgetsList from @acorex/modules/common; dashboard widget type ids live in dashboard-management RootConfig.widgets.
|
|
295
176
|
const AXPWidgetsCatalog = {
|
|
296
177
|
timeDuration: 'time-duration',
|
|
297
178
|
timeDurationFilter: 'time-duration-filter',
|
|
@@ -315,7 +196,9 @@ const AXPWidgetsCatalog = {
|
|
|
315
196
|
pageLayout: 'page-layout',
|
|
316
197
|
repeaterLayout: 'repeater-layout',
|
|
317
198
|
textBlockLayout: 'text-block-layout',
|
|
318
|
-
|
|
199
|
+
alertBoxLayout: 'alert-box-layout',
|
|
200
|
+
badgeLayout: 'badge-layout',
|
|
201
|
+
attachments: 'attachments',
|
|
319
202
|
fileTypeExtension: 'file-type-extension',
|
|
320
203
|
map: 'map',
|
|
321
204
|
imageMarker: 'image-marker',
|
|
@@ -343,7 +226,6 @@ const AXPWidgetsCatalog = {
|
|
|
343
226
|
tableLayout: 'table-layout',
|
|
344
227
|
tableItem: 'table-item-layout',
|
|
345
228
|
avatar: 'avatar',
|
|
346
|
-
themePaletteChooser: 'theme-palette-chooser',
|
|
347
229
|
themeModeChooser: 'theme-mode-chooser',
|
|
348
230
|
menuOrientationChooser: 'menu-orientation-chooser',
|
|
349
231
|
fontStyleChooser: 'font-style-chooser',
|
|
@@ -371,31 +253,23 @@ const AXPWidgetsCatalog = {
|
|
|
371
253
|
betweenValidation: 'between-validation',
|
|
372
254
|
equalValidation: 'equal-validation',
|
|
373
255
|
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
256
|
metaData: 'meta-data-editor',
|
|
385
257
|
templateEditor: 'template-box-editor',
|
|
258
|
+
templateContentEditor: 'template-content-editor',
|
|
386
259
|
panel: 'panel',
|
|
387
260
|
notification: 'notification',
|
|
388
|
-
taskBoard: 'task-board',
|
|
389
261
|
comment: 'comment',
|
|
390
262
|
dataList: 'data-list',
|
|
391
263
|
listToolbar: 'list-toolbar',
|
|
392
264
|
entityList: 'entity-list',
|
|
265
|
+
pageComponent: 'page-component',
|
|
393
266
|
editorJs: 'editor-js-editor',
|
|
394
267
|
documentUploader: 'document-uploader',
|
|
395
|
-
signatureList: 'signature-list',
|
|
396
268
|
stepWizard: 'step-wizard',
|
|
397
269
|
progressBar: 'progress-bar-editor',
|
|
398
|
-
rate: 'rate-picker-editor'
|
|
270
|
+
rate: 'rate-picker-editor',
|
|
271
|
+
documentFileTypeFilter: 'document-file-type-filter',
|
|
272
|
+
entityDefinitionProvider: 'entity-definition-provider-editor',
|
|
399
273
|
};
|
|
400
274
|
|
|
401
275
|
function cloneProperty(property, values) {
|
|
@@ -450,7 +324,10 @@ function createBooleanProperty(ctor) {
|
|
|
450
324
|
type: AXPWidgetsCatalog.toggle,
|
|
451
325
|
},
|
|
452
326
|
},
|
|
453
|
-
visible: ctor.visible
|
|
327
|
+
visible: !isNil(ctor.visible) ? ctor.visible : true,
|
|
328
|
+
binding: {
|
|
329
|
+
enabled: true,
|
|
330
|
+
},
|
|
454
331
|
};
|
|
455
332
|
}
|
|
456
333
|
function createSelectProperty(ctor) {
|
|
@@ -474,7 +351,7 @@ function createSelectProperty(ctor) {
|
|
|
474
351
|
},
|
|
475
352
|
},
|
|
476
353
|
},
|
|
477
|
-
visible: ctor.visible
|
|
354
|
+
visible: !isNil(ctor.visible) ? ctor.visible : true,
|
|
478
355
|
};
|
|
479
356
|
}
|
|
480
357
|
const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
|
|
@@ -486,22 +363,22 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
|
|
|
486
363
|
this.token = inject(AXP_WIDGET_TOKEN);
|
|
487
364
|
this.host = inject(ElementRef).nativeElement;
|
|
488
365
|
this.layoutService = inject(AXPWidgetCoreService);
|
|
489
|
-
this.contextService = inject(
|
|
366
|
+
this.contextService = inject(AXPContextStore);
|
|
490
367
|
this.config = this.token.config;
|
|
491
368
|
this.node = this.token.node;
|
|
492
369
|
this.name = this.token.node.name;
|
|
493
370
|
this.component = this;
|
|
494
|
-
this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
|
|
371
|
+
this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
|
|
495
372
|
this.options = this._options.asReadonly();
|
|
496
373
|
this.onOptionsChanged = new Subject();
|
|
497
|
-
this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : []));
|
|
374
|
+
this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
|
|
498
375
|
this.status = this._status.asReadonly();
|
|
499
376
|
this.onStatusChanged = new BehaviorSubject(this._status());
|
|
500
377
|
this.#statusEffect = effect(() => {
|
|
501
378
|
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" }] : []));
|
|
379
|
+
}, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : /* istanbul ignore next */ []));
|
|
380
|
+
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
381
|
+
this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : /* istanbul ignore next */ []));
|
|
505
382
|
this.children = this._children.asReadonly();
|
|
506
383
|
}
|
|
507
384
|
get id() {
|
|
@@ -530,7 +407,7 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
|
|
|
530
407
|
output(name) {
|
|
531
408
|
const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
|
|
532
409
|
if (outputs.some((c) => c.name == name)) {
|
|
533
|
-
const opt =
|
|
410
|
+
const opt = outputs.find((c) => c.name == name)?.value;
|
|
534
411
|
if (typeof opt == 'function') {
|
|
535
412
|
return opt();
|
|
536
413
|
}
|
|
@@ -548,10 +425,10 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
|
|
|
548
425
|
this._children.set([...children]);
|
|
549
426
|
}
|
|
550
427
|
onAdded() { }
|
|
551
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
552
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
428
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
429
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent }); }
|
|
553
430
|
}
|
|
554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
|
|
555
432
|
type: Injectable
|
|
556
433
|
}] });
|
|
557
434
|
class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
|
|
@@ -562,10 +439,10 @@ class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
|
|
|
562
439
|
}
|
|
563
440
|
super.ngOnInit();
|
|
564
441
|
}
|
|
565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
566
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
443
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
|
|
567
444
|
}
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
|
|
569
446
|
type: Injectable
|
|
570
447
|
}] });
|
|
571
448
|
class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
@@ -576,11 +453,11 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
576
453
|
this._isValueWidget = false;
|
|
577
454
|
this.isValueWidget = () => this._isValueWidget;
|
|
578
455
|
this.onValueChanged = new Subject();
|
|
579
|
-
this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : []));
|
|
580
|
-
this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : []));
|
|
456
|
+
this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : /* istanbul ignore next */ []));
|
|
457
|
+
this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : /* istanbul ignore next */ []));
|
|
581
458
|
this.getValue = computed(() => {
|
|
582
459
|
return this.fullPath() ? this.extractValue(this.fullPath()) : null;
|
|
583
|
-
}, ...(ngDevMode ?
|
|
460
|
+
}, { ...(ngDevMode ? { debugName: "getValue" } : /* istanbul ignore next */ {}), equal: isEqual });
|
|
584
461
|
this.validationRules = computed(() => {
|
|
585
462
|
const validationsRaw = this.options()['validations'];
|
|
586
463
|
if (validationsRaw == null) {
|
|
@@ -593,7 +470,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
593
470
|
message: c.message,
|
|
594
471
|
options: c.options,
|
|
595
472
|
}));
|
|
596
|
-
}, ...(ngDevMode ? [{ debugName: "validationRules" }] : []));
|
|
473
|
+
}, ...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
|
|
597
474
|
}
|
|
598
475
|
ngOnInit() {
|
|
599
476
|
this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
|
|
@@ -618,18 +495,34 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
618
495
|
if (this.node.valueTransforms?.setter) {
|
|
619
496
|
value = this.node.valueTransforms?.setter(value);
|
|
620
497
|
}
|
|
498
|
+
const path = this.fullPath();
|
|
499
|
+
if (!path) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
621
502
|
const oldValue = this.getValue();
|
|
622
503
|
value = isUndefined(value) ? null : value;
|
|
623
504
|
if (isNil(value) && isNil(oldValue)) {
|
|
624
505
|
return;
|
|
625
506
|
}
|
|
626
|
-
|
|
507
|
+
const savedAtPath = this.contextService.getSavedValue(path);
|
|
508
|
+
if (this.contextService.isSavedCommitted() &&
|
|
509
|
+
isSelectionValueEqual(value, savedAtPath) &&
|
|
510
|
+
!isEqual(oldValue, savedAtPath)) {
|
|
511
|
+
this.contextService.update(path, cloneDeep(savedAtPath));
|
|
512
|
+
this.onValueChanged.next({ sender: this });
|
|
627
513
|
return;
|
|
628
514
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
515
|
+
// Reordered arrays must persist even when items are deep-equal (e.g. empty row objects).
|
|
516
|
+
const isArrayReorder = Array.isArray(oldValue) &&
|
|
517
|
+
Array.isArray(value) &&
|
|
518
|
+
oldValue.length === value.length &&
|
|
519
|
+
oldValue.some((v, i) => v !== value[i]);
|
|
520
|
+
const isArrayLengthChange = Array.isArray(value) && (!Array.isArray(oldValue) || value.length !== oldValue.length);
|
|
521
|
+
if (!isArrayReorder && !isArrayLengthChange && isFormValueEqual(oldValue, value)) {
|
|
522
|
+
return;
|
|
632
523
|
}
|
|
524
|
+
this.contextService.update(path, value);
|
|
525
|
+
this.onValueChanged.next({ sender: this });
|
|
633
526
|
}
|
|
634
527
|
detectFullPath() {
|
|
635
528
|
const sections = [];
|
|
@@ -670,23 +563,23 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
670
563
|
this.setValue(e.value);
|
|
671
564
|
}
|
|
672
565
|
}
|
|
673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
674
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
566
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
567
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent }); }
|
|
675
568
|
}
|
|
676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
|
|
677
570
|
type: Injectable
|
|
678
571
|
}] });
|
|
679
572
|
class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
680
573
|
constructor() {
|
|
681
574
|
super(...arguments);
|
|
682
575
|
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" }] : []));
|
|
576
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
577
|
+
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
685
578
|
this.textTemplate = computed(() => isNil(this.options()['textTemplate'])
|
|
686
579
|
? 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" }] : []));
|
|
580
|
+
: this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : /* istanbul ignore next */ []));
|
|
581
|
+
this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
582
|
+
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
690
583
|
//#region ---- DataSource Loading Effect ----
|
|
691
584
|
/**
|
|
692
585
|
* Track the last loaded string dataSource reference to prevent infinite loops
|
|
@@ -766,7 +659,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
766
659
|
this.dataSource.set(convertArrayToDataSource([]));
|
|
767
660
|
}
|
|
768
661
|
});
|
|
769
|
-
}, ...(ngDevMode ? [{ debugName: "rf" }] : []));
|
|
662
|
+
}, ...(ngDevMode ? [{ debugName: "rf" }] : /* istanbul ignore next */ []));
|
|
770
663
|
this.effect2 = effect(async () => {
|
|
771
664
|
const value = this.getValue();
|
|
772
665
|
const items = [];
|
|
@@ -777,7 +670,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
777
670
|
items.push(await this.extractItem(value));
|
|
778
671
|
}
|
|
779
672
|
this.selectedItems.set(items.filter((c) => c != null));
|
|
780
|
-
}, ...(ngDevMode ? [{ debugName: "effect2" }] : []));
|
|
673
|
+
}, ...(ngDevMode ? [{ debugName: "effect2" }] : /* istanbul ignore next */ []));
|
|
781
674
|
}
|
|
782
675
|
//#endregion
|
|
783
676
|
async extractItem(item) {
|
|
@@ -802,10 +695,10 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
802
695
|
[this.textField()]: item,
|
|
803
696
|
};
|
|
804
697
|
}
|
|
805
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
806
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
698
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
699
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent }); }
|
|
807
700
|
}
|
|
808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
|
|
809
702
|
type: Injectable
|
|
810
703
|
}] });
|
|
811
704
|
class AXPColumnWidgetComponent {
|
|
@@ -813,20 +706,22 @@ class AXPColumnWidgetComponent {
|
|
|
813
706
|
this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
|
|
814
707
|
this.path = this.token.path;
|
|
815
708
|
this.options = this.token.options ?? {};
|
|
709
|
+
/** Column header caption when rendered inside `axp-widget-column-renderer`. */
|
|
710
|
+
this.columnCaption = this.token.caption;
|
|
816
711
|
this.rawValue = null;
|
|
817
712
|
this.nullText = this.options['nullText'];
|
|
818
713
|
this.nullValue = this.options['nullValue'];
|
|
819
|
-
this.value =
|
|
714
|
+
this.value = () => {
|
|
820
715
|
if (isNil(this.rawValue) && !isNil(this.nullValue)) {
|
|
821
716
|
return this.nullValue;
|
|
822
717
|
}
|
|
823
718
|
return this.rawValue;
|
|
824
|
-
}
|
|
719
|
+
};
|
|
825
720
|
}
|
|
826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
827
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
722
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent }); }
|
|
828
723
|
}
|
|
829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
|
|
830
725
|
type: Injectable
|
|
831
726
|
}] });
|
|
832
727
|
|
|
@@ -855,7 +750,7 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
855
750
|
style['overflow-y'] = overflowY ?? '';
|
|
856
751
|
style['direction'] = direction ?? '';
|
|
857
752
|
return style;
|
|
858
|
-
}, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : []));
|
|
753
|
+
}, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : /* istanbul ignore next */ []));
|
|
859
754
|
this.blockStyle = computed(() => {
|
|
860
755
|
const options = this.options();
|
|
861
756
|
const style = { ...this.hostBoxStyle() };
|
|
@@ -872,47 +767,47 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
872
767
|
style['height'] = height ?? '';
|
|
873
768
|
style['max-height'] = maxHeight ?? '';
|
|
874
769
|
return style;
|
|
875
|
-
}, ...(ngDevMode ? [{ debugName: "blockStyle" }] : []));
|
|
770
|
+
}, ...(ngDevMode ? [{ debugName: "blockStyle" }] : /* istanbul ignore next */ []));
|
|
876
771
|
this.inlineStyle = computed(() => {
|
|
877
772
|
return { ...this.hostBoxStyle() };
|
|
878
|
-
}, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : []));
|
|
773
|
+
}, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : /* istanbul ignore next */ []));
|
|
879
774
|
this.blockClass = computed(() => {
|
|
880
775
|
return {
|
|
881
776
|
'ax-block': true,
|
|
882
777
|
'ax-w-full': true,
|
|
883
778
|
// 'ax-widget-outline': true,
|
|
884
779
|
};
|
|
885
|
-
}, ...(ngDevMode ? [{ debugName: "blockClass" }] : []));
|
|
780
|
+
}, ...(ngDevMode ? [{ debugName: "blockClass" }] : /* istanbul ignore next */ []));
|
|
886
781
|
this.inlineClass = computed(() => {
|
|
887
782
|
return {
|
|
888
783
|
'ax-inline-block': true,
|
|
889
784
|
};
|
|
890
|
-
}, ...(ngDevMode ? [{ debugName: "inlineClass" }] : []));
|
|
785
|
+
}, ...(ngDevMode ? [{ debugName: "inlineClass" }] : /* istanbul ignore next */ []));
|
|
891
786
|
}
|
|
892
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
893
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
787
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
788
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
|
|
894
789
|
}
|
|
895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
|
|
896
791
|
type: Injectable
|
|
897
792
|
}] });
|
|
898
793
|
|
|
899
794
|
class AXPBlockBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
|
|
900
795
|
constructor() {
|
|
901
796
|
super(...arguments);
|
|
902
|
-
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
903
|
-
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
797
|
+
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
798
|
+
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
904
799
|
}
|
|
905
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
906
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
801
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
|
|
907
802
|
}
|
|
908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
|
|
909
804
|
type: Injectable
|
|
910
805
|
}] });
|
|
911
806
|
|
|
912
807
|
class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
913
808
|
constructor() {
|
|
914
809
|
super(...arguments);
|
|
915
|
-
this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : []));
|
|
810
|
+
this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : /* istanbul ignore next */ []));
|
|
916
811
|
this.hostFlexStyle = computed(() => {
|
|
917
812
|
const blockStyle = this.blockStyle();
|
|
918
813
|
const style = { ...blockStyle };
|
|
@@ -951,45 +846,45 @@ class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
|
|
|
951
846
|
style['gap'] = flex.gap;
|
|
952
847
|
}
|
|
953
848
|
return style;
|
|
954
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : []));
|
|
849
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : /* istanbul ignore next */ []));
|
|
955
850
|
this.hostFlexClass = computed(() => {
|
|
956
851
|
return {
|
|
957
852
|
...this.blockClass(),
|
|
958
853
|
'ax-flex': true,
|
|
959
854
|
'ax-h-full': true,
|
|
960
855
|
};
|
|
961
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : []));
|
|
856
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : /* istanbul ignore next */ []));
|
|
962
857
|
this.hostClass = computed(() => {
|
|
963
858
|
return this.hostFlexClass();
|
|
964
|
-
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
859
|
+
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
965
860
|
this.hostStyle = computed(() => {
|
|
966
861
|
return this.hostFlexStyle();
|
|
967
|
-
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
862
|
+
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
968
863
|
}
|
|
969
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
970
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
864
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
865
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
|
|
971
866
|
}
|
|
972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
|
|
973
868
|
type: Injectable
|
|
974
869
|
}] });
|
|
975
870
|
|
|
976
871
|
class AXPInlineBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
|
|
977
872
|
constructor() {
|
|
978
873
|
super(...arguments);
|
|
979
|
-
this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
980
|
-
this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
874
|
+
this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
875
|
+
this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
981
876
|
}
|
|
982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
983
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
877
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
878
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
|
|
984
879
|
}
|
|
985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
|
|
986
881
|
type: Injectable
|
|
987
882
|
}] });
|
|
988
883
|
|
|
989
884
|
class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComponent {
|
|
990
885
|
constructor() {
|
|
991
886
|
super(...arguments);
|
|
992
|
-
this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : []));
|
|
887
|
+
this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : /* istanbul ignore next */ []));
|
|
993
888
|
this.hostFlexItemStyle = computed(() => {
|
|
994
889
|
const inlineStyle = this.blockStyle();
|
|
995
890
|
const style = { ...inlineStyle };
|
|
@@ -1025,37 +920,37 @@ class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComp
|
|
|
1025
920
|
style['align-self'] = fi.alignSelf;
|
|
1026
921
|
}
|
|
1027
922
|
return style;
|
|
1028
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : []));
|
|
923
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : /* istanbul ignore next */ []));
|
|
1029
924
|
this.hostFlexItemClass = computed(() => {
|
|
1030
925
|
return {
|
|
1031
926
|
...this.blockClass(),
|
|
1032
927
|
};
|
|
1033
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : []));
|
|
928
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : /* istanbul ignore next */ []));
|
|
1034
929
|
this.hostClass = computed(() => {
|
|
1035
930
|
return this.hostFlexItemClass();
|
|
1036
|
-
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
931
|
+
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
1037
932
|
this.hostStyle = computed(() => {
|
|
1038
933
|
return this.hostFlexItemStyle();
|
|
1039
|
-
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
934
|
+
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
1040
935
|
}
|
|
1041
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1042
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
936
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
937
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
|
|
1043
938
|
}
|
|
1044
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
|
|
1045
940
|
type: Injectable
|
|
1046
941
|
}] });
|
|
1047
942
|
|
|
1048
943
|
class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
1049
944
|
constructor() {
|
|
1050
945
|
super(...arguments);
|
|
1051
|
-
this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : []));
|
|
946
|
+
this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
1052
947
|
this.hostGridStyle = computed(() => {
|
|
1053
948
|
const style = { ...this.inlineStyle() };
|
|
1054
949
|
const g = this.grid()?.default;
|
|
1055
950
|
if (g?.gap)
|
|
1056
951
|
style['gap'] = g.gap;
|
|
1057
952
|
return style;
|
|
1058
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : []));
|
|
953
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : /* istanbul ignore next */ []));
|
|
1059
954
|
this.hostGridClass = computed(() => {
|
|
1060
955
|
const cls = {
|
|
1061
956
|
...this.inlineClass(),
|
|
@@ -1064,8 +959,7 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
|
|
|
1064
959
|
const g = this.grid()?.default;
|
|
1065
960
|
if (g?.columns)
|
|
1066
961
|
cls[`lg:ax-grid-cols-${g.columns}`] = true;
|
|
1067
|
-
if (g?.rows)
|
|
1068
|
-
cls[`lg:ax-grid-rows-${g.rows}`] = true;
|
|
962
|
+
// if (g?.rows) cls[`lg:ax-grid-rows-${g.rows}`] = true;
|
|
1069
963
|
if (g?.justifyItems)
|
|
1070
964
|
cls[`lg:ax-justify-items-${g.justifyItems}`] = true;
|
|
1071
965
|
if (g?.alignItems)
|
|
@@ -1073,21 +967,21 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
|
|
|
1073
967
|
if (g?.autoFlow)
|
|
1074
968
|
cls[`lg:ax-grid-flow-${g.autoFlow}`] = true;
|
|
1075
969
|
return cls;
|
|
1076
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : []));
|
|
1077
|
-
this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1078
|
-
this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
970
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : /* istanbul ignore next */ []));
|
|
971
|
+
this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
972
|
+
this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
1079
973
|
}
|
|
1080
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1081
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
974
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
975
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
|
|
1082
976
|
}
|
|
1083
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
|
|
1084
978
|
type: Injectable
|
|
1085
979
|
}] });
|
|
1086
980
|
|
|
1087
981
|
class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetComponent {
|
|
1088
982
|
constructor() {
|
|
1089
983
|
super(...arguments);
|
|
1090
|
-
this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : []));
|
|
984
|
+
this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : /* istanbul ignore next */ []));
|
|
1091
985
|
this.hostGridItemStyle = computed(() => {
|
|
1092
986
|
const style = { ...this.hostFlexStyle() };
|
|
1093
987
|
const g = this.gridItem();
|
|
@@ -1096,10 +990,13 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
|
|
|
1096
990
|
if (g?.justifySelf)
|
|
1097
991
|
style['justify-self'] = g.justifySelf;
|
|
1098
992
|
return style;
|
|
1099
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : []));
|
|
993
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : /* istanbul ignore next */ []));
|
|
1100
994
|
this.hostGridItemClass = computed(() => {
|
|
1101
995
|
const cls = { ...this.hostFlexClass() };
|
|
1102
996
|
const g = this.gridItem();
|
|
997
|
+
// Mobile-first: full width on small screens so items stack vertically and don't overflow
|
|
998
|
+
cls['ax-col-span-12'] = true;
|
|
999
|
+
// Large screens: apply defined placement so multi-column layout works on desktop
|
|
1103
1000
|
if (g?.colSpan)
|
|
1104
1001
|
cls[`lg:ax-col-span-${g.colSpan}`] = true;
|
|
1105
1002
|
if (g?.colStart)
|
|
@@ -1113,14 +1010,14 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
|
|
|
1113
1010
|
if (g?.rowEnd)
|
|
1114
1011
|
cls[`lg:ax-row-end-${g.rowEnd}`] = true;
|
|
1115
1012
|
return cls;
|
|
1116
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : []));
|
|
1117
|
-
this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1118
|
-
this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
1013
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : /* istanbul ignore next */ []));
|
|
1014
|
+
this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
1015
|
+
this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
1119
1016
|
}
|
|
1120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1121
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1018
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
|
|
1122
1019
|
}
|
|
1123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1020
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
|
|
1124
1021
|
type: Injectable
|
|
1125
1022
|
}] });
|
|
1126
1023
|
|
|
@@ -1129,27 +1026,27 @@ class AXPTableBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponen
|
|
|
1129
1026
|
super(...arguments);
|
|
1130
1027
|
this.hostTableClass = computed(() => ({
|
|
1131
1028
|
...this.blockClass(),
|
|
1132
|
-
}), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : []));
|
|
1029
|
+
}), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : /* istanbul ignore next */ []));
|
|
1133
1030
|
this.hostTableStyle = computed(() => {
|
|
1134
1031
|
const style = { ...this.blockStyle() };
|
|
1135
1032
|
style['overflow-x'] = 'auto';
|
|
1136
1033
|
return style;
|
|
1137
|
-
}, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : []));
|
|
1138
|
-
this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1139
|
-
this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
1034
|
+
}, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : /* istanbul ignore next */ []));
|
|
1035
|
+
this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
1036
|
+
this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
1140
1037
|
}
|
|
1141
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1142
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1038
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1039
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
|
|
1143
1040
|
}
|
|
1144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1041
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
|
|
1145
1042
|
type: Injectable
|
|
1146
1043
|
}] });
|
|
1147
1044
|
|
|
1148
1045
|
class AXPTableItemOpsBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
1149
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1150
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1046
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1047
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
|
|
1151
1048
|
}
|
|
1152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
|
|
1153
1050
|
type: Injectable
|
|
1154
1051
|
}] });
|
|
1155
1052
|
|
|
@@ -1159,57 +1056,105 @@ class AXPTableItemBaseLayoutWidgetComponent extends AXPTableItemOpsBaseLayoutWid
|
|
|
1159
1056
|
this.colSpan = computed(() => {
|
|
1160
1057
|
const v = this.options()?.colSpan;
|
|
1161
1058
|
return v ? Math.max(1, v) : 1;
|
|
1162
|
-
}, ...(ngDevMode ? [{ debugName: "colSpan" }] : []));
|
|
1059
|
+
}, ...(ngDevMode ? [{ debugName: "colSpan" }] : /* istanbul ignore next */ []));
|
|
1163
1060
|
this.rowSpan = computed(() => {
|
|
1164
1061
|
const v = this.options()?.rowSpan;
|
|
1165
1062
|
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" }] : []));
|
|
1063
|
+
}, ...(ngDevMode ? [{ debugName: "rowSpan" }] : /* istanbul ignore next */ []));
|
|
1064
|
+
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
1065
|
+
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []));
|
|
1169
1066
|
}
|
|
1170
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1171
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1068
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
|
|
1172
1069
|
}
|
|
1173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
|
|
1174
1071
|
type: Injectable
|
|
1175
1072
|
}] });
|
|
1176
1073
|
|
|
1074
|
+
//#region ---- Imports ----
|
|
1075
|
+
/**
|
|
1076
|
+
* Injection token for widget definition providers.
|
|
1077
|
+
* Modules register their widget providers using this token (multi: true).
|
|
1078
|
+
*/
|
|
1079
|
+
const AXP_WIDGET_DEFINITION_PROVIDER = new InjectionToken('AXP_WIDGET_DEFINITION_PROVIDER', {
|
|
1080
|
+
factory: () => [],
|
|
1081
|
+
});
|
|
1082
|
+
//#endregion
|
|
1083
|
+
|
|
1084
|
+
//#region ---- Build widget map (shared with tooling / snapshot scripts) ----
|
|
1085
|
+
//TODO RECHECK THIS FUNCTION s.hosseini
|
|
1086
|
+
/**
|
|
1087
|
+
* Merges core + extended widgets the same way as AXPWidgetRegistryService.ensureBuilt().
|
|
1088
|
+
* Use with concrete providers (e.g. AXPCoreWidgetsProvider, AXPEntityWidgetsProvider) in Node scripts without DI.
|
|
1089
|
+
*/
|
|
1090
|
+
function buildWidgetRegistryMapFromProviders(providers) {
|
|
1091
|
+
const types = new Map();
|
|
1092
|
+
const AXPExtendedWidgets = [];
|
|
1093
|
+
for (const provider of providers) {
|
|
1094
|
+
const widgets = provider.getWidgets?.() ?? [];
|
|
1095
|
+
for (const w of widgets) {
|
|
1096
|
+
types.set(w.name, w);
|
|
1097
|
+
}
|
|
1098
|
+
const extended = provider.getExtendedWidgets?.() ?? [];
|
|
1099
|
+
AXPExtendedWidgets.push(...extended);
|
|
1100
|
+
}
|
|
1101
|
+
for (const { parentName, widget } of AXPExtendedWidgets) {
|
|
1102
|
+
const parent = types.get(parentName);
|
|
1103
|
+
if (parent) {
|
|
1104
|
+
const merged = merge({}, parent, widget);
|
|
1105
|
+
merged.name = widget.name;
|
|
1106
|
+
types.set(merged.name, merged);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
return types;
|
|
1110
|
+
}
|
|
1111
|
+
//#endregion
|
|
1112
|
+
//#region ---- Widget Registry Service (Token-Based) ----
|
|
1113
|
+
/**
|
|
1114
|
+
* Aggregates widgets from all AXP_WIDGET_DEFINITION_PROVIDER instances.
|
|
1115
|
+
* Token-based like AXP_MENU_PROVIDER / AXP_PERMISSION_DEFINITION_PROVIDER / AXP_SETTING_DEFINITION_PROVIDER.
|
|
1116
|
+
* No separate registry - widgets come solely from providers.
|
|
1117
|
+
*/
|
|
1177
1118
|
class AXPWidgetRegistryService {
|
|
1178
|
-
/**
|
|
1179
|
-
*
|
|
1180
|
-
*/
|
|
1181
1119
|
constructor() {
|
|
1182
|
-
this.
|
|
1183
|
-
|
|
1184
|
-
}
|
|
1185
|
-
register(widget) {
|
|
1186
|
-
this.types.set(widget.name, widget);
|
|
1120
|
+
this._providers = inject(AXP_WIDGET_DEFINITION_PROVIDER, { optional: true }) ?? [];
|
|
1121
|
+
this._types = null;
|
|
1187
1122
|
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
this.
|
|
1123
|
+
/**
|
|
1124
|
+
* Lazy-build widget map from all providers.
|
|
1125
|
+
*/
|
|
1126
|
+
ensureBuilt() {
|
|
1127
|
+
if (this._types)
|
|
1128
|
+
return this._types;
|
|
1129
|
+
this._types = buildWidgetRegistryMapFromProviders(this._providers);
|
|
1130
|
+
return this._types;
|
|
1193
1131
|
}
|
|
1194
1132
|
resolve(name) {
|
|
1195
|
-
const widget = this.
|
|
1133
|
+
const widget = this.ensureBuilt().get(name);
|
|
1196
1134
|
if (!widget) {
|
|
1197
1135
|
throw new Error(`Widget with name "${name}" does not exist.`);
|
|
1198
1136
|
}
|
|
1199
1137
|
return widget;
|
|
1200
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Registered widget config when present; otherwise `undefined`. Does not throw — use when
|
|
1141
|
+
* {@link resolve}'s value may be a non-widget id (e.g. data-source row id in dynamic field configurator).
|
|
1142
|
+
*/
|
|
1143
|
+
getOptional(name) {
|
|
1144
|
+
return this.ensureBuilt().get(name);
|
|
1145
|
+
}
|
|
1201
1146
|
all() {
|
|
1202
|
-
return Array.from(this.
|
|
1147
|
+
return Array.from(this.ensureBuilt().values());
|
|
1203
1148
|
}
|
|
1204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1205
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1149
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1150
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
|
|
1206
1151
|
}
|
|
1207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
|
|
1208
1153
|
type: Injectable,
|
|
1209
1154
|
args: [{
|
|
1210
1155
|
providedIn: 'root',
|
|
1211
1156
|
}]
|
|
1212
|
-
}]
|
|
1157
|
+
}] });
|
|
1213
1158
|
|
|
1214
1159
|
class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
1215
1160
|
constructor() {
|
|
@@ -1217,13 +1162,16 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1217
1162
|
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
1218
1163
|
this.grid = inject(AXBaseDataTable);
|
|
1219
1164
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1220
|
-
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
|
|
1221
|
-
this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : []));
|
|
1165
|
+
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
|
|
1166
|
+
this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : /* istanbul ignore next */ []));
|
|
1222
1167
|
this.rowInjectorsCache = new Map();
|
|
1223
1168
|
this.hasExpressions = false;
|
|
1224
1169
|
this.pendingEvaluations = new Set();
|
|
1225
1170
|
this.changeDetectionScheduled = false;
|
|
1226
1171
|
this.MAX_CACHE_SIZE = 1000; // Limit cache size to prevent memory leaks
|
|
1172
|
+
/** When true, header click cycles sort (handled by parent; synced with list sort state). */
|
|
1173
|
+
this.sortEnabled = false;
|
|
1174
|
+
this.sortToggle = new EventEmitter();
|
|
1227
1175
|
this.injector = inject(Injector);
|
|
1228
1176
|
this.cdr = inject(ChangeDetectorRef);
|
|
1229
1177
|
}
|
|
@@ -1239,6 +1187,19 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1239
1187
|
get renderCellTemplate() {
|
|
1240
1188
|
return this.cellTemplate ?? this._contentCellTemplate;
|
|
1241
1189
|
}
|
|
1190
|
+
/**
|
|
1191
|
+
* True when the row should show the expand icon: either hasChild is true (from server/initial load)
|
|
1192
|
+
* or the row has loaded children (e.g. after refreshItemChildren when children go from 0 to 1).
|
|
1193
|
+
*/
|
|
1194
|
+
hasExpandableRow(row) {
|
|
1195
|
+
const data = row?.data;
|
|
1196
|
+
if (!data)
|
|
1197
|
+
return false;
|
|
1198
|
+
if (data['hasChild'] === true)
|
|
1199
|
+
return true;
|
|
1200
|
+
const children = data['__meta__']?.['children'];
|
|
1201
|
+
return Array.isArray(children) && children.length > 0;
|
|
1202
|
+
}
|
|
1242
1203
|
async handleExpandRow(row) {
|
|
1243
1204
|
this.loadingRow.set(row);
|
|
1244
1205
|
await this.grid.expandRow(row);
|
|
@@ -1250,6 +1211,73 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1250
1211
|
get renderHeaderTemplate() {
|
|
1251
1212
|
return this.headerTemplate ?? this._contentHeaderTemplate;
|
|
1252
1213
|
}
|
|
1214
|
+
//#region ---- Column alignment (header / cell) ----
|
|
1215
|
+
/**
|
|
1216
|
+
* Resolves `options.align`: string applies to header and cell; object uses optional `header` / `cell` (default start).
|
|
1217
|
+
* Supports designer select values `{ id: 'center' }`.
|
|
1218
|
+
*/
|
|
1219
|
+
getHeaderTextAlign() {
|
|
1220
|
+
return this.resolveAlignForSide('header');
|
|
1221
|
+
}
|
|
1222
|
+
getHeaderJustifyContent() {
|
|
1223
|
+
const align = this.getHeaderTextAlign();
|
|
1224
|
+
if (align === 'center') {
|
|
1225
|
+
return 'center';
|
|
1226
|
+
}
|
|
1227
|
+
if (align === 'end') {
|
|
1228
|
+
return 'flex-end';
|
|
1229
|
+
}
|
|
1230
|
+
return 'flex-start';
|
|
1231
|
+
}
|
|
1232
|
+
onHeaderClick(event) {
|
|
1233
|
+
if (!this.sortEnabled) {
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
event.stopPropagation();
|
|
1237
|
+
this.sortToggle.emit(event);
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* When true, the cell body uses flex so `justify-content` can place content on the main axis.
|
|
1241
|
+
*/
|
|
1242
|
+
getCellUseFlexLayout() {
|
|
1243
|
+
return !!this.expandHandler || this.resolveAlignForSide('cell') !== 'start';
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Flex `justify-content` for the cell wrapper; omit when not using flex layout.
|
|
1247
|
+
*/
|
|
1248
|
+
getCellJustifyContent() {
|
|
1249
|
+
if (!this.getCellUseFlexLayout()) {
|
|
1250
|
+
return null;
|
|
1251
|
+
}
|
|
1252
|
+
return this.resolveAlignForSide('cell');
|
|
1253
|
+
}
|
|
1254
|
+
resolveAlignForSide(side) {
|
|
1255
|
+
const align = this.mergedOptions().align;
|
|
1256
|
+
if (align == null || align === '') {
|
|
1257
|
+
return 'start';
|
|
1258
|
+
}
|
|
1259
|
+
if (typeof align === 'string') {
|
|
1260
|
+
return this.normalizeColumnAlignment(align);
|
|
1261
|
+
}
|
|
1262
|
+
if (typeof align === 'object' && !Array.isArray(align)) {
|
|
1263
|
+
const raw = side === 'header' ? align.header : align.cell;
|
|
1264
|
+
return this.normalizeColumnAlignment(raw);
|
|
1265
|
+
}
|
|
1266
|
+
return 'start';
|
|
1267
|
+
}
|
|
1268
|
+
normalizeColumnAlignment(value) {
|
|
1269
|
+
if (value === 'center' || value === 'end' || value === 'start') {
|
|
1270
|
+
return value;
|
|
1271
|
+
}
|
|
1272
|
+
if (value && typeof value === 'object' && 'id' in value) {
|
|
1273
|
+
const id = value.id;
|
|
1274
|
+
if (id === 'center' || id === 'end' || id === 'start') {
|
|
1275
|
+
return id;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
return 'start';
|
|
1279
|
+
}
|
|
1280
|
+
//#endregion
|
|
1253
1281
|
get loadingEnabled() {
|
|
1254
1282
|
return true;
|
|
1255
1283
|
}
|
|
@@ -1274,6 +1302,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1274
1302
|
const tokenValue = {
|
|
1275
1303
|
path: this.node.path,
|
|
1276
1304
|
options: this.mergedOptions(),
|
|
1305
|
+
caption: this.caption,
|
|
1277
1306
|
};
|
|
1278
1307
|
this.widgetInjector = Injector.create({
|
|
1279
1308
|
parent: this.injector,
|
|
@@ -1286,7 +1315,18 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1286
1315
|
});
|
|
1287
1316
|
this.width = this.mergedOptions().width === 'auto' ? 'auto' : this.customWidth ? this.customWidth : (this.mergedOptions().width ?? '200px');
|
|
1288
1317
|
this.allowResizing = this.mergedOptions().allowResizing || true;
|
|
1318
|
+
this.allowSorting = this.sortEnabled;
|
|
1289
1319
|
this.cdr.detectChanges();
|
|
1320
|
+
this.fixed = this.columnFixed;
|
|
1321
|
+
}
|
|
1322
|
+
ngOnChanges() {
|
|
1323
|
+
this.allowSorting = this.sortEnabled;
|
|
1324
|
+
this.sortOrder = this.headerSortDirection;
|
|
1325
|
+
this.sortIndex = this.headerSortPriority;
|
|
1326
|
+
this.fixed = this.columnFixed;
|
|
1327
|
+
if (this.customWidth) {
|
|
1328
|
+
this.width = this.customWidth;
|
|
1329
|
+
}
|
|
1290
1330
|
}
|
|
1291
1331
|
//#region ---- Performance Optimization Methods ----
|
|
1292
1332
|
/**
|
|
@@ -1372,6 +1412,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1372
1412
|
const tokenValue = {
|
|
1373
1413
|
path: this.node.path,
|
|
1374
1414
|
options: this.mergedOptions(),
|
|
1415
|
+
caption: this.caption,
|
|
1375
1416
|
};
|
|
1376
1417
|
rowInjector = Injector.create({
|
|
1377
1418
|
parent: this.injector,
|
|
@@ -1404,6 +1445,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1404
1445
|
const tokenValue = {
|
|
1405
1446
|
path: this.node.path,
|
|
1406
1447
|
options: evaluatedOptions,
|
|
1448
|
+
caption: this.caption,
|
|
1407
1449
|
};
|
|
1408
1450
|
const newInjector = Injector.create({
|
|
1409
1451
|
parent: this.injector,
|
|
@@ -1430,6 +1472,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1430
1472
|
const tokenValue = {
|
|
1431
1473
|
path: this.node.path,
|
|
1432
1474
|
options: this.mergedOptions(),
|
|
1475
|
+
caption: this.caption,
|
|
1433
1476
|
};
|
|
1434
1477
|
rowInjector = Injector.create({
|
|
1435
1478
|
parent: this.injector,
|
|
@@ -1446,19 +1489,49 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1446
1489
|
}
|
|
1447
1490
|
return rowInjector;
|
|
1448
1491
|
}
|
|
1449
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1493
|
+
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", columnFixed: "columnFixed", cellTemplate: "cellTemplate", headerTemplate: "headerTemplate" }, outputs: { sortToggle: "sortToggle" }, providers: [
|
|
1451
1494
|
AXPWidgetCoreService,
|
|
1452
1495
|
{ 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>
|
|
1496
|
+
], 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: `
|
|
1497
|
+
<ng-template #header>
|
|
1498
|
+
<div
|
|
1499
|
+
class="axp-widget-column-header ax-w-full ax-flex ax-items-center ax-gap-1 ax-select-none"
|
|
1500
|
+
[class.axp-widget-column-header--sortable]="sortEnabled"
|
|
1501
|
+
[style.justify-content]="getHeaderJustifyContent()"
|
|
1502
|
+
(click)="onHeaderClick($event)"
|
|
1503
|
+
>
|
|
1504
|
+
<span class="axp-widget-column-header__caption ax-truncate">{{ caption | translate | async }}</span>
|
|
1505
|
+
@if (sortEnabled) {
|
|
1506
|
+
<span class="axp-widget-column-header__sort ax-flex ax-items-center ax-gap-0.5 ax-shrink-0">
|
|
1507
|
+
@if (headerSortPriority !== undefined && headerSortPriority > 1) {
|
|
1508
|
+
<span class="axp-widget-column-header__sort-priority ax-text-xs ax-opacity-70">{{ headerSortPriority }}</span>
|
|
1509
|
+
}
|
|
1510
|
+
<i
|
|
1511
|
+
class="fa-solid fa-arrow-up-long ax-text-neutral-400"
|
|
1512
|
+
[class.ax-text-primary]="headerSortDirection === 'asc'"
|
|
1513
|
+
></i>
|
|
1514
|
+
<i
|
|
1515
|
+
class="fa-solid fa-arrow-down-long ax-text-neutral-400"
|
|
1516
|
+
[class.ax-text-primary]="headerSortDirection === 'desc'"
|
|
1517
|
+
></i>
|
|
1518
|
+
</span>
|
|
1519
|
+
}
|
|
1520
|
+
</div>
|
|
1521
|
+
</ng-template>
|
|
1455
1522
|
<ng-template #cell let-row>
|
|
1456
|
-
<div
|
|
1523
|
+
<div
|
|
1524
|
+
class="ax-w-full"
|
|
1525
|
+
[class.ax-flex]="getCellUseFlexLayout()"
|
|
1526
|
+
[class.ax-gap-2]="expandHandler"
|
|
1527
|
+
[class.ax-items-center]="getCellUseFlexLayout()"
|
|
1528
|
+
[style.justify-content]="getCellJustifyContent()"
|
|
1529
|
+
>
|
|
1457
1530
|
@if (expandHandler) {
|
|
1458
1531
|
<div
|
|
1459
1532
|
(click)="handleExpandRow(row)"
|
|
1460
1533
|
class="ax-expand-handler"
|
|
1461
|
-
[class.ax-invisible]="row
|
|
1534
|
+
[class.ax-invisible]="!hasExpandableRow(row)"
|
|
1462
1535
|
id="ax-expand-handler-container"
|
|
1463
1536
|
[style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
|
|
1464
1537
|
>
|
|
@@ -1481,21 +1554,49 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1481
1554
|
</div>
|
|
1482
1555
|
</ng-template>
|
|
1483
1556
|
<ng-template #footer></ng-template>
|
|
1484
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"
|
|
1557
|
+
`, 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
1558
|
}
|
|
1486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
|
|
1487
1560
|
type: Component,
|
|
1488
|
-
args: [{
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1561
|
+
args: [{ selector: 'axp-widget-column-renderer', template: `
|
|
1562
|
+
<ng-template #header>
|
|
1563
|
+
<div
|
|
1564
|
+
class="axp-widget-column-header ax-w-full ax-flex ax-items-center ax-gap-1 ax-select-none"
|
|
1565
|
+
[class.axp-widget-column-header--sortable]="sortEnabled"
|
|
1566
|
+
[style.justify-content]="getHeaderJustifyContent()"
|
|
1567
|
+
(click)="onHeaderClick($event)"
|
|
1568
|
+
>
|
|
1569
|
+
<span class="axp-widget-column-header__caption ax-truncate">{{ caption | translate | async }}</span>
|
|
1570
|
+
@if (sortEnabled) {
|
|
1571
|
+
<span class="axp-widget-column-header__sort ax-flex ax-items-center ax-gap-0.5 ax-shrink-0">
|
|
1572
|
+
@if (headerSortPriority !== undefined && headerSortPriority > 1) {
|
|
1573
|
+
<span class="axp-widget-column-header__sort-priority ax-text-xs ax-opacity-70">{{ headerSortPriority }}</span>
|
|
1574
|
+
}
|
|
1575
|
+
<i
|
|
1576
|
+
class="fa-solid fa-arrow-up-long ax-text-neutral-400"
|
|
1577
|
+
[class.ax-text-primary]="headerSortDirection === 'asc'"
|
|
1578
|
+
></i>
|
|
1579
|
+
<i
|
|
1580
|
+
class="fa-solid fa-arrow-down-long ax-text-neutral-400"
|
|
1581
|
+
[class.ax-text-primary]="headerSortDirection === 'desc'"
|
|
1582
|
+
></i>
|
|
1583
|
+
</span>
|
|
1584
|
+
}
|
|
1585
|
+
</div>
|
|
1586
|
+
</ng-template>
|
|
1492
1587
|
<ng-template #cell let-row>
|
|
1493
|
-
<div
|
|
1588
|
+
<div
|
|
1589
|
+
class="ax-w-full"
|
|
1590
|
+
[class.ax-flex]="getCellUseFlexLayout()"
|
|
1591
|
+
[class.ax-gap-2]="expandHandler"
|
|
1592
|
+
[class.ax-items-center]="getCellUseFlexLayout()"
|
|
1593
|
+
[style.justify-content]="getCellJustifyContent()"
|
|
1594
|
+
>
|
|
1494
1595
|
@if (expandHandler) {
|
|
1495
1596
|
<div
|
|
1496
1597
|
(click)="handleExpandRow(row)"
|
|
1497
1598
|
class="ax-expand-handler"
|
|
1498
|
-
[class.ax-invisible]="row
|
|
1599
|
+
[class.ax-invisible]="!hasExpandableRow(row)"
|
|
1499
1600
|
id="ax-expand-handler-container"
|
|
1500
1601
|
[style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
|
|
1501
1602
|
>
|
|
@@ -1518,15 +1619,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1518
1619
|
</div>
|
|
1519
1620
|
</ng-template>
|
|
1520
1621
|
<ng-template #footer></ng-template>
|
|
1521
|
-
`,
|
|
1522
|
-
providers: [
|
|
1622
|
+
`, providers: [
|
|
1523
1623
|
AXPWidgetCoreService,
|
|
1524
1624
|
{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
|
|
1525
|
-
],
|
|
1526
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1527
|
-
inputs: ['caption'],
|
|
1528
|
-
standalone: false,
|
|
1529
|
-
}]
|
|
1625
|
+
], 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
1626
|
}], propDecorators: { customExpandIcon: [{
|
|
1531
1627
|
type: Input
|
|
1532
1628
|
}], customCollapseIcon: [{
|
|
@@ -1543,6 +1639,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1543
1639
|
args: ['footer']
|
|
1544
1640
|
}], expandHandler: [{
|
|
1545
1641
|
type: Input
|
|
1642
|
+
}], sortEnabled: [{
|
|
1643
|
+
type: Input
|
|
1644
|
+
}], headerSortDirection: [{
|
|
1645
|
+
type: Input
|
|
1646
|
+
}], headerSortPriority: [{
|
|
1647
|
+
type: Input
|
|
1648
|
+
}], columnFixed: [{
|
|
1649
|
+
type: Input
|
|
1650
|
+
}], sortToggle: [{
|
|
1651
|
+
type: Output
|
|
1546
1652
|
}], cellTemplate: [{
|
|
1547
1653
|
type: Input
|
|
1548
1654
|
}], _contentCellTemplate: [{
|
|
@@ -1555,27 +1661,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1555
1661
|
args: ['header']
|
|
1556
1662
|
}] } });
|
|
1557
1663
|
|
|
1664
|
+
/** Idle period after widgets register / hydrate before committing the saved baseline. */
|
|
1665
|
+
const FORM_SAVED_BASELINE_IDLE_MS = 500;
|
|
1558
1666
|
class AXPWidgetContainerComponent {
|
|
1559
1667
|
set context(value) {
|
|
1560
|
-
this.
|
|
1668
|
+
this.syncExternalContext(value);
|
|
1561
1669
|
}
|
|
1562
1670
|
set functions(v) {
|
|
1563
1671
|
this.builderService.setFunctions(v);
|
|
1564
1672
|
}
|
|
1565
1673
|
constructor() {
|
|
1566
|
-
this.contextService = inject(
|
|
1674
|
+
this.contextService = inject(AXPContextStore);
|
|
1567
1675
|
this.builderService = inject(AXPWidgetCoreService);
|
|
1568
1676
|
this.onContextChanged = new EventEmitter();
|
|
1569
|
-
this.
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1677
|
+
this.isSavedCommitted = computed(() => this.contextService.isSavedCommitted(), ...(ngDevMode ? [{ debugName: "isSavedCommitted" }] : /* istanbul ignore next */ []));
|
|
1678
|
+
this.isFormDirty = computed(() => {
|
|
1679
|
+
if (!this.contextService.isSavedCommitted()) {
|
|
1680
|
+
return false;
|
|
1681
|
+
}
|
|
1682
|
+
this.contextService.data();
|
|
1683
|
+
return this.contextService.isDirty();
|
|
1684
|
+
}, ...(ngDevMode ? [{ debugName: "isFormDirty" }] : /* istanbul ignore next */ []));
|
|
1685
|
+
this.status = computed(() => this.builderService.status(), ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
1686
|
+
this.isBusy = computed(() => this.builderService.isBusy(), ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
1575
1687
|
effect(() => {
|
|
1576
|
-
|
|
1577
|
-
|
|
1688
|
+
const isDirty = this.isFormDirty();
|
|
1689
|
+
const data = this.contextService.data();
|
|
1690
|
+
const changeEvent = this.contextService.changeEvent();
|
|
1691
|
+
if (!this.contextService.isChanged() && this.lastEmittedFormDirty === isDirty) {
|
|
1692
|
+
return;
|
|
1693
|
+
}
|
|
1694
|
+
this.lastEmittedFormDirty = isDirty;
|
|
1695
|
+
this.onContextChanged.emit({
|
|
1696
|
+
...changeEvent,
|
|
1697
|
+
data: cloneDeep(data),
|
|
1698
|
+
isFormDirty: isDirty,
|
|
1699
|
+
});
|
|
1700
|
+
});
|
|
1701
|
+
effect(() => {
|
|
1702
|
+
if (this.contextService.isSavedCommitted()) {
|
|
1703
|
+
return;
|
|
1704
|
+
}
|
|
1705
|
+
if (this.builderService.registeredWidgetsCount() === 0) {
|
|
1706
|
+
return;
|
|
1578
1707
|
}
|
|
1708
|
+
untracked(() => void this.settleSavedBaseline());
|
|
1579
1709
|
});
|
|
1580
1710
|
}
|
|
1581
1711
|
refresh() {
|
|
@@ -1584,17 +1714,73 @@ class AXPWidgetContainerComponent {
|
|
|
1584
1714
|
find(name) {
|
|
1585
1715
|
return this.builderService.waitForWidget(name);
|
|
1586
1716
|
}
|
|
1587
|
-
|
|
1588
|
-
|
|
1717
|
+
syncExternalContext(value) {
|
|
1718
|
+
const next = cloneDeep(value ?? {});
|
|
1719
|
+
const current = this.contextService.data();
|
|
1720
|
+
if (isEqual(current, next)) {
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
if (this.contextService.isSavedCommitted() && this.isFormDirty()) {
|
|
1724
|
+
return;
|
|
1725
|
+
}
|
|
1726
|
+
if (this.contextService.isSavedCommitted()) {
|
|
1727
|
+
this.contextService.set(next);
|
|
1728
|
+
void this.settleSavedBaseline();
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
if (this.contextService.isChanged()) {
|
|
1732
|
+
return;
|
|
1733
|
+
}
|
|
1734
|
+
this.contextService.set(next);
|
|
1735
|
+
void this.settleSavedBaseline();
|
|
1736
|
+
}
|
|
1737
|
+
/** Commits the current data as saved after widget hydration settles. */
|
|
1738
|
+
settleSavedBaseline() {
|
|
1739
|
+
this.clearSavedBaselineTimer();
|
|
1740
|
+
return new Promise((resolve) => {
|
|
1741
|
+
const commit = () => {
|
|
1742
|
+
if (this.builderService.registeredWidgetsCount() === 0) {
|
|
1743
|
+
this.savedBaselineTimer = setTimeout(commit, FORM_SAVED_BASELINE_IDLE_MS);
|
|
1744
|
+
return;
|
|
1745
|
+
}
|
|
1746
|
+
this.contextService.commitSaved();
|
|
1747
|
+
this.lastEmittedFormDirty = undefined;
|
|
1748
|
+
this.savedBaselineTimer = undefined;
|
|
1749
|
+
resolve();
|
|
1750
|
+
};
|
|
1751
|
+
this.savedBaselineTimer = setTimeout(commit, FORM_SAVED_BASELINE_IDLE_MS);
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
async replaceContext(value) {
|
|
1755
|
+
this.clearSavedBaselineTimer();
|
|
1756
|
+
this.contextService.set(cloneDeep(value));
|
|
1757
|
+
// Commit immediately so save/replace is clean even when `set()` no-ops (data already matches).
|
|
1758
|
+
this.contextService.commitSaved();
|
|
1759
|
+
this.lastEmittedFormDirty = undefined;
|
|
1760
|
+
await this.settleSavedBaseline();
|
|
1761
|
+
}
|
|
1762
|
+
revertAndSettle() {
|
|
1763
|
+
this.clearSavedBaselineTimer();
|
|
1764
|
+
this.contextService.revertToSaved();
|
|
1765
|
+
this.lastEmittedFormDirty = undefined;
|
|
1766
|
+
}
|
|
1767
|
+
clearSavedBaselineTimer() {
|
|
1768
|
+
if (this.savedBaselineTimer) {
|
|
1769
|
+
clearTimeout(this.savedBaselineTimer);
|
|
1770
|
+
this.savedBaselineTimer = undefined;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1774
|
+
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
1775
|
}
|
|
1590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
|
|
1591
1777
|
type: Component,
|
|
1592
1778
|
args: [{
|
|
1593
1779
|
selector: 'axp-widgets-container',
|
|
1594
1780
|
template: `<ng-content></ng-content>`,
|
|
1595
1781
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1596
1782
|
host: { style: 'display: contents;' },
|
|
1597
|
-
providers: [AXPWidgetCoreService,
|
|
1783
|
+
providers: [AXPWidgetCoreService, AXPContextStore],
|
|
1598
1784
|
standalone: false,
|
|
1599
1785
|
}]
|
|
1600
1786
|
}], ctorParameters: () => [], propDecorators: { onContextChanged: [{
|
|
@@ -1606,12 +1792,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
1606
1792
|
}] } });
|
|
1607
1793
|
|
|
1608
1794
|
class AXPWidgetPlaceholderComponent {
|
|
1609
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1610
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1795
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1796
|
+
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
1797
|
<ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
|
|
1612
1798
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1613
1799
|
}
|
|
1614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
|
|
1615
1801
|
type: Component,
|
|
1616
1802
|
args: [{
|
|
1617
1803
|
selector: 'axp-widget-placeholder',
|
|
@@ -1628,11 +1814,11 @@ class AXPWidgetRendererDirective {
|
|
|
1628
1814
|
//#endregion
|
|
1629
1815
|
//#endregion
|
|
1630
1816
|
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" }] : []));
|
|
1817
|
+
this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : /* istanbul ignore next */ []));
|
|
1818
|
+
this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
|
|
1819
|
+
this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
1820
|
+
this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
1821
|
+
this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
|
|
1636
1822
|
this.options = this._options.asReadonly();
|
|
1637
1823
|
this.onOptionsChanged = output();
|
|
1638
1824
|
this.onValueChanged = output();
|
|
@@ -1641,24 +1827,25 @@ class AXPWidgetRendererDirective {
|
|
|
1641
1827
|
/**
|
|
1642
1828
|
* Signal that emits the component reference when it's ready
|
|
1643
1829
|
*/
|
|
1644
|
-
this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : []));
|
|
1830
|
+
this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : /* istanbul ignore next */ []));
|
|
1645
1831
|
this.componentRefSignal = this._componentRefSignal.asReadonly();
|
|
1646
1832
|
//#endregion
|
|
1647
1833
|
//#region ---- Properties ----
|
|
1648
|
-
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
|
|
1834
|
+
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
|
|
1649
1835
|
this.injector = inject(Injector);
|
|
1650
1836
|
this.builderService = inject(AXPWidgetCoreService);
|
|
1651
|
-
this.contextService = inject(
|
|
1837
|
+
this.contextService = inject(AXPContextStore);
|
|
1652
1838
|
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
1653
1839
|
this.unsubscriber = inject(AXUnsubscriber);
|
|
1654
1840
|
this.translateService = inject(AXTranslationService);
|
|
1655
1841
|
this.widgetService = inject(AXPWidgetRegistryService);
|
|
1656
1842
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1657
1843
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
1658
|
-
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
1659
|
-
this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
|
|
1844
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
1845
|
+
this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
1660
1846
|
this.expressionEvaluators = new Map();
|
|
1661
1847
|
this.renderTimeoutId = null;
|
|
1848
|
+
this.renderGeneration = 0;
|
|
1662
1849
|
this.hasInitialRender = false;
|
|
1663
1850
|
this.onContextChanged = new Subject();
|
|
1664
1851
|
this.onLoadEvent = new Subject();
|
|
@@ -1703,12 +1890,12 @@ class AXPWidgetRendererDirective {
|
|
|
1703
1890
|
await this.updateOptionsBasedOnContext();
|
|
1704
1891
|
this.applyOptions();
|
|
1705
1892
|
}
|
|
1706
|
-
await this.updateVisibility();
|
|
1707
1893
|
}
|
|
1708
1894
|
else if (changed.path && this.isRelevantContextChange(changed.path)) {
|
|
1709
1895
|
// console.log(`🎯 [${this.node().type}] Context change detected: ${changed.path}`);
|
|
1710
1896
|
this.queueContextUpdate(changed.path);
|
|
1711
1897
|
}
|
|
1898
|
+
await this.updateVisibility();
|
|
1712
1899
|
});
|
|
1713
1900
|
this.builderService.onRefresh.pipe(this.unsubscriber.takeUntilDestroy).subscribe(async () => {
|
|
1714
1901
|
await this.processBatchedUpdates();
|
|
@@ -1834,77 +2021,88 @@ class AXPWidgetRendererDirective {
|
|
|
1834
2021
|
}
|
|
1835
2022
|
return false;
|
|
1836
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* True when a context store path used in an expression (`context.eval`, `context.options`) is
|
|
2026
|
+
* affected by `changedPath`.
|
|
2027
|
+
*/
|
|
2028
|
+
contextStorePathDependsOnChangedPath(evalPath, changedPath) {
|
|
2029
|
+
const normalizePath = (p) => {
|
|
2030
|
+
if (!p)
|
|
2031
|
+
return p;
|
|
2032
|
+
const parts = p.split('.');
|
|
2033
|
+
const last = parts[parts.length - 1];
|
|
2034
|
+
if (last && last.endsWith('Id')) {
|
|
2035
|
+
parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
|
|
2036
|
+
}
|
|
2037
|
+
return parts.join('.');
|
|
2038
|
+
};
|
|
2039
|
+
const isSegmentSuffix = (a, b) => {
|
|
2040
|
+
if (!a || !b)
|
|
2041
|
+
return false;
|
|
2042
|
+
const pa = a.split('.');
|
|
2043
|
+
const pb = b.split('.');
|
|
2044
|
+
if (pb.length > pa.length)
|
|
2045
|
+
return false;
|
|
2046
|
+
for (let i = 1; i <= pb.length; i++) {
|
|
2047
|
+
if (pa[pa.length - i] !== pb[pb.length - i])
|
|
2048
|
+
return false;
|
|
2049
|
+
}
|
|
2050
|
+
return true;
|
|
2051
|
+
};
|
|
2052
|
+
const evalNorm = normalizePath(evalPath);
|
|
2053
|
+
const changedNorm = normalizePath(changedPath);
|
|
2054
|
+
const rawMatch = evalPath === changedPath ||
|
|
2055
|
+
evalPath.startsWith(changedPath + '.') ||
|
|
2056
|
+
changedPath.startsWith(evalPath + '.') ||
|
|
2057
|
+
isSegmentSuffix(evalPath, changedPath) ||
|
|
2058
|
+
isSegmentSuffix(changedPath, evalPath);
|
|
2059
|
+
const normMatch = evalNorm === changedNorm ||
|
|
2060
|
+
evalNorm.startsWith(changedNorm + '.') ||
|
|
2061
|
+
changedNorm.startsWith(evalNorm + '.') ||
|
|
2062
|
+
isSegmentSuffix(evalNorm, changedNorm) ||
|
|
2063
|
+
isSegmentSuffix(changedNorm, evalNorm);
|
|
2064
|
+
if (rawMatch || normMatch) {
|
|
2065
|
+
return true;
|
|
2066
|
+
}
|
|
2067
|
+
return this.isPathAlias(evalPath, changedPath);
|
|
2068
|
+
}
|
|
2069
|
+
/**
|
|
2070
|
+
* Whether an expression template string reads context store paths affected by `changedPath`.
|
|
2071
|
+
*/
|
|
2072
|
+
expressionTextDependsOnContextPath(expressionValue, changedPath) {
|
|
2073
|
+
const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
|
|
2074
|
+
let match;
|
|
2075
|
+
while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
|
|
2076
|
+
if (this.contextStorePathDependsOnChangedPath(match[1], changedPath)) {
|
|
2077
|
+
return true;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
const contextOptionsQuoted = /context\.options\(\s*['"]([^'"]*)['"]\s*\)/g;
|
|
2081
|
+
while ((match = contextOptionsQuoted.exec(expressionValue)) !== null) {
|
|
2082
|
+
const sub = match[1];
|
|
2083
|
+
const evalPath = sub === '' ? 'options' : `options.${sub}`;
|
|
2084
|
+
if (this.contextStorePathDependsOnChangedPath(evalPath, changedPath)) {
|
|
2085
|
+
return true;
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
const contextOptionsEmpty = /context\.options\(\s*\)/g;
|
|
2089
|
+
while ((match = contextOptionsEmpty.exec(expressionValue)) !== null) {
|
|
2090
|
+
if (this.contextStorePathDependsOnChangedPath('options', changedPath)) {
|
|
2091
|
+
return true;
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
return false;
|
|
2095
|
+
}
|
|
1837
2096
|
hasExpressionDependency(changedPath) {
|
|
1838
|
-
// Check if any cached expressions depend on the changed path
|
|
1839
2097
|
for (const [path, evaluator] of this.expressionEvaluators) {
|
|
1840
|
-
// Check if the expression path itself contains the changed path
|
|
1841
2098
|
if (path.includes(changedPath)) {
|
|
1842
2099
|
return true;
|
|
1843
2100
|
}
|
|
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
2101
|
const node = this.node();
|
|
1847
2102
|
const expressionValue = this.getExpressionValueFromNode(node, path);
|
|
1848
2103
|
if (expressionValue && typeof expressionValue === 'string') {
|
|
1849
|
-
|
|
1850
|
-
|
|
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
|
-
}
|
|
2104
|
+
if (this.expressionTextDependsOnContextPath(expressionValue, changedPath)) {
|
|
2105
|
+
return true;
|
|
1908
2106
|
}
|
|
1909
2107
|
}
|
|
1910
2108
|
}
|
|
@@ -1991,20 +2189,8 @@ class AXPWidgetRendererDirective {
|
|
|
1991
2189
|
const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
|
|
1992
2190
|
if (!visibility || typeof visibility !== 'string')
|
|
1993
2191
|
return false;
|
|
1994
|
-
// Check if visibility expression depends on the changed path
|
|
1995
2192
|
if (this.expressionEvaluator.isExpression(visibility)) {
|
|
1996
|
-
|
|
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
|
-
}
|
|
2193
|
+
return this.expressionTextDependsOnContextPath(visibility, changedPath);
|
|
2008
2194
|
}
|
|
2009
2195
|
return false;
|
|
2010
2196
|
}
|
|
@@ -2018,18 +2204,18 @@ class AXPWidgetRendererDirective {
|
|
|
2018
2204
|
}
|
|
2019
2205
|
}
|
|
2020
2206
|
rerenderComponent() {
|
|
2021
|
-
// Clear any pending render operation to prevent double rendering
|
|
2022
2207
|
if (this.renderTimeoutId) {
|
|
2023
2208
|
clearTimeout(this.renderTimeoutId);
|
|
2024
2209
|
this.renderTimeoutId = null;
|
|
2025
2210
|
}
|
|
2026
|
-
|
|
2027
|
-
this.isLoading.set(false);
|
|
2028
|
-
// Schedule the component loading
|
|
2211
|
+
const generation = ++this.renderGeneration;
|
|
2029
2212
|
this.renderTimeoutId = setTimeout(async () => {
|
|
2030
|
-
await this.loadComponent();
|
|
2031
2213
|
this.renderTimeoutId = null;
|
|
2032
|
-
|
|
2214
|
+
if (generation !== this.renderGeneration) {
|
|
2215
|
+
return;
|
|
2216
|
+
}
|
|
2217
|
+
await this.loadComponent();
|
|
2218
|
+
}, 0);
|
|
2033
2219
|
}
|
|
2034
2220
|
ngOnDestroy() {
|
|
2035
2221
|
if (this.renderTimeoutId) {
|
|
@@ -2285,8 +2471,13 @@ class AXPWidgetRendererDirective {
|
|
|
2285
2471
|
const newValue = await evaluator();
|
|
2286
2472
|
const evalTime = performance.now() - evalStartTime;
|
|
2287
2473
|
// Check if result has actually changed using Lodash isEqual
|
|
2474
|
+
// Important: We must check if the key exists in the map, not just compare values
|
|
2475
|
+
// This handles the case where the expression evaluates to `undefined` for the first time
|
|
2476
|
+
// Without this check, `undefined` would be incorrectly treated as "no change"
|
|
2477
|
+
// because Map.get() returns `undefined` for non-existent keys
|
|
2478
|
+
const hasLastValue = this.lastExpressionResults.has(path);
|
|
2288
2479
|
const lastValue = this.lastExpressionResults.get(path);
|
|
2289
|
-
const hasChanged = !isEqual(newValue, lastValue);
|
|
2480
|
+
const hasChanged = !hasLastValue || !isEqual(newValue, lastValue);
|
|
2290
2481
|
if (hasChanged) {
|
|
2291
2482
|
// console.log(
|
|
2292
2483
|
// `📝 [${this.node().type}] Expression '${path}' evaluated in ${evalTime.toFixed(2)}ms - value changed`,
|
|
@@ -2365,7 +2556,8 @@ class AXPWidgetRendererDirective {
|
|
|
2365
2556
|
if (!this.isVisible()) {
|
|
2366
2557
|
this.isVisible.set(true);
|
|
2367
2558
|
if (this.componentRef && this.componentRef.location) {
|
|
2368
|
-
this.
|
|
2559
|
+
this.loadComponent();
|
|
2560
|
+
// this.componentRef.location.nativeElement.style.display = '';
|
|
2369
2561
|
}
|
|
2370
2562
|
}
|
|
2371
2563
|
}
|
|
@@ -2373,7 +2565,8 @@ class AXPWidgetRendererDirective {
|
|
|
2373
2565
|
if (this.isVisible()) {
|
|
2374
2566
|
this.isVisible.set(false);
|
|
2375
2567
|
if (this.componentRef && this.componentRef.location) {
|
|
2376
|
-
this.componentRef.
|
|
2568
|
+
this.componentRef.destroy();
|
|
2569
|
+
// this.componentRef.location.nativeElement.style.display = 'none';
|
|
2377
2570
|
}
|
|
2378
2571
|
}
|
|
2379
2572
|
}
|
|
@@ -2411,36 +2604,51 @@ class AXPWidgetRendererDirective {
|
|
|
2411
2604
|
return this.contextService.data();
|
|
2412
2605
|
},
|
|
2413
2606
|
isDirty: () => {
|
|
2607
|
+
if (!this.contextService.isSavedCommitted()) {
|
|
2608
|
+
return false;
|
|
2609
|
+
}
|
|
2414
2610
|
return this.contextService.isDirty();
|
|
2415
2611
|
},
|
|
2612
|
+
/**
|
|
2613
|
+
* Host/widget-under-edit `options` from the shared context store (same values as
|
|
2614
|
+
* `context.eval('options' + (path ? '.' + path : ''))`), not `widget.options` on the nested
|
|
2615
|
+
* property field instance. Uses one `getValue` so smart-path behavior matches `context.eval`.
|
|
2616
|
+
*/
|
|
2617
|
+
options: (path) => {
|
|
2618
|
+
if (path == null || path === '') {
|
|
2619
|
+
return this.contextService.getValue('options');
|
|
2620
|
+
}
|
|
2621
|
+
return this.contextService.getValue(`options.${path}`);
|
|
2622
|
+
},
|
|
2416
2623
|
};
|
|
2417
2624
|
}
|
|
2418
2625
|
getEventScope() {
|
|
2419
2626
|
return {
|
|
2420
|
-
context: (
|
|
2627
|
+
context: (...paths) => {
|
|
2421
2628
|
return this.onContextChanged.pipe(filter((c) => {
|
|
2422
|
-
|
|
2423
|
-
|
|
2629
|
+
const activePaths = paths.filter((p) => !!p && p.trim().length > 0);
|
|
2630
|
+
// If no path filters specified, pass all events
|
|
2631
|
+
if (activePaths.length === 0) {
|
|
2424
2632
|
return true;
|
|
2425
2633
|
}
|
|
2426
2634
|
// Ensure c.path exists
|
|
2427
2635
|
if (!c.path) {
|
|
2428
2636
|
return false;
|
|
2429
2637
|
}
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2638
|
+
return activePaths.some((path) => {
|
|
2639
|
+
// Pattern: "prefix*" - matches paths that start with prefix
|
|
2640
|
+
if (path.endsWith('*')) {
|
|
2641
|
+
const prefix = path.substring(0, path.length - 1);
|
|
2642
|
+
return c.path.startsWith(prefix);
|
|
2643
|
+
}
|
|
2644
|
+
// Pattern: "*suffix" - matches paths that end with suffix
|
|
2645
|
+
if (path.startsWith('*')) {
|
|
2646
|
+
const suffix = path.substring(1);
|
|
2647
|
+
return c.path.endsWith(suffix);
|
|
2648
|
+
}
|
|
2649
|
+
// Exact match
|
|
2442
2650
|
return c.path === path;
|
|
2443
|
-
}
|
|
2651
|
+
});
|
|
2444
2652
|
}));
|
|
2445
2653
|
},
|
|
2446
2654
|
from: (event) => get(this.instance.api(), event),
|
|
@@ -2451,6 +2659,16 @@ class AXPWidgetRendererDirective {
|
|
|
2451
2659
|
}
|
|
2452
2660
|
getWidgetScope() {
|
|
2453
2661
|
return {
|
|
2662
|
+
/** Resolved options for this renderer's widget instance (not the host / property-viewer target). */
|
|
2663
|
+
options: (path) => {
|
|
2664
|
+
const opts = this.instance && typeof this.instance.options === 'function'
|
|
2665
|
+
? this.instance.options()
|
|
2666
|
+
: this.mergedOptions();
|
|
2667
|
+
if (path == null || path === '') {
|
|
2668
|
+
return opts;
|
|
2669
|
+
}
|
|
2670
|
+
return getSmart(opts, path);
|
|
2671
|
+
},
|
|
2454
2672
|
call: (name, ...args) => {
|
|
2455
2673
|
this.instance.call(name, ...args);
|
|
2456
2674
|
},
|
|
@@ -2471,7 +2689,7 @@ class AXPWidgetRendererDirective {
|
|
|
2471
2689
|
}
|
|
2472
2690
|
},
|
|
2473
2691
|
output: (name) => {
|
|
2474
|
-
this.instance.output(name);
|
|
2692
|
+
return this.instance.output(name);
|
|
2475
2693
|
},
|
|
2476
2694
|
find: (id) => {
|
|
2477
2695
|
return this.builderService.getWidget(id);
|
|
@@ -2556,14 +2774,14 @@ class AXPWidgetRendererDirective {
|
|
|
2556
2774
|
// console.error('Error evaluating action expression:', templateExpression, error);
|
|
2557
2775
|
}
|
|
2558
2776
|
}
|
|
2559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2560
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2778
|
+
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
2779
|
{
|
|
2562
2780
|
provide: AXUnsubscriber,
|
|
2563
2781
|
},
|
|
2564
2782
|
], exportAs: ["widgetRenderer"], usesOnChanges: true, ngImport: i0 }); }
|
|
2565
2783
|
}
|
|
2566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
|
|
2567
2785
|
type: Directive,
|
|
2568
2786
|
args: [{
|
|
2569
2787
|
selector: '[axp-widget-renderer]',
|
|
@@ -2579,63 +2797,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2579
2797
|
|
|
2580
2798
|
const COMPONENTS = [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective];
|
|
2581
2799
|
class AXPWidgetCoreModule {
|
|
2582
|
-
static
|
|
2583
|
-
|
|
2584
|
-
|
|
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] }); }
|
|
2800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2801
|
+
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] }); }
|
|
2802
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule] }); }
|
|
2625
2803
|
}
|
|
2626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
|
|
2627
2805
|
type: NgModule,
|
|
2628
2806
|
args: [{
|
|
2629
|
-
imports: [CommonModule, PortalModule, AXSkeletonModule,
|
|
2807
|
+
imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule],
|
|
2630
2808
|
exports: [...COMPONENTS],
|
|
2631
2809
|
declarations: [...COMPONENTS],
|
|
2810
|
+
providers: [],
|
|
2632
2811
|
}]
|
|
2633
|
-
}]
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2812
|
+
}] });
|
|
2813
|
+
|
|
2814
|
+
//#endregion
|
|
2815
|
+
//#region ---- Mapping ----
|
|
2816
|
+
/**
|
|
2817
|
+
* Converts a domain {@link AXPProperty} into a {@link AXPWidgetProperty} row for
|
|
2818
|
+
* the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
|
|
2819
|
+
*/
|
|
2820
|
+
function mapAXPPropertyToWidgetProperty(property, options) {
|
|
2821
|
+
const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
|
|
2822
|
+
const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
|
|
2823
|
+
const iface = property.interface;
|
|
2824
|
+
const widgetType = iface?.type ?? 'text-editor';
|
|
2825
|
+
const description = resolveDescription?.(property);
|
|
2826
|
+
return {
|
|
2827
|
+
name: property.name,
|
|
2828
|
+
title: resolveTitle(property),
|
|
2829
|
+
...(description !== undefined && description !== '' ? { description } : {}),
|
|
2830
|
+
group,
|
|
2831
|
+
order,
|
|
2832
|
+
schema: {
|
|
2833
|
+
dataType: property.dataType,
|
|
2834
|
+
interface: {
|
|
2835
|
+
path,
|
|
2836
|
+
name: property.name,
|
|
2837
|
+
type: widgetType,
|
|
2838
|
+
options: iface?.options ?? {},
|
|
2839
|
+
...(iface?.triggers ? { triggers: iface.triggers } : {}),
|
|
2840
|
+
},
|
|
2841
|
+
},
|
|
2842
|
+
validations: property.validations,
|
|
2843
|
+
visible: true,
|
|
2844
|
+
};
|
|
2845
|
+
}
|
|
2846
|
+
//#endregion
|
|
2639
2847
|
|
|
2640
2848
|
class AXPPropertyEditorHelper {
|
|
2641
2849
|
static expandShorthand(values) {
|
|
@@ -2919,48 +3127,1542 @@ class AXPWidgetSerializationHelper {
|
|
|
2919
3127
|
}
|
|
2920
3128
|
//#endregion
|
|
2921
3129
|
|
|
2922
|
-
|
|
2923
|
-
|
|
3130
|
+
//#region ---- Editor sub-categories (widget picker) ----
|
|
3131
|
+
const AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS = {
|
|
3132
|
+
name: 'editor-text-inputs',
|
|
2924
3133
|
order: 1,
|
|
2925
|
-
title: '
|
|
3134
|
+
title: '@platform-layout-widgets:subcategories.editor-text-inputs.title',
|
|
2926
3135
|
};
|
|
2927
|
-
const
|
|
2928
|
-
name: 'editor',
|
|
3136
|
+
const AXP_WIDGETS_EDITOR_SUB_NUMERIC = {
|
|
3137
|
+
name: 'editor-numeric',
|
|
2929
3138
|
order: 2,
|
|
2930
|
-
title: '
|
|
3139
|
+
title: '@platform-layout-widgets:subcategories.editor-numeric.title',
|
|
2931
3140
|
};
|
|
2932
|
-
const
|
|
2933
|
-
name: '
|
|
3141
|
+
const AXP_WIDGETS_EDITOR_SUB_DATETIME = {
|
|
3142
|
+
name: 'editor-datetime',
|
|
2934
3143
|
order: 3,
|
|
2935
|
-
title: '
|
|
3144
|
+
title: '@platform-layout-widgets:subcategories.editor-datetime.title',
|
|
2936
3145
|
};
|
|
2937
|
-
const
|
|
2938
|
-
name: '
|
|
3146
|
+
const AXP_WIDGETS_EDITOR_SUB_CHOICE = {
|
|
3147
|
+
name: 'editor-choice',
|
|
2939
3148
|
order: 4,
|
|
2940
|
-
title: '
|
|
3149
|
+
title: '@platform-layout-widgets:subcategories.editor-choice.title',
|
|
3150
|
+
};
|
|
3151
|
+
const AXP_WIDGETS_EDITOR_SUB_RICH = {
|
|
3152
|
+
name: 'editor-rich',
|
|
3153
|
+
order: 5,
|
|
3154
|
+
title: '@platform-layout-widgets:subcategories.editor-rich.title',
|
|
3155
|
+
};
|
|
3156
|
+
const AXP_WIDGETS_EDITOR_SUB_VISUAL = {
|
|
3157
|
+
name: 'editor-visual',
|
|
3158
|
+
order: 6,
|
|
3159
|
+
title: '@platform-layout-widgets:subcategories.editor-visual.title',
|
|
3160
|
+
};
|
|
3161
|
+
const AXP_WIDGETS_EDITOR_SUB_COMPOSITE = {
|
|
3162
|
+
name: 'editor-composite',
|
|
3163
|
+
order: 7,
|
|
3164
|
+
title: '@platform-layout-widgets:subcategories.editor-composite.title',
|
|
3165
|
+
};
|
|
3166
|
+
const AXP_WIDGETS_EDITOR_SUB_CONFIG = {
|
|
3167
|
+
name: 'editor-config',
|
|
3168
|
+
order: 8,
|
|
3169
|
+
title: '@platform-layout-widgets:subcategories.editor-config.title',
|
|
3170
|
+
};
|
|
3171
|
+
//#endregion
|
|
3172
|
+
//#region ---- Layout sub-categories (widget picker) ----
|
|
3173
|
+
const AXP_WIDGETS_LAYOUT_SUB_SHELL = {
|
|
3174
|
+
name: 'layout-shell',
|
|
3175
|
+
order: 1,
|
|
3176
|
+
title: '@platform-layout-widgets:subcategories.layout-shell.title',
|
|
3177
|
+
};
|
|
3178
|
+
const AXP_WIDGETS_LAYOUT_SUB_GRID = {
|
|
3179
|
+
name: 'layout-grid',
|
|
3180
|
+
order: 2,
|
|
3181
|
+
title: '@platform-layout-widgets:subcategories.layout-grid.title',
|
|
3182
|
+
};
|
|
3183
|
+
const AXP_WIDGETS_LAYOUT_SUB_SURFACES = {
|
|
3184
|
+
name: 'layout-surfaces',
|
|
3185
|
+
order: 3,
|
|
3186
|
+
title: '@platform-layout-widgets:subcategories.layout-surfaces.title',
|
|
3187
|
+
};
|
|
3188
|
+
const AXP_WIDGETS_LAYOUT_SUB_TABS = {
|
|
3189
|
+
name: 'layout-tabs',
|
|
3190
|
+
order: 4,
|
|
3191
|
+
title: '@platform-layout-widgets:subcategories.layout-tabs.title',
|
|
3192
|
+
};
|
|
3193
|
+
const AXP_WIDGETS_LAYOUT_SUB_LISTS = {
|
|
3194
|
+
name: 'layout-lists',
|
|
3195
|
+
order: 5,
|
|
3196
|
+
title: '@platform-layout-widgets:subcategories.layout-lists.title',
|
|
3197
|
+
};
|
|
3198
|
+
const AXP_WIDGETS_LAYOUT_SUB_UTILITY = {
|
|
3199
|
+
name: 'layout-utility',
|
|
3200
|
+
order: 6,
|
|
3201
|
+
title: '@platform-layout-widgets:subcategories.layout-utility.title',
|
|
3202
|
+
};
|
|
3203
|
+
//#endregion
|
|
3204
|
+
//#region ---- Action sub-categories (widget picker) ----
|
|
3205
|
+
const AXP_WIDGETS_ACTION_SUB_CONTROLS = {
|
|
3206
|
+
name: 'action-controls',
|
|
3207
|
+
order: 1,
|
|
3208
|
+
title: '@platform-layout-widgets:subcategories.action-controls.title',
|
|
3209
|
+
};
|
|
3210
|
+
//#endregion
|
|
3211
|
+
//#region ---- Advance sub-categories (widget picker) ----
|
|
3212
|
+
const AXP_WIDGETS_ADVANCE_SUB_MEDIA = {
|
|
3213
|
+
name: 'advance-media',
|
|
3214
|
+
order: 1,
|
|
3215
|
+
title: '@platform-layout-widgets:subcategories.advance-media.title',
|
|
3216
|
+
};
|
|
3217
|
+
const AXP_WIDGETS_ADVANCE_SUB_INPUT = {
|
|
3218
|
+
name: 'advance-input',
|
|
3219
|
+
order: 2,
|
|
3220
|
+
title: '@platform-layout-widgets:subcategories.advance-input.title',
|
|
3221
|
+
};
|
|
3222
|
+
const AXP_WIDGETS_ADVANCE_SUB_DATA = {
|
|
3223
|
+
name: 'advance-data',
|
|
3224
|
+
order: 3,
|
|
3225
|
+
title: '@platform-layout-widgets:subcategories.advance-data.title',
|
|
3226
|
+
};
|
|
3227
|
+
const AXP_WIDGETS_ADVANCE_SUB_TOOLS = {
|
|
3228
|
+
name: 'advance-tools',
|
|
3229
|
+
order: 4,
|
|
3230
|
+
title: '@platform-layout-widgets:subcategories.advance-tools.title',
|
|
3231
|
+
};
|
|
3232
|
+
//#endregion
|
|
3233
|
+
/** Normalizes widget categories to an array for iteration and serialization. */
|
|
3234
|
+
function normalizeWidgetCategories(categories) {
|
|
3235
|
+
if (categories == null) {
|
|
3236
|
+
return [];
|
|
3237
|
+
}
|
|
3238
|
+
return Array.isArray(categories) ? categories : [categories];
|
|
3239
|
+
}
|
|
3240
|
+
const AXP_WIDGETS_LAYOUT_CATEGORY = {
|
|
3241
|
+
name: 'layout',
|
|
3242
|
+
order: 1,
|
|
3243
|
+
title: '@platform-layout-widgets:categories.layout.title',
|
|
3244
|
+
};
|
|
3245
|
+
const AXP_WIDGETS_EDITOR_CATEGORY = {
|
|
3246
|
+
name: 'editor',
|
|
3247
|
+
order: 2,
|
|
3248
|
+
title: '@platform-layout-widgets:categories.editor.title',
|
|
3249
|
+
};
|
|
3250
|
+
const AXP_WIDGETS_ACTION_CATEGORY = {
|
|
3251
|
+
name: 'action',
|
|
3252
|
+
order: 3,
|
|
3253
|
+
title: '@platform-layout-widgets:categories.action.title',
|
|
3254
|
+
};
|
|
3255
|
+
const AXP_WIDGETS_ADVANCE_CATEGORY = {
|
|
3256
|
+
name: 'advance',
|
|
3257
|
+
order: 4,
|
|
3258
|
+
title: '@platform-layout-widgets:categories.advance.title',
|
|
3259
|
+
};
|
|
3260
|
+
/** AI category tab in the widget picker (metadata); unrelated to Widgets:GetForAI listing scope. */
|
|
3261
|
+
const AXP_WIDGETS_AI_CATEGORY = {
|
|
3262
|
+
name: 'ai',
|
|
3263
|
+
order: 5,
|
|
3264
|
+
title: '@platform-layout-widgets:categories.ai.title',
|
|
3265
|
+
};
|
|
3266
|
+
const AXP_WIDGETS_CATEGORIES = [
|
|
3267
|
+
AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
3268
|
+
AXP_WIDGETS_EDITOR_CATEGORY,
|
|
3269
|
+
AXP_WIDGETS_ACTION_CATEGORY,
|
|
3270
|
+
AXP_WIDGETS_ADVANCE_CATEGORY,
|
|
3271
|
+
AXP_WIDGETS_AI_CATEGORY,
|
|
3272
|
+
];
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* Standalone cell renderer using the same column-mode widget pipeline as {@link AXPWidgetColumnRendererComponent}.
|
|
3276
|
+
*/
|
|
3277
|
+
class AXPWidgetColumnCellComponent {
|
|
3278
|
+
constructor() {
|
|
3279
|
+
this.caption = '';
|
|
3280
|
+
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : /* istanbul ignore next */ []));
|
|
3281
|
+
this.rowInjectorsCache = new Map();
|
|
3282
|
+
this.hasExpressions = false;
|
|
3283
|
+
this.pendingEvaluations = new Set();
|
|
3284
|
+
this.changeDetectionScheduled = false;
|
|
3285
|
+
this.injector = inject(Injector);
|
|
3286
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
3287
|
+
this.widgetRegistry = inject(AXPWidgetRegistryService);
|
|
3288
|
+
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
3289
|
+
}
|
|
3290
|
+
async ngOnInit() {
|
|
3291
|
+
await this.resolveComponent();
|
|
3292
|
+
}
|
|
3293
|
+
ngOnChanges(changes) {
|
|
3294
|
+
if (changes['node'] && !changes['node'].firstChange) {
|
|
3295
|
+
void this.resolveComponent();
|
|
3296
|
+
}
|
|
3297
|
+
if (changes['rowData'] && !changes['rowData'].firstChange) {
|
|
3298
|
+
this.rowInjectorsCache.clear();
|
|
3299
|
+
this.cdr.markForCheck();
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
getInputs(data) {
|
|
3303
|
+
return {
|
|
3304
|
+
rawValue: get(data, this.node.path),
|
|
3305
|
+
rowData: data,
|
|
3306
|
+
};
|
|
3307
|
+
}
|
|
3308
|
+
getRowInjector(data) {
|
|
3309
|
+
const cacheKey = this.getCacheKey(data);
|
|
3310
|
+
let rowInjector = this.rowInjectorsCache.get(cacheKey);
|
|
3311
|
+
if (!rowInjector) {
|
|
3312
|
+
if (!this.hasExpressions) {
|
|
3313
|
+
rowInjector = this.createRowInjector(this.mergedOptions());
|
|
3314
|
+
this.rowInjectorsCache.set(cacheKey, rowInjector);
|
|
3315
|
+
return rowInjector;
|
|
3316
|
+
}
|
|
3317
|
+
if (!this.pendingEvaluations.has(cacheKey)) {
|
|
3318
|
+
this.pendingEvaluations.add(cacheKey);
|
|
3319
|
+
const scope = {
|
|
3320
|
+
...(data ?? {}),
|
|
3321
|
+
context: {
|
|
3322
|
+
eval: (path) => getSmart(data, path),
|
|
3323
|
+
},
|
|
3324
|
+
};
|
|
3325
|
+
void this.expressionEvaluator.evaluate(this.mergedOptions(), scope).then((evaluatedOptions) => {
|
|
3326
|
+
const newInjector = this.createRowInjector(evaluatedOptions);
|
|
3327
|
+
this.rowInjectorsCache.delete(cacheKey);
|
|
3328
|
+
this.rowInjectorsCache.set(cacheKey, newInjector);
|
|
3329
|
+
this.pendingEvaluations.delete(cacheKey);
|
|
3330
|
+
this.scheduleChangeDetection();
|
|
3331
|
+
}).catch(() => {
|
|
3332
|
+
this.pendingEvaluations.delete(cacheKey);
|
|
3333
|
+
});
|
|
3334
|
+
}
|
|
3335
|
+
rowInjector = this.createRowInjector(this.mergedOptions());
|
|
3336
|
+
this.rowInjectorsCache.set(cacheKey, rowInjector);
|
|
3337
|
+
}
|
|
3338
|
+
return rowInjector;
|
|
3339
|
+
}
|
|
3340
|
+
async resolveComponent() {
|
|
3341
|
+
const widget = this.widgetRegistry.resolve(this.node.type);
|
|
3342
|
+
const mode = 'column';
|
|
3343
|
+
this.component = await widget?.components[mode]?.component();
|
|
3344
|
+
const props = widget?.components[mode]?.properties
|
|
3345
|
+
?.filter((c) => c.schema.defaultValue)
|
|
3346
|
+
.map((c) => ({ [c.name]: c.schema.defaultValue }))
|
|
3347
|
+
.reduce((acc, curr) => ({ ...acc, ...curr }), {});
|
|
3348
|
+
this.mergedOptions.set(merge(props, this.node.options) || {});
|
|
3349
|
+
this.hasExpressions = this.checkForExpressions(this.mergedOptions());
|
|
3350
|
+
this.rowInjectorsCache.clear();
|
|
3351
|
+
this.cdr.markForCheck();
|
|
3352
|
+
}
|
|
3353
|
+
createRowInjector(options) {
|
|
3354
|
+
return Injector.create({
|
|
3355
|
+
parent: this.injector,
|
|
3356
|
+
providers: [
|
|
3357
|
+
{
|
|
3358
|
+
provide: AXP_WIDGET_COLUMN_TOKEN,
|
|
3359
|
+
useValue: {
|
|
3360
|
+
path: this.node.path,
|
|
3361
|
+
options,
|
|
3362
|
+
caption: this.caption,
|
|
3363
|
+
},
|
|
3364
|
+
},
|
|
3365
|
+
],
|
|
3366
|
+
});
|
|
3367
|
+
}
|
|
3368
|
+
getCacheKey(data) {
|
|
3369
|
+
const id = data['id'];
|
|
3370
|
+
if (id != null) {
|
|
3371
|
+
return `row-${String(id)}`;
|
|
3372
|
+
}
|
|
3373
|
+
return `row-${Object.keys(data).length}`;
|
|
3374
|
+
}
|
|
3375
|
+
checkForExpressions(obj) {
|
|
3376
|
+
if (typeof obj === 'string') {
|
|
3377
|
+
return this.expressionEvaluator.isExpression(obj);
|
|
3378
|
+
}
|
|
3379
|
+
if (Array.isArray(obj)) {
|
|
3380
|
+
return obj.some((item) => this.checkForExpressions(item));
|
|
3381
|
+
}
|
|
3382
|
+
if (obj && typeof obj === 'object') {
|
|
3383
|
+
return Object.values(obj).some((value) => this.checkForExpressions(value));
|
|
3384
|
+
}
|
|
3385
|
+
return false;
|
|
3386
|
+
}
|
|
3387
|
+
scheduleChangeDetection() {
|
|
3388
|
+
if (this.changeDetectionScheduled) {
|
|
3389
|
+
return;
|
|
3390
|
+
}
|
|
3391
|
+
this.changeDetectionScheduled = true;
|
|
3392
|
+
requestAnimationFrame(() => {
|
|
3393
|
+
this.cdr.markForCheck();
|
|
3394
|
+
this.changeDetectionScheduled = false;
|
|
3395
|
+
});
|
|
3396
|
+
}
|
|
3397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3398
|
+
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: `
|
|
3399
|
+
@if (component && rowData) {
|
|
3400
|
+
<ng-container
|
|
3401
|
+
*ngComponentOutlet="component; injector: getRowInjector(rowData); inputs: getInputs(rowData)"
|
|
3402
|
+
></ng-container>
|
|
3403
|
+
}
|
|
3404
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3405
|
+
}
|
|
3406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWidgetColumnCellComponent, decorators: [{
|
|
3407
|
+
type: Component,
|
|
3408
|
+
args: [{
|
|
3409
|
+
selector: 'axp-widget-column-cell',
|
|
3410
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3411
|
+
imports: [NgComponentOutlet],
|
|
3412
|
+
template: `
|
|
3413
|
+
@if (component && rowData) {
|
|
3414
|
+
<ng-container
|
|
3415
|
+
*ngComponentOutlet="component; injector: getRowInjector(rowData); inputs: getInputs(rowData)"
|
|
3416
|
+
></ng-container>
|
|
3417
|
+
}
|
|
3418
|
+
`,
|
|
3419
|
+
}]
|
|
3420
|
+
}], propDecorators: { node: [{
|
|
3421
|
+
type: Input,
|
|
3422
|
+
args: [{ required: true }]
|
|
3423
|
+
}], rowData: [{
|
|
3424
|
+
type: Input,
|
|
3425
|
+
args: [{ required: true }]
|
|
3426
|
+
}], caption: [{
|
|
3427
|
+
type: Input
|
|
3428
|
+
}] } });
|
|
3429
|
+
|
|
3430
|
+
var AXPWidgetGroupEnum;
|
|
3431
|
+
(function (AXPWidgetGroupEnum) {
|
|
3432
|
+
AXPWidgetGroupEnum["FormElement"] = "form-element";
|
|
3433
|
+
AXPWidgetGroupEnum["DashboardWidget"] = "dashboard-widget";
|
|
3434
|
+
AXPWidgetGroupEnum["FormTemplate"] = "form-template";
|
|
3435
|
+
AXPWidgetGroupEnum["PropertyEditor"] = "property-editor";
|
|
3436
|
+
AXPWidgetGroupEnum["MetaData"] = "meta-data";
|
|
3437
|
+
AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
|
|
3438
|
+
AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
|
|
3439
|
+
AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
|
|
3440
|
+
AXPWidgetGroupEnum["BaseWidget"] = "base-widget";
|
|
3441
|
+
})(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
|
|
3442
|
+
|
|
3443
|
+
//#region ---- Contracts barrel ----
|
|
3444
|
+
//#endregion
|
|
3445
|
+
|
|
3446
|
+
const AXP_STYLING_PROPERTY_GROUP = {
|
|
3447
|
+
name: 'styling',
|
|
3448
|
+
order: 1,
|
|
3449
|
+
title: 'Styling',
|
|
3450
|
+
};
|
|
3451
|
+
const AXP_DATA_PROPERTY_GROUP = {
|
|
3452
|
+
name: 'data',
|
|
3453
|
+
order: 7,
|
|
3454
|
+
title: 'Data',
|
|
3455
|
+
};
|
|
3456
|
+
const AXP_BEHAVIOR_PROPERTY_GROUP = {
|
|
3457
|
+
name: 'behavior',
|
|
3458
|
+
order: 2,
|
|
3459
|
+
title: 'Behavior',
|
|
3460
|
+
};
|
|
3461
|
+
const AXP_WIDGET_PROPERTY_GROUP = {
|
|
3462
|
+
name: 'widget',
|
|
3463
|
+
order: 0,
|
|
3464
|
+
title: 'Widget',
|
|
3465
|
+
};
|
|
3466
|
+
const AXP_VALIDATION_PROPERTY_GROUP = {
|
|
3467
|
+
name: 'validation',
|
|
3468
|
+
order: 4,
|
|
3469
|
+
title: 'Validation',
|
|
3470
|
+
};
|
|
3471
|
+
const AXP_APPEARANCE_PROPERTY_GROUP = {
|
|
3472
|
+
name: 'appearance',
|
|
3473
|
+
order: 2,
|
|
3474
|
+
title: 'Appearance',
|
|
3475
|
+
};
|
|
3476
|
+
const AXP_ANIMATION_PROPERTY_GROUP = {
|
|
3477
|
+
name: 'animation',
|
|
3478
|
+
order: 5,
|
|
3479
|
+
title: 'Animation',
|
|
3480
|
+
};
|
|
3481
|
+
const AXP_TRIGGERS_PROPERTY_GROUP = {
|
|
3482
|
+
name: 'triggers',
|
|
3483
|
+
order: 3,
|
|
3484
|
+
title: 'Triggers',
|
|
3485
|
+
};
|
|
3486
|
+
|
|
3487
|
+
/**
|
|
3488
|
+
* Single property that edits all data-source-related options (dataSource, valueField, textField, filters)
|
|
3489
|
+
* in one dedicated widget. Uses path: 'options' and setValue with merge (same pattern as flex-options).
|
|
3490
|
+
*/
|
|
3491
|
+
const AXP_DATA_SOURCE_OPTIONS_PROPERTY = {
|
|
3492
|
+
name: 'dataSourceOptions',
|
|
3493
|
+
title: 'Data Source',
|
|
3494
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3495
|
+
showLabel: false,
|
|
3496
|
+
schema: {
|
|
3497
|
+
dataType: 'object',
|
|
3498
|
+
interface: {
|
|
3499
|
+
name: 'dataSourceOptions',
|
|
3500
|
+
path: 'options',
|
|
3501
|
+
type: 'data-source-options',
|
|
3502
|
+
options: {},
|
|
3503
|
+
},
|
|
3504
|
+
},
|
|
3505
|
+
visible: true,
|
|
3506
|
+
};
|
|
3507
|
+
// export const AXP_DATA_SOURCE_PROPERTY: AXPWidgetProperty = {
|
|
3508
|
+
// name: 'dataSource',
|
|
3509
|
+
// title: 'Data Source',
|
|
3510
|
+
// group: AXP_DATA_PROPERTY_GROUP,
|
|
3511
|
+
// schema: {
|
|
3512
|
+
// dataType: 'object',
|
|
3513
|
+
// interface: {
|
|
3514
|
+
// name: 'dataSource',
|
|
3515
|
+
// path: 'options.dataSource',
|
|
3516
|
+
// type: AXPWidgetsCatalog.select,
|
|
3517
|
+
// valueTransforms: objectKeyValueTransforms('name'),
|
|
3518
|
+
// options: {
|
|
3519
|
+
// valueField: 'name',
|
|
3520
|
+
// textField: 'title',
|
|
3521
|
+
// dataSource: 'dataSources',
|
|
3522
|
+
// hasClearButton: true,
|
|
3523
|
+
// allowSearch: true,
|
|
3524
|
+
// },
|
|
3525
|
+
// },
|
|
3526
|
+
// },
|
|
3527
|
+
// visible: true,
|
|
3528
|
+
// };
|
|
3529
|
+
// export const AXP_DATA_SOURCE_VALUE_FIELD: AXPWidgetProperty = {
|
|
3530
|
+
// name: 'valueField',
|
|
3531
|
+
// title: 'Value Field',
|
|
3532
|
+
// group: AXP_DATA_PROPERTY_GROUP,
|
|
3533
|
+
// schema: {
|
|
3534
|
+
// dataType: 'string',
|
|
3535
|
+
// interface: {
|
|
3536
|
+
// name: 'valueField',
|
|
3537
|
+
// path: 'options.valueField',
|
|
3538
|
+
// type: AXPWidgetsCatalog.text,
|
|
3539
|
+
// options: {
|
|
3540
|
+
// hasClearButton: true,
|
|
3541
|
+
// },
|
|
3542
|
+
// triggers: [
|
|
3543
|
+
// {
|
|
3544
|
+
// event: `{{ events.context('options.dataSource') }}`,
|
|
3545
|
+
// action: `{{ context.set('options.valueField',widget.find('dataSource').output('item').valueField?.name); }}`,
|
|
3546
|
+
// },
|
|
3547
|
+
// ],
|
|
3548
|
+
// },
|
|
3549
|
+
// },
|
|
3550
|
+
// visible: true,
|
|
3551
|
+
// };
|
|
3552
|
+
// export const AXP_DATA_SOURCE_TEXT_FIELD: AXPWidgetProperty = {
|
|
3553
|
+
// name: 'textField',
|
|
3554
|
+
// title: 'Text Field',
|
|
3555
|
+
// group: AXP_DATA_PROPERTY_GROUP,
|
|
3556
|
+
// schema: {
|
|
3557
|
+
// dataType: 'string',
|
|
3558
|
+
// interface: {
|
|
3559
|
+
// name: 'textField',
|
|
3560
|
+
// path: 'options.textField',
|
|
3561
|
+
// type: AXPWidgetsCatalog.text,
|
|
3562
|
+
// options: {
|
|
3563
|
+
// hasClearButton: true,
|
|
3564
|
+
// },
|
|
3565
|
+
// triggers: [
|
|
3566
|
+
// {
|
|
3567
|
+
// event: `{{ events.context('options.dataSource') }}`,
|
|
3568
|
+
// action: `{{ context.set('options.textField',widget.find('dataSource').output('item').textField?.name); }}`,
|
|
3569
|
+
// },
|
|
3570
|
+
// ],
|
|
3571
|
+
// },
|
|
3572
|
+
// },
|
|
3573
|
+
// visible: true,
|
|
3574
|
+
// };
|
|
3575
|
+
// /** Use AXP_DATA_SOURCE_OPTIONS_PROPERTY for a single unified data-source editor, or the three below for separate fields. */
|
|
3576
|
+
// export const AXP_DATA_SOURCE_PROPERTIES = [
|
|
3577
|
+
// AXP_DATA_SOURCE_PROPERTY,
|
|
3578
|
+
// AXP_DATA_SOURCE_VALUE_FIELD,
|
|
3579
|
+
// AXP_DATA_SOURCE_TEXT_FIELD,
|
|
3580
|
+
// ];
|
|
3581
|
+
|
|
3582
|
+
const AXP_NAME_PROPERTY = createStringProperty({
|
|
3583
|
+
name: 'name',
|
|
3584
|
+
title: 'Name',
|
|
3585
|
+
group: AXP_WIDGET_PROPERTY_GROUP,
|
|
3586
|
+
});
|
|
3587
|
+
const AXP_THEME_PROPERTY = {
|
|
3588
|
+
name: 'theme',
|
|
3589
|
+
title: 'Theme',
|
|
3590
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3591
|
+
schema: {
|
|
3592
|
+
dataType: 'string',
|
|
3593
|
+
defaultValue: { id: 'default', title: 'Default' },
|
|
3594
|
+
interface: {
|
|
3595
|
+
name: 'theme',
|
|
3596
|
+
path: 'options.theme',
|
|
3597
|
+
type: AXPWidgetsCatalog.select,
|
|
3598
|
+
options: {
|
|
3599
|
+
dataSource: [
|
|
3600
|
+
{
|
|
3601
|
+
id: 'default',
|
|
3602
|
+
title: 'Default',
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
id: 'light',
|
|
3606
|
+
title: 'Light',
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
id: 'dark',
|
|
3610
|
+
title: 'Dark',
|
|
3611
|
+
},
|
|
3612
|
+
],
|
|
3613
|
+
},
|
|
3614
|
+
},
|
|
3615
|
+
},
|
|
3616
|
+
visible: true,
|
|
3617
|
+
};
|
|
3618
|
+
const AXP_DIRECTION_PROPERTY = {
|
|
3619
|
+
name: 'direction',
|
|
3620
|
+
title: 'Direction',
|
|
3621
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3622
|
+
schema: {
|
|
3623
|
+
dataType: 'string',
|
|
3624
|
+
defaultValue: { id: 'horizontal' },
|
|
3625
|
+
interface: {
|
|
3626
|
+
name: 'direction',
|
|
3627
|
+
path: 'options.direction',
|
|
3628
|
+
type: AXPWidgetsCatalog.select,
|
|
3629
|
+
options: {
|
|
3630
|
+
dataSource: [
|
|
3631
|
+
{
|
|
3632
|
+
id: 'horizontal',
|
|
3633
|
+
title: 'Horizontal',
|
|
3634
|
+
},
|
|
3635
|
+
{
|
|
3636
|
+
id: 'vertical',
|
|
3637
|
+
title: 'Vertical',
|
|
3638
|
+
},
|
|
3639
|
+
],
|
|
3640
|
+
},
|
|
3641
|
+
},
|
|
3642
|
+
},
|
|
3643
|
+
visible: true,
|
|
3644
|
+
};
|
|
3645
|
+
const AXP_COLOR_PROPERTY = {
|
|
3646
|
+
name: 'color',
|
|
3647
|
+
title: 'Color',
|
|
3648
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3649
|
+
schema: {
|
|
3650
|
+
dataType: 'string',
|
|
3651
|
+
interface: {
|
|
3652
|
+
path: 'options.color',
|
|
3653
|
+
options: {
|
|
3654
|
+
hasClearButton: true,
|
|
3655
|
+
},
|
|
3656
|
+
type: AXPWidgetsCatalog.color,
|
|
3657
|
+
},
|
|
3658
|
+
},
|
|
3659
|
+
visible: true,
|
|
3660
|
+
};
|
|
3661
|
+
const AXP_FONT_SIZE_PROPERTY = {
|
|
3662
|
+
name: 'fontSize',
|
|
3663
|
+
title: 'Font Size',
|
|
3664
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3665
|
+
schema: {
|
|
3666
|
+
dataType: 'string',
|
|
3667
|
+
defaultValue: '12px',
|
|
3668
|
+
interface: {
|
|
3669
|
+
name: 'fontSize',
|
|
3670
|
+
path: 'options.fontSize',
|
|
3671
|
+
type: AXPWidgetsCatalog.text,
|
|
3672
|
+
},
|
|
3673
|
+
},
|
|
3674
|
+
visible: true,
|
|
3675
|
+
};
|
|
3676
|
+
const AXP_BG_COLOR_PROPERTY = {
|
|
3677
|
+
name: 'backgroundColor',
|
|
3678
|
+
title: 'Background Color',
|
|
3679
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3680
|
+
schema: {
|
|
3681
|
+
dataType: 'string',
|
|
3682
|
+
interface: {
|
|
3683
|
+
path: 'options.backgroundColor',
|
|
3684
|
+
options: {
|
|
3685
|
+
hasClearButton: true,
|
|
3686
|
+
},
|
|
3687
|
+
type: AXPWidgetsCatalog.color,
|
|
3688
|
+
},
|
|
3689
|
+
},
|
|
3690
|
+
visible: true,
|
|
3691
|
+
};
|
|
3692
|
+
|
|
3693
|
+
const AXP_CONTENT_PROPERTY = createStringProperty({
|
|
3694
|
+
name: 'content',
|
|
3695
|
+
title: 'Content',
|
|
3696
|
+
path: 'options.content',
|
|
3697
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3698
|
+
});
|
|
3699
|
+
const AXP_PLACEHOLDER_PROPERTY = createStringProperty({
|
|
3700
|
+
name: 'placeholder',
|
|
3701
|
+
title: 'Placeholder',
|
|
3702
|
+
path: 'options.placeholder',
|
|
3703
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3704
|
+
});
|
|
3705
|
+
const AXP_DATA_PATH_PROPERTY = createStringProperty({
|
|
3706
|
+
name: 'path',
|
|
3707
|
+
title: 'Data Path',
|
|
3708
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3709
|
+
});
|
|
3710
|
+
const AXP_DISABLED_PROPERTY = createBooleanProperty({
|
|
3711
|
+
name: 'disabled',
|
|
3712
|
+
title: 'Disabled',
|
|
3713
|
+
path: 'options.disabled',
|
|
3714
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3715
|
+
});
|
|
3716
|
+
const AXP_READONLY_PROPERTY = createBooleanProperty({
|
|
3717
|
+
name: 'readonly',
|
|
3718
|
+
title: 'Readonly',
|
|
3719
|
+
path: 'options.readonly',
|
|
3720
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3721
|
+
});
|
|
3722
|
+
const AXP_ALLOW_MULTIPLE_PROPERTY = createBooleanProperty({
|
|
3723
|
+
name: 'multiple',
|
|
3724
|
+
title: 'Multiple',
|
|
3725
|
+
path: 'options.multiple',
|
|
3726
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3727
|
+
});
|
|
3728
|
+
const AXP_ALLOW_CLEAR_PROPERTY = createBooleanProperty({
|
|
3729
|
+
name: 'allowClear',
|
|
3730
|
+
title: 'Allow Clear',
|
|
3731
|
+
path: 'options.allowClear',
|
|
3732
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3733
|
+
});
|
|
3734
|
+
const AXP_HAS_LABEL_PROPERTY = createBooleanProperty({
|
|
3735
|
+
name: 'hasLabel',
|
|
3736
|
+
title: 'Label',
|
|
3737
|
+
path: 'options.hasLabel',
|
|
3738
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3739
|
+
defaultValue: true,
|
|
3740
|
+
});
|
|
3741
|
+
const AXP_HAS_ICON_PROPERTY = createBooleanProperty({
|
|
3742
|
+
name: 'hasIcon',
|
|
3743
|
+
title: 'Icon',
|
|
3744
|
+
path: 'options.hasIcon',
|
|
3745
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3746
|
+
defaultValue: true,
|
|
3747
|
+
});
|
|
3748
|
+
const AXP_ICON_PROPERTY = createStringProperty({
|
|
3749
|
+
name: 'icon',
|
|
3750
|
+
title: 'Icon Name',
|
|
3751
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3752
|
+
path: 'options.icon',
|
|
3753
|
+
});
|
|
3754
|
+
const AXP_IS_LOADING_PROPERTY = createBooleanProperty({
|
|
3755
|
+
name: 'loading',
|
|
3756
|
+
title: 'Is Loading',
|
|
3757
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3758
|
+
path: 'options.loading',
|
|
3759
|
+
});
|
|
3760
|
+
const AXP_HAS_CLEAR_BUTTON_PROPERTY = createBooleanProperty({
|
|
3761
|
+
name: 'hasClearButton',
|
|
3762
|
+
title: 'Clear Button',
|
|
3763
|
+
path: 'options.hasClearButton',
|
|
3764
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3765
|
+
defaultValue: false,
|
|
3766
|
+
});
|
|
3767
|
+
const AXP_ALLOW_SEARCH_PROPERTY = createBooleanProperty({
|
|
3768
|
+
name: 'allowSearch',
|
|
3769
|
+
title: 'Allow Search',
|
|
3770
|
+
path: 'options.allowSearch',
|
|
3771
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3772
|
+
defaultValue: false,
|
|
3773
|
+
});
|
|
3774
|
+
const AXP_HAS_COPY_ICON_PROPERTY = createBooleanProperty({
|
|
3775
|
+
name: 'hasCopyIcon',
|
|
3776
|
+
title: 'Copy Icon',
|
|
3777
|
+
path: 'options.hasCopyIcon',
|
|
3778
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3779
|
+
defaultValue: true,
|
|
3780
|
+
});
|
|
3781
|
+
const AXP_HAS_EYE_ICON_PROPERTY = createBooleanProperty({
|
|
3782
|
+
name: 'hasEyeIcon',
|
|
3783
|
+
title: 'Eye Icon',
|
|
3784
|
+
path: 'options.hasEyeIcon',
|
|
3785
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3786
|
+
defaultValue: true,
|
|
3787
|
+
});
|
|
3788
|
+
const AXP_DOWNLOADABLE_PROPERTY = createBooleanProperty({
|
|
3789
|
+
name: 'downloadable',
|
|
3790
|
+
title: 'Downloadable',
|
|
3791
|
+
path: 'options.downloadable',
|
|
3792
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3793
|
+
defaultValue: true,
|
|
3794
|
+
});
|
|
3795
|
+
// Converted with createStringProperty
|
|
3796
|
+
const AXP_TRULY_TEXT_PROPERTY = createStringProperty({
|
|
3797
|
+
name: 'trulyText',
|
|
3798
|
+
title: 'Truly Text',
|
|
3799
|
+
path: 'options.trulyText',
|
|
3800
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3801
|
+
});
|
|
3802
|
+
const AXP_FALSY_TEXT_PROPERTY = createStringProperty({
|
|
3803
|
+
name: 'falsyText',
|
|
3804
|
+
title: 'Falsy Text',
|
|
3805
|
+
path: 'options.falsyText',
|
|
3806
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3807
|
+
});
|
|
3808
|
+
const AXP_TEXT_PROPERTY = createStringProperty({
|
|
3809
|
+
name: 'text',
|
|
3810
|
+
title: 'Text',
|
|
3811
|
+
path: 'options.text',
|
|
3812
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3813
|
+
});
|
|
3814
|
+
const AXP_TITLE_PROPERTY = createStringProperty({
|
|
3815
|
+
name: 'title',
|
|
3816
|
+
title: 'Title',
|
|
3817
|
+
path: 'options.title',
|
|
3818
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3819
|
+
});
|
|
3820
|
+
const AXP_LABEL_PROPERTY = createStringProperty({
|
|
3821
|
+
name: 'label',
|
|
3822
|
+
title: 'Label',
|
|
3823
|
+
path: 'options.label',
|
|
3824
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3825
|
+
defaultValue: '',
|
|
3826
|
+
});
|
|
3827
|
+
const AXP_VALUE_FIELD_PROPERTY = createStringProperty({
|
|
3828
|
+
name: 'valueField',
|
|
3829
|
+
title: 'Value Field',
|
|
3830
|
+
path: 'options.valueField',
|
|
3831
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3832
|
+
defaultValue: 'id',
|
|
3833
|
+
});
|
|
3834
|
+
const AXP_TEXT_FIELD_PROPERTY = createStringProperty({
|
|
3835
|
+
name: 'textField',
|
|
3836
|
+
title: 'Text Field',
|
|
3837
|
+
path: 'options.textField',
|
|
3838
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3839
|
+
defaultValue: 'title',
|
|
3840
|
+
});
|
|
3841
|
+
const AXP_DESCRIPTION_PROPERTY = createStringProperty({
|
|
3842
|
+
name: 'description',
|
|
3843
|
+
title: 'Description',
|
|
3844
|
+
path: 'options.description',
|
|
3845
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3846
|
+
});
|
|
3847
|
+
const AXP_STYLE_COLOR_PROPERTY = createSelectProperty({
|
|
3848
|
+
name: 'color',
|
|
3849
|
+
title: 'Color',
|
|
3850
|
+
dataSource: AX_STYLE_COLOR_TYPES,
|
|
3851
|
+
defaultValue: 'primary',
|
|
3852
|
+
path: 'options.color',
|
|
3853
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3854
|
+
});
|
|
3855
|
+
const AXP_STYLE_LOOK_PROPERTY = createSelectProperty({
|
|
3856
|
+
name: 'look',
|
|
3857
|
+
title: 'Look',
|
|
3858
|
+
dataSource: AX_STYLE_LOOK_TYPES,
|
|
3859
|
+
defaultValue: 'solid',
|
|
3860
|
+
path: 'options.look',
|
|
3861
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3862
|
+
});
|
|
3863
|
+
const AXP_TEXT_ALIGN_PROPERTY = createSelectProperty({
|
|
3864
|
+
name: 'textAlign',
|
|
3865
|
+
title: 'Text Align',
|
|
3866
|
+
path: 'options.textAlign',
|
|
3867
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3868
|
+
defaultValue: { id: 'left', title: 'Left' },
|
|
3869
|
+
dataSource: [
|
|
3870
|
+
{ id: 'left', title: 'Left' },
|
|
3871
|
+
{ id: 'center', title: 'Center' },
|
|
3872
|
+
{ id: 'right', title: 'Right' },
|
|
3873
|
+
{ id: 'justify', title: 'Justify' },
|
|
3874
|
+
],
|
|
3875
|
+
});
|
|
3876
|
+
const AXP_VERTICAL_ALIGN_PROPERTY = createSelectProperty({
|
|
3877
|
+
name: 'verticalAlign',
|
|
3878
|
+
title: 'Vertical Align',
|
|
3879
|
+
path: 'options.verticalAlign',
|
|
3880
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
3881
|
+
defaultValue: { id: 'top', title: 'Top' },
|
|
3882
|
+
dataSource: [
|
|
3883
|
+
{ id: 'top', title: 'Top' },
|
|
3884
|
+
{ id: 'middle', title: 'Middle' },
|
|
3885
|
+
{ id: 'bottom', title: 'Bottom' },
|
|
3886
|
+
{ id: 'baseline', title: 'Baseline' },
|
|
3887
|
+
],
|
|
3888
|
+
});
|
|
3889
|
+
const AXP_DATE_FORMAT_PROPERTY = createSelectProperty({
|
|
3890
|
+
name: 'format',
|
|
3891
|
+
title: 'Format',
|
|
3892
|
+
dataSource: [
|
|
3893
|
+
{ id: 'date', title: 'Date' },
|
|
3894
|
+
{ id: 'datetime', title: 'DateTime' },
|
|
3895
|
+
{ id: 'time', title: 'Time' },
|
|
3896
|
+
],
|
|
3897
|
+
defaultValue: { id: 'date', title: 'Date' },
|
|
3898
|
+
path: 'options.format',
|
|
3899
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3900
|
+
});
|
|
3901
|
+
const AXP_DATE_DEPTH_PROPERTY = createSelectProperty({
|
|
3902
|
+
name: 'depth',
|
|
3903
|
+
title: 'Input Depth',
|
|
3904
|
+
dataSource: [
|
|
3905
|
+
{ id: 'year', title: 'Year' },
|
|
3906
|
+
{ id: 'month', title: 'Month' },
|
|
3907
|
+
{ id: 'day', title: 'Day' },
|
|
3908
|
+
],
|
|
3909
|
+
path: 'options.depth',
|
|
3910
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3911
|
+
defaultValue: { id: 'day', title: 'Day' },
|
|
3912
|
+
});
|
|
3913
|
+
/** Max span in days between from/to when filter operation is `between`. */
|
|
3914
|
+
const AXP_DATE_RANGE_LIMIT_PROPERTY = createNumberProperty({
|
|
3915
|
+
name: 'limit',
|
|
3916
|
+
title: 'Range Limit (Days)',
|
|
3917
|
+
path: 'options.limit',
|
|
3918
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
3919
|
+
});
|
|
3920
|
+
function booleanDefaultProperty(defaultValue = false) {
|
|
3921
|
+
return {
|
|
3922
|
+
name: 'defaultValue',
|
|
3923
|
+
title: 'Default Value',
|
|
3924
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3925
|
+
schema: {
|
|
3926
|
+
dataType: 'boolean',
|
|
3927
|
+
defaultValue: defaultValue,
|
|
3928
|
+
interface: {
|
|
3929
|
+
name: 'defaultValue',
|
|
3930
|
+
path: 'defaultValue',
|
|
3931
|
+
type: AXPWidgetsCatalog.toggle,
|
|
3932
|
+
},
|
|
3933
|
+
},
|
|
3934
|
+
visible: true,
|
|
3935
|
+
};
|
|
3936
|
+
}
|
|
3937
|
+
function plainTextDefaultProperty() {
|
|
3938
|
+
return {
|
|
3939
|
+
name: 'defaultValue',
|
|
3940
|
+
title: 'Default Value',
|
|
3941
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3942
|
+
schema: {
|
|
3943
|
+
dataType: 'string',
|
|
3944
|
+
interface: {
|
|
3945
|
+
name: 'defaultValue',
|
|
3946
|
+
path: 'defaultValue',
|
|
3947
|
+
type: AXPWidgetsCatalog.text,
|
|
3948
|
+
options: {
|
|
3949
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-plain-text',
|
|
3950
|
+
},
|
|
3951
|
+
},
|
|
3952
|
+
},
|
|
3953
|
+
visible: true,
|
|
3954
|
+
};
|
|
3955
|
+
}
|
|
3956
|
+
function largeTextDefaultProperty() {
|
|
3957
|
+
return {
|
|
3958
|
+
name: 'defaultValue',
|
|
3959
|
+
title: 'Default Value',
|
|
3960
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3961
|
+
schema: {
|
|
3962
|
+
dataType: 'string',
|
|
3963
|
+
interface: {
|
|
3964
|
+
name: 'defaultValue',
|
|
3965
|
+
path: 'defaultValue',
|
|
3966
|
+
type: AXPWidgetsCatalog.largeText,
|
|
3967
|
+
options: {
|
|
3968
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-large-text',
|
|
3969
|
+
},
|
|
3970
|
+
},
|
|
3971
|
+
},
|
|
3972
|
+
visible: true,
|
|
3973
|
+
};
|
|
3974
|
+
}
|
|
3975
|
+
function richTextDefaultProperty() {
|
|
3976
|
+
return {
|
|
3977
|
+
name: 'defaultValue',
|
|
3978
|
+
title: 'Default Value',
|
|
3979
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
3980
|
+
schema: {
|
|
3981
|
+
dataType: 'string',
|
|
3982
|
+
interface: {
|
|
3983
|
+
name: 'defaultValue',
|
|
3984
|
+
path: 'defaultValue',
|
|
3985
|
+
type: AXPWidgetsCatalog.richText,
|
|
3986
|
+
options: {
|
|
3987
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-rich-text',
|
|
3988
|
+
},
|
|
3989
|
+
},
|
|
3990
|
+
},
|
|
3991
|
+
visible: true,
|
|
3992
|
+
};
|
|
3993
|
+
}
|
|
3994
|
+
/**
|
|
3995
|
+
* Default value editor for select-editor: uses `context.options(key)` so the default picker reads
|
|
3996
|
+
* the **host** widget's options from the shared context (not the nested property field's `widget`).
|
|
3997
|
+
*/
|
|
3998
|
+
function selectEditorDefaultValueProperty() {
|
|
3999
|
+
return {
|
|
4000
|
+
name: 'defaultValue',
|
|
4001
|
+
title: 'Default Value',
|
|
4002
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
4003
|
+
schema: {
|
|
4004
|
+
dataType: 'object',
|
|
4005
|
+
interface: {
|
|
4006
|
+
name: 'defaultValue',
|
|
4007
|
+
path: 'defaultValue',
|
|
4008
|
+
type: AXPWidgetsCatalog.select,
|
|
4009
|
+
options: {
|
|
4010
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-select',
|
|
4011
|
+
dataSource: '{{ context.options("dataSource") }}',
|
|
4012
|
+
valueField: '{{ context.options("valueField") }}',
|
|
4013
|
+
textField: '{{ context.options("textField") }}',
|
|
4014
|
+
multiple: '{{ context.options("multiple") }}',
|
|
4015
|
+
hasClearButton: true,
|
|
4016
|
+
},
|
|
4017
|
+
},
|
|
4018
|
+
},
|
|
4019
|
+
visible: true,
|
|
4020
|
+
};
|
|
4021
|
+
}
|
|
4022
|
+
/**
|
|
4023
|
+
* Default value editor for selection-list-editor: uses the select widget in the designer so picking
|
|
4024
|
+
* a default matches select UX while still binding to the host's dataSource / fields via `context.options`.
|
|
4025
|
+
*/
|
|
4026
|
+
function selectionListEditorDefaultValueProperty() {
|
|
4027
|
+
return {
|
|
4028
|
+
name: 'defaultValue',
|
|
4029
|
+
title: 'Default Value',
|
|
4030
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
4031
|
+
schema: {
|
|
4032
|
+
dataType: 'object',
|
|
4033
|
+
interface: {
|
|
4034
|
+
name: 'defaultValue',
|
|
4035
|
+
path: 'defaultValue',
|
|
4036
|
+
type: AXPWidgetsCatalog.select,
|
|
4037
|
+
options: {
|
|
4038
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-select',
|
|
4039
|
+
dataSource: '{{ context.options("dataSource") }}',
|
|
4040
|
+
valueField: '{{ context.options("valueField") }}',
|
|
4041
|
+
textField: '{{ context.options("textField") }}',
|
|
4042
|
+
multiple: '{{ context.options("multiple") }}',
|
|
4043
|
+
hasClearButton: true,
|
|
4044
|
+
},
|
|
4045
|
+
},
|
|
4046
|
+
},
|
|
4047
|
+
visible: true,
|
|
4048
|
+
};
|
|
4049
|
+
}
|
|
4050
|
+
function numberDefaultProperty() {
|
|
4051
|
+
return {
|
|
4052
|
+
name: 'defaultValue',
|
|
4053
|
+
title: 'Default Value',
|
|
4054
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
4055
|
+
schema: {
|
|
4056
|
+
dataType: 'number',
|
|
4057
|
+
interface: {
|
|
4058
|
+
name: 'defaultValue',
|
|
4059
|
+
path: 'defaultValue',
|
|
4060
|
+
type: AXPWidgetsCatalog.number,
|
|
4061
|
+
options: {
|
|
4062
|
+
placeholder: '@layout-designer:property-editor.placeholders.default-value-number',
|
|
4063
|
+
},
|
|
4064
|
+
},
|
|
4065
|
+
},
|
|
4066
|
+
visible: true,
|
|
4067
|
+
};
|
|
4068
|
+
}
|
|
4069
|
+
function numberMinValueProperty(value) {
|
|
4070
|
+
return {
|
|
4071
|
+
name: 'minValue',
|
|
4072
|
+
title: 'Min Value',
|
|
4073
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4074
|
+
order: 9,
|
|
4075
|
+
schema: {
|
|
4076
|
+
dataType: 'number',
|
|
4077
|
+
defaultValue: value,
|
|
4078
|
+
interface: {
|
|
4079
|
+
name: 'minValue',
|
|
4080
|
+
path: 'options.minValue',
|
|
4081
|
+
type: AXPWidgetsCatalog.number,
|
|
4082
|
+
options: {
|
|
4083
|
+
placeholder: '@layout-designer:property-editor.placeholders.number-min-value',
|
|
4084
|
+
},
|
|
4085
|
+
},
|
|
4086
|
+
},
|
|
4087
|
+
visible: true,
|
|
4088
|
+
};
|
|
4089
|
+
}
|
|
4090
|
+
function numberMaxValueProperty(value) {
|
|
4091
|
+
return {
|
|
4092
|
+
name: 'maxValue',
|
|
4093
|
+
title: 'Max Value',
|
|
4094
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4095
|
+
order: 10,
|
|
4096
|
+
schema: {
|
|
4097
|
+
dataType: 'number',
|
|
4098
|
+
defaultValue: value,
|
|
4099
|
+
interface: {
|
|
4100
|
+
name: 'maxValue',
|
|
4101
|
+
path: 'options.maxValue',
|
|
4102
|
+
type: AXPWidgetsCatalog.number,
|
|
4103
|
+
options: {
|
|
4104
|
+
placeholder: '@layout-designer:property-editor.placeholders.number-max-value',
|
|
4105
|
+
},
|
|
4106
|
+
},
|
|
4107
|
+
},
|
|
4108
|
+
visible: true,
|
|
4109
|
+
};
|
|
4110
|
+
}
|
|
4111
|
+
const AXP_MULTI_LANGUAGE_PROPERTY = createBooleanProperty({
|
|
4112
|
+
name: 'multiLanguage',
|
|
4113
|
+
title: 'Multi Language',
|
|
4114
|
+
path: 'options.multiLanguage',
|
|
4115
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4116
|
+
defaultValue: false,
|
|
4117
|
+
});
|
|
4118
|
+
const AXP_SPIN_BUTTON_PROPERTY = createBooleanProperty({
|
|
4119
|
+
name: 'spinButton',
|
|
4120
|
+
title: 'Spin Button',
|
|
4121
|
+
path: 'options.spinButton',
|
|
4122
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4123
|
+
});
|
|
4124
|
+
const AXP_NUMBER_SEPARATOR_PROPERTY = createStringProperty({
|
|
4125
|
+
name: 'seprator',
|
|
4126
|
+
title: 'Thousands Separator',
|
|
4127
|
+
path: 'options.seprator',
|
|
4128
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4129
|
+
});
|
|
4130
|
+
const AXP_DEFAULT_ROW_COUNT_PROPERTY = createNumberProperty({
|
|
4131
|
+
name: 'defaultRowCount',
|
|
4132
|
+
title: 'Default Row Count',
|
|
4133
|
+
path: 'options.defaultRowCount',
|
|
4134
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4135
|
+
});
|
|
4136
|
+
const AXP_MIN_LINE_COUNT_PROPERTY = createNumberProperty({
|
|
4137
|
+
name: 'minLineCount',
|
|
4138
|
+
title: 'Min Line Count',
|
|
4139
|
+
path: 'options.minLineCount',
|
|
4140
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4141
|
+
});
|
|
4142
|
+
const AXP_MAX_LINE_COUNT_PROPERTY = createNumberProperty({
|
|
4143
|
+
name: 'maxLineCount',
|
|
4144
|
+
title: 'Max Line Count',
|
|
4145
|
+
path: 'options.maxLineCount',
|
|
4146
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4147
|
+
});
|
|
4148
|
+
const AXP_FIT_LINE_COUNT_PROPERTY = createBooleanProperty({
|
|
4149
|
+
name: 'fitLineCount',
|
|
4150
|
+
title: 'Fit Line Count',
|
|
4151
|
+
path: 'options.fitLineCount',
|
|
4152
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4153
|
+
});
|
|
4154
|
+
const AXP_SHOW_PASSWORD_PROPERTY = createBooleanProperty({
|
|
4155
|
+
name: 'showPassword',
|
|
4156
|
+
title: 'Show Password',
|
|
4157
|
+
path: 'options.showPassword',
|
|
4158
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4159
|
+
});
|
|
4160
|
+
const AXP_TRIGGERS_PROPERTY = {
|
|
4161
|
+
name: 'triggers',
|
|
4162
|
+
title: 'Triggers',
|
|
4163
|
+
group: AXP_TRIGGERS_PROPERTY_GROUP,
|
|
4164
|
+
showLabel: false,
|
|
4165
|
+
schema: {
|
|
4166
|
+
dataType: 'object',
|
|
4167
|
+
interface: {
|
|
4168
|
+
name: 'triggers',
|
|
4169
|
+
path: 'triggers',
|
|
4170
|
+
type: 'triggers-editor',
|
|
4171
|
+
},
|
|
4172
|
+
},
|
|
4173
|
+
visible: true,
|
|
4174
|
+
};
|
|
4175
|
+
|
|
4176
|
+
const AXP_LAYOUT_GRID_PROPERTY_GROUP = {
|
|
4177
|
+
name: 'grid',
|
|
4178
|
+
order: 1,
|
|
4179
|
+
title: 'Grid Layout',
|
|
4180
|
+
};
|
|
4181
|
+
const AXP_LAYOUT_FLEX_PROPERTY_GROUP = {
|
|
4182
|
+
name: 'flex',
|
|
4183
|
+
order: 1,
|
|
4184
|
+
title: 'Flex Layout',
|
|
4185
|
+
};
|
|
4186
|
+
const AXP_BOX_MODEL_PROPERTY_GROUP = {
|
|
4187
|
+
name: 'box',
|
|
4188
|
+
order: 1,
|
|
4189
|
+
title: 'Box Model',
|
|
4190
|
+
};
|
|
4191
|
+
const AXP_LAYOUT_TABLE_PROPERTY_GROUP = {
|
|
4192
|
+
name: 'table',
|
|
4193
|
+
order: 1,
|
|
4194
|
+
title: 'Table Layout',
|
|
4195
|
+
};
|
|
4196
|
+
const AXP_LAYOUT_GAP_PROPERTY = {
|
|
4197
|
+
name: 'gap',
|
|
4198
|
+
title: 'Gap',
|
|
4199
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4200
|
+
schema: {
|
|
4201
|
+
dataType: 'number',
|
|
4202
|
+
defaultValue: 2,
|
|
4203
|
+
interface: {
|
|
4204
|
+
name: 'gap',
|
|
4205
|
+
path: 'options.gap',
|
|
4206
|
+
type: AXPWidgetsCatalog.number,
|
|
4207
|
+
options: {
|
|
4208
|
+
minValue: 0,
|
|
4209
|
+
maxValue: 12,
|
|
4210
|
+
},
|
|
4211
|
+
},
|
|
4212
|
+
},
|
|
4213
|
+
visible: true,
|
|
4214
|
+
};
|
|
4215
|
+
const AXP_LAYOUT_COLUMNS_PROPERTY = {
|
|
4216
|
+
name: 'cols',
|
|
4217
|
+
title: 'Columns',
|
|
4218
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4219
|
+
schema: {
|
|
4220
|
+
dataType: 'number',
|
|
4221
|
+
defaultValue: 1,
|
|
4222
|
+
interface: {
|
|
4223
|
+
name: 'cols',
|
|
4224
|
+
path: 'options.cols',
|
|
4225
|
+
type: AXPWidgetsCatalog.number,
|
|
4226
|
+
options: {
|
|
4227
|
+
minValue: 1,
|
|
4228
|
+
maxValue: 12,
|
|
4229
|
+
},
|
|
4230
|
+
},
|
|
4231
|
+
},
|
|
4232
|
+
visible: true,
|
|
4233
|
+
};
|
|
4234
|
+
const AXP_LAYOUT_ROWS_PROPERTY = {
|
|
4235
|
+
name: 'rows',
|
|
4236
|
+
title: 'Rows',
|
|
4237
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4238
|
+
schema: {
|
|
4239
|
+
dataType: 'number',
|
|
4240
|
+
defaultValue: 1,
|
|
4241
|
+
interface: {
|
|
4242
|
+
name: 'rows',
|
|
4243
|
+
path: 'options.rows',
|
|
4244
|
+
type: AXPWidgetsCatalog.number,
|
|
4245
|
+
options: {
|
|
4246
|
+
minValue: 1,
|
|
4247
|
+
maxValue: 100,
|
|
4248
|
+
},
|
|
4249
|
+
},
|
|
4250
|
+
},
|
|
4251
|
+
visible: true,
|
|
4252
|
+
};
|
|
4253
|
+
const AXP_LAYOUT_GRID_PROPERTIES = [
|
|
4254
|
+
AXP_LAYOUT_GAP_PROPERTY,
|
|
4255
|
+
AXP_LAYOUT_COLUMNS_PROPERTY,
|
|
4256
|
+
AXP_LAYOUT_ROWS_PROPERTY,
|
|
4257
|
+
];
|
|
4258
|
+
const AXP_LAYOUT_GRID_ROW_PROPERTIES = [
|
|
4259
|
+
AXP_LAYOUT_GAP_PROPERTY,
|
|
4260
|
+
cloneProperty(AXP_LAYOUT_COLUMNS_PROPERTY, { schema: { defaultValue: 12 } }),
|
|
4261
|
+
];
|
|
4262
|
+
const AXP_LAYOUT_GRID_ITEM_PROPERTY = {
|
|
4263
|
+
name: 'gridItem',
|
|
4264
|
+
title: 'Grid Item',
|
|
4265
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4266
|
+
schema: {
|
|
4267
|
+
dataType: 'object',
|
|
4268
|
+
interface: {
|
|
4269
|
+
name: 'gridItem',
|
|
4270
|
+
path: 'options',
|
|
4271
|
+
type: AXPWidgetsCatalog.gridItemOptions,
|
|
4272
|
+
options: {},
|
|
4273
|
+
},
|
|
4274
|
+
},
|
|
4275
|
+
visible: true,
|
|
4276
|
+
};
|
|
4277
|
+
const AXP_LAYOUT_SPACING_PROPERTY = {
|
|
4278
|
+
name: 'spacing',
|
|
4279
|
+
title: 'Spacing',
|
|
4280
|
+
group: AXP_BOX_MODEL_PROPERTY_GROUP,
|
|
4281
|
+
schema: {
|
|
4282
|
+
dataType: 'object',
|
|
4283
|
+
interface: {
|
|
4284
|
+
name: 'spacing',
|
|
4285
|
+
path: 'options.spacing',
|
|
4286
|
+
type: AXPWidgetsCatalog.spacing,
|
|
4287
|
+
options: {},
|
|
4288
|
+
},
|
|
4289
|
+
},
|
|
4290
|
+
visible: true,
|
|
4291
|
+
};
|
|
4292
|
+
const AXP_LAYOUT_BORDER_PROPERTY = {
|
|
4293
|
+
name: 'border',
|
|
4294
|
+
title: 'Border',
|
|
4295
|
+
group: AXP_BOX_MODEL_PROPERTY_GROUP,
|
|
4296
|
+
schema: {
|
|
4297
|
+
dataType: 'object',
|
|
4298
|
+
interface: {
|
|
4299
|
+
name: 'border',
|
|
4300
|
+
path: 'options.border',
|
|
4301
|
+
type: AXPWidgetsCatalog.border,
|
|
4302
|
+
options: {},
|
|
4303
|
+
},
|
|
4304
|
+
},
|
|
4305
|
+
visible: true,
|
|
4306
|
+
};
|
|
4307
|
+
const AXP_LAYOUT_FLEX_PROPERTY = {
|
|
4308
|
+
name: 'flex',
|
|
4309
|
+
title: 'Flex',
|
|
4310
|
+
group: AXP_LAYOUT_FLEX_PROPERTY_GROUP,
|
|
4311
|
+
schema: {
|
|
4312
|
+
dataType: 'object',
|
|
4313
|
+
interface: {
|
|
4314
|
+
name: 'flex',
|
|
4315
|
+
path: 'options',
|
|
4316
|
+
type: AXPWidgetsCatalog.flexOptions,
|
|
4317
|
+
options: {},
|
|
4318
|
+
},
|
|
4319
|
+
},
|
|
4320
|
+
visible: true,
|
|
4321
|
+
};
|
|
4322
|
+
const AXP_LAYOUT_FLEX_ITEM_PROPERTY = {
|
|
4323
|
+
name: 'flexItem',
|
|
4324
|
+
title: 'Flex Item',
|
|
4325
|
+
group: AXP_LAYOUT_FLEX_PROPERTY_GROUP,
|
|
4326
|
+
schema: {
|
|
4327
|
+
dataType: 'object',
|
|
4328
|
+
interface: {
|
|
4329
|
+
name: 'flexItem',
|
|
4330
|
+
path: 'options',
|
|
4331
|
+
type: AXPWidgetsCatalog.flexItemOptions,
|
|
4332
|
+
options: {},
|
|
4333
|
+
},
|
|
4334
|
+
},
|
|
4335
|
+
visible: true,
|
|
4336
|
+
};
|
|
4337
|
+
const AXP_LAYOUT_GRID_PROPERTY = {
|
|
4338
|
+
name: 'grid',
|
|
4339
|
+
title: 'Grid',
|
|
4340
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4341
|
+
schema: {
|
|
4342
|
+
dataType: 'object',
|
|
4343
|
+
interface: {
|
|
4344
|
+
name: 'grid',
|
|
4345
|
+
path: 'options.grid',
|
|
4346
|
+
type: AXPWidgetsCatalog.gridOptions,
|
|
4347
|
+
options: {},
|
|
4348
|
+
},
|
|
4349
|
+
},
|
|
4350
|
+
visible: true,
|
|
4351
|
+
};
|
|
4352
|
+
const AXP_TABLE_COLUMNS_PROPERTY = {
|
|
4353
|
+
name: 'columns',
|
|
4354
|
+
title: 'Columns',
|
|
4355
|
+
group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
|
|
4356
|
+
schema: {
|
|
4357
|
+
dataType: 'number',
|
|
4358
|
+
defaultValue: 3,
|
|
4359
|
+
interface: {
|
|
4360
|
+
name: 'columns',
|
|
4361
|
+
path: 'options.columns',
|
|
4362
|
+
type: AXPWidgetsCatalog.number,
|
|
4363
|
+
options: {
|
|
4364
|
+
minValue: 1,
|
|
4365
|
+
maxValue: 12,
|
|
4366
|
+
},
|
|
4367
|
+
},
|
|
4368
|
+
},
|
|
4369
|
+
visible: true,
|
|
4370
|
+
};
|
|
4371
|
+
// Removed rowHeight/rows from table properties
|
|
4372
|
+
const AXP_TABLE_ITEM_COLSPAN_PROPERTY = {
|
|
4373
|
+
name: 'colSpan',
|
|
4374
|
+
title: 'Column Span',
|
|
4375
|
+
group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
|
|
4376
|
+
schema: {
|
|
4377
|
+
dataType: 'number',
|
|
4378
|
+
defaultValue: 1,
|
|
4379
|
+
interface: {
|
|
4380
|
+
name: 'colSpan',
|
|
4381
|
+
path: 'options.colSpan',
|
|
4382
|
+
type: AXPWidgetsCatalog.number,
|
|
4383
|
+
options: {
|
|
4384
|
+
minValue: 1,
|
|
4385
|
+
maxValue: 24,
|
|
4386
|
+
},
|
|
4387
|
+
},
|
|
4388
|
+
},
|
|
4389
|
+
visible: true,
|
|
4390
|
+
};
|
|
4391
|
+
const AXP_TABLE_ITEM_ROWSPAN_PROPERTY = {
|
|
4392
|
+
name: 'rowSpan',
|
|
4393
|
+
title: 'Row Span',
|
|
4394
|
+
group: AXP_LAYOUT_TABLE_PROPERTY_GROUP,
|
|
4395
|
+
schema: {
|
|
4396
|
+
dataType: 'number',
|
|
4397
|
+
defaultValue: 1,
|
|
4398
|
+
interface: {
|
|
4399
|
+
name: 'rowSpan',
|
|
4400
|
+
path: 'options.rowSpan',
|
|
4401
|
+
type: AXPWidgetsCatalog.number,
|
|
4402
|
+
options: {
|
|
4403
|
+
minValue: 1,
|
|
4404
|
+
maxValue: 100,
|
|
4405
|
+
},
|
|
4406
|
+
},
|
|
4407
|
+
},
|
|
4408
|
+
visible: true,
|
|
4409
|
+
};
|
|
4410
|
+
// Removed header/footer/sticky related table properties
|
|
4411
|
+
const AXP_LAYOUT_ADVANCED_GRID_PROPERTY = {
|
|
4412
|
+
name: 'advancedGrid',
|
|
4413
|
+
title: 'Advanced Grid',
|
|
4414
|
+
group: AXP_LAYOUT_GRID_PROPERTY_GROUP,
|
|
4415
|
+
schema: {
|
|
4416
|
+
dataType: 'object',
|
|
4417
|
+
interface: {
|
|
4418
|
+
name: 'advancedGrid',
|
|
4419
|
+
path: 'options.advancedGrid',
|
|
4420
|
+
type: AXPWidgetsCatalog.advancedGridOptions,
|
|
4421
|
+
options: {},
|
|
4422
|
+
},
|
|
4423
|
+
},
|
|
4424
|
+
visible: true,
|
|
4425
|
+
};
|
|
4426
|
+
const AXP_LAYOUT_SHOW_HEADER_PROPERTY = createBooleanProperty({
|
|
4427
|
+
name: 'showHeader',
|
|
4428
|
+
title: 'Show Header',
|
|
4429
|
+
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
4430
|
+
path: 'options.showHeader',
|
|
4431
|
+
defaultValue: true,
|
|
4432
|
+
});
|
|
4433
|
+
const AXP_LAYOUT_DIRECTION_PROPERTY = {
|
|
4434
|
+
name: 'direction',
|
|
4435
|
+
title: 'Direction',
|
|
4436
|
+
group: AXP_BOX_MODEL_PROPERTY_GROUP,
|
|
4437
|
+
order: 99,
|
|
4438
|
+
schema: {
|
|
4439
|
+
dataType: 'string',
|
|
4440
|
+
interface: {
|
|
4441
|
+
name: 'direction',
|
|
4442
|
+
path: 'options.direction',
|
|
4443
|
+
type: AXPWidgetsCatalog.direction,
|
|
4444
|
+
options: {},
|
|
4445
|
+
},
|
|
4446
|
+
},
|
|
4447
|
+
visible: true,
|
|
4448
|
+
};
|
|
4449
|
+
|
|
4450
|
+
const TABLE_COLUMN_ALIGN_DATA_SOURCE = [
|
|
4451
|
+
{ id: 'start', title: 'Start' },
|
|
4452
|
+
{ id: 'center', title: 'Center' },
|
|
4453
|
+
{ id: 'end', title: 'End' },
|
|
4454
|
+
];
|
|
4455
|
+
const AXP_TABLE_COLUMN_HEADER_ALIGN_PROPERTY = {
|
|
4456
|
+
name: 'alignHeader',
|
|
4457
|
+
title: 'Header alignment',
|
|
4458
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
4459
|
+
schema: {
|
|
4460
|
+
dataType: 'string',
|
|
4461
|
+
defaultValue: 'start',
|
|
4462
|
+
interface: {
|
|
4463
|
+
name: 'alignHeader',
|
|
4464
|
+
path: 'options.align.header',
|
|
4465
|
+
type: AXPWidgetsCatalog.select,
|
|
4466
|
+
options: {
|
|
4467
|
+
dataSource: [...TABLE_COLUMN_ALIGN_DATA_SOURCE],
|
|
4468
|
+
},
|
|
4469
|
+
},
|
|
4470
|
+
},
|
|
4471
|
+
visible: true,
|
|
4472
|
+
};
|
|
4473
|
+
const AXP_TABLE_COLUMN_CELL_ALIGN_PROPERTY = {
|
|
4474
|
+
name: 'alignCell',
|
|
4475
|
+
title: 'Cell alignment',
|
|
4476
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
4477
|
+
schema: {
|
|
4478
|
+
dataType: 'string',
|
|
4479
|
+
defaultValue: 'start',
|
|
4480
|
+
interface: {
|
|
4481
|
+
name: 'alignCell',
|
|
4482
|
+
path: 'options.align.cell',
|
|
4483
|
+
type: AXPWidgetsCatalog.select,
|
|
4484
|
+
options: {
|
|
4485
|
+
dataSource: [...TABLE_COLUMN_ALIGN_DATA_SOURCE],
|
|
4486
|
+
},
|
|
4487
|
+
},
|
|
4488
|
+
},
|
|
4489
|
+
visible: true,
|
|
4490
|
+
};
|
|
4491
|
+
/** Optional column designer fields; spread next to `AXP_TABLE_COLUMN_WIDTH_PROPERTY` where needed. */
|
|
4492
|
+
const AXP_TABLE_COLUMN_ALIGNMENT_PROPERTIES = [
|
|
4493
|
+
AXP_TABLE_COLUMN_HEADER_ALIGN_PROPERTY,
|
|
4494
|
+
AXP_TABLE_COLUMN_CELL_ALIGN_PROPERTY,
|
|
4495
|
+
];
|
|
4496
|
+
const AXP_TABLE_COLUMN_WIDTH_PROPERTY = {
|
|
4497
|
+
name: 'width',
|
|
4498
|
+
title: 'Width',
|
|
4499
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
4500
|
+
schema: {
|
|
4501
|
+
dataType: 'string',
|
|
4502
|
+
defaultValue: '300px',
|
|
4503
|
+
interface: {
|
|
4504
|
+
name: 'width',
|
|
4505
|
+
path: 'options.width',
|
|
4506
|
+
type: AXPWidgetsCatalog.text,
|
|
4507
|
+
},
|
|
4508
|
+
},
|
|
4509
|
+
visible: true,
|
|
4510
|
+
};
|
|
4511
|
+
const AXP_TABLE_COLUMN_HEIGHT_PROPERTY = {
|
|
4512
|
+
name: 'height',
|
|
4513
|
+
title: 'Height',
|
|
4514
|
+
group: AXP_STYLING_PROPERTY_GROUP,
|
|
4515
|
+
schema: {
|
|
4516
|
+
dataType: 'string',
|
|
4517
|
+
defaultValue: '300px',
|
|
4518
|
+
interface: {
|
|
4519
|
+
name: 'height',
|
|
4520
|
+
path: 'options.height',
|
|
4521
|
+
type: AXPWidgetsCatalog.text,
|
|
4522
|
+
},
|
|
4523
|
+
},
|
|
4524
|
+
visible: true,
|
|
4525
|
+
};
|
|
4526
|
+
|
|
4527
|
+
const AXP_REQUIRED_VALIDATION_PROPERTY = {
|
|
4528
|
+
name: 'requiredValidation',
|
|
4529
|
+
title: 'Required',
|
|
4530
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4531
|
+
schema: {
|
|
4532
|
+
dataType: 'object',
|
|
4533
|
+
interface: {
|
|
4534
|
+
name: 'requiredValidation',
|
|
4535
|
+
path: 'options.validations.required',
|
|
4536
|
+
type: AXPWidgetsCatalog.requiredValidation,
|
|
4537
|
+
defaultValue: false,
|
|
4538
|
+
},
|
|
4539
|
+
},
|
|
4540
|
+
visible: true,
|
|
4541
|
+
};
|
|
4542
|
+
const AXP_MIN_LENGTH_VALIDATION_PROPERTY = {
|
|
4543
|
+
name: 'minLengthValidation',
|
|
4544
|
+
title: 'Minimum Length',
|
|
4545
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4546
|
+
schema: {
|
|
4547
|
+
dataType: 'object',
|
|
4548
|
+
interface: {
|
|
4549
|
+
name: 'minLengthValidation',
|
|
4550
|
+
path: 'options.validations.minLength',
|
|
4551
|
+
type: AXPWidgetsCatalog.minLengthValidation,
|
|
4552
|
+
defaultValue: null,
|
|
4553
|
+
},
|
|
4554
|
+
},
|
|
4555
|
+
visible: true,
|
|
4556
|
+
};
|
|
4557
|
+
const AXP_MAX_LENGTH_VALIDATION_PROPERTY = {
|
|
4558
|
+
name: 'maxLengthValidation',
|
|
4559
|
+
title: 'Maximum Length',
|
|
4560
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4561
|
+
schema: {
|
|
4562
|
+
dataType: 'object',
|
|
4563
|
+
interface: {
|
|
4564
|
+
name: 'maxLengthValidation',
|
|
4565
|
+
path: 'options.validations.maxLength',
|
|
4566
|
+
type: AXPWidgetsCatalog.maxLengthValidation,
|
|
4567
|
+
defaultValue: null,
|
|
4568
|
+
},
|
|
4569
|
+
},
|
|
4570
|
+
visible: true,
|
|
4571
|
+
};
|
|
4572
|
+
const AXP_REGULAR_EXPRESSION_VALIDATION_PROPERTY = {
|
|
4573
|
+
name: 'regularExpressionValidation',
|
|
4574
|
+
title: 'Regular Expression',
|
|
4575
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4576
|
+
schema: {
|
|
4577
|
+
dataType: 'object',
|
|
4578
|
+
interface: {
|
|
4579
|
+
name: 'regularExpressionValidation',
|
|
4580
|
+
path: 'options.validations.regex',
|
|
4581
|
+
type: AXPWidgetsCatalog.regularExpressionValidation,
|
|
4582
|
+
defaultValue: false,
|
|
4583
|
+
},
|
|
4584
|
+
},
|
|
4585
|
+
visible: true,
|
|
4586
|
+
};
|
|
4587
|
+
const AXP_LESS_THAN_VALIDATION_PROPERTY = {
|
|
4588
|
+
name: 'lessThanValidation',
|
|
4589
|
+
title: 'Less Than',
|
|
4590
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4591
|
+
schema: {
|
|
4592
|
+
dataType: 'object',
|
|
4593
|
+
interface: {
|
|
4594
|
+
name: 'lessThanValidation',
|
|
4595
|
+
path: 'options.validations.lessThan',
|
|
4596
|
+
type: AXPWidgetsCatalog.lessThanValidation,
|
|
4597
|
+
defaultValue: false,
|
|
4598
|
+
},
|
|
4599
|
+
},
|
|
4600
|
+
visible: true,
|
|
4601
|
+
};
|
|
4602
|
+
const AXP_GREATER_THAN_VALIDATION_PROPERTY = {
|
|
4603
|
+
name: 'greaterThanValidation',
|
|
4604
|
+
title: 'Greater Than',
|
|
4605
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4606
|
+
schema: {
|
|
4607
|
+
dataType: 'object',
|
|
4608
|
+
interface: {
|
|
4609
|
+
name: 'greaterThanValidation',
|
|
4610
|
+
path: 'options.validations.greaterThan',
|
|
4611
|
+
type: AXPWidgetsCatalog.greaterThanValidation,
|
|
4612
|
+
defaultValue: false,
|
|
4613
|
+
},
|
|
4614
|
+
},
|
|
4615
|
+
visible: true,
|
|
4616
|
+
};
|
|
4617
|
+
const AXP_BETWEEN_VALIDATION_PROPERTY = {
|
|
4618
|
+
name: 'betweenValidation',
|
|
4619
|
+
title: 'Between',
|
|
4620
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4621
|
+
schema: {
|
|
4622
|
+
dataType: 'object',
|
|
4623
|
+
interface: {
|
|
4624
|
+
name: 'betweenValidation',
|
|
4625
|
+
path: 'options.validations.between',
|
|
4626
|
+
type: AXPWidgetsCatalog.betweenValidation,
|
|
4627
|
+
defaultValue: false,
|
|
4628
|
+
},
|
|
4629
|
+
},
|
|
4630
|
+
visible: true,
|
|
4631
|
+
};
|
|
4632
|
+
const AXP_EQUAL_VALIDATION_PROPERTY = {
|
|
4633
|
+
name: 'equalValidation',
|
|
4634
|
+
title: 'Equal',
|
|
4635
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4636
|
+
schema: {
|
|
4637
|
+
dataType: 'object',
|
|
4638
|
+
interface: {
|
|
4639
|
+
name: 'equalValidation',
|
|
4640
|
+
path: 'options.validations.equal',
|
|
4641
|
+
type: AXPWidgetsCatalog.equalValidation,
|
|
4642
|
+
defaultValue: false,
|
|
4643
|
+
},
|
|
4644
|
+
},
|
|
4645
|
+
visible: true,
|
|
4646
|
+
};
|
|
4647
|
+
const AXP_CALLBACK_VALIDATION_PROPERTY = {
|
|
4648
|
+
name: 'callbackValidation',
|
|
4649
|
+
title: 'Callback',
|
|
4650
|
+
group: AXP_VALIDATION_PROPERTY_GROUP,
|
|
4651
|
+
schema: {
|
|
4652
|
+
dataType: 'object',
|
|
4653
|
+
interface: {
|
|
4654
|
+
name: 'callbackValidation',
|
|
4655
|
+
path: 'options.validations.callback',
|
|
4656
|
+
type: AXPWidgetsCatalog.callbackValidation,
|
|
4657
|
+
defaultValue: false,
|
|
4658
|
+
},
|
|
4659
|
+
},
|
|
4660
|
+
visible: true,
|
|
2941
4661
|
};
|
|
2942
|
-
const AXP_WIDGETS_CATEGORIES = [
|
|
2943
|
-
AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
2944
|
-
AXP_WIDGETS_EDITOR_CATEGORY,
|
|
2945
|
-
AXP_WIDGETS_ACTION_CATEGORY,
|
|
2946
|
-
AXP_WIDGETS_ADVANCE_CATEGORY,
|
|
2947
|
-
];
|
|
2948
|
-
|
|
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 = {}));
|
|
2960
4662
|
|
|
2961
4663
|
/**
|
|
2962
4664
|
* Generated bundle index. Do not edit.
|
|
2963
4665
|
*/
|
|
2964
4666
|
|
|
2965
|
-
export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent,
|
|
4667
|
+
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
4668
|
//# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map
|