@koumoul/vjsf 3.1.1 → 3.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koumoul/vjsf",
3
- "version": "3.1.1",
3
+ "version": "3.3.0",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test": "vitest",
@@ -70,7 +70,7 @@
70
70
  "vuetify": "^3.6.13"
71
71
  },
72
72
  "dependencies": {
73
- "@json-layout/core": "0.34.1",
73
+ "@json-layout/core": "1.0.0",
74
74
  "@vueuse/core": "^10.5.0",
75
75
  "debug": "^4.3.4"
76
76
  },
package/src/compat/v2.js CHANGED
@@ -140,6 +140,10 @@ const processFragment = (schema, getJSONRef, schemaId, processed) => {
140
140
  layout.cols = schema['x-cols']
141
141
  }
142
142
 
143
+ if (schema['x-options']?.hideInArrayItem && !layout.if) {
144
+ layout.if = '!summary'
145
+ }
146
+
143
147
  // compact the layout keyword if possible
144
148
  if (Object.keys(layout).length === 1 && 'comp' in layout) {
145
149
  schema.layout = layout.comp
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AAqMA;;;;;;GAMG;AACH,kCALW,MAAM,+CAEN,MAAM,0BAoBhB;sBA7NqB,KAAK"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AAyMA;;;;;;GAMG;AACH,kCALW,MAAM,+CAEN,MAAM,0BAoBhB;sBAjOqB,KAAK"}
@@ -1,7 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<any, {
2
- modelValue: import("../../../../node_modules/@json-layout/core/types/state/types.js").StateNode;
2
+ modelValue: import("../../../node_modules/@json-layout/core/types/state/types.js").StateNode;
3
3
  $props: {
4
- modelValue?: import("../../../../node_modules/@json-layout/core/types/state/types.js").StateNode | undefined;
4
+ modelValue?: import("../../../node_modules/@json-layout/core/types/state/types.js").StateNode | undefined;
5
5
  };
6
6
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
7
  export default _default;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<any, {
2
2
  multiple: boolean;
3
- item: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
3
+ item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
4
4
  itemProps: Record<string, any>;
5
5
  $props: {
6
6
  readonly multiple?: boolean | undefined;
7
- readonly item?: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
7
+ readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
8
8
  readonly itemProps?: Record<string, any> | undefined;
9
9
  };
10
10
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<any, {
2
2
  multiple: boolean;
3
- item: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
3
+ item: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem;
4
4
  last: boolean;
5
5
  $props: {
6
6
  readonly multiple?: boolean | undefined;
7
- readonly item?: import("../../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
7
+ readonly item?: import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItem | undefined;
8
8
  readonly last?: boolean | undefined;
9
9
  };
10
10
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,8 +1,8 @@
1
1
  declare const _default: import("vue").DefineComponent<any, {
2
- modelValue: import("../../../node_modules/@json-layout/core/types/state/types.js").StateTree;
2
+ modelValue: import("../../node_modules/@json-layout/core/types/state/types.js").StateTree;
3
3
  statefulLayout: import("../types.js").VjsfStatefulLayout;
4
4
  $props: {
5
- readonly modelValue?: import("../../../node_modules/@json-layout/core/types/state/types.js").StateTree | undefined;
5
+ readonly modelValue?: import("../../node_modules/@json-layout/core/types/state/types.js").StateTree | undefined;
6
6
  readonly statefulLayout?: import("../types.js").VjsfStatefulLayout | undefined;
7
7
  };
8
8
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -3,12 +3,12 @@ declare const _default: import("vue").DefineComponent<any, {
3
3
  options: Partial<Omit<import("../types.js").VjsfOptions, "onData" | "onUpdate" | "onAutofocus" | "width" | "vjsfSlots">> | null;
4
4
  modelValue: any;
5
5
  schema: Record<string, any>;
6
- precompiledLayout: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
6
+ precompiledLayout: import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout;
7
7
  $props: {
8
8
  readonly options?: Partial<Omit<import("../types.js").VjsfOptions, "onData" | "onUpdate" | "onAutofocus" | "width" | "vjsfSlots">> | null | undefined;
9
9
  readonly modelValue?: any;
10
10
  readonly schema?: Record<string, any> | undefined;
11
- readonly precompiledLayout?: import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined;
11
+ readonly precompiledLayout?: import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout | undefined;
12
12
  };
13
13
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<any> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
14
14
  export default _default;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export default function _default(nodeRef: import('vue').Ref<import('../types.js').VjsfNode>, statefulLayout: import('../types.js').VjsfStatefulLayout): {
6
6
  hasItems: import("vue").ComputedRef<boolean>;
7
- items: import("vue").Ref<import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
7
+ items: import("vue").Ref<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
8
8
  loading: import("vue").Ref<boolean, boolean>;
9
9
  search: import("vue").Ref<string, string>;
10
10
  prepareSelectedItem: (selectedItem: any, itemValue: any) => any;
@@ -24,9 +24,9 @@ export default function _default(nodeRef: import('vue').Ref<import('../types.js'
24
24
  }>;
25
25
  compSlots: import("vue").ComputedRef<Record<string, any>>;
26
26
  options: import("vue").ComputedRef<Required<import("../types.js").VjsfOptions>>;
27
- skeleton: import("vue").ComputedRef<import("../../../node_modules/@json-layout/core/types/compile/types.js").SkeletonNode>;
28
- layout: import("vue").ComputedRef<import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").BaseCompObject>;
27
+ skeleton: import("vue").ComputedRef<import("../../node_modules/@json-layout/core/types/compile/types.js").SkeletonNode>;
28
+ layout: import("vue").ComputedRef<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").BaseCompObject>;
29
29
  data: import("vue").ComputedRef<unknown>;
30
- children: import("vue").ComputedRef<import("../../../node_modules/@json-layout/core/types/state/types.js").StateNode[] | undefined>;
30
+ children: import("vue").ComputedRef<import("../../node_modules/@json-layout/core/types/state/types.js").StateNode[] | undefined>;
31
31
  };
32
32
  //# sourceMappingURL=use-node.d.ts.map
@@ -18,7 +18,7 @@ export default function _default(nodeRef: import('vue').Ref<import('../types.js'
18
18
  }>;
19
19
  getItems: {
20
20
  hasItems: import("vue").ComputedRef<boolean>;
21
- items: import("vue").Ref<import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
21
+ items: import("vue").Ref<import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems, import("../../node_modules/@json-layout/vocabulary/types/normalized-layout/types.js").SelectItems>;
22
22
  loading: import("vue").Ref<boolean, boolean>;
23
23
  search: import("vue").Ref<string, string>;
24
24
  prepareSelectedItem: (selectedItem: any, itemValue: any) => any;
@@ -8,9 +8,9 @@ export const emits: {
8
8
  */
9
9
  'update:state': (state: import('../types.js').VjsfStatefulLayout) => boolean;
10
10
  };
11
- export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../types.js").PartialVjsfOptions | null>, 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, import("../../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout> | undefined): {
11
+ export function useVjsf(schema: import('vue').Ref<Object>, modelValue: import('vue').Ref<any>, options: import('vue').Ref<import("../types.js").PartialVjsfOptions | null>, 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, import("../../node_modules/@json-layout/core/types/compile/types.js").CompiledLayout> | undefined): {
12
12
  el: import("vue").Ref<null, null>;
13
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>;
14
+ stateTree: import("vue").ShallowRef<import("../../node_modules/@json-layout/core/types/state/types.js").StateTree | null>;
15
15
  };
16
16
  //# sourceMappingURL=use-vjsf.d.ts.map