@koumoul/vjsf 3.0.0-alpha.0 → 3.0.0-alpha.2

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.
Files changed (69) hide show
  1. package/package.json +10 -4
  2. package/src/compat/v2.js +44 -6
  3. package/src/compile/index.js +25 -6
  4. package/src/compile/v-jsf-compiled.vue.ejs +14 -52
  5. package/src/components/fragments/help-message.vue +48 -0
  6. package/src/components/fragments/section-header.vue +4 -1
  7. package/src/components/fragments/select-item-icon.vue +28 -0
  8. package/src/components/fragments/select-item.vue +43 -0
  9. package/src/components/fragments/select-selection.vue +35 -0
  10. package/src/components/fragments/text-field-menu.vue +1 -1
  11. package/src/components/node.vue +10 -1
  12. package/src/components/nodes/autocomplete.vue +95 -0
  13. package/src/components/nodes/combobox.vue +73 -0
  14. package/src/components/nodes/date-picker.vue +2 -2
  15. package/src/components/nodes/list.vue +170 -86
  16. package/src/components/nodes/markdown.vue +233 -0
  17. package/src/components/nodes/number-combobox.vue +73 -0
  18. package/src/components/nodes/number-field.vue +1 -2
  19. package/src/components/nodes/select.vue +70 -50
  20. package/src/components/nodes/stepper.vue +98 -0
  21. package/src/components/nodes/text-field.vue +1 -1
  22. package/src/components/nodes/textarea.vue +1 -1
  23. package/src/components/options.js +23 -2
  24. package/src/components/tree.vue +2 -1
  25. package/src/components/types.ts +8 -0
  26. package/src/components/vjsf.vue +38 -94
  27. package/src/composables/use-dnd.js +54 -0
  28. package/src/composables/use-vjsf.js +115 -0
  29. package/src/index.js +2 -1
  30. package/src/styles/vjsf.css +10 -0
  31. package/src/utils/arrays.js +15 -0
  32. package/src/utils/props.js +25 -6
  33. package/types/compat/v2.d.ts.map +1 -1
  34. package/types/compile/index.d.ts.map +1 -1
  35. package/types/components/fragments/help-message.vue.d.ts +8 -0
  36. package/types/components/fragments/help-message.vue.d.ts.map +1 -0
  37. package/types/components/fragments/select-item-icon.vue.d.ts +15 -0
  38. package/types/components/fragments/select-item-icon.vue.d.ts.map +1 -0
  39. package/types/components/fragments/select-item.vue.d.ts +12 -0
  40. package/types/components/fragments/select-item.vue.d.ts.map +1 -0
  41. package/types/components/fragments/select-selection.vue.d.ts +12 -0
  42. package/types/components/fragments/select-selection.vue.d.ts.map +1 -0
  43. package/types/components/nodes/autocomplete.vue.d.ts +27 -0
  44. package/types/components/nodes/autocomplete.vue.d.ts.map +1 -0
  45. package/types/components/nodes/combobox.vue.d.ts +27 -0
  46. package/types/components/nodes/combobox.vue.d.ts.map +1 -0
  47. package/types/components/nodes/markdown.vue.d.ts +27 -0
  48. package/types/components/nodes/markdown.vue.d.ts.map +1 -0
  49. package/types/components/nodes/number-combobox.vue.d.ts +27 -0
  50. package/types/components/nodes/number-combobox.vue.d.ts.map +1 -0
  51. package/types/components/nodes/select.vue.d.ts +25 -8
  52. package/types/components/nodes/select.vue.d.ts.map +1 -1
  53. package/types/components/nodes/stepper.vue.d.ts +10 -0
  54. package/types/components/nodes/stepper.vue.d.ts.map +1 -0
  55. package/types/components/options.d.ts +3 -2
  56. package/types/components/options.d.ts.map +1 -1
  57. package/types/components/types.d.ts +9 -1
  58. package/types/components/types.d.ts.map +1 -1
  59. package/types/components/vjsf.vue.d.ts +5 -3
  60. package/types/composables/use-dnd.d.ts +21 -0
  61. package/types/composables/use-dnd.d.ts.map +1 -0
  62. package/types/composables/use-vjsf.d.ts +17 -0
  63. package/types/composables/use-vjsf.d.ts.map +1 -0
  64. package/types/index.d.ts +2 -1
  65. package/types/index.d.ts.map +1 -1
  66. package/types/utils/arrays.d.ts +9 -0
  67. package/types/utils/arrays.d.ts.map +1 -0
  68. package/types/utils/props.d.ts +6 -3
  69. package/types/utils/props.d.ts.map +1 -1
package/src/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import Vjsf from './components/vjsf.vue'
2
- export { Vjsf }
2
+ import { defaultOptions } from './components/options.js'
3
+ export { Vjsf, defaultOptions }
@@ -0,0 +1,10 @@
1
+ /* override vuetify styles to manage readOnly fields more usable than the default disabled fields */
2
+ .vjsf-input--readonly.v-input--disabled.v-text-field .v-field--disabled input {
3
+ pointer-events: auto;
4
+ }
5
+ .vjsf-input--readonly.v-input--disabled .v-field--disabled,
6
+ .vjsf-input--readonly.v-input--disabled .v-input__details,
7
+ .vjsf-input--readonly.v-input--disabled .v-input__append,
8
+ .vjsf-input--readonly.v-input--disabled .v-input__prepend {
9
+ opacity: inherit;
10
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @template T
3
+ * @param {T[]} array
4
+ * @param {number} fromIndex
5
+ * @param {number} toIndex
6
+ * @return {T[]}
7
+ */
8
+ export function moveArrayItem (array, fromIndex, toIndex) {
9
+ if (fromIndex === toIndex || fromIndex === -1 || toIndex === -1) return array
10
+ const newArray = [...array]
11
+ const element = newArray[fromIndex]
12
+ newArray.splice(fromIndex, 1)
13
+ newArray.splice(toIndex, 0, element)
14
+ return newArray
15
+ }
@@ -3,15 +3,23 @@ import { camelize } from 'vue'
3
3
 
4
4
  /**
5
5
  * @param {(Record<string, any> | undefined)[]} propsLevels
6
- * @returns Record<string, any>
6
+ * @returns {Record<string, any> & {class: string[]}}
7
7
  */
8
8
  export function mergePropsLevels (propsLevels) {
9
- /** @type Record<string, any> */
10
- const fullProps = {}
9
+ /** @type {Record<string, any> & {class: string[]}} */
10
+ const fullProps = { class: [] }
11
11
  for (const propsLevel of propsLevels) {
12
12
  if (propsLevel) {
13
13
  for (const key of Object.keys(propsLevel)) {
14
- fullProps[camelize(key)] = propsLevel[key]
14
+ if (key === 'class') {
15
+ // a small convention for merging/overwriting classes:
16
+ // a class defined as a simple string overwrites the previous ones
17
+ // a class defined as an array is merged with the previous ones
18
+ if (Array.isArray(propsLevel.class)) fullProps.class = fullProps.class.concat(propsLevel.class)
19
+ else fullProps.class = [propsLevel.class]
20
+ } else {
21
+ fullProps[camelize(key)] = propsLevel[key]
22
+ }
15
23
  }
16
24
  }
17
25
  }
@@ -23,10 +31,11 @@ export function mergePropsLevels (propsLevels) {
23
31
  /**
24
32
  * @param {import('@json-layout/core').StateNode} node
25
33
  * @param {import('@json-layout/core').StatefulLayout} statefulLayout
34
+ * @param {(string | [string, string])[]} [layoutPropsMap]
26
35
  * @param {boolean} isMainComp
27
36
  * @returns {Record<string, any>}
28
37
  */
29
- export function getInputProps (node, statefulLayout, isMainComp = true) {
38
+ export function getInputProps (node, statefulLayout, layoutPropsMap, isMainComp = true) {
30
39
  const options = /** @type import('../components/types.js').VjsfOptions */(node.options)
31
40
  /** @type {(Record<string, any> | undefined)[]} */
32
41
  const propsLevels = [options.fieldProps]
@@ -48,7 +57,17 @@ export function getInputProps (node, statefulLayout, isMainComp = true) {
48
57
  fullProps.modelValue = node.data
49
58
  if (node.options.readOnly) {
50
59
  fullProps.disabled = true
51
- fullProps.class = 'vjsf-input--readonly'
60
+ fullProps.class.push('vjsf-input--readonly')
61
+ }
62
+ if (node.autofocus) {
63
+ fullProps.class.push('vjsf-input--autofocus')
64
+ }
65
+
66
+ if (layoutPropsMap) {
67
+ for (const propMap of layoutPropsMap) {
68
+ if (typeof propMap === 'string') fullProps[propMap] = node.layout[propMap]
69
+ else fullProps[propMap[0]] = node.layout[propMap[1]]
70
+ }
52
71
  }
53
72
 
54
73
  if (isMainComp) {
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AA2DA;;;;;;GAMG;AACH,kCALW,MAAM,+CAEN,MAAM,0BAkBhB;sBAjFqB,KAAK"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AAiGA;;;;;;GAMG;AACH,kCALW,MAAM,+CAEN,MAAM,0BAkBhB;sBAvHqB,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,gCAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAgBlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compile/index.js"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,gCAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAalB"}
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ node: import("../types.js").VjsfNode;
3
+ $props: {
4
+ readonly node?: import("../types.js").VjsfNode | undefined;
5
+ };
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
7
+ export default _default;
8
+ //# sourceMappingURL=help-message.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-message.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/help-message.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ icon: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ icon: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ }>>, {}, {}>;
14
+ export default _default;
15
+ //# sourceMappingURL=select-item-icon.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-item-icon.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/select-item-icon.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ multiple: boolean;
3
+ itemProps: Record<string, any>;
4
+ item: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
5
+ $props: {
6
+ readonly multiple?: boolean | undefined;
7
+ readonly itemProps?: Record<string, any> | undefined;
8
+ readonly item?: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
9
+ };
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
11
+ export default _default;
12
+ //# sourceMappingURL=select-item.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-item.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/select-item.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ multiple: boolean;
3
+ item: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
4
+ last: boolean;
5
+ $props: {
6
+ readonly multiple?: boolean | undefined;
7
+ readonly item?: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
8
+ readonly last?: boolean | undefined;
9
+ };
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
11
+ export default _default;
12
+ //# sourceMappingURL=select-selection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-selection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/fragments/select-selection.vue.js"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ /** @type import('vue').PropType<import('../types.js').VjsfSelectNode> */
4
+ type: import('vue').PropType<import('../types.js').VjsfSelectNode>;
5
+ required: true;
6
+ };
7
+ statefulLayout: {
8
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
9
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
10
+ required: true;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ /** @type import('vue').PropType<import('../types.js').VjsfSelectNode> */
17
+ type: import('vue').PropType<import('../types.js').VjsfSelectNode>;
18
+ required: true;
19
+ };
20
+ statefulLayout: {
21
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
22
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
26
+ export default _default;
27
+ //# sourceMappingURL=autocomplete.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/autocomplete.vue.js"],"names":[],"mappings":";;QAYI,yEAAyE;cAA/D,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC;;;;QAKtE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC;;;;;;;QAL5E,yEAAyE;cAA/D,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC;;;;QAKtE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ /** @type import('vue').PropType<import('../types.js').VjsfComboboxNode> */
4
+ type: import('vue').PropType<import('../types.js').VjsfComboboxNode>;
5
+ required: true;
6
+ };
7
+ statefulLayout: {
8
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
9
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
10
+ required: true;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ /** @type import('vue').PropType<import('../types.js').VjsfComboboxNode> */
17
+ type: import('vue').PropType<import('../types.js').VjsfComboboxNode>;
18
+ required: true;
19
+ };
20
+ statefulLayout: {
21
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
22
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
26
+ export default _default;
27
+ //# sourceMappingURL=combobox.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"combobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/combobox.vue.js"],"names":[],"mappings":";;QAUM,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC;;;;;;;QAL5E,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ /** @type import('vue').PropType<import('../types.js').VjsfTextareaNode> */
4
+ type: import('vue').PropType<import('../types.js').VjsfTextareaNode>;
5
+ required: true;
6
+ };
7
+ statefulLayout: {
8
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
9
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
10
+ required: true;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ /** @type import('vue').PropType<import('../types.js').VjsfTextareaNode> */
17
+ type: import('vue').PropType<import('../types.js').VjsfTextareaNode>;
18
+ required: true;
19
+ };
20
+ statefulLayout: {
21
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
22
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
26
+ export default _default;
27
+ //# sourceMappingURL=markdown.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/markdown.vue.js"],"names":[],"mappings":";;QAYM,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC;;;;;;;QAL5E,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ /** @type import('vue').PropType<import('../types.js').VjsfComboboxNode> */
4
+ type: import('vue').PropType<import('../types.js').VjsfComboboxNode>;
5
+ required: true;
6
+ };
7
+ statefulLayout: {
8
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
9
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
10
+ required: true;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ /** @type import('vue').PropType<import('../types.js').VjsfComboboxNode> */
17
+ type: import('vue').PropType<import('../types.js').VjsfComboboxNode>;
18
+ required: true;
19
+ };
20
+ statefulLayout: {
21
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
22
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
26
+ export default _default;
27
+ //# sourceMappingURL=number-combobox.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-combobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/number-combobox.vue.js"],"names":[],"mappings":";;QAUM,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC;;;;;;;QAL5E,2EAA2E;cAAjE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,gBAAgB,CAAC;;;;QAKxE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC"}
@@ -1,10 +1,27 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- modelValue: import("../types.js").VjsfSelectNode;
3
- statefulLayout: import("@json-layout/core").StatefulLayout;
4
- $props: {
5
- readonly modelValue?: import("../types.js").VjsfSelectNode | undefined;
6
- readonly statefulLayout?: import("@json-layout/core").StatefulLayout | undefined;
7
- };
8
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ /** @type import('vue').PropType<import('../types.js').VjsfSelectNode> */
4
+ type: import('vue').PropType<import('../types.js').VjsfSelectNode>;
5
+ required: true;
6
+ };
7
+ statefulLayout: {
8
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
9
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
10
+ required: true;
11
+ };
12
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ /** @type import('vue').PropType<import('../types.js').VjsfSelectNode> */
17
+ type: import('vue').PropType<import('../types.js').VjsfSelectNode>;
18
+ required: true;
19
+ };
20
+ statefulLayout: {
21
+ /** @type import('vue').PropType<import('@json-layout/core').StatefulLayout> */
22
+ type: import('vue').PropType<import('@json-layout/core').StatefulLayout>;
23
+ required: true;
24
+ };
25
+ }>>, {}, {}>;
9
26
  export default _default;
10
27
  //# sourceMappingURL=select.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/select.vue.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"select.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/select.vue.js"],"names":[],"mappings":";;QAYI,yEAAyE;cAA/D,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC;;;;QAKtE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC;;;;;;;QAL5E,yEAAyE;cAA/D,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,aAAa,EAAE,cAAc,CAAC;;;;QAKtE,+EAA+E;cAArE,OAAO,KAAK,EAAE,QAAQ,CAAC,OAAO,mBAAmB,EAAE,cAAc,CAAC"}
@@ -0,0 +1,10 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ modelValue: import("../types.js").VjsfStepperNode;
3
+ statefulLayout: import("@json-layout/core").StatefulLayout;
4
+ $props: {
5
+ readonly modelValue?: import("../types.js").VjsfStepperNode | undefined;
6
+ readonly statefulLayout?: import("@json-layout/core").StatefulLayout | undefined;
7
+ };
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
9
+ export default _default;
10
+ //# sourceMappingURL=stepper.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/nodes/stepper.vue.js"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
- /** @type Partial<import("./types.js").VjsfOptions> */
2
- export const defaultOptions: Partial<import("./types.js").VjsfOptions>;
1
+ /** @type import("./types.js").PartialVjsfOptions */
2
+ export const defaultOptions: import("./types.js").PartialVjsfOptions;
3
+ export function getFullOptions(options: Partial<import("./types.js").VjsfOptions>, form: any, width: number, slots: import("vue").Slots): import("./types.js").VjsfOptions;
3
4
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/components/options.js"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,6BADU,QAAQ,OAAO,YAAY,EAAE,WAAW,CAAC,CAwBlD"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/components/options.js"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,6BADU,OAAO,YAAY,EAAE,kBAAkB,CAyBhD;AAUM,wCANI,QAAQ,OAAO,YAAY,EAAE,WAAW,CAAC,QACzC,GAAG,SACH,MAAM,SACN,OAAO,KAAK,EAAE,KAAK,oCAa7B"}
@@ -1,4 +1,4 @@
1
- import { StatefulLayoutOptions, StateNode, CheckboxNode, ColorPickerNode, DatePickerNode, DateTimePickerNode, TabsNode, ExpansionPanelsNode, ListNode, NumberFieldNode, OneOfSelectNode, SectionNode, SelectNode, SliderNode, SwitchNode, TextFieldNode, TextareaNode, VerticalTabsNode, CompileOptions } from '@json-layout/core';
1
+ import { StatefulLayoutOptions, StateNode, CheckboxNode, ColorPickerNode, DatePickerNode, DateTimePickerNode, TabsNode, ExpansionPanelsNode, ListNode, NumberFieldNode, OneOfSelectNode, SectionNode, SelectNode, SliderNode, SwitchNode, TextFieldNode, TextareaNode, VerticalTabsNode, StepperNode, ComboboxNode, CompileOptions } from '@json-layout/core';
2
2
  export type Density = 'default' | 'comfortable' | 'compact';
3
3
  export type VjsfOptions = StatefulLayoutOptions & CompileOptions & {
4
4
  density: Density;
@@ -16,7 +16,9 @@ export type VjsfOptions = StatefulLayoutOptions & CompileOptions & {
16
16
  switchPropsReadOnly: Record<string, unknown>;
17
17
  errorAlertProps: Record<string, unknown>;
18
18
  vjsfSlots: Record<string, () => unknown>;
19
+ easyMDEOptions: Record<string, unknown>;
19
20
  };
21
+ export type PartialVjsfOptions = Partial<Omit<VjsfOptions, 'width'>>;
20
22
  export type VjsfNode = Omit<StateNode, 'options'> & {
21
23
  options: VjsfOptions;
22
24
  };
@@ -68,4 +70,10 @@ export type VjsfTextareaNode = Omit<TextareaNode, 'options'> & {
68
70
  export type VjsfVerticalTabsNode = Omit<VerticalTabsNode, 'options'> & {
69
71
  options: VjsfOptions;
70
72
  };
73
+ export type VjsfStepperNode = Omit<StepperNode, 'options'> & {
74
+ options: VjsfOptions;
75
+ };
76
+ export type VjsfComboboxNode = Omit<ComboboxNode, 'options'> & {
77
+ options: VjsfOptions;
78
+ };
71
79
  //# sourceMappingURL=types.d.ts.map
@@ -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,WAAW,GAAG,qBAAqB,GAAG,cAAc,GAAG;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,qBAAqB,EAAE,MAAM,CAAC,MAAM,E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A"}
@@ -1,12 +1,14 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
- $emit: (event: "update:modelValue" | "update:state", ...args: any[]) => void;
2
+ $emit: ((event: "update:modelValue", data: any) => void) & ((event: "update:state", state: import("@json-layout/core").StatefulLayout) => void);
3
+ modelValue: any;
3
4
  options: Partial<Omit<import("./types.js").VjsfOptions, "width">>;
4
- modelValue: string | number | boolean | Record<string, any>;
5
5
  schema: Record<string, any>;
6
+ precompiledLayout: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
6
7
  $props: {
8
+ readonly modelValue?: any;
7
9
  readonly options?: Partial<Omit<import("./types.js").VjsfOptions, "width">> | undefined;
8
- readonly modelValue?: string | number | boolean | Record<string, any> | undefined;
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
13
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
12
14
  export default _default;
@@ -0,0 +1,21 @@
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
+ draggable: import("vue").Ref<number>;
11
+ itemBind: (itemIndex: number) => {
12
+ onDragstart: () => void;
13
+ onDragover: () => void;
14
+ onDragend: () => void;
15
+ };
16
+ handleBind: (itemIndex: number) => {
17
+ onMouseover(): void;
18
+ onMouseout(): void;
19
+ };
20
+ };
21
+ //# 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;;;;0BAiBU,MAAM;;;;;4BAcJ,MAAM;;;;EAgBtC"}
@@ -0,0 +1,17 @@
1
+ export const emits: {
2
+ /**
3
+ * @arg {any} data
4
+ */
5
+ 'update:modelValue': (data: any) => boolean;
6
+ /**
7
+ * @arg {StatefulLayout} state
8
+ */
9
+ 'update:state': (state: StatefulLayout) => boolean;
10
+ };
11
+ export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../components/types.js").PartialVjsfOptions>, emit: any, compile: typeof import('@json-layout/core').compile, precompiledLayout?: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined): {
12
+ el: import("vue").Ref<null>;
13
+ statefulLayout: import("vue").ShallowRef<StatefulLayout | null>;
14
+ stateTree: import("vue").ShallowRef<import("../../../node_modules/@json-layout/core/types/state/types.js").StateTree | null>;
15
+ };
16
+ import { StatefulLayout } from '@json-layout/core';
17
+ //# 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":"AAKA;IACE;;MAEE;gCADO,GAAG;IAGZ;;MAEE;4BADO,cAAc;EAGxB;AAUM,gCAPI,OAAO,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,cACzB,OAAO,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,WACtB,OAAO,KAAK,EAAE,GAAG,CAAC,OAAO,wBAAwB,EAAE,kBAAkB,CAAC,QACtE,GAAG,WACH,cAAc,mBAAmB,EAAE,OAAO;;;;EA6FpD;+BAlH8B,mBAAmB"}
package/types/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { Vjsf };
2
1
  import Vjsf from './components/vjsf.vue';
2
+ import { defaultOptions } from './components/options.js';
3
+ export { Vjsf, defaultOptions };
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @template T
3
+ * @param {T[]} array
4
+ * @param {number} fromIndex
5
+ * @param {number} toIndex
6
+ * @return {T[]}
7
+ */
8
+ export function moveArrayItem<T>(array: T[], fromIndex: number, toIndex: number): T[];
9
+ //# sourceMappingURL=arrays.d.ts.map
@@ -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"}
@@ -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
9
  * @param {import('@json-layout/core').StateNode} node
8
10
  * @param {import('@json-layout/core').StatefulLayout} 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('@json-layout/core').StateNode, statefulLayout: import('@json-layout/core').StatefulLayout, isMainComp?: boolean): Record<string, any>;
15
+ export function getInputProps(node: import('@json-layout/core').StateNode, statefulLayout: import('@json-layout/core').StatefulLayout, 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,uBAc7C;AAID;;;;;GAKG;AACH,oCALW,OAAO,mBAAmB,EAAE,SAAS,kBACrC,OAAO,mBAAmB,EAAE,cAAc,eAC1C,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CAiC/B;AAGD;;;;;GAKG;AACH,mCALW,OAAO,mBAAmB,EAAE,SAAS,QACrC,MAAM,eACN,OAAO,GACL,OAAO,MAAM,EAAE,GAAG,CAAC,CAY/B"}
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,mBAAmB,EAAE,SAAS,kBACrC,OAAO,mBAAmB,EAAE,cAAc,2EAE1C,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"}