f506fe8060a085f51e6a5ad10294efa1.json
4.5 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport DatePanel from '../DatePanel';\nimport { isSameWeek } from '../../utils/dateUtil';\n\nfunction WeekPanel(props) {\n var prefixCls = props.prefixCls,\n generateConfig = props.generateConfig,\n locale = props.locale,\n value = props.value; // Render additional column\n\n var cellPrefixCls = \"\".concat(prefixCls, \"-cell\");\n\n var prefixColumn = function prefixColumn(date) {\n return /*#__PURE__*/React.createElement(\"td\", {\n key: \"week\",\n className: classNames(cellPrefixCls, \"\".concat(cellPrefixCls, \"-week\"))\n }, generateConfig.locale.getWeek(locale.locale, date));\n }; // Add row className\n\n\n var rowPrefixCls = \"\".concat(prefixCls, \"-week-panel-row\");\n\n var rowClassName = function rowClassName(date) {\n return classNames(rowPrefixCls, _defineProperty({}, \"\".concat(rowPrefixCls, \"-selected\"), isSameWeek(generateConfig, locale.locale, value, date)));\n };\n\n return /*#__PURE__*/React.createElement(DatePanel, Object.assign({}, props, {\n panelName: \"week\",\n prefixColumn: prefixColumn,\n rowClassName: rowClassName,\n keyboardConfig: {\n onLeftRight: null\n }\n }));\n}\n\nexport default WeekPanel;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-picker/es/panels/WeekPanel/index.js"],"names":["_defineProperty","React","classNames","DatePanel","isSameWeek","WeekPanel","props","prefixCls","generateConfig","locale","value","cellPrefixCls","concat","prefixColumn","date","createElement","key","className","getWeek","rowPrefixCls","rowClassName","Object","assign","panelName","keyboardConfig","onLeftRight"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,SAASC,UAAT,QAA2B,sBAA3B;;AAEA,SAASC,SAAT,CAAmBC,KAAnB,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AAA,YAAY,EAAEA,YAH4D;AAI1EI,IAAAA,cAAc,EAAE;AACdC,MAAAA,WAAW,EAAE;AADC;AAJ0D,GAAzB,CAA/B,CAApB;AAQD;;AAED,eAAepB,SAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport DatePanel from '../DatePanel';\nimport { isSameWeek } from '../../utils/dateUtil';\n\nfunction WeekPanel(props) {\n var prefixCls = props.prefixCls,\n generateConfig = props.generateConfig,\n locale = props.locale,\n value = props.value; // Render additional column\n\n var cellPrefixCls = \"\".concat(prefixCls, \"-cell\");\n\n var prefixColumn = function prefixColumn(date) {\n return /*#__PURE__*/React.createElement(\"td\", {\n key: \"week\",\n className: classNames(cellPrefixCls, \"\".concat(cellPrefixCls, \"-week\"))\n }, generateConfig.locale.getWeek(locale.locale, date));\n }; // Add row className\n\n\n var rowPrefixCls = \"\".concat(prefixCls, \"-week-panel-row\");\n\n var rowClassName = function rowClassName(date) {\n return classNames(rowPrefixCls, _defineProperty({}, \"\".concat(rowPrefixCls, \"-selected\"), isSameWeek(generateConfig, locale.locale, value, date)));\n };\n\n return /*#__PURE__*/React.createElement(DatePanel, Object.assign({}, props, {\n panelName: \"week\",\n prefixColumn: prefixColumn,\n rowClassName: rowClassName,\n keyboardConfig: {\n onLeftRight: null\n }\n }));\n}\n\nexport default WeekPanel;"]},"metadata":{},"sourceType":"module"}