1a67e68d33ce7c8a686e2ff4f7043ae5.json
12.7 KB
{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Dots = void 0;\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nvar getDotCount = function getDotCount(spec) {\n var dots;\n\n if (spec.infinite) {\n dots = Math.ceil(spec.slideCount / spec.slidesToScroll);\n } else {\n dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;\n }\n\n return dots;\n};\n\nvar Dots = /*#__PURE__*/function (_React$PureComponent) {\n (0, _inherits2[\"default\"])(Dots, _React$PureComponent);\n\n var _super = (0, _createSuper2[\"default\"])(Dots);\n\n function Dots() {\n (0, _classCallCheck2[\"default\"])(this, Dots);\n return _super.apply(this, arguments);\n }\n\n (0, _createClass2[\"default\"])(Dots, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n // In Autoplay the focus stays on clicked button even after transition\n // to next slide. That only goes away by click somewhere outside\n e.preventDefault();\n this.props.clickHandler(options);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave,\n infinite = _this$props.infinite,\n slidesToScroll = _this$props.slidesToScroll,\n slidesToShow = _this$props.slidesToShow,\n slideCount = _this$props.slideCount,\n currentSlide = _this$props.currentSlide;\n var dotCount = getDotCount({\n slideCount: slideCount,\n slidesToScroll: slidesToScroll,\n slidesToShow: slidesToShow,\n infinite: infinite\n });\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n var dots = [];\n\n for (var i = 0; i < dotCount; i++) {\n var _rightBound = (i + 1) * slidesToScroll - 1;\n\n var rightBound = infinite ? _rightBound : (0, _innerSliderUtils.clamp)(_rightBound, 0, slideCount - 1);\n\n var _leftBound = rightBound - (slidesToScroll - 1);\n\n var leftBound = infinite ? _leftBound : (0, _innerSliderUtils.clamp)(_leftBound, 0, slideCount - 1);\n var className = (0, _classnames[\"default\"])({\n \"slick-active\": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound\n });\n var dotOptions = {\n message: \"dots\",\n index: i,\n slidesToScroll: slidesToScroll,\n currentSlide: currentSlide\n };\n var onClick = this.clickHandler.bind(this, dotOptions);\n dots = dots.concat( /*#__PURE__*/_react[\"default\"].createElement(\"li\", {\n key: i,\n className: className\n }, /*#__PURE__*/_react[\"default\"].cloneElement(this.props.customPaging(i), {\n onClick: onClick\n })));\n }\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(this.props.appendDots(dots), (0, _objectSpread2[\"default\"])({\n className: this.props.dotsClass\n }, mouseEvents));\n }\n }]);\n return Dots;\n}(_react[\"default\"].PureComponent);\n\nexports.Dots = Dots;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/react-slick/lib/dots.js"],"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","Dots","_objectSpread2","_classCallCheck2","_createClass2","_inherits2","_createSuper2","_react","_classnames","_innerSliderUtils","getDotCount","spec","dots","infinite","Math","ceil","slideCount","slidesToScroll","slidesToShow","_React$PureComponent","_super","apply","arguments","key","clickHandler","options","e","preventDefault","props","render","_this$props","onMouseEnter","onMouseOver","onMouseLeave","currentSlide","dotCount","mouseEvents","i","_rightBound","rightBound","clamp","_leftBound","leftBound","className","dotOptions","message","index","onClick","bind","concat","createElement","cloneElement","customPaging","appendDots","dotsClass","PureComponent"],"mappings":"AAAA;;AAEA,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAAD,CAApC;;AAEAC,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAC3CC,EAAAA,KAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAACE,IAAR,GAAe,KAAK,CAApB;;AAEA,IAAIC,cAAc,GAAGP,sBAAsB,CAACC,OAAO,CAAC,sCAAD,CAAR,CAA3C;;AAEA,IAAIO,gBAAgB,GAAGR,sBAAsB,CAACC,OAAO,CAAC,uCAAD,CAAR,CAA7C;;AAEA,IAAIQ,aAAa,GAAGT,sBAAsB,CAACC,OAAO,CAAC,oCAAD,CAAR,CAA1C;;AAEA,IAAIS,UAAU,GAAGV,sBAAsB,CAACC,OAAO,CAAC,iCAAD,CAAR,CAAvC;;AAEA,IAAIU,aAAa,GAAGX,sBAAsB,CAACC,OAAO,CAAC,oCAAD,CAAR,CAA1C;;AAEA,IAAIW,MAAM,GAAGZ,sBAAsB,CAACC,OAAO,CAAC,OAAD,CAAR,CAAnC;;AAEA,IAAIY,WAAW,GAAGb,sBAAsB,CAACC,OAAO,CAAC,YAAD,CAAR,CAAxC;;AAEA,IAAIa,iBAAiB,GAAGb,OAAO,CAAC,0BAAD,CAA/B;;AAEA,IAAIc,WAAW,GAAG,SAASA,WAAT,CAAqBC,IAArB,EAA2B;AAC3C,MAAIC,IAAJ;;AAEA,MAAID,IAAI,CAACE,QAAT,EAAmB;AACjBD,IAAAA,IAAI,GAAGE,IAAI,CAACC,IAAL,CAAUJ,IAAI,CAACK,UAAL,GAAkBL,IAAI,CAACM,cAAjC,CAAP;AACD,GAFD,MAEO;AACLL,IAAAA,IAAI,GAAGE,IAA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B;AAGA,YAAIE,UAAU,GAAG;AACfC,UAAAA,OAAO,EAAE,MADM;AAEfC,UAAAA,KAAK,EAAET,CAFQ;AAGfpB,UAAAA,cAAc,EAAEA,cAHD;AAIfiB,UAAAA,YAAY,EAAEA;AAJC,SAAjB;AAMA,YAAIa,OAAO,GAAG,KAAKvB,YAAL,CAAkBwB,IAAlB,CAAuB,IAAvB,EAA6BJ,UAA7B,CAAd;AACAhC,QAAAA,IAAI,GAAGA,IAAI,CAACqC,MAAL,EAAa,aAAa1C,MAAM,CAAC,SAAD,CAAN,CAAkB2C,aAAlB,CAAgC,IAAhC,EAAsC;AACrE3B,UAAAA,GAAG,EAAEc,CADgE;AAErEM,UAAAA,SAAS,EAAEA;AAF0D,SAAtC,EAG9B,aAAapC,MAAM,CAAC,SAAD,CAAN,CAAkB4C,YAAlB,CAA+B,KAAKvB,KAAL,CAAWwB,YAAX,CAAwBf,CAAxB,CAA/B,EAA2D;AACzEU,UAAAA,OAAO,EAAEA;AADgE,SAA3D,CAHiB,CAA1B,CAAP;AAMD;;AAED,aAAO,aAAaxC,MAAM,CAAC,SAAD,CAAN,CAAkB4C,YAAlB,CAA+B,KAAKvB,KAAL,CAAWyB,UAAX,CAAsBzC,IAAtB,CAA/B,EAA4D,CAAC,GAAGV,cAAc,CAAC,SAAD,CAAlB,EAA+B;AAC7GyC,QAAAA,SAAS,EAAE,KAAKf,KAAL,CAAW0B;AADuF,OAA/B,EAE7ElB,WAF6E,CAA5D,CAApB;AAGD;AAtDA,GARiC,CAApC;AAgEA,SAAOnC,IAAP;AACD,CA3EuB,CA2EtBM,MAAM,CAAC,SAAD,CAAN,CAAkBgD,aA3EI,CAAxB;;AA6EAxD,OAAO,CAACE,IAAR,GAAeA,IAAf","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Dots = void 0;\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nvar getDotCount = function getDotCount(spec) {\n var dots;\n\n if (spec.infinite) {\n dots = Math.ceil(spec.slideCount / spec.slidesToScroll);\n } else {\n dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;\n }\n\n return dots;\n};\n\nvar Dots = /*#__PURE__*/function (_React$PureComponent) {\n (0, _inherits2[\"default\"])(Dots, _React$PureComponent);\n\n var _super = (0, _createSuper2[\"default\"])(Dots);\n\n function Dots() {\n (0, _classCallCheck2[\"default\"])(this, Dots);\n return _super.apply(this, arguments);\n }\n\n (0, _createClass2[\"default\"])(Dots, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n // In Autoplay the focus stays on clicked button even after transition\n // to next slide. That only goes away by click somewhere outside\n e.preventDefault();\n this.props.clickHandler(options);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave,\n infinite = _this$props.infinite,\n slidesToScroll = _this$props.slidesToScroll,\n slidesToShow = _this$props.slidesToShow,\n slideCount = _this$props.slideCount,\n currentSlide = _this$props.currentSlide;\n var dotCount = getDotCount({\n slideCount: slideCount,\n slidesToScroll: slidesToScroll,\n slidesToShow: slidesToShow,\n infinite: infinite\n });\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n var dots = [];\n\n for (var i = 0; i < dotCount; i++) {\n var _rightBound = (i + 1) * slidesToScroll - 1;\n\n var rightBound = infinite ? _rightBound : (0, _innerSliderUtils.clamp)(_rightBound, 0, slideCount - 1);\n\n var _leftBound = rightBound - (slidesToScroll - 1);\n\n var leftBound = infinite ? _leftBound : (0, _innerSliderUtils.clamp)(_leftBound, 0, slideCount - 1);\n var className = (0, _classnames[\"default\"])({\n \"slick-active\": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound\n });\n var dotOptions = {\n message: \"dots\",\n index: i,\n slidesToScroll: slidesToScroll,\n currentSlide: currentSlide\n };\n var onClick = this.clickHandler.bind(this, dotOptions);\n dots = dots.concat( /*#__PURE__*/_react[\"default\"].createElement(\"li\", {\n key: i,\n className: className\n }, /*#__PURE__*/_react[\"default\"].cloneElement(this.props.customPaging(i), {\n onClick: onClick\n })));\n }\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(this.props.appendDots(dots), (0, _objectSpread2[\"default\"])({\n className: this.props.dotsClass\n }, mouseEvents));\n }\n }]);\n return Dots;\n}(_react[\"default\"].PureComponent);\n\nexports.Dots = Dots;"]},"metadata":{},"sourceType":"script"}