8eebba4bc40a4710128dce068e8bd7d7a17241509ad6a7680ebd4def8a273437.json 15 KB

1
  1. {"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 { devUseWarning } from '../_util/warning';\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 actions,\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), description && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), actions && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-actions`\n }, actions));\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 actions,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"actions\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const mergedActions = actions !== null && actions !== void 0 ? actions : btn;\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Notification');\n warning.deprecated(!btn, 'btn', 'actions');\n }\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 actions: mergedActions\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","devUseWarning","ConfigContext","useCSSVarCls","useStyle","PurePanelStyle","TypeIcon","info","createElement","success","error","warning","loading","getCloseIcon","prefixCls","closeIcon","className","typeToIcon","PureContent","props","icon","type","message","description","actions","role","iconNode","PurePanel","staticPrefixCls","btn","closable","notificationClassName","restProps","getPrefixCls","useContext","mergedActions","process","env","NODE_ENV","deprecated","noticePrefixCls","rootCls","wrapCSSVar","hashId","cssVarCls","assign","eventKey","duration","content"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/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 { devUseWarning } from '../_util/warning';\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 actions,\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), description && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), actions && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-actions`\n }, actions));\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 actions,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"actions\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const mergedActions = actions !== null && actions !== void 0 ? actions : btn;\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Notification');\n warning.deprecated(!btn, 'btn', 'actions');\n }\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 actions: mergedActions\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,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