@jetbrains/ring-ui-built 6.1.1-beta.0 → 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 (351) 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/table.js +1 -1
  16. package/components/_helpers/theme.js +61 -51
  17. package/components/_helpers/title.js +59 -84
  18. package/components/alert/alert.d.ts +7 -24
  19. package/components/alert/alert.js +111 -179
  20. package/components/alert/container.d.ts +0 -5
  21. package/components/alert/container.js +32 -44
  22. package/components/alert-service/alert-service.js +104 -162
  23. package/components/analytics/analytics.js +12 -20
  24. package/components/analytics/analytics__custom-plugin.js +52 -68
  25. package/components/auth/auth.js +2 -31
  26. package/components/auth/auth__core.d.ts +1 -1
  27. package/components/auth/auth__core.js +754 -1440
  28. package/components/auth/background-flow.js +84 -121
  29. package/components/auth/down-notification.js +32 -79
  30. package/components/auth/iframe-flow.js +71 -125
  31. package/components/auth/request-builder.js +46 -77
  32. package/components/auth/response-parser.js +84 -112
  33. package/components/auth/storage.js +162 -324
  34. package/components/auth/token-validator.js +132 -227
  35. package/components/auth/window-flow.js +84 -121
  36. package/components/auth-dialog/auth-dialog.d.ts +0 -18
  37. package/components/auth-dialog/auth-dialog.js +107 -176
  38. package/components/auth-dialog-service/auth-dialog-service.js +12 -33
  39. package/components/avatar/avatar-example-datauri.js +1 -1
  40. package/components/avatar/avatar.d.ts +0 -13
  41. package/components/avatar/avatar.js +94 -136
  42. package/components/avatar/fallback-avatar.d.ts +1 -10
  43. package/components/avatar/fallback-avatar.js +20 -40
  44. package/components/badge/badge.d.ts +0 -10
  45. package/components/badge/badge.js +32 -48
  46. package/components/breadcrumbs/breadcrumbs.js +13 -17
  47. package/components/button/button.d.ts +0 -21
  48. package/components/button/button.js +68 -104
  49. package/components/button/button__classes.d.ts +1 -1
  50. package/components/button-group/button-group.d.ts +0 -5
  51. package/components/button-group/button-group.js +27 -41
  52. package/components/button-group/caption.d.ts +0 -4
  53. package/components/button-group/caption.js +0 -1
  54. package/components/button-set/button-set.d.ts +0 -6
  55. package/components/button-set/button-set.js +19 -33
  56. package/components/button-toolbar/button-toolbar.d.ts +0 -6
  57. package/components/button-toolbar/button-toolbar.js +17 -31
  58. package/components/caret/caret.js +184 -211
  59. package/components/checkbox/checkbox.d.ts +0 -19
  60. package/components/checkbox/checkbox.js +69 -104
  61. package/components/clipboard/clipboard-fallback.js +7 -7
  62. package/components/clipboard/clipboard.js +36 -129
  63. package/components/code/code.d.ts +0 -12
  64. package/components/code/code.js +83 -163
  65. package/components/collapse/collapse-content.js +42 -60
  66. package/components/collapse/collapse-context.js +2 -2
  67. package/components/collapse/collapse-control.js +12 -12
  68. package/components/collapse/collapse.js +12 -17
  69. package/components/collapse/consts.js +4 -4
  70. package/components/collapse/utils.js +1 -3
  71. package/components/confirm/confirm.d.ts +0 -14
  72. package/components/confirm/confirm.js +68 -112
  73. package/components/confirm-service/confirm-service.js +25 -47
  74. package/components/content-layout/content-layout.d.ts +0 -7
  75. package/components/content-layout/content-layout.js +41 -63
  76. package/components/content-layout/sidebar.d.ts +0 -9
  77. package/components/content-layout/sidebar.js +1 -2
  78. package/components/contenteditable/contenteditable.d.ts +1 -22
  79. package/components/contenteditable/contenteditable.js +37 -60
  80. package/components/control-help/control-help.js +5 -3
  81. package/components/control-label/control-label.js +9 -14
  82. package/components/data-list/data-list.d.ts +4 -6
  83. package/components/data-list/data-list.js +115 -179
  84. package/components/data-list/data-list.mock.js +3 -6
  85. package/components/data-list/item.js +119 -165
  86. package/components/data-list/selection.js +77 -135
  87. package/components/data-list/title.d.ts +2 -2
  88. package/components/data-list/title.js +2 -12
  89. package/components/date-picker/consts.d.ts +0 -2
  90. package/components/date-picker/consts.js +16 -24
  91. package/components/date-picker/date-input.d.ts +0 -20
  92. package/components/date-picker/date-input.js +100 -148
  93. package/components/date-picker/date-picker.d.ts +0 -29
  94. package/components/date-picker/date-picker.js +143 -224
  95. package/components/date-picker/date-popup.d.ts +0 -22
  96. package/components/date-picker/date-popup.js +282 -352
  97. package/components/date-picker/day.d.ts +0 -14
  98. package/components/date-picker/day.js +72 -109
  99. package/components/date-picker/month-names.d.ts +1 -11
  100. package/components/date-picker/month-names.js +42 -72
  101. package/components/date-picker/month-slider.d.ts +0 -9
  102. package/components/date-picker/month-slider.js +43 -71
  103. package/components/date-picker/month.d.ts +1 -9
  104. package/components/date-picker/month.js +18 -30
  105. package/components/date-picker/months.d.ts +1 -9
  106. package/components/date-picker/months.js +45 -55
  107. package/components/date-picker/weekdays.d.ts +2 -8
  108. package/components/date-picker/weekdays.js +12 -25
  109. package/components/date-picker/years.d.ts +0 -6
  110. package/components/date-picker/years.js +77 -104
  111. package/components/dialog/dialog.d.ts +0 -20
  112. package/components/dialog/dialog.js +153 -210
  113. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  114. package/components/dropdown/anchor.d.ts +1 -8
  115. package/components/dropdown/anchor.js +0 -7
  116. package/components/dropdown/dropdown.d.ts +4 -22
  117. package/components/dropdown/dropdown.js +134 -176
  118. package/components/dropdown-menu/dropdown-menu.js +51 -103
  119. package/components/editable-heading/editable-heading.js +69 -118
  120. package/components/error-bubble/error-bubble.d.ts +0 -6
  121. package/components/error-bubble/error-bubble.js +30 -60
  122. package/components/error-message/error-message.d.ts +0 -10
  123. package/components/error-message/error-message.js +34 -59
  124. package/components/footer/footer.js +28 -44
  125. package/components/form/form.js +1 -1
  126. package/components/global/compose.js +1 -8
  127. package/components/global/composeRefs.d.ts +0 -3
  128. package/components/global/composeRefs.js +8 -15
  129. package/components/global/controls-height.js +2 -2
  130. package/components/global/create-stateful-context.d.ts +0 -4
  131. package/components/global/create-stateful-context.js +14 -17
  132. package/components/global/data-tests.js +7 -12
  133. package/components/global/dom.js +49 -82
  134. package/components/global/focus-sensor-hoc.js +95 -122
  135. package/components/global/fuzzy-highlight.js +23 -34
  136. package/components/global/get-event-key.js +8 -8
  137. package/components/global/get-uid.js +3 -7
  138. package/components/global/inject-styles.js +7 -14
  139. package/components/global/listeners.js +28 -47
  140. package/components/global/memoize.js +6 -10
  141. package/components/global/normalize-indent.js +19 -46
  142. package/components/global/promise-with-timeout.js +6 -8
  143. package/components/global/react-dom-renderer.d.ts +0 -5
  144. package/components/global/react-dom-renderer.js +29 -45
  145. package/components/global/rerender-hoc.d.ts +2 -2
  146. package/components/global/rerender-hoc.js +16 -32
  147. package/components/global/schedule-raf.js +4 -4
  148. package/components/global/sniffer.js +1 -1
  149. package/components/global/theme.d.ts +8 -2
  150. package/components/global/theme.js +2 -20
  151. package/components/global/trivial-template-tag.js +4 -9
  152. package/components/global/typescript-utils.js +2 -6
  153. package/components/global/url.js +20 -23
  154. package/components/global/use-event-callback.js +7 -4
  155. package/components/grid/col.d.ts +0 -14
  156. package/components/grid/col.js +27 -53
  157. package/components/grid/grid.d.ts +0 -5
  158. package/components/grid/grid.js +20 -32
  159. package/components/grid/row.d.ts +0 -18
  160. package/components/grid/row.js +23 -47
  161. package/components/group/group.d.ts +0 -5
  162. package/components/group/group.js +18 -27
  163. package/components/header/header-icon.d.ts +10 -0
  164. package/components/header/header-icon.js +39 -0
  165. package/components/header/header.d.ts +3 -7
  166. package/components/header/header.js +32 -74
  167. package/components/header/links.d.ts +2 -0
  168. package/components/header/links.js +20 -0
  169. package/components/header/logo.d.ts +0 -4
  170. package/components/header/logo.js +15 -30
  171. package/components/header/profile.d.ts +1 -39
  172. package/components/header/profile.js +126 -190
  173. package/components/header/services-link.d.ts +0 -10
  174. package/components/header/services-link.js +1 -4
  175. package/components/header/services.d.ts +0 -14
  176. package/components/header/services.js +67 -112
  177. package/components/header/smart-profile.d.ts +0 -9
  178. package/components/header/smart-profile.js +116 -205
  179. package/components/header/smart-services.d.ts +0 -4
  180. package/components/header/smart-services.js +73 -142
  181. package/components/header/tray.d.ts +0 -5
  182. package/components/header/tray.js +21 -35
  183. package/components/heading/heading.d.ts +1 -4
  184. package/components/heading/heading.js +25 -42
  185. package/components/http/http.js +162 -319
  186. package/components/http/http.mock.js +50 -98
  187. package/components/hub-source/hub-source.js +77 -182
  188. package/components/hub-source/hub-source__user.js +9 -37
  189. package/components/hub-source/hub-source__users-groups.js +34 -60
  190. package/components/i18n/i18n-context.js +7 -8
  191. package/components/i18n/i18n.js +3 -6
  192. package/components/icon/icon.d.ts +0 -11
  193. package/components/icon/icon.js +60 -85
  194. package/components/icon/icon__svg.d.ts +0 -8
  195. package/components/icon/icon__svg.js +0 -6
  196. package/components/icon/index.js +0 -6
  197. package/components/input/input-legacy.js +1 -1
  198. package/components/input/input.js +2 -14
  199. package/components/input-size/input-size.js +1 -1
  200. package/components/island/adaptive-island-hoc.d.ts +4 -5
  201. package/components/island/adaptive-island-hoc.js +30 -39
  202. package/components/island/content.d.ts +0 -10
  203. package/components/island/content.js +99 -119
  204. package/components/island/header.js +55 -73
  205. package/components/island/island.d.ts +4 -13
  206. package/components/island/island.js +25 -41
  207. package/components/island-legacy/content-legacy.d.ts +0 -5
  208. package/components/island-legacy/content-legacy.js +16 -27
  209. package/components/island-legacy/header-legacy.d.ts +0 -5
  210. package/components/island-legacy/header-legacy.js +19 -30
  211. package/components/island-legacy/island-legacy.d.ts +0 -5
  212. package/components/island-legacy/island-legacy.js +16 -27
  213. package/components/link/clickableLink.d.ts +0 -9
  214. package/components/link/clickableLink.js +33 -51
  215. package/components/link/link.d.ts +8 -33
  216. package/components/link/link.js +47 -68
  217. package/components/list/consts.js +2 -2
  218. package/components/list/list.d.ts +0 -32
  219. package/components/list/list.js +399 -516
  220. package/components/list/list__custom.js +51 -78
  221. package/components/list/list__hint.d.ts +0 -4
  222. package/components/list/list__hint.js +8 -21
  223. package/components/list/list__item.js +147 -211
  224. package/components/list/list__link.js +39 -59
  225. package/components/list/list__separator.js +15 -30
  226. package/components/list/list__title.js +25 -41
  227. package/components/list/list__users-groups-source.js +55 -123
  228. package/components/loader/loader.d.ts +0 -10
  229. package/components/loader/loader.js +38 -70
  230. package/components/loader/loader__core.js +123 -184
  231. package/components/loader-inline/loader-inline.d.ts +0 -6
  232. package/components/loader-inline/loader-inline.js +24 -38
  233. package/components/loader-screen/loader-screen.d.ts +0 -6
  234. package/components/loader-screen/loader-screen.js +24 -46
  235. package/components/login-dialog/login-dialog.d.ts +0 -11
  236. package/components/login-dialog/login-dialog.js +94 -145
  237. package/components/login-dialog/service.js +11 -33
  238. package/components/markdown/markdown.js +16 -29
  239. package/components/message/message.js +171 -218
  240. package/components/old-browsers-message/old-browsers-message.js +11 -14
  241. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  242. package/components/old-browsers-message/white-list.js +8 -13
  243. package/components/pager/pager.d.ts +1 -0
  244. package/components/pager/pager.js +211 -275
  245. package/components/panel/panel.d.ts +0 -5
  246. package/components/panel/panel.js +16 -27
  247. package/components/permissions/permissions.js +118 -161
  248. package/components/permissions/permissions__cache.js +191 -218
  249. package/components/popup/popup.consts.js +1 -1
  250. package/components/popup/popup.js +237 -329
  251. package/components/popup/popup.target.js +9 -12
  252. package/components/popup/position.js +94 -101
  253. package/components/popup-menu/popup-menu.js +31 -76
  254. package/components/progress-bar/progress-bar.d.ts +19 -33
  255. package/components/progress-bar/progress-bar.js +55 -99
  256. package/components/query-assist/query-assist.d.ts +63 -93
  257. package/components/query-assist/query-assist.js +585 -748
  258. package/components/query-assist/query-assist__suggestions.js +2 -28
  259. package/components/radio/radio.d.ts +0 -8
  260. package/components/radio/radio.js +15 -35
  261. package/components/radio/radio__item.d.ts +0 -9
  262. package/components/radio/radio__item.js +52 -72
  263. package/components/scrollable-section/scrollable-section.d.ts +2 -0
  264. package/components/scrollable-section/scrollable-section.js +53 -0
  265. package/components/select/select.d.ts +3 -0
  266. package/components/select/select.js +714 -863
  267. package/components/select/select__filter.js +2 -29
  268. package/components/select/select__popup.js +317 -465
  269. package/components/shortcuts/core.js +147 -195
  270. package/components/shortcuts/shortcut-title.js +6 -10
  271. package/components/shortcuts/shortcuts-hoc.d.ts +4 -9
  272. package/components/shortcuts/shortcuts-hoc.js +23 -46
  273. package/components/shortcuts/shortcuts.d.ts +0 -8
  274. package/components/shortcuts/shortcuts.js +41 -72
  275. package/components/slider/slider.js +93 -113
  276. package/components/slider/slider.utils.js +16 -23
  277. package/components/storage/storage.d.ts +2 -3
  278. package/components/storage/storage.js +2 -46
  279. package/components/storage/storage__local.js +89 -148
  280. package/components/style.css +1 -1
  281. package/components/tab-trap/tab-trap.js +35 -61
  282. package/components/table/cell.d.ts +0 -6
  283. package/components/table/cell.js +11 -27
  284. package/components/table/disable-hover-hoc.d.ts +4 -5
  285. package/components/table/disable-hover-hoc.js +27 -42
  286. package/components/table/header-cell.d.ts +0 -10
  287. package/components/table/header-cell.js +59 -85
  288. package/components/table/header.d.ts +1 -23
  289. package/components/table/header.js +89 -126
  290. package/components/table/multitable.d.ts +0 -4
  291. package/components/table/multitable.js +83 -93
  292. package/components/table/row-with-focus-sensor.d.ts +2 -2
  293. package/components/table/row-with-focus-sensor.js +26 -60
  294. package/components/table/row.js +170 -235
  295. package/components/table/selection-adapter.js +2 -2
  296. package/components/table/selection-shortcuts-hoc.js +102 -126
  297. package/components/table/selection.js +150 -217
  298. package/components/table/simple-table.d.ts +17 -0
  299. package/components/table/simple-table.js +83 -0
  300. package/components/table/smart-table.d.ts +0 -46
  301. package/components/table/smart-table.js +41 -83
  302. package/components/table/table.d.ts +9 -6
  303. package/components/table/table.js +270 -372
  304. package/components/tabs/collapsible-more.d.ts +1 -9
  305. package/components/tabs/collapsible-more.js +47 -97
  306. package/components/tabs/collapsible-tab.js +32 -44
  307. package/components/tabs/collapsible-tabs.d.ts +2 -29
  308. package/components/tabs/collapsible-tabs.js +89 -161
  309. package/components/tabs/custom-item.d.ts +1 -7
  310. package/components/tabs/custom-item.js +4 -7
  311. package/components/tabs/dumb-tabs.d.ts +0 -11
  312. package/components/tabs/dumb-tabs.js +60 -104
  313. package/components/tabs/smart-tabs.d.ts +0 -6
  314. package/components/tabs/smart-tabs.js +29 -68
  315. package/components/tabs/tab-link.d.ts +0 -8
  316. package/components/tabs/tab-link.js +1 -4
  317. package/components/tabs/tab.d.ts +0 -8
  318. package/components/tabs/tab.js +14 -32
  319. package/components/tabs/tabs.js +1 -28
  320. package/components/tag/tag.d.ts +0 -19
  321. package/components/tag/tag.js +120 -179
  322. package/components/tags-input/tags-input.d.ts +7 -33
  323. package/components/tags-input/tags-input.js +224 -339
  324. package/components/tags-list/tags-list.d.ts +0 -13
  325. package/components/tags-list/tags-list.js +45 -74
  326. package/components/text/text.d.ts +0 -7
  327. package/components/text/text.js +27 -43
  328. package/components/toggle/toggle.d.ts +0 -15
  329. package/components/toggle/toggle.js +53 -78
  330. package/components/tooltip/tooltip.d.ts +4 -10
  331. package/components/tooltip/tooltip.js +105 -137
  332. package/components/user-agreement/service.d.ts +2 -1
  333. package/components/user-agreement/service.js +260 -405
  334. package/components/user-agreement/user-agreement.d.ts +0 -18
  335. package/components/user-agreement/user-agreement.js +92 -138
  336. package/components/user-card/card.d.ts +0 -35
  337. package/components/user-card/card.js +2 -27
  338. package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
  339. package/components/user-card/smart-user-card-tooltip.js +52 -108
  340. package/components/user-card/tooltip.d.ts +0 -9
  341. package/components/user-card/tooltip.js +35 -74
  342. package/components/user-card/user-card.js +1 -26
  343. package/package.json +5 -7
  344. package/components/global/prop-types.d.ts +0 -4
  345. package/components/global/prop-types.js +0 -9
  346. package/components/global/react-render-adapter.d.ts +0 -1
  347. package/components/global/react-render-adapter.js +0 -6
  348. package/components/header/tray-icon.d.ts +0 -32
  349. package/components/header/tray-icon.js +0 -56
  350. package/components/storage/storage__fallback.d.ts +0 -79
  351. package/components/storage/storage__fallback.js +0 -253
@@ -1,10 +1,6 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
3
- import 'core-js/modules/es.array.find.js';
4
- import 'core-js/modules/es.array.map.js';
5
- import 'core-js/modules/es.object.to-string.js';
1
+ import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
6
3
  import { PureComponent } from 'react';
7
- import PropTypes from 'prop-types';
8
4
  import classNames from 'classnames';
9
5
  import chevronLeftIcon from '@jetbrains/icons/chevron-left';
10
6
  import chevronRightIcon from '@jetbrains/icons/chevron-right';
@@ -18,57 +14,36 @@ import Icon from '../icon/icon.js';
18
14
  import { I18nContext } from '../i18n/i18n-context.js';
19
15
  import { jsx, jsxs } from 'react/jsx-runtime';
20
16
  import '@jetbrains/icons/chevron-down';
17
+ import 'util-deprecate';
21
18
  import '../link/clickableLink.js';
22
19
  import '../global/controls-height.js';
23
20
  import '../_helpers/button__classes.js';
24
21
  import '../icon/icon__constants.js';
25
- import 'util-deprecate';
26
22
  import '../_helpers/icon__svg.js';
27
23
  import 'core-js/modules/es.regexp.exec.js';
28
24
  import 'core-js/modules/es.string.replace.js';
29
- import 'core-js/modules/es.string.starts-with.js';
30
- import 'core-js/modules/es.array.iterator.js';
31
- import 'core-js/modules/es.map.js';
32
- import 'core-js/modules/es.weak-map.js';
33
- import 'core-js/modules/web.dom-collections.iterator.js';
34
- import 'core-js/modules/es.string.split.js';
35
25
  import '../global/data-tests.js';
36
26
  import 'core-js/modules/es.array.reduce.js';
37
- import 'core-js/modules/es.object.entries.js';
38
27
  import '../control-label/control-label.js';
39
28
  import '../control-help/control-help.js';
40
29
  import '../_helpers/caption.js';
41
- import 'core-js/modules/es.array.filter.js';
42
- import 'core-js/modules/es.array.index-of.js';
43
- import 'core-js/modules/es.array.slice.js';
44
- import 'core-js/modules/es.object.assign.js';
45
- import 'core-js/modules/es.object.values.js';
46
30
  import 'core-js/modules/es.string.trim.js';
47
- import 'core-js/modules/web.dom-collections.for-each.js';
48
31
  import '@jetbrains/icons/close-12px';
49
- import 'deep-equal';
32
+ import 'dequal';
50
33
  import '../dropdown/dropdown.js';
51
34
  import '../global/typescript-utils.js';
52
35
  import '../_helpers/anchor.js';
53
36
  import '@jetbrains/icons/chevron-10px';
54
37
  import '../avatar/avatar.js';
55
38
  import '../global/url.js';
56
- import 'core-js/modules/es.string.match.js';
57
39
  import '../global/dom.js';
58
- import 'core-js/modules/es.set.js';
59
40
  import '../avatar/fallback-avatar.js';
60
- import 'core-js/modules/es.array.from.js';
61
41
  import '../global/get-uid.js';
62
- import 'core-js/modules/es.regexp.to-string.js';
63
42
  import '../popup/popup.js';
64
43
  import 'react-dom';
65
44
  import '../global/schedule-raf.js';
66
45
  import '../shortcuts/shortcuts.js';
67
46
  import '../shortcuts/core.js';
68
- import 'core-js/modules/es.array.find-index.js';
69
- import 'core-js/modules/es.array.includes.js';
70
- import 'core-js/modules/es.array.splice.js';
71
- import 'core-js/modules/es.string.includes.js';
72
47
  import 'combokeys';
73
48
  import '../global/sniffer.js';
74
49
  import 'sniffr';
@@ -78,7 +53,6 @@ import 'core-js/modules/es.array.sort.js';
78
53
  import '../popup/popup.consts.js';
79
54
  import '../popup/popup.target.js';
80
55
  import '../list/list.js';
81
- import 'core-js/modules/es.symbol.js';
82
56
  import 'core-js/modules/es.symbol.description.js';
83
57
  import 'react-virtualized/dist/es/List';
84
58
  import 'react-virtualized/dist/es/AutoSizer';
@@ -93,7 +67,6 @@ import '../list/list__item.js';
93
67
  import '../checkbox/checkbox.js';
94
68
  import '@jetbrains/icons/checkmark-12px';
95
69
  import '@jetbrains/icons/remove-12px';
96
- import '../global/prop-types.js';
97
70
  import '../global/composeRefs.js';
98
71
  import '../list/list__custom.js';
99
72
  import '../global/get-event-key.js';
@@ -115,260 +88,241 @@ import '../text/text.js';
115
88
  import '../_helpers/select__filter.js';
116
89
  import '../i18n/i18n.js';
117
90
 
118
- var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65"};
91
+ var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65","actions":"actions_rui_ad65","pageSize":"pageSize_rui_ad65"};
119
92
 
120
- var Pager = /*#__PURE__*/function (_PureComponent) {
121
- function Pager() {
122
- var _this;
123
- _classCallCheck(this, Pager);
124
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
125
- args[_key] = arguments[_key];
126
- }
127
- _this = _callSuper(this, Pager, [].concat(args));
128
- _defineProperty(_this, "handlePageSizeChange", function (item) {
93
+ class Pager extends PureComponent {
94
+ constructor() {
95
+ super(...arguments);
96
+ _defineProperty(this, "handlePageSizeChange", item => {
129
97
  if (item != null) {
130
- _this.props.onPageSizeChange(item.key);
98
+ this.props.onPageSizeChange(item.key);
131
99
  }
132
100
  });
133
- _defineProperty(_this, "handlePrevClick", function () {
134
- var currentPage = _this.props.currentPage;
101
+ _defineProperty(this, "handlePrevClick", () => {
102
+ const {
103
+ currentPage
104
+ } = this.props;
135
105
  if (currentPage !== 1) {
136
106
  var _this$props$onPageCha, _this$props;
137
- var prevPage = currentPage - 1;
138
- (_this$props$onPageCha = (_this$props = _this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
107
+ const prevPage = currentPage - 1;
108
+ (_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
139
109
  }
140
110
  });
141
- _defineProperty(_this, "handleNextClick", function () {
142
- var _this$props2 = _this.props,
143
- currentPage = _this$props2.currentPage,
144
- onLoadPage = _this$props2.onLoadPage;
145
- var nextPage = currentPage + 1;
146
- var total = _this.getTotalPages();
111
+ _defineProperty(this, "handleNextClick", () => {
112
+ const {
113
+ currentPage,
114
+ onLoadPage
115
+ } = this.props;
116
+ const nextPage = currentPage + 1;
117
+ const total = this.getTotalPages();
147
118
  if (currentPage !== total) {
148
- var _this$props$onPageCha2, _this$props3;
149
- (_this$props$onPageCha2 = (_this$props3 = _this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props3, nextPage);
150
- } else if (_this.props.openTotal) {
119
+ var _this$props$onPageCha2, _this$props2;
120
+ (_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props2, nextPage);
121
+ } else if (this.props.openTotal) {
151
122
  onLoadPage(nextPage);
152
123
  }
153
124
  });
154
- _defineProperty(_this, "handlePageChange", memoize(function (i) {
155
- return function (event) {
156
- var _this$props$onPageCha3, _this$props4;
157
- (_this$props$onPageCha3 = (_this$props4 = _this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props4, i, event);
158
- };
125
+ _defineProperty(this, "handlePageChange", memoize(i => event => {
126
+ var _this$props$onPageCha3, _this$props3;
127
+ (_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props3, i, event);
159
128
  }));
160
- _defineProperty(_this, "handleLoadMore", memoize(function (i) {
161
- return function () {
162
- _this.props.onLoadPage(i);
163
- };
129
+ _defineProperty(this, "handleLoadMore", memoize(i => () => {
130
+ this.props.onLoadPage(i);
164
131
  }));
165
- return _this;
166
132
  }
167
- _inherits(Pager, _PureComponent);
168
- return _createClass(Pager, [{
169
- key: "getSelectOptions",
170
- value: function getSelectOptions() {
171
- var _this2 = this;
172
- var _this$props5 = this.props,
173
- pageSize = _this$props5.pageSize,
174
- pageSizes = _this$props5.pageSizes;
175
- var translate = this.context.translate;
176
- var data = pageSizes.map(function (size) {
177
- var _this2$props$translat, _this2$props$translat2;
178
- return {
179
- key: size,
180
- label: "".concat(size, " ").concat((_this2$props$translat = (_this2$props$translat2 = _this2.props.translations) === null || _this2$props$translat2 === void 0 ? void 0 : _this2$props$translat2.perPage) !== null && _this2$props$translat !== void 0 ? _this2$props$translat : translate('perPage'))
181
- };
182
- });
183
- var selected = data.find(function (it) {
184
- return it.key === pageSize;
185
- });
133
+ getSelectOptions() {
134
+ const {
135
+ pageSize,
136
+ pageSizes
137
+ } = this.props;
138
+ const {
139
+ translate
140
+ } = this.context;
141
+ const data = pageSizes.map(size => {
142
+ var _this$props$translati, _this$props$translati2;
186
143
  return {
187
- selected,
188
- data
144
+ key: size,
145
+ label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.perPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('perPage'))
146
+ };
147
+ });
148
+ const selected = data.find(it => it.key === pageSize);
149
+ return {
150
+ selected,
151
+ data
152
+ };
153
+ }
154
+ getTotalPages() {
155
+ const {
156
+ total,
157
+ pageSize
158
+ } = this.props;
159
+ return Math.ceil(total / pageSize);
160
+ }
161
+ getButton(page, content, key, active) {
162
+ return /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
163
+ href: this.generateHref(page),
164
+ active: active,
165
+ disabled: this.props.loader && !active && !this.props.loaderNavigation,
166
+ loader: this.props.loader && active
167
+ }, this.getClickProps(this.handlePageChange(page))), {}, {
168
+ children: content
169
+ }), key);
170
+ }
171
+ getClickProps(onClick) {
172
+ const {
173
+ hrefFunc,
174
+ onPageChange
175
+ } = this.props;
176
+ if (!onPageChange) {
177
+ return {};
178
+ } else if (hrefFunc) {
179
+ return {
180
+ onPlainLeftClick: onClick
181
+ };
182
+ } else {
183
+ return {
184
+ onClick
189
185
  };
190
186
  }
191
- }, {
192
- key: "getTotalPages",
193
- value: function getTotalPages() {
194
- var _this$props6 = this.props,
195
- total = _this$props6.total,
196
- pageSize = _this$props6.pageSize;
197
- return Math.ceil(total / pageSize);
198
- }
199
- }, {
200
- key: "getButton",
201
- value: function getButton(page, content, key, active) {
202
- return /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
203
- href: this.generateHref(page),
204
- active: active,
205
- disabled: this.props.loader && !active && !this.props.loaderNavigation,
206
- loader: this.props.loader && active
207
- }, this.getClickProps(this.handlePageChange(page))), {}, {
208
- children: content
209
- }), key);
210
- }
211
- }, {
212
- key: "getClickProps",
213
- value: function getClickProps(onClick) {
214
- var _this$props7 = this.props,
215
- hrefFunc = _this$props7.hrefFunc,
216
- onPageChange = _this$props7.onPageChange;
217
- if (!onPageChange) {
218
- return {};
219
- } else if (hrefFunc) {
220
- return {
221
- onPlainLeftClick: onClick
222
- };
223
- } else {
224
- return {
225
- onClick
226
- };
227
- }
228
- }
229
- }, {
230
- key: "getPageSizeSelector",
231
- value: function getPageSizeSelector() {
232
- var selectOptions = this.getSelectOptions();
233
- return !this.props.disablePageSizeSelector && /*#__PURE__*/jsx("div", {
234
- "data-test": "ring-pager-page-size-selector",
235
- style: {
236
- float: 'right'
237
- },
238
- children: /*#__PURE__*/jsx(Select, {
239
- data: selectOptions.data,
240
- selected: selectOptions.selected,
241
- onSelect: this.handlePageSizeChange,
242
- type: Select.Type.INLINE,
243
- disabled: this.props.loader
244
- })
245
- });
246
- }
247
- }, {
248
- key: "getPagerLinks",
249
- value: function getPagerLinks() {
250
- var _this$props$translati, _this$props$translati2, _this$props$translati3, _this$props$translati4;
251
- var translate = this.context.translate;
252
- var prevLinkAvailable = this.props.currentPage !== 1;
253
- var nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
254
- var nextIcon = /*#__PURE__*/jsx(Icon, {
255
- glyph: chevronRightIcon
256
- }, "icon");
257
- var prevIcon = /*#__PURE__*/jsx(Icon, {
258
- glyph: chevronLeftIcon
259
- }, "icon");
260
- var prevText = (_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.previousPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('previousPage');
261
- var nextText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.nextPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('nextPage');
262
- var nextLinkContent = [/*#__PURE__*/jsx("span", {
263
- children: nextText
264
- }, "text"), nextIcon];
265
- var prevLinkContent = [prevIcon, /*#__PURE__*/jsx("span", {
266
- children: prevText
267
- }, "text")];
268
- var prevLinkHref = this.generateHref(this.props.currentPage - 1);
269
- var nextLinkHref = this.generateHref(this.props.currentPage + 1);
270
- var disabledLinkClasses = classNames({
271
- [modules_1a5f0d42.link]: true,
272
- [modules_1a5f0d42.linkDisabled]: true
273
- });
274
- return /*#__PURE__*/jsxs("div", {
275
- className: modules_1a5f0d42.links,
276
- children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
277
- href: prevLinkHref,
278
- className: modules_1a5f0d42.link
279
- }, this.getClickProps(this.handlePrevClick)), {}, {
280
- children: prevLinkContent
281
- })) : /*#__PURE__*/jsxs("span", {
282
- className: disabledLinkClasses,
283
- children: [prevIcon, /*#__PURE__*/jsx("span", {
284
- children: prevText
285
- }, "text")]
286
- }), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
287
- href: nextLinkHref,
288
- className: modules_1a5f0d42.link
289
- }, this.getClickProps(this.handleNextClick)), {}, {
290
- children: nextLinkContent
291
- })) : /*#__PURE__*/jsxs("span", {
292
- className: disabledLinkClasses,
293
- children: [/*#__PURE__*/jsx("span", {
294
- children: nextText
295
- }, "text"), nextIcon]
296
- })]
297
- });
187
+ }
188
+ getPageSizeSelector() {
189
+ const selectOptions = this.getSelectOptions();
190
+ return !this.props.disablePageSizeSelector && /*#__PURE__*/jsx("div", {
191
+ "data-test": "ring-pager-page-size-selector",
192
+ className: modules_1a5f0d42.pageSize,
193
+ children: /*#__PURE__*/jsx(Select, {
194
+ data: selectOptions.data,
195
+ selected: selectOptions.selected,
196
+ onSelect: this.handlePageSizeChange,
197
+ type: Select.Type.INLINE,
198
+ disabled: this.props.loader
199
+ })
200
+ });
201
+ }
202
+ getPagerLinks() {
203
+ var _this$props$translati3, _this$props$translati4, _this$props$translati5, _this$props$translati6;
204
+ const {
205
+ translate
206
+ } = this.context;
207
+ const prevLinkAvailable = this.props.currentPage !== 1;
208
+ const nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
209
+ const nextIcon = /*#__PURE__*/jsx(Icon, {
210
+ glyph: chevronRightIcon
211
+ }, "icon");
212
+ const prevIcon = /*#__PURE__*/jsx(Icon, {
213
+ glyph: chevronLeftIcon
214
+ }, "icon");
215
+ const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.previousPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('previousPage');
216
+ const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.nextPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('nextPage');
217
+ const nextLinkContent = [/*#__PURE__*/jsx("span", {
218
+ children: nextText
219
+ }, "text"), nextIcon];
220
+ const prevLinkContent = [prevIcon, /*#__PURE__*/jsx("span", {
221
+ children: prevText
222
+ }, "text")];
223
+ const prevLinkHref = this.generateHref(this.props.currentPage - 1);
224
+ const nextLinkHref = this.generateHref(this.props.currentPage + 1);
225
+ const disabledLinkClasses = classNames({
226
+ [modules_1a5f0d42.link]: true,
227
+ [modules_1a5f0d42.linkDisabled]: true
228
+ });
229
+ return /*#__PURE__*/jsxs("div", {
230
+ className: modules_1a5f0d42.links,
231
+ children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
232
+ href: prevLinkHref,
233
+ className: modules_1a5f0d42.link
234
+ }, this.getClickProps(this.handlePrevClick)), {}, {
235
+ children: prevLinkContent
236
+ })) : /*#__PURE__*/jsxs("span", {
237
+ className: disabledLinkClasses,
238
+ children: [prevIcon, /*#__PURE__*/jsx("span", {
239
+ children: prevText
240
+ }, "text")]
241
+ }), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
242
+ href: nextLinkHref,
243
+ className: modules_1a5f0d42.link
244
+ }, this.getClickProps(this.handleNextClick)), {}, {
245
+ children: nextLinkContent
246
+ })) : /*#__PURE__*/jsxs("span", {
247
+ className: disabledLinkClasses,
248
+ children: [/*#__PURE__*/jsx("span", {
249
+ children: nextText
250
+ }, "text"), nextIcon]
251
+ })]
252
+ });
253
+ }
254
+ generateHref(page) {
255
+ if (this.props.hrefFunc === undefined) {
256
+ return undefined;
298
257
  }
299
- }, {
300
- key: "generateHref",
301
- value: function generateHref(page) {
302
- if (this.props.hrefFunc === undefined) {
303
- return undefined;
304
- }
305
- var pageSize = this.props.disablePageSizeSelector ? undefined : this.props.pageSize;
306
- return this.props.hrefFunc(page, pageSize);
258
+ const pageSize = this.props.disablePageSizeSelector ? undefined : this.props.pageSize;
259
+ return this.props.hrefFunc(page, pageSize);
260
+ }
261
+ getPagerContent() {
262
+ var _this$props$translati7, _this$props$translati8, _this$props$translati9, _this$props$translati10;
263
+ const {
264
+ currentPage,
265
+ visiblePagesLimit
266
+ } = this.props;
267
+ const totalPages = this.getTotalPages();
268
+ const {
269
+ translate
270
+ } = this.context;
271
+ if (totalPages < this.props.currentPage) {
272
+ var _this$props$onPageCha4, _this$props4;
273
+ (_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props4, totalPages);
307
274
  }
308
- }, {
309
- key: "getPagerContent",
310
- value: function getPagerContent() {
311
- var _this$props$translati5, _this$props$translati6, _this$props$translati7, _this$props$translati8;
312
- var _this$props8 = this.props,
313
- currentPage = _this$props8.currentPage,
314
- visiblePagesLimit = _this$props8.visiblePagesLimit;
315
- var totalPages = this.getTotalPages();
316
- var translate = this.context.translate;
317
- if (totalPages < this.props.currentPage) {
318
- var _this$props$onPageCha4, _this$props9;
319
- (_this$props$onPageCha4 = (_this$props9 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props9, totalPages);
275
+ let start = 1;
276
+ let end = totalPages;
277
+ if (totalPages >= visiblePagesLimit) {
278
+ const leftHalfFrameSize = Math.ceil(visiblePagesLimit / 2) - 1;
279
+ const rightHalfFrameSize = visiblePagesLimit - leftHalfFrameSize - 1;
280
+ start = currentPage - leftHalfFrameSize;
281
+ end = currentPage + rightHalfFrameSize;
282
+ if (start < 1) {
283
+ const tail = 1 - start;
284
+ start += tail;
285
+ end += tail;
320
286
  }
321
- var start = 1;
322
- var end = totalPages;
323
- if (totalPages >= visiblePagesLimit) {
324
- var leftHalfFrameSize = Math.ceil(visiblePagesLimit / 2) - 1;
325
- var rightHalfFrameSize = visiblePagesLimit - leftHalfFrameSize - 1;
326
- start = currentPage - leftHalfFrameSize;
327
- end = currentPage + rightHalfFrameSize;
328
- if (start < 1) {
329
- var tail = 1 - start;
330
- start += tail;
331
- end += tail;
332
- }
333
- if (end > totalPages) {
334
- var _tail = end - totalPages;
335
- start -= _tail;
336
- end -= _tail;
337
- }
338
- if (start < 1) {
339
- start += 1 - start;
340
- }
287
+ if (end > totalPages) {
288
+ const tail = end - totalPages;
289
+ start -= tail;
290
+ end -= tail;
341
291
  }
342
- var buttons = [];
343
- for (var i = start; i <= end; i++) {
344
- buttons.push(this.getButton(i, i, i, i === currentPage));
292
+ if (start < 1) {
293
+ start += 1 - start;
345
294
  }
346
- var lastPageButtonAvailable = end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
347
- return /*#__PURE__*/jsxs("div", {
348
- children: [this.getPagerLinks(), /*#__PURE__*/jsxs(ButtonToolbar, {
349
- children: [start > 1 && this.getButton(1, (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.firstPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
295
+ }
296
+ const buttons = [];
297
+ for (let i = start; i <= end; i++) {
298
+ buttons.push(this.getButton(i, i, i, i === currentPage));
299
+ }
300
+ const lastPageButtonAvailable = !this.props.disableLastPageButton && end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
301
+ return /*#__PURE__*/jsxs("div", {
302
+ children: [this.getPagerLinks(), /*#__PURE__*/jsxs("div", {
303
+ className: modules_1a5f0d42.actions,
304
+ children: [/*#__PURE__*/jsxs(ButtonToolbar, {
305
+ children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
350
306
  children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
351
307
  href: this.generateHref(end + 1),
352
308
  disabled: this.props.loader
353
309
  }, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
354
310
  children: '...'
355
311
  }))]
356
- }), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.lastPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('lastPage'))]
312
+ }), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === void 0 ? void 0 : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== void 0 ? _this$props$translati9 : translate('lastPage'))]
357
313
  }), this.getPageSizeSelector()]
358
- });
359
- }
360
- }, {
361
- key: "render",
362
- value: function render() {
363
- var classes = classNames(modules_1a5f0d42.pager, this.props.className);
364
- return /*#__PURE__*/jsx("div", {
365
- "data-test": "ring-pager",
366
- className: classes,
367
- children: this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector()
368
- });
369
- }
370
- }]);
371
- }(PureComponent);
314
+ })]
315
+ });
316
+ }
317
+ render() {
318
+ const classes = classNames(modules_1a5f0d42.pager, this.props.className);
319
+ return /*#__PURE__*/jsx("div", {
320
+ "data-test": "ring-pager",
321
+ className: classes,
322
+ children: this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector()
323
+ });
324
+ }
325
+ }
372
326
  _defineProperty(Pager, "defaultProps", {
373
327
  currentPage: 1,
374
328
  pageSize: 50,
@@ -380,27 +334,9 @@ _defineProperty(Pager, "defaultProps", {
380
334
  canLoadLastPageWithOpenTotal: false,
381
335
  loader: false,
382
336
  loaderNavigation: false,
383
- onPageSizeChange: function onPageSizeChange() {},
384
- onLoadPage: function onLoadPage() {}
337
+ onPageSizeChange: () => {},
338
+ onLoadPage: () => {}
385
339
  });
386
340
  _defineProperty(Pager, "contextType", I18nContext);
387
- Pager.propTypes = {
388
- total: PropTypes.number.isRequired,
389
- currentPage: PropTypes.number,
390
- pageSize: PropTypes.number,
391
- pageSizes: PropTypes.arrayOf(PropTypes.number),
392
- visiblePagesLimit: PropTypes.number,
393
- disablePageSizeSelector: PropTypes.bool,
394
- openTotal: PropTypes.bool,
395
- canLoadLastPageWithOpenTotal: PropTypes.bool,
396
- onPageChange: PropTypes.func,
397
- onPageSizeChange: PropTypes.func,
398
- onLoadPage: PropTypes.func,
399
- className: PropTypes.string,
400
- translations: PropTypes.object,
401
- loader: PropTypes.bool,
402
- loaderNavigation: PropTypes.bool,
403
- hrefFunc: PropTypes.func //function which generates href for all pager's buttons based on pager state passed as a function parameter, either this function or onPageChange should be provided
404
- };
405
341
 
406
342
  export { Pager as default };
@@ -1,12 +1,7 @@
1
1
  import { HTMLAttributes, PureComponent } from 'react';
2
- import PropTypes from 'prop-types';
3
2
  /**
4
3
  * @name Panel
5
4
  */
6
5
  export default class Panel extends PureComponent<HTMLAttributes<HTMLElement>> {
7
- static propTypes: {
8
- className: PropTypes.Requireable<string>;
9
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- };
11
6
  render(): import("react").JSX.Element;
12
7
  }
@@ -1,36 +1,25 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import { PureComponent } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
5
4
  import { jsx } from 'react/jsx-runtime';
6
5
 
7
6
  var modules_cf670408 = {"light":"light_rui_2ac4","panel":"panel_rui_e32c panel_rui_027b"};
8
7
 
9
- var _excluded = ["className", "children"];
10
- var Panel = /*#__PURE__*/function (_PureComponent) {
11
- function Panel() {
12
- _classCallCheck(this, Panel);
13
- return _callSuper(this, Panel, arguments);
8
+ const _excluded = ["className", "children"];
9
+ class Panel extends PureComponent {
10
+ render() {
11
+ const _this$props = this.props,
12
+ {
13
+ className,
14
+ children
15
+ } = _this$props,
16
+ props = _objectWithoutProperties(_this$props, _excluded);
17
+ const classes = classNames(modules_cf670408.panel, className);
18
+ return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
19
+ className: classes,
20
+ children: children
21
+ }));
14
22
  }
15
- _inherits(Panel, _PureComponent);
16
- return _createClass(Panel, [{
17
- key: "render",
18
- value: function render() {
19
- var _this$props = this.props,
20
- className = _this$props.className,
21
- children = _this$props.children,
22
- props = _objectWithoutProperties(_this$props, _excluded);
23
- var classes = classNames(modules_cf670408.panel, className);
24
- return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
25
- className: classes,
26
- children: children
27
- }));
28
- }
29
- }]);
30
- }(PureComponent);
31
- _defineProperty(Panel, "propTypes", {
32
- className: PropTypes.string,
33
- children: PropTypes.node
34
- });
23
+ }
35
24
 
36
25
  export { Panel as default };