@reportportal/ui-kit 0.0.1-alpha.24 → 0.0.1-alpha.240

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