@arquimedes.co/eureka-forms 1.9.120 → 1.9.121
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.
|
@@ -137,7 +137,11 @@ function AYFStepMapper(props) {
|
|
|
137
137
|
case AYFFormStepTypes.AYF_YEAR:
|
|
138
138
|
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString() })));
|
|
139
139
|
case AYFFormStepTypes.AYF_BILL_NUM:
|
|
140
|
-
return (_jsx(TextInputStep, __assign({}, props, { step: props.step,
|
|
140
|
+
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, validation: {
|
|
141
|
+
value: '^\\S*$',
|
|
142
|
+
type: 'OTHER',
|
|
143
|
+
message: 'No se permiten espacios',
|
|
144
|
+
}, maxLength: 30, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }) })));
|
|
141
145
|
case AYFFormStepTypes.AYF_CUT_OFF_DATE:
|
|
142
146
|
return (_jsx(DatePickerStep, __assign({}, props, { step: props.step, defaultValue: new Date() })));
|
|
143
147
|
case AYFFormStepTypes.AYF_ICA_CITY:
|
|
@@ -35,7 +35,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
35
35
|
}
|
|
36
36
|
return t;
|
|
37
37
|
};
|
|
38
|
-
import {
|
|
38
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
39
39
|
import React from 'react';
|
|
40
40
|
import { makeStyles } from '@material-ui/core/styles';
|
|
41
41
|
import TextField from '@material-ui/core/TextField';
|
|
@@ -103,6 +103,7 @@ var useTextfieldStyles = function (props) {
|
|
|
103
103
|
},
|
|
104
104
|
'& .EF-MuiFormHelperText-root': {
|
|
105
105
|
color: props.helperTextColor,
|
|
106
|
+
position: 'relative',
|
|
106
107
|
marginRight: props.maxLength ? 40 : 14,
|
|
107
108
|
},
|
|
108
109
|
'& .EF-MuiFormHelperText-root.Mui-error': {
|
|
@@ -116,7 +117,7 @@ var useTextfieldStyles = function (props) {
|
|
|
116
117
|
}); });
|
|
117
118
|
};
|
|
118
119
|
function CustomTextfield(_a) {
|
|
119
|
-
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.helperTextColor, helperTextColor = _c === void 0 ? '#989898' : _c, _d = _a.outlineColor, outlineColor = _d === void 0 ? '#0000003b' : _d, _e = _a.backgroundColor, backgroundColor = _e === void 0 ? 'white' : _e, _f = _a.textColor, textColor = _f === void 0 ? '#293241' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.borderRadius, borderRadius = _h === void 0 ? 10 : _h, _j = _a.padding, padding = _j === void 0 ? '6px 12px' : _j, _k = _a.fontSize, fontSize = _k === void 0 ? '1rem' : _k, _l = _a.errorColor, errorColor = _l === void 0 ? '#cc2936' : _l, _m = _a.fontWeight, fontWeight = _m === void 0 ? '300' : _m, _o = _a.multiline, multiline = _o === void 0 ? false : _o, _p = _a.cantEdit, cantEdit = _p === void 0 ? false : _p,
|
|
120
|
+
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.helperTextColor, helperTextColor = _c === void 0 ? '#989898' : _c, _d = _a.outlineColor, outlineColor = _d === void 0 ? '#0000003b' : _d, _e = _a.backgroundColor, backgroundColor = _e === void 0 ? 'white' : _e, _f = _a.textColor, textColor = _f === void 0 ? '#293241' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.borderRadius, borderRadius = _h === void 0 ? 10 : _h, _j = _a.padding, padding = _j === void 0 ? '6px 12px' : _j, _k = _a.fontSize, fontSize = _k === void 0 ? '1rem' : _k, _l = _a.errorColor, errorColor = _l === void 0 ? '#cc2936' : _l, _m = _a.fontWeight, fontWeight = _m === void 0 ? '300' : _m, _o = _a.multiline, multiline = _o === void 0 ? false : _o, _p = _a.cantEdit, cantEdit = _p === void 0 ? false : _p, _q = _a.maxLength, maxLength = _q === void 0 ? 10 : _q, value = _a.value, icon = _a.icon, others = __rest(_a, ["focusColor", "helperTextColor", "outlineColor", "backgroundColor", "textColor", "readOnly", "borderRadius", "padding", "fontSize", "errorColor", "fontWeight", "multiline", "cantEdit", "maxLength", "value", "icon"]);
|
|
120
121
|
var classes = useTextfieldStyles({
|
|
121
122
|
padding: padding,
|
|
122
123
|
textColor: textColor,
|
|
@@ -142,22 +143,20 @@ function CustomTextfield(_a) {
|
|
|
142
143
|
if (maxLength) {
|
|
143
144
|
inputProps.inputProps = { maxLength: maxLength };
|
|
144
145
|
}
|
|
145
|
-
return (_jsxs("div", __assign({ style: { position: 'relative', width: '100%', maxWidth: '100%' } }, { children: [_jsx(TextField, __assign({ classes: classes }, others, { value: value !== null && value !== void 0 ? value : '', multiline: multiline, variant: "outlined", size: "small", fullWidth: true, InputProps: inputProps
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
paddingBottom: '2px',
|
|
160
|
-
} }, { children: [length, "/", maxLength] })))] })));
|
|
146
|
+
return (_jsxs("div", __assign({ style: { position: 'relative', width: '100%', maxWidth: '100%' } }, { children: [_jsx(TextField, __assign({ classes: classes }, others, { value: value !== null && value !== void 0 ? value : '', multiline: multiline, variant: "outlined", size: "small", fullWidth: true, InputProps: inputProps, helperText: others.helperText ? (_jsxs(React.Fragment, { children: [others.helperText, length !== null && (_jsxs("div", __assign({ style: {
|
|
147
|
+
position: 'absolute',
|
|
148
|
+
top: '-3px',
|
|
149
|
+
right: '-32px',
|
|
150
|
+
fontSize: '12px',
|
|
151
|
+
color: helperTextColor,
|
|
152
|
+
} }, { children: [length, "/", maxLength] })))] })) : undefined })), length !== null && !others.helperText && (_jsxs("div", __assign({ style: {
|
|
153
|
+
fontSize: '12px',
|
|
154
|
+
color: helperTextColor,
|
|
155
|
+
textAlign: 'right',
|
|
156
|
+
paddingRight: '8px',
|
|
157
|
+
paddingTop: '2px',
|
|
158
|
+
paddingBottom: '2px',
|
|
159
|
+
} }, { children: [length, "/", maxLength] })))] })));
|
|
161
160
|
}
|
|
162
161
|
/**
|
|
163
162
|
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
package/package.json
CHANGED