@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/index.js
CHANGED
|
@@ -61,7 +61,6 @@ __export(src_exports, {
|
|
|
61
61
|
allowAdditionalItems: () => allowAdditionalItems,
|
|
62
62
|
ariaDescribedByIds: () => ariaDescribedByIds,
|
|
63
63
|
asNumber: () => asNumber,
|
|
64
|
-
base64: () => base64_default,
|
|
65
64
|
canExpand: () => canExpand,
|
|
66
65
|
createErrorHandler: () => createErrorHandler,
|
|
67
66
|
createSchemaUtils: () => createSchemaUtils,
|
|
@@ -1863,7 +1862,7 @@ function dataURItoBlob(dataURILike) {
|
|
|
1863
1862
|
if (splitted.length !== 2) {
|
|
1864
1863
|
throw new Error("File is invalid: dataURI must be base64");
|
|
1865
1864
|
}
|
|
1866
|
-
const [media,
|
|
1865
|
+
const [media, base64] = splitted;
|
|
1867
1866
|
const [mime, ...mediaparams] = media.split(";");
|
|
1868
1867
|
const type = mime || "";
|
|
1869
1868
|
const name = decodeURI(
|
|
@@ -1872,7 +1871,7 @@ function dataURItoBlob(dataURILike) {
|
|
|
1872
1871
|
mediaparams.map((param) => param.split("=")).find(([key]) => key === "name")?.[1] || "unknown"
|
|
1873
1872
|
);
|
|
1874
1873
|
try {
|
|
1875
|
-
const binary = atob(
|
|
1874
|
+
const binary = atob(base64);
|
|
1876
1875
|
const array = new Array(binary.length);
|
|
1877
1876
|
for (let i = 0; i < binary.length; i++) {
|
|
1878
1877
|
array[i] = binary.charCodeAt(i);
|
|
@@ -2582,33 +2581,6 @@ function withIdRefPrefix(schemaNode) {
|
|
|
2582
2581
|
return schemaNode;
|
|
2583
2582
|
}
|
|
2584
2583
|
|
|
2585
|
-
// src/base64.ts
|
|
2586
|
-
var base64 = function() {
|
|
2587
|
-
return {
|
|
2588
|
-
encode(text) {
|
|
2589
|
-
let encoder;
|
|
2590
|
-
if (typeof TextEncoder !== "undefined") {
|
|
2591
|
-
encoder = new TextEncoder();
|
|
2592
|
-
} else {
|
|
2593
|
-
const { TextEncoder: TextEncoder2 } = require("util");
|
|
2594
|
-
encoder = new TextEncoder2();
|
|
2595
|
-
}
|
|
2596
|
-
return btoa(String.fromCharCode(...encoder.encode(text)));
|
|
2597
|
-
},
|
|
2598
|
-
decode(text) {
|
|
2599
|
-
let decoder;
|
|
2600
|
-
if (typeof TextDecoder !== "undefined") {
|
|
2601
|
-
decoder = new TextDecoder();
|
|
2602
|
-
} else {
|
|
2603
|
-
const { TextDecoder: TextDecoder2 } = require("util");
|
|
2604
|
-
decoder = new TextDecoder2();
|
|
2605
|
-
}
|
|
2606
|
-
return decoder.decode(Uint8Array.from(atob(text), (c) => c.charCodeAt(0)));
|
|
2607
|
-
}
|
|
2608
|
-
};
|
|
2609
|
-
}();
|
|
2610
|
-
var base64_default = base64;
|
|
2611
|
-
|
|
2612
2584
|
// src/enums.ts
|
|
2613
2585
|
var TranslatableString = /* @__PURE__ */ ((TranslatableString2) => {
|
|
2614
2586
|
TranslatableString2["ArrayItemTitle"] = "Item";
|