@hostlink/nuxt-light 1.23.1 → 1.23.3

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.23.1",
4
+ "version": "1.23.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -34,10 +34,10 @@ const attrs = computed(() => {
34
34
 
35
35
  </script>
36
36
  <template>
37
- <l-file v-model="value" :label="context.label" v-bind="attrs" :error="error" :error-message="errorMessage"
38
- @blur="onBlur">
37
+ <q-file v-model="value" :label="context.label" v-bind="attrs" :error="error" :error-message="errorMessage"
38
+ @blur="onBlur" hide-bottom-space>
39
39
  <template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
40
40
  <slot :name="name" v-bind="props ?? {}"></slot>
41
41
  </template>
42
- </l-file>
42
+ </q-file>
43
43
  </template>
@@ -1,11 +1,10 @@
1
1
  <script setup>
2
- import { computed } from 'vue'
2
+ import { computed, ref } from 'vue'
3
3
  import { useDragAndDrop, dragAndDrop } from "@formkit/drag-and-drop/vue";
4
4
  import { animations } from "@formkit/drag-and-drop";
5
5
 
6
6
  const props = defineProps({
7
7
  context: Object
8
-
9
8
  });
10
9
 
11
10
  const node = props.context.node;
@@ -67,6 +66,7 @@ const isAllowMoveDown = (index) => {
67
66
  return index < localValue.value.length - 1
68
67
  }
69
68
 
69
+ const cursor = ref('cursor-grab');
70
70
  </script>
71
71
 
72
72
  <style>
@@ -74,20 +74,19 @@ const isAllowMoveDown = (index) => {
74
74
  </style>
75
75
 
76
76
  <template>
77
- <FormKit type="list" v-model="localValue" dynamic #default="{ items, node, value }" :name="node.name">
78
- {{ sortable }}
79
-
77
+ <FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
80
78
  <q-list bordered separator ref="parent">
81
79
  <FormKit type="group" v-for="(item, index) in items" :index="index" :key="item">
82
80
  <q-item class="q-pa-xs">
83
81
  <q-item-section avatar class="">
84
- <div class="l-repeater-handle cursor-grab active:cursor-grabbing" v-if="sortable">
82
+ <div class="l-repeater-handle" v-if="sortable" :class="cursor" @mousedown="cursor = 'cursor-grabbing'"
83
+ @mouseup="cursor = 'cursor-grab'" @mouseleave="cursor = 'cursor-grab'">
85
84
  <q-icon name="sym_o_drag_indicator" :color="$light.color" size="sm" />
86
85
  </div>
87
86
  </q-item-section>
88
87
 
89
- <q-item-section >
90
- <slot v-bind="{ value: localValue[index] }"></slot>
88
+ <q-item-section>
89
+ <slot v-bind="{ value: localValue[index], index: index, node: node }"></slot>
91
90
  </q-item-section>
92
91
 
93
92
  <q-item-section side>
@@ -102,12 +101,8 @@ const isAllowMoveDown = (index) => {
102
101
  :color="$light.color" dense flat :disable="!isAllowMoveDown(index)" />
103
102
 
104
103
  </q-item-section>
105
-
106
-
107
104
  </q-item>
108
-
109
105
  </FormKit>
110
-
111
106
  </q-list>
112
107
  <q-btn @click="onAdd" label="Add" icon="sym_o_add" :color="$light.color" outline />
113
108
  </FormKit>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.23.1",
3
+ "version": "1.23.3",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",