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