@arquimedes.co/eureka-forms 1.9.27-test → 1.9.29-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.
Files changed (77) hide show
  1. package/dist/@Types/CBRFormStep.d.ts +1 -3
  2. package/dist/@Types/FormStep.d.ts +25 -2
  3. package/dist/App.d.ts +2 -1
  4. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +2 -0
  5. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +74 -50
  6. package/dist/FormComponents/Form/Form.js +3 -1
  7. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +1 -1
  8. package/dist/FormComponents/Section/Section.js +1 -3
  9. package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
  10. package/dist/FormComponents/Step/@Construction/{CBRLocativasStep/CBRLocativasStep.js → CBRElementStep/CBRElementStep.js} +14 -23
  11. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +1 -3
  12. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +1 -1
  13. package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +3 -3
  14. package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +2 -6
  15. package/dist/FormComponents/Step/CBRStepMapper.js +13 -30
  16. package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +1 -3
  17. package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +13 -2
  18. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +1 -3
  19. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +3 -3
  20. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +1 -3
  21. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +13 -2
  22. package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.d.ts +15 -0
  23. package/dist/FormComponents/Step/EntityValueStep/EntityValueStep.js +129 -0
  24. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +1 -3
  25. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +13 -2
  26. package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +9 -0
  27. package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
  28. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +11 -0
  29. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +49 -0
  30. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
  31. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +8 -0
  32. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +182 -0
  33. package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +13 -0
  34. package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +2 -2
  35. package/dist/FormComponents/Step/RatingStep/RatingStep.js +1 -3
  36. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +3 -3
  37. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +1 -3
  38. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +1 -3
  39. package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +17 -6
  40. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +3 -3
  41. package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +1 -3
  42. package/dist/FormComponents/Step/Step.d.ts +1 -1
  43. package/dist/FormComponents/Step/Step.js +8 -0
  44. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +13 -2
  45. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +1 -3
  46. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +13 -2
  47. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +1 -3
  48. package/dist/FormComponents/Step/TitleStep/TitleStep.js +1 -3
  49. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +13 -2
  50. package/dist/FormComponents/Term/Term.js +1 -3
  51. package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
  52. package/dist/Icons/Construction/LeakIcon.js +16 -0
  53. package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
  54. package/dist/Icons/Construction/ProjectIcon.js +16 -0
  55. package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
  56. package/dist/Icons/Construction/PropertyIcon.js +16 -0
  57. package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
  58. package/dist/Icons/Construction/SpaceIcon.js +16 -0
  59. package/dist/Icons/DocumentIcon.d.ts +3 -0
  60. package/dist/Icons/DocumentIcon.js +16 -0
  61. package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
  62. package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
  63. package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
  64. package/dist/Icons/Entities/HandshakeIcon.js +17 -0
  65. package/dist/constants/FormStepTypes.d.ts +9 -3
  66. package/dist/constants/FormStepTypes.js +21 -14
  67. package/dist/constants/IconTypes.d.ts +10 -0
  68. package/dist/constants/IconTypes.js +11 -0
  69. package/dist/index.lib.d.ts +0 -1
  70. package/dist/index.lib.js +0 -1
  71. package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
  72. package/dist/shared/InputIcon/InputIcon.js +81 -0
  73. package/dist/shared/RoundedSelect/RoundedSelect.js +17 -3
  74. package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +12 -5
  75. package/dist/utils/CbrFunctions.js +1 -1
  76. package/package.json +2 -2
  77. package/dist/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.d.ts +0 -8
@@ -7,19 +7,21 @@ export var FormStyleTypes;
7
7
  (function (FormStyleTypes) {
8
8
  FormStyleTypes["MATERIAL"] = "MATERIAL";
9
9
  })(FormStyleTypes || (FormStyleTypes = {}));
10
- var TYPES;
11
- (function (TYPES) {
12
- TYPES["TITLE"] = "TITLE";
13
- TYPES["RATING"] = "RATING";
14
- TYPES["CHECKBOX"] = "CHECKBOX";
15
- TYPES["TEXTAREA"] = "TEXTAREA";
16
- TYPES["DATEPICKER"] = "DATEPICKER";
17
- TYPES["FILEUPLOAD"] = "FILEUPLOAD";
18
- TYPES["TEXTINPUT"] = "TEXTINPUT";
19
- TYPES["SEPARATOR"] = "SEPARATOR";
20
- TYPES["SELECTOR"] = "SELECTOR";
21
- TYPES["CLASSIFIER_SELECTOR"] = "CLASSIFIER_SELECTOR";
22
- })(TYPES || (TYPES = {}));
10
+ export var StepTypes;
11
+ (function (StepTypes) {
12
+ StepTypes["TITLE"] = "TITLE";
13
+ StepTypes["RATING"] = "RATING";
14
+ StepTypes["CHECKBOX"] = "CHECKBOX";
15
+ StepTypes["TEXTAREA"] = "TEXTAREA";
16
+ StepTypes["DATEPICKER"] = "DATEPICKER";
17
+ StepTypes["FILEUPLOAD"] = "FILEUPLOAD";
18
+ StepTypes["TEXTINPUT"] = "TEXTINPUT";
19
+ StepTypes["SEPARATOR"] = "SEPARATOR";
20
+ StepTypes["SELECTOR"] = "SELECTOR";
21
+ StepTypes["CLASSIFIER_SELECTOR"] = "CLASSIFIER_SELECTOR";
22
+ StepTypes["MAPPER"] = "MAPPER";
23
+ StepTypes["ENTITYVALUEPICKER"] = "ENTITYVALUEPICKER";
24
+ })(StepTypes || (StepTypes = {}));
23
25
  export var OptionTypes;
24
26
  (function (OptionTypes) {
25
27
  OptionTypes["DEFAULT"] = "DEFAULT";
@@ -37,4 +39,9 @@ export var RatingTypes;
37
39
  RatingTypes["SATISFACTION"] = "SATISFACTION";
38
40
  RatingTypes["LIKE"] = "LIKE";
39
41
  })(RatingTypes || (RatingTypes = {}));
40
- export default TYPES;
42
+ export default StepTypes;
43
+ export var MapperStyleTypes;
44
+ (function (MapperStyleTypes) {
45
+ MapperStyleTypes["PILL"] = "PILL";
46
+ MapperStyleTypes["LIST"] = "LIST";
47
+ })(MapperStyleTypes || (MapperStyleTypes = {}));
@@ -0,0 +1,10 @@
1
+ export declare enum IconTypes {
2
+ PROJECT = "PROJECT",
3
+ PROPERTY = "PROPERTY",
4
+ SPACE = "SPACE",
5
+ LEAK = "LEAK",
6
+ DOCUMENT = "DOCUMENT",
7
+ HANDSHAKE = "HANDSHAKE",
8
+ GENERIC = "GENERIC"
9
+ }
10
+ export default IconTypes;
@@ -0,0 +1,11 @@
1
+ export var IconTypes;
2
+ (function (IconTypes) {
3
+ IconTypes["PROJECT"] = "PROJECT";
4
+ IconTypes["PROPERTY"] = "PROPERTY";
5
+ IconTypes["SPACE"] = "SPACE";
6
+ IconTypes["LEAK"] = "LEAK";
7
+ IconTypes["DOCUMENT"] = "DOCUMENT";
8
+ IconTypes["HANDSHAKE"] = "HANDSHAKE";
9
+ IconTypes["GENERIC"] = "GENERIC";
10
+ })(IconTypes || (IconTypes = {}));
11
+ export default IconTypes;
@@ -5,4 +5,3 @@ export type { StepProps, EurekaFormProps };
5
5
  export { EurekaForm, StepFunctions };
6
6
  export default EurekaForm;
7
7
  export { default as ReactFromModule } from 'react';
8
- export { mapOriginalValues } from './FormComponents/Form/ColumnForm/ColumnForm';
package/dist/index.lib.js CHANGED
@@ -3,4 +3,3 @@ import * as StepFunctions from './FormComponents/Step/StepFunctions';
3
3
  export { EurekaForm, StepFunctions };
4
4
  export default EurekaForm;
5
5
  export { default as ReactFromModule } from 'react';
6
- export { mapOriginalValues } from './FormComponents/Form/ColumnForm/ColumnForm';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface InputIconProps {
3
+ icon: string;
4
+ fill?: string;
5
+ }
6
+ declare function InputIcon({ icon, fill, ...others }: InputIconProps): JSX.Element;
7
+ export default InputIcon;
@@ -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
- : {}), { 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 })))] })));
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: icon
209
- ? function (props) {
210
- return cloneElement(icon, props);
211
- }
212
- : 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))); })] })));
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, parentStep: idParent, dependencies: [idProjectDep], subStep: null });
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.27-test",
4
+ "version":"1.9.29-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.6.4"
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
- }