@jetbrains/ring-ui-built 7.0.0-beta.1 → 7.0.0-beta.10

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 (349) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
  2. package/components/_helpers/anchor.js +7 -10
  3. package/components/_helpers/button__classes.js +23 -20
  4. package/components/_helpers/caption.js +11 -21
  5. package/components/_helpers/card.js +91 -123
  6. package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
  7. package/components/_helpers/header.js +1 -1
  8. package/components/_helpers/icon__svg.js +27 -29
  9. package/components/_helpers/input.js +151 -193
  10. package/components/_helpers/query-assist__suggestions.js +79 -94
  11. package/components/_helpers/select__filter.js +56 -75
  12. package/components/_helpers/services-link.js +23 -39
  13. package/components/_helpers/sidebar.js +91 -102
  14. package/components/_helpers/tab-link.js +8 -12
  15. package/components/_helpers/theme.js +61 -51
  16. package/components/_helpers/title.js +59 -84
  17. package/components/alert/alert.d.ts +7 -24
  18. package/components/alert/alert.js +111 -179
  19. package/components/alert/container.d.ts +0 -5
  20. package/components/alert/container.js +32 -44
  21. package/components/alert-service/alert-service.js +104 -162
  22. package/components/analytics/analytics.js +12 -20
  23. package/components/analytics/analytics__custom-plugin.js +52 -68
  24. package/components/auth/auth.js +2 -31
  25. package/components/auth/auth__core.d.ts +4 -4
  26. package/components/auth/auth__core.js +755 -1433
  27. package/components/auth/background-flow.js +84 -121
  28. package/components/auth/down-notification.js +32 -79
  29. package/components/auth/iframe-flow.js +71 -125
  30. package/components/auth/request-builder.js +46 -77
  31. package/components/auth/response-parser.js +84 -112
  32. package/components/auth/storage.js +162 -324
  33. package/components/auth/token-validator.js +132 -227
  34. package/components/auth/window-flow.js +84 -121
  35. package/components/auth-dialog/auth-dialog.d.ts +0 -18
  36. package/components/auth-dialog/auth-dialog.js +107 -176
  37. package/components/auth-dialog-service/auth-dialog-service.js +12 -33
  38. package/components/avatar/avatar-example-datauri.js +1 -1
  39. package/components/avatar/avatar.d.ts +0 -13
  40. package/components/avatar/avatar.js +94 -136
  41. package/components/avatar/fallback-avatar.d.ts +1 -10
  42. package/components/avatar/fallback-avatar.js +20 -40
  43. package/components/badge/badge.d.ts +0 -10
  44. package/components/badge/badge.js +32 -48
  45. package/components/breadcrumbs/breadcrumbs.js +13 -17
  46. package/components/button/button.d.ts +0 -21
  47. package/components/button/button.js +68 -104
  48. package/components/button/button__classes.d.ts +1 -1
  49. package/components/button-group/button-group.d.ts +0 -5
  50. package/components/button-group/button-group.js +27 -41
  51. package/components/button-group/caption.d.ts +0 -4
  52. package/components/button-group/caption.js +0 -1
  53. package/components/button-set/button-set.d.ts +0 -6
  54. package/components/button-set/button-set.js +19 -33
  55. package/components/button-toolbar/button-toolbar.d.ts +0 -6
  56. package/components/button-toolbar/button-toolbar.js +17 -31
  57. package/components/caret/caret.js +184 -211
  58. package/components/checkbox/checkbox.d.ts +0 -19
  59. package/components/checkbox/checkbox.js +69 -104
  60. package/components/clipboard/clipboard-fallback.js +7 -7
  61. package/components/clipboard/clipboard.js +36 -129
  62. package/components/code/code.d.ts +0 -12
  63. package/components/code/code.js +83 -163
  64. package/components/collapse/collapse-content.js +42 -60
  65. package/components/collapse/collapse-context.js +2 -2
  66. package/components/collapse/collapse-control.js +12 -12
  67. package/components/collapse/collapse.js +12 -17
  68. package/components/collapse/consts.js +4 -4
  69. package/components/collapse/utils.js +1 -3
  70. package/components/confirm/confirm.d.ts +0 -14
  71. package/components/confirm/confirm.js +68 -112
  72. package/components/confirm-service/confirm-service.js +25 -47
  73. package/components/content-layout/content-layout.d.ts +0 -7
  74. package/components/content-layout/content-layout.js +41 -63
  75. package/components/content-layout/sidebar.d.ts +0 -9
  76. package/components/content-layout/sidebar.js +1 -2
  77. package/components/contenteditable/contenteditable.d.ts +1 -22
  78. package/components/contenteditable/contenteditable.js +37 -60
  79. package/components/control-help/control-help.js +5 -3
  80. package/components/control-label/control-label.js +9 -14
  81. package/components/data-list/data-list.d.ts +0 -2
  82. package/components/data-list/data-list.js +115 -179
  83. package/components/data-list/data-list.mock.js +3 -6
  84. package/components/data-list/item.js +119 -165
  85. package/components/data-list/selection.js +77 -135
  86. package/components/data-list/title.d.ts +2 -2
  87. package/components/data-list/title.js +2 -12
  88. package/components/date-picker/consts.d.ts +0 -2
  89. package/components/date-picker/consts.js +16 -24
  90. package/components/date-picker/date-input.d.ts +0 -20
  91. package/components/date-picker/date-input.js +100 -148
  92. package/components/date-picker/date-picker.d.ts +0 -29
  93. package/components/date-picker/date-picker.js +143 -224
  94. package/components/date-picker/date-popup.d.ts +0 -22
  95. package/components/date-picker/date-popup.js +282 -352
  96. package/components/date-picker/day.d.ts +0 -14
  97. package/components/date-picker/day.js +72 -109
  98. package/components/date-picker/month-names.d.ts +1 -11
  99. package/components/date-picker/month-names.js +42 -72
  100. package/components/date-picker/month-slider.d.ts +0 -9
  101. package/components/date-picker/month-slider.js +43 -71
  102. package/components/date-picker/month.d.ts +1 -9
  103. package/components/date-picker/month.js +18 -30
  104. package/components/date-picker/months.d.ts +1 -9
  105. package/components/date-picker/months.js +45 -55
  106. package/components/date-picker/weekdays.d.ts +2 -8
  107. package/components/date-picker/weekdays.js +12 -25
  108. package/components/date-picker/years.d.ts +0 -6
  109. package/components/date-picker/years.js +77 -104
  110. package/components/dialog/dialog.d.ts +0 -20
  111. package/components/dialog/dialog.js +153 -211
  112. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  113. package/components/dropdown/anchor.d.ts +1 -8
  114. package/components/dropdown/anchor.js +0 -7
  115. package/components/dropdown/dropdown.d.ts +4 -22
  116. package/components/dropdown/dropdown.js +134 -176
  117. package/components/dropdown-menu/dropdown-menu.js +51 -103
  118. package/components/editable-heading/editable-heading.js +69 -118
  119. package/components/error-bubble/error-bubble.d.ts +0 -6
  120. package/components/error-bubble/error-bubble.js +30 -60
  121. package/components/error-message/error-message.d.ts +0 -10
  122. package/components/error-message/error-message.js +34 -59
  123. package/components/footer/footer.js +28 -44
  124. package/components/form/form.js +1 -1
  125. package/components/global/compose.js +1 -8
  126. package/components/global/composeRefs.d.ts +0 -3
  127. package/components/global/composeRefs.js +8 -15
  128. package/components/global/controls-height.js +2 -2
  129. package/components/global/create-stateful-context.d.ts +0 -4
  130. package/components/global/create-stateful-context.js +14 -17
  131. package/components/global/data-tests.js +7 -12
  132. package/components/global/dom.js +49 -82
  133. package/components/global/focus-sensor-hoc.js +95 -122
  134. package/components/global/fuzzy-highlight.js +23 -34
  135. package/components/global/get-event-key.js +8 -8
  136. package/components/global/get-uid.js +3 -7
  137. package/components/global/inject-styles.js +7 -14
  138. package/components/global/listeners.js +28 -47
  139. package/components/global/memoize.js +6 -10
  140. package/components/global/normalize-indent.js +19 -46
  141. package/components/global/promise-with-timeout.js +6 -8
  142. package/components/global/react-dom-renderer.d.ts +0 -5
  143. package/components/global/react-dom-renderer.js +29 -45
  144. package/components/global/rerender-hoc.d.ts +2 -2
  145. package/components/global/rerender-hoc.js +16 -32
  146. package/components/global/schedule-raf.js +4 -4
  147. package/components/global/sniffer.js +1 -1
  148. package/components/global/theme.d.ts +8 -2
  149. package/components/global/theme.js +2 -20
  150. package/components/global/trivial-template-tag.js +4 -9
  151. package/components/global/typescript-utils.js +2 -6
  152. package/components/global/url.js +20 -23
  153. package/components/global/use-event-callback.js +7 -4
  154. package/components/grid/col.d.ts +0 -14
  155. package/components/grid/col.js +27 -53
  156. package/components/grid/grid.d.ts +0 -5
  157. package/components/grid/grid.js +20 -32
  158. package/components/grid/row.d.ts +0 -18
  159. package/components/grid/row.js +23 -47
  160. package/components/group/group.d.ts +0 -5
  161. package/components/group/group.js +18 -27
  162. package/components/header/header-icon.d.ts +0 -22
  163. package/components/header/header-icon.js +20 -37
  164. package/components/header/header.d.ts +0 -7
  165. package/components/header/header.js +30 -74
  166. package/components/header/links.d.ts +2 -0
  167. package/components/header/links.js +20 -0
  168. package/components/header/logo.d.ts +0 -4
  169. package/components/header/logo.js +15 -30
  170. package/components/header/profile.d.ts +1 -39
  171. package/components/header/profile.js +126 -191
  172. package/components/header/services-link.d.ts +0 -10
  173. package/components/header/services-link.js +1 -4
  174. package/components/header/services.d.ts +0 -14
  175. package/components/header/services.js +65 -110
  176. package/components/header/smart-profile.d.ts +0 -9
  177. package/components/header/smart-profile.js +116 -205
  178. package/components/header/smart-services.d.ts +0 -4
  179. package/components/header/smart-services.js +72 -141
  180. package/components/header/tray.d.ts +0 -5
  181. package/components/header/tray.js +21 -35
  182. package/components/heading/heading.js +21 -26
  183. package/components/http/http.js +162 -319
  184. package/components/http/http.mock.js +50 -98
  185. package/components/hub-source/hub-source.js +77 -182
  186. package/components/hub-source/hub-source__user.js +9 -37
  187. package/components/hub-source/hub-source__users-groups.js +34 -60
  188. package/components/i18n/i18n-context.js +7 -8
  189. package/components/i18n/i18n.js +3 -6
  190. package/components/icon/icon.d.ts +0 -11
  191. package/components/icon/icon.js +60 -85
  192. package/components/icon/icon__svg.d.ts +0 -8
  193. package/components/icon/icon__svg.js +0 -6
  194. package/components/icon/index.js +0 -6
  195. package/components/input/input-legacy.js +1 -1
  196. package/components/input/input.js +2 -14
  197. package/components/input-size/input-size.js +1 -1
  198. package/components/island/adaptive-island-hoc.d.ts +0 -1
  199. package/components/island/adaptive-island-hoc.js +30 -39
  200. package/components/island/content.d.ts +0 -10
  201. package/components/island/content.js +99 -119
  202. package/components/island/header.js +55 -73
  203. package/components/island/island.d.ts +0 -9
  204. package/components/island/island.js +25 -41
  205. package/components/island-legacy/content-legacy.d.ts +0 -5
  206. package/components/island-legacy/content-legacy.js +16 -27
  207. package/components/island-legacy/header-legacy.d.ts +0 -5
  208. package/components/island-legacy/header-legacy.js +19 -30
  209. package/components/island-legacy/island-legacy.d.ts +0 -5
  210. package/components/island-legacy/island-legacy.js +16 -27
  211. package/components/link/clickableLink.d.ts +0 -9
  212. package/components/link/clickableLink.js +33 -51
  213. package/components/link/link.d.ts +0 -25
  214. package/components/link/link.js +47 -68
  215. package/components/list/consts.js +2 -2
  216. package/components/list/list.d.ts +0 -32
  217. package/components/list/list.js +399 -516
  218. package/components/list/list__custom.js +51 -78
  219. package/components/list/list__hint.d.ts +0 -4
  220. package/components/list/list__hint.js +8 -21
  221. package/components/list/list__item.js +147 -211
  222. package/components/list/list__link.js +39 -59
  223. package/components/list/list__separator.js +15 -30
  224. package/components/list/list__title.js +25 -41
  225. package/components/list/list__users-groups-source.js +55 -123
  226. package/components/loader/loader.d.ts +0 -10
  227. package/components/loader/loader.js +38 -70
  228. package/components/loader/loader__core.js +123 -184
  229. package/components/loader-inline/loader-inline.d.ts +0 -6
  230. package/components/loader-inline/loader-inline.js +24 -38
  231. package/components/loader-screen/loader-screen.d.ts +0 -6
  232. package/components/loader-screen/loader-screen.js +24 -46
  233. package/components/login-dialog/login-dialog.d.ts +0 -11
  234. package/components/login-dialog/login-dialog.js +94 -145
  235. package/components/login-dialog/service.js +11 -33
  236. package/components/markdown/markdown.js +16 -29
  237. package/components/message/message.js +171 -218
  238. package/components/old-browsers-message/old-browsers-message.js +11 -14
  239. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  240. package/components/old-browsers-message/white-list.js +8 -13
  241. package/components/pager/pager.js +211 -275
  242. package/components/panel/panel.d.ts +0 -5
  243. package/components/panel/panel.js +16 -27
  244. package/components/permissions/permissions.js +118 -161
  245. package/components/permissions/permissions__cache.js +191 -218
  246. package/components/popup/popup.consts.js +1 -1
  247. package/components/popup/popup.js +237 -329
  248. package/components/popup/popup.target.js +9 -12
  249. package/components/popup/position.js +94 -101
  250. package/components/popup-menu/popup-menu.js +31 -76
  251. package/components/progress-bar/progress-bar.d.ts +19 -33
  252. package/components/progress-bar/progress-bar.js +55 -99
  253. package/components/query-assist/query-assist.d.ts +63 -93
  254. package/components/query-assist/query-assist.js +585 -748
  255. package/components/query-assist/query-assist__suggestions.js +2 -28
  256. package/components/radio/radio.d.ts +0 -8
  257. package/components/radio/radio.js +15 -35
  258. package/components/radio/radio__item.d.ts +0 -9
  259. package/components/radio/radio__item.js +52 -72
  260. package/components/scrollable-section/scrollable-section.js +53 -0
  261. package/components/select/select.d.ts +3 -0
  262. package/components/select/select.js +714 -863
  263. package/components/select/select__filter.js +2 -29
  264. package/components/select/select__popup.js +317 -465
  265. package/components/shortcuts/core.js +147 -195
  266. package/components/shortcuts/shortcut-title.js +6 -10
  267. package/components/shortcuts/shortcuts-hoc.d.ts +0 -5
  268. package/components/shortcuts/shortcuts-hoc.js +23 -46
  269. package/components/shortcuts/shortcuts.d.ts +0 -8
  270. package/components/shortcuts/shortcuts.js +41 -72
  271. package/components/slider/slider.js +93 -113
  272. package/components/slider/slider.utils.js +16 -23
  273. package/components/storage/storage.d.ts +2 -3
  274. package/components/storage/storage.js +2 -46
  275. package/components/storage/storage__local.js +89 -148
  276. package/components/style.css +1 -1
  277. package/components/tab-trap/tab-trap.js +35 -61
  278. package/components/table/cell.d.ts +0 -6
  279. package/components/table/cell.js +11 -27
  280. package/components/table/disable-hover-hoc.d.ts +0 -1
  281. package/components/table/disable-hover-hoc.js +27 -42
  282. package/components/table/header-cell.d.ts +0 -10
  283. package/components/table/header-cell.js +59 -85
  284. package/components/table/header.d.ts +1 -23
  285. package/components/table/header.js +89 -126
  286. package/components/table/multitable.d.ts +0 -4
  287. package/components/table/multitable.js +83 -93
  288. package/components/table/row-with-focus-sensor.d.ts +2 -2
  289. package/components/table/row-with-focus-sensor.js +26 -60
  290. package/components/table/row.js +170 -235
  291. package/components/table/selection-adapter.js +2 -2
  292. package/components/table/selection-shortcuts-hoc.js +102 -126
  293. package/components/table/selection.js +150 -217
  294. package/components/table/simple-table.d.ts +0 -44
  295. package/components/table/simple-table.js +18 -59
  296. package/components/table/smart-table.d.ts +0 -48
  297. package/components/table/smart-table.js +41 -83
  298. package/components/table/table.d.ts +0 -2
  299. package/components/table/table.js +269 -377
  300. package/components/tabs/collapsible-more.d.ts +1 -9
  301. package/components/tabs/collapsible-more.js +47 -97
  302. package/components/tabs/collapsible-tab.js +32 -44
  303. package/components/tabs/collapsible-tabs.d.ts +2 -29
  304. package/components/tabs/collapsible-tabs.js +89 -161
  305. package/components/tabs/custom-item.d.ts +1 -7
  306. package/components/tabs/custom-item.js +4 -7
  307. package/components/tabs/dumb-tabs.d.ts +0 -11
  308. package/components/tabs/dumb-tabs.js +60 -104
  309. package/components/tabs/smart-tabs.d.ts +0 -6
  310. package/components/tabs/smart-tabs.js +29 -68
  311. package/components/tabs/tab-link.d.ts +0 -8
  312. package/components/tabs/tab-link.js +1 -4
  313. package/components/tabs/tab.d.ts +0 -8
  314. package/components/tabs/tab.js +14 -32
  315. package/components/tabs/tabs.js +1 -28
  316. package/components/tag/tag.d.ts +0 -19
  317. package/components/tag/tag.js +120 -179
  318. package/components/tags-input/tags-input.d.ts +7 -33
  319. package/components/tags-input/tags-input.js +224 -339
  320. package/components/tags-list/tags-list.d.ts +0 -13
  321. package/components/tags-list/tags-list.js +45 -74
  322. package/components/text/text.d.ts +0 -7
  323. package/components/text/text.js +27 -43
  324. package/components/toggle/toggle.d.ts +0 -15
  325. package/components/toggle/toggle.js +52 -77
  326. package/components/tooltip/tooltip.d.ts +4 -10
  327. package/components/tooltip/tooltip.js +105 -137
  328. package/components/user-agreement/service.d.ts +2 -1
  329. package/components/user-agreement/service.js +260 -405
  330. package/components/user-agreement/user-agreement.d.ts +0 -18
  331. package/components/user-agreement/user-agreement.js +92 -138
  332. package/components/user-card/card.d.ts +0 -35
  333. package/components/user-card/card.js +2 -27
  334. package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
  335. package/components/user-card/smart-user-card-tooltip.js +52 -108
  336. package/components/user-card/tooltip.d.ts +0 -9
  337. package/components/user-card/tooltip.js +35 -74
  338. package/components/user-card/user-card.js +1 -26
  339. package/package.json +4 -6
  340. package/components/global/prop-types.d.ts +0 -4
  341. package/components/global/prop-types.js +0 -9
  342. package/components/global/react-render-adapter.d.ts +0 -1
  343. package/components/global/react-render-adapter.js +0 -6
  344. package/components/header/scrollable-section.js +0 -47
  345. package/components/header/tray-icon.d.ts +0 -1
  346. package/components/header/tray-icon.js +0 -26
  347. package/components/storage/storage__fallback.d.ts +0 -79
  348. package/components/storage/storage__fallback.js +0 -253
  349. /package/components/{header → scrollable-section}/scrollable-section.d.ts +0 -0
@@ -1,10 +1,7 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, c as _objectWithoutProperties, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.map.js';
1
+ import { _ as _defineProperty, b as _objectSpread2, a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
3
2
  import 'core-js/modules/es.array.reduce.js';
4
- import 'core-js/modules/es.object.to-string.js';
5
3
  import * as React from 'react';
6
- import { createElement, Component } from 'react';
7
- import PropTypes from 'prop-types';
4
+ import { Component, createElement } from 'react';
8
5
  import { isAfter } from 'date-fns/isAfter';
9
6
  import { isBefore } from 'date-fns/isBefore';
10
7
  import { isSameDay } from 'date-fns/isSameDay';
@@ -15,39 +12,28 @@ import DateInput from './date-input.js';
15
12
  import Months from './months.js';
16
13
  import Years from './years.js';
17
14
  import Weekdays from './weekdays.js';
18
- import { dateType, parseTime } from './consts.js';
15
+ import { parseTime } from './consts.js';
19
16
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
20
17
  import { jsxs, jsx } from 'react/jsx-runtime';
21
- import 'core-js/modules/es.array.iterator.js';
22
- import 'core-js/modules/es.map.js';
23
- import 'core-js/modules/es.weak-map.js';
24
18
  import 'core-js/modules/web.dom-collections.iterator.js';
25
- import 'core-js/modules/es.array.concat.js';
26
- import 'core-js/modules/es.array.filter.js';
27
19
  import 'core-js/modules/es.regexp.exec.js';
28
20
  import 'core-js/modules/es.string.replace.js';
29
21
  import 'classnames';
30
22
  import '../_helpers/input.js';
31
- import 'core-js/modules/es.object.values.js';
32
23
  import '@jetbrains/icons/close-12px';
33
- import '../global/prop-types.js';
34
24
  import '../button/button.js';
35
25
  import '@jetbrains/icons/chevron-down';
36
- import '../icon/icon.js';
37
26
  import 'util-deprecate';
27
+ import '../icon/icon.js';
38
28
  import '../icon/icon__constants.js';
39
29
  import '../_helpers/icon__svg.js';
40
- import 'core-js/modules/es.string.starts-with.js';
41
30
  import '../link/clickableLink.js';
42
31
  import '../global/controls-height.js';
43
32
  import '../_helpers/button__classes.js';
44
33
  import '../global/get-uid.js';
45
- import 'core-js/modules/es.regexp.to-string.js';
46
34
  import '../i18n/i18n-context.js';
47
35
  import '../i18n/i18n.js';
48
- import 'core-js/modules/es.set.js';
49
36
  import '../global/composeRefs.js';
50
- import 'core-js/modules/web.dom-collections.for-each.js';
51
37
  import 'memoize-one';
52
38
  import '../control-label/control-label.js';
53
39
  import '../control-help/control-help.js';
@@ -65,12 +51,8 @@ import 'date-fns/addDays';
65
51
  import 'date-fns/format';
66
52
  import 'date-fns/setDay';
67
53
  import './day.js';
68
- import 'core-js/modules/es.array.includes.js';
69
- import 'core-js/modules/es.string.includes.js';
70
54
  import 'date-fns/getDate';
71
55
  import 'date-fns/isToday';
72
- import 'core-js/modules/es.array.index-of.js';
73
- import 'core-js/modules/es.array.slice.js';
74
56
  import 'date-fns/add';
75
57
  import './month-names.js';
76
58
  import 'date-fns/isThisMonth';
@@ -84,110 +66,98 @@ import 'date-fns/isSameYear';
84
66
  import 'date-fns/isThisYear';
85
67
  import 'date-fns/setYear';
86
68
 
87
- var _excluded = ["from", "to", "date", "time"];
88
- var scrollExpDelay = 10;
89
- var DatePopup = /*#__PURE__*/function (_Component) {
90
- function DatePopup(props) {
91
- var _this;
92
- _classCallCheck(this, DatePopup);
93
- _this = _callSuper(this, DatePopup, [props]);
94
- _defineProperty(_this, "_scrollDate", void 0);
95
- _defineProperty(_this, "_scrollTS", void 0);
96
- _defineProperty(_this, "isInTimeMode", function () {
97
- return !_this.props.range && _this.props.withTime || false;
98
- });
99
- _defineProperty(_this, "componentRef", /*#__PURE__*/React.createRef());
100
- _defineProperty(_this, "handleWheel", function (e) {
69
+ const _excluded = ["from", "to", "date", "time"];
70
+ const scrollExpDelay = 10;
71
+ class DatePopup extends Component {
72
+ static sameDay(next, prev) {
73
+ if (next && prev) {
74
+ return isSameDay(next, prev);
75
+ }
76
+ return next === prev;
77
+ }
78
+ constructor(props) {
79
+ super(props);
80
+ _defineProperty(this, "_scrollDate", void 0);
81
+ _defineProperty(this, "_scrollTS", void 0);
82
+ _defineProperty(this, "isInTimeMode", () => !this.props.range && this.props.withTime || false);
83
+ _defineProperty(this, "componentRef", /*#__PURE__*/React.createRef());
84
+ _defineProperty(this, "handleWheel", e => {
101
85
  if (e.cancelable) {
102
86
  e.preventDefault();
103
87
  }
104
88
  });
105
- _defineProperty(_this, "isValidDate", function (parsedText) {
106
- var minDate = _this.parse(_this.props.minDate, 'date');
107
- var maxDate = _this.parse(_this.props.maxDate, 'date');
89
+ _defineProperty(this, "isValidDate", parsedText => {
90
+ const minDate = this.parse(this.props.minDate, 'date');
91
+ const maxDate = this.parse(this.props.maxDate, 'date');
108
92
  if (parsedText) {
109
93
  return !(minDate && isBefore(parsedText, minDate) || maxDate && isAfter(parsedText, maxDate));
110
94
  }
111
95
  return false;
112
96
  });
113
- _defineProperty(_this, "scheduleScroll", function () {
114
- var current = _this.state.scrollDate && _this.parse(_this.state.scrollDate, 'date') || _this.parse(_this.props[_this.state.active], 'date') || new Date();
115
- var goal = _this._scrollDate;
97
+ _defineProperty(this, "scheduleScroll", () => {
98
+ const current = this.state.scrollDate && this.parse(this.state.scrollDate, 'date') || this.parse(this.props[this.state.active], 'date') || new Date();
99
+ const goal = this._scrollDate;
116
100
  if (!current || !goal || DatePopup.sameDay(goal, current)) {
117
- _this._scrollDate = null;
118
- _this._scrollTS = null;
101
+ this._scrollDate = null;
102
+ this._scrollTS = null;
119
103
  return;
120
104
  }
121
- if (_this._scrollTS) {
122
- var diff = goal - Number(current);
123
- var dt = Date.now() - _this._scrollTS;
124
- var next = goal - diff * Math.pow(Math.E, -dt / scrollExpDelay);
125
- _this.setState({
105
+ if (this._scrollTS) {
106
+ const diff = goal - Number(current);
107
+ const dt = Date.now() - this._scrollTS;
108
+ const next = goal - diff * Math.E ** (-dt / scrollExpDelay);
109
+ this.setState({
126
110
  scrollDate: next
127
111
  });
128
112
  }
129
- _this._scrollTS = Date.now();
130
- window.requestAnimationFrame(_this.scheduleScroll);
113
+ this._scrollTS = Date.now();
114
+ window.requestAnimationFrame(this.scheduleScroll);
131
115
  });
132
- _defineProperty(_this, "scrollTo", function (scrollDate) {
133
- _this._scrollDate = scrollDate;
134
- if (!_this._scrollTS) {
135
- _this.scheduleScroll();
116
+ _defineProperty(this, "scrollTo", scrollDate => {
117
+ this._scrollDate = scrollDate;
118
+ if (!this._scrollTS) {
119
+ this.scheduleScroll();
136
120
  }
137
121
  });
138
- _defineProperty(_this, "hoverHandler", function (hoverDate) {
139
- return _this.setState({
140
- hoverDate
141
- });
142
- });
143
- _defineProperty(_this, "handleActivate", memoize(function (name) {
144
- return function () {
145
- return _this.setState({
146
- active: name
147
- });
148
- };
122
+ _defineProperty(this, "hoverHandler", hoverDate => this.setState({
123
+ hoverDate
149
124
  }));
150
- _defineProperty(_this, "handleInput", function (text, name) {
125
+ _defineProperty(this, "handleActivate", memoize(name => () => this.setState({
126
+ active: name
127
+ })));
128
+ _defineProperty(this, "handleInput", (text, name) => {
151
129
  if (name !== 'time') {
152
- var parsed = _this.parse(text, name);
153
- if (_this.isValidDate(parsed)) {
154
- _this.scrollTo(Number(parsed));
130
+ const parsed = this.parse(text, name);
131
+ if (this.isValidDate(parsed)) {
132
+ this.scrollTo(Number(parsed));
155
133
  }
156
134
  }
157
- _this.setState({
135
+ this.setState({
158
136
  text,
159
137
  hoverDate: null
160
138
  });
161
139
  });
162
- _defineProperty(_this, "handleConfirm", memoize(function (name) {
163
- return function () {
164
- return _this.confirm(name);
165
- };
166
- }));
167
- _defineProperty(_this, "selectHandler", function (date) {
168
- if (_this.isInTimeMode()) {
169
- _this.setState({
140
+ _defineProperty(this, "handleConfirm", memoize(name => () => this.confirm(name)));
141
+ _defineProperty(this, "selectHandler", date => {
142
+ if (this.isInTimeMode()) {
143
+ this.setState({
170
144
  active: 'time'
171
- }, function () {
172
- return _this.select({
173
- date
174
- });
175
- });
145
+ }, () => this.select({
146
+ date
147
+ }));
176
148
  } else {
177
- _this.select({
178
- [_this.state.active]: date
149
+ this.select({
150
+ [this.state.active]: date
179
151
  });
180
152
  }
181
153
  });
182
- _defineProperty(_this, "handleScroll", function (scrollDate) {
183
- return _this.setState({
184
- scrollDate
185
- });
186
- });
187
- _defineProperty(_this, "onClear", function (e) {
154
+ _defineProperty(this, "handleScroll", scrollDate => this.setState({
155
+ scrollDate
156
+ }));
157
+ _defineProperty(this, "onClear", e => {
188
158
  var _this$props$onClear, _this$props, _this$componentRef$cu;
189
- var changes;
190
- if (_this.props.range) {
159
+ let changes;
160
+ if (this.props.range) {
191
161
  changes = {
192
162
  from: null,
193
163
  to: null
@@ -197,297 +167,257 @@ var DatePopup = /*#__PURE__*/function (_Component) {
197
167
  date: null
198
168
  };
199
169
  }
200
- _this.select(changes);
201
- (_this$props$onClear = (_this$props = _this.props).onClear) === null || _this$props$onClear === void 0 || _this$props$onClear.call(_this$props, e);
202
- (_this$componentRef$cu = _this.componentRef.current) === null || _this$componentRef$cu === void 0 || (_this$componentRef$cu = _this$componentRef$cu.querySelector('input')) === null || _this$componentRef$cu === void 0 || _this$componentRef$cu.focus();
170
+ this.select(changes);
171
+ (_this$props$onClear = (_this$props = this.props).onClear) === null || _this$props$onClear === void 0 || _this$props$onClear.call(_this$props, e);
172
+ (_this$componentRef$cu = this.componentRef.current) === null || _this$componentRef$cu === void 0 || (_this$componentRef$cu = _this$componentRef$cu.querySelector('input')) === null || _this$componentRef$cu === void 0 || _this$componentRef$cu.focus();
203
173
  });
204
- var defaultState = {
174
+ const defaultState = {
205
175
  text: null,
206
176
  hoverDate: null,
207
177
  scrollDate: null
208
178
  };
209
- var range = props.range,
210
- withTime = props.withTime;
179
+ const {
180
+ range,
181
+ withTime
182
+ } = props;
211
183
  if (!range) {
212
- var parsedDate = _this.parse(props.date, 'date');
213
- var active = withTime && parsedDate && !props.time ? 'time' : 'date';
214
- _this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
184
+ const parsedDate = this.parse(props.date, 'date');
185
+ const active = withTime && parsedDate && !props.time ? 'time' : 'date';
186
+ this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
215
187
  active
216
188
  });
217
189
  } else if (props.from && !props.to) {
218
- _this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
190
+ this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
219
191
  active: 'to'
220
192
  });
221
193
  } else {
222
- _this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
194
+ this.state = _objectSpread2(_objectSpread2({}, defaultState), {}, {
223
195
  active: 'from'
224
196
  });
225
197
  }
226
- return _this;
227
198
  }
228
- _inherits(DatePopup, _Component);
229
- return _createClass(DatePopup, [{
230
- key: "componentDidMount",
231
- value: function componentDidMount() {
232
- if (this.componentRef.current) {
233
- this.componentRef.current.addEventListener('wheel', this.handleWheel);
234
- }
199
+ componentDidMount() {
200
+ if (this.componentRef.current) {
201
+ this.componentRef.current.addEventListener('wheel', this.handleWheel);
235
202
  }
236
- }, {
237
- key: "componentDidUpdate",
238
- value: function componentDidUpdate(prevProps, prevState) {
239
- if (this.state.active !== prevState.active) {
240
- if (this.state.text && prevState.active) {
241
- this.confirm(prevState.active);
242
- }
243
- this.setState({
244
- text: null
245
- });
203
+ }
204
+ componentDidUpdate(prevProps, prevState) {
205
+ if (this.state.active !== prevState.active) {
206
+ if (this.state.text && prevState.active) {
207
+ this.confirm(prevState.active);
246
208
  }
209
+ this.setState({
210
+ text: null
211
+ });
247
212
  }
248
- }, {
249
- key: "componentWillUnmount",
250
- value: function componentWillUnmount() {
251
- if (this.componentRef.current) {
252
- this.componentRef.current.removeEventListener('wheel', this.handleWheel);
253
- }
213
+ }
214
+ componentWillUnmount() {
215
+ if (this.componentRef.current) {
216
+ this.componentRef.current.removeEventListener('wheel', this.handleWheel);
254
217
  }
255
- }, {
256
- key: "parse",
257
- value: function parse(text, type) {
258
- if (type === 'time') {
259
- return parseTime(String(text));
260
- }
261
- return this.props.parseDateInput(text);
218
+ }
219
+ parse(text, type) {
220
+ if (type === 'time') {
221
+ return parseTime(String(text));
262
222
  }
263
- }, {
264
- key: "select",
265
- value: function select(changes) {
266
- var _this$props2 = this.props,
267
- range = _this$props2.range,
268
- withTime = _this$props2.withTime;
269
- var prevActive = this.state.active;
270
- if (!range && !withTime) {
271
- this.setState({
272
- text: null,
273
- scrollDate: null
274
- });
275
- var adjustedDate = changes.date && set(new Date(), {
276
- year: changes.date.getFullYear(),
277
- month: changes.date.getMonth(),
278
- date: changes.date.getDate()
279
- });
280
- this.props.onChange(adjustedDate);
223
+ return this.props.parseDateInput(text);
224
+ }
225
+ select(changes) {
226
+ const {
227
+ range,
228
+ withTime
229
+ } = this.props;
230
+ const prevActive = this.state.active;
231
+ if (!range && !withTime) {
232
+ this.setState({
233
+ text: null,
234
+ scrollDate: null
235
+ });
236
+ const adjustedDate = changes.date && set(new Date(), {
237
+ year: changes.date.getFullYear(),
238
+ month: changes.date.getMonth(),
239
+ date: changes.date.getDate()
240
+ });
241
+ this.props.onChange(adjustedDate);
242
+ this.props.onComplete();
243
+ } else if (!range && withTime) {
244
+ const date = this.parse(this.props.date, 'date');
245
+ const time = this.parse(this.props.time, 'time');
246
+ const changeToSubmit = {
247
+ date: changes.date || date,
248
+ time: changes.time || time
249
+ };
250
+ this.setState({
251
+ active: changes.date ? 'time' : 'date',
252
+ text: null,
253
+ scrollDate: null
254
+ });
255
+ this.props.onChange(changeToSubmit);
256
+ if (!changes.date && prevActive === 'time' && changeToSubmit.date && changeToSubmit.time) {
281
257
  this.props.onComplete();
282
- } else if (!range && withTime) {
283
- var date = this.parse(this.props.date, 'date');
284
- var time = this.parse(this.props.time, 'time');
285
- var changeToSubmit = {
286
- date: changes.date || date,
287
- time: changes.time || time
288
- };
289
- this.setState({
290
- active: changes.date ? 'time' : 'date',
291
- text: null,
292
- scrollDate: null
293
- });
294
- this.props.onChange(changeToSubmit);
295
- if (!changes.date && prevActive === 'time' && changeToSubmit.date && changeToSubmit.time) {
296
- this.props.onComplete();
297
- }
298
- } else {
299
- var _this$props$changes = _objectSpread2(_objectSpread2({}, this.props), changes),
300
- from = _this$props$changes.from,
301
- to = _this$props$changes.to;
302
- from = this.parse(from, 'from');
303
- to = this.parse(to, 'to');
304
- // proceed to setting the end by default
305
- var active = 'to';
306
- var complete = false;
307
- // end is before beginning
308
- if (from && to && isAfter(startOfDay(from), startOfDay(to))) {
309
- // ignore the old end when beginning is changed
310
- if (changes.from) {
311
- to = null;
312
- // treat range as reverse when end is changed
313
- } else if (changes.to) {
314
- to = from;
315
- from = changes.to;
316
- }
258
+ }
259
+ } else {
260
+ let {
261
+ from,
262
+ to
263
+ } = _objectSpread2(_objectSpread2({}, this.props), changes);
264
+ from = this.parse(from, 'from');
265
+ to = this.parse(to, 'to');
266
+ // proceed to setting the end by default
267
+ let active = 'to';
268
+ let complete = false;
269
+ // end is before beginning
270
+ if (from && to && isAfter(startOfDay(from), startOfDay(to))) {
271
+ // ignore the old end when beginning is changed
272
+ if (changes.from) {
273
+ to = null;
274
+ // treat range as reverse when end is changed
317
275
  } else if (changes.to) {
318
- active = 'from';
319
- complete = !!from;
320
- }
321
- this.setState({
322
- active,
323
- hoverDate: null,
324
- text: null
325
- });
326
- this.props.onChange({
327
- from,
328
- to
329
- });
330
- if (complete) {
331
- this.props.onComplete();
276
+ to = from;
277
+ from = changes.to;
332
278
  }
279
+ } else if (changes.to) {
280
+ active = 'from';
281
+ complete = !!from;
282
+ }
283
+ this.setState({
284
+ active,
285
+ hoverDate: null,
286
+ text: null
287
+ });
288
+ this.props.onChange({
289
+ from,
290
+ to
291
+ });
292
+ if (complete) {
293
+ this.props.onComplete();
333
294
  }
334
295
  }
335
- }, {
336
- key: "confirm",
337
- value: function confirm(name) {
338
- var text = this.state.text;
339
- var result;
340
- if (name === 'time') {
341
- result = this.parse(text, name);
342
- var time = this.parse('time' in this.props ? this.props.time : '', 'time');
343
- var emptyCase = this.state.active === 'time' ? '00:00' : null;
344
- result = result || time || emptyCase;
345
- } else {
346
- result = this.parse(text, name);
347
- if (!this.isValidDate(result)) {
348
- result = this.parse(name in this.props ? this.props[name] : '', name);
349
- }
296
+ }
297
+ confirm(name) {
298
+ const text = this.state.text;
299
+ let result;
300
+ if (name === 'time') {
301
+ result = this.parse(text, name);
302
+ const time = this.parse('time' in this.props ? this.props.time : '', 'time');
303
+ const emptyCase = this.state.active === 'time' ? '00:00' : null;
304
+ result = result || time || emptyCase;
305
+ } else {
306
+ result = this.parse(text, name);
307
+ if (!this.isValidDate(result)) {
308
+ result = this.parse(name in this.props ? this.props[name] : '', name);
350
309
  }
351
- this.select({
352
- [name]: result
353
- });
354
310
  }
355
- }, {
356
- key: "render",
357
- value: function render() {
358
- var _this2 = this;
359
- var _this$props3 = this.props,
360
- range = _this$props3.range,
361
- withTime = _this$props3.withTime,
362
- locale = _this$props3.locale;
363
- var _this$props4 = this.props;
364
- _this$props4.from;
365
- _this$props4.to;
366
- _this$props4.date;
367
- var time = _this$props4.time,
368
- restProps = _objectWithoutProperties(_this$props4, _excluded);
369
- var parsedDate = this.parse(this.props.date, 'date');
370
- var parsedTo = this.parse(this.props.to, 'to');
371
- var names = range ? ['from', 'to'] : ['date'];
372
- var dates = names.reduce(function (obj, key) {
373
- var value = _this2.props[key];
374
- return _objectSpread2(_objectSpread2({}, obj), {}, {
375
- [key]: _this2.parse(value, key)
376
- });
377
- }, {});
378
- var activeDate = this.state.active !== 'time' ? this.state.hoverDate || (this.state.text != null ? this.parse(this.state.text, 'date') : null) : this.state.hoverDate || null;
379
- var currentRange = range && dates.from && dates.to && [dates.from, dates.to] || null;
380
- var activeRange = null;
381
- if (range && activeDate) {
382
- switch (this.state.active) {
383
- case 'from':
384
- if (dates.to && isAfter(startOfDay(activeDate), startOfDay(dates.to))) {
385
- activeRange = [activeDate, dates.to];
386
- }
387
- break;
388
- case 'to':
389
- if (!dates.from) {
390
- break;
391
- }
392
- if (isBefore(startOfDay(activeDate), startOfDay(dates.from))) {
393
- activeRange = [activeDate, dates.from];
394
- } else {
395
- activeRange = [dates.from, activeDate];
396
- }
311
+ this.select({
312
+ [name]: result
313
+ });
314
+ }
315
+ render() {
316
+ const {
317
+ range,
318
+ withTime,
319
+ locale
320
+ } = this.props;
321
+ const _this$props2 = this.props,
322
+ {
323
+ from,
324
+ to,
325
+ date,
326
+ time
327
+ } = _this$props2,
328
+ restProps = _objectWithoutProperties(_this$props2, _excluded);
329
+ const parsedDate = this.parse(this.props.date, 'date');
330
+ const parsedTo = this.parse(this.props.to, 'to');
331
+ const names = range ? ['from', 'to'] : ['date'];
332
+ const dates = names.reduce((obj, key) => {
333
+ const value = this.props[key];
334
+ return _objectSpread2(_objectSpread2({}, obj), {}, {
335
+ [key]: this.parse(value, key)
336
+ });
337
+ }, {});
338
+ const activeDate = this.state.active !== 'time' ? this.state.hoverDate || (this.state.text != null ? this.parse(this.state.text, 'date') : null) : this.state.hoverDate || null;
339
+ const currentRange = range && dates.from && dates.to && [dates.from, dates.to] || null;
340
+ let activeRange = null;
341
+ if (range && activeDate) {
342
+ switch (this.state.active) {
343
+ case 'from':
344
+ if (dates.to && isAfter(startOfDay(activeDate), startOfDay(dates.to))) {
345
+ activeRange = [activeDate, dates.to];
346
+ }
347
+ break;
348
+ case 'to':
349
+ if (!dates.from) {
397
350
  break;
398
- }
351
+ }
352
+ if (isBefore(startOfDay(activeDate), startOfDay(dates.from))) {
353
+ activeRange = [activeDate, dates.from];
354
+ } else {
355
+ activeRange = [dates.from, activeDate];
356
+ }
357
+ break;
399
358
  }
400
- var scrollDate = withTime && !range ? this.state.scrollDate || dates.date || new Date() : this.state.scrollDate || dates[this.state.active] || new Date();
401
- var calendarProps = _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dates), {}, {
402
- scrollDate,
403
- activeDate,
404
- currentRange,
405
- activeRange,
406
- onScroll: this.handleScroll,
407
- onScrollChange: this.scrollTo
408
- });
409
- var clearable = Boolean(this.props.onClear);
410
- return /*#__PURE__*/jsxs("div", {
411
- className: modules_0c7b7d96.datePopup,
412
- "data-test": "ring-date-popup",
413
- ref: this.componentRef,
414
- children: [/*#__PURE__*/jsxs("div", {
415
- className: modules_0c7b7d96.filterWrapper,
416
- children: [names.map(function (name) {
417
- var onClear;
418
- if (clearable && name !== 'from' && !_this2.isInTimeMode()) {
419
- onClear = _this2.onClear.bind(_this2);
420
- }
421
- return /*#__PURE__*/createElement(DateInput, _objectSpread2(_objectSpread2(_objectSpread2({}, _this2.props), _this2.state), {}, {
422
- divider: name === 'from' && (dates[name] != null || parsedTo != null),
423
- name: name,
424
- key: name,
425
- date: dates[name],
426
- active: _this2.state.active === name,
427
- onActivate: _this2.handleActivate(name),
428
- onInput: _this2.handleInput,
429
- onConfirm: _this2.handleConfirm(name),
430
- onClear: onClear,
431
- locale: locale
432
- }));
433
- }), this.isInTimeMode() ? /*#__PURE__*/createElement(DateInput, _objectSpread2(_objectSpread2({}, this.props), {}, {
434
- text: this.state.text,
435
- divider: !!parsedDate,
436
- hoverDate: null,
437
- name: 'time',
438
- key: 'time',
439
- date: null,
440
- time: time,
441
- active: this.state.active === 'time',
442
- onActivate: this.handleActivate('time'),
359
+ }
360
+ const scrollDate = withTime && !range ? this.state.scrollDate || dates.date || new Date() : this.state.scrollDate || dates[this.state.active] || new Date();
361
+ const calendarProps = _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dates), {}, {
362
+ scrollDate,
363
+ activeDate,
364
+ currentRange,
365
+ activeRange,
366
+ onScroll: this.handleScroll,
367
+ onScrollChange: this.scrollTo
368
+ });
369
+ const clearable = Boolean(this.props.onClear);
370
+ return /*#__PURE__*/jsxs("div", {
371
+ className: modules_0c7b7d96.datePopup,
372
+ "data-test": "ring-date-popup",
373
+ ref: this.componentRef,
374
+ children: [/*#__PURE__*/jsxs("div", {
375
+ className: modules_0c7b7d96.filterWrapper,
376
+ children: [names.map(name => {
377
+ let onClear;
378
+ if (clearable && name !== 'from' && !this.isInTimeMode()) {
379
+ onClear = this.onClear.bind(this);
380
+ }
381
+ return /*#__PURE__*/createElement(DateInput, _objectSpread2(_objectSpread2(_objectSpread2({}, this.props), this.state), {}, {
382
+ divider: name === 'from' && (dates[name] != null || parsedTo != null),
383
+ name: name,
384
+ key: name,
385
+ date: dates[name],
386
+ active: this.state.active === name,
387
+ onActivate: this.handleActivate(name),
443
388
  onInput: this.handleInput,
444
- onConfirm: this.handleConfirm('time'),
445
- onClear: clearable && this.onClear || undefined,
389
+ onConfirm: this.handleConfirm(name),
390
+ onClear: onClear,
446
391
  locale: locale
447
- })) : '']
448
- }), /*#__PURE__*/jsx(Weekdays, {
392
+ }));
393
+ }), this.isInTimeMode() ? /*#__PURE__*/createElement(DateInput, _objectSpread2(_objectSpread2({}, this.props), {}, {
394
+ text: this.state.text,
395
+ divider: !!parsedDate,
396
+ hoverDate: null,
397
+ name: 'time',
398
+ key: 'time',
399
+ date: null,
400
+ time: time,
401
+ active: this.state.active === 'time',
402
+ onActivate: this.handleActivate('time'),
403
+ onInput: this.handleInput,
404
+ onConfirm: this.handleConfirm('time'),
405
+ onClear: clearable && this.onClear || undefined,
449
406
  locale: locale
450
- }), /*#__PURE__*/jsxs("div", {
451
- className: modules_0c7b7d96.calendar,
452
- children: [/*#__PURE__*/jsx(Months, _objectSpread2(_objectSpread2({}, calendarProps), {}, {
453
- onHover: this.hoverHandler,
454
- onSelect: this.selectHandler,
455
- locale: locale
456
- })), /*#__PURE__*/jsx(Years, _objectSpread2({}, calendarProps))]
457
- }), this.props.renderAfterCalendar && this.props.renderAfterCalendar(this.state)]
458
- });
459
- }
460
- }], [{
461
- key: "sameDay",
462
- value: function sameDay(next, prev) {
463
- if (next && prev) {
464
- return isSameDay(next, prev);
465
- }
466
- return next === prev;
467
- }
468
- }]);
469
- }(Component);
470
- _defineProperty(DatePopup, "propTypes", {
471
- className: PropTypes.string,
472
- date: dateType,
473
- range: PropTypes.bool,
474
- withTime: PropTypes.bool,
475
- time: PropTypes.string,
476
- from: dateType,
477
- to: dateType,
478
- renderAfterCalendar: PropTypes.func,
479
- displayFormat: PropTypes.func,
480
- parseDateInput: PropTypes.func,
481
- onChange: PropTypes.func,
482
- onComplete: PropTypes.func,
483
- onClear: PropTypes.func,
484
- minDate: dateType,
485
- maxDate: dateType,
486
- fromPlaceholder: PropTypes.string,
487
- toPlaceholder: PropTypes.string,
488
- timePlaceholder: PropTypes.string,
489
- locale: PropTypes.object
490
- });
407
+ })) : '']
408
+ }), /*#__PURE__*/jsx(Weekdays, {
409
+ locale: locale
410
+ }), /*#__PURE__*/jsxs("div", {
411
+ className: modules_0c7b7d96.calendar,
412
+ children: [/*#__PURE__*/jsx(Months, _objectSpread2(_objectSpread2({}, calendarProps), {}, {
413
+ onHover: this.hoverHandler,
414
+ onSelect: this.selectHandler,
415
+ locale: locale
416
+ })), /*#__PURE__*/jsx(Years, _objectSpread2({}, calendarProps))]
417
+ }), this.props.renderAfterCalendar && this.props.renderAfterCalendar(this.state)]
418
+ });
419
+ }
420
+ }
491
421
  _defineProperty(DatePopup, "defaultProps", {
492
422
  onChange() {}
493
423
  });