draft-js-checkable-list-plugin
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -28,2 +28,6 @@ "use strict"; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
@@ -33,15 +37,15 @@ | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var Button = | ||
/*#__PURE__*/ | ||
function (_Component) { | ||
_inherits(Button, _Component); | ||
function Button() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
@@ -56,18 +60,8 @@ var _temp, _this; | ||
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_ref = Button.__proto__ || Object.getPrototypeOf(Button)).call.apply(_ref, [this].concat(args))), Object.defineProperty(_assertThisInitialized(_this), "toggleType", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value(event) { | ||
event.preventDefault(); | ||
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Button)).call.apply(_getPrototypeOf2, [this].concat(args))), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "toggleType", function (event) { | ||
event.preventDefault(); | ||
_this.props.store.setEditorState(_draftJs.RichUtils.toggleBlockType(_this.props.editorState, _draftJsCheckableListItem.CHECKABLE_LIST_ITEM)); | ||
} | ||
}), Object.defineProperty(_assertThisInitialized(_this), "isActive", { | ||
configurable: true, | ||
enumerable: true, | ||
writable: true, | ||
value: function value() { | ||
return _draftJs.RichUtils.getCurrentBlockType(_this.props.editorState) === _draftJsCheckableListItem.CHECKABLE_LIST_ITEM; | ||
} | ||
_this.props.store.setEditorState(_draftJs.RichUtils.toggleBlockType(_this.props.editorState, _draftJsCheckableListItem.CHECKABLE_LIST_ITEM)); | ||
}), _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isActive", function () { | ||
return _draftJs.RichUtils.getCurrentBlockType(_this.props.editorState) === _draftJsCheckableListItem.CHECKABLE_LIST_ITEM; | ||
}), _temp)); | ||
@@ -79,5 +73,5 @@ } | ||
value: function render() { | ||
var _props = this.props, | ||
theme = _props.theme, | ||
children = _props.children; | ||
var _this$props = this.props, | ||
theme = _this$props.theme, | ||
children = _this$props.children; | ||
var button = theme.button || 'checkable-list-item-button'; | ||
@@ -97,2 +91,4 @@ var active = theme.active || 'active'; | ||
_inherits(Button, _Component); | ||
return Button; | ||
@@ -99,0 +95,0 @@ }(_react.Component); |
@@ -24,4 +24,6 @@ "use strict"; | ||
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var checkableListPlugin = function checkableListPlugin() { | ||
@@ -40,3 +42,3 @@ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var blockRendererConfig = _extends({ | ||
var blockRendererConfig = _objectSpread({ | ||
CheckableListItem: (0, _decorateComponentWithProps.default)(_draftJsCheckableListItem.CheckableListItem, checkableListItemProps) | ||
@@ -43,0 +45,0 @@ }, config); |
{ | ||
"name": "draft-js-checkable-list-plugin", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Checkable list plugin for DraftJS", | ||
"main": "lib/index.js", | ||
"module": "es/index.js", | ||
"jsnext:main": "es/index.js", | ||
"files": [ | ||
"lib" | ||
"lib", | ||
"es" | ||
], | ||
@@ -22,17 +25,20 @@ "keywords": [ | ||
"lint": "eslint src test example", | ||
"type": "flow", | ||
"type": "flow src", | ||
"test": "jest --verbose", | ||
"test:coverage": "npm test -- --coverage", | ||
"test:coverage:report": "npm run test:coverage && cat coverage/lcov.info | coveralls", | ||
"clean:es": "if [ -d es ]; then rm -rf es; fi", | ||
"clean:lib": "if [ -d lib ]; then rm -rf lib; fi", | ||
"build:css": "stylus --compress -p src/Button.styl | cat node_modules/draft-js-checkable-list-item/lib/CheckableListItem.css - > lib/plugin.css", | ||
"build:js": "babel -d lib src", | ||
"prebuild": "npm run clean:lib", | ||
"build:js": "npm run build:commonjs && npm run build:es", | ||
"build:es": "NODE_ENV=production BABEL_ENV=es babel -d es src", | ||
"build:commonjs": "NODE_ENV=production BABEL_ENV=commonjs babel -d lib src", | ||
"prebuild": "npm run clean:lib && npm run clean:es", | ||
"build": "npm run build:js && npm run build:css", | ||
"favicon": "curl https://sugarshin.net/favicon.ico > build/favicon.ico", | ||
"clean:build": "if [ -d build ]; then rm -rf build; fi", | ||
"predocs": "npm run clean:build; mkdir -p build && npm run favicon", | ||
"docs": "NODE_ENV=production webpack --progress", | ||
"postdocs": "gh-pages -x -m 'Update [ci skip]' -d build -r https://github.com/sugarshin/draft-js-checkable-list-plugin.git", | ||
"prepublishOnly": "npm run lint && npm run type && npm run test:coverage && NODE_ENV=production BABEL_ENV=production npm run build" | ||
"prebuild:demo": "npm run clean:build; mkdir -p build && npm run favicon", | ||
"build:demo": "NODE_ENV=production webpack", | ||
"deploy": "gh-pages -x -m 'Update [ci skip]' -d build -r https://github.com/sugarshin/draft-js-checkable-list-plugin.git", | ||
"prepublishOnly": "npm run lint && npm run type && npm run test:coverage && npm run build" | ||
}, | ||
@@ -44,3 +50,3 @@ "repository": "git@github.com:sugarshin/draft-js-checkable-list-plugin.git", | ||
"decorate-component-with-props": "^1.1.0", | ||
"draft-js-checkable-list-item": "^3.0.1", | ||
"draft-js-checkable-list-item": "^3.0.3", | ||
"immutable": "~3.7.4", | ||
@@ -50,39 +56,38 @@ "union-class-names": "^1.0.0" | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.40", | ||
"@babel/core": "^7.0.0-beta.40", | ||
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.40", | ||
"@babel/polyfill": "^7.0.0-beta.40", | ||
"@babel/preset-es2015": "^7.0.0-beta.40", | ||
"@babel/preset-es2016": "^7.0.0-beta.40", | ||
"@babel/preset-react": "^7.0.0-beta.40", | ||
"@babel/preset-stage-2": "^7.0.0-beta.40", | ||
"@babel/cli": "^7.0.0-beta.47", | ||
"@babel/core": "^7.0.0-beta.47", | ||
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.47", | ||
"@babel/polyfill": "^7.0.0-beta.47", | ||
"@babel/preset-es2015": "^7.0.0-beta.47", | ||
"@babel/preset-es2016": "^7.0.0-beta.47", | ||
"@babel/preset-react": "^7.0.0-beta.47", | ||
"@babel/preset-stage-2": "^7.0.0-beta.47", | ||
"babel-core": "^7.0.0-0", | ||
"babel-eslint": "^8.2.2", | ||
"babel-jest": "^22.4.0", | ||
"babel-loader": "^8.0.0-beta.0", | ||
"coveralls": "^3.0.0", | ||
"css-loader": "^0.28.9", | ||
"babel-eslint": "^8.2.3", | ||
"babel-jest": "^22.4.4", | ||
"babel-loader": "^8.0.0-beta.3", | ||
"coveralls": "^3.0.1", | ||
"css-loader": "^0.28.11", | ||
"draft-js": "~0.10.5", | ||
"draft-js-plugins-editor": "^2.0.4", | ||
"draft-js-plugins-editor": "^2.0.8", | ||
"enzyme": "^3.3.0", | ||
"enzyme-adapter-react-16": "^1.1.1", | ||
"eslint": "^4.18.1", | ||
"eslint-plugin-babel": "^4.1.2", | ||
"eslint-plugin-flowtype": "^2.45.0", | ||
"eslint-plugin-react": "^7.7.0", | ||
"flow-bin": "^0.66.0", | ||
"eslint": "^4.19.1", | ||
"eslint-plugin-babel": "^5.1.0", | ||
"eslint-plugin-flowtype": "^2.47.1", | ||
"eslint-plugin-react": "^7.8.2", | ||
"flow-bin": "^0.70.0", | ||
"gh-pages": "^1.1.0", | ||
"highlight.js": "^9.12.0", | ||
"html-webpack-plugin": "^2.30.1", | ||
"jest": "^22.4.0", | ||
"jest": "^22.4.4", | ||
"raf": "^3.4.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react": "^16.3.2", | ||
"react-dom": "^16.3.2", | ||
"react-ghfork": "^0.5.1", | ||
"react-hot-loader": "^4.0.0-rc.0", | ||
"react-test-renderer": "^16.2.0", | ||
"regenerator-runtime": "^0.11.1", | ||
"style-loader": "^0.20.2", | ||
"react-hot-loader": "^4.2.0", | ||
"react-test-renderer": "^16.3.2", | ||
"style-loader": "^0.21.0", | ||
"stylus": "^0.54.5", | ||
"stylus-loader": "^3.0.1", | ||
"stylus-loader": "^3.0.2", | ||
"webpack": "^3.11.0", | ||
@@ -89,0 +94,0 @@ "webpack-dev-server": "^2.11.1" |
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
29218
38
21
392