@masterteam/components 0.0.156 → 0.0.158
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +165 -2
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-drawer.mjs +75 -5
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +159 -19
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-runtime-action.mjs +363 -0
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -0
- package/fesm2022/masterteam-components-table.mjs +2 -2
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +17 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +5 -1
- package/types/masterteam-components-business-fields.d.ts +63 -2
- package/types/masterteam-components-drawer.d.ts +11 -1
- package/types/masterteam-components-dynamic-drawer.d.ts +28 -0
- package/types/masterteam-components-runtime-action.d.ts +102 -0
- package/types/masterteam-components.d.ts +27 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.158",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/components",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -187,6 +187,10 @@
|
|
|
187
187
|
"types": "./types/masterteam-components-radio-cards-field.d.ts",
|
|
188
188
|
"default": "./fesm2022/masterteam-components-radio-cards-field.mjs"
|
|
189
189
|
},
|
|
190
|
+
"./runtime-action": {
|
|
191
|
+
"types": "./types/masterteam-components-runtime-action.d.ts",
|
|
192
|
+
"default": "./fesm2022/masterteam-components-runtime-action.mjs"
|
|
193
|
+
},
|
|
190
194
|
"./select-field": {
|
|
191
195
|
"types": "./types/masterteam-components-select-field.d.ts",
|
|
192
196
|
"default": "./fesm2022/masterteam-components-select-field.mjs"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchedulePredecessorFieldRuntimeContext } from '@masterteam/components';
|
|
2
|
+
import { LookupMatrixFieldConfig, LookupOptionItemConfig, LookupMatrixCellConfig, SchedulePredecessorFieldRuntimeContext, EntityListFieldRuntimeContext } from '@masterteam/components';
|
|
3
3
|
import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
|
|
4
4
|
import { HttpContext } from '@angular/common/http';
|
|
5
5
|
import { ColumnDef, TableAction } from '@masterteam/components/table';
|
|
@@ -228,5 +228,66 @@ declare class SchedulePredecessorField implements ControlValueAccessor {
|
|
|
228
228
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchedulePredecessorField, "mt-schedule-predecessor-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
interface EntityListRowValue {
|
|
232
|
+
propertyId?: number;
|
|
233
|
+
propertyKey?: string;
|
|
234
|
+
rawValue?: unknown;
|
|
235
|
+
value?: unknown;
|
|
236
|
+
}
|
|
237
|
+
interface EntityListReadRow {
|
|
238
|
+
entityId: number;
|
|
239
|
+
values?: EntityListRowValue[];
|
|
240
|
+
}
|
|
241
|
+
/** Stored EntityList property value (round-tripped through the form). */
|
|
242
|
+
interface EntityListStoredValue {
|
|
243
|
+
entityIds?: number[];
|
|
244
|
+
createdIds?: number[];
|
|
245
|
+
updatedIds?: number[];
|
|
246
|
+
deletedIds?: number[];
|
|
247
|
+
snapshot?: unknown;
|
|
248
|
+
rows?: unknown[];
|
|
249
|
+
}
|
|
250
|
+
declare class EntityListField implements ControlValueAccessor {
|
|
251
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
252
|
+
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
253
|
+
readonly required: _angular_core.InputSignal<boolean>;
|
|
254
|
+
/** EntityList property id used in the read endpoint route. */
|
|
255
|
+
readonly propertyId: _angular_core.InputSignal<number | null>;
|
|
256
|
+
/** Property configuration (sourceType, moduleId, access, etc). */
|
|
257
|
+
readonly configuration: _angular_core.InputSignal<Record<string, unknown> | null>;
|
|
258
|
+
/** Runtime ids needed to call the read endpoint. */
|
|
259
|
+
readonly runtimeContext: _angular_core.InputSignal<EntityListFieldRuntimeContext | null>;
|
|
260
|
+
/** Optional HttpContext (e.g. to disable base URL prefixing). */
|
|
261
|
+
readonly context: _angular_core.InputSignal<HttpContext | undefined>;
|
|
262
|
+
private readonly storedValue;
|
|
263
|
+
protected readonly rows: _angular_core.WritableSignal<EntityListReadRow[]>;
|
|
264
|
+
protected readonly loading: _angular_core.WritableSignal<boolean>;
|
|
265
|
+
protected readonly errorMessage: _angular_core.WritableSignal<string | null>;
|
|
266
|
+
protected readonly disabled: _angular_core.WritableSignal<boolean>;
|
|
267
|
+
protected requiredValidator: typeof Validators.required;
|
|
268
|
+
ngControl: NgControl | null;
|
|
269
|
+
protected readonly sourceId: _angular_core.Signal<number | null>;
|
|
270
|
+
protected readonly levelDataIdParam: _angular_core.Signal<number | null>;
|
|
271
|
+
protected readonly canRead: _angular_core.Signal<boolean>;
|
|
272
|
+
protected readonly hasRows: _angular_core.Signal<boolean>;
|
|
273
|
+
protected onTouched: () => void;
|
|
274
|
+
protected onModelChange: (value: EntityListStoredValue | null) => void;
|
|
275
|
+
private readonly http;
|
|
276
|
+
private readonly destroyRef;
|
|
277
|
+
constructor();
|
|
278
|
+
writeValue(value: EntityListStoredValue | null): void;
|
|
279
|
+
registerOnChange(fn: (value: EntityListStoredValue | null) => void): void;
|
|
280
|
+
registerOnTouched(fn: () => void): void;
|
|
281
|
+
setDisabledState(isDisabled: boolean): void;
|
|
282
|
+
private fetchRows;
|
|
283
|
+
protected rowTitle(row: EntityListReadRow): string;
|
|
284
|
+
protected rowFields(row: EntityListReadRow): EntityListRowValue[];
|
|
285
|
+
protected trackByRow(_i: number, row: EntityListReadRow): number | string;
|
|
286
|
+
protected trackByField(_i: number, value: EntityListRowValue): string | number;
|
|
287
|
+
protected formatValue(value: EntityListRowValue): string;
|
|
288
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityListField, never>;
|
|
289
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityListField, "mt-entity-list-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "propertyId": { "alias": "propertyId"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export { EntityListField, LookupMatrixField, SchedulePredecessorField, SchemaConnectionField };
|
|
232
293
|
export type { ConnectionPayload, ConnectionSource, ConnectionSourceLevel, SchemaConnectionConfig, SourceLevelState };
|
|
@@ -9,6 +9,9 @@ declare class Drawer implements OnDestroy {
|
|
|
9
9
|
private readonly drawerInstanceClass;
|
|
10
10
|
private customMask;
|
|
11
11
|
private removeMaskClickListener;
|
|
12
|
+
private resizeAnimTimer;
|
|
13
|
+
private readonly RESIZE_ANIM_CLASS;
|
|
14
|
+
private readonly RESIZE_ANIM_DURATION_MS;
|
|
12
15
|
visible: _angular_core.ModelSignal<boolean>;
|
|
13
16
|
visibleChange: _angular_core.OutputEmitterRef<boolean>;
|
|
14
17
|
onShow: _angular_core.OutputEmitterRef<boolean>;
|
|
@@ -25,13 +28,20 @@ declare class Drawer implements OnDestroy {
|
|
|
25
28
|
transitionOptions: _angular_core.InputSignal<string>;
|
|
26
29
|
appendTo: _angular_core.InputSignal<string | HTMLElement>;
|
|
27
30
|
modal: _angular_core.InputSignal<boolean>;
|
|
31
|
+
showMaximizeToggle: _angular_core.InputSignal<boolean>;
|
|
32
|
+
maximizeTooltip: _angular_core.InputSignal<string>;
|
|
33
|
+
restoreTooltip: _angular_core.InputSignal<string>;
|
|
34
|
+
maximized: _angular_core.ModelSignal<boolean>;
|
|
35
|
+
protected readonly canShowMaximizeToggle: _angular_core.Signal<boolean>;
|
|
28
36
|
protected readonly resolvedAppendTo: _angular_core.Signal<string | HTMLElement>;
|
|
29
37
|
protected readonly resolvedStyleClass: _angular_core.Signal<string>;
|
|
30
38
|
constructor();
|
|
31
39
|
visibleChangeEvent(event: boolean): void;
|
|
32
40
|
onClose(): void;
|
|
41
|
+
toggleMaximized(): void;
|
|
33
42
|
onShowEvent(): void;
|
|
34
43
|
onHideEvent(): void;
|
|
44
|
+
private applyMaximizedInlineStyles;
|
|
35
45
|
ngOnDestroy(): void;
|
|
36
46
|
private syncCustomMask;
|
|
37
47
|
private updateCustomMaskAttributes;
|
|
@@ -42,7 +52,7 @@ declare class Drawer implements OnDestroy {
|
|
|
42
52
|
private bindMaskClickListener;
|
|
43
53
|
private destroyCustomMask;
|
|
44
54
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Drawer, never>;
|
|
45
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "mt-drawer", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "blockScroll": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "loadingHeader": { "alias": "loadingHeader"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; }, never, ["[content]", "[footer]"], true, never>;
|
|
55
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "mt-drawer", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fullScreen": { "alias": "fullScreen"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "blockScroll": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "loadingHeader": { "alias": "loadingHeader"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "showMaximizeToggle": { "alias": "showMaximizeToggle"; "required": false; "isSignal": true; }; "maximizeTooltip": { "alias": "maximizeTooltip"; "required": false; "isSignal": true; }; "restoreTooltip": { "alias": "restoreTooltip"; "required": false; "isSignal": true; }; "maximized": { "alias": "maximized"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "onShow": "onShow"; "onHide": "onHide"; "maximized": "maximizedChange"; }, never, ["[content]", "[footer]"], true, never>;
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
export { Drawer };
|
|
@@ -15,6 +15,9 @@ interface DynamicDrawerConfigInterface {
|
|
|
15
15
|
transitionOptions?: string;
|
|
16
16
|
styleClass?: string;
|
|
17
17
|
inputValues?: any;
|
|
18
|
+
showMaximizeToggle?: boolean;
|
|
19
|
+
maximizeTooltip?: string;
|
|
20
|
+
restoreTooltip?: string;
|
|
18
21
|
}
|
|
19
22
|
declare class DrawerService {
|
|
20
23
|
private appRef;
|
|
@@ -41,12 +44,15 @@ declare class DrawerController {
|
|
|
41
44
|
private _styleClass;
|
|
42
45
|
private _header;
|
|
43
46
|
private _fullScreen;
|
|
47
|
+
private _maximized;
|
|
44
48
|
/** Get the current additional styleClass */
|
|
45
49
|
get styleClass(): _angular_core.WritableSignal<string>;
|
|
46
50
|
/** Get the current header */
|
|
47
51
|
get header(): _angular_core.WritableSignal<string>;
|
|
48
52
|
/** Get the current fullScreen state */
|
|
49
53
|
get fullScreen(): _angular_core.WritableSignal<boolean | undefined>;
|
|
54
|
+
/** Get the current maximized (full-width) state */
|
|
55
|
+
get maximized(): _angular_core.WritableSignal<boolean>;
|
|
50
56
|
/** Add or replace the dynamic styleClass */
|
|
51
57
|
setStyleClass(styleClass: string): void;
|
|
52
58
|
/** Append a class to the existing styleClass */
|
|
@@ -59,6 +65,10 @@ declare class DrawerController {
|
|
|
59
65
|
setHeader(header: string): void;
|
|
60
66
|
/** Toggle fullScreen mode */
|
|
61
67
|
setFullScreen(fullScreen: boolean): void;
|
|
68
|
+
/** Set maximized (full-width) state */
|
|
69
|
+
setMaximized(maximized: boolean): void;
|
|
70
|
+
/** Toggle maximized (full-width) state */
|
|
71
|
+
toggleMaximized(): void;
|
|
62
72
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerController, never>;
|
|
63
73
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerController>;
|
|
64
74
|
}
|
|
@@ -70,8 +80,22 @@ declare class DynamicDrawerHost {
|
|
|
70
80
|
childInjector: Injector;
|
|
71
81
|
private ref?;
|
|
72
82
|
private drawerController;
|
|
83
|
+
private readonly host;
|
|
84
|
+
private readonly renderer;
|
|
85
|
+
private resizeAnimTimer;
|
|
86
|
+
private readonly RESIZE_ANIM_CLASS;
|
|
87
|
+
private readonly RESIZE_ANIM_DURATION_MS;
|
|
88
|
+
constructor();
|
|
73
89
|
/** Computed styleClass combining config + dynamic controller class */
|
|
74
90
|
computedStyleClass: _angular_core.Signal<string>;
|
|
91
|
+
/** Whether the maximize toggle button is visible in the header */
|
|
92
|
+
canShowMaximizeToggle: _angular_core.Signal<boolean>;
|
|
93
|
+
/** Tooltip for maximize/restore button (state-aware) */
|
|
94
|
+
maximizeButtonTooltip: _angular_core.Signal<any>;
|
|
95
|
+
/** Icon for maximize/restore button (state-aware) */
|
|
96
|
+
maximizeButtonIcon: _angular_core.Signal<"layout.minimize-01" | "layout.maximize-01">;
|
|
97
|
+
/** Toggle the drawer's full-width state */
|
|
98
|
+
toggleMaximized(): void;
|
|
75
99
|
computedDrawerStyle: _angular_core.Signal<Record<string, string> | null>;
|
|
76
100
|
/** Computed header - controller overrides config if set */
|
|
77
101
|
computedHeader: _angular_core.Signal<any>;
|
|
@@ -85,6 +109,10 @@ declare class DynamicDrawerHost {
|
|
|
85
109
|
}): void;
|
|
86
110
|
show(): void;
|
|
87
111
|
handleHide(data?: null): void;
|
|
112
|
+
onDrawerShow(): void;
|
|
113
|
+
onDrawerHide(): void;
|
|
114
|
+
private getDrawerElement;
|
|
115
|
+
private applyMaximizedInlineStyles;
|
|
88
116
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicDrawerHost, never>;
|
|
89
117
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicDrawerHost, "mt-dynamic-drawer-host", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "connect": { "alias": "connect"; "required": true; }; }, { "visible": "visibleChange"; }, never, never, true, never>;
|
|
90
118
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Type } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface RuntimeActionTranslatable {
|
|
5
|
+
display?: string;
|
|
6
|
+
en?: string;
|
|
7
|
+
ar?: string;
|
|
8
|
+
}
|
|
9
|
+
type RuntimeActionAfterSuccess = 'refresh' | 'close';
|
|
10
|
+
interface RuntimeActionReason {
|
|
11
|
+
source?: string;
|
|
12
|
+
code?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
blocking?: boolean;
|
|
15
|
+
details?: string | null;
|
|
16
|
+
ruleKey?: string | null;
|
|
17
|
+
requestId?: number | null;
|
|
18
|
+
requestStatus?: string | null;
|
|
19
|
+
requestSchemaId?: number | null;
|
|
20
|
+
relatedRequestIds?: number[];
|
|
21
|
+
}
|
|
22
|
+
interface RuntimeAction {
|
|
23
|
+
actionKey: string;
|
|
24
|
+
actionName?: RuntimeActionTranslatable | string | null;
|
|
25
|
+
httpMethod?: string | null;
|
|
26
|
+
url?: string | null;
|
|
27
|
+
isAvailable?: boolean;
|
|
28
|
+
afterSuccess?: RuntimeActionAfterSuccess | null;
|
|
29
|
+
stepIds?: Array<number | string>;
|
|
30
|
+
needConfirmation?: boolean;
|
|
31
|
+
payloadKeys?: string[];
|
|
32
|
+
requiredPayloadKeys?: string[];
|
|
33
|
+
payloadTemplate?: Record<string, unknown> | null;
|
|
34
|
+
formId?: string | number | null;
|
|
35
|
+
targetType?: string;
|
|
36
|
+
targetId?: number;
|
|
37
|
+
moduleKey?: string;
|
|
38
|
+
operationKey?: string;
|
|
39
|
+
primaryReasonCode?: string | null;
|
|
40
|
+
reasons?: RuntimeActionReason[];
|
|
41
|
+
}
|
|
42
|
+
type RuntimeActionStatus = 'success' | 'error' | 'cancelled';
|
|
43
|
+
interface RuntimeActionResult {
|
|
44
|
+
status: RuntimeActionStatus;
|
|
45
|
+
actionKey: string;
|
|
46
|
+
afterSuccess: RuntimeActionAfterSuccess | null;
|
|
47
|
+
response?: unknown;
|
|
48
|
+
error?: unknown;
|
|
49
|
+
}
|
|
50
|
+
interface RuntimeActionExecuteOptions {
|
|
51
|
+
externalPayloadResolvers?: Record<string, () => unknown>;
|
|
52
|
+
defaultAfterSuccess?: RuntimeActionAfterSuccess;
|
|
53
|
+
successMessage?: (response: unknown, action: RuntimeAction) => string;
|
|
54
|
+
errorMessage?: (error: unknown, action: RuntimeAction) => string;
|
|
55
|
+
transformPayload?: (payload: Record<string, unknown> | undefined, action: RuntimeAction) => Record<string, unknown> | undefined;
|
|
56
|
+
silent?: boolean;
|
|
57
|
+
}
|
|
58
|
+
interface RuntimeActionFormValue {
|
|
59
|
+
requestPropertyId?: number;
|
|
60
|
+
propertyKey: string;
|
|
61
|
+
value: unknown;
|
|
62
|
+
}
|
|
63
|
+
interface RuntimeActionFormSource {
|
|
64
|
+
getSubmitValues(): RuntimeActionFormValue[] | undefined;
|
|
65
|
+
}
|
|
66
|
+
declare function resolveActionLabel(action: RuntimeAction): string;
|
|
67
|
+
|
|
68
|
+
declare function buildActionPayload(action: RuntimeAction, formValue: Record<string, unknown> | undefined, externalResolvers?: Record<string, () => unknown>): Record<string, unknown> | undefined;
|
|
69
|
+
declare function normalizePayloadValue(key: string, value: unknown): unknown;
|
|
70
|
+
declare function resolveDefaultPayloadValue(key: string): unknown;
|
|
71
|
+
declare function getMissingRequiredPayloadKeys(action: RuntimeAction, payload: Record<string, unknown> | undefined): string[];
|
|
72
|
+
declare function isMissingPayloadValue(value: unknown): boolean;
|
|
73
|
+
declare function normalizeHttpMethod(value: string | null | undefined): string | null;
|
|
74
|
+
declare function methodSupportsBody(method: string): boolean;
|
|
75
|
+
declare function buildRequestOptions(method: string, payload: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
76
|
+
declare function hasActionFormFields(action: RuntimeAction): boolean;
|
|
77
|
+
declare function hasProgressTemplateField(action: RuntimeAction): boolean;
|
|
78
|
+
|
|
79
|
+
declare class RuntimeActionContextStore {
|
|
80
|
+
private readonly formSource;
|
|
81
|
+
setFormSource(source: RuntimeActionFormSource | null): void;
|
|
82
|
+
resolveFormValues(): RuntimeActionFormValue[];
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeActionContextStore, never>;
|
|
84
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionContextStore>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare const RUNTIME_ACTION_CONFIRM_DIALOG: InjectionToken<Type<unknown>>;
|
|
88
|
+
declare class RuntimeActionRunner {
|
|
89
|
+
private readonly http;
|
|
90
|
+
private readonly confirmation;
|
|
91
|
+
private readonly modal;
|
|
92
|
+
private readonly toast;
|
|
93
|
+
private readonly confirmDialogClass;
|
|
94
|
+
execute(action: RuntimeAction, options?: RuntimeActionExecuteOptions): Promise<RuntimeActionResult>;
|
|
95
|
+
private confirm;
|
|
96
|
+
private run;
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeActionRunner, never>;
|
|
98
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionRunner>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getMissingRequiredPayloadKeys, hasActionFormFields, hasProgressTemplateField, isMissingPayloadValue, methodSupportsBody, normalizeHttpMethod, normalizePayloadValue, resolveActionLabel, resolveDefaultPayloadValue };
|
|
102
|
+
export type { RuntimeAction, RuntimeActionAfterSuccess, RuntimeActionExecuteOptions, RuntimeActionFormSource, RuntimeActionFormValue, RuntimeActionReason, RuntimeActionResult, RuntimeActionStatus, RuntimeActionTranslatable };
|
|
@@ -491,8 +491,32 @@ declare class SchedulePredecessorFieldConfig extends BaseFieldConfig {
|
|
|
491
491
|
runtimeContext?: SchedulePredecessorFieldRuntimeContext | null;
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
|
+
interface EntityListFieldRuntimeContext {
|
|
495
|
+
/**
|
|
496
|
+
* Route id for the read endpoint.
|
|
497
|
+
* - Level-scoped EntityList properties → level-data id
|
|
498
|
+
* - Module-scoped EntityList properties → source module-data id
|
|
499
|
+
*/
|
|
500
|
+
sourceId?: number | string | null;
|
|
501
|
+
levelDataId?: number | string | null;
|
|
502
|
+
}
|
|
503
|
+
declare class EntityListFieldConfig extends BaseFieldConfig {
|
|
504
|
+
/** EntityList property id (used in the read endpoint route). */
|
|
505
|
+
propertyId: number | null;
|
|
506
|
+
/** Property configuration (sourceType, moduleId, access, snapshotMode, fields). */
|
|
507
|
+
configuration: any;
|
|
508
|
+
/** Runtime ids needed to call the read endpoint. */
|
|
509
|
+
runtimeContext: EntityListFieldRuntimeContext | null;
|
|
510
|
+
context: HttpContext | undefined;
|
|
511
|
+
constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
|
|
512
|
+
propertyId?: number | null;
|
|
513
|
+
configuration?: any;
|
|
514
|
+
runtimeContext?: EntityListFieldRuntimeContext | null;
|
|
515
|
+
context?: HttpContext | undefined;
|
|
516
|
+
});
|
|
517
|
+
}
|
|
494
518
|
type DynamicFieldConfig = {
|
|
495
|
-
[K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & BaseFieldConfig)[K];
|
|
519
|
+
[K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & EntityListFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & PickListFieldConfig & CheckboxFieldConfig & ToggleFieldConfig & ColorPickerFieldConfig & IconFieldConfig & SpacerFieldConfig & LookupMatrixFieldConfig & SchemaConnectionFieldConfig & SchedulePredecessorFieldConfig & EntityListFieldConfig & BaseFieldConfig)[K];
|
|
496
520
|
};
|
|
497
521
|
interface LayoutConfig {
|
|
498
522
|
containerClass?: string;
|
|
@@ -847,5 +871,5 @@ declare class MTDateFormatPipe implements PipeTransform {
|
|
|
847
871
|
static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
|
|
848
872
|
}
|
|
849
873
|
|
|
850
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, IconFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
|
|
851
|
-
export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupMatrixCellConfig, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|
|
874
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LookupMatrixFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, changeBackgroundColor, changePrimaryColor, changeTextColor, createCustomValidator, createEntityAdapter, endLoading, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, setLoadingError, startLoading, wrapValidatorWithMessage };
|
|
875
|
+
export type { ApiRequestConfig, BaseFieldConstructorConfig, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupMatrixCellConfig, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|