@masterteam/form-builder 0.0.56 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/form-builder",
3
- "version": "0.0.56",
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.311",
23
- "@masterteam/forms": "^0.0.163",
24
- "@masterteam/icons": "^0.0.17"
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
@@ -504,6 +529,11 @@ declare class SetPreviewInfo {
504
529
  static readonly type = "[FormBuilder] Set Preview Info";
505
530
  constructor(payload: PreviewInfo);
506
531
  }
532
+ declare class SetWorkflowOperations {
533
+ operations: WorkflowOperations;
534
+ static readonly type = "[FormBuilder] Set Workflow Operations";
535
+ constructor(operations: WorkflowOperations);
536
+ }
507
537
  declare class SetContextResolveExtraParams {
508
538
  params: Record<string, unknown> | null;
509
539
  static readonly type = "[FormBuilder] Set Context Resolve Extra Params";
@@ -616,11 +646,13 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
616
646
  static getValidations(state: FormBuilderStateModel): ValidationRule[];
617
647
  static getPreviewInfo(state: FormBuilderStateModel): _masterteam_form_builder.PreviewInfo | null;
618
648
  static getContextResolveExtraParams(state: FormBuilderStateModel): Record<string, unknown> | null;
649
+ static getWorkflowOperations(state: FormBuilderStateModel): WorkflowOperations;
619
650
  setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;
620
651
  resetState(ctx: StateContext<FormBuilderStateModel>): void;
621
652
  setContextResolveExtraParams(ctx: StateContext<FormBuilderStateModel>, action: SetContextResolveExtraParams): void;
622
653
  setProperties(ctx: StateContext<FormBuilderStateModel>, action: SetProperties): void;
623
654
  setPreviewInfo(ctx: StateContext<FormBuilderStateModel>, action: SetPreviewInfo): void;
655
+ setWorkflowOperations(ctx: StateContext<FormBuilderStateModel>, action: SetWorkflowOperations): void;
624
656
  /**
625
657
  * The store is global, so whatever a real builder page had loaded is set
626
658
  * aside rather than overwritten, and comes back on exit. Re-entering while
@@ -671,5 +703,5 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
671
703
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;
672
704
  }
673
705
 
674
- 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 };
675
- 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 };