commons-shared-web-ui 0.0.51 → 0.0.52
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/index.d.ts
CHANGED
|
@@ -281,6 +281,22 @@ interface FieldConfig {
|
|
|
281
281
|
suffix?: string;
|
|
282
282
|
/** Whether the field is read-only (shows lock icon) */
|
|
283
283
|
readonly?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Used by the Form Field Configuration module (`lib-form-field-configuration`).
|
|
286
|
+
* When true, this field's/section's visibility CANNOT be turned off in the
|
|
287
|
+
* configurator UI — it is always shown to end users. The visibility toggle is
|
|
288
|
+
* rendered as a locked indicator instead of an interactive control.
|
|
289
|
+
* Independent of `readonly`, which controls the input's edit state in the
|
|
290
|
+
* actual rendered form, not the configurator.
|
|
291
|
+
*/
|
|
292
|
+
lockVisibility?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Used by the Form Field Configuration module (`lib-form-field-configuration`).
|
|
295
|
+
* When true, this field's mandatory (required) state CANNOT be changed in the
|
|
296
|
+
* configurator UI. The "Mandatory" control is rendered read-only, preserving
|
|
297
|
+
* whatever `required` value the schema shipped with.
|
|
298
|
+
*/
|
|
299
|
+
lockMandatory?: boolean;
|
|
284
300
|
/**
|
|
285
301
|
* Clickable action icons rendered as suffixes inside the input.
|
|
286
302
|
* Ignored when `readonly` is true (the built-in lock icon takes precedence).
|
|
@@ -1194,6 +1210,10 @@ declare class SmartFormController {
|
|
|
1194
1210
|
fieldName: string;
|
|
1195
1211
|
actionId: string;
|
|
1196
1212
|
}>;
|
|
1213
|
+
/** Selected options details passed dynamically from parent component */
|
|
1214
|
+
selectedOptionsData: {
|
|
1215
|
+
[fieldName: string]: any;
|
|
1216
|
+
};
|
|
1197
1217
|
initialize(initialData: {
|
|
1198
1218
|
[key: string]: any;
|
|
1199
1219
|
}): void;
|
|
@@ -1379,6 +1399,8 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1379
1399
|
* object is reused across multiple allowMulti repeater instances.
|
|
1380
1400
|
*/
|
|
1381
1401
|
localOptionList: any[];
|
|
1402
|
+
/** Dedicated cache of currently selected option objects */
|
|
1403
|
+
selectedItems: any[];
|
|
1382
1404
|
/** Cache of the latest dependency parameters for server-side autocomplete filtering */
|
|
1383
1405
|
private _latestDependencyValues;
|
|
1384
1406
|
/** For GROUP fields with allowMulti = true */
|
|
@@ -1530,10 +1552,24 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1530
1552
|
onDocumentClick(): void;
|
|
1531
1553
|
onEscapeKey(): void;
|
|
1532
1554
|
get multiSelectedCount(): number;
|
|
1555
|
+
/** Cache of values currently chosen for this field name by OTHER repeater instances.
|
|
1556
|
+
* Only reassigned (a new Set) when siblingFormArray's value actually changes — see
|
|
1557
|
+
* _setupSiblingExclusion(). Previously this was a getter that rebuilt the Set (and a
|
|
1558
|
+
* second getter that re-filtered the option list) on every change-detection cycle,
|
|
1559
|
+
* handing *ngFor a brand-new array reference every digest — that trips
|
|
1560
|
+
* ExpressionChangedAfterItHasBeenCheckedError in dev builds and made Angular
|
|
1561
|
+
* re-diff/re-render the option list constantly, very visible in a repeater with
|
|
1562
|
+
* several dropdown instances. */
|
|
1563
|
+
private _siblingTaken;
|
|
1533
1564
|
/** True when this is a single-select DROPDOWN living inside an allowMulti repeater. */
|
|
1534
1565
|
private get _excludesSiblingValues();
|
|
1535
|
-
/**
|
|
1536
|
-
|
|
1566
|
+
/** Subscribes to the repeater's FormArray so _siblingTaken is refreshed only when a
|
|
1567
|
+
* sibling instance's value actually changes, not on every change-detection cycle. */
|
|
1568
|
+
private _setupSiblingExclusion;
|
|
1569
|
+
private _refreshSiblingTaken;
|
|
1570
|
+
/** Memoized per source list: only recomputes (and hands *ngFor a new array reference)
|
|
1571
|
+
* when the source list, the taken set, or this field's own value actually changed. */
|
|
1572
|
+
private _displayListMemo;
|
|
1537
1573
|
private _excludeTaken;
|
|
1538
1574
|
/** Options for the custom single-select dropdown, with sibling-taken values hidden. */
|
|
1539
1575
|
get displayOptionList(): any[];
|
|
@@ -1545,6 +1581,16 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1545
1581
|
private executeDropdownSearch;
|
|
1546
1582
|
/** Resets the dropdown search text and filtered list. */
|
|
1547
1583
|
resetDropdownSearch(): void;
|
|
1584
|
+
/** Merges option(s) from selectedOptionsData into the local dropdown options list */
|
|
1585
|
+
mergeSelectedOptionsIntoList(): void;
|
|
1586
|
+
/**
|
|
1587
|
+
* Extracts option(s) and their corresponding raw codes from an initial value object or array of objects.
|
|
1588
|
+
* If the value is a primitive but initialLabelField is configured, it looks up the sibling field value.
|
|
1589
|
+
*/
|
|
1590
|
+
private extractInitialOption;
|
|
1591
|
+
private parseSingleOptionObject;
|
|
1592
|
+
private addParsedOptions;
|
|
1593
|
+
private updateSelectedItems;
|
|
1548
1594
|
/** Returns true if every option in the current filtered list is selected. */
|
|
1549
1595
|
isAllSelected(): boolean;
|
|
1550
1596
|
/** Returns true if some (but not all) filtered options are selected — for indeterminate state. */
|
|
@@ -1682,6 +1728,10 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1682
1728
|
mode: 'CREATE' | 'EDIT';
|
|
1683
1729
|
/** When true, all form fields are disabled and the action bar is hidden (preview/read-only mode). */
|
|
1684
1730
|
readOnly: boolean;
|
|
1731
|
+
/** Selected options details passed dynamically from parent component to resolve edit-mode dropdown labels */
|
|
1732
|
+
selectedOptionsData?: {
|
|
1733
|
+
[key: string]: any;
|
|
1734
|
+
};
|
|
1685
1735
|
submit: EventEmitter<{
|
|
1686
1736
|
[key: string]: any;
|
|
1687
1737
|
}>;
|
|
@@ -1834,7 +1884,7 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1834
1884
|
private _codeToFieldName;
|
|
1835
1885
|
private _codeToLabel;
|
|
1836
1886
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
|
|
1837
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "suffixActionClick": "suffixActionClick"; "stepChange": "stepChange"; }, never, never, false, never>;
|
|
1887
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "selectedOptionsData": { "alias": "selectedOptionsData"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "suffixActionClick": "suffixActionClick"; "stepChange": "stepChange"; }, never, never, false, never>;
|
|
1838
1888
|
}
|
|
1839
1889
|
|
|
1840
1890
|
declare class FormSectionComponent implements OnInit, OnDestroy {
|
|
@@ -2770,6 +2820,232 @@ declare class FormBuilderModule {
|
|
|
2770
2820
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormBuilderModule>;
|
|
2771
2821
|
}
|
|
2772
2822
|
|
|
2823
|
+
/**
|
|
2824
|
+
* A single editable field row in the configurator.
|
|
2825
|
+
* Wraps a leaf FieldConfig with visibility + mandatory state.
|
|
2826
|
+
*
|
|
2827
|
+
* `fieldConfig` is a live reference into the module's working (cloned) schema,
|
|
2828
|
+
* so writing the node state back onto it is all that's needed to produce the
|
|
2829
|
+
* updated schema — no fragile index re-matching required.
|
|
2830
|
+
*/
|
|
2831
|
+
interface ConfigFieldNode {
|
|
2832
|
+
/** Live reference to the FieldConfig inside the working schema clone. */
|
|
2833
|
+
fieldConfig: FieldConfig;
|
|
2834
|
+
/** Display label (resolved through the optional translate fn at render time uses fieldConfig directly). */
|
|
2835
|
+
label: string;
|
|
2836
|
+
/** Raw field type (e.g. 'TEXT_INPUT', 'DROPDOWN'). */
|
|
2837
|
+
type: string;
|
|
2838
|
+
/** Whether the field is shown to end users. */
|
|
2839
|
+
visible: boolean;
|
|
2840
|
+
/** Whether the field is mandatory (required). Only meaningful when `visible` is true. */
|
|
2841
|
+
mandatory: boolean;
|
|
2842
|
+
/** When true, the visibility toggle is locked ON (cannot be hidden). */
|
|
2843
|
+
lockVisibility: boolean;
|
|
2844
|
+
/** When true, the mandatory control is locked (cannot be changed). */
|
|
2845
|
+
lockMandatory: boolean;
|
|
2846
|
+
}
|
|
2847
|
+
/**
|
|
2848
|
+
* A section / group in the configurator tree. Sections can nest recursively.
|
|
2849
|
+
* A section with `fieldConfig === null` is a synthetic bundle of stray
|
|
2850
|
+
* top-level leaf fields and has no visibility toggle of its own.
|
|
2851
|
+
*/
|
|
2852
|
+
interface ConfigSectionNode {
|
|
2853
|
+
/** Section label. */
|
|
2854
|
+
label: string;
|
|
2855
|
+
/** Live reference to the GROUP/SUBFIELDS FieldConfig, or null for a synthetic bundle / root. */
|
|
2856
|
+
fieldConfig: FieldConfig | null;
|
|
2857
|
+
/** Live reference to the backing SectionConfig, when present. */
|
|
2858
|
+
sectionConfig: SectionConfig | null;
|
|
2859
|
+
/** Whether the whole section is shown to end users. */
|
|
2860
|
+
visible: boolean;
|
|
2861
|
+
/** When true, the section visibility toggle is locked ON. */
|
|
2862
|
+
lockVisibility: boolean;
|
|
2863
|
+
/** Whether the section is expanded in the UI tree. */
|
|
2864
|
+
expanded: boolean;
|
|
2865
|
+
/** Leaf fields directly inside this section. */
|
|
2866
|
+
fields: ConfigFieldNode[];
|
|
2867
|
+
/** Recursively nested child sections. */
|
|
2868
|
+
subsections: ConfigSectionNode[];
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
/**
|
|
2872
|
+
* Signal-based store for the form-field-configuration component.
|
|
2873
|
+
* Owns the section/field tree and the visibility + mandatory toggle logic.
|
|
2874
|
+
* Provided at the component level (one store instance per configurator).
|
|
2875
|
+
*/
|
|
2876
|
+
declare class FieldConfigurationService {
|
|
2877
|
+
private readonly tree;
|
|
2878
|
+
private readonly _state;
|
|
2879
|
+
readonly sections: i0.Signal<ConfigSectionNode[]>;
|
|
2880
|
+
/**
|
|
2881
|
+
* Initialise from an input schema. The schema is deep-cloned so the caller's
|
|
2882
|
+
* object is never mutated; the tree references the clone.
|
|
2883
|
+
*/
|
|
2884
|
+
loadSchema(schema: FormSchema): void;
|
|
2885
|
+
/** Expand/collapse a section. Purely visual — does not change the schema. */
|
|
2886
|
+
toggleSectionExpanded(path: number[]): void;
|
|
2887
|
+
/**
|
|
2888
|
+
* Toggle a section's visibility. Locked sections are ignored.
|
|
2889
|
+
* Cascades: hiding disables every descendant field/subsection; showing
|
|
2890
|
+
* re-enables all non-locked descendants.
|
|
2891
|
+
*/
|
|
2892
|
+
toggleSectionVisible(path: number[]): void;
|
|
2893
|
+
/** Toggle a field's visibility. Locked fields are ignored. */
|
|
2894
|
+
toggleFieldVisible(path: number[], fieldIndex: number): void;
|
|
2895
|
+
/** Toggle a field's mandatory flag. Ignored when locked or hidden. */
|
|
2896
|
+
toggleFieldMandatory(path: number[], fieldIndex: number): void;
|
|
2897
|
+
/**
|
|
2898
|
+
* Produce the updated schema. Writes the current tree state onto the working
|
|
2899
|
+
* clone and returns a fresh deep clone (safe to hand to the host / submit).
|
|
2900
|
+
* Returns null if no schema has been loaded.
|
|
2901
|
+
*/
|
|
2902
|
+
buildUpdatedSchema(): FormSchema | null;
|
|
2903
|
+
private _updateSectionAtPath;
|
|
2904
|
+
private _updateFieldAtPath;
|
|
2905
|
+
private _mapSectionAtPath;
|
|
2906
|
+
/** Recursively set visibility on a section and all its descendants (respecting locks). */
|
|
2907
|
+
private _cascadeVisibility;
|
|
2908
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConfigurationService, never>;
|
|
2909
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FieldConfigurationService>;
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
/** Payload for field-level events, carrying the sub-path from this section down. */
|
|
2913
|
+
interface FieldEventPayload {
|
|
2914
|
+
sectionPath: number[];
|
|
2915
|
+
fieldIndex: number;
|
|
2916
|
+
}
|
|
2917
|
+
/**
|
|
2918
|
+
* A recursive section/group node in the form-field-configuration tree.
|
|
2919
|
+
* Emits path-relative events that parents prefix with their own index before
|
|
2920
|
+
* bubbling up to the store.
|
|
2921
|
+
*/
|
|
2922
|
+
declare class ConfigSectionNodeComponent {
|
|
2923
|
+
section: ConfigSectionNode;
|
|
2924
|
+
depth: number;
|
|
2925
|
+
translate?: (key: string) => string;
|
|
2926
|
+
/** Emits the sub-path from this node downward (empty [] for self). */
|
|
2927
|
+
toggleVisible: EventEmitter<number[]>;
|
|
2928
|
+
toggleExpanded: EventEmitter<number[]>;
|
|
2929
|
+
fieldToggleVisible: EventEmitter<FieldEventPayload>;
|
|
2930
|
+
fieldToggleMandatory: EventEmitter<FieldEventPayload>;
|
|
2931
|
+
get displayLabel(): string;
|
|
2932
|
+
get visibleFieldCount(): number;
|
|
2933
|
+
get hasToggle(): boolean;
|
|
2934
|
+
onToggleVisible(): void;
|
|
2935
|
+
onToggleExpanded(): void;
|
|
2936
|
+
onFieldToggleVisible(fieldIndex: number): void;
|
|
2937
|
+
onFieldToggleMandatory(fieldIndex: number): void;
|
|
2938
|
+
onSubToggleVisible(subIndex: number, subPath: number[]): void;
|
|
2939
|
+
onSubToggleExpanded(subIndex: number, subPath: number[]): void;
|
|
2940
|
+
onSubFieldToggleVisible(subIndex: number, payload: FieldEventPayload): void;
|
|
2941
|
+
onSubFieldToggleMandatory(subIndex: number, payload: FieldEventPayload): void;
|
|
2942
|
+
trackByIndex(index: number): number;
|
|
2943
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigSectionNodeComponent, never>;
|
|
2944
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigSectionNodeComponent, "lib-config-section-node", never, { "section": { "alias": "section"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleExpanded": "toggleExpanded"; "fieldToggleVisible": "fieldToggleVisible"; "fieldToggleMandatory": "fieldToggleMandatory"; }, never, never, false, never>;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* Form Field Configuration
|
|
2949
|
+
* ------------------------
|
|
2950
|
+
* Renders a compact tree of a form schema's sections and fields, each with a
|
|
2951
|
+
* **visibility** toggle and a **mandatory** control. Intended to be embedded
|
|
2952
|
+
* inside a `cc-confirmation-modal` on a host page ("Configure fields").
|
|
2953
|
+
*
|
|
2954
|
+
* Pass a `FormSchema` via `[schema]`. The input is deep-cloned, so it is never
|
|
2955
|
+
* mutated. When the user confirms, call `getUpdatedSchema()` to read back the
|
|
2956
|
+
* modified schema (visible/isEnabled/disabled and required flags updated).
|
|
2957
|
+
*
|
|
2958
|
+
* Fields/sections carrying `lockVisibility: true` cannot be hidden, and
|
|
2959
|
+
* `lockMandatory: true` freezes their required state.
|
|
2960
|
+
*
|
|
2961
|
+
* @example
|
|
2962
|
+
* ```html
|
|
2963
|
+
* <cc-confirmation-modal [isOpen]="open" (confirm)="save()" (cancel)="open = false">
|
|
2964
|
+
* <lib-form-field-configuration #cfg [schema]="schema" [translate]="translateFn" />
|
|
2965
|
+
* </cc-confirmation-modal>
|
|
2966
|
+
* ```
|
|
2967
|
+
* ```ts
|
|
2968
|
+
* @ViewChild('cfg') cfg!: FormFieldConfigurationComponent;
|
|
2969
|
+
* save() { this.updatedSchema = this.cfg.getUpdatedSchema(); }
|
|
2970
|
+
* ```
|
|
2971
|
+
*/
|
|
2972
|
+
declare class FormFieldConfigurationComponent implements OnChanges {
|
|
2973
|
+
/** The form schema to configure. Deep-cloned internally; never mutated. */
|
|
2974
|
+
schema: FormSchema;
|
|
2975
|
+
/** Optional label translator, e.g. an ngx-translate `instant` function. */
|
|
2976
|
+
translate?: (key: string) => string;
|
|
2977
|
+
/** Show the "Visible / Mandatory (only if visible)" legend row. Default true. */
|
|
2978
|
+
showLegend: boolean;
|
|
2979
|
+
protected readonly store: FieldConfigurationService;
|
|
2980
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2981
|
+
/**
|
|
2982
|
+
* Returns a fresh, modified copy of the schema with the current
|
|
2983
|
+
* visibility/mandatory selections applied. Returns null if no schema loaded.
|
|
2984
|
+
*/
|
|
2985
|
+
getUpdatedSchema(): FormSchema | null;
|
|
2986
|
+
onToggleVisible(sectionIndex: number, subPath: number[]): void;
|
|
2987
|
+
onToggleExpanded(sectionIndex: number, subPath: number[]): void;
|
|
2988
|
+
onFieldToggleVisible(sectionIndex: number, payload: FieldEventPayload): void;
|
|
2989
|
+
onFieldToggleMandatory(sectionIndex: number, payload: FieldEventPayload): void;
|
|
2990
|
+
trackByIndex(index: number): number;
|
|
2991
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldConfigurationComponent, never>;
|
|
2992
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldConfigurationComponent, "lib-form-field-configuration", never, { "schema": { "alias": "schema"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; }, {}, never, never, false, never>;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
/**
|
|
2996
|
+
* A single field row inside the form-field-configuration tree.
|
|
2997
|
+
* Shows a visibility indicator + label on the left, and a "Mandatory"
|
|
2998
|
+
* control + visibility toggle on the right.
|
|
2999
|
+
*/
|
|
3000
|
+
declare class ConfigFieldNodeComponent {
|
|
3001
|
+
field: ConfigFieldNode;
|
|
3002
|
+
/** Optional label translator (e.g. an ngx-translate instant fn). */
|
|
3003
|
+
translate?: (key: string) => string;
|
|
3004
|
+
toggleVisible: EventEmitter<void>;
|
|
3005
|
+
toggleMandatory: EventEmitter<void>;
|
|
3006
|
+
get displayLabel(): string;
|
|
3007
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigFieldNodeComponent, never>;
|
|
3008
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigFieldNodeComponent, "lib-config-field-node", never, { "field": { "alias": "field"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleMandatory": "toggleMandatory"; }, never, never, false, never>;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
declare class FormFieldConfigurationModule {
|
|
3012
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldConfigurationModule, never>;
|
|
3013
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldConfigurationModule, [typeof FormFieldConfigurationComponent, typeof ConfigSectionNodeComponent, typeof ConfigFieldNodeComponent], [typeof i2$1.CommonModule], [typeof FormFieldConfigurationComponent]>;
|
|
3014
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormFieldConfigurationModule>;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* Parses a FormSchema into a configurator tree (sections + fields, each carrying
|
|
3019
|
+
* visibility/mandatory state) and writes that tree back onto a schema.
|
|
3020
|
+
*
|
|
3021
|
+
* Nodes hold LIVE references to the FieldConfig objects inside the working schema
|
|
3022
|
+
* clone, so `applyTreeToSchema` simply walks the tree and assigns the node state
|
|
3023
|
+
* onto those references — there is no positional re-matching, which keeps it robust
|
|
3024
|
+
* against ROWs, nested groups, and mixed leaf/section children.
|
|
3025
|
+
*/
|
|
3026
|
+
declare class ConfigSchemaTreeService {
|
|
3027
|
+
/**
|
|
3028
|
+
* Build the configurator section tree from a schema.
|
|
3029
|
+
* The passed schema is treated as the working copy — nodes reference its objects.
|
|
3030
|
+
*/
|
|
3031
|
+
parseSchema(schema: FormSchema): ConfigSectionNode[];
|
|
3032
|
+
/**
|
|
3033
|
+
* Write the current tree state back onto the schema the nodes reference.
|
|
3034
|
+
* Sets isEnabled/visible/disabled for visibility and required for mandatory.
|
|
3035
|
+
* Hidden fields always emit required: false ("mandatory only if visible").
|
|
3036
|
+
*/
|
|
3037
|
+
applyTreeToSchema(sections: ConfigSectionNode[]): void;
|
|
3038
|
+
private _buildSections;
|
|
3039
|
+
private _buildSection;
|
|
3040
|
+
private _createBundleSection;
|
|
3041
|
+
private _buildField;
|
|
3042
|
+
private _isSection;
|
|
3043
|
+
private _applySection;
|
|
3044
|
+
private _applyField;
|
|
3045
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigSchemaTreeService, never>;
|
|
3046
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigSchemaTreeService>;
|
|
3047
|
+
}
|
|
3048
|
+
|
|
2773
3049
|
interface DropdownAction {
|
|
2774
3050
|
label: string;
|
|
2775
3051
|
type: 'api' | 'route' | 'callback';
|
|
@@ -4056,7 +4332,7 @@ declare class FilterTableSelectorModule {
|
|
|
4056
4332
|
|
|
4057
4333
|
declare class SharedUiModule {
|
|
4058
4334
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
|
|
4059
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FilterTableSelectorModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FilterTableSelectorModule]>;
|
|
4335
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof FilterTableSelectorModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof FilterTableSelectorModule]>;
|
|
4060
4336
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
|
|
4061
4337
|
}
|
|
4062
4338
|
|
|
@@ -4254,5 +4530,5 @@ declare class SnackbarModule {
|
|
|
4254
4530
|
static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
|
|
4255
4531
|
}
|
|
4256
4532
|
|
|
4257
|
-
export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
4258
|
-
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, HierarchyCfg, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SuffixActionIcon, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|
|
4533
|
+
export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ConfigFieldNodeComponent, ConfigSchemaTreeService, ConfigSectionNodeComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfigurationService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, FormFieldConfigurationComponent, FormFieldConfigurationModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
4534
|
+
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfigFieldNode, ConfigSectionNode, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldEventPayload, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, HierarchyCfg, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SuffixActionIcon, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|
package/package.json
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
|
|
115
115
|
/* Form Auto Extracted Utilities 2 */
|
|
116
116
|
.border-none { border: none !important; }
|
|
117
|
+
.mb-8px { margin-bottom: 8px !important; }
|
|
117
118
|
.mb-16px { margin-bottom: var(--cc-sf-grid-gap, 16px) !important; }
|
|
118
119
|
.c-DC2626 { color: var(--cc-sf-label-required-color, #DC2626) !important; }
|
|
119
120
|
.ml-0-125rem { margin-left: 0.125rem !important; }
|