@budibase/bbui 1.2.41-alpha.2 → 1.2.41-alpha.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "1.2.41-alpha.
|
|
4
|
+
"version": "1.2.41-alpha.3",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
|
41
|
-
"@budibase/string-templates": "1.2.41-alpha.
|
|
41
|
+
"@budibase/string-templates": "1.2.41-alpha.3",
|
|
42
42
|
"@spectrum-css/actionbutton": "^1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "^1.0.1",
|
|
44
44
|
"@spectrum-css/avatar": "^3.0.2",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"svelte-flatpickr": "^3.2.3",
|
|
86
86
|
"svelte-portal": "^1.0.0"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "38effd9d3f14c8c53ac4846edef46f8448d4b5b4"
|
|
89
89
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
export let disabled = false
|
|
18
18
|
export let fileSizeLimit = BYTES_IN_MB * 20
|
|
19
19
|
export let processFiles = null
|
|
20
|
+
export let deleteAttachments = null
|
|
20
21
|
export let handleFileTooLarge = null
|
|
21
22
|
export let handleTooManyFiles = null
|
|
22
23
|
export let gallery = true
|
|
@@ -94,6 +95,11 @@
|
|
|
94
95
|
"change",
|
|
95
96
|
value.filter((x, idx) => idx !== selectedImageIdx)
|
|
96
97
|
)
|
|
98
|
+
if (deleteAttachments) {
|
|
99
|
+
await deleteAttachments(
|
|
100
|
+
value.filter((x, idx) => idx === selectedImageIdx).map(item => item.key)
|
|
101
|
+
)
|
|
102
|
+
}
|
|
97
103
|
selectedImageIdx = 0
|
|
98
104
|
}
|
|
99
105
|
|
package/src/Form/Dropzone.svelte
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export let error = null
|
|
11
11
|
export let fileSizeLimit = undefined
|
|
12
12
|
export let processFiles = undefined
|
|
13
|
+
export let deleteAttachments = undefined
|
|
13
14
|
export let handleFileTooLarge = undefined
|
|
14
15
|
export let handleTooManyFiles = undefined
|
|
15
16
|
export let gallery = true
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
{value}
|
|
31
32
|
{fileSizeLimit}
|
|
32
33
|
{processFiles}
|
|
34
|
+
{deleteAttachments}
|
|
33
35
|
{handleFileTooLarge}
|
|
34
36
|
{handleTooManyFiles}
|
|
35
37
|
{gallery}
|