@proveanything/smartlinks-utils-ui 1.13.16 → 1.13.19
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/{chunk-5NKKNCFT.js → chunk-2LIV5MSN.js} +13 -4
- package/dist/chunk-2LIV5MSN.js.map +1 -0
- package/dist/components/AssetPicker/index.js +1 -1
- package/dist/components/FacetRuleEditor/index.d.ts +2 -2
- package/dist/components/RecordsAdmin/index.d.ts +2 -2
- package/dist/components/RecordsAdmin/index.js +56 -1
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5NKKNCFT.js.map +0 -1
|
@@ -19,17 +19,26 @@ var ASSET_MIME_FILTERS = [
|
|
|
19
19
|
// src/components/AssetPicker/errors.ts
|
|
20
20
|
function friendlyAssetError(err, fallback) {
|
|
21
21
|
if (!err) return fallback;
|
|
22
|
+
const details = err.details;
|
|
23
|
+
if (details && typeof details === "object") {
|
|
24
|
+
if (typeof details.errorText === "string" && details.errorText.trim()) {
|
|
25
|
+
return details.errorText.trim();
|
|
26
|
+
}
|
|
27
|
+
if (typeof details.message === "string" && details.message.trim()) {
|
|
28
|
+
return details.message.trim();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
const resp = err.errorResponse;
|
|
23
32
|
if (resp) {
|
|
24
33
|
const detailText = resp.details?.errorText;
|
|
25
34
|
if (typeof detailText === "string" && detailText.trim()) return detailText.trim();
|
|
26
35
|
if (typeof resp.message === "string" && resp.message.trim()) return resp.message.trim();
|
|
36
|
+
if (typeof resp.errorText === "string" && resp.errorText.trim()) return resp.errorText.trim();
|
|
27
37
|
}
|
|
28
38
|
if (typeof err.errorText === "string" && err.errorText.trim()) return err.errorText.trim();
|
|
29
39
|
const raw = typeof err.message === "string" ? err.message : String(err);
|
|
30
40
|
const stripped = raw.replace(/^Error\s+\d+:\s*/i, "").trim();
|
|
31
|
-
|
|
32
|
-
return fallback;
|
|
41
|
+
return stripped || fallback;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
// src/components/AssetPicker/useAssets.ts
|
|
@@ -4155,5 +4164,5 @@ var AssetPicker = (props) => {
|
|
|
4155
4164
|
assertStylesLoaded();
|
|
4156
4165
|
|
|
4157
4166
|
export { ASSET_MIME_FILTERS, AssetPicker, useAppRegistry, useAssets };
|
|
4158
|
-
//# sourceMappingURL=chunk-
|
|
4159
|
-
//# sourceMappingURL=chunk-
|
|
4167
|
+
//# sourceMappingURL=chunk-2LIV5MSN.js.map
|
|
4168
|
+
//# sourceMappingURL=chunk-2LIV5MSN.js.map
|