@vaadin/upload 23.3.0-alpha2 → 24.0.0-alpha1
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 +9 -9
- package/src/vaadin-upload.js +5 -2
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/button": "
|
|
40
|
-
"@vaadin/component-base": "
|
|
41
|
-
"@vaadin/progress-bar": "
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
43
|
-
"@vaadin/vaadin-material-styles": "
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
39
|
+
"@vaadin/button": "24.0.0-alpha1",
|
|
40
|
+
"@vaadin/component-base": "24.0.0-alpha1",
|
|
41
|
+
"@vaadin/progress-bar": "24.0.0-alpha1",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha1",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/form-layout": "
|
|
48
|
+
"@vaadin/form-layout": "24.0.0-alpha1",
|
|
49
49
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
50
50
|
"sinon": "^13.0.2"
|
|
51
51
|
},
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"web-types.json",
|
|
54
54
|
"web-types.lit.json"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
|
|
57
57
|
}
|
package/src/vaadin-upload.js
CHANGED
|
@@ -99,7 +99,7 @@ class Upload extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
99
99
|
<slot name="drop-label-icon">
|
|
100
100
|
<div part="drop-label-icon"></div>
|
|
101
101
|
</slot>
|
|
102
|
-
<slot name="drop-label" id="dropLabel"> [[_i18nPlural(maxFiles, i18n.dropFiles, i18n.dropFiles.*)]]
|
|
102
|
+
<slot name="drop-label" id="dropLabel"> [[_i18nPlural(maxFiles, i18n.dropFiles, i18n.dropFiles.*)]]</slot>
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
105
105
|
<slot name="file-list">
|
|
@@ -780,7 +780,10 @@ class Upload extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
782
|
const fileExt = file.name.match(/\.[^.]*$|$/)[0];
|
|
783
|
-
|
|
783
|
+
// Escape regex operators common to mime types
|
|
784
|
+
const escapedAccept = this.accept.replace(/[+.]/g, '\\$&');
|
|
785
|
+
// Create accept regex that can match comma separated patterns, star (*) wildcards
|
|
786
|
+
const re = new RegExp(`^(${escapedAccept.replace(/[, ]+/g, '|').replace(/\/\*/g, '/.*')})$`, 'i');
|
|
784
787
|
if (this.accept && !(re.test(file.type) || re.test(fileExt))) {
|
|
785
788
|
this.dispatchEvent(
|
|
786
789
|
new CustomEvent('file-reject', {
|
package/web-types.json
CHANGED