@arquimedes.co/eureka-forms 0.2.42 → 0.2.43-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.
@@ -22,13 +22,12 @@ function ConfirmationDialog(_a) {
22
22
  maxWidth: '100vw',
23
23
  boxSizing: 'content-box',
24
24
  },
25
- }, onClose: function () {
26
- onClose();
27
25
  }, open: true }, { children: _jsxs("div", __assign({ className: styles.confirmationContainer, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
28
26
  onClose();
29
- } }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }, void 0) }), void 0), _jsx("div", __assign({ className: styles.checkContainer, style: { color: formStyle.primaryColor } }, { children: _jsx(CheckCircleOutlineRoundedIcon, { fontSize: "inherit" }, void 0) }), void 0), _jsxs("div", __assign({ className: styles.messageContainer }, { children: ["Tu caso n\u00FAmero", ' ', _jsx("span", __assign({ style: { fontWeight: 'bold' } }, { children: confirmation.case }), void 0), ' ', "ha sido registrado!"] }), void 0), _jsx("div", __assign({ className: styles.messageContainer }, { children: "Pronto te estaremos dando respuesta." }), void 0), _jsxs("div", __assign({ className: styles.linkContainer }, { children: ["Puedes consultar el estado aqui:", ' '] }), void 0), _jsx("div", __assign({ className: styles.url, onClick: function () {
30
- var _a, _b, _c;
31
- (_c = (_b = (_a = window.open) === null || _a === void 0 ? void 0 : _a.call(window, confirmation.url, '_blank')) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
32
- } }, { children: confirmation.url }), void 0)] }), void 0) }), void 0));
27
+ } }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }, void 0) }), void 0), _jsxs("div", __assign({ className: styles.container }, { children: [_jsx("div", __assign({ className: styles.checkContainer, style: { color: formStyle.primaryColor } }, { children: _jsx(CheckCircleOutlineRoundedIcon, { fontSize: "inherit", style: { fontSize: '160px' } }, void 0) }), void 0), _jsxs("div", __assign({ className: styles.messageContainer }, { children: ["Tu caso n\u00FAmero", ' ', _jsx("span", __assign({ style: { fontWeight: 'bold' } }, { children: confirmation.case }), void 0), ' ', "ha sido registrado!"] }), void 0), _jsx("div", __assign({ className: styles.messageContainer }, { children: "Pronto te estaremos dando respuesta." }), void 0), _jsxs("div", __assign({ className: styles.linkContainer }, { children: ["Puedes consultar el estado aqui:", ' '] }), void 0), _jsx("label", __assign({ className: styles.url, onClick: function () {
28
+ var _a, _b, _c;
29
+ (_c = (_b = (_a = window
30
+ .open) === null || _a === void 0 ? void 0 : _a.call(window, confirmation.url, '_blank')) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
31
+ } }, { children: confirmation.url }), void 0)] }), void 0)] }), void 0) }), void 0));
33
32
  }
34
33
  export default ConfirmationDialog;
@@ -2,11 +2,18 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: fit-content;
5
- max-height: 60vh;
5
+ max-height: 80vh;
6
6
  max-width: 80vw;
7
7
  position: relative;
8
8
  }
9
9
 
10
+ .container {
11
+ max-height: 100%;
12
+ display: flex;
13
+ flex-direction: column;
14
+ overflow: hidden;
15
+ overflow-y: scroll;
16
+ }
10
17
  .confirmationContainer,
11
18
  .confirmationContainer *,
12
19
  .confirmationContainer *::after,
@@ -20,8 +27,7 @@
20
27
  margin-left: auto;
21
28
  margin-right: auto;
22
29
  padding-top: 30px;
23
- font-size: 10rem;
24
- height: 10rem;
30
+ height: fit-content;
25
31
  margin-bottom: 15px;
26
32
  }
27
33
 
@@ -36,18 +42,18 @@
36
42
  .linkContainer {
37
43
  margin-top: 20px;
38
44
  font-size: 1.2rem;
39
- margin-right: auto;
40
45
  margin-left: 20px;
41
46
  }
42
47
  .url {
43
48
  font-weight: bolder;
44
49
  margin-left: 40px;
45
50
  margin-right: 40px;
46
- margin-top: 5px;
51
+ margin-top: 10px;
47
52
  margin-bottom: 40px;
48
53
  cursor: pointer;
49
54
  font-size: 1rem;
50
- overflow: hidden;
55
+ max-width: calc(100% - 100px);
56
+ word-break: break-all;
51
57
  }
52
58
  .closeIcon {
53
59
  right: 15px;
@@ -44,7 +44,6 @@ function Selector(_a) {
44
44
  width: widthStats.currentBreakPoint <= step.size
45
45
  ? '100%'
46
46
  : calcStepWidth(step.size, form),
47
- maxWidth: '100%',
48
47
  minHeight: step.description || step.required ? '55px' : '43px',
49
48
  } }, { children: _jsxs(RoundedSelect, __assign({ value: value, fullWidth: true, inputRef: inputRef, cantEdit: postview, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, label: step.label, required: step.required, containerMargin: "0px", height: '31px', onBlur: onBlur, handleUpdate: function (event) {
50
49
  onChange(event.target.value);
package/dist/index.js CHANGED
@@ -13,4 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as ReactDOM from 'react-dom';
14
14
  import App from './App';
15
15
  import styles from './index.module.css';
16
- ReactDOM.render(_jsx("div", __assign({ className: styles.eurekaForm }, { children: _jsx(App, { isWidget: false, apiKey: window.location.pathname.replace('/', '') }, void 0) }), void 0), document.getElementById('eureka-root'));
16
+ var urlParams = new URLSearchParams(window.location.search);
17
+ var values = urlParams.get('data-values');
18
+ var dataValues = undefined;
19
+ if (values) {
20
+ try {
21
+ dataValues = JSON.parse(decodeURIComponent(values));
22
+ }
23
+ catch (error) {
24
+ console.error('Invalid data-values JSON', error);
25
+ }
26
+ }
27
+ ReactDOM.render(_jsx("div", __assign({ className: styles.eurekaForm }, { children: _jsx(App, { isWidget: false, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues }, void 0) }), void 0), document.getElementById('eureka-root'));
@@ -62,9 +62,7 @@ var useDatePickerStyles = function (props) {
62
62
  '& .EF-MuiOutlinedInput-notchedOutline': {
63
63
  borderColor: props.outlineColor,
64
64
  '& span': {
65
- fontSize: props.shrunkenFontSize,
66
- paddingRight: 0,
67
- paddingLeft: 0,
65
+ fontSize: props.fontSize,
68
66
  },
69
67
  },
70
68
  '&.Mui-error .EF-MuiOutlinedInput-notchedOutline': {
@@ -98,6 +96,10 @@ var useDatePickerStyles = function (props) {
98
96
  var useDatePickerLabelStyles = function (props) {
99
97
  return makeStyles(function () { return ({
100
98
  root: {
99
+ whiteSpace: 'nowrap',
100
+ overflow: 'hidden',
101
+ maxWidth: 'calc(100% - 50px)',
102
+ textOverflow: 'ellipsis',
101
103
  marginTop: '-4px',
102
104
  fontSize: props.fontSize,
103
105
  '&.Mui-focused': {
@@ -105,7 +107,7 @@ var useDatePickerLabelStyles = function (props) {
105
107
  },
106
108
  '&.EF-MuiInputLabel-shrink': {
107
109
  marginTop: '0px',
108
- fontSize: props.shrunkenFontSize,
110
+ maxWidth: 'calc(100% - 5px)',
109
111
  },
110
112
  '& .Mui-error': {
111
113
  color: props.errorColor,
@@ -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, { useEffect } from 'react';
39
+ import React 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';
@@ -105,7 +105,7 @@ var useLabelInputStyles = function (props) {
105
105
  marginTop: props.height != '40px' ? '-4px' : '0px',
106
106
  '&.EF-MuiInputLabel-shrink': {
107
107
  marginTop: '0px',
108
- maxWidth: 'calc(125% - 30px)',
108
+ maxWidth: 'calc(100% - 5px)',
109
109
  },
110
110
  '& .Mui-error': {
111
111
  color: props.errorColor,
@@ -156,16 +156,11 @@ function CustomSelect(_a) {
156
156
  height: height,
157
157
  color: color,
158
158
  })();
159
- var inputLabel = React.useRef();
160
- var _k = React.useState(0), labelWidth = _k[0], setLabelWidth = _k[1];
161
- useEffect(function () {
162
- setLabelWidth(inputLabel.current.offsetWidth);
163
- }, [label]);
164
159
  return (_jsxs(FormControl, __assign({ variant: "outlined", className: classes.formControl, size: "small", style: minWidth !== undefined
165
160
  ? { minWidth: minWidth, outlineColor: outlineColor, margin: containerMargin }
166
161
  : {
167
162
  margin: containerMargin,
168
- }, fullWidth: true, required: required, error: error }, { children: [_jsx(InputLabel, __assign({ ref: inputLabel, classes: labelClasses }, { children: label }), void 0), _jsx(Select, __assign({}, others, { value: value, onChange: handleUpdate, input: _jsx(OutlinedInput, { disabled: cantEdit, labelWidth: labelWidth, name: label, classes: outlinedInputClasses }, void 0) }, { children: children }), void 0), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText }), void 0))] }), void 0));
163
+ }, fullWidth: true, required: required, error: error }, { children: [_jsx(InputLabel, __assign({ classes: labelClasses }, { children: label }), void 0), _jsx(Select, __assign({}, others, { value: value, onChange: handleUpdate, input: _jsx(OutlinedInput, { disabled: cantEdit, name: label, label: label + (required ? ' *' : ''), classes: outlinedInputClasses }, void 0) }, { children: children }), void 0), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText }), void 0))] }), void 0));
169
164
  }
170
165
  /**
171
166
  * Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
@@ -59,10 +59,14 @@ var useTextfieldStyles = function (props) {
59
59
  '& label': {
60
60
  marginTop: props.multiline ? '0px' : '-4px',
61
61
  fontSize: props.fontSize,
62
+ whiteSpace: 'nowrap',
63
+ overflow: 'hidden',
64
+ textOverflow: 'ellipsis',
65
+ maxWidth: 'calc(100% - 22px)',
62
66
  },
63
67
  '& label.EF-MuiInputLabel-shrink': {
64
- fontSize: props.shrunkenFontSize,
65
68
  marginTop: '0px',
69
+ maxWidth: 'calc(100% - 5px)',
66
70
  },
67
71
  '& input + fieldset': {
68
72
  borderRadius: props.borderRadius,
@@ -78,11 +82,6 @@ var useTextfieldStyles = function (props) {
78
82
  },
79
83
  '& .EF-MuiOutlinedInput-notchedOutline': {
80
84
  borderColor: props.outlineColor,
81
- '& span': {
82
- fontSize: props.shrunkenFontSize,
83
- paddingRight: 0,
84
- paddingLeft: 0,
85
- },
86
85
  },
87
86
  },
88
87
  '& .EF-MuiOutlinedInput-root:hover .EF-MuiOutlinedInput-notchedOutline': {
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": "0.2.42",
4
+ "version":"0.2.43-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",