@rjsf/utils 5.16.0 → 5.17.0
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 +50 -18
- package/dist/index.js.map +4 -4
- package/dist/utils.esm.js +58 -18
- package/dist/utils.esm.js.map +4 -4
- package/dist/utils.umd.js +58 -18
- package/lib/base64.d.ts +11 -0
- package/lib/base64.js +36 -0
- package/lib/base64.js.map +1 -0
- package/lib/dataURItoBlob.d.ts +1 -7
- package/lib/dataURItoBlob.js +24 -23
- package/lib/dataURItoBlob.js.map +1 -1
- package/lib/enumOptionsValueForIndex.js +4 -1
- package/lib/enumOptionsValueForIndex.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/base64.ts +34 -0
- package/src/dataURItoBlob.ts +26 -23
- package/src/enumOptionsValueForIndex.ts +6 -1
- package/src/index.ts +2 -0
package/dist/utils.umd.js
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@rjsf/utils"] = {}, global.isPlainObject, global.isEqualWith, global.get8, global.isEmpty, global.jsonpointer, global.omit, global.has3, global.isNumber, global.isObject2, global.isString, global.reduce, global.times, global.isEqual4, global.set3, global.transform, global.merge, global.flattenDeep, global.uniq, global.mergeAllOf, global.union, global.isNil, global.cloneDeep, global.react, global.ReactIs, global.jsxRuntime, global.toPath, global.forEach));
|
|
5
5
|
})(this, (function (exports, isPlainObject, isEqualWith, get8, isEmpty, jsonpointer, omit, has3, isNumber, isObject2, isString, reduce, times, isEqual4, set3, transform, merge, flattenDeep, uniq, mergeAllOf, union, isNil, cloneDeep, react, ReactIs, jsxRuntime, toPath, forEach) { 'use strict';
|
|
6
6
|
|
|
7
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
+
}) : x)(function(x) {
|
|
10
|
+
if (typeof require !== "undefined")
|
|
11
|
+
return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
// src/isObject.ts
|
|
8
16
|
function isObject(thing) {
|
|
9
17
|
if (typeof File !== "undefined" && thing instanceof File) {
|
|
@@ -1656,29 +1664,33 @@
|
|
|
1656
1664
|
}
|
|
1657
1665
|
|
|
1658
1666
|
// src/dataURItoBlob.ts
|
|
1659
|
-
function dataURItoBlob(
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1667
|
+
function dataURItoBlob(dataURILike) {
|
|
1668
|
+
if (dataURILike.indexOf("data:") === -1) {
|
|
1669
|
+
throw new Error("File is invalid: URI must be a dataURI");
|
|
1670
|
+
}
|
|
1671
|
+
const dataURI = dataURILike.slice(5);
|
|
1672
|
+
const splitted = dataURI.split(";base64,");
|
|
1673
|
+
if (splitted.length !== 2) {
|
|
1674
|
+
throw new Error("File is invalid: dataURI must be base64");
|
|
1675
|
+
}
|
|
1676
|
+
const [media, base642] = splitted;
|
|
1677
|
+
const [mime, ...mediaparams] = media.split(";");
|
|
1678
|
+
const type = mime || "";
|
|
1679
|
+
const name = decodeURI(
|
|
1680
|
+
// parse the parameters into key-value pairs, find a key, and extract a value
|
|
1681
|
+
// if no key is found, then the name is unknown
|
|
1682
|
+
mediaparams.map((param) => param.split("=")).find(([key]) => key === "name")?.[1] || "unknown"
|
|
1683
|
+
);
|
|
1672
1684
|
try {
|
|
1673
|
-
const binary = atob(
|
|
1674
|
-
const array =
|
|
1685
|
+
const binary = atob(base642);
|
|
1686
|
+
const array = new Array(binary.length);
|
|
1675
1687
|
for (let i = 0; i < binary.length; i++) {
|
|
1676
|
-
array
|
|
1688
|
+
array[i] = binary.charCodeAt(i);
|
|
1677
1689
|
}
|
|
1678
1690
|
const blob = new window.Blob([new Uint8Array(array)], { type });
|
|
1679
1691
|
return { blob, name };
|
|
1680
1692
|
} catch (error) {
|
|
1681
|
-
|
|
1693
|
+
throw new Error("File is invalid: " + error.message);
|
|
1682
1694
|
}
|
|
1683
1695
|
}
|
|
1684
1696
|
|
|
@@ -1706,7 +1718,7 @@
|
|
|
1706
1718
|
// src/enumOptionsValueForIndex.ts
|
|
1707
1719
|
function enumOptionsValueForIndex(valueIndex, allEnumOptions = [], emptyValue) {
|
|
1708
1720
|
if (Array.isArray(valueIndex)) {
|
|
1709
|
-
return valueIndex.map((index2) => enumOptionsValueForIndex(index2, allEnumOptions)).filter((val) => val);
|
|
1721
|
+
return valueIndex.map((index2) => enumOptionsValueForIndex(index2, allEnumOptions)).filter((val) => val !== emptyValue);
|
|
1710
1722
|
}
|
|
1711
1723
|
const index = valueIndex === "" || valueIndex === null ? -1 : Number(valueIndex);
|
|
1712
1724
|
const option = allEnumOptions[index];
|
|
@@ -2341,6 +2353,33 @@
|
|
|
2341
2353
|
return schemaNode;
|
|
2342
2354
|
}
|
|
2343
2355
|
|
|
2356
|
+
// src/base64.ts
|
|
2357
|
+
var base64 = function() {
|
|
2358
|
+
return {
|
|
2359
|
+
encode(text) {
|
|
2360
|
+
let encoder;
|
|
2361
|
+
if (typeof TextEncoder !== "undefined") {
|
|
2362
|
+
encoder = new TextEncoder();
|
|
2363
|
+
} else {
|
|
2364
|
+
const { TextEncoder: TextEncoder2 } = __require("util");
|
|
2365
|
+
encoder = new TextEncoder2();
|
|
2366
|
+
}
|
|
2367
|
+
return btoa(String.fromCharCode(...encoder.encode(text)));
|
|
2368
|
+
},
|
|
2369
|
+
decode(text) {
|
|
2370
|
+
let decoder;
|
|
2371
|
+
if (typeof TextDecoder !== "undefined") {
|
|
2372
|
+
decoder = new TextDecoder();
|
|
2373
|
+
} else {
|
|
2374
|
+
const { TextDecoder: TextDecoder2 } = __require("util");
|
|
2375
|
+
decoder = new TextDecoder2();
|
|
2376
|
+
}
|
|
2377
|
+
return decoder.decode(Uint8Array.from(atob(text), (c) => c.charCodeAt(0)));
|
|
2378
|
+
}
|
|
2379
|
+
};
|
|
2380
|
+
}();
|
|
2381
|
+
var base64_default = base64;
|
|
2382
|
+
|
|
2344
2383
|
// src/enums.ts
|
|
2345
2384
|
var TranslatableString = /* @__PURE__ */ ((TranslatableString2) => {
|
|
2346
2385
|
TranslatableString2["ArrayItemTitle"] = "Item";
|
|
@@ -2516,6 +2555,7 @@
|
|
|
2516
2555
|
exports.allowAdditionalItems = allowAdditionalItems;
|
|
2517
2556
|
exports.ariaDescribedByIds = ariaDescribedByIds;
|
|
2518
2557
|
exports.asNumber = asNumber;
|
|
2558
|
+
exports.base64 = base64_default;
|
|
2519
2559
|
exports.canExpand = canExpand;
|
|
2520
2560
|
exports.createErrorHandler = createErrorHandler;
|
|
2521
2561
|
exports.createSchemaUtils = createSchemaUtils;
|
package/lib/base64.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object that provides base64 encoding and decoding functions using the utf-8 charset to support the characters
|
|
3
|
+
* outside the latin1 range. By default, btoa() and atob() only support the latin1 character range.
|
|
4
|
+
*
|
|
5
|
+
* This is built as an on-the-fly executed function to support testing the node vs browser implementations
|
|
6
|
+
*/
|
|
7
|
+
declare const base64: {
|
|
8
|
+
encode(text: string): string;
|
|
9
|
+
decode(text: string): string;
|
|
10
|
+
};
|
|
11
|
+
export default base64;
|
package/lib/base64.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object that provides base64 encoding and decoding functions using the utf-8 charset to support the characters
|
|
3
|
+
* outside the latin1 range. By default, btoa() and atob() only support the latin1 character range.
|
|
4
|
+
*
|
|
5
|
+
* This is built as an on-the-fly executed function to support testing the node vs browser implementations
|
|
6
|
+
*/
|
|
7
|
+
const base64 = (function () {
|
|
8
|
+
// If we are in the browser, we can use the built-in TextEncoder and TextDecoder
|
|
9
|
+
// Otherwise, it is assumed that we are in node.js, and we can use the util module's TextEncoder and TextDecoder
|
|
10
|
+
return {
|
|
11
|
+
encode(text) {
|
|
12
|
+
let encoder;
|
|
13
|
+
if (typeof TextEncoder !== 'undefined') {
|
|
14
|
+
encoder = new TextEncoder();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const { TextEncoder } = require('util');
|
|
18
|
+
encoder = new TextEncoder();
|
|
19
|
+
}
|
|
20
|
+
return btoa(String.fromCharCode(...encoder.encode(text)));
|
|
21
|
+
},
|
|
22
|
+
decode(text) {
|
|
23
|
+
let decoder;
|
|
24
|
+
if (typeof TextDecoder !== 'undefined') {
|
|
25
|
+
decoder = new TextDecoder();
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const { TextDecoder } = require('util');
|
|
29
|
+
decoder = new TextDecoder();
|
|
30
|
+
}
|
|
31
|
+
return decoder.decode(Uint8Array.from(atob(text), (c) => c.charCodeAt(0)));
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
export default base64;
|
|
36
|
+
//# sourceMappingURL=base64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../src/base64.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CAAC;IACd,gFAAgF;IAChF,gHAAgH;IAChH,OAAO;QACL,MAAM,CAAC,IAAY;YACjB,IAAI,OAAY,CAAC;YACjB,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE;gBACtC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;aAC7B;iBAAM;gBACL,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;aAC7B;YACD,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,CAAC,IAAY;YACjB,IAAI,OAAY,CAAC;YACjB,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE;gBACtC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;aAC7B;iBAAM;gBACL,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;aAC7B;YACD,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC;AAEL,eAAe,MAAM,CAAC"}
|
package/lib/dataURItoBlob.d.ts
CHANGED
|
@@ -4,13 +4,7 @@
|
|
|
4
4
|
* @param dataURI - The `DataUrl` potentially containing name and raw data to be converted to a Blob
|
|
5
5
|
* @returns - an object containing a Blob and its name, extracted from the URI
|
|
6
6
|
*/
|
|
7
|
-
export default function dataURItoBlob(
|
|
7
|
+
export default function dataURItoBlob(dataURILike: string): {
|
|
8
8
|
blob: Blob;
|
|
9
9
|
name: string;
|
|
10
|
-
} | {
|
|
11
|
-
blob: {
|
|
12
|
-
size: number;
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
name: string;
|
|
16
10
|
};
|
package/lib/dataURItoBlob.js
CHANGED
|
@@ -4,40 +4,41 @@
|
|
|
4
4
|
* @param dataURI - The `DataUrl` potentially containing name and raw data to be converted to a Blob
|
|
5
5
|
* @returns - an object containing a Blob and its name, extracted from the URI
|
|
6
6
|
*/
|
|
7
|
-
export default function dataURItoBlob(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// Get mime-type from params
|
|
13
|
-
const type = params[0].replace('data:', '');
|
|
14
|
-
// Filter the name property from params
|
|
15
|
-
const properties = params.filter((param) => {
|
|
16
|
-
return param.split('=')[0] === 'name';
|
|
17
|
-
});
|
|
18
|
-
// Look for the name and use unknown if no name property.
|
|
19
|
-
let name;
|
|
20
|
-
if (properties.length !== 1) {
|
|
21
|
-
name = 'unknown';
|
|
7
|
+
export default function dataURItoBlob(dataURILike) {
|
|
8
|
+
var _a;
|
|
9
|
+
// check if is dataURI
|
|
10
|
+
if (dataURILike.indexOf('data:') === -1) {
|
|
11
|
+
throw new Error('File is invalid: URI must be a dataURI');
|
|
22
12
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
const dataURI = dataURILike.slice(5);
|
|
14
|
+
// split the dataURI into media and base64, with the base64 signature
|
|
15
|
+
const splitted = dataURI.split(';base64,');
|
|
16
|
+
// if the base64 signature is not present, the latter part will become empty
|
|
17
|
+
if (splitted.length !== 2) {
|
|
18
|
+
throw new Error('File is invalid: dataURI must be base64');
|
|
27
19
|
}
|
|
20
|
+
// extract the mime type, media parameters including the name, and the base64 string
|
|
21
|
+
const [media, base64] = splitted;
|
|
22
|
+
const [mime, ...mediaparams] = media.split(';');
|
|
23
|
+
const type = mime || '';
|
|
24
|
+
// extract the name from the parameters
|
|
25
|
+
const name = decodeURI(
|
|
26
|
+
// parse the parameters into key-value pairs, find a key, and extract a value
|
|
27
|
+
// if no key is found, then the name is unknown
|
|
28
|
+
((_a = mediaparams.map((param) => param.split('=')).find(([key]) => key === 'name')) === null || _a === void 0 ? void 0 : _a[1]) || 'unknown');
|
|
28
29
|
// Built the Uint8Array Blob parameter from the base64 string.
|
|
29
30
|
try {
|
|
30
|
-
const binary = atob(
|
|
31
|
-
const array =
|
|
31
|
+
const binary = atob(base64);
|
|
32
|
+
const array = new Array(binary.length);
|
|
32
33
|
for (let i = 0; i < binary.length; i++) {
|
|
33
|
-
array
|
|
34
|
+
array[i] = binary.charCodeAt(i);
|
|
34
35
|
}
|
|
35
36
|
// Create the blob object
|
|
36
37
|
const blob = new window.Blob([new Uint8Array(array)], { type });
|
|
37
38
|
return { blob, name };
|
|
38
39
|
}
|
|
39
40
|
catch (error) {
|
|
40
|
-
|
|
41
|
+
throw new Error('File is invalid: ' + error.message);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
//# sourceMappingURL=dataURItoBlob.js.map
|
package/lib/dataURItoBlob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataURItoBlob.js","sourceRoot":"","sources":["../src/dataURItoBlob.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"dataURItoBlob.js","sourceRoot":"","sources":["../src/dataURItoBlob.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,WAAmB;;IACvD,sBAAsB;IACtB,IAAI,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC3D;IACD,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrC,qEAAqE;IACrE,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3C,4EAA4E;IAC5E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC5D;IACD,oFAAoF;IACpF,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC;IACjC,MAAM,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ndex)) {
|
|
14
|
-
return valueIndex
|
|
14
|
+
return (valueIndex
|
|
15
|
+
.map((index) => enumOptionsValueForIndex(index, allEnumOptions))
|
|
16
|
+
// Since the recursive call returns `emptyValue` when we get a bad option, only filter those out
|
|
17
|
+
.filter((val) => val !== emptyValue));
|
|
15
18
|
}
|
|
16
19
|
// So Number(null) and Number('') both return 0, so use emptyValue for those two values
|
|
17
20
|
const index = valueIndex === '' || valueIndex === null ? -1 : Number(valueIndex);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumOptionsValueForIndex.js","sourceRoot":"","sources":["../src/enumOptionsValueForIndex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,UAAoD,EACpD,iBAAuC,EAAE,EACzC,UAAwC;IAExC,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC7B,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"enumOptionsValueForIndex.js","sourceRoot":"","sources":["../src/enumOptionsValueForIndex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,UAAoD,EACpD,iBAAuC,EAAE,EACzC,UAAwC;IAExC,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC7B,OAAO,CACL,UAAU;aACP,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;YAChE,gGAAgG;aAC/F,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CACvC,CAAC;KACH;IACD,uFAAuF;IACvF,MAAM,KAAK,GAAG,UAAU,KAAK,EAAE,IAAI,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACjF,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;AAC5C,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -51,9 +51,10 @@ import utcToLocal from './utcToLocal';
|
|
|
51
51
|
import validationDataMerge from './validationDataMerge';
|
|
52
52
|
import withIdRefPrefix from './withIdRefPrefix';
|
|
53
53
|
import getOptionMatchingSimpleDiscriminator from './getOptionMatchingSimpleDiscriminator';
|
|
54
|
+
import base64 from './base64';
|
|
54
55
|
export * from './types';
|
|
55
56
|
export * from './enums';
|
|
56
57
|
export * from './constants';
|
|
57
58
|
export * from './parser';
|
|
58
59
|
export * from './schema';
|
|
59
|
-
export { allowAdditionalItems, ariaDescribedByIds, asNumber, canExpand, createErrorHandler, createSchemaUtils, DateElementFormat, dataURItoBlob, deepEquals, descriptionId, englishStringTranslator, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, helpId, isConstant, isCustomWidget, isFixedItems, isObject, labelValue, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, replaceStringParameters, schemaRequiresTrueValue, shouldRender, titleId, toConstant, toDateString, toErrorList, toErrorSchema, unwrapErrorHandler, utcToLocal, validationDataMerge, withIdRefPrefix, };
|
|
60
|
+
export { allowAdditionalItems, ariaDescribedByIds, asNumber, canExpand, createErrorHandler, createSchemaUtils, DateElementFormat, dataURItoBlob, deepEquals, descriptionId, englishStringTranslator, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, helpId, isConstant, isCustomWidget, isFixedItems, isObject, labelValue, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, replaceStringParameters, schemaRequiresTrueValue, shouldRender, titleId, toConstant, toDateString, toErrorList, toErrorSchema, unwrapErrorHandler, utcToLocal, validationDataMerge, withIdRefPrefix, base64, };
|
package/lib/index.js
CHANGED
|
@@ -51,10 +51,11 @@ import utcToLocal from './utcToLocal';
|
|
|
51
51
|
import validationDataMerge from './validationDataMerge';
|
|
52
52
|
import withIdRefPrefix from './withIdRefPrefix';
|
|
53
53
|
import getOptionMatchingSimpleDiscriminator from './getOptionMatchingSimpleDiscriminator';
|
|
54
|
+
import base64 from './base64';
|
|
54
55
|
export * from './types';
|
|
55
56
|
export * from './enums';
|
|
56
57
|
export * from './constants';
|
|
57
58
|
export * from './parser';
|
|
58
59
|
export * from './schema';
|
|
59
|
-
export { allowAdditionalItems, ariaDescribedByIds, asNumber, canExpand, createErrorHandler, createSchemaUtils, dataURItoBlob, deepEquals, descriptionId, englishStringTranslator, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, helpId, isConstant, isCustomWidget, isFixedItems, isObject, labelValue, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, replaceStringParameters, schemaRequiresTrueValue, shouldRender, titleId, toConstant, toDateString, toErrorList, toErrorSchema, unwrapErrorHandler, utcToLocal, validationDataMerge, withIdRefPrefix, };
|
|
60
|
+
export { allowAdditionalItems, ariaDescribedByIds, asNumber, canExpand, createErrorHandler, createSchemaUtils, dataURItoBlob, deepEquals, descriptionId, englishStringTranslator, enumOptionsDeselectValue, enumOptionsIndexForValue, enumOptionsIsSelected, enumOptionsSelectValue, enumOptionsValueForIndex, errorId, examplesId, ErrorSchemaBuilder, findSchemaDefinition, getDateElementProps, getDiscriminatorFieldFromSchema, getInputProps, getOptionMatchingSimpleDiscriminator, getSchemaType, getSubmitButtonOptions, getTemplate, getUiOptions, getWidget, guessType, hasWidget, hashForSchema, helpId, isConstant, isCustomWidget, isFixedItems, isObject, labelValue, localToUTC, mergeDefaultsWithFormData, mergeObjects, mergeSchemas, optionId, optionsList, orderProperties, pad, parseDateString, rangeSpec, replaceStringParameters, schemaRequiresTrueValue, shouldRender, titleId, toConstant, toDateString, toErrorList, toErrorSchema, unwrapErrorHandler, utcToLocal, validationDataMerge, withIdRefPrefix, base64, };
|
|
60
61
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,wBAAwB,MAAM,4BAA4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