@rjsf/utils 5.17.0 → 5.17.1
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/index.js +2 -30
- package/dist/index.js.map +4 -4
- package/dist/utils.esm.js +2 -38
- package/dist/utils.esm.js.map +4 -4
- package/dist/utils.umd.js +2 -38
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +2 -0
- package/package.json +2 -2
- package/src/index.ts +0 -2
- package/src/types.ts +2 -0
- package/lib/base64.d.ts +0 -11
- package/lib/base64.js +0 -36
- package/lib/base64.js.map +0 -1
- package/src/base64.ts +0 -34
package/dist/utils.esm.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined")
|
|
5
|
-
return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
1
|
// src/isObject.ts
|
|
10
2
|
function isObject(thing) {
|
|
11
3
|
if (typeof File !== "undefined" && thing instanceof File) {
|
|
@@ -1735,7 +1727,7 @@ function dataURItoBlob(dataURILike) {
|
|
|
1735
1727
|
if (splitted.length !== 2) {
|
|
1736
1728
|
throw new Error("File is invalid: dataURI must be base64");
|
|
1737
1729
|
}
|
|
1738
|
-
const [media,
|
|
1730
|
+
const [media, base64] = splitted;
|
|
1739
1731
|
const [mime, ...mediaparams] = media.split(";");
|
|
1740
1732
|
const type = mime || "";
|
|
1741
1733
|
const name = decodeURI(
|
|
@@ -1744,7 +1736,7 @@ function dataURItoBlob(dataURILike) {
|
|
|
1744
1736
|
mediaparams.map((param) => param.split("=")).find(([key]) => key === "name")?.[1] || "unknown"
|
|
1745
1737
|
);
|
|
1746
1738
|
try {
|
|
1747
|
-
const binary = atob(
|
|
1739
|
+
const binary = atob(base64);
|
|
1748
1740
|
const array = new Array(binary.length);
|
|
1749
1741
|
for (let i = 0; i < binary.length; i++) {
|
|
1750
1742
|
array[i] = binary.charCodeAt(i);
|
|
@@ -2454,33 +2446,6 @@ function withIdRefPrefix(schemaNode) {
|
|
|
2454
2446
|
return schemaNode;
|
|
2455
2447
|
}
|
|
2456
2448
|
|
|
2457
|
-
// src/base64.ts
|
|
2458
|
-
var base64 = function() {
|
|
2459
|
-
return {
|
|
2460
|
-
encode(text) {
|
|
2461
|
-
let encoder;
|
|
2462
|
-
if (typeof TextEncoder !== "undefined") {
|
|
2463
|
-
encoder = new TextEncoder();
|
|
2464
|
-
} else {
|
|
2465
|
-
const { TextEncoder: TextEncoder2 } = __require("util");
|
|
2466
|
-
encoder = new TextEncoder2();
|
|
2467
|
-
}
|
|
2468
|
-
return btoa(String.fromCharCode(...encoder.encode(text)));
|
|
2469
|
-
},
|
|
2470
|
-
decode(text) {
|
|
2471
|
-
let decoder;
|
|
2472
|
-
if (typeof TextDecoder !== "undefined") {
|
|
2473
|
-
decoder = new TextDecoder();
|
|
2474
|
-
} else {
|
|
2475
|
-
const { TextDecoder: TextDecoder2 } = __require("util");
|
|
2476
|
-
decoder = new TextDecoder2();
|
|
2477
|
-
}
|
|
2478
|
-
return decoder.decode(Uint8Array.from(atob(text), (c) => c.charCodeAt(0)));
|
|
2479
|
-
}
|
|
2480
|
-
};
|
|
2481
|
-
}();
|
|
2482
|
-
var base64_default = base64;
|
|
2483
|
-
|
|
2484
2449
|
// src/enums.ts
|
|
2485
2450
|
var TranslatableString = /* @__PURE__ */ ((TranslatableString2) => {
|
|
2486
2451
|
TranslatableString2["ArrayItemTitle"] = "Item";
|
|
@@ -2664,7 +2629,6 @@ export {
|
|
|
2664
2629
|
allowAdditionalItems,
|
|
2665
2630
|
ariaDescribedByIds,
|
|
2666
2631
|
asNumber,
|
|
2667
|
-
base64_default as base64,
|
|
2668
2632
|
canExpand,
|
|
2669
2633
|
createErrorHandler,
|
|
2670
2634
|
createSchemaUtils,
|