@vaadin/upload 25.2.0-alpha10 → 25.2.0-alpha12

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.
@@ -122,8 +122,7 @@
122
122
  "text": "boolean"
123
123
  },
124
124
  "description": "True when max files has been reached on the manager.",
125
- "attribute": "max-files-reached",
126
- "reflects": true
125
+ "attribute": "max-files-reached"
127
126
  },
128
127
  {
129
128
  "kind": "method",
@@ -249,8 +248,7 @@
249
248
  },
250
249
  "description": "True when max files has been reached on the manager.",
251
250
  "readonly": true,
252
- "attribute": "max-files-reached",
253
- "reflects": true
251
+ "attribute": "max-files-reached"
254
252
  }
255
253
  ],
256
254
  "attributes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/upload",
3
- "version": "25.2.0-alpha10",
3
+ "version": "25.2.0-alpha12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,19 +35,19 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.2.0-alpha10",
39
- "@vaadin/button": "25.2.0-alpha10",
40
- "@vaadin/component-base": "25.2.0-alpha10",
41
- "@vaadin/progress-bar": "25.2.0-alpha10",
42
- "@vaadin/vaadin-themable-mixin": "25.2.0-alpha10",
38
+ "@vaadin/a11y-base": "25.2.0-alpha12",
39
+ "@vaadin/button": "25.2.0-alpha12",
40
+ "@vaadin/component-base": "25.2.0-alpha12",
41
+ "@vaadin/progress-bar": "25.2.0-alpha12",
42
+ "@vaadin/vaadin-themable-mixin": "25.2.0-alpha12",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/aura": "25.2.0-alpha10",
47
- "@vaadin/chai-plugins": "25.2.0-alpha10",
48
- "@vaadin/test-runner-commands": "25.2.0-alpha10",
46
+ "@vaadin/aura": "25.2.0-alpha12",
47
+ "@vaadin/chai-plugins": "25.2.0-alpha12",
48
+ "@vaadin/test-runner-commands": "25.2.0-alpha12",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.2.0-alpha10",
50
+ "@vaadin/vaadin-lumo-styles": "25.2.0-alpha12",
51
51
  "sinon": "^21.0.2"
52
52
  },
53
53
  "customElements": "custom-elements.json",
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "1303b6a3eeecb44a9d26f2b53cb56d9e906febdf"
58
+ "gitHead": "ae1e4373aec3653d63a45b6be18eee36f4b245a1"
59
59
  }
@@ -72,9 +72,6 @@ import { UploadManager } from './vaadin-upload-manager.js';
72
72
  *
73
73
  * @customElement vaadin-upload-button
74
74
  * @extends HTMLElement
75
- * @mixes ButtonMixin
76
- * @mixes ElementMixin
77
- * @mixes ThemableMixin
78
75
  */
79
76
  class UploadButton extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
80
77
  static get is() {
@@ -112,7 +109,7 @@ class UploadButton extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(L
112
109
  maxFilesReached: {
113
110
  type: Boolean,
114
111
  value: false,
115
- reflect: true,
112
+ reflectToAttribute: true,
116
113
  attribute: 'max-files-reached',
117
114
  },
118
115
  };
@@ -49,8 +49,6 @@ import { UploadManager } from './vaadin-upload-manager.js';
49
49
  *
50
50
  * @customElement vaadin-upload-drop-zone
51
51
  * @extends HTMLElement
52
- * @mixes ElementMixin
53
- * @mixes ThemableMixin
54
52
  */
55
53
  class UploadDropZone extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
56
54
  static get is() {
@@ -94,7 +92,7 @@ class UploadDropZone extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjecti
94
92
  maxFilesReached: {
95
93
  type: Boolean,
96
94
  value: false,
97
- reflect: true,
95
+ reflectToAttribute: true,
98
96
  attribute: 'max-files-reached',
99
97
  },
100
98
 
@@ -102,7 +100,7 @@ class UploadDropZone extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjecti
102
100
  __dragover: {
103
101
  type: Boolean,
104
102
  value: false,
105
- reflect: true,
103
+ reflectToAttribute: true,
106
104
  attribute: 'dragover',
107
105
  },
108
106
  };
@@ -42,12 +42,8 @@ const DEFAULT_I18N = {
42
42
  },
43
43
  };
44
44
 
45
- /**
46
- * @polymerMixin
47
- * @mixes I18nMixin
48
- */
49
45
  export const UploadFileListMixin = (superClass) =>
50
- class UploadFileListMixin extends I18nMixin(DEFAULT_I18N, superClass) {
46
+ class UploadFileListMixin extends I18nMixin(superClass) {
51
47
  static get properties() {
52
48
  return {
53
49
  /**
@@ -86,6 +82,10 @@ export const UploadFileListMixin = (superClass) =>
86
82
  return ['__updateItems(items, __effectiveI18n, disabled, _theme)'];
87
83
  }
88
84
 
85
+ static get defaultI18n() {
86
+ return DEFAULT_I18N;
87
+ }
88
+
89
89
  /**
90
90
  * The object used to localize this component.
91
91
  * To change the default localization, replace this with an object
@@ -77,8 +77,6 @@ import { UploadFileListMixin } from './vaadin-upload-file-list-mixin.js';
77
77
  *
78
78
  * @customElement vaadin-upload-file-list
79
79
  * @extends HTMLElement
80
- * @mixes ThemableMixin
81
- * @mixes UploadFileListMixin
82
80
  */
83
81
  class UploadFileList extends UploadFileListMixin(ThemableMixin(PolylitMixin(LitElement))) {
84
82
  static get is() {
@@ -6,10 +6,6 @@
6
6
  import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
7
7
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
8
8
 
9
- /**
10
- * @polymerMixin
11
- * @mixes FocusMixin
12
- */
13
9
  export const UploadFileMixin = (superClass) =>
14
10
  class UploadFileMixin extends FocusMixin(superClass) {
15
11
  static get properties() {
@@ -83,8 +83,6 @@ import { UploadFileMixin } from './vaadin-upload-file-mixin.js';
83
83
  *
84
84
  * @customElement vaadin-upload-file
85
85
  * @extends HTMLElement
86
- * @mixes UploadFileMixin
87
- * @mixes ThemableMixin
88
86
  */
89
87
  class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
90
88
  static get is() {
@@ -119,15 +119,15 @@ export class UploadManager extends EventTarget {
119
119
  this.method = options.method || 'POST';
120
120
  this.headers = options.headers || {};
121
121
  this.timeout = options.timeout || 0;
122
- this.maxFiles = options.maxFiles === undefined ? Infinity : options.maxFiles;
123
- this.maxFileSize = options.maxFileSize === undefined ? Infinity : options.maxFileSize;
122
+ this.maxFiles = options.maxFiles ?? Infinity;
123
+ this.maxFileSize = options.maxFileSize ?? Infinity;
124
124
  this.accept = options.accept || '';
125
- this.noAuto = options.noAuto === undefined ? false : options.noAuto;
126
- this.withCredentials = options.withCredentials === undefined ? false : options.withCredentials;
125
+ this.noAuto = options.noAuto ?? false;
126
+ this.withCredentials = options.withCredentials ?? false;
127
127
  this.uploadFormat = options.uploadFormat || 'raw';
128
- this.maxConcurrentUploads = options.maxConcurrentUploads === undefined ? 3 : options.maxConcurrentUploads;
128
+ this.maxConcurrentUploads = options.maxConcurrentUploads ?? 3;
129
129
  this.formDataName = options.formDataName || 'file';
130
- this.disabled = options.disabled === undefined ? false : options.disabled;
130
+ this.disabled = options.disabled ?? false;
131
131
  }
132
132
 
133
133
  /**
@@ -105,11 +105,8 @@ class DropLabelController extends SlotController {
105
105
  }
106
106
  }
107
107
 
108
- /**
109
- * @polymerMixin
110
- */
111
108
  export const UploadMixin = (superClass) =>
112
- class UploadMixin extends I18nMixin(DEFAULT_I18N, superClass) {
109
+ class UploadMixin extends I18nMixin(superClass) {
113
110
  static get properties() {
114
111
  return {
115
112
  /**
@@ -375,6 +372,10 @@ export const UploadMixin = (superClass) =>
375
372
  ];
376
373
  }
377
374
 
375
+ static get defaultI18n() {
376
+ return DEFAULT_I18N;
377
+ }
378
+
378
379
  /**
379
380
  * The object used to localize this component. To change the default
380
381
  * localization, replace this with an object that provides all properties, or
@@ -104,9 +104,6 @@ import { UploadMixin } from './vaadin-upload-mixin.js';
104
104
  *
105
105
  * @customElement vaadin-upload
106
106
  * @extends HTMLElement
107
- * @mixes ThemableMixin
108
- * @mixes ElementMixin
109
- * @mixes UploadMixin
110
107
  */
111
108
  class Upload extends UploadMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
112
109
  static get is() {
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": "25.2.0-alpha10",
4
+ "version": "25.2.0-alpha12",
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": "25.2.0-alpha10",
4
+ "version": "25.2.0-alpha12",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {