@acorex/platform 0.0.0-ACOREX
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/README.md +7 -0
- package/auth/README.md +3 -0
- package/common/README.md +3 -0
- package/core/README.md +4 -0
- package/fesm2022/acorex-platform-auth.mjs +1362 -0
- package/fesm2022/acorex-platform-auth.mjs.map +1 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs +127 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +4601 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -0
- package/fesm2022/acorex-platform-core.mjs +4374 -0
- package/fesm2022/acorex-platform-core.mjs.map +1 -0
- package/fesm2022/acorex-platform-domain.mjs +3234 -0
- package/fesm2022/acorex-platform-domain.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-builder.mjs +2847 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +8583 -0
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-designer.mjs +2474 -0
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +19150 -0
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-views.mjs +1468 -0
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2950 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs +72 -0
- 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-9uCkMxcc.mjs +158 -0
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs +29 -0
- 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-D10yO28c.mjs +172 -0
- 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-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs +274 -0
- 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-BNG_588B.mjs +64 -0
- 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-Vo4fWHtX.mjs +34 -0
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +29791 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -0
- package/fesm2022/acorex-platform-native.mjs +155 -0
- package/fesm2022/acorex-platform-native.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs +20 -0
- package/fesm2022/acorex-platform-runtime-catalog-command-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs +20 -0
- package/fesm2022/acorex-platform-runtime-catalog-query-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime.mjs +899 -0
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs +237 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs +31 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs +25 -0
- 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 +2589 -0
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs +55 -0
- 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-BOTuLdWN.mjs +57 -0
- 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 +168 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs +65 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs +64 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +2125 -0
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -0
- package/fesm2022/acorex-platform-workflow.mjs +2501 -0
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -0
- package/fesm2022/acorex-platform.mjs +6 -0
- package/fesm2022/acorex-platform.mjs.map +1 -0
- package/layout/builder/README.md +1578 -0
- package/layout/components/README.md +3 -0
- package/layout/designer/README.md +4 -0
- package/layout/entity/README.md +4 -0
- package/layout/views/README.md +3 -0
- package/layout/widget-core/README.md +4 -0
- package/layout/widgets/README.md +3 -0
- package/native/README.md +4 -0
- package/package.json +103 -0
- package/runtime/README.md +3 -0
- package/themes/default/README.md +3 -0
- package/themes/shared/README.md +3 -0
- package/types/acorex-platform-auth.d.ts +680 -0
- package/types/acorex-platform-common.d.ts +2926 -0
- package/types/acorex-platform-core.d.ts +2896 -0
- package/types/acorex-platform-domain.d.ts +2353 -0
- package/types/acorex-platform-layout-builder.d.ts +926 -0
- package/types/acorex-platform-layout-components.d.ts +2903 -0
- package/types/acorex-platform-layout-designer.d.ts +422 -0
- package/types/acorex-platform-layout-entity.d.ts +3189 -0
- package/types/acorex-platform-layout-views.d.ts +667 -0
- package/types/acorex-platform-layout-widget-core.d.ts +1086 -0
- package/types/acorex-platform-layout-widgets.d.ts +5478 -0
- package/types/acorex-platform-native.d.ts +28 -0
- package/types/acorex-platform-runtime-catalog-command-definition.d.ts +137 -0
- package/types/acorex-platform-runtime-catalog-query-definition.d.ts +125 -0
- package/types/acorex-platform-runtime.d.ts +470 -0
- package/types/acorex-platform-themes-default.d.ts +573 -0
- package/types/acorex-platform-themes-shared.d.ts +170 -0
- package/types/acorex-platform-workflow.d.ts +1806 -0
- package/types/acorex-platform.d.ts +2 -0
- package/workflow/README.md +4 -0
|
@@ -0,0 +1,926 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { AXFormComponent } from '@acorex/components/form';
|
|
5
|
+
import { AXValidationSummary } from '@acorex/core/validation';
|
|
6
|
+
import { AXPWidgetNode, AXPWidgetRenderMode, AXPWidgetContainerComponent, AXPWidgetCoreElementAction } from '@acorex/platform/layout/widget-core';
|
|
7
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
8
|
+
import { AXPopupSizeType } from '@acorex/components/popup';
|
|
9
|
+
import { AXStepWizardLook } from '@acorex/components/step-wizard';
|
|
10
|
+
import { AXPMultiLanguageString, AXPGridLayoutOptions, AXPExpression, AXPValidationRules, AXPOptionsData, AXPActionMenuItem, AXPContextChangeEvent, AXPExecuteCommandResult } from '@acorex/platform/core';
|
|
11
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
12
|
+
import { AXPCommand } from '@acorex/platform/runtime';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Extended widget node properties (excluding type, path, name, options, children)
|
|
16
|
+
* These properties can be passed as a third parameter to customWidget method
|
|
17
|
+
*/
|
|
18
|
+
type AXPWidgetNodeExtendedProperties = Omit<AXPWidgetNode, 'type' | 'path' | 'name' | 'options'>;
|
|
19
|
+
/**
|
|
20
|
+
* Form appearance and density styling (using fieldset widget look)
|
|
21
|
+
*/
|
|
22
|
+
type AXPDynamicFormLook = 'fieldset' | 'card' | 'group' | 'container';
|
|
23
|
+
/**
|
|
24
|
+
* Form rendering mode
|
|
25
|
+
*/
|
|
26
|
+
type AXPDynamicFormMode = 'view' | 'edit';
|
|
27
|
+
/**
|
|
28
|
+
* Form layout direction and flow
|
|
29
|
+
*/
|
|
30
|
+
type AXPDynamicFormDirection = 'vertical' | 'horizontal' | 'grid';
|
|
31
|
+
interface AXPDynamicFormFieldDefinition {
|
|
32
|
+
path: string;
|
|
33
|
+
title?: AXPMultiLanguageString;
|
|
34
|
+
badge?: string;
|
|
35
|
+
description?: AXPMultiLanguageString;
|
|
36
|
+
widget: AXPWidgetNode;
|
|
37
|
+
/**
|
|
38
|
+
* Optional per-field rendering mode. Takes precedence over section and form modes.
|
|
39
|
+
*/
|
|
40
|
+
mode?: AXPDynamicFormMode;
|
|
41
|
+
layout?: AXPGridLayoutOptions;
|
|
42
|
+
}
|
|
43
|
+
interface AXPDynamicFormGroupDefinition {
|
|
44
|
+
name: string;
|
|
45
|
+
title?: AXPMultiLanguageString;
|
|
46
|
+
description?: AXPMultiLanguageString;
|
|
47
|
+
parameters: AXPDynamicFormFieldDefinition[];
|
|
48
|
+
/**
|
|
49
|
+
* Optional per-section rendering mode. Takes precedence over form mode and is overridden by field mode.
|
|
50
|
+
*/
|
|
51
|
+
mode?: AXPDynamicFormMode;
|
|
52
|
+
/**
|
|
53
|
+
* Visual appearance of the group (fieldset, card, group, container)
|
|
54
|
+
*/
|
|
55
|
+
look?: 'fieldset' | 'card' | 'group' | 'container';
|
|
56
|
+
}
|
|
57
|
+
interface AXPDynamicFormDefinition {
|
|
58
|
+
groups: AXPDynamicFormGroupDefinition[];
|
|
59
|
+
/**
|
|
60
|
+
* Optional form-level rendering mode
|
|
61
|
+
*/
|
|
62
|
+
mode?: AXPDynamicFormMode;
|
|
63
|
+
}
|
|
64
|
+
interface AXPDialogRef {
|
|
65
|
+
/**
|
|
66
|
+
* Manually close the dialog (optional - dialog closes automatically after user interaction)
|
|
67
|
+
*/
|
|
68
|
+
close(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Get the form data from the dialog
|
|
71
|
+
*/
|
|
72
|
+
context(): any;
|
|
73
|
+
/**
|
|
74
|
+
* Get the action that was clicked by the user
|
|
75
|
+
*/
|
|
76
|
+
action(): string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Set the loading state of the dialog
|
|
79
|
+
*/
|
|
80
|
+
setLoading(loading: boolean): void;
|
|
81
|
+
}
|
|
82
|
+
interface LayoutWidgetOptions {
|
|
83
|
+
name?: string;
|
|
84
|
+
}
|
|
85
|
+
interface ValueWidgetOptions extends LayoutWidgetOptions {
|
|
86
|
+
path: string;
|
|
87
|
+
defaultValue?: any;
|
|
88
|
+
validations?: AXPValidationRules;
|
|
89
|
+
}
|
|
90
|
+
interface TextBoxOptions extends ValueWidgetOptions {
|
|
91
|
+
placeholder?: AXPMultiLanguageString;
|
|
92
|
+
maxLength?: number;
|
|
93
|
+
minLength?: number;
|
|
94
|
+
prefix?: string;
|
|
95
|
+
suffix?: string;
|
|
96
|
+
clearButton?: boolean;
|
|
97
|
+
}
|
|
98
|
+
interface NumberBoxOptions extends ValueWidgetOptions {
|
|
99
|
+
min?: number;
|
|
100
|
+
max?: number;
|
|
101
|
+
step?: number;
|
|
102
|
+
placeholder?: AXPMultiLanguageString;
|
|
103
|
+
format?: string;
|
|
104
|
+
}
|
|
105
|
+
interface SelectBoxOptions extends ValueWidgetOptions {
|
|
106
|
+
dataSource: any[] | (() => any[]) | (() => Promise<any[]>) | AXDataSource<any>;
|
|
107
|
+
valueField?: string;
|
|
108
|
+
textField?: string;
|
|
109
|
+
placeholder?: AXPMultiLanguageString;
|
|
110
|
+
multiple?: boolean;
|
|
111
|
+
searchable?: boolean;
|
|
112
|
+
clearButton?: boolean;
|
|
113
|
+
allowSearch?: boolean;
|
|
114
|
+
}
|
|
115
|
+
interface DateTimeBoxOptions extends ValueWidgetOptions {
|
|
116
|
+
type?: 'date' | 'time' | 'datetime';
|
|
117
|
+
format?: string;
|
|
118
|
+
min?: Date | string;
|
|
119
|
+
max?: Date | string;
|
|
120
|
+
placeholder?: AXPMultiLanguageString;
|
|
121
|
+
clearButton?: boolean;
|
|
122
|
+
}
|
|
123
|
+
interface ToggleSwitchOptions extends ValueWidgetOptions {
|
|
124
|
+
label?: string;
|
|
125
|
+
trueText?: string;
|
|
126
|
+
falseText?: string;
|
|
127
|
+
}
|
|
128
|
+
interface LargeTextBoxOptions extends ValueWidgetOptions {
|
|
129
|
+
rows?: number;
|
|
130
|
+
maxLength?: number;
|
|
131
|
+
minLength?: number;
|
|
132
|
+
placeholder?: AXPMultiLanguageString;
|
|
133
|
+
resizable?: boolean;
|
|
134
|
+
}
|
|
135
|
+
interface ColorBoxOptions extends ValueWidgetOptions {
|
|
136
|
+
format?: 'hex' | 'rgb' | 'hsl';
|
|
137
|
+
showAlpha?: boolean;
|
|
138
|
+
showPalette?: boolean;
|
|
139
|
+
}
|
|
140
|
+
interface AXPFlexContainerOptions extends LayoutWidgetOptions {
|
|
141
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
142
|
+
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
143
|
+
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
144
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
145
|
+
gap?: string;
|
|
146
|
+
spacing?: {
|
|
147
|
+
padding?: string;
|
|
148
|
+
margin?: string;
|
|
149
|
+
};
|
|
150
|
+
border?: {
|
|
151
|
+
radius?: string;
|
|
152
|
+
width?: string;
|
|
153
|
+
color?: string;
|
|
154
|
+
style?: string;
|
|
155
|
+
};
|
|
156
|
+
backgroundColor?: string;
|
|
157
|
+
direction?: string;
|
|
158
|
+
overflow?: string;
|
|
159
|
+
overflowX?: string;
|
|
160
|
+
overflowY?: string;
|
|
161
|
+
width?: string;
|
|
162
|
+
minWidth?: string;
|
|
163
|
+
maxWidth?: string;
|
|
164
|
+
height?: string;
|
|
165
|
+
minHeight?: string;
|
|
166
|
+
maxHeight?: string;
|
|
167
|
+
}
|
|
168
|
+
interface AXPGridContainerOptions extends LayoutWidgetOptions {
|
|
169
|
+
grid?: {
|
|
170
|
+
default?: {
|
|
171
|
+
columns?: number;
|
|
172
|
+
rows?: number;
|
|
173
|
+
gap?: string;
|
|
174
|
+
justifyItems?: string;
|
|
175
|
+
alignItems?: string;
|
|
176
|
+
autoFlow?: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
spacing?: {
|
|
180
|
+
padding?: string;
|
|
181
|
+
margin?: string;
|
|
182
|
+
};
|
|
183
|
+
border?: {
|
|
184
|
+
radius?: string;
|
|
185
|
+
width?: string;
|
|
186
|
+
color?: string;
|
|
187
|
+
style?: string;
|
|
188
|
+
};
|
|
189
|
+
backgroundColor?: string;
|
|
190
|
+
direction?: string;
|
|
191
|
+
overflow?: string;
|
|
192
|
+
overflowX?: string;
|
|
193
|
+
overflowY?: string;
|
|
194
|
+
width?: string;
|
|
195
|
+
minWidth?: string;
|
|
196
|
+
maxWidth?: string;
|
|
197
|
+
height?: string;
|
|
198
|
+
minHeight?: string;
|
|
199
|
+
maxHeight?: string;
|
|
200
|
+
}
|
|
201
|
+
interface AXPPanelContainerOptions extends LayoutWidgetOptions {
|
|
202
|
+
caption?: string;
|
|
203
|
+
icon?: string;
|
|
204
|
+
look?: 'solid' | 'fill' | 'outline' | 'flat' | 'none';
|
|
205
|
+
disabled?: boolean;
|
|
206
|
+
showHeader?: boolean;
|
|
207
|
+
collapsed?: boolean;
|
|
208
|
+
}
|
|
209
|
+
interface AXPPageContainerOptions extends LayoutWidgetOptions {
|
|
210
|
+
backgroundColor?: string;
|
|
211
|
+
theme?: {
|
|
212
|
+
id: string;
|
|
213
|
+
};
|
|
214
|
+
hasHeader?: boolean;
|
|
215
|
+
hasFooter?: boolean;
|
|
216
|
+
direction?: string;
|
|
217
|
+
}
|
|
218
|
+
interface AXPTabsetContainerOptions extends LayoutWidgetOptions {
|
|
219
|
+
look?: 'with-line' | 'with-line-color' | 'pills' | 'pills-color';
|
|
220
|
+
orientation?: 'vertical' | 'horizontal';
|
|
221
|
+
activeIndex?: number;
|
|
222
|
+
}
|
|
223
|
+
interface AXPFieldsetContainerOptions extends LayoutWidgetOptions {
|
|
224
|
+
title?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
icon?: string;
|
|
227
|
+
collapsible?: boolean;
|
|
228
|
+
isOpen?: boolean;
|
|
229
|
+
look?: 'fieldset' | 'card' | 'group' | 'container';
|
|
230
|
+
disabled?: boolean;
|
|
231
|
+
showHeader?: boolean;
|
|
232
|
+
cols?: number;
|
|
233
|
+
}
|
|
234
|
+
interface AXPFormFieldOptions extends LayoutWidgetOptions {
|
|
235
|
+
label?: string;
|
|
236
|
+
showLabel?: boolean;
|
|
237
|
+
}
|
|
238
|
+
interface AXPDialogContainerOptions extends LayoutWidgetOptions {
|
|
239
|
+
title?: string;
|
|
240
|
+
message?: string;
|
|
241
|
+
size?: AXPopupSizeType;
|
|
242
|
+
closeButton?: boolean;
|
|
243
|
+
context?: any;
|
|
244
|
+
}
|
|
245
|
+
interface RichTextOptions extends ValueWidgetOptions {
|
|
246
|
+
placeholder?: AXPMultiLanguageString;
|
|
247
|
+
toolbar?: string[];
|
|
248
|
+
readonly?: boolean;
|
|
249
|
+
}
|
|
250
|
+
interface PasswordBoxOptions extends ValueWidgetOptions {
|
|
251
|
+
placeholder?: AXPMultiLanguageString;
|
|
252
|
+
revealToggle?: boolean;
|
|
253
|
+
maxLength?: number;
|
|
254
|
+
}
|
|
255
|
+
interface LookupBoxOptions extends ValueWidgetOptions {
|
|
256
|
+
dataSource?: any[] | (() => any[]) | (() => Promise<any[]>);
|
|
257
|
+
valueField?: string;
|
|
258
|
+
textField?: string;
|
|
259
|
+
searchable?: boolean;
|
|
260
|
+
entity?: string;
|
|
261
|
+
look?: string;
|
|
262
|
+
columns?: any[];
|
|
263
|
+
expose?: any[];
|
|
264
|
+
multiple?: boolean;
|
|
265
|
+
allowClear?: boolean;
|
|
266
|
+
}
|
|
267
|
+
interface SelectionListOptions extends ValueWidgetOptions {
|
|
268
|
+
dataSource: any[] | (() => any[]) | (() => Promise<any[]>) | AXDataSource<any>;
|
|
269
|
+
valueField?: string;
|
|
270
|
+
textField?: string;
|
|
271
|
+
multiple?: boolean;
|
|
272
|
+
searchable?: boolean;
|
|
273
|
+
placeholder?: AXPMultiLanguageString;
|
|
274
|
+
}
|
|
275
|
+
interface AXPListWidgetColumn {
|
|
276
|
+
name: string;
|
|
277
|
+
title?: string;
|
|
278
|
+
visible?: boolean;
|
|
279
|
+
width?: string;
|
|
280
|
+
widget?: {
|
|
281
|
+
type: string;
|
|
282
|
+
path?: string;
|
|
283
|
+
options?: any;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
interface AXPListWidgetRowCommand {
|
|
287
|
+
title?: string;
|
|
288
|
+
icon?: string;
|
|
289
|
+
color?: string;
|
|
290
|
+
disabled?: boolean | string;
|
|
291
|
+
hidden?: boolean | string;
|
|
292
|
+
command?: any;
|
|
293
|
+
}
|
|
294
|
+
interface AXPListWidgetOptions extends LayoutWidgetOptions {
|
|
295
|
+
dataSource?: any[] | AXDataSource;
|
|
296
|
+
columns?: AXPListWidgetColumn[];
|
|
297
|
+
onRowClick?: (row: any) => void;
|
|
298
|
+
onRowDoubleClick?: (row: any) => void;
|
|
299
|
+
onSelectionChange?: (selectedRows: any[]) => void;
|
|
300
|
+
onRowCommand?: (command: any, selectedRows: any[]) => void;
|
|
301
|
+
paging?: boolean;
|
|
302
|
+
showHeader?: boolean;
|
|
303
|
+
showFooter?: boolean;
|
|
304
|
+
fixHeader?: boolean;
|
|
305
|
+
fixFooter?: boolean;
|
|
306
|
+
fetchDataMode?: 'auto' | 'manual';
|
|
307
|
+
parentField?: string;
|
|
308
|
+
minHeight?: string | number;
|
|
309
|
+
showIndex?: boolean;
|
|
310
|
+
allowSelection?: boolean;
|
|
311
|
+
primaryCommands?: any[];
|
|
312
|
+
secondaryCommands?: AXPListWidgetRowCommand[];
|
|
313
|
+
loading?: {
|
|
314
|
+
enabled?: boolean;
|
|
315
|
+
animation?: boolean;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
interface AXPWizardActionDefinition {
|
|
319
|
+
title?: string;
|
|
320
|
+
icon?: string;
|
|
321
|
+
color?: string;
|
|
322
|
+
}
|
|
323
|
+
interface AXPWizardActions {
|
|
324
|
+
previous?: AXPWizardActionDefinition;
|
|
325
|
+
next?: AXPWizardActionDefinition;
|
|
326
|
+
submit?: AXPWizardActionDefinition;
|
|
327
|
+
}
|
|
328
|
+
interface AXPStepDefinition {
|
|
329
|
+
id: string;
|
|
330
|
+
title: string;
|
|
331
|
+
description?: string;
|
|
332
|
+
icon?: string;
|
|
333
|
+
skippable?: boolean;
|
|
334
|
+
content: AXPWidgetNode;
|
|
335
|
+
actions?: AXPActionMenuItem[];
|
|
336
|
+
}
|
|
337
|
+
interface AXPStepWizardGuardPayload {
|
|
338
|
+
step: AXPStepDefinition;
|
|
339
|
+
index: number;
|
|
340
|
+
total: number;
|
|
341
|
+
isFirst: boolean;
|
|
342
|
+
isLast: boolean;
|
|
343
|
+
context: any;
|
|
344
|
+
stepContext?: any;
|
|
345
|
+
dialogContext?: any;
|
|
346
|
+
}
|
|
347
|
+
interface AXPStepWizardStatus {
|
|
348
|
+
currentStep: AXPStepDefinition;
|
|
349
|
+
index: number;
|
|
350
|
+
total: number;
|
|
351
|
+
isFirst: boolean;
|
|
352
|
+
isLast: boolean;
|
|
353
|
+
}
|
|
354
|
+
interface AXPStepWizardDefinition {
|
|
355
|
+
steps: AXPStepDefinition[];
|
|
356
|
+
linear?: boolean;
|
|
357
|
+
direction?: 'horizontal' | 'vertical';
|
|
358
|
+
look?: string;
|
|
359
|
+
showActions?: boolean;
|
|
360
|
+
actions?: AXPWizardActions;
|
|
361
|
+
guards?: {
|
|
362
|
+
next?: (payload: AXPStepWizardGuardPayload) => boolean | Promise<boolean>;
|
|
363
|
+
prev?: (payload: AXPStepWizardGuardPayload) => boolean | Promise<boolean>;
|
|
364
|
+
};
|
|
365
|
+
events?: {
|
|
366
|
+
onStepChanged?: (status: AXPStepWizardStatus) => void;
|
|
367
|
+
onComplete?: (status: AXPStepWizardStatus) => void;
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
interface AXPStepWizardContainerOptions extends LayoutWidgetOptions {
|
|
371
|
+
definition?: AXPStepWizardDefinition;
|
|
372
|
+
}
|
|
373
|
+
interface InheritanceContext {
|
|
374
|
+
mode?: AXPWidgetRenderMode;
|
|
375
|
+
disabled?: boolean | string;
|
|
376
|
+
readonly?: boolean | string;
|
|
377
|
+
direction?: 'rtl' | 'ltr';
|
|
378
|
+
visible?: boolean | string;
|
|
379
|
+
defaultValue?: any;
|
|
380
|
+
}
|
|
381
|
+
interface InheritedProperties {
|
|
382
|
+
mode: AXPWidgetRenderMode;
|
|
383
|
+
disabled: boolean | string | undefined;
|
|
384
|
+
readonly: boolean | string | undefined;
|
|
385
|
+
direction: 'rtl' | 'ltr' | undefined;
|
|
386
|
+
visible: boolean | string | undefined;
|
|
387
|
+
}
|
|
388
|
+
interface AXPWidgetConfiguration {
|
|
389
|
+
type: string;
|
|
390
|
+
options?: AXPOptionsData;
|
|
391
|
+
}
|
|
392
|
+
type LayoutBuilderState = AXPWidgetNode;
|
|
393
|
+
type WidgetBuilderState = AXPWidgetNode & {
|
|
394
|
+
layout?: AXPGridLayoutOptions;
|
|
395
|
+
};
|
|
396
|
+
type FormFieldBuilderState = AXPWidgetNode & {
|
|
397
|
+
layout?: AXPGridLayoutOptions;
|
|
398
|
+
};
|
|
399
|
+
type DialogBuilderState = AXPWidgetNode & {
|
|
400
|
+
layout?: AXPGridLayoutOptions;
|
|
401
|
+
dialogOptions?: AXPDialogContainerOptions;
|
|
402
|
+
actions?: {
|
|
403
|
+
footer?: {
|
|
404
|
+
prefix?: AXPActionMenuItem[];
|
|
405
|
+
suffix?: AXPActionMenuItem[];
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
interface IActionBuilder {
|
|
410
|
+
cancel(text?: string): IActionBuilder;
|
|
411
|
+
submit(text?: string): IActionBuilder;
|
|
412
|
+
custom(action: AXPActionMenuItem & {
|
|
413
|
+
position?: 'prefix' | 'suffix';
|
|
414
|
+
}): IActionBuilder;
|
|
415
|
+
}
|
|
416
|
+
interface ILayoutBuilder {
|
|
417
|
+
grid(delegate: (container: IGridContainerBuilder) => void): ILayoutBuilder;
|
|
418
|
+
flex(delegate: (container: IFlexContainerBuilder) => void): ILayoutBuilder;
|
|
419
|
+
panel(delegate: (container: IPanelContainerBuilder) => void): ILayoutBuilder;
|
|
420
|
+
page(delegate: (container: IPageContainerBuilder) => void): ILayoutBuilder;
|
|
421
|
+
tabset(delegate: (container: ITabsetContainerBuilder) => void): ILayoutBuilder;
|
|
422
|
+
fieldset(delegate: (container: IFieldsetContainerBuilder) => void): ILayoutBuilder;
|
|
423
|
+
dialog<T = AXPDialogRef>(delegate: (container: IDialogBuilder<T>) => void): IDialogBuilder<T>;
|
|
424
|
+
stepWizard(delegate: (wizard: IStepWizardBuilder) => void): ILayoutBuilder;
|
|
425
|
+
build(): AXPWidgetNode;
|
|
426
|
+
toJson(options?: {
|
|
427
|
+
removeMeta?: boolean;
|
|
428
|
+
removeFunctions?: boolean;
|
|
429
|
+
pretty?: boolean;
|
|
430
|
+
}): string;
|
|
431
|
+
}
|
|
432
|
+
interface IWidgetBuilder {
|
|
433
|
+
name(name: string): IWidgetBuilder;
|
|
434
|
+
path(path: string): IWidgetBuilder;
|
|
435
|
+
type(type: string): IWidgetBuilder;
|
|
436
|
+
options(options: AXPOptionsData): IWidgetBuilder;
|
|
437
|
+
layout(config: Partial<AXPGridLayoutOptions>): IWidgetBuilder;
|
|
438
|
+
layout(colSpan: number): IWidgetBuilder;
|
|
439
|
+
mode(mode: AXPWidgetRenderMode): IWidgetBuilder;
|
|
440
|
+
visible(condition: boolean | string): IWidgetBuilder;
|
|
441
|
+
disabled(condition: boolean | string): IWidgetBuilder;
|
|
442
|
+
readonly(condition: boolean | string): IWidgetBuilder;
|
|
443
|
+
defaultValue(defaultValue: any): IWidgetBuilder;
|
|
444
|
+
direction(direction: 'rtl' | 'ltr'): IWidgetBuilder;
|
|
445
|
+
withInheritanceContext(context: InheritanceContext): IWidgetBuilder;
|
|
446
|
+
getInheritanceContext(): InheritanceContext;
|
|
447
|
+
build(): AXPWidgetNode;
|
|
448
|
+
}
|
|
449
|
+
interface IBaseContainerBuilder<TContainer = any> {
|
|
450
|
+
name(name: string): TContainer;
|
|
451
|
+
path(path: string): TContainer;
|
|
452
|
+
mode(mode: AXPWidgetRenderMode): TContainer;
|
|
453
|
+
visible(condition: boolean | AXPExpression): TContainer;
|
|
454
|
+
disabled(condition: boolean | AXPExpression): TContainer;
|
|
455
|
+
readonly(condition: boolean | AXPExpression): TContainer;
|
|
456
|
+
direction(direction: 'rtl' | 'ltr'): TContainer;
|
|
457
|
+
withInheritanceContext(context: InheritanceContext): TContainer;
|
|
458
|
+
getInheritanceContext(): InheritanceContext;
|
|
459
|
+
build(): AXPWidgetNode;
|
|
460
|
+
}
|
|
461
|
+
interface ILayoutContainerBuilder<TContainer = any> {
|
|
462
|
+
layout(config: Partial<AXPGridLayoutOptions>): TContainer;
|
|
463
|
+
layout(colSpan: number): TContainer;
|
|
464
|
+
}
|
|
465
|
+
interface IChildContainerBuilder<TContainer = any> {
|
|
466
|
+
grid(delegate: (container: IGridContainerBuilder) => void): TContainer;
|
|
467
|
+
flex(delegate: (container: IFlexContainerBuilder) => void): TContainer;
|
|
468
|
+
panel(delegate: (container: IPanelContainerBuilder) => void): TContainer;
|
|
469
|
+
page(delegate: (container: IPageContainerBuilder) => void): TContainer;
|
|
470
|
+
tabset(delegate: (container: ITabsetContainerBuilder) => void): TContainer;
|
|
471
|
+
fieldset(delegate: (container: IFieldsetContainerBuilder) => void): TContainer;
|
|
472
|
+
formField(label: string, delegate?: (field: IFormFieldBuilder) => void): TContainer;
|
|
473
|
+
stepWizard(delegate: (wizard: IStepWizardBuilder) => void): TContainer;
|
|
474
|
+
dynamicForm(definition: AXPDynamicFormDefinition): TContainer;
|
|
475
|
+
}
|
|
476
|
+
interface IWidgetContainerBuilder<TContainer = any> {
|
|
477
|
+
textBox(options?: TextBoxOptions): TContainer;
|
|
478
|
+
largeTextBox(options?: LargeTextBoxOptions): TContainer;
|
|
479
|
+
richText(options?: RichTextOptions): TContainer;
|
|
480
|
+
passwordBox(options?: PasswordBoxOptions): TContainer;
|
|
481
|
+
numberBox(options?: NumberBoxOptions): TContainer;
|
|
482
|
+
selectBox(options: SelectBoxOptions): TContainer;
|
|
483
|
+
lookupBox(options: LookupBoxOptions): TContainer;
|
|
484
|
+
selectionList(options: SelectionListOptions): TContainer;
|
|
485
|
+
dateTimeBox(options?: DateTimeBoxOptions): TContainer;
|
|
486
|
+
toggleSwitch(options?: ToggleSwitchOptions): TContainer;
|
|
487
|
+
colorBox(options?: ColorBoxOptions): TContainer;
|
|
488
|
+
list(delegate: (container: IListWidgetBuilder) => void): TContainer;
|
|
489
|
+
customWidget<T>(type: string, options?: T): TContainer;
|
|
490
|
+
customWidget<T>(type: string, delegate: (widget: IWidgetBuilder) => void): TContainer;
|
|
491
|
+
}
|
|
492
|
+
interface IFlexContainerBuilder extends IBaseContainerBuilder<IFlexContainerBuilder>, ILayoutContainerBuilder<IFlexContainerBuilder>, IChildContainerBuilder<IFlexContainerBuilder>, IWidgetContainerBuilder<IFlexContainerBuilder> {
|
|
493
|
+
setOptions(options: AXPFlexContainerOptions): IFlexContainerBuilder;
|
|
494
|
+
setDirection(direction: 'row' | 'column' | 'row-reverse' | 'column-reverse'): IFlexContainerBuilder;
|
|
495
|
+
setWrap(wrap: 'nowrap' | 'wrap' | 'wrap-reverse'): IFlexContainerBuilder;
|
|
496
|
+
setJustifyContent(justify: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'): IFlexContainerBuilder;
|
|
497
|
+
setAlignItems(align: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'): IFlexContainerBuilder;
|
|
498
|
+
setGap(gap: string): IFlexContainerBuilder;
|
|
499
|
+
setBackgroundColor(color: string): IFlexContainerBuilder;
|
|
500
|
+
setPadding(padding: string): IFlexContainerBuilder;
|
|
501
|
+
setMargin(margin: string): IFlexContainerBuilder;
|
|
502
|
+
}
|
|
503
|
+
interface IGridContainerBuilder extends IBaseContainerBuilder<IGridContainerBuilder>, ILayoutContainerBuilder<IGridContainerBuilder>, IChildContainerBuilder<IGridContainerBuilder>, IWidgetContainerBuilder<IGridContainerBuilder> {
|
|
504
|
+
setOptions(options: AXPGridContainerOptions): IGridContainerBuilder;
|
|
505
|
+
setColumns(columns: number): IGridContainerBuilder;
|
|
506
|
+
setRows(rows: number): IGridContainerBuilder;
|
|
507
|
+
setGap(gap: string): IGridContainerBuilder;
|
|
508
|
+
setJustifyItems(justify: 'start' | 'end' | 'center' | 'stretch'): IGridContainerBuilder;
|
|
509
|
+
setAlignItems(align: 'start' | 'end' | 'center' | 'stretch'): IGridContainerBuilder;
|
|
510
|
+
setAutoFlow(flow: 'row' | 'column' | 'row dense' | 'column dense'): IGridContainerBuilder;
|
|
511
|
+
setBackgroundColor(color: string): IGridContainerBuilder;
|
|
512
|
+
setPadding(padding: string): IGridContainerBuilder;
|
|
513
|
+
setMargin(margin: string): IGridContainerBuilder;
|
|
514
|
+
/** Add a grid-item-layout child with optional placement; delegate builds the fieldset content. */
|
|
515
|
+
item(layoutOptions: Partial<AXPGridLayoutOptions> | null | undefined, delegate: (container: IFieldsetContainerBuilder) => void): IGridContainerBuilder;
|
|
516
|
+
}
|
|
517
|
+
interface IPanelContainerBuilder extends IBaseContainerBuilder<IPanelContainerBuilder>, ILayoutContainerBuilder<IPanelContainerBuilder>, IChildContainerBuilder<IPanelContainerBuilder>, IWidgetContainerBuilder<IPanelContainerBuilder> {
|
|
518
|
+
setOptions(options: AXPPanelContainerOptions): IPanelContainerBuilder;
|
|
519
|
+
setCaption(caption: string): IPanelContainerBuilder;
|
|
520
|
+
setIcon(icon: string): IPanelContainerBuilder;
|
|
521
|
+
setLook(look: 'solid' | 'fill' | 'outline' | 'flat' | 'none'): IPanelContainerBuilder;
|
|
522
|
+
setShowHeader(show: boolean): IPanelContainerBuilder;
|
|
523
|
+
setCollapsed(collapsed: boolean): IPanelContainerBuilder;
|
|
524
|
+
}
|
|
525
|
+
interface IPageContainerBuilder extends IBaseContainerBuilder<IPageContainerBuilder>, ILayoutContainerBuilder<IPageContainerBuilder>, IChildContainerBuilder<IPageContainerBuilder>, IWidgetContainerBuilder<IPageContainerBuilder> {
|
|
526
|
+
setOptions(options: AXPPageContainerOptions): IPageContainerBuilder;
|
|
527
|
+
setBackgroundColor(color: string): IPageContainerBuilder;
|
|
528
|
+
setTheme(theme: {
|
|
529
|
+
id: string;
|
|
530
|
+
}): IPageContainerBuilder;
|
|
531
|
+
setHasHeader(hasHeader: boolean): IPageContainerBuilder;
|
|
532
|
+
setHasFooter(hasFooter: boolean): IPageContainerBuilder;
|
|
533
|
+
setDirection(direction: 'rtl' | 'ltr'): IPageContainerBuilder;
|
|
534
|
+
}
|
|
535
|
+
interface ITabsetContainerBuilder extends IBaseContainerBuilder<ITabsetContainerBuilder>, ILayoutContainerBuilder<ITabsetContainerBuilder>, IChildContainerBuilder<ITabsetContainerBuilder>, IWidgetContainerBuilder<ITabsetContainerBuilder> {
|
|
536
|
+
setOptions(options: AXPTabsetContainerOptions): ITabsetContainerBuilder;
|
|
537
|
+
setLook(look: 'with-line' | 'with-line-color' | 'pills' | 'pills-color'): ITabsetContainerBuilder;
|
|
538
|
+
setOrientation(orientation: 'vertical' | 'horizontal'): ITabsetContainerBuilder;
|
|
539
|
+
setActiveIndex(index: number): ITabsetContainerBuilder;
|
|
540
|
+
}
|
|
541
|
+
interface IFormFieldBuilder extends IBaseContainerBuilder<IFormFieldBuilder>, ILayoutContainerBuilder<IFormFieldBuilder> {
|
|
542
|
+
setOptions(options: AXPFormFieldOptions): IFormFieldBuilder;
|
|
543
|
+
setLabel(label: string): IFormFieldBuilder;
|
|
544
|
+
setShowLabel(showLabel: boolean): IFormFieldBuilder;
|
|
545
|
+
defaultValue(value: any): IFormFieldBuilder;
|
|
546
|
+
textBox(options?: Omit<TextBoxOptions, 'path'>): IFormFieldBuilder;
|
|
547
|
+
largeTextBox(options?: Omit<LargeTextBoxOptions, 'path'>): IFormFieldBuilder;
|
|
548
|
+
richText(options?: Omit<RichTextOptions, 'path'>): IFormFieldBuilder;
|
|
549
|
+
passwordBox(options?: Omit<PasswordBoxOptions, 'path'>): IFormFieldBuilder;
|
|
550
|
+
numberBox(options?: Omit<NumberBoxOptions, 'path'>): IFormFieldBuilder;
|
|
551
|
+
selectBox(options: Omit<SelectBoxOptions, 'path'>): IFormFieldBuilder;
|
|
552
|
+
lookupBox(options: Omit<LookupBoxOptions, 'path'>): IFormFieldBuilder;
|
|
553
|
+
selectionList(options: Omit<SelectionListOptions, 'path'>): IFormFieldBuilder;
|
|
554
|
+
dateTimeBox(options?: Omit<DateTimeBoxOptions, 'path'>): IFormFieldBuilder;
|
|
555
|
+
toggleSwitch(options?: Omit<ToggleSwitchOptions, 'path'>): IFormFieldBuilder;
|
|
556
|
+
colorBox(options?: Omit<ColorBoxOptions, 'path'>): IFormFieldBuilder;
|
|
557
|
+
customWidget<T>(type: string, options?: Omit<T, 'path'>): IFormFieldBuilder;
|
|
558
|
+
customWidget<T>(type: string, options?: Omit<T, 'path'> & Partial<AXPWidgetNodeExtendedProperties>): IFormFieldBuilder;
|
|
559
|
+
}
|
|
560
|
+
interface IFieldsetContainerBuilder extends IBaseContainerBuilder<IFieldsetContainerBuilder>, ILayoutContainerBuilder<IFieldsetContainerBuilder> {
|
|
561
|
+
setOptions(options: AXPFieldsetContainerOptions): IFieldsetContainerBuilder;
|
|
562
|
+
setTitle(title: string): IFieldsetContainerBuilder;
|
|
563
|
+
setDescription(description: string): IFieldsetContainerBuilder;
|
|
564
|
+
setIcon(icon: string): IFieldsetContainerBuilder;
|
|
565
|
+
setCollapsible(collapsible: boolean): IFieldsetContainerBuilder;
|
|
566
|
+
setIsOpen(isOpen: boolean): IFieldsetContainerBuilder;
|
|
567
|
+
setLook(look: 'fieldset' | 'card' | 'group' | 'container'): IFieldsetContainerBuilder;
|
|
568
|
+
setShowHeader(showHeader: boolean): IFieldsetContainerBuilder;
|
|
569
|
+
setCols(cols: number): IFieldsetContainerBuilder;
|
|
570
|
+
formField(label: string, delegate?: (field: IFormFieldBuilder) => void): IFieldsetContainerBuilder;
|
|
571
|
+
}
|
|
572
|
+
interface IDialogBuilder<T = AXPDialogRef> {
|
|
573
|
+
}
|
|
574
|
+
interface IDialogBuilder<T = AXPDialogRef> {
|
|
575
|
+
setOptions(options: AXPDialogContainerOptions): IDialogBuilder<T>;
|
|
576
|
+
setTitle(title: string): IDialogBuilder<T>;
|
|
577
|
+
setMessage(message?: string): IDialogBuilder<T>;
|
|
578
|
+
setSize(size: AXPopupSizeType): IDialogBuilder<T>;
|
|
579
|
+
setCloseButton(closeButton: boolean): IDialogBuilder<T>;
|
|
580
|
+
setContext(context: any): IDialogBuilder<T>;
|
|
581
|
+
content(delegate: (layoutBuilder: IFlexContainerBuilder) => void): IDialogBuilder<T>;
|
|
582
|
+
setActions(delegate?: (actions: IActionBuilder) => void): IDialogBuilder<T>;
|
|
583
|
+
/**
|
|
584
|
+
* Handler invoked when user clicks an action. Receives AXPDialogRef (context, action, setLoading, close).
|
|
585
|
+
* If handler throws, dialog stays open for retry.
|
|
586
|
+
* If handler returns, dialog closes and show() resolves with the return value.
|
|
587
|
+
*/
|
|
588
|
+
onAction(handler: (dialogRef: AXPDialogRef) => T | Promise<T>): IDialogBuilder<T>;
|
|
589
|
+
addCustomAction(action: AXPActionMenuItem): IDialogBuilder<T>;
|
|
590
|
+
build(): AXPWidgetNode;
|
|
591
|
+
show(): Promise<T>;
|
|
592
|
+
}
|
|
593
|
+
interface IListWidgetBuilder extends IBaseContainerBuilder<IListWidgetBuilder>, ILayoutContainerBuilder<IListWidgetBuilder>, IChildContainerBuilder<IListWidgetBuilder>, IWidgetContainerBuilder<IListWidgetBuilder> {
|
|
594
|
+
setOptions(options: AXPListWidgetOptions): IListWidgetBuilder;
|
|
595
|
+
setDataSource(dataSource: any[] | AXDataSource): IListWidgetBuilder;
|
|
596
|
+
setColumns(columns: AXPListWidgetColumn[]): IListWidgetBuilder;
|
|
597
|
+
setOnRowClick(handler: (row: any) => void): IListWidgetBuilder;
|
|
598
|
+
setOnRowDoubleClick(handler: (row: any) => void): IListWidgetBuilder;
|
|
599
|
+
setOnSelectionChange(handler: (selectedRows: any[]) => void): IListWidgetBuilder;
|
|
600
|
+
setOnRowCommand(handler: (command: any, selectedRows: any[]) => void): IListWidgetBuilder;
|
|
601
|
+
setPaging(paging: boolean): IListWidgetBuilder;
|
|
602
|
+
setShowHeader(show: boolean): IListWidgetBuilder;
|
|
603
|
+
setShowFooter(show: boolean): IListWidgetBuilder;
|
|
604
|
+
setFixHeader(fix: boolean): IListWidgetBuilder;
|
|
605
|
+
setFixFooter(fix: boolean): IListWidgetBuilder;
|
|
606
|
+
setFetchDataMode(mode: 'auto' | 'manual'): IListWidgetBuilder;
|
|
607
|
+
setParentField(field: string): IListWidgetBuilder;
|
|
608
|
+
setMinHeight(height: string | number): IListWidgetBuilder;
|
|
609
|
+
setShowIndex(show: boolean): IListWidgetBuilder;
|
|
610
|
+
setAllowSelection(allow: boolean): IListWidgetBuilder;
|
|
611
|
+
setPrimaryCommands(commands: any[]): IListWidgetBuilder;
|
|
612
|
+
setSecondaryCommands(commands: AXPListWidgetRowCommand[]): IListWidgetBuilder;
|
|
613
|
+
setLoading(loading: {
|
|
614
|
+
enabled?: boolean;
|
|
615
|
+
animation?: boolean;
|
|
616
|
+
}): IListWidgetBuilder;
|
|
617
|
+
}
|
|
618
|
+
interface IStepBuilder {
|
|
619
|
+
setIcon(icon: string): IStepBuilder;
|
|
620
|
+
setDescription(description: string): IStepBuilder;
|
|
621
|
+
setSkippable(skippable: boolean): IStepBuilder;
|
|
622
|
+
content(delegate: (layoutBuilder: ILayoutBuilder) => void): IStepBuilder;
|
|
623
|
+
build(): AXPStepDefinition;
|
|
624
|
+
}
|
|
625
|
+
interface IStepWizardBuilder extends IBaseContainerBuilder<IStepWizardBuilder>, ILayoutContainerBuilder<IStepWizardBuilder> {
|
|
626
|
+
setLinear(linear: boolean): IStepWizardBuilder;
|
|
627
|
+
setDirection(direction: 'horizontal' | 'vertical'): IStepWizardBuilder;
|
|
628
|
+
setLook(look: AXStepWizardLook): IStepWizardBuilder;
|
|
629
|
+
setShowActions(show: boolean): IStepWizardBuilder;
|
|
630
|
+
setActions(actions: AXPWizardActions): IStepWizardBuilder;
|
|
631
|
+
setGuards(guards: {
|
|
632
|
+
next?: (payload: AXPStepWizardGuardPayload) => boolean | Promise<boolean>;
|
|
633
|
+
prev?: (payload: AXPStepWizardGuardPayload) => boolean | Promise<boolean>;
|
|
634
|
+
}): IStepWizardBuilder;
|
|
635
|
+
setEvents(events: {
|
|
636
|
+
onStepChanged?: (status: AXPStepWizardStatus) => void;
|
|
637
|
+
onComplete?: (status: AXPStepWizardStatus) => void;
|
|
638
|
+
}): IStepWizardBuilder;
|
|
639
|
+
step(id: string, title: string, delegate: (step: IStepBuilder) => void): IStepWizardBuilder;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
declare class AXPLayoutRendererComponent implements OnInit {
|
|
643
|
+
#private;
|
|
644
|
+
private conversionService;
|
|
645
|
+
/**
|
|
646
|
+
* RxJS subjects for context management
|
|
647
|
+
*/
|
|
648
|
+
private contextUpdateSubject;
|
|
649
|
+
private contextChangeSubject;
|
|
650
|
+
/**
|
|
651
|
+
* Form definition containing groups and fields OR widget tree
|
|
652
|
+
*/
|
|
653
|
+
layout: i0.InputSignal<AXPWidgetNode | AXPDynamicFormDefinition>;
|
|
654
|
+
/**
|
|
655
|
+
* Form context/model data
|
|
656
|
+
*/
|
|
657
|
+
context: i0.ModelSignal<any>;
|
|
658
|
+
/**
|
|
659
|
+
* Form appearance and density styling (normal, compact, spacious)
|
|
660
|
+
*/
|
|
661
|
+
look: i0.InputSignal<AXPDynamicFormLook>;
|
|
662
|
+
/**
|
|
663
|
+
* Default form mode. Can be overridden by section/group and field.
|
|
664
|
+
*/
|
|
665
|
+
mode: i0.InputSignal<AXPDynamicFormMode>;
|
|
666
|
+
protected widgetTree: i0.WritableSignal<AXPWidgetNode | null>;
|
|
667
|
+
/**
|
|
668
|
+
* Convert layout data to widget tree when inputs change
|
|
669
|
+
*/
|
|
670
|
+
conversionEffect: i0.EffectRef;
|
|
671
|
+
/**
|
|
672
|
+
* Emitted when context change is initiated
|
|
673
|
+
*/
|
|
674
|
+
contextInitiated: i0.OutputEmitterRef<any>;
|
|
675
|
+
/**
|
|
676
|
+
* Emitted when form becomes valid/invalid
|
|
677
|
+
*/
|
|
678
|
+
validityChange: i0.OutputEmitterRef<boolean>;
|
|
679
|
+
private form;
|
|
680
|
+
private container;
|
|
681
|
+
/**
|
|
682
|
+
* Internal context signal for reactivity
|
|
683
|
+
*/
|
|
684
|
+
protected internalContext: i0.WritableSignal<any>;
|
|
685
|
+
/**
|
|
686
|
+
* Initial context for reset functionality
|
|
687
|
+
*/
|
|
688
|
+
private initialContext;
|
|
689
|
+
ngOnInit(): void;
|
|
690
|
+
/**
|
|
691
|
+
* Handle context change events from widget container (optimized with RxJS)
|
|
692
|
+
*/
|
|
693
|
+
protected handleContextChanged(event: AXPContextChangeEvent): void;
|
|
694
|
+
/**
|
|
695
|
+
* Get the form component instance
|
|
696
|
+
*/
|
|
697
|
+
getForm(): AXFormComponent | undefined;
|
|
698
|
+
/**
|
|
699
|
+
* Get the widget container component instance
|
|
700
|
+
*/
|
|
701
|
+
getContainer(): AXPWidgetContainerComponent | undefined;
|
|
702
|
+
/**
|
|
703
|
+
* Get current form context
|
|
704
|
+
*/
|
|
705
|
+
getContext(): any;
|
|
706
|
+
/**
|
|
707
|
+
* Update form context programmatically
|
|
708
|
+
*/
|
|
709
|
+
updateContext(context: any): void;
|
|
710
|
+
/**
|
|
711
|
+
* Get the current widget tree
|
|
712
|
+
*/
|
|
713
|
+
getWidgetTree(): AXPWidgetNode | null;
|
|
714
|
+
/**
|
|
715
|
+
* Validate the form
|
|
716
|
+
*/
|
|
717
|
+
validate(): Promise<AXValidationSummary>;
|
|
718
|
+
/**
|
|
719
|
+
* Clear the form context
|
|
720
|
+
*/
|
|
721
|
+
clear(): void;
|
|
722
|
+
/**
|
|
723
|
+
* Reset the form to its initial state
|
|
724
|
+
*/
|
|
725
|
+
reset(): void;
|
|
726
|
+
/**
|
|
727
|
+
* Setup RxJS streams for context management
|
|
728
|
+
*/
|
|
729
|
+
private setupContextStreams;
|
|
730
|
+
/**
|
|
731
|
+
* Type guard to check if the input is a form definition
|
|
732
|
+
*/
|
|
733
|
+
private isFormDefinition;
|
|
734
|
+
/**
|
|
735
|
+
* Type guard to check if the input is a widget node
|
|
736
|
+
*/
|
|
737
|
+
private isWidgetNode;
|
|
738
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutRendererComponent, never>;
|
|
739
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPLayoutRendererComponent, "axp-layout-renderer", never, { "layout": { "alias": "layout"; "required": true; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "context": "contextChange"; "contextInitiated": "contextInitiated"; "validityChange": "validityChange"; }, never, never, true, never>;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare class LayoutBuilderModule {
|
|
743
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutBuilderModule, never>;
|
|
744
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LayoutBuilderModule, never, [typeof i1.CommonModule, typeof AXPLayoutRendererComponent], [typeof AXPLayoutRendererComponent]>;
|
|
745
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LayoutBuilderModule>;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
declare class AXPLayoutBuilderService {
|
|
749
|
+
private popupService;
|
|
750
|
+
/**
|
|
751
|
+
* Create a new layout builder
|
|
752
|
+
*/
|
|
753
|
+
create(): ILayoutBuilder;
|
|
754
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutBuilderService, never>;
|
|
755
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPLayoutBuilderService>;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
declare class AXPLayoutConversionService {
|
|
759
|
+
private widgetTreeCache;
|
|
760
|
+
private formDefinitionCache;
|
|
761
|
+
/**
|
|
762
|
+
* Convert AXPDynamicFormDefinition to AXPWidgetNode tree structure
|
|
763
|
+
* Groups become Fieldset Layouts with Form Field widgets as children
|
|
764
|
+
* Fields become Form Field widgets with Editor widgets as children
|
|
765
|
+
*/
|
|
766
|
+
convertFormDefinition(formDefinition: AXPDynamicFormDefinition): AXPWidgetNode;
|
|
767
|
+
/**
|
|
768
|
+
* Convert AXPWidgetNode tree back to AXPDynamicFormDefinition
|
|
769
|
+
* Parses Fieldset Layouts back to Groups
|
|
770
|
+
* Parses Form Field widgets back to Fields
|
|
771
|
+
*/
|
|
772
|
+
convertWidgetTreeToFormDefinition(widgetTree: AXPWidgetNode): AXPDynamicFormDefinition;
|
|
773
|
+
/**
|
|
774
|
+
* Validate that a widget tree represents a valid dynamic form structure
|
|
775
|
+
*/
|
|
776
|
+
validateFormWidgetTree(widgetTree: AXPWidgetNode): boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Clear all caches
|
|
779
|
+
*/
|
|
780
|
+
clearCaches(): void;
|
|
781
|
+
/**
|
|
782
|
+
* Get cache statistics
|
|
783
|
+
*/
|
|
784
|
+
getCacheStats(): {
|
|
785
|
+
widgetTreeCacheSize: number;
|
|
786
|
+
formDefinitionCacheSize: number;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Convert a single group to Fieldset widget structure
|
|
790
|
+
*/
|
|
791
|
+
private createGroupAsFieldsetWidget;
|
|
792
|
+
/**
|
|
793
|
+
* Convert fields to Form Field widgets
|
|
794
|
+
*/
|
|
795
|
+
private createFieldWidgets;
|
|
796
|
+
/**
|
|
797
|
+
* Convert a single field to Form Field widget with editor as child
|
|
798
|
+
*/
|
|
799
|
+
private createFormFieldWidget;
|
|
800
|
+
/**
|
|
801
|
+
* Extract group information from Fieldset Layout widget
|
|
802
|
+
*/
|
|
803
|
+
private extractGroupFromFieldset;
|
|
804
|
+
/**
|
|
805
|
+
* Extract field information from Form Field widget
|
|
806
|
+
*/
|
|
807
|
+
private extractFieldFromFormWidget;
|
|
808
|
+
/**
|
|
809
|
+
* Create cache key for form definition
|
|
810
|
+
*/
|
|
811
|
+
private createFormDefinitionCacheKey;
|
|
812
|
+
/**
|
|
813
|
+
* Create cache key for widget tree
|
|
814
|
+
*/
|
|
815
|
+
private createWidgetTreeCacheKey;
|
|
816
|
+
/**
|
|
817
|
+
* Create a simple hash from a string
|
|
818
|
+
*/
|
|
819
|
+
private createSimpleHash;
|
|
820
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutConversionService, never>;
|
|
821
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPLayoutConversionService>;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
interface DialogRendererConfig {
|
|
825
|
+
title: string;
|
|
826
|
+
message?: string;
|
|
827
|
+
context: any;
|
|
828
|
+
definition: AXPWidgetNode;
|
|
829
|
+
actions?: {
|
|
830
|
+
footer?: {
|
|
831
|
+
prefix?: any[];
|
|
832
|
+
suffix?: any[];
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
/**
|
|
836
|
+
* When present, handler is called on action click with AXPDialogRef.
|
|
837
|
+
* Throw = stay open for retry. Return = close and resolve show() with return value.
|
|
838
|
+
*/
|
|
839
|
+
onAction?: (dialogRef: AXPDialogRef) => any | Promise<any>;
|
|
840
|
+
}
|
|
841
|
+
interface DialogRendererResult {
|
|
842
|
+
context: any;
|
|
843
|
+
action?: string;
|
|
844
|
+
}
|
|
845
|
+
declare class AXPDialogRendererComponent extends AXBasePageComponent implements OnInit {
|
|
846
|
+
#private;
|
|
847
|
+
config: DialogRendererConfig;
|
|
848
|
+
result: EventEmitter<DialogRendererResult>;
|
|
849
|
+
private widgetCoreService;
|
|
850
|
+
private expressionEvaluator;
|
|
851
|
+
private dialogResult?;
|
|
852
|
+
context: i0.WritableSignal<any>;
|
|
853
|
+
callBack: (dialogRef: AXPDialogRef) => void;
|
|
854
|
+
data: any;
|
|
855
|
+
private isDialogLoading;
|
|
856
|
+
footerPrefix: i0.WritableSignal<AXPWidgetCoreElementAction[]>;
|
|
857
|
+
footerSuffix: i0.WritableSignal<AXPWidgetCoreElementAction[]>;
|
|
858
|
+
ngOnInit(): void;
|
|
859
|
+
private layoutRenderer;
|
|
860
|
+
private debounceTimer?;
|
|
861
|
+
handleContextChanged(event: any): void;
|
|
862
|
+
handleContextInitiated(event: any): void;
|
|
863
|
+
footerPrefixActions(): AXPWidgetCoreElementAction[];
|
|
864
|
+
footerSuffixActions(): AXPWidgetCoreElementAction[];
|
|
865
|
+
isFormLoading(): boolean;
|
|
866
|
+
isSubmitting(): boolean;
|
|
867
|
+
executeAction(action: AXPWidgetCoreElementAction): Promise<void>;
|
|
868
|
+
/** Resolves footer/widget action command to a string (e.g. `cancel`, `submit`, `widget:...`). */
|
|
869
|
+
private resolveActionCommandName;
|
|
870
|
+
private parseWidgetCommand;
|
|
871
|
+
private executeWidgetApi;
|
|
872
|
+
close(result?: DialogRendererResult): Promise<void>;
|
|
873
|
+
private aggregateAndEvaluateActions;
|
|
874
|
+
private collectWidgetActions;
|
|
875
|
+
private collectDialogActionsFromConfig;
|
|
876
|
+
private evaluatePredicates;
|
|
877
|
+
private evalBool;
|
|
878
|
+
private resolveApi;
|
|
879
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDialogRendererComponent, never>;
|
|
880
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPDialogRendererComponent, "axp-dialog-renderer", never, {}, { "result": "result"; }, never, never, true, never>;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/** Registration key for {@link AXPPreviewWidgetFieldCommand}; lives alone so `LayoutBuilderModule` can reference it without static-importing the command implementation. */
|
|
884
|
+
declare const AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY = "Widget:Preview";
|
|
885
|
+
|
|
886
|
+
/** See `AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY` in `preview-widget-field.command.key.ts`. */
|
|
887
|
+
interface AXPPreviewWidgetFieldCommandInput {
|
|
888
|
+
/** Widget node to render (same shape as `widget-field-configurator` model). */
|
|
889
|
+
widget?: AXPWidgetNode;
|
|
890
|
+
/**
|
|
891
|
+
* Alternate property name for the widget node (matches metadata definition `interface` field).
|
|
892
|
+
*/
|
|
893
|
+
interface?: AXPWidgetNode | string;
|
|
894
|
+
fieldName?: string;
|
|
895
|
+
fieldTitle?: AXPMultiLanguageString;
|
|
896
|
+
name?: string;
|
|
897
|
+
title?: AXPMultiLanguageString;
|
|
898
|
+
}
|
|
899
|
+
type AXPPreviewWidgetFieldInvocation = AXPPreviewWidgetFieldCommandInput & {
|
|
900
|
+
__context__?: {
|
|
901
|
+
data?: Record<string, unknown>;
|
|
902
|
+
options?: Record<string, unknown>;
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
/**
|
|
906
|
+
* Opens a dialog that previews a widget configuration (same behavior as the preview button on
|
|
907
|
+
* `axp-widget-field-configurator`). Invoked from that component and from entity list actions.
|
|
908
|
+
*/
|
|
909
|
+
declare class AXPPreviewWidgetFieldCommand implements AXPCommand<AXPPreviewWidgetFieldCommandInput, void> {
|
|
910
|
+
private readonly formBuilderService;
|
|
911
|
+
private readonly widgetRegistry;
|
|
912
|
+
private readonly translationService;
|
|
913
|
+
private readonly mlResolver;
|
|
914
|
+
private readonly crudService;
|
|
915
|
+
execute(input: AXPPreviewWidgetFieldInvocation): Promise<AXPExecuteCommandResult<void>>;
|
|
916
|
+
private mergeInvocation;
|
|
917
|
+
private normalizeWidget;
|
|
918
|
+
private resolveFieldTitleLabel;
|
|
919
|
+
private isCancelDialogOutcome;
|
|
920
|
+
private resolveWidgetDisplayTitle;
|
|
921
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPPreviewWidgetFieldCommand, never>;
|
|
922
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPPreviewWidgetFieldCommand>;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
export { AXPDialogRendererComponent, AXPLayoutBuilderService, AXPLayoutConversionService, AXPLayoutRendererComponent, AXPPreviewWidgetFieldCommand, AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY, LayoutBuilderModule };
|
|
926
|
+
export type { AXPDialogContainerOptions, AXPDialogRef, AXPDynamicFormDefinition, AXPDynamicFormDirection, AXPDynamicFormFieldDefinition, AXPDynamicFormGroupDefinition, AXPDynamicFormLook, AXPDynamicFormMode, AXPFieldsetContainerOptions, AXPFlexContainerOptions, AXPFormFieldOptions, AXPGridContainerOptions, AXPListWidgetColumn, AXPListWidgetOptions, AXPListWidgetRowCommand, AXPPageContainerOptions, AXPPanelContainerOptions, AXPPreviewWidgetFieldCommandInput, AXPStepDefinition, AXPStepWizardContainerOptions, AXPStepWizardDefinition, AXPStepWizardGuardPayload, AXPStepWizardStatus, AXPTabsetContainerOptions, AXPWidgetConfiguration, AXPWidgetNodeExtendedProperties, AXPWizardActionDefinition, AXPWizardActions, ColorBoxOptions, DateTimeBoxOptions, DialogBuilderState, DialogRendererConfig, DialogRendererResult, FormFieldBuilderState, IActionBuilder, IBaseContainerBuilder, IChildContainerBuilder, IDialogBuilder, IFieldsetContainerBuilder, IFlexContainerBuilder, IFormFieldBuilder, IGridContainerBuilder, ILayoutBuilder, ILayoutContainerBuilder, IListWidgetBuilder, IPageContainerBuilder, IPanelContainerBuilder, IStepBuilder, IStepWizardBuilder, ITabsetContainerBuilder, IWidgetBuilder, IWidgetContainerBuilder, InheritanceContext, InheritedProperties, LargeTextBoxOptions, LayoutBuilderState, LayoutWidgetOptions, LookupBoxOptions, NumberBoxOptions, PasswordBoxOptions, RichTextOptions, SelectBoxOptions, SelectionListOptions, TextBoxOptions, ToggleSwitchOptions, ValueWidgetOptions, WidgetBuilderState };
|