@arquimedes.co/eureka-forms 1.1.8-test → 1.2.0-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/@Types/@Types.d.ts +1 -0
- package/dist/@Types/index.d.ts +1 -0
- package/dist/@Types/index.js +1 -0
- package/dist/App.js +43 -24
- package/dist/AxiosWidget.js +1 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +3 -3
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +1 -1
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +1 -2
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +1 -2
- 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/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +1 -1
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +1 -1
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +2 -2
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +1 -1
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +1 -1
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +1 -1
- package/dist/controllers/FileService.js +1 -1
- package/package.json +15 -12
package/dist/@Types/@Types.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './@Types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './@Types';
|
package/dist/App.js
CHANGED
|
@@ -65,7 +65,6 @@ 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';
|
|
69
68
|
function App(_a) {
|
|
70
69
|
var _this = this;
|
|
71
70
|
var _b, _c, _d, _e;
|
|
@@ -120,31 +119,51 @@ function App(_a) {
|
|
|
120
119
|
setOrganizationInfo(null);
|
|
121
120
|
}
|
|
122
121
|
}, []);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
122
|
+
var loadLogRocket = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
123
|
+
var LogRocket, error_1;
|
|
124
|
+
return __generator(this, function (_a) {
|
|
125
|
+
switch (_a.label) {
|
|
126
|
+
case 0:
|
|
127
|
+
if (!(organizationInfo && form !== undefined)) return [3 /*break*/, 4];
|
|
128
|
+
if (!(process.env.NODE_ENV === 'production' &&
|
|
129
|
+
apiKey !== 'rCgWiEfOSN1TlUmHO28Y0' &&
|
|
130
|
+
apiKey !== 'X4aMB86AHeg4qRs4CH4o8' &&
|
|
131
|
+
!internal &&
|
|
132
|
+
!postview &&
|
|
133
|
+
!preview)) return [3 /*break*/, 4];
|
|
134
|
+
_a.label = 1;
|
|
135
|
+
case 1:
|
|
136
|
+
_a.trys.push([1, 3, , 4]);
|
|
137
|
+
return [4 /*yield*/, import('logrocket')];
|
|
138
|
+
case 2:
|
|
139
|
+
LogRocket = _a.sent();
|
|
140
|
+
LogRocket.default.init('63mg8a/forms-uv0gd');
|
|
141
|
+
LogRocket.default.identify(organizationInfo.idOrganization + '/' + apiKey, {
|
|
142
|
+
name: organizationInfo.name +
|
|
143
|
+
'/' +
|
|
144
|
+
(form ? form === null || form === void 0 ? void 0 : form.name : '404'),
|
|
145
|
+
});
|
|
146
|
+
return [3 /*break*/, 4];
|
|
147
|
+
case 3:
|
|
148
|
+
error_1 = _a.sent();
|
|
149
|
+
console.error('LogRocker Error', error_1);
|
|
150
|
+
return [3 /*break*/, 4];
|
|
151
|
+
case 4: return [2 /*return*/];
|
|
136
152
|
}
|
|
137
|
-
}
|
|
153
|
+
});
|
|
154
|
+
}); };
|
|
155
|
+
useEffect(function () {
|
|
156
|
+
loadLogRocket();
|
|
138
157
|
}, [organizationInfo, form]);
|
|
139
158
|
var containerRef = useRef();
|
|
140
159
|
var loadOrgInfo = function (domain) { return __awaiter(_this, void 0, void 0, function () {
|
|
141
|
-
var response, _a,
|
|
160
|
+
var response, _a, error_2;
|
|
142
161
|
return __generator(this, function (_b) {
|
|
143
162
|
switch (_b.label) {
|
|
144
163
|
case 0:
|
|
145
164
|
_b.trys.push([0, 5, , 6]);
|
|
146
165
|
if (!domain) return [3 /*break*/, 2];
|
|
147
|
-
return [4 /*yield*/, widgetInstance.get("/organization?idOrganization="
|
|
166
|
+
return [4 /*yield*/, widgetInstance.get("/organization?idOrganization=" + domain)];
|
|
148
167
|
case 1:
|
|
149
168
|
_a = _b.sent();
|
|
150
169
|
return [3 /*break*/, 4];
|
|
@@ -172,8 +191,8 @@ function App(_a) {
|
|
|
172
191
|
}
|
|
173
192
|
return [3 /*break*/, 6];
|
|
174
193
|
case 5:
|
|
175
|
-
|
|
176
|
-
console.error(
|
|
194
|
+
error_2 = _b.sent();
|
|
195
|
+
console.error(error_2);
|
|
177
196
|
setOrganizationInfo(null);
|
|
178
197
|
return [3 /*break*/, 6];
|
|
179
198
|
case 6: return [2 /*return*/];
|
|
@@ -181,14 +200,14 @@ function App(_a) {
|
|
|
181
200
|
});
|
|
182
201
|
}); };
|
|
183
202
|
var loadInfo = function (apiKey, domain) { return __awaiter(_this, void 0, void 0, function () {
|
|
184
|
-
var response,
|
|
203
|
+
var response, error_3;
|
|
185
204
|
return __generator(this, function (_a) {
|
|
186
205
|
switch (_a.label) {
|
|
187
206
|
case 0:
|
|
188
207
|
_a.trys.push([0, 2, , 3]);
|
|
189
208
|
return [4 /*yield*/, (domain
|
|
190
|
-
? widgetInstance.get("/form/"
|
|
191
|
-
: axiosInstance.get("/form/"
|
|
209
|
+
? widgetInstance.get("/form/" + apiKey + "?idOrganization=" + domain)
|
|
210
|
+
: axiosInstance.get("/form/" + apiKey))];
|
|
192
211
|
case 1:
|
|
193
212
|
response = _a.sent();
|
|
194
213
|
if (response) {
|
|
@@ -199,8 +218,8 @@ function App(_a) {
|
|
|
199
218
|
}
|
|
200
219
|
return [3 /*break*/, 3];
|
|
201
220
|
case 2:
|
|
202
|
-
|
|
203
|
-
console.error(
|
|
221
|
+
error_3 = _a.sent();
|
|
222
|
+
console.error(error_3);
|
|
204
223
|
setForm(null);
|
|
205
224
|
return [3 /*break*/, 3];
|
|
206
225
|
case 3: return [2 /*return*/];
|
package/dist/AxiosWidget.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
var headers = {};
|
|
3
3
|
var widgetInstance = axios.create({
|
|
4
|
-
baseURL: "https://api.forms."
|
|
4
|
+
baseURL: "https://api.forms." + process.env.REACT_APP_DOMAIN + "/api",
|
|
5
5
|
timeout: 30000,
|
|
6
6
|
headers: headers,
|
|
7
7
|
});
|
|
@@ -119,9 +119,9 @@ function ColumnForm(_a) {
|
|
|
119
119
|
payload = {
|
|
120
120
|
formValues: { steps: values },
|
|
121
121
|
};
|
|
122
|
-
url = "/ticket/"
|
|
122
|
+
url = "/ticket/" + (internal ? form.apiKey : apiKey);
|
|
123
123
|
if (!(domain || internal)) return [3 /*break*/, 4];
|
|
124
|
-
return [4 /*yield*/, widgetInstance.post(
|
|
124
|
+
return [4 /*yield*/, widgetInstance.post(url + "?idOrganization=" + domain, payload)];
|
|
125
125
|
case 3:
|
|
126
126
|
_b = _c.sent();
|
|
127
127
|
return [3 /*break*/, 6];
|
|
@@ -148,7 +148,7 @@ function ColumnForm(_a) {
|
|
|
148
148
|
setShowConfirmation(undefined);
|
|
149
149
|
} }, void 0)), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps }, others), index)); }), form.terms &&
|
|
150
150
|
!internal &&
|
|
151
|
-
form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }), !postview && (_jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "
|
|
151
|
+
form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }), !postview && (_jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "form__submit", className: styles.submitBtn, onClick: function () {
|
|
152
152
|
onSubmit();
|
|
153
153
|
}, style: {
|
|
154
154
|
background: formStyle.primaryColor,
|
|
@@ -24,7 +24,7 @@ function ConfirmationDialog(_a) {
|
|
|
24
24
|
},
|
|
25
25
|
}, open: true }, { children: _jsxs("div", __assign({ className: styles.confirmationContainer, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
|
|
26
26
|
onClose();
|
|
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 () {
|
|
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, "data-testid": "ResUrl", onClick: function () {
|
|
28
28
|
var _a, _b, _c;
|
|
29
29
|
(_c = (_b = (_a = window
|
|
30
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);
|
|
@@ -20,7 +20,6 @@ function CheckBoxStep(_a) {
|
|
|
20
20
|
width: widthStats.currentBreakPoint <= step.size
|
|
21
21
|
? '100%'
|
|
22
22
|
: calcStepWidth(step.size, form),
|
|
23
|
-
maxWidth: '100%',
|
|
24
23
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
25
24
|
} }, { 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: {
|
|
26
25
|
required: step.required
|
|
@@ -28,7 +27,7 @@ function CheckBoxStep(_a) {
|
|
|
28
27
|
: undefined,
|
|
29
28
|
}, shouldUnregister: true, render: function (_a) {
|
|
30
29
|
var field = _a.field;
|
|
31
|
-
return (_jsx(RoundedCheckBox, __assign({}, field, { inputRef: field.ref, padding: "0px", size: "1.6rem", cantEdit: postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: field.value }), void 0));
|
|
30
|
+
return (_jsx(RoundedCheckBox, __assign({}, field, { "data-testid": step.id, inputRef: field.ref, padding: "0px", size: "1.6rem", cantEdit: postview, checkedColor: formStyle.primaryColor, uncheckedColor: formStyle.outlineColor, checked: field.value }), void 0));
|
|
32
31
|
} }, void 0)] }), void 0), (step.description || !!errors[step.id]) && (_jsx("div", __assign({ className: styles.descriptionPar, style: {
|
|
33
32
|
color: !!errors[step.id]
|
|
34
33
|
? formStyle.errorColor
|
|
@@ -51,12 +51,11 @@ function ClassifierSelector(_a) {
|
|
|
51
51
|
width: widthStats.currentBreakPoint <= step.size
|
|
52
52
|
? '100%'
|
|
53
53
|
: calcStepWidth(step.size, form),
|
|
54
|
-
maxWidth: '100%',
|
|
55
54
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
56
55
|
} }, { 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) {
|
|
57
56
|
onChange(event.target.value);
|
|
58
57
|
sizeChange();
|
|
59
|
-
}, inputRef: inputRef, helperText: errors[step.id]
|
|
58
|
+
}, "data-testid": step.id, inputRef: inputRef, helperText: errors[step.id]
|
|
60
59
|
? errors[step.id].message
|
|
61
60
|
: step.description, error: !!errors[step.id] }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: "Sin Seleccionar" }, void 0) }), 'EMPTY'), classifier.children
|
|
62
61
|
.filter(function (classifier) {
|
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, 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]
|
|
30
|
+
return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, showIcon: step.showIcon, inputRef: field.ref, cantEdit: postview, "data-testid": step.id, 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));
|
package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js
CHANGED
|
@@ -190,7 +190,7 @@ function FileUploadStep(_a) {
|
|
|
190
190
|
}
|
|
191
191
|
return '';
|
|
192
192
|
};
|
|
193
|
-
return (_jsxs("div", __assign({ className: styles.container }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label }), void 0), step.description && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: { color: formStyle.descriptionTextColor } }, { children: step.description }), void 0)), _jsx("input", { type: "file", ref: inputRef, className: styles.filesInput, onChange: function (e) {
|
|
193
|
+
return (_jsxs("div", __assign({ className: styles.container, "data-testid": step.id }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label }), void 0), step.description && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: { color: formStyle.descriptionTextColor } }, { children: step.description }), void 0)), _jsx("input", { type: "file", ref: inputRef, className: styles.filesInput, onChange: function (e) {
|
|
194
194
|
var files = e.target.files;
|
|
195
195
|
if (files) {
|
|
196
196
|
var filesArray = Array.from(files);
|
|
@@ -45,7 +45,7 @@ function Selector(_a) {
|
|
|
45
45
|
? '100%'
|
|
46
46
|
: calcStepWidth(step.size, form),
|
|
47
47
|
minHeight: step.description || step.required ? '55px' : '43px',
|
|
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) {
|
|
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, "data-testid": step.id, required: step.required, containerMargin: "0px", height: '31px', onBlur: onBlur, handleUpdate: function (event) {
|
|
49
49
|
onChange(event.target.value);
|
|
50
50
|
sizeChange();
|
|
51
51
|
}, helperText: errors[step.id]
|
|
@@ -95,7 +95,7 @@ function TextAreaStep(_a) {
|
|
|
95
95
|
}
|
|
96
96
|
return (_jsx(Editor, { editorRef: field.ref, onFocus: function () {
|
|
97
97
|
setFocus(true);
|
|
98
|
-
}, readOnly: postview, onBlur: field.onBlur, stripPastedStyles: true, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar +
|
|
98
|
+
}, "data-testid": step.id, readOnly: postview, onBlur: field.onBlur, stripPastedStyles: true, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar +
|
|
99
99
|
(postview
|
|
100
100
|
? ' postview-editor-toolbar'
|
|
101
101
|
: ''), editorClassName: editorClassName, wrapperClassName: styles.wrapper, placeholder: (_b = step.description) !== null && _b !== void 0 ? _b : '', toolbar: {
|
|
@@ -129,7 +129,7 @@ function TextAreaStep(_a) {
|
|
|
129
129
|
: undefined,
|
|
130
130
|
}, shouldUnregister: true, render: function (_a) {
|
|
131
131
|
var field = _a.field;
|
|
132
|
-
return (_jsx(RoundedTextField, __assign({}, field, { label: step.label, inputRef: field.ref, required: step.required, cantEdit: postview, fontWeight: 400, multiline: true, minRows: 4, maxRows: 6, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: errors[step.id]
|
|
132
|
+
return (_jsx(RoundedTextField, __assign({}, field, { "data-testid": step.id, label: step.label, inputRef: field.ref, required: step.required, cantEdit: postview, fontWeight: 400, multiline: true, minRows: 4, maxRows: 6, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: errors[step.id]
|
|
133
133
|
? errors[step.id].message
|
|
134
134
|
: step.description, error: !!errors[step.id] }), void 0));
|
|
135
135
|
} }, void 0) }), void 0));
|
package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js
CHANGED
|
@@ -35,7 +35,7 @@ function TextInputStep(_a) {
|
|
|
35
35
|
: undefined,
|
|
36
36
|
}, shouldUnregister: true, render: function (_a) {
|
|
37
37
|
var field = _a.field;
|
|
38
|
-
return (_jsx(RoundedTextField, __assign({}, field, { label: step.label, inputRef: field.ref, cantEdit: postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperText: errors[step.id]
|
|
38
|
+
return (_jsx(RoundedTextField, __assign({}, field, { "data-testid": step.id, label: step.label, inputRef: field.ref, cantEdit: postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperText: errors[step.id]
|
|
39
39
|
? errors[step.id].message
|
|
40
40
|
: step.description, helperTextColor: formStyle.descriptionTextColor, error: !!errors[step.id] }), void 0));
|
|
41
41
|
} }, void 0) }), void 0));
|
|
@@ -49,7 +49,7 @@ export function getUploadUrls(files, domain) {
|
|
|
49
49
|
extension: file.name.split('.').pop(),
|
|
50
50
|
}); });
|
|
51
51
|
if (!domain) return [3 /*break*/, 2];
|
|
52
|
-
return [4 /*yield*/, widgetInstance.post("/uploadfile?idOrganization="
|
|
52
|
+
return [4 /*yield*/, widgetInstance.post("/uploadfile?idOrganization=" + domain, filesArray)];
|
|
53
53
|
case 1:
|
|
54
54
|
response = _b.sent();
|
|
55
55
|
return [3 /*break*/, 4];
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arquimedes.co/eureka-forms",
|
|
3
3
|
"repository": "git://github.com/Arquimede5/Eureka-Forms.git",
|
|
4
|
-
"version":"1.
|
|
4
|
+
"version":"1.2.0-test",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
7
7
|
"build": "react-scripts build",
|
|
8
|
+
"e2e": "percy exec -- cypress run",
|
|
8
9
|
"lint": "eslint 'src/**/*.ts'",
|
|
9
10
|
"tsc-build": "tsc --noEmit false --outDir ./dist"
|
|
10
11
|
},
|
|
@@ -17,11 +18,11 @@
|
|
|
17
18
|
"@testing-library/jest-dom": "^5.14.1",
|
|
18
19
|
"@testing-library/react": "^11.2.7",
|
|
19
20
|
"@testing-library/user-event": "^12.8.3",
|
|
20
|
-
"axios": "^0.21.
|
|
21
|
-
"date-fns": "^2.23.
|
|
22
|
-
"draft-js": "^0.11.
|
|
23
|
-
"react-draft-wysiwyg": "^1.14.
|
|
24
|
-
"react-hook-form": "7.
|
|
21
|
+
"axios": "^0.21.x",
|
|
22
|
+
"date-fns": "^2.23.x",
|
|
23
|
+
"draft-js": "^0.11.x",
|
|
24
|
+
"react-draft-wysiwyg": "^1.14.x",
|
|
25
|
+
"react-hook-form": "^7.6.4",
|
|
25
26
|
"react-router-dom": "^5.2.0",
|
|
26
27
|
"react-scripts": "5.0.0-next.37",
|
|
27
28
|
"typescript": "^4.4.3"
|
|
@@ -46,15 +47,17 @@
|
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@babel/core": "^7.14.6",
|
|
50
|
+
"@percy/cli": "^1.0.0-beta.76",
|
|
51
|
+
"@percy/cypress": "^3.1.1",
|
|
49
52
|
"@types/draft-js": "^0.11.5",
|
|
50
53
|
"@types/jest": "^26.0.24",
|
|
51
|
-
"@types/node": "^12.20.25",
|
|
52
54
|
"@types/react": "^17.0.21",
|
|
53
55
|
"@types/react-dom": "^17.0.9",
|
|
54
56
|
"@types/react-draft-wysiwyg": "^1.13.3",
|
|
55
57
|
"@types/react-router-dom": "^5.1.7",
|
|
56
58
|
"@typescript-eslint/eslint-plugin": "^4.24.0",
|
|
57
59
|
"@typescript-eslint/parser": "^4.24.0",
|
|
60
|
+
"cypress": "^9.5.1",
|
|
58
61
|
"eslint": "^7.27.0",
|
|
59
62
|
"eslint-config-prettier": "^8.3.0",
|
|
60
63
|
"eslint-plugin-prettier": "^3.4.0",
|
|
@@ -65,16 +68,16 @@
|
|
|
65
68
|
"react-dom": "^17.0.2"
|
|
66
69
|
},
|
|
67
70
|
"peerDependencies": {
|
|
68
|
-
"react": "^17.x.x",
|
|
69
|
-
"react-dom": "^17.x.x",
|
|
70
71
|
"axios": "^0.21.x",
|
|
72
|
+
"babel-plugin-add-react-displayname": "0.0.x",
|
|
71
73
|
"date-fns": "^2.23.x",
|
|
72
74
|
"draft-js": "^0.11.x",
|
|
75
|
+
"logrocket": "^2.x.x",
|
|
76
|
+
"react": "^17.x.x",
|
|
77
|
+
"react-dom": "^17.x.x",
|
|
73
78
|
"react-draft-wysiwyg": "^1.14.x",
|
|
74
79
|
"react-hook-form": "^7.6.4",
|
|
75
|
-
"react-router-dom": "^5.2.0"
|
|
76
|
-
"babel-plugin-add-react-displayname": "0.0.x",
|
|
77
|
-
"logrocket": "^2.x.x"
|
|
80
|
+
"react-router-dom": "^5.2.0"
|
|
78
81
|
},
|
|
79
82
|
"publishConfig": {
|
|
80
83
|
"access": "public"
|