@arquimedes.co/eureka-forms 0.2.40-test → 0.2.42
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 +11 -6
- package/dist/App.module.css +8 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +1 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +10 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +1 -1
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +2 -2
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +1 -1
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +1 -1
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +50 -2
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +17 -2
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +2 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +10 -0
- package/dist/shared/RoundedButton/RoundedButton.js +1 -1
- package/dist/shared/RoundedSelect/RoundedSelect.js +5 -0
- package/package.json +9 -3
package/dist/App.js
CHANGED
|
@@ -74,7 +74,7 @@ function App(_a) {
|
|
|
74
74
|
//
|
|
75
75
|
function fetchOrgData(domain) {
|
|
76
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
-
var response, _a, currentOrg
|
|
77
|
+
var response, _a, currentOrg;
|
|
78
78
|
return __generator(this, function (_b) {
|
|
79
79
|
switch (_b.label) {
|
|
80
80
|
case 0:
|
|
@@ -91,8 +91,11 @@ function App(_a) {
|
|
|
91
91
|
response = _a;
|
|
92
92
|
if (response === null || response === void 0 ? void 0 : response.data) {
|
|
93
93
|
currentOrg = response.data;
|
|
94
|
-
|
|
95
|
-
favicon
|
|
94
|
+
// document.title = currentOrg.name;
|
|
95
|
+
// const favicon: any = document.getElementById('favicon');
|
|
96
|
+
// if (favicon !== undefined) {
|
|
97
|
+
// favicon.href = currentOrg.partialLogoUrl;
|
|
98
|
+
// }
|
|
96
99
|
return [2 /*return*/, currentOrg];
|
|
97
100
|
}
|
|
98
101
|
return [2 /*return*/];
|
|
@@ -109,7 +112,6 @@ function App(_a) {
|
|
|
109
112
|
case 1:
|
|
110
113
|
response = _a.sent();
|
|
111
114
|
if (response.data) {
|
|
112
|
-
console.log('ORGANIZATON', response);
|
|
113
115
|
setOrganizationInfo(response.data);
|
|
114
116
|
setForm(migrateFormData(formData));
|
|
115
117
|
}
|
|
@@ -140,6 +142,7 @@ function App(_a) {
|
|
|
140
142
|
loadInfo(apiKey, domain);
|
|
141
143
|
}
|
|
142
144
|
else {
|
|
145
|
+
console.log('ERROREMBED');
|
|
143
146
|
//Error in embed
|
|
144
147
|
setForm(null);
|
|
145
148
|
setOrganizationInfo(null);
|
|
@@ -185,12 +188,14 @@ function App(_a) {
|
|
|
185
188
|
}); };
|
|
186
189
|
if (form === undefined || organizationInfo === undefined) {
|
|
187
190
|
if (isWidget) {
|
|
188
|
-
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50 }, void 0) }), void 0) }), void 0));
|
|
191
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: 'var(--outlineGrey)' }, void 0) }), void 0) }), void 0));
|
|
189
192
|
}
|
|
190
|
-
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50 }, void 0) }), void 0));
|
|
193
|
+
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: 'var(--outlineGrey)' }, void 0) }), void 0));
|
|
191
194
|
}
|
|
192
195
|
else if (form === null) {
|
|
196
|
+
console.log('FORM IS NULL');
|
|
193
197
|
if (organizationInfo === null) {
|
|
198
|
+
console.log('ORG IS NULL');
|
|
194
199
|
if (isWidget) {
|
|
195
200
|
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "Error" }), void 0) }), void 0));
|
|
196
201
|
}
|
package/dist/App.module.css
CHANGED
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.confirmationContainer,
|
|
11
|
+
.confirmationContainer *,
|
|
12
|
+
.confirmationContainer *::after,
|
|
13
|
+
.confirmationContainer *::before {
|
|
14
|
+
-webkit-box-sizing: content-box;
|
|
15
|
+
-moz-box-sizing: content-box;
|
|
16
|
+
box-sizing: content-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
.checkContainer {
|
|
11
20
|
margin-left: auto;
|
|
12
21
|
margin-right: auto;
|
|
@@ -38,6 +47,7 @@
|
|
|
38
47
|
margin-bottom: 40px;
|
|
39
48
|
cursor: pointer;
|
|
40
49
|
font-size: 1rem;
|
|
50
|
+
overflow: hidden;
|
|
41
51
|
}
|
|
42
52
|
.closeIcon {
|
|
43
53
|
right: 15px;
|
|
@@ -58,13 +58,13 @@ function ClassifierSelector(_a) {
|
|
|
58
58
|
sizeChange();
|
|
59
59
|
}, inputRef: inputRef, helperText: errors[step.id]
|
|
60
60
|
? errors[step.id].message
|
|
61
|
-
: step.description, error: !!errors[step.id] }, { children: [_jsx(MenuItem, __assign({ value: '' }, { children: _jsx("em", { children: "Sin Seleccionar" }, void 0) }), 'EMPTY'), classifier.children
|
|
61
|
+
: 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
62
|
.filter(function (classifier) {
|
|
63
63
|
var _a;
|
|
64
64
|
return ((_a = step.options[classifier._id]) === null || _a === void 0 ? void 0 : _a.type) !==
|
|
65
65
|
ClassifierOptionTypes.HIDE;
|
|
66
66
|
})
|
|
67
|
-
.map(function (classifier) { return (_jsx(MenuItem, __assign({ value: classifier._id }, { children: classifier.name }), classifier._id)); })] }), void 0) }), void 0));
|
|
67
|
+
.map(function (classifier) { return (_jsx(MenuItem, __assign({ value: classifier._id, style: { whiteSpace: 'normal' } }, { children: classifier.name }), classifier._id)); })] }), void 0) }), void 0));
|
|
68
68
|
};
|
|
69
69
|
var mapNestedOption = function () {
|
|
70
70
|
if (value) {
|
|
@@ -51,7 +51,7 @@ function Selector(_a) {
|
|
|
51
51
|
sizeChange();
|
|
52
52
|
}, helperText: errors[step.id]
|
|
53
53
|
? errors[step.id].message
|
|
54
|
-
: step.description, error: !!errors[step.id] }, { children: [_jsx(MenuItem, __assign({ value: '' }, { children: _jsx("em", { children: "Sin Seleccionar" }, void 0) }), 'EMPTY'), step.options.map(function (option) { return (_jsx(MenuItem, __assign({ value: option.value }, { children: option.label }), option.value)); })] }), void 0) }), void 0));
|
|
54
|
+
: step.description, error: !!errors[step.id] }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: "Sin Seleccionar" }, void 0) }), 'EMPTY'), step.options.map(function (option) { return (_jsx(MenuItem, __assign({ value: option.value, style: { whiteSpace: 'normal' } }, { children: option.label }), option.value)); })] }), void 0) }), void 0));
|
|
55
55
|
};
|
|
56
56
|
var mapNestedOption = function () {
|
|
57
57
|
var currentOptionIndex = null;
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
.EF-DraftContainer .rdw-option-wrapper {
|
|
11
11
|
border-radius: 7px;
|
|
12
12
|
border: 1px solid var(--eureka-outline);
|
|
13
|
+
background-color: transparent;
|
|
13
14
|
}
|
|
15
|
+
|
|
14
16
|
.EF-DraftContainer .rdw-option-wrapper:active {
|
|
15
17
|
border: 1px solid var(--eureka-primary);
|
|
16
18
|
}
|
|
@@ -28,15 +30,61 @@
|
|
|
28
30
|
border-radius: 15px 15px 0 0;
|
|
29
31
|
border: none;
|
|
30
32
|
border-bottom: 1px solid var(--eureka-outline);
|
|
33
|
+
background-color: transparent;
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
.EF-DraftContainer .rdw-editor-main {
|
|
34
37
|
cursor: text;
|
|
35
|
-
padding-top:
|
|
36
|
-
padding-bottom:
|
|
38
|
+
padding-top: 12px;
|
|
39
|
+
padding-bottom: 12px;
|
|
37
40
|
margin-right: 0px;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
.EF-DraftContainer .public-DraftStyleDefault-block {
|
|
41
44
|
margin: 0px 0;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.EF-DraftContainer .rdw-image-imagewrapper {
|
|
49
|
+
max-width: 100%;
|
|
50
|
+
/* cursor: pointer; */
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.EF-DraftContainer .rdw-image-alignment-editor {
|
|
55
|
+
padding-right: 10px;
|
|
56
|
+
padding-left: 5px;
|
|
57
|
+
margin-left: -5px;
|
|
58
|
+
}
|
|
59
|
+
.EF-DraftContainer .rdw-editing-image {
|
|
60
|
+
border: 1px solid var(--secondary);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.EF-DraftContainer .DraftEditor-root figure {
|
|
64
|
+
margin: 0px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.EF-DraftContainer .rdw-image-alignment-option {
|
|
68
|
+
font-size: 16px !important;
|
|
69
|
+
width: 20px;
|
|
70
|
+
height: 20px;
|
|
71
|
+
margin-left: 2px;
|
|
72
|
+
border-radius: 2px;
|
|
73
|
+
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
border: 1px solid var(--light-grey);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.EF-DraftContainer .rdw-image-alignment-options-popup {
|
|
81
|
+
width: fit-content;
|
|
82
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Hides empty placeholder */
|
|
86
|
+
.EF-DraftContainer
|
|
87
|
+
.RichEditor-hidePlaceholder
|
|
88
|
+
.public-DraftEditorPlaceholder-root {
|
|
89
|
+
display: none;
|
|
42
90
|
}
|
|
@@ -79,10 +79,25 @@ function TextAreaStep(_a) {
|
|
|
79
79
|
: {}, shouldUnregister: true, render: function (_a) {
|
|
80
80
|
var _b;
|
|
81
81
|
var field = _a.field;
|
|
82
|
+
var editorClassName = styles.editor;
|
|
83
|
+
if (!field.value.getCurrentContent().hasText()) {
|
|
84
|
+
if (field.value
|
|
85
|
+
.getCurrentContent()
|
|
86
|
+
.getBlockMap()
|
|
87
|
+
.first()
|
|
88
|
+
.getType() !== 'unstyled') {
|
|
89
|
+
editorClassName +=
|
|
90
|
+
' RichEditor-hidePlaceholder';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
82
93
|
return (_jsx(Editor, { editorRef: field.ref, onFocus: function () {
|
|
83
94
|
setFocus(true);
|
|
84
|
-
},
|
|
85
|
-
options: [
|
|
95
|
+
}, onBlur: field.onBlur, 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
|
+
options: [
|
|
97
|
+
'inline',
|
|
98
|
+
'list',
|
|
99
|
+
'history',
|
|
100
|
+
],
|
|
86
101
|
inline: {
|
|
87
102
|
options: [
|
|
88
103
|
'bold',
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 900px;
|
|
5
|
+
max-width: 100%;
|
|
5
6
|
margin-bottom: 10px;
|
|
6
7
|
padding: 10px;
|
|
7
8
|
padding-bottom: 0px;
|
|
@@ -32,4 +33,5 @@
|
|
|
32
33
|
-webkit-user-select: none;
|
|
33
34
|
-ms-user-select: none;
|
|
34
35
|
user-select: none;
|
|
36
|
+
margin-bottom: 10px;
|
|
35
37
|
}
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
align-items: center;
|
|
30
30
|
position: relative;
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
.dialogContainer,
|
|
34
|
+
.dialogContainer *,
|
|
35
|
+
.dialogContainer *::after,
|
|
36
|
+
.dialogContainer *::before {
|
|
37
|
+
-webkit-box-sizing: content-box;
|
|
38
|
+
-moz-box-sizing: content-box;
|
|
39
|
+
box-sizing: content-box;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
.closeIcon {
|
|
33
43
|
right: 15px;
|
|
34
44
|
top: 10px;
|
|
@@ -98,9 +98,14 @@ var useLabelInputStyles = function (props) {
|
|
|
98
98
|
color: props.focusColor + ' !important',
|
|
99
99
|
},
|
|
100
100
|
root: {
|
|
101
|
+
whiteSpace: 'nowrap',
|
|
102
|
+
overflow: 'hidden',
|
|
103
|
+
maxWidth: 'calc(100% - 45px)',
|
|
104
|
+
textOverflow: 'ellipsis',
|
|
101
105
|
marginTop: props.height != '40px' ? '-4px' : '0px',
|
|
102
106
|
'&.EF-MuiInputLabel-shrink': {
|
|
103
107
|
marginTop: '0px',
|
|
108
|
+
maxWidth: 'calc(125% - 30px)',
|
|
104
109
|
},
|
|
105
110
|
'& .Mui-error': {
|
|
106
111
|
color: props.errorColor,
|
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.
|
|
4
|
+
"version": "0.2.42",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
7
7
|
"build": "react-scripts build",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"date-fns": "^2.23.0",
|
|
22
22
|
"draft-js": "^0.11.7",
|
|
23
23
|
"react-draft-wysiwyg": "^1.14.7",
|
|
24
|
-
"react-hook-form": "
|
|
24
|
+
"react-hook-form": "7.18.1",
|
|
25
25
|
"react-router-dom": "^5.2.0",
|
|
26
26
|
"react-scripts": "5.0.0-next.37",
|
|
27
27
|
"typescript": "^4.4.3"
|
|
@@ -66,7 +66,13 @@
|
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^17.x.x",
|
|
69
|
-
"react-dom": "^17.x.x"
|
|
69
|
+
"react-dom": "^17.x.x",
|
|
70
|
+
"axios": "^0.21.x",
|
|
71
|
+
"date-fns": "^2.23.x",
|
|
72
|
+
"draft-js": "^0.11.x",
|
|
73
|
+
"react-draft-wysiwyg": "^1.14.x",
|
|
74
|
+
"react-hook-form": "^7.6.4",
|
|
75
|
+
"react-router-dom": "^5.2.0"
|
|
70
76
|
},
|
|
71
77
|
"publishConfig": {
|
|
72
78
|
"access": "public"
|