@arquimedes.co/eureka-forms 2.0.32 → 2.0.35-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/README +1 -1
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +4 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +4 -5
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +1 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +1 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +4 -6
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +1 -0
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +1 -0
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +1 -0
- package/dist/Widget.js +3 -3
- package/package.json +1 -1
package/README
CHANGED
|
@@ -43,7 +43,9 @@ function Collapsible(_a) {
|
|
|
43
43
|
setOpen(true);
|
|
44
44
|
}
|
|
45
45
|
}, (_c = (_b = step.dependencies) === null || _b === void 0 ? void 0 : _b.map(function (dep) { return errors[dep]; })) !== null && _c !== void 0 ? _c : []);
|
|
46
|
-
return (_jsxs(
|
|
46
|
+
return (_jsxs("div", __assign({ style: {
|
|
47
|
+
breakInside: 'avoid',
|
|
48
|
+
} }, { children: [_jsxs("div", __assign({ className: styles.container, style: {
|
|
47
49
|
color: formStyle.textColor,
|
|
48
50
|
borderColor: formStyle.primaryColor,
|
|
49
51
|
} }, { children: [_jsx("div", __assign({ className: styles.collapsibleLabel, onClick: function () {
|
|
@@ -61,7 +63,7 @@ function Collapsible(_a) {
|
|
|
61
63
|
return (_createElement(StepComponent, __assign({}, others, { step: subStep, key: idSubStep })));
|
|
62
64
|
}) })) })), _jsx("div", { className: styles.separator, style: {
|
|
63
65
|
backgroundColor: formStyle.primaryColor,
|
|
64
|
-
} })] }));
|
|
66
|
+
} })] })));
|
|
65
67
|
}
|
|
66
68
|
function CollapsibleStep(props) {
|
|
67
69
|
var _a;
|
|
@@ -208,11 +208,10 @@ function FileUploadStep(_a) {
|
|
|
208
208
|
}
|
|
209
209
|
return '';
|
|
210
210
|
};
|
|
211
|
-
return (_jsxs("div", __assign({ className: styles.container + (error || !!fieldError ? ' EF-error' : ''), style:
|
|
212
|
-
|
|
213
|
-
:
|
|
214
|
-
|
|
215
|
-
}, "data-testid": step.id }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label })), step.description && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: { color: formStyle.descriptionTextColor } }, { children: step.description }))), _jsx("input", { type: "file", ref: inputRef, className: styles.filesInput, onChange: function (e) {
|
|
211
|
+
return (_jsxs("div", __assign({ className: styles.container + (error || !!fieldError ? ' EF-error' : ''), style: {
|
|
212
|
+
breakInside: 'avoid',
|
|
213
|
+
minHeight: editable === false || postview ? undefined : '100px',
|
|
214
|
+
}, "data-testid": step.id }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label })), step.description && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: { color: formStyle.descriptionTextColor } }, { children: step.description }))), _jsx("input", { type: "file", ref: inputRef, className: styles.filesInput, onChange: function (e) {
|
|
216
215
|
var files = e.target.files;
|
|
217
216
|
if (files) {
|
|
218
217
|
var filesArray = Array.from(files);
|
|
@@ -50,6 +50,7 @@ function RatingStep(_a) {
|
|
|
50
50
|
};
|
|
51
51
|
return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: styles.container, style: {
|
|
52
52
|
paddingBottom: step.description || step.required ? 0 : 15,
|
|
53
|
+
breakInside: 'avoid',
|
|
53
54
|
} }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') })), _jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { name: step.id, type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: value, onChange: onChange, inputRef: ref }) })), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
|
|
54
55
|
color: !!error && value === null
|
|
55
56
|
? (_d = formStyle.errorColor) !== null && _d !== void 0 ? _d : '#cc2936'
|
|
@@ -103,6 +103,7 @@ function TextAreaStep(_a) {
|
|
|
103
103
|
editorClassName += ' postview-editor';
|
|
104
104
|
}
|
|
105
105
|
return (_jsxs("div", __assign({ className: styles.textEditorContainer, style: {
|
|
106
|
+
breakInside: 'avoid',
|
|
106
107
|
'--eureka-outline': formStyle.outlineColor,
|
|
107
108
|
'--eureka-primary': formStyle.primaryColor,
|
|
108
109
|
} }, { children: [step.label && (_jsxs("div", __assign({ className: styles.textEditorLabel, style: {
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import RoundedTextField from '../../../Shared/RoundedTextField/RoundedTextField';
|
|
14
14
|
import styles from './MaterialTextAreaStep.module.css';
|
|
15
15
|
import { useAppSelector } from '../../../hooks';
|
|
@@ -26,13 +26,11 @@ function TextAreaStep(_a) {
|
|
|
26
26
|
},
|
|
27
27
|
}), ref = _e.ref, value = _e.value, onChange = _e.onChange, error = _e.error, field = _e.field;
|
|
28
28
|
var canEdit = editable && !postview;
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
30
30
|
paddingBottom: step.required || step.description || !!error
|
|
31
31
|
? '0px'
|
|
32
32
|
: '5px',
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
borderColor: formStyle.outlineColor,
|
|
36
|
-
} }, { children: value }))] })))] })));
|
|
33
|
+
breakInside: 'avoid',
|
|
34
|
+
} }, { children: _jsx("div", __assign({ className: styles.erkTextArea }, { children: _jsx(RoundedTextField, __assign({}, field, { inputRef: ref, value: value, onChange: function (e) { return onChange(e.target.value); }, "data-testid": step.id, maxLength: maxLength, label: step.label, required: step.required, cantEdit: !canEdit, fontWeight: 400, multiline: true, minRows: postview && partial ? undefined : 4, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: (_c = (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : step.description) !== null && _c !== void 0 ? _c : (step.required ? ' ' : null), error: !!error })) })) })));
|
|
37
35
|
}
|
|
38
36
|
export default TextAreaStep;
|
|
@@ -47,6 +47,7 @@ function TextInputStep(_a) {
|
|
|
47
47
|
(!postview && editable && (step.required || validation))
|
|
48
48
|
? '55px'
|
|
49
49
|
: '43px',
|
|
50
|
+
breakInside: 'avoid',
|
|
50
51
|
} }, { children: _jsx(RoundedTextField, __assign({}, field, { inputRef: ref, value: value, onChange: function (e) { return onChange(e.target.value); }, maxLength: maxLength, "data-testid": step.id, label: step.label, cantEdit: !editable || postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.stepBackgroundColor, helperText: (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : step.description, helperTextColor: formStyle.descriptionTextColor, error: !!error, icon: step.showIcon ? icon : undefined })) })));
|
|
51
52
|
}
|
|
52
53
|
export default TextInputStep;
|
|
@@ -33,6 +33,7 @@ function TitleStep(_a) {
|
|
|
33
33
|
width: widthStats.currentBreakPoint <= size
|
|
34
34
|
? '100%'
|
|
35
35
|
: calcStepWidth(size, form.size),
|
|
36
|
+
breakInside: 'avoid',
|
|
36
37
|
} }, { children: [title && (_jsx("div", __assign({ className: styles.titleLbl, style: {
|
|
37
38
|
textAlign: widthStats.isMobile &&
|
|
38
39
|
widthStats.currentBreakPoint <= size
|
|
@@ -21,6 +21,7 @@ function MaterialInputContainer(_a) {
|
|
|
21
21
|
var currentBreakPoint = useAppSelector(selectBreakPoint);
|
|
22
22
|
var postview = useAppSelector(function (state) { return state.global.postview; });
|
|
23
23
|
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
24
|
+
breakInside: 'avoid',
|
|
24
25
|
width: currentBreakPoint <= step.size
|
|
25
26
|
? '100%'
|
|
26
27
|
: calcStepWidth(step.size, form.size),
|
package/dist/Widget.js
CHANGED
|
@@ -9,11 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var _a;
|
|
12
|
+
var _a, _b, _c;
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import ReactDOM from 'react-dom';
|
|
15
15
|
import App from './App/App';
|
|
16
|
-
var WIDGET_ID = 'widget:eureka';
|
|
16
|
+
var WIDGET_ID = (_b = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.getAttribute('data-id')) !== null && _b !== void 0 ? _b : 'widget:eureka';
|
|
17
17
|
var element = document.getElementById(WIDGET_ID);
|
|
18
18
|
var props = {};
|
|
19
19
|
if (element) {
|
|
@@ -23,7 +23,7 @@ if (element) {
|
|
|
23
23
|
if (splitUrl.length > 0) {
|
|
24
24
|
props.apiKey = splitUrl[splitUrl.length - 1];
|
|
25
25
|
}
|
|
26
|
-
var domain = (
|
|
26
|
+
var domain = (_c = /:\/\/([^/]+)/.exec(url)) === null || _c === void 0 ? void 0 : _c[1];
|
|
27
27
|
if (domain) {
|
|
28
28
|
var splitDomain = domain.split('.');
|
|
29
29
|
if (splitDomain.length > 0 && splitDomain[0] !== 'forms') {
|
package/package.json
CHANGED