@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/upload",
3
- "version": "23.3.0-alpha2",
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": "23.3.0-alpha2",
40
- "@vaadin/component-base": "23.3.0-alpha2",
41
- "@vaadin/progress-bar": "23.3.0-alpha2",
42
- "@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
43
- "@vaadin/vaadin-material-styles": "23.3.0-alpha2",
44
- "@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
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": "23.3.0-alpha2",
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": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
56
+ "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
57
57
  }
@@ -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.*)]] </slot>
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
- const re = new RegExp(`^(${this.accept.replace(/[, ]+/g, '|').replace(/\/\*/g, '/.*')})$`, 'i');
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "23.3.0-alpha2",
4
+ "version": "24.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "23.3.0-alpha2",
4
+ "version": "24.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {