GoScrobble/web/node_modules/.cache/babel-loader/ea1df57528861acc2bdc5eb16ca130c4.json

1 line
17 KiB
JSON
Raw Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\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 ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { Popper } from 'react-popper';\nimport { DropdownContext } from './DropdownContext';\nimport { mapToCssModules, tagPropType, targetPropType, getTarget } from './utils';\nvar propTypes = {\n tag: tagPropType,\n children: PropTypes.node.isRequired,\n right: PropTypes.bool,\n flip: PropTypes.bool,\n modifiers: PropTypes.object,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n persist: PropTypes.bool,\n positionFixed: PropTypes.bool,\n container: targetPropType\n};\nvar defaultProps = {\n tag: 'div',\n flip: true\n};\nvar noFlipModifier = {\n flip: {\n enabled: false\n }\n};\nvar directionPositionMap = {\n up: 'top',\n left: 'left',\n right: 'right',\n down: 'bottom'\n};\n\nvar DropdownMenu = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DropdownMenu, _React$Component);\n\n function DropdownMenu() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = DropdownMenu.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n right = _this$props.right,\n tag = _this$props.tag,\n flip = _this$props.flip,\n modifiers = _this$props.modifiers,\n persist = _this$props.persist,\n positionFixed = _this$props.positionFixed,\n container = _this$props.container,\n attrs = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"cssModule\", \"right\", \"tag\", \"flip\", \"modifiers\", \"persist\", \"positionFixed\", \"container\"]);\n\n var classes = mapToCssModules(classNames(className, 'dropdown-menu', {\n 'dropdown-menu-right': right,\n show: this.context.isOpen\n }), cssModule);\n var Tag = tag;\n\n if (persist || this.context.isOpen && !this.context.inNavbar) {\n var position1 = directionPositionMap[this.context.direction] || 'bottom';\n var position2 = right ? 'end' : 'start';\n var poperPlacement = position1 + \"-\" + position2;\n var poperModifiers = !flip ? _objectSpread(_objectSpread({}, modifiers), noFlipModifier) : modifiers;\n var popperPositionFixed = !!positionFixed;\n var popper = /*#__PURE__*/React.createElement(Popper, {\n placement: poperPlacement,\n modifiers: poperModifiers,\n positionFixed: popperPositionFixed\n }, function (_ref) {\n var ref = _ref.ref,\n style = _ref.style,\n placement = _ref.placement;\n\n var combinedStyle = _objectSpread(_object