mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
19 KiB
JSON
1 line
19 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 _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nvar _transitionStatusToCl;\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\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 = _objectSpread(_objectSpread({}, 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 = _objectSpread(_objectSpread({}, 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
|