quasar-ui-danx 0.4.38 → 0.4.41

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.4.38",
3
+ "version": "0.4.41",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -40,20 +40,22 @@
40
40
  @click.stop.prevent="$emit('delete', option)"
41
41
  />
42
42
  </div>
43
- <QSeparator class="bg-slate-400 my-2" />
44
- <div class="px-4 mb-2">
45
- <QBtn
46
- :class="createClass"
47
- :loading="loading"
48
- @click="$emit('create')"
49
- >
50
- <CreateIcon
51
- class="w-3"
52
- :class="createText ? 'mr-2' : ''"
53
- />
54
- {{ createText }}
55
- </QBtn>
56
- </div>
43
+ <template v-if="creatable">
44
+ <QSeparator class="bg-slate-400 my-2" />
45
+ <div class="px-4 mb-2">
46
+ <QBtn
47
+ :class="createClass"
48
+ :loading="loading"
49
+ @click="$emit('create')"
50
+ >
51
+ <CreateIcon
52
+ class="w-3"
53
+ :class="createText ? 'mr-2' : ''"
54
+ />
55
+ {{ createText }}
56
+ </QBtn>
57
+ </div>
58
+ </template>
57
59
  </div>
58
60
  </QMenu>
59
61
  </template>
@@ -73,18 +75,17 @@
73
75
  </template>
74
76
  <template v-else>
75
77
  <slot name="no-selection">
76
- (No selection)
78
+ {{ placeholder }}
77
79
  </slot>
78
80
  </template>
79
81
  </div>
80
82
 
81
-
82
83
  <ShowHideButton
83
84
  v-if="editable && selected"
84
85
  v-model="editing"
85
86
  :label="editText"
86
87
  :class="editClass"
87
- class="ml-1"
88
+ class="opacity-0 group-hover:opacity-100 transition-all"
88
89
  :show-icon="EditIcon"
89
90
  :hide-icon="DoneEditingIcon"
90
91
  />
@@ -125,6 +126,7 @@ withDefaults(defineProps<{
125
126
  createText?: string;
126
127
  editText?: string;
127
128
  clearText?: string;
129
+ placeholder?: string;
128
130
  selectClass?: string;
129
131
  createClass?: string;
130
132
  editClass?: string;
@@ -143,6 +145,7 @@ withDefaults(defineProps<{
143
145
  createText: "",
144
146
  editText: "",
145
147
  clearText: "",
148
+ placeholder: "(No selection)",
146
149
  selectClass: "bg-sky-800",
147
150
  createClass: "bg-green-900",
148
151
  editClass: "",
@@ -28,10 +28,10 @@
28
28
  </div>
29
29
  </template>
30
30
  <script setup lang="ts">
31
- import { DropZoneResolver } from "src/components/DragAndDrop/dragAndDrop";
32
31
  import { computed, watch } from "vue";
33
32
  import { DragHandleDotsIcon as DragHandleIcon } from "../../svg";
34
33
  import { SvgImg } from "../Utility";
34
+ import { DropZoneResolver } from "./dragAndDrop";
35
35
  import { ListDragAndDrop } from "./listDragAndDrop";
36
36
 
37
37
  const emit = defineEmits(["position", "update:list-items", "drop-zone"]);
@@ -343,6 +343,10 @@ export function withDefaultActions(label: string, listController?: ListControlle
343
343
  icon: EditIcon,
344
344
  onAction: (action, target) => listController?.activatePanel(target, "edit")
345
345
  },
346
+ {
347
+ name: "quick-delete",
348
+ alias: "delete"
349
+ },
346
350
  {
347
351
  name: "delete",
348
352
  label: "Delete",