Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@collaborne/paper-image-upload-button

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@collaborne/paper-image-upload-button - npm Package Compare versions

Comparing version 3.0.0 to 3.0.2

.eslintrc.json

29

package.json

@@ -15,16 +15,21 @@ {

"name": "@collaborne/paper-image-upload-button",
"version": "3.0.0",
"resolutions": {
"inherits": "2.0.3",
"samsam": "1.1.3",
"supports-color": "3.1.2",
"type-detect": "1.0.0"
},
"version": "3.0.2",
"main": "paper-image-upload-button.js",
"author": "collaborne",
"author": "Collaborne B.V.",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/Collaborne/paper-image-upload-button/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Collaborne/paper-image-upload-button.git"
},
"scripts": {
"lint": "eslint . && polymer lint",
"test": "npm run lint && echo 'No tests yet'"
},
"dependencies": {
"@polymer/polymer": "^3.0.0",
"@polymer/iron-icon": "^3.0.0",
"@polymer/iron-icons": "^3.0.0"
"@polymer/iron-icons": "^3.0.0",
"@polymer/polymer": "^3.0.0"
},

@@ -34,4 +39,6 @@ "devDependencies": {

"@polymer/paper-checkbox": "^3.0.0",
"@webcomponents/webcomponentsjs": "^2.0.0"
"eslint": "^5.12.1",
"eslint-config-collaborne": "^1.5.0",
"polymer-cli": "^1.9.5"
}
}

@@ -1,3 +0,3 @@

import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import '@polymer/iron-icon';

@@ -46,2 +46,3 @@ import '@polymer/iron-icons';

}
:host([can-upload]:hover) #image, :host([uploading]) #image {

@@ -94,22 +95,10 @@ filter: brightness(40%);

return {
/**
* URL to the currently shown image
*/
image: String,
/**
* Icon that is shown during hover
* Set to true if users should be allowed to upload images
*/
icon: {
type: String,
value: 'icons:file-upload'
},
/**
* True if the image is currently uploading
*/
uploading: {
canUpload: {
computed: '_computeCanUpload(disabled, uploading)',
reflectToAttribute: true,
type: Boolean,
value: false,
reflectToAttribute: true,
},

@@ -126,18 +115,31 @@

/**
* Set to true if users should be allowed to upload images
* Icon that is shown during hover
*/
canUpload: {
type: Boolean,
computed: '_computeCanUpload(disabled, uploading)',
reflectToAttribute: true,
icon: {
type: String,
value: 'icons:file-upload'
},
/**
* URL to the currently shown image
*/
image: String,
/**
* True if no image is configured
*/
noImage: {
computed: '_computeNoImage(image)',
reflectToAttribute: true,
type: Boolean,
value: true,
computed: '_computeNoImage(image)',
},
/**
* True if the image is currently uploading
*/
uploading: {
reflectToAttribute: true,
type: Boolean,
value: false,
},

@@ -156,3 +158,3 @@ };

this.$.file.addEventListener('change', e => {
this.$.file.addEventListener('change', () => {
const files = this.$.file.files;

@@ -164,2 +166,4 @@ if (files.length > 0) {

this.dispatchEvent(new CustomEvent('upload-image', {
bubbles: true,
composed: true,
detail: {

@@ -170,6 +174,4 @@ file,

},
bubbles: true,
composed: true,
}));
}
};
img.src = window.URL.createObjectURL(file);

@@ -176,0 +178,0 @@ }

@@ -7,4 +7,5 @@ {

"polymer-3"
]
],
"ignoreWarnings": ["could-not-resolve-reference"]
}
}
}

@@ -1,2 +0,2 @@

# \<paper-image-upload-button\> [![Bower version](https://badge.fury.io/bo/paper-image-upload-button.svg)](http://badge.fury.io/bo/paper-image-upload-button) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Collaborne/paper-image-upload-button)
# \<paper-image-upload-button\> [![Build Status](https://travis-ci.org/Collaborne/paper-image-upload-but.svg?branch=master)](https://travis-ci.org/Collaborne/paper-image-upload-but) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Collaborne/paper-image-upload-button)

@@ -9,12 +9,2 @@ Material Design upload button that previews the image (Polymer)

<!--
```
<custom-element-demo>
<template>
<link rel="import" href="paper-image-upload-button.html">
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html

@@ -21,0 +11,0 @@ <paper-image-upload-button

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc