Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/61281309ddb302e390465cb6f9cf69df.json
2020-12-22 09:59:14 -05:00

1 line
4.8 KiB
JSON

{"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\";\nimport _objectSpread2 from \"@babel/runtime/helpers/esm/objectSpread\";\n\nvar _transitionStatusToCl;\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Transition } from 'react-transition-group';\nimport { mapToCssModules, omit, pick, TransitionTimeouts, TransitionPropTypeKeys, TransitionStatuses, tagPropType } from './utils';\n\nvar propTypes = _objectSpread2({}, Transition.propTypes, {\n isOpen: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n tag: tagPropType,\n className: PropTypes.node,\n navbar: PropTypes.bool,\n cssModule: PropTypes.object,\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.object])\n});\n\nvar defaultProps = _objectSpread2({}, Transition.defaultProps, {\n isOpen: false,\n appear: false,\n enter: true,\n exit: true,\n tag: 'div',\n timeout: TransitionTimeouts.Collapse\n});\n\nvar transitionStatusToClassHash = (_transitionStatusToCl = {}, _transitionStatusToCl[TransitionStatuses.ENTERING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.ENTERED] = 'collapse show', _transitionStatusToCl[TransitionStatuses.EXITING] = 'collapsing', _transitionStatusToCl[TransitionStatuses.EXITED] = 'collapse', _transitionStatusToCl);\n\nfunction getTransitionClass(status) {\n return transitionStatusToClassHash[status] || 'collapse';\n}\n\nfunction getHeight(node) {\n return node.scrollHeight;\n}\n\nvar Collapse = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Collapse, _Component);\n\n function Collapse(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.state = {\n height: null\n };\n ['onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].forEach(function (name) {\n _this[name] = _this[name].bind(_assertThisInitialized(_this));\n });\n return _this;\n }\n\n var _proto = Collapse.prototype;\n\n _proto.onEntering = function onEntering(node, isAppearing) {\n this.setState({\n height: getHeight(node)\n });\n this.props.onEntering(node, isAppearing);\n };\n\n _proto.onEntered = function onEntered(node, isAppearing) {\n this.setState({\n height: null\n });\n this.props.onEntered(node, isAppearing);\n };\n\n _proto.onExit = function onExit(node) {\n this.setState({\n height: getHeight(node)\n });\n this.props.onExit(node);\n };\n\n _proto.onExiting = function onExiting(node) {\n // getting this variable triggers a reflow\n var _unused = node.offsetHeight; // eslint-disable-line no-unused-vars\n\n this.setState({\n height: 0\n });\n this.props.onExiting(node);\n };\n\n _proto.onExited = function onExited(node) {\n this.setState({\n height: null\n });\n this.props.onExited(node);\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n Tag = _this$props.tag,\n isOpen = _this$props.isOpen,\n className = _this$props.className,\n navbar = _this$props.navbar,\n cssModule = _this$props.cssModule,\n children = _this$props.children,\n innerRef = _this$props.innerRef,\n otherProps = _objectWithoutPropertiesLoose(_this$props, [\"tag\", \"isOpen\", \"className\", \"navbar\", \"cssModule\", \"children\", \"innerRef\"]);\n\n var height = this.state.height;\n var transitionProps = pick(otherProps, TransitionPropTypeKeys);\n var childProps = omit(otherProps, TransitionPropTypeKeys);\n return React.createElement(Transition, _extends({}, transitionProps, {\n in: isOpen,\n onEntering: this.onEntering,\n onEntered: this.onEntered,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }), function (status) {\n var collapseClass = getTransitionClass(status);\n var classes = mapToCssModules(classNames(className, collapseClass, navbar && 'navbar-collapse'), cssModule);\n var style = height === null ? null : {\n height: height\n };\n return React.createElement(Tag, _extends({}, childProps, {\n style: _objectSpread2({}, childProps.style, {}, style),\n className: classes,\n ref: _this2.props.innerRef,\n \"aria-expanded\": isOpen ? 'true' : 'false'\n }), children);\n });\n };\n\n return Collapse;\n}(Component);\n\nCollapse.propTypes = propTypes;\nCollapse.defaultProps = defaultProps;\nexport default Collapse;","map":null,"metadata":{},"sourceType":"module"}