Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/29f5c01ed305690a4afed56345894106.json

1 line
8.8 KiB
JSON
Raw Normal View History

2020-12-21 11:29:31 -04:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n/* eslint react/no-find-dom-node: 0 */\n// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Manager } from 'react-popper';\nimport classNames from 'classnames';\nimport { DropdownContext } from './DropdownContext';\nimport { mapToCssModules, omit, keyCodes, tagPropType } from './utils';\nvar propTypes = {\n a11y: PropTypes.bool,\n disabled: PropTypes.bool,\n direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),\n group: PropTypes.bool,\n isOpen: PropTypes.bool,\n nav: PropTypes.bool,\n active: PropTypes.bool,\n addonType: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['prepend', 'append'])]),\n size: PropTypes.string,\n tag: tagPropType,\n toggle: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n inNavbar: PropTypes.bool,\n setActiveFromChild: PropTypes.bool\n};\nvar defaultProps = {\n a11y: true,\n isOpen: false,\n direction: 'down',\n nav: false,\n active: false,\n addonType: false,\n inNavbar: false,\n setActiveFromChild: false\n};\n\nvar Dropdown = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Dropdown, _React$Component);\n\n function Dropdown(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.addEvents = _this.addEvents.bind(_assertThisInitialized(_this));\n _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_this));\n _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));\n _this.removeEvents = _this.removeEvents.bind(_assertThisInitialized(_this));\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));\n _this.containerRef = React.createRef();\n return _this;\n }\n\n var _proto = Dropdown.prototype;\n\n _proto.getContextValue = function getContextValue() {\n return {\n toggle: this.toggle,\n isOpen: this.props.isOpen,\n direction: this.props.direction === 'down' && this.props.dropup ? 'up' : this.props.direction,\n inNavbar: this.props.inNavbar,\n disabled: this.props.disabled\n };\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.handleProps();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.isOpen !== prevProps.isOpen) {\n this.handleProps();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.removeEvents();\n };\n\n _proto.getContainer = function getContainer() {\n return this.containerRef.current;\n };\n\n _proto.getMenuCtrl = function getMenuCtrl() {\n if (this._$menuCtrl) return this._$menuCtrl;\n this._$menuCtrl = this.getContainer().querySelector('[aria-expanded]');\n return this._$menuCtrl;\n };\n\n _proto.getMenuItems = function getMenuItems() {\n return [].slice.call(this.getContainer().querySelectorAll('[role=\"menuitem\"]'));\n };\n\n _proto.addEvents = function addEvents() {\n var _this2 = this;\n\n ['click', 'touchstart', 'keyup'].forEach(function (event) {\n return document.addEventListener(event, _this2.handleDocumentClick, true);\n });\n };\n\n _proto.removeEvents = function removeEvents() {\n var _this3 = this;\n\n ['click', 'touchstart', 'keyup'].forEach(function (event) {\n return document.removeEventListener(event, _this3.handleDocumentClick, true);\n });\n };\n\n _proto.handleDocumentClick = function handleDocumentClick(e) {\n if (e && (e.which === 3 || e.type === 'keyup' && e.which !== keyCodes.tab)) return;\n var container = this.getContainer();\n\n if (container.contain