1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport { Notice } from 'rc-notification';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport useStyle from './style';\nimport PurePanelStyle from './style/pure-panel';\nexport const TypeIcon = {\n info: /*#__PURE__*/React.createElement(InfoCircleFilled, null),\n success: /*#__PURE__*/React.createElement(CheckCircleFilled, null),\n error: /*#__PURE__*/React.createElement(CloseCircleFilled, null),\n warning: /*#__PURE__*/React.createElement(ExclamationCircleFilled, null),\n loading: /*#__PURE__*/React.createElement(LoadingOutlined, null)\n};\nexport function getCloseIcon(prefixCls, closeIcon) {\n if (closeIcon === null || closeIcon === false) {\n return null;\n }\n return closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n });\n}\nconst typeToIcon = {\n success: CheckCircleFilled,\n info: InfoCircleFilled,\n error: CloseCircleFilled,\n warning: ExclamationCircleFilled\n};\nexport const PureContent = props => {\n const {\n prefixCls,\n icon,\n type,\n message,\n description,\n btn,\n role = 'alert'\n } = props;\n let iconNode = null;\n if (icon) {\n iconNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-icon`\n }, icon);\n } else if (type) {\n iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {\n className: classNames(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames({\n [`${prefixCls}-with-icon`]: iconNode\n }),\n role: role\n }, iconNode, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, message), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), btn && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-btn`\n }, btn));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n icon,\n type,\n message,\n description,\n btn,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('notification');\n const noticePrefixCls = `${prefixCls}-notice`;\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)\n }, /*#__PURE__*/React.createElement(PurePanelStyle, {\n prefixCls: prefixCls\n }), /*#__PURE__*/React.createElement(Notice, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n eventKey: \"pure\",\n duration: null,\n closable: closable,\n className: classNames({\n notificationClassName\n }),\n closeIcon: getCloseIcon(prefixCls, closeIcon),\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: noticePrefixCls,\n icon: icon,\n type: type,\n message: message,\n description: description,\n btn: btn\n })\n }))));\n};\nexport default PurePanel;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","CheckCircleFilled","CloseCircleFilled","CloseOutlined","ExclamationCircleFilled","InfoCircleFilled","LoadingOutlined","classNames","Notice","ConfigContext","useCSSVarCls","useStyle","PurePanelStyle","TypeIcon","info","createElement","success","error","warning","loading","getCloseIcon","prefixCls","closeIcon","className","typeToIcon","PureContent","props","icon","type","message","description","btn","role","iconNode","PurePanel","staticPrefixCls","closable","notificationClassName","restProps","getPrefixCls","useContext","noticePrefixCls","rootCls","wrapCSSVar","hashId","cssVarCls","assign","eventKey","duration","content"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/notification/PurePanel.js"],"sourcesContent":["\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport { Notice } from 'rc-notification';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport useStyle from './style';\nimport PurePanelStyle from './style/pure-panel';\nexport const TypeIcon = {\n info: /*#__PURE__*/React.createElement(InfoCircleFilled, null),\n success: /*#__PURE__*/React.createElement(CheckCircleFilled, null),\n error: /*#__PURE__*/React.createElement(CloseCircleFilled, null),\n warning: /*#__PURE__*/React.createElement(ExclamationCircleFilled, null),\n loading: /*#__PURE__*/React.createElement(LoadingOutlined, null)\n};\nexport function getCloseIcon(prefixCls, closeIcon) {\n if (closeIcon === null || closeIcon === false) {\n return null;\n }\n return closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n });\n}\nconst typeToIcon = {\n success: CheckCircleFilled,\n info: InfoCircleFilled,\n error: CloseCircleFilled,\n warning: ExclamationCircleFilled\n};\nexport const PureContent = props => {\n const {\n prefixCls,\n icon,\n type,\n message,\n description,\n btn,\n role = 'alert'\n } = props;\n let iconNode = null;\n if (icon) {\n iconNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-icon`\n }, icon);\n } else if (type) {\n iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {\n className: classNames(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames({\n [`${prefixCls}-with-icon`]: iconNode\n }),\n role: role\n }, iconNode, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, message), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), btn && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-btn`\n }, btn));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n icon,\n type,\n message,\n description,\n btn,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('notification');\n const noticePrefixCls = `${prefixCls}-notice`;\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)\n }, /*#__PURE__*/React.createElement(PurePanelStyle, {\n prefixCls: prefixCls\n }), /*#__PURE__*/React.createElement(Notice, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n eventKey: \"pure\",\n duration: null,\n closable: closable,\n className: classNames({\n notificationClassName\n }),\n closeIcon: getCloseIcon(prefixCls, closeIcon),\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: noticePrefixCls,\n icon: icon,\n type: type,\n message: message,\n description: description,\n btn: btn\n })\n }))));\n};\nexport default PurePanel;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MA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