@nxtedition/types 23.0.22 → 23.0.23
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/common/index.d.ts +3 -0
- package/dist/common/index.js +3 -0
- package/dist/common/nxtpression.d.ts +3 -3
- package/dist/common/nxtpression.js +39 -49
- package/dist/common/render-preset.d.ts +12 -24
- package/dist/common/render-preset.js +735 -257
- package/dist/common/render-profile.d.ts +28 -0
- package/dist/common/render-profile.js +726 -0
- package/dist/common/render-query.d.ts +18 -0
- package/dist/common/render-query.js +1093 -0
- package/dist/common/render-scene.d.ts +38 -0
- package/dist/common/render-scene.js +1116 -0
- package/dist/domains/file.d.ts +9 -1
- package/dist/domains/file.js +1258 -0
- package/dist/domains/index.d.ts +3 -1
- package/dist/domains/index.js +1 -0
- package/dist/domains/media.d.ts +6 -27
- package/dist/domains/media.js +401 -128
- package/dist/domains/panel.js +218 -675
- package/dist/domains/render-preset.d.ts +2 -2
- package/dist/domains/render.d.ts +44 -0
- package/dist/domains/render.js +1273 -0
- package/dist/index.js +16 -12
- package/dist/schema.json +952 -120
- package/package.json +1 -1
package/dist/domains/panel.js
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isPanelDomainPanelRecord = input => {
|
|
3
|
-
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $
|
|
3
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io4(input.layout)) && (null !== input.filter && (undefined === input.filter || "string" === typeof input.filter || "object" === typeof input.filter && null !== input.filter && $io8(input.filter))) && (null !== input.expand && (undefined === input.expand || "string" === typeof input.expand || "object" === typeof input.expand && null !== input.expand && $io8(input.expand)));
|
|
4
4
|
const $io1 = input => Object.keys(input).every(key => {
|
|
5
5
|
const value = input[key];
|
|
6
6
|
if (undefined === value)
|
|
7
7
|
return true;
|
|
8
8
|
return "object" === typeof value && null !== value && $io2(value);
|
|
9
9
|
});
|
|
10
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
11
|
-
const $io3 = input => "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if ("number" === typeof Number(key))
|
|
18
|
-
return "string" === typeof value;
|
|
19
|
-
return true;
|
|
20
|
-
});
|
|
21
|
-
const $io4 = input => true;
|
|
22
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
23
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
24
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
25
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
26
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
27
|
-
const $io10 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
10
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
11
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
12
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
13
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
14
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
15
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
16
|
+
const $io8 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
28
17
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
29
18
|
return true;
|
|
30
19
|
const value = input[key];
|
|
@@ -36,9 +25,9 @@ export const isPanelDomainPanelRecord = input => {
|
|
|
36
25
|
});
|
|
37
26
|
const $iu0 = input => (() => {
|
|
38
27
|
if (undefined !== input.type)
|
|
39
|
-
return $
|
|
28
|
+
return $io5(input);
|
|
40
29
|
else if (undefined !== input.property)
|
|
41
|
-
return $
|
|
30
|
+
return $io6(input);
|
|
42
31
|
else
|
|
43
32
|
return false;
|
|
44
33
|
})();
|
|
@@ -47,31 +36,20 @@ export const isPanelDomainPanelRecord = input => {
|
|
|
47
36
|
};
|
|
48
37
|
export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
49
38
|
const __is = input => {
|
|
50
|
-
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $
|
|
39
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io4(input.layout)) && (null !== input.filter && (undefined === input.filter || "string" === typeof input.filter || "object" === typeof input.filter && null !== input.filter && $io8(input.filter))) && (null !== input.expand && (undefined === input.expand || "string" === typeof input.expand || "object" === typeof input.expand && null !== input.expand && $io8(input.expand)));
|
|
51
40
|
const $io1 = input => Object.keys(input).every(key => {
|
|
52
41
|
const value = input[key];
|
|
53
42
|
if (undefined === value)
|
|
54
43
|
return true;
|
|
55
44
|
return "object" === typeof value && null !== value && $io2(value);
|
|
56
45
|
});
|
|
57
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
58
|
-
const $io3 = input => "
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if ("number" === typeof Number(key))
|
|
65
|
-
return "string" === typeof value;
|
|
66
|
-
return true;
|
|
67
|
-
});
|
|
68
|
-
const $io4 = input => true;
|
|
69
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
70
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
71
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
72
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
73
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
74
|
-
const $io10 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
46
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
47
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
48
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
49
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
50
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
51
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
52
|
+
const $io8 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
75
53
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
76
54
|
return true;
|
|
77
55
|
const value = input[key];
|
|
@@ -83,9 +61,9 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
83
61
|
});
|
|
84
62
|
const $iu0 = input => (() => {
|
|
85
63
|
if (undefined !== input.type)
|
|
86
|
-
return $
|
|
64
|
+
return $io5(input);
|
|
87
65
|
else if (undefined !== input.property)
|
|
88
|
-
return $
|
|
66
|
+
return $io6(input);
|
|
89
67
|
else
|
|
90
68
|
return false;
|
|
91
69
|
})();
|
|
@@ -136,33 +114,33 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
136
114
|
path: _path + ".layout",
|
|
137
115
|
expected: "(__type.o2 | undefined)",
|
|
138
116
|
value: input.layout
|
|
139
|
-
}, errorFactory)) && $
|
|
117
|
+
}, errorFactory)) && $ao4(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
140
118
|
path: _path + ".layout",
|
|
141
119
|
expected: "(__type.o2 | undefined)",
|
|
142
120
|
value: input.layout
|
|
143
121
|
}, errorFactory)) && ((null !== input.filter || $guard(_exceptionable, {
|
|
144
122
|
path: _path + ".filter",
|
|
145
|
-
expected: "(String & { __context
|
|
123
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
146
124
|
value: input.filter
|
|
147
125
|
}, errorFactory)) && (undefined === input.filter || "string" === typeof input.filter || ("object" === typeof input.filter && null !== input.filter || $guard(_exceptionable, {
|
|
148
126
|
path: _path + ".filter",
|
|
149
|
-
expected: "(String & { __context
|
|
127
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
150
128
|
value: input.filter
|
|
151
|
-
}, errorFactory)) && $
|
|
129
|
+
}, errorFactory)) && $ao8(input.filter, _path + ".filter", true && _exceptionable) || $guard(_exceptionable, {
|
|
152
130
|
path: _path + ".filter",
|
|
153
|
-
expected: "(String & { __context
|
|
131
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
154
132
|
value: input.filter
|
|
155
133
|
}, errorFactory))) && ((null !== input.expand || $guard(_exceptionable, {
|
|
156
134
|
path: _path + ".expand",
|
|
157
|
-
expected: "(String & { __context
|
|
135
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
158
136
|
value: input.expand
|
|
159
137
|
}, errorFactory)) && (undefined === input.expand || "string" === typeof input.expand || ("object" === typeof input.expand && null !== input.expand || $guard(_exceptionable, {
|
|
160
138
|
path: _path + ".expand",
|
|
161
|
-
expected: "(String & { __context
|
|
139
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
162
140
|
value: input.expand
|
|
163
|
-
}, errorFactory)) && $
|
|
141
|
+
}, errorFactory)) && $ao8(input.expand, _path + ".expand", true && _exceptionable) || $guard(_exceptionable, {
|
|
164
142
|
path: _path + ".expand",
|
|
165
|
-
expected: "(String & { __context
|
|
143
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
166
144
|
value: input.expand
|
|
167
145
|
}, errorFactory)));
|
|
168
146
|
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
@@ -199,23 +177,11 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
199
177
|
path: _path + ".path",
|
|
200
178
|
expected: "(string | undefined)",
|
|
201
179
|
value: input.path
|
|
202
|
-
}, errorFactory)) && ((null !== input.
|
|
203
|
-
path: _path + ".computed",
|
|
204
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
205
|
-
value: input.computed
|
|
206
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
207
|
-
path: _path + ".computed",
|
|
208
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
209
|
-
value: input.computed
|
|
210
|
-
}, errorFactory)) && $ao3(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
211
|
-
path: _path + ".computed",
|
|
212
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
213
|
-
value: input.computed
|
|
214
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
180
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
215
181
|
path: _path + ".index",
|
|
216
182
|
expected: "(__type.o1 | undefined)",
|
|
217
183
|
value: input.index
|
|
218
|
-
}, errorFactory)) && $
|
|
184
|
+
}, errorFactory)) && $ao3(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
219
185
|
path: _path + ".index",
|
|
220
186
|
expected: "(__type.o1 | undefined)",
|
|
221
187
|
value: input.index
|
|
@@ -228,34 +194,7 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
228
194
|
expected: "(Array<unknown> | undefined)",
|
|
229
195
|
value: input.oneOf
|
|
230
196
|
}, errorFactory));
|
|
231
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("
|
|
232
|
-
path: _path + ".length",
|
|
233
|
-
expected: "number",
|
|
234
|
-
value: input.length
|
|
235
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
236
|
-
path: _path + ".__context",
|
|
237
|
-
expected: "(object | undefined)",
|
|
238
|
-
value: input.__context
|
|
239
|
-
}, errorFactory)) && $ao4(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
240
|
-
path: _path + ".__context",
|
|
241
|
-
expected: "(object | undefined)",
|
|
242
|
-
value: input.__context
|
|
243
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
244
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
245
|
-
return true;
|
|
246
|
-
const value = input[key];
|
|
247
|
-
if (undefined === value)
|
|
248
|
-
return true;
|
|
249
|
-
if ("number" === typeof Number(key))
|
|
250
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
251
|
-
path: _path + $join(key),
|
|
252
|
-
expected: "string",
|
|
253
|
-
value: value
|
|
254
|
-
}, errorFactory);
|
|
255
|
-
return true;
|
|
256
|
-
}));
|
|
257
|
-
const $ao4 = (input, _path, _exceptionable = true) => true;
|
|
258
|
-
const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
197
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
259
198
|
path: _path + ".label",
|
|
260
199
|
expected: "string",
|
|
261
200
|
value: input.label
|
|
@@ -264,7 +203,7 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
264
203
|
expected: "string",
|
|
265
204
|
value: input.path
|
|
266
205
|
}, errorFactory));
|
|
267
|
-
const $
|
|
206
|
+
const $ao4 = (input, _path, _exceptionable = true) => (null !== input.panel || $guard(_exceptionable, {
|
|
268
207
|
path: _path + ".panel",
|
|
269
208
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
270
209
|
value: input.panel
|
|
@@ -297,7 +236,7 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
297
236
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
298
237
|
value: input.editor
|
|
299
238
|
}, errorFactory)));
|
|
300
|
-
const $
|
|
239
|
+
const $ao5 = (input, _path, _exceptionable = true) => ("divider" === input.type || $guard(_exceptionable, {
|
|
301
240
|
path: _path + ".type",
|
|
302
241
|
expected: "\"divider\"",
|
|
303
242
|
value: input.type
|
|
@@ -306,7 +245,7 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
306
245
|
expected: "(string | undefined)",
|
|
307
246
|
value: input.title
|
|
308
247
|
}, errorFactory));
|
|
309
|
-
const $
|
|
248
|
+
const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.property || $guard(_exceptionable, {
|
|
310
249
|
path: _path + ".property",
|
|
311
250
|
expected: "string",
|
|
312
251
|
value: input.property
|
|
@@ -322,12 +261,12 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
322
261
|
path: _path + ".widget",
|
|
323
262
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
324
263
|
value: input.widget
|
|
325
|
-
}, errorFactory)) && $
|
|
264
|
+
}, errorFactory)) && $ao7(input.widget, _path + ".widget", true && _exceptionable) || $guard(_exceptionable, {
|
|
326
265
|
path: _path + ".widget",
|
|
327
266
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
328
267
|
value: input.widget
|
|
329
268
|
}, errorFactory)));
|
|
330
|
-
const $
|
|
269
|
+
const $ao7 = (input, _path, _exceptionable = true) => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type || $guard(_exceptionable, {
|
|
331
270
|
path: _path + ".type",
|
|
332
271
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\")",
|
|
333
272
|
value: input.type
|
|
@@ -336,21 +275,21 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
336
275
|
expected: "(boolean | undefined)",
|
|
337
276
|
value: input.readOnly
|
|
338
277
|
}, errorFactory));
|
|
339
|
-
const $
|
|
278
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("number" === typeof input.length || $guard(_exceptionable, {
|
|
340
279
|
path: _path + ".length",
|
|
341
280
|
expected: "number",
|
|
342
281
|
value: input.length
|
|
343
|
-
}, errorFactory)) && (
|
|
282
|
+
}, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
344
283
|
path: _path + ".__context",
|
|
345
|
-
expected: "
|
|
284
|
+
expected: "object",
|
|
346
285
|
value: input.__context
|
|
347
|
-
}, errorFactory)) && $
|
|
286
|
+
}, errorFactory)) && $ao9(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
348
287
|
path: _path + ".__context",
|
|
349
|
-
expected: "
|
|
288
|
+
expected: "object",
|
|
350
289
|
value: input.__context
|
|
351
|
-
}, errorFactory)) && (
|
|
290
|
+
}, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
352
291
|
path: _path + ".__returnValue",
|
|
353
|
-
expected: "
|
|
292
|
+
expected: "string",
|
|
354
293
|
value: input.__returnValue
|
|
355
294
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
356
295
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
@@ -366,11 +305,12 @@ export const assertPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
366
305
|
}, errorFactory);
|
|
367
306
|
return true;
|
|
368
307
|
}));
|
|
308
|
+
const $ao9 = (input, _path, _exceptionable = true) => true;
|
|
369
309
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
370
310
|
if (undefined !== input.type)
|
|
371
|
-
return $
|
|
311
|
+
return $ao5(input, _path, true && _exceptionable);
|
|
372
312
|
else if (undefined !== input.property)
|
|
373
|
-
return $
|
|
313
|
+
return $ao6(input, _path, true && _exceptionable);
|
|
374
314
|
else
|
|
375
315
|
return $guard(_exceptionable, {
|
|
376
316
|
path: _path,
|
|
@@ -438,17 +378,17 @@ export const randomPanelDomainPanelRecord = generator => {
|
|
|
438
378
|
])(),
|
|
439
379
|
layout: $pick([
|
|
440
380
|
() => undefined,
|
|
441
|
-
() => $
|
|
381
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
442
382
|
])(),
|
|
443
383
|
filter: $pick([
|
|
444
384
|
() => undefined,
|
|
445
385
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
446
|
-
() => $
|
|
386
|
+
() => $ro8(_recursive, _recursive ? 1 + _depth : _depth)
|
|
447
387
|
])(),
|
|
448
388
|
expand: $pick([
|
|
449
389
|
() => undefined,
|
|
450
390
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
451
|
-
() => $
|
|
391
|
+
() => $ro8(_recursive, _recursive ? 1 + _depth : _depth)
|
|
452
392
|
])()
|
|
453
393
|
});
|
|
454
394
|
const $ro1 = (_recursive = false, _depth = 0) => {
|
|
@@ -484,13 +424,12 @@ export const randomPanelDomainPanelRecord = generator => {
|
|
|
484
424
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
485
425
|
])(),
|
|
486
426
|
computed: $pick([
|
|
487
|
-
() =>
|
|
488
|
-
() =>
|
|
489
|
-
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
427
|
+
() => "any type used...",
|
|
428
|
+
() => undefined
|
|
490
429
|
])(),
|
|
491
430
|
index: $pick([
|
|
492
431
|
() => undefined,
|
|
493
|
-
() => $
|
|
432
|
+
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
494
433
|
])(),
|
|
495
434
|
required: $pick([
|
|
496
435
|
() => undefined,
|
|
@@ -501,50 +440,34 @@ export const randomPanelDomainPanelRecord = generator => {
|
|
|
501
440
|
() => (generator?.array ?? $generator.array)(() => "any type used...")
|
|
502
441
|
])()
|
|
503
442
|
});
|
|
504
|
-
const $ro3 = (_recursive = false, _depth = 0) => {
|
|
505
|
-
const output = {
|
|
506
|
-
length: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
507
|
-
__context: $pick([
|
|
508
|
-
() => undefined,
|
|
509
|
-
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
510
|
-
])(),
|
|
511
|
-
__returnValue: $pick([
|
|
512
|
-
() => "any type used...",
|
|
513
|
-
() => undefined
|
|
514
|
-
])()
|
|
515
|
-
};
|
|
516
|
-
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
517
|
-
return output;
|
|
518
|
-
};
|
|
519
|
-
const $ro4 = (_recursive = false, _depth = 0) => {};
|
|
520
|
-
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
443
|
+
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
521
444
|
label: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
522
445
|
path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
523
446
|
});
|
|
524
|
-
const $
|
|
447
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
525
448
|
panel: $pick([
|
|
526
449
|
() => undefined,
|
|
527
450
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
528
451
|
() => $ra0(generator?.length ?? $generator.length, false, true, 0),
|
|
529
|
-
() => $
|
|
530
|
-
() => $
|
|
452
|
+
() => $ro5(_recursive, _recursive ? 1 + _depth : _depth),
|
|
453
|
+
() => $ro6(_recursive, _recursive ? 1 + _depth : _depth)
|
|
531
454
|
])(),
|
|
532
455
|
editor: $pick([
|
|
533
456
|
() => undefined,
|
|
534
457
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
535
458
|
() => $ra0(generator?.length ?? $generator.length, false, true, 0),
|
|
536
|
-
() => $
|
|
537
|
-
() => $
|
|
459
|
+
() => $ro5(_recursive, _recursive ? 1 + _depth : _depth),
|
|
460
|
+
() => $ro6(_recursive, _recursive ? 1 + _depth : _depth)
|
|
538
461
|
])()
|
|
539
462
|
});
|
|
540
|
-
const $
|
|
463
|
+
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
541
464
|
type: "divider",
|
|
542
465
|
title: $pick([
|
|
543
466
|
() => undefined,
|
|
544
467
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
545
468
|
])()
|
|
546
469
|
});
|
|
547
|
-
const $
|
|
470
|
+
const $ro6 = (_recursive = false, _depth = 0) => ({
|
|
548
471
|
property: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
549
472
|
width: $pick([
|
|
550
473
|
() => undefined,
|
|
@@ -560,10 +483,10 @@ export const randomPanelDomainPanelRecord = generator => {
|
|
|
560
483
|
() => "poster",
|
|
561
484
|
() => "textarea",
|
|
562
485
|
() => "tags",
|
|
563
|
-
() => $
|
|
486
|
+
() => $ro7(_recursive, _recursive ? 1 + _depth : _depth)
|
|
564
487
|
])()
|
|
565
488
|
});
|
|
566
|
-
const $
|
|
489
|
+
const $ro7 = (_recursive = false, _depth = 0) => ({
|
|
567
490
|
type: $pick([
|
|
568
491
|
() => "default",
|
|
569
492
|
() => "assetTypes",
|
|
@@ -578,56 +501,40 @@ export const randomPanelDomainPanelRecord = generator => {
|
|
|
578
501
|
() => (generator?.boolean ?? $generator.boolean)()
|
|
579
502
|
])()
|
|
580
503
|
});
|
|
581
|
-
const $
|
|
504
|
+
const $ro8 = (_recursive = false, _depth = 0) => {
|
|
582
505
|
const output = {
|
|
583
506
|
length: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
584
|
-
__context: $
|
|
585
|
-
|
|
586
|
-
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
587
|
-
])(),
|
|
588
|
-
__returnValue: $pick([
|
|
589
|
-
() => undefined,
|
|
590
|
-
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
591
|
-
])()
|
|
507
|
+
__context: $ro9(_recursive, _recursive ? 1 + _depth : _depth),
|
|
508
|
+
__returnValue: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
592
509
|
};
|
|
593
510
|
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
594
511
|
return output;
|
|
595
512
|
};
|
|
513
|
+
const $ro9 = (_recursive = false, _depth = 0) => {};
|
|
596
514
|
const $ra0 = (length, unique, _recursive = true, _depth = 0) => 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
597
515
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
598
516
|
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
599
|
-
() => $
|
|
600
|
-
() => $
|
|
517
|
+
() => $ro5(true, _recursive ? 1 + _depth : _depth),
|
|
518
|
+
() => $ro6(true, _recursive ? 1 + _depth : _depth)
|
|
601
519
|
])(), length, unique) : [];
|
|
602
520
|
return $ro0();
|
|
603
521
|
};
|
|
604
522
|
export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
605
523
|
const __is = input => {
|
|
606
|
-
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $
|
|
524
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority) && (undefined === input.editorPriority || "number" === typeof input.editorPriority) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io4(input.layout)) && (null !== input.filter && (undefined === input.filter || "string" === typeof input.filter || "object" === typeof input.filter && null !== input.filter && $io8(input.filter))) && (null !== input.expand && (undefined === input.expand || "string" === typeof input.expand || "object" === typeof input.expand && null !== input.expand && $io8(input.expand)));
|
|
607
525
|
const $io1 = input => Object.keys(input).every(key => {
|
|
608
526
|
const value = input[key];
|
|
609
527
|
if (undefined === value)
|
|
610
528
|
return true;
|
|
611
529
|
return "object" === typeof value && null !== value && $io2(value);
|
|
612
530
|
});
|
|
613
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
614
|
-
const $io3 = input => "
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
if ("number" === typeof Number(key))
|
|
621
|
-
return "string" === typeof value;
|
|
622
|
-
return true;
|
|
623
|
-
});
|
|
624
|
-
const $io4 = input => true;
|
|
625
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
626
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
627
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
628
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
629
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
630
|
-
const $io10 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
531
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
532
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
533
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
534
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
535
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
536
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
537
|
+
const $io8 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
631
538
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
632
539
|
return true;
|
|
633
540
|
const value = input[key];
|
|
@@ -639,9 +546,9 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
639
546
|
});
|
|
640
547
|
const $iu0 = input => (() => {
|
|
641
548
|
if (undefined !== input.type)
|
|
642
|
-
return $
|
|
549
|
+
return $io5(input);
|
|
643
550
|
else if (undefined !== input.property)
|
|
644
|
-
return $
|
|
551
|
+
return $io6(input);
|
|
645
552
|
else
|
|
646
553
|
return false;
|
|
647
554
|
})();
|
|
@@ -692,33 +599,33 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
692
599
|
path: _path + ".layout",
|
|
693
600
|
expected: "(__type.o2 | undefined)",
|
|
694
601
|
value: input.layout
|
|
695
|
-
}, errorFactory)) && $
|
|
602
|
+
}, errorFactory)) && $ao4(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
696
603
|
path: _path + ".layout",
|
|
697
604
|
expected: "(__type.o2 | undefined)",
|
|
698
605
|
value: input.layout
|
|
699
606
|
}, errorFactory)) && ((null !== input.filter || $guard(_exceptionable, {
|
|
700
607
|
path: _path + ".filter",
|
|
701
|
-
expected: "(String & { __context
|
|
608
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
702
609
|
value: input.filter
|
|
703
610
|
}, errorFactory)) && (undefined === input.filter || "string" === typeof input.filter || ("object" === typeof input.filter && null !== input.filter || $guard(_exceptionable, {
|
|
704
611
|
path: _path + ".filter",
|
|
705
|
-
expected: "(String & { __context
|
|
612
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
706
613
|
value: input.filter
|
|
707
|
-
}, errorFactory)) && $
|
|
614
|
+
}, errorFactory)) && $ao8(input.filter, _path + ".filter", true && _exceptionable) || $guard(_exceptionable, {
|
|
708
615
|
path: _path + ".filter",
|
|
709
|
-
expected: "(String & { __context
|
|
616
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
710
617
|
value: input.filter
|
|
711
618
|
}, errorFactory))) && ((null !== input.expand || $guard(_exceptionable, {
|
|
712
619
|
path: _path + ".expand",
|
|
713
|
-
expected: "(String & { __context
|
|
620
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
714
621
|
value: input.expand
|
|
715
622
|
}, errorFactory)) && (undefined === input.expand || "string" === typeof input.expand || ("object" === typeof input.expand && null !== input.expand || $guard(_exceptionable, {
|
|
716
623
|
path: _path + ".expand",
|
|
717
|
-
expected: "(String & { __context
|
|
624
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
718
625
|
value: input.expand
|
|
719
|
-
}, errorFactory)) && $
|
|
626
|
+
}, errorFactory)) && $ao8(input.expand, _path + ".expand", true && _exceptionable) || $guard(_exceptionable, {
|
|
720
627
|
path: _path + ".expand",
|
|
721
|
-
expected: "(String & { __context
|
|
628
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
722
629
|
value: input.expand
|
|
723
630
|
}, errorFactory)));
|
|
724
631
|
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
@@ -755,23 +662,11 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
755
662
|
path: _path + ".path",
|
|
756
663
|
expected: "(string | undefined)",
|
|
757
664
|
value: input.path
|
|
758
|
-
}, errorFactory)) && ((null !== input.
|
|
759
|
-
path: _path + ".computed",
|
|
760
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
761
|
-
value: input.computed
|
|
762
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
763
|
-
path: _path + ".computed",
|
|
764
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
765
|
-
value: input.computed
|
|
766
|
-
}, errorFactory)) && $ao3(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
767
|
-
path: _path + ".computed",
|
|
768
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
769
|
-
value: input.computed
|
|
770
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
665
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
771
666
|
path: _path + ".index",
|
|
772
667
|
expected: "(__type.o1 | undefined)",
|
|
773
668
|
value: input.index
|
|
774
|
-
}, errorFactory)) && $
|
|
669
|
+
}, errorFactory)) && $ao3(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
775
670
|
path: _path + ".index",
|
|
776
671
|
expected: "(__type.o1 | undefined)",
|
|
777
672
|
value: input.index
|
|
@@ -784,34 +679,7 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
784
679
|
expected: "(Array<unknown> | undefined)",
|
|
785
680
|
value: input.oneOf
|
|
786
681
|
}, errorFactory));
|
|
787
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("
|
|
788
|
-
path: _path + ".length",
|
|
789
|
-
expected: "number",
|
|
790
|
-
value: input.length
|
|
791
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
792
|
-
path: _path + ".__context",
|
|
793
|
-
expected: "(object | undefined)",
|
|
794
|
-
value: input.__context
|
|
795
|
-
}, errorFactory)) && $ao4(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
796
|
-
path: _path + ".__context",
|
|
797
|
-
expected: "(object | undefined)",
|
|
798
|
-
value: input.__context
|
|
799
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
800
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
801
|
-
return true;
|
|
802
|
-
const value = input[key];
|
|
803
|
-
if (undefined === value)
|
|
804
|
-
return true;
|
|
805
|
-
if ("number" === typeof Number(key))
|
|
806
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
807
|
-
path: _path + $join(key),
|
|
808
|
-
expected: "string",
|
|
809
|
-
value: value
|
|
810
|
-
}, errorFactory);
|
|
811
|
-
return true;
|
|
812
|
-
}));
|
|
813
|
-
const $ao4 = (input, _path, _exceptionable = true) => true;
|
|
814
|
-
const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
682
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
815
683
|
path: _path + ".label",
|
|
816
684
|
expected: "string",
|
|
817
685
|
value: input.label
|
|
@@ -820,7 +688,7 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
820
688
|
expected: "string",
|
|
821
689
|
value: input.path
|
|
822
690
|
}, errorFactory));
|
|
823
|
-
const $
|
|
691
|
+
const $ao4 = (input, _path, _exceptionable = true) => (null !== input.panel || $guard(_exceptionable, {
|
|
824
692
|
path: _path + ".panel",
|
|
825
693
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
826
694
|
value: input.panel
|
|
@@ -853,7 +721,7 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
853
721
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
854
722
|
value: input.editor
|
|
855
723
|
}, errorFactory)));
|
|
856
|
-
const $
|
|
724
|
+
const $ao5 = (input, _path, _exceptionable = true) => ("divider" === input.type || $guard(_exceptionable, {
|
|
857
725
|
path: _path + ".type",
|
|
858
726
|
expected: "\"divider\"",
|
|
859
727
|
value: input.type
|
|
@@ -862,7 +730,7 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
862
730
|
expected: "(string | undefined)",
|
|
863
731
|
value: input.title
|
|
864
732
|
}, errorFactory));
|
|
865
|
-
const $
|
|
733
|
+
const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.property || $guard(_exceptionable, {
|
|
866
734
|
path: _path + ".property",
|
|
867
735
|
expected: "string",
|
|
868
736
|
value: input.property
|
|
@@ -878,12 +746,12 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
878
746
|
path: _path + ".widget",
|
|
879
747
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
880
748
|
value: input.widget
|
|
881
|
-
}, errorFactory)) && $
|
|
749
|
+
}, errorFactory)) && $ao7(input.widget, _path + ".widget", true && _exceptionable) || $guard(_exceptionable, {
|
|
882
750
|
path: _path + ".widget",
|
|
883
751
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
884
752
|
value: input.widget
|
|
885
753
|
}, errorFactory)));
|
|
886
|
-
const $
|
|
754
|
+
const $ao7 = (input, _path, _exceptionable = true) => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type || $guard(_exceptionable, {
|
|
887
755
|
path: _path + ".type",
|
|
888
756
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\")",
|
|
889
757
|
value: input.type
|
|
@@ -892,21 +760,21 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
892
760
|
expected: "(boolean | undefined)",
|
|
893
761
|
value: input.readOnly
|
|
894
762
|
}, errorFactory));
|
|
895
|
-
const $
|
|
763
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("number" === typeof input.length || $guard(_exceptionable, {
|
|
896
764
|
path: _path + ".length",
|
|
897
765
|
expected: "number",
|
|
898
766
|
value: input.length
|
|
899
|
-
}, errorFactory)) && (
|
|
767
|
+
}, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
900
768
|
path: _path + ".__context",
|
|
901
|
-
expected: "
|
|
769
|
+
expected: "object",
|
|
902
770
|
value: input.__context
|
|
903
|
-
}, errorFactory)) && $
|
|
771
|
+
}, errorFactory)) && $ao9(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
904
772
|
path: _path + ".__context",
|
|
905
|
-
expected: "
|
|
773
|
+
expected: "object",
|
|
906
774
|
value: input.__context
|
|
907
|
-
}, errorFactory)) && (
|
|
775
|
+
}, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
908
776
|
path: _path + ".__returnValue",
|
|
909
|
-
expected: "
|
|
777
|
+
expected: "string",
|
|
910
778
|
value: input.__returnValue
|
|
911
779
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
912
780
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
@@ -922,11 +790,12 @@ export const assertGuardPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
922
790
|
}, errorFactory);
|
|
923
791
|
return true;
|
|
924
792
|
}));
|
|
793
|
+
const $ao9 = (input, _path, _exceptionable = true) => true;
|
|
925
794
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
926
795
|
if (undefined !== input.type)
|
|
927
|
-
return $
|
|
796
|
+
return $ao5(input, _path, true && _exceptionable);
|
|
928
797
|
else if (undefined !== input.property)
|
|
929
|
-
return $
|
|
798
|
+
return $ao6(input, _path, true && _exceptionable);
|
|
930
799
|
else
|
|
931
800
|
return $guard(_exceptionable, {
|
|
932
801
|
path: _path,
|
|
@@ -973,24 +842,13 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
973
842
|
return true;
|
|
974
843
|
return "object" === typeof value && null !== value && $io2(value);
|
|
975
844
|
});
|
|
976
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
977
|
-
const $io3 = input => "
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
if ("number" === typeof Number(key))
|
|
984
|
-
return "string" === typeof value;
|
|
985
|
-
return true;
|
|
986
|
-
});
|
|
987
|
-
const $io4 = input => true;
|
|
988
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
989
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
990
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
991
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
992
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
993
|
-
const $io10 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
845
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
846
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
847
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
848
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
849
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
850
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
851
|
+
const $io8 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io9(input.__context)) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
994
852
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
995
853
|
return true;
|
|
996
854
|
const value = input[key];
|
|
@@ -1000,11 +858,12 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1000
858
|
return "string" === typeof value;
|
|
1001
859
|
return true;
|
|
1002
860
|
});
|
|
861
|
+
const $io9 = input => true;
|
|
1003
862
|
const $iu0 = input => (() => {
|
|
1004
863
|
if (undefined !== input.type)
|
|
1005
|
-
return $
|
|
864
|
+
return $io5(input);
|
|
1006
865
|
else if (undefined !== input.property)
|
|
1007
|
-
return $
|
|
866
|
+
return $io6(input);
|
|
1008
867
|
else
|
|
1009
868
|
return false;
|
|
1010
869
|
})();
|
|
@@ -1021,37 +880,28 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1021
880
|
expected: "(Array<string> | string | undefined)",
|
|
1022
881
|
value: input.supports
|
|
1023
882
|
});
|
|
1024
|
-
})() : undefined},`}${undefined === input.priority ? "" : `"priority":${undefined !== input.priority ? input.priority : undefined},`}${undefined === input.editorPriority ? "" : `"editorPriority":${undefined !== input.editorPriority ? input.editorPriority : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? $so1(input.properties) : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $
|
|
883
|
+
})() : undefined},`}${undefined === input.priority ? "" : `"priority":${undefined !== input.priority ? input.priority : undefined},`}${undefined === input.editorPriority ? "" : `"editorPriority":${undefined !== input.editorPriority ? input.editorPriority : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? $so1(input.properties) : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $so4(input.layout) : undefined},`}${undefined === input.filter ? "" : `"filter":${undefined !== input.filter ? (() => {
|
|
1025
884
|
if ("string" === typeof input.filter)
|
|
1026
885
|
return $string(input.filter);
|
|
1027
886
|
if ("object" === typeof input.filter && null !== input.filter)
|
|
1028
|
-
return $
|
|
887
|
+
return $so8(input.filter);
|
|
1029
888
|
$throws({
|
|
1030
|
-
expected: "(String & { __context
|
|
889
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1031
890
|
value: input.filter
|
|
1032
891
|
});
|
|
1033
892
|
})() : undefined},`}${undefined === input.expand ? "" : `"expand":${undefined !== input.expand ? (() => {
|
|
1034
893
|
if ("string" === typeof input.expand)
|
|
1035
894
|
return $string(input.expand);
|
|
1036
895
|
if ("object" === typeof input.expand && null !== input.expand)
|
|
1037
|
-
return $
|
|
896
|
+
return $so8(input.expand);
|
|
1038
897
|
$throws({
|
|
1039
|
-
expected: "(String & { __context
|
|
898
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1040
899
|
value: input.expand
|
|
1041
900
|
});
|
|
1042
901
|
})() : undefined}`}`)}}`;
|
|
1043
902
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1044
903
|
return ""; return `${JSON.stringify(key)}:${$so2(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1045
|
-
const $so2 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed ? "" : `"computed":${undefined !== input.computed ? (() => {
|
|
1046
|
-
if ("string" === typeof input.computed)
|
|
1047
|
-
return $string(input.computed);
|
|
1048
|
-
if ("object" === typeof input.computed && null !== input.computed)
|
|
1049
|
-
return $so3(input.computed);
|
|
1050
|
-
$throws({
|
|
1051
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1052
|
-
value: input.computed
|
|
1053
|
-
});
|
|
1054
|
-
})() : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
904
|
+
const $so2 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed || "function" === typeof input.computed ? "" : `"computed":${undefined !== input.computed ? JSON.stringify(input.computed) : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
1055
905
|
if ("string" === typeof input.type)
|
|
1056
906
|
return $string(input.type);
|
|
1057
907
|
if ("string" === typeof input.type)
|
|
@@ -1061,11 +911,7 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1061
911
|
value: input.type
|
|
1062
912
|
});
|
|
1063
913
|
})()}}`;
|
|
1064
|
-
const $
|
|
1065
|
-
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
1066
|
-
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
1067
|
-
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1068
|
-
const $so6 = input => `{${$tail(`${undefined === input.panel ? "" : `"panel":${undefined !== input.panel ? (() => {
|
|
914
|
+
const $so4 = input => `{${$tail(`${undefined === input.panel ? "" : `"panel":${undefined !== input.panel ? (() => {
|
|
1069
915
|
if ("string" === typeof input.panel)
|
|
1070
916
|
return $string(input.panel);
|
|
1071
917
|
if (Array.isArray(input.panel))
|
|
@@ -1088,7 +934,7 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1088
934
|
value: input.editor
|
|
1089
935
|
});
|
|
1090
936
|
})() : undefined}`}`)}}`;
|
|
1091
|
-
const $
|
|
937
|
+
const $so5 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}"type":${(() => {
|
|
1092
938
|
if ("string" === typeof input.type)
|
|
1093
939
|
return $string(input.type);
|
|
1094
940
|
if ("string" === typeof input.type)
|
|
@@ -1098,7 +944,7 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1098
944
|
value: input.type
|
|
1099
945
|
});
|
|
1100
946
|
})()}}`;
|
|
1101
|
-
const $
|
|
947
|
+
const $so6 = input => `{${undefined === input.width ? "" : `"width":${undefined !== input.width ? (() => {
|
|
1102
948
|
if ("string" === typeof input.width)
|
|
1103
949
|
return $string(input.width);
|
|
1104
950
|
if ("number" === typeof input.width)
|
|
@@ -1113,13 +959,13 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1113
959
|
if ("string" === typeof input.widget)
|
|
1114
960
|
return "\"" + input.widget + "\"";
|
|
1115
961
|
if ("object" === typeof input.widget && null !== input.widget)
|
|
1116
|
-
return $
|
|
962
|
+
return $so7(input.widget);
|
|
1117
963
|
$throws({
|
|
1118
964
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
1119
965
|
value: input.widget
|
|
1120
966
|
});
|
|
1121
967
|
})() : undefined},`}"property":${$string(input.property)}}`;
|
|
1122
|
-
const $
|
|
968
|
+
const $so7 = input => `{${undefined === input.readOnly ? "" : `"readOnly":${undefined !== input.readOnly ? input.readOnly : undefined},`}"type":${(() => {
|
|
1123
969
|
if ("string" === typeof input.type)
|
|
1124
970
|
return $string(input.type);
|
|
1125
971
|
if ("string" === typeof input.type)
|
|
@@ -1129,15 +975,15 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1129
975
|
value: input.type
|
|
1130
976
|
});
|
|
1131
977
|
})()}}`;
|
|
1132
|
-
const $
|
|
1133
|
-
return ""; if (["
|
|
978
|
+
const $so8 = input => `{${$tail(`"length":${input.length},"__context":{},"__returnValue":${$string(input.__returnValue)},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
979
|
+
return ""; if (["length", "__context", "__returnValue"].some(regular => regular === key))
|
|
1134
980
|
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
1135
981
|
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1136
982
|
const $su0 = input => (() => {
|
|
1137
983
|
if (undefined !== input.type)
|
|
1138
|
-
return $
|
|
984
|
+
return $so5(input);
|
|
1139
985
|
else if (undefined !== input.property)
|
|
1140
|
-
return $
|
|
986
|
+
return $so6(input);
|
|
1141
987
|
else
|
|
1142
988
|
$throws({
|
|
1143
989
|
expected: "(PanelLayoutDivider | PanelLayoutItem)",
|
|
@@ -1160,31 +1006,20 @@ export const stringifyPanelDomainPanelRecord = input => {
|
|
|
1160
1006
|
};
|
|
1161
1007
|
export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1162
1008
|
const __is = input => {
|
|
1163
|
-
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority && !Number.isNaN(input.priority)) && (undefined === input.editorPriority || "number" === typeof input.editorPriority && !Number.isNaN(input.editorPriority)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $
|
|
1009
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (null !== input.supports && (undefined === input.supports || "string" === typeof input.supports || Array.isArray(input.supports) && input.supports.every(elem => "string" === typeof elem))) && (undefined === input.priority || "number" === typeof input.priority && !Number.isNaN(input.priority)) && (undefined === input.editorPriority || "number" === typeof input.editorPriority && !Number.isNaN(input.editorPriority)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io4(input.layout)) && (null !== input.filter && (undefined === input.filter || "string" === typeof input.filter || "object" === typeof input.filter && null !== input.filter && $io8(input.filter))) && (null !== input.expand && (undefined === input.expand || "string" === typeof input.expand || "object" === typeof input.expand && null !== input.expand && $io8(input.expand)));
|
|
1164
1010
|
const $io1 = input => Object.keys(input).every(key => {
|
|
1165
1011
|
const value = input[key];
|
|
1166
1012
|
if (undefined === value)
|
|
1167
1013
|
return true;
|
|
1168
1014
|
return "object" === typeof value && null !== value && $io2(value);
|
|
1169
1015
|
});
|
|
1170
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
1171
|
-
const $io3 = input => "
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
1178
|
-
return "string" === typeof value;
|
|
1179
|
-
return true;
|
|
1180
|
-
});
|
|
1181
|
-
const $io4 = input => true;
|
|
1182
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1183
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
1184
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
1185
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
1186
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
1187
|
-
const $io10 = input => "number" === typeof input.length && !Number.isNaN(input.length) && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
1016
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1017
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1018
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
1019
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
1020
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
1021
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
1022
|
+
const $io8 = input => "number" === typeof input.length && !Number.isNaN(input.length) && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
1188
1023
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1189
1024
|
return true;
|
|
1190
1025
|
const value = input[key];
|
|
@@ -1196,9 +1031,9 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1196
1031
|
});
|
|
1197
1032
|
const $iu0 = input => (() => {
|
|
1198
1033
|
if (undefined !== input.type)
|
|
1199
|
-
return $
|
|
1034
|
+
return $io5(input);
|
|
1200
1035
|
else if (undefined !== input.property)
|
|
1201
|
-
return $
|
|
1036
|
+
return $io6(input);
|
|
1202
1037
|
else
|
|
1203
1038
|
return false;
|
|
1204
1039
|
})();
|
|
@@ -1249,33 +1084,33 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1249
1084
|
path: _path + ".layout",
|
|
1250
1085
|
expected: "(__type.o2 | undefined)",
|
|
1251
1086
|
value: input.layout
|
|
1252
|
-
}, errorFactory)) && $
|
|
1087
|
+
}, errorFactory)) && $ao4(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
1253
1088
|
path: _path + ".layout",
|
|
1254
1089
|
expected: "(__type.o2 | undefined)",
|
|
1255
1090
|
value: input.layout
|
|
1256
1091
|
}, errorFactory)) && ((null !== input.filter || $guard(_exceptionable, {
|
|
1257
1092
|
path: _path + ".filter",
|
|
1258
|
-
expected: "(String & { __context
|
|
1093
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1259
1094
|
value: input.filter
|
|
1260
1095
|
}, errorFactory)) && (undefined === input.filter || "string" === typeof input.filter || ("object" === typeof input.filter && null !== input.filter || $guard(_exceptionable, {
|
|
1261
1096
|
path: _path + ".filter",
|
|
1262
|
-
expected: "(String & { __context
|
|
1097
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1263
1098
|
value: input.filter
|
|
1264
|
-
}, errorFactory)) && $
|
|
1099
|
+
}, errorFactory)) && $ao8(input.filter, _path + ".filter", true && _exceptionable) || $guard(_exceptionable, {
|
|
1265
1100
|
path: _path + ".filter",
|
|
1266
|
-
expected: "(String & { __context
|
|
1101
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1267
1102
|
value: input.filter
|
|
1268
1103
|
}, errorFactory))) && ((null !== input.expand || $guard(_exceptionable, {
|
|
1269
1104
|
path: _path + ".expand",
|
|
1270
|
-
expected: "(String & { __context
|
|
1105
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1271
1106
|
value: input.expand
|
|
1272
1107
|
}, errorFactory)) && (undefined === input.expand || "string" === typeof input.expand || ("object" === typeof input.expand && null !== input.expand || $guard(_exceptionable, {
|
|
1273
1108
|
path: _path + ".expand",
|
|
1274
|
-
expected: "(String & { __context
|
|
1109
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1275
1110
|
value: input.expand
|
|
1276
|
-
}, errorFactory)) && $
|
|
1111
|
+
}, errorFactory)) && $ao8(input.expand, _path + ".expand", true && _exceptionable) || $guard(_exceptionable, {
|
|
1277
1112
|
path: _path + ".expand",
|
|
1278
|
-
expected: "(String & { __context
|
|
1113
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1279
1114
|
value: input.expand
|
|
1280
1115
|
}, errorFactory)));
|
|
1281
1116
|
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
@@ -1312,23 +1147,11 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1312
1147
|
path: _path + ".path",
|
|
1313
1148
|
expected: "(string | undefined)",
|
|
1314
1149
|
value: input.path
|
|
1315
|
-
}, errorFactory)) && ((null !== input.
|
|
1316
|
-
path: _path + ".computed",
|
|
1317
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1318
|
-
value: input.computed
|
|
1319
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
1320
|
-
path: _path + ".computed",
|
|
1321
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1322
|
-
value: input.computed
|
|
1323
|
-
}, errorFactory)) && $ao3(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
1324
|
-
path: _path + ".computed",
|
|
1325
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1326
|
-
value: input.computed
|
|
1327
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1150
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1328
1151
|
path: _path + ".index",
|
|
1329
1152
|
expected: "(__type.o1 | undefined)",
|
|
1330
1153
|
value: input.index
|
|
1331
|
-
}, errorFactory)) && $
|
|
1154
|
+
}, errorFactory)) && $ao3(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
1332
1155
|
path: _path + ".index",
|
|
1333
1156
|
expected: "(__type.o1 | undefined)",
|
|
1334
1157
|
value: input.index
|
|
@@ -1341,34 +1164,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1341
1164
|
expected: "(Array<unknown> | undefined)",
|
|
1342
1165
|
value: input.oneOf
|
|
1343
1166
|
}, errorFactory));
|
|
1344
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("
|
|
1345
|
-
path: _path + ".length",
|
|
1346
|
-
expected: "number",
|
|
1347
|
-
value: input.length
|
|
1348
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
1349
|
-
path: _path + ".__context",
|
|
1350
|
-
expected: "(object | undefined)",
|
|
1351
|
-
value: input.__context
|
|
1352
|
-
}, errorFactory)) && $ao4(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
1353
|
-
path: _path + ".__context",
|
|
1354
|
-
expected: "(object | undefined)",
|
|
1355
|
-
value: input.__context
|
|
1356
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1357
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1358
|
-
return true;
|
|
1359
|
-
const value = input[key];
|
|
1360
|
-
if (undefined === value)
|
|
1361
|
-
return true;
|
|
1362
|
-
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
1363
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
1364
|
-
path: _path + $join(key),
|
|
1365
|
-
expected: "string",
|
|
1366
|
-
value: value
|
|
1367
|
-
}, errorFactory);
|
|
1368
|
-
return true;
|
|
1369
|
-
}));
|
|
1370
|
-
const $ao4 = (input, _path, _exceptionable = true) => true;
|
|
1371
|
-
const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1167
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1372
1168
|
path: _path + ".label",
|
|
1373
1169
|
expected: "string",
|
|
1374
1170
|
value: input.label
|
|
@@ -1377,7 +1173,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1377
1173
|
expected: "string",
|
|
1378
1174
|
value: input.path
|
|
1379
1175
|
}, errorFactory));
|
|
1380
|
-
const $
|
|
1176
|
+
const $ao4 = (input, _path, _exceptionable = true) => (null !== input.panel || $guard(_exceptionable, {
|
|
1381
1177
|
path: _path + ".panel",
|
|
1382
1178
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
1383
1179
|
value: input.panel
|
|
@@ -1410,7 +1206,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1410
1206
|
expected: "(Array<PanelLayout> | PanelLayoutDivider | PanelLayoutItem | string | undefined)",
|
|
1411
1207
|
value: input.editor
|
|
1412
1208
|
}, errorFactory)));
|
|
1413
|
-
const $
|
|
1209
|
+
const $ao5 = (input, _path, _exceptionable = true) => ("divider" === input.type || $guard(_exceptionable, {
|
|
1414
1210
|
path: _path + ".type",
|
|
1415
1211
|
expected: "\"divider\"",
|
|
1416
1212
|
value: input.type
|
|
@@ -1419,7 +1215,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1419
1215
|
expected: "(string | undefined)",
|
|
1420
1216
|
value: input.title
|
|
1421
1217
|
}, errorFactory));
|
|
1422
|
-
const $
|
|
1218
|
+
const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.property || $guard(_exceptionable, {
|
|
1423
1219
|
path: _path + ".property",
|
|
1424
1220
|
expected: "string",
|
|
1425
1221
|
value: input.property
|
|
@@ -1435,12 +1231,12 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1435
1231
|
path: _path + ".widget",
|
|
1436
1232
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
1437
1233
|
value: input.widget
|
|
1438
|
-
}, errorFactory)) && $
|
|
1234
|
+
}, errorFactory)) && $ao7(input.widget, _path + ".widget", true && _exceptionable) || $guard(_exceptionable, {
|
|
1439
1235
|
path: _path + ".widget",
|
|
1440
1236
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
1441
1237
|
value: input.widget
|
|
1442
1238
|
}, errorFactory)));
|
|
1443
|
-
const $
|
|
1239
|
+
const $ao7 = (input, _path, _exceptionable = true) => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type || $guard(_exceptionable, {
|
|
1444
1240
|
path: _path + ".type",
|
|
1445
1241
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\")",
|
|
1446
1242
|
value: input.type
|
|
@@ -1449,21 +1245,21 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1449
1245
|
expected: "(boolean | undefined)",
|
|
1450
1246
|
value: input.readOnly
|
|
1451
1247
|
}, errorFactory));
|
|
1452
|
-
const $
|
|
1248
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("number" === typeof input.length && !Number.isNaN(input.length) || $guard(_exceptionable, {
|
|
1453
1249
|
path: _path + ".length",
|
|
1454
1250
|
expected: "number",
|
|
1455
1251
|
value: input.length
|
|
1456
|
-
}, errorFactory)) && (
|
|
1252
|
+
}, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
1457
1253
|
path: _path + ".__context",
|
|
1458
|
-
expected: "
|
|
1254
|
+
expected: "object",
|
|
1459
1255
|
value: input.__context
|
|
1460
|
-
}, errorFactory)) && $
|
|
1256
|
+
}, errorFactory)) && $ao9(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
1461
1257
|
path: _path + ".__context",
|
|
1462
|
-
expected: "
|
|
1258
|
+
expected: "object",
|
|
1463
1259
|
value: input.__context
|
|
1464
|
-
}, errorFactory)) && (
|
|
1260
|
+
}, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
1465
1261
|
path: _path + ".__returnValue",
|
|
1466
|
-
expected: "
|
|
1262
|
+
expected: "string",
|
|
1467
1263
|
value: input.__returnValue
|
|
1468
1264
|
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1469
1265
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
@@ -1479,11 +1275,12 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1479
1275
|
}, errorFactory);
|
|
1480
1276
|
return true;
|
|
1481
1277
|
}));
|
|
1278
|
+
const $ao9 = (input, _path, _exceptionable = true) => true;
|
|
1482
1279
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
1483
1280
|
if (undefined !== input.type)
|
|
1484
|
-
return $
|
|
1281
|
+
return $ao5(input, _path, true && _exceptionable);
|
|
1485
1282
|
else if (undefined !== input.property)
|
|
1486
|
-
return $
|
|
1283
|
+
return $ao6(input, _path, true && _exceptionable);
|
|
1487
1284
|
else
|
|
1488
1285
|
return $guard(_exceptionable, {
|
|
1489
1286
|
path: _path,
|
|
@@ -1530,24 +1327,13 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1530
1327
|
return true;
|
|
1531
1328
|
return "object" === typeof value && null !== value && $io2(value);
|
|
1532
1329
|
});
|
|
1533
|
-
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
1534
|
-
const $io3 = input => "
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
if ("number" === typeof Number(key))
|
|
1541
|
-
return "string" === typeof value;
|
|
1542
|
-
return true;
|
|
1543
|
-
});
|
|
1544
|
-
const $io4 = input => true;
|
|
1545
|
-
const $io5 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1546
|
-
const $io6 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
1547
|
-
const $io7 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
1548
|
-
const $io8 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io9(input.widget)));
|
|
1549
|
-
const $io9 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
1550
|
-
const $io10 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io4(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
1330
|
+
const $io2 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io3(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1331
|
+
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1332
|
+
const $io4 = input => null !== input.panel && (undefined === input.panel || "string" === typeof input.panel || (Array.isArray(input.panel) && ($ia0(input.panel) || false) || "object" === typeof input.panel && null !== input.panel && $iu0(input.panel))) && (null !== input.editor && (undefined === input.editor || "string" === typeof input.editor || (Array.isArray(input.editor) && ($ia0(input.editor) || false) || "object" === typeof input.editor && null !== input.editor && $iu0(input.editor))));
|
|
1333
|
+
const $io5 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title);
|
|
1334
|
+
const $io6 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "default" === input.widget || "assetTypes" === input.widget || "assetTags" === input.widget || "geopoint" === input.widget || "poster" === input.widget || "textarea" === input.widget || "tags" === input.widget || "object" === typeof input.widget && null !== input.widget && $io7(input.widget)));
|
|
1335
|
+
const $io7 = input => ("default" === input.type || "assetTypes" === input.type || "assetTags" === input.type || "geopoint" === input.type || "poster" === input.type || "textarea" === input.type || "tags" === input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly);
|
|
1336
|
+
const $io8 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io9(input.__context)) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
|
|
1551
1337
|
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1552
1338
|
return true;
|
|
1553
1339
|
const value = input[key];
|
|
@@ -1557,11 +1343,12 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1557
1343
|
return "string" === typeof value;
|
|
1558
1344
|
return true;
|
|
1559
1345
|
});
|
|
1346
|
+
const $io9 = input => true;
|
|
1560
1347
|
const $iu0 = input => (() => {
|
|
1561
1348
|
if (undefined !== input.type)
|
|
1562
|
-
return $
|
|
1349
|
+
return $io5(input);
|
|
1563
1350
|
else if (undefined !== input.property)
|
|
1564
|
-
return $
|
|
1351
|
+
return $io6(input);
|
|
1565
1352
|
else
|
|
1566
1353
|
return false;
|
|
1567
1354
|
})();
|
|
@@ -1578,37 +1365,28 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1578
1365
|
expected: "(Array<string> | string | undefined)",
|
|
1579
1366
|
value: input.supports
|
|
1580
1367
|
});
|
|
1581
|
-
})() : undefined},`}${undefined === input.priority ? "" : `"priority":${undefined !== input.priority ? input.priority : undefined},`}${undefined === input.editorPriority ? "" : `"editorPriority":${undefined !== input.editorPriority ? input.editorPriority : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? $so1(input.properties) : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $
|
|
1368
|
+
})() : undefined},`}${undefined === input.priority ? "" : `"priority":${undefined !== input.priority ? input.priority : undefined},`}${undefined === input.editorPriority ? "" : `"editorPriority":${undefined !== input.editorPriority ? input.editorPriority : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? $so1(input.properties) : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $so4(input.layout) : undefined},`}${undefined === input.filter ? "" : `"filter":${undefined !== input.filter ? (() => {
|
|
1582
1369
|
if ("string" === typeof input.filter)
|
|
1583
1370
|
return $string(input.filter);
|
|
1584
1371
|
if ("object" === typeof input.filter && null !== input.filter)
|
|
1585
|
-
return $
|
|
1372
|
+
return $so8(input.filter);
|
|
1586
1373
|
$throws({
|
|
1587
|
-
expected: "(String & { __context
|
|
1374
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1588
1375
|
value: input.filter
|
|
1589
1376
|
});
|
|
1590
1377
|
})() : undefined},`}${undefined === input.expand ? "" : `"expand":${undefined !== input.expand ? (() => {
|
|
1591
1378
|
if ("string" === typeof input.expand)
|
|
1592
1379
|
return $string(input.expand);
|
|
1593
1380
|
if ("object" === typeof input.expand && null !== input.expand)
|
|
1594
|
-
return $
|
|
1381
|
+
return $so8(input.expand);
|
|
1595
1382
|
$throws({
|
|
1596
|
-
expected: "(String & { __context
|
|
1383
|
+
expected: "(String & { __context: object; __returnValue: string; } | string | undefined)",
|
|
1597
1384
|
value: input.expand
|
|
1598
1385
|
});
|
|
1599
1386
|
})() : undefined}`}`)}}`;
|
|
1600
1387
|
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1601
1388
|
return ""; return `${JSON.stringify(key)}:${$so2(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1602
|
-
const $so2 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed ? "" : `"computed":${undefined !== input.computed ? (() => {
|
|
1603
|
-
if ("string" === typeof input.computed)
|
|
1604
|
-
return $string(input.computed);
|
|
1605
|
-
if ("object" === typeof input.computed && null !== input.computed)
|
|
1606
|
-
return $so3(input.computed);
|
|
1607
|
-
$throws({
|
|
1608
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1609
|
-
value: input.computed
|
|
1610
|
-
});
|
|
1611
|
-
})() : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
1389
|
+
const $so2 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed || "function" === typeof input.computed ? "" : `"computed":${undefined !== input.computed ? JSON.stringify(input.computed) : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
1612
1390
|
if ("string" === typeof input.type)
|
|
1613
1391
|
return $string(input.type);
|
|
1614
1392
|
if ("string" === typeof input.type)
|
|
@@ -1618,11 +1396,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1618
1396
|
value: input.type
|
|
1619
1397
|
});
|
|
1620
1398
|
})()}}`;
|
|
1621
|
-
const $
|
|
1622
|
-
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
1623
|
-
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
1624
|
-
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1625
|
-
const $so6 = input => `{${$tail(`${undefined === input.panel ? "" : `"panel":${undefined !== input.panel ? (() => {
|
|
1399
|
+
const $so4 = input => `{${$tail(`${undefined === input.panel ? "" : `"panel":${undefined !== input.panel ? (() => {
|
|
1626
1400
|
if ("string" === typeof input.panel)
|
|
1627
1401
|
return $string(input.panel);
|
|
1628
1402
|
if (Array.isArray(input.panel))
|
|
@@ -1645,7 +1419,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1645
1419
|
value: input.editor
|
|
1646
1420
|
});
|
|
1647
1421
|
})() : undefined}`}`)}}`;
|
|
1648
|
-
const $
|
|
1422
|
+
const $so5 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}"type":${(() => {
|
|
1649
1423
|
if ("string" === typeof input.type)
|
|
1650
1424
|
return $string(input.type);
|
|
1651
1425
|
if ("string" === typeof input.type)
|
|
@@ -1655,7 +1429,7 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1655
1429
|
value: input.type
|
|
1656
1430
|
});
|
|
1657
1431
|
})()}}`;
|
|
1658
|
-
const $
|
|
1432
|
+
const $so6 = input => `{${undefined === input.width ? "" : `"width":${undefined !== input.width ? (() => {
|
|
1659
1433
|
if ("string" === typeof input.width)
|
|
1660
1434
|
return $string(input.width);
|
|
1661
1435
|
if ("number" === typeof input.width)
|
|
@@ -1670,13 +1444,13 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1670
1444
|
if ("string" === typeof input.widget)
|
|
1671
1445
|
return "\"" + input.widget + "\"";
|
|
1672
1446
|
if ("object" === typeof input.widget && null !== input.widget)
|
|
1673
|
-
return $
|
|
1447
|
+
return $so7(input.widget);
|
|
1674
1448
|
$throws({
|
|
1675
1449
|
expected: "(\"assetTags\" | \"assetTypes\" | \"default\" | \"geopoint\" | \"poster\" | \"tags\" | \"textarea\" | WidgetItem | undefined)",
|
|
1676
1450
|
value: input.widget
|
|
1677
1451
|
});
|
|
1678
1452
|
})() : undefined},`}"property":${$string(input.property)}}`;
|
|
1679
|
-
const $
|
|
1453
|
+
const $so7 = input => `{${undefined === input.readOnly ? "" : `"readOnly":${undefined !== input.readOnly ? input.readOnly : undefined},`}"type":${(() => {
|
|
1680
1454
|
if ("string" === typeof input.type)
|
|
1681
1455
|
return $string(input.type);
|
|
1682
1456
|
if ("string" === typeof input.type)
|
|
@@ -1686,15 +1460,15 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1686
1460
|
value: input.type
|
|
1687
1461
|
});
|
|
1688
1462
|
})()}}`;
|
|
1689
|
-
const $
|
|
1690
|
-
return ""; if (["
|
|
1463
|
+
const $so8 = input => `{${$tail(`"length":${input.length},"__context":{},"__returnValue":${$string(input.__returnValue)},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1464
|
+
return ""; if (["length", "__context", "__returnValue"].some(regular => regular === key))
|
|
1691
1465
|
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
1692
1466
|
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1693
1467
|
const $su0 = input => (() => {
|
|
1694
1468
|
if (undefined !== input.type)
|
|
1695
|
-
return $
|
|
1469
|
+
return $so5(input);
|
|
1696
1470
|
else if (undefined !== input.property)
|
|
1697
|
-
return $
|
|
1471
|
+
return $so6(input);
|
|
1698
1472
|
else
|
|
1699
1473
|
$throws({
|
|
1700
1474
|
expected: "(PanelLayoutDivider | PanelLayoutItem)",
|
|
@@ -1716,42 +1490,19 @@ export const assertStringifyPanelDomainPanelRecord = (input, errorFactory) => {
|
|
|
1716
1490
|
return $so0(input);
|
|
1717
1491
|
}; return stringify(assert(input, errorFactory)); };
|
|
1718
1492
|
export const isPanelProperty = input => {
|
|
1719
|
-
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
1720
|
-
const $io1 = input => "
|
|
1721
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1722
|
-
return true;
|
|
1723
|
-
const value = input[key];
|
|
1724
|
-
if (undefined === value)
|
|
1725
|
-
return true;
|
|
1726
|
-
if ("number" === typeof Number(key))
|
|
1727
|
-
return "string" === typeof value;
|
|
1728
|
-
return true;
|
|
1729
|
-
});
|
|
1730
|
-
const $io2 = input => true;
|
|
1731
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1493
|
+
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io1(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1494
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1732
1495
|
return "object" === typeof input && null !== input && $io0(input);
|
|
1733
1496
|
};
|
|
1734
1497
|
export const assertPanelProperty = (input, errorFactory) => {
|
|
1735
1498
|
const __is = input => {
|
|
1736
|
-
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
1737
|
-
const $io1 = input => "
|
|
1738
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1739
|
-
return true;
|
|
1740
|
-
const value = input[key];
|
|
1741
|
-
if (undefined === value)
|
|
1742
|
-
return true;
|
|
1743
|
-
if ("number" === typeof Number(key))
|
|
1744
|
-
return "string" === typeof value;
|
|
1745
|
-
return true;
|
|
1746
|
-
});
|
|
1747
|
-
const $io2 = input => true;
|
|
1748
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1499
|
+
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io1(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1500
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1749
1501
|
return "object" === typeof input && null !== input && $io0(input);
|
|
1750
1502
|
};
|
|
1751
1503
|
if (false === __is(input))
|
|
1752
1504
|
((input, _path, _exceptionable = true) => {
|
|
1753
1505
|
const $guard = __typia.createAssert.guard;
|
|
1754
|
-
const $join = __typia.createAssert.join;
|
|
1755
1506
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type || $guard(_exceptionable, {
|
|
1756
1507
|
path: _path + ".type",
|
|
1757
1508
|
expected: "(\"array\" | \"asset\" | \"boolean\" | \"datetime\" | \"number\" | \"object\" | \"rpc\" | \"string\")",
|
|
@@ -1772,23 +1523,11 @@ export const assertPanelProperty = (input, errorFactory) => {
|
|
|
1772
1523
|
path: _path + ".path",
|
|
1773
1524
|
expected: "(string | undefined)",
|
|
1774
1525
|
value: input.path
|
|
1775
|
-
}, errorFactory)) && ((null !== input.
|
|
1776
|
-
path: _path + ".computed",
|
|
1777
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1778
|
-
value: input.computed
|
|
1779
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
1780
|
-
path: _path + ".computed",
|
|
1781
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1782
|
-
value: input.computed
|
|
1783
|
-
}, errorFactory)) && $ao1(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
1784
|
-
path: _path + ".computed",
|
|
1785
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1786
|
-
value: input.computed
|
|
1787
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1526
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1788
1527
|
path: _path + ".index",
|
|
1789
1528
|
expected: "(__type | undefined)",
|
|
1790
1529
|
value: input.index
|
|
1791
|
-
}, errorFactory)) && $
|
|
1530
|
+
}, errorFactory)) && $ao1(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
1792
1531
|
path: _path + ".index",
|
|
1793
1532
|
expected: "(__type | undefined)",
|
|
1794
1533
|
value: input.index
|
|
@@ -1801,34 +1540,7 @@ export const assertPanelProperty = (input, errorFactory) => {
|
|
|
1801
1540
|
expected: "(Array<unknown> | undefined)",
|
|
1802
1541
|
value: input.oneOf
|
|
1803
1542
|
}, errorFactory));
|
|
1804
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
1805
|
-
path: _path + ".length",
|
|
1806
|
-
expected: "number",
|
|
1807
|
-
value: input.length
|
|
1808
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
1809
|
-
path: _path + ".__context",
|
|
1810
|
-
expected: "(object | undefined)",
|
|
1811
|
-
value: input.__context
|
|
1812
|
-
}, errorFactory)) && $ao2(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
1813
|
-
path: _path + ".__context",
|
|
1814
|
-
expected: "(object | undefined)",
|
|
1815
|
-
value: input.__context
|
|
1816
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1817
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1818
|
-
return true;
|
|
1819
|
-
const value = input[key];
|
|
1820
|
-
if (undefined === value)
|
|
1821
|
-
return true;
|
|
1822
|
-
if ("number" === typeof Number(key))
|
|
1823
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
1824
|
-
path: _path + $join(key),
|
|
1825
|
-
expected: "string",
|
|
1826
|
-
value: value
|
|
1827
|
-
}, errorFactory);
|
|
1828
|
-
return true;
|
|
1829
|
-
}));
|
|
1830
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
1831
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1543
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1832
1544
|
path: _path + ".label",
|
|
1833
1545
|
expected: "string",
|
|
1834
1546
|
value: input.label
|
|
@@ -1880,13 +1592,12 @@ export const randomPanelProperty = generator => {
|
|
|
1880
1592
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1881
1593
|
])(),
|
|
1882
1594
|
computed: $pick([
|
|
1883
|
-
() =>
|
|
1884
|
-
() =>
|
|
1885
|
-
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
1595
|
+
() => "any type used...",
|
|
1596
|
+
() => undefined
|
|
1886
1597
|
])(),
|
|
1887
1598
|
index: $pick([
|
|
1888
1599
|
() => undefined,
|
|
1889
|
-
() => $
|
|
1600
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
1890
1601
|
])(),
|
|
1891
1602
|
required: $pick([
|
|
1892
1603
|
() => undefined,
|
|
@@ -1897,23 +1608,7 @@ export const randomPanelProperty = generator => {
|
|
|
1897
1608
|
() => (generator?.array ?? $generator.array)(() => "any type used...")
|
|
1898
1609
|
])()
|
|
1899
1610
|
});
|
|
1900
|
-
const $ro1 = (_recursive = false, _depth = 0) => {
|
|
1901
|
-
const output = {
|
|
1902
|
-
length: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1903
|
-
__context: $pick([
|
|
1904
|
-
() => undefined,
|
|
1905
|
-
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
1906
|
-
])(),
|
|
1907
|
-
__returnValue: $pick([
|
|
1908
|
-
() => "any type used...",
|
|
1909
|
-
() => undefined
|
|
1910
|
-
])()
|
|
1911
|
-
};
|
|
1912
|
-
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
1913
|
-
return output;
|
|
1914
|
-
};
|
|
1915
|
-
const $ro2 = (_recursive = false, _depth = 0) => {};
|
|
1916
|
-
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
1611
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
1917
1612
|
label: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1918
1613
|
path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1919
1614
|
});
|
|
@@ -1921,25 +1616,13 @@ export const randomPanelProperty = generator => {
|
|
|
1921
1616
|
};
|
|
1922
1617
|
export const assertGuardPanelProperty = (input, errorFactory) => {
|
|
1923
1618
|
const __is = input => {
|
|
1924
|
-
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
1925
|
-
const $io1 = input => "
|
|
1926
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
1927
|
-
return true;
|
|
1928
|
-
const value = input[key];
|
|
1929
|
-
if (undefined === value)
|
|
1930
|
-
return true;
|
|
1931
|
-
if ("number" === typeof Number(key))
|
|
1932
|
-
return "string" === typeof value;
|
|
1933
|
-
return true;
|
|
1934
|
-
});
|
|
1935
|
-
const $io2 = input => true;
|
|
1936
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1619
|
+
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io1(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1620
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1937
1621
|
return "object" === typeof input && null !== input && $io0(input);
|
|
1938
1622
|
};
|
|
1939
1623
|
if (false === __is(input))
|
|
1940
1624
|
((input, _path, _exceptionable = true) => {
|
|
1941
1625
|
const $guard = __typia.createAssertGuard.guard;
|
|
1942
|
-
const $join = __typia.createAssertGuard.join;
|
|
1943
1626
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type || $guard(_exceptionable, {
|
|
1944
1627
|
path: _path + ".type",
|
|
1945
1628
|
expected: "(\"array\" | \"asset\" | \"boolean\" | \"datetime\" | \"number\" | \"object\" | \"rpc\" | \"string\")",
|
|
@@ -1960,23 +1643,11 @@ export const assertGuardPanelProperty = (input, errorFactory) => {
|
|
|
1960
1643
|
path: _path + ".path",
|
|
1961
1644
|
expected: "(string | undefined)",
|
|
1962
1645
|
value: input.path
|
|
1963
|
-
}, errorFactory)) && ((null !== input.
|
|
1964
|
-
path: _path + ".computed",
|
|
1965
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1966
|
-
value: input.computed
|
|
1967
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
1968
|
-
path: _path + ".computed",
|
|
1969
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1970
|
-
value: input.computed
|
|
1971
|
-
}, errorFactory)) && $ao1(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
1972
|
-
path: _path + ".computed",
|
|
1973
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
1974
|
-
value: input.computed
|
|
1975
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1646
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1976
1647
|
path: _path + ".index",
|
|
1977
1648
|
expected: "(__type | undefined)",
|
|
1978
1649
|
value: input.index
|
|
1979
|
-
}, errorFactory)) && $
|
|
1650
|
+
}, errorFactory)) && $ao1(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
1980
1651
|
path: _path + ".index",
|
|
1981
1652
|
expected: "(__type | undefined)",
|
|
1982
1653
|
value: input.index
|
|
@@ -1989,34 +1660,7 @@ export const assertGuardPanelProperty = (input, errorFactory) => {
|
|
|
1989
1660
|
expected: "(Array<unknown> | undefined)",
|
|
1990
1661
|
value: input.oneOf
|
|
1991
1662
|
}, errorFactory));
|
|
1992
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
1993
|
-
path: _path + ".length",
|
|
1994
|
-
expected: "number",
|
|
1995
|
-
value: input.length
|
|
1996
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
1997
|
-
path: _path + ".__context",
|
|
1998
|
-
expected: "(object | undefined)",
|
|
1999
|
-
value: input.__context
|
|
2000
|
-
}, errorFactory)) && $ao2(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
2001
|
-
path: _path + ".__context",
|
|
2002
|
-
expected: "(object | undefined)",
|
|
2003
|
-
value: input.__context
|
|
2004
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
2005
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
2006
|
-
return true;
|
|
2007
|
-
const value = input[key];
|
|
2008
|
-
if (undefined === value)
|
|
2009
|
-
return true;
|
|
2010
|
-
if ("number" === typeof Number(key))
|
|
2011
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
2012
|
-
path: _path + $join(key),
|
|
2013
|
-
expected: "string",
|
|
2014
|
-
value: value
|
|
2015
|
-
}, errorFactory);
|
|
2016
|
-
return true;
|
|
2017
|
-
}));
|
|
2018
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
2019
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1663
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
2020
1664
|
path: _path + ".label",
|
|
2021
1665
|
expected: "string",
|
|
2022
1666
|
value: input.label
|
|
@@ -2037,31 +1681,10 @@ export const assertGuardPanelProperty = (input, errorFactory) => {
|
|
|
2037
1681
|
})(input, "$input", true);
|
|
2038
1682
|
};
|
|
2039
1683
|
export const stringifyPanelProperty = input => {
|
|
2040
|
-
const $io1 = input => "
|
|
2041
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
2042
|
-
return true;
|
|
2043
|
-
const value = input[key];
|
|
2044
|
-
if (undefined === value)
|
|
2045
|
-
return true;
|
|
2046
|
-
if ("number" === typeof Number(key))
|
|
2047
|
-
return "string" === typeof value;
|
|
2048
|
-
return true;
|
|
2049
|
-
});
|
|
2050
|
-
const $io2 = input => true;
|
|
2051
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1684
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
2052
1685
|
const $string = __typia.json.createStringify.string;
|
|
2053
1686
|
const $throws = __typia.json.createStringify.throws;
|
|
2054
|
-
const $
|
|
2055
|
-
const $so0 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed ? "" : `"computed":${undefined !== input.computed ? (() => {
|
|
2056
|
-
if ("string" === typeof input.computed)
|
|
2057
|
-
return $string(input.computed);
|
|
2058
|
-
if ("object" === typeof input.computed && null !== input.computed)
|
|
2059
|
-
return $so1(input.computed);
|
|
2060
|
-
$throws({
|
|
2061
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
2062
|
-
value: input.computed
|
|
2063
|
-
});
|
|
2064
|
-
})() : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
1687
|
+
const $so0 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed || "function" === typeof input.computed ? "" : `"computed":${undefined !== input.computed ? JSON.stringify(input.computed) : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
2065
1688
|
if ("string" === typeof input.type)
|
|
2066
1689
|
return $string(input.type);
|
|
2067
1690
|
if ("string" === typeof input.type)
|
|
@@ -2071,33 +1694,17 @@ export const stringifyPanelProperty = input => {
|
|
|
2071
1694
|
value: input.type
|
|
2072
1695
|
});
|
|
2073
1696
|
})()}}`;
|
|
2074
|
-
const $so1 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue || "function" === typeof input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? JSON.stringify(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2075
|
-
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
2076
|
-
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
2077
|
-
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
2078
1697
|
return $so0(input);
|
|
2079
1698
|
};
|
|
2080
1699
|
export const assertStringifyPanelProperty = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
2081
1700
|
const __is = input => {
|
|
2082
|
-
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) &&
|
|
2083
|
-
const $io1 = input => "
|
|
2084
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
2085
|
-
return true;
|
|
2086
|
-
const value = input[key];
|
|
2087
|
-
if (undefined === value)
|
|
2088
|
-
return true;
|
|
2089
|
-
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
2090
|
-
return "string" === typeof value;
|
|
2091
|
-
return true;
|
|
2092
|
-
});
|
|
2093
|
-
const $io2 = input => true;
|
|
2094
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1701
|
+
const $io0 = input => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.domain || "string" === typeof input.domain) && (undefined === input.path || "string" === typeof input.path) && true && (undefined === input.index || "object" === typeof input.index && null !== input.index && $io1(input.index)) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.oneOf || Array.isArray(input.oneOf));
|
|
1702
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
2095
1703
|
return "object" === typeof input && null !== input && $io0(input);
|
|
2096
1704
|
};
|
|
2097
1705
|
if (false === __is(input))
|
|
2098
1706
|
((input, _path, _exceptionable = true) => {
|
|
2099
1707
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
2100
|
-
const $join = __typia.json.createAssertStringify.join;
|
|
2101
1708
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === input.type || "number" === input.type || "boolean" === input.type || "object" === input.type || "array" === input.type || "asset" === input.type || "datetime" === input.type || "rpc" === input.type || $guard(_exceptionable, {
|
|
2102
1709
|
path: _path + ".type",
|
|
2103
1710
|
expected: "(\"array\" | \"asset\" | \"boolean\" | \"datetime\" | \"number\" | \"object\" | \"rpc\" | \"string\")",
|
|
@@ -2118,23 +1725,11 @@ export const assertStringifyPanelProperty = (input, errorFactory) => { const ass
|
|
|
2118
1725
|
path: _path + ".path",
|
|
2119
1726
|
expected: "(string | undefined)",
|
|
2120
1727
|
value: input.path
|
|
2121
|
-
}, errorFactory)) && ((null !== input.
|
|
2122
|
-
path: _path + ".computed",
|
|
2123
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
2124
|
-
value: input.computed
|
|
2125
|
-
}, errorFactory)) && (undefined === input.computed || "string" === typeof input.computed || ("object" === typeof input.computed && null !== input.computed || $guard(_exceptionable, {
|
|
2126
|
-
path: _path + ".computed",
|
|
2127
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
2128
|
-
value: input.computed
|
|
2129
|
-
}, errorFactory)) && $ao1(input.computed, _path + ".computed", true && _exceptionable) || $guard(_exceptionable, {
|
|
2130
|
-
path: _path + ".computed",
|
|
2131
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
2132
|
-
value: input.computed
|
|
2133
|
-
}, errorFactory))) && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
1728
|
+
}, errorFactory)) && true && (undefined === input.index || ("object" === typeof input.index && null !== input.index || $guard(_exceptionable, {
|
|
2134
1729
|
path: _path + ".index",
|
|
2135
1730
|
expected: "(__type | undefined)",
|
|
2136
1731
|
value: input.index
|
|
2137
|
-
}, errorFactory)) && $
|
|
1732
|
+
}, errorFactory)) && $ao1(input.index, _path + ".index", true && _exceptionable) || $guard(_exceptionable, {
|
|
2138
1733
|
path: _path + ".index",
|
|
2139
1734
|
expected: "(__type | undefined)",
|
|
2140
1735
|
value: input.index
|
|
@@ -2147,34 +1742,7 @@ export const assertStringifyPanelProperty = (input, errorFactory) => { const ass
|
|
|
2147
1742
|
expected: "(Array<unknown> | undefined)",
|
|
2148
1743
|
value: input.oneOf
|
|
2149
1744
|
}, errorFactory));
|
|
2150
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
2151
|
-
path: _path + ".length",
|
|
2152
|
-
expected: "number",
|
|
2153
|
-
value: input.length
|
|
2154
|
-
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
2155
|
-
path: _path + ".__context",
|
|
2156
|
-
expected: "(object | undefined)",
|
|
2157
|
-
value: input.__context
|
|
2158
|
-
}, errorFactory)) && $ao2(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
2159
|
-
path: _path + ".__context",
|
|
2160
|
-
expected: "(object | undefined)",
|
|
2161
|
-
value: input.__context
|
|
2162
|
-
}, errorFactory)) && true && (false === _exceptionable || Object.keys(input).every(key => {
|
|
2163
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
2164
|
-
return true;
|
|
2165
|
-
const value = input[key];
|
|
2166
|
-
if (undefined === value)
|
|
2167
|
-
return true;
|
|
2168
|
-
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
2169
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
2170
|
-
path: _path + $join(key),
|
|
2171
|
-
expected: "string",
|
|
2172
|
-
value: value
|
|
2173
|
-
}, errorFactory);
|
|
2174
|
-
return true;
|
|
2175
|
-
}));
|
|
2176
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
2177
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
1745
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.label || $guard(_exceptionable, {
|
|
2178
1746
|
path: _path + ".label",
|
|
2179
1747
|
expected: "string",
|
|
2180
1748
|
value: input.label
|
|
@@ -2195,31 +1763,10 @@ export const assertStringifyPanelProperty = (input, errorFactory) => { const ass
|
|
|
2195
1763
|
})(input, "$input", true);
|
|
2196
1764
|
return input;
|
|
2197
1765
|
}; const stringify = input => {
|
|
2198
|
-
const $io1 = input => "
|
|
2199
|
-
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
2200
|
-
return true;
|
|
2201
|
-
const value = input[key];
|
|
2202
|
-
if (undefined === value)
|
|
2203
|
-
return true;
|
|
2204
|
-
if ("number" === typeof Number(key))
|
|
2205
|
-
return "string" === typeof value;
|
|
2206
|
-
return true;
|
|
2207
|
-
});
|
|
2208
|
-
const $io2 = input => true;
|
|
2209
|
-
const $io3 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
1766
|
+
const $io1 = input => "string" === typeof input.label && "string" === typeof input.path;
|
|
2210
1767
|
const $string = __typia.json.createAssertStringify.string;
|
|
2211
1768
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
2212
|
-
const $
|
|
2213
|
-
const $so0 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed ? "" : `"computed":${undefined !== input.computed ? (() => {
|
|
2214
|
-
if ("string" === typeof input.computed)
|
|
2215
|
-
return $string(input.computed);
|
|
2216
|
-
if ("object" === typeof input.computed && null !== input.computed)
|
|
2217
|
-
return $so1(input.computed);
|
|
2218
|
-
$throws({
|
|
2219
|
-
expected: "(String & { __context?: object | undefined; __returnValue?: unknown; } | string | undefined)",
|
|
2220
|
-
value: input.computed
|
|
2221
|
-
});
|
|
2222
|
-
})() : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
1769
|
+
const $so0 = input => `{${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.description ? "" : `"description":${undefined !== input.description ? $string(input.description) : undefined},`}${undefined === input.domain ? "" : `"domain":${undefined !== input.domain ? $string(input.domain) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.computed || "function" === typeof input.computed ? "" : `"computed":${undefined !== input.computed ? JSON.stringify(input.computed) : undefined},`}${undefined === input.index ? "" : `"index":${undefined !== input.index ? `{"label":${$string(input.index.label)},"path":${$string(input.index.path)}}` : undefined},`}${undefined === input.required ? "" : `"required":${undefined !== input.required ? input.required : undefined},`}${undefined === input.oneOf ? "" : `"oneOf":${undefined !== input.oneOf ? `[${input.oneOf.map(elem => undefined !== elem ? JSON.stringify(elem) : "null").join(",")}]` : undefined},`}"type":${(() => {
|
|
2223
1770
|
if ("string" === typeof input.type)
|
|
2224
1771
|
return $string(input.type);
|
|
2225
1772
|
if ("string" === typeof input.type)
|
|
@@ -2229,10 +1776,6 @@ export const assertStringifyPanelProperty = (input, errorFactory) => { const ass
|
|
|
2229
1776
|
value: input.type
|
|
2230
1777
|
});
|
|
2231
1778
|
})()}}`;
|
|
2232
|
-
const $so1 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue || "function" === typeof input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? JSON.stringify(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2233
|
-
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
2234
|
-
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
2235
|
-
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
2236
1779
|
return $so0(input);
|
|
2237
1780
|
}; return stringify(assert(input, errorFactory)); };
|
|
2238
1781
|
export const isPanelLayout = input => {
|