@koumoul/vjsf 3.25.4 → 3.25.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.25.4",
3
+ "version": "3.25.5",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test-tz1": "TZ=Europe/Paris vitest run",
@@ -26,6 +26,7 @@ import useZIndexStack from '../../composables/use-z-index-stack.js'
26
26
  useDefaults({}, 'VjsfList')
27
27
  const vCardProps = useCompDefaults('VjsfList-VCard', { border: true, flat: true, tile: true })
28
28
  const vListProps = useCompDefaults('VjsfList-VList', { class: 'py-0' })
29
+ const vListItemProps = useCompDefaults('VjsfList-VListItem', { variant: 'flat', class: 'pa-1' })
29
30
  const vEditDialogProps = useCompDefaults('VjsfList-Edit-VDialog', { width: 500, persistent: true })
30
31
  const vEditDialogVSheetProps = useCompDefaults('VjsfList-Edit-VDialog-VSheet', {})
31
32
  const vEditMenuProps = useCompDefaults('VjsfList-Edit-VMenu', { width: 500 })
@@ -243,11 +244,10 @@ const toggleDialog = (/** @type {boolean} */value) => {
243
244
  :key="children.findIndex(c => c === child)"
244
245
  >
245
246
  <v-list-item
246
- v-bind="itemBind(childIndex)"
247
+ v-bind="itemBind(childIndex, vListItemProps)"
247
248
  :draggable="draggable === childIndex"
248
- variant="flat"
249
249
  :style="`border: 1px solid ${itemBorderColor(child, childIndex)}`"
250
- class="pa-1 vjsf-list-item"
250
+ class="vjsf-list-item"
251
251
  >
252
252
  <v-list-item-title
253
253
  v-if="itemTitles?.[childIndex]"
@@ -24,7 +24,8 @@ export default function useDnd (array, callback) {
24
24
 
25
25
  hovered.value = 1
26
26
 
27
- const itemBind = (/** @type {number} */itemIndex) => ({
27
+ const itemBind = (/** @type {number} */itemIndex, /** @type {Record<String, any>} */defaultItemProps) => ({
28
+ ...defaultItemProps,
28
29
  // hover the item
29
30
  onMouseenter: () => {
30
31
  hovered.value = itemIndex
@@ -10,7 +10,7 @@ export default function useDnd<T>(array: T[], callback: () => void): {
10
10
  hovered: import("vue").Ref<number, number>;
11
11
  draggable: import("vue").Ref<number, number>;
12
12
  dragging: import("vue").Ref<number, number>;
13
- itemBind: (itemIndex: number) => {
13
+ itemBind: (itemIndex: number, defaultItemProps: Record<string, any>) => {
14
14
  onMouseenter: () => void;
15
15
  onMouseleave: () => void;
16
16
  onDragstart: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"use-dnd.d.ts","sourceRoot":"","sources":["../../src/composables/use-dnd.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wDAHW,MAAM,IAAI;;;;;;0BAoBU,MAAM;;;;;;;4BAwBJ,MAAM;;;;EAmBtC"}
1
+ {"version":3,"file":"use-dnd.d.ts","sourceRoot":"","sources":["../../src/composables/use-dnd.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wDAHW,MAAM,IAAI;;;;;;0BAoBU,MAAM,oBAA0B,eAAe,GAAG,CAAC;;;;;;;4BAyBjD,MAAM;;;;EAmBtC"}