mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
12 KiB
JSON
1 line
12 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 React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { DropdownContext } from './DropdownContext';\nimport { mapToCssModules, omit, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n tag: tagPropType,\n header: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.bool,\n text: PropTypes.bool\n};\nvar defaultProps = {\n tag: 'button',\n toggle: true\n};\n\nvar DropdownItem = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DropdownItem, _React$Component);\n\n function DropdownItem(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.getTabIndex = _this.getTabIndex.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = DropdownItem.prototype;\n\n _proto.onClick = function onClick(e) {\n var _this$props = this.props,\n disabled = _this$props.disabled,\n header = _this$props.header,\n divider = _this$props.divider,\n text = _this$props.text;\n\n if (disabled || header || divider || text) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n\n if (this.props.toggle) {\n this.context.toggle(e);\n }\n };\n\n _proto.getTabIndex = function getTabIndex() {\n var _this$props2 = this.props,\n disabled = _this$props2.disabled,\n header = _this$props2.header,\n divider = _this$props2.divider,\n text = _this$props2.text;\n\n if (disabled || header || divider || text) {\n return '-1';\n }\n\n return '0';\n };\n\n _proto.render = function render() {\n var tabIndex = this.getTabIndex();\n var role = tabIndex > -1 ? 'menuitem' : undefined;\n\n var _omit = omit(this.props, ['toggle']),\n className = _omit.className,\n cssModule = _omit.cssModule,\n divider = _omit.divider,\n Tag = _omit.tag,\n header = _omit.header,\n active = _omit.active,\n text = _omit.text,\n props = _objectWithoutPropertiesLoose(_omit, [\"className\", \"cssModule\", \"divider\", \"tag\", \"header\", \"active\", \"text\"]);\n\n var classes = mapToCssModules(classNames(className, {\n disabled: props.disabled,\n 'dropdown-item': !divider && !header && !text,\n active: active,\n 'dropdown-header': header,\n 'dropdown-divider': divider,\n 'dropdown-item-text': text\n }), cssModule);\n\n if (Tag === 'button') {\n if (header) {\n Tag = 'h6';\n } else if (divider) {\n Tag = 'div';\n } else if (props.href) {\n Tag = 'a';\n } else if (text) {\n Tag = 'span';\n }\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({\n type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined\n }, props, {\n tabIndex: tabIndex,\n role: role,\n className: classes,\n onClick: this.onClick\n }));\n };\n\n return DropdownItem;\n}(React.Component);\n\nDropdownItem.propTypes = propTypes;\nDropdownItem.defaultProps = defaultProps;\nDropdownItem.contextType = DropdownContext;\nexport default DropdownItem;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/DropdownItem.js"],"names":["_extends","_objectWithoutPropertiesLoose","_assertThisInitialized","_inheritsLoose","React","PropTypes","classNames","DropdownContext","mapToCssModules","omit","tagPropType","propTypes","children","node","active","bool","disabled","divider","tag","header","onClick","func","className","string","cssModule","object","toggle","text","defaultProps","DropdownItem","_React$Component","props","_this","call","bind","getTabIndex","_proto","prototype","e","_this$props","preventDefault","context","_this$props2","render","tabIndex","role","undefined","_omit","Tag","classes","href","createElement","type","Component","contextType"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,sBAAP,MAAmC,k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FD,MAEO,IAAI/B,OAAJ,EAAa;AAClB+B,QAAAA,GAAG,GAAG,KAAN;AACD,OAFM,MAEA,IAAIjB,KAAK,CAACmB,IAAV,EAAgB;AACrBF,QAAAA,GAAG,GAAG,GAAN;AACD,OAFM,MAEA,IAAIrB,IAAJ,EAAU;AACfqB,QAAAA,GAAG,GAAG,MAAN;AACD;AACF;;AAED,WAAO,aAAa5C,KAAK,CAAC+C,aAAN,CAAoBH,GAApB,EAAyBhD,QAAQ,CAAC;AACpDoD,MAAAA,IAAI,EAAEJ,GAAG,KAAK,QAAR,KAAqBjB,KAAK,CAACX,OAAN,IAAiB,KAAKW,KAAL,CAAWL,MAAjD,IAA2D,QAA3D,GAAsEoB;AADxB,KAAD,EAElDf,KAFkD,EAE3C;AACRa,MAAAA,QAAQ,EAAEA,QADF;AAERC,MAAAA,IAAI,EAAEA,IAFE;AAGRvB,MAAAA,SAAS,EAAE2B,OAHH;AAIR7B,MAAAA,OAAO,EAAE,KAAKA;AAJN,KAF2C,CAAjC,CAApB;AAQD,GA3CD;;AA6CA,SAAOS,YAAP;AACD,CA/F+B,CA+F9BzB,KAAK,CAACiD,SA/FwB,CAAhC;;AAiGAxB,YAAY,CAAClB,SAAb,GAAyBA,SAAzB;AACAkB,YAAY,CAACD,YAAb,GAA4BA,YAA5B;AACAC,YAAY,CAACyB,WAAb,GAA2B/C,eAA3B;AACA,eAAesB,YAAf","sourcesContent":["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 React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { DropdownContext } from './DropdownContext';\nimport { mapToCssModules, omit, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n tag: tagPropType,\n header: PropTypes.bool,\n onClick: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.bool,\n text: PropTypes.bool\n};\nvar defaultProps = {\n tag: 'button',\n toggle: true\n};\n\nvar DropdownItem = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(DropdownItem, _React$Component);\n\n function DropdownItem(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.getTabIndex = _this.getTabIndex.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = DropdownItem.prototype;\n\n _proto.onClick = function onClick(e) {\n var _this$props = this.props,\n disabled = _this$props.disabled,\n header = _this$props.header,\n divider = _this$props.divider,\n text = _this$props.text;\n\n if (disabled || header || divider || text) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n\n if (this.props.toggle) {\n this.context.toggle(e);\n }\n };\n\n _proto.getTabIndex = function getTabIndex() {\n var _this$props2 = this.props,\n disabled = _this$props2.disabled,\n header = _this$props2.header,\n divider = _this$props2.divider,\n text = _this$props2.text;\n\n if (disabled || header || divider || text) {\n return '-1';\n }\n\n return '0';\n };\n\n _proto.render = function render() {\n var tabIndex = this.getTabIndex();\n var role = tabIndex > -1 ? 'menuitem' : undefined;\n\n var _omit = omit(this.props, ['toggle']),\n className = _omit.className,\n cssModule = _omit.cssModule,\n divider = _omit.divider,\n Tag = _omit.tag,\n header = _omit.header,\n active = _omit.active,\n text = _omit.text,\n props = _objectWithoutPropertiesLoose(_omit, [\"className\", \"cssModule\", \"divider\", \"tag\", \"header\", \"active\", \"text\"]);\n\n var classes = mapToCssModules(classNames(className, {\n disabled: props.disabled,\n 'dropdown-item': !divider && !header && !text,\n active: active,\n 'dropdown-header': header,\n 'dropdown-divider': divider,\n 'dropdown-item-text': text\n }), cssModule);\n\n if (Tag === 'button') {\n if (header) {\n Tag = 'h6';\n } else if (divider) {\n Tag = 'div';\n } else if (props.href) {\n Tag = 'a';\n } else if (text) {\n Tag = 'span';\n }\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({\n type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined\n }, props, {\n tabIndex: tabIndex,\n role: role,\n className: classes,\n onClick: this.onClick\n }));\n };\n\n return DropdownItem;\n}(React.Component);\n\nDropdownItem.propTypes = propTypes;\nDropdownItem.defaultProps = defaultProps;\nDropdownItem.contextType = DropdownContext;\nexport default DropdownItem;"]},"metadata":{},"sourceType":"module"} |