commons-shared-web-ui 0.0.25 → 0.0.26
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
|
@@ -668,6 +668,14 @@ declare class FieldSelectionService {
|
|
|
668
668
|
declare class FieldSelectionComponent implements OnChanges {
|
|
669
669
|
schema: FormSchema;
|
|
670
670
|
schemaChange: EventEmitter<FormSchema>;
|
|
671
|
+
/**
|
|
672
|
+
* When true, the enable/disable toggle is hidden for option-driven field types
|
|
673
|
+
* (DROPDOWN, RADIO, MULTI_SELECT, etc.).
|
|
674
|
+
* Useful for business-user-facing form configurators where developers
|
|
675
|
+
* pre-fill the option data and these fields should always be included.
|
|
676
|
+
* Defaults to false (show toggle for all fields).
|
|
677
|
+
*/
|
|
678
|
+
hideToggleForOptionTypes: boolean;
|
|
671
679
|
protected readonly store: FieldSelectionService;
|
|
672
680
|
ngOnChanges(changes: SimpleChanges): void;
|
|
673
681
|
onToggleGroup(groupIndex: number): void;
|
|
@@ -678,7 +686,7 @@ declare class FieldSelectionComponent implements OnChanges {
|
|
|
678
686
|
trackByGroupIndex(index: number): number;
|
|
679
687
|
private _emitChange;
|
|
680
688
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldSelectionComponent, never>;
|
|
681
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldSelectionComponent, "lib-field-selection", never, { "schema": { "alias": "schema"; "required": true; }; }, { "schemaChange": "schemaChange"; }, never, never, false, never>;
|
|
689
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldSelectionComponent, "lib-field-selection", never, { "schema": { "alias": "schema"; "required": true; }; "hideToggleForOptionTypes": { "alias": "hideToggleForOptionTypes"; "required": false; }; }, { "schemaChange": "schemaChange"; }, never, never, false, never>;
|
|
682
690
|
}
|
|
683
691
|
|
|
684
692
|
/**
|
|
@@ -771,6 +779,13 @@ declare class FieldConfiguratorService {
|
|
|
771
779
|
declare class FieldConfiguratorComponent implements OnChanges {
|
|
772
780
|
schema: FormSchema;
|
|
773
781
|
schemaChange: EventEmitter<FormSchema>;
|
|
782
|
+
/**
|
|
783
|
+
* When false, the optionConfig section (apiUrl, dataPath, etc.) is hidden
|
|
784
|
+
* from the configurator panel. Useful for business-user-facing configurators
|
|
785
|
+
* where option URLs are pre-filled by the developer.
|
|
786
|
+
* Defaults to true (show everything).
|
|
787
|
+
*/
|
|
788
|
+
showOptionConfig: boolean;
|
|
774
789
|
readonly store: FieldConfiguratorService;
|
|
775
790
|
private readonly schemaMapOverride;
|
|
776
791
|
/**
|
|
@@ -786,12 +801,14 @@ declare class FieldConfiguratorComponent implements OnChanges {
|
|
|
786
801
|
onTypeChange(builderType: string): void;
|
|
787
802
|
private _emitChange;
|
|
788
803
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConfiguratorComponent, never>;
|
|
789
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldConfiguratorComponent, "lib-field-configurator", never, { "schema": { "alias": "schema"; "required": true; }; }, { "schemaChange": "schemaChange"; }, never, never, false, never>;
|
|
804
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldConfiguratorComponent, "lib-field-configurator", never, { "schema": { "alias": "schema"; "required": true; }; "showOptionConfig": { "alias": "showOptionConfig"; "required": false; }; }, { "schemaChange": "schemaChange"; }, never, never, false, never>;
|
|
790
805
|
}
|
|
791
806
|
|
|
792
807
|
declare class GroupNodeComponent {
|
|
793
808
|
group: SelectionGroupNode;
|
|
794
809
|
groupIndex: number;
|
|
810
|
+
/** Propagated from FieldSelectionComponent — see SelectionFieldNodeComponent for details. */
|
|
811
|
+
hideToggleForOptionTypes: boolean;
|
|
795
812
|
toggleEnabled: EventEmitter<void>;
|
|
796
813
|
toggleExpanded: EventEmitter<void>;
|
|
797
814
|
sectionToggleEnabled: EventEmitter<number[]>;
|
|
@@ -808,13 +825,15 @@ declare class GroupNodeComponent {
|
|
|
808
825
|
}): void;
|
|
809
826
|
trackBySectionIndex(index: number): number;
|
|
810
827
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupNodeComponent, never>;
|
|
811
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GroupNodeComponent, "lib-group-node", never, { "group": { "alias": "group"; "required": true; }; "groupIndex": { "alias": "groupIndex"; "required": true; }; }, { "toggleEnabled": "toggleEnabled"; "toggleExpanded": "toggleExpanded"; "sectionToggleEnabled": "sectionToggleEnabled"; "sectionToggleExpanded": "sectionToggleExpanded"; "fieldToggle": "fieldToggle"; }, never, never, false, never>;
|
|
828
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupNodeComponent, "lib-group-node", never, { "group": { "alias": "group"; "required": true; }; "groupIndex": { "alias": "groupIndex"; "required": true; }; "hideToggleForOptionTypes": { "alias": "hideToggleForOptionTypes"; "required": false; }; }, { "toggleEnabled": "toggleEnabled"; "toggleExpanded": "toggleExpanded"; "sectionToggleEnabled": "sectionToggleEnabled"; "sectionToggleExpanded": "sectionToggleExpanded"; "fieldToggle": "fieldToggle"; }, never, never, false, never>;
|
|
812
829
|
}
|
|
813
830
|
|
|
814
831
|
declare class SelectionSectionNodeComponent {
|
|
815
832
|
section: SelectionSectionNode;
|
|
816
833
|
sectionIndex: number;
|
|
817
834
|
depth: number;
|
|
835
|
+
/** Propagated from FieldSelectionComponent — see SelectionFieldNodeComponent for details. */
|
|
836
|
+
hideToggleForOptionTypes: boolean;
|
|
818
837
|
/** Emits the sub-path from this node downward (empty [] for self) */
|
|
819
838
|
toggleEnabled: EventEmitter<number[]>;
|
|
820
839
|
toggleExpanded: EventEmitter<number[]>;
|
|
@@ -836,14 +855,21 @@ declare class SelectionSectionNodeComponent {
|
|
|
836
855
|
trackByFieldIndex(index: number): number;
|
|
837
856
|
trackBySubsectionIndex(index: number): number;
|
|
838
857
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionSectionNodeComponent, never>;
|
|
839
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionSectionNodeComponent, "lib-selection-section-node", never, { "section": { "alias": "section"; "required": true; }; "sectionIndex": { "alias": "sectionIndex"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; }, { "toggleEnabled": "toggleEnabled"; "toggleExpanded": "toggleExpanded"; "fieldToggle": "fieldToggle"; }, never, never, false, never>;
|
|
858
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionSectionNodeComponent, "lib-selection-section-node", never, { "section": { "alias": "section"; "required": true; }; "sectionIndex": { "alias": "sectionIndex"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; "hideToggleForOptionTypes": { "alias": "hideToggleForOptionTypes"; "required": false; }; }, { "toggleEnabled": "toggleEnabled"; "toggleExpanded": "toggleExpanded"; "fieldToggle": "fieldToggle"; }, never, never, false, never>;
|
|
840
859
|
}
|
|
841
860
|
|
|
842
861
|
declare class SelectionFieldNodeComponent {
|
|
843
862
|
field: SelectionFieldNode;
|
|
844
863
|
toggleSelected: EventEmitter<void>;
|
|
864
|
+
/**
|
|
865
|
+
* When true, the enable/disable toggle is hidden for option-driven field types
|
|
866
|
+
* (DROPDOWN, RADIO, MULTI_SELECT, etc.). These types have their options
|
|
867
|
+
* pre-configured by the developer and shouldn't be toggled by business users.
|
|
868
|
+
*/
|
|
869
|
+
hideToggleForOptionTypes: boolean;
|
|
870
|
+
get isOptionDrivenType(): boolean;
|
|
845
871
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionFieldNodeComponent, never>;
|
|
846
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFieldNodeComponent, "lib-selection-field-node", never, { "field": { "alias": "field"; "required": true; }; }, { "toggleSelected": "toggleSelected"; }, never, never, false, never>;
|
|
872
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectionFieldNodeComponent, "lib-selection-field-node", never, { "field": { "alias": "field"; "required": true; }; "hideToggleForOptionTypes": { "alias": "hideToggleForOptionTypes"; "required": false; }; }, { "toggleSelected": "toggleSelected"; }, never, never, false, never>;
|
|
847
873
|
}
|
|
848
874
|
|
|
849
875
|
declare class ConfiguratorTreeComponent {
|
|
@@ -870,6 +896,12 @@ declare class ConfiguratorConfigPanelComponent implements OnChanges {
|
|
|
870
896
|
fieldTypeSchemaMap: Record<string, FormSchema>;
|
|
871
897
|
configChange: EventEmitter<Record<string, unknown>>;
|
|
872
898
|
typeChange: EventEmitter<string>;
|
|
899
|
+
/**
|
|
900
|
+
* When false, all `optionConfig.*` fields (apiUrl, dataPath, labelPath, etc.)
|
|
901
|
+
* are hidden from the config panel. Business users don't need to configure
|
|
902
|
+
* option URLs — these are pre-filled by the developer in the master JSON.
|
|
903
|
+
*/
|
|
904
|
+
showOptionConfig: boolean;
|
|
873
905
|
/** Exposed to the template for the native type-switcher select */
|
|
874
906
|
readonly switchableFieldTypes: {
|
|
875
907
|
label: string;
|
|
@@ -905,10 +937,15 @@ declare class ConfiguratorConfigPanelComponent implements OnChanges {
|
|
|
905
937
|
* guarantee a completely fresh SmartForm instance is mounted.
|
|
906
938
|
*/
|
|
907
939
|
private _buildConfigFormForType;
|
|
940
|
+
/**
|
|
941
|
+
* Deep-clones the schema and removes any field whose `name` starts with
|
|
942
|
+
* `optionConfig.` and removes entire sections that become empty after that.
|
|
943
|
+
*/
|
|
944
|
+
private _filterSchemaForOptionConfig;
|
|
908
945
|
private _extractInitialValuesFromField;
|
|
909
946
|
private _buildPatchFromFormData;
|
|
910
947
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfiguratorConfigPanelComponent, never>;
|
|
911
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConfiguratorConfigPanelComponent, "lib-configurator-config-panel", never, { "selectedField": { "alias": "selectedField"; "required": false; }; "selectedFieldInfo": { "alias": "selectedFieldInfo"; "required": false; }; "builderFieldType": { "alias": "builderFieldType"; "required": false; }; "fieldTypeSchemaMap": { "alias": "fieldTypeSchemaMap"; "required": false; }; }, { "configChange": "configChange"; "typeChange": "typeChange"; }, never, never, false, never>;
|
|
948
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfiguratorConfigPanelComponent, "lib-configurator-config-panel", never, { "selectedField": { "alias": "selectedField"; "required": false; }; "selectedFieldInfo": { "alias": "selectedFieldInfo"; "required": false; }; "builderFieldType": { "alias": "builderFieldType"; "required": false; }; "fieldTypeSchemaMap": { "alias": "fieldTypeSchemaMap"; "required": false; }; "showOptionConfig": { "alias": "showOptionConfig"; "required": false; }; }, { "configChange": "configChange"; "typeChange": "typeChange"; }, never, never, false, never>;
|
|
912
949
|
}
|
|
913
950
|
|
|
914
951
|
declare class SmartFormController {
|
|
@@ -998,6 +1035,8 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
998
1035
|
*/
|
|
999
1036
|
labels: any;
|
|
1000
1037
|
mode: 'CREATE' | 'EDIT';
|
|
1038
|
+
/** When true, all form fields are disabled and the action bar is hidden (preview/read-only mode). */
|
|
1039
|
+
readOnly: boolean;
|
|
1001
1040
|
submit: EventEmitter<{
|
|
1002
1041
|
[key: string]: any;
|
|
1003
1042
|
}>;
|
|
@@ -1078,7 +1117,7 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
1078
1117
|
private getButtonByActionKind;
|
|
1079
1118
|
private navigateTo;
|
|
1080
1119
|
static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
|
|
1081
|
-
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; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; }, never, never, false, never>;
|
|
1120
|
+
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"; }, never, never, false, never>;
|
|
1082
1121
|
}
|
|
1083
1122
|
|
|
1084
1123
|
declare class FormSectionComponent implements OnInit, OnDestroy {
|