@reportportal/ui-kit 0.0.1-alpha.17 → 0.0.1-alpha.170

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 (296) hide show
  1. package/README.md +28 -2
  2. package/dist/actionMenu-77a63b96.js +155 -0
  3. package/dist/actionMenu.js +30 -0
  4. package/dist/adaptiveTagList.js +189 -0
  5. package/dist/attachedFile.js +9 -0
  6. package/dist/autocompletes.js +780 -0
  7. package/dist/baseIconButton-251479f7.js +25 -0
  8. package/dist/baseIconButton.js +1 -1
  9. package/dist/breadcrumbs-9b38b89c.js +184 -0
  10. package/dist/breadcrumbs.js +13 -0
  11. package/dist/bubblesLoader-f3ffa240.js +28 -0
  12. package/dist/bubblesLoader.js +1 -1
  13. package/dist/bulkPanel.js +222 -0
  14. package/dist/button-97d9e587.js +66 -0
  15. package/dist/button.js +1 -1
  16. package/dist/calendarArrow-44c7e60e.js +5 -0
  17. package/dist/checkbox-493fdc63.js +73 -0
  18. package/dist/checkbox.js +1 -1
  19. package/dist/chevronDownDropdown-0260bb66.js +5 -0
  20. package/dist/chip.js +72 -0
  21. package/dist/clear-53660571.js +5 -0
  22. package/dist/close-4d480ef7.js +5 -0
  23. package/dist/common/constants/floatingUi.d.ts +8 -0
  24. package/dist/common/constants/sortable.d.ts +1 -0
  25. package/dist/common/hooks/index.d.ts +3 -0
  26. package/dist/common/hooks/useOnClickOutside.d.ts +5 -1
  27. package/dist/common/hooks/useSortable.d.ts +3 -0
  28. package/dist/common/hooks/useTreeDropValidation.d.ts +5 -0
  29. package/dist/common/hooks/useTreeSortable.d.ts +3 -0
  30. package/dist/common/hooks.js +67 -0
  31. package/dist/common/types/commonTypes.d.ts +4 -0
  32. package/dist/common/types/index.d.ts +2 -0
  33. package/dist/common/types/sortableTypes.d.ts +168 -0
  34. package/dist/common/utils/floatingUi.d.ts +3 -0
  35. package/dist/common/utils/getFileExtension.d.ts +1 -0
  36. package/dist/common/utils/htmlAttributes.d.ts +20 -0
  37. package/dist/common/utils/index.d.ts +4 -0
  38. package/dist/common/utils/isString.d.ts +1 -0
  39. package/dist/common/utils/testUtils.d.ts +3 -0
  40. package/dist/common.js +21 -0
  41. package/dist/components/actionMenu/actionMenu.d.ts +33 -0
  42. package/dist/components/actionMenu/constants.d.ts +3 -0
  43. package/dist/components/actionMenu/index.d.ts +18 -0
  44. package/dist/components/adaptiveTagList/adaptiveTagList.d.ts +11 -0
  45. package/dist/components/adaptiveTagList/constants.d.ts +6 -0
  46. package/dist/components/adaptiveTagList/index.d.ts +2 -0
  47. package/dist/components/attachedFile/attachedFile.d.ts +14 -0
  48. package/dist/components/attachedFile/index.d.ts +2 -0
  49. package/dist/components/autocompletes/common/autocompleteMenu/autocompleteMenu.d.ts +10 -0
  50. package/dist/components/autocompletes/common/autocompleteMenu/index.d.ts +1 -0
  51. package/dist/components/autocompletes/common/autocompleteOption/autocompleteOption.d.ts +13 -0
  52. package/dist/components/autocompletes/common/autocompleteOption/index.d.ts +1 -0
  53. package/dist/components/autocompletes/common/autocompleteOptions.d.ts +19 -0
  54. package/dist/components/autocompletes/common/autocompletePrompt/autocompletePrompt.d.ts +7 -0
  55. package/dist/components/autocompletes/common/autocompletePrompt/index.d.ts +1 -0
  56. package/dist/components/autocompletes/common/index.d.ts +19 -0
  57. package/dist/components/autocompletes/constants.d.ts +2 -0
  58. package/dist/components/autocompletes/index.d.ts +3 -0
  59. package/dist/components/autocompletes/multipleAutocomplete/index.d.ts +17 -0
  60. package/dist/components/autocompletes/multipleAutocomplete/multipleAutocomplete.d.ts +53 -0
  61. package/dist/components/autocompletes/multipleAutocomplete/multipleDownshift.d.ts +25 -0
  62. package/dist/components/autocompletes/multipleAutocomplete/selectedItems/index.d.ts +1 -0
  63. package/dist/components/autocompletes/multipleAutocomplete/selectedItems/selectedItems.d.ts +41 -0
  64. package/dist/components/autocompletes/singleAutocomplete/index.d.ts +1 -0
  65. package/dist/components/autocompletes/singleAutocomplete/singleAutocomplete.d.ts +42 -0
  66. package/dist/components/autocompletes/types.d.ts +8 -0
  67. package/dist/components/autocompletes/utils.d.ts +5 -0
  68. package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +1 -0
  69. package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +1 -0
  70. package/dist/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +10 -0
  71. package/dist/components/breadcrumbs/breadcrumb/index.d.ts +1 -0
  72. package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -0
  73. package/dist/components/breadcrumbs/breadcrumbsProvider/breadcrumbsProvider.d.ts +13 -0
  74. package/dist/components/breadcrumbs/breadcrumbsProvider/hooks.d.ts +3 -0
  75. package/dist/components/breadcrumbs/breadcrumbsProvider/index.d.ts +1 -0
  76. package/dist/components/breadcrumbs/hiddenBreadcrumbs/hiddenBreadcrumbs.d.ts +6 -0
  77. package/dist/components/breadcrumbs/hiddenBreadcrumbs/index.d.ts +2 -0
  78. package/dist/components/breadcrumbs/index.d.ts +5 -0
  79. package/dist/components/breadcrumbs/tree/index.d.ts +1 -0
  80. package/dist/components/breadcrumbs/tree/tree.d.ts +7 -0
  81. package/dist/components/breadcrumbs/types.d.ts +24 -0
  82. package/dist/components/bubblesLoader/bubblesLoader.d.ts +2 -0
  83. package/dist/components/bubblesLoader/index.d.ts +1 -0
  84. package/dist/components/bulkPanel/bulkPanel.d.ts +3 -0
  85. package/dist/components/bulkPanel/index.d.ts +2 -0
  86. package/dist/components/bulkPanel/types.d.ts +46 -0
  87. package/dist/components/button/button.d.ts +5 -4
  88. package/dist/components/button/index.d.ts +1 -0
  89. package/dist/components/checkbox/checkbox.d.ts +2 -1
  90. package/dist/components/checkbox/index.d.ts +1 -0
  91. package/dist/components/chip/chip.d.ts +15 -0
  92. package/dist/components/chip/index.d.ts +2 -0
  93. package/dist/components/datePicker/datePicker.d.ts +17 -7
  94. package/dist/components/datePicker/header/datePickerHeader.d.ts +1 -0
  95. package/dist/components/datePicker/header/index.d.ts +1 -0
  96. package/dist/components/datePicker/index.d.ts +3 -1
  97. package/dist/components/datePicker/utils.d.ts +2 -1
  98. package/dist/components/dropdown/constants.d.ts +4 -0
  99. package/dist/components/dropdown/dropdown.d.ts +36 -5
  100. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
  101. package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
  102. package/dist/components/dropdown/index.d.ts +2 -0
  103. package/dist/components/dropdown/types.d.ts +11 -0
  104. package/dist/components/dropdown/utils.d.ts +6 -2
  105. package/dist/components/fieldLabel/fieldLabel.d.ts +7 -0
  106. package/dist/components/fieldLabel/index.d.ts +1 -0
  107. package/dist/components/fieldNumber/constants.d.ts +1 -0
  108. package/dist/components/fieldNumber/fieldNumber.d.ts +3 -3
  109. package/dist/components/fieldNumber/index.d.ts +1 -0
  110. package/dist/components/fieldText/fieldText.d.ts +12 -4
  111. package/dist/components/fieldText/index.d.ts +3 -1
  112. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +5 -2
  113. package/dist/components/fieldTextFlex/index.d.ts +1 -0
  114. package/dist/components/fileDropArea/attachedFilesList/attachedFilesList.d.ts +21 -0
  115. package/dist/components/fileDropArea/attachedFilesList/index.d.ts +5 -0
  116. package/dist/components/fileDropArea/browseButton/browseButton.d.ts +9 -0
  117. package/dist/components/fileDropArea/browseButton/index.d.ts +4 -0
  118. package/dist/components/fileDropArea/constants.d.ts +2 -0
  119. package/dist/components/fileDropArea/dropZone/dropZone.d.ts +10 -0
  120. package/dist/components/fileDropArea/dropZone/index.d.ts +4 -0
  121. package/dist/components/fileDropArea/errorMessage/errorMessage.d.ts +5 -0
  122. package/dist/components/fileDropArea/errorMessage/index.d.ts +4 -0
  123. package/dist/components/fileDropArea/fileDropArea.d.ts +19 -0
  124. package/dist/components/fileDropArea/fileDropAreaProvider/fileDropAreaProvider.d.ts +17 -0
  125. package/dist/components/fileDropArea/fileDropAreaProvider/index.d.ts +1 -0
  126. package/dist/components/fileDropArea/fileDropAreaProvider/useFileDropAreaContext.d.ts +3 -0
  127. package/dist/components/fileDropArea/hooks/index.d.ts +1 -0
  128. package/dist/components/fileDropArea/hooks/useFileDropArea.d.ts +13 -0
  129. package/dist/components/fileDropArea/hooks/useFileProcessing.d.ts +13 -0
  130. package/dist/components/fileDropArea/hooks/useOverlayDropArea.d.ts +22 -0
  131. package/dist/components/fileDropArea/index.d.ts +6 -0
  132. package/dist/components/fileDropArea/types.d.ts +58 -0
  133. package/dist/components/fileDropArea/utils/getValidationErrorMessage.d.ts +3 -0
  134. package/dist/components/fileDropArea/utils/index.d.ts +2 -0
  135. package/dist/components/fileDropArea/utils/validateFile.d.ts +3 -0
  136. package/dist/components/filterItem/filterItem.d.ts +18 -0
  137. package/dist/components/filterItem/index.d.ts +17 -0
  138. package/dist/components/filtersButton/filtersButton.d.ts +9 -0
  139. package/dist/components/filtersButton/index.d.ts +2 -0
  140. package/dist/components/icons/index.d.ts +63 -9
  141. package/dist/components/index.d.ts +32 -10
  142. package/dist/components/issueList/constants.d.ts +5 -0
  143. package/dist/components/issueList/index.d.ts +2 -0
  144. package/dist/components/issueList/issueList.d.ts +18 -0
  145. package/dist/components/maxValueDisplay/index.d.ts +4 -0
  146. package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +8 -0
  147. package/dist/components/maxValueDisplay/utils/index.d.ts +1 -0
  148. package/dist/components/maxValueDisplay/utils/isPositiveInteger.d.ts +1 -0
  149. package/dist/components/modal/index.d.ts +1 -0
  150. package/dist/components/modal/modal.d.ts +4 -4
  151. package/dist/components/modal/modalContent/modalContent.d.ts +3 -2
  152. package/dist/components/modal/modalFooter/modalFooter.d.ts +3 -1
  153. package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -0
  154. package/dist/components/modal/types.d.ts +6 -0
  155. package/dist/components/pagination/index.d.ts +1 -0
  156. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +5 -2
  157. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
  158. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
  159. package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
  160. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
  161. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
  162. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
  163. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
  164. package/dist/components/pagination/pagination.d.ts +6 -2
  165. package/dist/components/popover/index.d.ts +4 -1
  166. package/dist/components/popover/popover.d.ts +3 -2
  167. package/dist/components/radio/index.d.ts +1 -0
  168. package/dist/components/radio/radio.d.ts +1 -0
  169. package/dist/components/radio/radioGroup.d.ts +1 -0
  170. package/dist/components/segmentedControl/index.d.ts +17 -0
  171. package/dist/components/segmentedControl/segmentedControl.d.ts +4 -0
  172. package/dist/components/segmentedControl/types.d.ts +18 -0
  173. package/dist/components/selection/index.d.ts +5 -0
  174. package/dist/components/selection/selection.d.ts +12 -0
  175. package/dist/components/selection/types.d.ts +1 -0
  176. package/dist/components/sidePanel/index.d.ts +2 -0
  177. package/dist/components/sidePanel/sidePanel.d.ts +17 -0
  178. package/dist/components/sortable/dragLayer/dragLayer.d.ts +3 -0
  179. package/dist/components/sortable/dragLayer/index.d.ts +1 -0
  180. package/dist/components/sortable/helpers.d.ts +11 -0
  181. package/dist/components/sortable/index.d.ts +5 -0
  182. package/dist/components/sortable/sortableItem/index.d.ts +1 -0
  183. package/dist/components/sortable/sortableItem/sortableItem.d.ts +3 -0
  184. package/dist/components/sortable/sortableList/index.d.ts +1 -0
  185. package/dist/components/sortable/sortableList/sortableList.d.ts +5 -0
  186. package/dist/components/sortable/treeSortableContainer/TreeSortableContext.d.ts +11 -0
  187. package/dist/components/sortable/treeSortableContainer/index.d.ts +2 -0
  188. package/dist/components/sortable/treeSortableContainer/treeSortableContainer.d.ts +3 -0
  189. package/dist/components/sortable/treeSortableItem/index.d.ts +1 -0
  190. package/dist/components/sortable/treeSortableItem/treeSortableItem.d.ts +3 -0
  191. package/dist/components/spinLoader/index.d.ts +4 -0
  192. package/dist/components/spinLoader/spinLoader.d.ts +8 -0
  193. package/dist/components/systemAlert/index.d.ts +1 -0
  194. package/dist/components/systemAlert/systemAlert.d.ts +4 -0
  195. package/dist/components/systemAlert/types.d.ts +22 -0
  196. package/dist/components/systemMessage/index.d.ts +1 -0
  197. package/dist/components/systemMessage/systemMessage.d.ts +1 -0
  198. package/dist/components/table/constants.d.ts +6 -0
  199. package/dist/components/table/gradientOverlay/gradientOverlay.d.ts +19 -0
  200. package/dist/components/table/gradientOverlay/index.d.ts +2 -0
  201. package/dist/components/table/hooks/index.d.ts +8 -0
  202. package/dist/components/table/hooks/useCheckboxRowSync.d.ts +10 -0
  203. package/dist/components/table/hooks/useColumnResize.d.ts +21 -0
  204. package/dist/components/table/hooks/useColumnWidths.d.ts +8 -0
  205. package/dist/components/table/hooks/useGradientPosition.d.ts +24 -0
  206. package/dist/components/table/hooks/useTableColumns.d.ts +13 -0
  207. package/dist/components/table/hooks/useTableExpansion.d.ts +15 -0
  208. package/dist/components/table/hooks/useTableHover.d.ts +10 -0
  209. package/dist/components/table/index.d.ts +2 -0
  210. package/dist/components/table/resizeHandle/index.d.ts +1 -0
  211. package/dist/components/table/resizeHandle/resizeHandle.d.ts +2 -0
  212. package/dist/components/table/table.d.ts +1 -0
  213. package/dist/components/table/types.d.ts +43 -9
  214. package/dist/components/table/utils.d.ts +10 -1
  215. package/dist/components/themeProvider/index.d.ts +1 -0
  216. package/dist/components/themeProvider/themeProvider.d.ts +1 -0
  217. package/dist/components/toggle/index.d.ts +1 -0
  218. package/dist/components/toggle/toggle.d.ts +1 -0
  219. package/dist/components/tooltip/tooltip.d.ts +10 -1
  220. package/dist/datePicker-412fb8e8.js +213 -0
  221. package/dist/datePicker.js +32 -0
  222. package/dist/dropdown-0260bb66.js +5 -0
  223. package/dist/dropdown-7d024c49.js +642 -0
  224. package/dist/dropdown.js +13 -3
  225. package/dist/fieldLabel.js +18 -0
  226. package/dist/fieldNumber-d1b5a7a1.js +140 -0
  227. package/dist/fieldNumber.js +5 -2
  228. package/dist/fieldText-1749da7a.js +167 -0
  229. package/dist/fieldText.js +7 -2
  230. package/dist/fieldTextFlex-2f51c173.js +80 -0
  231. package/dist/fieldTextFlex.js +3 -1
  232. package/dist/fileDropArea.js +325 -0
  233. package/dist/filterItem.js +96 -0
  234. package/dist/filterOutline-819b4b0d.js +6 -0
  235. package/dist/filtersButton.js +25 -0
  236. package/dist/floatingUi-41f8c7b5.js +29 -0
  237. package/dist/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
  238. package/dist/fonts/OpenSans/OpenSans-Medium.ttf +0 -0
  239. package/dist/icons.js +89 -0
  240. package/dist/index-1a874a8b.js +110 -0
  241. package/dist/index.js +188 -242
  242. package/dist/isEmpty-ccacb5ff.js +38 -0
  243. package/dist/issueList.js +125 -0
  244. package/dist/maxValueDisplay-9be01a75.js +13 -0
  245. package/dist/maxValueDisplay.js +6 -0
  246. package/dist/meatballMenu-535635a9.js +5 -0
  247. package/dist/minus-2857540f.js +5 -0
  248. package/dist/modal.js +170 -14
  249. package/dist/openEye-950159cb.js +6 -0
  250. package/dist/pagination-4ded0ec6.js +355 -0
  251. package/dist/pagination.js +12 -5
  252. package/dist/plus-199fb2a8.js +5 -0
  253. package/dist/popover.js +58 -73
  254. package/dist/prevPage-87faf576.js +6 -0
  255. package/dist/radio-62546efa.js +76 -0
  256. package/dist/radio.js +1 -1
  257. package/dist/resizeColumn-46b5b30f.js +7 -0
  258. package/dist/segmentedControl.js +62 -0
  259. package/dist/selection-9124d029.js +38 -0
  260. package/dist/selection.js +10 -0
  261. package/dist/sidePanel.js +88 -0
  262. package/dist/sortable.js +302 -0
  263. package/dist/spinLoader-c4a53718.js +11 -0
  264. package/dist/spinLoader.js +7 -0
  265. package/dist/style.css +15 -1
  266. package/dist/success-8fd8bd2c.js +7 -0
  267. package/dist/systemAlert.js +69 -0
  268. package/dist/systemMessage-924fdaa6.js +30 -0
  269. package/dist/systemMessage.js +1 -1
  270. package/dist/table-03bd209d.js +1099 -0
  271. package/dist/table.js +10 -3
  272. package/dist/toggle-304107fa.js +59 -0
  273. package/dist/toggle.js +1 -1
  274. package/dist/tooltip.js +90 -57
  275. package/dist/tree-e7a0ef42.js +5 -0
  276. package/dist/useOnClickOutside-8f7d68a1.js +25 -0
  277. package/dist/useTreeSortable-70a9c8f5.js +179 -0
  278. package/dist/useWindowResize-a7e1ac92.js +16 -0
  279. package/dist/warning-537ead32.js +5 -0
  280. package/dist/xls-995781cc.js +11 -0
  281. package/package.json +51 -17
  282. package/dist/baseIconButton-7bc53dec.js +0 -25
  283. package/dist/bubblesLoader-a7e709d4.js +0 -17
  284. package/dist/button-bb309472.js +0 -62
  285. package/dist/checkbox-6777be17.js +0 -73
  286. package/dist/dropdown-50124296.js +0 -215
  287. package/dist/fieldNumber-46fe79b9.js +0 -127
  288. package/dist/fieldText-49fe2895.js +0 -102
  289. package/dist/fieldTextFlex-5bddf46a.js +0 -67
  290. package/dist/index-2a2d261a.js +0 -145
  291. package/dist/pagination-39b1fa15.js +0 -346
  292. package/dist/radio-fd49a09c.js +0 -76
  293. package/dist/systemMessage-1ced6079.js +0 -30
  294. package/dist/table-83e050dc.js +0 -147
  295. package/dist/toggle-9284387b.js +0 -67
  296. package/dist/useOnClickOutside-c332f7d3.js +0 -16
@@ -0,0 +1,1099 @@
1
+ import { jsx as h, jsxs as D, Fragment as At } from "react/jsx-runtime";
2
+ import { useMemo as Q, useState as q, useCallback as $, useEffect as B, useRef as P, useLayoutEffect as et, forwardRef as Mt } from "react";
3
+ import { Resizable as $t } from "react-resizable";
4
+ import { c as me } from "./bind-06a7ff84.js";
5
+ import { b as Wt, a as Ye, S as Ht } from "./resizeColumn-46b5b30f.js";
6
+ import { S as Je } from "./chevronDownDropdown-0260bb66.js";
7
+ import { C as ae } from "./checkbox-493fdc63.js";
8
+ import { Tooltip as Pt } from "./tooltip.js";
9
+ import { createPortal as Bt } from "react-dom";
10
+ import { i as St } from "./isEmpty-ccacb5ff.js";
11
+ const tt = (t) => typeof t == "string", Gt = "_table_1se0v_1", Ft = "_resizable_1se0v_67", qt = "_selectable_1se0v_84", Ut = "_expanded_1se0v_80", Dt = "_label_1se0v_353", jt = {
12
+ table: Gt,
13
+ "fixed-header": "_fixed-header_1se0v_10",
14
+ "external-scroll-container": "_external-scroll-container_1se0v_14",
15
+ "horizontally-scrollable-container": "_horizontally-scrollable-container_1se0v_21",
16
+ "table-header": "_table-header_1se0v_26",
17
+ "sticky-header": "_sticky-header_1se0v_34",
18
+ "pinned-header": "_pinned-header_1se0v_44",
19
+ "horizontally-scrollable": "_horizontally-scrollable_1se0v_21",
20
+ resizable: Ft,
21
+ "resizable-column": "_resizable-column_1se0v_67",
22
+ "table-row": "_table-row_1se0v_75",
23
+ "expanded-cell": "_expanded-cell_1se0v_80",
24
+ selectable: qt,
25
+ "row-content-wrapper": "_row-content-wrapper_1se0v_88",
26
+ "pinned-column": "_pinned-column_1se0v_96",
27
+ "has-scroll": "_has-scroll_1se0v_96",
28
+ "table-row-content": "_table-row-content_1se0v_99",
29
+ "expand-cell": "_expand-cell_1se0v_116",
30
+ "left-border-accent": "_left-border-accent_1se0v_119",
31
+ "size-small": "_size-small_1se0v_129",
32
+ "size-large": "_size-large_1se0v_140",
33
+ "table-body": "_table-body_1se0v_152",
34
+ "scrollable-body": "_scrollable-body_1se0v_158",
35
+ "table-header-cell": "_table-header-cell_1se0v_222",
36
+ "table-cell": "_table-cell_1se0v_223",
37
+ "action-menu-cell": "_action-menu-cell_1se0v_229",
38
+ "checkbox-cell": "_checkbox-cell_1se0v_257",
39
+ "expand-all-tooltip-wrapper": "_expand-all-tooltip-wrapper_1se0v_302",
40
+ "expand-all-tooltip-content": "_expand-all-tooltip-content_1se0v_311",
41
+ "expand-icon": "_expand-icon_1se0v_320",
42
+ expanded: Ut,
43
+ "primary-cell": "_primary-cell_1se0v_329",
44
+ label: Dt,
45
+ "sortable-cell": "_sortable-cell_1se0v_367",
46
+ "align-right": "_align-right_1se0v_370",
47
+ "align-center": "_align-center_1se0v_376",
48
+ "table-wrapper": "_table-wrapper_1se0v_430",
49
+ "checkbox-column": "_checkbox-column_1se0v_442",
50
+ "checkbox-header": "_checkbox-header_1se0v_454",
51
+ "checkbox-body": "_checkbox-body_1se0v_478",
52
+ "checkbox-row": "_checkbox-row_1se0v_485"
53
+ }, nt = "asc", Z = 32, st = 100, Rt = 48, we = 48, Xt = (t) => t.toLowerCase() === nt, It = (t) => t.map((c) => c.key), C = (t) => "primary" in t && t.primary === !0, Qe = (t) => {
54
+ var o;
55
+ return `size-${((o = t.rowConfigs) == null ? void 0 : o.size) ?? "default"}`;
56
+ }, ye = (t) => tt(t) ? t : `${t}px`, Vt = (t, c, o, i, p, u = !1) => {
57
+ let d = 0;
58
+ i && (d += Z), p && !u && (d += Z);
59
+ for (let v = 0; v < t; v++) {
60
+ const l = c[v];
61
+ if (C(l)) {
62
+ const r = o.current.get(l.key) || st;
63
+ d += r;
64
+ } else {
65
+ const r = l, a = tt(r.width) ? parseInt(r.width, 10) || 0 : r.width;
66
+ d += a;
67
+ }
68
+ }
69
+ return d;
70
+ }, de = (t, c, o, i, p, u, d, v = !1) => {
71
+ const l = {};
72
+ if (!C(t)) {
73
+ const r = t;
74
+ l.textAlign = r.align;
75
+ }
76
+ if (c && o !== void 0) {
77
+ const r = Vt(
78
+ o,
79
+ i,
80
+ p,
81
+ u,
82
+ d,
83
+ v
84
+ );
85
+ l.left = `${r}px`;
86
+ }
87
+ return l;
88
+ }, Ze = (t, c, o, i, p, u = !1, d, v = !1, l = !1) => {
89
+ const r = [];
90
+ o && r.push(`${Z}px`), u && i && !l && r.push(`${Z}px`);
91
+ const a = (b) => {
92
+ if ((d == null ? void 0 : d[b.key]) !== void 0) {
93
+ r.push(`${d[b.key]}px`);
94
+ return;
95
+ }
96
+ if (C(b)) {
97
+ const y = b;
98
+ if (v && y.width) {
99
+ r.push(ye(y.width));
100
+ return;
101
+ }
102
+ const L = y.width ? ye(y.width) : `${st}px`;
103
+ r.push(`minmax(${L}, 1fr)`);
104
+ } else {
105
+ const L = ye(b.width);
106
+ r.push(L);
107
+ }
108
+ };
109
+ return t.forEach(a), c.forEach(a), p && r.push(`${Rt}px`), r.join(" ");
110
+ }, Ct = ({
111
+ primaryColumns: t,
112
+ fixedColumns: c,
113
+ pinnedColumnKeys: o
114
+ }) => Q(() => {
115
+ const i = [], p = [];
116
+ return t.forEach((u) => {
117
+ const d = { ...u, primary: !0 };
118
+ o.includes(u.key) ? i.push(d) : p.push(d);
119
+ }), c.forEach((u) => {
120
+ o.includes(u.key) ? i.push(u) : p.push(u);
121
+ }), {
122
+ pinnedColumns: i,
123
+ scrollableColumns: p
124
+ };
125
+ }, [t, c, o]), Yt = () => {
126
+ const [t, c] = q(null), [o, i] = q(null), p = $((l) => {
127
+ c(l);
128
+ }, []), u = $(() => {
129
+ c(null);
130
+ }, []), d = $((l) => {
131
+ i(l);
132
+ }, []), v = $(() => {
133
+ i(null);
134
+ }, []);
135
+ return {
136
+ hoveredColumn: t,
137
+ hoveredRow: o,
138
+ handleColumnMouseEnter: p,
139
+ handleColumnMouseLeave: u,
140
+ handleRowMouseEnter: d,
141
+ handleRowMouseLeave: v
142
+ };
143
+ }, Jt = ({
144
+ primaryColumns: t,
145
+ fixedColumns: c,
146
+ expandedRowIds: o,
147
+ onToggleRowExpansion: i
148
+ }) => {
149
+ const [p, u] = q(/* @__PURE__ */ new Set());
150
+ B(() => {
151
+ const l = [
152
+ ...t.map((a) => a.key),
153
+ ...c.map((a) => a.key)
154
+ ], r = /* @__PURE__ */ new Set();
155
+ o.forEach((a) => {
156
+ l.forEach((b) => {
157
+ r.add(`${a}-${b}`);
158
+ });
159
+ }), u((a) => {
160
+ if (a.size === r.size) {
161
+ let b = !0;
162
+ if (a.forEach((y) => {
163
+ r.has(y) || (b = !1);
164
+ }), b)
165
+ return a;
166
+ }
167
+ return r;
168
+ });
169
+ }, [o, t, c]);
170
+ const d = $(
171
+ (l) => {
172
+ const r = new Set(p), a = o.includes(l), b = [
173
+ ...t.map((y) => y.key),
174
+ ...c.map((y) => y.key)
175
+ ];
176
+ a ? b.forEach((y) => {
177
+ const L = `${l}-${y}`;
178
+ r.delete(L);
179
+ }) : b.forEach((y) => {
180
+ const L = `${l}-${y}`;
181
+ r.add(L);
182
+ }), u(r), i(l);
183
+ },
184
+ [p, o, t, c, i]
185
+ ), v = $(
186
+ (l, r) => {
187
+ const a = `${l}-${r}`;
188
+ return p.has(a);
189
+ },
190
+ [p]
191
+ );
192
+ return {
193
+ expandedCells: p,
194
+ handleToggleRowExpansion: d,
195
+ isCellExpanded: v
196
+ };
197
+ }, Qt = () => {
198
+ const t = P(/* @__PURE__ */ new Map()), c = $(
199
+ (o) => (i) => {
200
+ if (!i)
201
+ return;
202
+ const p = i.getBoundingClientRect().width;
203
+ p > 0 && t.current.set(o, p);
204
+ },
205
+ []
206
+ );
207
+ return {
208
+ columnWidthsRef: t,
209
+ setCellRef: c
210
+ };
211
+ }, Zt = ({
212
+ enabled: t = !1,
213
+ minWidth: c = 50,
214
+ maxWidth: o = 500,
215
+ columns: i = [],
216
+ columnWidthsRef: p,
217
+ onColumnResize: u,
218
+ initialColumnWidths: d
219
+ }) => {
220
+ const [v, l] = q({}), r = P(i), a = P(void 0);
221
+ B(() => {
222
+ r.current = i;
223
+ }, [i]);
224
+ const b = $(
225
+ (_) => {
226
+ const T = i.find((k) => k.key === _);
227
+ return {
228
+ minWidth: (T == null ? void 0 : T.minWidth) ?? c,
229
+ maxWidth: (T == null ? void 0 : T.maxWidth) ?? o
230
+ };
231
+ },
232
+ [i, c, o]
233
+ );
234
+ B(() => {
235
+ if (d && a.current !== d) {
236
+ const T = {};
237
+ Object.entries(d).forEach(([k, M]) => {
238
+ const z = r.current.find((X) => X.key === k), S = (z == null ? void 0 : z.minWidth) ?? c, A = (z == null ? void 0 : z.maxWidth) ?? o;
239
+ T[k] = Math.min(A, Math.max(S, M));
240
+ }), l(T), a.current = d;
241
+ }
242
+ }, [d, c, o]);
243
+ const y = $(() => {
244
+ if (!t || Object.keys(v).length > 0 || !p)
245
+ return;
246
+ const _ = {};
247
+ p.current.forEach((T, k) => {
248
+ _[k] = T;
249
+ }), l(_);
250
+ }, [t, v, p]), L = $(
251
+ (_) => (T, { size: k }) => {
252
+ if (!t)
253
+ return;
254
+ const { minWidth: M, maxWidth: z } = b(_), S = Math.min(z, Math.max(M, k.width));
255
+ l((A) => ({ ...A, [_]: S }));
256
+ },
257
+ [t, b]
258
+ ), W = $(
259
+ (_) => () => {
260
+ !t || !v[_] || u == null || u(_, v[_]);
261
+ },
262
+ [t, v, u]
263
+ );
264
+ return {
265
+ columnWidths: v,
266
+ handleResize: L,
267
+ handleResizeStop: W,
268
+ handleResizeStart: y
269
+ };
270
+ }, Ot = (t, c, o, i, p, u, d, v) => Q(() => {
271
+ if (!t)
272
+ return {
273
+ visible: !1,
274
+ position: { top: 0, left: 0 },
275
+ size: { width: 0, height: 0 }
276
+ };
277
+ if (!(p + t.clientWidth < d))
278
+ return {
279
+ visible: !1,
280
+ position: { top: 0, left: 0 },
281
+ size: { width: 0, height: 0 }
282
+ };
283
+ const r = t.getBoundingClientRect(), a = (c == null ? void 0 : c.offsetHeight) || 0, b = o == null ? void 0 : o.getBoundingClientRect(), y = Math.min(
284
+ r.bottom,
285
+ (b == null ? void 0 : b.bottom) || Number.MAX_SAFE_INTEGER
286
+ );
287
+ let L;
288
+ i && o && b ? L = b.top - r.top + a : L = a;
289
+ const W = r.top + L, T = t.scrollWidth > t.clientWidth ? t.offsetHeight - t.clientHeight : 0, k = y - W - T, z = t.scrollHeight > t.clientHeight ? t.offsetWidth - t.clientWidth : 0, S = r.right - we - z;
290
+ return {
291
+ visible: !0,
292
+ position: {
293
+ top: W,
294
+ left: S
295
+ },
296
+ size: {
297
+ width: we,
298
+ height: k
299
+ }
300
+ };
301
+ }, [
302
+ t,
303
+ c,
304
+ o,
305
+ i,
306
+ p,
307
+ u,
308
+ d,
309
+ v
310
+ ]), Kt = (t, c, o, i, p, u, d, v) => Q(() => {
311
+ if (!t)
312
+ return {
313
+ visible: !1,
314
+ position: { top: 0, left: 0 },
315
+ size: { width: 0, height: 0 }
316
+ };
317
+ if (!(c > 0))
318
+ return {
319
+ visible: !1,
320
+ position: { top: 0, left: 0 },
321
+ size: { width: 0, height: 0 }
322
+ };
323
+ const r = t.querySelector('[data-row-index="0"]');
324
+ if (!r)
325
+ return {
326
+ visible: !1,
327
+ position: { top: 0, left: 0 },
328
+ size: { width: 0, height: 0 }
329
+ };
330
+ const a = Array.from(r.querySelectorAll("[data-pinned-index]"));
331
+ if (a.length === 0)
332
+ return {
333
+ visible: !1,
334
+ position: { top: 0, left: 0 },
335
+ size: { width: 0, height: 0 }
336
+ };
337
+ const b = Math.max(
338
+ ...a.map(
339
+ (O) => parseInt(O.getAttribute("data-pinned-index") || "-1", 10)
340
+ )
341
+ );
342
+ if (b < 0)
343
+ return {
344
+ visible: !1,
345
+ position: { top: 0, left: 0 },
346
+ size: { width: 0, height: 0 }
347
+ };
348
+ const y = a.find(
349
+ (O) => parseInt(O.getAttribute("data-pinned-index") || "-1", 10) === b
350
+ );
351
+ if (!y)
352
+ return {
353
+ visible: !1,
354
+ position: { top: 0, left: 0 },
355
+ size: { width: 0, height: 0 }
356
+ };
357
+ const L = y.getBoundingClientRect(), W = t.getBoundingClientRect(), _ = (o == null ? void 0 : o.offsetHeight) || 0, T = i == null ? void 0 : i.getBoundingClientRect(), k = L.right, M = Math.min(
358
+ W.bottom,
359
+ (T == null ? void 0 : T.bottom) || Number.MAX_SAFE_INTEGER
360
+ );
361
+ let z;
362
+ p && i && T ? z = T.top - W.top + _ : z = _;
363
+ const S = W.top + z, X = t.scrollWidth > t.clientWidth ? t.offsetHeight - t.clientHeight : 0, ne = M - S - X;
364
+ return {
365
+ visible: !0,
366
+ position: {
367
+ top: S,
368
+ left: k
369
+ },
370
+ size: {
371
+ width: we,
372
+ height: ne
373
+ }
374
+ };
375
+ }, [
376
+ t,
377
+ c,
378
+ o,
379
+ i,
380
+ p,
381
+ u,
382
+ d,
383
+ v
384
+ ]), en = ({ enabled: t, rowCount: c }) => {
385
+ const o = P(/* @__PURE__ */ new Map()), i = P(/* @__PURE__ */ new Map()), p = $(
386
+ (l) => (r) => {
387
+ r ? o.current.set(l, r) : o.current.delete(l);
388
+ },
389
+ []
390
+ ), u = $(
391
+ (l) => (r) => {
392
+ r ? i.current.set(l, r) : i.current.delete(l);
393
+ },
394
+ []
395
+ ), d = $((l, r) => {
396
+ const a = `${l.offsetHeight}px`;
397
+ r.style.height !== a && (r.style.height = a);
398
+ }, []), v = $(() => {
399
+ o.current.forEach((l, r) => {
400
+ const a = i.current.get(r);
401
+ a && d(l, a);
402
+ });
403
+ }, [d]);
404
+ return B(() => {
405
+ if (!t)
406
+ return;
407
+ const l = new ResizeObserver((r) => {
408
+ requestAnimationFrame(() => {
409
+ r.forEach((a) => {
410
+ const b = a.target, y = parseInt(b.dataset.rowIndex || "-1", 10), L = i.current.get(y);
411
+ L && y >= 0 && d(b, L);
412
+ });
413
+ });
414
+ });
415
+ return o.current.forEach((r) => l.observe(r)), () => l.disconnect();
416
+ }, [t, c, d]), et(() => {
417
+ t && v();
418
+ }, [t, c, v]), { setTableRowRef: p, setCheckboxRowRef: u, syncAllHeights: v };
419
+ }, tn = {
420
+ "resize-handle": "_resize-handle_15uk3_1"
421
+ }, nn = me.bind(tn), sn = Mt(
422
+ (t, c) => /* @__PURE__ */ h("div", { ref: c, className: nn("resize-handle"), ...t, children: /* @__PURE__ */ h(Wt, {}) })
423
+ ), rn = {
424
+ "gradient-overlay": "_gradient-overlay_hx7m8_1",
425
+ "direction-right": "_direction-right_hx7m8_5",
426
+ "direction-left": "_direction-left_hx7m8_13"
427
+ }, on = me.bind(rn), Oe = ({
428
+ portalContainer: t,
429
+ visible: c,
430
+ position: o,
431
+ size: i,
432
+ direction: p,
433
+ className: u,
434
+ dataTestId: d
435
+ }) => {
436
+ if (!c || !t)
437
+ return null;
438
+ const v = {
439
+ position: "fixed",
440
+ top: `${o.top}px`,
441
+ width: `${i.width}px`,
442
+ height: `${i.height}px`
443
+ };
444
+ return o.left !== void 0 && (v.left = `${o.left}px`), o.right !== void 0 && (v.right = `${o.right}px`), Bt(
445
+ /* @__PURE__ */ h(
446
+ "div",
447
+ {
448
+ className: on("gradient-overlay", `direction-${p}`, u),
449
+ style: v,
450
+ "data-gradient-type": d
451
+ }
452
+ ),
453
+ t
454
+ );
455
+ }, f = me.bind(jt), Ke = ({ column: t }) => {
456
+ const c = P(null), [o, i] = q(!1);
457
+ return B(() => {
458
+ if (c.current) {
459
+ const p = c.current.offsetWidth, u = c.current.scrollWidth;
460
+ i(u > p);
461
+ }
462
+ }, [t.header]), /* @__PURE__ */ h("span", { ref: c, title: o ? t.header : void 0, children: t.header });
463
+ }, bn = ({
464
+ data: t,
465
+ primaryColumn: c,
466
+ fixedColumns: o,
467
+ renderRowActions: i,
468
+ className: p = "",
469
+ wrapperClassName: u = "",
470
+ rowClassName: d = "",
471
+ headerClassName: v = "",
472
+ bodyClassName: l = "",
473
+ selectable: r = !1,
474
+ selectedRowIds: a = [],
475
+ sortingDirection: b = nt,
476
+ sortingColumn: y,
477
+ sortableColumns: L,
478
+ isHeaderFixed: W = !1,
479
+ isHorizontallyScrollable: _ = !1,
480
+ pinnedColumnKeys: T = [],
481
+ isRowsExpandable: k = !1,
482
+ expandedRowIds: M = [],
483
+ isAllExpandedByDefault: z,
484
+ expandAllTooltip: S,
485
+ isResizable: A = !1,
486
+ minColumnWidth: X = 50,
487
+ maxColumnWidth: ne = 500,
488
+ isSelectAllCheckboxAlwaysVisible: O = !1,
489
+ isCheckboxOutside: N = !1,
490
+ onChangeSorting: rt = () => {
491
+ },
492
+ onToggleRowSelection: ot = () => {
493
+ },
494
+ onToggleAllRowsSelection: ct = () => {
495
+ },
496
+ onToggleRowExpansion: it = () => {
497
+ },
498
+ onToggleAllRowsExpansion: lt = () => {
499
+ },
500
+ onColumnResize: at = () => {
501
+ },
502
+ externalScrollContainerRef: w,
503
+ portalContainer: ke = typeof document < "u" ? document.body : null,
504
+ rightGradientClassName: dt,
505
+ pinnedGradientClassName: ht
506
+ }) => {
507
+ const Y = Q(
508
+ () => Array.isArray(c) ? c : [c],
509
+ [c]
510
+ ), U = y ?? Y[0], se = L ?? It([...Y, ...o]), { pinnedColumns: F, scrollableColumns: J } = Ct({
511
+ primaryColumns: Y,
512
+ fixedColumns: o,
513
+ pinnedColumnKeys: T
514
+ }), {
515
+ hoveredColumn: Ee,
516
+ hoveredRow: Te,
517
+ handleColumnMouseEnter: Le,
518
+ handleColumnMouseLeave: xe,
519
+ handleRowMouseEnter: Ne,
520
+ handleRowMouseLeave: ze
521
+ } = Yt(), { columnWidthsRef: K, setCellRef: Ae } = Qt(), pt = Q(() => {
522
+ const e = {};
523
+ return Y.forEach((n) => {
524
+ "width" in n && typeof n.width == "number" && (e[n.key] = n.width);
525
+ }), o.forEach((n) => {
526
+ "width" in n && typeof n.width == "number" && (e[n.key] = n.width);
527
+ }), Object.keys(e).length > 0 ? e : void 0;
528
+ }, [Y, o]), { handleToggleRowExpansion: ft, isCellExpanded: Me } = Jt({
529
+ primaryColumns: Y,
530
+ fixedColumns: o,
531
+ expandedRowIds: M,
532
+ onToggleRowExpansion: it
533
+ }), ut = Q(
534
+ () => [...F, ...J],
535
+ [F, J]
536
+ ), { columnWidths: re, handleResize: vt, handleResizeStop: _t, handleResizeStart: gt } = Zt({
537
+ enabled: A,
538
+ minWidth: X,
539
+ maxWidth: ne,
540
+ columns: ut,
541
+ columnWidthsRef: K,
542
+ onColumnResize: at,
543
+ initialColumnWidths: pt
544
+ }), { setTableRowRef: bt, setCheckboxRowRef: yt } = en({
545
+ enabled: r && N,
546
+ rowCount: t.length
547
+ }), $e = (e, n) => {
548
+ const s = e.minWidth ?? X, g = e.maxWidth ?? ne;
549
+ return /* @__PURE__ */ h(
550
+ $t,
551
+ {
552
+ width: re[e.key] ?? (typeof e.width == "number" ? e.width : X),
553
+ height: 0,
554
+ axis: "x",
555
+ handle: /* @__PURE__ */ h(sn, {}),
556
+ onResizeStart: gt,
557
+ onResize: vt(e.key),
558
+ onResizeStop: _t(e.key),
559
+ minConstraints: [s, 0],
560
+ maxConstraints: [g, 0],
561
+ className: f("resizable-column"),
562
+ children: n
563
+ },
564
+ e.key
565
+ );
566
+ }, x = P(null), j = P(null), wt = P(null), ee = P(null), he = P(null), [I, mt] = q(!1), oe = $((e) => {
567
+ const n = j.current;
568
+ if (n && n.contains(e))
569
+ return;
570
+ const s = e.parentElement;
571
+ if (!s)
572
+ return;
573
+ const g = window.getComputedStyle(s), m = parseFloat(g.paddingTop) || 0, E = parseFloat(g.paddingBottom) || 0, G = e.offsetHeight + m + E;
574
+ e.style.setProperty("--expand-cell-top", `${m}px`), e.style.setProperty("--expand-cell-height", `${G}px`);
575
+ }, []), [We, pe] = q(0), [He, fe] = q(0), [Pe, ue] = q(0), [Be, Se] = q(0), ce = P(!1), ve = P(/* @__PURE__ */ new Set()), te = P(null), _e = Ot(
576
+ x.current,
577
+ j.current,
578
+ (w == null ? void 0 : w.current) instanceof HTMLElement ? w.current : null,
579
+ I,
580
+ We,
581
+ He,
582
+ Pe,
583
+ Be
584
+ ), ge = Kt(
585
+ x.current,
586
+ We,
587
+ j.current,
588
+ (w == null ? void 0 : w.current) instanceof HTMLElement ? w.current : null,
589
+ I,
590
+ He,
591
+ Pe,
592
+ Be
593
+ ), Ge = (e) => {
594
+ se.includes(e) && rt({ key: e, direction: b });
595
+ }, Fe = (e) => {
596
+ ot(e);
597
+ }, qe = () => {
598
+ ct();
599
+ }, kt = () => {
600
+ lt();
601
+ }, Ue = (e) => se.includes(e) ? (U == null ? void 0 : U.key) === e ? Xt(b) ? /* @__PURE__ */ h(Ye, {}) : /* @__PURE__ */ h(Ht, {}) : /* @__PURE__ */ h(Ye, {}) : null, De = t.every((e) => a.includes(e.id)), je = t.some((e) => a.includes(e.id)), be = (a == null ? void 0 : a.length) > 0, Et = !St(t), Re = O && Et || be, Tt = t.every((e) => M.includes(e.id)), Lt = z !== void 0 ? z : Tt, xt = Ze(
602
+ F,
603
+ J,
604
+ k,
605
+ r,
606
+ !!i,
607
+ !1,
608
+ A ? re : void 0,
609
+ A,
610
+ N
611
+ ), Nt = Ze(
612
+ F,
613
+ J,
614
+ k,
615
+ r,
616
+ !!i,
617
+ !0,
618
+ A ? re : void 0,
619
+ A,
620
+ N
621
+ ), Xe = /* @__PURE__ */ h("button", { onClick: kt, "aria-label": "Toggle all rows expansion", children: /* @__PURE__ */ h("span", { className: f("expand-icon", { expanded: Lt }), children: /* @__PURE__ */ h(Je, {}) }) });
622
+ B(() => {
623
+ if (!(w != null && w.current) || !x.current || !j.current)
624
+ return;
625
+ const e = w.current, n = x.current, s = j.current, g = he.current, m = () => {
626
+ const H = n.getBoundingClientRect(), G = e.getBoundingClientRect(), V = s.offsetHeight, R = H.top - G.top, ie = H.bottom - G.top, Ve = e.scrollTop > 0 && R <= 0 && ie > V;
627
+ if (mt(Ve), Ve) {
628
+ const le = H.left, Ce = G.top;
629
+ s.classList.add(f("pinned-header")), _ && (s.style.overflow = "hidden", s.style.overflowX = "hidden"), s.style.left = `${le}px`, s.style.top = `${Ce}px`, s.style.width = `${H.width}px`, g && N && (g.style.top = `${Ce}px`);
630
+ } else {
631
+ const le = n.scrollLeft;
632
+ ce.current = !0, s.classList.remove(f("pinned-header")), _ && (s.scrollLeft = 0), s.style.left = "", s.style.top = "", s.style.width = "", _ && (s.style.overflow = "", s.style.overflowX = ""), g && N && (g.style.top = "", g.classList.remove(f("pinned-header"))), _ && le > 0 ? requestAnimationFrame(() => {
633
+ n.scrollLeft = le, setTimeout(() => {
634
+ ce.current = !1;
635
+ }, 0);
636
+ }) : ce.current = !1;
637
+ }
638
+ }, E = requestAnimationFrame(() => {
639
+ m();
640
+ });
641
+ return e.addEventListener("scroll", m), window.addEventListener("resize", m), () => {
642
+ cancelAnimationFrame(E), e.removeEventListener("scroll", m), window.removeEventListener("resize", m);
643
+ };
644
+ }, [w, _, N]), B(() => {
645
+ if (!(w != null && w.current) || !x.current || !j.current || !I)
646
+ return;
647
+ const e = w.current, n = x.current, s = j.current, g = he.current, m = () => {
648
+ const R = n.getBoundingClientRect(), ie = e.getBoundingClientRect();
649
+ s.style.left = `${R.left}px`, s.style.top = `${ie.top}px`, s.style.width = `${R.width}px`, g && N && (g.style.top = `${ie.top}px`);
650
+ }, E = (R) => {
651
+ ce.current || (R === s ? n.scrollLeft = s.scrollLeft : s.scrollLeft = n.scrollLeft, te.current && te.current());
652
+ }, H = () => {
653
+ E(n), m();
654
+ }, G = () => {
655
+ E(s);
656
+ }, V = () => {
657
+ m();
658
+ };
659
+ return n.addEventListener("scroll", H), _ && s.addEventListener("scroll", G), e.addEventListener("scroll", V), window.addEventListener("resize", m), E(n), m(), () => {
660
+ n.removeEventListener("scroll", H), _ && s.removeEventListener("scroll", G), e.removeEventListener("scroll", V), window.removeEventListener("resize", m);
661
+ };
662
+ }, [I, w, _, N]), B(() => {
663
+ if (!x.current || !_)
664
+ return;
665
+ const e = x.current, n = w == null ? void 0 : w.current;
666
+ pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth);
667
+ const s = () => {
668
+ e && (pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth));
669
+ };
670
+ let g = null;
671
+ const m = () => {
672
+ g === null && (g = requestAnimationFrame(() => {
673
+ s(), g = null;
674
+ }));
675
+ }, E = () => {
676
+ m();
677
+ }, H = () => {
678
+ m();
679
+ };
680
+ e.addEventListener("scroll", E, { passive: !0 }), n && n.addEventListener("scroll", H, {
681
+ passive: !0
682
+ });
683
+ const G = () => {
684
+ s(), Se((R) => R + 1);
685
+ };
686
+ window.addEventListener("resize", G), te.current = s, s();
687
+ const V = new ResizeObserver(() => {
688
+ s();
689
+ });
690
+ return e && V.observe(e), () => {
691
+ e.removeEventListener("scroll", E), n && n.removeEventListener("scroll", H), window.removeEventListener("resize", G), V.disconnect(), g !== null && (cancelAnimationFrame(g), g = null);
692
+ };
693
+ }, [_, w, I, M]), B(() => {
694
+ if (!x.current || !_)
695
+ return;
696
+ const e = x.current, n = w == null ? void 0 : w.current;
697
+ requestAnimationFrame(() => {
698
+ e && (pe(e.scrollLeft), fe((n == null ? void 0 : n.scrollTop) || e.scrollTop || 0), ue(e.scrollWidth), te.current && te.current());
699
+ });
700
+ }, [re, _, w]), B(() => {
701
+ if (!x.current)
702
+ return;
703
+ const e = x.current, n = () => {
704
+ Array.from(e.querySelectorAll('[data-base-left="0"]')).forEach(oe);
705
+ };
706
+ requestAnimationFrame(() => {
707
+ n();
708
+ });
709
+ }, [k, t, oe]), B(() => {
710
+ if (!x.current)
711
+ return;
712
+ const e = x.current, n = new Set(M), s = ve.current, g = /* @__PURE__ */ new Set();
713
+ if (M.forEach((E) => {
714
+ s.has(E) || g.add(E);
715
+ }), s.forEach((E) => {
716
+ n.has(E) || g.add(E);
717
+ }), g.size === 0) {
718
+ ve.current = n;
719
+ return;
720
+ }
721
+ const m = setTimeout(() => {
722
+ g.forEach((E) => {
723
+ const H = e.querySelector(
724
+ `[data-base-left="0"][data-row-id="${E}"]`
725
+ );
726
+ H && oe(H);
727
+ }), Se((E) => E + 1);
728
+ }, 0);
729
+ return ve.current = n, () => clearTimeout(m);
730
+ }, [k, M, oe]), B(() => {
731
+ if (!ee.current || !x.current || !N)
732
+ return;
733
+ const e = ee.current, n = x.current, s = () => {
734
+ requestAnimationFrame(() => {
735
+ e.scrollTop = n.scrollTop;
736
+ });
737
+ };
738
+ return n.addEventListener("scroll", s), () => {
739
+ n.removeEventListener("scroll", s);
740
+ };
741
+ }, [t, N]), et(() => {
742
+ if (!x.current || !ee.current)
743
+ return;
744
+ const e = x.current, n = ee.current, s = () => {
745
+ const m = `${e.clientHeight}px`;
746
+ n.style.height !== m && (n.style.height = m);
747
+ };
748
+ s();
749
+ const g = new ResizeObserver(() => {
750
+ requestAnimationFrame(s);
751
+ });
752
+ return g.observe(e), () => g.disconnect();
753
+ }, []);
754
+ const zt = () => /* @__PURE__ */ D("div", { className: f("checkbox-column"), ref: ee, children: [
755
+ /* @__PURE__ */ h(
756
+ "div",
757
+ {
758
+ ref: he,
759
+ className: f(
760
+ "table-header",
761
+ "checkbox-header",
762
+ { "pinned-header": I },
763
+ v
764
+ ),
765
+ children: Re && /* @__PURE__ */ h(
766
+ ae,
767
+ {
768
+ value: De,
769
+ partiallyChecked: je,
770
+ onChange: qe,
771
+ className: f("checkbox-cell")
772
+ }
773
+ )
774
+ }
775
+ ),
776
+ /* @__PURE__ */ h("div", { className: f("checkbox-body", l), children: t.map((e, n) => /* @__PURE__ */ h(
777
+ "div",
778
+ {
779
+ ref: yt(n),
780
+ className: f("checkbox-row", "table-row", Qe(e), d),
781
+ onMouseEnter: () => Ne(n),
782
+ onMouseLeave: ze,
783
+ children: (be || Te === n) && /* @__PURE__ */ h(
784
+ ae,
785
+ {
786
+ value: a.includes(e.id),
787
+ onChange: () => Fe(e.id),
788
+ className: f("checkbox-cell")
789
+ }
790
+ )
791
+ },
792
+ e.id
793
+ )) })
794
+ ] }), Ie = () => /* @__PURE__ */ D(
795
+ "div",
796
+ {
797
+ ref: x,
798
+ className: f(
799
+ "table",
800
+ {
801
+ "fixed-header": W,
802
+ "horizontally-scrollable-container": W && (_ || A),
803
+ "external-scroll-container": W && !!w
804
+ },
805
+ p
806
+ ),
807
+ children: [
808
+ /* @__PURE__ */ D(
809
+ "div",
810
+ {
811
+ ref: j,
812
+ className: f(
813
+ "table-header",
814
+ {
815
+ "sticky-header": W && !I,
816
+ "horizontally-scrollable": _,
817
+ resizable: A
818
+ },
819
+ v
820
+ ),
821
+ style: { gridTemplateColumns: Nt },
822
+ children: [
823
+ r && !N && /* @__PURE__ */ h(
824
+ "div",
825
+ {
826
+ className: f("table-header-cell", "checkbox-cell"),
827
+ "data-base-left": k ? Z : 0,
828
+ children: Re && /* @__PURE__ */ h(
829
+ ae,
830
+ {
831
+ value: De,
832
+ partiallyChecked: je,
833
+ onChange: qe,
834
+ className: f("checkbox-cell")
835
+ }
836
+ )
837
+ }
838
+ ),
839
+ k && /* @__PURE__ */ h(
840
+ "div",
841
+ {
842
+ className: f("table-header-cell", "expand-cell", "left-border-accent"),
843
+ "data-base-left": "0",
844
+ children: S ? /* @__PURE__ */ h(
845
+ Pt,
846
+ {
847
+ content: S,
848
+ placement: "top",
849
+ wrapperClassName: f("expand-all-tooltip-wrapper"),
850
+ contentClassName: f("expand-all-tooltip-content"),
851
+ children: Xe
852
+ }
853
+ ) : Xe
854
+ }
855
+ ),
856
+ F.map((e, n) => {
857
+ const s = /* @__PURE__ */ h(
858
+ "button",
859
+ {
860
+ "data-column-key": e.key,
861
+ "data-pinned-index": n,
862
+ className: f("table-header-cell", "pinned-column", {
863
+ [`align-${e.align}`]: "align" in e,
864
+ "primary-cell": C(e),
865
+ "sortable-cell": se.includes(e.key),
866
+ resizable: A
867
+ }),
868
+ style: de(
869
+ e,
870
+ !0,
871
+ n,
872
+ F,
873
+ K,
874
+ k,
875
+ r,
876
+ N
877
+ ),
878
+ children: /* @__PURE__ */ D(
879
+ "div",
880
+ {
881
+ className: f("label"),
882
+ onClick: () => Ge(e.key),
883
+ onMouseEnter: () => Le(e.key),
884
+ onMouseLeave: xe,
885
+ children: [
886
+ /* @__PURE__ */ h(Ke, { column: e }),
887
+ (Ee === e.key || (U == null ? void 0 : U.key) === e.key) && Ue(e.key)
888
+ ]
889
+ }
890
+ )
891
+ },
892
+ e.key
893
+ );
894
+ return A ? $e(e, s) : s;
895
+ }),
896
+ J.map((e) => {
897
+ const n = /* @__PURE__ */ h(
898
+ "button",
899
+ {
900
+ className: f("table-header-cell", {
901
+ [`align-${e.align}`]: "align" in e,
902
+ "primary-cell": C(e),
903
+ "sortable-cell": se.includes(e.key),
904
+ resizable: A
905
+ }),
906
+ style: de(
907
+ e,
908
+ !1,
909
+ void 0,
910
+ F,
911
+ K,
912
+ k,
913
+ r,
914
+ N
915
+ ),
916
+ children: /* @__PURE__ */ D(
917
+ "div",
918
+ {
919
+ className: f("label"),
920
+ onClick: () => Ge(e.key),
921
+ onMouseEnter: () => Le(e.key),
922
+ onMouseLeave: xe,
923
+ children: [
924
+ /* @__PURE__ */ h(Ke, { column: e }),
925
+ (Ee === e.key || (U == null ? void 0 : U.key) === e.key) && Ue(e.key)
926
+ ]
927
+ }
928
+ )
929
+ },
930
+ e.key
931
+ );
932
+ return A ? $e(e, n) : n;
933
+ }),
934
+ i && /* @__PURE__ */ h("div", { className: f("table-header-cell", "action-menu-cell") })
935
+ ]
936
+ }
937
+ ),
938
+ /* @__PURE__ */ h(
939
+ "div",
940
+ {
941
+ ref: wt,
942
+ className: f(
943
+ "table-body",
944
+ {
945
+ "scrollable-body": W,
946
+ "horizontally-scrollable": _,
947
+ resizable: A
948
+ },
949
+ l
950
+ ),
951
+ children: t.map((e, n) => /* @__PURE__ */ D(
952
+ "div",
953
+ {
954
+ "data-row-index": n,
955
+ ref: bt(n),
956
+ className: f("table-row", Qe(e), d, {
957
+ selectable: r && !N
958
+ }),
959
+ onMouseEnter: () => Ne(n),
960
+ onMouseLeave: ze,
961
+ children: [
962
+ r && !N && /* @__PURE__ */ h(
963
+ "div",
964
+ {
965
+ className: f("table-cell", "checkbox-cell"),
966
+ "data-base-left": k ? Z : 0,
967
+ children: (be || Te === n) && /* @__PURE__ */ h(
968
+ ae,
969
+ {
970
+ value: a.includes(e.id),
971
+ onChange: () => Fe(e.id),
972
+ className: f("checkbox-cell")
973
+ }
974
+ )
975
+ }
976
+ ),
977
+ /* @__PURE__ */ h("div", { className: f("row-content-wrapper"), children: /* @__PURE__ */ D("div", { className: f("table-row-content"), style: { gridTemplateColumns: xt }, children: [
978
+ k && /* @__PURE__ */ h(
979
+ "div",
980
+ {
981
+ className: f("table-cell", "expand-cell", "left-border-accent"),
982
+ "data-base-left": "0",
983
+ "data-row-id": e.id,
984
+ children: /* @__PURE__ */ h(
985
+ "button",
986
+ {
987
+ onClick: () => ft(e.id),
988
+ "aria-label": M.includes(e.id) ? "Collapse row" : "Expand row",
989
+ "aria-expanded": M.includes(e.id),
990
+ children: /* @__PURE__ */ h(
991
+ "span",
992
+ {
993
+ className: f("expand-icon", {
994
+ expanded: M.includes(e.id)
995
+ }),
996
+ children: /* @__PURE__ */ h(Je, {})
997
+ }
998
+ )
999
+ }
1000
+ )
1001
+ }
1002
+ ),
1003
+ F.map((s, g) => {
1004
+ const m = Me(e.id, s.key), E = C(s);
1005
+ return /* @__PURE__ */ h(
1006
+ "div",
1007
+ {
1008
+ "data-column-key": s.key,
1009
+ "data-pinned-index": g,
1010
+ ref: E ? Ae(s.key) : void 0,
1011
+ className: f("table-cell", "pinned-column", {
1012
+ "primary-cell": E,
1013
+ "expanded-cell": m
1014
+ }),
1015
+ style: de(
1016
+ s,
1017
+ !0,
1018
+ g,
1019
+ F,
1020
+ K,
1021
+ k,
1022
+ r,
1023
+ N
1024
+ ),
1025
+ children: e[s.key].component || e[s.key].content || e[s.key]
1026
+ },
1027
+ s.key
1028
+ );
1029
+ }),
1030
+ J.map((s) => {
1031
+ const g = Me(e.id, s.key), m = C(s);
1032
+ return /* @__PURE__ */ h(
1033
+ "div",
1034
+ {
1035
+ ref: m ? Ae(s.key) : void 0,
1036
+ className: f("table-cell", {
1037
+ "primary-cell": m,
1038
+ "expanded-cell": g
1039
+ }),
1040
+ style: de(
1041
+ s,
1042
+ !1,
1043
+ void 0,
1044
+ F,
1045
+ K,
1046
+ k,
1047
+ r,
1048
+ N
1049
+ ),
1050
+ children: e[s.key].component || e[s.key].content || e[s.key]
1051
+ },
1052
+ s.key
1053
+ );
1054
+ }),
1055
+ i && /* @__PURE__ */ h("div", { className: f("table-cell", "action-menu-cell"), children: i(e.metaData) })
1056
+ ] }) })
1057
+ ]
1058
+ },
1059
+ e.id
1060
+ ))
1061
+ }
1062
+ ),
1063
+ _ && /* @__PURE__ */ D(At, { children: [
1064
+ /* @__PURE__ */ h(
1065
+ Oe,
1066
+ {
1067
+ portalContainer: ke,
1068
+ visible: _e.visible,
1069
+ position: _e.position,
1070
+ size: _e.size,
1071
+ direction: "right",
1072
+ className: dt,
1073
+ dataTestId: "right-gradient"
1074
+ }
1075
+ ),
1076
+ /* @__PURE__ */ h(
1077
+ Oe,
1078
+ {
1079
+ portalContainer: ke,
1080
+ visible: ge.visible,
1081
+ position: ge.position,
1082
+ size: ge.size,
1083
+ direction: "left",
1084
+ className: ht,
1085
+ dataTestId: "pinned-gradient"
1086
+ }
1087
+ )
1088
+ ] })
1089
+ ]
1090
+ }
1091
+ );
1092
+ return N ? /* @__PURE__ */ D("div", { className: f("table-wrapper", { "fixed-header": W }, u), children: [
1093
+ zt(),
1094
+ Ie()
1095
+ ] }) : Ie();
1096
+ };
1097
+ export {
1098
+ bn as T
1099
+ };