@valbuild/core 0.81.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/declarations/src/{preview.d.ts → render.d.ts} +5 -5
- package/dist/declarations/src/schema/array.d.ts +6 -6
- package/dist/declarations/src/schema/boolean.d.ts +2 -2
- package/dist/declarations/src/schema/date.d.ts +2 -2
- package/dist/declarations/src/schema/file.d.ts +2 -2
- package/dist/declarations/src/schema/image.d.ts +2 -2
- package/dist/declarations/src/schema/index.d.ts +2 -2
- package/dist/declarations/src/schema/keyOf.d.ts +2 -2
- package/dist/declarations/src/schema/literal.d.ts +2 -2
- package/dist/declarations/src/schema/number.d.ts +2 -2
- package/dist/declarations/src/schema/object.d.ts +2 -2
- package/dist/declarations/src/schema/record.d.ts +6 -6
- package/dist/declarations/src/schema/richtext.d.ts +2 -2
- package/dist/declarations/src/schema/string.d.ts +2 -2
- package/dist/declarations/src/schema/union.d.ts +2 -2
- package/dist/{index-5a7e1014.cjs.dev.js → index-55206077.cjs.dev.js} +50 -50
- package/dist/{index-74fe6f44.cjs.prod.js → index-6b263f20.cjs.prod.js} +50 -50
- package/dist/{index-bcc230b2.esm.js → index-ffbf9639.esm.js} +50 -50
- package/dist/valbuild-core.cjs.dev.js +1 -1
- package/dist/valbuild-core.cjs.prod.js +1 -1
- package/dist/valbuild-core.esm.js +1 -1
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
- package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
- package/patch/dist/valbuild-core-patch.esm.js +2 -2
@@ -52,7 +52,7 @@ export { type SerializedRichTextSchema, RichTextSchema, } from "./schema/richtex
|
|
52
52
|
export { type SerializedUnionSchema, UnionSchema, type SerializedStringUnionSchema, type SerializedObjectUnionSchema, } from "./schema/union.js";
|
53
53
|
export { type SerializedLiteralSchema, LiteralSchema } from "./schema/literal.js";
|
54
54
|
export { deserializeSchema } from "./schema/deserialize.js";
|
55
|
-
export { type
|
55
|
+
export { type ListRecordRender, type ListArrayRender, type ReifiedRender, } from "./render.js";
|
56
56
|
export declare const FATAL_ERROR_TYPES: readonly ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
|
57
57
|
export type FatalErrorType = (typeof FATAL_ERROR_TYPES)[number];
|
58
58
|
export declare const DEFAULT_CONTENT_HOST = "https://content.val.build";
|
@@ -4,7 +4,7 @@ import { SelectorSource } from "./selector/index.js";
|
|
4
4
|
import { ImageSource } from "./source/image.js";
|
5
5
|
import { RemoteSource } from "./source/remote.js";
|
6
6
|
import { ModuleFilePath, SourcePath } from "./val/index.js";
|
7
|
-
export type
|
7
|
+
export type ListRecordRender = {
|
8
8
|
layout: "list";
|
9
9
|
parent: "record";
|
10
10
|
items: [
|
@@ -16,7 +16,7 @@ export type ListRecordPreview = {
|
|
16
16
|
}
|
17
17
|
][];
|
18
18
|
};
|
19
|
-
export type
|
19
|
+
export type ListArrayRender = {
|
20
20
|
layout: "list";
|
21
21
|
parent: "array";
|
22
22
|
items: {
|
@@ -25,7 +25,7 @@ export type ListArrayPreview = {
|
|
25
25
|
image?: ImageSource | RemoteSource<ImageMetadata> | null;
|
26
26
|
}[];
|
27
27
|
};
|
28
|
-
type
|
28
|
+
type RenderTypes = ListRecordRender | ListArrayRender;
|
29
29
|
type WithStatus<T> = {
|
30
30
|
status: "error";
|
31
31
|
message: string;
|
@@ -36,6 +36,6 @@ type WithStatus<T> = {
|
|
36
36
|
status: "success";
|
37
37
|
data: T;
|
38
38
|
};
|
39
|
-
export type
|
40
|
-
export type
|
39
|
+
export type ReifiedRender = Record<SourcePath | ModuleFilePath, WithStatus<RenderTypes>>;
|
40
|
+
export type RenderSelector<T extends Schema<SelectorSource>> = T extends Schema<infer S> ? S : never;
|
41
41
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { RenderSelector, ReifiedRender } from "../render.js";
|
3
3
|
import { SelectorSource } from "../selector/index.js";
|
4
4
|
import { ImageSource } from "../source/image.js";
|
5
5
|
import { ModuleFilePath, SourcePath } from "../val/index.js";
|
@@ -20,12 +20,12 @@ export declare class ArraySchema<T extends Schema<SelectorSource>, Src extends S
|
|
20
20
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
21
21
|
nullable(): ArraySchema<T, Src | null>;
|
22
22
|
protected executeSerialize(): SerializedArraySchema;
|
23
|
-
private
|
24
|
-
protected
|
25
|
-
|
23
|
+
private renderInput;
|
24
|
+
protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
|
25
|
+
render(input: {
|
26
26
|
layout: "list";
|
27
|
-
|
28
|
-
val:
|
27
|
+
select: (input: {
|
28
|
+
val: RenderSelector<T>;
|
29
29
|
}) => {
|
30
30
|
title: string;
|
31
31
|
subtitle?: string | null;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SourcePath } from "../val/index.js";
|
4
4
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
5
5
|
export type SerializedBooleanSchema = {
|
@@ -16,6 +16,6 @@ export declare class BooleanSchema<Src extends boolean | null> extends Schema<Sr
|
|
16
16
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
17
17
|
nullable(): BooleanSchema<Src | null>;
|
18
18
|
protected executeSerialize(): SerializedSchema;
|
19
|
-
protected
|
19
|
+
protected executeRender(): ReifiedRender;
|
20
20
|
}
|
21
21
|
export declare const boolean: () => BooleanSchema<boolean>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SourcePath } from "../val/index.js";
|
4
4
|
import { RawString } from "./string.js";
|
5
5
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
@@ -37,7 +37,7 @@ export declare class DateSchema<Src extends string | null> extends Schema<Src> {
|
|
37
37
|
to(to: string): DateSchema<Src>;
|
38
38
|
nullable(): DateSchema<Src | null>;
|
39
39
|
protected executeSerialize(): SerializedSchema;
|
40
|
-
protected
|
40
|
+
protected executeRender(): ReifiedRender;
|
41
41
|
}
|
42
42
|
export declare const date: (options?: Record<string, never>) => DateSchema<RawString>;
|
43
43
|
export {};
|
@@ -4,7 +4,7 @@ import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema }
|
|
4
4
|
import { SourcePath } from "../val/index.js";
|
5
5
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
6
6
|
import { RemoteSource } from "../index.js";
|
7
|
-
import {
|
7
|
+
import { ReifiedRender } from "../render.js";
|
8
8
|
export type FileOptions = {
|
9
9
|
accept?: string;
|
10
10
|
};
|
@@ -30,7 +30,7 @@ export declare class FileSchema<Src extends FileSource<FileMetadata | undefined>
|
|
30
30
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
31
31
|
nullable(): FileSchema<Src | null>;
|
32
32
|
protected executeSerialize(): SerializedSchema;
|
33
|
-
protected
|
33
|
+
protected executeRender(): ReifiedRender;
|
34
34
|
}
|
35
35
|
export declare const file: (options?: FileOptions) => FileSchema<FileSource<FileMetadata>>;
|
36
36
|
export declare function convertFileSource<Metadata extends {
|
@@ -5,7 +5,7 @@ import { SourcePath } from "../val/index.js";
|
|
5
5
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
6
6
|
import { FileMetadata } from "../index.js";
|
7
7
|
import { RemoteSource } from "../source/remote.js";
|
8
|
-
import {
|
8
|
+
import { ReifiedRender } from "../render.js";
|
9
9
|
export type ImageOptions = {
|
10
10
|
ext?: ["jpg"] | ["webp"];
|
11
11
|
directory?: string;
|
@@ -40,6 +40,6 @@ export declare class ImageSchema<Src extends FileSource<ImageMetadata | undefine
|
|
40
40
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
41
41
|
nullable(): ImageSchema<Src | null>;
|
42
42
|
protected executeSerialize(): SerializedSchema;
|
43
|
-
protected
|
43
|
+
protected executeRender(): ReifiedRender;
|
44
44
|
}
|
45
45
|
export declare const image: (options?: ImageOptions) => ImageSchema<ImageSource>;
|
@@ -16,7 +16,7 @@ import { SerializedDateSchema } from "./date.js";
|
|
16
16
|
import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
|
17
17
|
import { FileSource } from "../source/file.js";
|
18
18
|
import { GenericRichTextSourceNode, RichTextSource } from "../source/richtext.js";
|
19
|
-
import {
|
19
|
+
import { ReifiedRender } from "../render.js";
|
20
20
|
export type SerializedSchema = SerializedStringSchema | SerializedLiteralSchema | SerializedBooleanSchema | SerializedNumberSchema | SerializedObjectSchema | SerializedArraySchema | SerializedUnionSchema | SerializedRichTextSchema | SerializedRecordSchema | SerializedKeyOfSchema | SerializedFileSchema | SerializedDateSchema | SerializedImageSchema;
|
21
21
|
type Primitives = number | string | boolean | null | FileSource;
|
22
22
|
export type AssertError = {
|
@@ -63,7 +63,7 @@ export declare abstract class Schema<Src extends SelectorSource> {
|
|
63
63
|
protected abstract executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
64
64
|
abstract nullable(): Schema<Src | null>;
|
65
65
|
protected abstract executeSerialize(): SerializedSchema;
|
66
|
-
protected abstract
|
66
|
+
protected abstract executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
|
67
67
|
/** MUTATES! since internal and perf sensitive */
|
68
68
|
protected appendValidationError(current: ValidationErrors, path: SourcePath, message: string, value: unknown, schemaError?: boolean): ValidationErrors;
|
69
69
|
}
|
@@ -5,7 +5,7 @@ import { Source, SourceObject } from "../source/index.js";
|
|
5
5
|
import { SourcePath } from "../val/index.js";
|
6
6
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
7
7
|
import { RawString } from "./string.js";
|
8
|
-
import {
|
8
|
+
import { ReifiedRender } from "../render.js";
|
9
9
|
export type SerializedKeyOfSchema = {
|
10
10
|
type: "keyOf";
|
11
11
|
path: SourcePath;
|
@@ -26,7 +26,7 @@ export declare class KeyOfSchema<Sel extends GenericSelector<SourceObject>, Src
|
|
26
26
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
27
27
|
nullable(): KeyOfSchema<Sel, Src | null>;
|
28
28
|
protected executeSerialize(): SerializedSchema;
|
29
|
-
protected
|
29
|
+
protected executeRender(): ReifiedRender;
|
30
30
|
}
|
31
31
|
export declare const keyOf: <Src extends GenericSelector<SourceObject, undefined> & ValModuleBrand>(valModule: Src) => KeyOfSchema<Src, KeyOfSelector<Src>>;
|
32
32
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SourcePath } from "../val/index.js";
|
4
4
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
5
5
|
export type SerializedLiteralSchema = {
|
@@ -18,6 +18,6 @@ export declare class LiteralSchema<Src extends string | null> extends Schema<Src
|
|
18
18
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
19
19
|
nullable(): LiteralSchema<Src | null>;
|
20
20
|
protected executeSerialize(): SerializedSchema;
|
21
|
-
protected
|
21
|
+
protected executeRender(): ReifiedRender;
|
22
22
|
}
|
23
23
|
export declare const literal: <T extends string>(value: T) => LiteralSchema<T>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SourcePath } from "../val/index.js";
|
4
4
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
5
5
|
type NumberOptions = {
|
@@ -24,7 +24,7 @@ export declare class NumberSchema<Src extends number | null> extends Schema<Src>
|
|
24
24
|
max(max: number): NumberSchema<Src>;
|
25
25
|
min(min: number): NumberSchema<Src>;
|
26
26
|
protected executeSerialize(): SerializedSchema;
|
27
|
-
protected
|
27
|
+
protected executeRender(): ReifiedRender;
|
28
28
|
}
|
29
29
|
export declare const number: (options?: NumberOptions) => NumberSchema<number>;
|
30
30
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SelectorSource } from "../selector/index.js";
|
4
4
|
import { ModuleFilePath, SourcePath } from "../val/index.js";
|
5
5
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
@@ -40,7 +40,7 @@ export declare class ObjectSchema<Props extends ObjectSchemaProps, Src extends O
|
|
40
40
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
41
41
|
nullable(): ObjectSchema<Props, Src | null>;
|
42
42
|
protected executeSerialize(): SerializedSchema;
|
43
|
-
protected
|
43
|
+
protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
|
44
44
|
}
|
45
45
|
export declare const object: <Props extends ObjectSchemaProps>(schema: Props) => ObjectSchema<Props, ObjectSchemaSrcOf<Props>>;
|
46
46
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { RenderSelector, ReifiedRender } from "../render.js";
|
3
3
|
import { SelectorSource } from "../selector/index.js";
|
4
4
|
import { ImageSource } from "../source/image.js";
|
5
5
|
import { RemoteSource } from "../source/remote.js";
|
@@ -22,13 +22,13 @@ export declare class RecordSchema<T extends Schema<SelectorSource>, Src extends
|
|
22
22
|
protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
|
23
23
|
nullable(): RecordSchema<T, Src | null>;
|
24
24
|
executeSerialize(): SerializedRecordSchema;
|
25
|
-
private
|
26
|
-
protected
|
27
|
-
|
25
|
+
private renderInput;
|
26
|
+
protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
|
27
|
+
render(input: {
|
28
28
|
layout: "list";
|
29
|
-
|
29
|
+
select: (input: {
|
30
30
|
key: string;
|
31
|
-
val:
|
31
|
+
val: RenderSelector<T>;
|
32
32
|
}) => {
|
33
33
|
title: string;
|
34
34
|
subtitle?: string | null;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { ImageSource } from "../source/image.js";
|
4
4
|
import { RichTextSource, RichTextOptions, SerializedRichTextOptions } from "../source/richtext.js";
|
5
5
|
import { SourcePath } from "../val/index.js";
|
@@ -29,7 +29,7 @@ export declare class RichTextSchema<O extends RichTextOptions, Src extends RichT
|
|
29
29
|
private recursiveAssert;
|
30
30
|
nullable(): RichTextSchema<O, Src | null>;
|
31
31
|
protected executeSerialize(): SerializedSchema;
|
32
|
-
protected
|
32
|
+
protected executeRender(): ReifiedRender;
|
33
33
|
}
|
34
34
|
export declare const richtext: <O extends Partial<{
|
35
35
|
style: Partial<{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SourcePath } from "../val/index.js";
|
4
4
|
import { ValidationErrors } from "./validation/ValidationError.js";
|
5
5
|
type StringOptions = {
|
@@ -51,7 +51,7 @@ export declare class StringSchema<Src extends string | null> extends Schema<Src>
|
|
51
51
|
nullable(): StringSchema<Src | null>;
|
52
52
|
raw(): StringSchema<Src extends null ? RawString | null : RawString>;
|
53
53
|
protected executeSerialize(): SerializedSchema;
|
54
|
-
protected
|
54
|
+
protected executeRender(): ReifiedRender;
|
55
55
|
}
|
56
56
|
export declare const string: <T extends string>(options?: Record<string, never>) => StringSchema<T>;
|
57
57
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
|
2
|
-
import {
|
2
|
+
import { ReifiedRender } from "../render.js";
|
3
3
|
import { SelectorSource } from "../selector/index.js";
|
4
4
|
import { SourceObject } from "../source/index.js";
|
5
5
|
import { ModuleFilePath, SourcePath } from "../val/index.js";
|
@@ -37,7 +37,7 @@ export declare class UnionSchema<Key extends string | Schema<string>, T extends
|
|
37
37
|
nullable(): UnionSchema<Key, T, Src | null>;
|
38
38
|
protected executeSerialize(): SerializedSchema;
|
39
39
|
constructor(key: Key, items: T, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[]);
|
40
|
-
protected
|
40
|
+
protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
|
41
41
|
}
|
42
42
|
export declare const union: <Key extends string | Schema<string>, T extends Schema<Key extends string ? {
|
43
43
|
[x: string]: import("../source/index.js").Source;
|
@@ -579,8 +579,8 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
|
|
579
579
|
};
|
580
580
|
}
|
581
581
|
}, {
|
582
|
-
key: "
|
583
|
-
value: function
|
582
|
+
key: "executeRender",
|
583
|
+
value: function executeRender() {
|
584
584
|
return {};
|
585
585
|
}
|
586
586
|
}]);
|
@@ -825,8 +825,8 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
825
825
|
};
|
826
826
|
}
|
827
827
|
}, {
|
828
|
-
key: "
|
829
|
-
value: function
|
828
|
+
key: "executeRender",
|
829
|
+
value: function executeRender(sourcePath, src) {
|
830
830
|
var res = {};
|
831
831
|
if (src === null) {
|
832
832
|
return res;
|
@@ -837,7 +837,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
837
837
|
continue;
|
838
838
|
}
|
839
839
|
var subPath = unsafeCreateSourcePath(sourcePath, _key3);
|
840
|
-
var itemResult = this.items[_key3]["
|
840
|
+
var itemResult = this.items[_key3]["executeRender"](subPath, itemSrc);
|
841
841
|
for (var keyS in itemResult) {
|
842
842
|
var _key4 = keyS;
|
843
843
|
res[_key4] = itemResult[_key4];
|
@@ -858,7 +858,7 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
858
858
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
859
859
|
_classCallCheck(this, ArraySchema);
|
860
860
|
_this = _callSuper(this, ArraySchema);
|
861
|
-
_defineProperty(_this, "
|
861
|
+
_defineProperty(_this, "renderInput", null);
|
862
862
|
_this.item = item;
|
863
863
|
_this.opt = opt;
|
864
864
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -954,8 +954,8 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
954
954
|
};
|
955
955
|
}
|
956
956
|
}, {
|
957
|
-
key: "
|
958
|
-
value: function
|
957
|
+
key: "executeRender",
|
958
|
+
value: function executeRender(sourcePath, src) {
|
959
959
|
var res = {};
|
960
960
|
if (src === null) {
|
961
961
|
return res;
|
@@ -967,16 +967,16 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
967
967
|
continue;
|
968
968
|
}
|
969
969
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
970
|
-
var itemResult = this.item["
|
970
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
971
971
|
for (var keyS in itemResult) {
|
972
972
|
var _key = keyS;
|
973
973
|
res[_key] = itemResult[_key];
|
974
974
|
}
|
975
975
|
}
|
976
|
-
if (this.
|
977
|
-
var _this$
|
978
|
-
|
979
|
-
layout = _this$
|
976
|
+
if (this.renderInput) {
|
977
|
+
var _this$renderInput = this.renderInput,
|
978
|
+
select = _this$renderInput.select,
|
979
|
+
layout = _this$renderInput.layout;
|
980
980
|
if (layout !== "list") {
|
981
981
|
res[sourcePath] = {
|
982
982
|
status: "error",
|
@@ -991,12 +991,12 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
991
991
|
parent: "array",
|
992
992
|
items: src.map(function (val) {
|
993
993
|
// NB NB: display is actually defined by the user
|
994
|
-
var
|
994
|
+
var _select = select({
|
995
995
|
val: val
|
996
996
|
}),
|
997
|
-
title =
|
998
|
-
subtitle =
|
999
|
-
image =
|
997
|
+
title = _select.title,
|
998
|
+
subtitle = _select.subtitle,
|
999
|
+
image = _select.image;
|
1000
1000
|
return {
|
1001
1001
|
title: title,
|
1002
1002
|
subtitle: subtitle,
|
@@ -1015,9 +1015,9 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
1015
1015
|
return res;
|
1016
1016
|
}
|
1017
1017
|
}, {
|
1018
|
-
key: "
|
1019
|
-
value: function
|
1020
|
-
this.
|
1018
|
+
key: "render",
|
1019
|
+
value: function render(input) {
|
1020
|
+
this.renderInput = input;
|
1021
1021
|
return this;
|
1022
1022
|
}
|
1023
1023
|
}]);
|
@@ -1117,8 +1117,8 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
|
1117
1117
|
};
|
1118
1118
|
}
|
1119
1119
|
}, {
|
1120
|
-
key: "
|
1121
|
-
value: function
|
1120
|
+
key: "executeRender",
|
1121
|
+
value: function executeRender() {
|
1122
1122
|
return {};
|
1123
1123
|
}
|
1124
1124
|
}]);
|
@@ -1464,8 +1464,8 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1464
1464
|
};
|
1465
1465
|
}
|
1466
1466
|
}, {
|
1467
|
-
key: "
|
1468
|
-
value: function
|
1467
|
+
key: "executeRender",
|
1468
|
+
value: function executeRender(sourcePath, src) {
|
1469
1469
|
var res = {};
|
1470
1470
|
if (src === null) {
|
1471
1471
|
return res;
|
@@ -1487,7 +1487,7 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1487
1487
|
return false;
|
1488
1488
|
});
|
1489
1489
|
if (thisSchema) {
|
1490
|
-
var itemResult = thisSchema["
|
1490
|
+
var itemResult = thisSchema["executeRender"](sourcePath, src);
|
1491
1491
|
for (var keyS in itemResult) {
|
1492
1492
|
var _key3 = keyS;
|
1493
1493
|
res[_key3] = itemResult[_key3];
|
@@ -1724,8 +1724,8 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
|
|
1724
1724
|
};
|
1725
1725
|
}
|
1726
1726
|
}, {
|
1727
|
-
key: "
|
1728
|
-
value: function
|
1727
|
+
key: "executeRender",
|
1728
|
+
value: function executeRender() {
|
1729
1729
|
return {};
|
1730
1730
|
}
|
1731
1731
|
}]);
|
@@ -2182,8 +2182,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
2182
2182
|
};
|
2183
2183
|
}
|
2184
2184
|
}, {
|
2185
|
-
key: "
|
2186
|
-
value: function
|
2185
|
+
key: "executeRender",
|
2186
|
+
value: function executeRender() {
|
2187
2187
|
return {};
|
2188
2188
|
}
|
2189
2189
|
}]);
|
@@ -2199,7 +2199,7 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2199
2199
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
2200
2200
|
_classCallCheck(this, RecordSchema);
|
2201
2201
|
_this = _callSuper(this, RecordSchema);
|
2202
|
-
_defineProperty(_this, "
|
2202
|
+
_defineProperty(_this, "renderInput", null);
|
2203
2203
|
_this.item = item;
|
2204
2204
|
_this.opt = opt;
|
2205
2205
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -2316,8 +2316,8 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2316
2316
|
};
|
2317
2317
|
}
|
2318
2318
|
}, {
|
2319
|
-
key: "
|
2320
|
-
value: function
|
2319
|
+
key: "executeRender",
|
2320
|
+
value: function executeRender(sourcePath, src) {
|
2321
2321
|
var res = {};
|
2322
2322
|
if (src === null) {
|
2323
2323
|
return res;
|
@@ -2328,16 +2328,16 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2328
2328
|
continue;
|
2329
2329
|
}
|
2330
2330
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
2331
|
-
var itemResult = this.item["
|
2331
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
2332
2332
|
for (var keyS in itemResult) {
|
2333
2333
|
var _key = keyS;
|
2334
2334
|
res[_key] = itemResult[_key];
|
2335
2335
|
}
|
2336
2336
|
}
|
2337
|
-
if (this.
|
2338
|
-
var _this$
|
2339
|
-
prepare = _this$
|
2340
|
-
layout = _this$
|
2337
|
+
if (this.renderInput) {
|
2338
|
+
var _this$renderInput = this.renderInput,
|
2339
|
+
prepare = _this$renderInput.select,
|
2340
|
+
layout = _this$renderInput.layout;
|
2341
2341
|
if (layout !== "list") {
|
2342
2342
|
res[sourcePath] = {
|
2343
2343
|
status: "error",
|
@@ -2380,9 +2380,9 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2380
2380
|
return res;
|
2381
2381
|
}
|
2382
2382
|
}, {
|
2383
|
-
key: "
|
2384
|
-
value: function
|
2385
|
-
this.
|
2383
|
+
key: "render",
|
2384
|
+
value: function render(input) {
|
2385
|
+
this.renderInput = input;
|
2386
2386
|
return this;
|
2387
2387
|
}
|
2388
2388
|
}]);
|
@@ -3003,8 +3003,8 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
|
|
3003
3003
|
};
|
3004
3004
|
}
|
3005
3005
|
}, {
|
3006
|
-
key: "
|
3007
|
-
value: function
|
3006
|
+
key: "executeRender",
|
3007
|
+
value: function executeRender() {
|
3008
3008
|
return {};
|
3009
3009
|
}
|
3010
3010
|
}]);
|
@@ -3165,8 +3165,8 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
|
|
3165
3165
|
};
|
3166
3166
|
}
|
3167
3167
|
}, {
|
3168
|
-
key: "
|
3169
|
-
value: function
|
3168
|
+
key: "executeRender",
|
3169
|
+
value: function executeRender() {
|
3170
3170
|
return {};
|
3171
3171
|
}
|
3172
3172
|
}]);
|
@@ -3254,8 +3254,8 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
|
3254
3254
|
};
|
3255
3255
|
}
|
3256
3256
|
}, {
|
3257
|
-
key: "
|
3258
|
-
value: function
|
3257
|
+
key: "executeRender",
|
3258
|
+
value: function executeRender() {
|
3259
3259
|
return {};
|
3260
3260
|
}
|
3261
3261
|
}]);
|
@@ -3442,8 +3442,8 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3442
3442
|
};
|
3443
3443
|
}
|
3444
3444
|
}, {
|
3445
|
-
key: "
|
3446
|
-
value: function
|
3445
|
+
key: "executeRender",
|
3446
|
+
value: function executeRender() {
|
3447
3447
|
return {};
|
3448
3448
|
}
|
3449
3449
|
}]);
|
@@ -3585,8 +3585,8 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
|
|
3585
3585
|
};
|
3586
3586
|
}
|
3587
3587
|
}, {
|
3588
|
-
key: "
|
3589
|
-
value: function
|
3588
|
+
key: "executeRender",
|
3589
|
+
value: function executeRender() {
|
3590
3590
|
return {};
|
3591
3591
|
}
|
3592
3592
|
}]);
|
@@ -579,8 +579,8 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
|
|
579
579
|
};
|
580
580
|
}
|
581
581
|
}, {
|
582
|
-
key: "
|
583
|
-
value: function
|
582
|
+
key: "executeRender",
|
583
|
+
value: function executeRender() {
|
584
584
|
return {};
|
585
585
|
}
|
586
586
|
}]);
|
@@ -825,8 +825,8 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
825
825
|
};
|
826
826
|
}
|
827
827
|
}, {
|
828
|
-
key: "
|
829
|
-
value: function
|
828
|
+
key: "executeRender",
|
829
|
+
value: function executeRender(sourcePath, src) {
|
830
830
|
var res = {};
|
831
831
|
if (src === null) {
|
832
832
|
return res;
|
@@ -837,7 +837,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
837
837
|
continue;
|
838
838
|
}
|
839
839
|
var subPath = unsafeCreateSourcePath(sourcePath, _key3);
|
840
|
-
var itemResult = this.items[_key3]["
|
840
|
+
var itemResult = this.items[_key3]["executeRender"](subPath, itemSrc);
|
841
841
|
for (var keyS in itemResult) {
|
842
842
|
var _key4 = keyS;
|
843
843
|
res[_key4] = itemResult[_key4];
|
@@ -858,7 +858,7 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
858
858
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
859
859
|
_classCallCheck(this, ArraySchema);
|
860
860
|
_this = _callSuper(this, ArraySchema);
|
861
|
-
_defineProperty(_this, "
|
861
|
+
_defineProperty(_this, "renderInput", null);
|
862
862
|
_this.item = item;
|
863
863
|
_this.opt = opt;
|
864
864
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -954,8 +954,8 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
954
954
|
};
|
955
955
|
}
|
956
956
|
}, {
|
957
|
-
key: "
|
958
|
-
value: function
|
957
|
+
key: "executeRender",
|
958
|
+
value: function executeRender(sourcePath, src) {
|
959
959
|
var res = {};
|
960
960
|
if (src === null) {
|
961
961
|
return res;
|
@@ -967,16 +967,16 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
967
967
|
continue;
|
968
968
|
}
|
969
969
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
970
|
-
var itemResult = this.item["
|
970
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
971
971
|
for (var keyS in itemResult) {
|
972
972
|
var _key = keyS;
|
973
973
|
res[_key] = itemResult[_key];
|
974
974
|
}
|
975
975
|
}
|
976
|
-
if (this.
|
977
|
-
var _this$
|
978
|
-
|
979
|
-
layout = _this$
|
976
|
+
if (this.renderInput) {
|
977
|
+
var _this$renderInput = this.renderInput,
|
978
|
+
select = _this$renderInput.select,
|
979
|
+
layout = _this$renderInput.layout;
|
980
980
|
if (layout !== "list") {
|
981
981
|
res[sourcePath] = {
|
982
982
|
status: "error",
|
@@ -991,12 +991,12 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
991
991
|
parent: "array",
|
992
992
|
items: src.map(function (val) {
|
993
993
|
// NB NB: display is actually defined by the user
|
994
|
-
var
|
994
|
+
var _select = select({
|
995
995
|
val: val
|
996
996
|
}),
|
997
|
-
title =
|
998
|
-
subtitle =
|
999
|
-
image =
|
997
|
+
title = _select.title,
|
998
|
+
subtitle = _select.subtitle,
|
999
|
+
image = _select.image;
|
1000
1000
|
return {
|
1001
1001
|
title: title,
|
1002
1002
|
subtitle: subtitle,
|
@@ -1015,9 +1015,9 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
1015
1015
|
return res;
|
1016
1016
|
}
|
1017
1017
|
}, {
|
1018
|
-
key: "
|
1019
|
-
value: function
|
1020
|
-
this.
|
1018
|
+
key: "render",
|
1019
|
+
value: function render(input) {
|
1020
|
+
this.renderInput = input;
|
1021
1021
|
return this;
|
1022
1022
|
}
|
1023
1023
|
}]);
|
@@ -1117,8 +1117,8 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
|
1117
1117
|
};
|
1118
1118
|
}
|
1119
1119
|
}, {
|
1120
|
-
key: "
|
1121
|
-
value: function
|
1120
|
+
key: "executeRender",
|
1121
|
+
value: function executeRender() {
|
1122
1122
|
return {};
|
1123
1123
|
}
|
1124
1124
|
}]);
|
@@ -1464,8 +1464,8 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1464
1464
|
};
|
1465
1465
|
}
|
1466
1466
|
}, {
|
1467
|
-
key: "
|
1468
|
-
value: function
|
1467
|
+
key: "executeRender",
|
1468
|
+
value: function executeRender(sourcePath, src) {
|
1469
1469
|
var res = {};
|
1470
1470
|
if (src === null) {
|
1471
1471
|
return res;
|
@@ -1487,7 +1487,7 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1487
1487
|
return false;
|
1488
1488
|
});
|
1489
1489
|
if (thisSchema) {
|
1490
|
-
var itemResult = thisSchema["
|
1490
|
+
var itemResult = thisSchema["executeRender"](sourcePath, src);
|
1491
1491
|
for (var keyS in itemResult) {
|
1492
1492
|
var _key3 = keyS;
|
1493
1493
|
res[_key3] = itemResult[_key3];
|
@@ -1724,8 +1724,8 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
|
|
1724
1724
|
};
|
1725
1725
|
}
|
1726
1726
|
}, {
|
1727
|
-
key: "
|
1728
|
-
value: function
|
1727
|
+
key: "executeRender",
|
1728
|
+
value: function executeRender() {
|
1729
1729
|
return {};
|
1730
1730
|
}
|
1731
1731
|
}]);
|
@@ -2182,8 +2182,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
2182
2182
|
};
|
2183
2183
|
}
|
2184
2184
|
}, {
|
2185
|
-
key: "
|
2186
|
-
value: function
|
2185
|
+
key: "executeRender",
|
2186
|
+
value: function executeRender() {
|
2187
2187
|
return {};
|
2188
2188
|
}
|
2189
2189
|
}]);
|
@@ -2199,7 +2199,7 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2199
2199
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
2200
2200
|
_classCallCheck(this, RecordSchema);
|
2201
2201
|
_this = _callSuper(this, RecordSchema);
|
2202
|
-
_defineProperty(_this, "
|
2202
|
+
_defineProperty(_this, "renderInput", null);
|
2203
2203
|
_this.item = item;
|
2204
2204
|
_this.opt = opt;
|
2205
2205
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -2316,8 +2316,8 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2316
2316
|
};
|
2317
2317
|
}
|
2318
2318
|
}, {
|
2319
|
-
key: "
|
2320
|
-
value: function
|
2319
|
+
key: "executeRender",
|
2320
|
+
value: function executeRender(sourcePath, src) {
|
2321
2321
|
var res = {};
|
2322
2322
|
if (src === null) {
|
2323
2323
|
return res;
|
@@ -2328,16 +2328,16 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2328
2328
|
continue;
|
2329
2329
|
}
|
2330
2330
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
2331
|
-
var itemResult = this.item["
|
2331
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
2332
2332
|
for (var keyS in itemResult) {
|
2333
2333
|
var _key = keyS;
|
2334
2334
|
res[_key] = itemResult[_key];
|
2335
2335
|
}
|
2336
2336
|
}
|
2337
|
-
if (this.
|
2338
|
-
var _this$
|
2339
|
-
prepare = _this$
|
2340
|
-
layout = _this$
|
2337
|
+
if (this.renderInput) {
|
2338
|
+
var _this$renderInput = this.renderInput,
|
2339
|
+
prepare = _this$renderInput.select,
|
2340
|
+
layout = _this$renderInput.layout;
|
2341
2341
|
if (layout !== "list") {
|
2342
2342
|
res[sourcePath] = {
|
2343
2343
|
status: "error",
|
@@ -2380,9 +2380,9 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2380
2380
|
return res;
|
2381
2381
|
}
|
2382
2382
|
}, {
|
2383
|
-
key: "
|
2384
|
-
value: function
|
2385
|
-
this.
|
2383
|
+
key: "render",
|
2384
|
+
value: function render(input) {
|
2385
|
+
this.renderInput = input;
|
2386
2386
|
return this;
|
2387
2387
|
}
|
2388
2388
|
}]);
|
@@ -3003,8 +3003,8 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
|
|
3003
3003
|
};
|
3004
3004
|
}
|
3005
3005
|
}, {
|
3006
|
-
key: "
|
3007
|
-
value: function
|
3006
|
+
key: "executeRender",
|
3007
|
+
value: function executeRender() {
|
3008
3008
|
return {};
|
3009
3009
|
}
|
3010
3010
|
}]);
|
@@ -3165,8 +3165,8 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
|
|
3165
3165
|
};
|
3166
3166
|
}
|
3167
3167
|
}, {
|
3168
|
-
key: "
|
3169
|
-
value: function
|
3168
|
+
key: "executeRender",
|
3169
|
+
value: function executeRender() {
|
3170
3170
|
return {};
|
3171
3171
|
}
|
3172
3172
|
}]);
|
@@ -3254,8 +3254,8 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
|
3254
3254
|
};
|
3255
3255
|
}
|
3256
3256
|
}, {
|
3257
|
-
key: "
|
3258
|
-
value: function
|
3257
|
+
key: "executeRender",
|
3258
|
+
value: function executeRender() {
|
3259
3259
|
return {};
|
3260
3260
|
}
|
3261
3261
|
}]);
|
@@ -3442,8 +3442,8 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3442
3442
|
};
|
3443
3443
|
}
|
3444
3444
|
}, {
|
3445
|
-
key: "
|
3446
|
-
value: function
|
3445
|
+
key: "executeRender",
|
3446
|
+
value: function executeRender() {
|
3447
3447
|
return {};
|
3448
3448
|
}
|
3449
3449
|
}]);
|
@@ -3585,8 +3585,8 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
|
|
3585
3585
|
};
|
3586
3586
|
}
|
3587
3587
|
}, {
|
3588
|
-
key: "
|
3589
|
-
value: function
|
3588
|
+
key: "executeRender",
|
3589
|
+
value: function executeRender() {
|
3590
3590
|
return {};
|
3591
3591
|
}
|
3592
3592
|
}]);
|
@@ -577,8 +577,8 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
|
|
577
577
|
};
|
578
578
|
}
|
579
579
|
}, {
|
580
|
-
key: "
|
581
|
-
value: function
|
580
|
+
key: "executeRender",
|
581
|
+
value: function executeRender() {
|
582
582
|
return {};
|
583
583
|
}
|
584
584
|
}]);
|
@@ -823,8 +823,8 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
823
823
|
};
|
824
824
|
}
|
825
825
|
}, {
|
826
|
-
key: "
|
827
|
-
value: function
|
826
|
+
key: "executeRender",
|
827
|
+
value: function executeRender(sourcePath, src) {
|
828
828
|
var res = {};
|
829
829
|
if (src === null) {
|
830
830
|
return res;
|
@@ -835,7 +835,7 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
835
835
|
continue;
|
836
836
|
}
|
837
837
|
var subPath = unsafeCreateSourcePath(sourcePath, _key3);
|
838
|
-
var itemResult = this.items[_key3]["
|
838
|
+
var itemResult = this.items[_key3]["executeRender"](subPath, itemSrc);
|
839
839
|
for (var keyS in itemResult) {
|
840
840
|
var _key4 = keyS;
|
841
841
|
res[_key4] = itemResult[_key4];
|
@@ -856,7 +856,7 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
856
856
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
857
857
|
_classCallCheck(this, ArraySchema);
|
858
858
|
_this = _callSuper(this, ArraySchema);
|
859
|
-
_defineProperty(_this, "
|
859
|
+
_defineProperty(_this, "renderInput", null);
|
860
860
|
_this.item = item;
|
861
861
|
_this.opt = opt;
|
862
862
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -952,8 +952,8 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
952
952
|
};
|
953
953
|
}
|
954
954
|
}, {
|
955
|
-
key: "
|
956
|
-
value: function
|
955
|
+
key: "executeRender",
|
956
|
+
value: function executeRender(sourcePath, src) {
|
957
957
|
var res = {};
|
958
958
|
if (src === null) {
|
959
959
|
return res;
|
@@ -965,16 +965,16 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
965
965
|
continue;
|
966
966
|
}
|
967
967
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
968
|
-
var itemResult = this.item["
|
968
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
969
969
|
for (var keyS in itemResult) {
|
970
970
|
var _key = keyS;
|
971
971
|
res[_key] = itemResult[_key];
|
972
972
|
}
|
973
973
|
}
|
974
|
-
if (this.
|
975
|
-
var _this$
|
976
|
-
|
977
|
-
layout = _this$
|
974
|
+
if (this.renderInput) {
|
975
|
+
var _this$renderInput = this.renderInput,
|
976
|
+
select = _this$renderInput.select,
|
977
|
+
layout = _this$renderInput.layout;
|
978
978
|
if (layout !== "list") {
|
979
979
|
res[sourcePath] = {
|
980
980
|
status: "error",
|
@@ -989,12 +989,12 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
989
989
|
parent: "array",
|
990
990
|
items: src.map(function (val) {
|
991
991
|
// NB NB: display is actually defined by the user
|
992
|
-
var
|
992
|
+
var _select = select({
|
993
993
|
val: val
|
994
994
|
}),
|
995
|
-
title =
|
996
|
-
subtitle =
|
997
|
-
image =
|
995
|
+
title = _select.title,
|
996
|
+
subtitle = _select.subtitle,
|
997
|
+
image = _select.image;
|
998
998
|
return {
|
999
999
|
title: title,
|
1000
1000
|
subtitle: subtitle,
|
@@ -1013,9 +1013,9 @@ var ArraySchema = /*#__PURE__*/function (_Schema) {
|
|
1013
1013
|
return res;
|
1014
1014
|
}
|
1015
1015
|
}, {
|
1016
|
-
key: "
|
1017
|
-
value: function
|
1018
|
-
this.
|
1016
|
+
key: "render",
|
1017
|
+
value: function render(input) {
|
1018
|
+
this.renderInput = input;
|
1019
1019
|
return this;
|
1020
1020
|
}
|
1021
1021
|
}]);
|
@@ -1115,8 +1115,8 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
|
1115
1115
|
};
|
1116
1116
|
}
|
1117
1117
|
}, {
|
1118
|
-
key: "
|
1119
|
-
value: function
|
1118
|
+
key: "executeRender",
|
1119
|
+
value: function executeRender() {
|
1120
1120
|
return {};
|
1121
1121
|
}
|
1122
1122
|
}]);
|
@@ -1462,8 +1462,8 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1462
1462
|
};
|
1463
1463
|
}
|
1464
1464
|
}, {
|
1465
|
-
key: "
|
1466
|
-
value: function
|
1465
|
+
key: "executeRender",
|
1466
|
+
value: function executeRender(sourcePath, src) {
|
1467
1467
|
var res = {};
|
1468
1468
|
if (src === null) {
|
1469
1469
|
return res;
|
@@ -1485,7 +1485,7 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1485
1485
|
return false;
|
1486
1486
|
});
|
1487
1487
|
if (thisSchema) {
|
1488
|
-
var itemResult = thisSchema["
|
1488
|
+
var itemResult = thisSchema["executeRender"](sourcePath, src);
|
1489
1489
|
for (var keyS in itemResult) {
|
1490
1490
|
var _key3 = keyS;
|
1491
1491
|
res[_key3] = itemResult[_key3];
|
@@ -1722,8 +1722,8 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
|
|
1722
1722
|
};
|
1723
1723
|
}
|
1724
1724
|
}, {
|
1725
|
-
key: "
|
1726
|
-
value: function
|
1725
|
+
key: "executeRender",
|
1726
|
+
value: function executeRender() {
|
1727
1727
|
return {};
|
1728
1728
|
}
|
1729
1729
|
}]);
|
@@ -2180,8 +2180,8 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
2180
2180
|
};
|
2181
2181
|
}
|
2182
2182
|
}, {
|
2183
|
-
key: "
|
2184
|
-
value: function
|
2183
|
+
key: "executeRender",
|
2184
|
+
value: function executeRender() {
|
2185
2185
|
return {};
|
2186
2186
|
}
|
2187
2187
|
}]);
|
@@ -2197,7 +2197,7 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2197
2197
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
2198
2198
|
_classCallCheck(this, RecordSchema);
|
2199
2199
|
_this = _callSuper(this, RecordSchema);
|
2200
|
-
_defineProperty(_this, "
|
2200
|
+
_defineProperty(_this, "renderInput", null);
|
2201
2201
|
_this.item = item;
|
2202
2202
|
_this.opt = opt;
|
2203
2203
|
_this.customValidateFunctions = customValidateFunctions;
|
@@ -2314,8 +2314,8 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2314
2314
|
};
|
2315
2315
|
}
|
2316
2316
|
}, {
|
2317
|
-
key: "
|
2318
|
-
value: function
|
2317
|
+
key: "executeRender",
|
2318
|
+
value: function executeRender(sourcePath, src) {
|
2319
2319
|
var res = {};
|
2320
2320
|
if (src === null) {
|
2321
2321
|
return res;
|
@@ -2326,16 +2326,16 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2326
2326
|
continue;
|
2327
2327
|
}
|
2328
2328
|
var subPath = unsafeCreateSourcePath(sourcePath, key);
|
2329
|
-
var itemResult = this.item["
|
2329
|
+
var itemResult = this.item["executeRender"](subPath, itemSrc);
|
2330
2330
|
for (var keyS in itemResult) {
|
2331
2331
|
var _key = keyS;
|
2332
2332
|
res[_key] = itemResult[_key];
|
2333
2333
|
}
|
2334
2334
|
}
|
2335
|
-
if (this.
|
2336
|
-
var _this$
|
2337
|
-
prepare = _this$
|
2338
|
-
layout = _this$
|
2335
|
+
if (this.renderInput) {
|
2336
|
+
var _this$renderInput = this.renderInput,
|
2337
|
+
prepare = _this$renderInput.select,
|
2338
|
+
layout = _this$renderInput.layout;
|
2339
2339
|
if (layout !== "list") {
|
2340
2340
|
res[sourcePath] = {
|
2341
2341
|
status: "error",
|
@@ -2378,9 +2378,9 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2378
2378
|
return res;
|
2379
2379
|
}
|
2380
2380
|
}, {
|
2381
|
-
key: "
|
2382
|
-
value: function
|
2383
|
-
this.
|
2381
|
+
key: "render",
|
2382
|
+
value: function render(input) {
|
2383
|
+
this.renderInput = input;
|
2384
2384
|
return this;
|
2385
2385
|
}
|
2386
2386
|
}]);
|
@@ -3001,8 +3001,8 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
|
|
3001
3001
|
};
|
3002
3002
|
}
|
3003
3003
|
}, {
|
3004
|
-
key: "
|
3005
|
-
value: function
|
3004
|
+
key: "executeRender",
|
3005
|
+
value: function executeRender() {
|
3006
3006
|
return {};
|
3007
3007
|
}
|
3008
3008
|
}]);
|
@@ -3163,8 +3163,8 @@ var StringSchema = /*#__PURE__*/function (_Schema) {
|
|
3163
3163
|
};
|
3164
3164
|
}
|
3165
3165
|
}, {
|
3166
|
-
key: "
|
3167
|
-
value: function
|
3166
|
+
key: "executeRender",
|
3167
|
+
value: function executeRender() {
|
3168
3168
|
return {};
|
3169
3169
|
}
|
3170
3170
|
}]);
|
@@ -3252,8 +3252,8 @@ var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
|
3252
3252
|
};
|
3253
3253
|
}
|
3254
3254
|
}, {
|
3255
|
-
key: "
|
3256
|
-
value: function
|
3255
|
+
key: "executeRender",
|
3256
|
+
value: function executeRender() {
|
3257
3257
|
return {};
|
3258
3258
|
}
|
3259
3259
|
}]);
|
@@ -3440,8 +3440,8 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3440
3440
|
};
|
3441
3441
|
}
|
3442
3442
|
}, {
|
3443
|
-
key: "
|
3444
|
-
value: function
|
3443
|
+
key: "executeRender",
|
3444
|
+
value: function executeRender() {
|
3445
3445
|
return {};
|
3446
3446
|
}
|
3447
3447
|
}]);
|
@@ -3583,8 +3583,8 @@ var DateSchema = /*#__PURE__*/function (_Schema) {
|
|
3583
3583
|
};
|
3584
3584
|
}
|
3585
3585
|
}, {
|
3586
|
-
key: "
|
3587
|
-
value: function
|
3586
|
+
key: "executeRender",
|
3587
|
+
value: function executeRender() {
|
3588
3588
|
return {};
|
3589
3589
|
}
|
3590
3590
|
}]);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export { A as ArraySchema, B as BooleanSchema, e as DEFAULT_APP_HOST, D as DEFAULT_CONTENT_HOST, f as DEFAULT_VAL_REMOTE_HOST, o as DateSchema, F as FATAL_ERROR_TYPES, g as FILE_REF_PROP, h as FILE_REF_SUBTYPE_TAG, n as FileSchema, G as GenericSelector, l as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, p as RichTextSchema, S as Schema, k as StringSchema, U as UnionSchema, V as VAL_EXTENSION, j as derefPatch, q as deserializeSchema, i as initVal, m as modules } from './index-
|
1
|
+
export { A as ArraySchema, B as BooleanSchema, e as DEFAULT_APP_HOST, D as DEFAULT_CONTENT_HOST, f as DEFAULT_VAL_REMOTE_HOST, o as DateSchema, F as FATAL_ERROR_TYPES, g as FILE_REF_PROP, h as FILE_REF_SUBTYPE_TAG, n as FileSchema, G as GenericSelector, l as ImageSchema, I as Internal, K as KeyOfSchema, L as LiteralSchema, M as ModuleFilePathSep, N as NumberSchema, O as ObjectSchema, R as RecordSchema, p as RichTextSchema, S as Schema, k as StringSchema, U as UnionSchema, V as VAL_EXTENSION, j as derefPatch, q as deserializeSchema, i as initVal, m as modules } from './index-ffbf9639.esm.js';
|
2
2
|
import './result-daff1cae.esm.js';
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var dist_valbuildCore = require('../../dist/index-
|
5
|
+
var dist_valbuildCore = require('../../dist/index-55206077.cjs.dev.js');
|
6
6
|
var result = require('../../dist/result-bb1f436e.cjs.dev.js');
|
7
7
|
var util = require('../../dist/util-b213092b.cjs.dev.js');
|
8
8
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var dist_valbuildCore = require('../../dist/index-
|
5
|
+
var dist_valbuildCore = require('../../dist/index-6b263f20.cjs.prod.js');
|
6
6
|
var result = require('../../dist/result-787e35f6.cjs.prod.js');
|
7
7
|
var util = require('../../dist/util-030d8a1f.cjs.prod.js');
|
8
8
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-
|
2
|
-
export { P as PatchError } from '../../dist/index-
|
1
|
+
import { _ as _typeof, a as _slicedToArray, P as PatchError, s as splitModuleFilePathAndModulePath, b as _createClass, c as _classCallCheck, d as _toConsumableArray } from '../../dist/index-ffbf9639.esm.js';
|
2
|
+
export { P as PatchError } from '../../dist/index-ffbf9639.esm.js';
|
3
3
|
import { f as isNonEmpty, e as err, o as ok, m as map, g as flatMap, i as isErr, h as flatMapReduce, j as filterOrElse, k as mapErr, l as map$1, n as all, p as flatten, q as allT } from '../../dist/result-daff1cae.esm.js';
|
4
4
|
import { p as pipe } from '../../dist/util-18613e99.esm.js';
|
5
5
|
|