@koumoul/vjsf 3.0.0 → 3.1.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.0.0",
3
+ "version": "3.1.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.33.3",
73
+ "@json-layout/core": "0.34.1",
74
74
  "@vueuse/core": "^10.5.0",
75
75
  "debug": "^4.3.4"
76
76
  },
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import TextFieldMenu from '../fragments/text-field-menu.vue'
3
+ import { VIcon } from 'vuetify/components/VIcon'
3
4
  import { VDatePicker } from 'vuetify/components/VDatePicker'
4
5
  import { useDate, useDefaults } from 'vuetify'
5
6
  import { computed, ref, toRef } from 'vue'
@@ -56,6 +57,9 @@ const formattedValue = computed(() => {
56
57
  :stateful-layout="statefulLayout"
57
58
  :formatted-value="formattedValue"
58
59
  >
60
+ <template #prepend-inner>
61
+ <v-icon :icon="statefulLayout.options.icons.calendar" />
62
+ </template>
59
63
  <v-date-picker v-bind="datePickerProps" />
60
64
  </text-field-menu>
61
65
  </template>
@@ -72,6 +72,9 @@ const timePickerProps = computed(() => {
72
72
  :stateful-layout="statefulLayout"
73
73
  :formatted-value="modelValue.data && vDate.format(modelValue.data, 'fullDateTime')"
74
74
  >
75
+ <template #prepend-inner>
76
+ <v-icon :icon="statefulLayout.options.icons.calendar" />
77
+ </template>
75
78
  <v-sheet style="width: 328px">
76
79
  <v-tabs
77
80
  v-model="tab"
@@ -27,7 +27,7 @@ export default defineComponent({
27
27
  const fullProps = computed(() => {
28
28
  const fullProps = { ...inputProps.value }
29
29
  fullProps.type = 'number'
30
- fullProps['onUpdate:modelValue'] = (/** @type string */value) => props.statefulLayout.input(props.modelValue, value && Number(value))
30
+ fullProps['onUpdate:modelValue'] = (/** @type string */value) => props.statefulLayout.input(props.modelValue, value ? Number(value) : undefined)
31
31
  fullProps.modelValue = localData.value
32
32
  return fullProps
33
33
  })
@@ -64,7 +64,10 @@ const fieldProps = computed(() => {
64
64
 
65
65
  <template>
66
66
  <v-row>
67
- <v-col v-if="modelValue.skeleton.childrenTrees">
67
+ <v-col
68
+ v-if="modelValue.skeleton.childrenTrees"
69
+ cols="12"
70
+ >
68
71
  <v-select
69
72
  v-bind="fieldProps"
70
73
  :model-value="activeChildTree"
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import TextFieldMenu from '../fragments/text-field-menu.vue'
3
3
  import { VTimePicker } from 'vuetify/labs/VTimePicker'
4
+ import { VIcon } from 'vuetify/components/VIcon'
4
5
  import { useDate, useDefaults } from 'vuetify'
5
6
  import { computed, toRef } from 'vue'
6
7
  import { getShortTime, getLongTime } from '../../utils/dates.js'
@@ -39,6 +40,9 @@ const timePickerProps = computed(() => {
39
40
  :stateful-layout="statefulLayout"
40
41
  :formatted-value="timePickerProps.modelValue && vDate.format('2010-04-13T' + timePickerProps.modelValue, 'fullTime')"
41
42
  >
43
+ <template #prepend-inner>
44
+ <v-icon :icon="statefulLayout.options.icons.clock" />
45
+ </template>
42
46
  <v-time-picker
43
47
  v-bind="timePickerProps"
44
48
  @update:model-value="value => {statefulLayout.input(props.modelValue, value && getLongTime(value))}"