@crystaldesign/diva-backoffice 26.8.0-beta.50 → 26.8.0-beta.52
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/build/esm/index.js
CHANGED
|
@@ -41573,7 +41573,7 @@ function useUploadModal(_ref) {
|
|
|
41573
41573
|
var onSave = /*#__PURE__*/function () {
|
|
41574
41574
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
41575
41575
|
var _formData$get;
|
|
41576
|
-
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response, _responseData$errors$, _responseData$errors$2, _responseData$errors$3, _responseData$errors$4, responseData, hasPartialErrors, _formRef$current2, errorMessage, errorResponse;
|
|
41576
|
+
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response, _responseData$errors$, _responseData$errors$2, _responseData$errors$3, _responseData$errors$4, responseData, hasPartialErrors, _formRef$current2, errorBody, errorMessage, errorResponse;
|
|
41577
41577
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
41578
41578
|
while (1) switch (_context.prev = _context.next) {
|
|
41579
41579
|
case 0:
|
|
@@ -41647,42 +41647,42 @@ function useUploadModal(_ref) {
|
|
|
41647
41647
|
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.reset();
|
|
41648
41648
|
setCurrentFile(undefined);
|
|
41649
41649
|
}
|
|
41650
|
-
_context.next =
|
|
41650
|
+
_context.next = 36;
|
|
41651
41651
|
break;
|
|
41652
41652
|
case 29:
|
|
41653
|
-
|
|
41654
|
-
|
|
41655
|
-
|
|
41656
|
-
|
|
41657
|
-
case
|
|
41658
|
-
|
|
41659
|
-
errorMessage =
|
|
41660
|
-
|
|
41661
|
-
|
|
41662
|
-
|
|
41663
|
-
|
|
41664
|
-
|
|
41665
|
-
|
|
41666
|
-
|
|
41653
|
+
_context.next = 31;
|
|
41654
|
+
return response.text()["catch"](function () {
|
|
41655
|
+
return '';
|
|
41656
|
+
});
|
|
41657
|
+
case 31:
|
|
41658
|
+
errorBody = _context.sent;
|
|
41659
|
+
errorMessage = errorBody || response.statusText || t('backoffice.idmEnricher.import.uploadfailed');
|
|
41660
|
+
try {
|
|
41661
|
+
// The body is either a JSON object ({ error } / { message }) or a bare JSON string (e.g. XSD validation errors)
|
|
41662
|
+
errorResponse = JSON.parse(errorBody);
|
|
41663
|
+
errorMessage = (typeof errorResponse === 'string' ? errorResponse : errorResponse.error || errorResponse.message) || errorMessage;
|
|
41664
|
+
} catch (_unused) {
|
|
41665
|
+
// Not JSON — keep the plain-text body / statusText fallback
|
|
41666
|
+
}
|
|
41667
41667
|
setError(errorMessage);
|
|
41668
41668
|
setProgress(0);
|
|
41669
|
-
case
|
|
41670
|
-
_context.next =
|
|
41669
|
+
case 36:
|
|
41670
|
+
_context.next = 42;
|
|
41671
41671
|
break;
|
|
41672
|
-
case
|
|
41673
|
-
_context.prev =
|
|
41674
|
-
_context.
|
|
41675
|
-
setError(_context.
|
|
41672
|
+
case 38:
|
|
41673
|
+
_context.prev = 38;
|
|
41674
|
+
_context.t0 = _context["catch"](13);
|
|
41675
|
+
setError(_context.t0 instanceof Error ? _context.t0.message : t('backoffice.idmEnricher.import.uploadfailed'));
|
|
41676
41676
|
setProgress(0);
|
|
41677
|
-
case
|
|
41678
|
-
_context.prev =
|
|
41677
|
+
case 42:
|
|
41678
|
+
_context.prev = 42;
|
|
41679
41679
|
setLoading(false);
|
|
41680
|
-
return _context.finish(
|
|
41681
|
-
case
|
|
41680
|
+
return _context.finish(42);
|
|
41681
|
+
case 45:
|
|
41682
41682
|
case "end":
|
|
41683
41683
|
return _context.stop();
|
|
41684
41684
|
}
|
|
41685
|
-
}, _callee, null, [[13,
|
|
41685
|
+
}, _callee, null, [[13, 38, 42, 45]]);
|
|
41686
41686
|
}));
|
|
41687
41687
|
return function onSave(_x) {
|
|
41688
41688
|
return _ref2.apply(this, arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUploadState.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/CommonComponents/UploadModal/useUploadState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,UAAU,EACV,OAAO,GACR,EAAE,oBAAoB;;;;qBAmCS,GAAG;;;;
|
|
1
|
+
{"version":3,"file":"useUploadState.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/CommonComponents/UploadModal/useUploadState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,UAAU,EACV,OAAO,GACR,EAAE,oBAAoB;;;;qBAmCS,GAAG;;;;EA6FlC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.8.0-beta.
|
|
3
|
+
"version": "26.8.0-beta.52",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons": "6.1.0",
|
|
17
17
|
"@babel/runtime": "7.24.7",
|
|
18
|
-
"@crystaldesign/content-box": "26.8.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "26.8.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "26.8.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.8.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "26.8.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.8.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.8.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "26.8.0-beta.52",
|
|
19
|
+
"@crystaldesign/content-item": "26.8.0-beta.52",
|
|
20
|
+
"@crystaldesign/diva-core": "26.8.0-beta.52",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.8.0-beta.52",
|
|
22
|
+
"@crystaldesign/media-upload": "26.8.0-beta.52",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.8.0-beta.52",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.8.0-beta.52",
|
|
25
25
|
"@dnd-kit/core": "^6.1.0",
|
|
26
26
|
"@dnd-kit/sortable": "^8.0.0",
|
|
27
27
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"module": "build/esm/index.js",
|
|
58
58
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "f15827643dbe8dba5200bc793649ad76e89addc8"
|
|
60
60
|
}
|