react-menu-list
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -0,1 +1,13 @@ | ||
## 6.0.0 (2018-10-31) | ||
### Breaking Changes | ||
* react-menu-list now requires React v16.6.0 or above. | ||
* The component passed to the optional MenuButton prop `ButtonComponent` must support a `domRef` prop which is passed as a ref to the button's DOM element. | ||
* The `open` method of MenuButton and SubMenuItem no longer takes a callback as a parameter. It returns a Promise now instead. | ||
### Improvements | ||
* No longer uses any deprecated APIs (legacy Context API, lifecycle methods, | ||
and ReactDOM.findDOMNode). | ||
* Added TypeScript type definitions. | ||
## 5.0.1 (2018-05-15) | ||
@@ -2,0 +14,0 @@ |
@@ -1,68 +0,56 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var Dropdown = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(Dropdown, _React$Component); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Dropdown = function (_React$Component) { | ||
(0, _inherits3.default)(Dropdown, _React$Component); | ||
function Dropdown() { | ||
(0, _classCallCheck3.default)(this, Dropdown); | ||
return (0, _possibleConstructorReturn3.default)(this, (Dropdown.__proto__ || (0, _getPrototypeOf2.default)(Dropdown)).apply(this, arguments)); | ||
(0, _classCallCheck2.default)(this, Dropdown); | ||
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Dropdown).apply(this, arguments)); | ||
} | ||
(0, _createClass3.default)(Dropdown, [{ | ||
key: 'render', | ||
(0, _createClass2.default)(Dropdown, [{ | ||
key: "render", | ||
value: function render() { | ||
return _react2.default.createElement( | ||
'div', | ||
{ style: { | ||
background: 'white', | ||
border: '1px solid rgba(0,0,0,.2)', | ||
boxShadow: '0 2px 4px rgba(0,0,0,0.2)', | ||
padding: '6px 0' | ||
} }, | ||
this.props.children | ||
); | ||
return _react.default.createElement("div", { | ||
style: { | ||
background: 'white', | ||
border: '1px solid rgba(0,0,0,.2)', | ||
boxShadow: '0 2px 4px rgba(0,0,0,0.2)', | ||
padding: '6px 0' | ||
} | ||
}, this.props.children); | ||
} | ||
}]); | ||
return Dropdown; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
Dropdown.propTypes = { | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = Dropdown; | ||
module.exports = exports['default']; | ||
//# sourceMapping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gcHJvcFR5cGVzID0ge1xuICAgIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZVxuICB9O1xuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdiBzdHlsZT17e1xuICAgICAgICBiYWNrZ3JvdW5kOiAnd2hpdGUnLFxuICAgICAgICBib3JkZXI6ICcxcHggc29saWQgcmdiYSgwLDAsMCwuMiknLFxuICAgICAgICBib3hTaGFkb3c6ICcwIDJweCA0cHggcmdiYSgwLDAsMCwwLjIpJyxcbiAgICAgICAgcGFkZGluZzogJzZweCAwJ1xuICAgICAgfX0+XG4gICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgPC9kaXY+XG4gICAgKTtcbiAgfVxufVxuIl19 | ||
(0, _defineProperty2.default)(Dropdown, "propTypes", { | ||
children: _propTypes.default.node | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Ecm9wZG93bi5qcyJdLCJuYW1lcyI6WyJEcm9wZG93biIsImJhY2tncm91bmQiLCJib3JkZXIiLCJib3hTaGFkb3ciLCJwYWRkaW5nIiwicHJvcHMiLCJjaGlsZHJlbiIsIlJlYWN0IiwiQ29tcG9uZW50IiwiUHJvcFR5cGVzIiwibm9kZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUE7O0FBRUE7O0lBTXFCQSxROzs7Ozs7Ozs7Ozs7NkJBS1Y7QUFDUCxhQUNFO0FBQUssUUFBQSxLQUFLLEVBQUU7QUFDVkMsVUFBQUEsVUFBVSxFQUFFLE9BREY7QUFFVkMsVUFBQUEsTUFBTSxFQUFFLDBCQUZFO0FBR1ZDLFVBQUFBLFNBQVMsRUFBRSwyQkFIRDtBQUlWQyxVQUFBQSxPQUFPLEVBQUU7QUFKQztBQUFaLFNBTUcsS0FBS0MsS0FBTCxDQUFXQyxRQU5kLENBREY7QUFVRDs7O0VBaEJtQ0MsZUFBTUMsUzs7OzhCQUF2QlIsUSxlQUNBO0FBQ2pCTSxFQUFBQSxRQUFRLEVBQUVHLG1CQUFVQztBQURILEMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBAZmxvdyAqL1xuXG5pbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHR5cGUge05vZGUgYXMgUmVhY3ROb2RlfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuXG50eXBlIFByb3BzID0ge1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIERyb3Bkb3duIGV4dGVuZHMgUmVhY3QuQ29tcG9uZW50PFByb3BzPiB7XG4gIHN0YXRpYyBwcm9wVHlwZXMgPSB7XG4gICAgY2hpbGRyZW46IFByb3BUeXBlcy5ub2RlXG4gIH07XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiAoXG4gICAgICA8ZGl2IHN0eWxlPXt7XG4gICAgICAgIGJhY2tncm91bmQ6ICd3aGl0ZScsXG4gICAgICAgIGJvcmRlcjogJzFweCBzb2xpZCByZ2JhKDAsMCwwLC4yKScsXG4gICAgICAgIGJveFNoYWRvdzogJzAgMnB4IDRweCByZ2JhKDAsMCwwLDAuMiknLFxuICAgICAgICBwYWRkaW5nOiAnNnB4IDAnXG4gICAgICB9fT5cbiAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICA8L2Rpdj5cbiAgICApO1xuICB9XG59XG4iXX0= |
@@ -1,37 +0,35 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _MenuEvent2 = _interopRequireDefault(require("./MenuEvent")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var ChosenEvent = | ||
/*#__PURE__*/ | ||
function (_MenuEvent) { | ||
(0, _inherits2.default)(ChosenEvent, _MenuEvent); | ||
var _MenuEvent2 = require('./MenuEvent'); | ||
var _MenuEvent3 = _interopRequireDefault(_MenuEvent2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var ChosenEvent = function (_MenuEvent) { | ||
(0, _inherits3.default)(ChosenEvent, _MenuEvent); | ||
function ChosenEvent(type, byKeyboard) { | ||
(0, _classCallCheck3.default)(this, ChosenEvent); | ||
var _this; | ||
var _this = (0, _possibleConstructorReturn3.default)(this, (ChosenEvent.__proto__ || (0, _getPrototypeOf2.default)(ChosenEvent)).call(this, type)); | ||
(0, _classCallCheck2.default)(this, ChosenEvent); | ||
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ChosenEvent).call(this, type)); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "byKeyboard", void 0); | ||
_this.byKeyboard = byKeyboard; | ||
@@ -42,6 +40,5 @@ return _this; | ||
return ChosenEvent; | ||
}(_MenuEvent3.default); | ||
}(_MenuEvent2.default); | ||
exports.default = ChosenEvent; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvQ2hvc2VuRXZlbnQuanMiXSwibmFtZXMiOlsiQ2hvc2VuRXZlbnQiLCJ0eXBlIiwiYnlLZXlib2FyZCIsIk1lbnVFdmVudCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVBOzs7Ozs7SUFFcUJBLFc7OztBQUduQix1QkFBWUMsSUFBWixFQUEwQkMsVUFBMUIsRUFBK0M7QUFBQTs7QUFBQSxnSkFDdkNELElBRHVDOztBQUU3QyxVQUFLQyxVQUFMLEdBQWtCQSxVQUFsQjtBQUY2QztBQUc5Qzs7O0VBTnNDQyxtQjs7a0JBQXBCSCxXIiwiZmlsZSI6IkNob3NlbkV2ZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyogQGZsb3cgKi9cblxuaW1wb3J0IE1lbnVFdmVudCBmcm9tICcuL01lbnVFdmVudCc7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIENob3NlbkV2ZW50IGV4dGVuZHMgTWVudUV2ZW50IHtcbiAgYnlLZXlib2FyZDogYm9vbGVhbjtcblxuICBjb25zdHJ1Y3Rvcih0eXBlOiBzdHJpbmcsIGJ5S2V5Ym9hcmQ6IGJvb2xlYW4pIHtcbiAgICBzdXBlcih0eXBlKTtcbiAgICB0aGlzLmJ5S2V5Ym9hcmQgPSBieUtleWJvYXJkO1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvQ2hvc2VuRXZlbnQuanMiXSwibmFtZXMiOlsiQ2hvc2VuRXZlbnQiLCJ0eXBlIiwiYnlLZXlib2FyZCIsIk1lbnVFdmVudCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUE7O0lBRXFCQSxXOzs7OztBQUduQix1QkFBWUMsSUFBWixFQUEwQkMsVUFBMUIsRUFBK0M7QUFBQTs7QUFBQTtBQUM3QyxpSEFBTUQsSUFBTjtBQUQ2QztBQUU3QyxVQUFLQyxVQUFMLEdBQWtCQSxVQUFsQjtBQUY2QztBQUc5Qzs7O0VBTnNDQyxtQiIsInNvdXJjZXNDb250ZW50IjpbIi8qIEBmbG93ICovXG5cbmltcG9ydCBNZW51RXZlbnQgZnJvbSAnLi9NZW51RXZlbnQnO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBDaG9zZW5FdmVudCBleHRlbmRzIE1lbnVFdmVudCB7XG4gIGJ5S2V5Ym9hcmQ6IGJvb2xlYW47XG5cbiAgY29uc3RydWN0b3IodHlwZTogc3RyaW5nLCBieUtleWJvYXJkOiBib29sZWFuKSB7XG4gICAgc3VwZXIodHlwZSk7XG4gICAgdGhpcy5ieUtleWJvYXJkID0gYnlLZXlib2FyZDtcbiAgfVxufVxuIl19 |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck"); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _createClass2 = require("babel-runtime/helpers/createClass"); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var MenuEvent = function () { | ||
var MenuEvent = | ||
/*#__PURE__*/ | ||
function () { | ||
function MenuEvent(type) { | ||
(0, _classCallCheck3.default)(this, MenuEvent); | ||
this.cancelBubble = false; | ||
this.defaultPrevented = false; | ||
(0, _classCallCheck2.default)(this, MenuEvent); | ||
(0, _defineProperty2.default)(this, "type", void 0); | ||
(0, _defineProperty2.default)(this, "cancelBubble", false); | ||
(0, _defineProperty2.default)(this, "defaultPrevented", false); | ||
this.type = type; | ||
} | ||
(0, _createClass3.default)(MenuEvent, [{ | ||
(0, _createClass2.default)(MenuEvent, [{ | ||
key: "stopPropagation", | ||
@@ -41,3 +42,2 @@ value: function stopPropagation() { | ||
exports.default = MenuEvent; | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldmVudHMvTWVudUV2ZW50LmpzIl0sIm5hbWVzIjpbIk1lbnVFdmVudCIsInR5cGUiLCJjYW5jZWxCdWJibGUiLCJkZWZhdWx0UHJldmVudGVkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0lBRXFCQSxTO0FBS25CLHFCQUFZQyxJQUFaLEVBQTBCO0FBQUE7QUFBQSxTQUgxQkMsWUFHMEIsR0FIRixLQUdFO0FBQUEsU0FGMUJDLGdCQUUwQixHQUZFLEtBRUY7O0FBQ3hCLFNBQUtGLElBQUwsR0FBWUEsSUFBWjtBQUNEOzs7O3NDQUVpQjtBQUNoQixXQUFLQyxZQUFMLEdBQW9CLElBQXBCO0FBQ0Q7OztxQ0FFZ0I7QUFDZixXQUFLQyxnQkFBTCxHQUF3QixJQUF4QjtBQUNEOzs7OztrQkFma0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1lbnVFdmVudCB7XG4gIHR5cGU6IHN0cmluZztcbiAgY2FuY2VsQnViYmxlOiBib29sZWFuID0gZmFsc2U7XG4gIGRlZmF1bHRQcmV2ZW50ZWQ6IGJvb2xlYW4gPSBmYWxzZTtcblxuICBjb25zdHJ1Y3Rvcih0eXBlOiBzdHJpbmcpIHtcbiAgICB0aGlzLnR5cGUgPSB0eXBlO1xuICB9XG5cbiAgc3RvcFByb3BhZ2F0aW9uKCkge1xuICAgIHRoaXMuY2FuY2VsQnViYmxlID0gdHJ1ZTtcbiAgfVxuXG4gIHByZXZlbnREZWZhdWx0KCkge1xuICAgIHRoaXMuZGVmYXVsdFByZXZlbnRlZCA9IHRydWU7XG4gIH1cbn1cbiJdfQ== |
@@ -1,62 +0,56 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _MenuList = require('./MenuList'); | ||
Object.defineProperty(exports, 'MenuList', { | ||
Object.defineProperty(exports, "MenuList", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_MenuList).default; | ||
return _MenuList.default; | ||
} | ||
}); | ||
var _MenuItem = require('./MenuItem'); | ||
Object.defineProperty(exports, 'MenuItem', { | ||
Object.defineProperty(exports, "MenuItem", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_MenuItem).default; | ||
return _MenuItem.default; | ||
} | ||
}); | ||
var _MenuListInspector = require('./MenuListInspector'); | ||
Object.defineProperty(exports, 'MenuListInspector', { | ||
Object.defineProperty(exports, "MenuListInspector", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_MenuListInspector).default; | ||
return _MenuListInspector.default; | ||
} | ||
}); | ||
var _Dropdown = require('./Dropdown'); | ||
Object.defineProperty(exports, 'Dropdown', { | ||
Object.defineProperty(exports, "Dropdown", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_Dropdown).default; | ||
return _Dropdown.default; | ||
} | ||
}); | ||
var _MenuButton = require('./MenuButton'); | ||
Object.defineProperty(exports, 'MenuButton', { | ||
Object.defineProperty(exports, "MenuButton", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_MenuButton).default; | ||
return _MenuButton.default; | ||
} | ||
}); | ||
var _SubMenuItem = require('./SubMenuItem'); | ||
Object.defineProperty(exports, 'SubMenuItem', { | ||
Object.defineProperty(exports, "SubMenuItem", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_SubMenuItem).default; | ||
return _SubMenuItem.default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0Il0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs2Q0FFUUEsTzs7Ozs7Ozs7OzZDQUNBQSxPOzs7Ozs7Ozs7c0RBQ0FBLE87Ozs7Ozs7Ozs2Q0FDQUEsTzs7Ozs7Ozs7OytDQUNBQSxPOzs7Ozs7Ozs7Z0RBQ0FBLE8iLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBAZmxvdyAqL1xuXG5leHBvcnQge2RlZmF1bHQgYXMgTWVudUxpc3R9IGZyb20gJy4vTWVudUxpc3QnO1xuZXhwb3J0IHtkZWZhdWx0IGFzIE1lbnVJdGVtfSBmcm9tICcuL01lbnVJdGVtJztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBNZW51TGlzdEluc3BlY3Rvcn0gZnJvbSAnLi9NZW51TGlzdEluc3BlY3Rvcic7XG5leHBvcnQge2RlZmF1bHQgYXMgRHJvcGRvd259IGZyb20gJy4vRHJvcGRvd24nO1xuZXhwb3J0IHtkZWZhdWx0IGFzIE1lbnVCdXR0b259IGZyb20gJy4vTWVudUJ1dHRvbic7XG5leHBvcnQge2RlZmF1bHQgYXMgU3ViTWVudUl0ZW19IGZyb20gJy4vU3ViTWVudUl0ZW0nO1xuIl19 | ||
var _MenuList = _interopRequireDefault(require("./MenuList")); | ||
var _MenuItem = _interopRequireDefault(require("./MenuItem")); | ||
var _MenuListInspector = _interopRequireDefault(require("./MenuListInspector")); | ||
var _Dropdown = _interopRequireDefault(require("./Dropdown")); | ||
var _MenuButton = _interopRequireDefault(require("./MenuButton")); | ||
var _SubMenuItem = _interopRequireDefault(require("./SubMenuItem")); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVBOztBQUNBOztBQUNBOztBQUNBOztBQUNBOztBQUNBIiwic291cmNlc0NvbnRlbnQiOlsiLyogQGZsb3cgKi9cblxuZXhwb3J0IHtkZWZhdWx0IGFzIE1lbnVMaXN0fSBmcm9tICcuL01lbnVMaXN0JztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBNZW51SXRlbX0gZnJvbSAnLi9NZW51SXRlbSc7XG5leHBvcnQge2RlZmF1bHQgYXMgTWVudUxpc3RJbnNwZWN0b3J9IGZyb20gJy4vTWVudUxpc3RJbnNwZWN0b3InO1xuZXhwb3J0IHtkZWZhdWx0IGFzIERyb3Bkb3dufSBmcm9tICcuL0Ryb3Bkb3duJztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBNZW51QnV0dG9ufSBmcm9tICcuL01lbnVCdXR0b24nO1xuZXhwb3J0IHtkZWZhdWx0IGFzIFN1Yk1lbnVJdGVtfSBmcm9tICcuL1N1Yk1lbnVJdGVtJztcbmV4cG9ydCB0eXBlIHtGbG9hdEFuY2hvck9wdGlvbnN9IGZyb20gJy4vU3ViTWVudUl0ZW0nO1xuIl19 |
@@ -1,3 +0,5 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,10 +10,6 @@ value: true | ||
var _kefir = require('kefir'); | ||
var _kefir = _interopRequireDefault(require("kefir")); | ||
var _kefir2 = _interopRequireDefault(_kefir); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function fromEventsCapture(target, eventName) { | ||
return _kefir2.default.stream(function (emitter) { | ||
return _kefir.default.stream(function (emitter) { | ||
target.addEventListener(eventName, emitter.emit, true); | ||
@@ -23,4 +21,2 @@ return function () { | ||
} | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9saWIvZnJvbUV2ZW50c0NhcHR1cmUuanMiXSwibmFtZXMiOlsiZnJvbUV2ZW50c0NhcHR1cmUiLCJ0YXJnZXQiLCJldmVudE5hbWUiLCJLZWZpciIsInN0cmVhbSIsImFkZEV2ZW50TGlzdGVuZXIiLCJlbWl0dGVyIiwiZW1pdCIsInJlbW92ZUV2ZW50TGlzdGVuZXIiXSwibWFwcGluZ3MiOiI7Ozs7O2tCQUl3QkEsaUI7O0FBRnhCOzs7Ozs7QUFFZSxTQUFTQSxpQkFBVCxDQUEyQkMsTUFBM0IsRUFBZ0RDLFNBQWhELEVBQTZGO0FBQzFHLFNBQU9DLGdCQUFNQyxNQUFOLENBQWEsbUJBQVc7QUFDN0JILFdBQU9JLGdCQUFQLENBQXdCSCxTQUF4QixFQUFtQ0ksUUFBUUMsSUFBM0MsRUFBaUQsSUFBakQ7QUFDQSxXQUFPLFlBQU07QUFDWE4sYUFBT08sbUJBQVAsQ0FBMkJOLFNBQTNCLEVBQXNDSSxRQUFRQ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kosSUFBQUEsTUFBTSxDQUFDSyxnQkFBUCxDQUF3QkosU0FBeEIsRUFBbUNHLE9BQU8sQ0FBQ0UsSUFBM0MsRUFBaUQsSUFBakQ7QUFDQSxXQUFPLFlBQU07QUFDWE4sTUFBQUEsTUFBTSxDQUFDTyxtQkFBUCxDQUEyQk4sU0FBM0IsRUFBc0NHLE9BQU8sQ0FBQ0UsSUFBOUMsRUFBb0QsSUFBcEQ7QUFDRCxLQUZEO0FBR0QsR0FMTSxDQUFQO0FBTUQiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBAZmxvdyAqL1xuXG5pbXBvcnQgS2VmaXIgZnJvbSAna2VmaXInO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBmcm9tRXZlbnRzQ2FwdHVyZSh0YXJnZXQ6IEV2ZW50VGFyZ2V0LCBldmVudE5hbWU6IHN0cmluZyk6IEtlZmlyLk9ic2VydmFibGU8T2JqZWN0PiB7XG4gIHJldHVybiBLZWZpci5zdHJlYW0oZW1pdHRlciA9PiB7XG4gICAgdGFyZ2V0LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCBlbWl0dGVyLmVtaXQsIHRydWUpO1xuICAgIHJldHVybiAoKSA9PiB7XG4gICAgICB0YXJnZXQucmVtb3ZlRXZlbnRMaXN0ZW5lcihldmVudE5hbWUsIGVtaXR0ZXIuZW1pdCwgdHJ1ZSk7XG4gICAgfTtcbiAgfSk7XG59XG4iXX0= |
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.default = pointRectDistance; | ||
function pointRectDistance(px, py, rx, ry, rwidth, rheight) { | ||
@@ -13,3 +14,2 @@ var cx = Math.max(Math.min(px, rx + rwidth), rx); | ||
} | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9saWIvcG9pbnRSZWN0RGlzdGFuY2UuanMiXSwibmFtZXMiOlsicG9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IjpbIi8qIEBmbG93ICovXG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHBvaW50UmVjdERpc3RhbmNlKFxuICBweDogbnVtYmVyLCBweTogbnVtYmVyLCByeDogbnVtYmVyLCByeTogbnVtYmVyLCByd2lkdGg6IG51bWJlciwgcmhlaWdodDogbnVtYmVyXG4pOiBudW1iZXIge1xuICBjb25zdCBjeCA9IE1hdGgubWF4KE1hdGgubWluKHB4LCByeCtyd2lkdGgpLCByeCk7XG4gIGNvbnN0IGN5ID0gTWF0aC5tYXgoTWF0aC5taW4ocHksIHJ5K3JoZWlnaHQpLCByeSk7XG4gIHJldHVybiBNYXRoLnNxcnQoKHB4LWN4KSoocHgtY3gpICsgKHB5LWN5KSoocHktY3kpKTtcbn1cbiJdfQ== |
@@ -1,104 +0,83 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _getIterator2 = require('babel-runtime/core-js/get-iterator'); | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread")); | ||
var _getIterator3 = _interopRequireDefault(_getIterator2); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _reactFloatAnchor = _interopRequireDefault(require("react-float-anchor")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _kefir = _interopRequireDefault(require("kefir")); | ||
var _react = require('react'); | ||
var _kefirBus = _interopRequireDefault(require("kefir-bus")); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _fromEventsCapture = _interopRequireDefault(require("./lib/fromEventsCapture")); | ||
var _reactDom = require('react-dom'); | ||
var _setRef = _interopRequireDefault(require("./lib/setRef")); | ||
var _propTypes = require('prop-types'); | ||
var _MenuListInspector = _interopRequireDefault(require("./MenuListInspector")); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var MenuButton = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(MenuButton, _React$Component); | ||
var _reactFloatAnchor = require('react-float-anchor'); | ||
var _reactFloatAnchor2 = _interopRequireDefault(_reactFloatAnchor); | ||
var _kefir = require('kefir'); | ||
var _kefir2 = _interopRequireDefault(_kefir); | ||
var _kefirBus = require('kefir-bus'); | ||
var _kefirBus2 = _interopRequireDefault(_kefirBus); | ||
var _fromEventsCapture = require('./lib/fromEventsCapture'); | ||
var _fromEventsCapture2 = _interopRequireDefault(_fromEventsCapture); | ||
var _MenuListInspector = require('./MenuListInspector'); | ||
var _MenuListInspector2 = _interopRequireDefault(_MenuListInspector); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/* eslint-disable react/no-find-dom-node */ | ||
var MenuButton = function (_React$Component) { | ||
(0, _inherits3.default)(MenuButton, _React$Component); | ||
function MenuButton() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
var _temp, _this, _ret; | ||
var _this; | ||
(0, _classCallCheck3.default)(this, MenuButton); | ||
(0, _classCallCheck2.default)(this, MenuButton); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuButton.__proto__ || (0, _getPrototypeOf2.default)(MenuButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = { | ||
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(MenuButton)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "state", { | ||
opened: false | ||
}, _this._onClose = (0, _kefirBus2.default)(), _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_floatAnchorRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_anchorEl", null); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_onClose", (0, _kefirBus.default)()); | ||
return _this; | ||
} | ||
(0, _createClass3.default)(MenuButton, [{ | ||
key: 'open', | ||
value: function open(callback) { | ||
(0, _createClass2.default)(MenuButton, [{ | ||
key: "open", | ||
value: function open() { | ||
var _this2 = this; | ||
if (this.state.opened) return; | ||
if (this.props.onWillOpen) this.props.onWillOpen(); | ||
this.setState({ opened: true }, function () { | ||
if (_this2.props.onDidOpen) _this2.props.onDidOpen(); | ||
if (callback) callback(); | ||
}); | ||
if (this.state.opened) return Promise.resolve(); | ||
if (this.props.onWillOpen) this.props.onWillOpen(); // Clicking outside of the dropdown or pressing escape should close the | ||
// dropdown. | ||
// Clicking outside of the dropdown or pressing escape should close the | ||
// dropdown. | ||
_kefir2.default.merge([_kefir2.default.merge([(0, _fromEventsCapture2.default)(window, 'click'), (0, _fromEventsCapture2.default)(window, 'focus')]).filter(function (e) { | ||
var el = (0, _reactDom.findDOMNode)(_this2); | ||
_kefir.default.merge([_kefir.default.merge([(0, _fromEventsCapture.default)(window, 'click'), (0, _fromEventsCapture.default)(window, 'focus')]).filter(function (e) { | ||
var el = _this2._anchorEl; | ||
var _iteratorNormalCompletion = true; | ||
@@ -109,5 +88,4 @@ var _didIteratorError = false; | ||
try { | ||
for (var _iterator = (0, _getIterator3.default)(_reactFloatAnchor2.default.parentNodes(e.target)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
for (var _iterator = _reactFloatAnchor.default.parentNodes(e.target)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var node = _step.value; | ||
if (node === el) return false; | ||
@@ -120,3 +98,3 @@ } | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
@@ -132,3 +110,3 @@ } | ||
return true; | ||
}), _kefir2.default.fromEvents(window, 'keydown').filter(function (e) { | ||
}), _kefir.default.fromEvents(window, 'keydown').filter(function (e) { | ||
return e.key ? e.key === 'Escape' : e.which === 27; | ||
@@ -141,13 +119,25 @@ }).map(function (e) { | ||
}); | ||
return new Promise(function (resolve) { | ||
_this2.setState({ | ||
opened: true | ||
}, function () { | ||
if (_this2.props.onDidOpen) _this2.props.onDidOpen(); | ||
resolve(); | ||
}); | ||
}); | ||
} | ||
}, { | ||
key: 'close', | ||
key: "close", | ||
value: function close() { | ||
if (!this.state.opened) return; | ||
if (this.props.onWillClose) this.props.onWillClose(); | ||
this.setState({ opened: false }); | ||
this.setState({ | ||
opened: false | ||
}); | ||
this._onClose.emit(); | ||
} | ||
}, { | ||
key: 'toggle', | ||
key: "toggle", | ||
value: function toggle() { | ||
@@ -161,8 +151,10 @@ if (this.state.opened) { | ||
}, { | ||
key: 'reposition', | ||
key: "reposition", | ||
value: function reposition() { | ||
this._floatAnchor.reposition(); | ||
var floatAnchor = this._floatAnchorRef.current; | ||
if (!floatAnchor) throw new Error(); | ||
floatAnchor.reposition(); | ||
} | ||
}, { | ||
key: '_itemChosen', | ||
key: "_itemChosen", | ||
value: function _itemChosen() { | ||
@@ -172,3 +164,3 @@ this.close(); | ||
}, { | ||
key: 'componentWillUnmount', | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -178,38 +170,39 @@ this._onClose.emit(); | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _this3 = this; | ||
var _props = this.props, | ||
children = _props.children, | ||
menu = _props.menu, | ||
positionOptions = _props.positionOptions, | ||
menuZIndex = _props.menuZIndex, | ||
disabled = _props.disabled, | ||
title = _props.title, | ||
ButtonComponent = _props.ButtonComponent; | ||
var _this$props = this.props, | ||
children = _this$props.children, | ||
menu = _this$props.menu, | ||
positionOptions = _this$props.positionOptions, | ||
menuZIndex = _this$props.menuZIndex, | ||
disabled = _this$props.disabled, | ||
title = _this$props.title, | ||
ButtonComponent = _this$props.ButtonComponent; | ||
var opened = this.state.opened; | ||
var style = this.props.style; | ||
var className = this.props.className; | ||
if (opened) { | ||
if (this.props.openedStyle) { | ||
style = (0, _extends3.default)({}, style, this.props.openedStyle); | ||
style = (0, _objectSpread2.default)({}, style, this.props.openedStyle); | ||
} | ||
if (this.props.openedClassName) { | ||
className = (className || '') + ' ' + this.props.openedClassName; | ||
className = "".concat(className || '', " ").concat(this.props.openedClassName); | ||
} | ||
} | ||
return _react2.default.createElement(_reactFloatAnchor2.default, { | ||
ref: function ref(el) { | ||
if (el) _this3._floatAnchor = el; | ||
}, | ||
return _react.default.createElement(_reactFloatAnchor.default, { | ||
ref: this._floatAnchorRef, | ||
options: positionOptions, | ||
zIndex: menuZIndex, | ||
anchor: _react2.default.createElement( | ||
ButtonComponent, | ||
{ | ||
type: 'button', | ||
anchor: function anchor(anchorRef) { | ||
return _react.default.createElement(ButtonComponent, { | ||
domRef: function domRef(el) { | ||
_this3._anchorEl = el; | ||
(0, _setRef.default)(anchorRef, el); | ||
}, | ||
type: "button", | ||
className: className, | ||
@@ -219,2 +212,3 @@ style: style, | ||
if (e.button !== 0) return; | ||
_this3.toggle(); | ||
@@ -227,16 +221,13 @@ }, | ||
}, | ||
'aria-haspopup': true, | ||
'aria-expanded': opened, | ||
"aria-haspopup": true, | ||
"aria-expanded": opened, | ||
disabled: disabled, | ||
title: title | ||
}, | ||
children | ||
), | ||
float: !opened ? null : _react2.default.createElement( | ||
_MenuListInspector2.default, | ||
{ onItemChosen: function onItemChosen() { | ||
return _this3._itemChosen(); | ||
} }, | ||
menu | ||
) | ||
}, children); | ||
}, | ||
float: !opened ? null : _react.default.createElement(_MenuListInspector.default, { | ||
onItemChosen: function onItemChosen() { | ||
return _this3._itemChosen(); | ||
} | ||
}, menu) | ||
}); | ||
@@ -246,28 +237,34 @@ } | ||
return MenuButton; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
MenuButton.propTypes = { | ||
className: _propTypes2.default.string, | ||
style: _propTypes2.default.object, | ||
disabled: _propTypes2.default.bool, | ||
title: _propTypes2.default.string, | ||
openedClassName: _propTypes2.default.string, | ||
openedStyle: _propTypes2.default.object, | ||
positionOptions: _propTypes2.default.object, | ||
menuZIndex: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), | ||
ButtonComponent: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]), | ||
children: _propTypes2.default.node, | ||
menu: _propTypes2.default.element, | ||
onWillOpen: _propTypes2.default.func, | ||
onDidOpen: _propTypes2.default.func, | ||
onWillClose: _propTypes2.default.func | ||
}; | ||
MenuButton.defaultProps = { | ||
positionOptions: { position: 'bottom', hAlign: 'left' }, | ||
ButtonComponent: 'button' | ||
}; | ||
exports.default = MenuButton; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51QnV0dG9uLmpzIl0sIm5hbWVzIjpbIk1lbnVCdXR0b24iLCJzdGF0ZSIsIm9wZW5lZCIsIl9vbkNsb3NlIiwiY2FsbGJhY2siLCJwcm9wcyIsIm9uV2lsbE9wZW4iLCJzZXRTdGF0ZSIsIm9uRGlkT3BlbiIsIktlZmlyIiwibWVyZ2UiLCJ3aW5kb3ciLCJmaWx0ZXIiLCJlbCIsIkZsb2F0QW5jaG9yIiwicGFyZW50Tm9kZXMiLCJlIiwidGFyZ2V0Iiwibm9kZSIsImZyb21FdmVudHMiLCJrZXkiLCJ3aGljaCIsIm1hcCIsInByZXZlbnREZWZhdWx0Iiwic3RvcFByb3BhZ2F0aW9uIiwidGFrZVVudGlsQnkiLCJvblZhbHVlIiwiY2xvc2UiLCJvbldpbGxDbG9zZSIsImVtaXQiLCJvcGVuIiwiX2Zsb2F0QW5jaG9yIiwicmVwb3NpdGlvbiIsImNoaWxkcmVuIiwibWVudSIsInBvc2l0aW9uT3B0aW9ucyIsIm1lbnVaSW5kZXgiLCJkaXNhYmxlZCIsInRpdGxlIiwiQnV0dG9uQ29tcG9uZW50Iiwic3R5bGUiLCJjbG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bGV9XG4gICAgICAgICAgICBvbk1vdXNlRG93bj17ZSA9PiB7XG4gICAgICAgICAgICAgIGlmIChlLmJ1dHRvbiAhPT0gMCkgcmV0dXJuO1xuICAgICAgICAgICAgICB0aGlzLnRvZ2dsZSgpO1xuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIG9uS2V5UHJlc3M9e2U9PntcbiAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInIHx8IGUua2V5ID09PSAnICcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgYXJpYS1oYXNwb3B1cD17dHJ1ZX1cbiAgICAgICAgICAgIGFyaWEtZXhwYW5kZWQ9e29wZW5lZH1cbiAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgIHRpdGxlPXt0aXRsZX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9CdXR0b25Db21wb25lbnQ+XG4gICAgICAgIH1cbiAgICAgICAgZmxvYXQ9e1xuICAgICAgICAgICFvcGVuZWQgPyBudWxsIDpcbiAgICAgICAgICAgIDxNZW51TGlzdEluc3BlY3RvciBvbkl0ZW1DaG9zZW49eygpID0+IHRoaXMuX2l0ZW1DaG9zZW4oKX0+XG4gICAgICAgICAgICAgIHttZW51fVxuICAgICAgICAgICAgPC9NZW51TGlzdEluc3BlY3Rvcj5cbiAgICAgICAgfVxuICAgICAgLz5cbiAgICApO1xuICB9XG59XG4iXX0= | ||
(0, _defineProperty2.default)(MenuButton, "propTypes", { | ||
className: _propTypes.default.string, | ||
style: _propTypes.default.object, | ||
disabled: _propTypes.default.bool, | ||
title: _propTypes.default.string, | ||
openedClassName: _propTypes.default.string, | ||
openedStyle: _propTypes.default.object, | ||
positionOptions: _propTypes.default.object, | ||
menuZIndex: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), | ||
ButtonComponent: _propTypes.default.func, | ||
children: _propTypes.default.node, | ||
menu: _propTypes.default.element, | ||
onWillOpen: _propTypes.default.func, | ||
onDidOpen: _propTypes.default.func, | ||
onWillClose: _propTypes.default.func | ||
}); | ||
(0, _defineProperty2.default)(MenuButton, "defaultProps", { | ||
positionOptions: { | ||
position: 'bottom', | ||
hAlign: 'left' | ||
}, | ||
ButtonComponent: function ButtonComponent(_ref) { | ||
var domRef = _ref.domRef, | ||
props = (0, _objectWithoutProperties2.default)(_ref, ["domRef"]); | ||
return _react.default.createElement("button", (0, _extends2.default)({ | ||
ref: domRef | ||
}, props)); | ||
} | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51QnV0dG9uLmpzIl0sIm5hbWVzIjpbIk1lbnVCdXR0b24iLCJvcGVuZWQiLCJSZWFjdCIsImNyZWF0ZVJlZiIsInN0YXRlIiwiUHJvbWlzZSIsInJlc29sdmUiLCJwcm9wcyIsIm9uV2lsbE9wZW4iLCJLZWZpciIsIm1lcmdlIiwid2luZG93IiwiZmlsdGVyIiwiZSIsImVsIiwiX2FuY2hvckVsIiwiRmxvYXRBbmNob3IiLCJwYXJlbnROb2RlcyIsInRhcmdldCIsIm5vZGUiLCJmcm9tRXZlbnRzIiwia2V5Iiwid2hpY2giLCJtYXAiLCJwcmV2ZW50RGVmYXVsdCIsInN0b3BQcm9wYWdhdGlvbiIsInRha2VVbnRpbEJ5IiwiX29uQ2xvc2UiLCJvblZhbHVlIiwiY2xvc2UiLCJzZXRTdGF0ZSIsIm9uRGlkT3BlbiIsIm9uV2lsbENsb3NlIiwiZW1pdCIsIm9wZW4iLCJmbG9hdEFuY2hvciIsIl9mbG9hdEFuY2hvclJlZiIsImN1cnJlbnQiLCJFcnJvciIsInJlcG9zaXRpb24iLCJjaGlsZHJlbiIsIm1lbnUiLCJwb3NpdGlvbk9wdGl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3RoaXMuX2Zsb2F0QW5jaG9yUmVmfVxuICAgICAgICBvcHRpb25zPXtwb3NpdGlvbk9wdGlvbnN9XG4gICAgICAgIHpJbmRleD17bWVudVpJbmRleH1cbiAgICAgICAgYW5jaG9yPXthbmNob3JSZWYgPT5cbiAgICAgICAgICA8QnV0dG9uQ29tcG9uZW50XG4gICAgICAgICAgICBkb21SZWY9e2VsID0+IHtcbiAgICAgICAgICAgICAgdGhpcy5fYW5jaG9yRWwgPSBlbDtcbiAgICAgICAgICAgICAgc2V0UmVmKGFuY2hvclJlZiwgZWwpO1xuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxuICAgICAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICBvbk1vdXNlRG93bj17ZSA9PiB7XG4gICAgICAgICAgICAgIGlmIChlLmJ1dHRvbiAhPT0gMCkgcmV0dXJuO1xuICAgICAgICAgICAgICB0aGlzLnRvZ2dsZSgpO1xuICAgICAgICAgICAgfX1cbiAgICAgICAgICAgIG9uS2V5UHJlc3M9e2U9PntcbiAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInIHx8IGUua2V5ID09PSAnICcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvZ2dsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgYXJpYS1oYXNwb3B1cD17dHJ1ZX1cbiAgICAgICAgICAgIGFyaWEtZXhwYW5kZWQ9e29wZW5lZH1cbiAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgIHRpdGxlPXt0aXRsZX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9CdXR0b25Db21wb25lbnQ+XG4gICAgICAgIH1cbiAgICAgICAgZmxvYXQ9e1xuICAgICAgICAgICFvcGVuZWQgPyBudWxsIDpcbiAgICAgICAgICAgIDxNZW51TGlzdEluc3BlY3RvciBvbkl0ZW1DaG9zZW49eygpID0+IHRoaXMuX2l0ZW1DaG9zZW4oKX0+XG4gICAgICAgICAgICAgIHttZW51fVxuICAgICAgICAgICAgPC9NZW51TGlzdEluc3BlY3Rvcj5cbiAgICAgICAgfVxuICAgICAgLz5cbiAgICApO1xuICB9XG59XG4iXX0= |
@@ -1,68 +0,70 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _ChosenEvent = _interopRequireDefault(require("./events/ChosenEvent")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _MenuList = require("./MenuList"); | ||
var _react = require('react'); | ||
var _setRef = _interopRequireDefault(require("./lib/setRef")); | ||
var _react2 = _interopRequireDefault(_react); | ||
var MenuItem = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(MenuItem, _React$Component); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _ChosenEvent = require('./events/ChosenEvent'); | ||
var _ChosenEvent2 = _interopRequireDefault(_ChosenEvent); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var MenuItem = function (_React$Component) { | ||
(0, _inherits3.default)(MenuItem, _React$Component); | ||
function MenuItem() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
var _temp, _this, _ret; | ||
var _this; | ||
(0, _classCallCheck3.default)(this, MenuItem); | ||
(0, _classCallCheck2.default)(this, MenuItem); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { | ||
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(MenuItem)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuListHandle", void 0); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "state", { | ||
highlighted: false | ||
}, _this._elSetter = function (el) { | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_el", void 0); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_elSetter", function (el) { | ||
_this._el = el; | ||
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
if (_this.props.domRef) { | ||
(0, _setRef.default)(_this.props.domRef, el); | ||
} | ||
}); | ||
return _this; | ||
} | ||
(0, _createClass3.default)(MenuItem, [{ | ||
key: 'hasHighlight', | ||
(0, _createClass2.default)(MenuItem, [{ | ||
key: "hasHighlight", | ||
value: function hasHighlight() { | ||
@@ -72,3 +74,3 @@ return this.state.highlighted; | ||
}, { | ||
key: 'takeKeyboard', | ||
key: "takeKeyboard", | ||
value: function takeKeyboard() { | ||
@@ -78,3 +80,3 @@ this._menuListHandle.takeKeyboard(); | ||
}, { | ||
key: 'releaseKeyboard', | ||
key: "releaseKeyboard", | ||
value: function releaseKeyboard() { | ||
@@ -84,3 +86,3 @@ this._menuListHandle.releaseKeyboard(); | ||
}, { | ||
key: 'lockHighlight', | ||
key: "lockHighlight", | ||
value: function lockHighlight() { | ||
@@ -90,8 +92,6 @@ this._menuListHandle.lockHighlight(); | ||
}, { | ||
key: 'unlockHighlight', | ||
key: "unlockHighlight", | ||
value: function unlockHighlight() { | ||
this._menuListHandle.unlockHighlight(); | ||
} | ||
// byKeyboard forces focus immediately and scrolls the item into view. | ||
} // byKeyboard forces focus immediately and scrolls the item into view. | ||
// With it false, the highlight might be delayed depending on mouse movement | ||
@@ -101,3 +101,3 @@ // and won't cause anything to scroll. | ||
}, { | ||
key: 'highlight', | ||
key: "highlight", | ||
value: function highlight() { | ||
@@ -109,3 +109,3 @@ var byKeyboard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
}, { | ||
key: 'unhighlight', | ||
key: "unhighlight", | ||
value: function unhighlight() { | ||
@@ -115,3 +115,3 @@ this._menuListHandle.unhighlight(); | ||
}, { | ||
key: 'moveCursor', | ||
key: "moveCursor", | ||
value: function moveCursor(direction, prevCursorLocation) { | ||
@@ -121,3 +121,3 @@ this._menuListHandle.moveCursor(direction, prevCursorLocation); | ||
}, { | ||
key: 'componentDidMount', | ||
key: "componentDidMount", | ||
value: function componentDidMount() { | ||
@@ -129,8 +129,11 @@ var _this2 = this; | ||
this._menuListHandle = this.context.menuList.registerItem(this.props, { | ||
this._menuListHandle = this.context.registerItem(this.props, { | ||
notifyHighlighted: function notifyHighlighted(highlighted, byKeyboard, direction, prevCursorLocation) { | ||
_this2.setState({ highlighted: highlighted }, function () { | ||
_this2.setState({ | ||
highlighted: highlighted | ||
}, function () { | ||
if (highlighted && byKeyboard) { | ||
var _el = _this2._el; | ||
/*:: if (!el) throw new Error(); */ | ||
if (typeof _el.scrollIntoViewIfNeeded === 'function') { | ||
@@ -143,4 +146,9 @@ _el.scrollIntoViewIfNeeded(); | ||
}); | ||
if (_this2.props.onHighlightChange) { | ||
_this2.props.onHighlightChange(highlighted, { byKeyboard: byKeyboard, prevCursorLocation: prevCursorLocation, direction: direction }); | ||
_this2.props.onHighlightChange(highlighted, { | ||
byKeyboard: byKeyboard == null ? undefined : byKeyboard, | ||
prevCursorLocation: prevCursorLocation == null ? undefined : prevCursorLocation, | ||
direction: direction == null ? undefined : direction | ||
}); | ||
} | ||
@@ -154,5 +162,7 @@ }, | ||
break; | ||
case 'left': | ||
if (_this2.props.onLeftPushed) _this2.props.onLeftPushed(event); | ||
break; | ||
case 'right': | ||
@@ -166,3 +176,3 @@ if (_this2.props.onRightPushed) _this2.props.onRightPushed(event); | ||
}, { | ||
key: 'componentWillUnmount', | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -172,78 +182,68 @@ this._menuListHandle.unregister(); | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(newProps) { | ||
this._menuListHandle.updateProps(newProps); | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
this._menuListHandle.updateProps(this.props); | ||
} | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _this3 = this; | ||
var _props = this.props, | ||
children = _props.children, | ||
onMouseLeave = _props.onMouseLeave; | ||
var _this$props = this.props, | ||
children = _this$props.children, | ||
onMouseLeave = _this$props.onMouseLeave; | ||
var highlighted = this.state.highlighted; | ||
var style = this.props.style; | ||
var className = this.props.className; | ||
if (highlighted) { | ||
if (this.props.highlightedStyle) { | ||
style = (0, _extends3.default)({}, style, this.props.highlightedStyle); | ||
style = (0, _objectSpread2.default)({}, style, this.props.highlightedStyle); | ||
} | ||
if (this.props.highlightedClassName) { | ||
className = (className || '') + ' ' + this.props.highlightedClassName; | ||
className = "".concat(className || '', " ").concat(this.props.highlightedClassName); | ||
} | ||
} | ||
return _react2.default.createElement( | ||
'div', | ||
{ | ||
ref: this._elSetter, | ||
style: style, | ||
className: className, | ||
onClick: function onClick() { | ||
return _this3._menuListHandle.itemChosen(); | ||
}, | ||
onMouseEnter: function onMouseEnter() { | ||
return _this3.highlight(false); | ||
}, | ||
onMouseLeave: onMouseLeave || function () { | ||
return _this3.unhighlight(); | ||
}, | ||
role: 'menuitem', | ||
'aria-haspopup': this.props['aria-haspopup'], | ||
'aria-expanded': this.props['aria-expanded'] | ||
return _react.default.createElement("div", { | ||
ref: this._elSetter, | ||
style: style, | ||
className: className, | ||
onClick: function onClick() { | ||
return _this3._menuListHandle.itemChosen(); | ||
}, | ||
children | ||
); | ||
onMouseEnter: function onMouseEnter() { | ||
return _this3.highlight(false); | ||
}, | ||
onMouseLeave: onMouseLeave || function () { | ||
return _this3.unhighlight(); | ||
}, | ||
role: "menuitem", | ||
"aria-haspopup": this.props['aria-haspopup'], | ||
"aria-expanded": this.props['aria-expanded'] | ||
}, children); | ||
} | ||
}]); | ||
return MenuItem; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
MenuItem.propTypes = { | ||
onItemChosen: _propTypes2.default.func, | ||
onHighlightChange: _propTypes2.default.func, | ||
onLeftPushed: _propTypes2.default.func, | ||
onRightPushed: _propTypes2.default.func, | ||
className: _propTypes2.default.string, | ||
style: _propTypes2.default.object, | ||
highlightedClassName: _propTypes2.default.string, | ||
highlightedStyle: _propTypes2.default.object, | ||
index: _propTypes2.default.number, | ||
onMouseLeave: _propTypes2.default.func, | ||
children: _propTypes2.default.node, | ||
'aria-haspopup': _propTypes2.default.bool, | ||
'aria-expanded': _propTypes2.default.bool | ||
}; | ||
MenuItem.contextTypes = { | ||
menuList: _propTypes2.default.object | ||
}; | ||
exports.default = MenuItem; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51SXRlbS5qcyJdLCJuYW1lcyI6WyJNZW51SXRlbSIsInN0YXRlIiwiaGlnaGxpZ2h0ZWQiLCJfZWxTZXR0ZXIiLCJlbCIsIl9lbCIsIl9tZW51TGlzdEhhbmRsZSIsInRha2VLZXlib2FyZCIsInJlbGVhc2VLZXlib2FyZCIsImxvY2tIaWdobGlnaHQiLCJ1bmxvY2tIaWdobGlnaHQiLCJieUtleWJvYXJkIiwiaGlnaGxpZ2h0IiwidW5oaWdobGlnaHQiLCJkaXJlY3Rpb24iLCJwcmV2Q3Vyc29yTG9jYXRpb24iLCJtb3ZlQ3Vyc29yIiwiY29udGV4dCIsIm1lbnVMaXN0IiwicmVnaXN0ZXJJdGVtIiwicHJvcHMiLCJub3RpZnlIaWdobGlnaHRlZCIsInNldFN0YXRlIiwic2Nyb2xsSW50b1ZpZXdJZk5lZWRlZCIsInNjcm9sbEludG9WaWV3Iiwib25IaWdobGlnaHRDaGFuZ2UiLCJub3RpZnlFdmVudCIsImV2ZW50Iiwid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fTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnByb3BzLmhpZ2hsaWdodGVkQ2xhc3NOYW1lKSB7XG4gICAgICAgIGNsYXNzTmFtZSA9IGAke2NsYXNzTmFtZXx8Jyd9ICR7dGhpcy5wcm9wcy5oaWdobGlnaHRlZENsYXNzTmFtZX1gO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiAoXG4gICAgICA8ZGl2XG4gICAgICAgIHJlZj17dGhpcy5fZWxTZXR0ZXJ9XG4gICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgIG9uQ2xpY2s9eygpPT50aGlzLl9tZW51TGlzdEhhbmRsZS5pdGVtQ2hvc2VuKCl9XG4gICAgICAgIG9uTW91c2VFbnRlcj17KCkgPT4gdGhpcy5oaWdobGlnaHQoZmFsc2UpfVxuICAgICAgICBvbk1vdXNlTGVhdmU9e29uTW91c2VMZWF2ZSB8fCAoKCkgPT4gdGhpcy51bmhpZ2hsaWdodCgpKX1cbiAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgYXJpYS1oYXNwb3B1cD17dGhpcy5wcm9wc1snYXJpYS1oYXNwb3B1cCddfVxuICAgICAgICBhcmlhLWV4cGFuZGVkPXt0aGlzLnByb3BzWydhcmlhLWV4cGFuZGVkJ119XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiJdfQ== | ||
(0, _defineProperty2.default)(MenuItem, "propTypes", { | ||
onItemChosen: _propTypes.default.func, | ||
onHighlightChange: _propTypes.default.func, | ||
onLeftPushed: _propTypes.default.func, | ||
onRightPushed: _propTypes.default.func, | ||
className: _propTypes.default.string, | ||
style: _propTypes.default.object, | ||
highlightedClassName: _propTypes.default.string, | ||
highlightedStyle: _propTypes.default.object, | ||
index: _propTypes.default.number, | ||
onMouseLeave: _propTypes.default.func, | ||
children: _propTypes.default.node, | ||
domRef: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]), | ||
'aria-haspopup': _propTypes.default.bool, | ||
'aria-expanded': _propTypes.default.bool | ||
}); | ||
(0, _defineProperty2.default)(MenuItem, "contextType", _MenuList.MenuListContext); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51SXRlbS5qcyJdLCJuYW1lcyI6WyJNZW51SXRlbSIsImhpZ2hsaWdodGVkIiwiZWwiLCJfZWwiLCJwcm9wcyIsImRvbVJlZiIsInN0YXRlIiwiX21lbnVMaXN0SGFuZGxlIiwidGFrZUtleWJvYXJkIiwicmVsZWFzZUtleWJvYXJkIiwibG9ja0hpZ2hsaWdodCIsInVubG9ja0hpZ2hsaWdodCIsImJ5S2V5Ym9hcmQiLCJoaWdobGlnaHQiLCJ1bmhpZ2hsaWdodCIsImRpcmVjdGlvbiIsInByZXZDdXJzb3JMb2NhdGlvbiIsIm1vdmVDdXJzb3IiLCJjb250ZXh0IiwicmVnaXN0ZXJJdGVtIiwibm90aWZ5SGlnaGxpZ2h0ZWQiLCJzZXRTdGF0ZSIsInNjcm9sbEludG9WaWV3SWZOZWVkZWQiLCJzY3JvbGxJbnRvVmlldyIsIm9uSGlnaGxpZ2h0Q2hhbmdlIiwidW5kZWZpbmVkIiwibm90aWZ5RXZlbnQiLCJldmVudCIsInR5cGUiLCJvbkl0ZW1DaG9zZW4iLCJvbkxlZnRQdXNoZWQiLCJvblJpZ2h0UHVzaGVkIiwidW5yZWdpc3RlciIsInVwZGF0ZVByb3BzIiwiY2hpbGRyZW4iLCJvbk1vdXNlTGVhdmUiLCJzdHlsZSIsImNsYXNzTmFtZSIsImhpZ2hsaWdodGVkU3R5bGUiLCJoaWdobGlnaHRlZENsYXNzTmFtZSIsIl9lbFNldHRlciIsIml0ZW1DaG9zZW4iLCJSZWFjdCIsIkNvbXBvbmVudCI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IGlmIChoaWdobGlnaHRlZCkge1xuICAgICAgaWYgKHRoaXMucHJvcHMuaGlnaGxpZ2h0ZWRTdHlsZSkge1xuICAgICAgICBzdHlsZSA9IHsuLi5zdHlsZSwgLi4udGhpcy5wcm9wcy5oaWdobGlnaHRlZFN0eWxlfTtcbiAgICAgIH1cbiAgICAgIGlmICh0aGlzLnByb3BzLmhpZ2hsaWdodGVkQ2xhc3NOYW1lKSB7XG4gICAgICAgIGNsYXNzTmFtZSA9IGAke2NsYXNzTmFtZXx8Jyd9ICR7dGhpcy5wcm9wcy5oaWdobGlnaHRlZENsYXNzTmFtZX1gO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiAoXG4gICAgICA8ZGl2XG4gICAgICAgIHJlZj17dGhpcy5fZWxTZXR0ZXJ9XG4gICAgICAgIHN0eWxlPXtzdHlsZX1cbiAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgIG9uQ2xpY2s9eygpPT50aGlzLl9tZW51TGlzdEhhbmRsZS5pdGVtQ2hvc2VuKCl9XG4gICAgICAgIG9uTW91c2VFbnRlcj17KCkgPT4gdGhpcy5oaWdobGlnaHQoZmFsc2UpfVxuICAgICAgICBvbk1vdXNlTGVhdmU9e29uTW91c2VMZWF2ZSB8fCAoKCkgPT4gdGhpcy51bmhpZ2hsaWdodCgpKX1cbiAgICAgICAgcm9sZT1cIm1lbnVpdGVtXCJcbiAgICAgICAgYXJpYS1oYXNwb3B1cD17dGhpcy5wcm9wc1snYXJpYS1oYXNwb3B1cCddfVxuICAgICAgICBhcmlhLWV4cGFuZGVkPXt0aGlzLnByb3BzWydhcmlhLWV4cGFuZGVkJ119XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiJdfQ== |
@@ -1,235 +0,234 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = exports.MenuListContext = void 0; | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _kefir = _interopRequireDefault(require("kefir")); | ||
var _react = require('react'); | ||
var _kefirStopper = _interopRequireDefault(require("kefir-stopper")); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _arrayFindIndex = _interopRequireDefault(require("array-find-index")); | ||
var _propTypes = require('prop-types'); | ||
var _fromEventsCapture = _interopRequireDefault(require("./lib/fromEventsCapture")); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _MenuEvent = _interopRequireDefault(require("./events/MenuEvent")); | ||
var _kefir = require('kefir'); | ||
var _ChosenEvent = _interopRequireDefault(require("./events/ChosenEvent")); | ||
var _kefir2 = _interopRequireDefault(_kefir); | ||
var _MenuListInspector = require("./MenuListInspector"); | ||
var _kefirStopper = require('kefir-stopper'); | ||
var MenuListContext = _react.default.createContext(null); | ||
var _kefirStopper2 = _interopRequireDefault(_kefirStopper); | ||
exports.MenuListContext = MenuListContext; | ||
var _arrayFindIndex = require('array-find-index'); | ||
var MenuList = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(MenuList, _React$Component); | ||
var _arrayFindIndex2 = _interopRequireDefault(_arrayFindIndex); | ||
function MenuList() { | ||
var _getPrototypeOf2; | ||
var _fromEventsCapture = require('./lib/fromEventsCapture'); | ||
var _this; | ||
var _fromEventsCapture2 = _interopRequireDefault(_fromEventsCapture); | ||
(0, _classCallCheck2.default)(this, MenuList); | ||
var _MenuEvent = require('./events/MenuEvent'); | ||
for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
var _MenuEvent2 = _interopRequireDefault(_MenuEvent); | ||
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(MenuList)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_stopper", (0, _kefirStopper.default)()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_listItems", []); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_naturalHighlightedIndex", void 0); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_lockedHighlightedIndex", void 0); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_keyboardTakenByIndex", void 0); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_elRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuListContext", { | ||
registerItem: function registerItem(props, control, el) { | ||
var item = { | ||
props: props, | ||
control: control, | ||
el: el | ||
}; | ||
var _ChosenEvent = require('./events/ChosenEvent'); | ||
var register = function register() { | ||
var i = -1; | ||
var _ChosenEvent2 = _interopRequireDefault(_ChosenEvent); | ||
if (item.props.index == null) { | ||
i = (0, _arrayFindIndex.default)(_this._listItems, function (_item) { | ||
return (item.el.compareDocumentPosition(_item.el) & Node.DOCUMENT_POSITION_PRECEDING) === 0; | ||
}); | ||
} else { | ||
i = (0, _arrayFindIndex.default)(_this._listItems, function (_item) { | ||
return _item.props.index != null && item.props.index < _item.props.index; | ||
}); | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
if (i < 0) { | ||
_this._listItems.push(item); | ||
} else { | ||
_this._listItems.splice(i, 0, item); | ||
// This type of object is given to a MenuItem to talk to the MenuList. | ||
if (_this._naturalHighlightedIndex != null && i <= _this._naturalHighlightedIndex) { | ||
_this._naturalHighlightedIndex++; | ||
} | ||
if (_this._lockedHighlightedIndex != null && i <= _this._lockedHighlightedIndex) { | ||
_this._lockedHighlightedIndex++; | ||
} | ||
// This type of object is given to a MenuList to talk to a MenuItem. | ||
if (_this._keyboardTakenByIndex != null && i <= _this._keyboardTakenByIndex) { | ||
_this._keyboardTakenByIndex++; | ||
} | ||
} | ||
}; | ||
register(); | ||
var menuListHandle = { | ||
highlight: function highlight(byKeyboard) { | ||
var i = _this._listItems.indexOf(item); | ||
// This is the type of the object that MenuList gives as context to its | ||
// descendants. | ||
var MenuList = function (_React$Component) { | ||
(0, _inherits3.default)(MenuList, _React$Component); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
function MenuList() { | ||
var _ref; | ||
_this._naturalHighlight(i, byKeyboard); | ||
}, | ||
unhighlight: function unhighlight() { | ||
var i = _this._listItems.indexOf(item); | ||
var _temp, _this, _ret; | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
(0, _classCallCheck3.default)(this, MenuList); | ||
if (_this._naturalHighlightedIndex === i) { | ||
_this._naturalHighlight(null, false); | ||
} | ||
}, | ||
itemChosen: function itemChosen() { | ||
_this._dispatchEvent(control, new _ChosenEvent.default('chosen', false)); | ||
}, | ||
takeKeyboard: function takeKeyboard() { | ||
var i = _this._listItems.indexOf(item); | ||
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
_this._keyboardTakenByIndex = i; | ||
}, | ||
releaseKeyboard: function releaseKeyboard() { | ||
var i = _this._listItems.indexOf(item); | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuList.__proto__ || (0, _getPrototypeOf2.default)(MenuList)).call.apply(_ref, [this].concat(args))), _this), _this._stopper = (0, _kefirStopper2.default)(), _this._listItems = [], _this._elSetter = function (el) { | ||
_this._el = el; | ||
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
} | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
// The natural highlight is where the highlight would be if no lock is active. | ||
if (_this._keyboardTakenByIndex === i) { | ||
_this._keyboardTakenByIndex = null; | ||
} | ||
}, | ||
lockHighlight: function lockHighlight() { | ||
var i = _this._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
(0, _createClass3.default)(MenuList, [{ | ||
key: '_getVisibleHighlightedIndex', | ||
value: function _getVisibleHighlightedIndex() { | ||
return this._lockedHighlightedIndex != null ? this._lockedHighlightedIndex : this._naturalHighlightedIndex; | ||
} | ||
}, { | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
var _this2 = this; | ||
_this._lockHighlight(i); | ||
}, | ||
unlockHighlight: function unlockHighlight() { | ||
var i = _this._listItems.indexOf(item); | ||
var menuList = { | ||
registerItem: function registerItem(props, control, el) { | ||
var item = { props: props, control: control, el: el }; | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
var register = function register() { | ||
var i = -1; | ||
if (item.props.index == null) { | ||
i = (0, _arrayFindIndex2.default)(_this2._listItems, function (_item) { | ||
return (item.el.compareDocumentPosition(_item.el) & Node.DOCUMENT_POSITION_PRECEDING) === 0; | ||
}); | ||
} else { | ||
i = (0, _arrayFindIndex2.default)(_this2._listItems, function (_item) { | ||
return _item.props.index != null && item.props.index < _item.props.index; | ||
}); | ||
if (_this._lockedHighlightedIndex === i) { | ||
_this._lockHighlight(null); | ||
} | ||
if (i < 0) { | ||
_this2._listItems.push(item); | ||
}, | ||
moveCursor: function moveCursor(direction, prevCursorLocation) { | ||
_this.moveCursor(direction, prevCursorLocation); | ||
}, | ||
updateProps: function updateProps(newProps) { | ||
if (item.props.index !== newProps.index) { | ||
var oldIndex = _this._listItems.indexOf(item); | ||
var isNaturalHighlightIndex = _this._naturalHighlightedIndex === oldIndex; | ||
var isLockedHighlightIndex = _this._lockedHighlightedIndex === oldIndex; | ||
var isKeyboardTakenByIndex = _this._keyboardTakenByIndex === oldIndex; | ||
menuListHandle.unregister(); | ||
props = newProps; | ||
item.props = newProps; | ||
register(); | ||
if (isNaturalHighlightIndex || isLockedHighlightIndex || isKeyboardTakenByIndex) { | ||
var newIndex = _this._listItems.indexOf(item); | ||
if (isNaturalHighlightIndex) _this._naturalHighlightedIndex = newIndex; | ||
if (isLockedHighlightIndex) _this._lockedHighlightedIndex = newIndex; | ||
if (isKeyboardTakenByIndex) _this._keyboardTakenByIndex = newIndex; | ||
} | ||
} else { | ||
_this2._listItems.splice(i, 0, item); | ||
if (_this2._naturalHighlightedIndex != null && i <= _this2._naturalHighlightedIndex) { | ||
_this2._naturalHighlightedIndex++; | ||
} | ||
if (_this2._lockedHighlightedIndex != null && i <= _this2._lockedHighlightedIndex) { | ||
_this2._lockedHighlightedIndex++; | ||
} | ||
if (_this2._keyboardTakenByIndex != null && i <= _this2._keyboardTakenByIndex) { | ||
_this2._keyboardTakenByIndex++; | ||
} | ||
props = newProps; | ||
item.props = newProps; | ||
} | ||
}; | ||
}, | ||
unregister: function unregister() { | ||
var i = _this._listItems.indexOf(item); | ||
register(); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
var menuListHandle = { | ||
highlight: function highlight(byKeyboard) { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
_this2._naturalHighlight(i, byKeyboard); | ||
}, | ||
unhighlight: function unhighlight() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
if (_this2._naturalHighlightedIndex === i) { | ||
_this2._naturalHighlight(null, false); | ||
} | ||
}, | ||
itemChosen: function itemChosen() { | ||
_this2._dispatchEvent(control, new _ChosenEvent2.default('chosen', false)); | ||
}, | ||
takeKeyboard: function takeKeyboard() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
_this2._keyboardTakenByIndex = i; | ||
}, | ||
releaseKeyboard: function releaseKeyboard() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
if (_this2._keyboardTakenByIndex === i) { | ||
_this2._keyboardTakenByIndex = null; | ||
} | ||
}, | ||
lockHighlight: function lockHighlight() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
_this2._lockHighlight(i); | ||
}, | ||
unlockHighlight: function unlockHighlight() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
if (_this2._lockedHighlightedIndex === i) { | ||
_this2._lockHighlight(null); | ||
} | ||
}, | ||
moveCursor: function moveCursor(direction, prevCursorLocation) { | ||
_this2.moveCursor(direction, prevCursorLocation); | ||
}, | ||
updateProps: function updateProps(newProps) { | ||
if (item.props.index !== newProps.index) { | ||
var oldIndex = _this2._listItems.indexOf(item); | ||
var isNaturalHighlightIndex = _this2._naturalHighlightedIndex === oldIndex; | ||
var isLockedHighlightIndex = _this2._lockedHighlightedIndex === oldIndex; | ||
var isKeyboardTakenByIndex = _this2._keyboardTakenByIndex === oldIndex; | ||
if (i === _this._naturalHighlightedIndex) { | ||
_this._naturalHighlightedIndex = null; | ||
} else if (_this._naturalHighlightedIndex != null && i < _this._naturalHighlightedIndex) { | ||
_this._naturalHighlightedIndex--; | ||
} | ||
menuListHandle.unregister(); | ||
props = newProps; | ||
item.props = newProps; | ||
register(); | ||
if (i === _this._lockedHighlightedIndex) { | ||
_this._lockedHighlightedIndex = null; | ||
} else if (_this._lockedHighlightedIndex != null && i < _this._lockedHighlightedIndex) { | ||
_this._lockedHighlightedIndex--; | ||
} | ||
if (isNaturalHighlightIndex || isLockedHighlightIndex || isKeyboardTakenByIndex) { | ||
var newIndex = _this2._listItems.indexOf(item); | ||
if (isNaturalHighlightIndex) _this2._naturalHighlightedIndex = newIndex; | ||
if (isLockedHighlightIndex) _this2._lockedHighlightedIndex = newIndex; | ||
if (isKeyboardTakenByIndex) _this2._keyboardTakenByIndex = newIndex; | ||
} | ||
} else { | ||
props = newProps; | ||
item.props = newProps; | ||
} | ||
}, | ||
unregister: function unregister() { | ||
var i = _this2._listItems.indexOf(item); | ||
if (i < 0) throw new Error('Already unregistered MenuItem'); | ||
if (i === _this2._naturalHighlightedIndex) { | ||
_this2._naturalHighlightedIndex = null; | ||
} else if (_this2._naturalHighlightedIndex != null && i < _this2._naturalHighlightedIndex) { | ||
_this2._naturalHighlightedIndex--; | ||
} | ||
if (i === _this2._lockedHighlightedIndex) { | ||
_this2._lockedHighlightedIndex = null; | ||
} else if (_this2._lockedHighlightedIndex != null && i < _this2._lockedHighlightedIndex) { | ||
_this2._lockedHighlightedIndex--; | ||
} | ||
if (i === _this2._keyboardTakenByIndex) { | ||
_this2._keyboardTakenByIndex = null; | ||
} else if (_this2._keyboardTakenByIndex != null && i < _this2._keyboardTakenByIndex) { | ||
_this2._keyboardTakenByIndex--; | ||
} | ||
_this2._listItems.splice(i, 1); | ||
if (i === _this._keyboardTakenByIndex) { | ||
_this._keyboardTakenByIndex = null; | ||
} else if (_this._keyboardTakenByIndex != null && i < _this._keyboardTakenByIndex) { | ||
_this._keyboardTakenByIndex--; | ||
} | ||
}; | ||
return menuListHandle; | ||
} | ||
}; | ||
return { menuList: menuList }; | ||
_this._listItems.splice(i, 1); | ||
} | ||
}; | ||
return menuListHandle; | ||
} | ||
}); | ||
return _this; | ||
} | ||
(0, _createClass2.default)(MenuList, [{ | ||
key: "_getVisibleHighlightedIndex", | ||
value: function _getVisibleHighlightedIndex() { | ||
return this._lockedHighlightedIndex != null ? this._lockedHighlightedIndex : this._naturalHighlightedIndex; | ||
} | ||
}, { | ||
key: '_parentCtx', | ||
key: "_parentCtx", | ||
value: function _parentCtx() { | ||
return this.context.menuListInspector; | ||
return this.context; | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
key: "componentDidMount", | ||
value: function componentDidMount() { | ||
var _this3 = this; | ||
var _this2 = this; | ||
@@ -239,17 +238,19 @@ var isEnterOrArrowKey = function isEnterOrArrowKey(e) { | ||
}; | ||
var el = this._el; | ||
var el = this._elRef.current; | ||
/*:: if (!el) throw new Error(); */ | ||
// The only things that should receive keydown/keypress events before us | ||
// are our children. This allows a MenuItem to contain a text input | ||
// which selectively stops propagation on key events for example. | ||
_kefir2.default.merge([_kefir2.default.fromEvents(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) { | ||
_kefir.default.merge([_kefir.default.fromEvents(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) { | ||
return el.contains(e.target); | ||
}), (0, _fromEventsCapture2.default)(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) { | ||
}), (0, _fromEventsCapture.default)(window, 'keydown').filter(isEnterOrArrowKey).filter(function (e) { | ||
return !el.contains(e.target); | ||
})]).takeUntilBy(this._stopper).onValue(function (event) { | ||
return _this3._key(event); | ||
return _this2._key(event); | ||
}); | ||
var parentCtx = this._parentCtx(); | ||
if (parentCtx) { | ||
@@ -260,3 +261,3 @@ parentCtx.registerMenuList(this); | ||
}, { | ||
key: 'componentWillUnmount', | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -266,2 +267,3 @@ this._stopper.destroy(); | ||
var parentCtx = this._parentCtx(); | ||
if (parentCtx) { | ||
@@ -272,3 +274,3 @@ parentCtx.unregisterMenuList(this); | ||
}, { | ||
key: '_naturalHighlight', | ||
key: "_naturalHighlight", | ||
value: function _naturalHighlight(index, byKeyboard, direction, prevCursorLocation) { | ||
@@ -280,3 +282,5 @@ var visibleHighlightedIndex = this._getVisibleHighlightedIndex(); | ||
} | ||
this._naturalHighlightedIndex = index; | ||
if (this._lockedHighlightedIndex == null) { | ||
@@ -286,2 +290,3 @@ if (index != null) { | ||
} | ||
if (visibleHighlightedIndex != null && visibleHighlightedIndex != index) { | ||
@@ -293,8 +298,12 @@ this._listItems[visibleHighlightedIndex].control.notifyHighlighted(false); | ||
}, { | ||
key: '_lockHighlight', | ||
key: "_lockHighlight", | ||
value: function _lockHighlight(index) { | ||
if (index === this._lockedHighlightedIndex) return; | ||
var visibleHighlightedIndex = this._getVisibleHighlightedIndex(); | ||
this._lockedHighlightedIndex = index; | ||
var newVisibleHighlightedIndex = this._getVisibleHighlightedIndex(); | ||
if (visibleHighlightedIndex != null && newVisibleHighlightedIndex == null) { | ||
@@ -308,2 +317,3 @@ // When unlocking, prefer to keep the current selection over de-selecting | ||
} | ||
if (newVisibleHighlightedIndex != null) { | ||
@@ -317,3 +327,3 @@ this._listItems[newVisibleHighlightedIndex].control.notifyHighlighted(true, false); | ||
}, { | ||
key: '_dispatchEvent', | ||
key: "_dispatchEvent", | ||
value: function _dispatchEvent(control, event) { | ||
@@ -324,2 +334,3 @@ if (control) { | ||
} | ||
switch (event.type) { | ||
@@ -334,5 +345,7 @@ case 'chosen': | ||
// break; | ||
case 'left': | ||
if (this.props.onLeftPushed) this.props.onLeftPushed(event); | ||
break; | ||
case 'right': | ||
@@ -342,4 +355,7 @@ if (this.props.onRightPushed) this.props.onRightPushed(event); | ||
} | ||
if (event.cancelBubble) return; | ||
var parentCtx = this._parentCtx(); | ||
if (parentCtx) { | ||
@@ -350,3 +366,3 @@ parentCtx.dispatchEvent(event); | ||
}, { | ||
key: '_key', | ||
key: "_key", | ||
value: function _key(event) { | ||
@@ -357,8 +373,7 @@ if (this._keyboardTakenByIndex != null || this._listItems.length === 0) { | ||
var visibleHighlightedIndex = this._getVisibleHighlightedIndex(); | ||
// enter, left, right activate for the current visibly selected item. | ||
var visibleHighlightedIndex = this._getVisibleHighlightedIndex(); // enter, left, right activate for the current visibly selected item. | ||
// up and down de-activate any locks in place, so that they act from the last | ||
// naturally-selected item. | ||
var mEvent = null; | ||
@@ -370,19 +385,25 @@ | ||
if (visibleHighlightedIndex != null) { | ||
mEvent = new _ChosenEvent2.default('chosen', true); | ||
mEvent = new _ChosenEvent.default('chosen', true); | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
} | ||
break; | ||
case 37: | ||
//left | ||
if (visibleHighlightedIndex != null) { | ||
mEvent = new _MenuEvent2.default('left'); | ||
mEvent = new _MenuEvent.default('left'); | ||
} | ||
break; | ||
case 39: | ||
//right | ||
if (visibleHighlightedIndex != null) { | ||
mEvent = new _MenuEvent2.default('right'); | ||
mEvent = new _MenuEvent.default('right'); | ||
} | ||
break; | ||
case 38: | ||
@@ -394,2 +415,3 @@ //up | ||
break; | ||
case 40: | ||
@@ -405,3 +427,5 @@ //down | ||
var _control = visibleHighlightedIndex == null ? null : this._listItems[visibleHighlightedIndex].control; | ||
this._dispatchEvent(_control, mEvent); | ||
if (mEvent.defaultPrevented) event.preventDefault(); | ||
@@ -412,3 +436,3 @@ if (mEvent.defaultPrevented || mEvent.cancelBubble) event.stopPropagation(); | ||
}, { | ||
key: 'moveCursor', | ||
key: "moveCursor", | ||
value: function moveCursor(direction, prevCursorLocation) { | ||
@@ -424,3 +448,5 @@ if (this._listItems.length == 0) return; | ||
} | ||
break; | ||
case 'down': | ||
@@ -432,2 +458,3 @@ if (this._naturalHighlightedIndex == null || this._naturalHighlightedIndex == this._listItems.length - 1) { | ||
} | ||
break; | ||
@@ -437,3 +464,3 @@ } | ||
}, { | ||
key: 'hasHighlight', | ||
key: "hasHighlight", | ||
value: function hasHighlight() { | ||
@@ -443,28 +470,23 @@ return this._getVisibleHighlightedIndex() != null; | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
return _react2.default.createElement( | ||
'div', | ||
{ role: 'menu', ref: this._elSetter }, | ||
this.props.children | ||
); | ||
return _react.default.createElement("div", { | ||
role: "menu", | ||
ref: this._elRef | ||
}, _react.default.createElement(MenuListContext.Provider, { | ||
value: this._menuListContext | ||
}, this.props.children)); | ||
} | ||
}]); | ||
return MenuList; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
MenuList.propTypes = { | ||
onItemChosen: _propTypes2.default.func, | ||
onLeftPushed: _propTypes2.default.func, | ||
onRightPushed: _propTypes2.default.func, | ||
children: _propTypes2.default.node | ||
}; | ||
MenuList.childContextTypes = { | ||
menuList: _propTypes2.default.object | ||
}; | ||
MenuList.contextTypes = { | ||
menuListInspector: _propTypes2.default.object | ||
}; | ||
exports.default = MenuList; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51TGlzdC5qcyJdLCJuYW1lcyI6WyJNZW51TGlzdCIsIl9zdG9wcGVyIiwiX2xpc3RJdGVtcyIsIl9lbFNldHRlciIsImVsIiwiX2VsIiwiX2xvY2tlZEhpZ2hsaWdodGVkS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sIGVsKSA9PiB7XG4gICAgICAgIGNvbnN0IGl0ZW0gPSB7cHJvcHMsIGNvbnRyb2wsIGVsfTtcblxuICAgICAgICBjb25zdCByZWdpc3RlciA9ICgpID0+IHtcbiAgICAgICAgICBsZXQgaSA9IC0xO1xuICAgICAgICAgIGlmIChpdGVtLnByb3BzLmluZGV4ID09IG51bGwpIHtcbiAgICAgICAgICAgIGkgPSBmaW5kSW5kZXgoXG4gICAgICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcyxcbiAgICAgICAgICAgICAgX2l0ZW0gPT5cbiAgICAgICAgICAgICAgICAoaXRlbS5lbC5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbihfaXRlbS5lbCkmTm9kZS5ET0NVTUVOVF9QT1NJVElPTl9QUkVDRURJTkcpID09PSAwXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpID0gZmluZEluZGV4KFxuICAgICAgICAgICAgICB0aGlzLl9saXN0SXRlbXMsXG4gICAgICAgICAgICAgIF9pdGVtID0+IF9pdGVtLnByb3BzLmluZGV4ICE9IG51bGwgJiYgaXRlbS5wcm9wcy5pbmRleCA8IF9pdGVtLnByb3BzLmluZGV4XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoaSA8IDApIHtcbiAgICAgICAgICAgIHRoaXMuX2xpc3RJdGVtcy5wdXNoKGl0ZW0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLl9saXN0SXRlbXMuc3BsaWNlKGksIDAsIGl0ZW0pO1xuICAgICAgICAgICAgaWYgKHRoaXMuX25hdHVyYWxIaWdobGlnaHRlZEluZGV4ICE9IG51bGwgJiYgaSA8PSB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCkge1xuICAgICAgICAgICAgICB0aGlzLl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCsrO1xuICAgICAgICAgICAgfVxuICA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VxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdiByb2xlPVwibWVudVwiIHJlZj17dGhpcy5fZWxTZXR0ZXJ9PlxuICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiJdfQ== | ||
(0, _defineProperty2.default)(MenuList, "propTypes", { | ||
onItemChosen: _propTypes.default.func, | ||
onLeftPushed: _propTypes.default.func, | ||
onRightPushed: _propTypes.default.func, | ||
children: _propTypes.default.node | ||
}); | ||
(0, _defineProperty2.default)(MenuList, "contextType", _MenuListInspector.MenuListInspectorContext); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51TGlzdC5qcyJdLCJuYW1lcyI6WyJNZW51TGlzdENvbnRleHQiLCJSZWFjdCIsImNyZWF0ZUNvbnRleHQiLCJNZW51TGlzdCIsImNyZWF0ZVJlZiIsInJlZ2lzdGVySXRlbSIsInByb3BzIiwiY29udHJvbCIsImVsIiwiaXRlbSIsInJlZ2lzdGVyIiwiaSIsImluZGV4IiwiX2xpc3RJdGVtcyIsIl9pdGVtIiwiY29tcGFyZURvY3VtZW50UG9zaXRpb24iLCJOb2RlIiwiRE9DVU1FTlRfUE9TSVRJT05fUFJFQ0VESU5HIiwicHVzaCIsInNwbGljZSIsIl9uYXR1cmFsSGlnaGxpZ2h0ZWRJbmRleCIsIl9sb2NrZWRIaWdobGlnaHRlZEluZGV4IiwiX2tleWJvYXJkVGFrZW5CeUluZGV4IiwibWVudUxpc3RIYW5kbGUiLCJoaWdobGlnaHQiLCJieUtleWJvYXJkIiwiaW5kZXhPZiIsIkVycm9yIiwiX25hdHVyYWxIaWdobGlnaHQiLCJ1bmhpZ2hsaWdodCIsIml0ZW1DaG9zZW4iLCJfZGlzcGF0Y2hFdmVudCIsIkNob3NlbkV2ZW50IiwidGFrZUtle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9uLCBwcmV2Q3Vyc29yTG9jYXRpb24pO1xuICAgICAgfVxuICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG5cbiAgaGFzSGlnaGxpZ2h0KCk6IGJvb2xlYW4ge1xuICAgIHJldHVybiB0aGlzLl9nZXRWaXNpYmxlSGlnaGxpZ2h0ZWRJbmRleCgpICE9IG51bGw7XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXYgcm9sZT1cIm1lbnVcIiByZWY9e3RoaXMuX2VsUmVmfT5cbiAgICAgICAgPE1lbnVMaXN0Q29udGV4dC5Qcm92aWRlciB2YWx1ZT17dGhpcy5fbWVudUxpc3RDb250ZXh0fT5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgPC9NZW51TGlzdENvbnRleHQuUHJvdmlkZXI+XG4gICAgICA8L2Rpdj5cbiAgICApO1xuICB9XG59XG4iXX0= |
@@ -1,106 +0,105 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = exports.MenuListInspectorContext = void 0; | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _ChosenEvent = _interopRequireDefault(require("./events/ChosenEvent")); | ||
var _react = require('react'); | ||
var MenuListInspectorContext = _react.default.createContext(null); | ||
var _react2 = _interopRequireDefault(_react); | ||
exports.MenuListInspectorContext = MenuListInspectorContext; | ||
var _propTypes = require('prop-types'); | ||
var MenuListInspector = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(MenuListInspector, _React$Component); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function MenuListInspector() { | ||
var _getPrototypeOf2; | ||
var _ChosenEvent = require('./events/ChosenEvent'); | ||
var _this; | ||
var _ChosenEvent2 = _interopRequireDefault(_ChosenEvent); | ||
(0, _classCallCheck2.default)(this, MenuListInspector); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
var MenuListInspector = function (_React$Component) { | ||
(0, _inherits3.default)(MenuListInspector, _React$Component); | ||
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(MenuListInspector)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_descendantMenuLists", []); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuListInspectorContext", { | ||
registerMenuList: function registerMenuList(menuList) { | ||
_this._descendantMenuLists.push(menuList); | ||
}, | ||
unregisterMenuList: function unregisterMenuList(menuList) { | ||
var i = _this._descendantMenuLists.indexOf(menuList); | ||
function MenuListInspector() { | ||
var _ref; | ||
if (i < 0) throw new Error('MenuList not registered'); | ||
var _temp, _this, _ret; | ||
_this._descendantMenuLists.splice(i, 1); | ||
}, | ||
dispatchEvent: function dispatchEvent(event) { | ||
switch (event.type) { | ||
case 'chosen': | ||
/*:: if (!(event instanceof ChosenEvent)) throw new Error(); */ | ||
if (_this.props.onItemChosen) _this.props.onItemChosen(event); | ||
break; | ||
(0, _classCallCheck3.default)(this, MenuListInspector); | ||
case 'left': | ||
if (_this.props.onLeftPushed) _this.props.onLeftPushed(event); | ||
break; | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
case 'right': | ||
if (_this.props.onRightPushed) _this.props.onRightPushed(event); | ||
break; | ||
} | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuListInspector.__proto__ || (0, _getPrototypeOf2.default)(MenuListInspector)).call.apply(_ref, [this].concat(args))), _this), _this._descendantMenuLists = [], _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
if (event.cancelBubble) return; | ||
var parentCtx = _this._parentCtx(); | ||
if (parentCtx) { | ||
parentCtx.dispatchEvent(event); | ||
} | ||
} | ||
}); | ||
return _this; | ||
} | ||
(0, _createClass3.default)(MenuListInspector, [{ | ||
key: '_parentCtx', | ||
(0, _createClass2.default)(MenuListInspector, [{ | ||
key: "_parentCtx", | ||
value: function _parentCtx() { | ||
return this.context.menuListInspector; | ||
return this.context; | ||
} | ||
}, { | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
var _this2 = this; | ||
var menuListInspector = { | ||
registerMenuList: function registerMenuList(menuList) { | ||
_this2._descendantMenuLists.push(menuList); | ||
}, | ||
unregisterMenuList: function unregisterMenuList(menuList) { | ||
var i = _this2._descendantMenuLists.indexOf(menuList); | ||
if (i < 0) throw new Error('MenuList not registered'); | ||
_this2._descendantMenuLists.splice(i, 1); | ||
}, | ||
dispatchEvent: function dispatchEvent(event) { | ||
switch (event.type) { | ||
case 'chosen': | ||
/*:: if (!(event instanceof ChosenEvent)) throw new Error(); */ | ||
if (_this2.props.onItemChosen) _this2.props.onItemChosen(event); | ||
break; | ||
case 'left': | ||
if (_this2.props.onLeftPushed) _this2.props.onLeftPushed(event); | ||
break; | ||
case 'right': | ||
if (_this2.props.onRightPushed) _this2.props.onRightPushed(event); | ||
break; | ||
} | ||
if (event.cancelBubble) return; | ||
var parentCtx = _this2._parentCtx(); | ||
if (parentCtx) { | ||
parentCtx.dispatchEvent(event); | ||
} | ||
} | ||
}; | ||
return { menuListInspector: menuListInspector }; | ||
} | ||
}, { | ||
key: 'moveCursor', | ||
key: "moveCursor", | ||
value: function moveCursor(direction, prevCursorLocation) { | ||
var menuList = this._descendantMenuLists[0]; | ||
if (!menuList) { | ||
return false; | ||
} | ||
menuList.moveCursor(direction, prevCursorLocation); | ||
@@ -110,3 +109,3 @@ return true; | ||
}, { | ||
key: 'hasHighlight', | ||
key: "hasHighlight", | ||
value: function hasHighlight() { | ||
@@ -118,28 +117,24 @@ for (var i = 0, len = this._descendantMenuLists.length; i < len; i++) { | ||
} | ||
return false; | ||
} | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
return this.props.children; | ||
return _react.default.createElement(MenuListInspectorContext.Provider, { | ||
value: this._menuListInspectorContext | ||
}, this.props.children); | ||
} | ||
}]); | ||
return MenuListInspector; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
MenuListInspector.propTypes = { | ||
onItemChosen: _propTypes2.default.func, | ||
onLeftPushed: _propTypes2.default.func, | ||
onRightPushed: _propTypes2.default.func, | ||
children: _propTypes2.default.element | ||
}; | ||
MenuListInspector.childContextTypes = { | ||
menuListInspector: _propTypes2.default.object | ||
}; | ||
MenuListInspector.contextTypes = { | ||
menuListInspector: _propTypes2.default.object | ||
}; | ||
exports.default = MenuListInspector; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NZW51TGlzdEluc3BlY3Rvci5qcyJdLCJuYW1lcyI6WyJNZW51TGlzdEluc3BlY3RvciIsIl9kZXNjZW5kYW50TWVudUxpc3RzIiwiY29udGV4dCIsIm1lbnVMaXN0SW5zcGVjdG9yIiwicmVnaXN0ZXJNZW51TGlzdCIsIm1lbnVMaXN0IiwicHVzaCIsInVucmVnaXN0ZXJNZW51TGlzdCIsImkiLCJpbmRleE9mIiwiRXJyb3IiLCJzcGxpY2UiLCJkaXNwYXRjaEV2ZW50IiwiZXZlbnQiLCJ0eXBlIiwicHJvcHMiLCJvbkl0ZW1DaG9zZW4iLCJvbkxlZnRQdXNoZWQiLCJvblJpZ2h0UHVzaGVkIiwiY2FuY2VsQnViYmxlIiwicGFyZW50Q3R4IiwiX3BhcmVudEN0eCIsImRpcmVjdGlvbiIsInByZXZDdXJzb3JMb2NhdGlvbiIsIm1vdmVDdXJzb3IiLCJsZW4iLCJsZW5ndGgiLCJoYXNIaWdobGlnaHQiLCJjaGlsZHJlbiIsIlJlYWN0IiwiQ29tcG9uZW50IiwicHJvcFR5cGVzIiwiUHJvcFR5cGVzIiwiZnVuYyIsImVsZW1lbnQiLCJjaGlsZENvbnRleHRUeXBlcyIsIm9iamVjdCIsImNvbnRleHRUeXBlcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQTs7OztBQUVBOzs7O0FBR0E7Ozs7OztJQWdCcUJBLGlCOzs7Ozs7Ozs7Ozs7OztrT0F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lmIChwYXJlbnRDdHgpIHtcbiAgICAgICAgICBwYXJlbnRDdHguZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9O1xuICAgIHJldHVybiB7bWVudUxpc3RJbnNwZWN0b3J9O1xuICB9XG5cbiAgbW92ZUN1cnNvcihkaXJlY3Rpb246IERpcmVjdGlvbiwgcHJldkN1cnNvckxvY2F0aW9uOiA/UmVjdCk6IGJvb2xlYW4ge1xuICAgIGNvbnN0IG1lbnVMaXN0ID0gdGhpcy5fZGVzY2VuZGFudE1lbnVMaXN0c1swXTtcbiAgICBpZiAoIW1lbnVMaXN0KSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIG1lbnVMaXN0Lm1vdmVDdXJzb3IoZGlyZWN0aW9uLCBwcmV2Q3Vyc29yTG9jYXRpb24pO1xuICAgIHJldHVybiB0cnVlO1xuICB9XG5cbiAgaGFzSGlnaGxpZ2h0KCk6IGJvb2xlYW4ge1xuICAgIGZvciAobGV0IGk9MCwgbGVuPXRoaXMuX2Rlc2NlbmRhbnRNZW51TGlzdHMubGVuZ3RoOyBpPGxlbjsgaSsrKSB7XG4gICAgICBpZiAodGhpcy5fZGVzY2VuZGFudE1lbnVMaXN0c1tpXS5oYXNIaWdobGlnaHQoKSkge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiB0aGlzLnByb3BzLmNoaWxkcmVuO1xuICB9XG59XG4iXX0= | ||
(0, _defineProperty2.default)(MenuListInspector, "propTypes", { | ||
onItemChosen: _propTypes.default.func, | ||
onLeftPushed: _propTypes.default.func, | ||
onRightPushed: _propTypes.default.func, | ||
children: _propTypes.default.element | ||
}); | ||
(0, _defineProperty2.default)(MenuListInspector, "contextType", MenuListInspectorContext); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;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RhbnRNZW51TGlzdHNbMF07XG4gICAgaWYgKCFtZW51TGlzdCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICBtZW51TGlzdC5tb3ZlQ3Vyc29yKGRpcmVjdGlvbiwgcHJldkN1cnNvckxvY2F0aW9uKTtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfVxuXG4gIGhhc0hpZ2hsaWdodCgpOiBib29sZWFuIHtcbiAgICBmb3IgKGxldCBpPTAsIGxlbj10aGlzLl9kZXNjZW5kYW50TWVudUxpc3RzLmxlbmd0aDsgaTxsZW47IGkrKykge1xuICAgICAgaWYgKHRoaXMuX2Rlc2NlbmRhbnRNZW51TGlzdHNbaV0uaGFzSGlnaGxpZ2h0KCkpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPE1lbnVMaXN0SW5zcGVjdG9yQ29udGV4dC5Qcm92aWRlciB2YWx1ZT17dGhpcy5fbWVudUxpc3RJbnNwZWN0b3JDb250ZXh0fT5cbiAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICA8L01lbnVMaXN0SW5zcGVjdG9yQ29udGV4dC5Qcm92aWRlcj5cbiAgICApO1xuICB9XG59XG4iXX0= |
@@ -1,90 +0,75 @@ | ||
'use strict'; | ||
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread")); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); | ||
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createClass2 = require('babel-runtime/helpers/createClass'); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _createClass3 = _interopRequireDefault(_createClass2); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); | ||
var _kefir = _interopRequireDefault(require("kefir")); | ||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); | ||
var _kefirBus = _interopRequireDefault(require("kefir-bus")); | ||
var _inherits2 = require('babel-runtime/helpers/inherits'); | ||
var _kefirStopper = _interopRequireDefault(require("kefir-stopper")); | ||
var _inherits3 = _interopRequireDefault(_inherits2); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _kefir = require('kefir'); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _kefir2 = _interopRequireDefault(_kefir); | ||
var _pointRectDistance = _interopRequireDefault(require("./lib/pointRectDistance")); | ||
var _kefirBus = require('kefir-bus'); | ||
var _MenuListInspector = _interopRequireDefault(require("./MenuListInspector")); | ||
var _kefirBus2 = _interopRequireDefault(_kefirBus); | ||
var _reactFloatAnchor = _interopRequireDefault(require("react-float-anchor")); | ||
var _kefirStopper = require('kefir-stopper'); | ||
var _MenuItem = _interopRequireDefault(require("./MenuItem")); | ||
var _kefirStopper2 = _interopRequireDefault(_kefirStopper); | ||
var SubMenuItem = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
(0, _inherits2.default)(SubMenuItem, _React$Component); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _pointRectDistance = require('./lib/pointRectDistance'); | ||
var _pointRectDistance2 = _interopRequireDefault(_pointRectDistance); | ||
var _MenuListInspector = require('./MenuListInspector'); | ||
var _MenuListInspector2 = _interopRequireDefault(_MenuListInspector); | ||
var _reactFloatAnchor = require('react-float-anchor'); | ||
var _reactFloatAnchor2 = _interopRequireDefault(_reactFloatAnchor); | ||
var _MenuItem = require('./MenuItem'); | ||
var _MenuItem2 = _interopRequireDefault(_MenuItem); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var SubMenuItem = function (_React$Component) { | ||
(0, _inherits3.default)(SubMenuItem, _React$Component); | ||
function SubMenuItem() { | ||
var _ref; | ||
var _getPrototypeOf2; | ||
var _temp, _this, _ret; | ||
var _this; | ||
(0, _classCallCheck3.default)(this, SubMenuItem); | ||
(0, _classCallCheck2.default)(this, SubMenuItem); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SubMenuItem.__proto__ || (0, _getPrototypeOf2.default)(SubMenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = { | ||
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(SubMenuItem)).call.apply(_getPrototypeOf2, [this].concat(args))); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "state", { | ||
opened: false | ||
}, _this._resetMouseLeaveWatcher = (0, _kefirBus2.default)(), _this._stopper = (0, _kefirStopper2.default)(), _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuItemRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_floatAnchorRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuInspectorRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_menuContainerRef", _react.default.createRef()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_resetMouseLeaveWatcher", (0, _kefirBus.default)()); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "_stopper", (0, _kefirStopper.default)()); | ||
return _this; | ||
} | ||
(0, _createClass3.default)(SubMenuItem, [{ | ||
key: 'componentWillUnmount', | ||
(0, _createClass2.default)(SubMenuItem, [{ | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
@@ -94,26 +79,36 @@ this._stopper.destroy(); | ||
}, { | ||
key: 'open', | ||
value: function open(callback) { | ||
key: "open", | ||
value: function open() { | ||
var _this2 = this; | ||
this._menuItem.lockHighlight(); | ||
if (this.state.opened) return; | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
menuItem.lockHighlight(); | ||
if (this.state.opened) return Promise.resolve(); | ||
if (this.props.onWillOpen) this.props.onWillOpen(); | ||
this.setState({ opened: true }, function () { | ||
if (_this2.props.onDidOpen) _this2.props.onDidOpen(); | ||
if (callback) callback(); | ||
menuItem.takeKeyboard(); | ||
return new Promise(function (resolve) { | ||
_this2.setState({ | ||
opened: true | ||
}, function () { | ||
if (_this2.props.onDidOpen) _this2.props.onDidOpen(); | ||
resolve(); | ||
}); | ||
}); | ||
this._menuItem.takeKeyboard(); | ||
} | ||
}, { | ||
key: 'close', | ||
key: "close", | ||
value: function close() { | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
if (!this.state.opened) return; | ||
if (this.props.onWillClose) this.props.onWillClose(); | ||
this.setState({ opened: false }); | ||
this._menuItem.releaseKeyboard(); | ||
this._menuItem.unlockHighlight(); | ||
this.setState({ | ||
opened: false | ||
}); | ||
menuItem.releaseKeyboard(); | ||
menuItem.unlockHighlight(); | ||
} | ||
}, { | ||
key: 'toggle', | ||
key: "toggle", | ||
value: function toggle() { | ||
@@ -127,30 +122,39 @@ if (this.state.opened) { | ||
}, { | ||
key: 'reposition', | ||
key: "reposition", | ||
value: function reposition() { | ||
this._floatAnchor.reposition(); | ||
var floatAnchor = this._floatAnchorRef.current; | ||
if (!floatAnchor) throw new Error(); | ||
floatAnchor.reposition(); | ||
} | ||
}, { | ||
key: 'hasHighlight', | ||
key: "hasHighlight", | ||
value: function hasHighlight() { | ||
return this._menuItem.hasHighlight(); | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
return menuItem.hasHighlight(); | ||
} | ||
}, { | ||
key: 'highlight', | ||
key: "highlight", | ||
value: function highlight() { | ||
var byKeyboard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
this._menuItem.highlight(byKeyboard); | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
menuItem.highlight(byKeyboard); | ||
} | ||
}, { | ||
key: 'unhighlight', | ||
key: "unhighlight", | ||
value: function unhighlight() { | ||
this._menuItem.unhighlight(); | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
menuItem.unhighlight(); | ||
} | ||
}, { | ||
key: 'moveCursor', | ||
key: "moveCursor", | ||
value: function moveCursor(direction, prevCursorLocation) { | ||
this._menuItem.moveCursor(direction, prevCursorLocation); | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
menuItem.moveCursor(direction, prevCursorLocation); | ||
} | ||
}, { | ||
key: '_onHighlightChange', | ||
key: "_onHighlightChange", | ||
value: function _onHighlightChange(highlighted, event) { | ||
@@ -164,3 +168,3 @@ var _this3 = this; | ||
_kefir2.default.later(OPEN_DELAY).takeUntilBy(this._resetMouseLeaveWatcher).takeUntilBy(this._stopper).onValue(function () { | ||
_kefir.default.later(OPEN_DELAY).takeUntilBy(this._resetMouseLeaveWatcher).takeUntilBy(this._stopper).onValue(function () { | ||
_this3.open(); | ||
@@ -173,15 +177,17 @@ }); | ||
}, { | ||
key: '_onMouseLeaveItem', | ||
key: "_onMouseLeaveItem", | ||
value: function _onMouseLeaveItem(event) { | ||
var _this4 = this; | ||
var menuItem = this._menuItemRef.current; | ||
var menuContainer = this._menuContainerRef.current; | ||
if (!menuItem || !menuContainer) throw new Error(); | ||
if (!this.state.opened) { | ||
this._menuItem.unhighlight(); | ||
menuItem.unhighlight(); | ||
return; | ||
} | ||
} // If the mouse isn't going toward the menu, then unhighlight ourself. | ||
// If the mouse isn't going toward the menu, then unhighlight ourself. | ||
var menuRect = this._menuContainer.getBoundingClientRect(); | ||
var menuRect = menuContainer.getBoundingClientRect(); | ||
var startTime = Date.now(); | ||
@@ -192,85 +198,88 @@ var startX = event.pageX, | ||
function getDistance(x, y) { | ||
return (0, _pointRectDistance2.default)(x, y, menuRect.left, menuRect.top, menuRect.right - menuRect.width, menuRect.bottom - menuRect.top); | ||
return (0, _pointRectDistance.default)(x, y, menuRect.left, menuRect.top, menuRect.right - menuRect.width, menuRect.bottom - menuRect.top); | ||
} | ||
var startDistance = getDistance(startX, startY); | ||
var lastCoords = { pageX: startX, pageY: startY }; | ||
// pixels per second the user must be moving the mouse toward the menu for | ||
var lastCoords = { | ||
pageX: startX, | ||
pageY: startY | ||
}; // pixels per second the user must be moving the mouse toward the menu for | ||
// the menu to stay open. | ||
var MIN_SPEED = 60; | ||
// ms before the menu will close if the user hasn't reached it yet, no | ||
var MIN_SPEED = 60; // ms before the menu will close if the user hasn't reached it yet, no | ||
// matter how they're moving the cursor toward it. | ||
var MAX_TIME = 750; | ||
// ms to offset start time, to set maxDistance back a little so it's not so | ||
var MAX_TIME = 750; // ms to offset start time, to set maxDistance back a little so it's not so | ||
// unforgiving at the very start. | ||
var LEAD_TIME = 50; | ||
// Listen to mouse moves, find the first event not going towards the menu, | ||
var LEAD_TIME = 50; // Listen to mouse moves, find the first event not going towards the menu, | ||
// and end it there. Or end after a timer. | ||
_kefir2.default.fromEvents(window, 'mousemove').bufferBy(_kefir2.default.interval(60, null)).map(function (events) { | ||
_kefir.default.fromEvents(window, 'mousemove').bufferBy(_kefir.default.interval(60, null)).map(function (events) { | ||
if (events.length) { | ||
var last = events[events.length - 1]; | ||
lastCoords = { pageX: last.pageX, pageY: last.pageY }; | ||
lastCoords = { | ||
pageX: last.pageX, | ||
pageY: last.pageY | ||
}; | ||
} | ||
return lastCoords; | ||
}).filter(function (_ref2) { | ||
var pageX = _ref2.pageX, | ||
pageY = _ref2.pageY; | ||
}).filter(function (_ref) { | ||
var pageX = _ref.pageX, | ||
pageY = _ref.pageY; | ||
var distance = getDistance(pageX, pageY); | ||
var maxDistance = startDistance - (Date.now() - startTime - LEAD_TIME) / 1000 * MIN_SPEED; | ||
return distance > maxDistance; | ||
}).merge(_kefir2.default.later(MAX_TIME * 1000)).take(1).takeUntilBy(this._resetMouseLeaveWatcher).takeUntilBy(this._stopper).onValue(function () { | ||
}).merge(_kefir.default.later(MAX_TIME * 1000)).take(1).takeUntilBy(this._resetMouseLeaveWatcher).takeUntilBy(this._stopper).onValue(function () { | ||
_this4.close(); | ||
_this4._menuItem.unhighlight(); | ||
menuItem.unhighlight(); | ||
}); | ||
} | ||
}, { | ||
key: '_mouseEnterMenu', | ||
key: "_mouseEnterMenu", | ||
value: function _mouseEnterMenu() { | ||
var menuItem = this._menuItemRef.current; | ||
if (!menuItem) throw new Error(); | ||
this._resetMouseLeaveWatcher.emit(null); | ||
this._menuItem.unlockHighlight(); | ||
menuItem.unlockHighlight(); | ||
} | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
var _this5 = this; | ||
var _props = this.props, | ||
index = _props.index, | ||
highlightedStyle = _props.highlightedStyle, | ||
highlightedClassName = _props.highlightedClassName, | ||
positionOptions = _props.positionOptions, | ||
menuZIndex = _props.menuZIndex, | ||
children = _props.children, | ||
menu = _props.menu; | ||
var _this$props = this.props, | ||
index = _this$props.index, | ||
highlightedStyle = _this$props.highlightedStyle, | ||
highlightedClassName = _this$props.highlightedClassName, | ||
positionOptions = _this$props.positionOptions, | ||
menuZIndex = _this$props.menuZIndex, | ||
children = _this$props.children, | ||
menu = _this$props.menu; | ||
var opened = this.state.opened; | ||
var style = this.props.style; | ||
var className = this.props.className; | ||
if (opened) { | ||
if (this.props.openedStyle) { | ||
style = (0, _extends3.default)({}, style, this.props.openedStyle); | ||
style = (0, _objectSpread2.default)({}, style, this.props.openedStyle); | ||
} | ||
if (this.props.openedClassName) { | ||
className = (className || '') + ' ' + this.props.openedClassName; | ||
className = "".concat(className || '', " ").concat(this.props.openedClassName); | ||
} | ||
} | ||
return _react2.default.createElement(_reactFloatAnchor2.default, { | ||
ref: function ref(el) { | ||
if (el) _this5._floatAnchor = el; | ||
}, | ||
return _react.default.createElement(_reactFloatAnchor.default, { | ||
ref: this._floatAnchorRef, | ||
options: positionOptions, | ||
zIndex: menuZIndex, | ||
anchor: _react2.default.createElement( | ||
_MenuItem2.default, | ||
{ | ||
ref: function ref(el) { | ||
if (el) _this5._menuItem = el; | ||
}, | ||
anchor: function anchor(anchorRef) { | ||
return _react.default.createElement(_MenuItem.default, { | ||
ref: _this5._menuItemRef, | ||
domRef: anchorRef, | ||
index: index, | ||
@@ -291,4 +300,8 @@ style: style, | ||
e.preventDefault(); | ||
_this5.open(); | ||
_this5._menuInspector.moveCursor('down'); | ||
var menuInspector = _this5._menuInspectorRef.current; | ||
if (!menuInspector) throw new Error(); | ||
menuInspector.moveCursor('down'); | ||
} | ||
@@ -299,37 +312,29 @@ }, | ||
e.preventDefault(); | ||
_this5.open(); | ||
if (e.byKeyboard) { | ||
_this5._menuInspector.moveCursor('down'); | ||
var menuInspector = _this5._menuInspectorRef.current; | ||
if (!menuInspector) throw new Error(); | ||
menuInspector.moveCursor('down'); | ||
} | ||
}, | ||
'aria-haspopup': true, | ||
'aria-expanded': opened | ||
}, | ||
children | ||
), | ||
float: !opened ? null : _react2.default.createElement( | ||
_MenuListInspector2.default, | ||
{ | ||
ref: function ref(el) { | ||
if (el) _this5._menuInspector = el; | ||
}, | ||
onLeftPushed: function onLeftPushed(e) { | ||
e.stopPropagation(); | ||
e.preventDefault(); | ||
_this5.close(); | ||
} | ||
}, | ||
_react2.default.createElement( | ||
'div', | ||
{ | ||
ref: function ref(el) { | ||
if (el) _this5._menuContainer = el; | ||
}, | ||
onMouseEnter: function onMouseEnter() { | ||
return _this5._mouseEnterMenu(); | ||
} | ||
}, | ||
menu | ||
) | ||
) | ||
"aria-haspopup": true, | ||
"aria-expanded": opened | ||
}, children); | ||
}, | ||
float: !opened ? null : _react.default.createElement(_MenuListInspector.default, { | ||
ref: this._menuInspectorRef, | ||
onLeftPushed: function onLeftPushed(e) { | ||
e.stopPropagation(); | ||
e.preventDefault(); | ||
_this5.close(); | ||
} | ||
}, _react.default.createElement("div", { | ||
ref: this._menuContainerRef, | ||
onMouseEnter: function onMouseEnter() { | ||
return _this5._mouseEnterMenu(); | ||
} | ||
}, menu)) | ||
}); | ||
@@ -339,32 +344,30 @@ } | ||
return SubMenuItem; | ||
}(_react2.default.Component); | ||
}(_react.default.Component); | ||
SubMenuItem.propTypes = { | ||
menu: _propTypes2.default.node, | ||
positionOptions: _propTypes2.default.object, | ||
menuZIndex: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]), | ||
onWillOpen: _propTypes2.default.func, | ||
onDidOpen: _propTypes2.default.func, | ||
onWillClose: _propTypes2.default.func, | ||
className: _propTypes2.default.string, | ||
style: _propTypes2.default.object, | ||
highlightedClassName: _propTypes2.default.string, | ||
highlightedStyle: _propTypes2.default.object, | ||
index: _propTypes2.default.number, | ||
openedClassName: _propTypes2.default.string, | ||
openedStyle: _propTypes2.default.object, | ||
onItemChosen: _propTypes2.default.func, | ||
onHighlightChange: _propTypes2.default.func, | ||
children: _propTypes2.default.node | ||
}; | ||
SubMenuItem.defaultProps = { | ||
positionOptions: { position: 'right', vAlign: 'top', hAlign: 'left' } | ||
}; | ||
exports.default = SubMenuItem; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TdWJNZW51SXRlbS5qcyJdLCJuYW1lcyI6WyJTdWJNZW51SXRlbSIsInN0YXRlIiwib3BlbmVkIiwiX3Jlc2V0TW91c2VMZWF2ZVdhdGNoZXIiLCJfc3RvcHBlciIsImRlc3Ryb3kiLCJjYWxsYmFjayIsIl9tZW51SXRlbSIsImxvY2tIaWdobGlnaHQiLCJwcm9wcyIsIm9uV2lsbE9wZW4iLCJzZXRTdGF0ZSIsIm9uRGlkT3BlbiIsInRha2VLZXlib2FyZCIsIm9uV2lsbENsb3NlIiwicmVsZWFzZUtleWJvYXJkIiwidW5sb2NrSGlnaGxpZ2h0IiwiY2xvc2UiLCJvcGVuIiwiX2Zsb2F0QW5jaG9yIiwicmVwb3NpdGlvbiIsImhhc0hpZ2hsaWdodCIsImJ5S2V5Ym9hcmQiLCJoaWdobGlnaHQiLCJ1bmhpZ2hsaWdodCIsImRpcmVjdGlvbiIsInByZXZDdXJzb3JMb2NhdGlvbiIsIm1vdmVDdXJzb3IiLCJoaWdobGlnaHRlZCIsImV2ZW50IiwiZW1pdCIsIk9QRU5fREVMQVkiLCJLZWZpciIsImxhdGVyIiwidGFrZVVudGlsQnkiLCJvblZhbHVlIiwibWVudVJl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gICAgICAgICAgc3R5bGU9e3N0eWxlfVxuICAgICAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgICAgICBoaWdobGlnaHRlZFN0eWxlPXtoaWdobGlnaHRlZFN0eWxlfVxuICAgICAgICAgICAgaGlnaGxpZ2h0ZWRDbGFzc05hbWU9e2hpZ2hsaWdodGVkQ2xhc3NOYW1lfVxuICAgICAgICAgICAgb25IaWdobGlnaHRDaGFuZ2U9eyhoLGUpID0+IHRoaXMuX29uSGlnaGxpZ2h0Q2hhbmdlKGgsZSl9XG4gICAgICAgICAgICBvbk1vdXNlTGVhdmU9e2UgPT4gdGhpcy5fb25Nb3VzZUxlYXZlSXRlbShlKX1cbiAgICAgICAgICAgIG9uUmlnaHRQdXNoZWQ9eyhlOiBNZW51RXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgaWYgKCF0aGlzLnN0YXRlLm9wZW5lZCkge1xuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMub3BlbigpO1xuICAgICAgICAgICAgICAgIHRoaXMuX21lbnVJbnNwZWN0b3IubW92ZUN1cnNvcignZG93bicpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgb25JdGVtQ2hvc2VuPXsoZTogQ2hvc2VuRXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICB0aGlzLm9wZW4oKTtcbiAgICAgICAgICAgICAgaWYgKGUuYnlLZXlib2FyZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX21lbnVJbnNwZWN0b3IubW92ZUN1cnNvcignZG93bicpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9fVxuICAgICAgICAgICAgYXJpYS1oYXNwb3B1cD17dHJ1ZX1cbiAgICAgICAgICAgIGFyaWEtZXhwYW5kZWQ9e29wZW5lZH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9NZW51SXRlbT5cbiAgICAgICAgfVxuICAgICAgICBmbG9hdD17XG4gICAgICAgICAgIW9wZW5lZCA/IG51bGwgOlxuICAgICAgICAgICAgPE1lbnVMaXN0SW5zcGVjdG9yXG4gICAgICAgICAgICAgIHJlZj17ZWwgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChlbCkgdGhpcy5fbWVudUluc3BlY3RvciA9IGVsO1xuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICBvbkxlZnRQdXNoZWQ9e2UgPT4ge1xuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UoKTtcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHJlZj17ZWwgPT4ge1xuICAgICAgICAgICAgICAgICAgaWYgKGVsKSB0aGlzLl9tZW51Q29udGFpbmVyID0gZWw7XG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICBvbk1vdXNlRW50ZXI9eygpPT50aGlzLl9tb3VzZUVudGVyTWVudSgpfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge21lbnV9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9NZW51TGlzdEluc3BlY3Rvcj5cbiAgICAgICAgfVxuICAgICAgLz5cbiAgICApO1xuICB9XG59XG4iXX0= | ||
(0, _defineProperty2.default)(SubMenuItem, "propTypes", { | ||
menu: _propTypes.default.node, | ||
positionOptions: _propTypes.default.object, | ||
menuZIndex: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), | ||
onWillOpen: _propTypes.default.func, | ||
onDidOpen: _propTypes.default.func, | ||
onWillClose: _propTypes.default.func, | ||
className: _propTypes.default.string, | ||
style: _propTypes.default.object, | ||
highlightedClassName: _propTypes.default.string, | ||
highlightedStyle: _propTypes.default.object, | ||
index: _propTypes.default.number, | ||
openedClassName: _propTypes.default.string, | ||
openedStyle: _propTypes.default.object, | ||
onItemChosen: _propTypes.default.func, | ||
onHighlightChange: _propTypes.default.func, | ||
children: _propTypes.default.node | ||
}); | ||
(0, _defineProperty2.default)(SubMenuItem, "defaultProps", { | ||
positionOptions: { | ||
position: 'right', | ||
vAlign: 'top', | ||
hAlign: 'left' | ||
} | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9TdWJNZW51SXRlbS5qcyJdLCJuYW1lcyI6WyJTdWJNZW51SXRlbSIsIm9wZW5lZCIsIlJlYWN0IiwiY3JlYXRlUmVmIiwiX3N0b3BwZXIiLCJkZXN0cm95IiwibWVudUl0ZW0iLCJfbWVudUl0ZW1SZWYiLCJjdXJyZW50IiwiRXJyb3IiLCJsb2NrSGlnaGxpZ2h0Iiwic3RhdGUiLCJQcm9taXNlIiwicmVzb2x2ZSIsInByb3BzIiwib25XaWxsT3BlbiIsInRha2VLZXlib2FyZCIsInNldFN0YXRlIiwib25EaWRPcGVuIiwib25XaWxsQ2xvc2UiLCJyZWxlYXNlS2V5Ym9hcmQiLCJ1bmxvY2tIaWdobGlnaHQiLCJjbG9zZSIsIm9wZW4iLCJmbG9hdEFuY2hvciIsIl9mbG9hdEFuY2hvclJlZiIsInJlcG9zaXRpb24iLCJoYXNIaWdobGlnaHQiLCJieUtleWJvYXJkIiwiaGlnaGxpZ2h0IiwidW5oaWdobGlnaHQiLCJkaXJlY3Rpb24iLCJwcmV2Q3Vyc29yTG9jYXRpb24iLCJtb3ZlQ3V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lZi5jdXJyZW50O1xuICAgICAgICAgICAgICAgIGlmICghbWVudUluc3BlY3RvcikgdGhyb3cgbmV3IEVycm9yKCk7XG4gICAgICAgICAgICAgICAgbWVudUluc3BlY3Rvci5tb3ZlQ3Vyc29yKCdkb3duJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH19XG4gICAgICAgICAgICBhcmlhLWhhc3BvcHVwPXt0cnVlfVxuICAgICAgICAgICAgYXJpYS1leHBhbmRlZD17b3BlbmVkfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICA8L01lbnVJdGVtPlxuICAgICAgICB9XG4gICAgICAgIGZsb2F0PXtcbiAgICAgICAgICAhb3BlbmVkID8gbnVsbCA6XG4gICAgICAgICAgICA8TWVudUxpc3RJbnNwZWN0b3JcbiAgICAgICAgICAgICAgcmVmPXt0aGlzLl9tZW51SW5zcGVjdG9yUmVmfVxuICAgICAgICAgICAgICBvbkxlZnRQdXNoZWQ9e2UgPT4ge1xuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UoKTtcbiAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHJlZj17dGhpcy5fbWVudUNvbnRhaW5lclJlZn1cbiAgICAgICAgICAgICAgICBvbk1vdXNlRW50ZXI9eygpPT50aGlzLl9tb3VzZUVudGVyTWVudSgpfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge21lbnV9XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9NZW51TGlzdEluc3BlY3Rvcj5cbiAgICAgICAgfVxuICAgICAgLz5cbiAgICApO1xuICB9XG59XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJ0eXBlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= | ||
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbXX0= |
{ | ||
"name": "react-menu-list", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "React component for menu lists and submenus", | ||
"main": "js/index.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
"prepare": "rimraf js/ && babel -s inline -d js/ src/ && flow-copy-source -v src js", | ||
"prepare": "rimraf js && babel -s inline -d js/ src/ --ignore '**/*.test.js' && flow-copy-source -v src js --ignore '**/*.test.*'", | ||
"example-build": "cross-env NODE_ENV=development browserify -t babelify -do example/bundle.js example/main.js", | ||
"example-watch": "cross-env NODE_ENV=development-hmr watchify -v -p browserify-hmr -t babelify -do example/bundle.js example/main.js", | ||
"example-watch": "cross-env NODE_ENV=development watchify -v -t babelify -do example/bundle.js example/main.js", | ||
"example-build-prod": "cross-env NODE_ENV=production browserify -t babelify -do example/bundle.js example/main.js", | ||
"test": "npm run lint && npm run flow_check && jest", | ||
"test": "yarn run lint && yarn run flow_check && jest && tsc", | ||
"flow_check": "flow check", | ||
@@ -33,32 +34,33 @@ "lint": "eslint .", | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.0.1", | ||
"babel-jest": "^22.4.3", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-transform-runtime": "^6.15.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-react": "^6.16.0", | ||
"babel-preset-react-hmre": "^1.1.1", | ||
"babel-preset-stage-2": "^6.18.0", | ||
"babel-register": "^6.18.0", | ||
"babelify": "^8.0.0", | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0", | ||
"@babel/plugin-transform-runtime": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"@babel/preset-flow": "^7.0.0", | ||
"@babel/preset-react": "^7.0.0", | ||
"@babel/register": "^7.0.0", | ||
"@types/react": "^16.4.18", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "^10.0.1", | ||
"babel-jest": "^23.4.2", | ||
"babelify": "^10.0.0", | ||
"browserify": "^16.2.2", | ||
"browserify-hmr": "^0.3.1", | ||
"cross-env": "^5.0.1", | ||
"eslint": "^4.8.0", | ||
"eslint-plugin-flowtype": "^2.37.0", | ||
"eslint": "^5.8.0", | ||
"eslint-plugin-flowtype": "^3.1.4", | ||
"eslint-plugin-react": "^7.4.0", | ||
"flow-bin": "^0.72.0", | ||
"flow-copy-source": "^1.0.1", | ||
"jest": "^22.4.3", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react-test-renderer": "^16.0.0", | ||
"flow-bin": "^0.85.0", | ||
"flow-copy-source": "^2.0.2", | ||
"jest": "^23.6.0", | ||
"react": "^16.6.0", | ||
"react-dom": "^16.6.0", | ||
"react-test-renderer": "^16.6.0", | ||
"rimraf": "^2.6.1", | ||
"typescript": "^3.1.4", | ||
"watchify": "^3.7.0" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.0.0", | ||
"array-find-index": "1.0.2", | ||
"babel-runtime": "^6.23.0", | ||
"kefir": "^3.5.1", | ||
@@ -68,8 +70,8 @@ "kefir-bus": "^2.2.0", | ||
"prop-types": "^15.6.0", | ||
"react-float-anchor": "^2.0.1" | ||
"react-float-anchor": "^3.0.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0" | ||
"react": "^16.6.0", | ||
"react-dom": "^16.6.0" | ||
} | ||
} |
@@ -35,9 +35,3 @@ # react-menu-list | ||
yarn example-build | ||
``` | ||
You can build the example with live editing enabled (using | ||
[react-transform-hmr](https://github.com/gaearon/react-transform-hmr) and | ||
[browserify-hmr](https://github.com/AgentME/browserify-hmr)) by running: | ||
``` | ||
# or use this to auto-rebuild on changes: | ||
yarn example-watch | ||
@@ -113,2 +107,4 @@ ``` | ||
this. | ||
* `domRef`: Optional prop which is passed as the `ref` value to the MenuItem's | ||
div element. | ||
@@ -165,3 +161,3 @@ A MenuItem has the following public methods: | ||
* `open(callback?: Function)` | ||
* `open(): Promise<void>` | ||
* `close()` | ||
@@ -215,7 +211,8 @@ * `toggle()` | ||
* `ButtonComponent`: Optional prop that allows a different component to be used | ||
instead of an html `<button>`. | ||
instead of an html `<button>`. The component passed here must support a | ||
`domRef` prop which is passed as a ref to the button's DOM element. | ||
A MenuButton has the following public methods: | ||
* `open(callback?: Function)` | ||
* `open(): Promise<void>` | ||
* `close()` | ||
@@ -253,3 +250,4 @@ * `toggle()` | ||
[Flow](https://flowtype.org/) type declarations for this module are included! | ||
If you are using Flow, they won't require any configuration to use. | ||
Both [TypeScript](https://www.typescriptlang.org/) and | ||
[Flow](https://flowtype.org/) type definitions for this module are included! | ||
The type definitions won't require any configuration to use. |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
223748
33
1538
27
249
2
+ Added@babel/runtime@^7.0.0
+ Added@types/lodash@4.17.13(transitive)
+ Addedcontain-by-screen@2.1.0(transitive)
+ Addedreact-float-anchor@3.4.1(transitive)
- Removedbabel-runtime@^6.23.0
- Removedbabel-runtime@6.26.0(transitive)
- Removedcontain-by-screen@1.3.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedreact-float-anchor@2.2.1(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
Updatedreact-float-anchor@^3.0.0