@masterteam/form-builder 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/form-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/form-builder",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"rxjs": "^7.8.2",
|
|
20
20
|
"tailwindcss": "^4.1.17",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
|
-
"@masterteam/
|
|
23
|
-
"@masterteam/forms": "^0.0.
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
22
|
+
"@masterteam/components": "^0.0.92",
|
|
23
|
+
"@masterteam/forms": "^0.0.38",
|
|
24
|
+
"@masterteam/icons": "^0.0.13",
|
|
25
|
+
"@masterteam/properties": "^0.0.31"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as _masterteam_form_builder from '@masterteam/form-builder';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { OnInit } from '@angular/core';
|
|
3
|
-
import * as _masterteam_form_builder from '@masterteam/form-builder';
|
|
4
4
|
import { LoadingStateShape, CrudStateBase, Response as Response$1 } from '@masterteam/components';
|
|
5
5
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
@@ -33,11 +33,14 @@ interface FormField {
|
|
|
33
33
|
hiddenInCreation?: boolean;
|
|
34
34
|
hiddenInEditForm?: boolean;
|
|
35
35
|
isRequired?: boolean;
|
|
36
|
+
isRead?: boolean;
|
|
37
|
+
isWrite?: boolean;
|
|
36
38
|
showConditionalDisplayFormula?: boolean;
|
|
37
39
|
conditionalDisplayFormula?: string;
|
|
38
40
|
_pending?: boolean;
|
|
39
41
|
_deleting?: boolean;
|
|
40
42
|
}
|
|
43
|
+
type FormBuilderMode = 'builder' | 'manageProperties';
|
|
41
44
|
interface FormSection {
|
|
42
45
|
id: string;
|
|
43
46
|
name: {
|
|
@@ -85,6 +88,8 @@ interface AddFieldPayload {
|
|
|
85
88
|
hiddenInCreation?: boolean;
|
|
86
89
|
hiddenInEditForm?: boolean;
|
|
87
90
|
isRequired?: boolean;
|
|
91
|
+
isRead?: boolean;
|
|
92
|
+
isWrite?: boolean;
|
|
88
93
|
showConditionalDisplayFormula?: boolean;
|
|
89
94
|
conditionalDisplayFormula?: string;
|
|
90
95
|
}
|
|
@@ -94,6 +99,8 @@ interface UpdateFieldPayload {
|
|
|
94
99
|
hiddenInCreation?: boolean;
|
|
95
100
|
hiddenInEditForm?: boolean;
|
|
96
101
|
isRequired?: boolean;
|
|
102
|
+
isRead?: boolean;
|
|
103
|
+
isWrite?: boolean;
|
|
97
104
|
showConditionalDisplayFormula?: boolean;
|
|
98
105
|
conditionalDisplayFormula?: string | null;
|
|
99
106
|
}
|
|
@@ -141,6 +148,15 @@ interface EnrichedFormField extends FormField {
|
|
|
141
148
|
interface EnrichedFormSection extends Omit<FormSection, 'fields'> {
|
|
142
149
|
fields: EnrichedFormField[];
|
|
143
150
|
}
|
|
151
|
+
interface PreviewInfo {
|
|
152
|
+
moduleKey: string;
|
|
153
|
+
operationKey: string;
|
|
154
|
+
moduleId?: number;
|
|
155
|
+
levelId?: number;
|
|
156
|
+
levelDataId?: number;
|
|
157
|
+
moduleDataId?: number;
|
|
158
|
+
requestSchemaId?: number;
|
|
159
|
+
}
|
|
144
160
|
interface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {
|
|
145
161
|
moduleType: string | null;
|
|
146
162
|
moduleId: string | number | null;
|
|
@@ -149,6 +165,7 @@ interface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey>
|
|
|
149
165
|
parentPath: string;
|
|
150
166
|
formConfiguration: FormConfiguration | null;
|
|
151
167
|
properties: PropertyItem[];
|
|
168
|
+
previewInfo: PreviewInfo | null;
|
|
152
169
|
}
|
|
153
170
|
|
|
154
171
|
declare class FormBuilderFacade {
|
|
@@ -163,6 +180,7 @@ declare class FormBuilderFacade {
|
|
|
163
180
|
readonly parentModuleType: _angular_core.Signal<string | null>;
|
|
164
181
|
readonly parentModuleId: _angular_core.Signal<string | number | null>;
|
|
165
182
|
readonly parentPath: _angular_core.Signal<string>;
|
|
183
|
+
readonly previewInfo: _angular_core.Signal<PreviewInfo | null>;
|
|
166
184
|
readonly isLoadingFormConfiguration: _angular_core.Signal<boolean>;
|
|
167
185
|
readonly isResettingFormConfiguration: _angular_core.Signal<boolean>;
|
|
168
186
|
readonly isAddingSection: _angular_core.Signal<boolean>;
|
|
@@ -183,6 +201,7 @@ declare class FormBuilderFacade {
|
|
|
183
201
|
setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): rxjs.Observable<void>;
|
|
184
202
|
resetState(): rxjs.Observable<void>;
|
|
185
203
|
setProperties(properties: PropertyItem[]): rxjs.Observable<void>;
|
|
204
|
+
setPreviewInfo(payload: PreviewInfo): rxjs.Observable<void>;
|
|
186
205
|
getFormConfiguration(): rxjs.Observable<void>;
|
|
187
206
|
resetFormConfiguration(): rxjs.Observable<void>;
|
|
188
207
|
addSection(payload: AddSectionPayload): rxjs.Observable<void>;
|
|
@@ -219,6 +238,10 @@ declare class FormBuilder implements OnInit {
|
|
|
219
238
|
protected readonly facade: FormBuilderFacade;
|
|
220
239
|
private readonly contextService;
|
|
221
240
|
private readonly popovers;
|
|
241
|
+
/** Extra CSS class(es) applied to the main canvas wrapper div. */
|
|
242
|
+
readonly canvasStyleClass: _angular_core.InputSignal<string>;
|
|
243
|
+
/** Operating mode: 'builder' (full editor) or 'manageProperties' (read/write permissions only). */
|
|
244
|
+
readonly mode: _angular_core.InputSignal<FormBuilderMode>;
|
|
222
245
|
private dialogRef;
|
|
223
246
|
readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;
|
|
224
247
|
readonly properties: _angular_core.Signal<PropertyItem[]>;
|
|
@@ -305,7 +328,7 @@ declare class FormBuilder implements OnInit {
|
|
|
305
328
|
resetFormConfiguration(): void;
|
|
306
329
|
noReturnPredicate: () => boolean;
|
|
307
330
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;
|
|
308
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, "mt-form-builder", never, {}, {}, never, never, true, never>;
|
|
331
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, "mt-form-builder", never, { "canvasStyleClass": { "alias": "canvasStyleClass"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
309
332
|
}
|
|
310
333
|
|
|
311
334
|
/**
|
|
@@ -339,6 +362,11 @@ declare class SetProperties {
|
|
|
339
362
|
static readonly type = "[FormBuilder] Set Properties";
|
|
340
363
|
constructor(properties: PropertyItem[]);
|
|
341
364
|
}
|
|
365
|
+
declare class SetPreviewInfo {
|
|
366
|
+
payload: PreviewInfo;
|
|
367
|
+
static readonly type = "[FormBuilder] Set Preview Info";
|
|
368
|
+
constructor(payload: PreviewInfo);
|
|
369
|
+
}
|
|
342
370
|
declare class GetFormConfiguration {
|
|
343
371
|
static readonly type = "[FormBuilder] Get Form Configuration";
|
|
344
372
|
}
|
|
@@ -430,9 +458,11 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
430
458
|
static getParentPath(state: FormBuilderStateModel): string;
|
|
431
459
|
static getProperties(state: FormBuilderStateModel): _masterteam_form_builder.PropertyItem[];
|
|
432
460
|
static getValidations(state: FormBuilderStateModel): ValidationRule[];
|
|
461
|
+
static getPreviewInfo(state: FormBuilderStateModel): _masterteam_form_builder.PreviewInfo | null;
|
|
433
462
|
setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;
|
|
434
463
|
resetState(ctx: StateContext<FormBuilderStateModel>): void;
|
|
435
464
|
setProperties(ctx: StateContext<FormBuilderStateModel>, action: SetProperties): void;
|
|
465
|
+
setPreviewInfo(ctx: StateContext<FormBuilderStateModel>, action: SetPreviewInfo): void;
|
|
436
466
|
getFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;
|
|
437
467
|
resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;
|
|
438
468
|
addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;
|
|
@@ -460,5 +490,5 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
460
490
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;
|
|
461
491
|
}
|
|
462
492
|
|
|
463
|
-
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateSection, UpdateValidation };
|
|
464
|
-
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderStateModel, FormConfiguration, FormField, FormSection, MoveFieldPayload, PropertyItem, ReorderFieldPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity };
|
|
493
|
+
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetPreviewInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateSection, UpdateValidation };
|
|
494
|
+
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderMode, FormBuilderStateModel, FormConfiguration, FormField, FormSection, MoveFieldPayload, PreviewInfo, PropertyItem, ReorderFieldPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity };
|