@reportportal/ui-kit 0.0.1-alpha.16 → 0.0.1-alpha.161

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