@geode/opengeodeweb-front 10.27.0-rc.4 → 10.27.0-rc.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.
@@ -1,5 +1,8 @@
1
1
  <script setup>
2
2
  import { middleTruncate } from "@ogw_front/utils/string";
3
+ import { useFeedbackStore } from "@ogw_front/stores/feedback";
4
+
5
+ const feedbackStore = useFeedbackStore();
3
6
 
4
7
  const { item, isLeaf } = defineProps({
5
8
  item: { type: Object, required: true },
@@ -47,6 +50,11 @@ const tooltipDisabled = computed(() => {
47
50
  }
48
51
  return actualItem.value.children && actualItem.value.children.length > 0;
49
52
  });
53
+
54
+ async function copyToClipboard(text, label) {
55
+ await navigator.clipboard.writeText(text);
56
+ feedbackStore.add_success(`${label} copied to clipboard`);
57
+ }
50
58
  </script>
51
59
 
52
60
  <template>
@@ -55,7 +63,13 @@ const tooltipDisabled = computed(() => {
55
63
  :data-testid="'treeRow-' + actualItem.id"
56
64
  class="tree-item-label-container w-100"
57
65
  >
58
- <v-tooltip :disabled="tooltipDisabled" location="right" open-delay="400">
66
+ <v-tooltip
67
+ :disabled="tooltipDisabled"
68
+ location="right"
69
+ open-delay="400"
70
+ close-delay="100"
71
+ interactive
72
+ >
59
73
  <template #activator="{ props: tooltipProps }">
60
74
  <span
61
75
  v-bind="tooltipProps"
@@ -70,14 +84,32 @@ const tooltipDisabled = computed(() => {
70
84
  </template>
71
85
 
72
86
  <div class="d-flex flex-column ga-1">
73
- <span class="text-caption">
74
- <strong class="text-white">ID:</strong> {{ actualItem.id }}
87
+ <span class="text-caption d-flex align-center">
88
+ <strong class="text-white mr-1">ID:</strong>
89
+ <span>{{ actualItem.id }}</span>
90
+ <v-btn
91
+ icon="mdi-content-copy"
92
+ variant="text"
93
+ size="x-small"
94
+ density="compact"
95
+ class="ml-1 text-white"
96
+ @click.stop="copyToClipboard(actualItem.id, 'ID')"
97
+ />
75
98
  </span>
76
- <span v-if="actualItem.title" class="text-caption">
77
- <strong class="text-white">Name:</strong> {{ actualItem.title }}
99
+ <span v-if="actualItem.title" class="text-caption d-flex align-center">
100
+ <strong class="text-white mr-1">Name:</strong>
101
+ <span>{{ actualItem.title }}</span>
102
+ <v-btn
103
+ icon="mdi-content-copy"
104
+ variant="text"
105
+ size="x-small"
106
+ density="compact"
107
+ class="ml-1 text-white"
108
+ @click.stop="copyToClipboard(actualItem.title, 'Name')"
109
+ />
78
110
  </span>
79
- <span class="text-caption">
80
- <strong class="text-white">Status:</strong>
111
+ <span class="text-caption d-flex align-center">
112
+ <strong class="text-white mr-1">Status:</strong>
81
113
  <i class="ml-1">{{ actualItem.is_active ? "Active" : "Inactive" }}</i>
82
114
  </span>
83
115
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.27.0-rc.4",
3
+ "version": "10.27.0-rc.5",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {