@arquimedes.co/eureka-forms 1.7.7-test → 1.7.8

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/App.js CHANGED
@@ -67,6 +67,7 @@ import axiosInstance from './AxiosAPI';
67
67
  import widgetInstance from './AxiosWidget';
68
68
  import InternalFormStyle from './constants/InternalFormStyle';
69
69
  import { calcCbrForm } from './utils/CbrFunctions';
70
+ import CBRStepTypes from './constants/CBRFormStepTypes';
70
71
  function App(_a) {
71
72
  var _this = this;
72
73
  var _b, _c, _d, _e;
@@ -293,6 +294,20 @@ var migrateForm = function (form) {
293
294
  if (step.size && isNaN(step.size)) {
294
295
  step.size = getStaticWidth(step);
295
296
  }
297
+ if (step.type === CBRStepTypes.CBR_EMAIL) {
298
+ step.validation = {
299
+ value: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
300
+ .source,
301
+ message: 'El correo no es válido',
302
+ };
303
+ }
304
+ else if (step.type === CBRStepTypes.CBR_PHONE ||
305
+ step.type === CBRStepTypes.CBR_CEL) {
306
+ step.validation = {
307
+ value: /^(\+[0-9])|([0-9])$/.source,
308
+ message: 'El teléfono no es válido',
309
+ };
310
+ }
296
311
  steps[idStep] = step;
297
312
  }
298
313
  var newForm = __assign(__assign({}, form), { steps: steps });
@@ -23,8 +23,6 @@ interface StyleProps {
23
23
  fontSize?: number | string;
24
24
  /** The weight of the font of the value and the placeholder */
25
25
  fontWeight?: number | string;
26
- /** The fontsize of the shrunken label */
27
- shrunkenFontSize?: number | string;
28
26
  /** If the input is multiline */
29
27
  multiline?: boolean;
30
28
  /** Cant edit */
@@ -105,7 +105,7 @@ var useTextfieldStyles = function (props) {
105
105
  }); });
106
106
  };
107
107
  function CustomTextfield(_a) {
108
- 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, innerBackgroundColor = _a.innerBackgroundColor, _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.shrunkenFontSize, shrunkenFontSize = _l === void 0 ? '1rem' : _l, _m = _a.errorColor, errorColor = _m === void 0 ? '#cc2936' : _m, _o = _a.fontWeight, fontWeight = _o === void 0 ? '300' : _o, _p = _a.multiline, multiline = _p === void 0 ? false : _p, _q = _a.cantEdit, cantEdit = _q === void 0 ? false : _q, inputProps = _a.inputProps, value = _a.value, icon = _a.icon, others = __rest(_a, ["focusColor", "helperTextColor", "outlineColor", "backgroundColor", "innerBackgroundColor", "textColor", "readOnly", "borderRadius", "padding", "fontSize", "shrunkenFontSize", "errorColor", "fontWeight", "multiline", "cantEdit", "inputProps", "value", "icon"]);
108
+ 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, innerBackgroundColor = _a.innerBackgroundColor, _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, inputProps = _a.inputProps, value = _a.value, icon = _a.icon, others = __rest(_a, ["focusColor", "helperTextColor", "outlineColor", "backgroundColor", "innerBackgroundColor", "textColor", "readOnly", "borderRadius", "padding", "fontSize", "errorColor", "fontWeight", "multiline", "cantEdit", "inputProps", "value", "icon"]);
109
109
  var classes = useTextfieldStyles({
110
110
  padding: padding,
111
111
  textColor: textColor,
@@ -118,7 +118,6 @@ function CustomTextfield(_a) {
118
118
  borderRadius: borderRadius,
119
119
  readOnly: readOnly,
120
120
  fontSize: fontSize,
121
- shrunkenFontSize: shrunkenFontSize,
122
121
  fontWeight: fontWeight,
123
122
  multiline: multiline,
124
123
  cantEdit: cantEdit,
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.7.7-test",
4
+ "version": "1.7.8",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",