@koumoul/vjsf 3.0.0-beta.10 → 3.0.0-beta.12
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 +2 -2
- package/src/compat/v2.js +19 -13
- package/src/compile/index.js +18 -4
- package/src/compile/options.js +3 -7
- package/src/compile/v-jsf-compiled.vue.ejs +1 -1
- package/src/components/nodes/one-of-select.vue +2 -0
- package/src/components/options.js +15 -4
- package/src/composables/use-vjsf.js +1 -0
- package/src/types.ts +12 -6
- package/types/compat/v2.d.ts.map +1 -1
- package/types/compile/index.d.ts +2 -2
- package/types/compile/index.d.ts.map +1 -1
- package/types/compile/options.d.ts.map +1 -1
- package/types/components/options.d.ts +1 -1
- package/types/components/options.d.ts.map +1 -1
- package/types/components/vjsf.vue.d.ts +2 -2
- package/types/composables/use-vjsf.d.ts.map +1 -1
- package/types/types.d.ts +11 -8
- package/types/types.d.ts.map +1 -1
- package/types/utils/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koumoul/vjsf",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.12",
|
|
4
4
|
"description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "vitest",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"vuetify": "^3.4.9"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@json-layout/core": "0.
|
|
78
|
+
"@json-layout/core": "0.16.0",
|
|
79
79
|
"@vueuse/core": "^10.5.0",
|
|
80
80
|
"debug": "^4.3.4",
|
|
81
81
|
"ejs": "^3.1.9"
|
package/src/compat/v2.js
CHANGED
|
@@ -72,21 +72,27 @@ const processFragment = (/** @type {import("ajv").SchemaObject} */schema) => {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
if (schema.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
processFragment(schema.properties[propertyKey])
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (schema.allOf) {
|
|
82
|
-
for (const item of schema.allOf) processFragment(item)
|
|
83
|
-
}
|
|
84
|
-
if (schema.oneOf) {
|
|
85
|
-
for (const item of schema.oneOf) processFragment(item)
|
|
75
|
+
if (schema.properties) {
|
|
76
|
+
for (const propertyKey of Object.keys(schema.properties)) {
|
|
77
|
+
processFragment(schema.properties[propertyKey])
|
|
86
78
|
}
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (schema.allOf) {
|
|
82
|
+
for (const item of schema.allOf) processFragment(item)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (schema.oneOf) {
|
|
86
|
+
if (!schema.oneOfLayout) {
|
|
87
|
+
const constProperty = Object.values(schema.oneOf[0]?.properties || {})
|
|
88
|
+
.find(prop => !!prop.const)
|
|
89
|
+
if (constProperty?.title) schema.oneOfLayout = { label: constProperty.title }
|
|
89
90
|
}
|
|
91
|
+
for (const item of schema.oneOf) processFragment(item)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (schema.anyOf) {
|
|
95
|
+
for (const item of schema.anyOf) processFragment(item)
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
if (schema.type === 'array' && schema.items) {
|
package/src/compile/index.js
CHANGED
|
@@ -37,10 +37,17 @@ function listComps (comps, layout) {
|
|
|
37
37
|
* @param {object} schema
|
|
38
38
|
* @param {import('../types.js').PartialVjsfCompileOptions} [options]
|
|
39
39
|
* @param {string} [baseImport]
|
|
40
|
-
* @returns {string}
|
|
40
|
+
* @returns {Promise<string>}
|
|
41
41
|
*/
|
|
42
|
-
export function compile (schema, options = {}, baseImport = '@koumoul/vjsf') {
|
|
42
|
+
export async function compile (schema, options = {}, baseImport = '@koumoul/vjsf') {
|
|
43
43
|
const fullOptions = getFullOptions(options)
|
|
44
|
+
/** @type {Record<string, string>} */
|
|
45
|
+
const pluginsImportsByName = {}
|
|
46
|
+
for (const pluginImport of fullOptions.pluginsImports) {
|
|
47
|
+
const componentInfo = /** @type {import('@json-layout/vocabulary').ComponentInfo} */((await import(pluginImport + '/info.js')).default)
|
|
48
|
+
fullOptions.components[componentInfo.name] = componentInfo
|
|
49
|
+
pluginsImportsByName[componentInfo.name] = pluginImport
|
|
50
|
+
}
|
|
44
51
|
const compiledLayout = compileLayout(schema, { ...fullOptions, code: true })
|
|
45
52
|
const compiledLayoutCode = serializeCompiledLayout(compiledLayout)
|
|
46
53
|
/** @type Set<string> */
|
|
@@ -50,9 +57,16 @@ export function compile (schema, options = {}, baseImport = '@koumoul/vjsf') {
|
|
|
50
57
|
}
|
|
51
58
|
comps.delete('none')
|
|
52
59
|
|
|
60
|
+
/** @type {Record<string, any>} */
|
|
61
|
+
const pluginsComponents = {}
|
|
62
|
+
|
|
53
63
|
const compImports = [...comps].map(comp => {
|
|
54
64
|
const compName = comp.replace(/-/g, '') + 'Node'
|
|
55
|
-
|
|
65
|
+
let compImport = `${baseImport}/components/nodes/${comp}.vue`
|
|
66
|
+
if (pluginsImportsByName[comp]) {
|
|
67
|
+
compImport = `${pluginsImportsByName[comp]}/node.vue`
|
|
68
|
+
pluginsComponents[comp] = fullOptions.components[comp]
|
|
69
|
+
}
|
|
56
70
|
return {
|
|
57
71
|
comp,
|
|
58
72
|
compName,
|
|
@@ -60,6 +74,6 @@ export function compile (schema, options = {}, baseImport = '@koumoul/vjsf') {
|
|
|
60
74
|
}
|
|
61
75
|
})
|
|
62
76
|
|
|
63
|
-
const code = ejs.render(template, { compiledLayoutCode, compImports, baseImport })
|
|
77
|
+
const code = ejs.render(template, { compiledLayoutCode, compImports, baseImport, pluginsComponents })
|
|
64
78
|
return code
|
|
65
79
|
}
|
package/src/compile/options.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** @type import("../types.js").PartialVjsfCompileOptions */
|
|
2
2
|
export const defaultOptions = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
pluginsImports: ['@koumoul/vjsf-markdown'],
|
|
4
|
+
components: {}
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -11,9 +10,6 @@ export const defaultOptions = {
|
|
|
11
10
|
* @returns
|
|
12
11
|
*/
|
|
13
12
|
export const getFullOptions = (options) => {
|
|
14
|
-
const fullOptions = {
|
|
15
|
-
...defaultOptions,
|
|
16
|
-
nodeComponentImports: { ...defaultOptions.nodeComponentImports, ...options.nodeComponentImports }
|
|
17
|
-
}
|
|
13
|
+
const fullOptions = { ...defaultOptions }
|
|
18
14
|
return /** @type import('../types.js').VjsfCompileOptions */ (fullOptions)
|
|
19
15
|
}
|
|
@@ -39,7 +39,7 @@ const emit = defineEmits(emits)
|
|
|
39
39
|
const { el, statefulLayout, stateTree } = useVjsf(
|
|
40
40
|
null,
|
|
41
41
|
computed(() => props.modelValue),
|
|
42
|
-
computed(() => props.options),
|
|
42
|
+
computed(() => ({...props.options, components: <%- JSON.stringify(pluginsComponents) %>})),
|
|
43
43
|
nodeComponents,
|
|
44
44
|
emit,
|
|
45
45
|
null,
|
|
@@ -42,7 +42,9 @@ const onChange = (/** @type import('@json-layout/core').SkeletonTree */childTree
|
|
|
42
42
|
:items="modelValue.skeleton.childrenTrees"
|
|
43
43
|
item-title="title"
|
|
44
44
|
return-object
|
|
45
|
+
:label="modelValue.layout.label"
|
|
45
46
|
:error-messages="modelValue.validated ? modelValue.error : null"
|
|
47
|
+
:density="modelValue.options.density"
|
|
46
48
|
@update:model-value="onChange"
|
|
47
49
|
/>
|
|
48
50
|
<v-row v-if="modelValue.children?.[0]">
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/** @type {import("../types.js").PartialVjsfOptions} */
|
|
2
2
|
export const defaultOptions = {
|
|
3
3
|
nodeComponents: {},
|
|
4
|
-
plugins:
|
|
4
|
+
plugins: [],
|
|
5
|
+
pluginsOptions: {}
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -10,10 +11,19 @@ export const defaultOptions = {
|
|
|
10
11
|
* @param {any} form
|
|
11
12
|
* @param {number} width
|
|
12
13
|
* @param {import("vue").Slots} slots
|
|
13
|
-
* @param {Record<string, import('vue').Component>}
|
|
14
|
+
* @param {Record<string, import('vue').Component>} defaultNodeComponents
|
|
14
15
|
* @returns
|
|
15
16
|
*/
|
|
16
|
-
export const getFullOptions = (options, form, width, slots,
|
|
17
|
+
export const getFullOptions = (options, form, width, slots, defaultNodeComponents) => {
|
|
18
|
+
const components = options?.components ?? {}
|
|
19
|
+
const nodeComponents = { ...defaultNodeComponents, ...options?.nodeComponents }
|
|
20
|
+
if (options?.plugins) {
|
|
21
|
+
for (const plugin of options.plugins) {
|
|
22
|
+
components[plugin.info.name] = plugin.info
|
|
23
|
+
nodeComponents[plugin.info.name] = plugin.nodeComponent
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
const fullOptions = {
|
|
18
28
|
...defaultOptions,
|
|
19
29
|
readOnly: !!(form && (form.isDisabled.value || form.isReadonly.value)),
|
|
@@ -21,7 +31,8 @@ export const getFullOptions = (options, form, width, slots, nodeComponents) => {
|
|
|
21
31
|
context: options?.context ? JSON.parse(JSON.stringify(options.context)) : {},
|
|
22
32
|
width: Math.round(width ?? 0),
|
|
23
33
|
vjsfSlots: { ...slots },
|
|
24
|
-
|
|
34
|
+
components,
|
|
35
|
+
nodeComponents
|
|
25
36
|
}
|
|
26
37
|
return /** @type import('../types.js').VjsfOptions */ (fullOptions)
|
|
27
38
|
}
|
|
@@ -62,6 +62,7 @@ export const useVjsf = (schema, modelValue, options, nodeComponents, emit, compi
|
|
|
62
62
|
watch(fullOptions, (newOptions) => {
|
|
63
63
|
if (precompiledLayout?.value) return
|
|
64
64
|
const newCompileOptions = produceCompileOptions(compileOptions.value, newOptions)
|
|
65
|
+
console.log('compile options', newOptions, newCompileOptions)
|
|
65
66
|
if (newCompileOptions !== compileOptions.value) compileOptions.value = newCompileOptions
|
|
66
67
|
}, { immediate: true })
|
|
67
68
|
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Component } from 'vue'
|
|
2
2
|
|
|
3
|
+
import { ComponentInfo } from '@json-layout/vocabulary'
|
|
4
|
+
|
|
3
5
|
import {
|
|
4
6
|
StatefulLayout,
|
|
5
7
|
StatefulLayoutOptions,
|
|
@@ -22,32 +24,37 @@ import {
|
|
|
22
24
|
VerticalTabsNode,
|
|
23
25
|
StepperNode,
|
|
24
26
|
ComboboxNode,
|
|
25
|
-
MarkdownNode,
|
|
26
27
|
FileInputNode,
|
|
27
28
|
CompileOptions
|
|
28
29
|
} from '@json-layout/core'
|
|
29
30
|
|
|
30
31
|
export type Density = 'default' | 'comfortable' | 'compact'
|
|
31
32
|
|
|
33
|
+
export type Plugin = {
|
|
34
|
+
info: ComponentInfo,
|
|
35
|
+
nodeComponent: Component
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
// these options used to contain many possibilities to override props in various components
|
|
33
39
|
// this was unmaintainable and has been removed, customization of components should be done via slots
|
|
34
40
|
// and vuetify defaults providers
|
|
35
41
|
export type VjsfStatefulLayoutOptions = StatefulLayoutOptions & {
|
|
36
42
|
vjsfSlots: Record<string, () => unknown>,
|
|
37
43
|
nodeComponents: Record<string, Component>,
|
|
38
|
-
plugins:
|
|
44
|
+
plugins: Plugin[]
|
|
45
|
+
pluginsOptions: Record<string, unknown>
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
export type VjsfCompileOptions = CompileOptions & {
|
|
42
|
-
|
|
49
|
+
pluginsImports: string[]
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
export type VjsfOptions = VjsfCompileOptions & VjsfStatefulLayoutOptions
|
|
46
53
|
|
|
47
54
|
export type VjsfStatefulLayout = Omit<StatefulLayout, 'options'> & {options: VjsfStatefulLayoutOptions}
|
|
48
55
|
|
|
49
|
-
export type PartialVjsfCompileOptions = Partial<
|
|
50
|
-
export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width'>>
|
|
56
|
+
export type PartialVjsfCompileOptions = Partial<VjsfCompileOptions>
|
|
57
|
+
export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width' | 'vjsfSlots'>>
|
|
51
58
|
|
|
52
59
|
export type VjsfNode = Omit<StateNode, 'options'> & {options: VjsfOptions}
|
|
53
60
|
export type VjsfTabsNode = Omit<TabsNode, 'options'> & {options: VjsfOptions}
|
|
@@ -65,7 +72,6 @@ export type VjsfSliderNode = Omit<SliderNode, 'options'> & {options: VjsfOptions
|
|
|
65
72
|
export type VjsfSwitchNode = Omit<SwitchNode, 'options'> & {options: VjsfOptions}
|
|
66
73
|
export type VjsfTextFieldNode = Omit<TextFieldNode, 'options'> & {options: VjsfOptions}
|
|
67
74
|
export type VjsfTextareaNode = Omit<TextareaNode, 'options'> & {options: VjsfOptions}
|
|
68
|
-
export type VjsfMarkdownNode = Omit<MarkdownNode, 'options'> & {options: VjsfOptions}
|
|
69
75
|
export type VjsfVerticalTabsNode = Omit<VerticalTabsNode, 'options'> & {options: VjsfOptions}
|
|
70
76
|
export type VjsfStepperNode = Omit<StepperNode, 'options'> & {options: VjsfOptions}
|
|
71
77
|
export type VjsfComboboxNode = Omit<ComboboxNode, 'options'> & {options: VjsfOptions}
|
package/types/compat/v2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AA0GA;;;;;;GAMG;AACH,kCALW,MAAM,+CAEN,MAAM,0BAkBhB;sBAhIqB,KAAK"}
|
package/types/compile/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @param {object} schema
|
|
3
3
|
* @param {import('../types.js').PartialVjsfCompileOptions} [options]
|
|
4
4
|
* @param {string} [baseImport]
|
|
5
|
-
* @returns {string}
|
|
5
|
+
* @returns {Promise<string>}
|
|
6
6
|
*/
|
|
7
|
-
export function compile(schema: object, options?: Partial<
|
|
7
|
+
export function compile(schema: object, options?: Partial<import("../types.js").VjsfCompileOptions> | undefined, baseImport?: string | undefined): Promise<string>;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,gCALW,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AAmCA;;;;;GAKG;AACH,gCALW,MAAM,6GAGJ,QAAQ,MAAM,CAAC,CAuC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/compile/options.js"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,6BADU,OAAO,aAAa,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/compile/options.js"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,6BADU,OAAO,aAAa,EAAE,yBAAyB,CAIxD;AAOM,wCAHI,OAAO,aAAa,EAAE,yBAAyB,4CAMzD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** @type {import("../types.js").PartialVjsfOptions} */
|
|
2
2
|
export const defaultOptions: import("../types.js").PartialVjsfOptions;
|
|
3
|
-
export function getFullOptions(options: Partial<import("../types.js").VjsfOptions> | null, form: any, width: number, slots: import("vue").Slots,
|
|
3
|
+
export function getFullOptions(options: Partial<import("../types.js").VjsfOptions> | null, form: any, width: number, slots: import("vue").Slots, defaultNodeComponents: Record<string, import('vue').Component>): import("../types.js").VjsfOptions;
|
|
4
4
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/components/options.js"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,6BADW,OAAO,aAAa,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/components/options.js"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,6BADW,OAAO,aAAa,EAAE,kBAAkB,CAKlD;AAWM,wCAPI,QAAQ,OAAO,aAAa,EAAE,WAAW,CAAC,GAAG,IAAI,QACjD,GAAG,SACH,MAAM,SACN,OAAO,KAAK,EAAE,KAAK,yBACnB,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,SAAS,CAAC,qCAwBjD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$emit: ((event: "update:modelValue", data: any) => void) & ((event: "update:state", state: import("../types.js").VjsfStatefulLayout) => void);
|
|
3
|
-
options: Partial<Omit<import("../types.js").VjsfOptions, "width">> | null;
|
|
4
3
|
modelValue: any;
|
|
4
|
+
options: Partial<Omit<import("../types.js").VjsfOptions, "width" | "vjsfSlots">> | null;
|
|
5
5
|
schema: Record<string, any>;
|
|
6
6
|
precompiledLayout: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
|
|
7
7
|
$props: {
|
|
8
|
-
readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "width">> | null | undefined;
|
|
9
8
|
readonly modelValue?: any;
|
|
9
|
+
readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "width" | "vjsfSlots">> | null | undefined;
|
|
10
10
|
readonly schema?: Record<string, any> | undefined;
|
|
11
11
|
readonly precompiledLayout?: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined;
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-vjsf.d.ts","sourceRoot":"","sources":["../../src/composables/use-vjsf.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-vjsf.d.ts","sourceRoot":"","sources":["../../src/composables/use-vjsf.js"],"names":[],"mappings":"AASA;IACE;;MAEE;gCADO,GAAG;IAGZ;;MAEE;4BADO,OAAO,aAAa,EAAE,kBAAkB;EAGlD;AAWM,gCARI,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,cACzB,OAAO,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,WACtB,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC,kBAClE,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,SAAS,CAAC,QACvC,GAAG;;;;EAuHb"}
|
package/types/types.d.ts
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentInfo } from '@json-layout/vocabulary';
|
|
3
|
+
import { StatefulLayout, StatefulLayoutOptions, StateNode, CheckboxNode, ColorPickerNode, DatePickerNode, DateTimePickerNode, TabsNode, ExpansionPanelsNode, ListNode, NumberFieldNode, OneOfSelectNode, SectionNode, SelectNode, SliderNode, SwitchNode, TextFieldNode, TextareaNode, VerticalTabsNode, StepperNode, ComboboxNode, FileInputNode, CompileOptions } from '@json-layout/core';
|
|
3
4
|
export type Density = 'default' | 'comfortable' | 'compact';
|
|
5
|
+
export type Plugin = {
|
|
6
|
+
info: ComponentInfo;
|
|
7
|
+
nodeComponent: Component;
|
|
8
|
+
};
|
|
4
9
|
export type VjsfStatefulLayoutOptions = StatefulLayoutOptions & {
|
|
5
10
|
vjsfSlots: Record<string, () => unknown>;
|
|
6
11
|
nodeComponents: Record<string, Component>;
|
|
7
|
-
plugins:
|
|
12
|
+
plugins: Plugin[];
|
|
13
|
+
pluginsOptions: Record<string, unknown>;
|
|
8
14
|
};
|
|
9
15
|
export type VjsfCompileOptions = CompileOptions & {
|
|
10
|
-
|
|
16
|
+
pluginsImports: string[];
|
|
11
17
|
};
|
|
12
18
|
export type VjsfOptions = VjsfCompileOptions & VjsfStatefulLayoutOptions;
|
|
13
19
|
export type VjsfStatefulLayout = Omit<StatefulLayout, 'options'> & {
|
|
14
20
|
options: VjsfStatefulLayoutOptions;
|
|
15
21
|
};
|
|
16
|
-
export type PartialVjsfCompileOptions = Partial<
|
|
17
|
-
export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width'>>;
|
|
22
|
+
export type PartialVjsfCompileOptions = Partial<VjsfCompileOptions>;
|
|
23
|
+
export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width' | 'vjsfSlots'>>;
|
|
18
24
|
export type VjsfNode = Omit<StateNode, 'options'> & {
|
|
19
25
|
options: VjsfOptions;
|
|
20
26
|
};
|
|
@@ -63,9 +69,6 @@ export type VjsfTextFieldNode = Omit<TextFieldNode, 'options'> & {
|
|
|
63
69
|
export type VjsfTextareaNode = Omit<TextareaNode, 'options'> & {
|
|
64
70
|
options: VjsfOptions;
|
|
65
71
|
};
|
|
66
|
-
export type VjsfMarkdownNode = Omit<MarkdownNode, 'options'> & {
|
|
67
|
-
options: VjsfOptions;
|
|
68
|
-
};
|
|
69
72
|
export type VjsfVerticalTabsNode = Omit<VerticalTabsNode, 'options'> & {
|
|
70
73
|
options: VjsfOptions;
|
|
71
74
|
};
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,EACX,UAAU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