@koumoul/vjsf 3.0.0-beta.18 → 3.0.0-beta.19

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-beta.18",
3
+ "version": "3.0.0-beta.19",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test": "vitest",
package/src/compat/v2.js CHANGED
@@ -9,7 +9,7 @@ const Ajv = /** @type {typeof ajvModule.default} */ (ajvModule)
9
9
  /**
10
10
  *
11
11
  * @param {string} expression
12
- * @returns {{type: string, expr: string, pure: boolean}}
12
+ * @returns {{type: 'js-eval' | undefined, expr: string, pure: boolean}}
13
13
  */
14
14
  const fiexEvalExpression = (expression) => {
15
15
  let expr = expression
@@ -4,15 +4,17 @@
4
4
  <v-alert
5
5
  v-show="show"
6
6
  color="info"
7
+ :density="node.options.density"
7
8
  >
8
9
  <div v-html="node.layout.help" />
9
10
  </v-alert>
10
11
  </v-slide-x-reverse-transition>
11
12
  <v-btn
12
13
  color="info"
13
- class="vjsf-help-message-toggle"
14
+ :class="`vjsf-help-message-toggle vjsf-help-message-toggle-${node.options.density}`"
14
15
  :icon="show ? 'mdi-close-circle' : 'mdi-information'"
15
16
  density="compact"
17
+ :size="node.options.density !== 'default' ? 'small' : 'default'"
16
18
  :title="show ? '' : node.messages.showHelp"
17
19
  @click="show = !show"
18
20
  />
@@ -45,5 +47,13 @@ const show = ref(false)
45
47
  right: -4px;
46
48
  z-index: 1;
47
49
  }
50
+ .vjsf-help-message-toggle-comfortable {
51
+ top: -4px;
52
+ right: -4px;
53
+ }
54
+ .vjsf-help-message-toggle-compact {
55
+ top: -4px;
56
+ right: -4px;
57
+ }
48
58
  </style>
49
59
  ../../../types.js
@@ -56,7 +56,7 @@ if (props.modelValue.layout.comp !== 'none' && !props.statefulLayout.options.nod
56
56
  />
57
57
 
58
58
  <help-message
59
- v-if="modelValue.layout.help"
59
+ v-if="modelValue.layout.help && !modelValue.options.summary"
60
60
  :node="modelValue"
61
61
  :class="beforeAfterClasses[modelValue.options.density]"
62
62
  />
@@ -77,7 +77,7 @@ const duplicateItem = (child, childIndex) => {
77
77
  menuOpened.value = -1
78
78
  }
79
79
 
80
- const itemBorderColor = computed(() => (child, childIndex) => {
80
+ const itemBorderColor = computed(() => (/** @type {import('@json-layout/core').StateNode} */child, /** @type {number} */childIndex) => {
81
81
  if (editedItem.value === childIndex) return theme.current.value.colors.primary
82
82
  if (child.validated && (child.error || child.childError)) return theme.current.value.colors.error
83
83
  return 'transparent'
@@ -86,7 +86,10 @@ const itemBorderColor = computed(() => (child, childIndex) => {
86
86
  </script>
87
87
 
88
88
  <template>
89
- <v-sheet :elevation="1">
89
+ <v-sheet
90
+ :elevation="2"
91
+ rounded
92
+ >
90
93
  <v-list :density="modelValue.options.density">
91
94
  <v-list-subheader v-if="modelValue.layout.title">
92
95
  {{ modelValue.layout.title }}