@hazelcast/ui 2.0.4 → 3.0.0-canary.0

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 (536) hide show
  1. package/lib/components/Alert.js +116 -50
  2. package/lib/components/Alert.js.map +1 -1
  3. package/lib/components/Alert.module.scss.js +8 -0
  4. package/lib/components/Alert.module.scss.js.map +1 -0
  5. package/lib/components/AppHeader/AppHeader.js +39 -17
  6. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  7. package/lib/components/AppHeader/AppHeader.module.scss.js +8 -0
  8. package/lib/components/AppHeader/AppHeader.module.scss.js.map +1 -0
  9. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js +24 -7
  10. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.js.map +1 -1
  11. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss.js +8 -0
  12. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss.js.map +1 -0
  13. package/lib/components/AppHeader/AppHeaderLogo/index.js +8 -2
  14. package/lib/components/AppHeader/AppHeaderLogo/index.js.map +1 -1
  15. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js +46 -14
  16. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.js.map +1 -1
  17. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss.js +8 -0
  18. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss.js.map +1 -0
  19. package/lib/components/AppHeader/AppHeaderMenu/index.js +8 -2
  20. package/lib/components/AppHeader/AppHeaderMenu/index.js.map +1 -1
  21. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js +19 -9
  22. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.js.map +1 -1
  23. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss.js +8 -0
  24. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss.js.map +1 -0
  25. package/lib/components/AppHeader/EnvironmentBadge/index.js +8 -2
  26. package/lib/components/AppHeader/EnvironmentBadge/index.js.map +1 -1
  27. package/lib/components/AppHeader/SelectCluster/SelectCluster.js +72 -32
  28. package/lib/components/AppHeader/SelectCluster/SelectCluster.js.map +1 -1
  29. package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss.js +8 -0
  30. package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss.js.map +1 -0
  31. package/lib/components/AppHeader/SelectCluster/index.js +8 -2
  32. package/lib/components/AppHeader/SelectCluster/index.js.map +1 -1
  33. package/lib/components/AppHeader/index.js +8 -2
  34. package/lib/components/AppHeader/index.js.map +1 -1
  35. package/lib/components/AppSidebar/AppSidebar.js +56 -30
  36. package/lib/components/AppSidebar/AppSidebar.js.map +1 -1
  37. package/lib/components/AppSidebar/AppSidebar.module.scss.js +8 -0
  38. package/lib/components/AppSidebar/AppSidebar.module.scss.js.map +1 -0
  39. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js +37 -21
  40. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.js.map +1 -1
  41. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss.js +8 -0
  42. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss.js.map +1 -0
  43. package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js +8 -2
  44. package/lib/components/AppSidebar/AppSidebarFavoriteButton/index.js.map +1 -1
  45. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js +31 -10
  46. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.js.map +1 -1
  47. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss.js +8 -0
  48. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss.js.map +1 -0
  49. package/lib/components/AppSidebar/AppSidebarFavorites/index.js +8 -2
  50. package/lib/components/AppSidebar/AppSidebarFavorites/index.js.map +1 -1
  51. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js +77 -22
  52. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.js.map +1 -1
  53. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss.js +8 -0
  54. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss.js.map +1 -0
  55. package/lib/components/AppSidebar/AppSidebarItem/index.js +8 -2
  56. package/lib/components/AppSidebar/AppSidebarItem/index.js.map +1 -1
  57. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js +17 -6
  58. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.js.map +1 -1
  59. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss.js +8 -0
  60. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss.js.map +1 -0
  61. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js +8 -2
  62. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/index.js.map +1 -1
  63. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js +39 -14
  64. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.js.map +1 -1
  65. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss.js +8 -0
  66. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss.js.map +1 -0
  67. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js +94 -53
  68. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSectionExpandable.js.map +1 -1
  69. package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js +8 -3
  70. package/lib/components/AppSidebar/AppSidebarSection/appSidebarSectionContext.js.map +1 -1
  71. package/lib/components/AppSidebar/AppSidebarSection/index.js +8 -2
  72. package/lib/components/AppSidebar/AppSidebarSection/index.js.map +1 -1
  73. package/lib/components/AppSidebar/appSidebarContext.js +14 -9
  74. package/lib/components/AppSidebar/appSidebarContext.js.map +1 -1
  75. package/lib/components/AppSidebar/index.js +16 -6
  76. package/lib/components/AppSidebar/index.js.map +1 -1
  77. package/lib/components/AutocompleteField.js +229 -154
  78. package/lib/components/AutocompleteField.js.map +1 -1
  79. package/lib/components/AutocompleteField.module.scss.js +8 -0
  80. package/lib/components/AutocompleteField.module.scss.js.map +1 -0
  81. package/lib/components/AutocompleteFieldFormik.js +41 -18
  82. package/lib/components/AutocompleteFieldFormik.js.map +1 -1
  83. package/lib/components/Badge.js +66 -42
  84. package/lib/components/Badge.js.map +1 -1
  85. package/lib/components/Badge.module.scss.js +8 -0
  86. package/lib/components/Badge.module.scss.js.map +1 -0
  87. package/lib/components/Button.js +115 -42
  88. package/lib/components/Button.js.map +1 -1
  89. package/lib/components/Button.module.scss.js +8 -0
  90. package/lib/components/Button.module.scss.js.map +1 -0
  91. package/lib/components/Calendar/Calendar.d.ts +6 -4
  92. package/lib/components/Calendar/Calendar.js +77 -34
  93. package/lib/components/Calendar/Calendar.js.map +1 -1
  94. package/lib/components/Calendar/Calendar.module.scss.js +8 -0
  95. package/lib/components/Calendar/Calendar.module.scss.js.map +1 -0
  96. package/lib/components/Calendar/CalendarRange.js +60 -12
  97. package/lib/components/Calendar/CalendarRange.js.map +1 -1
  98. package/lib/components/Calendar/CalendarRange.module.scss.js +8 -0
  99. package/lib/components/Calendar/CalendarRange.module.scss.js.map +1 -0
  100. package/lib/components/Calendar/components/CalendarHeader.d.ts +2 -2
  101. package/lib/components/Calendar/components/CalendarHeader.js +35 -12
  102. package/lib/components/Calendar/components/CalendarHeader.js.map +1 -1
  103. package/lib/components/Calendar/components/CalendarInput.js +39 -9
  104. package/lib/components/Calendar/components/CalendarInput.js.map +1 -1
  105. package/lib/components/Calendar/components/CalendarTime.js +104 -66
  106. package/lib/components/Calendar/components/CalendarTime.js.map +1 -1
  107. package/lib/components/Calendar/components/CalendarTime.module.scss.js +8 -0
  108. package/lib/components/Calendar/components/CalendarTime.module.scss.js.map +1 -0
  109. package/lib/components/Calendar/helpers/consts.js +8 -100
  110. package/lib/components/Calendar/helpers/consts.js.map +1 -1
  111. package/lib/components/Card.js +60 -14
  112. package/lib/components/Card.js.map +1 -1
  113. package/lib/components/Card.module.scss.js +8 -0
  114. package/lib/components/Card.module.scss.js.map +1 -0
  115. package/lib/components/Carousel.js +60 -27
  116. package/lib/components/Carousel.js.map +1 -1
  117. package/lib/components/Carousel.module.scss.js +8 -0
  118. package/lib/components/Carousel.module.scss.js.map +1 -0
  119. package/lib/components/CenteredLoader.js +18 -6
  120. package/lib/components/CenteredLoader.js.map +1 -1
  121. package/lib/components/CenteredLoader.module.scss.js +8 -0
  122. package/lib/components/CenteredLoader.module.scss.js.map +1 -0
  123. package/lib/components/Checkbox.d.ts +2 -2
  124. package/lib/components/Checkbox.js +87 -26
  125. package/lib/components/Checkbox.js.map +1 -1
  126. package/lib/components/Checkbox.module.scss.js +8 -0
  127. package/lib/components/Checkbox.module.scss.js.map +1 -0
  128. package/lib/components/CheckboxFormik.js +37 -16
  129. package/lib/components/CheckboxFormik.js.map +1 -1
  130. package/lib/components/CircularProgressBar.js +78 -27
  131. package/lib/components/CircularProgressBar.js.map +1 -1
  132. package/lib/components/CircularProgressBar.module.scss.js +8 -0
  133. package/lib/components/CircularProgressBar.module.scss.js.map +1 -0
  134. package/lib/components/ContextMenu.js +86 -60
  135. package/lib/components/ContextMenu.js.map +1 -1
  136. package/lib/components/ContextMenu.module.scss.js +8 -0
  137. package/lib/components/ContextMenu.module.scss.js.map +1 -0
  138. package/lib/components/Dialog.js +50 -30
  139. package/lib/components/Dialog.js.map +1 -1
  140. package/lib/components/Dialog.module.scss.js +8 -0
  141. package/lib/components/Dialog.module.scss.js.map +1 -0
  142. package/lib/components/EmptyState.js +66 -20
  143. package/lib/components/EmptyState.js.map +1 -1
  144. package/lib/components/EmptyState.module.scss.js +8 -0
  145. package/lib/components/EmptyState.module.scss.js.map +1 -0
  146. package/lib/components/Error.js +28 -7
  147. package/lib/components/Error.js.map +1 -1
  148. package/lib/components/Error.module.scss.js +8 -0
  149. package/lib/components/Error.module.scss.js.map +1 -0
  150. package/lib/components/FieldHeader.js +43 -14
  151. package/lib/components/FieldHeader.js.map +1 -1
  152. package/lib/components/FieldHeader.module.scss.js +8 -0
  153. package/lib/components/FieldHeader.module.scss.js.map +1 -0
  154. package/lib/components/Help.d.ts +0 -1
  155. package/lib/components/Help.js +42 -13
  156. package/lib/components/Help.js.map +1 -1
  157. package/lib/components/Help.module.scss.js +8 -0
  158. package/lib/components/Help.module.scss.js.map +1 -0
  159. package/lib/components/Icon.js +48 -25
  160. package/lib/components/Icon.js.map +1 -1
  161. package/lib/components/Icon.module.scss.js +8 -0
  162. package/lib/components/Icon.module.scss.js.map +1 -0
  163. package/lib/components/IconButton.js +81 -23
  164. package/lib/components/IconButton.js.map +1 -1
  165. package/lib/components/IconButton.module.scss.js +8 -0
  166. package/lib/components/IconButton.module.scss.js.map +1 -0
  167. package/lib/components/InteractiveList.js +115 -41
  168. package/lib/components/InteractiveList.js.map +1 -1
  169. package/lib/components/InteractiveList.module.scss.js +8 -0
  170. package/lib/components/InteractiveList.module.scss.js.map +1 -0
  171. package/lib/components/InteractiveListFormik.js +110 -81
  172. package/lib/components/InteractiveListFormik.js.map +1 -1
  173. package/lib/components/Label.js +20 -5
  174. package/lib/components/Label.js.map +1 -1
  175. package/lib/components/Label.module.scss.js +8 -0
  176. package/lib/components/Label.module.scss.js.map +1 -0
  177. package/lib/components/Link.js +59 -31
  178. package/lib/components/Link.js.map +1 -1
  179. package/lib/components/Link.module.scss.js +8 -0
  180. package/lib/components/Link.module.scss.js.map +1 -0
  181. package/lib/components/Loader.js +82 -23
  182. package/lib/components/Loader.js.map +1 -1
  183. package/lib/components/Loader.module.scss.js +8 -0
  184. package/lib/components/Loader.module.scss.js.map +1 -0
  185. package/lib/components/Modal.js +93 -26
  186. package/lib/components/Modal.js.map +1 -1
  187. package/lib/components/Modal.module.scss.js +8 -0
  188. package/lib/components/Modal.module.scss.js.map +1 -0
  189. package/lib/components/Notification.js +75 -37
  190. package/lib/components/Notification.js.map +1 -1
  191. package/lib/components/Notification.module.scss.js +8 -0
  192. package/lib/components/Notification.module.scss.js.map +1 -0
  193. package/lib/components/NumberBadge.js +18 -7
  194. package/lib/components/NumberBadge.js.map +1 -1
  195. package/lib/components/NumberBadge.module.scss.js +8 -0
  196. package/lib/components/NumberBadge.module.scss.js.map +1 -0
  197. package/lib/components/NumberField.js +181 -140
  198. package/lib/components/NumberField.js.map +1 -1
  199. package/lib/components/NumberField.module.scss.js +8 -0
  200. package/lib/components/NumberField.module.scss.js.map +1 -0
  201. package/lib/components/NumberFieldFormik.js +69 -49
  202. package/lib/components/NumberFieldFormik.js.map +1 -1
  203. package/lib/components/Overlay.js +92 -29
  204. package/lib/components/Overlay.js.map +1 -1
  205. package/lib/components/Overlay.module.scss.js +8 -0
  206. package/lib/components/Overlay.module.scss.js.map +1 -0
  207. package/lib/components/Pagination.js +198 -91
  208. package/lib/components/Pagination.js.map +1 -1
  209. package/lib/components/Pagination.module.scss.js +8 -0
  210. package/lib/components/Pagination.module.scss.js.map +1 -0
  211. package/lib/components/PasswordField.js +61 -25
  212. package/lib/components/PasswordField.js.map +1 -1
  213. package/lib/components/PasswordField.module.scss.js +8 -0
  214. package/lib/components/PasswordField.module.scss.js.map +1 -0
  215. package/lib/components/PasswordFieldFormik.js +37 -16
  216. package/lib/components/PasswordFieldFormik.js.map +1 -1
  217. package/lib/components/Popover.d.ts +3 -10
  218. package/lib/components/Popover.js +85 -119
  219. package/lib/components/Popover.js.map +1 -1
  220. package/lib/components/Popover.module.scss.js +8 -0
  221. package/lib/components/Popover.module.scss.js.map +1 -0
  222. package/lib/components/Radio.d.ts +2 -2
  223. package/lib/components/Radio.js +67 -26
  224. package/lib/components/Radio.js.map +1 -1
  225. package/lib/components/Radio.module.scss.js +8 -0
  226. package/lib/components/Radio.module.scss.js.map +1 -0
  227. package/lib/components/RadioFormik.js +26 -11
  228. package/lib/components/RadioFormik.js.map +1 -1
  229. package/lib/components/RadioGroup.js +51 -18
  230. package/lib/components/RadioGroup.js.map +1 -1
  231. package/lib/components/RadioGroup.module.scss.js +8 -0
  232. package/lib/components/RadioGroup.module.scss.js.map +1 -0
  233. package/lib/components/RadioGroupContext.js +10 -3
  234. package/lib/components/RadioGroupContext.js.map +1 -1
  235. package/lib/components/RadioGroupFormik.js +34 -16
  236. package/lib/components/RadioGroupFormik.js.map +1 -1
  237. package/lib/components/SegmentedControl.js +43 -9
  238. package/lib/components/SegmentedControl.js.map +1 -1
  239. package/lib/components/SegmentedControl.module.scss.js +8 -0
  240. package/lib/components/SegmentedControl.module.scss.js.map +1 -0
  241. package/lib/components/SegmentedControlFormik.js +30 -12
  242. package/lib/components/SegmentedControlFormik.js.map +1 -1
  243. package/lib/components/Select/CheckableSelectField.js +178 -75
  244. package/lib/components/Select/CheckableSelectField.js.map +1 -1
  245. package/lib/components/Select/CheckableSelectField.module.scss.js +8 -0
  246. package/lib/components/Select/CheckableSelectField.module.scss.js.map +1 -0
  247. package/lib/components/Select/CheckableSelectFieldFormik.js +41 -18
  248. package/lib/components/Select/CheckableSelectFieldFormik.js.map +1 -1
  249. package/lib/components/Select/Common.js +87 -44
  250. package/lib/components/Select/Common.js.map +1 -1
  251. package/lib/components/Select/Common.module.scss.js +8 -0
  252. package/lib/components/Select/Common.module.scss.js.map +1 -0
  253. package/lib/components/Select/MultiSelectField.js +187 -107
  254. package/lib/components/Select/MultiSelectField.js.map +1 -1
  255. package/lib/components/Select/MultiSelectField.module.scss.js +8 -0
  256. package/lib/components/Select/MultiSelectField.module.scss.js.map +1 -0
  257. package/lib/components/Select/MultiSelectFieldFormik.js +41 -18
  258. package/lib/components/Select/MultiSelectFieldFormik.js.map +1 -1
  259. package/lib/components/Select/SelectField.js +169 -100
  260. package/lib/components/Select/SelectField.js.map +1 -1
  261. package/lib/components/Select/SelectField.module.scss.js +8 -0
  262. package/lib/components/Select/SelectField.module.scss.js.map +1 -0
  263. package/lib/components/Select/SelectFieldFormik.js +38 -18
  264. package/lib/components/Select/SelectFieldFormik.js.map +1 -1
  265. package/lib/components/Select/helpers.js +30 -25
  266. package/lib/components/Select/helpers.js.map +1 -1
  267. package/lib/components/Select/index.js +21 -8
  268. package/lib/components/Select/index.js.map +1 -1
  269. package/lib/components/SimpleTable.js +36 -13
  270. package/lib/components/SimpleTable.js.map +1 -1
  271. package/lib/components/SimpleTable.module.scss.js +8 -0
  272. package/lib/components/SimpleTable.module.scss.js.map +1 -0
  273. package/lib/components/Slider.js +294 -173
  274. package/lib/components/Slider.js.map +1 -1
  275. package/lib/components/Slider.module.scss.js +8 -0
  276. package/lib/components/Slider.module.scss.js.map +1 -0
  277. package/lib/components/SliderFormik.js +30 -13
  278. package/lib/components/SliderFormik.js.map +1 -1
  279. package/lib/components/Table/Cell.js +111 -58
  280. package/lib/components/Table/Cell.js.map +1 -1
  281. package/lib/components/Table/Cell.module.scss.js +8 -0
  282. package/lib/components/Table/Cell.module.scss.js.map +1 -0
  283. package/lib/components/Table/CellWrapper.js +44 -27
  284. package/lib/components/Table/CellWrapper.js.map +1 -1
  285. package/lib/components/Table/EnhancedRenderers.js +31 -12
  286. package/lib/components/Table/EnhancedRenderers.js.map +1 -1
  287. package/lib/components/Table/Header.js +141 -92
  288. package/lib/components/Table/Header.js.map +1 -1
  289. package/lib/components/Table/Header.module.scss.js +8 -0
  290. package/lib/components/Table/Header.module.scss.js.map +1 -0
  291. package/lib/components/Table/Row.js +77 -22
  292. package/lib/components/Table/Row.js.map +1 -1
  293. package/lib/components/Table/Row.module.scss.js +8 -0
  294. package/lib/components/Table/Row.module.scss.js.map +1 -0
  295. package/lib/components/Table/Table.js +456 -245
  296. package/lib/components/Table/Table.js.map +1 -1
  297. package/lib/components/Table/Table.module.scss.js +8 -0
  298. package/lib/components/Table/Table.module.scss.js.map +1 -0
  299. package/lib/components/Table/TableContent.js +129 -57
  300. package/lib/components/Table/TableContent.js.map +1 -1
  301. package/lib/components/Table/TableContent.module.scss.js +8 -0
  302. package/lib/components/Table/TableContent.module.scss.js.map +1 -0
  303. package/lib/components/Table/constants.js +8 -3
  304. package/lib/components/Table/constants.js.map +1 -1
  305. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js +39 -12
  306. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.js.map +1 -1
  307. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss.js +8 -0
  308. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss.js.map +1 -0
  309. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js +23 -16
  310. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.js.map +1 -1
  311. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss.js +8 -0
  312. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss.js.map +1 -0
  313. package/lib/components/Table/features/columnsSelection/ContextMenu/index.js +8 -2
  314. package/lib/components/Table/features/columnsSelection/ContextMenu/index.js.map +1 -1
  315. package/lib/components/Table/features/columnsSelection/columnsSelection.d.ts +2 -2
  316. package/lib/components/Table/features/columnsSelection/columnsSelection.js +76 -68
  317. package/lib/components/Table/features/columnsSelection/columnsSelection.js.map +1 -1
  318. package/lib/components/Table/features/columnsSelection/helpers.js +28 -22
  319. package/lib/components/Table/features/columnsSelection/helpers.js.map +1 -1
  320. package/lib/components/Table/features/columnsSelection/index.js +16 -5
  321. package/lib/components/Table/features/columnsSelection/index.js.map +1 -1
  322. package/lib/components/Table/helpers.js +17 -9
  323. package/lib/components/Table/helpers.js.map +1 -1
  324. package/lib/components/Table/tableTypes.js +3 -2
  325. package/lib/components/Table/tableTypes.js.map +1 -1
  326. package/lib/components/Table/useTrackTableState.js +43 -29
  327. package/lib/components/Table/useTrackTableState.js.map +1 -1
  328. package/lib/components/Table/utils.js +176 -111
  329. package/lib/components/Table/utils.js.map +1 -1
  330. package/lib/components/Tabs/Tab.js +61 -27
  331. package/lib/components/Tabs/Tab.js.map +1 -1
  332. package/lib/components/Tabs/Tab.module.scss.js +8 -0
  333. package/lib/components/Tabs/Tab.module.scss.js.map +1 -0
  334. package/lib/components/Tabs/TabContext.js +51 -26
  335. package/lib/components/Tabs/TabContext.js.map +1 -1
  336. package/lib/components/Tabs/TabList.js +62 -49
  337. package/lib/components/Tabs/TabList.js.map +1 -1
  338. package/lib/components/Tabs/TabList.module.scss.js +8 -0
  339. package/lib/components/Tabs/TabList.module.scss.js.map +1 -0
  340. package/lib/components/Tabs/TabPanel.js +29 -9
  341. package/lib/components/Tabs/TabPanel.js.map +1 -1
  342. package/lib/components/Tabs/TabPanel.module.scss.js +8 -0
  343. package/lib/components/Tabs/TabPanel.module.scss.js.map +1 -0
  344. package/lib/components/Tabs/index.js +20 -5
  345. package/lib/components/Tabs/index.js.map +1 -1
  346. package/lib/components/Terminal.js +179 -108
  347. package/lib/components/Terminal.js.map +1 -1
  348. package/lib/components/Terminal.module.scss.js +8 -0
  349. package/lib/components/Terminal.module.scss.js.map +1 -0
  350. package/lib/components/TextArea.js +79 -30
  351. package/lib/components/TextArea.js.map +1 -1
  352. package/lib/components/TextArea.module.scss.js +8 -0
  353. package/lib/components/TextArea.module.scss.js.map +1 -0
  354. package/lib/components/TextAreaFormik.js +26 -10
  355. package/lib/components/TextAreaFormik.js.map +1 -1
  356. package/lib/components/TextField.js +154 -48
  357. package/lib/components/TextField.js.map +1 -1
  358. package/lib/components/TextField.module.scss.js +8 -0
  359. package/lib/components/TextField.module.scss.js.map +1 -0
  360. package/lib/components/TextFieldFormik.js +46 -22
  361. package/lib/components/TextFieldFormik.js.map +1 -1
  362. package/lib/components/TimeField.js +62 -14
  363. package/lib/components/TimeField.js.map +1 -1
  364. package/lib/components/TimeField.module.scss.js +8 -0
  365. package/lib/components/TimeField.module.scss.js.map +1 -0
  366. package/lib/components/TimeFieldFormik.js +26 -10
  367. package/lib/components/TimeFieldFormik.js.map +1 -1
  368. package/lib/components/Toast.js +79 -44
  369. package/lib/components/Toast.js.map +1 -1
  370. package/lib/components/Toast.module.scss.js +8 -0
  371. package/lib/components/Toast.module.scss.js.map +1 -0
  372. package/lib/components/Toggle.js +71 -21
  373. package/lib/components/Toggle.js.map +1 -1
  374. package/lib/components/Toggle.module.scss.js +8 -0
  375. package/lib/components/Toggle.module.scss.js.map +1 -0
  376. package/lib/components/ToggleFormik.js +27 -11
  377. package/lib/components/ToggleFormik.js.map +1 -1
  378. package/lib/components/Tooltip.d.ts +4 -12
  379. package/lib/components/Tooltip.js +79 -122
  380. package/lib/components/Tooltip.js.map +1 -1
  381. package/lib/components/Tooltip.module.scss.js +8 -0
  382. package/lib/components/Tooltip.module.scss.js.map +1 -0
  383. package/lib/components/TruncatedText.d.ts +0 -1
  384. package/lib/components/TruncatedText.js +49 -22
  385. package/lib/components/TruncatedText.js.map +1 -1
  386. package/lib/components/TruncatedText.module.scss.js +8 -0
  387. package/lib/components/TruncatedText.module.scss.js.map +1 -0
  388. package/lib/helpers/array.js +26 -17
  389. package/lib/helpers/array.js.map +1 -1
  390. package/lib/helpers/escapeHtml.js +10 -6
  391. package/lib/helpers/escapeHtml.js.map +1 -1
  392. package/lib/helpers/forms.js +20 -14
  393. package/lib/helpers/forms.js.map +1 -1
  394. package/lib/helpers/math.js +10 -6
  395. package/lib/helpers/math.js.map +1 -1
  396. package/lib/helpers/types.js +6 -2
  397. package/lib/helpers/types.js.map +1 -1
  398. package/lib/hooks/index.js +17 -7
  399. package/lib/hooks/index.js.map +1 -1
  400. package/lib/hooks/useCloseOnResize.js +17 -12
  401. package/lib/hooks/useCloseOnResize.js.map +1 -1
  402. package/lib/hooks/useDeepCompareMemo.js +12 -7
  403. package/lib/hooks/useDeepCompareMemo.js.map +1 -1
  404. package/lib/hooks/useDeepEqual.js +14 -9
  405. package/lib/hooks/useDeepEqual.js.map +1 -1
  406. package/lib/hooks/useDimensions.d.ts +1 -1
  407. package/lib/hooks/useDimensions.js +26 -15
  408. package/lib/hooks/useDimensions.js.map +1 -1
  409. package/lib/hooks/useIsMounted.js +16 -11
  410. package/lib/hooks/useIsMounted.js.map +1 -1
  411. package/lib/hooks/useOnClickOutside.js +41 -32
  412. package/lib/hooks/useOnClickOutside.js.map +1 -1
  413. package/lib/hooks/useOpenCloseState.js +18 -13
  414. package/lib/hooks/useOpenCloseState.js.map +1 -1
  415. package/lib/hooks/usePagination.js +64 -60
  416. package/lib/hooks/usePagination.js.map +1 -1
  417. package/lib/hooks/usePersistedState.js +35 -33
  418. package/lib/hooks/usePersistedState.js.map +1 -1
  419. package/lib/hooks/usePrevious.js +13 -8
  420. package/lib/hooks/usePrevious.js.map +1 -1
  421. package/lib/hooks/useRefValue.js +13 -8
  422. package/lib/hooks/useRefValue.js.map +1 -1
  423. package/lib/icons/Cluster.js +44 -7
  424. package/lib/icons/Cluster.js.map +1 -1
  425. package/lib/icons/Compare.js +46 -7
  426. package/lib/icons/Compare.js.map +1 -1
  427. package/lib/icons/Compute.js +43 -7
  428. package/lib/icons/Compute.js.map +1 -1
  429. package/lib/icons/Folder.js +25 -4
  430. package/lib/icons/Folder.js.map +1 -1
  431. package/lib/icons/PlusCircle.js +37 -6
  432. package/lib/icons/PlusCircle.js.map +1 -1
  433. package/lib/icons/Streaming.js +45 -8
  434. package/lib/icons/Streaming.js.map +1 -1
  435. package/lib/index.d.ts +3 -2
  436. package/lib/index.js +185 -75
  437. package/lib/index.js.map +1 -1
  438. package/lib/services/logger.js +85 -75
  439. package/lib/services/logger.js.map +1 -1
  440. package/lib/services/time.js +18 -14
  441. package/lib/services/time.js.map +1 -1
  442. package/lib/styles/constants/export.module.scss.js +8 -0
  443. package/lib/styles/constants/export.module.scss.js.map +1 -0
  444. package/lib/styles.css +1 -0
  445. package/lib/test-helpers/render.js +32 -20
  446. package/lib/test-helpers/render.js.map +1 -1
  447. package/lib/test-helpers/time.js +9 -2
  448. package/lib/test-helpers/time.js.map +1 -1
  449. package/lib/test-helpers/utils.js +13 -9
  450. package/lib/test-helpers/utils.js.map +1 -1
  451. package/lib/types.js +3 -2
  452. package/lib/types.js.map +1 -1
  453. package/lib/utils/formik.js +12 -7
  454. package/lib/utils/formik.js.map +1 -1
  455. package/lib/utils/keyboard.js +8 -3
  456. package/lib/utils/keyboard.js.map +1 -1
  457. package/lib/utils/portal.js +19 -14
  458. package/lib/utils/portal.js.map +1 -1
  459. package/lib/utils/ssr.js +6 -2
  460. package/lib/utils/ssr.js.map +1 -1
  461. package/lib/utils/types.js +3 -2
  462. package/lib/utils/types.js.map +1 -1
  463. package/package.json +25 -16
  464. package/lib/components/Alert.module.scss +0 -141
  465. package/lib/components/AppHeader/AppHeader.module.scss +0 -29
  466. package/lib/components/AppHeader/AppHeaderLogo/AppHeaderLogo.module.scss +0 -29
  467. package/lib/components/AppHeader/AppHeaderMenu/AppHeaderMenu.module.scss +0 -20
  468. package/lib/components/AppHeader/EnvironmentBadge/EnvironmentBadge.module.scss +0 -13
  469. package/lib/components/AppHeader/SelectCluster/SelectCluster.module.scss +0 -101
  470. package/lib/components/AppSidebar/AppSidebar.module.scss +0 -66
  471. package/lib/components/AppSidebar/AppSidebarFavoriteButton/AppSidebarFavoriteButton.module.scss +0 -16
  472. package/lib/components/AppSidebar/AppSidebarFavorites/AppSidebarFavorites.module.scss +0 -13
  473. package/lib/components/AppSidebar/AppSidebarItem/AppSidebarItem.module.scss +0 -92
  474. package/lib/components/AppSidebar/AppSidebarMenuItemCounter/AppSidebarMenuItemCounter.module.scss +0 -24
  475. package/lib/components/AppSidebar/AppSidebarSection/AppSidebarSection.module.scss +0 -58
  476. package/lib/components/AutocompleteField.module.scss +0 -164
  477. package/lib/components/Badge.module.scss +0 -55
  478. package/lib/components/Button.module.scss +0 -329
  479. package/lib/components/Calendar/Calendar.module.scss +0 -185
  480. package/lib/components/Calendar/CalendarRange.module.scss +0 -21
  481. package/lib/components/Calendar/components/CalendarTime.module.scss +0 -72
  482. package/lib/components/Card.module.scss +0 -92
  483. package/lib/components/Carousel.module.scss +0 -43
  484. package/lib/components/CenteredLoader.module.scss +0 -11
  485. package/lib/components/Checkbox.module.scss +0 -106
  486. package/lib/components/CircularProgressBar.module.scss +0 -37
  487. package/lib/components/ContextMenu.module.scss +0 -37
  488. package/lib/components/Dialog.module.scss +0 -62
  489. package/lib/components/EmptyState.module.scss +0 -87
  490. package/lib/components/Error.module.scss +0 -12
  491. package/lib/components/FieldHeader.module.scss +0 -20
  492. package/lib/components/Help.module.scss +0 -9
  493. package/lib/components/Icon.module.scss +0 -33
  494. package/lib/components/IconButton.module.scss +0 -59
  495. package/lib/components/InteractiveList.module.scss +0 -72
  496. package/lib/components/Label.module.scss +0 -12
  497. package/lib/components/Link.module.scss +0 -64
  498. package/lib/components/Loader.module.scss +0 -74
  499. package/lib/components/Modal.module.scss +0 -109
  500. package/lib/components/Notification.module.scss +0 -97
  501. package/lib/components/NumberBadge.module.scss +0 -13
  502. package/lib/components/NumberField.module.scss +0 -76
  503. package/lib/components/Overlay.module.scss +0 -108
  504. package/lib/components/Pagination.module.scss +0 -117
  505. package/lib/components/PasswordField.module.scss +0 -26
  506. package/lib/components/Popover.module.scss +0 -12
  507. package/lib/components/Radio.module.scss +0 -112
  508. package/lib/components/RadioGroup.module.scss +0 -21
  509. package/lib/components/SegmentedControl.module.scss +0 -81
  510. package/lib/components/Select/CheckableSelectField.module.scss +0 -100
  511. package/lib/components/Select/Common.module.scss +0 -69
  512. package/lib/components/Select/MultiSelectField.module.scss +0 -72
  513. package/lib/components/Select/SelectField.module.scss +0 -194
  514. package/lib/components/SimpleTable.module.scss +0 -28
  515. package/lib/components/Slider.module.scss +0 -277
  516. package/lib/components/Table/Cell.module.scss +0 -61
  517. package/lib/components/Table/Header.module.scss +0 -128
  518. package/lib/components/Table/Row.module.scss +0 -59
  519. package/lib/components/Table/Table.module.scss +0 -31
  520. package/lib/components/Table/TableContent.module.scss +0 -21
  521. package/lib/components/Table/features/columnsSelection/CellCopyablePopover.module.scss +0 -12
  522. package/lib/components/Table/features/columnsSelection/ContextMenu/ContextMenu.module.scss +0 -6
  523. package/lib/components/Tabs/Tab.module.scss +0 -58
  524. package/lib/components/Tabs/TabList.module.scss +0 -3
  525. package/lib/components/Tabs/TabPanel.module.scss +0 -7
  526. package/lib/components/Terminal.module.scss +0 -109
  527. package/lib/components/TextArea.module.scss +0 -144
  528. package/lib/components/TextField.module.scss +0 -209
  529. package/lib/components/TimeField.module.scss +0 -4
  530. package/lib/components/Toast.module.scss +0 -53
  531. package/lib/components/Toggle.module.scss +0 -175
  532. package/lib/components/Tooltip.module.scss +0 -175
  533. package/lib/components/TruncatedText.module.scss +0 -9
  534. package/lib/hooks/useResizeAware.d.ts +0 -3
  535. package/lib/hooks/useResizeAware.js +0 -25
  536. package/lib/hooks/useResizeAware.js.map +0 -1
@@ -1,27 +1,30 @@
1
- import debounce from 'lodash/debounce';
2
- import React, { useCallback, useEffect, useRef, useMemo, useState, } from 'react';
3
- import cn from 'classnames';
4
- import HotKeys from 'react-hot-keys';
5
- import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getExpandedRowModel, getFilteredRowModel, } from '@tanstack/react-table';
6
- import { AlertTriangle, ChevronDown, ChevronUp } from 'react-feather';
7
- import { Pagination } from '../Pagination';
8
- import { Cell } from './Cell';
9
- import { EnhancedCellRenderer, EnhancedHeaderFooterRenderer } from './EnhancedRenderers';
10
- import { Header } from './Header';
11
- import { HeaderRow, Row } from './Row';
12
- import { Loader } from '../Loader';
13
- import { EmptyState } from '../EmptyState';
14
- import { usePrevious } from '../../hooks/usePrevious';
15
- import { Icon } from '../Icon';
16
- import { TableContent } from './TableContent';
17
- import { ROW_EXPANDER_COLUMN_ID } from './constants';
18
- import { useColumnsSelection, ContextMenu } from './features/columnsSelection';
19
- import { useRefValue } from '../../hooks';
20
- import { useTrackTableState } from './useTrackTableState';
21
- import { getCellStyle, getColumnDef, getRowStyle, getTableInitialState, prepareRow } from './utils';
22
- import styles from './Table.module.scss';
23
- import styleConsts from '../../../styles/constants/export.module.scss';
24
- export * from './tableTypes';
1
+ 'use strict';
2
+
3
+ var debounce = require('lodash/debounce');
4
+ var React = require('react');
5
+ var cn = require('classnames');
6
+ var HotKeys = require('react-hot-keys');
7
+ var reactTable = require('@tanstack/react-table');
8
+ var reactFeather = require('react-feather');
9
+ var components_Pagination = require('../Pagination.js');
10
+ var components_Table_Cell = require('./Cell.js');
11
+ var components_Table_EnhancedRenderers = require('./EnhancedRenderers.js');
12
+ var components_Table_Header = require('./Header.js');
13
+ var components_Table_Row = require('./Row.js');
14
+ var components_Loader = require('../Loader.js');
15
+ var components_EmptyState = require('../EmptyState.js');
16
+ var hooks_usePrevious = require('../../hooks/usePrevious.js');
17
+ var components_Icon = require('../Icon.js');
18
+ var components_Table_TableContent = require('./TableContent.js');
19
+ var components_Table_constants = require('./constants.js');
20
+ var components_Table_features_columnsSelection_columnsSelection = require('./features/columnsSelection/columnsSelection.js');
21
+ var components_Table_features_columnsSelection_ContextMenu_ContextMenu = require('./features/columnsSelection/ContextMenu/ContextMenu.js');
22
+ var components_Table_useTrackTableState = require('./useTrackTableState.js');
23
+ var components_Table_utils = require('./utils.js');
24
+ var Table_module = require('./Table.module.scss.js');
25
+ var export_module = require('../../styles/constants/export.module.scss.js');
26
+ var hooks_useRefValue = require('../../hooks/useRefValue.js');
27
+
25
28
  /**
26
29
  * ### Purpose
27
30
  * Table component allows to arrange data in rows and columns.
@@ -33,228 +36,436 @@ export * from './tableTypes';
33
36
  * - Is able to resize columns out of the box
34
37
  */
35
38
  // Inspiration here: https://react-table.tanstack.com/docs/examples/basic
36
- export const Table = ({ 'data-test': dataTest, columns: propColumns, data, disableSortBy, onPaginationChange, onSortingChange, manualPagination, onRenderedContentChange, hidePagination = false, pageCount: controlledPageCount, defaultPageSize = 10, paginationOptions, onRowClick, getHref, AnchorComponent, getCustomRowProps, getCustomCellProps, loading, noDataTitle = 'The table is empty', pageIndex: incomingPageIndex, initialState = { paginationOptions: { pageIndex: incomingPageIndex || 0, pageSize: defaultPageSize } }, className = '', headerClassName = '', contentClassName = '', footerClassName = '', searchValue, hideHeader, onPageChange, overlayLoading, onRowSelect, columnsOrdering = false, children, renderRowSubComponent, onCopy, canExpand, onStateChange, }) => {
37
- var _a;
38
- const getOncopy = useRefValue(onCopy);
39
- const getCanExpand = useRefValue(canExpand);
40
- const getRenderRowSubComponent = useRefValue(renderRowSubComponent);
41
- const [contextMenuAnchorEl, setContextMenuAnchorEl] = useState(null);
42
- const draggedColumnRef = useRef(null);
43
- const previousIncomingPageIndex = usePrevious(incomingPageIndex);
44
- const columns = useMemo(() => {
45
- if (renderRowSubComponent || data.some((item) => 'subRows' in item)) {
46
- const expander = {
47
- width: 60,
48
- disableResizing: true,
49
- id: ROW_EXPANDER_COLUMN_ID,
50
- Header: () => React.createElement("span", { role: "contentinfo", "aria-label": "row-expander-column-header" }),
51
- Cell: ({ row }) => {
52
- if (row.getCanExpand()) {
53
- return (React.createElement("div", { tabIndex: 0, role: "button", "data-test": "row-expander", "aria-expanded": row.getIsExpanded(), className: styles.expander, onClick: (e) => {
54
- e.preventDefault();
55
- row.getToggleExpandedHandler()();
56
- } },
57
- React.createElement(Icon, { icon: row.getIsExpanded() ? ChevronUp : ChevronDown, ariaLabel: "row-expander" })));
58
- }
59
- return React.createElement(React.Fragment, null, null);
60
- },
61
- };
62
- return [expander, ...propColumns].map(getColumnDef);
39
+ const Table = ({
40
+ 'data-test': dataTest,
41
+ columns: propColumns,
42
+ data,
43
+ disableSortBy,
44
+ onPaginationChange,
45
+ onSortingChange,
46
+ manualPagination,
47
+ onRenderedContentChange,
48
+ hidePagination = false,
49
+ pageCount: controlledPageCount,
50
+ defaultPageSize = 10,
51
+ paginationOptions,
52
+ onRowClick,
53
+ getHref,
54
+ AnchorComponent,
55
+ getCustomRowProps,
56
+ getCustomCellProps,
57
+ loading,
58
+ noDataTitle = 'The table is empty',
59
+ pageIndex: incomingPageIndex,
60
+ initialState = {
61
+ paginationOptions: {
62
+ pageIndex: incomingPageIndex || 0,
63
+ pageSize: defaultPageSize
64
+ }
65
+ },
66
+ className = '',
67
+ headerClassName = '',
68
+ contentClassName = '',
69
+ footerClassName = '',
70
+ searchValue,
71
+ hideHeader,
72
+ onPageChange,
73
+ overlayLoading,
74
+ onRowSelect,
75
+ columnsOrdering = false,
76
+ children,
77
+ renderRowSubComponent,
78
+ onCopy,
79
+ canExpand,
80
+ onStateChange
81
+ }) => {
82
+ var _a;
83
+ const getOncopy = hooks_useRefValue.useRefValue(onCopy);
84
+ const getCanExpand = hooks_useRefValue.useRefValue(canExpand);
85
+ const getRenderRowSubComponent = hooks_useRefValue.useRefValue(renderRowSubComponent);
86
+ const [contextMenuAnchorEl, setContextMenuAnchorEl] = React.useState(null);
87
+ const draggedColumnRef = React.useRef(null);
88
+ const previousIncomingPageIndex = hooks_usePrevious.usePrevious(incomingPageIndex);
89
+ const columns = React.useMemo(() => {
90
+ if (renderRowSubComponent || data.some(item => 'subRows' in item)) {
91
+ const expander = {
92
+ width: 60,
93
+ disableResizing: true,
94
+ id: components_Table_constants.ROW_EXPANDER_COLUMN_ID,
95
+ Header: () => /*#__PURE__*/React.createElement("span", {
96
+ role: "contentinfo",
97
+ "aria-label": "row-expander-column-header"
98
+ }),
99
+ Cell: ({
100
+ row
101
+ }) => {
102
+ if (row.getCanExpand()) {
103
+ return /*#__PURE__*/React.createElement("div", {
104
+ tabIndex: 0,
105
+ role: "button",
106
+ "data-test": "row-expander",
107
+ "aria-expanded": row.getIsExpanded(),
108
+ className: Table_module.default.expander,
109
+ onClick: e => {
110
+ e.preventDefault();
111
+ row.getToggleExpandedHandler()();
112
+ }
113
+ }, /*#__PURE__*/React.createElement(components_Icon.Icon, {
114
+ icon: row.getIsExpanded() ? reactFeather.ChevronUp : reactFeather.ChevronDown,
115
+ ariaLabel: "row-expander"
116
+ }));
117
+ }
118
+ return /*#__PURE__*/React.createElement(React.Fragment, null, null);
63
119
  }
64
- return propColumns.map(getColumnDef);
65
- }, [propColumns, data, renderRowSubComponent]);
66
- const defaultColumn = useMemo(() => ({
67
- cell: (props) => React.createElement(EnhancedCellRenderer, { cell: props.cell, columnResizing: props.column.getIsResizing() }),
68
- minSize: Number(styleConsts.tableColumnMinWidth), // minWidth is only used as a limit for resizing
69
- size: Number(styleConsts.tableColumnWidth), // width is used for both the flex-basis and flex-grow
70
- maxSize: Number(styleConsts.tableColumnMaxWidth), // maxWidth is only used as a limit for resizing
71
- }), []);
72
- const tableInitialState = useMemo(() => getTableInitialState(initialState), [initialState]);
73
- const tableInstance = useReactTable({
120
+ };
121
+ return [expander, ...propColumns].map(components_Table_utils.getColumnDef);
122
+ }
123
+ return propColumns.map(components_Table_utils.getColumnDef);
124
+ }, [propColumns, data, renderRowSubComponent]);
125
+ const defaultColumn = React.useMemo(() => ({
126
+ cell: props => /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedCellRenderer, {
127
+ cell: props.cell,
128
+ columnResizing: props.column.getIsResizing()
129
+ }),
130
+ minSize: Number(export_module.default.tableColumnMinWidth),
131
+ // minWidth is only used as a limit for resizing
132
+ size: Number(export_module.default.tableColumnWidth),
133
+ // width is used for both the flex-basis and flex-grow
134
+ maxSize: Number(export_module.default.tableColumnMaxWidth) // maxWidth is only used as a limit for resizing
135
+ }), []);
136
+ const tableInitialState = React.useMemo(() => components_Table_utils.getTableInitialState(initialState), [initialState]);
137
+ const tableInstance = reactTable.useReactTable({
138
+ columns,
139
+ data,
140
+ enableSorting: !disableSortBy,
141
+ enableMultiSort: false,
142
+ // Pass our hoisted table state
143
+ initialState: tableInitialState,
144
+ // Tell the usePagination hook that we'll handle our own data fetching
145
+ manualPagination: manualPagination,
146
+ // This means we'll also have to provide our own pageCount
147
+ pageCount: controlledPageCount,
148
+ defaultColumn,
149
+ columnResizeMode: 'onChange',
150
+ paginateExpandedRows: false,
151
+ autoResetPageIndex: false,
152
+ getSubRows: React.useCallback(row => row.subRows, []),
153
+ getRowCanExpand: React.useCallback(row => {
154
+ var _a;
155
+ const cb = getCanExpand();
156
+ if (cb) {
157
+ return cb(components_Table_utils.prepareRow(row));
158
+ }
159
+ if (getRenderRowSubComponent()) {
160
+ return true;
161
+ }
162
+ return ((_a = row.subRows) === null || _a === void 0 ? void 0 : _a.length) > 0;
163
+ }, [getCanExpand, getRenderRowSubComponent]),
164
+ getCoreRowModel: reactTable.getCoreRowModel(),
165
+ getPaginationRowModel: reactTable.getPaginationRowModel(),
166
+ getSortedRowModel: reactTable.getSortedRowModel(),
167
+ getExpandedRowModel: reactTable.getExpandedRowModel(),
168
+ getFilteredRowModel: reactTable.getFilteredRowModel()
169
+ });
170
+ const {
171
+ getVisibleFlatColumns,
172
+ nextPage,
173
+ setPageIndex: goToPage,
174
+ getRowCount,
175
+ getState,
176
+ previousPage,
177
+ setPageSize,
178
+ setGlobalFilter,
179
+ setColumnOrder,
180
+ getPageCount,
181
+ getCanNextPage,
182
+ getCanPreviousPage,
183
+ getFooterGroups
184
+ } = tableInstance;
185
+ components_Table_useTrackTableState.useTrackTableState(tableInstance, onStateChange);
186
+ const footerGroups = getFooterGroups();
187
+ const page = tableInstance.getPaginationRowModel().rows;
188
+ const rowsPerPage = getRowCount();
189
+ const pageCount = getPageCount();
190
+ const {
191
+ sorting: sortBy,
192
+ columnOrder,
193
+ columnSizing: columnResizing,
194
+ rowSelection: selectedRowIds,
195
+ pagination: {
196
+ pageIndex,
197
+ pageSize
198
+ }
199
+ } = getState();
200
+ const getColumnOrder = hooks_useRefValue.useRefValue(columnOrder);
201
+ // drag and drop
202
+ const onDragStart = React.useCallback(e => {
203
+ draggedColumnRef.current = Number(e.dataTransfer.getData('text/plain'));
204
+ }, []);
205
+ const onDrop = React.useCallback((_, columnIndex) => {
206
+ if (draggedColumnRef.current !== null && columnIndex !== draggedColumnRef.current) {
207
+ const visibleColumns = getColumnOrder() || getVisibleFlatColumns().map(({
208
+ id
209
+ }) => id);
210
+ const newColumns = [...visibleColumns];
211
+ newColumns[columnIndex] = visibleColumns[draggedColumnRef.current];
212
+ newColumns[draggedColumnRef.current] = visibleColumns[columnIndex];
213
+ setColumnOrder(newColumns);
214
+ }
215
+ }, [getColumnOrder, getVisibleFlatColumns, setColumnOrder]);
216
+ const columnsSelectionProps = components_Table_features_columnsSelection_columnsSelection.useColumnsSelection({
217
+ rowsPerPage,
218
+ columnsPerRow: columns.length
219
+ });
220
+ const {
221
+ onEndSelection,
222
+ getSelectedColumns,
223
+ selectedColumnValuesRef
224
+ } = columnsSelectionProps;
225
+ const onPaginationChangeDebounced = React.useMemo(() => onPaginationChange ? debounce(onPaginationChange, 200) : undefined, [onPaginationChange]);
226
+ const onKeyUp = React.useCallback(() => {
227
+ const callback = getOncopy();
228
+ if (callback) {
229
+ const {
74
230
  columns,
75
- data,
76
- enableSorting: !disableSortBy,
77
- enableMultiSort: false,
78
- // Pass our hoisted table state
79
- initialState: tableInitialState,
80
- // Tell the usePagination hook that we'll handle our own data fetching
81
- manualPagination: manualPagination,
82
- // This means we'll also have to provide our own pageCount
83
- pageCount: controlledPageCount,
84
- defaultColumn,
85
- columnResizeMode: 'onChange',
86
- paginateExpandedRows: false,
87
- autoResetPageIndex: false,
88
- getSubRows: useCallback((row) => row.subRows, []),
89
- getRowCanExpand: useCallback((row) => {
90
- var _a;
91
- const cb = getCanExpand();
92
- if (cb) {
93
- return cb(prepareRow(row));
94
- }
95
- if (getRenderRowSubComponent()) {
96
- return true;
97
- }
98
- return ((_a = row.subRows) === null || _a === void 0 ? void 0 : _a.length) > 0;
99
- }, [getCanExpand, getRenderRowSubComponent]),
100
- getCoreRowModel: getCoreRowModel(),
101
- getPaginationRowModel: getPaginationRowModel(),
102
- getSortedRowModel: getSortedRowModel(),
103
- getExpandedRowModel: getExpandedRowModel(),
104
- getFilteredRowModel: getFilteredRowModel(),
105
- });
106
- const { getVisibleFlatColumns, nextPage, setPageIndex: goToPage, getRowCount, getState, previousPage, setPageSize, setGlobalFilter, setColumnOrder, getPageCount, getCanNextPage, getCanPreviousPage, getFooterGroups, } = tableInstance;
107
- useTrackTableState(tableInstance, onStateChange);
108
- const footerGroups = getFooterGroups();
109
- const page = tableInstance.getPaginationRowModel().rows;
110
- const rowsPerPage = getRowCount();
111
- const pageCount = getPageCount();
112
- const { sorting: sortBy, columnOrder, columnSizing: columnResizing, rowSelection: selectedRowIds, pagination: { pageIndex, pageSize }, } = getState();
113
- const getColumnOrder = useRefValue(columnOrder);
114
- // drag and drop
115
- const onDragStart = useCallback((e) => {
116
- draggedColumnRef.current = Number(e.dataTransfer.getData('text/plain'));
117
- }, []);
118
- const onDrop = useCallback((_, columnIndex) => {
119
- if (draggedColumnRef.current !== null && columnIndex !== draggedColumnRef.current) {
120
- const visibleColumns = getColumnOrder() || getVisibleFlatColumns().map(({ id }) => id);
121
- const newColumns = [...visibleColumns];
122
- newColumns[columnIndex] = visibleColumns[draggedColumnRef.current];
123
- newColumns[draggedColumnRef.current] = visibleColumns[columnIndex];
124
- setColumnOrder(newColumns);
125
- }
126
- }, [getColumnOrder, getVisibleFlatColumns, setColumnOrder]);
127
- const columnsSelectionProps = useColumnsSelection({
128
- rowsPerPage,
129
- columnsPerRow: columns.length,
130
- });
131
- const { onEndSelection, getSelectedColumns, selectedColumnValuesRef } = columnsSelectionProps;
132
- const onPaginationChangeDebounced = useMemo(() => (onPaginationChange ? debounce(onPaginationChange, 200) : undefined), [onPaginationChange]);
133
- const onKeyUp = useCallback(() => {
134
- const callback = getOncopy();
135
- if (callback) {
136
- const { columns, range } = getSelectedColumns();
137
- if (columns.size || (range[0] !== undefined && range[0] !== undefined)) {
138
- callback(selectedColumnValuesRef === null || selectedColumnValuesRef === void 0 ? void 0 : selectedColumnValuesRef.current);
139
- }
140
- }
141
- }, [getOncopy, getSelectedColumns, selectedColumnValuesRef]);
142
- useEffect(() => {
143
- return () => {
144
- document.body.removeEventListener('mouseup', onEndSelection);
145
- document.body.removeEventListener('contextmenu', onEndSelection);
146
- document.body.removeEventListener('keyup', onKeyUp);
147
- };
148
- }, [onKeyUp, onEndSelection]);
149
- // Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
150
- useEffect(() => {
151
- if (onPaginationChangeDebounced) {
152
- onPaginationChangeDebounced({ pageIndex, pageSize });
153
- }
154
- }, [onPaginationChangeDebounced, pageIndex, pageSize]);
155
- useEffect(() => {
156
- if (onSortingChange) {
157
- onSortingChange(sortBy);
158
- }
159
- }, [sortBy, onSortingChange]);
160
- // Debounce our `fetchData` call for 200ms.
161
- const onRenderedContentChangeDebounced = useMemo(() => (onRenderedContentChange ? debounce(onRenderedContentChange, 200) : undefined), [onRenderedContentChange]);
162
- // Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
163
- useEffect(() => {
164
- if (onRenderedContentChangeDebounced) {
165
- onRenderedContentChangeDebounced(page.map(prepareRow));
166
- }
167
- }, [onRenderedContentChangeDebounced, page]);
168
- // Apply global filter when searchValue changes
169
- useEffect(() => {
170
- if (searchValue !== undefined) {
171
- ;
172
- setGlobalFilter(searchValue);
173
- }
174
- }, [searchValue, setGlobalFilter]);
175
- useEffect(() => {
176
- if (pageCount < pageIndex + 1) {
177
- goToPage(pageCount - 1);
178
- }
179
- }, [pageIndex, pageCount, goToPage]);
180
- useEffect(() => {
181
- if (incomingPageIndex !== undefined && incomingPageIndex !== previousIncomingPageIndex) {
182
- goToPage(incomingPageIndex);
183
- }
184
- }, [goToPage, incomingPageIndex, previousIncomingPageIndex]);
185
- useEffect(() => {
186
- if (onRowSelect) {
187
- onRowSelect(Object.keys(selectedRowIds));
188
- }
189
- }, [onRowSelect, selectedRowIds]);
190
- const hasData = data.length > 0;
191
- // If at least one of the columns has footer then we display the footer row
192
- const hasFooter = !loading && hasData && columns.some((col) => !!col.footer);
193
- // Header row has always aria-rowindex = 1.
194
- const headerIndex = 1;
195
- // We're using this offset to display correct aria-rowindex when pagination is in action.
196
- const cellIndexOffset = pageSize * pageIndex + headerIndex;
197
- // Total row count.
198
- const rowCount = data.length + headerIndex + (hasFooter ? 1 : 0);
199
- const content = (React.createElement(React.Fragment, null,
200
- React.createElement("div", { "data-test": dataTest !== null && dataTest !== void 0 ? dataTest : 'table-wrapper', className: className },
201
- React.createElement("div", { className: cn(styles.container, {
202
- [styles.spaceBottom]: !hidePagination,
203
- }) },
204
- React.createElement("div", { "data-test": "table", role: "table", "aria-rowcount": rowCount },
205
- !hideHeader && (React.createElement("div", { "data-test": "table-header-row-group", role: "rowgroup", className: headerClassName }, tableInstance.getHeaderGroups().map((headerGroup) => (React.createElement(HeaderRow, { key: headerGroup.id, role: "row", ariaRowIndex: headerIndex, style: getRowStyle({ totalSize: tableInstance.getTotalSize() }) }, headerGroup.headers.map((header, i) => {
206
- var _a, _b;
207
- const canSort = header.column.getCanSort();
208
- const isDraggable = columnsOrdering && header.id !== 'expander';
209
- return (React.createElement(Header, { index: i, colSpan: 1, key: header.id, role: "columnheader", onDragStart: onDragStart, style: getCellStyle({ size: header.getSize(), minSize: header.column.columnDef.minSize || header.getSize() }), canSort: canSort, isSorted: !!header.column.getIsSorted(), isSortedDesc: (_a = sortBy[header.column.getSortIndex()]) === null || _a === void 0 ? void 0 : _a.desc, canResize: header.column.getCanResize(), onDrop: isDraggable ? onDrop : undefined, resizeHandler: header.getResizeHandler(), isResizing: header.column.getIsResizing(), align: (_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.align, onClick: canSort ? header.column.getToggleSortingHandler() : undefined },
210
- React.createElement(EnhancedHeaderFooterRenderer, { type: "header", context: header.getContext() })));
211
- })))))),
212
- !overlayLoading && loading ? (React.createElement(Row, { role: "row" },
213
- React.createElement(Cell, { role: "cell", align: "center", colSpan: columns.length, "data-test": "table-loader-cell" },
214
- React.createElement(Loader, null)))) : hasData ? (React.createElement(HotKeys, { keyName: "ctrl+c, command+c", onKeyUp: onKeyUp },
215
- React.createElement("div", { "data-test": "table-cell-row-group", className: styles.hotKeys },
216
- React.createElement(TableContent, { page: page, onCopy: onCopy, getHref: getHref, totalSize: tableInstance.getTotalSize(), rootRef: setContextMenuAnchorEl, ...columnsSelectionProps, onRowClick: onRowClick, className: contentClassName, columnResizing: columnResizing, AnchorComponent: AnchorComponent, cellIndexOffset: cellIndexOffset, getCustomRowProps: getCustomRowProps, getCustomCellProps: getCustomCellProps, renderRowSubComponent: renderRowSubComponent })))) : (React.createElement("div", { role: "row" },
217
- React.createElement("div", { role: "cell" },
218
- React.createElement(EmptyState, { "data-test": "table-no-data", className: styles.empty, title: noDataTitle, icon: AlertTriangle, iconLabel: "Alert" })))),
219
- hasFooter && (React.createElement("div", { "data-test": "table-footer-row-group", role: "rowgroup", className: footerClassName }, footerGroups.map((group) => {
220
- const { id: footerGroupKey } = group;
221
- return (
222
- // Footer props getters do not provide role attributes
223
- React.createElement(Row, { key: footerGroupKey, ariaRowIndex: rowCount, style: getRowStyle({ totalSize: tableInstance.getTotalSize() }), role: "row" }, group.headers.map((column) => {
224
- var _a;
225
- const { id: footerKey, column: { columnDef }, } = column;
226
- return (
227
- // Footer props getters do not provide role attributes
228
- React.createElement(Cell, { key: footerKey, colSpan: 1, align: (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.align, style: getCellStyle({ size: column.getSize(), maxSize: columnDef.maxSize, minSize: columnDef.minSize }), role: "cell" },
229
- React.createElement(EnhancedHeaderFooterRenderer, { context: column.getContext(), type: "footer" })));
230
- })));
231
- }))))),
232
- !hidePagination && hasData && (React.createElement(Pagination, { pageCount: pageCount, currentPage: pageIndex + 1, canPreviousPage: getCanPreviousPage(), canNextPage: getCanNextPage(), goToPage: (p) => {
233
- if (onPageChange) {
234
- onPageChange(p - 1);
235
- }
236
- else {
237
- goToPage(p - 1);
238
- }
239
- }, nextPage: () => {
240
- if (onPageChange) {
241
- onPageChange(pageIndex + 1);
242
- }
243
- else {
244
- nextPage();
245
- }
246
- }, previousPage: () => {
247
- if (onPageChange) {
248
- onPageChange(pageIndex - 1);
249
- }
250
- else {
251
- previousPage();
252
- }
253
- }, pageSize: pageSize, setPageSize: setPageSize, numberOfItems: data.length, pageSizeOptions: (_a = paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSizeOptions) !== null && _a !== void 0 ? _a : [5, 10, 20] }))),
254
- onCopy && React.createElement(ContextMenu, { anchorElement: contextMenuAnchorEl, onCopy: onKeyUp })));
255
- if (children) {
256
- return children(content);
231
+ range
232
+ } = getSelectedColumns();
233
+ if (columns.size || range[0] !== undefined && range[0] !== undefined) {
234
+ callback(selectedColumnValuesRef === null || selectedColumnValuesRef === void 0 ? void 0 : selectedColumnValuesRef.current);
235
+ }
236
+ }
237
+ }, [getOncopy, getSelectedColumns, selectedColumnValuesRef]);
238
+ React.useEffect(() => {
239
+ return () => {
240
+ document.body.removeEventListener('mouseup', onEndSelection);
241
+ document.body.removeEventListener('contextmenu', onEndSelection);
242
+ document.body.removeEventListener('keyup', onKeyUp);
243
+ };
244
+ }, [onKeyUp, onEndSelection]);
245
+ // Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
246
+ React.useEffect(() => {
247
+ if (onPaginationChangeDebounced) {
248
+ onPaginationChangeDebounced({
249
+ pageIndex,
250
+ pageSize
251
+ });
252
+ }
253
+ }, [onPaginationChangeDebounced, pageIndex, pageSize]);
254
+ React.useEffect(() => {
255
+ if (onSortingChange) {
256
+ onSortingChange(sortBy);
257
+ }
258
+ }, [sortBy, onSortingChange]);
259
+ // Debounce our `fetchData` call for 200ms.
260
+ const onRenderedContentChangeDebounced = React.useMemo(() => onRenderedContentChange ? debounce(onRenderedContentChange, 200) : undefined, [onRenderedContentChange]);
261
+ // Listen for changes in pagination and use the state to fetch new data. This is a recommended way to fetch new data: https://react-table.tanstack.com/docs/faq#how-can-i-use-the-table-state-to-fetch-new-data
262
+ React.useEffect(() => {
263
+ if (onRenderedContentChangeDebounced) {
264
+ onRenderedContentChangeDebounced(page.map(components_Table_utils.prepareRow));
265
+ }
266
+ }, [onRenderedContentChangeDebounced, page]);
267
+ // Apply global filter when searchValue changes
268
+ React.useEffect(() => {
269
+ if (searchValue !== undefined) {
270
+ setGlobalFilter(searchValue);
271
+ }
272
+ }, [searchValue, setGlobalFilter]);
273
+ React.useEffect(() => {
274
+ if (pageCount < pageIndex + 1) {
275
+ goToPage(pageCount - 1);
276
+ }
277
+ }, [pageIndex, pageCount, goToPage]);
278
+ React.useEffect(() => {
279
+ if (incomingPageIndex !== undefined && incomingPageIndex !== previousIncomingPageIndex) {
280
+ goToPage(incomingPageIndex);
281
+ }
282
+ }, [goToPage, incomingPageIndex, previousIncomingPageIndex]);
283
+ React.useEffect(() => {
284
+ if (onRowSelect) {
285
+ onRowSelect(Object.keys(selectedRowIds));
257
286
  }
258
- return content;
287
+ }, [onRowSelect, selectedRowIds]);
288
+ const hasData = data.length > 0;
289
+ // If at least one of the columns has footer then we display the footer row
290
+ const hasFooter = !loading && hasData && columns.some(col => !!col.footer);
291
+ // Header row has always aria-rowindex = 1.
292
+ const headerIndex = 1;
293
+ // We're using this offset to display correct aria-rowindex when pagination is in action.
294
+ const cellIndexOffset = pageSize * pageIndex + headerIndex;
295
+ // Total row count.
296
+ const rowCount = data.length + headerIndex + (hasFooter ? 1 : 0);
297
+ const content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
298
+ "data-test": dataTest !== null && dataTest !== void 0 ? dataTest : 'table-wrapper',
299
+ className: className
300
+ }, /*#__PURE__*/React.createElement("div", {
301
+ className: cn(Table_module.default.container, {
302
+ [Table_module.default.spaceBottom]: !hidePagination
303
+ })
304
+ }, /*#__PURE__*/React.createElement("div", {
305
+ "data-test": "table",
306
+ role: "table",
307
+ "aria-rowcount": rowCount
308
+ }, !hideHeader && (/*#__PURE__*/React.createElement("div", {
309
+ "data-test": "table-header-row-group",
310
+ role: "rowgroup",
311
+ className: headerClassName
312
+ }, tableInstance.getHeaderGroups().map(headerGroup => (/*#__PURE__*/React.createElement(components_Table_Row.HeaderRow, {
313
+ key: headerGroup.id,
314
+ role: "row",
315
+ ariaRowIndex: headerIndex,
316
+ style: components_Table_utils.getRowStyle({
317
+ totalSize: tableInstance.getTotalSize()
318
+ })
319
+ }, headerGroup.headers.map((header, i) => {
320
+ var _a, _b;
321
+ const canSort = header.column.getCanSort();
322
+ const isDraggable = columnsOrdering && header.id !== 'expander';
323
+ return /*#__PURE__*/React.createElement(components_Table_Header.Header, {
324
+ index: i,
325
+ colSpan: 1,
326
+ key: header.id,
327
+ role: "columnheader",
328
+ onDragStart: onDragStart,
329
+ style: components_Table_utils.getCellStyle({
330
+ size: header.getSize(),
331
+ minSize: header.column.columnDef.minSize || header.getSize()
332
+ }),
333
+ canSort: canSort,
334
+ isSorted: !!header.column.getIsSorted(),
335
+ isSortedDesc: (_a = sortBy[header.column.getSortIndex()]) === null || _a === void 0 ? void 0 : _a.desc,
336
+ canResize: header.column.getCanResize(),
337
+ onDrop: isDraggable ? onDrop : undefined,
338
+ resizeHandler: header.getResizeHandler(),
339
+ isResizing: header.column.getIsResizing(),
340
+ align: (_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.align,
341
+ onClick: canSort ? header.column.getToggleSortingHandler() : undefined
342
+ }, /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedHeaderFooterRenderer, {
343
+ type: "header",
344
+ context: header.getContext()
345
+ }));
346
+ })))))), !overlayLoading && loading ? (/*#__PURE__*/React.createElement(components_Table_Row.Row, {
347
+ role: "row"
348
+ }, /*#__PURE__*/React.createElement(components_Table_Cell.Cell, {
349
+ role: "cell",
350
+ align: "center",
351
+ colSpan: columns.length,
352
+ "data-test": "table-loader-cell"
353
+ }, /*#__PURE__*/React.createElement(components_Loader.Loader, null)))) : hasData ? (/*#__PURE__*/React.createElement(HotKeys, {
354
+ keyName: "ctrl+c, command+c",
355
+ onKeyUp: onKeyUp
356
+ }, /*#__PURE__*/React.createElement("div", {
357
+ "data-test": "table-cell-row-group",
358
+ className: Table_module.default.hotKeys
359
+ }, /*#__PURE__*/React.createElement(components_Table_TableContent.TableContent, {
360
+ page: page,
361
+ onCopy: onCopy,
362
+ getHref: getHref,
363
+ totalSize: tableInstance.getTotalSize(),
364
+ rootRef: setContextMenuAnchorEl,
365
+ ...columnsSelectionProps,
366
+ onRowClick: onRowClick,
367
+ className: contentClassName,
368
+ columnResizing: columnResizing,
369
+ AnchorComponent: AnchorComponent,
370
+ cellIndexOffset: cellIndexOffset,
371
+ getCustomRowProps: getCustomRowProps,
372
+ getCustomCellProps: getCustomCellProps,
373
+ renderRowSubComponent: renderRowSubComponent
374
+ })))) : (/*#__PURE__*/React.createElement("div", {
375
+ role: "row"
376
+ }, /*#__PURE__*/React.createElement("div", {
377
+ role: "cell"
378
+ }, /*#__PURE__*/React.createElement(components_EmptyState.EmptyState, {
379
+ "data-test": "table-no-data",
380
+ className: Table_module.default.empty,
381
+ title: noDataTitle,
382
+ icon: reactFeather.AlertTriangle,
383
+ iconLabel: "Alert"
384
+ })))), hasFooter && (/*#__PURE__*/React.createElement("div", {
385
+ "data-test": "table-footer-row-group",
386
+ role: "rowgroup",
387
+ className: footerClassName
388
+ }, footerGroups.map(group => {
389
+ const {
390
+ id: footerGroupKey
391
+ } = group;
392
+ return (
393
+ /*#__PURE__*/
394
+ // Footer props getters do not provide role attributes
395
+ React.createElement(components_Table_Row.Row, {
396
+ key: footerGroupKey,
397
+ ariaRowIndex: rowCount,
398
+ style: components_Table_utils.getRowStyle({
399
+ totalSize: tableInstance.getTotalSize()
400
+ }),
401
+ role: "row"
402
+ }, group.headers.map(column => {
403
+ var _a;
404
+ const {
405
+ id: footerKey,
406
+ column: {
407
+ columnDef
408
+ }
409
+ } = column;
410
+ return (
411
+ /*#__PURE__*/
412
+ // Footer props getters do not provide role attributes
413
+ React.createElement(components_Table_Cell.Cell, {
414
+ key: footerKey,
415
+ colSpan: 1,
416
+ align: (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.align,
417
+ style: components_Table_utils.getCellStyle({
418
+ size: column.getSize(),
419
+ maxSize: columnDef.maxSize,
420
+ minSize: columnDef.minSize
421
+ }),
422
+ role: "cell"
423
+ }, /*#__PURE__*/React.createElement(components_Table_EnhancedRenderers.EnhancedHeaderFooterRenderer, {
424
+ context: column.getContext(),
425
+ type: "footer"
426
+ }))
427
+ );
428
+ }))
429
+ );
430
+ }))))), !hidePagination && hasData && (/*#__PURE__*/React.createElement(components_Pagination.Pagination, {
431
+ pageCount: pageCount,
432
+ currentPage: pageIndex + 1,
433
+ canPreviousPage: getCanPreviousPage(),
434
+ canNextPage: getCanNextPage(),
435
+ goToPage: p => {
436
+ if (onPageChange) {
437
+ onPageChange(p - 1);
438
+ } else {
439
+ goToPage(p - 1);
440
+ }
441
+ },
442
+ nextPage: () => {
443
+ if (onPageChange) {
444
+ onPageChange(pageIndex + 1);
445
+ } else {
446
+ nextPage();
447
+ }
448
+ },
449
+ previousPage: () => {
450
+ if (onPageChange) {
451
+ onPageChange(pageIndex - 1);
452
+ } else {
453
+ previousPage();
454
+ }
455
+ },
456
+ pageSize: pageSize,
457
+ setPageSize: setPageSize,
458
+ numberOfItems: data.length,
459
+ pageSizeOptions: (_a = paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSizeOptions) !== null && _a !== void 0 ? _a : [5, 10, 20]
460
+ }))), onCopy && /*#__PURE__*/React.createElement(components_Table_features_columnsSelection_ContextMenu_ContextMenu.ContextMenu, {
461
+ anchorElement: contextMenuAnchorEl,
462
+ onCopy: onKeyUp
463
+ }));
464
+ if (children) {
465
+ return children(content);
466
+ }
467
+ return content;
259
468
  };
260
- //# sourceMappingURL=Table.js.map
469
+
470
+ exports.Table = Table;
471
+ //# sourceMappingURL=Table.js.map