@vaadin/vaadin-upload 4.4.0-beta1 → 4.4.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/README.md CHANGED
@@ -1,20 +1,18 @@
1
- [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-upload)](https://www.npmjs.com/package/@vaadin/vaadin-upload)
2
- [![Bower version](https://badgen.net/github/release/vaadin/vaadin-upload)](https://github.com/vaadin/vaadin-upload/releases)
3
- [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-upload)
4
- [![Build Status](https://travis-ci.org/vaadin/vaadin-upload.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-upload)
5
- [![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-upload/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-upload?branch=master)
6
- [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
1
+ # <vaadin-upload>
7
2
 
8
- [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-upload)
9
- [![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-upload.svg)](https://vaadin.com/directory/component/vaadinvaadin-upload)
3
+ > ⚠️ Starting from Vaadin 20, the source code and issues for this component are migrated to the [`vaadin/web-components`](https://github.com/vaadin/web-components/tree/master/packages/vaadin-upload) monorepository.
4
+ > This repository contains the source code and releases of `<vaadin-upload>` for the Vaadin versions 10 to 19.
10
5
 
11
- # &lt;vaadin-upload&gt;
6
+ [&lt;vaadin-upload&gt;](https://vaadin.com/components/vaadin-upload) is a Web Component for uploading files, part of the [Vaadin components](https://vaadin.com/components).
12
7
 
13
8
  [Live Demo ↗](https://vaadin.com/components/vaadin-upload/html-examples/upload-basic-demos)
14
9
  |
15
10
  [API documentation ↗](https://vaadin.com/components/vaadin-upload/html-api)
16
11
 
17
- [&lt;vaadin-upload&gt;](https://vaadin.com/components/vaadin-upload) is a Web Component for uploading files, part of the [Vaadin components](https://vaadin.com/components).
12
+ [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-upload)](https://www.npmjs.com/package/@vaadin/vaadin-upload)
13
+ [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-upload)
14
+ [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-upload)
15
+ [![Discord](https://discordapp.com/api/guilds/732335336448852018/widget.png)](https://vaad.in/chat)
18
16
 
19
17
  <!---
20
18
  ```
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "repository": "vaadin/vaadin-upload",
11
11
  "homepage": "https://vaadin.com/components",
12
12
  "name": "@vaadin/vaadin-upload",
13
- "version": "4.4.0-beta1",
13
+ "version": "4.4.3",
14
14
  "main": "vaadin-upload.js",
15
15
  "author": "Vaadin Ltd",
16
16
  "license": "Apache-2.0",
@@ -25,6 +25,8 @@
25
25
  "theme"
26
26
  ],
27
27
  "resolutions": {
28
+ "es-abstract": "1.17.6",
29
+ "@types/doctrine": "0.0.3",
28
30
  "inherits": "2.0.3",
29
31
  "samsam": "1.1.3",
30
32
  "supports-color": "3.1.2",
@@ -33,16 +35,16 @@
33
35
  "dependencies": {
34
36
  "@polymer/polymer": "^3.0.0",
35
37
  "@vaadin/vaadin-themable-mixin": "^1.6.1",
36
- "@vaadin/vaadin-button": "^2.4.0-beta1",
37
- "@vaadin/vaadin-progress-bar": "^1.3.0-beta1",
38
+ "@vaadin/vaadin-button": "^2.4.0",
39
+ "@vaadin/vaadin-progress-bar": "^1.3.0",
38
40
  "@vaadin/vaadin-lumo-styles": "^1.1.0",
39
41
  "@vaadin/vaadin-material-styles": "^1.1.0",
40
42
  "@vaadin/vaadin-element-mixin": "^2.4.1"
41
43
  },
42
44
  "scripts": {
43
- "generate-typings": "gen-typescript-declarations --outDir . --verify"
44
- },
45
- "devDependencies": {
45
+ "generate-typings": "gen-typescript-declarations --outDir . --verify"
46
+ },
47
+ "devDependencies": {
46
48
  "@polymer/iron-component-page": "^4.0.0",
47
49
  "@polymer/iron-test-helpers": "^3.0.0",
48
50
  "mock-http-request": "git://github.com/abuinitski/MockHttpRequest#npm_fix",
@@ -49,6 +49,7 @@ import {html} from '@polymer/polymer/lib/utils/html-tag.js';
49
49
  * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
50
50
  * `dragover` | A file is being dragged over the element | `:host`
51
51
  * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
52
+ * `max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`
52
53
  *
53
54
  * See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)
54
55
  */
@@ -198,7 +199,7 @@ declare class UploadElement extends
198
199
  * uploading: {
199
200
  * status: {
200
201
  * connecting: 'Connecting...',
201
- * stalled: 'Stalled.',
202
+ * stalled: 'Stalled',
202
203
  * processing: 'Processing File...',
203
204
  * held: 'Queued'
204
205
  * },
@@ -42,6 +42,7 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
42
42
  * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
43
43
  * `dragover` | A file is being dragged over the element | `:host`
44
44
  * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
45
+ * `max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`
45
46
  *
46
47
  * See [ThemableMixin – how to apply styles for shadow parts](https://github.com/vaadin/vaadin-themable-mixin/wiki)
47
48
  *
@@ -102,7 +103,7 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
102
103
  }
103
104
 
104
105
  static get version() {
105
- return '4.4.0-beta1';
106
+ return '4.4.3';
106
107
  }
107
108
 
108
109
  static get properties() {
@@ -230,6 +231,7 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
230
231
  value: false,
231
232
  notify: true,
232
233
  readOnly: true,
234
+ reflectToAttribute: true,
233
235
  computed: '_maxFilesAdded(maxFiles, files.length)'
234
236
  },
235
237
 
@@ -333,7 +335,7 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
333
335
  uploading: {
334
336
  status: {
335
337
  connecting: 'Connecting...',
336
- stalled: 'Stalled.',
338
+ stalled: 'Stalled',
337
339
  processing: 'Processing File...',
338
340
  held: 'Queued'
339
341
  },
@@ -562,7 +564,7 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
562
564
  }
563
565
 
564
566
  const ini = Date.now();
565
- const xhr = file.xhr = this._createXhr(file);
567
+ const xhr = file.xhr = this._createXhr();
566
568
 
567
569
  let stalledId, last;
568
570
  // onprogress is called always after onreadystatechange
@@ -588,7 +590,6 @@ class UploadElement extends ElementMixin(ThemableMixin(PolymerElement)) {
588
590
  } else {
589
591
  file.loadedStr = file.totalStr;
590
592
  file.status = this.i18n.uploading.status.processing;
591
- file.uploading = false;
592
593
  }
593
594
  }
594
595
 
@@ -47,6 +47,10 @@ const $_documentContainer = html`<dom-module id="lumo-upload" theme-for="vaadin-
47
47
  color: var(--lumo-primary-text-color);
48
48
  }
49
49
 
50
+ :host([max-files-reached]) [part='drop-label'] {
51
+ color: var(--lumo-disabled-text-color);
52
+ }
53
+
50
54
  [part="drop-label-icon"] {
51
55
  display: inline-block;
52
56
  }
@@ -52,6 +52,10 @@ const $_documentContainer = html`<dom-module id="material-upload" theme-for="vaa
52
52
  color: var(--material-primary-text-color);
53
53
  }
54
54
 
55
+ :host([max-files-reached]) [part='drop-label'] {
56
+ color: var(--material-disabled-text-color);
57
+ }
58
+
55
59
  [part="drop-label-icon"] {
56
60
  display: inline-block;
57
61
  margin-right: 8px;