adminforth 1.5.5-next.4 → 1.5.5-next.6

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.
@@ -50,11 +50,13 @@
50
50
  import { humanifySize } from '@/utils';
51
51
  import { ref } from 'vue';
52
52
  import { IconFileSolid } from '@iconify-prerendered/vue-flowbite';
53
+ import { watch } from 'vue';
53
54
 
54
55
  const props = defineProps<{
55
56
  extensions: string[],
56
57
  maxSizeBytes: number,
57
58
  multiple: boolean,
59
+ modelValue: FileList,
58
60
  }>();
59
61
 
60
62
  const emit = defineEmits(['update:modelValue']);
@@ -67,6 +69,14 @@ const selectedFiles: Ref<{
67
69
  mime: string,
68
70
  }[]> = ref([]);
69
71
 
72
+ watch(() => props.modelValue, (files) => {
73
+ selectedFiles.value = Array.from(files).map(file => ({
74
+ name: file.name,
75
+ size: file.size,
76
+ mime: file.type,
77
+ }));
78
+ });
79
+
70
80
  function doEmit(filesIn: FileList) {
71
81
 
72
82
  const multiple = props.multiple || false;
@@ -81,8 +91,9 @@ function doEmit(filesIn: FileList) {
81
91
  mime: file.type,
82
92
  }));
83
93
 
84
- emit('select', Array.from(files));
94
+ emit('update:modelValue', Array.from(files));
85
95
  }
86
96
 
87
97
  const dragging = ref(false);
98
+
88
99
  </script>
@@ -449,7 +449,6 @@ async function deleteRecord(row) {
449
449
  primaryKey: row._primaryKeyValue,
450
450
  }
451
451
  });
452
- console.log('safsa', res)
453
452
  if (!res.error){
454
453
  emits('update:records', true)
455
454
  showSuccesTost('Record deleted successfully')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.5.5-next.4",
3
+ "version": "1.5.5-next.6",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -22,8 +22,8 @@
22
22
  "rollout-next": "npm run build && npm version prerelease --preid=next && npm publish --tag next && npm run put-git-tag",
23
23
  "rollout-doc": "cd documentation && npm run build && npm run deploy",
24
24
  "docs": "typedoc",
25
- "--comment_postinstall": "postinstall executed after package installed in other project package",
26
- "postinstall": "cd ./dist/spa/ && npm ci && echo 'installed spa dependencies'",
25
+ "--comment_postinstall": "postinstall executed after package installed in other project package and when we do npm ci in the package",
26
+ "postinstall": "if test -d ./dist/spa/; then cd ./dist/spa/ && npm ci && echo 'installed spa dependencies'; fi",
27
27
  "ci-plugins": "for d in plugins/*; do cd $d && npm ci && cd ../..; done"
28
28
  },
29
29
  "exports": {
@@ -39,7 +39,6 @@
39
39
  "@clickhouse/client": "^1.4.0",
40
40
  "@faker-js/faker": "^9.0.3",
41
41
  "@types/express": "^5.0.0",
42
- "adminforth": "^1.5.5-next.3",
43
42
  "better-sqlite3": "^11.5.0",
44
43
  "dayjs": "^1.11.11",
45
44
  "dotenv": "^16.4.5",