@vaadin/vaadin-upload
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-upload", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"main": "vaadin-upload.js", | ||
@@ -42,11 +42,10 @@ "author": "Vaadin Ltd", | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^3.0.0-pre.18", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.18", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.18", | ||
"@polymer/iron-component-page": "^4.0.0", | ||
"@polymer/iron-test-helpers": "^3.0.0", | ||
"mock-http-request": "git://github.com/abuinitski/MockHttpRequest#npm_fix", | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@vaadin/vaadin-demo-helpers": "^2.0.1", | ||
"@polymer/iron-icons": "^3.0.0-pre.18" | ||
"@vaadin/vaadin-demo-helpers": "^3.0.0", | ||
"@polymer/iron-icons": "^3.0.0" | ||
} | ||
} |
@@ -65,3 +65,2 @@ [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-upload)](https://www.npmjs.com/package/@vaadin/vaadin-upload) | ||
<vaadin-upload accept=".pdf"> | ||
<iron-icon slot="drop-label-icon" icon="description"></iron-icon> | ||
<span slot="drop-label">Drop your favourite Novels here (PDF files only)</span> | ||
@@ -130,16 +129,16 @@ </vaadin-upload> | ||
## Running demos and tests in browser | ||
## Running demos and tests in a browser | ||
1. Fork the `vaadin-upload` repository and clone it locally. | ||
1. Make sure you have [npm](https://www.npmjs.com/) installed. | ||
1. Make sure you have [npm](https://www.npmjs.com/) and [Bower](https://bower.io) installed. | ||
1. When in the `vaadin-upload` directory, run `npm install` and then `bower install` to install dependencies. | ||
1. Run `polymer serve --open`, browser will automatically open the component API documentation. | ||
1. Run `npm start`, browser will automatically open the component API documentation. | ||
1. You can also open demo or in-browser tests by adding **demo** or **test** to the URL, for example: | ||
- http://127.0.0.1:8080/components/vaadin-upload/demo | ||
- http://127.0.0.1:8080/components/vaadin-upload/test | ||
- http://127.0.0.1:3000/components/vaadin-upload/demo | ||
- http://127.0.0.1:3000/components/vaadin-upload/test | ||
@@ -154,3 +153,3 @@ | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `gulp lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
@@ -157,0 +156,0 @@ |
@@ -104,3 +104,3 @@ /** | ||
static get version() { | ||
return '4.2.1'; | ||
return '4.2.2'; | ||
} | ||
@@ -518,2 +518,5 @@ | ||
uploadFiles(files) { | ||
if (files && !Array.isArray(files)) { | ||
files = [files]; | ||
} | ||
files = files || this.files; | ||
@@ -606,3 +609,3 @@ files = files.filter(file => (!file.complete)); | ||
file.uploadTarget = this.target || ''; | ||
file.uploadTarget = file.uploadTarget || this.target || ''; | ||
file.formDataName = this.formDataName; | ||
@@ -785,3 +788,2 @@ | ||
_onFileRemove(event) { | ||
event.stopPropagation(); | ||
this._removeFile(event.detail.file); | ||
@@ -802,4 +804,4 @@ } | ||
_isMultiple() { | ||
return this.maxFiles != 1; | ||
_isMultiple(maxFiles) { | ||
return maxFiles != 1; | ||
} | ||
@@ -806,0 +808,0 @@ |
@@ -10,5 +10,5 @@ import '@vaadin/vaadin-lumo-styles/font-icons.js'; | ||
import '@vaadin/vaadin-progress-bar/theme/lumo/vaadin-progress-bar.js'; | ||
const $_documentContainer = document.createElement('template'); | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
$_documentContainer.innerHTML = `<dom-module id="lumo-upload" theme-for="vaadin-upload"> | ||
const $_documentContainer = html`<dom-module id="lumo-upload" theme-for="vaadin-upload"> | ||
<template> | ||
@@ -15,0 +15,0 @@ <style> |
@@ -6,5 +6,5 @@ import '@vaadin/vaadin-material-styles/color.js'; | ||
import '@vaadin/vaadin-progress-bar/theme/material/vaadin-progress-bar.js'; | ||
const $_documentContainer = document.createElement('template'); | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
$_documentContainer.innerHTML = `<dom-module id="material-upload" theme-for="vaadin-upload"> | ||
const $_documentContainer = html`<dom-module id="material-upload" theme-for="vaadin-upload"> | ||
<template> | ||
@@ -11,0 +11,0 @@ <style> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
1371
64411
169