()
| 13269 | _inheritsLoose(AbstractNav, _React$Component); |
| 13270 | |
| 13271 | function AbstractNav() { |
| 13272 | var _this; |
| 13273 | |
| 13274 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 13275 | args[_key] = arguments[_key]; |
| 13276 | } |
| 13277 | |
| 13278 | _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; |
| 13279 | |
| 13280 | _this.handleSelect = function (key, event) { |
| 13281 | var _this$props = _this.props, |
| 13282 | onSelect = _this$props.onSelect, |
| 13283 | parentOnSelect = _this$props.parentOnSelect; |
| 13284 | if (key == null) return; |
| 13285 | if (onSelect) onSelect(key, event); |
| 13286 | if (parentOnSelect) parentOnSelect(key, event); |
| 13287 | }; |
| 13288 | |
| 13289 | _this.handleKeyDown = function (event) { |
| 13290 | var onKeyDown = _this.props.onKeyDown; |
| 13291 | if (onKeyDown) onKeyDown(event); |
| 13292 | var nextActiveChild; |
| 13293 | |
| 13294 | switch (event.key) { |
| 13295 | case 'ArrowLeft': |
| 13296 | case 'ArrowUp': |
| 13297 | nextActiveChild = _this.getNextActiveChild(-1); |
| 13298 | break; |
| 13299 | |
| 13300 | case 'ArrowRight': |
| 13301 | case 'ArrowDown': |
| 13302 | nextActiveChild = _this.getNextActiveChild(1); |
| 13303 | break; |
| 13304 | |
| 13305 | default: |
| 13306 | return; |
| 13307 | } |
| 13308 | |
| 13309 | if (!nextActiveChild) return; |
| 13310 | event.preventDefault(); |
| 13311 | |
| 13312 | _this.handleSelect(nextActiveChild.dataset.rbEventKey, event); |
| 13313 | |
| 13314 | _this._needsRefocus = true; |
| 13315 | }; |
| 13316 | |
| 13317 | _this.attachRef = function (ref) { |
| 13318 | _this.listNode = ref; |
| 13319 | }; |
| 13320 | |
| 13321 | _this.state = { |
| 13322 | navContext: null |
| 13323 | }; |
| 13324 | return _this; |
| 13325 | } |
| 13326 | |
| 13327 | AbstractNav.getDerivedStateFromProps = function getDerivedStateFromProps(_ref) { |
| 13328 | var activeKey = _ref.activeKey, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…