@arquimedes.co/eureka-forms 1.9.28-test → 1.9.30-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 -3
- package/dist/@Types/FormStep.d.ts +25 -2
- package/dist/App.d.ts +1 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +2 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +74 -50
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +1 -1
- package/dist/FormComponents/Section/Section.js +1 -3
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/{CBRLocativasStep/CBRLocativasStep.js → CBRElementStep/CBRElementStep.js} +14 -23
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +1 -3
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +1 -1
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +3 -3
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +2 -6
- package/dist/FormComponents/Step/CBRStepMapper.js +13 -30
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +1 -3
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +13 -2
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +1 -3
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +3 -3
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +1 -3
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +13 -2
- package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.d.ts +15 -0
- package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.js +129 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +1 -3
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +13 -2
- package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +9 -0
- package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +11 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +49 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +8 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +182 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +13 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +2 -2
- package/dist/FormComponents/Step/RatingStep/RatingStep.js +1 -3
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +3 -3
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +1 -3
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +1 -3
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +17 -6
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +3 -3
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +1 -3
- package/dist/FormComponents/Step/Step.d.ts +1 -1
- package/dist/FormComponents/Step/Step.js +8 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +13 -2
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +1 -3
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +13 -2
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +1 -3
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +1 -3
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +13 -2
- package/dist/FormComponents/Term/Term.js +1 -3
- package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/Icons/Construction/LeakIcon.js +16 -0
- package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/Icons/Construction/ProjectIcon.js +16 -0
- package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/Icons/Construction/PropertyIcon.js +16 -0
- package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/Icons/Construction/SpaceIcon.js +16 -0
- package/dist/Icons/DocumentIcon.d.ts +3 -0
- package/dist/Icons/DocumentIcon.js +16 -0
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
- package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
- package/dist/Icons/Entities/HandshakeIcon.js +17 -0
- package/dist/constants/FormStepTypes.d.ts +9 -3
- package/dist/constants/FormStepTypes.js +21 -14
- package/dist/constants/IconTypes.d.ts +10 -0
- package/dist/constants/IconTypes.js +11 -0
- package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/shared/InputIcon/InputIcon.js +81 -0
- package/dist/shared/RoundedSelect/RoundedSelect.js +17 -3
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +12 -5
- package/dist/utils/CbrFunctions.js +1 -1
- package/package.json +2 -2
- package/dist/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.d.ts +0 -8
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import LeakIcon from '../../Icons/Construction/LeakIcon';
|
|
25
|
+
import ProjectIcon from '../../Icons/Construction/ProjectIcon';
|
|
26
|
+
import PropertyIcon from '../../Icons/Construction/PropertyIcon';
|
|
27
|
+
import SpaceIcon from '../../Icons/Construction/SpaceIcon';
|
|
28
|
+
import DocumentIcon from '../../Icons/DocumentIcon';
|
|
29
|
+
import GenericEntityIcon from '../../Icons/Entities/GenericEntityIcon';
|
|
30
|
+
import HandShakeIcon from '../../Icons/Entities/HandshakeIcon';
|
|
31
|
+
import IconTypes from '../../constants/IconTypes';
|
|
32
|
+
function InputIcon(_a) {
|
|
33
|
+
var icon = _a.icon, _b = _a.fill, fill = _b === void 0 ? '#757575' : _b, others = __rest(_a, ["icon", "fill"]);
|
|
34
|
+
switch (icon) {
|
|
35
|
+
case IconTypes.PROJECT:
|
|
36
|
+
return (_jsx(ProjectIcon, __assign({ style: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
height: 24,
|
|
39
|
+
width: 24,
|
|
40
|
+
}, fill: fill }, others)));
|
|
41
|
+
case IconTypes.PROPERTY:
|
|
42
|
+
return (_jsx(PropertyIcon, __assign({ style: {
|
|
43
|
+
display: 'flex',
|
|
44
|
+
height: 23,
|
|
45
|
+
width: 23,
|
|
46
|
+
}, fill: fill }, others)));
|
|
47
|
+
case IconTypes.SPACE:
|
|
48
|
+
return (_jsx(SpaceIcon, __assign({ style: {
|
|
49
|
+
display: 'flex',
|
|
50
|
+
height: 23,
|
|
51
|
+
width: 23,
|
|
52
|
+
}, fill: fill }, others)));
|
|
53
|
+
case IconTypes.LEAK:
|
|
54
|
+
return (_jsx(LeakIcon, __assign({ style: {
|
|
55
|
+
display: 'flex',
|
|
56
|
+
height: 23,
|
|
57
|
+
width: 23,
|
|
58
|
+
marginTop: 2,
|
|
59
|
+
}, fill: fill }, others)));
|
|
60
|
+
case IconTypes.DOCUMENT:
|
|
61
|
+
return (_jsx(DocumentIcon, __assign({ style: {
|
|
62
|
+
display: 'flex',
|
|
63
|
+
height: 23,
|
|
64
|
+
width: 23,
|
|
65
|
+
}, fill: fill }, others)));
|
|
66
|
+
case IconTypes.HANDSHAKE:
|
|
67
|
+
return (_jsx(HandShakeIcon, __assign({ style: {
|
|
68
|
+
display: 'flex',
|
|
69
|
+
height: 23,
|
|
70
|
+
width: 23,
|
|
71
|
+
}, fill: fill }, others)));
|
|
72
|
+
case IconTypes.GENERIC:
|
|
73
|
+
default:
|
|
74
|
+
return (_jsx(GenericEntityIcon, __assign({ style: {
|
|
75
|
+
display: 'flex',
|
|
76
|
+
height: 23,
|
|
77
|
+
width: 23,
|
|
78
|
+
}, fill: fill }, others)));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export default InputIcon;
|
|
@@ -36,7 +36,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
36
36
|
return t;
|
|
37
37
|
};
|
|
38
38
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
|
-
import React from 'react';
|
|
39
|
+
import React, { useState } from 'react';
|
|
40
40
|
import { makeStyles } from '@material-ui/core/styles';
|
|
41
41
|
import InputLabel from '@material-ui/core/InputLabel';
|
|
42
42
|
import FormControl from '@material-ui/core/FormControl';
|
|
@@ -78,6 +78,10 @@ var useOutlinedInputStyles = function (props) {
|
|
|
78
78
|
'& .Mui-disabled': {
|
|
79
79
|
cursor: 'default',
|
|
80
80
|
color: props.color,
|
|
81
|
+
pointerEvents: 'none',
|
|
82
|
+
},
|
|
83
|
+
'&:hover.Mui-disabled $notchedOutline': {
|
|
84
|
+
borderColor: props.errorColor,
|
|
81
85
|
},
|
|
82
86
|
'& .Mui-error': {
|
|
83
87
|
color: props.errorColor,
|
|
@@ -163,13 +167,23 @@ function CustomSelect(_a) {
|
|
|
163
167
|
var outlinedInputClasses = useOutlinedInputStyles(styleProps)();
|
|
164
168
|
var labelClasses = useLabelInputStyles(styleProps)();
|
|
165
169
|
var helperTextClasses = useHelperTextStyles(styleProps)();
|
|
170
|
+
var _s = useState(false), open = _s[0], setOpen = _s[1];
|
|
166
171
|
return (_jsxs(FormControl, __assign({ variant: "outlined", className: classes.formControl, size: "small", style: minWidth !== undefined
|
|
167
172
|
? { minWidth: minWidth, outlineColor: outlineColor, margin: containerMargin }
|
|
168
173
|
: {
|
|
169
174
|
margin: containerMargin,
|
|
170
|
-
}, fullWidth: true, required: required, error: error }, { children: [label && _jsx(InputLabel, __assign({ classes: labelClasses }, { children: label })), _jsx(Select, __assign({}, others, { value: value, onChange: handleUpdate }, (showIcon && iconComponent
|
|
175
|
+
}, fullWidth: true, required: required, error: error }, { children: [label && _jsx(InputLabel, __assign({ classes: labelClasses }, { children: label })), _jsx(Select, __assign({}, others, { value: value, MenuProps: {}, onChange: handleUpdate }, (showIcon && iconComponent
|
|
171
176
|
? { IconComponent: iconComponent }
|
|
172
|
-
: {}), {
|
|
177
|
+
: {}), { open: open, onFocus: function (e) {
|
|
178
|
+
var _a;
|
|
179
|
+
if (!((_a = e.relatedTarget) === null || _a === void 0 ? void 0 : _a.closest('.EF-MuiPaper-root'))) {
|
|
180
|
+
setOpen(true);
|
|
181
|
+
}
|
|
182
|
+
}, onClose: function () {
|
|
183
|
+
setOpen(false);
|
|
184
|
+
}, onOpen: function () {
|
|
185
|
+
setOpen(true);
|
|
186
|
+
}, input: _jsx(OutlinedInput, { disabled: cantEdit, name: label, label: label ? label + (required ? ' *' : '') : undefined, classes: outlinedInputClasses }) }, { children: children })), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText })))] })));
|
|
173
187
|
}
|
|
174
188
|
/**
|
|
175
189
|
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
|
@@ -205,10 +205,17 @@ export default function RoundedSmartSelect(_a) {
|
|
|
205
205
|
}));
|
|
206
206
|
}, onOpen: function () {
|
|
207
207
|
//Show loading icon if loading
|
|
208
|
-
}, value: getValueString(value), color: color, errorColor: errorColor, focusColor: focusColor, helperTextColor: helperTextColor, backgroundColor: backgroundColor, outlineColor: outlineColor, innerBackgroundColor: innerBackgroundColor, cantEdit: cantEdit, label: label, required: required, readOnly: readOnly, helperText: helperText, containerMargin: containerMargin, height: height, fontSize: fontSize, error: error, iconComponent:
|
|
209
|
-
? function (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
}, value: getValueString(value), color: color, errorColor: errorColor, focusColor: focusColor, helperTextColor: helperTextColor, backgroundColor: backgroundColor, outlineColor: outlineColor, innerBackgroundColor: innerBackgroundColor, cantEdit: cantEdit, disabled: cantEdit || disabled, label: label, required: required, readOnly: readOnly, helperText: helperText, containerMargin: containerMargin, height: height, fontSize: fontSize, error: error, iconComponent: loading
|
|
209
|
+
? function () { return (_jsx("div", __assign({ style: {
|
|
210
|
+
marginTop: 3,
|
|
211
|
+
marginRight: 8,
|
|
212
|
+
} }, { children: _jsx(CircularProgress, { size: 22, style: {
|
|
213
|
+
color: '#757575',
|
|
214
|
+
} }) }))); }
|
|
215
|
+
: showIcon && icon
|
|
216
|
+
? function (props) {
|
|
217
|
+
return cloneElement(icon, props);
|
|
218
|
+
}
|
|
219
|
+
: undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: "Sin Seleccionar" }) }), 'EMPTY'), options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); })] })));
|
|
213
220
|
}
|
|
214
221
|
}
|
|
@@ -39,7 +39,7 @@ var addRecursiveElementStep = function (idStep, step, idParent, steps, idProject
|
|
|
39
39
|
var _a, _b, _c;
|
|
40
40
|
var idSubStep = (_a = formValues[idStep]) === null || _a === void 0 ? void 0 : _a.subStep;
|
|
41
41
|
var newSubStep = step.subStep ? __assign({}, step.subStep) : undefined;
|
|
42
|
-
var newStep = __assign(__assign({}, step), { id: idStep, type: CBRFormStepTypes.CBR_LOCATIVAS,
|
|
42
|
+
var newStep = __assign(__assign({}, step), { id: idStep, type: CBRFormStepTypes.CBR_LOCATIVAS, dependencies: [idProjectDep], subStep: null });
|
|
43
43
|
if (newSubStep) {
|
|
44
44
|
newStep.subStep = idSubStep;
|
|
45
45
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arquimedes.co/eureka-forms",
|
|
3
3
|
"repository": "git://github.com/Arquimede5/Eureka-Forms.git",
|
|
4
|
-
"version":"1.9.
|
|
4
|
+
"version":"1.9.30-test",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
7
7
|
"build": "react-scripts build",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react": "^17.x.x",
|
|
81
81
|
"react-dom": "^17.x.x",
|
|
82
82
|
"react-draft-wysiwyg": "^1.14.x",
|
|
83
|
-
"react-hook-form": "^7.
|
|
83
|
+
"react-hook-form": "^7.45.0"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { StepProps } from '../../Step';
|
|
3
|
-
import { CBRElementStep } from '../../../../@Types/CBRFormStep';
|
|
4
|
-
declare function CBRLocativasStep(props: LocativasSubStepRendererProps): JSX.Element;
|
|
5
|
-
export default CBRLocativasStep;
|
|
6
|
-
export interface LocativasSubStepRendererProps extends Omit<StepProps, 'step'> {
|
|
7
|
-
step: CBRElementStep;
|
|
8
|
-
}
|