@json-layout/core 0.24.1 → 0.25.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/package.json +1 -1
- package/src/compile/index.js +5 -1
- package/src/compile/serialize.js +1 -0
- package/src/compile/skeleton-node.js +175 -130
- package/src/compile/skeleton-tree.js +23 -17
- package/src/compile/types.ts +5 -4
- package/src/state/state-node.js +20 -9
- package/src/state/state-tree.js +12 -2
- package/types/compile/index.d.ts +0 -16
- package/types/compile/index.d.ts.map +0 -1
- package/types/compile/serialize.d.ts +0 -6
- package/types/compile/serialize.d.ts.map +0 -1
- package/types/compile/skeleton-node.d.ts +0 -21
- package/types/compile/skeleton-node.d.ts.map +0 -1
- package/types/compile/skeleton-tree.d.ts +0 -16
- package/types/compile/skeleton-tree.d.ts.map +0 -1
- package/types/compile/types.d.ts +0 -58
- package/types/compile/types.d.ts.map +0 -1
- package/types/compile/utils/resolve-refs.d.ts +0 -17
- package/types/compile/utils/resolve-refs.d.ts.map +0 -1
- package/types/i18n/en.d.ts +0 -3
- package/types/i18n/en.d.ts.map +0 -1
- package/types/i18n/fr.d.ts +0 -3
- package/types/i18n/fr.d.ts.map +0 -1
- package/types/i18n/index.d.ts +0 -3
- package/types/i18n/index.d.ts.map +0 -1
- package/types/i18n/types.d.ts +0 -36
- package/types/i18n/types.d.ts.map +0 -1
- package/types/index.d.ts +0 -5
- package/types/index.d.ts.map +0 -1
- package/types/state/index.d.ts +0 -278
- package/types/state/index.d.ts.map +0 -1
- package/types/state/state-node.d.ts +0 -36
- package/types/state/state-node.d.ts.map +0 -1
- package/types/state/state-tree.d.ts +0 -13
- package/types/state/state-tree.d.ts.map +0 -1
- package/types/state/types.d.ts +0 -173
- package/types/state/types.d.ts.map +0 -1
- package/types/state/utils/display.d.ts +0 -51
- package/types/state/utils/display.d.ts.map +0 -1
- package/types/state/utils/immutable.d.ts +0 -21
- package/types/state/utils/immutable.d.ts.map +0 -1
- package/types/utils/build.d.ts +0 -5
- package/types/utils/build.d.ts.map +0 -1
- package/types/utils/clone.d.ts +0 -3
- package/types/utils/clone.d.ts.map +0 -1
- package/types/utils/doc-options.d.ts +0 -14
- package/types/utils/doc-options.d.ts.map +0 -1
package/src/state/state-tree.js
CHANGED
|
@@ -45,13 +45,23 @@ export function createStateTree (
|
|
|
45
45
|
validationState,
|
|
46
46
|
reusedStateTree
|
|
47
47
|
) {
|
|
48
|
-
const validate = compiledLayout.validates[skeleton.root
|
|
48
|
+
const validate = compiledLayout.validates[skeleton.root]
|
|
49
49
|
const valid = validate(data)
|
|
50
50
|
if (validate.errors) {
|
|
51
51
|
for (const error of validate.errors) {
|
|
52
52
|
if (error.keyword !== 'errorMessage') compiledLayout.localizeErrors([error])
|
|
53
53
|
}
|
|
54
54
|
context.errors = validate.errors
|
|
55
|
+
if (context.errors.length) {
|
|
56
|
+
for (const error of context.errors) {
|
|
57
|
+
const originalError = error.params?.errors?.[0] ?? error
|
|
58
|
+
// work around this issue https://github.com/ajv-validator/ajv/issues/512
|
|
59
|
+
if (originalError?.parentSchema.__pointer) {
|
|
60
|
+
originalError.schemaPath = originalError?.parentSchema.__pointer
|
|
61
|
+
if (originalError.keyword === 'oneOf') originalError.schemaPath += '/oneOf'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
55
65
|
if ([true, 'error'].includes(options.removeAdditional)) {
|
|
56
66
|
context.additionalPropertiesErrors = validate.errors.filter(error => error.keyword === 'additionalProperties' || error.keyword === 'unevaluatedProperties')
|
|
57
67
|
}
|
|
@@ -65,7 +75,7 @@ export function createStateTree (
|
|
|
65
75
|
null,
|
|
66
76
|
'',
|
|
67
77
|
null,
|
|
68
|
-
skeleton.root,
|
|
78
|
+
compiledLayout.skeletonNodes[skeleton.root],
|
|
69
79
|
null,
|
|
70
80
|
display,
|
|
71
81
|
data,
|
package/types/compile/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {object} _schema
|
|
3
|
-
* @param {PartialCompileOptions} [partialOptions]
|
|
4
|
-
* @returns {CompiledLayout}
|
|
5
|
-
*/
|
|
6
|
-
export function compile(_schema: object, partialOptions?: import("./types.js").PartialCompileOptions | undefined): CompiledLayout;
|
|
7
|
-
export { resolveLocaleRefs } from "./utils/resolve-refs.js";
|
|
8
|
-
/** @type {(draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions} */
|
|
9
|
-
export const produceCompileOptions: (draft: PartialCompileOptions, newOptions: PartialCompileOptions) => PartialCompileOptions;
|
|
10
|
-
export type SkeletonTree = import('./types.js').SkeletonTree;
|
|
11
|
-
export type SkeletonNode = import('./types.js').SkeletonNode;
|
|
12
|
-
export type CompiledLayout = import('./types.js').CompiledLayout;
|
|
13
|
-
export type CompileOptions = import('./types.js').CompileOptions;
|
|
14
|
-
export type PartialCompileOptions = import('./types.js').PartialCompileOptions;
|
|
15
|
-
export type CompiledExpression = import('./types.js').CompiledExpression;
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AA0GA;;;;GAIG;AACH,iCAJW,MAAM,4EAEJ,cAAc,CA0F1B;;AApKD,yGAAyG;AACzG,4CADmB,qBAAqB,cAAc,qBAAqB,KAAK,qBAAqB,CAiBnG;2BAjCW,OAAO,YAAY,EAAE,YAAY;2BACjC,OAAO,YAAY,EAAE,YAAY;6BACjC,OAAO,YAAY,EAAE,cAAc;6BACnC,OAAO,YAAY,EAAE,cAAc;oCACnC,OAAO,YAAY,EAAE,qBAAqB;iCAC1C,OAAO,YAAY,EAAE,kBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/compile/serialize.js"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,0CAHW,OAAO,YAAY,EAAE,cAAc,GACjC,MAAM,CAmFlB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {any} rawSchema
|
|
3
|
-
* @param {string} sourceSchemaId
|
|
4
|
-
* @param {import('./index.js').CompileOptions} options
|
|
5
|
-
* @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
|
|
6
|
-
* @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
|
|
7
|
-
* @param {string[]} validates
|
|
8
|
-
* @param {Record<string, string[]>} validationErrors
|
|
9
|
-
* @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
|
|
10
|
-
* @param {import('@json-layout/vocabulary').Expression[]} expressions
|
|
11
|
-
* @param {string | number} key
|
|
12
|
-
* @param {string} currentPointer
|
|
13
|
-
* @param {string | null} parentPointer
|
|
14
|
-
* @param {boolean} required
|
|
15
|
-
* @param {string} [condition]
|
|
16
|
-
* @param {boolean} [dependent]
|
|
17
|
-
* @param {string} [knownType]
|
|
18
|
-
* @returns {import('./types.js').SkeletonNode}
|
|
19
|
-
*/
|
|
20
|
-
export function makeSkeletonNode(rawSchema: any, sourceSchemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, validates: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], key: string | number, currentPointer: string, parentPointer: string | null, required: boolean, condition?: string | undefined, dependent?: boolean | undefined, knownType?: string | undefined): import('./types.js').SkeletonNode;
|
|
21
|
-
//# sourceMappingURL=skeleton-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-node.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-node.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAlBW,GAAG,kBACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,aACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,OAC9C,MAAM,GAAG,MAAM,kBACf,MAAM,iBACN,MAAM,GAAG,IAAI,YACb,OAAO,oGAIL,OAAO,YAAY,EAAE,YAAY,CA8W7C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {any} schema
|
|
3
|
-
* @param {string} schemaId
|
|
4
|
-
* @param {import('./index.js').CompileOptions} options
|
|
5
|
-
* @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
|
|
6
|
-
* @param {Record<string, import('./types.js').SkeletonTree>} skeletonTrees
|
|
7
|
-
* @param {string[]} validates
|
|
8
|
-
* @param {Record<string, string[]>} validationErrors
|
|
9
|
-
* @param {Record<string, import('@json-layout/vocabulary').NormalizedLayout>} normalizedLayouts
|
|
10
|
-
* @param {import('@json-layout/vocabulary').Expression[]} expressions
|
|
11
|
-
* @param {string} pointer
|
|
12
|
-
* @param {string} title
|
|
13
|
-
* @returns {import('./types.js').SkeletonTree}
|
|
14
|
-
*/
|
|
15
|
-
export function makeSkeletonTree(schema: any, schemaId: string, options: import('./index.js').CompileOptions, getJSONRef: (schemaId: string, ref: string) => [any, string, string], skeletonTrees: Record<string, import('./types.js').SkeletonTree>, validates: string[], validationErrors: Record<string, string[]>, normalizedLayouts: Record<string, import('@json-layout/vocabulary').NormalizedLayout>, expressions: import('@json-layout/vocabulary').Expression[], pointer: string, title: string): import('./types.js').SkeletonTree;
|
|
16
|
-
//# sourceMappingURL=skeleton-tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-tree.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-tree.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,yCAbW,GAAG,YACH,MAAM,WACN,OAAO,YAAY,EAAE,cAAc,yBACxB,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,iBACxD,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,YAAY,CAAC,aACjD,MAAM,EAAE,oBACR,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,qBACxB,OAAO,MAAM,EAAE,OAAO,yBAAyB,EAAE,gBAAgB,CAAC,eAClE,OAAO,yBAAyB,EAAE,UAAU,EAAE,WAC9C,MAAM,SACN,MAAM,GACJ,OAAO,YAAY,EAAE,YAAY,CAgC7C"}
|
package/types/compile/types.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type ajvModule from 'ajv/dist/2019.js';
|
|
2
|
-
import type MarkdownIt from 'markdown-it';
|
|
3
|
-
import { type ComponentInfo, type BaseCompObject, type NormalizedLayout, type StateNodeOptionsBase, type Expression } from '@json-layout/vocabulary';
|
|
4
|
-
import { type ValidateFunction, type SchemaObject } from 'ajv/dist/2019.js';
|
|
5
|
-
import { type Display } from '../state/utils/display.js';
|
|
6
|
-
import { type LocaleMessages } from '../i18n/types.js';
|
|
7
|
-
export interface ParentContextExpression {
|
|
8
|
-
data: unknown;
|
|
9
|
-
parent: ParentContextExpression | undefined | null;
|
|
10
|
-
}
|
|
11
|
-
export type CompiledExpression = (data: any, options: StateNodeOptionsBase, context: object, display: Display, layout: BaseCompObject, validates: Record<string, ValidateFunction>, rootData?: unknown, parent?: ParentContextExpression | null) => any;
|
|
12
|
-
export interface CompileOptions {
|
|
13
|
-
ajv: ajvModule.default;
|
|
14
|
-
ajvOptions?: ajvModule.Options;
|
|
15
|
-
code: boolean;
|
|
16
|
-
markdown: (text: string) => string;
|
|
17
|
-
markdownItOptions?: MarkdownIt.Options;
|
|
18
|
-
locale: string;
|
|
19
|
-
messages: LocaleMessages;
|
|
20
|
-
optionsKeys: string[];
|
|
21
|
-
components: Record<string, ComponentInfo>;
|
|
22
|
-
}
|
|
23
|
-
export type PartialCompileOptions = Partial<Omit<CompileOptions, 'messages'>> & {
|
|
24
|
-
messages?: Partial<LocaleMessages>;
|
|
25
|
-
components?: Record<string, Omit<ComponentInfo, 'name'>>;
|
|
26
|
-
};
|
|
27
|
-
export interface CompiledLayout {
|
|
28
|
-
options?: CompileOptions;
|
|
29
|
-
schema?: SchemaObject;
|
|
30
|
-
mainTree: string;
|
|
31
|
-
skeletonTrees: Record<string, SkeletonTree>;
|
|
32
|
-
validates: Record<string, ValidateFunction>;
|
|
33
|
-
validationErrors: Record<string, string[]>;
|
|
34
|
-
normalizedLayouts: Record<string, NormalizedLayout>;
|
|
35
|
-
expressions: CompiledExpression[];
|
|
36
|
-
locale: string;
|
|
37
|
-
messages: LocaleMessages;
|
|
38
|
-
components: Record<string, Omit<ComponentInfo, 'schema'>>;
|
|
39
|
-
localizeErrors: (errors: ajvModule.ErrorObject[]) => void;
|
|
40
|
-
}
|
|
41
|
-
export interface SkeletonTree {
|
|
42
|
-
title: string;
|
|
43
|
-
root: SkeletonNode;
|
|
44
|
-
}
|
|
45
|
-
export interface SkeletonNode {
|
|
46
|
-
key: string | number;
|
|
47
|
-
pointer: string;
|
|
48
|
-
parentPointer: string | null;
|
|
49
|
-
pure: boolean;
|
|
50
|
-
propertyKeys: string[];
|
|
51
|
-
roPropertyKeys: string[];
|
|
52
|
-
condition?: Expression;
|
|
53
|
-
children?: SkeletonNode[];
|
|
54
|
-
childrenTrees?: string[];
|
|
55
|
-
required?: boolean;
|
|
56
|
-
nullable?: boolean;
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRo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AAO,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mutates a schema by replacing ~$locale~ in all refs
|
|
3
|
-
* @param {import('ajv').SchemaObject} schema
|
|
4
|
-
* @param {ajvModule.default} ajv
|
|
5
|
-
* @param {string} locale
|
|
6
|
-
* @returns {(schemaId: string, ref: string) => [any, string, string]}
|
|
7
|
-
*/
|
|
8
|
-
export function resolveLocaleRefs(schema: import('ajv').SchemaObject, ajv: ajvModule.default, locale?: string): (schemaId: string, ref: string) => [any, string, string];
|
|
9
|
-
/**
|
|
10
|
-
* partially resolve a schema but not recursively, used for layout normalization
|
|
11
|
-
* @param {import('ajv').SchemaObject} schema
|
|
12
|
-
* @param {string} schemaId
|
|
13
|
-
* @param {(schemaId: string, ref: string) => [any, string, string]} getJSONRef
|
|
14
|
-
*/
|
|
15
|
-
export function partialResolveRefs(schema: import('ajv').SchemaObject, schemaId: string, getJSONRef: (schemaId: string, ref: string) => [any, string, string]): any;
|
|
16
|
-
import ajvModule from 'ajv/dist/2019.js';
|
|
17
|
-
//# sourceMappingURL=resolve-refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-refs.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/resolve-refs.js"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,0CALW,OAAO,KAAK,EAAE,YAAY,OAC1B,UAAU,OAAO,WACjB,MAAM,cACO,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,CASpE;AAsCD;;;;;GAKG;AACH,2CAJW,OAAO,KAAK,EAAE,YAAY,YAC1B,MAAM,yBACK,MAAM,OAAO,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,OA+ClE;sBAjIqB,kBAAkB"}
|
package/types/i18n/en.d.ts
DELETED
package/types/i18n/en.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.js"],"names":[],"mappings":"wBAAW,OAAO,YAAY,EAAE,cAAc"}
|
package/types/i18n/fr.d.ts
DELETED
package/types/i18n/fr.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.js"],"names":[],"mappings":"wBAAW,OAAO,YAAY,EAAE,cAAc"}
|
package/types/i18n/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.js"],"names":[],"mappings":"wBAGW,OAAO,MAAM,EAAE,OAAO,YAAY,EAAE,cAAc,CAAC"}
|
package/types/i18n/types.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface CompileOptionsMessages {
|
|
2
|
-
errorOneOf: string;
|
|
3
|
-
errorRequired: string;
|
|
4
|
-
}
|
|
5
|
-
export interface StateOptionsMessages {
|
|
6
|
-
addItem: string;
|
|
7
|
-
delete: string;
|
|
8
|
-
edit: string;
|
|
9
|
-
close: string;
|
|
10
|
-
duplicate: string;
|
|
11
|
-
sort: string;
|
|
12
|
-
up: string;
|
|
13
|
-
down: string;
|
|
14
|
-
showHelp: string;
|
|
15
|
-
mdeLink1: string;
|
|
16
|
-
mdeLink2: string;
|
|
17
|
-
mdeImg1: string;
|
|
18
|
-
mdeImg2: string;
|
|
19
|
-
mdeTable1: string;
|
|
20
|
-
mdeTable2: string;
|
|
21
|
-
bold: string;
|
|
22
|
-
italic: string;
|
|
23
|
-
heading: string;
|
|
24
|
-
quote: string;
|
|
25
|
-
unorderedList: string;
|
|
26
|
-
orderedList: string;
|
|
27
|
-
createLink: string;
|
|
28
|
-
insertImage: string;
|
|
29
|
-
createTable: string;
|
|
30
|
-
preview: string;
|
|
31
|
-
mdeGuide: string;
|
|
32
|
-
undo: string;
|
|
33
|
-
redo: string;
|
|
34
|
-
}
|
|
35
|
-
export type LocaleMessages = CompileOptionsMessages & StateOptionsMessages;
|
|
36
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG,oBAAoB,CAAA"}
|
package/types/index.d.ts
DELETED
package/types/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":""}
|
package/types/state/index.d.ts
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
export { Display } from "./utils/display.js";
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {import('./types.js').StateNode} StateNode
|
|
4
|
-
* @typedef {import('./types.js').StateTree} StateTree
|
|
5
|
-
* @typedef {import('./types.js').StatefulLayoutOptions} StatefulLayoutOptions
|
|
6
|
-
* @typedef {import('./types.js').CreateStateTreeContext} CreateStateTreeContext
|
|
7
|
-
* @typedef {import('./types.js').TextFieldNode} TextFieldNode
|
|
8
|
-
* @typedef {import('./types.js').TextareaNode} TextareaNode
|
|
9
|
-
* @typedef {import('./types.js').NumberFieldNode} NumberFieldNode
|
|
10
|
-
* @typedef {import('./types.js').SliderNode} SliderNode
|
|
11
|
-
* @typedef {import('./types.js').SectionNode} SectionNode
|
|
12
|
-
* @typedef {import('./types.js').SelectNode} SelectNode
|
|
13
|
-
* @typedef {import('./types.js').AutocompleteNode} AutocompleteNode
|
|
14
|
-
* @typedef {import('./types.js').RadioGroupNode} RadioGroupNode
|
|
15
|
-
* @typedef {import('./types.js').CheckboxGroupNode} CheckboxGroupNode
|
|
16
|
-
* @typedef {import('./types.js').SwitchGroupNode} SwitchGroupNode
|
|
17
|
-
* @typedef {import('./types.js').ComboboxNode} ComboboxNode
|
|
18
|
-
* @typedef {import('./types.js').CheckboxNode} CheckboxNode
|
|
19
|
-
* @typedef {import('./types.js').SwitchNode} SwitchNode
|
|
20
|
-
* @typedef {import('./types.js').ColorPickerNode} ColorPickerNode
|
|
21
|
-
* @typedef {import('./types.js').DatePickerNode} DatePickerNode
|
|
22
|
-
* @typedef {import('./types.js').DateTimePickerNode} DateTimePickerNode
|
|
23
|
-
* @typedef {import('./types.js').TimePickerNode} TimePickerNode
|
|
24
|
-
* @typedef {import('./types.js').ExpansionPanelsNode} ExpansionPanelsNode
|
|
25
|
-
* @typedef {import('./types.js').TabsNode} TabsNode
|
|
26
|
-
* @typedef {import('./types.js').VerticalTabsNode} VerticalTabsNode
|
|
27
|
-
* @typedef {import('./types.js').StepperNode} StepperNode
|
|
28
|
-
* @typedef {import('./types.js').OneOfSelectNode} OneOfSelectNode
|
|
29
|
-
* @typedef {import('./types.js').ListNode} ListNode
|
|
30
|
-
* @typedef {import('./types.js').FileInputNode} FileInputNode
|
|
31
|
-
* @typedef {import('./types.js').FileRef} FileRef
|
|
32
|
-
*/
|
|
33
|
-
/** @type {(node: StateNode | undefined) => node is SectionNode} */
|
|
34
|
-
export const isSection: (node: StateNode | undefined) => node is import("./types.js").SectionNode;
|
|
35
|
-
/** @type {(node: StateNode | undefined, components: Record<string, import('@json-layout/vocabulary').ComponentInfo>) => node is SelectNode | ComboboxNode | AutocompleteNode} */
|
|
36
|
-
export const isItemsNode: (node: StateNode | undefined, components: Record<string, import('@json-layout/vocabulary').ComponentInfo>) => node is import("./types.js").SelectNode | import("./types.js").AutocompleteNode | import("./types.js").ComboboxNode;
|
|
37
|
-
export class StatefulLayout {
|
|
38
|
-
/**
|
|
39
|
-
* @param {import("../index.js").CompiledLayout} compiledLayout
|
|
40
|
-
* @param {import("../index.js").SkeletonTree} skeletonTree
|
|
41
|
-
* @param {Partial<StatefulLayoutOptions>} options
|
|
42
|
-
* @param {unknown} [data]
|
|
43
|
-
*/
|
|
44
|
-
constructor(compiledLayout: import("../index.js").CompiledLayout, skeletonTree: import("../index.js").SkeletonTree, options: Partial<StatefulLayoutOptions>, data?: unknown);
|
|
45
|
-
/**
|
|
46
|
-
* @private
|
|
47
|
-
* @readonly
|
|
48
|
-
* @type {import('../index.js').CompiledLayout}
|
|
49
|
-
*/
|
|
50
|
-
private readonly _compiledLayout;
|
|
51
|
-
get compiledLayout(): import("../compile/types.js").CompiledLayout;
|
|
52
|
-
/**
|
|
53
|
-
* @private
|
|
54
|
-
* @type {StateTree}
|
|
55
|
-
*/
|
|
56
|
-
private _stateTree;
|
|
57
|
-
get stateTree(): import("./types.js").StateTree;
|
|
58
|
-
/**
|
|
59
|
-
* @readonly
|
|
60
|
-
* @type {import('../index.js').SkeletonTree}
|
|
61
|
-
*/
|
|
62
|
-
readonly skeletonTree: import('../index.js').SkeletonTree;
|
|
63
|
-
/**
|
|
64
|
-
* @private
|
|
65
|
-
* @type {Display}
|
|
66
|
-
*/
|
|
67
|
-
private _display;
|
|
68
|
-
get display(): Display;
|
|
69
|
-
/**
|
|
70
|
-
* @private
|
|
71
|
-
* @type {import('./types.js').ValidationState}
|
|
72
|
-
*/
|
|
73
|
-
private _validationState;
|
|
74
|
-
/**
|
|
75
|
-
* @private
|
|
76
|
-
* @param {Partial<import('./types.js').ValidationState>} validationState
|
|
77
|
-
*/
|
|
78
|
-
set validationState(arg: import("./types.js").ValidationState);
|
|
79
|
-
/**
|
|
80
|
-
* @returns {import('./types.js').ValidationState}
|
|
81
|
-
*/
|
|
82
|
-
get validationState(): import("./types.js").ValidationState;
|
|
83
|
-
/**
|
|
84
|
-
* @private
|
|
85
|
-
* @type {StatefulLayoutOptions}
|
|
86
|
-
*/
|
|
87
|
-
private _options;
|
|
88
|
-
/**
|
|
89
|
-
* @param {Partial<StatefulLayoutOptions>} options
|
|
90
|
-
*/
|
|
91
|
-
set options(arg: import("./types.js").StatefulLayoutOptions);
|
|
92
|
-
/**
|
|
93
|
-
* @returns {StatefulLayoutOptions}
|
|
94
|
-
*/
|
|
95
|
-
get options(): import("./types.js").StatefulLayoutOptions;
|
|
96
|
-
/**
|
|
97
|
-
* @private
|
|
98
|
-
* @type {unknown}
|
|
99
|
-
*/
|
|
100
|
-
private _data;
|
|
101
|
-
set data(arg: unknown);
|
|
102
|
-
get data(): unknown;
|
|
103
|
-
/**
|
|
104
|
-
* @private
|
|
105
|
-
* @type {unknown}
|
|
106
|
-
*/
|
|
107
|
-
private _previousData;
|
|
108
|
-
/**
|
|
109
|
-
* @private
|
|
110
|
-
* @type {boolean}
|
|
111
|
-
*/
|
|
112
|
-
private _dataWaitingForBlur;
|
|
113
|
-
/**
|
|
114
|
-
* @private
|
|
115
|
-
* @type {CreateStateTreeContext}
|
|
116
|
-
*/
|
|
117
|
-
private _lastCreateStateTreeContext;
|
|
118
|
-
/**
|
|
119
|
-
* @private
|
|
120
|
-
* @type {string | null}
|
|
121
|
-
*/
|
|
122
|
-
private _autofocusTarget;
|
|
123
|
-
/**
|
|
124
|
-
* @private
|
|
125
|
-
* @type {string | null}
|
|
126
|
-
*/
|
|
127
|
-
private _previousAutofocusTarget;
|
|
128
|
-
/**
|
|
129
|
-
* @type {FileRef[]}
|
|
130
|
-
*/
|
|
131
|
-
files: FileRef[];
|
|
132
|
-
/**
|
|
133
|
-
* @type {Record<string, number>}
|
|
134
|
-
*/
|
|
135
|
-
activatedItems: Record<string, number>;
|
|
136
|
-
/**
|
|
137
|
-
* @private
|
|
138
|
-
* @param {Partial<StatefulLayoutOptions>} options
|
|
139
|
-
*/
|
|
140
|
-
private prepareOptions;
|
|
141
|
-
/**
|
|
142
|
-
* @private
|
|
143
|
-
*/
|
|
144
|
-
private initValidationState;
|
|
145
|
-
/**
|
|
146
|
-
* @private
|
|
147
|
-
*/
|
|
148
|
-
private updateState;
|
|
149
|
-
/**
|
|
150
|
-
* @private
|
|
151
|
-
*/
|
|
152
|
-
private emitData;
|
|
153
|
-
/**
|
|
154
|
-
* @private
|
|
155
|
-
* @param {boolean} rehydrate
|
|
156
|
-
*/
|
|
157
|
-
private createStateTree;
|
|
158
|
-
validate(): void;
|
|
159
|
-
resetValidation(): void;
|
|
160
|
-
/**
|
|
161
|
-
* @returns {boolean}
|
|
162
|
-
*/
|
|
163
|
-
get valid(): boolean;
|
|
164
|
-
/**
|
|
165
|
-
* @returns {string[]}
|
|
166
|
-
*/
|
|
167
|
-
get errors(): string[];
|
|
168
|
-
/**
|
|
169
|
-
* @returns {boolean}
|
|
170
|
-
*/
|
|
171
|
-
get hasHiddenError(): boolean;
|
|
172
|
-
/**
|
|
173
|
-
* @private
|
|
174
|
-
* @param {StateNode} node
|
|
175
|
-
* @returns {import('../compile/types.js').ParentContextExpression | null}
|
|
176
|
-
*/
|
|
177
|
-
private getParentContextExpression;
|
|
178
|
-
/**
|
|
179
|
-
* @param {StateNode} node
|
|
180
|
-
* @param {import('@json-layout/vocabulary').Expression} expression
|
|
181
|
-
* @param {any} data
|
|
182
|
-
* @returns {any}
|
|
183
|
-
*/
|
|
184
|
-
evalNodeExpression(node: StateNode, expression: import('@json-layout/vocabulary').Expression, data: any): any;
|
|
185
|
-
/**
|
|
186
|
-
* @private
|
|
187
|
-
* @param {StateNode} node
|
|
188
|
-
* @param {unknown} data
|
|
189
|
-
* @param {boolean} [validated]
|
|
190
|
-
* @param {number} [activateKey]
|
|
191
|
-
*/
|
|
192
|
-
private applyInput;
|
|
193
|
-
/**
|
|
194
|
-
* @private
|
|
195
|
-
* @type {null | [StateNode, unknown, boolean, number | undefined, ReturnType<typeof setTimeout>]}
|
|
196
|
-
*/
|
|
197
|
-
private debouncedInput;
|
|
198
|
-
applyDebouncedInput(): void;
|
|
199
|
-
/**
|
|
200
|
-
* @param {StateNode} node
|
|
201
|
-
* @param {unknown} data
|
|
202
|
-
* @param {number} [activateKey]
|
|
203
|
-
*/
|
|
204
|
-
input(node: StateNode, data: unknown, activateKey?: number | undefined): void;
|
|
205
|
-
/**
|
|
206
|
-
* @param {StateNode} node
|
|
207
|
-
*/
|
|
208
|
-
blur(node: StateNode): void;
|
|
209
|
-
/**
|
|
210
|
-
* @param {StateNode} node
|
|
211
|
-
*/
|
|
212
|
-
validateNodeRecurse(node: StateNode): void;
|
|
213
|
-
/**
|
|
214
|
-
* @private
|
|
215
|
-
* @type {Record<string, {key: any, appliedQ: boolean, items: import('@json-layout/vocabulary').SelectItems}>}
|
|
216
|
-
*/
|
|
217
|
-
private _itemsCache;
|
|
218
|
-
/**
|
|
219
|
-
* @private
|
|
220
|
-
* @param {StateNode} node
|
|
221
|
-
* @param {string} q
|
|
222
|
-
* @returns {Promise<{appliedQ: boolean, items: import('@json-layout/vocabulary').SelectItems}>}
|
|
223
|
-
*/
|
|
224
|
-
private getItemsWithoutCache;
|
|
225
|
-
/**
|
|
226
|
-
* @param {StateNode} node
|
|
227
|
-
* @param {string} q
|
|
228
|
-
* @returns {Promise<import('@json-layout/vocabulary').SelectItems>}
|
|
229
|
-
*/
|
|
230
|
-
getItems(node: StateNode, q?: string): Promise<import('@json-layout/vocabulary').SelectItems>;
|
|
231
|
-
/**
|
|
232
|
-
* @param {StateNode} node
|
|
233
|
-
* @param {any} rawItem
|
|
234
|
-
* @returns {import('@json-layout/vocabulary').SelectItem}
|
|
235
|
-
*/
|
|
236
|
-
prepareSelectItem(node: StateNode, rawItem: any): import('@json-layout/vocabulary').SelectItem;
|
|
237
|
-
/**
|
|
238
|
-
* @param {StateNode} node
|
|
239
|
-
* @param {number} key
|
|
240
|
-
*/
|
|
241
|
-
activateItem(node: StateNode, key: number): void;
|
|
242
|
-
/**
|
|
243
|
-
* @param {StateNode} node
|
|
244
|
-
*/
|
|
245
|
-
deactivateItem(node: StateNode): void;
|
|
246
|
-
handleAutofocus(): void;
|
|
247
|
-
}
|
|
248
|
-
export type StateNode = import('./types.js').StateNode;
|
|
249
|
-
export type StateTree = import('./types.js').StateTree;
|
|
250
|
-
export type StatefulLayoutOptions = import('./types.js').StatefulLayoutOptions;
|
|
251
|
-
export type CreateStateTreeContext = import('./types.js').CreateStateTreeContext;
|
|
252
|
-
export type TextFieldNode = import('./types.js').TextFieldNode;
|
|
253
|
-
export type TextareaNode = import('./types.js').TextareaNode;
|
|
254
|
-
export type NumberFieldNode = import('./types.js').NumberFieldNode;
|
|
255
|
-
export type SliderNode = import('./types.js').SliderNode;
|
|
256
|
-
export type SectionNode = import('./types.js').SectionNode;
|
|
257
|
-
export type SelectNode = import('./types.js').SelectNode;
|
|
258
|
-
export type AutocompleteNode = import('./types.js').AutocompleteNode;
|
|
259
|
-
export type RadioGroupNode = import('./types.js').RadioGroupNode;
|
|
260
|
-
export type CheckboxGroupNode = import('./types.js').CheckboxGroupNode;
|
|
261
|
-
export type SwitchGroupNode = import('./types.js').SwitchGroupNode;
|
|
262
|
-
export type ComboboxNode = import('./types.js').ComboboxNode;
|
|
263
|
-
export type CheckboxNode = import('./types.js').CheckboxNode;
|
|
264
|
-
export type SwitchNode = import('./types.js').SwitchNode;
|
|
265
|
-
export type ColorPickerNode = import('./types.js').ColorPickerNode;
|
|
266
|
-
export type DatePickerNode = import('./types.js').DatePickerNode;
|
|
267
|
-
export type DateTimePickerNode = import('./types.js').DateTimePickerNode;
|
|
268
|
-
export type TimePickerNode = import('./types.js').TimePickerNode;
|
|
269
|
-
export type ExpansionPanelsNode = import('./types.js').ExpansionPanelsNode;
|
|
270
|
-
export type TabsNode = import('./types.js').TabsNode;
|
|
271
|
-
export type VerticalTabsNode = import('./types.js').VerticalTabsNode;
|
|
272
|
-
export type StepperNode = import('./types.js').StepperNode;
|
|
273
|
-
export type OneOfSelectNode = import('./types.js').OneOfSelectNode;
|
|
274
|
-
export type ListNode = import('./types.js').ListNode;
|
|
275
|
-
export type FileInputNode = import('./types.js').FileInputNode;
|
|
276
|
-
export type FileRef = import('./types.js').FileRef;
|
|
277
|
-
import { Display } from './utils/display.js';
|
|
278
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.js"],"names":[],"mappings":";AAW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pC,OAAO,YAAY,EAAE,cAAc;iCACnC,OAAO,YAAY,EAAE,kBAAkB;6BACvC,OAAO,YAAY,EAAE,cAAc;kCACnC,OAAO,YAAY,EAAE,mBAAmB;uBACxC,OAAO,YAAY,EAAE,QAAQ;+BAC7B,OAAO,YAAY,EAAE,gBAAgB;0BACrC,OAAO,YAAY,EAAE,WAAW;8BAChC,OAAO,YAAY,EAAE,eAAe;uBACpC,OAAO,YAAY,EAAE,QAAQ;4BAC7B,OAAO,YAAY,EAAE,aAAa;sBAClC,OAAO,YAAY,EAAE,OAAO;wBAnCjB,oBAAoB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {import('../index.js').CompiledExpression[]} expressions
|
|
3
|
-
* @param {import('@json-layout/vocabulary').Expression} expression
|
|
4
|
-
* @param {any} data
|
|
5
|
-
* @param {import('./types.js').StateNodeOptions} options
|
|
6
|
-
* @param {import('./utils/display.js').Display} display
|
|
7
|
-
* @param {import('@json-layout/vocabulary').BaseCompObject} layout
|
|
8
|
-
* @param {Record<string, import('ajv').ValidateFunction>} validates
|
|
9
|
-
* @param {unknown} rootData
|
|
10
|
-
* @param {import('../compile/types.js').ParentContextExpression | null} parentContext
|
|
11
|
-
* @returns {any}
|
|
12
|
-
*/
|
|
13
|
-
export function evalExpression(expressions: import('../index.js').CompiledExpression[], expression: import('@json-layout/vocabulary').Expression, data: any, options: import('./types.js').StateNodeOptions, display: import('./utils/display.js').Display, layout: import('@json-layout/vocabulary').BaseCompObject, validates: Record<string, import('ajv').ValidateFunction>, rootData: unknown, parentContext: import('../compile/types.js').ParentContextExpression | null): any;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param {import('./types.js').CreateStateTreeContext} context
|
|
17
|
-
* @param {import('./types.js').StateNodeOptions} parentOptions
|
|
18
|
-
* @param {import('../index.js').CompiledLayout} compiledLayout
|
|
19
|
-
* @param {string | number} key
|
|
20
|
-
* @param {string} fullKey
|
|
21
|
-
* @param {string | null} parentFullKey
|
|
22
|
-
* @param {string} dataPath
|
|
23
|
-
* @param {string | null} parentDataPath
|
|
24
|
-
* @param {import('../index.js').SkeletonNode} skeleton
|
|
25
|
-
* @param {import('@json-layout/vocabulary').Child | null} childDefinition
|
|
26
|
-
* @param {import('./utils/display.js').Display} parentDisplay
|
|
27
|
-
* @param {unknown} data
|
|
28
|
-
* @param {import('../compile/types.js').ParentContextExpression | null} parentContext
|
|
29
|
-
* @param {import('./types.js').ValidationState} validationState
|
|
30
|
-
* @param {import('./types.js').StateNode} [reusedNode]
|
|
31
|
-
* @returns {import('./types.js').StateNode}
|
|
32
|
-
*/
|
|
33
|
-
export function createStateNode(context: import('./types.js').CreateStateTreeContext, parentOptions: import('./types.js').StateNodeOptions, compiledLayout: import('../index.js').CompiledLayout, key: string | number, fullKey: string, parentFullKey: string | null, dataPath: string, parentDataPath: string | null, skeleton: import('../index.js').SkeletonNode, childDefinition: import('@json-layout/vocabulary').Child | null, parentDisplay: import('./utils/display.js').Display, data: unknown, parentContext: import('../compile/types.js').ParentContextExpression | null, validationState: import('./types.js').ValidationState, reusedNode?: import("./types.js").StateNode | undefined): import('./types.js').StateNode;
|
|
34
|
-
/** @type {(draft: any, node: import('./types.js').StateNode, data: unknown) => any} */
|
|
35
|
-
export const producePatchedData: (draft: any, node: import('./types.js').StateNode, data: unknown) => any;
|
|
36
|
-
//# sourceMappingURL=state-node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state-node.d.ts","sourceRoot":"","sources":["../../src/state/state-node.js"],"names":[],"mappings":"AAyKA;;;;;;;;;;;GAWG;AACH,4CAXW,OAAO,aAAa,EAAE,kBAAkB,EAAE,cAC1C,OAAO,yBAAyB,EAAE,UAAU,QAC5C,GAAG,WACH,OAAO,YAAY,EAAE,gBAAgB,WACrC,OAAO,oBAAoB,EAAE,OAAO,UACpC,OAAO,yBAAyB,EAAE,cAAc,aAChD,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,gBAAgB,CAAC,YAC9C,OAAO,iBACP,OAAO,qBAAqB,EAAE,uBAAuB,GAAG,IAAI,GAC1D,GAAG,CAef;AA+BD;;;;;;;;;;;;;;;;;;GAkBG;AACH,yCAjBW,OAAO,YAAY,EAAE,sBAAsB,iBAC3C,OAAO,YAAY,EAAE,gBAAgB,kBACrC,OAAO,aAAa,EAAE,cAAc,OACpC,MAAM,GAAG,MAAM,WACf,MAAM,iBACN,MAAM,GAAG,IAAI,YACb,MAAM,kBACN,MAAM,GAAG,IAAI,YACb,OAAO,aAAa,EAAE,YAAY,mBAClC,OAAO,yBAAyB,EAAE,KAAK,GAAG,IAAI,iBAC9C,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,iBACP,OAAO,qBAAqB,EAAE,uBAAuB,GAAG,IAAI,mBAC5D,OAAO,YAAY,EAAE,eAAe,4DAElC,OAAO,YAAY,EAAE,SAAS,CAiS1C;AAED,uFAAuF;AACvF,yCADmB,GAAG,QAAQ,OAAO,YAAY,EAAE,SAAS,QAAQ,OAAO,KAAK,GAAG,CAOjF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {import('./types.js').CreateStateTreeContext} context
|
|
3
|
-
* @param {import('./types.js').StatefulLayoutOptions} options
|
|
4
|
-
* @param {import('../index.js').CompiledLayout} compiledLayout
|
|
5
|
-
* @param {import('../index.js').SkeletonTree} skeleton
|
|
6
|
-
* @param {import('./utils/display.js').Display} display
|
|
7
|
-
* @param {unknown} data
|
|
8
|
-
* @param {import('./types.js').ValidationState} validationState
|
|
9
|
-
* @param {import('./types.js').StateTree} [reusedStateTree]
|
|
10
|
-
* @returns {import('./types.js').StateTree}
|
|
11
|
-
*/
|
|
12
|
-
export function createStateTree(context: import('./types.js').CreateStateTreeContext, options: import('./types.js').StatefulLayoutOptions, compiledLayout: import('../index.js').CompiledLayout, skeleton: import('../index.js').SkeletonTree, display: import('./utils/display.js').Display, data: unknown, validationState: import('./types.js').ValidationState, reusedStateTree?: import("./types.js").StateTree | undefined): import('./types.js').StateTree;
|
|
13
|
-
//# sourceMappingURL=state-tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state-tree.d.ts","sourceRoot":"","sources":["../../src/state/state-tree.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,yCAVW,OAAO,YAAY,EAAE,sBAAsB,WAC3C,OAAO,YAAY,EAAE,qBAAqB,kBAC1C,OAAO,aAAa,EAAE,cAAc,YACpC,OAAO,aAAa,EAAE,YAAY,WAClC,OAAO,oBAAoB,EAAE,OAAO,QACpC,OAAO,mBACP,OAAO,YAAY,EAAE,eAAe,iEAElC,OAAO,YAAY,EAAE,SAAS,CAmD1C"}
|