1 line
9.8 KiB
JSON
1 line
9.8 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 classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport { useLocale } from '../locale';\nimport DefaultEmptyImg from './empty';\nimport SimpleEmptyImg from './simple';\nimport useStyle from './style';\nconst defaultEmptyImg = /*#__PURE__*/React.createElement(DefaultEmptyImg, null);\nconst simpleEmptyImg = /*#__PURE__*/React.createElement(SimpleEmptyImg, null);\nconst Empty = _a => {\n var {\n className,\n rootClassName,\n prefixCls: customizePrefixCls,\n image = defaultEmptyImg,\n description,\n children,\n imageStyle,\n style\n } = _a,\n restProps = __rest(_a, [\"className\", \"rootClassName\", \"prefixCls\", \"image\", \"description\", \"children\", \"imageStyle\", \"style\"]);\n const {\n getPrefixCls,\n direction,\n empty\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('empty', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [locale] = useLocale('Empty');\n const des = typeof description !== 'undefined' ? description : locale === null || locale === void 0 ? void 0 : locale.description;\n const alt = typeof des === 'string' ? des : 'empty';\n let imageNode = null;\n if (typeof image === 'string') {\n imageNode = /*#__PURE__*/React.createElement(\"img\", {\n alt: alt,\n src: image\n });\n } else {\n imageNode = image;\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: classNames(hashId, cssVarCls, prefixCls, empty === null || empty === void 0 ? void 0 : empty.className, {\n [`${prefixCls}-normal`]: image === simpleEmptyImg,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, rootClassName),\n style: Object.assign(Object.assign({}, empty === null || empty === void 0 ? void 0 : empty.style), style)\n }, restProps), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-image`,\n style: imageStyle\n }, imageNode), des && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, des), children && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-footer`\n }, children)));\n};\nEmpty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;\nEmpty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;\nif (process.env.NODE_ENV !== 'production') {\n Empty.displayName = 'Empty';\n}\nexport default Empty;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigContext","useLocale","DefaultEmptyImg","SimpleEmptyImg","useStyle","defaultEmptyImg","createElement","simpleEmptyImg","Empty","_a","className","rootClassName","prefixCls","customizePrefixCls","image","description","children","imageStyle","style","restProps","getPrefixCls","direction","empty","useContext","wrapCSSVar","hashId","cssVarCls","locale","des","alt","imageNode","src","assign","PRESENTED_IMAGE_DEFAULT","PRESENTED_IMAGE_SIMPLE","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/empty/index.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
|