Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/3a560f4474acefcad8c685287950259c.json
2020-12-31 20:18:50 +00:00

1 line
4.7 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\nvar _collapseStyles;\n\nimport classNames from 'classnames';\nimport css from 'dom-helpers/css';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nimport React from 'react';\nimport Transition, { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';\nimport createChainedFunction from './createChainedFunction';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar MARGINS = {\n height: ['marginTop', 'marginBottom'],\n width: ['marginLeft', 'marginRight']\n};\n\nfunction getDimensionValue(dimension, elem) {\n var offset = \"offset\" + dimension[0].toUpperCase() + dimension.slice(1);\n var value = elem[offset];\n var margins = MARGINS[dimension];\n return value + parseInt(css(elem, margins[0]), 10) + parseInt(css(elem, margins[1]), 10);\n}\n\nvar collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse show', _collapseStyles);\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n dimension: 'height',\n getDimensionValue: getDimensionValue\n};\n\nvar Collapse = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Collapse, _React$Component);\n\n function Collapse() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handleEnter = function (elem) {\n elem.style[_this.getDimension()] = '0';\n };\n\n _this.handleEntering = function (elem) {\n var dimension = _this.getDimension();\n\n elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension);\n };\n\n _this.handleEntered = function (elem) {\n elem.style[_this.getDimension()] = null;\n };\n\n _this.handleExit = function (elem) {\n var dimension = _this.getDimension();\n\n elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + \"px\";\n triggerBrowserReflow(elem);\n };\n\n _this.handleExiting = function (elem) {\n elem.style[_this.getDimension()] = null;\n };\n\n return _this;\n }\n\n var _proto = Collapse.prototype;\n\n _proto.getDimension = function getDimension() {\n return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;\n }\n /* -- Expanding -- */\n ; // for testing\n\n\n _proto._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {\n var scroll = \"scroll\" + dimension[0].toUpperCase() + dimension.slice(1);\n return elem[scroll] + \"px\";\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n onEnter = _this$props.onEnter,\n onEntering = _this$props.onEntering,\n onEntered = _this$props.onEntered,\n onExit = _this$props.onExit,\n onExiting = _this$props.onExiting,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"className\", \"children\"]);\n\n delete props.dimension;\n delete props.getDimensionValue;\n var handleEnter = createChainedFunction(this.handleEnter, onEnter);\n var handleEntering = createChainedFunction(this.handleEntering, onEntering);\n var handleEntered = createChainedFunction(this.handleEntered, onEntered);\n var handleExit = createChainedFunction(this.handleExit, onExit);\n var handleExiting = createChainedFunction(this.handleExiting, onExiting);\n return React.createElement(Transition, _extends({\n addEndListener: transitionEnd\n }, props, {\n \"aria-expanded\": props.role ? props.in : null,\n onEnter: handleEnter,\n onEntering: handleEntering,\n onEntered: handleEntered,\n onExit: handleExit,\n onExiting: handleExiting\n }), function (state, innerProps) {\n return React.cloneElement(children, _extends({}, innerProps, {\n className: classNames(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width')\n }));\n });\n };\n\n return Collapse;\n}(React.Component);\n\nCollapse.defaultProps = defaultProps;\nexport default Collapse;","map":null,"metadata":{},"sourceType":"module"}