d9281ae57b0cdee2a09b1c8bdb36a7cd.json
6.06 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\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};\n\nimport * as React from 'react';\nimport RcRate from 'rc-rate';\nimport StarFilled from '@ant-design/icons/StarFilled';\nimport Tooltip from '../tooltip';\nimport { ConfigContext } from '../config-provider';\nvar Rate = /*#__PURE__*/React.forwardRef(function (_a, ref) {\n var prefixCls = _a.prefixCls,\n tooltips = _a.tooltips,\n props = __rest(_a, [\"prefixCls\", \"tooltips\"]);\n\n var characterRender = function characterRender(node, _ref) {\n var index = _ref.index;\n if (!tooltips) return node;\n return /*#__PURE__*/React.createElement(Tooltip, {\n title: tooltips[index]\n }, node);\n };\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var ratePrefixCls = getPrefixCls('rate', prefixCls);\n return /*#__PURE__*/React.createElement(RcRate, _extends({\n ref: ref,\n characterRender: characterRender\n }, props, {\n prefixCls: ratePrefixCls,\n direction: direction\n }));\n});\nRate.displayName = 'Rate';\nRate.defaultProps = {\n character: /*#__PURE__*/React.createElement(StarFilled, null)\n};\nexport default Rate;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/rate/index.js"],"names":["_extends","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcRate","StarFilled","Tooltip","ConfigContext","Rate","forwardRef","_a","ref","prefixCls","tooltips","props","characterRender","node","_ref","index","createElement","title","_React$useContext","useContext","getPrefixCls","direction","ratePrefixCls","displayName","defaultProps","character"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EAAoED,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;AACrE;;AAED,MAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EAAqE,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE,EAAwE;AAC3I,QAAIT,CAAC,CAACO,OAAF,CAAUL,CAAC,CAACO,CAAD,CAAX,IAAkB,CAAlB,IAAuBN,MAAM,CAACC,SAAP,CAAiBO,oBAAjB,CAAsCL,IAAtC,CAA2CP,CAA3C,EAA8CG,CAAC,CAACO,CAAD,CAA/C,CAA3B,EAAgFR,CAAC,CAACC,CAAC,CAACO,CAAD,CAAF,CAAD,GAAUV,CAAC,CAACG,CAAC,CAACO,CAAD,CAAF,CAAX;AACjF;AACD,SAAOR,CAAP;AACD,CAXD;;AAaA,OAAO,KAAKW,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,SAAnB;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,aAAT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AK,CAACgB,aAAN,CAAoBd,UAApB,EAAgC,IAAhC;AADN,CAApB;AAGA,eAAeG,IAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\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};\n\nimport * as React from 'react';\nimport RcRate from 'rc-rate';\nimport StarFilled from '@ant-design/icons/StarFilled';\nimport Tooltip from '../tooltip';\nimport { ConfigContext } from '../config-provider';\nvar Rate = /*#__PURE__*/React.forwardRef(function (_a, ref) {\n var prefixCls = _a.prefixCls,\n tooltips = _a.tooltips,\n props = __rest(_a, [\"prefixCls\", \"tooltips\"]);\n\n var characterRender = function characterRender(node, _ref) {\n var index = _ref.index;\n if (!tooltips) return node;\n return /*#__PURE__*/React.createElement(Tooltip, {\n title: tooltips[index]\n }, node);\n };\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var ratePrefixCls = getPrefixCls('rate', prefixCls);\n return /*#__PURE__*/React.createElement(RcRate, _extends({\n ref: ref,\n characterRender: characterRender\n }, props, {\n prefixCls: ratePrefixCls,\n direction: direction\n }));\n});\nRate.displayName = 'Rate';\nRate.defaultProps = {\n character: /*#__PURE__*/React.createElement(StarFilled, null)\n};\nexport default Rate;"]},"metadata":{},"sourceType":"module"}