@budibase/bbui 1.0.185-alpha.0 → 1.0.185-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.0.185-alpha.
|
|
4
|
+
"version": "1.0.185-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.0.185-alpha.
|
|
41
|
+
"@budibase/string-templates": "^1.0.185-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",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"svelte-flatpickr": "^3.2.3",
|
|
85
85
|
"svelte-portal": "^1.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "3aea483b70cdb07e5d757310fcaca1526b0ae842"
|
|
88
88
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
export let fileSizeLimit = BYTES_IN_MB * 20
|
|
19
19
|
export let processFiles = null
|
|
20
20
|
export let handleFileTooLarge = null
|
|
21
|
+
export let handleTooManyFiles = null
|
|
21
22
|
export let gallery = true
|
|
22
23
|
export let error = null
|
|
23
24
|
export let fileTags = []
|
|
@@ -71,6 +72,13 @@
|
|
|
71
72
|
handleFileTooLarge(fileSizeLimit, value)
|
|
72
73
|
return
|
|
73
74
|
}
|
|
75
|
+
|
|
76
|
+
const fileCount = fileList.length + value.length
|
|
77
|
+
if (handleTooManyFiles && maximum && fileCount > maximum) {
|
|
78
|
+
handleTooManyFiles(maximum)
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
if (processFiles) {
|
|
75
83
|
const processedFiles = await processFiles(fileList)
|
|
76
84
|
const newValue = [...value, ...processedFiles]
|
package/src/Form/Dropzone.svelte
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
export let fileSizeLimit = undefined
|
|
12
12
|
export let processFiles = undefined
|
|
13
13
|
export let handleFileTooLarge = undefined
|
|
14
|
+
export let handleTooManyFiles = undefined
|
|
14
15
|
export let gallery = true
|
|
15
16
|
export let fileTags = []
|
|
16
17
|
export let maximum = undefined
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
{fileSizeLimit}
|
|
31
32
|
{processFiles}
|
|
32
33
|
{handleFileTooLarge}
|
|
34
|
+
{handleTooManyFiles}
|
|
33
35
|
{gallery}
|
|
34
36
|
{fileTags}
|
|
35
37
|
{maximum}
|