@acorex/platform 20.8.12 → 20.8.14
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/{types/acorex-platform-auth.d.ts → auth/index.d.ts} +2 -14
- package/{types/acorex-platform-common.d.ts → common/index.d.ts} +30 -302
- package/{types/acorex-platform-core.d.ts → core/index.d.ts} +44 -188
- package/{types/acorex-platform-domain.d.ts → domain/index.d.ts} +412 -744
- package/fesm2022/acorex-platform-auth.mjs +27 -125
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-Bi1RYif5.mjs → acorex-platform-common-common-settings.provider-DVvuLUfF.mjs} +32 -30
- package/fesm2022/acorex-platform-common-common-settings.provider-DVvuLUfF.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +205 -711
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +127 -420
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +830 -561
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +114 -634
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +877 -3362
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +204 -456
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +10062 -14672
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -413
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +441 -507
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs → acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs → acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs} +76 -21
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs → acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs} +7 -6
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs → acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +3408 -5611
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -8
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +166 -391
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs +1716 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs → acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs} +23 -16
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs → acorex-platform-themes-default-error-401.component-53VB-PS_.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs → acorex-platform-themes-default-error-404.component-DVF9soT5.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +61 -1784
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs → acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs → acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs} +25 -24
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +65 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +64 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +305 -408
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +100 -359
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/{types/acorex-platform-layout-builder.d.ts → layout/builder/index.d.ts} +38 -160
- package/{types/acorex-platform-layout-components.d.ts → layout/components/index.d.ts} +125 -854
- package/{types/acorex-platform-layout-designer.d.ts → layout/designer/index.d.ts} +18 -96
- package/{types/acorex-platform-layout-entity.d.ts → layout/entity/index.d.ts} +65 -848
- package/{types/acorex-platform-layout-views.d.ts → layout/views/index.d.ts} +47 -80
- package/{types/acorex-platform-layout-widget-core.d.ts → layout/widget-core/index.d.ts} +197 -274
- package/{types/acorex-platform-layout-widgets.d.ts → layout/widgets/index.d.ts} +124 -608
- package/{types/acorex-platform-native.d.ts → native/index.d.ts} +7 -0
- package/package.json +36 -36
- package/runtime/index.d.ts +307 -0
- package/{types/acorex-platform-themes-default.d.ts → themes/default/index.d.ts} +4 -113
- package/{types/acorex-platform-themes-shared.d.ts → themes/shared/index.d.ts} +4 -5
- package/{types/acorex-platform-workflow.d.ts → workflow/index.d.ts} +81 -162
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +0 -116
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +0 -94
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +0 -86
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +0 -1
- package/types/acorex-platform-runtime.d.ts +0 -571
- /package/{types/acorex-platform.d.ts → index.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { computed, signal, Injectable, InjectionToken, inject, ElementRef, effect, untracked, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, Output, input, output, ViewContainerRef, Directive, Optional, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import { convertArrayToDataSource, AXDataSource } from '@acorex/cdk/common';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { set, merge, cloneDeep, isNil, get, isEqual, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
|
|
4
|
+
import { setSmart, AXPDataSourceDefinitionProviderService, extractValue, AXPExpressionEvaluatorService, getSmart } from '@acorex/platform/core';
|
|
5
|
+
import { cloneDeep, isEqual, has, get, set, merge, isNil, isUndefined, isObjectLike, sum, isEmpty, isString } from 'lodash-es';
|
|
7
6
|
import { Subject, BehaviorSubject, filter } from 'rxjs';
|
|
7
|
+
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
8
8
|
import * as i1$1 from '@acorex/components/skeleton';
|
|
9
9
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
10
10
|
import * as i2 from '@acorex/core/translation';
|
|
@@ -15,6 +15,123 @@ import { CommonModule } from '@angular/common';
|
|
|
15
15
|
import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
|
|
16
16
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
17
17
|
|
|
18
|
+
class AXPWidgetCoreContextChangeEvent {
|
|
19
|
+
}
|
|
20
|
+
const AXPWidgetCoreContextStore = signalStore(
|
|
21
|
+
// Initial State
|
|
22
|
+
withState(() => ({
|
|
23
|
+
data: {}, // Shared context data
|
|
24
|
+
state: 'initiated', // Current state
|
|
25
|
+
initialSnapshot: {}, // Snapshot of the first initialized state
|
|
26
|
+
previousSnapshot: {}, // Snapshot of the previous state
|
|
27
|
+
lastChange: {
|
|
28
|
+
state: 'initiated',
|
|
29
|
+
}, // Last change event
|
|
30
|
+
})),
|
|
31
|
+
// Computed Signals
|
|
32
|
+
withComputed(({ data, state, lastChange, initialSnapshot, previousSnapshot }) => ({
|
|
33
|
+
isChanged: computed(() => state() === 'changed'),
|
|
34
|
+
isReset: computed(() => state() === 'restored'),
|
|
35
|
+
isInitiated: computed(() => state() === 'initiated'),
|
|
36
|
+
isEmpty: computed(() => Object.keys(data()).length === 0),
|
|
37
|
+
isDirty: computed(() => !isEqual(data(), previousSnapshot())),
|
|
38
|
+
snapshot: computed(() => cloneDeep(data())), // Current data snapshot
|
|
39
|
+
initial: computed(() => cloneDeep(initialSnapshot())), // Initial snapshot
|
|
40
|
+
previous: computed(() => cloneDeep(previousSnapshot())), // Previous snapshot
|
|
41
|
+
changeEvent: computed(() => lastChange()), // Reactive last change event
|
|
42
|
+
})),
|
|
43
|
+
// Methods for State Management
|
|
44
|
+
withMethods((store) => ({
|
|
45
|
+
// Update a specific value
|
|
46
|
+
update(path, value) {
|
|
47
|
+
const currentData = cloneDeep(store.data());
|
|
48
|
+
const oldValue = get(currentData, path);
|
|
49
|
+
// Skip if the value hasn't changed
|
|
50
|
+
if (isEqual(oldValue, value)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Update the value and prepare the change event
|
|
54
|
+
const updatedData = setSmart(currentData, path, value);
|
|
55
|
+
const changeEvent = {
|
|
56
|
+
oldValue,
|
|
57
|
+
newValue: value,
|
|
58
|
+
path,
|
|
59
|
+
state: 'changed',
|
|
60
|
+
data: updatedData,
|
|
61
|
+
};
|
|
62
|
+
// Patch the state
|
|
63
|
+
patchState(store, {
|
|
64
|
+
previousSnapshot: store.snapshot(), // Save the previous state
|
|
65
|
+
data: updatedData,
|
|
66
|
+
state: 'changed',
|
|
67
|
+
lastChange: changeEvent,
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
patch(context, skipDirtyTracking = false) {
|
|
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
|
+
...(skipDirtyTracking ? {} : { previousSnapshot: store.snapshot() }), // Only update previousSnapshot if not skipping dirty tracking
|
|
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
|
+
console.log('initialData', initialData);
|
|
110
|
+
const changeEvent = {
|
|
111
|
+
oldValue: null,
|
|
112
|
+
newValue: cloneDeep(initialData),
|
|
113
|
+
path: '',
|
|
114
|
+
state: 'initiated',
|
|
115
|
+
data: initialData,
|
|
116
|
+
};
|
|
117
|
+
patchState(store, {
|
|
118
|
+
initialSnapshot: cloneDeep(initialData), // Save the initial state
|
|
119
|
+
previousSnapshot: store.snapshot(), // Save the current state as the previous
|
|
120
|
+
data: initialData,
|
|
121
|
+
state: 'initiated',
|
|
122
|
+
lastChange: changeEvent,
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
// Get a specific value
|
|
126
|
+
getValue(path) {
|
|
127
|
+
return get(store.data(), path);
|
|
128
|
+
},
|
|
129
|
+
// Check if a path exists in the context
|
|
130
|
+
hasValue(path) {
|
|
131
|
+
return has(store.data(), path);
|
|
132
|
+
},
|
|
133
|
+
})));
|
|
134
|
+
|
|
18
135
|
var AXPPageStatus;
|
|
19
136
|
(function (AXPPageStatus) {
|
|
20
137
|
// Idle statuses
|
|
@@ -54,17 +171,17 @@ class AXPWidgetCoreElement {
|
|
|
54
171
|
}
|
|
55
172
|
class AXPWidgetCoreService {
|
|
56
173
|
constructor() {
|
|
57
|
-
this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] :
|
|
58
|
-
this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] :
|
|
174
|
+
this.variables$ = signal({}, ...(ngDevMode ? [{ debugName: "variables$" }] : []));
|
|
175
|
+
this.functions$ = signal({}, ...(ngDevMode ? [{ debugName: "functions$" }] : []));
|
|
59
176
|
this.onRefresh = new Subject();
|
|
60
177
|
this.widgets = new Map();
|
|
61
178
|
this.onWidgetRegistered = new Subject();
|
|
62
|
-
this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] :
|
|
179
|
+
this.status$ = signal(AXPPageStatus.Rendering, ...(ngDevMode ? [{ debugName: "status$" }] : []));
|
|
63
180
|
this.status = this.status$.asReadonly();
|
|
64
181
|
this.isBusy = computed(() => {
|
|
65
182
|
return [AXPPageStatus.Processing, AXPPageStatus.Submitting, AXPPageStatus.Rendering].includes(this.status());
|
|
66
|
-
}, ...(ngDevMode ? [{ debugName: "isBusy" }] :
|
|
67
|
-
this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] :
|
|
183
|
+
}, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
|
|
184
|
+
this.registeredWidgetsCount = signal(0, ...(ngDevMode ? [{ debugName: "registeredWidgetsCount" }] : []));
|
|
68
185
|
}
|
|
69
186
|
get variables() {
|
|
70
187
|
return this.variables$();
|
|
@@ -169,16 +286,16 @@ class AXPWidgetCoreService {
|
|
|
169
286
|
return Array.from(this.widgets.keys());
|
|
170
287
|
}
|
|
171
288
|
ngOnDestroy() { }
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
173
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
290
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreService }); }
|
|
174
291
|
}
|
|
175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreService, decorators: [{
|
|
176
293
|
type: Injectable
|
|
177
294
|
}] });
|
|
178
295
|
|
|
179
296
|
//
|
|
180
297
|
// @deprecated
|
|
181
|
-
//
|
|
298
|
+
// use AXPWidgetsList instead
|
|
182
299
|
const AXPWidgetsCatalog = {
|
|
183
300
|
timeDuration: 'time-duration',
|
|
184
301
|
timeDurationFilter: 'time-duration-filter',
|
|
@@ -202,7 +319,6 @@ const AXPWidgetsCatalog = {
|
|
|
202
319
|
pageLayout: 'page-layout',
|
|
203
320
|
repeaterLayout: 'repeater-layout',
|
|
204
321
|
textBlockLayout: 'text-block-layout',
|
|
205
|
-
alertBoxLayout: 'alert-box-layout',
|
|
206
322
|
fileUploader: 'file-uploader',
|
|
207
323
|
fileTypeExtension: 'file-type-extension',
|
|
208
324
|
map: 'map',
|
|
@@ -231,6 +347,7 @@ const AXPWidgetsCatalog = {
|
|
|
231
347
|
tableLayout: 'table-layout',
|
|
232
348
|
tableItem: 'table-item-layout',
|
|
233
349
|
avatar: 'avatar',
|
|
350
|
+
themePaletteChooser: 'theme-palette-chooser',
|
|
234
351
|
themeModeChooser: 'theme-mode-chooser',
|
|
235
352
|
menuOrientationChooser: 'menu-orientation-chooser',
|
|
236
353
|
fontStyleChooser: 'font-style-chooser',
|
|
@@ -258,11 +375,21 @@ const AXPWidgetsCatalog = {
|
|
|
258
375
|
betweenValidation: 'between-validation',
|
|
259
376
|
equalValidation: 'equal-validation',
|
|
260
377
|
callbackValidation: 'callback-validation',
|
|
378
|
+
donutChart: 'donut-chart',
|
|
379
|
+
lineChart: 'line-chart',
|
|
380
|
+
barChart: 'bar-chart',
|
|
381
|
+
gaugeChart: 'gauge-chart',
|
|
382
|
+
stickyNote: 'sticky-note',
|
|
383
|
+
clockCalendar: 'clock-calendar',
|
|
384
|
+
analogClock: 'analog-clock',
|
|
385
|
+
weather: 'weather',
|
|
386
|
+
minimalWeather: 'minimal-weather',
|
|
387
|
+
advancedWeather: 'advanced-weather',
|
|
261
388
|
metaData: 'meta-data-editor',
|
|
262
389
|
templateEditor: 'template-box-editor',
|
|
263
|
-
templateContentEditor: 'template-content-editor',
|
|
264
390
|
panel: 'panel',
|
|
265
391
|
notification: 'notification',
|
|
392
|
+
taskBoard: 'task-board',
|
|
266
393
|
comment: 'comment',
|
|
267
394
|
dataList: 'data-list',
|
|
268
395
|
listToolbar: 'list-toolbar',
|
|
@@ -271,9 +398,7 @@ const AXPWidgetsCatalog = {
|
|
|
271
398
|
documentUploader: 'document-uploader',
|
|
272
399
|
stepWizard: 'step-wizard',
|
|
273
400
|
progressBar: 'progress-bar-editor',
|
|
274
|
-
rate: 'rate-picker-editor'
|
|
275
|
-
documentFileTypeFilter: 'document-file-type-filter',
|
|
276
|
-
entityDefinitionProvider: 'entity-definition-provider-editor',
|
|
401
|
+
rate: 'rate-picker-editor'
|
|
277
402
|
};
|
|
278
403
|
|
|
279
404
|
function cloneProperty(property, values) {
|
|
@@ -328,7 +453,7 @@ function createBooleanProperty(ctor) {
|
|
|
328
453
|
type: AXPWidgetsCatalog.toggle,
|
|
329
454
|
},
|
|
330
455
|
},
|
|
331
|
-
visible:
|
|
456
|
+
visible: ctor.visible ?? true,
|
|
332
457
|
binding: {
|
|
333
458
|
enabled: true,
|
|
334
459
|
},
|
|
@@ -355,7 +480,7 @@ function createSelectProperty(ctor) {
|
|
|
355
480
|
},
|
|
356
481
|
},
|
|
357
482
|
},
|
|
358
|
-
visible:
|
|
483
|
+
visible: ctor.visible ?? true,
|
|
359
484
|
};
|
|
360
485
|
}
|
|
361
486
|
const AXP_WIDGET_TOKEN = new InjectionToken('AXP_WIDGET_TOKEN');
|
|
@@ -367,22 +492,22 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
|
|
|
367
492
|
this.token = inject(AXP_WIDGET_TOKEN);
|
|
368
493
|
this.host = inject(ElementRef).nativeElement;
|
|
369
494
|
this.layoutService = inject(AXPWidgetCoreService);
|
|
370
|
-
this.contextService = inject(
|
|
495
|
+
this.contextService = inject(AXPWidgetCoreContextStore);
|
|
371
496
|
this.config = this.token.config;
|
|
372
497
|
this.node = this.token.node;
|
|
373
498
|
this.name = this.token.node.name;
|
|
374
499
|
this.component = this;
|
|
375
|
-
this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] :
|
|
500
|
+
this._options = signal(this.token.options ?? {}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
|
|
376
501
|
this.options = this._options.asReadonly();
|
|
377
502
|
this.onOptionsChanged = new Subject();
|
|
378
|
-
this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] :
|
|
503
|
+
this._status = signal(AXPWidgetStatus.Rendering, ...(ngDevMode ? [{ debugName: "_status" }] : []));
|
|
379
504
|
this.status = this._status.asReadonly();
|
|
380
505
|
this.onStatusChanged = new BehaviorSubject(this._status());
|
|
381
506
|
this.#statusEffect = effect(() => {
|
|
382
507
|
this.onStatusChanged.next(this.status());
|
|
383
|
-
}, ...(ngDevMode ? [{ debugName: "#statusEffect" }] :
|
|
384
|
-
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] :
|
|
385
|
-
this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] :
|
|
508
|
+
}, ...(ngDevMode ? [{ debugName: "#statusEffect" }] : []));
|
|
509
|
+
this.isBusy = computed(() => [AXPWidgetStatus.Rendering, AXPWidgetStatus.Processing].includes(this.status()), ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
|
|
510
|
+
this._children = signal(this.token.node.children ?? [], ...(ngDevMode ? [{ debugName: "_children" }] : []));
|
|
386
511
|
this.children = this._children.asReadonly();
|
|
387
512
|
}
|
|
388
513
|
get id() {
|
|
@@ -429,10 +554,10 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
|
|
|
429
554
|
this._children.set([...children]);
|
|
430
555
|
}
|
|
431
556
|
onAdded() { }
|
|
432
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
433
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
557
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
558
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBaseWidgetComponent }); }
|
|
434
559
|
}
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBaseWidgetComponent, decorators: [{
|
|
436
561
|
type: Injectable
|
|
437
562
|
}] });
|
|
438
563
|
class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
|
|
@@ -443,10 +568,10 @@ class AXPLayoutBaseWidgetComponent extends AXPBaseWidgetComponent {
|
|
|
443
568
|
}
|
|
444
569
|
super.ngOnInit();
|
|
445
570
|
}
|
|
446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
447
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPLayoutBaseWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
572
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPLayoutBaseWidgetComponent }); }
|
|
448
573
|
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPLayoutBaseWidgetComponent, decorators: [{
|
|
450
575
|
type: Injectable
|
|
451
576
|
}] });
|
|
452
577
|
class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
@@ -457,11 +582,11 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
457
582
|
this._isValueWidget = false;
|
|
458
583
|
this.isValueWidget = () => this._isValueWidget;
|
|
459
584
|
this.onValueChanged = new Subject();
|
|
460
|
-
this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] :
|
|
461
|
-
this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] :
|
|
585
|
+
this.fullPath = signal(null, ...(ngDevMode ? [{ debugName: "fullPath" }] : []));
|
|
586
|
+
this.parentPath = signal(null, ...(ngDevMode ? [{ debugName: "parentPath" }] : []));
|
|
462
587
|
this.getValue = computed(() => {
|
|
463
588
|
return this.fullPath() ? this.extractValue(this.fullPath()) : null;
|
|
464
|
-
},
|
|
589
|
+
}, ...(ngDevMode ? [{ debugName: "getValue", equal: isEqual }] : [{ equal: isEqual }]));
|
|
465
590
|
this.validationRules = computed(() => {
|
|
466
591
|
const validationsRaw = this.options()['validations'];
|
|
467
592
|
if (validationsRaw == null) {
|
|
@@ -474,7 +599,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
474
599
|
message: c.message,
|
|
475
600
|
options: c.options,
|
|
476
601
|
}));
|
|
477
|
-
}, ...(ngDevMode ? [{ debugName: "validationRules" }] :
|
|
602
|
+
}, ...(ngDevMode ? [{ debugName: "validationRules" }] : []));
|
|
478
603
|
}
|
|
479
604
|
ngOnInit() {
|
|
480
605
|
this._isValueWidget = this.config.properties?.some((c) => c.name == 'path') ?? false;
|
|
@@ -504,12 +629,7 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
504
629
|
if (isNil(value) && isNil(oldValue)) {
|
|
505
630
|
return;
|
|
506
631
|
}
|
|
507
|
-
|
|
508
|
-
const isArrayReorder = Array.isArray(oldValue) &&
|
|
509
|
-
Array.isArray(value) &&
|
|
510
|
-
oldValue.length === value.length &&
|
|
511
|
-
oldValue.some((v, i) => v !== value[i]);
|
|
512
|
-
if (!isArrayReorder && isEqual(oldValue, value)) {
|
|
632
|
+
if (isEqual(oldValue, value)) {
|
|
513
633
|
return;
|
|
514
634
|
}
|
|
515
635
|
if (this.fullPath()) {
|
|
@@ -556,23 +676,23 @@ class AXPValueWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
556
676
|
this.setValue(e.value);
|
|
557
677
|
}
|
|
558
678
|
}
|
|
559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
560
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
679
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPValueWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
680
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPValueWidgetComponent }); }
|
|
561
681
|
}
|
|
562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPValueWidgetComponent, decorators: [{
|
|
563
683
|
type: Injectable
|
|
564
684
|
}] });
|
|
565
685
|
class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
566
686
|
constructor() {
|
|
567
687
|
super(...arguments);
|
|
568
688
|
this.dataService = inject(AXPDataSourceDefinitionProviderService);
|
|
569
|
-
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] :
|
|
570
|
-
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] :
|
|
689
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
|
|
690
|
+
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
571
691
|
this.textTemplate = computed(() => isNil(this.options()['textTemplate'])
|
|
572
692
|
? undefined
|
|
573
|
-
: this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] :
|
|
574
|
-
this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] :
|
|
575
|
-
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] :
|
|
693
|
+
: this.options()['textTemplate'].replace(/{/g, '{{').replace(/}/g, '}}'), ...(ngDevMode ? [{ debugName: "textTemplate" }] : []));
|
|
694
|
+
this.dataSource = signal(convertArrayToDataSource([]), ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
695
|
+
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
576
696
|
//#region ---- DataSource Loading Effect ----
|
|
577
697
|
/**
|
|
578
698
|
* Track the last loaded string dataSource reference to prevent infinite loops
|
|
@@ -652,7 +772,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
652
772
|
this.dataSource.set(convertArrayToDataSource([]));
|
|
653
773
|
}
|
|
654
774
|
});
|
|
655
|
-
}, ...(ngDevMode ? [{ debugName: "rf" }] :
|
|
775
|
+
}, ...(ngDevMode ? [{ debugName: "rf" }] : []));
|
|
656
776
|
this.effect2 = effect(async () => {
|
|
657
777
|
const value = this.getValue();
|
|
658
778
|
const items = [];
|
|
@@ -663,7 +783,7 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
663
783
|
items.push(await this.extractItem(value));
|
|
664
784
|
}
|
|
665
785
|
this.selectedItems.set(items.filter((c) => c != null));
|
|
666
|
-
}, ...(ngDevMode ? [{ debugName: "effect2" }] :
|
|
786
|
+
}, ...(ngDevMode ? [{ debugName: "effect2" }] : []));
|
|
667
787
|
}
|
|
668
788
|
//#endregion
|
|
669
789
|
async extractItem(item) {
|
|
@@ -688,10 +808,10 @@ class AXPDataListWidgetComponent extends AXPValueWidgetComponent {
|
|
|
688
808
|
[this.textField()]: item,
|
|
689
809
|
};
|
|
690
810
|
}
|
|
691
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
692
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
811
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDataListWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
812
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDataListWidgetComponent }); }
|
|
693
813
|
}
|
|
694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDataListWidgetComponent, decorators: [{
|
|
695
815
|
type: Injectable
|
|
696
816
|
}] });
|
|
697
817
|
class AXPColumnWidgetComponent {
|
|
@@ -699,8 +819,6 @@ class AXPColumnWidgetComponent {
|
|
|
699
819
|
this.token = inject(AXP_WIDGET_COLUMN_TOKEN);
|
|
700
820
|
this.path = this.token.path;
|
|
701
821
|
this.options = this.token.options ?? {};
|
|
702
|
-
/** Column header caption when rendered inside `axp-widget-column-renderer`. */
|
|
703
|
-
this.columnCaption = this.token.caption;
|
|
704
822
|
this.rawValue = null;
|
|
705
823
|
this.nullText = this.options['nullText'];
|
|
706
824
|
this.nullValue = this.options['nullValue'];
|
|
@@ -711,10 +829,10 @@ class AXPColumnWidgetComponent {
|
|
|
711
829
|
return this.rawValue;
|
|
712
830
|
};
|
|
713
831
|
}
|
|
714
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
715
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
832
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPColumnWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
833
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPColumnWidgetComponent }); }
|
|
716
834
|
}
|
|
717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPColumnWidgetComponent, decorators: [{
|
|
718
836
|
type: Injectable
|
|
719
837
|
}] });
|
|
720
838
|
|
|
@@ -743,7 +861,7 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
743
861
|
style['overflow-y'] = overflowY ?? '';
|
|
744
862
|
style['direction'] = direction ?? '';
|
|
745
863
|
return style;
|
|
746
|
-
}, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] :
|
|
864
|
+
}, ...(ngDevMode ? [{ debugName: "hostBoxStyle" }] : []));
|
|
747
865
|
this.blockStyle = computed(() => {
|
|
748
866
|
const options = this.options();
|
|
749
867
|
const style = { ...this.hostBoxStyle() };
|
|
@@ -760,47 +878,47 @@ class AXPBoxModelLayoutWidgetComponent extends AXPLayoutBaseWidgetComponent {
|
|
|
760
878
|
style['height'] = height ?? '';
|
|
761
879
|
style['max-height'] = maxHeight ?? '';
|
|
762
880
|
return style;
|
|
763
|
-
}, ...(ngDevMode ? [{ debugName: "blockStyle" }] :
|
|
881
|
+
}, ...(ngDevMode ? [{ debugName: "blockStyle" }] : []));
|
|
764
882
|
this.inlineStyle = computed(() => {
|
|
765
883
|
return { ...this.hostBoxStyle() };
|
|
766
|
-
}, ...(ngDevMode ? [{ debugName: "inlineStyle" }] :
|
|
884
|
+
}, ...(ngDevMode ? [{ debugName: "inlineStyle" }] : []));
|
|
767
885
|
this.blockClass = computed(() => {
|
|
768
886
|
return {
|
|
769
887
|
'ax-block': true,
|
|
770
888
|
'ax-w-full': true,
|
|
771
889
|
// 'ax-widget-outline': true,
|
|
772
890
|
};
|
|
773
|
-
}, ...(ngDevMode ? [{ debugName: "blockClass" }] :
|
|
891
|
+
}, ...(ngDevMode ? [{ debugName: "blockClass" }] : []));
|
|
774
892
|
this.inlineClass = computed(() => {
|
|
775
893
|
return {
|
|
776
894
|
'ax-inline-block': true,
|
|
777
895
|
};
|
|
778
|
-
}, ...(ngDevMode ? [{ debugName: "inlineClass" }] :
|
|
896
|
+
}, ...(ngDevMode ? [{ debugName: "inlineClass" }] : []));
|
|
779
897
|
}
|
|
780
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
781
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
898
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
899
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent }); }
|
|
782
900
|
}
|
|
783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBoxModelLayoutWidgetComponent, decorators: [{
|
|
784
902
|
type: Injectable
|
|
785
903
|
}] });
|
|
786
904
|
|
|
787
905
|
class AXPBlockBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
|
|
788
906
|
constructor() {
|
|
789
907
|
super(...arguments);
|
|
790
|
-
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
791
|
-
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
908
|
+
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
909
|
+
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
792
910
|
}
|
|
793
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
794
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
912
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent }); }
|
|
795
913
|
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPBlockBaseLayoutWidgetComponent, decorators: [{
|
|
797
915
|
type: Injectable
|
|
798
916
|
}] });
|
|
799
917
|
|
|
800
918
|
class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
801
919
|
constructor() {
|
|
802
920
|
super(...arguments);
|
|
803
|
-
this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] :
|
|
921
|
+
this.flex = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flex" }] : []));
|
|
804
922
|
this.hostFlexStyle = computed(() => {
|
|
805
923
|
const blockStyle = this.blockStyle();
|
|
806
924
|
const style = { ...blockStyle };
|
|
@@ -839,45 +957,45 @@ class AXPFlexBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
|
|
|
839
957
|
style['gap'] = flex.gap;
|
|
840
958
|
}
|
|
841
959
|
return style;
|
|
842
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] :
|
|
960
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexStyle" }] : []));
|
|
843
961
|
this.hostFlexClass = computed(() => {
|
|
844
962
|
return {
|
|
845
963
|
...this.blockClass(),
|
|
846
964
|
'ax-flex': true,
|
|
847
965
|
'ax-h-full': true,
|
|
848
966
|
};
|
|
849
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] :
|
|
967
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexClass" }] : []));
|
|
850
968
|
this.hostClass = computed(() => {
|
|
851
969
|
return this.hostFlexClass();
|
|
852
|
-
}, ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
970
|
+
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
853
971
|
this.hostStyle = computed(() => {
|
|
854
972
|
return this.hostFlexStyle();
|
|
855
|
-
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
973
|
+
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
856
974
|
}
|
|
857
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
858
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
975
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
976
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent }); }
|
|
859
977
|
}
|
|
860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
978
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexBaseLayoutWidgetComponent, decorators: [{
|
|
861
979
|
type: Injectable
|
|
862
980
|
}] });
|
|
863
981
|
|
|
864
982
|
class AXPInlineBaseLayoutWidgetComponent extends AXPBoxModelLayoutWidgetComponent {
|
|
865
983
|
constructor() {
|
|
866
984
|
super(...arguments);
|
|
867
|
-
this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
868
|
-
this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
985
|
+
this.hostClass = computed(() => this.inlineClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
986
|
+
this.hostStyle = computed(() => this.inlineStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
869
987
|
}
|
|
870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
871
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
989
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent }); }
|
|
872
990
|
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPInlineBaseLayoutWidgetComponent, decorators: [{
|
|
874
992
|
type: Injectable
|
|
875
993
|
}] });
|
|
876
994
|
|
|
877
995
|
class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComponent {
|
|
878
996
|
constructor() {
|
|
879
997
|
super(...arguments);
|
|
880
|
-
this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] :
|
|
998
|
+
this.flexItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "flexItem" }] : []));
|
|
881
999
|
this.hostFlexItemStyle = computed(() => {
|
|
882
1000
|
const inlineStyle = this.blockStyle();
|
|
883
1001
|
const style = { ...inlineStyle };
|
|
@@ -913,37 +1031,37 @@ class AXPFlexItemBaseLayoutWidgetComponent extends AXPInlineBaseLayoutWidgetComp
|
|
|
913
1031
|
style['align-self'] = fi.alignSelf;
|
|
914
1032
|
}
|
|
915
1033
|
return style;
|
|
916
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] :
|
|
1034
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexItemStyle" }] : []));
|
|
917
1035
|
this.hostFlexItemClass = computed(() => {
|
|
918
1036
|
return {
|
|
919
1037
|
...this.blockClass(),
|
|
920
1038
|
};
|
|
921
|
-
}, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] :
|
|
1039
|
+
}, ...(ngDevMode ? [{ debugName: "hostFlexItemClass" }] : []));
|
|
922
1040
|
this.hostClass = computed(() => {
|
|
923
1041
|
return this.hostFlexItemClass();
|
|
924
|
-
}, ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
1042
|
+
}, ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
925
1043
|
this.hostStyle = computed(() => {
|
|
926
1044
|
return this.hostFlexItemStyle();
|
|
927
|
-
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
1045
|
+
}, ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
928
1046
|
}
|
|
929
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
930
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1047
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1048
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent }); }
|
|
931
1049
|
}
|
|
932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFlexItemBaseLayoutWidgetComponent, decorators: [{
|
|
933
1051
|
type: Injectable
|
|
934
1052
|
}] });
|
|
935
1053
|
|
|
936
1054
|
class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
937
1055
|
constructor() {
|
|
938
1056
|
super(...arguments);
|
|
939
|
-
this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] :
|
|
1057
|
+
this.grid = computed(() => this.options()?.['grid'], ...(ngDevMode ? [{ debugName: "grid" }] : []));
|
|
940
1058
|
this.hostGridStyle = computed(() => {
|
|
941
1059
|
const style = { ...this.inlineStyle() };
|
|
942
1060
|
const g = this.grid()?.default;
|
|
943
1061
|
if (g?.gap)
|
|
944
1062
|
style['gap'] = g.gap;
|
|
945
1063
|
return style;
|
|
946
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] :
|
|
1064
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridStyle" }] : []));
|
|
947
1065
|
this.hostGridClass = computed(() => {
|
|
948
1066
|
const cls = {
|
|
949
1067
|
...this.inlineClass(),
|
|
@@ -960,21 +1078,21 @@ class AXPGridBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent
|
|
|
960
1078
|
if (g?.autoFlow)
|
|
961
1079
|
cls[`lg:ax-grid-flow-${g.autoFlow}`] = true;
|
|
962
1080
|
return cls;
|
|
963
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridClass" }] :
|
|
964
|
-
this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
965
|
-
this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
1081
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridClass" }] : []));
|
|
1082
|
+
this.hostClass = computed(() => this.hostGridClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1083
|
+
this.hostStyle = computed(() => this.hostGridStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
966
1084
|
}
|
|
967
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
968
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1085
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1086
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent }); }
|
|
969
1087
|
}
|
|
970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridBaseLayoutWidgetComponent, decorators: [{
|
|
971
1089
|
type: Injectable
|
|
972
1090
|
}] });
|
|
973
1091
|
|
|
974
1092
|
class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetComponent {
|
|
975
1093
|
constructor() {
|
|
976
1094
|
super(...arguments);
|
|
977
|
-
this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] :
|
|
1095
|
+
this.gridItem = computed(() => this.options(), ...(ngDevMode ? [{ debugName: "gridItem" }] : []));
|
|
978
1096
|
this.hostGridItemStyle = computed(() => {
|
|
979
1097
|
const style = { ...this.hostFlexStyle() };
|
|
980
1098
|
const g = this.gridItem();
|
|
@@ -983,13 +1101,10 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
|
|
|
983
1101
|
if (g?.justifySelf)
|
|
984
1102
|
style['justify-self'] = g.justifySelf;
|
|
985
1103
|
return style;
|
|
986
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] :
|
|
1104
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridItemStyle" }] : []));
|
|
987
1105
|
this.hostGridItemClass = computed(() => {
|
|
988
1106
|
const cls = { ...this.hostFlexClass() };
|
|
989
1107
|
const g = this.gridItem();
|
|
990
|
-
// Mobile-first: full width on small screens so items stack vertically and don't overflow
|
|
991
|
-
cls['ax-col-span-12'] = true;
|
|
992
|
-
// Large screens: apply defined placement so multi-column layout works on desktop
|
|
993
1108
|
if (g?.colSpan)
|
|
994
1109
|
cls[`lg:ax-col-span-${g.colSpan}`] = true;
|
|
995
1110
|
if (g?.colStart)
|
|
@@ -1003,14 +1118,14 @@ class AXPGridItemBaseLayoutWidgetComponent extends AXPFlexBaseLayoutWidgetCompon
|
|
|
1003
1118
|
if (g?.rowEnd)
|
|
1004
1119
|
cls[`lg:ax-row-end-${g.rowEnd}`] = true;
|
|
1005
1120
|
return cls;
|
|
1006
|
-
}, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] :
|
|
1007
|
-
this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
1008
|
-
this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
1121
|
+
}, ...(ngDevMode ? [{ debugName: "hostGridItemClass" }] : []));
|
|
1122
|
+
this.hostClass = computed(() => this.hostGridItemClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1123
|
+
this.hostStyle = computed(() => this.hostGridItemStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
1009
1124
|
}
|
|
1010
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1011
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1126
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent }); }
|
|
1012
1127
|
}
|
|
1013
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPGridItemBaseLayoutWidgetComponent, decorators: [{
|
|
1014
1129
|
type: Injectable
|
|
1015
1130
|
}] });
|
|
1016
1131
|
|
|
@@ -1019,27 +1134,27 @@ class AXPTableBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponen
|
|
|
1019
1134
|
super(...arguments);
|
|
1020
1135
|
this.hostTableClass = computed(() => ({
|
|
1021
1136
|
...this.blockClass(),
|
|
1022
|
-
}), ...(ngDevMode ? [{ debugName: "hostTableClass" }] :
|
|
1137
|
+
}), ...(ngDevMode ? [{ debugName: "hostTableClass" }] : []));
|
|
1023
1138
|
this.hostTableStyle = computed(() => {
|
|
1024
1139
|
const style = { ...this.blockStyle() };
|
|
1025
1140
|
style['overflow-x'] = 'auto';
|
|
1026
1141
|
return style;
|
|
1027
|
-
}, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] :
|
|
1028
|
-
this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
1029
|
-
this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
1142
|
+
}, ...(ngDevMode ? [{ debugName: "hostTableStyle" }] : []));
|
|
1143
|
+
this.hostClass = computed(() => this.hostTableClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1144
|
+
this.hostStyle = computed(() => this.hostTableStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
1030
1145
|
}
|
|
1031
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1032
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1147
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent }); }
|
|
1033
1148
|
}
|
|
1034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableBaseLayoutWidgetComponent, decorators: [{
|
|
1035
1150
|
type: Injectable
|
|
1036
1151
|
}] });
|
|
1037
1152
|
|
|
1038
1153
|
class AXPTableItemOpsBaseLayoutWidgetComponent extends AXPBlockBaseLayoutWidgetComponent {
|
|
1039
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1040
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1155
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent }); }
|
|
1041
1156
|
}
|
|
1042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemOpsBaseLayoutWidgetComponent, decorators: [{
|
|
1043
1158
|
type: Injectable
|
|
1044
1159
|
}] });
|
|
1045
1160
|
|
|
@@ -1049,105 +1164,57 @@ class AXPTableItemBaseLayoutWidgetComponent extends AXPTableItemOpsBaseLayoutWid
|
|
|
1049
1164
|
this.colSpan = computed(() => {
|
|
1050
1165
|
const v = this.options()?.colSpan;
|
|
1051
1166
|
return v ? Math.max(1, v) : 1;
|
|
1052
|
-
}, ...(ngDevMode ? [{ debugName: "colSpan" }] :
|
|
1167
|
+
}, ...(ngDevMode ? [{ debugName: "colSpan" }] : []));
|
|
1053
1168
|
this.rowSpan = computed(() => {
|
|
1054
1169
|
const v = this.options()?.rowSpan;
|
|
1055
1170
|
return v ? Math.max(1, v) : 1;
|
|
1056
|
-
}, ...(ngDevMode ? [{ debugName: "rowSpan" }] :
|
|
1057
|
-
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] :
|
|
1058
|
-
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] :
|
|
1171
|
+
}, ...(ngDevMode ? [{ debugName: "rowSpan" }] : []));
|
|
1172
|
+
this.hostClass = computed(() => this.blockClass(), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
1173
|
+
this.hostStyle = computed(() => this.blockStyle(), ...(ngDevMode ? [{ debugName: "hostStyle" }] : []));
|
|
1059
1174
|
}
|
|
1060
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1061
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1176
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent }); }
|
|
1062
1177
|
}
|
|
1063
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPTableItemBaseLayoutWidgetComponent, decorators: [{
|
|
1064
1179
|
type: Injectable
|
|
1065
1180
|
}] });
|
|
1066
1181
|
|
|
1067
|
-
//#region ---- Imports ----
|
|
1068
|
-
/**
|
|
1069
|
-
* Injection token for widget definition providers.
|
|
1070
|
-
* Modules register their widget providers using this token (multi: true).
|
|
1071
|
-
*/
|
|
1072
|
-
const AXP_WIDGET_DEFINITION_PROVIDER = new InjectionToken('AXP_WIDGET_DEFINITION_PROVIDER', {
|
|
1073
|
-
factory: () => [],
|
|
1074
|
-
});
|
|
1075
|
-
//#endregion
|
|
1076
|
-
|
|
1077
|
-
//#region ---- Build widget map (shared with tooling / snapshot scripts) ----
|
|
1078
|
-
//TODO RECHECK THIS FUNCTION s.hosseini
|
|
1079
|
-
/**
|
|
1080
|
-
* Merges core + extended widgets the same way as AXPWidgetRegistryService.ensureBuilt().
|
|
1081
|
-
* Use with concrete providers (e.g. AXPCoreWidgetsProvider, AXPEntityWidgetsProvider) in Node scripts without DI.
|
|
1082
|
-
*/
|
|
1083
|
-
function buildWidgetRegistryMapFromProviders(providers) {
|
|
1084
|
-
const types = new Map();
|
|
1085
|
-
const AXPExtendedWidgets = [];
|
|
1086
|
-
for (const provider of providers) {
|
|
1087
|
-
const widgets = provider.getWidgets?.() ?? [];
|
|
1088
|
-
for (const w of widgets) {
|
|
1089
|
-
types.set(w.name, w);
|
|
1090
|
-
}
|
|
1091
|
-
const extended = provider.getExtendedWidgets?.() ?? [];
|
|
1092
|
-
AXPExtendedWidgets.push(...extended);
|
|
1093
|
-
}
|
|
1094
|
-
for (const { parentName, widget } of AXPExtendedWidgets) {
|
|
1095
|
-
const parent = types.get(parentName);
|
|
1096
|
-
if (parent) {
|
|
1097
|
-
const merged = merge({}, parent, widget);
|
|
1098
|
-
merged.name = widget.name;
|
|
1099
|
-
types.set(merged.name, merged);
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
return types;
|
|
1103
|
-
}
|
|
1104
|
-
//#endregion
|
|
1105
|
-
//#region ---- Widget Registry Service (Token-Based) ----
|
|
1106
|
-
/**
|
|
1107
|
-
* Aggregates widgets from all AXP_WIDGET_DEFINITION_PROVIDER instances.
|
|
1108
|
-
* Token-based like AXP_MENU_PROVIDER / AXP_PERMISSION_DEFINITION_PROVIDER / AXP_SETTING_DEFINITION_PROVIDER.
|
|
1109
|
-
* No separate registry - widgets come solely from providers.
|
|
1110
|
-
*/
|
|
1111
1182
|
class AXPWidgetRegistryService {
|
|
1112
|
-
constructor() {
|
|
1113
|
-
this._providers = inject(AXP_WIDGET_DEFINITION_PROVIDER, { optional: true }) ?? [];
|
|
1114
|
-
this._types = null;
|
|
1115
|
-
}
|
|
1116
1183
|
/**
|
|
1117
|
-
*
|
|
1184
|
+
*
|
|
1118
1185
|
*/
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1186
|
+
constructor() {
|
|
1187
|
+
this.types = new Map();
|
|
1188
|
+
AXPWidgetRegistryService.instance = this;
|
|
1189
|
+
}
|
|
1190
|
+
register(widget) {
|
|
1191
|
+
this.types.set(widget.name, widget);
|
|
1192
|
+
}
|
|
1193
|
+
extend(parentName, widget) {
|
|
1194
|
+
const parentWidget = this.resolve(parentName);
|
|
1195
|
+
const newWidget = merge({}, parentWidget, widget);
|
|
1196
|
+
newWidget.name = widget.name;
|
|
1197
|
+
this.register(newWidget);
|
|
1124
1198
|
}
|
|
1125
1199
|
resolve(name) {
|
|
1126
|
-
const widget = this.
|
|
1200
|
+
const widget = this.types.get(name);
|
|
1127
1201
|
if (!widget) {
|
|
1128
1202
|
throw new Error(`Widget with name "${name}" does not exist.`);
|
|
1129
1203
|
}
|
|
1130
1204
|
return widget;
|
|
1131
1205
|
}
|
|
1132
|
-
/**
|
|
1133
|
-
* Registered widget config when present; otherwise `undefined`. Does not throw — use when
|
|
1134
|
-
* {@link resolve}'s value may be a non-widget id (e.g. data-source row id in dynamic field configurator).
|
|
1135
|
-
*/
|
|
1136
|
-
getOptional(name) {
|
|
1137
|
-
return this.ensureBuilt().get(name);
|
|
1138
|
-
}
|
|
1139
1206
|
all() {
|
|
1140
|
-
return Array.from(this.
|
|
1207
|
+
return Array.from(this.types.values());
|
|
1141
1208
|
}
|
|
1142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1143
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1210
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetRegistryService, providedIn: 'root' }); }
|
|
1144
1211
|
}
|
|
1145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetRegistryService, decorators: [{
|
|
1146
1213
|
type: Injectable,
|
|
1147
1214
|
args: [{
|
|
1148
1215
|
providedIn: 'root',
|
|
1149
1216
|
}]
|
|
1150
|
-
}] });
|
|
1217
|
+
}], ctorParameters: () => [] });
|
|
1151
1218
|
|
|
1152
1219
|
class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
1153
1220
|
constructor() {
|
|
@@ -1155,8 +1222,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1155
1222
|
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
1156
1223
|
this.grid = inject(AXBaseDataTable);
|
|
1157
1224
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1158
|
-
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] :
|
|
1159
|
-
this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] :
|
|
1225
|
+
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
|
|
1226
|
+
this.loadingRow = signal(null, ...(ngDevMode ? [{ debugName: "loadingRow" }] : []));
|
|
1160
1227
|
this.rowInjectorsCache = new Map();
|
|
1161
1228
|
this.hasExpressions = false;
|
|
1162
1229
|
this.pendingEvaluations = new Set();
|
|
@@ -1275,7 +1342,6 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1275
1342
|
const tokenValue = {
|
|
1276
1343
|
path: this.node.path,
|
|
1277
1344
|
options: this.mergedOptions(),
|
|
1278
|
-
caption: this.caption,
|
|
1279
1345
|
};
|
|
1280
1346
|
this.widgetInjector = Injector.create({
|
|
1281
1347
|
parent: this.injector,
|
|
@@ -1374,7 +1440,6 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1374
1440
|
const tokenValue = {
|
|
1375
1441
|
path: this.node.path,
|
|
1376
1442
|
options: this.mergedOptions(),
|
|
1377
|
-
caption: this.caption,
|
|
1378
1443
|
};
|
|
1379
1444
|
rowInjector = Injector.create({
|
|
1380
1445
|
parent: this.injector,
|
|
@@ -1407,7 +1472,6 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1407
1472
|
const tokenValue = {
|
|
1408
1473
|
path: this.node.path,
|
|
1409
1474
|
options: evaluatedOptions,
|
|
1410
|
-
caption: this.caption,
|
|
1411
1475
|
};
|
|
1412
1476
|
const newInjector = Injector.create({
|
|
1413
1477
|
parent: this.injector,
|
|
@@ -1434,7 +1498,6 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1434
1498
|
const tokenValue = {
|
|
1435
1499
|
path: this.node.path,
|
|
1436
1500
|
options: this.mergedOptions(),
|
|
1437
|
-
caption: this.caption,
|
|
1438
1501
|
};
|
|
1439
1502
|
rowInjector = Injector.create({
|
|
1440
1503
|
parent: this.injector,
|
|
@@ -1451,8 +1514,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1451
1514
|
}
|
|
1452
1515
|
return rowInjector;
|
|
1453
1516
|
}
|
|
1454
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1455
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1517
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1518
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AXPWidgetColumnRendererComponent, isStandalone: false, selector: "axp-widget-column-renderer", inputs: { caption: "caption", customExpandIcon: "customExpandIcon", customCollapseIcon: "customCollapseIcon", customWidth: "customWidth", node: "node", footerTemplate: "footerTemplate", expandHandler: "expandHandler", cellTemplate: "cellTemplate", headerTemplate: "headerTemplate" }, providers: [
|
|
1456
1519
|
AXPWidgetCoreService,
|
|
1457
1520
|
{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
|
|
1458
1521
|
], 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: `
|
|
@@ -1494,9 +1557,9 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1494
1557
|
</div>
|
|
1495
1558
|
</ng-template>
|
|
1496
1559
|
<ng-template #footer></ng-template>
|
|
1497
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1560
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1498
1561
|
}
|
|
1499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
|
|
1500
1563
|
type: Component,
|
|
1501
1564
|
args: [{
|
|
1502
1565
|
selector: 'axp-widget-column-renderer',
|
|
@@ -1584,15 +1647,15 @@ class AXPWidgetContainerComponent {
|
|
|
1584
1647
|
this.builderService.setFunctions(v);
|
|
1585
1648
|
}
|
|
1586
1649
|
constructor() {
|
|
1587
|
-
this.contextService = inject(
|
|
1650
|
+
this.contextService = inject(AXPWidgetCoreContextStore);
|
|
1588
1651
|
this.builderService = inject(AXPWidgetCoreService);
|
|
1589
1652
|
this.onContextChanged = new EventEmitter();
|
|
1590
1653
|
this.status = computed(() => {
|
|
1591
1654
|
return this.builderService.status();
|
|
1592
|
-
}, ...(ngDevMode ? [{ debugName: "status" }] :
|
|
1655
|
+
}, ...(ngDevMode ? [{ debugName: "status" }] : []));
|
|
1593
1656
|
this.isBusy = computed(() => {
|
|
1594
1657
|
return this.builderService.isBusy();
|
|
1595
|
-
}, ...(ngDevMode ? [{ debugName: "isBusy" }] :
|
|
1658
|
+
}, ...(ngDevMode ? [{ debugName: "isBusy" }] : []));
|
|
1596
1659
|
effect(() => {
|
|
1597
1660
|
if (this.contextService.isChanged()) {
|
|
1598
1661
|
this.onContextChanged.emit(this.contextService.changeEvent());
|
|
@@ -1605,17 +1668,17 @@ class AXPWidgetContainerComponent {
|
|
|
1605
1668
|
find(name) {
|
|
1606
1669
|
return this.builderService.waitForWidget(name);
|
|
1607
1670
|
}
|
|
1608
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1609
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1671
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1672
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: AXPWidgetContainerComponent, isStandalone: false, selector: "axp-widgets-container", inputs: { context: "context", functions: "functions" }, outputs: { onContextChanged: "onContextChanged" }, host: { styleAttribute: "display: contents;" }, providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1610
1673
|
}
|
|
1611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetContainerComponent, decorators: [{
|
|
1612
1675
|
type: Component,
|
|
1613
1676
|
args: [{
|
|
1614
1677
|
selector: 'axp-widgets-container',
|
|
1615
1678
|
template: `<ng-content></ng-content>`,
|
|
1616
1679
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1617
1680
|
host: { style: 'display: contents;' },
|
|
1618
|
-
providers: [AXPWidgetCoreService,
|
|
1681
|
+
providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore],
|
|
1619
1682
|
standalone: false,
|
|
1620
1683
|
}]
|
|
1621
1684
|
}], ctorParameters: () => [], propDecorators: { onContextChanged: [{
|
|
@@ -1627,12 +1690,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1627
1690
|
}] } });
|
|
1628
1691
|
|
|
1629
1692
|
class AXPWidgetPlaceholderComponent {
|
|
1630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1631
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1693
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1694
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: AXPWidgetPlaceholderComponent, isStandalone: true, selector: "axp-widget-placeholder", ngImport: i0, template: `<div>
|
|
1632
1695
|
<ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
|
|
1633
1696
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1634
1697
|
}
|
|
1635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetPlaceholderComponent, decorators: [{
|
|
1636
1699
|
type: Component,
|
|
1637
1700
|
args: [{
|
|
1638
1701
|
selector: 'axp-widget-placeholder',
|
|
@@ -1649,11 +1712,11 @@ class AXPWidgetRendererDirective {
|
|
|
1649
1712
|
//#endregion
|
|
1650
1713
|
//#endregion
|
|
1651
1714
|
constructor() {
|
|
1652
|
-
this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] :
|
|
1653
|
-
this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] :
|
|
1654
|
-
this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] :
|
|
1655
|
-
this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] :
|
|
1656
|
-
this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] :
|
|
1715
|
+
this.parentNode = input(...(ngDevMode ? [undefined, { debugName: "parentNode" }] : []));
|
|
1716
|
+
this.index = input(...(ngDevMode ? [undefined, { debugName: "index" }] : []));
|
|
1717
|
+
this.mode = input.required(...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
1718
|
+
this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
1719
|
+
this._options = signal({}, ...(ngDevMode ? [{ debugName: "_options" }] : []));
|
|
1657
1720
|
this.options = this._options.asReadonly();
|
|
1658
1721
|
this.onOptionsChanged = output();
|
|
1659
1722
|
this.onValueChanged = output();
|
|
@@ -1662,22 +1725,22 @@ class AXPWidgetRendererDirective {
|
|
|
1662
1725
|
/**
|
|
1663
1726
|
* Signal that emits the component reference when it's ready
|
|
1664
1727
|
*/
|
|
1665
|
-
this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] :
|
|
1728
|
+
this._componentRefSignal = signal(null, ...(ngDevMode ? [{ debugName: "_componentRefSignal" }] : []));
|
|
1666
1729
|
this.componentRefSignal = this._componentRefSignal.asReadonly();
|
|
1667
1730
|
//#endregion
|
|
1668
1731
|
//#region ---- Properties ----
|
|
1669
|
-
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] :
|
|
1732
|
+
this.mergedOptions = signal({}, ...(ngDevMode ? [{ debugName: "mergedOptions" }] : []));
|
|
1670
1733
|
this.injector = inject(Injector);
|
|
1671
1734
|
this.builderService = inject(AXPWidgetCoreService);
|
|
1672
|
-
this.contextService = inject(
|
|
1735
|
+
this.contextService = inject(AXPWidgetCoreContextStore);
|
|
1673
1736
|
this.widgetRegistery = inject(AXPWidgetRegistryService);
|
|
1674
1737
|
this.unsubscriber = inject(AXUnsubscriber);
|
|
1675
1738
|
this.translateService = inject(AXTranslationService);
|
|
1676
1739
|
this.widgetService = inject(AXPWidgetRegistryService);
|
|
1677
1740
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1678
1741
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
1679
|
-
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] :
|
|
1680
|
-
this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] :
|
|
1742
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
1743
|
+
this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
|
|
1681
1744
|
this.expressionEvaluators = new Map();
|
|
1682
1745
|
this.renderTimeoutId = null;
|
|
1683
1746
|
this.hasInitialRender = false;
|
|
@@ -1855,88 +1918,77 @@ class AXPWidgetRendererDirective {
|
|
|
1855
1918
|
}
|
|
1856
1919
|
return false;
|
|
1857
1920
|
}
|
|
1858
|
-
/**
|
|
1859
|
-
* True when a context store path used in an expression (`context.eval`, `context.options`) is
|
|
1860
|
-
* affected by `changedPath`.
|
|
1861
|
-
*/
|
|
1862
|
-
contextStorePathDependsOnChangedPath(evalPath, changedPath) {
|
|
1863
|
-
const normalizePath = (p) => {
|
|
1864
|
-
if (!p)
|
|
1865
|
-
return p;
|
|
1866
|
-
const parts = p.split('.');
|
|
1867
|
-
const last = parts[parts.length - 1];
|
|
1868
|
-
if (last && last.endsWith('Id')) {
|
|
1869
|
-
parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
|
|
1870
|
-
}
|
|
1871
|
-
return parts.join('.');
|
|
1872
|
-
};
|
|
1873
|
-
const isSegmentSuffix = (a, b) => {
|
|
1874
|
-
if (!a || !b)
|
|
1875
|
-
return false;
|
|
1876
|
-
const pa = a.split('.');
|
|
1877
|
-
const pb = b.split('.');
|
|
1878
|
-
if (pb.length > pa.length)
|
|
1879
|
-
return false;
|
|
1880
|
-
for (let i = 1; i <= pb.length; i++) {
|
|
1881
|
-
if (pa[pa.length - i] !== pb[pb.length - i])
|
|
1882
|
-
return false;
|
|
1883
|
-
}
|
|
1884
|
-
return true;
|
|
1885
|
-
};
|
|
1886
|
-
const evalNorm = normalizePath(evalPath);
|
|
1887
|
-
const changedNorm = normalizePath(changedPath);
|
|
1888
|
-
const rawMatch = evalPath === changedPath ||
|
|
1889
|
-
evalPath.startsWith(changedPath + '.') ||
|
|
1890
|
-
changedPath.startsWith(evalPath + '.') ||
|
|
1891
|
-
isSegmentSuffix(evalPath, changedPath) ||
|
|
1892
|
-
isSegmentSuffix(changedPath, evalPath);
|
|
1893
|
-
const normMatch = evalNorm === changedNorm ||
|
|
1894
|
-
evalNorm.startsWith(changedNorm + '.') ||
|
|
1895
|
-
changedNorm.startsWith(evalNorm + '.') ||
|
|
1896
|
-
isSegmentSuffix(evalNorm, changedNorm) ||
|
|
1897
|
-
isSegmentSuffix(changedNorm, evalNorm);
|
|
1898
|
-
if (rawMatch || normMatch) {
|
|
1899
|
-
return true;
|
|
1900
|
-
}
|
|
1901
|
-
return this.isPathAlias(evalPath, changedPath);
|
|
1902
|
-
}
|
|
1903
|
-
/**
|
|
1904
|
-
* Whether an expression template string reads context store paths affected by `changedPath`.
|
|
1905
|
-
*/
|
|
1906
|
-
expressionTextDependsOnContextPath(expressionValue, changedPath) {
|
|
1907
|
-
const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
|
|
1908
|
-
let match;
|
|
1909
|
-
while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
|
|
1910
|
-
if (this.contextStorePathDependsOnChangedPath(match[1], changedPath)) {
|
|
1911
|
-
return true;
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
const contextOptionsQuoted = /context\.options\(\s*['"]([^'"]*)['"]\s*\)/g;
|
|
1915
|
-
while ((match = contextOptionsQuoted.exec(expressionValue)) !== null) {
|
|
1916
|
-
const sub = match[1];
|
|
1917
|
-
const evalPath = sub === '' ? 'options' : `options.${sub}`;
|
|
1918
|
-
if (this.contextStorePathDependsOnChangedPath(evalPath, changedPath)) {
|
|
1919
|
-
return true;
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
const contextOptionsEmpty = /context\.options\(\s*\)/g;
|
|
1923
|
-
while ((match = contextOptionsEmpty.exec(expressionValue)) !== null) {
|
|
1924
|
-
if (this.contextStorePathDependsOnChangedPath('options', changedPath)) {
|
|
1925
|
-
return true;
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
return false;
|
|
1929
|
-
}
|
|
1930
1921
|
hasExpressionDependency(changedPath) {
|
|
1922
|
+
// Check if any cached expressions depend on the changed path
|
|
1931
1923
|
for (const [path, evaluator] of this.expressionEvaluators) {
|
|
1924
|
+
// Check if the expression path itself contains the changed path
|
|
1932
1925
|
if (path.includes(changedPath)) {
|
|
1933
1926
|
return true;
|
|
1934
1927
|
}
|
|
1928
|
+
// Parse the actual expression content to check for context.eval() calls
|
|
1929
|
+
// We need to get the original expression string to analyze it
|
|
1935
1930
|
const node = this.node();
|
|
1936
1931
|
const expressionValue = this.getExpressionValueFromNode(node, path);
|
|
1937
1932
|
if (expressionValue && typeof expressionValue === 'string') {
|
|
1938
|
-
|
|
1939
|
-
|
|
1933
|
+
// Look for context.eval() calls that reference the changed path
|
|
1934
|
+
const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
|
|
1935
|
+
let match;
|
|
1936
|
+
while ((match = contextEvalRegex.exec(expressionValue)) !== null) {
|
|
1937
|
+
const evalPath = match[1];
|
|
1938
|
+
// Normalize Id-suffixed segments to dot-id form (e.g., 'typeId' -> 'type.id', 'person.typeId' -> 'person.type.id')
|
|
1939
|
+
const normalizePath = (p) => {
|
|
1940
|
+
if (!p)
|
|
1941
|
+
return p;
|
|
1942
|
+
const parts = p.split('.');
|
|
1943
|
+
const last = parts[parts.length - 1];
|
|
1944
|
+
if (last && last.endsWith('Id')) {
|
|
1945
|
+
parts.splice(parts.length - 1, 1, last.slice(0, -2), 'id');
|
|
1946
|
+
}
|
|
1947
|
+
return parts.join('.');
|
|
1948
|
+
};
|
|
1949
|
+
const isSegmentSuffix = (a, b) => {
|
|
1950
|
+
if (!a || !b)
|
|
1951
|
+
return false;
|
|
1952
|
+
const pa = a.split('.');
|
|
1953
|
+
const pb = b.split('.');
|
|
1954
|
+
if (pb.length > pa.length)
|
|
1955
|
+
return false;
|
|
1956
|
+
for (let i = 1; i <= pb.length; i++) {
|
|
1957
|
+
if (pa[pa.length - i] !== pb[pb.length - i])
|
|
1958
|
+
return false;
|
|
1959
|
+
}
|
|
1960
|
+
return true;
|
|
1961
|
+
};
|
|
1962
|
+
const evalNorm = normalizePath(evalPath);
|
|
1963
|
+
const changedNorm = normalizePath(changedPath);
|
|
1964
|
+
// Debug log for dependency check
|
|
1965
|
+
// console.log(
|
|
1966
|
+
// `🧭 [${this.node().type}] dep-check expr='${path}', changed='${changedPath}', eval='${evalPath}', evalNorm='${evalNorm}', changedNorm='${changedNorm}'`,
|
|
1967
|
+
// );
|
|
1968
|
+
// Generic direct and hierarchical dependency checks (raw and normalized)
|
|
1969
|
+
const rawMatch = evalPath === changedPath ||
|
|
1970
|
+
evalPath.startsWith(changedPath + '.') ||
|
|
1971
|
+
changedPath.startsWith(evalPath + '.') ||
|
|
1972
|
+
isSegmentSuffix(evalPath, changedPath) ||
|
|
1973
|
+
isSegmentSuffix(changedPath, evalPath);
|
|
1974
|
+
const normMatch = evalNorm === changedNorm ||
|
|
1975
|
+
evalNorm.startsWith(changedNorm + '.') ||
|
|
1976
|
+
changedNorm.startsWith(evalNorm + '.') ||
|
|
1977
|
+
isSegmentSuffix(evalNorm, changedNorm) ||
|
|
1978
|
+
isSegmentSuffix(changedNorm, evalNorm);
|
|
1979
|
+
if (rawMatch || normMatch) {
|
|
1980
|
+
// console.log(
|
|
1981
|
+
// `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (generic match)`,
|
|
1982
|
+
// );
|
|
1983
|
+
return true;
|
|
1984
|
+
}
|
|
1985
|
+
// Check for path aliases/mappings (e.g., typeId.id <-> type.id)
|
|
1986
|
+
if (this.isPathAlias(evalPath, changedPath)) {
|
|
1987
|
+
// console.log(
|
|
1988
|
+
// `🔍 [${this.node().type}] Expression '${path}' depends on '${changedPath}' via context.eval('${evalPath}') (path alias)`,
|
|
1989
|
+
// );
|
|
1990
|
+
return true;
|
|
1991
|
+
}
|
|
1940
1992
|
}
|
|
1941
1993
|
}
|
|
1942
1994
|
}
|
|
@@ -2023,8 +2075,20 @@ class AXPWidgetRendererDirective {
|
|
|
2023
2075
|
const visibility = node.options?.['visible'] || this.mergedOptions()?.visible;
|
|
2024
2076
|
if (!visibility || typeof visibility !== 'string')
|
|
2025
2077
|
return false;
|
|
2078
|
+
// Check if visibility expression depends on the changed path
|
|
2026
2079
|
if (this.expressionEvaluator.isExpression(visibility)) {
|
|
2027
|
-
|
|
2080
|
+
// Parse the visibility expression to check for context.eval() calls
|
|
2081
|
+
const contextEvalRegex = /context\.eval\(['"]([^'\"]+)['"]\)/g;
|
|
2082
|
+
let match;
|
|
2083
|
+
while ((match = contextEvalRegex.exec(visibility)) !== null) {
|
|
2084
|
+
const evalPath = match[1];
|
|
2085
|
+
// Check for direct or hierarchical dependency
|
|
2086
|
+
if (evalPath === changedPath ||
|
|
2087
|
+
evalPath.startsWith(changedPath + '.') ||
|
|
2088
|
+
changedPath.startsWith(evalPath + '.')) {
|
|
2089
|
+
return true;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2028
2092
|
}
|
|
2029
2093
|
return false;
|
|
2030
2094
|
}
|
|
@@ -2440,46 +2504,34 @@ class AXPWidgetRendererDirective {
|
|
|
2440
2504
|
isDirty: () => {
|
|
2441
2505
|
return this.contextService.isDirty();
|
|
2442
2506
|
},
|
|
2443
|
-
/**
|
|
2444
|
-
* Host/widget-under-edit `options` from the shared context store (same values as
|
|
2445
|
-
* `context.eval('options' + (path ? '.' + path : ''))`), not `widget.options` on the nested
|
|
2446
|
-
* property field instance. Uses one `getValue` so smart-path behavior matches `context.eval`.
|
|
2447
|
-
*/
|
|
2448
|
-
options: (path) => {
|
|
2449
|
-
if (path == null || path === '') {
|
|
2450
|
-
return this.contextService.getValue('options');
|
|
2451
|
-
}
|
|
2452
|
-
return this.contextService.getValue(`options.${path}`);
|
|
2453
|
-
},
|
|
2454
2507
|
};
|
|
2455
2508
|
}
|
|
2456
2509
|
getEventScope() {
|
|
2457
2510
|
return {
|
|
2458
|
-
context: (
|
|
2511
|
+
context: (path) => {
|
|
2459
2512
|
return this.onContextChanged.pipe(filter((c) => {
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
if (activePaths.length === 0) {
|
|
2513
|
+
// If no path filter specified, pass all events
|
|
2514
|
+
if (path == null || path === '') {
|
|
2463
2515
|
return true;
|
|
2464
2516
|
}
|
|
2465
2517
|
// Ensure c.path exists
|
|
2466
2518
|
if (!c.path) {
|
|
2467
2519
|
return false;
|
|
2468
2520
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2521
|
+
// Pattern: "prefix*" - matches paths that start with prefix
|
|
2522
|
+
if (path.endsWith('*')) {
|
|
2523
|
+
const prefix = path.substring(0, path.length - 1);
|
|
2524
|
+
return c.path.startsWith(prefix);
|
|
2525
|
+
}
|
|
2526
|
+
// Pattern: "*suffix" - matches paths that end with suffix
|
|
2527
|
+
else if (path.startsWith('*')) {
|
|
2528
|
+
const suffix = path.substring(1);
|
|
2529
|
+
return c.path.endsWith(suffix);
|
|
2530
|
+
}
|
|
2531
|
+
// Exact match
|
|
2532
|
+
else {
|
|
2481
2533
|
return c.path === path;
|
|
2482
|
-
}
|
|
2534
|
+
}
|
|
2483
2535
|
}));
|
|
2484
2536
|
},
|
|
2485
2537
|
from: (event) => get(this.instance.api(), event),
|
|
@@ -2490,16 +2542,6 @@ class AXPWidgetRendererDirective {
|
|
|
2490
2542
|
}
|
|
2491
2543
|
getWidgetScope() {
|
|
2492
2544
|
return {
|
|
2493
|
-
/** Resolved options for this renderer's widget instance (not the host / property-viewer target). */
|
|
2494
|
-
options: (path) => {
|
|
2495
|
-
const opts = this.instance && typeof this.instance.options === 'function'
|
|
2496
|
-
? this.instance.options()
|
|
2497
|
-
: this.mergedOptions();
|
|
2498
|
-
if (path == null || path === '') {
|
|
2499
|
-
return opts;
|
|
2500
|
-
}
|
|
2501
|
-
return getSmart(opts, path);
|
|
2502
|
-
},
|
|
2503
2545
|
call: (name, ...args) => {
|
|
2504
2546
|
this.instance.call(name, ...args);
|
|
2505
2547
|
},
|
|
@@ -2605,14 +2647,14 @@ class AXPWidgetRendererDirective {
|
|
|
2605
2647
|
// console.error('Error evaluating action expression:', templateExpression, error);
|
|
2606
2648
|
}
|
|
2607
2649
|
}
|
|
2608
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2609
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2650
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetRendererDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2651
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.19", 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: [
|
|
2610
2652
|
{
|
|
2611
2653
|
provide: AXUnsubscriber,
|
|
2612
2654
|
},
|
|
2613
2655
|
], exportAs: ["widgetRenderer"], usesOnChanges: true, ngImport: i0 }); }
|
|
2614
2656
|
}
|
|
2615
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetRendererDirective, decorators: [{
|
|
2616
2658
|
type: Directive,
|
|
2617
2659
|
args: [{
|
|
2618
2660
|
selector: '[axp-widget-renderer]',
|
|
@@ -2628,53 +2670,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2628
2670
|
|
|
2629
2671
|
const COMPONENTS = [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective];
|
|
2630
2672
|
class AXPWidgetCoreModule {
|
|
2631
|
-
static
|
|
2632
|
-
|
|
2633
|
-
|
|
2673
|
+
static forRoot(config) {
|
|
2674
|
+
return {
|
|
2675
|
+
ngModule: AXPWidgetCoreModule,
|
|
2676
|
+
providers: [
|
|
2677
|
+
{
|
|
2678
|
+
provide: 'AXPWidgetCoreModuleFactory',
|
|
2679
|
+
useFactory: (registry) => async () => {
|
|
2680
|
+
await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
|
|
2681
|
+
await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
|
|
2682
|
+
},
|
|
2683
|
+
deps: [AXPWidgetRegistryService],
|
|
2684
|
+
multi: true,
|
|
2685
|
+
},
|
|
2686
|
+
],
|
|
2687
|
+
};
|
|
2688
|
+
}
|
|
2689
|
+
static forChild(config) {
|
|
2690
|
+
return {
|
|
2691
|
+
ngModule: AXPWidgetCoreModule,
|
|
2692
|
+
providers: [
|
|
2693
|
+
{
|
|
2694
|
+
provide: 'AXPWidgetCoreModuleFactory',
|
|
2695
|
+
useFactory: (registry) => async () => {
|
|
2696
|
+
await Promise.all(config?.widgets?.map((w) => Promise.resolve(registry.register(w))) || []);
|
|
2697
|
+
await Promise.all(config?.extendedWidgets?.map((ew) => Promise.resolve(registry.extend(ew.parentName, ew.widget))) || []);
|
|
2698
|
+
},
|
|
2699
|
+
deps: [AXPWidgetRegistryService],
|
|
2700
|
+
multi: true,
|
|
2701
|
+
},
|
|
2702
|
+
],
|
|
2703
|
+
};
|
|
2704
|
+
}
|
|
2705
|
+
/**
|
|
2706
|
+
* @ignore
|
|
2707
|
+
*/
|
|
2708
|
+
constructor(instances) {
|
|
2709
|
+
instances?.forEach((f) => {
|
|
2710
|
+
f();
|
|
2711
|
+
});
|
|
2712
|
+
}
|
|
2713
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreModule, deps: [{ token: 'AXPWidgetCoreModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2714
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
|
|
2715
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule] }); }
|
|
2634
2716
|
}
|
|
2635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPWidgetCoreModule, decorators: [{
|
|
2636
2718
|
type: NgModule,
|
|
2637
2719
|
args: [{
|
|
2638
|
-
imports: [CommonModule, PortalModule, AXSkeletonModule, AXTranslationModule],
|
|
2720
|
+
imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule],
|
|
2639
2721
|
exports: [...COMPONENTS],
|
|
2640
2722
|
declarations: [...COMPONENTS],
|
|
2641
|
-
providers: [],
|
|
2642
2723
|
}]
|
|
2643
|
-
}]
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
* the layout property viewer (`AXPPropertyViewerService` and `buildPropertyViewerTabsFromProperties`).
|
|
2650
|
-
*/
|
|
2651
|
-
function mapAXPPropertyToWidgetProperty(property, options) {
|
|
2652
|
-
const { group, order, valuePathPrefix, resolveTitle, resolveDescription } = options;
|
|
2653
|
-
const path = valuePathPrefix ? `${valuePathPrefix}.${property.name}` : property.name;
|
|
2654
|
-
const iface = property.interface;
|
|
2655
|
-
const widgetType = iface?.type ?? 'text-editor';
|
|
2656
|
-
const description = resolveDescription?.(property);
|
|
2657
|
-
return {
|
|
2658
|
-
name: property.name,
|
|
2659
|
-
title: resolveTitle(property),
|
|
2660
|
-
...(description !== undefined && description !== '' ? { description } : {}),
|
|
2661
|
-
group,
|
|
2662
|
-
order,
|
|
2663
|
-
schema: {
|
|
2664
|
-
dataType: property.dataType,
|
|
2665
|
-
interface: {
|
|
2666
|
-
path,
|
|
2667
|
-
name: property.name,
|
|
2668
|
-
type: widgetType,
|
|
2669
|
-
options: iface?.options ?? {},
|
|
2670
|
-
...(iface?.triggers ? { triggers: iface.triggers } : {}),
|
|
2671
|
-
},
|
|
2672
|
-
},
|
|
2673
|
-
validations: property.validations,
|
|
2674
|
-
visible: true,
|
|
2675
|
-
};
|
|
2676
|
-
}
|
|
2677
|
-
//#endregion
|
|
2724
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2725
|
+
type: Optional
|
|
2726
|
+
}, {
|
|
2727
|
+
type: Inject,
|
|
2728
|
+
args: ['AXPWidgetCoreModuleFactory']
|
|
2729
|
+
}] }] });
|
|
2678
2730
|
|
|
2679
2731
|
class AXPPropertyEditorHelper {
|
|
2680
2732
|
static expandShorthand(values) {
|
|
@@ -2958,148 +3010,31 @@ class AXPWidgetSerializationHelper {
|
|
|
2958
3010
|
}
|
|
2959
3011
|
//#endregion
|
|
2960
3012
|
|
|
2961
|
-
//#region ---- Editor sub-categories (widget picker) ----
|
|
2962
|
-
const AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS = {
|
|
2963
|
-
name: 'editor-text-inputs',
|
|
2964
|
-
order: 1,
|
|
2965
|
-
title: '@platform-layout-widgets:subcategories.editor-text-inputs.title',
|
|
2966
|
-
};
|
|
2967
|
-
const AXP_WIDGETS_EDITOR_SUB_NUMERIC = {
|
|
2968
|
-
name: 'editor-numeric',
|
|
2969
|
-
order: 2,
|
|
2970
|
-
title: '@platform-layout-widgets:subcategories.editor-numeric.title',
|
|
2971
|
-
};
|
|
2972
|
-
const AXP_WIDGETS_EDITOR_SUB_DATETIME = {
|
|
2973
|
-
name: 'editor-datetime',
|
|
2974
|
-
order: 3,
|
|
2975
|
-
title: '@platform-layout-widgets:subcategories.editor-datetime.title',
|
|
2976
|
-
};
|
|
2977
|
-
const AXP_WIDGETS_EDITOR_SUB_CHOICE = {
|
|
2978
|
-
name: 'editor-choice',
|
|
2979
|
-
order: 4,
|
|
2980
|
-
title: '@platform-layout-widgets:subcategories.editor-choice.title',
|
|
2981
|
-
};
|
|
2982
|
-
const AXP_WIDGETS_EDITOR_SUB_RICH = {
|
|
2983
|
-
name: 'editor-rich',
|
|
2984
|
-
order: 5,
|
|
2985
|
-
title: '@platform-layout-widgets:subcategories.editor-rich.title',
|
|
2986
|
-
};
|
|
2987
|
-
const AXP_WIDGETS_EDITOR_SUB_VISUAL = {
|
|
2988
|
-
name: 'editor-visual',
|
|
2989
|
-
order: 6,
|
|
2990
|
-
title: '@platform-layout-widgets:subcategories.editor-visual.title',
|
|
2991
|
-
};
|
|
2992
|
-
const AXP_WIDGETS_EDITOR_SUB_COMPOSITE = {
|
|
2993
|
-
name: 'editor-composite',
|
|
2994
|
-
order: 7,
|
|
2995
|
-
title: '@platform-layout-widgets:subcategories.editor-composite.title',
|
|
2996
|
-
};
|
|
2997
|
-
const AXP_WIDGETS_EDITOR_SUB_CONFIG = {
|
|
2998
|
-
name: 'editor-config',
|
|
2999
|
-
order: 8,
|
|
3000
|
-
title: '@platform-layout-widgets:subcategories.editor-config.title',
|
|
3001
|
-
};
|
|
3002
|
-
//#endregion
|
|
3003
|
-
//#region ---- Layout sub-categories (widget picker) ----
|
|
3004
|
-
const AXP_WIDGETS_LAYOUT_SUB_SHELL = {
|
|
3005
|
-
name: 'layout-shell',
|
|
3006
|
-
order: 1,
|
|
3007
|
-
title: '@platform-layout-widgets:subcategories.layout-shell.title',
|
|
3008
|
-
};
|
|
3009
|
-
const AXP_WIDGETS_LAYOUT_SUB_GRID = {
|
|
3010
|
-
name: 'layout-grid',
|
|
3011
|
-
order: 2,
|
|
3012
|
-
title: '@platform-layout-widgets:subcategories.layout-grid.title',
|
|
3013
|
-
};
|
|
3014
|
-
const AXP_WIDGETS_LAYOUT_SUB_SURFACES = {
|
|
3015
|
-
name: 'layout-surfaces',
|
|
3016
|
-
order: 3,
|
|
3017
|
-
title: '@platform-layout-widgets:subcategories.layout-surfaces.title',
|
|
3018
|
-
};
|
|
3019
|
-
const AXP_WIDGETS_LAYOUT_SUB_TABS = {
|
|
3020
|
-
name: 'layout-tabs',
|
|
3021
|
-
order: 4,
|
|
3022
|
-
title: '@platform-layout-widgets:subcategories.layout-tabs.title',
|
|
3023
|
-
};
|
|
3024
|
-
const AXP_WIDGETS_LAYOUT_SUB_LISTS = {
|
|
3025
|
-
name: 'layout-lists',
|
|
3026
|
-
order: 5,
|
|
3027
|
-
title: '@platform-layout-widgets:subcategories.layout-lists.title',
|
|
3028
|
-
};
|
|
3029
|
-
const AXP_WIDGETS_LAYOUT_SUB_UTILITY = {
|
|
3030
|
-
name: 'layout-utility',
|
|
3031
|
-
order: 6,
|
|
3032
|
-
title: '@platform-layout-widgets:subcategories.layout-utility.title',
|
|
3033
|
-
};
|
|
3034
|
-
//#endregion
|
|
3035
|
-
//#region ---- Action sub-categories (widget picker) ----
|
|
3036
|
-
const AXP_WIDGETS_ACTION_SUB_CONTROLS = {
|
|
3037
|
-
name: 'action-controls',
|
|
3038
|
-
order: 1,
|
|
3039
|
-
title: '@platform-layout-widgets:subcategories.action-controls.title',
|
|
3040
|
-
};
|
|
3041
|
-
//#endregion
|
|
3042
|
-
//#region ---- Advance sub-categories (widget picker) ----
|
|
3043
|
-
const AXP_WIDGETS_ADVANCE_SUB_MEDIA = {
|
|
3044
|
-
name: 'advance-media',
|
|
3045
|
-
order: 1,
|
|
3046
|
-
title: '@platform-layout-widgets:subcategories.advance-media.title',
|
|
3047
|
-
};
|
|
3048
|
-
const AXP_WIDGETS_ADVANCE_SUB_INPUT = {
|
|
3049
|
-
name: 'advance-input',
|
|
3050
|
-
order: 2,
|
|
3051
|
-
title: '@platform-layout-widgets:subcategories.advance-input.title',
|
|
3052
|
-
};
|
|
3053
|
-
const AXP_WIDGETS_ADVANCE_SUB_DATA = {
|
|
3054
|
-
name: 'advance-data',
|
|
3055
|
-
order: 3,
|
|
3056
|
-
title: '@platform-layout-widgets:subcategories.advance-data.title',
|
|
3057
|
-
};
|
|
3058
|
-
const AXP_WIDGETS_ADVANCE_SUB_TOOLS = {
|
|
3059
|
-
name: 'advance-tools',
|
|
3060
|
-
order: 4,
|
|
3061
|
-
title: '@platform-layout-widgets:subcategories.advance-tools.title',
|
|
3062
|
-
};
|
|
3063
|
-
//#endregion
|
|
3064
|
-
/** Normalizes widget categories to an array for iteration and serialization. */
|
|
3065
|
-
function normalizeWidgetCategories(categories) {
|
|
3066
|
-
if (categories == null) {
|
|
3067
|
-
return [];
|
|
3068
|
-
}
|
|
3069
|
-
return Array.isArray(categories) ? categories : [categories];
|
|
3070
|
-
}
|
|
3071
3013
|
const AXP_WIDGETS_LAYOUT_CATEGORY = {
|
|
3072
3014
|
name: 'layout',
|
|
3073
3015
|
order: 1,
|
|
3074
|
-
title: '
|
|
3016
|
+
title: 'Layout',
|
|
3075
3017
|
};
|
|
3076
3018
|
const AXP_WIDGETS_EDITOR_CATEGORY = {
|
|
3077
3019
|
name: 'editor',
|
|
3078
3020
|
order: 2,
|
|
3079
|
-
title: '
|
|
3021
|
+
title: 'Editors',
|
|
3080
3022
|
};
|
|
3081
3023
|
const AXP_WIDGETS_ACTION_CATEGORY = {
|
|
3082
3024
|
name: 'action',
|
|
3083
3025
|
order: 3,
|
|
3084
|
-
title: '
|
|
3026
|
+
title: 'Action',
|
|
3085
3027
|
};
|
|
3086
3028
|
const AXP_WIDGETS_ADVANCE_CATEGORY = {
|
|
3087
3029
|
name: 'advance',
|
|
3088
3030
|
order: 4,
|
|
3089
|
-
title: '
|
|
3090
|
-
};
|
|
3091
|
-
/** AI category tab in the widget picker (metadata); unrelated to Widgets:GetForAI listing scope. */
|
|
3092
|
-
const AXP_WIDGETS_AI_CATEGORY = {
|
|
3093
|
-
name: 'ai',
|
|
3094
|
-
order: 5,
|
|
3095
|
-
title: '@platform-layout-widgets:categories.ai.title',
|
|
3031
|
+
title: 'Advance',
|
|
3096
3032
|
};
|
|
3097
3033
|
const AXP_WIDGETS_CATEGORIES = [
|
|
3098
3034
|
AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
3099
3035
|
AXP_WIDGETS_EDITOR_CATEGORY,
|
|
3100
3036
|
AXP_WIDGETS_ACTION_CATEGORY,
|
|
3101
3037
|
AXP_WIDGETS_ADVANCE_CATEGORY,
|
|
3102
|
-
AXP_WIDGETS_AI_CATEGORY,
|
|
3103
3038
|
];
|
|
3104
3039
|
|
|
3105
3040
|
var AXPWidgetGroupEnum;
|
|
@@ -3112,12 +3047,11 @@ var AXPWidgetGroupEnum;
|
|
|
3112
3047
|
AXPWidgetGroupEnum["SettingWidget"] = "setting-widget";
|
|
3113
3048
|
AXPWidgetGroupEnum["EntityWidget"] = "entity-widget";
|
|
3114
3049
|
AXPWidgetGroupEnum["UtilityWidget"] = "utility-widget";
|
|
3115
|
-
AXPWidgetGroupEnum["BaseWidget"] = "base-widget";
|
|
3116
3050
|
})(AXPWidgetGroupEnum || (AXPWidgetGroupEnum = {}));
|
|
3117
3051
|
|
|
3118
3052
|
/**
|
|
3119
3053
|
* Generated bundle index. Do not edit.
|
|
3120
3054
|
*/
|
|
3121
3055
|
|
|
3122
|
-
export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY,
|
|
3056
|
+
export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreContextChangeEvent, AXPWidgetCoreContextStore, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints };
|
|
3123
3057
|
//# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map
|