@arquimedes.co/eureka-forms 1.1.5 → 1.1.6-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/App.js +15 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +1 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +1 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +1 -1
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +1 -1
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +1 -1
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +5 -4
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +1 -1
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +1 -1
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +2 -0
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +4 -3
- package/package.json +4 -2
package/dist/App.js
CHANGED
|
@@ -65,6 +65,7 @@ import FormComponent from './FormComponents/Form/Form';
|
|
|
65
65
|
import StepTypes from './constants/FormStepTypes';
|
|
66
66
|
import axiosInstance from './AxiosAPI';
|
|
67
67
|
import widgetInstance from './AxiosWidget';
|
|
68
|
+
import LogRocket from 'logrocket';
|
|
68
69
|
function App(_a) {
|
|
69
70
|
var _this = this;
|
|
70
71
|
var _b, _c, _d, _e;
|
|
@@ -119,6 +120,20 @@ function App(_a) {
|
|
|
119
120
|
setOrganizationInfo(null);
|
|
120
121
|
}
|
|
121
122
|
}, []);
|
|
123
|
+
useEffect(function () {
|
|
124
|
+
if (organizationInfo) {
|
|
125
|
+
if (process.env.NODE_ENV === 'production' &&
|
|
126
|
+
apiKey !== 'rCgWiEfOSN1TlUmHO28Y0' &&
|
|
127
|
+
!internal &&
|
|
128
|
+
!postview &&
|
|
129
|
+
!preview) {
|
|
130
|
+
LogRocket.init('63mg8a/forms-uv0gd');
|
|
131
|
+
LogRocket.identify(organizationInfo.idOrganization + '/' + apiKey, {
|
|
132
|
+
organization: organizationInfo.name,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}, [organizationInfo]);
|
|
122
137
|
var containerRef = useRef();
|
|
123
138
|
var loadOrgInfo = function (domain) { return __awaiter(_this, void 0, void 0, function () {
|
|
124
139
|
var response, _a, error_1;
|
|
@@ -20,6 +20,7 @@ function CheckBoxStep(_a) {
|
|
|
20
20
|
width: widthStats.currentBreakPoint <= step.size
|
|
21
21
|
? '100%'
|
|
22
22
|
: calcStepWidth(step.size, form),
|
|
23
|
+
maxWidth: '100%',
|
|
23
24
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
24
25
|
} }, { children: [_jsxs("div", __assign({ className: styles.labelCheckBoxContainer }, { children: [_jsxs("div", __assign({ className: styles.checkboxLbl }, { children: [step.label, step.required ? ' *' : '', ":"] }), void 0), _jsx(Controller, { name: step.id, control: control, defaultValue: false, rules: {
|
|
25
26
|
required: step.required
|
|
@@ -51,6 +51,7 @@ function ClassifierSelector(_a) {
|
|
|
51
51
|
width: widthStats.currentBreakPoint <= step.size
|
|
52
52
|
? '100%'
|
|
53
53
|
: calcStepWidth(step.size, form),
|
|
54
|
+
maxWidth: '100%',
|
|
54
55
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
55
56
|
} }, { children: _jsxs(RoundedSelect, __assign({ fullWidth: true, value: value, cantEdit: postview, helperTextColor: formStyle.descriptionTextColor, errorColor: formStyle.errorColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, label: step.label ? step.label : classifier.name, required: step.required, containerMargin: "0px", height: '31px', onBlur: onBlur, handleUpdate: function (event) {
|
|
56
57
|
onChange(event.target.value);
|
package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js
CHANGED
|
@@ -27,7 +27,7 @@ function DatePickerStep(_a) {
|
|
|
27
27
|
: undefined,
|
|
28
28
|
}, shouldUnregister: true, render: function (_a) {
|
|
29
29
|
var field = _a.field;
|
|
30
|
-
return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, showIcon: step.showIcon, inputRef: field.ref, cantEdit: postview, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
|
|
30
|
+
return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, showIcon: step.showIcon, inputRef: field.ref, cantEdit: postview, secondaryColor: formStyle.secondaryColor, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
|
|
31
31
|
? errors[step.id].message
|
|
32
32
|
: step.description, error: !!errors[step.id], required: step.required }), void 0));
|
|
33
33
|
} }, void 0) }), void 0));
|
|
@@ -20,9 +20,10 @@ import { convertFromRaw, EditorState } from 'draft-js';
|
|
|
20
20
|
import { useState } from 'react';
|
|
21
21
|
import { ClickAwayListener } from '@material-ui/core';
|
|
22
22
|
function TextAreaStep(_a) {
|
|
23
|
+
var _b;
|
|
23
24
|
var step = _a.step, errors = _a.errors, control = _a.control, postview = _a.postview, formStyle = _a.formStyle, originalValues = _a.originalValues;
|
|
24
|
-
var
|
|
25
|
-
var
|
|
25
|
+
var _c = useState(false), hovering = _c[0], setHovering = _c[1];
|
|
26
|
+
var _d = useState(false), focus = _d[0], setFocus = _d[1];
|
|
26
27
|
var calcStyle = function () {
|
|
27
28
|
if (focus) {
|
|
28
29
|
return {
|
|
@@ -92,7 +93,7 @@ function TextAreaStep(_a) {
|
|
|
92
93
|
}
|
|
93
94
|
return (_jsx(Editor, { editorRef: field.ref, onFocus: function () {
|
|
94
95
|
setFocus(true);
|
|
95
|
-
},
|
|
96
|
+
}, onBlur: field.onBlur, stripPastedStyles: true, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar, editorClassName: editorClassName, wrapperClassName: styles.wrapper, placeholder: (_b = step.description) !== null && _b !== void 0 ? _b : '', toolbar: {
|
|
96
97
|
options: [
|
|
97
98
|
'inline',
|
|
98
99
|
'list',
|
|
@@ -117,7 +118,7 @@ function TextAreaStep(_a) {
|
|
|
117
118
|
else {
|
|
118
119
|
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
119
120
|
paddingBottom: step.description || !!errors[step.id] ? '0px' : '23px',
|
|
120
|
-
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue:
|
|
121
|
+
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: (_b = originalValues[step.id]) !== null && _b !== void 0 ? _b : '', rules: {
|
|
121
122
|
required: step.required
|
|
122
123
|
? 'Este campo es obligatorio'
|
|
123
124
|
: undefined,
|
|
@@ -12,6 +12,8 @@ interface StyleProps {
|
|
|
12
12
|
outlineColor?: string;
|
|
13
13
|
/** The backgroundColor of the input */
|
|
14
14
|
backgroundColor?: string;
|
|
15
|
+
/** The secondary color of the dialog */
|
|
16
|
+
secondaryColor?: string;
|
|
15
17
|
/** The contrastColor of the input */
|
|
16
18
|
contrastColor?: string;
|
|
17
19
|
/** The accent color of the input */
|
|
@@ -176,7 +176,7 @@ var useDatePickerDialogStyles = function (props) {
|
|
|
176
176
|
backgroundColor: props.contrastColor,
|
|
177
177
|
},
|
|
178
178
|
'& .EF-MuiPickersClockNumber-clockNumber': {
|
|
179
|
-
color:
|
|
179
|
+
color: props.accentColor,
|
|
180
180
|
},
|
|
181
181
|
'& .EF-MuiPickersClockNumber-clockNumberSelected': {
|
|
182
182
|
color: props.backgroundColor,
|
|
@@ -196,7 +196,7 @@ var useDatePickerDialogStyles = function (props) {
|
|
|
196
196
|
},
|
|
197
197
|
'& .EF-MuiPickersDay-current': {
|
|
198
198
|
color: props.backgroundColor,
|
|
199
|
-
backgroundColor:
|
|
199
|
+
backgroundColor: props.secondaryColor,
|
|
200
200
|
},
|
|
201
201
|
'& .EF-MuiPickersDay-hidden': {
|
|
202
202
|
opacity: 0.4,
|
|
@@ -210,7 +210,7 @@ var useDatePickerDialogStyles = function (props) {
|
|
|
210
210
|
}); });
|
|
211
211
|
};
|
|
212
212
|
function CustomDatePicker(_a) {
|
|
213
|
-
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.
|
|
213
|
+
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.secondaryColor, secondaryColor = _c === void 0 ? '#98c1d9' : _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.contrastColor, contrastColor = _g === void 0 ? '#ee6c4d' : _g, _h = _a.accentColor, accentColor = _h === void 0 ? '#293241' : _h, _j = _a.errorColor, errorColor = _j === void 0 ? '#cc2936' : _j, _k = _a.borderRadius, borderRadius = _k === void 0 ? 10 : _k, _l = _a.padding, padding = _l === void 0 ? '6px 0px 6px 12px' : _l, _m = _a.fontSize, fontSize = _m === void 0 ? '1rem' : _m, _o = _a.shrunkenFontSize, shrunkenFontSize = _o === void 0 ? '1rem' : _o, _p = _a.helperTextColor, helperTextColor = _p === void 0 ? '#989898' : _p, _q = _a.fontWeight, fontWeight = _q === void 0 ? '300' : _q, _r = _a.showIcon, showIcon = _r === void 0 ? true : _r, _s = _a.cantEdit, cantEdit = _s === void 0 ? false : _s, _t = _a.pickTime, pickTime = _t === void 0 ? false : _t, onChange = _a.onChange, required = _a.required, others = __rest(_a, ["focusColor", "secondaryColor", "outlineColor", "backgroundColor", "innerBackgroundColor", "textColor", "contrastColor", "accentColor", "errorColor", "borderRadius", "padding", "fontSize", "shrunkenFontSize", "helperTextColor", "fontWeight", "showIcon", "cantEdit", "pickTime", "onChange", "required"]);
|
|
214
214
|
var classes = useDatePickerStyles({
|
|
215
215
|
padding: padding,
|
|
216
216
|
cantEdit: cantEdit,
|
|
@@ -247,6 +247,7 @@ function CustomDatePicker(_a) {
|
|
|
247
247
|
padding: padding,
|
|
248
248
|
cantEdit: cantEdit,
|
|
249
249
|
textColor: textColor,
|
|
250
|
+
secondaryColor: secondaryColor,
|
|
250
251
|
accentColor: accentColor,
|
|
251
252
|
contrastColor: contrastColor,
|
|
252
253
|
focusColor: focusColor,
|
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":
|
|
4
|
+
"version":"1.1.6-test",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
7
7
|
"build": "react-scripts build",
|
|
@@ -72,7 +72,9 @@
|
|
|
72
72
|
"draft-js": "^0.11.x",
|
|
73
73
|
"react-draft-wysiwyg": "^1.14.x",
|
|
74
74
|
"react-hook-form": "^7.6.4",
|
|
75
|
-
"react-router-dom": "^5.2.0"
|
|
75
|
+
"react-router-dom": "^5.2.0",
|
|
76
|
+
"babel-plugin-add-react-displayname": "0.0.x",
|
|
77
|
+
"logrocket": "^2.x.x"
|
|
76
78
|
},
|
|
77
79
|
"publishConfig": {
|
|
78
80
|
"access": "public"
|