mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
1 line
18 KiB
JSON
1 line
18 KiB
JSON
|
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _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\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 from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Transition } from 'react-transition-group';\nimport { mapToCssModules, TransitionTimeouts, TransitionStatuses, tagPropType } from './utils';\n\nvar CarouselItem = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CarouselItem, _React$Component);\n\n function CarouselItem(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n startAnimation: false\n };\n _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));\n _this.onEntering = _this.onEntering.bind(_assertThisInitialized(_this));\n _this.onExit = _this.onExit.bind(_assertThisInitialized(_this));\n _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));\n _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = CarouselItem.prototype;\n\n _proto.onEnter = function onEnter(node, isAppearing) {\n this.setState({\n startAnimation: false\n });\n this.props.onEnter(node, isAppearing);\n };\n\n _proto.onEntering = function onEntering(node, isAppearing) {\n // getting this variable triggers a reflow\n var offsetHeight = node.offsetHeight;\n this.setState({\n startAnimation: true\n });\n this.props.onEntering(node, isAppearing);\n return offsetHeight;\n };\n\n _proto.onExit = function onExit(node) {\n this.setState({\n startAnimation: false\n });\n this.props.onExit(node);\n };\n\n _proto.onExiting = function onExiting(node) {\n this.setState({\n startAnimation: true\n });\n node.dispatchEvent(new CustomEvent('slide.bs.carousel'));\n this.props.onExiting(node);\n };\n\n _proto.onExited = function onExited(node) {\n node.dispatchEvent(new CustomEvent('slid.bs.carousel'));\n this.props.onExited(node);\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n isIn = _this$props.in,\n children = _this$props.children,\n cssModule = _this$props.cssModule,\n slide = _this$props.slide,\n Tag = _this$props.tag,\n className = _this$props.className,\n transitionProps = _objectWithoutPropertiesLoose(_this$props, [\"in\", \"children\", \"cssModule\", \"slide\", \"tag\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, transitionProps, {\n enter: slide,\n exit: slide,\n in: isIn,\n onEnter: this.onEnter,\n onEntering: this.onEntering,\n onExit: this
|