@arquimedes.co/eureka-forms 1.9.90-test → 1.9.91-test
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/dist/@Types/CBRFormStep.d.ts +1 -1
- package/dist/@Types/FormStep.d.ts +4 -4
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +2 -4
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +1 -1
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +1 -1
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +2 -4
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +1 -1
- package/dist/FormComponents/Step/StepFunctions.js +9 -9
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export interface CBRProjectStep extends GSmartSelect {
|
|
|
8
8
|
type: Types.CBR_PROYECTO | Types.CBR_MACRO_PROYECTO;
|
|
9
9
|
steps: string[];
|
|
10
10
|
/** Only has maxSize if level === 0 */
|
|
11
|
-
maxSize
|
|
11
|
+
maxSize?: number;
|
|
12
12
|
}
|
|
13
13
|
export interface CBRDocTypeStep extends Omit<GSmartSelect, 'showIcon'> {
|
|
14
14
|
type: Types.CBR_TIPO_DOC;
|
|
@@ -11,7 +11,7 @@ export interface CheckBox extends GSteps.GCheckBox {
|
|
|
11
11
|
type: Types.CHECKBOX;
|
|
12
12
|
steps?: string[];
|
|
13
13
|
uncheckedSteps?: string[];
|
|
14
|
-
maxSize
|
|
14
|
+
maxSize?: number;
|
|
15
15
|
}
|
|
16
16
|
export interface Rating extends GSteps.GBaseStep {
|
|
17
17
|
type: Types.RATING;
|
|
@@ -53,7 +53,7 @@ export interface FormSelector extends GSteps.GBaseStep {
|
|
|
53
53
|
searchable: boolean;
|
|
54
54
|
options: FormSelectorOption[];
|
|
55
55
|
size: 1 | 2 | 3 | 4;
|
|
56
|
-
maxSize
|
|
56
|
+
maxSize?: number;
|
|
57
57
|
}
|
|
58
58
|
export type FormSelectorOption = DefaultFormSelectorOption | NestedStepOption | AddSectionOption;
|
|
59
59
|
interface DefaultFormSelectorOption {
|
|
@@ -82,7 +82,7 @@ export interface ClassifierSelector extends GSteps.GBaseStep {
|
|
|
82
82
|
options: Record<string, FormClassifierSelectorOption>;
|
|
83
83
|
required: boolean;
|
|
84
84
|
size: 1 | 2 | 3 | 4;
|
|
85
|
-
maxSize
|
|
85
|
+
maxSize?: number;
|
|
86
86
|
}
|
|
87
87
|
export type FormClassifierSelectorOption = NestedStepClassifierOption | HideValueOption;
|
|
88
88
|
interface NestedStepClassifierOption {
|
|
@@ -110,7 +110,7 @@ export interface EntityValuePicker extends GSteps.GSmartSelect {
|
|
|
110
110
|
idEntityValue?: string;
|
|
111
111
|
}[];
|
|
112
112
|
options: Record<string, FormEntityValuePickerOption>;
|
|
113
|
-
maxSize
|
|
113
|
+
maxSize?: number;
|
|
114
114
|
}
|
|
115
115
|
export type FormEntityValuePickerOption = NestedEntityValuePickerOption | HideFormEntityValuePickerOption;
|
|
116
116
|
interface NestedEntityValuePickerOption {
|
|
@@ -59,16 +59,14 @@ function CheckBox(_a) {
|
|
|
59
59
|
};
|
|
60
60
|
var renderNested = function () {
|
|
61
61
|
var steps = value ? step.steps : step.uncheckedSteps;
|
|
62
|
-
|
|
63
|
-
return;
|
|
64
|
-
return (_jsx(React.Fragment, { children: steps.map(function (idStep) {
|
|
62
|
+
return (_jsx(React.Fragment, { children: steps === null || steps === void 0 ? void 0 : steps.map(function (idStep) {
|
|
65
63
|
var subStep = form.steps[idStep];
|
|
66
64
|
return (_createElement(StepComponent, __assign({}, others, { postview: postview, editable: editable, widthStats: widthStats, getValues: getValues, formStyle: formStyle, errors: errors, form: form, step: subStep, key: idStep, level: level + 1, handleSizeChange: function () {
|
|
67
65
|
sizeChange();
|
|
68
66
|
} })));
|
|
69
67
|
}) }));
|
|
70
68
|
};
|
|
71
|
-
if (level === 0 && step.maxSize < form.size.blockNum) {
|
|
69
|
+
if (level === 0 && step.maxSize && step.maxSize < form.size.blockNum) {
|
|
72
70
|
return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
|
|
73
71
|
width: widthStats.currentBreakPoint <= step.size
|
|
74
72
|
? '100%'
|
|
@@ -95,7 +95,7 @@ function ClassifierSelector(_a) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
if (level === 0 && step.maxSize < form.size.blockNum) {
|
|
98
|
+
if (level === 0 && step.maxSize && step.maxSize < form.size.blockNum) {
|
|
99
99
|
return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
|
|
100
100
|
width: widthStats.currentBreakPoint <= step.size
|
|
101
101
|
? '100%'
|
|
@@ -176,7 +176,7 @@ function EntityValuePicker(_a) {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
if (level === 0 && step.maxSize < form.size.blockNum) {
|
|
179
|
+
if (level === 0 && step.maxSize && step.maxSize < form.size.blockNum) {
|
|
180
180
|
return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
|
|
181
181
|
width: widthStats.currentBreakPoint <= step.size
|
|
182
182
|
? '100%'
|
|
@@ -229,20 +229,18 @@ function calcRecursiveData(element, newSteps, deps, customSteps, originalValues)
|
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
231
|
case StepTypes.CHECKBOX: {
|
|
232
|
-
if (step.steps)
|
|
232
|
+
if (step.steps)
|
|
233
233
|
for (var i = 0; i < step.steps.length; i++) {
|
|
234
234
|
var idStep_5 = step.steps[i];
|
|
235
235
|
var newId = element.ids[idStep_5];
|
|
236
236
|
step.steps[i] = newId;
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
if (step.uncheckedSteps) {
|
|
238
|
+
if (step.uncheckedSteps)
|
|
240
239
|
for (var i = 0; i < step.uncheckedSteps.length; i++) {
|
|
241
240
|
var idStep_6 = step.uncheckedSteps[i];
|
|
242
241
|
var newId = element.ids[idStep_6];
|
|
243
242
|
step.uncheckedSteps[i] = newId;
|
|
244
243
|
}
|
|
245
|
-
}
|
|
246
244
|
break;
|
|
247
245
|
}
|
|
248
246
|
case StepTypes.ENTITYVALUEPICKER:
|
|
@@ -78,7 +78,7 @@ function Selector(_a) {
|
|
|
78
78
|
}) }));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
if (level === 0 && step.maxSize < form.size.blockNum) {
|
|
81
|
+
if (level === 0 && step.maxSize && step.maxSize < form.size.blockNum) {
|
|
82
82
|
return (_jsxs("div", __assign({ className: styles.firstLvlContainer, style: {
|
|
83
83
|
width: widthStats.currentBreakPoint <= step.size
|
|
84
84
|
? '100%'
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Types, { ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../../constants/FormStepTypes';
|
|
2
2
|
export function calcFillerSize(step, steps, values, size) {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var _a;
|
|
4
|
+
var maxSize = (_a = step.maxSize) !== null && _a !== void 0 ? _a : size.blockNum;
|
|
5
|
+
if (maxSize < size.blockNum) {
|
|
6
|
+
var stepSize = maxSize - recursivelyCheckOpenSize(step.id, steps, values);
|
|
5
7
|
return (size.blockSize * stepSize + size.spacingSize * (stepSize - 1) + 20);
|
|
6
8
|
}
|
|
7
9
|
else {
|
|
@@ -59,14 +61,12 @@ export function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
59
61
|
if (step.type === Types.CHECKBOX) {
|
|
60
62
|
var size = step.size;
|
|
61
63
|
var stepSteps = value ? step.steps : step.uncheckedSteps;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
67
|
-
}
|
|
68
|
-
size += optionSize;
|
|
64
|
+
var optionSize = 0;
|
|
65
|
+
for (var _f = 0, _g = stepSteps !== null && stepSteps !== void 0 ? stepSteps : []; _f < _g.length; _f++) {
|
|
66
|
+
var pStepId = _g[_f];
|
|
67
|
+
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
69
68
|
}
|
|
69
|
+
size += optionSize;
|
|
70
70
|
return size;
|
|
71
71
|
}
|
|
72
72
|
else {
|
package/package.json
CHANGED