@adminforth/bulk-ai-flow 1.13.0 → 1.14.0

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/build.log CHANGED
@@ -13,5 +13,5 @@ custom/package-lock.json
13
13
  custom/package.json
14
14
  custom/tsconfig.json
15
15
 
16
- sent 73,072 bytes received 172 bytes 146,488.00 bytes/sec
17
- total size is 72,431 speedup is 0.99
16
+ sent 74,113 bytes received 172 bytes 148,570.00 bytes/sec
17
+ total size is 73,472 speedup is 0.99
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <!-- Popup Overlay -->
3
3
  <div class="fixed inset-0 z-40 flex items-center justify-center bg-black/50" @click.self="closePopup">
4
- <div class="image-compare-container max-w-4xl max-h-[90vh] overflow-y-auto">
4
+ <div class="image-compare-container max-w-4xl max-h-[90vh] overflow-y-auto rounded-lg">
5
5
  <!-- Close Button -->
6
6
  <div class="flex justify-end mb-4">
7
7
  <button type="button"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="flex items-end justify-start gap-2 cursor-pointer" @click="openDialog">
2
+ <div class="flex items-end justify-start gap-2 cursor-pointer">
3
3
  <div class="flex items-center justify-center text-white bg-gradient-to-r h-[18px] from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-purple-300 dark:focus:ring-purple-800 font-medium rounded-md text-sm px-1 text-center">
4
4
  AI
5
5
  </div>
@@ -78,6 +78,10 @@ const props = defineProps<{
78
78
  }
79
79
  }>();
80
80
 
81
+ defineExpose({
82
+ click
83
+ });
84
+
81
85
  const confirmDialog = ref(null);
82
86
  const records = ref<any[]>([]);
83
87
  const images = ref<any[]>([]);
@@ -745,4 +749,8 @@ async function findPreviewURLForImages() {
745
749
  }
746
750
  }
747
751
 
752
+ function click() {
753
+ openDialog();
754
+ }
755
+
748
756
  </script>
@@ -54,7 +54,7 @@
54
54
  </template>
55
55
  <!-- CUSTOM FIELD TEMPLATES -->
56
56
  <template v-for="n in customFieldNames" :key="n" #[`cell:${n}`]="{ item, column }">
57
- <div v-if="isAiResponseReceivedAnalize[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])] && !isInColumnImage(n)">
57
+ <div v-if="isAiResponseReceivedAnalize[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])] && !isInColumnImage(n)" @mouseenter="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true})" @mouseleave="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = false})">
58
58
  <div v-if="isInColumnEnum(n)" class="flex flex-col items-start justify-end min-h-[90px]">
59
59
  <Select
60
60
  class="min-w-[150px]"
@@ -65,9 +65,8 @@
65
65
  >
66
66
  </Select>
67
67
  <Tooltip>
68
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
69
- <p class="text-sm ">original</p>
70
- <IconScaleBalancedOutline />
68
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
69
+ <p class="text-sm ">old value</p>
71
70
  </div>
72
71
  <template #tooltip>
73
72
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -82,9 +81,8 @@
82
81
  >
83
82
  </Textarea>
84
83
  <Tooltip>
85
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
86
- <p class="text-sm ">original</p>
87
- <IconScaleBalancedOutline />
84
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
85
+ <p class="text-sm ">old value</p>
88
86
  </div>
89
87
  <template #tooltip>
90
88
  <p class="max-w-[200px]">{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}</p>
@@ -98,9 +96,8 @@
98
96
  >
99
97
  </Toggle>
100
98
  <Tooltip>
101
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
102
- <p class="text-sm ">original</p>
103
- <IconScaleBalancedOutline />
99
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
100
+ <p class="text-sm ">old value</p>
104
101
  </div>
105
102
  <template #tooltip>
106
103
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -115,9 +112,8 @@
115
112
  :fullWidth="true"
116
113
  />
117
114
  <Tooltip>
118
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
119
- <p class="text-sm ">original</p>
120
- <IconScaleBalancedOutline />
115
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
116
+ <p class="text-sm ">old value</p>
121
117
  </div>
122
118
  <template #tooltip>
123
119
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -126,7 +122,7 @@
126
122
  </div>
127
123
  </div>
128
124
 
129
- <div v-if="isAiResponseReceivedImage[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])]">
125
+ <div v-if="isAiResponseReceivedImage[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])]" @mouseenter="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true})" @mouseleave="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = false})">
130
126
  <div v-if="isInColumnImage(n)">
131
127
  <div class="mt-2 flex items-center justify-start gap-2">
132
128
  <div v-if="isValidUrl(selected[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n])" class="flex flex-col items-center">
@@ -138,10 +134,10 @@
138
134
  <p
139
135
  v-if="isImageHasPreviewUrl[n]"
140
136
  class="mt-2 text-sm hover:text-blue-500 hover:underline hover:cursor-pointer flex items-center gap-1"
137
+ :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }"
141
138
  @click="() => {openImageCompare[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true}"
142
139
  >
143
140
  old image
144
- <IconScaleBalancedOutline />
145
141
  </p>
146
142
  </div>
147
143
  <div v-else class="flex items-center justify-center text-center w-20 h-20">
@@ -206,11 +202,11 @@
206
202
  </template>
207
203
 
208
204
  <script lang="ts" setup>
209
- import { ref } from 'vue'
205
+ import { ref, watch } from 'vue'
210
206
  import { Select, Input, Textarea, Table, Checkbox, Skeleton, Toggle, Tooltip } from '@/afcl'
211
207
  import GenerationCarousel from './ImageGenerationCarousel.vue'
212
208
  import ImageCompare from './ImageCompare.vue';
213
- import { IconRefreshOutline, IconScaleBalancedOutline } from '@iconify-prerendered/vue-flowbite';
209
+ import { IconRefreshOutline } from '@iconify-prerendered/vue-flowbite';
214
210
 
215
211
  const props = defineProps<{
216
212
  meta: any,
@@ -240,7 +236,13 @@ const emit = defineEmits(['error', 'regenerateImages']);
240
236
 
241
237
 
242
238
  const zoomedImage = ref(null);
239
+ const hovers = ref<{ [key: string]: boolean }[]>([]);
243
240
 
241
+ watch(() => props.tableColumnsIndexes, (newVal) => {
242
+ if (newVal) {
243
+ hovers.value = newVal.map(() => ({}));
244
+ }
245
+ }, { immediate: true });
244
246
 
245
247
  function zoomImage(img) {
246
248
  zoomedImage.value = img
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <!-- Popup Overlay -->
3
3
  <div class="fixed inset-0 z-40 flex items-center justify-center bg-black/50" @click.self="closePopup">
4
- <div class="image-compare-container max-w-4xl max-h-[90vh] overflow-y-auto">
4
+ <div class="image-compare-container max-w-4xl max-h-[90vh] overflow-y-auto rounded-lg">
5
5
  <!-- Close Button -->
6
6
  <div class="flex justify-end mb-4">
7
7
  <button type="button"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="flex items-end justify-start gap-2 cursor-pointer" @click="openDialog">
2
+ <div class="flex items-end justify-start gap-2 cursor-pointer">
3
3
  <div class="flex items-center justify-center text-white bg-gradient-to-r h-[18px] from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-purple-300 dark:focus:ring-purple-800 font-medium rounded-md text-sm px-1 text-center">
4
4
  AI
5
5
  </div>
@@ -78,6 +78,10 @@ const props = defineProps<{
78
78
  }
79
79
  }>();
80
80
 
81
+ defineExpose({
82
+ click
83
+ });
84
+
81
85
  const confirmDialog = ref(null);
82
86
  const records = ref<any[]>([]);
83
87
  const images = ref<any[]>([]);
@@ -745,4 +749,8 @@ async function findPreviewURLForImages() {
745
749
  }
746
750
  }
747
751
 
752
+ function click() {
753
+ openDialog();
754
+ }
755
+
748
756
  </script>
@@ -54,7 +54,7 @@
54
54
  </template>
55
55
  <!-- CUSTOM FIELD TEMPLATES -->
56
56
  <template v-for="n in customFieldNames" :key="n" #[`cell:${n}`]="{ item, column }">
57
- <div v-if="isAiResponseReceivedAnalize[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])] && !isInColumnImage(n)">
57
+ <div v-if="isAiResponseReceivedAnalize[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])] && !isInColumnImage(n)" @mouseenter="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true})" @mouseleave="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = false})">
58
58
  <div v-if="isInColumnEnum(n)" class="flex flex-col items-start justify-end min-h-[90px]">
59
59
  <Select
60
60
  class="min-w-[150px]"
@@ -65,9 +65,8 @@
65
65
  >
66
66
  </Select>
67
67
  <Tooltip>
68
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
69
- <p class="text-sm ">original</p>
70
- <IconScaleBalancedOutline />
68
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
69
+ <p class="text-sm ">old value</p>
71
70
  </div>
72
71
  <template #tooltip>
73
72
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -82,9 +81,8 @@
82
81
  >
83
82
  </Textarea>
84
83
  <Tooltip>
85
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
86
- <p class="text-sm ">original</p>
87
- <IconScaleBalancedOutline />
84
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
85
+ <p class="text-sm ">old value</p>
88
86
  </div>
89
87
  <template #tooltip>
90
88
  <p class="max-w-[200px]">{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}</p>
@@ -98,9 +96,8 @@
98
96
  >
99
97
  </Toggle>
100
98
  <Tooltip>
101
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
102
- <p class="text-sm ">original</p>
103
- <IconScaleBalancedOutline />
99
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
100
+ <p class="text-sm ">old value</p>
104
101
  </div>
105
102
  <template #tooltip>
106
103
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -115,9 +112,8 @@
115
112
  :fullWidth="true"
116
113
  />
117
114
  <Tooltip>
118
- <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500">
119
- <p class="text-sm ">original</p>
120
- <IconScaleBalancedOutline />
115
+ <div class="mt-2 flex items-center justify-start gap-1 hover:text-blue-500" :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }">
116
+ <p class="text-sm ">old value</p>
121
117
  </div>
122
118
  <template #tooltip>
123
119
  {{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
@@ -126,7 +122,7 @@
126
122
  </div>
127
123
  </div>
128
124
 
129
- <div v-if="isAiResponseReceivedImage[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])]">
125
+ <div v-if="isAiResponseReceivedImage[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])]" @mouseenter="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true})" @mouseleave="(() => { hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = false})">
130
126
  <div v-if="isInColumnImage(n)">
131
127
  <div class="mt-2 flex items-center justify-start gap-2">
132
128
  <div v-if="isValidUrl(selected[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n])" class="flex flex-col items-center">
@@ -138,10 +134,10 @@
138
134
  <p
139
135
  v-if="isImageHasPreviewUrl[n]"
140
136
  class="mt-2 text-sm hover:text-blue-500 hover:underline hover:cursor-pointer flex items-center gap-1"
137
+ :class="{ 'opacity-0': !hovers[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }"
141
138
  @click="() => {openImageCompare[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] = true}"
142
139
  >
143
140
  old image
144
- <IconScaleBalancedOutline />
145
141
  </p>
146
142
  </div>
147
143
  <div v-else class="flex items-center justify-center text-center w-20 h-20">
@@ -206,11 +202,11 @@
206
202
  </template>
207
203
 
208
204
  <script lang="ts" setup>
209
- import { ref } from 'vue'
205
+ import { ref, watch } from 'vue'
210
206
  import { Select, Input, Textarea, Table, Checkbox, Skeleton, Toggle, Tooltip } from '@/afcl'
211
207
  import GenerationCarousel from './ImageGenerationCarousel.vue'
212
208
  import ImageCompare from './ImageCompare.vue';
213
- import { IconRefreshOutline, IconScaleBalancedOutline } from '@iconify-prerendered/vue-flowbite';
209
+ import { IconRefreshOutline } from '@iconify-prerendered/vue-flowbite';
214
210
 
215
211
  const props = defineProps<{
216
212
  meta: any,
@@ -240,7 +236,13 @@ const emit = defineEmits(['error', 'regenerateImages']);
240
236
 
241
237
 
242
238
  const zoomedImage = ref(null);
239
+ const hovers = ref<{ [key: string]: boolean }[]>([]);
243
240
 
241
+ watch(() => props.tableColumnsIndexes, (newVal) => {
242
+ if (newVal) {
243
+ hovers.value = newVal.map(() => ({}));
244
+ }
245
+ }, { immediate: true });
244
246
 
245
247
  function zoomImage(img) {
246
248
  zoomedImage.value = img
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,17 +10,48 @@
10
10
  "scripts": {
11
11
  "build": "tsc && rsync -av --exclude 'node_modules' custom dist/"
12
12
  },
13
- "keywords": [],
13
+ "keywords": [
14
+ "adminforth",
15
+ "bulk",
16
+ "ai",
17
+ "flow"
18
+ ],
14
19
  "author": "",
15
20
  "license": "ISC",
16
21
  "description": "",
17
22
  "devDependencies": {
18
23
  "@types/node": "latest",
24
+ "semantic-release": "^24.2.1",
25
+ "semantic-release-slack-bot": "^4.0.2",
19
26
  "typescript": "^5.7.3"
20
27
  },
21
28
  "dependencies": {
22
29
  "@types/handlebars": "^4.0.40",
23
- "adminforth": "^2.4.0-next.112",
30
+ "adminforth": "^2.4.0-next.127",
24
31
  "handlebars": "^4.7.8"
32
+ },
33
+ "release": {
34
+ "plugins": [
35
+ "@semantic-release/commit-analyzer",
36
+ "@semantic-release/release-notes-generator",
37
+ "@semantic-release/npm",
38
+ "@semantic-release/github",
39
+ [
40
+ "semantic-release-slack-bot",
41
+ {
42
+ "notifyOnSuccess": true,
43
+ "notifyOnFail": true,
44
+ "slackIcon": ":package:",
45
+ "markdownReleaseNotes": true
46
+ }
47
+ ]
48
+ ],
49
+ "branches": [
50
+ "main",
51
+ {
52
+ "name": "next",
53
+ "prerelease": true
54
+ }
55
+ ]
25
56
  }
26
57
  }