code7-leia 0.2.5 → 0.2.7
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/code7-leia.cjs.development.js +10 -9
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +10 -9
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/components/CustomToast/index.d.ts +4 -4
- package/dist/components/CustomToast/styles.d.ts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/FileArea/index.tsx +1 -1
- package/src/store/modules/sagas.ts +15 -7
package/dist/code7-leia.esm.js
CHANGED
|
@@ -1534,7 +1534,7 @@ var FileArea = function FileArea() {
|
|
|
1534
1534
|
setModal(!modal);
|
|
1535
1535
|
};
|
|
1536
1536
|
var handleOpenModalDelete = function handleOpenModalDelete(name) {
|
|
1537
|
-
setFileDelete(name
|
|
1537
|
+
setFileDelete(name);
|
|
1538
1538
|
setModalDelete(!modalDelete);
|
|
1539
1539
|
};
|
|
1540
1540
|
var handleOpenModalTraining = function handleOpenModalTraining(tags) {
|
|
@@ -2183,7 +2183,7 @@ function testSaga(action) {
|
|
|
2183
2183
|
}, _marked3, null, [[0, 12, 15, 19]]);
|
|
2184
2184
|
}
|
|
2185
2185
|
function uploadFilesSaga(action) {
|
|
2186
|
-
var t, _action$payload4, id, file, pressets, token,
|
|
2186
|
+
var t, _action$payload4, id, file, pressets, token, blob, formData, queryParams, url, _yield$call4, data;
|
|
2187
2187
|
return _regeneratorRuntime().wrap(function uploadFilesSaga$(_context4) {
|
|
2188
2188
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2189
2189
|
case 0:
|
|
@@ -2193,15 +2193,15 @@ function uploadFilesSaga(action) {
|
|
|
2193
2193
|
return put(commonLoadingStart());
|
|
2194
2194
|
case 4:
|
|
2195
2195
|
_action$payload4 = action.payload, id = _action$payload4.id, file = _action$payload4.file, pressets = _action$payload4.pressets, token = _action$payload4.token;
|
|
2196
|
-
tags = pressets.join(',');
|
|
2197
2196
|
blob = new Blob([file.content]);
|
|
2198
2197
|
formData = new FormData();
|
|
2199
2198
|
formData.append('file', blob, file.properties.path);
|
|
2200
|
-
queryParams = new URLSearchParams({
|
|
2201
|
-
tags:
|
|
2202
|
-
}).toString();
|
|
2199
|
+
queryParams = pressets.length ? new URLSearchParams({
|
|
2200
|
+
tags: pressets.join(',')
|
|
2201
|
+
}).toString() : '';
|
|
2202
|
+
url = queryParams ? "/upload/" + id + "?token=" + token + "&" + queryParams : "/upload/" + id + "?token=" + token;
|
|
2203
2203
|
_context4.next = 12;
|
|
2204
|
-
return call(api.post,
|
|
2204
|
+
return call(api.post, url, formData, {
|
|
2205
2205
|
headers: {
|
|
2206
2206
|
'Content-Type': 'multipart/form-data'
|
|
2207
2207
|
}
|
|
@@ -2255,8 +2255,9 @@ function TrainingSaga(action) {
|
|
|
2255
2255
|
tag: tag
|
|
2256
2256
|
}).toString();
|
|
2257
2257
|
_context5.next = 9;
|
|
2258
|
-
return call(api.post, pressets.length > 0 ? "/training?
|
|
2259
|
-
files_directory: id
|
|
2258
|
+
return call(api.post, pressets.length > 0 ? "/training?" + queryParams : "/training", {
|
|
2259
|
+
files_directory: id,
|
|
2260
|
+
token: token
|
|
2260
2261
|
});
|
|
2261
2262
|
case 9:
|
|
2262
2263
|
_context5.next = 11;
|