@koumoul/vjsf 3.20.3 → 3.20.5

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.20.3",
3
+ "version": "3.20.5",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test": "vitest run",
package/src/compat/v2.js CHANGED
@@ -161,9 +161,8 @@ const processFragment = (schema, getJSONRef, schemaId, processed) => {
161
161
  layout.if = '!summary'
162
162
  }
163
163
 
164
- if (schema.type === 'array' && schema.items && !layout.getItems) {
165
- if (!Array.isArray(schema.items)) {
166
- layout.comp = layout.comp ?? 'list'
164
+ if (schema.type === 'array' && schema.items && !layout.getItems && !Array.isArray(schema.items)) {
165
+ if (!layout.comp || layout.comp === 'list') {
167
166
  if (schema['x-itemTitle']) layout.itemTitle = `data["${schema['x-itemTitle']}"]`
168
167
  else {
169
168
  // vjsf 2 implicitly used a title property as an item title in lists
@@ -23,7 +23,7 @@ defineProps({
23
23
  </script>
24
24
 
25
25
  <template>
26
- <v-card :title="modelValue.layout.title ?? ''">
26
+ <v-card :title="modelValue.layout.title || undefined">
27
27
  <v-container fluid>
28
28
  <section-header
29
29
  :node="modelValue"
@@ -24,7 +24,7 @@ import useZIndexStack from '../../composables/use-z-index-stack.js'
24
24
 
25
25
  useDefaults({}, 'VjsfList')
26
26
  const vCardProps = useCompDefaults('VjsfList-VCard', { border: true, flat: true, tile: true })
27
- const vEditDialogProps = useCompDefaults('VjsfList-Edit-VDialog', { width: 500 })
27
+ const vEditDialogProps = useCompDefaults('VjsfList-Edit-VDialog', { width: 500, persistent: true })
28
28
  const vEditMenuProps = useCompDefaults('VjsfList-Edit-VMenu', { width: 500 })
29
29
  const theme = useTheme()
30
30
 
@@ -116,7 +116,7 @@ const itemSubtitles = computed(() => {
116
116
  const pushEmptyItem = () => {
117
117
  const newData = (props.modelValue.data ?? []).concat([undefined])
118
118
  props.statefulLayout.input(props.modelValue, newData)
119
- if (layout.value.listEditMode === 'inline-single') {
119
+ if (layout.value.listEditMode === 'inline-single' || layout.value.listEditMode === 'dialog') {
120
120
  props.statefulLayout.activateItem(props.modelValue, newData.length - 1)
121
121
  }
122
122
  }
@@ -496,7 +496,10 @@ const itemBorderColor = computed(() => (/** @type {import('@json-layout/core').S
496
496
  v-bind="vEditDialogProps"
497
497
  >
498
498
  <v-sheet>
499
- <v-toolbar density="compact">
499
+ <v-toolbar
500
+ density="compact"
501
+ color="surface"
502
+ >
500
503
  <v-spacer />
501
504
  <v-btn
502
505
  :title="modelValue.messages.close"
@@ -17,6 +17,9 @@
17
17
  .vjsf-input--readonly.v-input--disabled .v-field__clearable {
18
18
  display: none;
19
19
  }
20
+ .vjsf-input--readonly.v-input--disabled.v-number-input .v-field__append-inner {
21
+ display: none;
22
+ }
20
23
  .vjsf-node.vjsf-has-help {
21
24
  padding-right: 28px!important;
22
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AAuOA;;;;;;GAMG;AACH,kCALW,MAAM,2CAEN,MAAM,0BAoBhB;sBA/PqB,KAAK"}
1
+ {"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AAsOA;;;;;;GAMG;AACH,kCALW,MAAM,2CAEN,MAAM,0BAoBhB;sBA9PqB,KAAK"}