rc-drawer
Advanced tools
Comparing version 2.0.9 to 2.1.1
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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; } | ||
@@ -481,2 +485,3 @@ | ||
maskStyle = _this$props8.maskStyle, | ||
drawerStyle = _this$props8.drawerStyle, | ||
onClose = _this$props8.onClose, | ||
@@ -486,3 +491,3 @@ onHandleClick = _this$props8.onHandleClick, | ||
getOpenCount = _this$props8.getOpenCount, | ||
props = _objectWithoutProperties(_this$props8, ["className", "children", "style", "width", "height", "defaultOpen", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "handler", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "onClose", "onHandleClick", "keyboard", "getOpenCount"]); // 首次渲染都将是关闭状态。 | ||
props = _objectWithoutProperties(_this$props8, ["className", "children", "style", "width", "height", "defaultOpen", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "handler", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "drawerStyle", "onClose", "onHandleClick", "keyboard", "getOpenCount"]); // 首次渲染都将是关闭状态。 | ||
@@ -532,3 +537,3 @@ | ||
className: "".concat(prefixCls, "-content-wrapper"), | ||
style: { | ||
style: _objectSpread({ | ||
transform: transform, | ||
@@ -538,3 +543,3 @@ msTransform: transform, | ||
height: isNumeric(height) ? "".concat(height, "px") : height | ||
}, | ||
}, drawerStyle), | ||
ref: function ref(c) { | ||
@@ -541,0 +546,0 @@ _this3.contentWrapper = c; |
@@ -24,2 +24,3 @@ import * as React from 'react'; | ||
maskStyle?: React.CSSProperties; | ||
drawerStyle?: React.CSSProperties; | ||
onChange?: ((open?: boolean) => void); | ||
@@ -26,0 +27,0 @@ afterVisibleChange?: ((open: boolean) => void); |
@@ -5,2 +5,6 @@ History | ||
## 2.1.0 | ||
- Add `drawerStyle`. | ||
## 1.5.0 | ||
@@ -27,2 +31,2 @@ | ||
1. add `top` `bottom` placement. | ||
2. `handleChild` type remove Array; | ||
2. `handleChild` type remove Array; |
@@ -22,4 +22,6 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -29,2 +31,6 @@ | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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; } | ||
@@ -501,2 +507,3 @@ | ||
maskStyle = _this$props8.maskStyle, | ||
drawerStyle = _this$props8.drawerStyle, | ||
onClose = _this$props8.onClose, | ||
@@ -506,3 +513,3 @@ onHandleClick = _this$props8.onHandleClick, | ||
getOpenCount = _this$props8.getOpenCount, | ||
props = _objectWithoutProperties(_this$props8, ["className", "children", "style", "width", "height", "defaultOpen", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "handler", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "onClose", "onHandleClick", "keyboard", "getOpenCount"]); // 首次渲染都将是关闭状态。 | ||
props = _objectWithoutProperties(_this$props8, ["className", "children", "style", "width", "height", "defaultOpen", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "handler", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "drawerStyle", "onClose", "onHandleClick", "keyboard", "getOpenCount"]); // 首次渲染都将是关闭状态。 | ||
@@ -552,3 +559,3 @@ | ||
className: "".concat(prefixCls, "-content-wrapper"), | ||
style: { | ||
style: _objectSpread({ | ||
transform: transform, | ||
@@ -558,3 +565,3 @@ msTransform: transform, | ||
height: (0, _utils.isNumeric)(height) ? "".concat(height, "px") : height | ||
}, | ||
}, drawerStyle), | ||
ref: function ref(c) { | ||
@@ -561,0 +568,0 @@ _this3.contentWrapper = c; |
@@ -16,4 +16,6 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -20,0 +22,0 @@ |
@@ -24,2 +24,3 @@ import * as React from 'react'; | ||
maskStyle?: React.CSSProperties; | ||
drawerStyle?: React.CSSProperties; | ||
onChange?: ((open?: boolean) => void); | ||
@@ -26,0 +27,0 @@ afterVisibleChange?: ((open: boolean) => void); |
{ | ||
"name": "rc-drawer", | ||
"version": "2.0.9", | ||
"version": "2.1.1", | ||
"description": "drawer component for react", | ||
@@ -47,30 +47,32 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/classnames": "^2.2.6", | ||
"@types/classnames": "^2.2.9", | ||
"@types/enzyme": "^3.1.15", | ||
"@types/jest": "^24.0.15", | ||
"@types/raf": "^3.4.0", | ||
"@types/react": "^16.7.17", | ||
"@types/react-dom": "^16.0.11", | ||
"@types/react": "^16.9.5", | ||
"@types/react-dom": "^16.9.1", | ||
"@types/react-lifecycles-compat": "^3.0.1", | ||
"@types/warning": "^3.0.0", | ||
"enzyme": "^3.8.0", | ||
"enzyme-adapter-react-16": "^1.7.1", | ||
"enzyme-to-json": "^3.3.5", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"enzyme-to-json": "^3.4.2", | ||
"eslint": "^6.5.1", | ||
"father": "^2.13.2", | ||
"jsonp": "^0.2.0", | ||
"less": "^3.10.3", | ||
"np": "^5.0.3", | ||
"pre-commit": "1.x", | ||
"pre-commit": "^1.2.2", | ||
"querystring": "^0.2.0", | ||
"rc-test": "^6.0.1", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-test-renderer": "^16.0.0", | ||
"typescript": "^3.5.2" | ||
"react": "^16.10.2", | ||
"react-dom": "^16.10.2", | ||
"react-test-renderer": "^16.10.2", | ||
"typescript": "^3.6.3" | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "6.x", | ||
"classnames": "^2.2.5", | ||
"rc-util": "^4.7.0", | ||
"babel-runtime": "^6.26.0", | ||
"classnames": "^2.2.6", | ||
"rc-util": "^4.11.2", | ||
"react-lifecycles-compat": "^3.0.4" | ||
} | ||
} |
@@ -66,4 +66,5 @@ # rc-drawer | ||
| showMask | boolean | true | mask is show | | ||
| maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. | | ||
| maskStyle | object | null | mask style | | ||
| maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. | | ||
| maskStyle | CSSProperties | null | mask style | | ||
| drawerStyle | CSSProperties | null | style of the drawer popup element | | ||
| onChange | func | null | change callback(open) | | ||
@@ -70,0 +71,0 @@ | afterVisibleChange | func | null | transition end callback(open) | |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
93870
1989
83
23
1
Updatedbabel-runtime@^6.26.0
Updatedclassnames@^2.2.6
Updatedrc-util@^4.11.2