@koumoul/vjsf 3.0.0-alpha.0 → 3.0.0-alpha.10
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 +37 -10
- package/src/compat/v2.js +45 -10
- package/src/compile/index.js +42 -9
- package/src/compile/options.js +19 -0
- package/src/compile/v-jsf-compiled.vue.ejs +35 -57
- package/src/components/fragments/help-message.vue +49 -0
- package/src/components/fragments/node-slot.vue +3 -3
- package/src/components/fragments/section-header.vue +6 -2
- package/src/components/fragments/select-item-icon.vue +28 -0
- package/src/components/fragments/select-item.vue +43 -0
- package/src/components/fragments/select-selection.vue +35 -0
- package/src/components/fragments/text-field-menu.vue +4 -4
- package/src/components/node.vue +35 -9
- package/src/components/nodes/autocomplete.vue +88 -0
- package/src/components/nodes/checkbox.vue +3 -3
- package/src/components/nodes/color-picker.vue +3 -3
- package/src/components/nodes/combobox.vue +72 -0
- package/src/components/nodes/date-picker.vue +5 -6
- package/src/components/nodes/date-time-picker.vue +2 -2
- package/src/components/nodes/expansion-panels.vue +4 -4
- package/src/components/nodes/file-input.vue +43 -0
- package/src/components/nodes/list.vue +177 -91
- package/src/components/nodes/number-combobox.vue +72 -0
- package/src/components/nodes/number-field.vue +4 -6
- package/src/components/nodes/one-of-select.vue +4 -4
- package/src/components/nodes/section.vue +4 -3
- package/src/components/nodes/select.vue +72 -53
- package/src/components/nodes/slider.vue +3 -3
- package/src/components/nodes/stepper.vue +96 -0
- package/src/components/nodes/switch.vue +3 -3
- package/src/components/nodes/tabs.vue +4 -4
- package/src/components/nodes/text-field.vue +10 -5
- package/src/components/nodes/textarea.vue +26 -6
- package/src/components/nodes/vertical-tabs.vue +4 -4
- package/src/components/options.js +27 -2
- package/src/components/tree.vue +4 -3
- package/src/components/vjsf.vue +41 -103
- package/src/composables/use-dnd.js +69 -0
- package/src/composables/use-vjsf.js +122 -0
- package/src/index.js +3 -1
- package/src/styles/vjsf.css +14 -0
- package/src/{components/types.ts → types.ts} +26 -1
- package/src/utils/arrays.js +15 -0
- package/src/utils/build.js +1 -0
- package/src/utils/global-register.js +13 -0
- package/src/utils/index.js +5 -0
- package/src/utils/props.js +29 -10
- package/src/utils/slots.js +2 -3
- package/types/compat/v2.d.ts.map +1 -1
- package/types/compile/index.d.ts +3 -2
- package/types/compile/index.d.ts.map +1 -1
- package/types/compile/options.d.ts +4 -0
- package/types/compile/options.d.ts.map +1 -0
- package/types/components/fragments/help-message.vue.d.ts +8 -0
- package/types/components/fragments/help-message.vue.d.ts.map +1 -0
- package/types/components/fragments/node-slot.vue.d.ts +9 -9
- package/types/components/fragments/node-slot.vue.d.ts.map +1 -1
- package/types/components/fragments/section-header.vue.d.ts +3 -3
- package/types/components/fragments/select-item-icon.vue.d.ts +15 -0
- package/types/components/fragments/select-item-icon.vue.d.ts.map +1 -0
- package/types/components/fragments/select-item.vue.d.ts +12 -0
- package/types/components/fragments/select-item.vue.d.ts.map +1 -0
- package/types/components/fragments/select-selection.vue.d.ts +12 -0
- package/types/components/fragments/select-selection.vue.d.ts.map +1 -0
- package/types/components/fragments/text-field-menu.vue.d.ts +5 -5
- package/types/components/fragments/text-field-menu.vue.d.ts.map +1 -1
- package/types/components/global-register.d.ts +8 -0
- package/types/components/global-register.d.ts.map +1 -0
- package/types/components/node.vue.d.ts +5 -5
- package/types/components/nodes/autocomplete.vue.d.ts +27 -0
- package/types/components/nodes/autocomplete.vue.d.ts.map +1 -0
- package/types/components/nodes/checkbox.vue.d.ts +5 -5
- package/types/components/nodes/color-picker.vue.d.ts +5 -5
- package/types/components/nodes/combobox.vue.d.ts +27 -0
- package/types/components/nodes/combobox.vue.d.ts.map +1 -0
- package/types/components/nodes/date-picker.vue.d.ts +5 -5
- package/types/components/nodes/date-time-picker.vue.d.ts +5 -5
- package/types/components/nodes/expansion-panels.vue.d.ts +5 -5
- package/types/components/nodes/file-input.vue.d.ts +27 -0
- package/types/components/nodes/file-input.vue.d.ts.map +1 -0
- package/types/components/nodes/list.vue.d.ts +5 -5
- package/types/components/nodes/markdown.vue.d.ts +27 -0
- package/types/components/nodes/markdown.vue.d.ts.map +1 -0
- package/types/components/nodes/number-combobox.vue.d.ts +27 -0
- package/types/components/nodes/number-combobox.vue.d.ts.map +1 -0
- package/types/components/nodes/number-field.vue.d.ts +9 -9
- package/types/components/nodes/number-field.vue.d.ts.map +1 -1
- package/types/components/nodes/one-of-select.vue.d.ts +5 -5
- package/types/components/nodes/section.vue.d.ts +5 -5
- package/types/components/nodes/select.vue.d.ts +25 -8
- package/types/components/nodes/select.vue.d.ts.map +1 -1
- package/types/components/nodes/slider.vue.d.ts +5 -5
- package/types/components/nodes/stepper.vue.d.ts +10 -0
- package/types/components/nodes/stepper.vue.d.ts.map +1 -0
- package/types/components/nodes/switch.vue.d.ts +5 -5
- package/types/components/nodes/tabs.vue.d.ts +5 -5
- package/types/components/nodes/text-field.vue.d.ts +9 -9
- package/types/components/nodes/text-field.vue.d.ts.map +1 -1
- package/types/components/nodes/textarea.vue.d.ts +9 -9
- package/types/components/nodes/textarea.vue.d.ts.map +1 -1
- package/types/components/nodes/time-picker.vue.d.ts +1 -1
- package/types/components/nodes/vertical-tabs.vue.d.ts +5 -5
- package/types/components/options.d.ts +3 -2
- package/types/components/options.d.ts.map +1 -1
- package/types/components/tree.vue.d.ts +3 -3
- package/types/components/types.d.ts +22 -2
- package/types/components/types.d.ts.map +1 -1
- package/types/components/vjsf.vue.d.ts +8 -6
- package/types/composables/use-dnd.d.ts +25 -0
- package/types/composables/use-dnd.d.ts.map +1 -0
- package/types/composables/use-vjsf.d.ts +16 -0
- package/types/composables/use-vjsf.d.ts.map +1 -0
- package/types/index.d.ts +3 -1
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +96 -0
- package/types/types.d.ts.map +1 -0
- package/types/utils/arrays.d.ts +9 -0
- package/types/utils/arrays.d.ts.map +1 -0
- package/types/utils/build.d.ts +2 -0
- package/types/utils/build.d.ts.map +1 -0
- package/types/utils/global-register.d.ts +8 -0
- package/types/utils/global-register.d.ts.map +1 -0
- package/types/utils/index.d.ts +6 -0
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/props.d.ts +8 -5
- package/types/utils/props.d.ts.map +1 -1
- package/types/utils/slots.d.ts +3 -3
- package/types/utils/slots.d.ts.map +1 -1
- package/src/utils/clone.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/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,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,GAAG;IAC9D,OAAO,EAA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AG;IAAC,OAAO,EAAE,WAAW,CAAA;CAAC,CAAA"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
$emit: (event: "update:modelValue"
|
|
3
|
-
options: Partial<Omit<import("
|
|
4
|
-
modelValue:
|
|
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">>;
|
|
4
|
+
modelValue: any;
|
|
5
5
|
schema: Record<string, any>;
|
|
6
|
+
precompiledLayout: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
|
|
6
7
|
$props: {
|
|
7
|
-
readonly options?: Partial<Omit<import("
|
|
8
|
-
readonly modelValue?:
|
|
8
|
+
readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "width">> | undefined;
|
|
9
|
+
readonly modelValue?: any;
|
|
9
10
|
readonly schema?: Record<string, any> | undefined;
|
|
11
|
+
readonly precompiledLayout?: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined;
|
|
10
12
|
};
|
|
11
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
12
14
|
export default _default;
|
|
13
15
|
//# sourceMappingURL=vjsf.vue.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @template T
|
|
3
|
+
* @param {T[]} array
|
|
4
|
+
* @param {() => void} callback
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export default function useDnd<T>(array: T[], callback: () => void): {
|
|
8
|
+
activeDnd: import("vue").ComputedRef<boolean>;
|
|
9
|
+
sortableArray: import("vue").ShallowRef<T[]>;
|
|
10
|
+
hovered: import("vue").Ref<number>;
|
|
11
|
+
draggable: import("vue").Ref<number>;
|
|
12
|
+
dragging: import("vue").Ref<number>;
|
|
13
|
+
itemBind: (itemIndex: number) => {
|
|
14
|
+
onMouseenter: () => void;
|
|
15
|
+
onMouseleave: () => void;
|
|
16
|
+
onDragstart: () => void;
|
|
17
|
+
onDragover: () => void;
|
|
18
|
+
onDragend: () => void;
|
|
19
|
+
};
|
|
20
|
+
handleBind: (itemIndex: number) => {
|
|
21
|
+
onMouseover(): void;
|
|
22
|
+
onMouseout(): void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=use-dnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-dnd.d.ts","sourceRoot":"","sources":["../../src/composables/use-dnd.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wDAHW,MAAM,IAAI;;;;;;0BAoBU,MAAM;;;;;;;4BAuBJ,MAAM;;;;EAmBtC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const emits: {
|
|
2
|
+
/**
|
|
3
|
+
* @arg {any} data
|
|
4
|
+
*/
|
|
5
|
+
'update:modelValue': (data: any) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @arg {import('../types.js').VjsfStatefulLayout} state
|
|
8
|
+
*/
|
|
9
|
+
'update:state': (state: import('../types.js').VjsfStatefulLayout) => boolean;
|
|
10
|
+
};
|
|
11
|
+
export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../types.js").PartialVjsfOptions>, nodeComponents: Record<string, import('vue').Component>, emit: any, compile?: typeof import("@json-layout/core").compile | undefined, precompiledLayout?: import("vue").Ref<import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout> | undefined): {
|
|
12
|
+
el: import("vue").Ref<null>;
|
|
13
|
+
statefulLayout: import("vue").ShallowRef<import("../types.js").VjsfStatefulLayout | null>;
|
|
14
|
+
stateTree: import("vue").ShallowRef<import("../../../node_modules/@json-layout/core/types/state/types.js").StateTree | null>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-vjsf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-vjsf.d.ts","sourceRoot":"","sources":["../../src/composables/use-vjsf.js"],"names":[],"mappings":"AAMA;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,CAAC,kBAC3D,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,SAAS,CAAC,QACvC,GAAG;;;;EAmGb"}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";iBAAiB,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";iBAAiB,uBAAuB;+BACT,yBAAyB"}
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { StatefulLayout, StatefulLayoutOptions, StateNode, CheckboxNode, ColorPickerNode, DatePickerNode, DateTimePickerNode, TabsNode, ExpansionPanelsNode, ListNode, NumberFieldNode, OneOfSelectNode, SectionNode, SelectNode, SliderNode, SwitchNode, TextFieldNode, TextareaNode, VerticalTabsNode, StepperNode, ComboboxNode, MarkdownNode, FileInputNode, CompileOptions } from '@json-layout/core';
|
|
3
|
+
export type Density = 'default' | 'comfortable' | 'compact';
|
|
4
|
+
export type VjsfStatefulLayoutOptions = StatefulLayoutOptions & {
|
|
5
|
+
density: Density;
|
|
6
|
+
fieldProps: Record<string, unknown>;
|
|
7
|
+
fieldPropsCompact: Record<string, unknown>;
|
|
8
|
+
fieldPropsComfortable: Record<string, unknown>;
|
|
9
|
+
fieldPropsReadOnly: Record<string, unknown>;
|
|
10
|
+
fieldPropsSummary: Record<string, unknown>;
|
|
11
|
+
textfieldProps: Record<string, unknown>;
|
|
12
|
+
textfieldPropsReadOnly: Record<string, unknown>;
|
|
13
|
+
textareaProps: Record<string, unknown>;
|
|
14
|
+
textareaPropsReadOnly: Record<string, unknown>;
|
|
15
|
+
checkboxProps: Record<string, unknown>;
|
|
16
|
+
checkboxPropsReadOnly: Record<string, unknown>;
|
|
17
|
+
switchProps: Record<string, unknown>;
|
|
18
|
+
switchPropsReadOnly: Record<string, unknown>;
|
|
19
|
+
errorAlertProps: Record<string, unknown>;
|
|
20
|
+
vjsfSlots: Record<string, () => unknown>;
|
|
21
|
+
easyMDEOptions: Record<string, unknown>;
|
|
22
|
+
nodeComponents: Record<string, Component>;
|
|
23
|
+
};
|
|
24
|
+
export type VjsfCompileOptions = CompileOptions & {
|
|
25
|
+
nodeComponentImports: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
export type VjsfOptions = VjsfCompileOptions & VjsfStatefulLayoutOptions;
|
|
28
|
+
export type VjsfStatefulLayout = Omit<StatefulLayout, 'options'> & {
|
|
29
|
+
options: VjsfStatefulLayoutOptions;
|
|
30
|
+
};
|
|
31
|
+
export type PartialVjsfCompileOptions = Partial<Omit<VjsfCompileOptions, 'width'>>;
|
|
32
|
+
export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width'>>;
|
|
33
|
+
export type VjsfNode = Omit<StateNode, 'options'> & {
|
|
34
|
+
options: VjsfOptions;
|
|
35
|
+
};
|
|
36
|
+
export type VjsfTabsNode = Omit<TabsNode, 'options'> & {
|
|
37
|
+
options: VjsfOptions;
|
|
38
|
+
};
|
|
39
|
+
export type VjsfCheckboxNode = Omit<CheckboxNode, 'options'> & {
|
|
40
|
+
options: VjsfOptions;
|
|
41
|
+
};
|
|
42
|
+
export type VjsfColorPickerNode = Omit<ColorPickerNode, 'options'> & {
|
|
43
|
+
options: VjsfOptions;
|
|
44
|
+
};
|
|
45
|
+
export type VjsfDatePickerNode = Omit<DatePickerNode, 'options'> & {
|
|
46
|
+
options: VjsfOptions;
|
|
47
|
+
};
|
|
48
|
+
export type VjsfDateTimePickerNode = Omit<DateTimePickerNode, 'options'> & {
|
|
49
|
+
options: VjsfOptions;
|
|
50
|
+
};
|
|
51
|
+
export type VjsfExpansionPanelsNode = Omit<ExpansionPanelsNode, 'options'> & {
|
|
52
|
+
options: VjsfOptions;
|
|
53
|
+
};
|
|
54
|
+
export type VjsfListNode = Omit<ListNode, 'options'> & {
|
|
55
|
+
options: VjsfOptions;
|
|
56
|
+
};
|
|
57
|
+
export type VjsfNumberFieldNode = Omit<NumberFieldNode, 'options'> & {
|
|
58
|
+
options: VjsfOptions;
|
|
59
|
+
};
|
|
60
|
+
export type VjsfOneOfSelectNode = Omit<OneOfSelectNode, 'options'> & {
|
|
61
|
+
options: VjsfOptions;
|
|
62
|
+
};
|
|
63
|
+
export type VjsfSectionNode = Omit<SectionNode, 'options'> & {
|
|
64
|
+
options: VjsfOptions;
|
|
65
|
+
};
|
|
66
|
+
export type VjsfSelectNode = Omit<SelectNode, 'options'> & {
|
|
67
|
+
options: VjsfOptions;
|
|
68
|
+
};
|
|
69
|
+
export type VjsfSliderNode = Omit<SliderNode, 'options'> & {
|
|
70
|
+
options: VjsfOptions;
|
|
71
|
+
};
|
|
72
|
+
export type VjsfSwitchNode = Omit<SwitchNode, 'options'> & {
|
|
73
|
+
options: VjsfOptions;
|
|
74
|
+
};
|
|
75
|
+
export type VjsfTextFieldNode = Omit<TextFieldNode, 'options'> & {
|
|
76
|
+
options: VjsfOptions;
|
|
77
|
+
};
|
|
78
|
+
export type VjsfTextareaNode = Omit<TextareaNode, 'options'> & {
|
|
79
|
+
options: VjsfOptions;
|
|
80
|
+
};
|
|
81
|
+
export type VjsfMarkdownNode = Omit<MarkdownNode, 'options'> & {
|
|
82
|
+
options: VjsfOptions;
|
|
83
|
+
};
|
|
84
|
+
export type VjsfVerticalTabsNode = Omit<VerticalTabsNode, 'options'> & {
|
|
85
|
+
options: VjsfOptions;
|
|
86
|
+
};
|
|
87
|
+
export type VjsfStepperNode = Omit<StepperNode, 'options'> & {
|
|
88
|
+
options: VjsfOptions;
|
|
89
|
+
};
|
|
90
|
+
export type VjsfComboboxNode = Omit<ComboboxNode, 'options'> & {
|
|
91
|
+
options: VjsfOptions;
|
|
92
|
+
};
|
|
93
|
+
export type VjsfFileInputNode = Omit<FileInputNode, 'options'> & {
|
|
94
|
+
options: VjsfOptions;
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,GAAG;IAC9D,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACp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;CAAC,CAAA;AACnF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,WAAW,CAAA;CAAC,CAAA;AACrF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG;IAAC,OAAO,EAAE,WAAW,CAAA;CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrays.d.ts","sourceRoot":"","sources":["../../src/utils/arrays.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wDAJW,MAAM,WACN,MAAM,OAUhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/utils/build.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} name
|
|
3
|
+
* @param {import('vue').Component} component
|
|
4
|
+
*/
|
|
5
|
+
export function registerNodeComponent(name: string, component: import('vue').Component): void;
|
|
6
|
+
/** @type {import('vue').Ref<Record<string, import('vue').Component>>} */
|
|
7
|
+
export const registeredNodeComponents: import('vue').Ref<Record<string, import('vue').Component>>;
|
|
8
|
+
//# sourceMappingURL=global-register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-register.d.ts","sourceRoot":"","sources":["../../src/utils/global-register.js"],"names":[],"mappings":"AAKA;;;GAGG;AACH,4CAHW,MAAM,aACN,OAAO,KAAK,EAAE,SAAS,QAKjC;AAVD,yEAAyE;AACzE,uCADW,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,MAAM,EAAE,OAAO,KAAK,EAAE,SAAS,CAAC,CAAC,CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.js"],"names":[],"mappings":""}
|
package/types/utils/props.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {(Record<string, any> | undefined)[]} propsLevels
|
|
3
|
-
* @returns Record<string, any>
|
|
3
|
+
* @returns {Record<string, any> & {class: string[]}}
|
|
4
4
|
*/
|
|
5
|
-
export function mergePropsLevels(propsLevels: (Record<string, any> | undefined)[]): Record<string, any
|
|
5
|
+
export function mergePropsLevels(propsLevels: (Record<string, any> | undefined)[]): Record<string, any> & {
|
|
6
|
+
class: string[];
|
|
7
|
+
};
|
|
6
8
|
/**
|
|
7
|
-
* @param {import('
|
|
8
|
-
* @param {import('
|
|
9
|
+
* @param {import('../types.js').VjsfNode} node
|
|
10
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
11
|
+
* @param {(string | [string, string])[]} [layoutPropsMap]
|
|
9
12
|
* @param {boolean} isMainComp
|
|
10
13
|
* @returns {Record<string, any>}
|
|
11
14
|
*/
|
|
12
|
-
export function getInputProps(node: import('
|
|
15
|
+
export function getInputProps(node: import('../types.js').VjsfNode, statefulLayout: import('../types.js').VjsfStatefulLayout, layoutPropsMap?: (string | [string, string])[] | undefined, isMainComp?: boolean): Record<string, any>;
|
|
13
16
|
/**
|
|
14
17
|
* @param {import('@json-layout/core').StateNode} node
|
|
15
18
|
* @param {string} comp
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/utils/props.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8CAHW,CAAC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/utils/props.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8CAHW,CAAC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,EAAE,GACjC,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CAqBnD;AAID;;;;;;GAMG;AACH,oCANW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,2EAExC,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CA2C/B;AAGD;;;;;GAKG;AACH,mCALW,OAAO,mBAAmB,EAAE,SAAS,QACrC,MAAM,eACN,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CAY/B"}
|
package/types/utils/slots.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {import('
|
|
3
|
-
* @param {import('
|
|
2
|
+
* @param {import('../types.js').VjsfNode} node
|
|
3
|
+
* @param {import('../types.js').VjsfStatefulLayout} statefulLayout
|
|
4
4
|
* @returns {Record<string, any>}
|
|
5
5
|
*/
|
|
6
|
-
export function getCompSlots(node: import('
|
|
6
|
+
export function getCompSlots(node: import('../types.js').VjsfNode, statefulLayout: import('../types.js').VjsfStatefulLayout): Record<string, any>;
|
|
7
7
|
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/utils/slots.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,mCAJW,OAAO,
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/utils/slots.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,mCAJW,OAAO,aAAa,EAAE,QAAQ,kBAC9B,OAAO,aAAa,EAAE,kBAAkB,GACtC,OAAO,MAAM,EAAE,GAAG,CAAC,CAU/B"}
|
package/src/utils/clone.js
DELETED