@es-joy/jsoe 0.16.0 → 0.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/.ncurc.cjs +4 -5
- package/CHANGES.md +4 -0
- package/README.md +27 -3
- package/badges/licenses-badge.svg +1 -0
- package/dist/formatAndTypeChoices.d.ts +39 -19
- package/dist/formatAndTypeChoices.d.ts.map +1 -1
- package/dist/formats/indexedDBKey.d.ts +1 -1
- package/dist/formats/indexedDBKey.d.ts.map +1 -1
- package/dist/formats/json.d.ts +1 -1
- package/dist/formats/json.d.ts.map +1 -1
- package/dist/formats/schema.d.ts +11 -0
- package/dist/formats/schema.d.ts.map +1 -0
- package/dist/formats/structuredCloning.d.ts +11 -13
- package/dist/formats/structuredCloning.d.ts.map +1 -1
- package/dist/formats.d.ts +86 -25
- package/dist/formats.d.ts.map +1 -1
- package/dist/fundamentalTypes/BooleanObjectType.d.ts +1 -1
- package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/NumberObjectType.d.ts +1 -1
- package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/StringObjectType.d.ts +1 -1
- package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayReferenceType.d.ts +1 -1
- package/dist/fundamentalTypes/arrayType.d.ts +3 -3
- package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
- package/dist/fundamentalTypes/bigintObjectType.d.ts +6 -0
- package/dist/fundamentalTypes/bigintObjectType.d.ts.map +1 -0
- package/dist/fundamentalTypes/bigintType.d.ts +1 -1
- package/dist/fundamentalTypes/bigintType.d.ts.map +1 -1
- package/dist/fundamentalTypes/blobType.d.ts +1 -1
- package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
- package/dist/fundamentalTypes/booleanType.d.ts +8 -0
- package/dist/fundamentalTypes/booleanType.d.ts.map +1 -0
- package/dist/fundamentalTypes/catchType.d.ts +6 -0
- package/dist/fundamentalTypes/catchType.d.ts.map +1 -0
- package/dist/fundamentalTypes/dateType.d.ts +4 -4
- package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
- package/dist/fundamentalTypes/domexceptionType.d.ts +1 -1
- package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
- package/dist/fundamentalTypes/enumType.d.ts +6 -0
- package/dist/fundamentalTypes/enumType.d.ts.map +1 -0
- package/dist/fundamentalTypes/errorType.d.ts +1 -1
- package/dist/fundamentalTypes/errorType.d.ts.map +1 -1
- package/dist/fundamentalTypes/fileType.d.ts +1 -1
- package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
- package/dist/fundamentalTypes/filelistType.d.ts +1 -1
- package/dist/fundamentalTypes/filelistType.d.ts.map +1 -1
- package/dist/fundamentalTypes/functionType.d.ts +6 -0
- package/dist/fundamentalTypes/functionType.d.ts.map +1 -0
- package/dist/fundamentalTypes/literalType.d.ts +6 -0
- package/dist/fundamentalTypes/literalType.d.ts.map +1 -0
- package/dist/fundamentalTypes/mapType.d.ts +1 -1
- package/dist/fundamentalTypes/mapType.d.ts.map +1 -1
- package/dist/fundamentalTypes/nanType.d.ts +6 -0
- package/dist/fundamentalTypes/nanType.d.ts.map +1 -0
- package/dist/fundamentalTypes/nativeEnumType.d.ts +6 -0
- package/dist/fundamentalTypes/nativeEnumType.d.ts.map +1 -0
- package/dist/fundamentalTypes/neverType.d.ts +6 -0
- package/dist/fundamentalTypes/neverType.d.ts.map +1 -0
- package/dist/fundamentalTypes/noneditableType.d.ts +1 -1
- package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -1
- package/dist/fundamentalTypes/nullType.d.ts +1 -1
- package/dist/fundamentalTypes/nullType.d.ts.map +1 -1
- package/dist/fundamentalTypes/numberType.d.ts +1 -1
- package/dist/fundamentalTypes/numberType.d.ts.map +1 -1
- package/dist/fundamentalTypes/objectReferenceType.d.ts +1 -1
- package/dist/fundamentalTypes/objectType.d.ts +1 -1
- package/dist/fundamentalTypes/objectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/promiseType.d.ts +6 -0
- package/dist/fundamentalTypes/promiseType.d.ts.map +1 -0
- package/dist/fundamentalTypes/recordType.d.ts +6 -0
- package/dist/fundamentalTypes/recordType.d.ts.map +1 -0
- package/dist/fundamentalTypes/regexpType.d.ts +1 -1
- package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
- package/dist/fundamentalTypes/setType.d.ts +1 -1
- package/dist/fundamentalTypes/setType.d.ts.map +1 -1
- package/dist/fundamentalTypes/sparseUndefinedType.d.ts +1 -1
- package/dist/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -1
- package/dist/fundamentalTypes/stringType.d.ts +1 -1
- package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
- package/dist/fundamentalTypes/symbolType.d.ts +8 -0
- package/dist/fundamentalTypes/symbolType.d.ts.map +1 -0
- package/dist/fundamentalTypes/tupleType.d.ts +6 -0
- package/dist/fundamentalTypes/tupleType.d.ts.map +1 -0
- package/dist/fundamentalTypes/undefinedType.d.ts +1 -1
- package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
- package/dist/fundamentalTypes/voidType.d.ts +6 -0
- package/dist/fundamentalTypes/voidType.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9660 -1586
- package/dist/subTypes/blobHTMLType.d.ts.map +1 -1
- package/dist/subTypes/falseType.d.ts +1 -1
- package/dist/subTypes/trueType.d.ts +1 -1
- package/dist/superTypes/SpecialNumberType.d.ts +1 -1
- package/dist/superTypes/SpecialRealNumberType.d.ts +1 -1
- package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
- package/dist/superTypes/buffersourceType.d.ts +1 -1
- package/dist/superTypes/buffersourceType.d.ts.map +1 -1
- package/dist/superTypes/dommatrixType.d.ts +1 -1
- package/dist/superTypes/dommatrixType.d.ts.map +1 -1
- package/dist/superTypes/dompointType.d.ts +1 -1
- package/dist/superTypes/dompointType.d.ts.map +1 -1
- package/dist/superTypes/domrectType.d.ts +1 -1
- package/dist/superTypes/domrectType.d.ts.map +1 -1
- package/dist/superTypes/errorsSpecialType.d.ts +1 -1
- package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
- package/dist/typeChoices.d.ts +33 -16
- package/dist/typeChoices.d.ts.map +1 -1
- package/dist/types.d.ts +161 -157
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/dialogs.d.ts +3 -3
- package/dist/utils/dialogs.d.ts.map +1 -1
- package/dist/utils/jsonPointer.d.ts.map +1 -1
- package/dist/utils/media.d.ts.map +1 -1
- package/dist/utils/objects.d.ts +16 -0
- package/dist/utils/objects.d.ts.map +1 -0
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/vendor-imports.d.ts +1 -1
- package/eslint.config.js +74 -0
- package/licenseInfo.json +4 -0
- package/package.json +33 -42
- package/rollup.config.js +15 -0
- package/src/formatAndTypeChoices.js +68 -54
- package/src/formats/indexedDBKey.js +9 -4
- package/src/formats/json.js +7 -4
- package/src/formats/schema.js +772 -0
- package/src/formats/structuredCloning.js +187 -86
- package/src/formats.js +61 -26
- package/src/fundamentalTypes/BooleanObjectType.js +18 -6
- package/src/fundamentalTypes/NumberObjectType.js +18 -5
- package/src/fundamentalTypes/StringObjectType.js +20 -8
- package/src/fundamentalTypes/arrayType.js +1241 -533
- package/src/fundamentalTypes/bigintObjectType.js +64 -0
- package/src/fundamentalTypes/bigintType.js +31 -5
- package/src/fundamentalTypes/blobType.js +201 -190
- package/src/fundamentalTypes/booleanType.js +63 -0
- package/src/fundamentalTypes/catchType.js +140 -0
- package/src/fundamentalTypes/dateType.js +57 -19
- package/src/fundamentalTypes/domexceptionType.js +61 -63
- package/src/fundamentalTypes/enumType.js +52 -0
- package/src/fundamentalTypes/errorType.js +20 -7
- package/src/fundamentalTypes/fileType.js +195 -189
- package/src/fundamentalTypes/filelistType.js +4 -0
- package/src/fundamentalTypes/functionType.js +150 -0
- package/src/fundamentalTypes/literalType.js +81 -0
- package/src/fundamentalTypes/mapType.js +4 -0
- package/src/fundamentalTypes/nanType.js +41 -0
- package/src/fundamentalTypes/nativeEnumType.js +155 -0
- package/src/fundamentalTypes/neverType.js +44 -0
- package/src/fundamentalTypes/noneditableType.js +19 -5
- package/src/fundamentalTypes/nullType.js +16 -6
- package/src/fundamentalTypes/numberType.js +49 -6
- package/src/fundamentalTypes/objectType.js +10 -2
- package/src/fundamentalTypes/promiseType.js +60 -0
- package/src/fundamentalTypes/recordType.js +42 -0
- package/src/fundamentalTypes/regexpType.js +51 -33
- package/src/fundamentalTypes/setType.js +4 -0
- package/src/fundamentalTypes/sparseUndefinedType.js +3 -0
- package/src/fundamentalTypes/stringType.js +254 -6
- package/src/fundamentalTypes/symbolType.js +81 -0
- package/src/fundamentalTypes/tupleType.js +39 -0
- package/src/fundamentalTypes/undefinedType.js +14 -4
- package/src/fundamentalTypes/voidType.js +48 -0
- package/src/jsoe.css +37 -3
- package/src/subTypes/blobHTMLType.js +33 -24
- package/src/superTypes/SpecialRealNumberType.js +22 -6
- package/src/superTypes/buffersourceType.js +86 -30
- package/src/superTypes/dommatrixType.js +24 -7
- package/src/superTypes/dompointType.js +27 -7
- package/src/superTypes/domrectType.js +33 -7
- package/src/superTypes/errorsSpecialType.js +30 -14
- package/src/typeChoices.js +115 -44
- package/src/types.js +129 -45
- package/src/utils/FileList.js +3 -3
- package/src/utils/dialogs.js +6 -8
- package/src/utils/objects.js +22 -0
- package/src/vendor-imports.js +1 -1
- package/tsconfig.json +2 -2
- package/vendor/jamilih/dist/jml-es.js +23 -6
- package/vendor/typeson-registry/dist/index.js +77 -47
- package/vendor/zod/lib/index.mjs +4236 -0
- package/vendor/zodex/dist/esm/dezerialize.d.ts +26 -0
- package/vendor/zodex/dist/esm/dezerialize.js +393 -0
- package/vendor/zodex/dist/esm/index.d.ts +9 -0
- package/vendor/zodex/dist/esm/index.js +4 -0
- package/vendor/zodex/dist/esm/infer.d.ts +29 -0
- package/vendor/zodex/dist/esm/infer.js +1 -0
- package/vendor/zodex/dist/esm/package.json +1 -0
- package/vendor/zodex/dist/esm/types.d.ts +201 -0
- package/vendor/zodex/dist/esm/types.js +13 -0
- package/vendor/zodex/dist/esm/ui.d.ts +23 -0
- package/vendor/zodex/dist/esm/ui.js +10 -0
- package/vendor/zodex/dist/esm/zerialize.d.ts +50 -0
- package/vendor/zodex/dist/esm/zerialize.js +417 -0
- package/vendor/zodex/dist/esm/zod-types.d.ts +11 -0
- package/vendor/zodex/dist/esm/zod-types.js +1 -0
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -145
- package/.nyc_output/out.json +0 -117370
- package/cypress.config.ts +0 -15
- package/demo/index-instrumented.html +0 -29
- package/demo/index-instrumented.js +0 -644
- package/demo/index.html +0 -29
- package/demo/index.js +0 -215
- package/src/formats/schemaAndArbitrary.js +0 -20
- package/src/formats/schemaOnly.js +0 -539
package/demo/index.html
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>JSOE Demo</title>
|
|
6
|
-
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
|
|
7
|
-
<link rel="stylesheet" href="../src/jsoe.css" />
|
|
8
|
-
<!-- SCEditor (CKEditor was appealing for features but won't support unrecognized tags:
|
|
9
|
-
https://github.com/ckeditor/ckeditor5/issues/592 )
|
|
10
|
-
Filed https://github.com/samclarke/SCEditor/issues/584 to be able to import as ES6 module
|
|
11
|
-
-->
|
|
12
|
-
<link rel="stylesheet" href="../node_modules/sceditor/minified/themes/default.min.css" />
|
|
13
|
-
|
|
14
|
-
<script src="../node_modules/sceditor/minified/sceditor.min.js"></script>
|
|
15
|
-
<script src="../node_modules/sceditor/minified/formats/bbcode.js"></script>
|
|
16
|
-
<script src="../node_modules/sceditor/minified/formats/xhtml.js"></script>
|
|
17
|
-
<script type="importmap">
|
|
18
|
-
{
|
|
19
|
-
"imports": {
|
|
20
|
-
"jamilih": "../vendor/jamilih/dist/jml-es.js",
|
|
21
|
-
"typeson-registry": "../vendor/typeson-registry/dist/index.js"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
<script type="module" src="index.js"></script>
|
|
26
|
-
</head>
|
|
27
|
-
<body>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
package/demo/index.js
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import {jml, body, $} from '../src/vendor-imports.js';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
typeChoices,
|
|
5
|
-
getFormatAndSchemaChoices,
|
|
6
|
-
formatAndTypeChoices,
|
|
7
|
-
Types
|
|
8
|
-
} from '../src/index.js';
|
|
9
|
-
|
|
10
|
-
const types = new Types();
|
|
11
|
-
|
|
12
|
-
const keyPathNotExpectedTypeChoices = formatAndTypeChoices({
|
|
13
|
-
hasKeyPath: false,
|
|
14
|
-
typeNamespace: 'demo-keypath-not-expected'
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
setTimeout(async function () {
|
|
18
|
-
jml('section', {role: 'main'}, [
|
|
19
|
-
['h1', [
|
|
20
|
-
'Jsoe testing'
|
|
21
|
-
]],
|
|
22
|
-
['h2', [
|
|
23
|
-
'Format and type choices: No key path expected (type can vary at root)'
|
|
24
|
-
]],
|
|
25
|
-
|
|
26
|
-
// Put inside form so can validate
|
|
27
|
-
['form', {id: 'formatAndTypeChoices'}, [
|
|
28
|
-
...keyPathNotExpectedTypeChoices.domArray
|
|
29
|
-
]],
|
|
30
|
-
|
|
31
|
-
['button', {
|
|
32
|
-
id: 'getType',
|
|
33
|
-
$on: {
|
|
34
|
-
click () {
|
|
35
|
-
// eslint-disable-next-line no-alert -- Simple demo
|
|
36
|
-
alert(keyPathNotExpectedTypeChoices.getType());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}, ['Get type']],
|
|
40
|
-
|
|
41
|
-
['button', {
|
|
42
|
-
id: 'isValid',
|
|
43
|
-
$on: {
|
|
44
|
-
click () {
|
|
45
|
-
// eslint-disable-next-line no-alert -- Simple demo
|
|
46
|
-
alert(keyPathNotExpectedTypeChoices.validValuesSet());
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, ['Is valid']],
|
|
50
|
-
|
|
51
|
-
['button', {
|
|
52
|
-
id: 'logValue',
|
|
53
|
-
$on: {
|
|
54
|
-
click () {
|
|
55
|
-
console.log(keyPathNotExpectedTypeChoices.getValue());
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}, ['Log value']],
|
|
59
|
-
|
|
60
|
-
['button', {
|
|
61
|
-
id: 'viewUI',
|
|
62
|
-
$on: {
|
|
63
|
-
async click () {
|
|
64
|
-
const controls =
|
|
65
|
-
// eslint-disable-next-line @stylistic/max-len -- Long
|
|
66
|
-
await keyPathNotExpectedTypeChoices.formats.getControlsForFormatAndValue(
|
|
67
|
-
keyPathNotExpectedTypeChoices.types,
|
|
68
|
-
'structuredCloning',
|
|
69
|
-
keyPathNotExpectedTypeChoices.getValue(),
|
|
70
|
-
{
|
|
71
|
-
readonly: true
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
$('#viewUIResults').firstChild?.remove();
|
|
75
|
-
$('#viewUIResults').append(controls);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, ['view UI']],
|
|
79
|
-
|
|
80
|
-
['div', {id: 'viewUIResults'}],
|
|
81
|
-
|
|
82
|
-
['button', {
|
|
83
|
-
id: 'initializeWithValue',
|
|
84
|
-
$on: {
|
|
85
|
-
async click () {
|
|
86
|
-
await keyPathNotExpectedTypeChoices.setValue(42);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, ['Initialize with a value']],
|
|
90
|
-
|
|
91
|
-
['h2', [
|
|
92
|
-
'Format and type choices: Key path expected (object required at root)'
|
|
93
|
-
]],
|
|
94
|
-
...formatAndTypeChoices({
|
|
95
|
-
hasKeyPath: true,
|
|
96
|
-
typeNamespace: 'demo-keypath-expected'
|
|
97
|
-
}).domArray,
|
|
98
|
-
|
|
99
|
-
['h2', [
|
|
100
|
-
'Format choices without type selection ' +
|
|
101
|
-
'(might use as retrieval return format)'
|
|
102
|
-
]],
|
|
103
|
-
['select', {id: 'formatAndSchemaChoices'}, [
|
|
104
|
-
getFormatAndSchemaChoices()
|
|
105
|
-
]],
|
|
106
|
-
|
|
107
|
-
['h2', [
|
|
108
|
-
'Type choices only'
|
|
109
|
-
]],
|
|
110
|
-
|
|
111
|
-
(() => {
|
|
112
|
-
const typeSelection = typeChoices({
|
|
113
|
-
format: 'structuredCloning',
|
|
114
|
-
typeNamespace: 'demo-type-choices-only'
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
return ['form', {
|
|
118
|
-
id: 'typeChoicesOnly',
|
|
119
|
-
$on: {
|
|
120
|
-
submit (e) {
|
|
121
|
-
e.preventDefault();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}, [
|
|
125
|
-
...typeSelection.domArray,
|
|
126
|
-
['button', {
|
|
127
|
-
id: 'typeChoicesOnly-getType',
|
|
128
|
-
$on: {
|
|
129
|
-
click () {
|
|
130
|
-
// eslint-disable-next-line no-alert -- Simple demo
|
|
131
|
-
alert(typeSelection.getType());
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}, ['Get type']],
|
|
135
|
-
|
|
136
|
-
['button', {
|
|
137
|
-
id: 'typeChoicesOnly-isValid',
|
|
138
|
-
$on: {
|
|
139
|
-
click () {
|
|
140
|
-
// eslint-disable-next-line no-alert -- Simple demo
|
|
141
|
-
alert(typeSelection.validValuesSet());
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}, ['Is valid']],
|
|
145
|
-
|
|
146
|
-
['button', {
|
|
147
|
-
id: 'validateInitialType',
|
|
148
|
-
$on: {
|
|
149
|
-
click () {
|
|
150
|
-
// eslint-disable-next-line no-alert -- Simple demo
|
|
151
|
-
alert(typeSelection.domArray[0].$validate());
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}, [
|
|
155
|
-
'Validate initial type'
|
|
156
|
-
]],
|
|
157
|
-
|
|
158
|
-
['button', {
|
|
159
|
-
id: 'typeChoicesOnly-logValue',
|
|
160
|
-
$on: {
|
|
161
|
-
click () {
|
|
162
|
-
console.log(typeSelection.getValue());
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}, ['Log value']],
|
|
166
|
-
|
|
167
|
-
['button', {
|
|
168
|
-
id: 'typeChoicesOnly-initializeWithValue',
|
|
169
|
-
$on: {
|
|
170
|
-
async click () {
|
|
171
|
-
await typeSelection.setValue(42);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}, ['Initialize with a value']]
|
|
175
|
-
]];
|
|
176
|
-
})(),
|
|
177
|
-
|
|
178
|
-
['h2', [
|
|
179
|
-
'Convert arbitrary value to an editable menu'
|
|
180
|
-
]],
|
|
181
|
-
|
|
182
|
-
await types.getControlsForFormatAndValue(
|
|
183
|
-
'structuredCloning',
|
|
184
|
-
new Date('1999-01-01')
|
|
185
|
-
),
|
|
186
|
-
|
|
187
|
-
['h2', [
|
|
188
|
-
'Convert arbitrary value to a readonly menu'
|
|
189
|
-
]],
|
|
190
|
-
|
|
191
|
-
await types.getControlsForFormatAndValue(
|
|
192
|
-
'structuredCloning',
|
|
193
|
-
new Date('1999-01-01'), {
|
|
194
|
-
readonly: true
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
|
|
198
|
-
['h2', [
|
|
199
|
-
'Convert structured cloning string representation to value and log'
|
|
200
|
-
]],
|
|
201
|
-
['input', {
|
|
202
|
-
id: 'getValueForString',
|
|
203
|
-
placeholder: 'e.g., ["abc", 17]',
|
|
204
|
-
$on: {
|
|
205
|
-
change () {
|
|
206
|
-
const types = new Types();
|
|
207
|
-
const value = types.getValueForString(this.value, {
|
|
208
|
-
format: 'structuredCloning'
|
|
209
|
-
})[0];
|
|
210
|
-
console.log(value);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}]
|
|
214
|
-
], body);
|
|
215
|
-
}, 500);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as structuredCloning from './structuredCloning.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type {import('./structuredCloning.js').FormatIterator}
|
|
5
|
-
*/
|
|
6
|
-
export const iterate = (records, stateObj) => {
|
|
7
|
-
console.log('records', records, stateObj);
|
|
8
|
-
stateObj.format = 'schemaAndArbitrary';
|
|
9
|
-
return structuredCloning.iterate(records, stateObj);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @param {string} state
|
|
14
|
-
* @returns {string[]}
|
|
15
|
-
*/
|
|
16
|
-
export const getTypesForState = (state) => {
|
|
17
|
-
return structuredCloning.getTypesForState.call(
|
|
18
|
-
this, types, state
|
|
19
|
-
);
|
|
20
|
-
};
|