@adminforth/bulk-ai-flow 1.24.2 → 1.24.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/build.log CHANGED
@@ -14,5 +14,5 @@ custom/package.json
14
14
  custom/pnpm-lock.yaml
15
15
  custom/tsconfig.json
16
16
 
17
- sent 111,946 bytes received 191 bytes 224,274.00 bytes/sec
18
- total size is 111,232 speedup is 0.99
17
+ sent 111,955 bytes received 191 bytes 224,292.00 bytes/sec
18
+ total size is 111,251 speedup is 0.99
@@ -16,31 +16,7 @@
16
16
  :closable="false"
17
17
  :askForCloseConfirmation="popupMode === 'generation' ? true : false"
18
18
  :closeConfirmationText="t('Are you sure you want to close without saving?')"
19
- :buttons="popupMode === 'generation' ? [
20
- {
21
- label: checkedCount > 1 ? t('Save fields') : t('Save field'),
22
- options: {
23
- disabled: isLoading || checkedCount < 1 || isFetchingRecords || isProcessingAny || isGenerationPaused,
24
- loader: isLoading, class: 'w-fit'
25
- },
26
- onclick: async (dialog) => { await saveData(); dialog.hide(); }
27
- },
28
- {
29
- label: t('Save current'),
30
- options: {
31
- disabled: isLoading || isSavingCurrent || completedRecordIds.size < 1,
32
- loader: isSavingCurrent, class: 'w-fit'
33
- },
34
- onclick: async () => { await saveCurrentGenerated(); }
35
- },
36
- {
37
- label: t('Cancel'),
38
- options: {
39
- class: 'bg-white hover:!bg-gray-100 !text-gray-900 hover:!text-gray-800 dark:!bg-gray-800 dark:!text-gray-100 dark:hover:!bg-gray-700 !border-gray-200 dark:!border-gray-600'
40
- },
41
- onclick: (dialog) => confirmDialog.tryToHideModal()
42
- },
43
- ] : popupMode === 'settings' ? [
19
+ :buttons="popupMode === 'generation' ? generationModeButtons : popupMode === 'settings' ? [
44
20
  {
45
21
  label: t('Save settings'),
46
22
  options: {
@@ -50,13 +26,6 @@
50
26
  },
51
27
  ] :
52
28
  [
53
- // {
54
- // label: t('Edit prompts'),
55
- // options: {
56
- // class: 'w-fit ml-auto'
57
- // },
58
- // onclick: (dialog) => { clickSettingsButton(); }
59
- // },
60
29
  {
61
30
  label: t('Cancel'),
62
31
  options: {
@@ -105,7 +74,7 @@
105
74
  :aria-valuemax="totalRecords"
106
75
  >
107
76
  <div
108
- class="h-full bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 transition-all duration-200 "
77
+ class="h-full bg-gradient-to-r from-lightPrimary/70 via-lightPrimary/80 to-lightPrimary/90 dark:from-darkPrimary/70 dark:via-darkPrimary/80 dark:to-darkPrimary/90 transition-all duration-200 "
109
78
  :style="{ width: `${displayedProgressPercent}%` }"
110
79
  ></div>
111
80
  <div class="absolute inset-0 flex items-center justify-center text-sm font-medium text-white drop-shadow">
@@ -328,6 +297,40 @@ const recordsList = computed(() => {
328
297
  : recordIds.value;
329
298
  return ids.map(id => getOrCreateRecord(id));
330
299
  });
300
+
301
+ const generationModeButtons = computed(() => {
302
+ const arrayToReturn = [
303
+ {
304
+ label: checkedCount.value > 1 ? t('Save fields') : t('Save field'),
305
+ options: {
306
+ disabled: isLoading.value || checkedCount.value < 1 || isFetchingRecords.value || isProcessingAny.value || isGenerationPaused.value,
307
+ loader: isLoading.value, class: 'w-fit'
308
+ },
309
+ onclick: async (dialog) => { await saveData(); dialog.hide(); }
310
+ },
311
+ {
312
+ label: t('Cancel'),
313
+ options: {
314
+ class: 'bg-white hover:!bg-gray-100 !text-gray-900 hover:!text-gray-800 dark:!bg-gray-800 dark:!text-gray-100 dark:hover:!bg-gray-700 !border-gray-200 dark:!border-gray-600'
315
+ },
316
+ onclick: (dialog) => confirmDialog.value.tryToHideModal()
317
+ },
318
+ ]
319
+
320
+ if (isProcessingAny.value) {
321
+ arrayToReturn.splice(1, 0, {
322
+ label: t('Save processed'),
323
+ options: {
324
+ disabled: isLoading.value || isSavingCurrent.value || completedRecordIds.value.size < 1,
325
+ loader: isSavingCurrent.value, class: 'w-fit'
326
+ },
327
+ onclick: async () => { await saveCurrentGenerated(); }
328
+ })
329
+ }
330
+ return arrayToReturn;
331
+ });
332
+
333
+
331
334
  const isSavingCurrent = ref(false);
332
335
  function checkIfDialogOpen() {
333
336
  return isDialogOpen.value === true;
@@ -16,31 +16,7 @@
16
16
  :closable="false"
17
17
  :askForCloseConfirmation="popupMode === 'generation' ? true : false"
18
18
  :closeConfirmationText="t('Are you sure you want to close without saving?')"
19
- :buttons="popupMode === 'generation' ? [
20
- {
21
- label: checkedCount > 1 ? t('Save fields') : t('Save field'),
22
- options: {
23
- disabled: isLoading || checkedCount < 1 || isFetchingRecords || isProcessingAny || isGenerationPaused,
24
- loader: isLoading, class: 'w-fit'
25
- },
26
- onclick: async (dialog) => { await saveData(); dialog.hide(); }
27
- },
28
- {
29
- label: t('Save current'),
30
- options: {
31
- disabled: isLoading || isSavingCurrent || completedRecordIds.size < 1,
32
- loader: isSavingCurrent, class: 'w-fit'
33
- },
34
- onclick: async () => { await saveCurrentGenerated(); }
35
- },
36
- {
37
- label: t('Cancel'),
38
- options: {
39
- class: 'bg-white hover:!bg-gray-100 !text-gray-900 hover:!text-gray-800 dark:!bg-gray-800 dark:!text-gray-100 dark:hover:!bg-gray-700 !border-gray-200 dark:!border-gray-600'
40
- },
41
- onclick: (dialog) => confirmDialog.tryToHideModal()
42
- },
43
- ] : popupMode === 'settings' ? [
19
+ :buttons="popupMode === 'generation' ? generationModeButtons : popupMode === 'settings' ? [
44
20
  {
45
21
  label: t('Save settings'),
46
22
  options: {
@@ -50,13 +26,6 @@
50
26
  },
51
27
  ] :
52
28
  [
53
- // {
54
- // label: t('Edit prompts'),
55
- // options: {
56
- // class: 'w-fit ml-auto'
57
- // },
58
- // onclick: (dialog) => { clickSettingsButton(); }
59
- // },
60
29
  {
61
30
  label: t('Cancel'),
62
31
  options: {
@@ -105,7 +74,7 @@
105
74
  :aria-valuemax="totalRecords"
106
75
  >
107
76
  <div
108
- class="h-full bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 transition-all duration-200 "
77
+ class="h-full bg-gradient-to-r from-lightPrimary/70 via-lightPrimary/80 to-lightPrimary/90 dark:from-darkPrimary/70 dark:via-darkPrimary/80 dark:to-darkPrimary/90 transition-all duration-200 "
109
78
  :style="{ width: `${displayedProgressPercent}%` }"
110
79
  ></div>
111
80
  <div class="absolute inset-0 flex items-center justify-center text-sm font-medium text-white drop-shadow">
@@ -328,6 +297,40 @@ const recordsList = computed(() => {
328
297
  : recordIds.value;
329
298
  return ids.map(id => getOrCreateRecord(id));
330
299
  });
300
+
301
+ const generationModeButtons = computed(() => {
302
+ const arrayToReturn = [
303
+ {
304
+ label: checkedCount.value > 1 ? t('Save fields') : t('Save field'),
305
+ options: {
306
+ disabled: isLoading.value || checkedCount.value < 1 || isFetchingRecords.value || isProcessingAny.value || isGenerationPaused.value,
307
+ loader: isLoading.value, class: 'w-fit'
308
+ },
309
+ onclick: async (dialog) => { await saveData(); dialog.hide(); }
310
+ },
311
+ {
312
+ label: t('Cancel'),
313
+ options: {
314
+ class: 'bg-white hover:!bg-gray-100 !text-gray-900 hover:!text-gray-800 dark:!bg-gray-800 dark:!text-gray-100 dark:hover:!bg-gray-700 !border-gray-200 dark:!border-gray-600'
315
+ },
316
+ onclick: (dialog) => confirmDialog.value.tryToHideModal()
317
+ },
318
+ ]
319
+
320
+ if (isProcessingAny.value) {
321
+ arrayToReturn.splice(1, 0, {
322
+ label: t('Save processed'),
323
+ options: {
324
+ disabled: isLoading.value || isSavingCurrent.value || completedRecordIds.value.size < 1,
325
+ loader: isSavingCurrent.value, class: 'w-fit'
326
+ },
327
+ onclick: async () => { await saveCurrentGenerated(); }
328
+ })
329
+ }
330
+ return arrayToReturn;
331
+ });
332
+
333
+
331
334
  const isSavingCurrent = ref(false);
332
335
  function checkIfDialogOpen() {
333
336
  return isDialogOpen.value === true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.24.2",
3
+ "version": "1.24.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },