@masterteam/forms 0.0.53 → 0.0.55

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.
@@ -373,7 +373,12 @@ declare class ClientForm implements OnDestroy {
373
373
  readonly virtualFields: _angular_core.Signal<ProcessFormValue[]>;
374
374
  readonly hasVirtualFields: _angular_core.Signal<boolean>;
375
375
  readonly previewFieldKeys: _angular_core.Signal<string[]>;
376
- readonly previewEntities: _angular_core.Signal<_masterteam_components_entities.EntityData[]>;
376
+ readonly previewEntitySections: _angular_core.Signal<{
377
+ entities: _masterteam_components_entities.EntityData[];
378
+ key: string;
379
+ label: string;
380
+ order: number;
381
+ }[]>;
377
382
  readonly editableFormConfig: _angular_core.Signal<DynamicFormConfig | null>;
378
383
  readonly stepSections: _angular_core.Signal<_masterteam_components.SectionConfig[]>;
379
384
  readonly hasEditableFormSections: _angular_core.Signal<boolean>;
@@ -461,6 +466,12 @@ declare class ClientFormApiService {
461
466
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClientFormApiService>;
462
467
  }
463
468
 
469
+ interface ClientFormPreviewSection {
470
+ key: string;
471
+ label: string;
472
+ order: number;
473
+ entities: EntityData[];
474
+ }
464
475
  /**
465
476
  * Convert a runtime FormConfiguration into a DynamicFormConfig
466
477
  * that can be passed directly to `<mt-dynamic-form>`.
@@ -470,7 +481,7 @@ declare class ClientFormApiService {
470
481
  * @param mode 'create' or 'edit' — filters hidden fields accordingly
471
482
  * @param lookups Available lookup definitions for resolving Lookup/LookupMultiSelect options
472
483
  */
473
- declare function mapToDynamicFormConfig(config: ClientFormConfiguration, lang?: 'en' | 'ar', mode?: 'create' | 'edit', lookups?: ClientLookup[], context?: ProcessFormContext | null): DynamicFormConfig;
484
+ declare function mapToDynamicFormConfig(config: ClientFormConfiguration, lang?: 'en' | 'ar', mode?: 'create' | 'edit', lookups?: ClientLookup[], context?: ProcessFormContext | null, readonly?: boolean): DynamicFormConfig;
474
485
  /**
475
486
  * Convert API property values into a flat key-value object
476
487
  * suitable for `formControl.patchValue()`.
@@ -485,8 +496,9 @@ declare function mapValuesToFormValue(values: ProcessFormValue[], config?: Clien
485
496
  * to map `requestPropertyId` and `viewType`.
486
497
  */
487
498
  declare function mapFormValueToSubmitFields(formValue: Record<string, any>, loadResponse: ProcessFormLoadResponse): ProcessFormSubmitField[];
488
- declare function getPreviewOnlyFieldKeys(config: ClientFormConfiguration, mode?: 'create' | 'edit'): string[];
489
- declare function mapPreviewFieldsToEntities(config: ClientFormConfiguration, values: ProcessFormValue[], mode?: 'create' | 'edit'): EntityData[];
499
+ declare function getPreviewOnlyFieldKeys(config: ClientFormConfiguration, mode?: 'create' | 'edit', readonly?: boolean): string[];
500
+ declare function mapPreviewFieldsToEntities(config: ClientFormConfiguration, values: ProcessFormValue[], mode?: 'create' | 'edit', readonly?: boolean): EntityData[];
501
+ declare function mapPreviewSectionsToEntities(config: ClientFormConfiguration, values: ProcessFormValue[], lang?: 'en' | 'ar', mode?: 'create' | 'edit', readonly?: boolean): ClientFormPreviewSection[];
490
502
 
491
- export { ClientForm, ClientFormApiService, ClientFormStateService, getPreviewOnlyFieldKeys, isFormRequiredInterception, mapFormValueToSubmitFields, mapPreviewFieldsToEntities, mapToDynamicFormConfig, mapValuesToFormValue };
492
- export type { ClientFieldWidth, ClientFormConfiguration, ClientFormField, ClientFormFooterActionMode, ClientFormFooterState, ClientFormRenderMode, ClientFormResolvedRenderMode, ClientFormSection, ClientFormSubmitRequestMapper, ClientFormSubmitRequestMapperContext, ClientLookup, ClientLookupItem, ClientPropertyItem, ClientValidationRule, FormRequiredInterception, OperationType, ProcessFormContext, ProcessFormLoadRequest, ProcessFormLoadResponse, ProcessFormMode, ProcessFormSource, ProcessFormSubmitField, ProcessFormSubmitRecord, ProcessFormSubmitRecordField, ProcessFormSubmitRequest, ProcessFormSubmitResponse, ProcessFormSubmitStatus, ProcessFormSubmitValue, ProcessFormValue, ProcessFormValueMetadata, Response };
503
+ export { ClientForm, ClientFormApiService, ClientFormStateService, getPreviewOnlyFieldKeys, isFormRequiredInterception, mapFormValueToSubmitFields, mapPreviewFieldsToEntities, mapPreviewSectionsToEntities, mapToDynamicFormConfig, mapValuesToFormValue };
504
+ export type { ClientFieldWidth, ClientFormConfiguration, ClientFormField, ClientFormFooterActionMode, ClientFormFooterState, ClientFormPreviewSection, ClientFormRenderMode, ClientFormResolvedRenderMode, ClientFormSection, ClientFormSubmitRequestMapper, ClientFormSubmitRequestMapperContext, ClientLookup, ClientLookupItem, ClientPropertyItem, ClientValidationRule, FormRequiredInterception, OperationType, ProcessFormContext, ProcessFormLoadRequest, ProcessFormLoadResponse, ProcessFormMode, ProcessFormSource, ProcessFormSubmitField, ProcessFormSubmitRecord, ProcessFormSubmitRecordField, ProcessFormSubmitRequest, ProcessFormSubmitResponse, ProcessFormSubmitStatus, ProcessFormSubmitValue, ProcessFormValue, ProcessFormValueMetadata, Response };
@@ -36,6 +36,7 @@ declare class DynamicForm implements OnDestroy, ControlValueAccessor, Validator
36
36
  registerOnChange(fn: (value: any) => void): void;
37
37
  registerOnTouched(fn: () => void): void;
38
38
  private buildForm;
39
+ private shouldCreateControl;
39
40
  writeValue(value: any): void;
40
41
  validate(_control: AbstractControl): ValidationErrors | null;
41
42
  /**