Comparing version 4.0.2 to 4.0.3
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = mapSelf; | ||
exports['default'] = mapSelf; | ||
@@ -13,3 +13,3 @@ var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
@@ -22,4 +22,4 @@ function mirror(o) { | ||
// return ReactFragment | ||
return _react2["default"].Children.map(children, mirror); | ||
return _react2['default'].Children.map(children, mirror); | ||
} | ||
module.exports = exports['default']; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = toArray; | ||
exports['default'] = toArray; | ||
@@ -13,7 +13,7 @@ var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function toArray(children) { | ||
var ret = []; | ||
_react2["default"].Children.forEach(children, function (c) { | ||
_react2['default'].Children.forEach(children, function (c) { | ||
ret.push(c); | ||
@@ -20,0 +20,0 @@ }); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = deprecated; | ||
exports['default'] = deprecated; | ||
function deprecated(props, instead, component) { | ||
@@ -9,0 +9,0 @@ if (typeof window !== 'undefined' && window.console && window.console.error) { |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = addEventListenerWrap; | ||
exports['default'] = addEventListenerWrap; | ||
@@ -17,11 +17,11 @@ var _addDomEventListener = require('add-dom-event-listener'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function addEventListenerWrap(target, eventType, cb) { | ||
/* eslint camelcase: 2 */ | ||
var callback = _reactDom2["default"].unstable_batchedUpdates ? function run(e) { | ||
_reactDom2["default"].unstable_batchedUpdates(cb, e); | ||
var callback = _reactDom2['default'].unstable_batchedUpdates ? function run(e) { | ||
_reactDom2['default'].unstable_batchedUpdates(cb, e); | ||
} : cb; | ||
return (0, _addDomEventListener2["default"])(target, eventType, callback); | ||
return (0, _addDomEventListener2['default'])(target, eventType, callback); | ||
} | ||
module.exports = exports['default']; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = canUseDom; | ||
exports['default'] = canUseDom; | ||
function canUseDom() { | ||
@@ -9,0 +9,0 @@ return !!(typeof window !== 'undefined' && window.document && window.document.createElement); |
@@ -24,3 +24,3 @@ 'use strict'; | ||
styleFloat: 1, | ||
"float": 1 | ||
float: 1 | ||
}; | ||
@@ -27,0 +27,0 @@ |
@@ -12,3 +12,3 @@ 'use strict'; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
@@ -38,3 +38,3 @@ var animationEndEventNames = { | ||
var animation = exports.animation = (0, _canUseDom2["default"])() && supportEnd(animationEndEventNames); | ||
var transition = exports.transition = (0, _canUseDom2["default"])() && supportEnd(transitionEventNames); | ||
var animation = exports.animation = (0, _canUseDom2['default'])() && supportEnd(animationEndEventNames); | ||
var transition = exports.transition = (0, _canUseDom2['default'])() && supportEnd(transitionEventNames); |
@@ -7,6 +7,8 @@ 'use strict'; | ||
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 _extends2 = require('babel-runtime/helpers/extends'); | ||
exports["default"] = getContainerRenderMixin; | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
exports['default'] = getContainerRenderMixin; | ||
var _reactDom = require('react-dom'); | ||
@@ -16,3 +18,3 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
@@ -49,3 +51,3 @@ function defaultGetContainer() { | ||
} | ||
_reactDom2["default"].unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() { | ||
_reactDom2['default'].unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() { | ||
instance._component = this; | ||
@@ -60,3 +62,3 @@ if (ready) { | ||
if (autoMount) { | ||
mixin = _extends({}, mixin, { | ||
mixin = (0, _extends3['default'])({}, mixin, { | ||
componentDidMount: function componentDidMount() { | ||
@@ -72,3 +74,3 @@ _renderComponent(this); | ||
if (!autoMount || !autoDestroy) { | ||
mixin = _extends({}, mixin, { | ||
mixin = (0, _extends3['default'])({}, mixin, { | ||
renderComponent: function renderComponent(componentArg, ready) { | ||
@@ -83,3 +85,3 @@ _renderComponent(this, componentArg, ready); | ||
var container = instance._container; | ||
_reactDom2["default"].unmountComponentAtNode(container); | ||
_reactDom2['default'].unmountComponentAtNode(container); | ||
container.parentNode.removeChild(container); | ||
@@ -91,3 +93,3 @@ instance._container = null; | ||
if (autoDestroy) { | ||
mixin = _extends({}, mixin, { | ||
mixin = (0, _extends3['default'])({}, mixin, { | ||
componentWillUnmount: function componentWillUnmount() { | ||
@@ -98,3 +100,3 @@ _removeContainer(this); | ||
} else { | ||
mixin = _extends({}, mixin, { | ||
mixin = (0, _extends3['default'])({}, mixin, { | ||
removeContainer: function removeContainer() { | ||
@@ -101,0 +103,0 @@ _removeContainer(this); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = getScrollBarSize; | ||
exports['default'] = getScrollBarSize; | ||
var cached = void 0; | ||
@@ -9,0 +9,0 @@ |
@@ -523,3 +523,3 @@ 'use strict'; | ||
exports["default"] = KeyCode; | ||
exports['default'] = KeyCode; | ||
module.exports = exports['default']; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = pickAttrs; | ||
exports['default'] = pickAttrs; | ||
/* eslint-disable max-len */ | ||
@@ -9,0 +9,0 @@ var attributes = 'accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap'.replace(/\s+/g, ' ').replace(/\t|\n|\r/g, '').split(' '); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports["default"] = warn; | ||
exports['default'] = warn; | ||
function warn(msg) { | ||
@@ -9,0 +9,0 @@ if (process.env.NODE_ENV !== 'production') { |
{ | ||
"name": "rc-util", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Common Utils For React Component", | ||
@@ -10,6 +10,6 @@ "keywords": [ | ||
"files": [ | ||
"lib" | ||
"lib", | ||
"es" | ||
], | ||
"homepage": "http://github.com/react-component/util", | ||
"author": "", | ||
"repository": { | ||
@@ -28,15 +28,23 @@ "type": "git", | ||
"build": "rc-tools run build", | ||
"pub": "rc-tools run pub", | ||
"pub": "rc-tools run pub --babel-runtime", | ||
"lint": "rc-tools run lint", | ||
"karma": "rc-tools run karma", | ||
"saucelabs": "rc-tools run saucelabs", | ||
"test": "rc-tools run test", | ||
"chrome-test": "rc-tools run chrome-test", | ||
"coverage": "rc-tools run coverage" | ||
"test": "jest", | ||
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls" | ||
}, | ||
"jest": { | ||
"collectCoverageFrom": [ | ||
"src/*" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js", | ||
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js" | ||
} | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.11.15", | ||
"pre-commit": "^1.0.7", | ||
"expect.js": "~0.3.1", | ||
"react": "15.x", | ||
"rc-tools": "5.x", | ||
"jest":"20.x", | ||
"rc-tools": "6.x", | ||
"react-dom": "15.x" | ||
@@ -43,0 +51,0 @@ }, |
@@ -147,3 +147,3 @@ # rc-util | ||
#### Dom/casUseDom | ||
#### Dom/canUseDom | ||
@@ -155,3 +155,3 @@ > (): boolean | ||
```jsx | ||
import casUseDom from 'rc-util/lib/Dom/casUseDom'; | ||
import canUseDom from 'rc-util/lib/Dom/canUseDom'; | ||
``` | ||
@@ -158,0 +158,0 @@ |
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
58927
41
2041
7