@masterteam/form-builder 0.0.55 → 0.0.57
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 +8 -0
- package/assets/form-builder.css +1 -1
- package/assets/i18n/ar.json +3 -0
- package/assets/i18n/en.json +3 -0
- package/fesm2022/masterteam-form-builder.mjs +85 -11
- package/fesm2022/masterteam-form-builder.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-form-builder.d.ts +43 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/form-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/form-builder",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"rxjs": "^7.8.2",
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
|
-
"@masterteam/components": "^0.0.
|
|
23
|
-
"@masterteam/
|
|
24
|
-
"@masterteam/
|
|
22
|
+
"@masterteam/components": "^0.0.312",
|
|
23
|
+
"@masterteam/icons": "^0.0.17",
|
|
24
|
+
"@masterteam/forms": "^0.0.164"
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"exports": {
|
|
@@ -189,6 +189,15 @@ interface PreviewInfo {
|
|
|
189
189
|
moduleDataId?: number;
|
|
190
190
|
requestSchemaId?: number;
|
|
191
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Which of the module's form operations run through a published workflow. A
|
|
194
|
+
* workflow's steps set each field's size and read/write access, so for these
|
|
195
|
+
* operations the module form's own settings are not used.
|
|
196
|
+
*/
|
|
197
|
+
interface WorkflowOperations {
|
|
198
|
+
create: boolean;
|
|
199
|
+
update: boolean;
|
|
200
|
+
}
|
|
192
201
|
interface UpdateFormSettingsPayload {
|
|
193
202
|
renderMode?: FormRenderMode;
|
|
194
203
|
}
|
|
@@ -209,6 +218,12 @@ interface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey>
|
|
|
209
218
|
* moduleId on `ResetFormBuilderState`.
|
|
210
219
|
*/
|
|
211
220
|
contextResolveExtraParams: Record<string, unknown> | null;
|
|
221
|
+
/**
|
|
222
|
+
* Host-set: which form operations run through a published workflow. Cleared
|
|
223
|
+
* by `SetModuleInfo`, so the workflow builder repointing this store at a
|
|
224
|
+
* step never inherits it.
|
|
225
|
+
*/
|
|
226
|
+
workflowOperations: WorkflowOperations;
|
|
212
227
|
/**
|
|
213
228
|
* Field edits change this state only, never the form-configuration API. Set
|
|
214
229
|
* by `EnterLocalFormConfiguration` for a host that owns the result itself —
|
|
@@ -236,6 +251,8 @@ declare class FormBuilderFacade {
|
|
|
236
251
|
readonly parentModuleId: _angular_core.Signal<string | number | null>;
|
|
237
252
|
readonly parentPath: _angular_core.Signal<string>;
|
|
238
253
|
readonly previewInfo: _angular_core.Signal<PreviewInfo | null>;
|
|
254
|
+
/** Form operations that run through a published workflow; see `setWorkflowOperations`. */
|
|
255
|
+
readonly workflowOperations: _angular_core.Signal<WorkflowOperations>;
|
|
239
256
|
/** True while a host edits a field list in memory; see `enterLocalConfiguration`. */
|
|
240
257
|
readonly localMode: _angular_core.Signal<boolean>;
|
|
241
258
|
readonly contextResolveExtraParams: _angular_core.Signal<Record<string, unknown> | null>;
|
|
@@ -267,6 +284,14 @@ declare class FormBuilderFacade {
|
|
|
267
284
|
exitLocalConfiguration(): rxjs.Observable<void>;
|
|
268
285
|
setProperties(properties: PropertyItem[]): rxjs.Observable<void>;
|
|
269
286
|
setPreviewInfo(payload: PreviewInfo): rxjs.Observable<void>;
|
|
287
|
+
/**
|
|
288
|
+
* Tell the builder which form operations run through a published workflow,
|
|
289
|
+
* whose steps set each field's size and read/write access. When both Create
|
|
290
|
+
* and Update do, the field drawer locks those settings; when one does, it
|
|
291
|
+
* keeps them editable and says they only apply to the other operation. Call
|
|
292
|
+
* it after `setModuleInfo`, which clears it.
|
|
293
|
+
*/
|
|
294
|
+
setWorkflowOperations(operations: WorkflowOperations): rxjs.Observable<void>;
|
|
270
295
|
/**
|
|
271
296
|
* Consumer-supplied fields appended to every `context/resolve` request body
|
|
272
297
|
* form-builder issues. These win over the package's own resolve flags on
|
|
@@ -315,8 +340,15 @@ declare class FormBuilder implements OnInit {
|
|
|
315
340
|
private readonly popovers;
|
|
316
341
|
/** Extra CSS class(es) applied to the main canvas wrapper div. */
|
|
317
342
|
readonly canvasStyleClass: _angular_core.InputSignal<string>;
|
|
318
|
-
/**
|
|
319
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Operating mode: 'builder' (full editor), 'manageProperties' (read/write
|
|
345
|
+
* permissions only) or 'localFields' (a host-owned field list).
|
|
346
|
+
*
|
|
347
|
+
* A missing value means 'builder'. Hosts mount this component straight on a
|
|
348
|
+
* route, and `withComponentInputBinding()` sets every input the route does
|
|
349
|
+
* not supply to `undefined`, which would otherwise hide the whole toolbar.
|
|
350
|
+
*/
|
|
351
|
+
readonly mode: _angular_core.InputSignalWithTransform<FormBuilderMode, FormBuilderMode | null | undefined>;
|
|
320
352
|
/** Controls the draggable properties sidebar independently from the main builder canvas. */
|
|
321
353
|
readonly showPropertiesSection: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
322
354
|
private dialogRef;
|
|
@@ -497,6 +529,11 @@ declare class SetPreviewInfo {
|
|
|
497
529
|
static readonly type = "[FormBuilder] Set Preview Info";
|
|
498
530
|
constructor(payload: PreviewInfo);
|
|
499
531
|
}
|
|
532
|
+
declare class SetWorkflowOperations {
|
|
533
|
+
operations: WorkflowOperations;
|
|
534
|
+
static readonly type = "[FormBuilder] Set Workflow Operations";
|
|
535
|
+
constructor(operations: WorkflowOperations);
|
|
536
|
+
}
|
|
500
537
|
declare class SetContextResolveExtraParams {
|
|
501
538
|
params: Record<string, unknown> | null;
|
|
502
539
|
static readonly type = "[FormBuilder] Set Context Resolve Extra Params";
|
|
@@ -609,11 +646,13 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
609
646
|
static getValidations(state: FormBuilderStateModel): ValidationRule[];
|
|
610
647
|
static getPreviewInfo(state: FormBuilderStateModel): _masterteam_form_builder.PreviewInfo | null;
|
|
611
648
|
static getContextResolveExtraParams(state: FormBuilderStateModel): Record<string, unknown> | null;
|
|
649
|
+
static getWorkflowOperations(state: FormBuilderStateModel): WorkflowOperations;
|
|
612
650
|
setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;
|
|
613
651
|
resetState(ctx: StateContext<FormBuilderStateModel>): void;
|
|
614
652
|
setContextResolveExtraParams(ctx: StateContext<FormBuilderStateModel>, action: SetContextResolveExtraParams): void;
|
|
615
653
|
setProperties(ctx: StateContext<FormBuilderStateModel>, action: SetProperties): void;
|
|
616
654
|
setPreviewInfo(ctx: StateContext<FormBuilderStateModel>, action: SetPreviewInfo): void;
|
|
655
|
+
setWorkflowOperations(ctx: StateContext<FormBuilderStateModel>, action: SetWorkflowOperations): void;
|
|
617
656
|
/**
|
|
618
657
|
* The store is global, so whatever a real builder page had loaded is set
|
|
619
658
|
* aside rather than overwritten, and comes back on exit. Re-entering while
|
|
@@ -664,5 +703,5 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
664
703
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;
|
|
665
704
|
}
|
|
666
705
|
|
|
667
|
-
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, EnterLocalFormConfiguration, ExitLocalFormConfiguration, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ReorderSections, ResetFormBuilderState, ResetFormConfiguration, ResetFormFromAppForm, SetContextResolveExtraParams, SetModuleInfo, SetPreviewInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateFormSettings, UpdateSection, UpdateValidation };
|
|
668
|
-
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderMode, FormBuilderStateModel, FormConfiguration, FormField, FormRenderMode, FormSection, LocalizedText, MoveFieldPayload, PreviewInfo, PropertyItem, ReorderFieldPayload, ReorderSectionPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateFormSettingsPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity };
|
|
706
|
+
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, EnterLocalFormConfiguration, ExitLocalFormConfiguration, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ReorderSections, ResetFormBuilderState, ResetFormConfiguration, ResetFormFromAppForm, SetContextResolveExtraParams, SetModuleInfo, SetPreviewInfo, SetProperties, SetWorkflowOperations, ToggleValidationActive, UpdateField, UpdateFormSettings, UpdateSection, UpdateValidation };
|
|
707
|
+
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderMode, FormBuilderStateModel, FormConfiguration, FormField, FormRenderMode, FormSection, LocalizedText, MoveFieldPayload, PreviewInfo, PropertyItem, ReorderFieldPayload, ReorderSectionPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateFormSettingsPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity, WorkflowOperations };
|