d036de2d05c7262a38b1742141fdb0be.json
17.9 KB
{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useTransitionDuration, defaultProps } from './common';\nvar gradientSeed = 0;\n\nfunction stripPercentToNumber(percent) {\n return +percent.replace('%', '');\n}\n\nfunction toArray(symArray) {\n return Array.isArray(symArray) ? symArray : [symArray];\n}\n\nfunction getPathStyles(offset, percent, strokeColor, strokeWidth) {\n var gapDegree = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var gapPosition = arguments.length > 5 ? arguments[5] : undefined;\n var radius = 50 - strokeWidth / 2;\n var beginPositionX = 0;\n var beginPositionY = -radius;\n var endPositionX = 0;\n var endPositionY = -2 * radius;\n\n switch (gapPosition) {\n case 'left':\n beginPositionX = -radius;\n beginPositionY = 0;\n endPositionX = 2 * radius;\n endPositionY = 0;\n break;\n\n case 'right':\n beginPositionX = radius;\n beginPositionY = 0;\n endPositionX = -2 * radius;\n endPositionY = 0;\n break;\n\n case 'bottom':\n beginPositionY = radius;\n endPositionY = 2 * radius;\n break;\n\n default:\n }\n\n var pathString = \"M 50,50 m \".concat(beginPositionX, \",\").concat(beginPositionY, \"\\n a \").concat(radius, \",\").concat(radius, \" 0 1 1 \").concat(endPositionX, \",\").concat(-endPositionY, \"\\n a \").concat(radius, \",\").concat(radius, \" 0 1 1 \").concat(-endPositionX, \",\").concat(endPositionY);\n var len = Math.PI * 2 * radius;\n var pathStyle = {\n stroke: strokeColor,\n strokeDasharray: \"\".concat(percent / 100 * (len - gapDegree), \"px \").concat(len, \"px\"),\n strokeDashoffset: \"-\".concat(gapDegree / 2 + offset / 100 * (len - gapDegree), \"px\"),\n transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s'\n };\n return {\n pathString: pathString,\n pathStyle: pathStyle\n };\n}\n\nvar Circle = function Circle(_ref) {\n var prefixCls = _ref.prefixCls,\n strokeWidth = _ref.strokeWidth,\n trailWidth = _ref.trailWidth,\n gapDegree = _ref.gapDegree,\n gapPosition = _ref.gapPosition,\n trailColor = _ref.trailColor,\n strokeLinecap = _ref.strokeLinecap,\n style = _ref.style,\n className = _ref.className,\n strokeColor = _ref.strokeColor,\n percent = _ref.percent,\n restProps = _objectWithoutProperties(_ref, [\"prefixCls\", \"strokeWidth\", \"trailWidth\", \"gapDegree\", \"gapPosition\", \"trailColor\", \"strokeLinecap\", \"style\", \"className\", \"strokeColor\", \"percent\"]);\n\n var gradientId = React.useMemo(function () {\n gradientSeed += 1;\n return gradientSeed;\n }, []);\n\n var _getPathStyles = getPathStyles(0, 100, trailColor, strokeWidth, gapDegree, gapPosition),\n pathString = _getPathStyles.pathString,\n pathStyle = _getPathStyles.pathStyle;\n\n var percentList = toArray(percent);\n var strokeColorList = toArray(strokeColor);\n var gradient = strokeColorList.find(function (color) {\n return Object.prototype.toString.call(color) === '[object Object]';\n });\n\n var _useTransitionDuratio = useTransitionDuration(percentList),\n _useTransitionDuratio2 = _slicedToArray(_useTransitionDuratio, 1),\n paths = _useTransitionDuratio2[0];\n\n var getStokeList = function getStokeList() {\n var stackPtg = 0;\n return percentList.map(function (ptg, index) {\n var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];\n var stroke = Object.prototype.toString.call(color) === '[object Object]' ? \"url(#\".concat(prefixCls, \"-gradient-\").concat(gradientId, \")\") : '';\n var pathStyles = getPathStyles(stackPtg, ptg, color, strokeWidth, gapDegree, gapPosition);\n stackPtg += ptg;\n return React.createElement(\"path\", {\n key: index,\n className: \"\".concat(prefixCls, \"-circle-path\"),\n d: pathStyles.pathString,\n stroke: stroke,\n strokeLinecap: strokeLinecap,\n strokeWidth: strokeWidth,\n opacity: ptg === 0 ? 0 : 1,\n fillOpacity: \"0\",\n style: pathStyles.pathStyle,\n ref: paths[index]\n });\n });\n };\n\n return React.createElement(\"svg\", Object.assign({\n className: classNames(\"\".concat(prefixCls, \"-circle\"), className),\n viewBox: \"0 0 100 100\",\n style: style\n }, restProps), gradient && React.createElement(\"defs\", null, React.createElement(\"linearGradient\", {\n id: \"\".concat(prefixCls, \"-gradient-\").concat(gradientId),\n x1: \"100%\",\n y1: \"0%\",\n x2: \"0%\",\n y2: \"0%\"\n }, Object.keys(gradient).sort(function (a, b) {\n return stripPercentToNumber(a) - stripPercentToNumber(b);\n }).map(function (key, index) {\n return React.createElement(\"stop\", {\n key: index,\n offset: key,\n stopColor: gradient[key]\n });\n }))), React.createElement(\"path\", {\n className: \"\".concat(prefixCls, \"-circle-trail\"),\n d: pathString,\n stroke: trailColor,\n strokeLinecap: strokeLinecap,\n strokeWidth: trailWidth || strokeWidth,\n fillOpacity: \"0\",\n style: pathStyle\n }), getStokeList().reverse());\n};\n\nCircle.defaultProps = defaultProps;\nCircle.displayName = 'Circle';\nexport default Circle;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-progress/es/Circle.js"],"names":["_slicedToArray","_objectWithoutProperties","React","classNames","useTransitionDuration","defaultProps","gradientSeed","stripPercentToNumber","percent","replace","toArray","symArray","Array","isArray","getPathStyles","offset","strokeColor","strokeWidth","gapDegree","arguments","length","undefined","gapPosition","radius","beginPositionX","beginPositionY","endPositionX","endPositionY","pathString","concat","len","Math","PI","pathStyle","stroke","strokeDasharray","strokeDashoffset","transition","Circle","_ref","prefixCls","trailWidth","trailColor","strokeLinecap","style","className","restProps","gradientId","useMemo","_getPathStyles","percentList","strokeColorList","gradient","find","color","Object","prototype","toString","call","_useTransitionDuratio","_useTransitionDuratio2","paths","getStokeList","stackPtg","map","ptg","index","pathStyles","createElement","key","d","opacity","fillOpacity","ref","assign","viewBox","id","x1","y1","x2","y2","keys","sort","a","b","stopColor","reverse","displayName"],"mappings":"AAAA,OAAOA,cAAP,MAA2B,0CAA3B;AACA,OAAOC,wBAAP,MAAq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AC5C,WAAO7E,oBAAoB,CAAC4E,CAAD,CAApB,GAA0B5E,oBAAoB,CAAC6E,CAAD,CAArD;AACD,GAFE,EAEApB,GAFA,CAEI,UAAUK,GAAV,EAAeH,KAAf,EAAsB;AAC3B,WAAOhE,KAAK,CAACkE,aAAN,CAAoB,MAApB,EAA4B;AACjCC,MAAAA,GAAG,EAAEH,KAD4B;AAEjCnD,MAAAA,MAAM,EAAEsD,GAFyB;AAGjCgB,MAAAA,SAAS,EAAEjC,QAAQ,CAACiB,GAAD;AAHc,KAA5B,CAAP;AAKD,GARE,CAN0D,CAAlC,CAJpB,EAkBDnE,KAAK,CAACkE,aAAN,CAAoB,MAApB,EAA4B;AAChCvB,IAAAA,SAAS,EAAE,GAAGhB,MAAH,CAAUW,SAAV,EAAqB,eAArB,CADqB;AAEhC8B,IAAAA,CAAC,EAAE1C,UAF6B;AAGhCM,IAAAA,MAAM,EAAEQ,UAHwB;AAIhCC,IAAAA,aAAa,EAAEA,aAJiB;AAKhC1B,IAAAA,WAAW,EAAEwB,UAAU,IAAIxB,WALK;AAMhCuD,IAAAA,WAAW,EAAE,GANmB;AAOhC5B,IAAAA,KAAK,EAAEX;AAPyB,GAA5B,CAlBC,EA0BH6B,YAAY,GAAGwB,OAAf,EA1BG,CAAP;AA2BD,CAlFD;;AAoFAhD,MAAM,CAACjC,YAAP,GAAsBA,YAAtB;AACAiC,MAAM,CAACiD,WAAP,GAAqB,QAArB;AACA,eAAejD,MAAf","sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useTransitionDuration, defaultProps } from './common';\nvar gradientSeed = 0;\n\nfunction stripPercentToNumber(percent) {\n return +percent.replace('%', '');\n}\n\nfunction toArray(symArray) {\n return Array.isArray(symArray) ? symArray : [symArray];\n}\n\nfunction getPathStyles(offset, percent, strokeColor, strokeWidth) {\n var gapDegree = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var gapPosition = arguments.length > 5 ? arguments[5] : undefined;\n var radius = 50 - strokeWidth / 2;\n var beginPositionX = 0;\n var beginPositionY = -radius;\n var endPositionX = 0;\n var endPositionY = -2 * radius;\n\n switch (gapPosition) {\n case 'left':\n beginPositionX = -radius;\n beginPositionY = 0;\n endPositionX = 2 * radius;\n endPositionY = 0;\n break;\n\n case 'right':\n beginPositionX = radius;\n beginPositionY = 0;\n endPositionX = -2 * radius;\n endPositionY = 0;\n break;\n\n case 'bottom':\n beginPositionY = radius;\n endPositionY = 2 * radius;\n break;\n\n default:\n }\n\n var pathString = \"M 50,50 m \".concat(beginPositionX, \",\").concat(beginPositionY, \"\\n a \").concat(radius, \",\").concat(radius, \" 0 1 1 \").concat(endPositionX, \",\").concat(-endPositionY, \"\\n a \").concat(radius, \",\").concat(radius, \" 0 1 1 \").concat(-endPositionX, \",\").concat(endPositionY);\n var len = Math.PI * 2 * radius;\n var pathStyle = {\n stroke: strokeColor,\n strokeDasharray: \"\".concat(percent / 100 * (len - gapDegree), \"px \").concat(len, \"px\"),\n strokeDashoffset: \"-\".concat(gapDegree / 2 + offset / 100 * (len - gapDegree), \"px\"),\n transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s'\n };\n return {\n pathString: pathString,\n pathStyle: pathStyle\n };\n}\n\nvar Circle = function Circle(_ref) {\n var prefixCls = _ref.prefixCls,\n strokeWidth = _ref.strokeWidth,\n trailWidth = _ref.trailWidth,\n gapDegree = _ref.gapDegree,\n gapPosition = _ref.gapPosition,\n trailColor = _ref.trailColor,\n strokeLinecap = _ref.strokeLinecap,\n style = _ref.style,\n className = _ref.className,\n strokeColor = _ref.strokeColor,\n percent = _ref.percent,\n restProps = _objectWithoutProperties(_ref, [\"prefixCls\", \"strokeWidth\", \"trailWidth\", \"gapDegree\", \"gapPosition\", \"trailColor\", \"strokeLinecap\", \"style\", \"className\", \"strokeColor\", \"percent\"]);\n\n var gradientId = React.useMemo(function () {\n gradientSeed += 1;\n return gradientSeed;\n }, []);\n\n var _getPathStyles = getPathStyles(0, 100, trailColor, strokeWidth, gapDegree, gapPosition),\n pathString = _getPathStyles.pathString,\n pathStyle = _getPathStyles.pathStyle;\n\n var percentList = toArray(percent);\n var strokeColorList = toArray(strokeColor);\n var gradient = strokeColorList.find(function (color) {\n return Object.prototype.toString.call(color) === '[object Object]';\n });\n\n var _useTransitionDuratio = useTransitionDuration(percentList),\n _useTransitionDuratio2 = _slicedToArray(_useTransitionDuratio, 1),\n paths = _useTransitionDuratio2[0];\n\n var getStokeList = function getStokeList() {\n var stackPtg = 0;\n return percentList.map(function (ptg, index) {\n var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1];\n var stroke = Object.prototype.toString.call(color) === '[object Object]' ? \"url(#\".concat(prefixCls, \"-gradient-\").concat(gradientId, \")\") : '';\n var pathStyles = getPathStyles(stackPtg, ptg, color, strokeWidth, gapDegree, gapPosition);\n stackPtg += ptg;\n return React.createElement(\"path\", {\n key: index,\n className: \"\".concat(prefixCls, \"-circle-path\"),\n d: pathStyles.pathString,\n stroke: stroke,\n strokeLinecap: strokeLinecap,\n strokeWidth: strokeWidth,\n opacity: ptg === 0 ? 0 : 1,\n fillOpacity: \"0\",\n style: pathStyles.pathStyle,\n ref: paths[index]\n });\n });\n };\n\n return React.createElement(\"svg\", Object.assign({\n className: classNames(\"\".concat(prefixCls, \"-circle\"), className),\n viewBox: \"0 0 100 100\",\n style: style\n }, restProps), gradient && React.createElement(\"defs\", null, React.createElement(\"linearGradient\", {\n id: \"\".concat(prefixCls, \"-gradient-\").concat(gradientId),\n x1: \"100%\",\n y1: \"0%\",\n x2: \"0%\",\n y2: \"0%\"\n }, Object.keys(gradient).sort(function (a, b) {\n return stripPercentToNumber(a) - stripPercentToNumber(b);\n }).map(function (key, index) {\n return React.createElement(\"stop\", {\n key: index,\n offset: key,\n stopColor: gradient[key]\n });\n }))), React.createElement(\"path\", {\n className: \"\".concat(prefixCls, \"-circle-trail\"),\n d: pathString,\n stroke: trailColor,\n strokeLinecap: strokeLinecap,\n strokeWidth: trailWidth || strokeWidth,\n fillOpacity: \"0\",\n style: pathStyle\n }), getStokeList().reverse());\n};\n\nCircle.defaultProps = defaultProps;\nCircle.displayName = 'Circle';\nexport default Circle;"]},"metadata":{},"sourceType":"module"}