85e8e6f8fa1f3e9ecfc4b1f03a832c2c.json
3.64 KB
{"ast":null,"code":"import * as React from 'react';\nimport Header from '../Header';\nimport { DECADE_DISTANCE_COUNT } from '.';\nimport PanelContext from '../../PanelContext';\n\nfunction DecadeHeader(props) {\n var prefixCls = props.prefixCls,\n generateConfig = props.generateConfig,\n viewDate = props.viewDate,\n onPrevDecades = props.onPrevDecades,\n onNextDecades = props.onNextDecades;\n\n var _React$useContext = React.useContext(PanelContext),\n hideHeader = _React$useContext.hideHeader;\n\n if (hideHeader) {\n return null;\n }\n\n var headerPrefixCls = \"\".concat(prefixCls, \"-header\");\n var yearNumber = generateConfig.getYear(viewDate);\n var startYear = Math.floor(yearNumber / DECADE_DISTANCE_COUNT) * DECADE_DISTANCE_COUNT;\n var endYear = startYear + DECADE_DISTANCE_COUNT - 1;\n return /*#__PURE__*/React.createElement(Header, Object.assign({}, props, {\n prefixCls: headerPrefixCls,\n onSuperPrev: onPrevDecades,\n onSuperNext: onNextDecades\n }), startYear, \"-\", endYear);\n}\n\nexport default DecadeHeader;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-picker/es/panels/DecadePanel/DecadeHeader.js"],"names":["React","Header","DECADE_DISTANCE_COUNT","PanelContext","DecadeHeader","props","prefixCls","generateConfig","viewDate","onPrevDecades","onNextDecades","_React$useContext","useContext","hideHeader","headerPrefixCls","concat","yearNumber","getYear","startYear","Math","floor","endYear","createElement","Object","assign","onSuperPrev","onSuperNext"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,qBAAT,QAAsC,GAAtC;AACA,OAAOC,YAAP,MAAyB,oBAAzB;;AAEA,SAASC,YAAT,CAAsBC,KAAtB,EAA6B;AAC3B,MAAIC,SAAS,GAAGD,KAAK,CAACC,SAAtB;AAAA,MACIC,cAAc,GAAGF,KAAK,CAACE,cAD3B;AAAA,MAEIC,QAAQ,GAAGH,KAAK,CAACG,QAFrB;AAAA,MAGIC,aAAa,GAAGJ,KAAK,CAACI,aAH1B;AAAA,MAIIC,aAAa,GAAGL,KAAK,CAACK,aAJ1B;;AAMA,MAAIC,iBAAiB,GAAGX,KAAK,CAACY,UAAN,CAAiBT,YAAjB,CAAxB;AAAA,MACIU,UAAU,GAAGF,iBAAiB,CAACE,UADnC;;AAGA,MAAIA,UAAJ,EAAgB;AACd,WAAO,IAAP;AACD;;AAED,MAAIC,eAAe,GAAG,GAAGC,MAAH,CAAUT,SAAV,EAAqB,SAArB,CAAtB;AACA,MAAIU,UAAU,GAAGT,cAAc,CAACU,OAAf,CAAuBT,QAAvB,CAAjB;AACA,MAAIU,SAAS,GAAGC,IAAI,CAACC,KAAL,CAAWJ,UAAU,GAAGd,qBAAxB,IAAiDA,qBAAjE;AACA,MAAImB,OAAO,GAAGH,SAAS,GAAGhB,qBAAZ,GAAoC,CAAlD;AACA,SAAO,aAAaF,KAAK,CAACsB,aAAN,CAAoBrB,MAApB,EAA4BsB,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBnB,KAAlB,EAAyB;AACvEC,IAAAA,SAAS,EAAEQ,eAD4D;AAEvEW,IAAAA,WAAW,EAAEhB,aAF0D;AAGvEiB,IAAAA,WAAW,EAAEhB;AAH0D,GAAzB,CAA5B,EAIhBQ,SAJgB,EAIL,GAJK,EAIAG,OAJA,CAApB;AAKD;;AAED,eAAejB,YAAf","sourcesContent":["import * as React from 'react';\nimport Header from '../Header';\nimport { DECADE_DISTANCE_COUNT } from '.';\nimport PanelContext from '../../PanelContext';\n\nfunction DecadeHeader(props) {\n var prefixCls = props.prefixCls,\n generateConfig = props.generateConfig,\n viewDate = props.viewDate,\n onPrevDecades = props.onPrevDecades,\n onNextDecades = props.onNextDecades;\n\n var _React$useContext = React.useContext(PanelContext),\n hideHeader = _React$useContext.hideHeader;\n\n if (hideHeader) {\n return null;\n }\n\n var headerPrefixCls = \"\".concat(prefixCls, \"-header\");\n var yearNumber = generateConfig.getYear(viewDate);\n var startYear = Math.floor(yearNumber / DECADE_DISTANCE_COUNT) * DECADE_DISTANCE_COUNT;\n var endYear = startYear + DECADE_DISTANCE_COUNT - 1;\n return /*#__PURE__*/React.createElement(Header, Object.assign({}, props, {\n prefixCls: headerPrefixCls,\n onSuperPrev: onPrevDecades,\n onSuperNext: onNextDecades\n }), startYear, \"-\", endYear);\n}\n\nexport default DecadeHeader;"]},"metadata":{},"sourceType":"module"}