@rjsf/utils 5.17.0 → 5.18.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 +16 -37
- package/dist/index.js.map +4 -4
- package/dist/utils.esm.js +16 -45
- package/dist/utils.esm.js.map +4 -4
- package/dist/utils.umd.js +16 -45
- package/lib/enums.d.ts +1 -1
- package/lib/enums.js +1 -1
- package/lib/enums.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/schema/getDefaultFormState.js +19 -7
- package/lib/schema/getDefaultFormState.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +14 -1
- package/package.json +2 -2
- package/src/enums.ts +1 -1
- package/src/index.ts +0 -2
- package/src/schema/getDefaultFormState.ts +21 -6
- package/src/types.ts +18 -1
- 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/lib/base64.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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
|
package/lib/base64.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/src/base64.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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: string): string {
|
|
12
|
-
let encoder: any;
|
|
13
|
-
if (typeof TextEncoder !== 'undefined') {
|
|
14
|
-
encoder = new TextEncoder();
|
|
15
|
-
} else {
|
|
16
|
-
const { TextEncoder } = require('util');
|
|
17
|
-
encoder = new TextEncoder();
|
|
18
|
-
}
|
|
19
|
-
return btoa(String.fromCharCode(...encoder.encode(text)));
|
|
20
|
-
},
|
|
21
|
-
decode(text: string): string {
|
|
22
|
-
let decoder: any;
|
|
23
|
-
if (typeof TextDecoder !== 'undefined') {
|
|
24
|
-
decoder = new TextDecoder();
|
|
25
|
-
} else {
|
|
26
|
-
const { TextDecoder } = require('util');
|
|
27
|
-
decoder = new TextDecoder();
|
|
28
|
-
}
|
|
29
|
-
return decoder.decode(Uint8Array.from(atob(text), (c) => c.charCodeAt(0)));
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
})();
|
|
33
|
-
|
|
34
|
-
export default base64;
|