@acorex/platform 20.3.0-next.13 → 20.3.0-next.15
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 +19 -19
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +99 -99
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +42 -42
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +16 -16
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +1535 -969
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +2189 -1567
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +73 -73
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-CuueLekJ.mjs → acorex-platform-layout-entity-create-entity.command-CFBqiwfy.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-CuueLekJ.mjs.map → acorex-platform-layout-entity-create-entity.command-CFBqiwfy.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +178 -163
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +19 -17
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +163 -74
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C82aG5Rf.mjs → acorex-platform-layout-widgets-button-widget-designer.component-BzsfTNs2.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C82aG5Rf.mjs.map → acorex-platform-layout-widgets-button-widget-designer.component-BzsfTNs2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMmz70I8.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-Dvk76-2W.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMmz70I8.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-Dvk76-2W.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DDOyf7NG.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-BYLaipWi.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DDOyf7NG.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-BYLaipWi.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-flsveRJc.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-DcSllNik.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-flsveRJc.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-DcSllNik.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-CFXLM9Ls.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-BT-U4BiA.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-CFXLM9Ls.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-BT-U4BiA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-1Wd5IUpo.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-Il7jnRBg.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-1Wd5IUpo.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-edit.component-Il7jnRBg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-WLyXXg19.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-CBEPu7Fl.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-WLyXXg19.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-view.component-CBEPu7Fl.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-DxTXIO_k.mjs → acorex-platform-layout-widgets-file-list-popup.component-BPzn8lr3.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-BPzn8lr3.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-44YSAqDc.mjs → acorex-platform-layout-widgets-page-widget-designer.component-C_JrGoXy.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-44YSAqDc.mjs.map → acorex-platform-layout-widgets-page-widget-designer.component-C_JrGoXy.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Dat0cqWe.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-C6DaBt_N.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Dat0cqWe.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-C6DaBt_N.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CtJBzqq_.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-Bth3jI9T.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CtJBzqq_.mjs.map → acorex-platform-layout-widgets-tabular-data-view-popup.component-Bth3jI9T.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Djpj1fNO.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-CUHptbP4.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Djpj1fNO.mjs.map → acorex-platform-layout-widgets-text-block-widget-designer.component-CUHptbP4.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +729 -676
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +40 -40
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-oOA674Jd.mjs → acorex-platform-themes-default-entity-master-create-view.component-eGzN6g2Y.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-oOA674Jd.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-eGzN6g2Y.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Bk4p9oHD.mjs → acorex-platform-themes-default-entity-master-list-view.component-DjNvH3OA.mjs} +10 -10
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Bk4p9oHD.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-DjNvH3OA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-CrDQOCpB.mjs → acorex-platform-themes-default-entity-master-modify-view.component-HJyalvcu.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-CrDQOCpB.mjs.map → acorex-platform-themes-default-entity-master-modify-view.component-HJyalvcu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-CT-1gX4H.mjs → acorex-platform-themes-default-entity-master-single-view.component-e7m70Wls.mjs} +7 -7
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-CT-1gX4H.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-e7m70Wls.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-401.component-CHJFmJ2W.mjs → acorex-platform-themes-default-error-401.component-CoBaQFTn.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-401.component-CHJFmJ2W.mjs.map → acorex-platform-themes-default-error-401.component-CoBaQFTn.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-404.component-Db8KkVIF.mjs → acorex-platform-themes-default-error-404.component-BLlVOsS2.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-404.component-Db8KkVIF.mjs.map → acorex-platform-themes-default-error-404.component-BLlVOsS2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-DH39Viy-.mjs → acorex-platform-themes-default-error-offline.component-CybYQI9F.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-DH39Viy-.mjs.map → acorex-platform-themes-default-error-offline.component-CybYQI9F.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +39 -39
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-mFBYGE0_.mjs → acorex-platform-themes-shared-icon-chooser-view.component-ReKSoVeN.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-mFBYGE0_.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-ReKSoVeN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-viyyova6.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-B2HDyY2z.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-viyyova6.mjs.map → acorex-platform-themes-shared-theme-color-chooser-column.component-B2HDyY2z.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-BrUtKTXd.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-CeZxa49U.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-BrUtKTXd.mjs.map → acorex-platform-themes-shared-theme-color-chooser-view.component-CeZxa49U.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +42 -42
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +25 -25
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +389 -237
- package/layout/components/index.d.ts +130 -42
- package/layout/widget-core/index.d.ts +8 -1
- package/layout/widgets/index.d.ts +83 -2
- package/package.json +6 -6
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-DxTXIO_k.mjs.map +0 -1
|
@@ -1,13 +1,148 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnInit, EventEmitter } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { AXPWidgetNode, AXPWidgetCoreContextChangeEvent, AXPWidgetContainerComponent, AXPWidgetRenderMode } from '@acorex/platform/layout/widget-core';
|
|
5
|
+
import { AXFormComponent } from '@acorex/components/form';
|
|
6
|
+
import { AXPDynamicFormDefinition, AXPDynamicFormLook, AXPDynamicFormMode, AXPDialogRef } from '@acorex/platform/layout/components';
|
|
7
|
+
import { AXValidationSummary } from '@acorex/core/validation';
|
|
8
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
9
|
+
import { AXPopupSizeType } from '@acorex/components/popup';
|
|
10
|
+
import { AXPExpression, AXPGridLayoutOptions, AXPValidationRules, AXPActionMenuItem, AXPOptionsData } from '@acorex/platform/core';
|
|
11
|
+
import { AXBasePageComponent } from '@acorex/components/page';
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
declare class AXPLayoutRendererComponent implements OnInit {
|
|
14
|
+
#private;
|
|
15
|
+
private evaluatorService;
|
|
16
|
+
private conversionService;
|
|
17
|
+
/**
|
|
18
|
+
* Tracks the latest scheduled evaluation to ensure last-write-wins for async evaluate
|
|
19
|
+
*/
|
|
20
|
+
private evaluationRunId;
|
|
21
|
+
/**
|
|
22
|
+
* RxJS subjects for context management
|
|
23
|
+
*/
|
|
24
|
+
private contextUpdateSubject;
|
|
25
|
+
private contextChangeSubject;
|
|
26
|
+
/**
|
|
27
|
+
* Cache for expression evaluation results
|
|
28
|
+
*/
|
|
29
|
+
private expressionCache;
|
|
30
|
+
/**
|
|
31
|
+
* Cache for widget tree comparisons
|
|
32
|
+
*/
|
|
33
|
+
private widgetTreeCache;
|
|
34
|
+
/**
|
|
35
|
+
* Last layout hash for change detection
|
|
36
|
+
*/
|
|
37
|
+
private lastLayoutHash;
|
|
38
|
+
/**
|
|
39
|
+
* Form definition containing groups and fields OR widget tree
|
|
40
|
+
*/
|
|
41
|
+
layout: i0.InputSignal<AXPWidgetNode | AXPDynamicFormDefinition>;
|
|
42
|
+
/**
|
|
43
|
+
* Form context/model data
|
|
44
|
+
*/
|
|
45
|
+
context: i0.ModelSignal<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Form appearance and density styling (normal, compact, spacious)
|
|
48
|
+
*/
|
|
49
|
+
look: i0.InputSignal<AXPDynamicFormLook>;
|
|
50
|
+
/**
|
|
51
|
+
* Default form mode. Can be overridden by section/group and field.
|
|
52
|
+
*/
|
|
53
|
+
mode: i0.InputSignal<AXPDynamicFormMode>;
|
|
54
|
+
protected widgetTree: i0.WritableSignal<AXPWidgetNode | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Convert and evaluate data when inputs change (optimized with RxJS)
|
|
57
|
+
*/
|
|
58
|
+
conversionEffect: i0.EffectRef;
|
|
59
|
+
protected expressionEvaluator(expression: any, context: any): Promise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Emitted when context change is initiated
|
|
62
|
+
*/
|
|
63
|
+
contextInitiated: i0.OutputEmitterRef<any>;
|
|
64
|
+
/**
|
|
65
|
+
* Emitted when form becomes valid/invalid
|
|
66
|
+
*/
|
|
67
|
+
validityChange: i0.OutputEmitterRef<boolean>;
|
|
68
|
+
private form;
|
|
69
|
+
private container;
|
|
70
|
+
/**
|
|
71
|
+
* Internal context signal for reactivity
|
|
72
|
+
*/
|
|
73
|
+
protected internalContext: i0.WritableSignal<any>;
|
|
74
|
+
ngOnInit(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Handle context change events from widget container (optimized with RxJS)
|
|
77
|
+
*/
|
|
78
|
+
protected handleContextChanged(event: AXPWidgetCoreContextChangeEvent): void;
|
|
79
|
+
/**
|
|
80
|
+
* Get the form component instance
|
|
81
|
+
*/
|
|
82
|
+
getForm(): AXFormComponent | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Get the widget container component instance
|
|
85
|
+
*/
|
|
86
|
+
getContainer(): AXPWidgetContainerComponent | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Get current form context
|
|
89
|
+
*/
|
|
90
|
+
getContext(): any;
|
|
91
|
+
/**
|
|
92
|
+
* Update form context programmatically
|
|
93
|
+
*/
|
|
94
|
+
updateContext(context: any): void;
|
|
95
|
+
/**
|
|
96
|
+
* Get the current widget tree
|
|
97
|
+
*/
|
|
98
|
+
getWidgetTree(): AXPWidgetNode | null;
|
|
99
|
+
/**
|
|
100
|
+
* Validate the form
|
|
101
|
+
*/
|
|
102
|
+
validate(): Promise<AXValidationSummary>;
|
|
103
|
+
/**
|
|
104
|
+
* Setup RxJS streams for context management
|
|
105
|
+
*/
|
|
106
|
+
private setupContextStreams;
|
|
107
|
+
/**
|
|
108
|
+
* Type guard to check if the input is a form definition
|
|
109
|
+
*/
|
|
110
|
+
private isFormDefinition;
|
|
111
|
+
/**
|
|
112
|
+
* Generate layout hash for change detection (short hash)
|
|
113
|
+
*/
|
|
114
|
+
private generateLayoutHash;
|
|
115
|
+
/**
|
|
116
|
+
* Generate cache key for expression evaluation (short hash)
|
|
117
|
+
*/
|
|
118
|
+
private generateCacheKey;
|
|
119
|
+
/**
|
|
120
|
+
* Generate a simple hash for context change detection
|
|
121
|
+
*/
|
|
122
|
+
private generateContextHash;
|
|
123
|
+
/**
|
|
124
|
+
* Simple hash function for generating short keys
|
|
125
|
+
*/
|
|
126
|
+
private simpleHash;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutRendererComponent, never>;
|
|
128
|
+
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>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class LayoutBuilderModule {
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutBuilderModule, never>;
|
|
133
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LayoutBuilderModule, never, [typeof i1.CommonModule, typeof AXPLayoutRendererComponent], [typeof AXPLayoutRendererComponent]>;
|
|
134
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LayoutBuilderModule>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface LayoutWidgetOptions {
|
|
138
|
+
name?: string;
|
|
139
|
+
}
|
|
140
|
+
interface ValueWidgetOptions extends LayoutWidgetOptions {
|
|
141
|
+
path: string;
|
|
142
|
+
defaultValue?: any;
|
|
143
|
+
validations?: AXPValidationRules;
|
|
144
|
+
}
|
|
145
|
+
interface TextBoxOptions extends ValueWidgetOptions {
|
|
11
146
|
placeholder?: string;
|
|
12
147
|
maxLength?: number;
|
|
13
148
|
minLength?: number;
|
|
@@ -15,23 +150,24 @@ interface TextBoxOptions {
|
|
|
15
150
|
suffix?: string;
|
|
16
151
|
clearButton?: boolean;
|
|
17
152
|
}
|
|
18
|
-
interface NumberBoxOptions {
|
|
153
|
+
interface NumberBoxOptions extends ValueWidgetOptions {
|
|
19
154
|
min?: number;
|
|
20
155
|
max?: number;
|
|
21
156
|
step?: number;
|
|
22
157
|
placeholder?: string;
|
|
23
158
|
format?: string;
|
|
24
159
|
}
|
|
25
|
-
interface SelectBoxOptions {
|
|
26
|
-
|
|
160
|
+
interface SelectBoxOptions extends ValueWidgetOptions {
|
|
161
|
+
dataSource: any[] | (() => any[]) | (() => Promise<any[]>) | AXDataSource<any>;
|
|
27
162
|
valueField?: string;
|
|
28
163
|
textField?: string;
|
|
29
164
|
placeholder?: string;
|
|
30
165
|
multiple?: boolean;
|
|
31
166
|
searchable?: boolean;
|
|
32
167
|
clearButton?: boolean;
|
|
168
|
+
allowSearch?: boolean;
|
|
33
169
|
}
|
|
34
|
-
interface DateTimeBoxOptions {
|
|
170
|
+
interface DateTimeBoxOptions extends ValueWidgetOptions {
|
|
35
171
|
type?: 'date' | 'time' | 'datetime';
|
|
36
172
|
format?: string;
|
|
37
173
|
min?: Date | string;
|
|
@@ -39,24 +175,24 @@ interface DateTimeBoxOptions {
|
|
|
39
175
|
placeholder?: string;
|
|
40
176
|
clearButton?: boolean;
|
|
41
177
|
}
|
|
42
|
-
interface ToggleSwitchOptions {
|
|
178
|
+
interface ToggleSwitchOptions extends ValueWidgetOptions {
|
|
43
179
|
label?: string;
|
|
44
180
|
trueText?: string;
|
|
45
181
|
falseText?: string;
|
|
46
182
|
}
|
|
47
|
-
interface LargeTextBoxOptions {
|
|
183
|
+
interface LargeTextBoxOptions extends ValueWidgetOptions {
|
|
48
184
|
rows?: number;
|
|
49
185
|
maxLength?: number;
|
|
50
186
|
minLength?: number;
|
|
51
187
|
placeholder?: string;
|
|
52
188
|
resizable?: boolean;
|
|
53
189
|
}
|
|
54
|
-
interface ColorBoxOptions {
|
|
190
|
+
interface ColorBoxOptions extends ValueWidgetOptions {
|
|
55
191
|
format?: 'hex' | 'rgb' | 'hsl';
|
|
56
192
|
showAlpha?: boolean;
|
|
57
193
|
showPalette?: boolean;
|
|
58
194
|
}
|
|
59
|
-
interface AXPFlexContainerOptions {
|
|
195
|
+
interface AXPFlexContainerOptions extends LayoutWidgetOptions {
|
|
60
196
|
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
61
197
|
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
62
198
|
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
@@ -84,7 +220,7 @@ interface AXPFlexContainerOptions {
|
|
|
84
220
|
minHeight?: string;
|
|
85
221
|
maxHeight?: string;
|
|
86
222
|
}
|
|
87
|
-
interface AXPGridContainerOptions {
|
|
223
|
+
interface AXPGridContainerOptions extends LayoutWidgetOptions {
|
|
88
224
|
grid?: {
|
|
89
225
|
default?: {
|
|
90
226
|
columns?: number;
|
|
@@ -117,7 +253,7 @@ interface AXPGridContainerOptions {
|
|
|
117
253
|
minHeight?: string;
|
|
118
254
|
maxHeight?: string;
|
|
119
255
|
}
|
|
120
|
-
interface AXPPanelContainerOptions {
|
|
256
|
+
interface AXPPanelContainerOptions extends LayoutWidgetOptions {
|
|
121
257
|
caption?: string;
|
|
122
258
|
icon?: string;
|
|
123
259
|
look?: 'solid' | 'fill' | 'outline' | 'flat' | 'none';
|
|
@@ -125,7 +261,7 @@ interface AXPPanelContainerOptions {
|
|
|
125
261
|
showHeader?: boolean;
|
|
126
262
|
collapsed?: boolean;
|
|
127
263
|
}
|
|
128
|
-
interface AXPPageContainerOptions {
|
|
264
|
+
interface AXPPageContainerOptions extends LayoutWidgetOptions {
|
|
129
265
|
backgroundColor?: string;
|
|
130
266
|
theme?: {
|
|
131
267
|
id: string;
|
|
@@ -134,216 +270,155 @@ interface AXPPageContainerOptions {
|
|
|
134
270
|
hasFooter?: boolean;
|
|
135
271
|
direction?: string;
|
|
136
272
|
}
|
|
137
|
-
interface AXPTabsetContainerOptions {
|
|
273
|
+
interface AXPTabsetContainerOptions extends LayoutWidgetOptions {
|
|
138
274
|
look?: 'with-line' | 'with-line-color' | 'pills' | 'pills-color';
|
|
139
275
|
orientation?: 'vertical' | 'horizontal';
|
|
140
276
|
activeIndex?: number;
|
|
141
277
|
}
|
|
142
|
-
interface
|
|
278
|
+
interface AXPFieldsetContainerOptions extends LayoutWidgetOptions {
|
|
279
|
+
title?: string;
|
|
280
|
+
description?: string;
|
|
281
|
+
icon?: string;
|
|
282
|
+
collapsible?: boolean;
|
|
283
|
+
isOpen?: boolean;
|
|
284
|
+
look?: 'fieldset' | 'card' | 'group';
|
|
285
|
+
disabled?: boolean;
|
|
286
|
+
showHeader?: boolean;
|
|
287
|
+
cols?: number;
|
|
288
|
+
}
|
|
289
|
+
interface AXPFormFieldOptions extends LayoutWidgetOptions {
|
|
290
|
+
label?: string;
|
|
291
|
+
showLabel?: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface AXPDialogContainerOptions extends LayoutWidgetOptions {
|
|
294
|
+
title?: string;
|
|
295
|
+
message?: string;
|
|
296
|
+
size?: AXPopupSizeType;
|
|
297
|
+
closeButton?: boolean;
|
|
298
|
+
context?: any;
|
|
299
|
+
}
|
|
300
|
+
interface RichTextOptions extends ValueWidgetOptions {
|
|
143
301
|
placeholder?: string;
|
|
144
302
|
toolbar?: string[];
|
|
145
303
|
readonly?: boolean;
|
|
146
304
|
}
|
|
147
|
-
interface PasswordBoxOptions {
|
|
305
|
+
interface PasswordBoxOptions extends ValueWidgetOptions {
|
|
148
306
|
placeholder?: string;
|
|
149
307
|
revealToggle?: boolean;
|
|
150
308
|
maxLength?: number;
|
|
151
309
|
}
|
|
152
|
-
interface LookupBoxOptions {
|
|
310
|
+
interface LookupBoxOptions extends ValueWidgetOptions {
|
|
153
311
|
dataSource?: any[] | (() => any[]) | (() => Promise<any[]>);
|
|
154
312
|
valueField?: string;
|
|
155
313
|
textField?: string;
|
|
156
314
|
searchable?: boolean;
|
|
315
|
+
entity?: string;
|
|
316
|
+
look?: string;
|
|
317
|
+
columns?: any[];
|
|
318
|
+
expose?: any[];
|
|
319
|
+
multiple?: boolean;
|
|
320
|
+
allowClear?: boolean;
|
|
157
321
|
}
|
|
158
|
-
interface SelectionListOptions {
|
|
159
|
-
|
|
322
|
+
interface SelectionListOptions extends ValueWidgetOptions {
|
|
323
|
+
dataSource: any[] | (() => any[]) | (() => Promise<any[]>) | AXDataSource<any>;
|
|
160
324
|
valueField?: string;
|
|
161
325
|
textField?: string;
|
|
162
326
|
multiple?: boolean;
|
|
163
327
|
searchable?: boolean;
|
|
328
|
+
placeholder?: string;
|
|
329
|
+
}
|
|
330
|
+
interface InheritanceContext {
|
|
331
|
+
mode?: AXPWidgetRenderMode;
|
|
332
|
+
disabled?: boolean | string;
|
|
333
|
+
readonly?: boolean | string;
|
|
334
|
+
direction?: 'rtl' | 'ltr';
|
|
335
|
+
visible?: boolean | string;
|
|
336
|
+
}
|
|
337
|
+
interface InheritedProperties {
|
|
338
|
+
mode: AXPWidgetRenderMode;
|
|
339
|
+
disabled: boolean | string | undefined;
|
|
340
|
+
readonly: boolean | string | undefined;
|
|
341
|
+
direction: 'rtl' | 'ltr' | undefined;
|
|
342
|
+
visible: boolean | string | undefined;
|
|
164
343
|
}
|
|
165
344
|
interface AXPWidgetConfiguration {
|
|
166
345
|
type: string;
|
|
167
|
-
options?:
|
|
346
|
+
options?: AXPOptionsData;
|
|
168
347
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
name?: string;
|
|
172
|
-
widget?: AXPWidgetConfiguration;
|
|
173
|
-
children?: AXPLayoutNodeDefinition[];
|
|
348
|
+
type LayoutBuilderState = AXPWidgetNode;
|
|
349
|
+
type WidgetBuilderState = Omit<AXPWidgetNode, 'children'> & {
|
|
174
350
|
layout?: AXPGridLayoutOptions;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
visible?: boolean | string;
|
|
178
|
-
disabled?: boolean | string;
|
|
179
|
-
readonly?: boolean | string;
|
|
180
|
-
}
|
|
181
|
-
interface AXPLayoutDefinition {
|
|
182
|
-
nodes: AXPLayoutNodeDefinition[];
|
|
183
|
-
mode?: AXPLayoutMode;
|
|
184
|
-
direction?: AXPLayoutDirection;
|
|
185
|
-
look?: AXPLayoutLook;
|
|
186
|
-
layoutConfig?: AXPGridLayoutOptions;
|
|
187
|
-
}
|
|
188
|
-
interface LayoutBuilderState {
|
|
189
|
-
nodes: AXPLayoutNodeDefinition[];
|
|
190
|
-
mode: AXPLayoutMode;
|
|
191
|
-
direction: AXPLayoutDirection;
|
|
192
|
-
look: AXPLayoutLook;
|
|
193
|
-
layoutConfig: AXPGridLayoutOptions;
|
|
194
|
-
}
|
|
195
|
-
interface WidgetBuilderState {
|
|
196
|
-
id?: string;
|
|
197
|
-
name?: string;
|
|
198
|
-
type: 'widget';
|
|
199
|
-
widget?: AXPWidgetConfiguration;
|
|
200
|
-
children?: AXPLayoutNodeDefinition[];
|
|
351
|
+
};
|
|
352
|
+
type FormFieldBuilderState = AXPWidgetNode & {
|
|
201
353
|
layout?: AXPGridLayoutOptions;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
354
|
+
};
|
|
355
|
+
type DialogBuilderState = AXPWidgetNode & {
|
|
356
|
+
layout?: AXPGridLayoutOptions;
|
|
357
|
+
dialogOptions?: AXPDialogContainerOptions;
|
|
358
|
+
actions?: {
|
|
359
|
+
footer?: {
|
|
360
|
+
prefix?: AXPActionMenuItem[];
|
|
361
|
+
suffix?: AXPActionMenuItem[];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
interface IActionBuilder {
|
|
366
|
+
cancel(text?: string): IActionBuilder;
|
|
367
|
+
submit(text?: string): IActionBuilder;
|
|
368
|
+
custom(action: AXPActionMenuItem): IActionBuilder;
|
|
207
369
|
}
|
|
208
370
|
interface ILayoutBuilder {
|
|
209
|
-
widget(name?: string, delegate?: (widget: IWidgetBuilder) => void): ILayoutBuilder;
|
|
210
371
|
grid(delegate: (container: IGridContainerBuilder) => void): ILayoutBuilder;
|
|
211
372
|
flex(delegate: (container: IFlexContainerBuilder) => void): ILayoutBuilder;
|
|
212
373
|
panel(delegate: (container: IPanelContainerBuilder) => void): ILayoutBuilder;
|
|
213
374
|
page(delegate: (container: IPageContainerBuilder) => void): ILayoutBuilder;
|
|
214
375
|
tabset(delegate: (container: ITabsetContainerBuilder) => void): ILayoutBuilder;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
passwordBox(options?: PasswordBoxOptions): ILayoutBuilder;
|
|
219
|
-
numberBox(options?: NumberBoxOptions): ILayoutBuilder;
|
|
220
|
-
selectBox(options: SelectBoxOptions): ILayoutBuilder;
|
|
221
|
-
lookupBox(options: LookupBoxOptions): ILayoutBuilder;
|
|
222
|
-
selectionList(options: SelectionListOptions): ILayoutBuilder;
|
|
223
|
-
dateTimeBox(options?: DateTimeBoxOptions): ILayoutBuilder;
|
|
224
|
-
toggleSwitch(options?: ToggleSwitchOptions): ILayoutBuilder;
|
|
225
|
-
colorBox(options?: ColorBoxOptions): ILayoutBuilder;
|
|
226
|
-
customWidget(type: string, options?: any): ILayoutBuilder;
|
|
227
|
-
layout(config: Partial<AXPGridLayoutOptions>): ILayoutBuilder;
|
|
228
|
-
mode(mode: AXPLayoutMode): ILayoutBuilder;
|
|
229
|
-
direction(direction: AXPLayoutDirection): ILayoutBuilder;
|
|
230
|
-
look(look: AXPLayoutLook): ILayoutBuilder;
|
|
231
|
-
build(): AXPLayoutDefinition;
|
|
232
|
-
render(): AXPWidgetNode;
|
|
233
|
-
}
|
|
234
|
-
interface LayoutDefinition {
|
|
235
|
-
zones: {
|
|
236
|
-
[zoneId: string]: ZoneConfig;
|
|
237
|
-
};
|
|
238
|
-
styles?: {
|
|
239
|
-
[key: string]: any;
|
|
240
|
-
};
|
|
241
|
-
responsive?: ResponsiveConfig;
|
|
242
|
-
}
|
|
243
|
-
interface ZoneConfig {
|
|
244
|
-
layout?: LayoutTypeConfig;
|
|
245
|
-
styles?: {
|
|
246
|
-
[key: string]: any;
|
|
247
|
-
};
|
|
248
|
-
containers?: {
|
|
249
|
-
[containerId: string]: ContainerConfig;
|
|
250
|
-
};
|
|
251
|
-
order?: number;
|
|
252
|
-
}
|
|
253
|
-
interface ContainerConfig {
|
|
254
|
-
layout?: LayoutTypeConfig;
|
|
255
|
-
styles?: {
|
|
256
|
-
[key: string]: any;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
interface LayoutTypeConfig {
|
|
260
|
-
type?: 'flex' | 'grid' | 'block';
|
|
261
|
-
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
262
|
-
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
263
|
-
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
|
264
|
-
gap?: string;
|
|
265
|
-
grid?: {
|
|
266
|
-
columns?: number;
|
|
267
|
-
rows?: number;
|
|
268
|
-
gap?: string;
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
interface LayoutNode {
|
|
272
|
-
id: string;
|
|
273
|
-
type: string;
|
|
274
|
-
zone: string;
|
|
275
|
-
container?: string;
|
|
276
|
-
path?: string;
|
|
277
|
-
options?: any;
|
|
278
|
-
formula?: string;
|
|
279
|
-
triggers?: any[];
|
|
280
|
-
defaultValue?: any;
|
|
281
|
-
mode?: AXPLayoutMode;
|
|
282
|
-
layout?: NodeLayoutConfig;
|
|
283
|
-
}
|
|
284
|
-
interface NodeLayoutConfig {
|
|
285
|
-
width?: string;
|
|
286
|
-
height?: string;
|
|
287
|
-
order?: number;
|
|
288
|
-
flex?: string;
|
|
289
|
-
gridArea?: string;
|
|
290
|
-
}
|
|
291
|
-
interface ResponsiveConfig {
|
|
292
|
-
breakpoints?: {
|
|
293
|
-
mobile?: number;
|
|
294
|
-
tablet?: number;
|
|
295
|
-
desktop?: number;
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
interface LayoutRenderContext {
|
|
299
|
-
data?: any;
|
|
300
|
-
variables?: {
|
|
301
|
-
[key: string]: any;
|
|
302
|
-
};
|
|
303
|
-
functions?: {
|
|
304
|
-
[key: string]: Function;
|
|
305
|
-
};
|
|
376
|
+
fieldset(delegate: (container: IFieldsetContainerBuilder) => void): ILayoutBuilder;
|
|
377
|
+
dialog(delegate: (container: IDialogBuilder) => void): IDialogBuilder;
|
|
378
|
+
build(): AXPWidgetNode;
|
|
306
379
|
}
|
|
307
380
|
interface IWidgetBuilder {
|
|
308
|
-
|
|
381
|
+
name(name: string): IWidgetBuilder;
|
|
382
|
+
path(path: string): IWidgetBuilder;
|
|
383
|
+
type(type: string): IWidgetBuilder;
|
|
384
|
+
options(options: AXPOptionsData): IWidgetBuilder;
|
|
309
385
|
layout(config: Partial<AXPGridLayoutOptions>): IWidgetBuilder;
|
|
310
386
|
layout(colSpan: number): IWidgetBuilder;
|
|
311
|
-
mode(mode:
|
|
312
|
-
order(value: number | string): IWidgetBuilder;
|
|
387
|
+
mode(mode: AXPWidgetRenderMode): IWidgetBuilder;
|
|
313
388
|
visible(condition: boolean | string): IWidgetBuilder;
|
|
314
389
|
disabled(condition: boolean | string): IWidgetBuilder;
|
|
315
390
|
readonly(condition: boolean | string): IWidgetBuilder;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
tabset(delegate: (container: ITabsetContainerBuilder) => void): IWidgetBuilder;
|
|
321
|
-
widget(name?: string, delegate?: (widget: IWidgetBuilder) => void): IWidgetBuilder;
|
|
322
|
-
textBox(options?: TextBoxOptions): IWidgetBuilder;
|
|
323
|
-
largeTextBox(options?: LargeTextBoxOptions): IWidgetBuilder;
|
|
324
|
-
richText(options?: RichTextOptions): IWidgetBuilder;
|
|
325
|
-
passwordBox(options?: PasswordBoxOptions): IWidgetBuilder;
|
|
326
|
-
numberBox(options?: NumberBoxOptions): IWidgetBuilder;
|
|
327
|
-
selectBox(options: SelectBoxOptions): IWidgetBuilder;
|
|
328
|
-
lookupBox(options: LookupBoxOptions): IWidgetBuilder;
|
|
329
|
-
selectionList(options: SelectionListOptions): IWidgetBuilder;
|
|
330
|
-
dateTimeBox(options?: DateTimeBoxOptions): IWidgetBuilder;
|
|
331
|
-
toggleSwitch(options?: ToggleSwitchOptions): IWidgetBuilder;
|
|
332
|
-
colorBox(options?: ColorBoxOptions): IWidgetBuilder;
|
|
333
|
-
customWidget<T>(type: string, options?: T): IWidgetBuilder;
|
|
334
|
-
build(): AXPLayoutNodeDefinition;
|
|
391
|
+
direction(direction: 'rtl' | 'ltr'): IWidgetBuilder;
|
|
392
|
+
withInheritanceContext(context: InheritanceContext): IWidgetBuilder;
|
|
393
|
+
getInheritanceContext(): InheritanceContext;
|
|
394
|
+
build(): AXPWidgetNode;
|
|
335
395
|
}
|
|
336
396
|
interface IBaseContainerBuilder<TContainer = any> {
|
|
337
|
-
|
|
397
|
+
name(name: string): TContainer;
|
|
398
|
+
path(path: string): TContainer;
|
|
399
|
+
mode(mode: AXPWidgetRenderMode): TContainer;
|
|
400
|
+
visible(condition: boolean | AXPExpression): TContainer;
|
|
401
|
+
disabled(condition: boolean | AXPExpression): TContainer;
|
|
402
|
+
readonly(condition: boolean | AXPExpression): TContainer;
|
|
403
|
+
direction(direction: 'rtl' | 'ltr'): TContainer;
|
|
404
|
+
withInheritanceContext(context: InheritanceContext): TContainer;
|
|
405
|
+
getInheritanceContext(): InheritanceContext;
|
|
406
|
+
build(): AXPWidgetNode;
|
|
407
|
+
}
|
|
408
|
+
interface ILayoutContainerBuilder<TContainer = any> {
|
|
338
409
|
layout(config: Partial<AXPGridLayoutOptions>): TContainer;
|
|
339
410
|
layout(colSpan: number): TContainer;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
411
|
+
}
|
|
412
|
+
interface IChildContainerBuilder<TContainer = any> {
|
|
413
|
+
grid(delegate: (container: IGridContainerBuilder) => void): TContainer;
|
|
414
|
+
flex(delegate: (container: IFlexContainerBuilder) => void): TContainer;
|
|
415
|
+
panel(delegate: (container: IPanelContainerBuilder) => void): TContainer;
|
|
416
|
+
page(delegate: (container: IPageContainerBuilder) => void): TContainer;
|
|
417
|
+
tabset(delegate: (container: ITabsetContainerBuilder) => void): TContainer;
|
|
418
|
+
fieldset(delegate: (container: IFieldsetContainerBuilder) => void): TContainer;
|
|
419
|
+
formField(label: string, delegate?: (field: IFormFieldBuilder) => void): TContainer;
|
|
420
|
+
}
|
|
421
|
+
interface IWidgetContainerBuilder<TContainer = any> {
|
|
347
422
|
textBox(options?: TextBoxOptions): TContainer;
|
|
348
423
|
largeTextBox(options?: LargeTextBoxOptions): TContainer;
|
|
349
424
|
richText(options?: RichTextOptions): TContainer;
|
|
@@ -356,12 +431,11 @@ interface IBaseContainerBuilder<TContainer = any> {
|
|
|
356
431
|
toggleSwitch(options?: ToggleSwitchOptions): TContainer;
|
|
357
432
|
colorBox(options?: ColorBoxOptions): TContainer;
|
|
358
433
|
customWidget<T>(type: string, options?: T): TContainer;
|
|
359
|
-
build(): AXPLayoutNodeDefinition;
|
|
360
434
|
}
|
|
361
|
-
interface IFlexContainerBuilder extends IBaseContainerBuilder<IFlexContainerBuilder> {
|
|
435
|
+
interface IFlexContainerBuilder extends IBaseContainerBuilder<IFlexContainerBuilder>, ILayoutContainerBuilder<IFlexContainerBuilder>, IChildContainerBuilder<IFlexContainerBuilder>, IWidgetContainerBuilder<IFlexContainerBuilder> {
|
|
362
436
|
setOptions(options: AXPFlexContainerOptions): IFlexContainerBuilder;
|
|
363
|
-
|
|
364
|
-
|
|
437
|
+
setDirection(direction: 'row' | 'column' | 'row-reverse' | 'column-reverse'): IFlexContainerBuilder;
|
|
438
|
+
setWrap(wrap: 'nowrap' | 'wrap' | 'wrap-reverse'): IFlexContainerBuilder;
|
|
365
439
|
setJustifyContent(justify: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'): IFlexContainerBuilder;
|
|
366
440
|
setAlignItems(align: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'): IFlexContainerBuilder;
|
|
367
441
|
setGap(gap: string): IFlexContainerBuilder;
|
|
@@ -369,7 +443,7 @@ interface IFlexContainerBuilder extends IBaseContainerBuilder<IFlexContainerBuil
|
|
|
369
443
|
setPadding(padding: string): IFlexContainerBuilder;
|
|
370
444
|
setMargin(margin: string): IFlexContainerBuilder;
|
|
371
445
|
}
|
|
372
|
-
interface IGridContainerBuilder extends IBaseContainerBuilder<IGridContainerBuilder> {
|
|
446
|
+
interface IGridContainerBuilder extends IBaseContainerBuilder<IGridContainerBuilder>, ILayoutContainerBuilder<IGridContainerBuilder>, IChildContainerBuilder<IGridContainerBuilder>, IWidgetContainerBuilder<IGridContainerBuilder> {
|
|
373
447
|
setOptions(options: AXPGridContainerOptions): IGridContainerBuilder;
|
|
374
448
|
setColumns(columns: number): IGridContainerBuilder;
|
|
375
449
|
setRows(rows: number): IGridContainerBuilder;
|
|
@@ -381,7 +455,7 @@ interface IGridContainerBuilder extends IBaseContainerBuilder<IGridContainerBuil
|
|
|
381
455
|
setPadding(padding: string): IGridContainerBuilder;
|
|
382
456
|
setMargin(margin: string): IGridContainerBuilder;
|
|
383
457
|
}
|
|
384
|
-
interface IPanelContainerBuilder extends IBaseContainerBuilder<IPanelContainerBuilder> {
|
|
458
|
+
interface IPanelContainerBuilder extends IBaseContainerBuilder<IPanelContainerBuilder>, ILayoutContainerBuilder<IPanelContainerBuilder>, IChildContainerBuilder<IPanelContainerBuilder>, IWidgetContainerBuilder<IPanelContainerBuilder> {
|
|
385
459
|
setOptions(options: AXPPanelContainerOptions): IPanelContainerBuilder;
|
|
386
460
|
setCaption(caption: string): IPanelContainerBuilder;
|
|
387
461
|
setIcon(icon: string): IPanelContainerBuilder;
|
|
@@ -389,7 +463,7 @@ interface IPanelContainerBuilder extends IBaseContainerBuilder<IPanelContainerBu
|
|
|
389
463
|
setShowHeader(show: boolean): IPanelContainerBuilder;
|
|
390
464
|
setCollapsed(collapsed: boolean): IPanelContainerBuilder;
|
|
391
465
|
}
|
|
392
|
-
interface IPageContainerBuilder extends IBaseContainerBuilder<IPageContainerBuilder> {
|
|
466
|
+
interface IPageContainerBuilder extends IBaseContainerBuilder<IPageContainerBuilder>, ILayoutContainerBuilder<IPageContainerBuilder>, IChildContainerBuilder<IPageContainerBuilder>, IWidgetContainerBuilder<IPageContainerBuilder> {
|
|
393
467
|
setOptions(options: AXPPageContainerOptions): IPageContainerBuilder;
|
|
394
468
|
setBackgroundColor(color: string): IPageContainerBuilder;
|
|
395
469
|
setTheme(theme: {
|
|
@@ -397,89 +471,167 @@ interface IPageContainerBuilder extends IBaseContainerBuilder<IPageContainerBuil
|
|
|
397
471
|
}): IPageContainerBuilder;
|
|
398
472
|
setHasHeader(hasHeader: boolean): IPageContainerBuilder;
|
|
399
473
|
setHasFooter(hasFooter: boolean): IPageContainerBuilder;
|
|
400
|
-
setDirection(direction:
|
|
474
|
+
setDirection(direction: 'rtl' | 'ltr'): IPageContainerBuilder;
|
|
401
475
|
}
|
|
402
|
-
interface ITabsetContainerBuilder extends IBaseContainerBuilder<ITabsetContainerBuilder> {
|
|
476
|
+
interface ITabsetContainerBuilder extends IBaseContainerBuilder<ITabsetContainerBuilder>, ILayoutContainerBuilder<ITabsetContainerBuilder>, IChildContainerBuilder<ITabsetContainerBuilder>, IWidgetContainerBuilder<ITabsetContainerBuilder> {
|
|
403
477
|
setOptions(options: AXPTabsetContainerOptions): ITabsetContainerBuilder;
|
|
404
478
|
setLook(look: 'with-line' | 'with-line-color' | 'pills' | 'pills-color'): ITabsetContainerBuilder;
|
|
405
479
|
setOrientation(orientation: 'vertical' | 'horizontal'): ITabsetContainerBuilder;
|
|
406
480
|
setActiveIndex(index: number): ITabsetContainerBuilder;
|
|
407
481
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
482
|
+
interface IFormFieldBuilder extends IBaseContainerBuilder<IFormFieldBuilder>, ILayoutContainerBuilder<IFormFieldBuilder> {
|
|
483
|
+
setOptions(options: AXPFormFieldOptions): IFormFieldBuilder;
|
|
484
|
+
setLabel(label: string): IFormFieldBuilder;
|
|
485
|
+
setShowLabel(showLabel: boolean): IFormFieldBuilder;
|
|
486
|
+
textBox(options?: Omit<TextBoxOptions, 'path'>): IFormFieldBuilder;
|
|
487
|
+
largeTextBox(options?: Omit<LargeTextBoxOptions, 'path'>): IFormFieldBuilder;
|
|
488
|
+
richText(options?: Omit<RichTextOptions, 'path'>): IFormFieldBuilder;
|
|
489
|
+
passwordBox(options?: Omit<PasswordBoxOptions, 'path'>): IFormFieldBuilder;
|
|
490
|
+
numberBox(options?: Omit<NumberBoxOptions, 'path'>): IFormFieldBuilder;
|
|
491
|
+
selectBox(options: Omit<SelectBoxOptions, 'path'>): IFormFieldBuilder;
|
|
492
|
+
lookupBox(options: Omit<LookupBoxOptions, 'path'>): IFormFieldBuilder;
|
|
493
|
+
selectionList(options: Omit<SelectionListOptions, 'path'>): IFormFieldBuilder;
|
|
494
|
+
dateTimeBox(options?: Omit<DateTimeBoxOptions, 'path'>): IFormFieldBuilder;
|
|
495
|
+
toggleSwitch(options?: Omit<ToggleSwitchOptions, 'path'>): IFormFieldBuilder;
|
|
496
|
+
colorBox(options?: Omit<ColorBoxOptions, 'path'>): IFormFieldBuilder;
|
|
497
|
+
customWidget<T>(type: string, options?: Omit<T, 'path'>): IFormFieldBuilder;
|
|
498
|
+
}
|
|
499
|
+
interface IFieldsetContainerBuilder extends IBaseContainerBuilder<IFieldsetContainerBuilder>, ILayoutContainerBuilder<IFieldsetContainerBuilder> {
|
|
500
|
+
setOptions(options: AXPFieldsetContainerOptions): IFieldsetContainerBuilder;
|
|
501
|
+
setTitle(title: string): IFieldsetContainerBuilder;
|
|
502
|
+
setDescription(description: string): IFieldsetContainerBuilder;
|
|
503
|
+
setIcon(icon: string): IFieldsetContainerBuilder;
|
|
504
|
+
setCollapsible(collapsible: boolean): IFieldsetContainerBuilder;
|
|
505
|
+
setIsOpen(isOpen: boolean): IFieldsetContainerBuilder;
|
|
506
|
+
setLook(look: 'fieldset' | 'card' | 'group'): IFieldsetContainerBuilder;
|
|
507
|
+
setShowHeader(showHeader: boolean): IFieldsetContainerBuilder;
|
|
508
|
+
setCols(cols: number): IFieldsetContainerBuilder;
|
|
509
|
+
formField(label: string, delegate?: (field: IFormFieldBuilder) => void): IFieldsetContainerBuilder;
|
|
510
|
+
}
|
|
511
|
+
interface IDialogBuilder {
|
|
512
|
+
setOptions(options: AXPDialogContainerOptions): IDialogBuilder;
|
|
513
|
+
setTitle(title: string): IDialogBuilder;
|
|
514
|
+
setMessage(message?: string): IDialogBuilder;
|
|
515
|
+
setSize(size: AXPopupSizeType): IDialogBuilder;
|
|
516
|
+
setCloseButton(closeButton: boolean): IDialogBuilder;
|
|
517
|
+
setContext(context: any): IDialogBuilder;
|
|
518
|
+
content(delegate: (layoutBuilder: IFlexContainerBuilder) => void): IDialogBuilder;
|
|
519
|
+
setActions(delegate?: (actions: IActionBuilder) => void): IDialogBuilder;
|
|
520
|
+
show(): Promise<AXPDialogRef>;
|
|
421
521
|
}
|
|
422
522
|
|
|
423
523
|
declare class AXPLayoutBuilderService {
|
|
524
|
+
private popupService;
|
|
424
525
|
/**
|
|
425
526
|
* Create a new layout builder
|
|
426
527
|
*/
|
|
427
528
|
create(): ILayoutBuilder;
|
|
529
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutBuilderService, never>;
|
|
530
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPLayoutBuilderService>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare class AXPLayoutConversionService {
|
|
534
|
+
private widgetTreeCache;
|
|
535
|
+
private formDefinitionCache;
|
|
428
536
|
/**
|
|
429
|
-
* Convert
|
|
430
|
-
*
|
|
537
|
+
* Convert AXPDynamicFormDefinition to AXPWidgetNode tree structure
|
|
538
|
+
* Groups become Fieldset Layouts with Form Field widgets as children
|
|
539
|
+
* Fields become Form Field widgets with Editor widgets as children
|
|
431
540
|
*/
|
|
432
|
-
|
|
433
|
-
layoutDefinition: LayoutDefinition;
|
|
434
|
-
layoutNodes: LayoutNode[];
|
|
435
|
-
};
|
|
541
|
+
convertFormDefinition(formDefinition: AXPDynamicFormDefinition): AXPWidgetNode;
|
|
436
542
|
/**
|
|
437
|
-
* Convert
|
|
543
|
+
* Convert AXPWidgetNode tree back to AXPDynamicFormDefinition
|
|
544
|
+
* Parses Fieldset Layouts back to Groups
|
|
545
|
+
* Parses Form Field widgets back to Fields
|
|
438
546
|
*/
|
|
439
|
-
|
|
547
|
+
convertWidgetTreeToFormDefinition(widgetTree: AXPWidgetNode): AXPDynamicFormDefinition;
|
|
440
548
|
/**
|
|
441
|
-
*
|
|
549
|
+
* Validate that a widget tree represents a valid dynamic form structure
|
|
442
550
|
*/
|
|
443
|
-
|
|
551
|
+
validateFormWidgetTree(widgetTree: AXPWidgetNode): boolean;
|
|
444
552
|
/**
|
|
445
|
-
*
|
|
553
|
+
* Clear all caches
|
|
446
554
|
*/
|
|
447
|
-
|
|
555
|
+
clearCaches(): void;
|
|
448
556
|
/**
|
|
449
|
-
*
|
|
557
|
+
* Get cache statistics
|
|
450
558
|
*/
|
|
451
|
-
|
|
559
|
+
getCacheStats(): {
|
|
560
|
+
widgetTreeCacheSize: number;
|
|
561
|
+
formDefinitionCacheSize: number;
|
|
562
|
+
};
|
|
452
563
|
/**
|
|
453
|
-
*
|
|
564
|
+
* Convert a single group to Fieldset widget structure
|
|
454
565
|
*/
|
|
455
|
-
private
|
|
566
|
+
private createGroupAsFieldsetWidget;
|
|
456
567
|
/**
|
|
457
|
-
*
|
|
568
|
+
* Convert fields to Form Field widgets
|
|
458
569
|
*/
|
|
459
|
-
private
|
|
570
|
+
private createFieldWidgets;
|
|
460
571
|
/**
|
|
461
|
-
*
|
|
572
|
+
* Convert a single field to Form Field widget with editor as child
|
|
462
573
|
*/
|
|
463
|
-
private
|
|
574
|
+
private createFormFieldWidget;
|
|
464
575
|
/**
|
|
465
|
-
*
|
|
576
|
+
* Extract group information from Fieldset Layout widget
|
|
466
577
|
*/
|
|
467
|
-
private
|
|
578
|
+
private extractGroupFromFieldset;
|
|
468
579
|
/**
|
|
469
|
-
*
|
|
580
|
+
* Extract field information from Form Field widget
|
|
470
581
|
*/
|
|
471
|
-
private
|
|
582
|
+
private extractFieldFromFormWidget;
|
|
472
583
|
/**
|
|
473
|
-
*
|
|
584
|
+
* Create cache key for form definition
|
|
474
585
|
*/
|
|
475
|
-
private
|
|
586
|
+
private createFormDefinitionCacheKey;
|
|
476
587
|
/**
|
|
477
|
-
*
|
|
588
|
+
* Create cache key for widget tree
|
|
478
589
|
*/
|
|
479
|
-
private
|
|
480
|
-
|
|
481
|
-
|
|
590
|
+
private createWidgetTreeCacheKey;
|
|
591
|
+
/**
|
|
592
|
+
* Create a simple hash from a string
|
|
593
|
+
*/
|
|
594
|
+
private createSimpleHash;
|
|
595
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPLayoutConversionService, never>;
|
|
596
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPLayoutConversionService>;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
interface DialogRendererConfig {
|
|
600
|
+
title: string;
|
|
601
|
+
message?: string;
|
|
602
|
+
context: any;
|
|
603
|
+
definition: AXPWidgetNode;
|
|
604
|
+
actions?: {
|
|
605
|
+
footer?: {
|
|
606
|
+
prefix?: any[];
|
|
607
|
+
suffix?: any[];
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
interface DialogRendererResult {
|
|
612
|
+
context: any;
|
|
613
|
+
action?: string;
|
|
614
|
+
}
|
|
615
|
+
declare class AXPDialogRendererComponent extends AXBasePageComponent implements OnInit {
|
|
616
|
+
config: DialogRendererConfig;
|
|
617
|
+
result: EventEmitter<DialogRendererResult>;
|
|
618
|
+
private dialogResult?;
|
|
619
|
+
context: i0.WritableSignal<any>;
|
|
620
|
+
callBack: (dialogRef: AXPDialogRef) => void;
|
|
621
|
+
data: any;
|
|
622
|
+
private isDialogLoading;
|
|
623
|
+
ngOnInit(): void;
|
|
624
|
+
handleContextChanged(event: any): void;
|
|
625
|
+
handleContextInitiated(event: any): void;
|
|
626
|
+
visibleFooterPrefixActions(): any[];
|
|
627
|
+
visibleFooterSuffixActions(): any[];
|
|
628
|
+
isFormLoading(): boolean;
|
|
629
|
+
isSubmitting(): boolean;
|
|
630
|
+
executeAction(action: any): Promise<void>;
|
|
631
|
+
close(result?: DialogRendererResult): void;
|
|
632
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDialogRendererComponent, never>;
|
|
633
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPDialogRendererComponent, "axp-dialog-renderer", never, { "config": { "alias": "config"; "required": false; }; }, { "result": "result"; }, never, never, true, never>;
|
|
482
634
|
}
|
|
483
635
|
|
|
484
|
-
export { AXPLayoutBuilderService, AXPLayoutRendererComponent, LayoutBuilderModule };
|
|
485
|
-
export type {
|
|
636
|
+
export { AXPDialogRendererComponent, AXPLayoutBuilderService, AXPLayoutConversionService, AXPLayoutRendererComponent, LayoutBuilderModule };
|
|
637
|
+
export type { AXPDialogContainerOptions, AXPFieldsetContainerOptions, AXPFlexContainerOptions, AXPFormFieldOptions, AXPGridContainerOptions, AXPPageContainerOptions, AXPPanelContainerOptions, AXPTabsetContainerOptions, AXPWidgetConfiguration, ColorBoxOptions, DateTimeBoxOptions, DialogBuilderState, DialogRendererConfig, DialogRendererResult, FormFieldBuilderState, IActionBuilder, IBaseContainerBuilder, IChildContainerBuilder, IDialogBuilder, IFieldsetContainerBuilder, IFlexContainerBuilder, IFormFieldBuilder, IGridContainerBuilder, ILayoutBuilder, ILayoutContainerBuilder, IPageContainerBuilder, IPanelContainerBuilder, ITabsetContainerBuilder, IWidgetBuilder, IWidgetContainerBuilder, InheritanceContext, InheritedProperties, LargeTextBoxOptions, LayoutBuilderState, LayoutWidgetOptions, LookupBoxOptions, NumberBoxOptions, PasswordBoxOptions, RichTextOptions, SelectBoxOptions, SelectionListOptions, TextBoxOptions, ToggleSwitchOptions, ValueWidgetOptions, WidgetBuilderState };
|