PromoCursed/node_modules/.cache/babel-loader/655f2dbcbf3ba3ee96201248b7246e6c755ce34d5c12388ad250aea669245b89.json

1 line
11 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"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 pickAttrs from \"rc-util/es/pickAttrs\";\nimport { ConfigContext } from '../config-provider';\nimport Skeleton from '../skeleton';\nimport StatisticNumber from './Number';\nimport useStyle from './style';\nconst Statistic = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n valueStyle,\n value = 0,\n title,\n valueRender,\n prefix,\n suffix,\n loading = false,\n /* --- FormatConfig starts --- */\n formatter,\n precision,\n decimalSeparator = '.',\n groupSeparator = ',',\n /* --- FormatConfig starts --- */\n onMouseEnter,\n onMouseLeave\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"valueStyle\", \"value\", \"title\", \"valueRender\", \"prefix\", \"suffix\", \"loading\", \"formatter\", \"precision\", \"decimalSeparator\", \"groupSeparator\", \"onMouseEnter\", \"onMouseLeave\"]);\n const {\n getPrefixCls,\n direction,\n statistic\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('statistic', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const valueNode = /*#__PURE__*/React.createElement(StatisticNumber, {\n decimalSeparator: decimalSeparator,\n groupSeparator: groupSeparator,\n prefixCls: prefixCls,\n formatter: formatter,\n precision: precision,\n value: value\n });\n const cls = classNames(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, statistic === null || statistic === void 0 ? void 0 : statistic.className, className, rootClassName, hashId, cssVarCls);\n const restProps = pickAttrs(rest, {\n aria: true,\n data: true\n });\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n className: cls,\n style: Object.assign(Object.assign({}, statistic === null || statistic === void 0 ? void 0 : statistic.style), style),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n }), title && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-title`\n }, title), /*#__PURE__*/React.createElement(Skeleton, {\n paragraph: false,\n loading: loading,\n className: `${prefixCls}-skeleton`\n }, /*#__PURE__*/React.createElement(\"div\", {\n style: valueStyle,\n className: `${prefixCls}-content`\n }, prefix && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-prefix`\n }, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-content-suffix`\n }, suffix)))));\n};\nif (process.env.NODE_ENV !== 'production') {\n Statistic.displayName = 'Statistic';\n}\nexport default Statistic;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","pickAttrs","ConfigContext","Skeleton","StatisticNumber","useStyle","Statistic","props","prefixCls","customizePrefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave","rest","getPrefixCls","direction","statistic","useContext","wrapCSSVar","hashId","cssVarCls","valueNode","createElement","cls","restProps","aria","data","assign","paragraph","process",