@arquimedes.co/eureka-forms 2.0.29 → 2.0.30
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.
|
@@ -55,6 +55,7 @@ export interface FormSelector extends GSteps.GBaseStep {
|
|
|
55
55
|
options: FormSelectorOption[];
|
|
56
56
|
size: 1 | 2 | 3 | 4;
|
|
57
57
|
maxSize?: number;
|
|
58
|
+
defaultValue?: string;
|
|
58
59
|
}
|
|
59
60
|
export type FormSelectorOption = DefaultFormSelectorOption | NestedStepOption | AddSectionOption;
|
|
60
61
|
interface DefaultFormSelectorOption {
|
|
@@ -111,7 +111,7 @@ export var calcStepWidth = function (stepSize, size) {
|
|
|
111
111
|
return size.blockSize * stepSize + size.spacingSize * (stepSize - 1);
|
|
112
112
|
};
|
|
113
113
|
export var calcDefaultValue = function (step) {
|
|
114
|
-
var _a;
|
|
114
|
+
var _a, _b;
|
|
115
115
|
switch (step.type) {
|
|
116
116
|
case StepTypes.CHECKBOX:
|
|
117
117
|
return (_a = step.defaultValue) !== null && _a !== void 0 ? _a : false;
|
|
@@ -121,6 +121,9 @@ export var calcDefaultValue = function (step) {
|
|
|
121
121
|
description: step.description,
|
|
122
122
|
};
|
|
123
123
|
case StepTypes.SELECTOR:
|
|
124
|
+
if (step.defaultValue)
|
|
125
|
+
return ((_b = step.options.find(function (option) { return option.value === step.defaultValue; })) !== null && _b !== void 0 ? _b : '');
|
|
126
|
+
return '';
|
|
124
127
|
case StepTypes.TEXTINPUT:
|
|
125
128
|
case StepTypes.CLASSIFIER_SELECTOR:
|
|
126
129
|
return '';
|