@reportportal/ui-kit 0.0.1-alpha.26 → 0.0.1-alpha.261

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