23a841f86f2865d43d8be643e5b22bcd.json
17.1 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport * as React from 'react';\nimport Select from '../select';\nimport { Group, Button } from '../radio';\nvar YearSelectOffset = 10;\nvar YearSelectTotal = 20;\n\nfunction YearSelect(props) {\n var fullscreen = props.fullscreen,\n validRange = props.validRange,\n generateConfig = props.generateConfig,\n locale = props.locale,\n prefixCls = props.prefixCls,\n value = props.value,\n _onChange = props.onChange,\n divRef = props.divRef;\n var year = generateConfig.getYear(value);\n var start = year - YearSelectOffset;\n var end = start + YearSelectTotal;\n\n if (validRange) {\n start = generateConfig.getYear(validRange[0]);\n end = generateConfig.getYear(validRange[1]) + 1;\n }\n\n var suffix = locale && locale.year === '年' ? '年' : '';\n var options = [];\n\n for (var index = start; index < end; index++) {\n options.push({\n label: \"\".concat(index).concat(suffix),\n value: index\n });\n }\n\n return /*#__PURE__*/React.createElement(Select, {\n size: fullscreen ? undefined : 'small',\n options: options,\n value: year,\n className: \"\".concat(prefixCls, \"-year-select\"),\n onChange: function onChange(numYear) {\n var newDate = generateConfig.setYear(value, numYear);\n\n if (validRange) {\n var _validRange = _slicedToArray(validRange, 2),\n startDate = _validRange[0],\n endDate = _validRange[1];\n\n var newYear = generateConfig.getYear(newDate);\n var newMonth = generateConfig.getMonth(newDate);\n\n if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate));\n }\n\n if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate));\n }\n }\n\n _onChange(newDate);\n },\n getPopupContainer: function getPopupContainer() {\n return divRef.current;\n }\n });\n}\n\nfunction MonthSelect(props) {\n var prefixCls = props.prefixCls,\n fullscreen = props.fullscreen,\n validRange = props.validRange,\n value = props.value,\n generateConfig = props.generateConfig,\n locale = props.locale,\n _onChange2 = props.onChange,\n divRef = props.divRef;\n var month = generateConfig.getMonth(value);\n var start = 0;\n var end = 11;\n\n if (validRange) {\n var _validRange2 = _slicedToArray(validRange, 2),\n rangeStart = _validRange2[0],\n rangeEnd = _validRange2[1];\n\n var currentYear = generateConfig.getYear(value);\n\n if (generateConfig.getYear(rangeEnd) === currentYear) {\n end = generateConfig.getMonth(rangeEnd);\n }\n\n if (generateConfig.getYear(rangeStart) === currentYear) {\n start = generateConfig.getMonth(rangeStart);\n }\n }\n\n var months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale);\n var options = [];\n\n for (var index = start; index <= end; index += 1) {\n options.push({\n label: months[index],\n value: index\n });\n }\n\n return /*#__PURE__*/React.createElement(Select, {\n size: fullscreen ? undefined : 'small',\n className: \"\".concat(prefixCls, \"-month-select\"),\n value: month,\n options: options,\n onChange: function onChange(newMonth) {\n _onChange2(generateConfig.setMonth(value, newMonth));\n },\n getPopupContainer: function getPopupContainer() {\n return divRef.current;\n }\n });\n}\n\nfunction ModeSwitch(props) {\n var prefixCls = props.prefixCls,\n locale = props.locale,\n mode = props.mode,\n fullscreen = props.fullscreen,\n onModeChange = props.onModeChange;\n return /*#__PURE__*/React.createElement(Group, {\n onChange: function onChange(_ref) {\n var value = _ref.target.value;\n onModeChange(value);\n },\n value: mode,\n size: fullscreen ? undefined : 'small',\n className: \"\".concat(prefixCls, \"-mode-switch\")\n }, /*#__PURE__*/React.createElement(Button, {\n value: \"month\"\n }, locale.month), /*#__PURE__*/React.createElement(Button, {\n value: \"year\"\n }, locale.year));\n}\n\nfunction CalendarHeader(props) {\n var prefixCls = props.prefixCls,\n fullscreen = props.fullscreen,\n mode = props.mode,\n onChange = props.onChange,\n onModeChange = props.onModeChange;\n var divRef = React.useRef(null);\n\n var sharedProps = _extends(_extends({}, props), {\n onChange: onChange,\n fullscreen: fullscreen,\n divRef: divRef\n });\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-header\"),\n ref: divRef\n }, /*#__PURE__*/React.createElement(YearSelect, sharedProps), mode === 'month' && /*#__PURE__*/React.createElement(MonthSelect, sharedProps), /*#__PURE__*/React.createElement(ModeSwitch, _extends({}, sharedProps, {\n onModeChange: onModeChange\n })));\n}\n\nexport default CalendarHeader;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/calendar/Header.js"],"names":["_extends","_slicedToArray","React","Select","Group","Button","YearSelectOffset","YearSelectTotal","YearSelect","props","fullscreen","validRange","generateConfig","locale","prefixCls","value","_onChange","onChange","divRef","year","getYear","start","end","suffix","options","index","push","label","concat","createElement","size","undefined","className","numYear","newDate","setYear","_validRange","startDate","endDate","newYear","newMonth","getMonth","setMonth","getPopupContainer","current","MonthSelect","_onChange2","month","_validRange2","rangeStart","rangeEnd","currentYear","months","shortMonths","getShortMonths","ModeSwitch","mode","onModeChange","_ref","target","CalendarHeader","useRef","sharedProps","ref"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,UAA9B;AACA,IAAIC,gBAAgB,GAAG,EAAvB;AACA,IAAIC,eAAe,GAAG,EAAtB;;AAEA,SAASC,UAAT,CAAoBC,KAApB,EAA2B;AACzB,MAAIC,UAAU,GAAGD,KAAK,CAACC,UAAvB;AAAA,MACIC,UAAU,GAAGF,KAAK,CAACE,UADvB;AAAA,MAEIC,cAAc,GAAGH,KAAK,CAACG,cAF3B;AAAA,MAGIC,MAAM,GAAGJ,KAAK,CAACI,MAHnB;AAAA,MAIIC,SAAS,GAAGL,KAAK,CAACK,SAJtB;AAAA,MAKIC,KAAK,GAAGN,KAAK,CAACM,KALlB;AAAA,MAMIC,SAAS,GAAGP,KAAK,CAACQ,QAN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N,CAAoBrB,UAApB,EAAgCsD,WAAhC,CAHI,EAG0CN,IAAI,KAAK,OAAT,IAAoB,aAAatD,KAAK,CAAC2B,aAAN,CAAoBgB,WAApB,EAAiCiB,WAAjC,CAH3E,EAG0H,aAAa5D,KAAK,CAAC2B,aAAN,CAAoB0B,UAApB,EAAgCvD,QAAQ,CAAC,EAAD,EAAK8D,WAAL,EAAkB;AACnNL,IAAAA,YAAY,EAAEA;AADqM,GAAlB,CAAxC,CAHvI,CAApB;AAMD;;AAED,eAAeG,cAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport * as React from 'react';\nimport Select from '../select';\nimport { Group, Button } from '../radio';\nvar YearSelectOffset = 10;\nvar YearSelectTotal = 20;\n\nfunction YearSelect(props) {\n var fullscreen = props.fullscreen,\n validRange = props.validRange,\n generateConfig = props.generateConfig,\n locale = props.locale,\n prefixCls = props.prefixCls,\n value = props.value,\n _onChange = props.onChange,\n divRef = props.divRef;\n var year = generateConfig.getYear(value);\n var start = year - YearSelectOffset;\n var end = start + YearSelectTotal;\n\n if (validRange) {\n start = generateConfig.getYear(validRange[0]);\n end = generateConfig.getYear(validRange[1]) + 1;\n }\n\n var suffix = locale && locale.year === '年' ? '年' : '';\n var options = [];\n\n for (var index = start; index < end; index++) {\n options.push({\n label: \"\".concat(index).concat(suffix),\n value: index\n });\n }\n\n return /*#__PURE__*/React.createElement(Select, {\n size: fullscreen ? undefined : 'small',\n options: options,\n value: year,\n className: \"\".concat(prefixCls, \"-year-select\"),\n onChange: function onChange(numYear) {\n var newDate = generateConfig.setYear(value, numYear);\n\n if (validRange) {\n var _validRange = _slicedToArray(validRange, 2),\n startDate = _validRange[0],\n endDate = _validRange[1];\n\n var newYear = generateConfig.getYear(newDate);\n var newMonth = generateConfig.getMonth(newDate);\n\n if (newYear === generateConfig.getYear(endDate) && newMonth > generateConfig.getMonth(endDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(endDate));\n }\n\n if (newYear === generateConfig.getYear(startDate) && newMonth < generateConfig.getMonth(startDate)) {\n newDate = generateConfig.setMonth(newDate, generateConfig.getMonth(startDate));\n }\n }\n\n _onChange(newDate);\n },\n getPopupContainer: function getPopupContainer() {\n return divRef.current;\n }\n });\n}\n\nfunction MonthSelect(props) {\n var prefixCls = props.prefixCls,\n fullscreen = props.fullscreen,\n validRange = props.validRange,\n value = props.value,\n generateConfig = props.generateConfig,\n locale = props.locale,\n _onChange2 = props.onChange,\n divRef = props.divRef;\n var month = generateConfig.getMonth(value);\n var start = 0;\n var end = 11;\n\n if (validRange) {\n var _validRange2 = _slicedToArray(validRange, 2),\n rangeStart = _validRange2[0],\n rangeEnd = _validRange2[1];\n\n var currentYear = generateConfig.getYear(value);\n\n if (generateConfig.getYear(rangeEnd) === currentYear) {\n end = generateConfig.getMonth(rangeEnd);\n }\n\n if (generateConfig.getYear(rangeStart) === currentYear) {\n start = generateConfig.getMonth(rangeStart);\n }\n }\n\n var months = locale.shortMonths || generateConfig.locale.getShortMonths(locale.locale);\n var options = [];\n\n for (var index = start; index <= end; index += 1) {\n options.push({\n label: months[index],\n value: index\n });\n }\n\n return /*#__PURE__*/React.createElement(Select, {\n size: fullscreen ? undefined : 'small',\n className: \"\".concat(prefixCls, \"-month-select\"),\n value: month,\n options: options,\n onChange: function onChange(newMonth) {\n _onChange2(generateConfig.setMonth(value, newMonth));\n },\n getPopupContainer: function getPopupContainer() {\n return divRef.current;\n }\n });\n}\n\nfunction ModeSwitch(props) {\n var prefixCls = props.prefixCls,\n locale = props.locale,\n mode = props.mode,\n fullscreen = props.fullscreen,\n onModeChange = props.onModeChange;\n return /*#__PURE__*/React.createElement(Group, {\n onChange: function onChange(_ref) {\n var value = _ref.target.value;\n onModeChange(value);\n },\n value: mode,\n size: fullscreen ? undefined : 'small',\n className: \"\".concat(prefixCls, \"-mode-switch\")\n }, /*#__PURE__*/React.createElement(Button, {\n value: \"month\"\n }, locale.month), /*#__PURE__*/React.createElement(Button, {\n value: \"year\"\n }, locale.year));\n}\n\nfunction CalendarHeader(props) {\n var prefixCls = props.prefixCls,\n fullscreen = props.fullscreen,\n mode = props.mode,\n onChange = props.onChange,\n onModeChange = props.onModeChange;\n var divRef = React.useRef(null);\n\n var sharedProps = _extends(_extends({}, props), {\n onChange: onChange,\n fullscreen: fullscreen,\n divRef: divRef\n });\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-header\"),\n ref: divRef\n }, /*#__PURE__*/React.createElement(YearSelect, sharedProps), mode === 'month' && /*#__PURE__*/React.createElement(MonthSelect, sharedProps), /*#__PURE__*/React.createElement(ModeSwitch, _extends({}, sharedProps, {\n onModeChange: onModeChange\n })));\n}\n\nexport default CalendarHeader;"]},"metadata":{},"sourceType":"module"}