@koumoul/vjsf 3.16.0 → 3.17.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.16.0",
3
+ "version": "3.17.0",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test": "vitest run",
@@ -71,8 +71,8 @@
71
71
  "vuetify": "^3.8.12"
72
72
  },
73
73
  "dependencies": {
74
- "@json-layout/core": "~1.11.0",
75
- "@json-layout/vocabulary": "~2.4.0",
74
+ "@json-layout/core": "~1.12.1",
75
+ "@json-layout/vocabulary": "~2.5.0",
76
76
  "@vueuse/core": "^12.5.0",
77
77
  "debug": "^4.3.4"
78
78
  },
@@ -148,7 +148,8 @@ const preparedDelete = ref(false)
148
148
  * @param {number} childIndex
149
149
  */
150
150
  const duplicateItem = (child, childIndex) => {
151
- const newData = [...props.modelValue.data.slice(0, childIndex), clone(child.data), ...props.modelValue.data.slice(childIndex)]
151
+ const newItem = props.modelValue.layout.itemCopy ? props.statefulLayout.evalNodeExpression(props.modelValue, props.modelValue.layout.itemCopy, clone(child.data)) : clone(child.data)
152
+ const newData = [...props.modelValue.data.slice(0, childIndex + 1), newItem, ...props.modelValue.data.slice(childIndex + 1)]
152
153
  props.statefulLayout.input(props.modelValue, newData)
153
154
  if (layout.value.listEditMode === 'inline-single') {
154
155
  props.statefulLayout.activateItem(props.modelValue, childIndex + 1)
@@ -29,7 +29,8 @@ export default defineComponent({
29
29
  const fullProps = computed(() => {
30
30
  const fullProps = { ...inputProps.value }
31
31
  fullProps.modelValue = localData.value
32
- console.log('FULL PROPS', fullProps)
32
+ if (fullProps.precision === undefined) fullProps.precision = null
33
+
33
34
  return fullProps
34
35
  })
35
36