@hi-ui/hiui 2.15.10 → 2.15.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/es/_util/warning.js +2 -2
  3. package/es/alert/__test__/index.test.js +67 -0
  4. package/es/alert/index.js +147 -6
  5. package/es/alert/style/index.css +1 -1
  6. package/es/badge/index.js +87 -9
  7. package/es/badge/style/index.css +1 -1
  8. package/es/badge/style/index.js +0 -0
  9. package/es/button/Button.js +51 -59
  10. package/es/button/ButtonGroup.js +31 -23
  11. package/es/button/IconLoading.js +2 -2
  12. package/es/button/__test__/index.test.js +29 -0
  13. package/es/button/index.js +2 -3
  14. package/es/button/style/index.css +1 -1
  15. package/es/card/index.js +42 -54
  16. package/es/card/style/index.css +1 -1
  17. package/es/cascader/Cascader.js +116 -181
  18. package/es/cascader/__test__/index.test.js +283 -0
  19. package/es/cascader/index.js +2 -5
  20. package/es/cascader/menu.js +155 -0
  21. package/es/cascader/style/cascader.css +1 -1
  22. package/es/cascader/style/menu.css +1 -1
  23. package/es/checkbox/{checkbox-legacy/Base.js → Base.js} +31 -46
  24. package/es/checkbox/CheckBox.js +185 -0
  25. package/es/checkbox/index.js +4 -13
  26. package/es/checkbox/style/index.css +1 -1
  27. package/es/collapse/__test__/index.test.js +58 -0
  28. package/es/collapse/index.js +93 -79
  29. package/es/collapse/style/index.css +1 -1
  30. package/es/confirm/index.js +50 -37
  31. package/es/context/index.js +37 -39
  32. package/es/counter/__test__/index.test.js +52 -0
  33. package/es/counter/index.js +270 -6
  34. package/es/counter/style/index.css +1 -1
  35. package/es/date-picker/BasePicker.js +288 -374
  36. package/es/date-picker/Calender.js +90 -326
  37. package/es/date-picker/DatePanel.js +186 -175
  38. package/es/date-picker/DatePicker.js +51 -151
  39. package/es/date-picker/DateRangePanel.js +181 -253
  40. package/es/date-picker/Modal.js +25 -15
  41. package/es/date-picker/Time.js +336 -230
  42. package/es/date-picker/TimePanel.js +32 -27
  43. package/es/date-picker/TimePeriodPanel.js +32 -21
  44. package/es/date-picker/TimePicker.js +40 -42
  45. package/es/date-picker/TimeRangePanel.js +42 -32
  46. package/es/date-picker/Type.js +1 -5
  47. package/es/date-picker/WeekRangePanel.js +150 -237
  48. package/es/date-picker/constants.js +28 -14
  49. package/es/date-picker/dateUtil.js +52 -221
  50. package/es/date-picker/index.js +2 -5
  51. package/es/date-picker/style/index.css +1 -1
  52. package/es/date-picker/util.js +8 -101
  53. package/es/dropdown/Dropdown.js +199 -193
  54. package/es/dropdown/{tests → __test__}/index.test.js +2 -2
  55. package/es/dropdown/index.js +4 -73
  56. package/es/dropdown/style/index.css +1 -1
  57. package/es/dropdown/style/index.js +2 -0
  58. package/es/ficon/index.js +23 -13
  59. package/es/form/index.js +171 -6
  60. package/es/form/{Item.js → item.js} +53 -53
  61. package/es/form/style/index.css +1 -1
  62. package/es/grid/index.js +37 -25
  63. package/es/icon/index.js +32 -21
  64. package/es/index.js +9 -61
  65. package/es/input/index.js +345 -28
  66. package/es/input/style/index.css +1 -1
  67. package/es/input/util.js +18 -26
  68. package/es/lib/withDragDropContext.js +2 -2
  69. package/es/loading/index.js +129 -5
  70. package/es/loading/style/index.css +0 -0
  71. package/es/loading/style/index.js +0 -0
  72. package/es/locales/en-US.js +11 -45
  73. package/es/locales/index.js +2 -16
  74. package/es/locales/zh-CN.js +12 -46
  75. package/es/menu/Item.js +41 -32
  76. package/es/menu/ItemGroup.js +81 -0
  77. package/es/menu/SubMenu.js +74 -55
  78. package/es/menu/Title.js +42 -36
  79. package/es/menu/index.js +419 -12
  80. package/es/menu/style/index.css +1 -1
  81. package/es/modal/__test__/index.test.js +123 -0
  82. package/es/modal/index.js +61 -77
  83. package/es/modal/style/index.css +1 -1
  84. package/es/nav-menu/NavMenu.js +45 -31
  85. package/es/nav-menu/__test__/index.test.js +2 -2
  86. package/es/nav-menu/index.js +2 -2
  87. package/es/notification/__test__/index.test.js +56 -0
  88. package/es/notification/index.js +231 -68
  89. package/es/notification/style/index.css +1 -1
  90. package/es/notification/style/index.js +0 -0
  91. package/es/pagination/Pager.js +8 -6
  92. package/es/pagination/Pagination.js +115 -124
  93. package/es/pagination/__test__/index.test.js +140 -0
  94. package/es/pagination/index.js +8 -9
  95. package/es/pagination/style/index.css +1 -1
  96. package/es/panel/index.js +33 -23
  97. package/es/popover/__test__/index.test.js +2 -2
  98. package/es/popover/index.js +69 -71
  99. package/es/popper/index.js +54 -64
  100. package/es/popper/style/index.css +1 -1
  101. package/es/progress/BarProgress.js +43 -109
  102. package/es/progress/CircleProgress.js +10 -9
  103. package/es/progress/DashboardProgress.js +9 -7
  104. package/es/progress/index.js +100 -8
  105. package/es/progress/style/index.css +1 -1
  106. package/es/radio/{radio-legacy/__test__ → __test__}/index.test.js +10 -10
  107. package/es/radio/index.js +216 -10
  108. package/es/radio/style/index.css +1 -1
  109. package/es/rate/Icons.js +2 -2
  110. package/es/rate/Rate.js +90 -65
  111. package/es/rate/__test__/index.test.js +54 -0
  112. package/es/rate/index.js +2 -5
  113. package/es/rate/style/index.css +1 -1
  114. package/es/select/Option.js +93 -0
  115. package/es/select/Select.js +253 -325
  116. package/es/select/SelectDropdown.js +63 -215
  117. package/es/select/SelectInput.js +54 -88
  118. package/es/select/__test__/index.test.js +429 -0
  119. package/es/select/index.js +4 -6
  120. package/es/select/style/select-dropdown.css +1 -1
  121. package/es/select/style/select-input.css +1 -1
  122. package/es/stepper/index.js +127 -21
  123. package/es/stepper/style/index.css +1 -1
  124. package/es/style/color/colors.css +0 -0
  125. package/es/style/icon/diyIcon.css +1 -1
  126. package/es/style/icon/index.css +1 -1
  127. package/es/style/index.css +0 -0
  128. package/es/style/mixins/colors.css +0 -0
  129. package/es/style/mixins/index.css +0 -0
  130. package/es/style/theme/dark.css +0 -0
  131. package/es/style/theme/default.css +0 -0
  132. package/es/switch/{__tests__ → __test__}/index.test.js +2 -31
  133. package/es/switch/index.js +36 -24
  134. package/es/switch/style/index.css +1 -1
  135. package/es/table/__test__/index.test.js +73 -0
  136. package/es/table/{Body.js → body.js} +52 -36
  137. package/es/table/checkbox/index.js +36 -33
  138. package/es/table/clickOuterside.js +115 -0
  139. package/es/table/{Footer.js → footer.js} +41 -24
  140. package/es/table/{Header.js → header.js} +54 -41
  141. package/es/table/index.js +300 -262
  142. package/es/table/menu/index.js +34 -32
  143. package/es/table/pover.js +154 -0
  144. package/es/table/prefix.js +2 -2
  145. package/es/table/style/Table.css +1 -1
  146. package/es/table/style/index.css +1 -1
  147. package/es/table/tableContent.js +120 -0
  148. package/es/tabs/ItemDropdown.js +51 -39
  149. package/es/tabs/TabPane.js +35 -25
  150. package/es/tabs/Tabs.js +91 -98
  151. package/es/tabs/index.js +3 -9
  152. package/es/tabs/style/index.css +1 -1
  153. package/es/timeline/__test__/index.test.js +49 -0
  154. package/es/timeline/foldingItem.js +82 -0
  155. package/es/timeline/index.js +127 -203
  156. package/es/timeline/style/index.css +1 -1
  157. package/es/tooltip/__test__/index.test.js +67 -0
  158. package/es/tooltip/index.js +39 -86
  159. package/es/tooltip/style/index.css +1 -1
  160. package/es/transfer/Item.js +44 -53
  161. package/es/transfer/__test__/index.test.js +11 -0
  162. package/es/transfer/index.js +443 -4
  163. package/es/transfer/style/index.css +1 -1
  164. package/es/tree/Tree.js +86 -76
  165. package/es/tree/TreeDivider.js +3 -3
  166. package/es/tree/TreeItem.js +108 -204
  167. package/es/tree/TreeNode.js +318 -457
  168. package/es/tree/index.js +2 -9
  169. package/es/tree/style/index.css +1 -1
  170. package/es/tree/util.js +257 -9
  171. package/es/upload/{upload-legacy/Preview.js → Preview.js} +39 -33
  172. package/es/upload/Upload.js +193 -289
  173. package/es/upload/UploadAvatar.js +58 -44
  174. package/es/upload/UploadClick.js +45 -49
  175. package/es/upload/UploadDrag.js +43 -44
  176. package/es/upload/UploadPhoto.js +55 -70
  177. package/es/upload/UploadPictureCard.js +44 -39
  178. package/es/upload/index.js +71 -8
  179. package/es/upload/style/index.css +1 -1
  180. package/es/upload/tool.js +1 -0
  181. package/package.json +4 -1
  182. package/es/_util/SwitchVersion.js +0 -44
  183. package/es/_util/depreactedPropsCompat.js +0 -58
  184. package/es/_util/index.js +0 -32
  185. package/es/alert/Alert.js +0 -134
  186. package/es/alert/__tests__/index.test.js +0 -88
  187. package/es/badge/Badge.js +0 -90
  188. package/es/badge/__tests__/index.test.js +0 -82
  189. package/es/breadcrumb/__tests__/index.test.js +0 -61
  190. package/es/breadcrumb/index.js +0 -93
  191. package/es/breadcrumb/style/index.css +0 -1
  192. package/es/button/__tests__/index.test.js +0 -219
  193. package/es/card/__tests__/index.test.js +0 -169
  194. package/es/carousel/__tests__/index.test.js +0 -104
  195. package/es/carousel/index.js +0 -227
  196. package/es/carousel/style/index.css +0 -1
  197. package/es/carousel/style/index.js +0 -3
  198. package/es/cascader/Menu.js +0 -174
  199. package/es/cascader/__tests__/index.test.js +0 -389
  200. package/es/checkbox/Checkbox.js +0 -144
  201. package/es/checkbox/Group.js +0 -202
  202. package/es/checkbox/__tests__/index.test.js +0 -226
  203. package/es/checkbox/checkbox-legacy/CheckBox.js +0 -165
  204. package/es/checkbox/checkbox-legacy/index.js +0 -15
  205. package/es/checkbox/checkbox-legacy/style/index.css +0 -1
  206. package/es/checkbox/checkbox-legacy/style/index.js +0 -3
  207. package/es/collapse/__tests__/index.test.js +0 -111
  208. package/es/counter/Counter.js +0 -343
  209. package/es/counter/__tests__/index.test.js +0 -134
  210. package/es/counter/counter-legacy/index.js +0 -271
  211. package/es/date-picker/TimeList.js +0 -254
  212. package/es/date-picker/YMRangePanel.js +0 -372
  213. package/es/date-picker/__tests__/index.test.js +0 -961
  214. package/es/date-picker/datepicker-legacy/BasePicker.js +0 -519
  215. package/es/date-picker/datepicker-legacy/Calender.js +0 -430
  216. package/es/date-picker/datepicker-legacy/DatePanel.js +0 -463
  217. package/es/date-picker/datepicker-legacy/DatePicker.js +0 -107
  218. package/es/date-picker/datepicker-legacy/DateRangePanel.js +0 -496
  219. package/es/date-picker/datepicker-legacy/Modal.js +0 -71
  220. package/es/date-picker/datepicker-legacy/Time.js +0 -413
  221. package/es/date-picker/datepicker-legacy/TimePanel.js +0 -93
  222. package/es/date-picker/datepicker-legacy/TimePeriodPanel.js +0 -126
  223. package/es/date-picker/datepicker-legacy/TimePicker.js +0 -82
  224. package/es/date-picker/datepicker-legacy/TimeRangePanel.js +0 -98
  225. package/es/date-picker/datepicker-legacy/Type.js +0 -31
  226. package/es/date-picker/datepicker-legacy/WeekRangePanel.js +0 -345
  227. package/es/date-picker/datepicker-legacy/constants.js +0 -79
  228. package/es/date-picker/datepicker-legacy/dateUtil.js +0 -258
  229. package/es/date-picker/datepicker-legacy/index.js +0 -15
  230. package/es/date-picker/datepicker-legacy/local.js +0 -11
  231. package/es/date-picker/datepicker-legacy/style/index.css +0 -1
  232. package/es/date-picker/datepicker-legacy/style/index.js +0 -3
  233. package/es/date-picker/datepicker-legacy/style/timepicker.css +0 -1
  234. package/es/date-picker/datepicker-legacy/util.js +0 -60
  235. package/es/date-picker/toLunar.js +0 -172
  236. package/es/dropdown/DropdownButton.js +0 -106
  237. package/es/dropdown/DropdownMenu.js +0 -111
  238. package/es/dropdown/DropdownMenuItem.js +0 -178
  239. package/es/dropdown/__tests__/index.test.js +0 -317
  240. package/es/dropdown/utils.js +0 -35
  241. package/es/form/Form.js +0 -184
  242. package/es/form/__tests__/index.test.js +0 -575
  243. package/es/grid/__tests__/index.test.js +0 -104
  244. package/es/input/Input.js +0 -412
  245. package/es/input/__tests__/index.test.js +0 -381
  246. package/es/input/input-legacy/index.js +0 -353
  247. package/es/input/input-legacy/util.js +0 -176
  248. package/es/loading/Loading.js +0 -181
  249. package/es/loading/__tests__/index.test.js +0 -110
  250. package/es/locales/zh-Hant-HK.js +0 -121
  251. package/es/locales/zh-Hant-TW.js +0 -123
  252. package/es/menu/Menu.js +0 -422
  253. package/es/menu/__tests__/index.test.js +0 -279
  254. package/es/message/__tests__/index.test.js +0 -75
  255. package/es/message/index.js +0 -58
  256. package/es/message/style/index.css +0 -1
  257. package/es/message/style/index.js +0 -5
  258. package/es/modal/__tests__/index.test.js +0 -178
  259. package/es/nav-menu/__tests__/index.test.js +0 -27
  260. package/es/notice/Notice.js +0 -142
  261. package/es/notice/NoticeContainer.js +0 -113
  262. package/es/notice/__tests__/index.test.js +0 -174
  263. package/es/notice/index.js +0 -66
  264. package/es/notice/style/index.css +0 -1
  265. package/es/notice/style/index.js +0 -5
  266. package/es/notification/HandleNotification/index.js +0 -224
  267. package/es/notification/HandleNotification/style/index.css +0 -1
  268. package/es/notification/HandleNotification/style/index.js +0 -5
  269. package/es/notification/__tests__/index.test.js +0 -118
  270. package/es/pagination/__tests__/index.test.js +0 -248
  271. package/es/popover/__tests__/index.test.js +0 -152
  272. package/es/preview/index.js +0 -527
  273. package/es/preview/style/index.css +0 -1
  274. package/es/preview/style/index.js +0 -3
  275. package/es/progress/Progress.js +0 -110
  276. package/es/progress/__tests__/index.test.js +0 -131
  277. package/es/radio/Group.js +0 -203
  278. package/es/radio/Radio.js +0 -151
  279. package/es/radio/__tests__/index.test.js +0 -128
  280. package/es/radio/radio-legacy/index.js +0 -222
  281. package/es/radio/radio-legacy/style/index.css +0 -1
  282. package/es/radio/radio-legacy/style/index.js +0 -3
  283. package/es/rate/__tests__/index.test.js +0 -124
  284. package/es/select/__tests__/index.test.js +0 -505
  285. package/es/select/select-legacy/Option.js +0 -81
  286. package/es/select/select-legacy/Select.js +0 -710
  287. package/es/select/select-legacy/SelectDropdown.js +0 -164
  288. package/es/select/select-legacy/SelectInput.js +0 -312
  289. package/es/select/select-legacy/common.js +0 -19
  290. package/es/select/select-legacy/index.js +0 -16
  291. package/es/stepper/Stepper.js +0 -151
  292. package/es/stepper/__tests__/index.test.js +0 -161
  293. package/es/table/ClickOuterside.js +0 -103
  294. package/es/table/TableContent.js +0 -109
  295. package/es/table/__tests__/index.test.js +0 -133
  296. package/es/table/checkbox/style/index.css +0 -1
  297. package/es/table/checkbox/style/index.js +0 -3
  298. package/es/tabs/__tests__/index.test.js +0 -333
  299. package/es/tabs/tabs-legacy/ItemDropdown.js +0 -170
  300. package/es/tabs/tabs-legacy/TabPane.js +0 -78
  301. package/es/tabs/tabs-legacy/Tabs.js +0 -299
  302. package/es/tabs/tabs-legacy/index.js +0 -18
  303. package/es/tabs/tabs-legacy/style/index.css +0 -1
  304. package/es/tabs/tabs-legacy/style/index.js +0 -3
  305. package/es/tag/__tests__/index.test.js +0 -46
  306. package/es/tag/index.js +0 -94
  307. package/es/tag/style/index.css +0 -1
  308. package/es/tag/style/index.js +0 -3
  309. package/es/timeline/__tests__/index.test.js +0 -198
  310. package/es/tooltip/__tests__/index.test.js +0 -170
  311. package/es/transfer/Transfer.js +0 -566
  312. package/es/transfer/__tests__/index.test.js +0 -210
  313. package/es/tree/IconLoading.js +0 -38
  314. package/es/tree/__tests__/index.test.js +0 -603
  315. package/es/tree/tree-legacy/Tree.js +0 -337
  316. package/es/tree/tree-legacy/TreeDivider.js +0 -25
  317. package/es/tree/tree-legacy/TreeItem.js +0 -333
  318. package/es/tree/tree-legacy/TreeNode.js +0 -719
  319. package/es/tree/tree-legacy/index.js +0 -13
  320. package/es/tree/tree-legacy/style/index.css +0 -1
  321. package/es/tree/tree-legacy/style/index.js +0 -3
  322. package/es/tree/tree-legacy/util.js +0 -434
  323. package/es/upload/__tests__/index.test.js +0 -760
  324. package/es/upload/main.js +0 -91
  325. package/es/upload/upload-legacy/Upload.js +0 -435
  326. package/es/upload/upload-legacy/UploadAvatar.js +0 -322
  327. package/es/upload/upload-legacy/UploadClick.js +0 -125
  328. package/es/upload/upload-legacy/UploadDrag.js +0 -180
  329. package/es/upload/upload-legacy/UploadPhoto.js +0 -183
  330. package/es/upload/upload-legacy/UploadPictureCard.js +0 -126
  331. package/es/upload/upload-legacy/index.js +0 -75
  332. package/es/upload/upload-legacy/style/index.css +0 -1
  333. package/es/upload/upload-legacy/style/index.js +0 -5
  334. package/es/upload/upload-legacy/tool.js +0 -84
  335. package/es/watermark/index.js +0 -101
  336. package/es/watermark/watermark.js +0 -252
  337. /package/es/checkbox/{checkbox-legacy/common.js → common.js} +0 -0
  338. /package/es/{breadcrumb/style → style}/index.js +0 -0
  339. /package/es/upload/{upload-legacy/style → style}/preview.css +0 -0
  340. /package/es/upload/{upload-legacy/style → style}/preview.js +0 -0
@@ -1,26 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
3
  Object.defineProperty(exports, "__esModule", {
8
4
  value: true
9
5
  });
10
6
  exports["default"] = void 0;
11
7
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
-
16
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
-
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
-
22
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
-
24
8
  var _react = _interopRequireWildcard(require("react"));
25
9
 
26
10
  var _Calender = _interopRequireDefault(require("./Calender"));
@@ -33,56 +17,103 @@ var _icon = _interopRequireDefault(require("../icon"));
33
17
 
34
18
  var _classnames = _interopRequireDefault(require("classnames"));
35
19
 
20
+ var _context = _interopRequireDefault(require("../context"));
21
+
36
22
  var _TimePeriodPanel = _interopRequireDefault(require("./TimePeriodPanel"));
37
23
 
38
24
  var _dateUtil = require("./dateUtil");
39
25
 
40
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
29
+
30
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
41
31
 
42
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
32
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
43
33
 
44
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
34
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
45
35
 
46
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
36
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
+
38
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
39
+
40
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
41
+
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
43
+
44
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
+
46
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
+
48
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
49
+
50
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
+
52
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
53
+
54
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
55
 
48
56
  var DatePanel = /*#__PURE__*/function (_Component) {
49
- (0, _inherits2["default"])(DatePanel, _Component);
57
+ _inherits(DatePanel, _Component);
50
58
 
51
59
  var _super = _createSuper(DatePanel);
52
60
 
53
61
  function DatePanel(props) {
54
62
  var _this;
55
63
 
56
- (0, _classCallCheck2["default"])(this, DatePanel);
64
+ _classCallCheck(this, DatePanel);
65
+
57
66
  _this = _super.call(this, props);
58
67
  _this.state = {
68
+ date: props.date,
59
69
  currentView: props.type,
60
70
  yearData: [],
61
- monthData: [],
62
- staticDate: (0, _dateUtil.getStartDate)(props.date)
71
+ monthData: []
63
72
  };
64
73
  return _this;
65
74
  }
66
- /**
67
- * 改变月份事件
68
- * @param {Number} num 加减值
69
- */
70
75
 
76
+ _createClass(DatePanel, [{
77
+ key: "componentWillReceiveProps",
78
+ value: function componentWillReceiveProps(nextProps) {
79
+ this.setState({
80
+ date: nextProps.date
81
+ });
82
+ }
83
+ /**
84
+ * 改变月份事件
85
+ * @param {Number} num 加减值
86
+ */
71
87
 
72
- (0, _createClass2["default"])(DatePanel, [{
88
+ }, {
73
89
  key: "changeMonth",
74
90
  value: function changeMonth(flag) {
75
- var staticDate = this.state.staticDate;
76
- var cDate = (0, _dateUtil.getValidDate)(staticDate);
91
+ var date = this.state.date;
92
+
93
+ var _deconstructDate = (0, _util.deconstructDate)(date),
94
+ year = _deconstructDate.year,
95
+ month = _deconstructDate.month;
77
96
 
78
97
  if (flag) {
79
- cDate = (0, _dateUtil.subMonths)(cDate, 1);
98
+ month -= 1;
99
+
100
+ if (month < 0) {
101
+ month = 12;
102
+ year -= 1;
103
+ }
80
104
  } else {
81
- cDate = (0, _dateUtil.addMonths)(cDate, 1);
105
+ month += 1;
106
+
107
+ if (month > 12) {
108
+ month = 1;
109
+ year += 1;
110
+ }
82
111
  }
83
112
 
113
+ date.setFullYear(year);
114
+ date.setMonth(month - 1);
84
115
  this.setState({
85
- staticDate: cDate
116
+ date: date
86
117
  });
87
118
  }
88
119
  /**
@@ -93,12 +124,12 @@ var DatePanel = /*#__PURE__*/function (_Component) {
93
124
  }, {
94
125
  key: "changeYear",
95
126
  value: function changeYear(flag) {
96
- var currentView = this.state.currentView;
97
- var staticDate = this.state.staticDate;
98
- var cDate = (0, _dateUtil.getValidDate)(staticDate);
127
+ var _this$state = this.state,
128
+ date = _this$state.date,
129
+ currentView = _this$state.currentView;
99
130
 
100
- var _deconstructDate = (0, _util.deconstructDate)(cDate),
101
- year = _deconstructDate.year;
131
+ var _deconstructDate2 = (0, _util.deconstructDate)(date),
132
+ year = _deconstructDate2.year;
102
133
 
103
134
  var num = currentView === 'year' ? 10 : 1;
104
135
 
@@ -106,16 +137,33 @@ var DatePanel = /*#__PURE__*/function (_Component) {
106
137
  year -= num;
107
138
  } else {
108
139
  year += num;
109
- }
140
+ } // day = this.calcDayCount(year, month)
110
141
 
111
- cDate.setFullYear(year);
142
+
143
+ date.setFullYear(year);
112
144
  this.setState({
113
- staticDate: cDate
145
+ date: date
146
+ });
147
+ }
148
+ }, {
149
+ key: "renderInput",
150
+ value: function renderInput() {
151
+ var _this2 = this;
152
+
153
+ return /*#__PURE__*/_react["default"].createElement("input", {
154
+ type: "text",
155
+ className: "dp-input",
156
+ onClick: function onClick() {
157
+ _this2.setState({
158
+ show: !_this2.state.show
159
+ });
160
+ },
161
+ value: this.state.value
114
162
  });
115
163
  }
116
164
  }, {
117
165
  key: "getYearOrMonthData",
118
- value: function getYearOrMonthData(val, type, _year) {
166
+ value: function getYearOrMonthData(val, type) {
119
167
  var start = type === 'year' ? val - 4 : 1;
120
168
  var trs = [[], [], [], []];
121
169
  var num = 0;
@@ -139,7 +187,7 @@ var DatePanel = /*#__PURE__*/function (_Component) {
139
187
  col.type = 'current';
140
188
  }
141
189
 
142
- col = (0, _util.colDisabled)(type, col, _year, this.props, y);
190
+ type === 'year' ? col.text = y : col.text = this.props.localeDatas.datePicker.month[y - 1];
143
191
  col.value = y;
144
192
  num++;
145
193
  }
@@ -160,22 +208,18 @@ var DatePanel = /*#__PURE__*/function (_Component) {
160
208
  var _this$props = this.props,
161
209
  localeDatas = _this$props.localeDatas,
162
210
  locale = _this$props.locale;
163
- var _this$state = this.state,
164
- staticDate = _this$state.staticDate,
165
- currentView = _this$state.currentView;
211
+ var _this$state2 = this.state,
212
+ date = _this$state2.date,
213
+ currentView = _this$state2.currentView;
166
214
 
167
- var _deconstructDate2 = (0, _util.deconstructDate)((0, _dateUtil.getValidDate)(staticDate)),
168
- year = _deconstructDate2.year,
169
- month = _deconstructDate2.month;
215
+ var _deconstructDate3 = (0, _util.deconstructDate)(date),
216
+ year = _deconstructDate3.year,
217
+ month = _deconstructDate3.month;
170
218
 
171
219
  if (currentView === 'year') {
172
220
  return year - 4 + '~' + (year + 7);
173
221
  }
174
222
 
175
- if (currentView === 'month') {
176
- return year;
177
- }
178
-
179
223
  var arr = [localeDatas.datePicker.monthShort[month - 1]];
180
224
 
181
225
  if (locale === 'zh-CN') {
@@ -198,8 +242,8 @@ var DatePanel = /*#__PURE__*/function (_Component) {
198
242
 
199
243
  }, {
200
244
  key: "renderHeader",
201
- value: function renderHeader(type) {
202
- var _this2 = this;
245
+ value: function renderHeader(type, value) {
246
+ var _this3 = this;
203
247
 
204
248
  return /*#__PURE__*/_react["default"].createElement("div", {
205
249
  className: "hi-datepicker__header"
@@ -207,20 +251,20 @@ var DatePanel = /*#__PURE__*/function (_Component) {
207
251
  className: "hi-datepicker__header-btns"
208
252
  }, /*#__PURE__*/_react["default"].createElement("span", {
209
253
  onClick: function onClick() {
210
- return _this2.changeYear(true);
254
+ return _this3.changeYear(true);
211
255
  }
212
256
  }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
213
257
  name: "double-left"
214
258
  })), type !== 'month' && type !== 'year' && /*#__PURE__*/_react["default"].createElement("span", {
215
259
  onClick: function onClick() {
216
- return _this2.changeMonth(true);
260
+ return _this3.changeMonth(true);
217
261
  }
218
262
  }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
219
263
  name: "left"
220
264
  }))), /*#__PURE__*/_react["default"].createElement("span", {
221
265
  className: "hi-datepicker__header-text",
222
266
  onClick: function onClick() {
223
- return _this2.setState({
267
+ return _this3.setState({
224
268
  currentView: 'year'
225
269
  });
226
270
  }
@@ -228,13 +272,13 @@ var DatePanel = /*#__PURE__*/function (_Component) {
228
272
  className: "hi-datepicker__header-btns"
229
273
  }, type !== 'month' && type !== 'year' && /*#__PURE__*/_react["default"].createElement("span", {
230
274
  onClick: function onClick() {
231
- return _this2.changeMonth(false);
275
+ return _this3.changeMonth(false);
232
276
  }
233
277
  }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
234
278
  name: "right"
235
279
  })), /*#__PURE__*/_react["default"].createElement("span", {
236
280
  onClick: function onClick() {
237
- return _this2.changeYear(false);
281
+ return _this3.changeYear(false);
238
282
  }
239
283
  }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
240
284
  name: "double-right"
@@ -251,121 +295,100 @@ var DatePanel = /*#__PURE__*/function (_Component) {
251
295
  onPick(date);
252
296
  } else {
253
297
  this.setState({
254
- currentView: 'month',
255
- staticDate: date
298
+ date: date,
299
+ currentView: 'month'
256
300
  });
257
301
  }
258
302
  }
259
303
  }, {
260
304
  key: "monthPick",
261
305
  value: function monthPick(_date) {
262
- var _this3 = this;
263
-
264
306
  var _this$props3 = this.props,
265
307
  type = _this$props3.type,
266
308
  onPick = _this$props3.onPick;
267
- var currentView = this.state.currentView;
309
+ var date = this.state.date;
268
310
 
269
311
  if (type === 'month') {
270
312
  onPick(_date);
271
- } else if (type === 'week') {
272
- this.setState({
273
- currentView: 'week'
274
- });
275
- onPick(_date, true);
276
313
  } else {
314
+ date.setFullYear(_date.getFullYear());
315
+ date.setMonth(_date.getMonth());
277
316
  this.setState({
317
+ date: date,
278
318
  currentView: 'date'
279
- }, function () {
280
- if (currentView === type) {
281
- onPick(_date, true);
282
- } else {
283
- _this3.setState({
284
- staticDate: _date
285
- });
286
- }
287
319
  });
288
320
  }
289
321
  }
290
322
  }, {
291
323
  key: "onDatePick",
292
- value: function onDatePick(_date) {
324
+ value: function onDatePick(date) {
293
325
  var _this$props4 = this.props,
294
326
  type = _this$props4.type,
295
- showTime = _this$props4.showTime,
296
- onPick = _this$props4.onPick,
297
- timeInterval = _this$props4.timeInterval,
298
- weekOffset = _this$props4.weekOffset;
299
-
300
- if (type === 'week') {
301
- var _weekOffset = {
302
- weekStartsOn: weekOffset
303
- };
304
- var weekStart = (0, _dateUtil.startOfWeek)(_date, _weekOffset);
305
- var weekEnd = (0, _dateUtil.endOfWeek)(_date, _weekOffset);
306
- onPick({
307
- startDate: weekStart,
308
- endDate: weekEnd
309
- }, false);
310
- return;
311
- }
327
+ showTime = _this$props4.showTime;
328
+
329
+ var _deconstructDate4 = (0, _util.deconstructDate)(this.state.date),
330
+ hours = _deconstructDate4.hours,
331
+ minutes = _deconstructDate4.minutes,
332
+ seconds = _deconstructDate4.seconds;
312
333
 
313
334
  if (type === 'timeperiod') {
314
- onPick({
315
- startDate: _date,
316
- endDate: new Date(_date.getTime() + timeInterval * 60 * 1000)
335
+ this.props.onPick({
336
+ startDate: date,
337
+ endDate: (0, _dateUtil.addHours)(this.state.date, 4)
317
338
  }, true);
318
339
  } else {
319
- // date.setHours(hours, minutes, seconds)
320
- onPick(_date, showTime);
340
+ date.setHours(hours, minutes, seconds);
341
+ this.props.onPick(date, showTime);
321
342
  }
322
-
323
- this.setState({
324
- staticDate: _date
325
- });
326
343
  }
327
344
  }, {
328
345
  key: "onTimePeriodPick",
329
346
  value: function onTimePeriodPick(periodS, periodE) {
330
- var date = (0, _dateUtil.getStartDate)(this.props.date);
331
- var currentDate = (0, _dateUtil.dateFormat)(date, 'yyyy-MM-dd');
347
+ var currentDate = (0, _dateUtil.dateFormat)(this.state.date, 'YYYY-MM-DD');
348
+ var _endCurrentDate = currentDate;
349
+ if (periodE === '24:00') _endCurrentDate = (0, _dateUtil.dateFormat)((0, _dateUtil.addDays)(currentDate, 1), 'YYYY-MM-DD');
332
350
  this.props.onPick({
333
- startDate: (0, _dateUtil.parseISO)("".concat(currentDate, " ").concat(periodS)),
334
- endDate: (0, _dateUtil.parseISO)("".concat(currentDate, " ").concat(periodE))
351
+ startDate: (0, _dateUtil.parse)("".concat(currentDate, " ").concat(periodS)),
352
+ endDate: (0, _dateUtil.parse)("".concat(_endCurrentDate, " ").concat(periodE))
335
353
  }, true);
336
354
  }
337
355
  }, {
338
356
  key: "onTimePick",
339
357
  value: function onTimePick(date, bol) {
340
358
  this.setState({
341
- date: date,
342
- staticDate: date
343
- });
359
+ date: date
360
+ }); // if (showTime) {
361
+ // this.setState({date})
362
+ // } else {
363
+ // this.props.onPick(date)
364
+ // }
365
+
344
366
  this.props.onPick(date, bol);
345
367
  }
368
+ }, {
369
+ key: "timeConfirm",
370
+ value: function timeConfirm() {
371
+ this.props.timeConfirm(this.state.date);
372
+ }
373
+ }, {
374
+ key: "timeCancel",
375
+ value: function timeCancel() {}
346
376
  }, {
347
377
  key: "_getNormalComponent",
348
378
  value: function _getNormalComponent() {
349
- var currentView = this.state.currentView;
379
+ var _this4 = this;
380
+
381
+ var _this$state3 = this.state,
382
+ currentView = _this$state3.currentView,
383
+ date = _this$state3.date;
350
384
  var _this$props5 = this.props,
351
- min = _this$props5.min,
352
- max = _this$props5.max,
353
- weekOffset = _this$props5.weekOffset,
354
- disabledDate = _this$props5.disabledDate,
355
- showLunar = _this$props5.showLunar,
356
- altCalendar = _this$props5.altCalendar,
357
- altCalendarPreset = _this$props5.altCalendarPreset,
358
- dateMarkRender = _this$props5.dateMarkRender,
359
- dateMarkPreset = _this$props5.dateMarkPreset,
360
- altCalendarPresetData = _this$props5.altCalendarPresetData,
361
- dateMarkPresetData = _this$props5.dateMarkPresetData,
362
- onSelect = _this$props5.onSelect;
363
- var staticDate = this.state.staticDate;
364
- var validDate = (0, _dateUtil.getValidDate)(staticDate);
365
-
366
- var _deconstructDate3 = (0, _util.deconstructDate)(validDate),
367
- year = _deconstructDate3.year,
368
- month = _deconstructDate3.month;
385
+ minDate = _this$props5.minDate,
386
+ maxDate = _this$props5.maxDate,
387
+ weekOffset = _this$props5.weekOffset;
388
+
389
+ var _deconstructDate5 = (0, _util.deconstructDate)(date),
390
+ year = _deconstructDate5.year,
391
+ month = _deconstructDate5.month;
369
392
 
370
393
  var component = null;
371
394
 
@@ -374,36 +397,19 @@ var DatePanel = /*#__PURE__*/function (_Component) {
374
397
  case 'timeperiod':
375
398
  case 'week':
376
399
  component = /*#__PURE__*/_react["default"].createElement(_Calender["default"], {
377
- altCalendarPresetData: altCalendarPresetData,
378
- dateMarkPresetData: dateMarkPresetData,
379
- altCalendar: altCalendar,
380
- onSelect: onSelect,
381
- altCalendarPreset: altCalendarPreset,
382
- dateMarkRender: dateMarkRender,
383
- dateMarkPreset: dateMarkPreset,
384
- showLunar: showLunar,
385
- date: validDate,
400
+ date: date,
386
401
  weekOffset: weekOffset,
387
- minDate: min,
388
- maxDate: max,
389
- disabledDate: disabledDate,
402
+ minDate: minDate,
403
+ maxDate: maxDate,
390
404
  type: currentView,
391
405
  onPick: this.onDatePick.bind(this)
392
406
  });
393
407
  break;
394
408
 
395
409
  case 'year':
396
- var yearData = this.getYearOrMonthData(year, 'year', year);
410
+ var yearData = this.getYearOrMonthData(year, 'year');
397
411
  component = /*#__PURE__*/_react["default"].createElement(_Calender["default"], {
398
- altCalendarPresetData: altCalendarPresetData,
399
- dateMarkPresetData: dateMarkPresetData,
400
- altCalendar: altCalendar,
401
- altCalendarPreset: altCalendarPreset,
402
- dateMarkRender: dateMarkRender,
403
- onSelect: onSelect,
404
- dateMarkPreset: dateMarkPreset,
405
- showLunar: showLunar,
406
- date: validDate,
412
+ date: date,
407
413
  data: yearData,
408
414
  type: currentView,
409
415
  onPick: this.yearPick.bind(this)
@@ -411,22 +417,23 @@ var DatePanel = /*#__PURE__*/function (_Component) {
411
417
  break;
412
418
 
413
419
  case 'month':
414
- var monthData = this.getYearOrMonthData(month, 'month', year);
420
+ var monthData = this.getYearOrMonthData(month, 'month');
415
421
  component = /*#__PURE__*/_react["default"].createElement(_Calender["default"], {
416
- altCalendarPresetData: altCalendarPresetData,
417
- dateMarkPresetData: dateMarkPresetData,
418
- altCalendar: altCalendar,
419
- altCalendarPreset: altCalendarPreset,
420
- dateMarkRender: dateMarkRender,
421
- dateMarkPreset: dateMarkPreset,
422
- onSelect: onSelect,
423
- showLunar: showLunar,
424
- date: validDate,
422
+ date: date,
425
423
  data: monthData,
426
424
  type: currentView,
427
425
  onPick: this.monthPick.bind(this)
428
426
  });
429
427
  break;
428
+
429
+ default:
430
+ component = /*#__PURE__*/_react["default"].createElement(_Calender["default"], _extends({}, this.props, {
431
+ date: date,
432
+ onClick: function onClick(data) {
433
+ _this4.changeDay(data.value);
434
+ }
435
+ }));
436
+ break;
430
437
  }
431
438
 
432
439
  return component;
@@ -434,9 +441,9 @@ var DatePanel = /*#__PURE__*/function (_Component) {
434
441
  }, {
435
442
  key: "render",
436
443
  value: function render() {
437
- var _this$state2 = this.state,
438
- date = _this$state2.date,
439
- currentView = _this$state2.currentView;
444
+ var _this$state4 = this.state,
445
+ date = _this$state4.date,
446
+ currentView = _this$state4.currentView;
440
447
  var _this$props6 = this.props,
441
448
  theme = _this$props6.theme,
442
449
  showTime = _this$props6.showTime,
@@ -445,7 +452,7 @@ var DatePanel = /*#__PURE__*/function (_Component) {
445
452
 
446
453
  var _c = (0, _classnames["default"])('hi-datepicker', theme && 'theme__' + theme);
447
454
 
448
- var bodyCls = (0, _classnames["default"])('hi-datepicker__body', showTime && 'hi-datepicker__body--hastime', type === 'timeperiod' && 'hi-datepicker__body--period', (0, _util.showLargeCalendar)(this.props) && 'hi-datepicker__body--large');
455
+ var bodyCls = (0, _classnames["default"])('hi-datepicker__body', showTime && 'hi-datepicker__body--hastime', type === 'timeperiod' && 'hi-datepicker__body--period');
449
456
  return /*#__PURE__*/_react["default"].createElement("div", {
450
457
  style: this.props.style,
451
458
  className: _c
@@ -455,18 +462,22 @@ var DatePanel = /*#__PURE__*/function (_Component) {
455
462
  className: "hi-datepicker__panel hi-datepicker__panel--left"
456
463
  }, currentView !== 'time' && this.renderHeader(currentView, date), /*#__PURE__*/_react["default"].createElement("div", {
457
464
  className: "hi-datepicker__calender-container hi-datepicker__calender-container--".concat(currentView)
458
- }, this._getNormalComponent())), showTime && /*#__PURE__*/_react["default"].createElement(_TimePanel["default"], (0, _extends2["default"])({}, this.props, {
459
- onPick: this.onTimePick.bind(this),
460
- date: (0, _dateUtil.getStartDate)(this.props.date)
461
- })), type === 'timeperiod' && /*#__PURE__*/_react["default"].createElement(_TimePeriodPanel["default"], (0, _extends2["default"])({}, this.props, {
465
+ }, this._getNormalComponent())), showTime && /*#__PURE__*/_react["default"].createElement(_TimePanel["default"], _extends({}, this.props, {
466
+ onPick: this.onTimePick.bind(this) // date={date}
467
+ ,
468
+ timeConfirm: this.timeConfirm.bind(this),
469
+ timeCancel: this.timeCancel.bind(this)
470
+ })), type === 'timeperiod' && /*#__PURE__*/_react["default"].createElement(_TimePeriodPanel["default"], {
462
471
  timeInterval: timeInterval,
463
472
  onTimePeriodPick: this.onTimePeriodPick.bind(this),
464
- date: (0, _dateUtil.getStartDate)(this.props.date)
465
- }))));
473
+ date: date
474
+ })));
466
475
  }
467
476
  }]);
477
+
468
478
  return DatePanel;
469
479
  }(_react.Component);
470
480
 
471
- var _default = DatePanel;
481
+ var _default = (0, _context["default"])(DatePanel);
482
+
472
483
  exports["default"] = _default;