Comparing version 2.5.2 to 2.5.3
@@ -15,2 +15,3 @@ import React from "react"; | ||
onCloseClick: (e: React.MouseEvent<Element, MouseEvent>) => void; | ||
onKeyDownCloseBtn: (evt: React.KeyboardEvent<Element>) => boolean; | ||
onDragStart: (e: DragManager.DragState) => void; | ||
@@ -38,2 +39,3 @@ onDragOver: (e: DragManager.DragState) => void; | ||
onMaximizeClick: () => void; | ||
onKeyDownMaximizeBtn: (evt: React.KeyboardEvent<Element>) => boolean; | ||
renderTabBar: () => JSX.Element; | ||
@@ -40,0 +42,0 @@ renderTabContent: () => JSX.Element; |
@@ -22,2 +22,3 @@ "use strict"; | ||
const Algorithm_1 = require("./Algorithm"); | ||
const KeyCode_1 = __importDefault(require("rc-util/lib/KeyCode")); | ||
function findParentPanel(element) { | ||
@@ -47,2 +48,9 @@ for (let i = 0; i < 10; ++i) { | ||
}; | ||
this.onKeyDownCloseBtn = (evt) => { | ||
if (!KeyCode_1.default.isTextModifyingKeyEvent(evt.nativeEvent) || (evt.keyCode != KeyCode_1.default.ENTER && evt.keyCode != KeyCode_1.default.SPACE)) { | ||
return false; | ||
} | ||
this.context.dockMove(this.data, null, 'remove'); | ||
evt.stopPropagation(); | ||
}; | ||
this.onDragStart = (e) => { | ||
@@ -125,3 +133,3 @@ let panel = findParentPanel(this._ref); | ||
react_1.default.createElement(DragDropDiv_1.DragDropDiv, { className: 'dock-tab-hit-area', getRef: this.getHitAreaRef, onDragStartT: this.onDragStart, onDragOverT: this.onDragOver, onDropT: this.onDrop, onDragLeaveT: this.onDragLeave }, closable ? | ||
react_1.default.createElement("div", { className: 'dock-tab-close-btn', onClick: this.onCloseClick }) | ||
react_1.default.createElement("div", { className: 'dock-tab-close-btn', onClick: this.onCloseClick, onKeyDown: this.onKeyDownCloseBtn, tabIndex: 0 }) | ||
: null))); | ||
@@ -150,2 +158,10 @@ if (cacheContext) { | ||
}; | ||
this.onKeyDownMaximizeBtn = (evt) => { | ||
if (!KeyCode_1.default.isTextModifyingKeyEvent(evt.nativeEvent) || (evt.keyCode != KeyCode_1.default.ENTER && evt.keyCode != KeyCode_1.default.SPACE)) { | ||
return false; | ||
} | ||
evt.stopPropagation(); | ||
let { panelData } = this.props; | ||
this.context.dockMove(panelData, null, 'maximize'); | ||
}; | ||
this.renderTabBar = () => { | ||
@@ -166,3 +182,3 @@ let { panelData, onPanelDragStart, onPanelDragMove, onPanelDragEnd } = this.props; | ||
else if (group.maximizable) { | ||
panelExtraContent = (react_1.default.createElement("div", { className: 'dock-panel-max-btn', onClick: this.onMaximizeClick })); | ||
panelExtraContent = (react_1.default.createElement("div", { className: 'dock-panel-max-btn', onClick: this.onMaximizeClick, onKeyDown: this.onKeyDownMaximizeBtn, tabIndex: 0 })); | ||
} | ||
@@ -169,0 +185,0 @@ return (react_1.default.createElement(DockTabBar_1.DockTabBar, { extraContent: panelExtraContent, onDragStart: onPanelDragStart, onDragMove: onPanelDragMove, onDragEnd: onPanelDragEnd })); |
{ | ||
"name": "rc-dock", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "dock layout for react component", | ||
@@ -32,28 +32,29 @@ "repository": { | ||
"lodash": "^4.17.15", | ||
"rc-tabs": "^10.0.0-alpha.1", | ||
"rc-tabs": "^10.1.0", | ||
"rc-util": "^4.20.1", | ||
"react-new-window": "^0.1.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.7.7", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/plugin-proposal-export-default-from": "^7.7.4", | ||
"@babel/preset-env": "^7.7.7", | ||
"@types/classnames": "^2.2.9", | ||
"@babel/core": "^7.8.7", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-proposal-export-default-from": "^7.8.3", | ||
"@babel/preset-env": "^7.8.7", | ||
"@types/classnames": "^2.2.10", | ||
"@types/lodash": "^4.14.149", | ||
"@types/node": "^13.1.2", | ||
"@types/node": "^13.9.1", | ||
"@types/prismjs": "^1.16.0", | ||
"@types/react": "^16.9.17", | ||
"@types/react-dom": "^16.9.4", | ||
"@types/react": "^16.9.23", | ||
"@types/react-dom": "^16.9.5", | ||
"@types/shelljs": "^0.8.6", | ||
"less": "^3.10.3", | ||
"less": "^3.11.1", | ||
"parcel-bundler": "^1.12.4", | ||
"prismjs": "^1.17.1", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0", | ||
"prismjs": "^1.19.0", | ||
"react": "^16.13.0", | ||
"react-dom": "^16.13.0", | ||
"shelljs": "^0.8.3", | ||
"ts-node": "^8.5.4", | ||
"tslint": "^5.20.1", | ||
"tslint-react": "^4.1.0", | ||
"typedoc": "^0.15.6", | ||
"typescript": "^3.7.4" | ||
"ts-node": "^8.6.2", | ||
"tslint": "^6.1.0", | ||
"tslint-react": "^4.2.0", | ||
"typedoc": "^0.17.0", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -64,2 +65,5 @@ "peerDependencies": { | ||
}, | ||
"resolutions": { | ||
"**/minimist": "^1.2.5" | ||
}, | ||
"scripts": { | ||
@@ -69,4 +73,5 @@ "example": "parcel example/*.html --open --out-dir temp --no-source-maps --no-hmr", | ||
"build-doc": "typedoc --options ./typedocconfig.js", | ||
"build-www": "ts-node tool/build-www" | ||
"build-www": "ts-node tool/build-www", | ||
"build-ts": "tsc -p tsconfig.json" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
594543
8780
7
1
+ Addedrc-util@^4.20.1
+ Addedadd-dom-event-listener@1.1.0(transitive)
+ Addedrc-util@4.21.1(transitive)
+ Addedreact-lifecycles-compat@3.0.4(transitive)
+ Addedshallowequal@1.1.0(transitive)
Updatedrc-tabs@^10.1.0