mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
1 line
54 KiB
JSON
1 line
54 KiB
JSON
|
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\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 Portal from './Portal';\nimport Fade from './Fade';\nimport { getOriginalBodyPadding, conditionallyUpdateScrollbar, setScrollbarWidth, mapToCssModules, omit, focusableElements, TransitionTimeouts, keyCodes, targetPropType, getTarget } from './utils';\n\nfunction noop() {}\n\nvar FadePropTypes = PropTypes.shape(Fade.propTypes);\nvar propTypes = {\n isOpen: PropTypes.bool,\n autoFocus: PropTypes.bool,\n centered: PropTypes.bool,\n scrollable: PropTypes.bool,\n size: PropTypes.string,\n toggle: PropTypes.func,\n keyboard: PropTypes.bool,\n role: PropTypes.string,\n labelledBy: PropTypes.string,\n backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),\n onEnter: PropTypes.func,\n onExit: PropTypes.func,\n onOpened: PropTypes.func,\n onClosed: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n wrapClassName: PropTypes.string,\n modalClassName: PropTypes.string,\n backdropClassName: PropTypes.string,\n contentClassName: PropTypes.string,\n external: PropTypes.node,\n fade: PropTypes.bool,\n cssModule: PropTypes.object,\n zIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n backdropTransition: FadePropTypes,\n modalTransition: FadePropTypes,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n unmountOnClose: PropTypes.bool,\n returnFocusAfterClose: PropTypes.bool,\n container: targetPropType,\n trapFocus: PropTypes.bool\n};\nvar propsToOmit = Object.keys(propTypes);\nvar defaultProps = {\n isOpen: false,\n autoFocus: true,\n centered: false,\n scrollable: false,\n role: 'dialog',\n backdrop: true,\n keyboard: true,\n zIndex: 1050,\n fade: true,\n onOpened: noop,\n onClosed: noop,\n modalTransition: {\n timeout: TransitionTimeouts.Modal\n },\n backdropTransition: {\n mountOnEnter: true,\n timeout: TransitionTimeouts.Fade // uses standard fade transition\n\n },\n unmountOnClose: true,\n returnFocusAfterClose: true,\n container: 'body',\n trapFocus: false\n};\n\nvar Modal = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Modal, _React$Component);\n\n function Modal(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this._element = null;\n _this._originalBodyPadding = null;\n _this.getFocusableChildren = _this.getFocusableChildren.bind(_assertThisInitialized(_this));\n _this.handleBackdropClick = _this.handleBackdropClick.bind(_assertThisInitialized(_this));\n _this.handleBackdropMouseDown = _this.handleBackdropMouseDown.bind(_assertThisInitialized(_this));\n _this.handleEscape = _
|