draft-js-emoji-plugin
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -6,2 +6,8 @@ # Change Log | ||
## 2.1.2 | ||
- Allow draft-js v0.11 | ||
- Remove unused dependencies | ||
- Add typescript typings | ||
## 2.1.1 | ||
@@ -8,0 +14,0 @@ - Move searchPortal ref function to constructor |
@@ -11,5 +11,5 @@ 'use strict'; | ||
var _unionClassNames = require('union-class-names'); | ||
var _clsx = require('clsx'); | ||
var _unionClassNames2 = _interopRequireDefault(_unionClassNames); | ||
var _clsx2 = _interopRequireDefault(_clsx); | ||
@@ -50,3 +50,3 @@ var _emojione = require('emojione'); | ||
var backgroundImage = 'url(' + imagePath + shortNameForImage + '.' + imageType + cacheBustParam + ')'; | ||
var combinedClassName = (0, _unionClassNames2.default)(theme.emoji, className); | ||
var combinedClassName = (0, _clsx2.default)(theme.emoji, className); | ||
@@ -53,0 +53,0 @@ emojiDisplay = _react2.default.createElement( |
@@ -7,12 +7,14 @@ 'use strict'; | ||
var _immutable = require('immutable'); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _lodash = require('lodash.keys'); | ||
var _react = require('react'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _decorateComponentWithProps = require('decorate-component-with-props'); | ||
var _immutable = require('immutable'); | ||
var _decorateComponentWithProps2 = _interopRequireDefault(_decorateComponentWithProps); | ||
var _keys = require('lodash/keys'); | ||
var _keys2 = _interopRequireDefault(_keys); | ||
var _draftJs = require('draft-js'); | ||
@@ -249,3 +251,3 @@ | ||
positionSuggestions: positionSuggestions, | ||
shortNames: (0, _immutable.List)((0, _lodash2.default)(_emojiList2.default.list)), | ||
shortNames: (0, _immutable.List)((0, _keys2.default)(_emojiList2.default.list)), | ||
useNativeArt: useNativeArt | ||
@@ -264,11 +266,29 @@ }; | ||
}; | ||
var DecoratedEmojiSuggestions = function DecoratedEmojiSuggestions(props) { | ||
return _react2.default.createElement(_EmojiSuggestions2.default, _extends({}, props, suggestionsProps)); | ||
}; | ||
var DecoratedEmojiSelect = function DecoratedEmojiSelect(props) { | ||
return _react2.default.createElement(_EmojiSelect2.default, _extends({}, props, selectProps)); | ||
}; | ||
var DecoratedEmoji = function DecoratedEmoji(props) { | ||
return _react2.default.createElement(_Emoji2.default, _extends({}, props, { | ||
theme: theme, | ||
imagePath: imagePath, | ||
imageType: imageType, | ||
cacheBustParam: cacheBustParam, | ||
useNativeArt: useNativeArt | ||
})); | ||
}; | ||
var DecoratedEmojiSuggestionsPortal = function DecoratedEmojiSuggestionsPortal(props) { | ||
return _react2.default.createElement(_EmojiSuggestionsPortal2.default, _extends({}, props, { store: store })); | ||
}; | ||
return { | ||
EmojiSuggestions: (0, _decorateComponentWithProps2.default)(_EmojiSuggestions2.default, suggestionsProps), | ||
EmojiSelect: (0, _decorateComponentWithProps2.default)(_EmojiSelect2.default, selectProps), | ||
EmojiSuggestions: DecoratedEmojiSuggestions, | ||
EmojiSelect: DecoratedEmojiSelect, | ||
decorators: [{ | ||
strategy: _emojiStrategy2.default, | ||
component: (0, _decorateComponentWithProps2.default)(_Emoji2.default, { theme: theme, imagePath: imagePath, imageType: imageType, cacheBustParam: cacheBustParam, useNativeArt: useNativeArt }) | ||
component: DecoratedEmoji | ||
}, { | ||
strategy: _emojiSuggestionsStrategy2.default, | ||
component: (0, _decorateComponentWithProps2.default)(_EmojiSuggestionsPortal2.default, { store: store }) | ||
component: DecoratedEmojiSuggestionsPortal | ||
}], | ||
@@ -275,0 +295,0 @@ getAccessibilityProps: function getAccessibilityProps() { |
{ | ||
"name": "draft-js-emoji-plugin", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Emoji Plugin for DraftJS", | ||
@@ -15,2 +15,6 @@ "author": { | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"keywords": [ | ||
@@ -28,5 +32,6 @@ "editor", | ||
"clean": "../node_modules/.bin/rimraf lib", | ||
"build": "npm run clean && npm run build:js && npm run build:css", | ||
"build": "npm run clean && npm run build:js && npm run build:css && npm run build:ts", | ||
"build:js": "WEBPACK_CONFIG=$(pwd)/webpack.config.js BABEL_DISABLE_CACHE=1 BABEL_ENV=production NODE_ENV=production ../node_modules/.bin/babel --out-dir='lib' --ignore='__test__/*' src", | ||
"build:css": "node ../scripts/concatCssFiles $(pwd) && ../node_modules/.bin/rimraf lib-css", | ||
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/", | ||
"prepublish": "npm run build" | ||
@@ -36,15 +41,14 @@ }, | ||
"dependencies": { | ||
"decorate-component-with-props": "^1.1.0", | ||
"clsx": "^1.0.4", | ||
"emojione": "^2.2.7", | ||
"find-with-regex": "^1.1.3", | ||
"immutable": "~3.7.4", | ||
"lodash": "^4.17.14", | ||
"prop-types": "^15.5.8", | ||
"lodash.keys": "^4.2.0", | ||
"react-custom-scrollbars": "^4.2.0", | ||
"react-icons": "^2.2.6", | ||
"to-style": "^1.3.3", | ||
"union-class-names": "^1.0.0" | ||
"to-style": "^1.3.3" | ||
}, | ||
"peerDependencies": { | ||
"draft-js": "^0.10.1", | ||
"draft-js": "^0.10.1 || ^0.11.0", | ||
"react": "^15.5.0 || ^16.0.0-rc", | ||
@@ -51,0 +55,0 @@ "react-dom": "^15.5.0 || ^16.0.0-rc" |
12
2553
127801
32
+ Addedclsx@^1.0.4
+ Addedlodash@^4.17.14
+ Addedclsx@1.2.1(transitive)
+ Addedcore-js@3.37.1(transitive)
+ Addedcross-fetch@3.1.8(transitive)
+ Addeddraft-js@0.11.7(transitive)
+ Addedfbjs@2.0.0(transitive)
+ Addedfbjs-css-vars@1.0.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removeddecorate-component-with-props@^1.1.0
- Removedlodash.keys@^4.2.0
- Removedunion-class-names@^1.0.0
- Removeddecorate-component-with-props@1.2.1(transitive)
- Removedlodash.keys@4.2.0(transitive)
- Removedunion-class-names@1.0.0(transitive)