mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-26 02:15:15 +00:00
1 line
8.0 KiB
JSON
1 line
8.0 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n 'aria-label': PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n next: PropTypes.bool,\n previous: PropTypes.bool,\n first: PropTypes.bool,\n last: PropTypes.bool,\n tag: tagPropType\n};\nvar defaultProps = {\n tag: 'a'\n};\n\nvar PaginationLink = function PaginationLink(props) {\n var className = props.className,\n cssModule = props.cssModule,\n next = props.next,\n previous = props.previous,\n first = props.first,\n last = props.last,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"next\", \"previous\", \"first\", \"last\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'page-link'), cssModule);\n var defaultAriaLabel;\n\n if (previous) {\n defaultAriaLabel = 'Previous';\n } else if (next) {\n defaultAriaLabel = 'Next';\n } else if (first) {\n defaultAriaLabel = 'First';\n } else if (last) {\n defaultAriaLabel = 'Last';\n }\n\n var ariaLabel = props['aria-label'] || defaultAriaLabel;\n var defaultCaret;\n\n if (previous) {\n defaultCaret = \"\\u2039\";\n } else if (next) {\n defaultCaret = \"\\u203A\";\n } else if (first) {\n defaultCaret = \"\\xAB\";\n } else if (last) {\n defaultCaret = \"\\xBB\";\n }\n\n var children = props.children;\n\n if (children && Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n if (!attributes.href && Tag === 'a') {\n Tag = 'button';\n }\n\n if (previous || next || first || last) {\n children = [/*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n key: \"caret\"\n }, children || defaultCaret), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\",\n key: \"sr\"\n }, ariaLabel)];\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes,\n \"aria-label\": ariaLabel\n }), children);\n};\n\nPaginationLink.propTypes = propTypes;\nPaginationLink.defaultProps = defaultProps;\nexport default PaginationLink;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/PaginationLink.js"],"names":["_extends","_objectWithoutPropertiesLoose","React","PropTypes","classNames","mapToCssModules","tagPropType","propTypes","string","children","node","className","cssModule","object","next","bool","previous","first","last","tag","defaultProps","PaginationLink","props","Tag","attributes","classes","defaultAriaLabel","ariaLabel","defaultCaret","Array","isArray","length","href","createElement","key"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,EAA0BC,WAA1B,QAA6C,SAA7C;AACA,IAAIC,SAAS,GAAG;AACd,gBAAcJ,SAAS,CAACK,MADV;AAEdC,EAAAA,QAAQ,EAAEN,SAAS,CAACO,IAFN;AAGdC,EAAAA,SAAS,EAAER,SAAS,CAACK,MAHP;AAIdI,EAAAA,SAAS,EAAET,SAAS,CAACU,MAJP;AAKdC,EAAAA,IAAI,EAAEX,SAAS,CAACY,IALF;AAMdC,EAAAA,QAAQ,EAAEb,SAAS,CAACY,IANN;AAOdE,EAAAA,KAAK,EAAEd,SAAS,CAACY,IAPH;AAQdG,EAAAA,IAAI,EAAEf,SAAS,CAACY,IARF;AASdI,EAAAA,GAAG,EAAEb;AATS,CAAhB;AAWA,IAAIc,YAAY,GAAG;AACjBD,EAAAA,GAAG,EAAE;AADY,CAAnB;;AAIA,IAAIE,cAAc,GAAG,SAASA,cAAT,CAAwBC,KAAxB,EAA+B;AAClD,MAAIX,SAAS,GAAGW,KAAK,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AQ,GAAGa,KAAK,CAACb,QAArB;;AAEA,MAAIA,QAAQ,IAAIoB,KAAK,CAACC,OAAN,CAAcrB,QAAd,CAAZ,IAAuCA,QAAQ,CAACsB,MAAT,KAAoB,CAA/D,EAAkE;AAChEtB,IAAAA,QAAQ,GAAG,IAAX;AACD;;AAED,MAAI,CAACe,UAAU,CAACQ,IAAZ,IAAoBT,GAAG,KAAK,GAAhC,EAAqC;AACnCA,IAAAA,GAAG,GAAG,QAAN;AACD;;AAED,MAAIP,QAAQ,IAAIF,IAAZ,IAAoBG,KAApB,IAA6BC,IAAjC,EAAuC;AACrCT,IAAAA,QAAQ,GAAG,CAAC,aAAaP,KAAK,CAAC+B,aAAN,CAAoB,MAApB,EAA4B;AACnD,qBAAe,MADoC;AAEnDC,MAAAA,GAAG,EAAE;AAF8C,KAA5B,EAGtBzB,QAAQ,IAAImB,YAHU,CAAd,EAGmB,aAAa1B,KAAK,CAAC+B,aAAN,CAAoB,MAApB,EAA4B;AACrEtB,MAAAA,SAAS,EAAE,SAD0D;AAErEuB,MAAAA,GAAG,EAAE;AAFgE,KAA5B,EAGxCP,SAHwC,CAHhC,CAAX;AAOD;;AAED,SAAO,aAAazB,KAAK,CAAC+B,aAAN,CAAoBV,GAApB,EAAyBvB,QAAQ,CAAC,EAAD,EAAKwB,UAAL,EAAiB;AACpEb,IAAAA,SAAS,EAAEc,OADyD;AAEpE,kBAAcE;AAFsD,GAAjB,CAAjC,EAGhBlB,QAHgB,CAApB;AAID,CA5DD;;AA8DAY,cAAc,CAACd,SAAf,GAA2BA,SAA3B;AACAc,cAAc,CAACD,YAAf,GAA8BA,YAA9B;AACA,eAAeC,cAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n 'aria-label': PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n next: PropTypes.bool,\n previous: PropTypes.bool,\n first: PropTypes.bool,\n last: PropTypes.bool,\n tag: tagPropType\n};\nvar defaultProps = {\n tag: 'a'\n};\n\nvar PaginationLink = function PaginationLink(props) {\n var className = props.className,\n cssModule = props.cssModule,\n next = props.next,\n previous = props.previous,\n first = props.first,\n last = props.last,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"next\", \"previous\", \"first\", \"last\", \"tag\"]);\n\n var classes = mapToCssModules(classNames(className, 'page-link'), cssModule);\n var defaultAriaLabel;\n\n if (previous) {\n defaultAriaLabel = 'Previous';\n } else if (next) {\n defaultAriaLabel = 'Next';\n } else if (first) {\n defaultAriaLabel = 'First';\n } else if (last) {\n defaultAriaLabel = 'Last';\n }\n\n var ariaLabel = props['aria-label'] || defaultAriaLabel;\n var defaultCaret;\n\n if (previous) {\n defaultCaret = \"\\u2039\";\n } else if (next) {\n defaultCaret = \"\\u203A\";\n } else if (first) {\n defaultCaret = \"\\xAB\";\n } else if (last) {\n defaultCaret = \"\\xBB\";\n }\n\n var children = props.children;\n\n if (children && Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n if (!attributes.href && Tag === 'a') {\n Tag = 'button';\n }\n\n if (previous || next || first || last) {\n children = [/*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\",\n key: \"caret\"\n }, children || defaultCaret), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\",\n key: \"sr\"\n }, ariaLabel)];\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes,\n \"aria-label\": ariaLabel\n }), children);\n};\n\nPaginationLink.propTypes = propTypes;\nPaginationLink.defaultProps = defaultProps;\nexport default PaginationLink;"]},"metadata":{},"sourceType":"module"} |