@arquimedes.co/eureka-forms 1.9.118 → 1.9.119-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/Branding.d.ts +13 -0
- package/dist/@Types/Branding.js +1 -0
- package/dist/@Types/Form.d.ts +2 -0
- package/dist/@Types/FormStep.d.ts +37 -2
- package/dist/@Types/Organization.d.ts +3 -11
- package/dist/App.js +26 -16
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +8 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +8 -2
- package/dist/FormComponents/Form/Form.d.ts +3 -1
- package/dist/FormComponents/Form/Form.js +5 -5
- package/dist/FormComponents/Section/Section.d.ts +3 -2
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +6 -6
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +4 -1
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +6 -6
- package/dist/FormComponents/Step/AYFStepMapper.js +13 -16
- package/dist/FormComponents/Step/ApiSelectorStep/ApiSelectorStep.d.ts +15 -0
- package/dist/FormComponents/Step/ApiSelectorStep/ApiSelectorStep.js +35 -0
- package/dist/FormComponents/Step/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +4 -0
- package/dist/FormComponents/Step/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +213 -0
- package/dist/FormComponents/Step/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/CBRStepMapper.js +10 -10
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +14 -11
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +17 -5
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +60 -26
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +2 -1
- package/dist/FormComponents/Step/Step.js +4 -0
- package/dist/FormComponents/Step/StepFunctions.d.ts +2 -2
- package/dist/FormComponents/Step/StepFunctions.js +19 -4
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +4 -1
- package/dist/constants/FormStepTypes.d.ts +10 -1
- package/dist/constants/FormStepTypes.js +11 -0
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +3 -1
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +8 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Types, { ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../../constants/FormStepTypes';
|
|
1
|
+
import Types, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../../constants/FormStepTypes';
|
|
2
2
|
export function calcFillerSize(step, steps, values, size) {
|
|
3
3
|
var _a;
|
|
4
4
|
var maxSize = (_a = step.maxSize) !== null && _a !== void 0 ? _a : size.blockNum;
|
|
@@ -43,7 +43,7 @@ export function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
43
43
|
}
|
|
44
44
|
return size;
|
|
45
45
|
}
|
|
46
|
-
if (step.type === Types.ENTITYVALUEPICKER) {
|
|
46
|
+
else if (step.type === Types.ENTITYVALUEPICKER) {
|
|
47
47
|
var size = step.size;
|
|
48
48
|
if (value) {
|
|
49
49
|
var currentOption = step.options[value];
|
|
@@ -58,12 +58,27 @@ export function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
58
58
|
}
|
|
59
59
|
return size;
|
|
60
60
|
}
|
|
61
|
+
else if (step.type === Types.API_SELECTOR) {
|
|
62
|
+
var size = step.size;
|
|
63
|
+
if (value) {
|
|
64
|
+
var currentOption = step.options[value];
|
|
65
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ApiSelectorOptionTypes.NESTED) {
|
|
66
|
+
var optionSize = 0;
|
|
67
|
+
for (var _f = 0, _g = currentOption.steps; _f < _g.length; _f++) {
|
|
68
|
+
var pStepId = _g[_f];
|
|
69
|
+
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
70
|
+
}
|
|
71
|
+
size += optionSize;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return size;
|
|
75
|
+
}
|
|
61
76
|
if (step.type === Types.CHECKBOX) {
|
|
62
77
|
var size = step.size;
|
|
63
78
|
var stepSteps = value ? step.steps : step.uncheckedSteps;
|
|
64
79
|
var optionSize = 0;
|
|
65
|
-
for (var
|
|
66
|
-
var pStepId =
|
|
80
|
+
for (var _h = 0, _j = stepSteps !== null && stepSteps !== void 0 ? stepSteps : []; _h < _j.length; _h++) {
|
|
81
|
+
var pStepId = _j[_h];
|
|
67
82
|
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
68
83
|
}
|
|
69
84
|
size += optionSize;
|
package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js
CHANGED
|
@@ -62,7 +62,10 @@ function TextInputStep(_a) {
|
|
|
62
62
|
setTimer(setTimeout(function () {
|
|
63
63
|
setDependencyStore(function (deps) {
|
|
64
64
|
var _a;
|
|
65
|
-
return (__assign(__assign({}, deps), (_a = {}, _a[step.id] =
|
|
65
|
+
return (__assign(__assign({}, deps), (_a = {}, _a[step.id] = {
|
|
66
|
+
type: step.type,
|
|
67
|
+
value: value,
|
|
68
|
+
}, _a)));
|
|
66
69
|
});
|
|
67
70
|
setTimer(null);
|
|
68
71
|
}, 1000));
|
|
@@ -18,7 +18,8 @@ export declare enum StepTypes {
|
|
|
18
18
|
CLASSIFIER_SELECTOR = "CLASSIFIER_SELECTOR",
|
|
19
19
|
COLLAPSIBLE = "COLLAPSIBLE",
|
|
20
20
|
MAPPER = "MAPPER",
|
|
21
|
-
ENTITYVALUEPICKER = "ENTITYVALUEPICKER"
|
|
21
|
+
ENTITYVALUEPICKER = "ENTITYVALUEPICKER",
|
|
22
|
+
API_SELECTOR = "API_SELECTOR"
|
|
22
23
|
}
|
|
23
24
|
export declare enum OptionTypes {
|
|
24
25
|
DEFAULT = "DEFAULT",
|
|
@@ -33,6 +34,10 @@ export declare enum EntityValueOptionTypes {
|
|
|
33
34
|
HIDE = "ENTITY_VALUE_HIDE",
|
|
34
35
|
NESTED = "ENTITY_VALUE_NESTED"
|
|
35
36
|
}
|
|
37
|
+
export declare enum ApiSelectorOptionTypes {
|
|
38
|
+
HIDE = "API_SELECTOR_HIDE",
|
|
39
|
+
NESTED = "API_SELECTOR_NESTED"
|
|
40
|
+
}
|
|
36
41
|
export declare enum RatingTypes {
|
|
37
42
|
SCALE = "SCALE",
|
|
38
43
|
SATISFACTION = "SATISFACTION",
|
|
@@ -48,3 +53,7 @@ export declare enum EntityValueDataTypes {
|
|
|
48
53
|
STEP = "STEP",
|
|
49
54
|
VALUE = "VALUE"
|
|
50
55
|
}
|
|
56
|
+
export declare enum ApiSelectorParamTypes {
|
|
57
|
+
STEP = "STEP",
|
|
58
|
+
VALUE = "VALUE"
|
|
59
|
+
}
|
|
@@ -22,6 +22,7 @@ export var StepTypes;
|
|
|
22
22
|
StepTypes["COLLAPSIBLE"] = "COLLAPSIBLE";
|
|
23
23
|
StepTypes["MAPPER"] = "MAPPER";
|
|
24
24
|
StepTypes["ENTITYVALUEPICKER"] = "ENTITYVALUEPICKER";
|
|
25
|
+
StepTypes["API_SELECTOR"] = "API_SELECTOR";
|
|
25
26
|
})(StepTypes || (StepTypes = {}));
|
|
26
27
|
export var OptionTypes;
|
|
27
28
|
(function (OptionTypes) {
|
|
@@ -39,6 +40,11 @@ export var EntityValueOptionTypes;
|
|
|
39
40
|
EntityValueOptionTypes["HIDE"] = "ENTITY_VALUE_HIDE";
|
|
40
41
|
EntityValueOptionTypes["NESTED"] = "ENTITY_VALUE_NESTED";
|
|
41
42
|
})(EntityValueOptionTypes || (EntityValueOptionTypes = {}));
|
|
43
|
+
export var ApiSelectorOptionTypes;
|
|
44
|
+
(function (ApiSelectorOptionTypes) {
|
|
45
|
+
ApiSelectorOptionTypes["HIDE"] = "API_SELECTOR_HIDE";
|
|
46
|
+
ApiSelectorOptionTypes["NESTED"] = "API_SELECTOR_NESTED";
|
|
47
|
+
})(ApiSelectorOptionTypes || (ApiSelectorOptionTypes = {}));
|
|
42
48
|
export var RatingTypes;
|
|
43
49
|
(function (RatingTypes) {
|
|
44
50
|
RatingTypes["SCALE"] = "SCALE";
|
|
@@ -57,3 +63,8 @@ export var EntityValueDataTypes;
|
|
|
57
63
|
EntityValueDataTypes["STEP"] = "STEP";
|
|
58
64
|
EntityValueDataTypes["VALUE"] = "VALUE";
|
|
59
65
|
})(EntityValueDataTypes || (EntityValueDataTypes = {}));
|
|
66
|
+
export var ApiSelectorParamTypes;
|
|
67
|
+
(function (ApiSelectorParamTypes) {
|
|
68
|
+
ApiSelectorParamTypes["STEP"] = "STEP";
|
|
69
|
+
ApiSelectorParamTypes["VALUE"] = "VALUE";
|
|
70
|
+
})(ApiSelectorParamTypes || (ApiSelectorParamTypes = {}));
|
|
@@ -27,6 +27,8 @@ interface StyleProps {
|
|
|
27
27
|
helperTextColor?: string;
|
|
28
28
|
/** If custom icon exists and should be displayed */
|
|
29
29
|
showIcon?: boolean;
|
|
30
|
+
/** If the selector is completely hidden */
|
|
31
|
+
hidden?: boolean;
|
|
30
32
|
}
|
|
31
33
|
export interface RoundedSmartSelectProps extends Omit<TextFieldProps, 'color' | 'onFocus'>, StyleProps {
|
|
32
34
|
/** Currently selected value */
|
|
@@ -62,5 +64,5 @@ export interface RoundedSmartSelectProps extends Omit<TextFieldProps, 'color' |
|
|
|
62
64
|
changeListener?: (value: any) => void;
|
|
63
65
|
onFocus?: any;
|
|
64
66
|
}
|
|
65
|
-
export default function RoundedSmartSelect({ options, value, handleUpdate, label, getValueString, color, errorColor, focusColor, helperTextColor, outlineColor, backgroundColor, cantEdit, loading, height, fontSize, required, changeListener, error, getOptionSelected, helperText, readOnly, borderRadius, fontWeight, icon, searchable, containerMargin, showIcon, inputRef, disabled, creatable, onBlur, name, onFocus, }: RoundedSmartSelectProps): JSX.Element;
|
|
67
|
+
export default function RoundedSmartSelect({ options, value, handleUpdate, label, getValueString, color, errorColor, focusColor, helperTextColor, outlineColor, backgroundColor, cantEdit, loading, height, fontSize, required, changeListener, error, getOptionSelected, helperText, readOnly, borderRadius, fontWeight, icon, searchable, containerMargin, showIcon, inputRef, disabled, hidden, creatable, onBlur, name, onFocus, }: RoundedSmartSelectProps): JSX.Element;
|
|
66
68
|
export {};
|
|
@@ -34,9 +34,10 @@ var useTextfieldStyles = function (props) {
|
|
|
34
34
|
var _a, _b, _c;
|
|
35
35
|
return ({
|
|
36
36
|
root: {
|
|
37
|
+
opacity: props.hidden ? 0.5 : 1,
|
|
37
38
|
borderRadius: props.borderRadius,
|
|
38
39
|
'& input, textarea': {
|
|
39
|
-
cursor: props.cantEdit ? 'default' : 'text',
|
|
40
|
+
cursor: props.cantEdit || props.hidden ? 'default' : 'text',
|
|
40
41
|
fontWeight: props.fontWeight,
|
|
41
42
|
color: props.color,
|
|
42
43
|
fontSize: props.fontSize,
|
|
@@ -95,7 +96,7 @@ var useTextfieldStyles = function (props) {
|
|
|
95
96
|
},
|
|
96
97
|
},
|
|
97
98
|
'& .EF-MuiOutlinedInput-root:hover .EF-MuiOutlinedInput-notchedOutline': {
|
|
98
|
-
borderColor: props.cantEdit
|
|
99
|
+
borderColor: props.cantEdit || props.hidden
|
|
99
100
|
? props.outlineColor
|
|
100
101
|
: props.focusColor,
|
|
101
102
|
},
|
|
@@ -141,7 +142,7 @@ var useTextfieldStyles = function (props) {
|
|
|
141
142
|
};
|
|
142
143
|
export default function RoundedSmartSelect(_a) {
|
|
143
144
|
var _b;
|
|
144
|
-
var options = _a.options, _c = _a.value, value = _c === void 0 ? '' : _c, handleUpdate = _a.handleUpdate, label = _a.label, _d = _a.getValueString, getValueString = _d === void 0 ? function (value) { return value.value; } : _d, _e = _a.color, color = _e === void 0 ? '#293241' : _e, _f = _a.errorColor, errorColor = _f === void 0 ? '#cc2936' : _f, _g = _a.focusColor, focusColor = _g === void 0 ? '#3d5a7f' : _g, _h = _a.helperTextColor, helperTextColor = _h === void 0 ? '#989898' : _h, _j = _a.outlineColor, outlineColor = _j === void 0 ? '#b8b8b8' : _j, _k = _a.backgroundColor, backgroundColor = _k === void 0 ? '#ffffff' : _k, _l = _a.cantEdit, cantEdit = _l === void 0 ? false : _l, _m = _a.loading, loading = _m === void 0 ? false : _m, _o = _a.height, height = _o === void 0 ? '31px' : _o, _p = _a.fontSize, fontSize = _p === void 0 ? '1rem' : _p, required = _a.required, changeListener = _a.changeListener, error = _a.error, getOptionSelected = _a.getOptionSelected, helperText = _a.helperText, _q = _a.readOnly, readOnly = _q === void 0 ? false : _q, _r = _a.borderRadius, borderRadius = _r === void 0 ? 10 : _r, _s = _a.fontWeight, fontWeight = _s === void 0 ? '400' : _s, icon = _a.icon, _t = _a.searchable, searchable = _t === void 0 ? false : _t, _u = _a.containerMargin, containerMargin = _u === void 0 ? '0px' : _u, _v = _a.showIcon, showIcon = _v === void 0 ? true : _v, inputRef = _a.inputRef, disabled = _a.disabled, _w = _a.
|
|
145
|
+
var options = _a.options, _c = _a.value, value = _c === void 0 ? '' : _c, handleUpdate = _a.handleUpdate, label = _a.label, _d = _a.getValueString, getValueString = _d === void 0 ? function (value) { return value.value; } : _d, _e = _a.color, color = _e === void 0 ? '#293241' : _e, _f = _a.errorColor, errorColor = _f === void 0 ? '#cc2936' : _f, _g = _a.focusColor, focusColor = _g === void 0 ? '#3d5a7f' : _g, _h = _a.helperTextColor, helperTextColor = _h === void 0 ? '#989898' : _h, _j = _a.outlineColor, outlineColor = _j === void 0 ? '#b8b8b8' : _j, _k = _a.backgroundColor, backgroundColor = _k === void 0 ? '#ffffff' : _k, _l = _a.cantEdit, cantEdit = _l === void 0 ? false : _l, _m = _a.loading, loading = _m === void 0 ? false : _m, _o = _a.height, height = _o === void 0 ? '31px' : _o, _p = _a.fontSize, fontSize = _p === void 0 ? '1rem' : _p, required = _a.required, changeListener = _a.changeListener, error = _a.error, getOptionSelected = _a.getOptionSelected, helperText = _a.helperText, _q = _a.readOnly, readOnly = _q === void 0 ? false : _q, _r = _a.borderRadius, borderRadius = _r === void 0 ? 10 : _r, _s = _a.fontWeight, fontWeight = _s === void 0 ? '400' : _s, icon = _a.icon, _t = _a.searchable, searchable = _t === void 0 ? false : _t, _u = _a.containerMargin, containerMargin = _u === void 0 ? '0px' : _u, _v = _a.showIcon, showIcon = _v === void 0 ? true : _v, inputRef = _a.inputRef, disabled = _a.disabled, _w = _a.hidden, hidden = _w === void 0 ? false : _w, _x = _a.creatable, creatable = _x === void 0 ? false : _x, onBlur = _a.onBlur, name = _a.name, onFocus = _a.onFocus;
|
|
145
146
|
var props = {
|
|
146
147
|
color: color,
|
|
147
148
|
height: height,
|
|
@@ -154,6 +155,7 @@ export default function RoundedSmartSelect(_a) {
|
|
|
154
155
|
readOnly: readOnly,
|
|
155
156
|
fontSize: fontSize,
|
|
156
157
|
fontWeight: fontWeight,
|
|
158
|
+
hidden: hidden,
|
|
157
159
|
cantEdit: cantEdit,
|
|
158
160
|
showIcon: showIcon && icon !== undefined,
|
|
159
161
|
};
|
|
@@ -211,7 +213,7 @@ export default function RoundedSmartSelect(_a) {
|
|
|
211
213
|
}
|
|
212
214
|
}, renderOption: function (option) {
|
|
213
215
|
return typeof option === 'string' ? option : option.label;
|
|
214
|
-
}, renderInput: function (params) { return (_jsx(TextField, __assign({ classes: textFieldClasses }, params, { inputRef: inputRef, onBlur: onBlur, name: name, variant: "outlined", label: label, required: required, error: error, helperText: helperText }))); }, noOptionsText: "No hay opciones" }));
|
|
216
|
+
}, renderInput: function (params) { return (_jsx(TextField, __assign({ classes: textFieldClasses }, params, { inputRef: inputRef, onBlur: onBlur, name: name, variant: "outlined", label: label, required: required, error: !hidden && error, helperText: hidden ? undefined : helperText }))); }, noOptionsText: "No hay opciones" }));
|
|
215
217
|
}
|
|
216
218
|
else {
|
|
217
219
|
return (_jsxs(RoundedSelect, __assign({ onBlur: onBlur, onFocus: onFocus, inputRef: inputRef, name: name, fullWidth: true, handleUpdate: function (event) {
|
|
@@ -220,7 +222,7 @@ export default function RoundedSmartSelect(_a) {
|
|
|
220
222
|
}));
|
|
221
223
|
}, onOpen: function () {
|
|
222
224
|
//Show loading icon if loading
|
|
223
|
-
}, value: getValueString(value), color: color, errorColor: errorColor, focusColor: focusColor, helperTextColor: helperTextColor, backgroundColor: backgroundColor, outlineColor: outlineColor, cantEdit: cantEdit, disabled: cantEdit || disabled, label: label, required: required, readOnly: readOnly, helperText: helperText, containerMargin: containerMargin, height: height, fontSize: fontSize, error: error, iconComponent: loading
|
|
225
|
+
}, value: getValueString(value), color: color, errorColor: errorColor, focusColor: focusColor, helperTextColor: helperTextColor, backgroundColor: backgroundColor, outlineColor: outlineColor, cantEdit: cantEdit, disabled: cantEdit || disabled, label: label, required: required, readOnly: readOnly, helperText: hidden ? undefined : helperText, containerMargin: containerMargin, height: height, fontSize: fontSize, error: !hidden && error, iconComponent: loading
|
|
224
226
|
? function () { return (_jsx("div", __assign({ style: {
|
|
225
227
|
marginTop: 3,
|
|
226
228
|
marginRight: 8,
|
|
@@ -231,6 +233,6 @@ export default function RoundedSmartSelect(_a) {
|
|
|
231
233
|
? function (props) {
|
|
232
234
|
return cloneElement(icon, props);
|
|
233
235
|
}
|
|
234
|
-
: undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: options ? 'Sin Seleccionar' : 'Cargando...' }) }), 'EMPTY'), options === null || options === void 0 ? void 0 : options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); }), options === undefined && value
|
|
236
|
+
: undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: options ? 'Sin Seleccionar' : 'Cargando...' }) }), 'EMPTY'), options === null || options === void 0 ? void 0 : options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); }), options === undefined && value && (_jsx(MenuItem, __assign({ value: getValueString(value), style: { whiteSpace: 'normal' } }, { children: (_b = value.label) !== null && _b !== void 0 ? _b : '' }), getValueString(value)))] })));
|
|
235
237
|
}
|
|
236
238
|
}
|
package/package.json
CHANGED