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

talk-message-forms

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

talk-message-forms - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

46

lib/default/image.js

@@ -21,4 +21,25 @@ (function() {

attachment: T.object.isRequired,
errorMessage: T.string
eventBus: T.object
},
getInitialState: function() {
return {
uploading: false
};
},
componentDidMount: function() {
if (this.props.eventBus != null) {
if (this.props.attachment.data.fileKey == null) {
this.props.eventBus.addListener('uploader/progress', this.onProgress);
this.props.eventBus.addListener('uploader/complete', this.onDone);
return this.props.eventBus.addListener('uploader/error', this.onDone);
}
}
},
componentWillUnoumt: function() {
if (this.props.eventBus != null) {
this.props.eventBus.removeListener('uploader/progress', this.onProgress);
this.props.eventBus.removeListener('uploader/complete', this.onDone);
return this.props.eventBus.removeListener('uploader/error', this.onDone);
}
},
onClick: function() {

@@ -28,9 +49,16 @@ var base;

},
renderError: function() {
return div({
className: 'error'
}, span({
className: 'icon icon-put-back'
}));
onProgress: function() {
if (this.isMounted()) {
return this.setState({
uploading: true
});
}
},
onDone: function() {
if (this.isMounted()) {
return this.setState({
uploading: false
});
}
},
render: function() {

@@ -56,5 +84,5 @@ var height, imageHeight, imageWidth, maxWidth, src, thumbnailUrl;

}, LiteImageLoading({
onClick: this.onClick,
uploading: this.state.uploading,
src: src,
errMsg: this.renderError()
onClick: this.onClick
})));

@@ -61,0 +89,0 @@ }

6

lib/index.js
(function() {
require('react-lite-coder/src/index.less');
require('react-lite-misc/src/index.less');
require('teambition-icon-fonts/css/teambition-ui-icons.css');
require('react-lite-coder/src/index.less');
exports.File = require('./default/file');

@@ -7,0 +9,0 @@

{
"name": "talk-message-forms",
"version": "0.0.6",
"version": "0.0.7",
"description": "The Message Structure and Layout of jianliao.com",

@@ -14,3 +14,3 @@ "main": "lib/index.js",

"react-lite-coder": "^0.0.4",
"react-lite-misc": "^0.0.7",
"react-lite-misc": "^0.0.8",
"teambition-icon-fonts": "^0.72.11",

@@ -44,5 +44,6 @@ "xss": "^0.2.6"

"scripts": {
"prepublish": "gulp script",
"build": "gulp build && gulp script",
"dev": "gulp html && webpack-dev-server --hot",
"prepublish": "rm -rf lib/ && gulp script",
"postpublish": "gulp build && gulp rsync",
"prestart": "gulp html",
"start": "webpack-dev-server --hot --progress",
"test": ""

@@ -49,0 +50,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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