@adminforth/import-export 1.4.0 → 1.4.2

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.
@@ -15,8 +15,6 @@ steps:
15
15
  from_secret: VAULT_TOKEN
16
16
  commands:
17
17
  - infisical export --domain https://vault.devforth.io/api --format=dotenv-export --env="prod" > /woodpecker/deploy.vault.env
18
- secrets:
19
- - VAULT_TOKEN
20
18
 
21
19
  release:
22
20
  image: node:20
package/build.log CHANGED
@@ -10,5 +10,5 @@ custom/package-lock.json
10
10
  custom/package.json
11
11
  custom/tsconfig.json
12
12
 
13
- sent 16,715 bytes received 115 bytes 33,660.00 bytes/sec
14
- total size is 16,295 speedup is 0.97
13
+ sent 16,789 bytes received 115 bytes 33,808.00 bytes/sec
14
+ total size is 16,369 speedup is 0.97
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div @click="exportCsv" class="cursor-pointer flex gap-2 items-center">
2
+ <div class="cursor-pointer flex gap-2 items-center">
3
3
  {{$t("Export")}} {{ meta.select === 'all' ? $t('All'): $t('Filtered') }} {{$t('to CSV')}}
4
4
 
5
5
  <svg v-if="inProgress"
@@ -19,6 +19,10 @@ const filtersStore = useFiltersStore();
19
19
  const coreStore = useCoreStore();
20
20
  const inProgress = ref(false);
21
21
 
22
+ defineExpose({
23
+ click,
24
+ });
25
+
22
26
  const props = defineProps({
23
27
  meta: Object,
24
28
  record: Object,
@@ -77,4 +81,8 @@ async function exportCsv() {
77
81
  adminforth.list.closeThreeDotsDropdown();
78
82
  }
79
83
  }
84
+
85
+ function click() {
86
+ exportCsv();
87
+ }
80
88
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div @click="handleImportClick"
2
+ <div
3
3
  :class="[
4
4
  'cursor-pointer flex gap-2 items-center',
5
5
  checkProgress ? 'opacity-50 pointer-events-none' : ''
@@ -53,7 +53,11 @@ import Papa from 'papaparse';
53
53
  import { Dialog } from '@/afcl';
54
54
  import { useI18n } from 'vue-i18n';
55
55
 
56
+
56
57
  const { t } = useI18n();
58
+ defineExpose({
59
+ click,
60
+ });
57
61
 
58
62
  const importProgress: Ref<boolean> = ref(false);
59
63
  const checkProgress: Ref<boolean> = ref(false);
@@ -70,9 +74,9 @@ const computedButtons = computed(() => {
70
74
  const buttons = [
71
75
  { label: t('⚠️ Import All — Replace & Overwrite'), onclick: (dialog) => { confirmImport(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
72
76
  { label: t('⚠️ Replace Existing Records'), onclick: (dialog) => { confirmImport(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount === 0 },
73
- { label: t('Import New Only'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
74
- { label: t('Import Records'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount === 0 && importStats.value.newCount > 0 },
75
- { label: t('Cancel'), onclick: (dialog) => dialog.hide() }
77
+ { label: t('Import New Only'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
78
+ { label: t('Import Records'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount === 0 && importStats.value.newCount > 0 },
79
+ { label: t('Cancel'), onclick: (dialog) => dialog.hide() }
76
80
  ];
77
81
 
78
82
  return buttons.filter(button => button.visible !== false);
@@ -216,4 +220,8 @@ function handleImportClick() {
216
220
  importCsv();
217
221
  }
218
222
  }
223
+
224
+ function click() {
225
+ importCsv();
226
+ }
219
227
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div @click="exportCsv" class="cursor-pointer flex gap-2 items-center">
2
+ <div class="cursor-pointer flex gap-2 items-center">
3
3
  {{$t("Export")}} {{ meta.select === 'all' ? $t('All'): $t('Filtered') }} {{$t('to CSV')}}
4
4
 
5
5
  <svg v-if="inProgress"
@@ -19,6 +19,10 @@ const filtersStore = useFiltersStore();
19
19
  const coreStore = useCoreStore();
20
20
  const inProgress = ref(false);
21
21
 
22
+ defineExpose({
23
+ click,
24
+ });
25
+
22
26
  const props = defineProps({
23
27
  meta: Object,
24
28
  record: Object,
@@ -77,4 +81,8 @@ async function exportCsv() {
77
81
  adminforth.list.closeThreeDotsDropdown();
78
82
  }
79
83
  }
84
+
85
+ function click() {
86
+ exportCsv();
87
+ }
80
88
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div @click="handleImportClick"
2
+ <div
3
3
  :class="[
4
4
  'cursor-pointer flex gap-2 items-center',
5
5
  checkProgress ? 'opacity-50 pointer-events-none' : ''
@@ -53,7 +53,11 @@ import Papa from 'papaparse';
53
53
  import { Dialog } from '@/afcl';
54
54
  import { useI18n } from 'vue-i18n';
55
55
 
56
+
56
57
  const { t } = useI18n();
58
+ defineExpose({
59
+ click,
60
+ });
57
61
 
58
62
  const importProgress: Ref<boolean> = ref(false);
59
63
  const checkProgress: Ref<boolean> = ref(false);
@@ -70,9 +74,9 @@ const computedButtons = computed(() => {
70
74
  const buttons = [
71
75
  { label: t('⚠️ Import All — Replace & Overwrite'), onclick: (dialog) => { confirmImport(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
72
76
  { label: t('⚠️ Replace Existing Records'), onclick: (dialog) => { confirmImport(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount === 0 },
73
- { label: t('Import New Only'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
74
- { label: t('Import Records'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount === 0 && importStats.value.newCount > 0 },
75
- { label: t('Cancel'), onclick: (dialog) => dialog.hide() }
77
+ { label: t('Import New Only'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount > 0 && importStats.value.newCount > 0 },
78
+ { label: t('Import Records'), onclick: (dialog) => { confirmImportNewOnly(dialog) }, visible: importStats.value.existingCount === 0 && importStats.value.newCount > 0 },
79
+ { label: t('Cancel'), onclick: (dialog) => dialog.hide() }
76
80
  ];
77
81
 
78
82
  return buttons.filter(button => button.visible !== false);
@@ -216,4 +220,8 @@ function handleImportClick() {
216
220
  importCsv();
217
221
  }
218
222
  }
223
+
224
+ function click() {
225
+ importCsv();
226
+ }
219
227
  </script>
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@adminforth/import-export",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
7
10
  "homepage": "https://adminforth.dev/docs/tutorial/Plugins/import-export/",
8
11
  "scripts": {
9
12
  "build": "tsc && rsync -av --exclude 'node_modules' custom dist/",