@arquimedes.co/eureka-forms 0.2.36 → 0.2.38
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 +13 -9
- package/dist/App.module.css +8 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +2 -2
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +1 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +9 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +1 -1
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +1 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +10 -0
- package/dist/controllers/FileService.js +1 -1
- package/package.json +2 -2
package/dist/App.js
CHANGED
|
@@ -74,12 +74,12 @@ 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:
|
|
81
81
|
if (!domain) return [3 /*break*/, 2];
|
|
82
|
-
return [4 /*yield*/, axios.get("https://"
|
|
82
|
+
return [4 /*yield*/, axios.get("https://".concat(domain, ".forms.").concat(process.env.REACT_APP_DOMAIN, "/api/organization?domain=").concat(domain))];
|
|
83
83
|
case 1:
|
|
84
84
|
_a = _b.sent();
|
|
85
85
|
return [3 /*break*/, 4];
|
|
@@ -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*/];
|
|
@@ -105,11 +108,10 @@ function App(_a) {
|
|
|
105
108
|
var response;
|
|
106
109
|
return __generator(this, function (_a) {
|
|
107
110
|
switch (_a.label) {
|
|
108
|
-
case 0: return [4 /*yield*/, axios.get("https://"
|
|
111
|
+
case 0: return [4 /*yield*/, axios.get("https://".concat(domain, ".forms.").concat(process.env.REACT_APP_DOMAIN, "/api/organization"))];
|
|
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
|
}
|
|
@@ -120,7 +122,6 @@ function App(_a) {
|
|
|
120
122
|
}
|
|
121
123
|
useEffect(function () {
|
|
122
124
|
if (formData !== undefined) {
|
|
123
|
-
console.log('!');
|
|
124
125
|
if (preview && formData.isStandAlone) {
|
|
125
126
|
fetchPreview(formData);
|
|
126
127
|
}
|
|
@@ -141,6 +142,7 @@ function App(_a) {
|
|
|
141
142
|
loadInfo(apiKey, domain);
|
|
142
143
|
}
|
|
143
144
|
else {
|
|
145
|
+
console.log('ERROREMBED');
|
|
144
146
|
//Error in embed
|
|
145
147
|
setForm(null);
|
|
146
148
|
setOrganizationInfo(null);
|
|
@@ -153,9 +155,9 @@ function App(_a) {
|
|
|
153
155
|
switch (_b.label) {
|
|
154
156
|
case 0:
|
|
155
157
|
_b.trys.push([0, 2, , 3]);
|
|
156
|
-
url = "https://"
|
|
158
|
+
url = "https://".concat(domain, ".forms.").concat(process.env.REACT_APP_DOMAIN, "/api/form/").concat(apiKey, "?domain=").concat(domain);
|
|
157
159
|
return [4 /*yield*/, Promise.all([
|
|
158
|
-
domain ? axios.get(url) : axiosInstance.get("/form/"
|
|
160
|
+
domain ? axios.get(url) : axiosInstance.get("/form/".concat(apiKey)),
|
|
159
161
|
fetchOrgData(domain),
|
|
160
162
|
])];
|
|
161
163
|
case 1:
|
|
@@ -191,7 +193,9 @@ function App(_a) {
|
|
|
191
193
|
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50 }, void 0) }), void 0));
|
|
192
194
|
}
|
|
193
195
|
else if (form === null) {
|
|
196
|
+
console.log('FORM IS NULL');
|
|
194
197
|
if (organizationInfo === null) {
|
|
198
|
+
console.log('ORG IS NULL');
|
|
195
199
|
if (isWidget) {
|
|
196
200
|
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "Error" }), void 0) }), void 0));
|
|
197
201
|
}
|
package/dist/App.module.css
CHANGED
|
@@ -114,7 +114,7 @@ function ColumnForm(_a) {
|
|
|
114
114
|
updateValue(idStep, values, form, customSteps);
|
|
115
115
|
}
|
|
116
116
|
console.log('UPDATED:', values);
|
|
117
|
-
url = "https://"
|
|
117
|
+
url = "https://".concat(domain, ".forms.").concat(process.env.REACT_APP_DOMAIN, "/api/ticket?apiKey=").concat(internal ? form.apiKey : apiKey, "&domain=").concat(domain);
|
|
118
118
|
payload = {
|
|
119
119
|
formValues: { steps: values },
|
|
120
120
|
};
|
|
@@ -123,7 +123,7 @@ function ColumnForm(_a) {
|
|
|
123
123
|
case 3:
|
|
124
124
|
_b = _c.sent();
|
|
125
125
|
return [3 /*break*/, 6];
|
|
126
|
-
case 4: return [4 /*yield*/, axiosInstance.post("ticket?apiKey="
|
|
126
|
+
case 4: return [4 /*yield*/, axiosInstance.post("ticket?apiKey=".concat(internal ? form.apiKey : apiKey), payload)];
|
|
127
127
|
case 5:
|
|
128
128
|
_b = _c.sent();
|
|
129
129
|
_c.label = 6;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -48,7 +48,7 @@ export function getUploadUrls(files, domain) {
|
|
|
48
48
|
extension: file.name.split('.').pop(),
|
|
49
49
|
}); });
|
|
50
50
|
if (!domain) return [3 /*break*/, 2];
|
|
51
|
-
return [4 /*yield*/, axios.post("https://"
|
|
51
|
+
return [4 /*yield*/, axios.post("https://".concat(domain, ".forms.").concat(process.env.REACT_APP_DOMAIN, "/api/uploadfile"), {
|
|
52
52
|
domain: domain,
|
|
53
53
|
files: filesArray,
|
|
54
54
|
})];
|
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.38",
|
|
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"
|