@daisforge/ui 1.22.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/chunks/AiAgentPopup-CLGSjg5L.cjs +11 -0
  2. package/chunks/AiAgentPopup-CtMhai1X.mjs +797 -0
  3. package/chunks/AnalyticalWidget-Bvcm1qpU.cjs +43 -0
  4. package/chunks/AnalyticalWidget-CRfihris.mjs +352 -0
  5. package/chunks/ApprovalCenter-D7K7J-QB.cjs +1 -0
  6. package/chunks/{ApprovalCenter-DLKZP2AO.mjs → ApprovalCenter-dJpI91uN.mjs} +10 -10
  7. package/chunks/BlockTitle-CcYYHiOo.cjs +1 -0
  8. package/chunks/{BlockTitle-DsXxImR6.mjs → BlockTitle-DCmM-9AN.mjs} +2 -2
  9. package/chunks/{Container-DbZwlfIM.mjs → Container-C7PzvUwd.mjs} +1 -1
  10. package/chunks/{Container-DHnX1sHY.cjs → Container-bVqI3en9.cjs} +1 -1
  11. package/chunks/{EmptyState-DH1xawxg.cjs → EmptyState-D-bmtvmy.cjs} +1 -1
  12. package/chunks/{EmptyState-CUCseg9M.mjs → EmptyState-ZsOlvU4d.mjs} +1 -1
  13. package/chunks/{FiltersActions-BJ5gD6Nx.mjs → FiltersActions-CS27WxA6.mjs} +15 -15
  14. package/chunks/FiltersActions-Cie245Po.cjs +1 -0
  15. package/chunks/{FormSegmentGroup-BYQ6yMK1.cjs → FormSegmentGroup-CNIqOYfm.cjs} +1 -1
  16. package/chunks/{FormSegmentGroup-C9qYxYT9.mjs → FormSegmentGroup-DwTRM58f.mjs} +1 -1
  17. package/chunks/{GridDND-DK6SAO8q.cjs → GridDND-Bwmr7gla.cjs} +1 -1
  18. package/chunks/{GridDND-CqvpXgCY.mjs → GridDND-DC5VoxEY.mjs} +83 -83
  19. package/chunks/{LeftPanel-C5SsoRJS.mjs → LeftPanel-C10BLKIn.mjs} +1 -1
  20. package/chunks/{LeftPanel-AyuV7bGS.cjs → LeftPanel-upGFk7jM.cjs} +1 -1
  21. package/chunks/{ListOfFilters-CfV2bs_4.mjs → ListOfFilters-CEWrWotU.mjs} +3 -3
  22. package/chunks/{ListOfFilters-mqTsQbq_.cjs → ListOfFilters-DNi-z1cn.cjs} +1 -1
  23. package/chunks/MassActions-DJiKcC6r.cjs +1 -0
  24. package/chunks/{MassActions-C6LY-g9r.mjs → MassActions-NLCRjIHw.mjs} +46 -46
  25. package/chunks/PageTitle-Bg4PNEXS.cjs +9 -0
  26. package/chunks/{PageTitle-DkfAiZM4.mjs → PageTitle-CXtNgH-b.mjs} +7 -7
  27. package/chunks/{SplitView-BqS1Jbo4.mjs → SplitView-BzamJzNc.mjs} +17 -17
  28. package/chunks/{SplitView-DNmd4sJe.cjs → SplitView-DeJ3V-kq.cjs} +1 -1
  29. package/chunks/Stories-CNlL0Bcb.cjs +1 -0
  30. package/chunks/{Stories-BnHxMCEZ.mjs → Stories-UUV0GNEV.mjs} +33 -33
  31. package/chunks/{Table-vv1HTrxe.cjs → Table-CZludfzU.cjs} +6 -6
  32. package/chunks/{Table-tUWuA3Ri.mjs → Table-FrYs56BB.mjs} +1597 -1586
  33. package/chunks/{TableCanvas-BX5aciu7.mjs → TableCanvas-CasYPFSm.mjs} +5872 -5633
  34. package/chunks/TableCanvas-DFne0YHS.cjs +30 -0
  35. package/chunks/TableGlide-BKSjSgBn.mjs +9131 -0
  36. package/chunks/TableGlide-C2_HrWEA.cjs +1 -0
  37. package/chunks/{styles-CJ5y9FKW.mjs → styles-CJPkBVWK.mjs} +6 -6
  38. package/chunks/{styles-kUWPuNSD.cjs → styles-CpC_FuBg.cjs} +1 -1
  39. package/chunks/{utils-u1KJ37g3.mjs → utils-Hu77fGGe.mjs} +102 -102
  40. package/chunks/{utils-ChDQGRjv.cjs → utils-OQNruMpn.cjs} +5 -5
  41. package/components/AiAgentPopover/index.cjs +1 -1
  42. package/components/AiAgentPopover/index.mjs +1 -1
  43. package/components/AiAgentPopup/AiAgentInput.d.ts +3 -0
  44. package/components/AiAgentPopup/AiAgentLeftPanel.d.ts +6 -0
  45. package/components/AiAgentPopup/AiAgentPopup.constants.d.ts +32 -0
  46. package/components/AiAgentPopup/AiAgentPopup.d.ts +3 -0
  47. package/components/AiAgentPopup/AiAgentPopup.styled.d.ts +33 -0
  48. package/components/AiAgentPopup/AiAgentPopup.types.d.ts +83 -0
  49. package/components/AiAgentPopup/AiAgentPopup.utils.d.ts +12 -0
  50. package/components/AiAgentPopup/AiAgentSurface.d.ts +6 -0
  51. package/components/AiAgentPopup/hooks/useDrag.d.ts +18 -0
  52. package/components/AiAgentPopup/hooks/useIsDarkTheme.d.ts +1 -0
  53. package/components/AiAgentPopup/hooks/usePopupPosition.d.ts +20 -0
  54. package/components/AiAgentPopup/hooks/usePopupResize.d.ts +40 -0
  55. package/components/AiAgentPopup/hooks/useStateStorage.d.ts +6 -0
  56. package/components/AiAgentPopup/index.cjs +1 -0
  57. package/components/AiAgentPopup/index.d.ts +3 -0
  58. package/components/AiAgentPopup/index.mjs +5 -0
  59. package/components/AnalyticalWidget/AnalyticalWidget.d.ts +8 -24
  60. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +8 -24
  61. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
  62. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
  63. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  64. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
  65. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  66. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +2 -2
  67. package/components/AnalyticalWidget/index.cjs +1 -1
  68. package/components/AnalyticalWidget/index.mjs +1 -1
  69. package/components/ApprovalCenter/components/index.cjs +1 -1
  70. package/components/ApprovalCenter/components/index.mjs +1 -1
  71. package/components/ApprovalCenter/index.cjs +1 -1
  72. package/components/ApprovalCenter/index.mjs +1 -1
  73. package/components/Autocomplete/Autocomplete.d.ts +128 -128
  74. package/components/AutocompleteSearch/index.cjs +1 -1
  75. package/components/AutocompleteSearch/index.mjs +2 -2
  76. package/components/BlockGradientScroll/index.cjs +1 -1
  77. package/components/BlockGradientScroll/index.mjs +1 -1
  78. package/components/BlockTitle/index.cjs +1 -1
  79. package/components/BlockTitle/index.mjs +1 -1
  80. package/components/BlockTitle/utils/index.cjs +1 -1
  81. package/components/BlockTitle/utils/index.mjs +1 -1
  82. package/components/Collapse/index.cjs +1 -1
  83. package/components/Collapse/index.mjs +1 -1
  84. package/components/Combobox/index.cjs +1 -1
  85. package/components/Combobox/index.mjs +1 -1
  86. package/components/EmptyState/components/index.cjs +1 -1
  87. package/components/EmptyState/components/index.mjs +1 -1
  88. package/components/EmptyState/index.cjs +1 -1
  89. package/components/EmptyState/index.mjs +1 -1
  90. package/components/GridDND/index.cjs +1 -1
  91. package/components/GridDND/index.mjs +1 -1
  92. package/components/GridDND/utils/index.cjs +1 -1
  93. package/components/GridDND/utils/index.mjs +1 -1
  94. package/components/IconButton/index.cjs +1 -1
  95. package/components/IconButton/index.mjs +1 -1
  96. package/components/LeftPanel/components/index.cjs +1 -1
  97. package/components/LeftPanel/components/index.mjs +1 -1
  98. package/components/LeftPanel/hooks/index.cjs +1 -1
  99. package/components/LeftPanel/hooks/index.mjs +1 -1
  100. package/components/LeftPanel/index.cjs +1 -1
  101. package/components/LeftPanel/index.mjs +1 -1
  102. package/components/LeftPanel/utils/index.cjs +1 -1
  103. package/components/LeftPanel/utils/index.mjs +1 -1
  104. package/components/ListOfFilters/index.cjs +1 -1
  105. package/components/ListOfFilters/index.mjs +1 -1
  106. package/components/MassActions/hooks/index.cjs +1 -1
  107. package/components/MassActions/hooks/index.mjs +1 -1
  108. package/components/MassActions/index.cjs +1 -1
  109. package/components/MassActions/index.mjs +1 -1
  110. package/components/ModalDF/index.cjs +1 -1
  111. package/components/ModalDF/index.mjs +1 -1
  112. package/components/Notification/index.cjs +1 -1
  113. package/components/Notification/index.mjs +6 -6
  114. package/components/PageTitle/index.cjs +1 -1
  115. package/components/PageTitle/index.mjs +1 -1
  116. package/components/PageTitle/utils/index.cjs +1 -1
  117. package/components/PageTitle/utils/index.mjs +1 -1
  118. package/components/PopoverDF/index.cjs +1 -1
  119. package/components/PopoverDF/index.mjs +9 -9
  120. package/components/PopoverDF/styled.d.ts +1 -23
  121. package/components/PopupDF/index.cjs +1 -1
  122. package/components/PopupDF/index.mjs +118 -143
  123. package/components/SplitView/index.cjs +1 -1
  124. package/components/SplitView/index.mjs +1 -1
  125. package/components/SplitView/utils/index.cjs +1 -1
  126. package/components/SplitView/utils/index.mjs +1 -1
  127. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  128. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  129. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  130. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  131. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  132. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  133. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  134. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  135. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  136. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  137. package/components/Stories/index.cjs +1 -1
  138. package/components/Stories/index.mjs +1 -1
  139. package/components/Table/components/TableDropdown/index.cjs +1 -1
  140. package/components/Table/components/TableDropdown/index.mjs +1 -1
  141. package/components/Table/feature-collapse-table/index.cjs +1 -1
  142. package/components/Table/feature-collapse-table/index.mjs +1 -1
  143. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  144. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  145. package/components/Table/feature-column-control/index.cjs +1 -1
  146. package/components/Table/feature-column-control/index.mjs +1 -1
  147. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  148. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  149. package/components/Table/feature-context-menu/index.cjs +1 -1
  150. package/components/Table/feature-context-menu/index.mjs +1 -1
  151. package/components/Table/feature-edit/index.cjs +1 -1
  152. package/components/Table/feature-edit/index.mjs +1 -1
  153. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  154. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  155. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  156. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  157. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  158. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  159. package/components/Table/feature-filtering/index.cjs +1 -1
  160. package/components/Table/feature-filtering/index.mjs +1 -1
  161. package/components/Table/feature-filtering/popover.d.ts +1 -23
  162. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  163. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  164. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  165. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  166. package/components/Table/feature-key-text/index.cjs +1 -1
  167. package/components/Table/feature-key-text/index.mjs +1 -1
  168. package/components/Table/feature-pagination/index.cjs +1 -1
  169. package/components/Table/feature-pagination/index.mjs +1 -1
  170. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  171. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  172. package/components/Table/feature-row-detail/index.cjs +1 -1
  173. package/components/Table/feature-row-detail/index.mjs +1 -1
  174. package/components/Table/feature-row-instruments/index.cjs +1 -1
  175. package/components/Table/feature-row-instruments/index.mjs +1 -1
  176. package/components/Table/feature-row-size/index.cjs +1 -1
  177. package/components/Table/feature-row-size/index.mjs +1 -1
  178. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  179. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  180. package/components/Table/feature-searching/index.cjs +1 -1
  181. package/components/Table/feature-searching/index.mjs +1 -1
  182. package/components/Table/feature-searching/styled.d.ts +128 -128
  183. package/components/Table/feature-select-row/index.cjs +1 -1
  184. package/components/Table/feature-select-row/index.mjs +1 -1
  185. package/components/Table/feature-sorting/index.cjs +1 -1
  186. package/components/Table/feature-sorting/index.mjs +1 -1
  187. package/components/Table/feature-table-settings/index.cjs +1 -1
  188. package/components/Table/feature-table-settings/index.mjs +1 -1
  189. package/components/Table/feature-tree/index.cjs +1 -1
  190. package/components/Table/feature-tree/index.mjs +1 -1
  191. package/components/Table/index.cjs +1 -1
  192. package/components/Table/index.mjs +1 -1
  193. package/components/Table/renders/formatCell/index.cjs +1 -1
  194. package/components/Table/renders/formatCell/index.mjs +1 -1
  195. package/components/Table/styles/index.cjs +1 -1
  196. package/components/Table/styles/index.mjs +1 -1
  197. package/components/Table/table-hooks/index.cjs +1 -1
  198. package/components/Table/table-hooks/index.mjs +1 -1
  199. package/components/Table/types/index.cjs +1 -1
  200. package/components/Table/types/index.mjs +1 -1
  201. package/components/Table/types/utils.type.d.ts +1 -1
  202. package/components/Table/utils/index.cjs +1 -1
  203. package/components/Table/utils/index.mjs +1 -1
  204. package/components/Table/widgets/control-block/index.cjs +1 -1
  205. package/components/Table/widgets/control-block/index.mjs +1 -1
  206. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  207. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  208. package/components/Table/widgets/index.cjs +1 -1
  209. package/components/Table/widgets/index.mjs +1 -1
  210. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  211. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  212. package/components/TableCanvas/TableGlideInstance/TableGlideInstance.d.ts +1 -1
  213. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  214. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  215. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  216. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  217. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  218. package/components/TableCanvas/TableGlideInstance/index.mjs +6 -6
  219. package/components/TableCanvas/TableGlideInstance/type.d.ts +3 -0
  220. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  221. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +2 -2
  222. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  223. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  224. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  225. package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
  226. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  227. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  228. package/components/TableCanvas/contexts.d.ts +8 -2
  229. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  230. package/components/TableCanvas/feature-cell-transfer/index.mjs +13 -13
  231. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  232. package/components/TableCanvas/feature-collapse-table/index.mjs +2 -2
  233. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  234. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +2 -2
  235. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  236. package/components/TableCanvas/feature-column-control/index.mjs +4 -4
  237. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  238. package/components/TableCanvas/feature-columns-grouping/index.mjs +3 -3
  239. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  240. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  241. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  242. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  243. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  244. package/components/TableCanvas/feature-edit/index.mjs +6 -6
  245. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  246. package/components/TableCanvas/feature-filtering/combobox/index.mjs +4 -4
  247. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  248. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  249. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  250. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  251. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  252. package/components/TableCanvas/feature-filtering/index.mjs +3 -3
  253. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  254. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  255. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  256. package/components/TableCanvas/feature-infinity-scroll/index.mjs +4 -4
  257. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  258. package/components/TableCanvas/feature-key-text/index.mjs +6 -6
  259. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  260. package/components/TableCanvas/feature-notifications/index.mjs +2 -2
  261. package/components/TableCanvas/feature-pagination/TablePagination.d.ts +2 -0
  262. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  263. package/components/TableCanvas/feature-pagination/index.mjs +3 -3
  264. package/components/TableCanvas/feature-popover-table/components/styled.d.ts +1 -23
  265. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  266. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  267. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  268. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  269. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  270. package/components/TableCanvas/feature-popover-table/index.mjs +3 -3
  271. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  272. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  273. package/components/TableCanvas/feature-right-sidebar/compatibility.d.ts +8 -0
  274. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  275. package/components/TableCanvas/feature-right-sidebar/index.d.ts +2 -3
  276. package/components/TableCanvas/feature-right-sidebar/index.mjs +3 -3
  277. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  278. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  279. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  280. package/components/TableCanvas/feature-row-instruments/index.mjs +7 -7
  281. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  282. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  283. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  284. package/components/TableCanvas/feature-row-size/index.mjs +4 -4
  285. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  286. package/components/TableCanvas/feature-rows-grouping/index.mjs +10 -10
  287. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  288. package/components/TableCanvas/feature-searching/index.mjs +1 -1
  289. package/components/TableCanvas/feature-searching/styled.d.ts +128 -128
  290. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  291. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  292. package/components/TableCanvas/feature-sidebar/constants.d.ts +7 -0
  293. package/components/TableCanvas/feature-sidebar/getCustomSidebarTabs.d.ts +4 -0
  294. package/components/TableCanvas/feature-sidebar/index.cjs +1 -0
  295. package/components/TableCanvas/feature-sidebar/index.d.ts +1 -0
  296. package/components/TableCanvas/feature-sidebar/index.mjs +4 -0
  297. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.d.ts +6 -0
  298. package/components/TableCanvas/feature-sidebar/ui/BottomSheet.styled.d.ts +6 -0
  299. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarContentLayout.d.ts +1 -0
  300. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/SidebarTabs.d.ts +2 -1
  301. package/components/TableCanvas/feature-sidebar/ui/TableSidebar.d.ts +16 -0
  302. package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/styled.d.ts +5 -2
  303. package/components/TableCanvas/feature-sidebar/useSidebarTabsState.d.ts +14 -0
  304. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  305. package/components/TableCanvas/feature-sorting/index.mjs +1 -1
  306. package/components/TableCanvas/feature-sticky/index.cjs +1 -0
  307. package/components/TableCanvas/feature-sticky/index.d.ts +3 -0
  308. package/components/TableCanvas/feature-sticky/index.mjs +5 -0
  309. package/components/TableCanvas/feature-sticky/types.d.ts +2 -0
  310. package/components/TableCanvas/feature-sticky/useStickyColumnIndexes.d.ts +8 -0
  311. package/components/TableCanvas/feature-sticky/useStickyRowIndexes.d.ts +3 -0
  312. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  313. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  314. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  315. package/components/TableCanvas/feature-tooltip/index.mjs +2 -2
  316. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  317. package/components/TableCanvas/feature-tooltip/utils/index.mjs +4 -4
  318. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  319. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  320. package/components/TableCanvas/index.cjs +1 -1
  321. package/components/TableCanvas/index.d.ts +2 -1
  322. package/components/TableCanvas/index.mjs +43 -41
  323. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  324. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  325. package/components/TableCanvas/styles/classNames.d.ts +1 -0
  326. package/components/TableCanvas/styles/getReservedTableHeight.d.ts +18 -0
  327. package/components/TableCanvas/styles/index.cjs +1 -1
  328. package/components/TableCanvas/styles/index.mjs +10 -10
  329. package/components/TableCanvas/styles/styles.constants.d.ts +1 -1
  330. package/components/TableCanvas/styles/styles.d.ts +2 -5
  331. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  332. package/components/TableCanvas/table-hooks/index.mjs +4 -4
  333. package/components/TableCanvas/table-hooks/useInlineStyle.d.ts +2 -1
  334. package/components/TableCanvas/table-hooks/useLeftSidebarValues.d.ts +7 -0
  335. package/components/TableCanvas/table-hooks/useSidebarOpenState.d.ts +11 -0
  336. package/components/TableCanvas/table-hooks/useSidebarValues.d.ts +1 -0
  337. package/components/TableCanvas/types/index.cjs +1 -1
  338. package/components/TableCanvas/types/index.mjs +2 -2
  339. package/components/TableCanvas/types/table-config.type.d.ts +19 -1
  340. package/components/TableCanvas/utils/index.cjs +1 -1
  341. package/components/TableCanvas/utils/index.mjs +2 -2
  342. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  343. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  344. package/components/TableCanvas/widgets/control-block/control-block.constants.d.ts +6 -0
  345. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  346. package/components/TableCanvas/widgets/control-block/index.mjs +5 -5
  347. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  348. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
  349. package/components/TableCanvas/widgets/control-block/types.d.ts +1 -0
  350. package/components/TableCanvas/widgets/index.cjs +1 -1
  351. package/components/TableCanvas/widgets/index.mjs +5 -5
  352. package/components/TableCanvas/widgets/mass-actions/MassActions.d.ts +2 -1
  353. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  354. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
  355. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCanvasWidth.d.ts +1 -0
  356. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsCompression.d.ts +1 -1
  357. package/components/TableCanvas/widgets/mass-actions/hooks/useMassActionsSidebar.d.ts +4 -1
  358. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  359. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  360. package/components/TableCanvas/widgets/table-or-card-UI.d.ts +6 -3
  361. package/components/TableContract/index.cjs +1 -1
  362. package/components/TableContract/index.mjs +2 -2
  363. package/components/TableGlide/TableGlide.d.ts +1 -1
  364. package/components/TableGlide/constants.d.ts +3 -3
  365. package/components/TableGlide/content-tokens.generated.d.ts +612 -0
  366. package/components/TableGlide/hooks/selection/index.cjs +1 -1
  367. package/components/TableGlide/hooks/selection/index.mjs +1 -1
  368. package/components/TableGlide/hooks/selection/useBaseHighlightRegions.d.ts +2 -1
  369. package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +2 -3
  370. package/components/TableGlide/hooks/selection/useColumnRowHighlightRegions.d.ts +1 -4
  371. package/components/TableGlide/hooks/selection/useSelectionGeometry.d.ts +3 -1
  372. package/components/TableGlide/hooks/useErrorCellRanges.d.ts +1 -2
  373. package/components/TableGlide/index.cjs +1 -1
  374. package/components/TableGlide/index.mjs +31 -31
  375. package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
  376. package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +4 -4
  377. package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
  378. package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
  379. package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
  380. package/components/TableGlide/lib/canvas/cells/index.mjs +13 -13
  381. package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
  382. package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +4 -4
  383. package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
  384. package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
  385. package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
  386. package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
  387. package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
  388. package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
  389. package/components/TableGlide/lib/canvas/index.cjs +1 -1
  390. package/components/TableGlide/lib/canvas/index.mjs +34 -34
  391. package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
  392. package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
  393. package/components/TableGlide/lib/canvas/primitives/CanvasLink.d.ts +2 -2
  394. package/components/TableGlide/lib/canvas/primitives/CanvasText.d.ts +3 -1
  395. package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
  396. package/components/TableGlide/lib/canvas/primitives/index.mjs +5 -5
  397. package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
  398. package/components/TableGlide/lib/canvas/utils/index.mjs +2 -2
  399. package/components/TableGlide/theming/activeTheme.type.d.ts +3 -1
  400. package/components/TableGlide/theming/cell-fill-override.d.ts +31 -0
  401. package/components/TableGlide/theming/custom-colors.d.ts +46 -11
  402. package/components/TableGlide/theming/fill-states.d.ts +19 -0
  403. package/components/TableGlide/theming/glide-colors.d.ts +14 -14
  404. package/components/TableGlide/theming/index.cjs +1 -1
  405. package/components/TableGlide/theming/index.mjs +1 -1
  406. package/components/TableGlide/theming/size-tokens.d.ts +1 -1
  407. package/components/TableGlide/theming/table-colors.generated.d.ts +529 -0
  408. package/components/TableGlide/tokens.d.ts +1 -104
  409. package/components/TableGlide/types.d.ts +3 -5
  410. package/components/TableTabs/index.cjs +1 -1
  411. package/components/TableTabs/index.mjs +1 -1
  412. package/components/Tooltip/index.cjs +1 -1
  413. package/components/Tooltip/index.mjs +1 -1
  414. package/components/TourWidget/index.cjs +3 -3
  415. package/components/TourWidget/index.mjs +14 -14
  416. package/components/Typography/index.cjs +1 -1
  417. package/components/Typography/index.mjs +1 -1
  418. package/components/Widget/index.cjs +1 -1
  419. package/components/Widget/index.mjs +2 -2
  420. package/formComponents/FormCombobox/index.cjs +1 -1
  421. package/formComponents/FormCombobox/index.mjs +1 -1
  422. package/formComponents/FormRadioGroupBox/index.cjs +1 -1
  423. package/formComponents/FormRadioGroupBox/index.mjs +1 -1
  424. package/formComponents/FormSegments/index.cjs +1 -1
  425. package/formComponents/FormSegments/index.mjs +1 -1
  426. package/formComponents/FormSwitch/index.cjs +1 -1
  427. package/formComponents/FormSwitch/index.mjs +1 -1
  428. package/index.cjs +1 -1
  429. package/index.d.ts +3 -1
  430. package/index.mjs +1864 -1859
  431. package/layouts/Container/index.cjs +1 -1
  432. package/layouts/Container/index.mjs +1 -1
  433. package/layouts/Container/lib/utils/index.cjs +1 -1
  434. package/layouts/Container/lib/utils/index.mjs +1 -1
  435. package/layouts/ErrorPage/index.cjs +1 -1
  436. package/layouts/ErrorPage/index.mjs +1 -1
  437. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  438. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  439. package/layouts/FiltersActions/index.cjs +1 -1
  440. package/layouts/FiltersActions/index.mjs +1 -1
  441. package/layouts/Layout/index.cjs +1 -1
  442. package/layouts/Layout/index.mjs +1 -1
  443. package/layouts/PageLayout/index.cjs +1 -1
  444. package/layouts/PageLayout/index.mjs +1 -1
  445. package/mcp-data/component-index.json +1158 -206
  446. package/mixins/index.cjs +4 -4
  447. package/mixins/index.mjs +61 -54
  448. package/package.json +6 -6
  449. package/shared/utils/resizable/index.cjs +1 -0
  450. package/shared/utils/resizable/index.d.ts +2 -0
  451. package/shared/utils/resizable/index.mjs +39 -0
  452. package/shared/utils/resizable/resizableConfig.d.ts +16 -0
  453. package/styles/index.cjs +1 -1
  454. package/styles/index.mjs +1 -1
  455. package/types/index.d.ts +1 -0
  456. package/types/utility.d.ts +1 -0
  457. package/utils/breakpoint/index.cjs +1 -1
  458. package/utils/breakpoint/index.mjs +2 -2
  459. package/utils/clickStream/index.cjs +1 -1
  460. package/utils/clickStream/index.mjs +1 -1
  461. package/utils/eventBus/index.cjs +1 -1
  462. package/utils/eventBus/index.mjs +1 -1
  463. package/utils/getActiveTheme.d.ts +1 -1
  464. package/utils/hooks/index.cjs +1 -1
  465. package/utils/hooks/index.mjs +1 -1
  466. package/utils/index.cjs +1 -1
  467. package/utils/index.mjs +8 -8
  468. package/utils/react/index.cjs +1 -1
  469. package/utils/react/index.mjs +1 -1
  470. package/utils/styles/index.cjs +1 -1
  471. package/utils/styles/index.mjs +1 -1
  472. package/chunks/AnalyticalWidget-BtyWKJuu.mjs +0 -537
  473. package/chunks/AnalyticalWidget-YytE3Rlw.cjs +0 -43
  474. package/chunks/ApprovalCenter-DdsLEipZ.cjs +0 -1
  475. package/chunks/BlockTitle-DC1McGof.cjs +0 -1
  476. package/chunks/FiltersActions-Bg5wvHFG.cjs +0 -1
  477. package/chunks/MassActions-BTrj9l-R.cjs +0 -1
  478. package/chunks/PageTitle-CrBeieoq.cjs +0 -9
  479. package/chunks/Stories-UYVANawW.cjs +0 -1
  480. package/chunks/TableCanvas-qnwh4c5g.cjs +0 -30
  481. package/chunks/TableGlide-BLbbkn4C.mjs +0 -8154
  482. package/chunks/TableGlide-CZ2mkokV.cjs +0 -1
  483. package/components/TableCanvas/feature-right-sidebar/constants.d.ts +0 -1
  484. package/components/TableCanvas/feature-right-sidebar/ui/TableSidebar.d.ts +0 -16
  485. /package/components/TableCanvas/{feature-right-sidebar → feature-sidebar}/ui/TableSidebar.classnames.d.ts +0 -0
@@ -2,9 +2,9 @@ import { jsxs as xe, jsx as Z } from "react/jsx-runtime";
2
2
  import "react-grid-layout/css/styles.css";
3
3
  import { iconButtonFilterClassNames as ye } from "../components/IconButton/index.mjs";
4
4
  import { useRef as B, useState as P, useLayoutEffect as he, useEffect as et, forwardRef as ge, useCallback as G, useMemo as yt, useImperativeHandle as be } from "react";
5
- import { b as Qt } from "./AnalyticalWidget-BtyWKJuu.mjs";
5
+ import { a as Qt } from "./AnalyticalWidget-CRfihris.mjs";
6
6
  import { Responsive as De } from "react-grid-layout";
7
- import { c as ve } from "./utils-u1KJ37g3.mjs";
7
+ import { c as ve } from "./utils-Hu77fGGe.mjs";
8
8
  import { surfaceTransparentAccent as ke, outlineAccent as Oe, outlineAccentMinor as Ne, shadowDownHardS as Ae, outlineTransparentAccent as Me, shadowDownSoftS as Re } from "@salutejs/sdds-themes/tokens/sdds_finai";
9
9
  import Et, { css as Ge } from "styled-components";
10
10
  const J = {
@@ -26,8 +26,8 @@ const J = {
26
26
  function Ee() {
27
27
  const e = B(null), [n, r] = P(0);
28
28
  return he(() => {
29
- const a = e.current;
30
- if (!a)
29
+ const u = e.current;
30
+ if (!u)
31
31
  return;
32
32
  let l = 0;
33
33
  const o = ve((s) => {
@@ -35,7 +35,7 @@ function Ee() {
35
35
  const d = ((y = s[0]) == null ? void 0 : y.contentRect.width) ?? 0;
36
36
  cancelAnimationFrame(l), l = requestAnimationFrame(() => r(d));
37
37
  });
38
- return o.observe(a), () => {
38
+ return o.observe(u), () => {
39
39
  cancelAnimationFrame(l), o.disconnect();
40
40
  };
41
41
  }, []), {
@@ -47,15 +47,15 @@ function He(e) {
47
47
  const {
48
48
  onWidthChange: n,
49
49
  margin: r,
50
- cols: a,
50
+ cols: u,
51
51
  containerPadding: l
52
52
  } = e, {
53
53
  ref: o,
54
54
  width: s
55
55
  } = Ee(), d = B(0);
56
56
  return et(() => {
57
- s > 0 && s !== d.current && (n == null || n(s, r, a, l), d.current = s);
58
- }, [s, n, r, a, l]), /* @__PURE__ */ Z("div", { ref: o, style: {
57
+ s > 0 && s !== d.current && (n == null || n(s, r, u, l), d.current = s);
58
+ }, [s, n, r, u, l]), /* @__PURE__ */ Z("div", { ref: o, style: {
59
59
  width: "100%"
60
60
  }, children: s > 0 && /* @__PURE__ */ Z(De, { ...e, width: s }) });
61
61
  }
@@ -68,7 +68,7 @@ const Te = Ge(["background-color:", ";border-radius:16px;outline:1px solid ", ";
68
68
  })(["&.react-draggable-dragging{outline:2px solid ", ";box-shadow:", ";cursor:grabbing;}& .", "{cursor:default;}height:100%;width:100%;cursor:", ";background-color:white;border-radius:16px;outline:", ";box-shadow:", ";overflow:hidden;"], () => Ne, () => Ae, Qt.topSlot, (e) => e.$isDraggable ? "grab" : "default", (e) => e.$isDraggable ? `2px solid ${Me}` : "none", () => Re), _e = Et.div.withConfig({
69
69
  displayName: "GridDNDstyled__GridItemContent"
70
70
  })(["height:100%;width:100%;"]), qe = (e) => !e || e === "." || e === "-" || e === " ";
71
- function tr(e, n, r, a) {
71
+ function tr(e, n, r, u) {
72
72
  var d, y;
73
73
  const l = [], o = r[n], s = /* @__PURE__ */ new Set();
74
74
  for (let N = 0; N < e.length; N++) {
@@ -80,13 +80,13 @@ function tr(e, n, r, a) {
80
80
  if (!m || qe(m) || s.has(`${m}`))
81
81
  continue;
82
82
  let p = 0;
83
- for (let u = i; u < A.length && A[u] === m; u++)
83
+ for (let a = i; a < A.length && A[a] === m; a++)
84
84
  p++;
85
85
  let x = 0;
86
- for (let u = N; u < e.length; u++) {
86
+ for (let a = N; a < e.length; a++) {
87
87
  let b = !0;
88
88
  for (let v = i; v < i + p; v++)
89
- if (!((d = e[u]) != null && d[v]) || ((y = e[u]) == null ? void 0 : y[v]) !== m) {
89
+ if (!((d = e[a]) != null && d[v]) || ((y = e[a]) == null ? void 0 : y[v]) !== m) {
90
90
  b = !1;
91
91
  break;
92
92
  }
@@ -94,7 +94,7 @@ function tr(e, n, r, a) {
94
94
  break;
95
95
  x++;
96
96
  }
97
- for (let u = N; u < N + x; u++)
97
+ for (let a = N; a < N + x; a++)
98
98
  for (let b = i; b < i + p; b++)
99
99
  s.add(`${m}`);
100
100
  l.push({
@@ -114,7 +114,7 @@ function tr(e, n, r, a) {
114
114
  // Максимальная ширина (ограничена количеством колонок)
115
115
  minH: 1,
116
116
  // Минимальная высота
117
- isResizable: a,
117
+ isResizable: u,
118
118
  // Можно ли изменять размер
119
119
  static: !1
120
120
  // Элемент не статичный (можно перемещать)
@@ -127,28 +127,28 @@ function er(e) {
127
127
  return Object.keys(e).sort((n, r) => (e[r] || 0) - (e[n] || 0));
128
128
  }
129
129
  function rr(e, n) {
130
- const r = Object.keys(e).sort((a, l) => {
131
- const o = e[a] || 0;
130
+ const r = Object.keys(e).sort((u, l) => {
131
+ const o = e[u] || 0;
132
132
  return (e[l] || 0) - o;
133
133
  });
134
- for (const a of r) {
135
- const l = e[a];
134
+ for (const u of r) {
135
+ const l = e[u];
136
136
  if (l !== void 0 && n >= l)
137
- return a;
137
+ return u;
138
138
  }
139
139
  return r[r.length - 1];
140
140
  }
141
141
  function nr(e, n, r) {
142
142
  var l, o;
143
- const a = r.indexOf(e);
144
- if (a === -1)
143
+ const u = r.indexOf(e);
144
+ if (u === -1)
145
145
  return null;
146
- for (let s = a - 1; s >= 0; s--) {
146
+ for (let s = u - 1; s >= 0; s--) {
147
147
  const d = r[s];
148
148
  if (d && ((l = n[d]) != null && l.length))
149
149
  return d;
150
150
  }
151
- for (let s = a + 1; s < r.length; s++) {
151
+ for (let s = u + 1; s < r.length; s++) {
152
152
  const d = r[s];
153
153
  if (d && ((o = n[d]) != null && o.length))
154
154
  return d;
@@ -161,13 +161,13 @@ function ir(e, n) {
161
161
  // Ограничиваем ширину элемента количеством колонок
162
162
  w: Math.max(1, Math.min(i.w, n))
163
163
  // Старые координаты не важны - будем раскладывать заново
164
- })).sort((i, m) => i.y - m.y || i.x - m.x), a = [], l = (i) => {
165
- for (; a.length < i; )
166
- a.push(Array(n).fill(!1));
164
+ })).sort((i, m) => i.y - m.y || i.x - m.x), u = [], l = (i) => {
165
+ for (; u.length < i; )
166
+ u.push(Array(n).fill(!1));
167
167
  }, o = (i, m, p, x) => {
168
168
  l(m + x);
169
- for (let u = m; u < m + x; u++) {
170
- const b = a[u];
169
+ for (let a = m; a < m + x; a++) {
170
+ const b = u[a];
171
171
  if (!b)
172
172
  return !1;
173
173
  for (let v = i; v < i + p; v++)
@@ -177,8 +177,8 @@ function ir(e, n) {
177
177
  return !0;
178
178
  }, s = (i, m, p, x) => {
179
179
  l(m + x);
180
- for (let u = m; u < m + x; u++) {
181
- const b = a[u];
180
+ for (let a = m; a < m + x; a++) {
181
+ const b = u[a];
182
182
  if (b)
183
183
  for (let v = i; v < i + p; v++)
184
184
  v < b.length && (b[v] = !0);
@@ -187,7 +187,7 @@ function ir(e, n) {
187
187
  let m = i;
188
188
  for (; ; ) {
189
189
  l(m + 1);
190
- const p = a[m];
190
+ const p = u[m];
191
191
  if (p && p.some((x) => !x))
192
192
  return m;
193
193
  m++;
@@ -212,13 +212,13 @@ function ir(e, n) {
212
212
  let p = y;
213
213
  for (; ; ) {
214
214
  let x = !1;
215
- for (let u = 0; u <= n - i.w; u++)
216
- if (o(u, p, i.w, i.h)) {
217
- s(u, p, i.w, i.h), A.push({
215
+ for (let a = 0; a <= n - i.w; a++)
216
+ if (o(a, p, i.w, i.h)) {
217
+ s(a, p, i.w, i.h), A.push({
218
218
  ...i,
219
- x: u,
219
+ x: a,
220
220
  y: p
221
- }), p === y && (N = u + i.w, N > n - 1 && (y = d(y), N = 0)), x = !0;
221
+ }), p === y && (N = a + i.w, N > n - 1 && (y = d(y), N = 0)), x = !0;
222
222
  break;
223
223
  }
224
224
  if (x)
@@ -241,9 +241,9 @@ const tt = (e) => e === "l" ? {
241
241
  function Ft(e, n) {
242
242
  if (!e || !n || e.length !== n.length)
243
243
  return !1;
244
- const r = [...e].sort((l, o) => l.i > o.i ? 1 : -1), a = [...n].sort((l, o) => l.i > o.i ? 1 : -1);
244
+ const r = [...e].sort((l, o) => l.i > o.i ? 1 : -1), u = [...n].sort((l, o) => l.i > o.i ? 1 : -1);
245
245
  for (let l = 0; l < r.length; l += 1) {
246
- const o = r[l], s = a[l];
246
+ const o = r[l], s = u[l];
247
247
  if (!o || !s || o.i !== s.i || o.x !== s.x || o.y !== s.y || o.w !== s.w || o.h !== s.h)
248
248
  return !1;
249
249
  }
@@ -255,15 +255,15 @@ function gt(e, n, r) {
255
255
  }
256
256
  function Be(e, n, r) {
257
257
  gt(e, n + 1, r);
258
- const a = e[n];
259
- return a ? a.some((l) => !l) : !1;
258
+ const u = e[n];
259
+ return u ? u.some((l) => !l) : !1;
260
260
  }
261
- function ht(e, n, r, a = 0) {
261
+ function ht(e, n, r, u = 0) {
262
262
  gt(e, n + 1, r);
263
263
  const l = e[n];
264
264
  if (!l)
265
265
  return -1;
266
- for (let o = Math.max(0, a); o < r; o++) {
266
+ for (let o = Math.max(0, u); o < r; o++) {
267
267
  if (o >= l.length)
268
268
  return -1;
269
269
  if (!l[o])
@@ -271,36 +271,36 @@ function ht(e, n, r, a = 0) {
271
271
  }
272
272
  return -1;
273
273
  }
274
- function Yt(e, n, r, a, l, o) {
274
+ function Yt(e, n, r, u, l, o) {
275
275
  gt(e, r + l, o);
276
276
  for (let s = r; s < r + l; s++) {
277
277
  const d = e[s];
278
278
  if (!d)
279
279
  return !1;
280
- for (let y = n; y < n + a; y++)
280
+ for (let y = n; y < n + u; y++)
281
281
  if (y >= o || d[y])
282
282
  return !1;
283
283
  }
284
284
  return !0;
285
285
  }
286
- function Ie(e, n, r, a, l, o) {
286
+ function Ie(e, n, r, u, l, o) {
287
287
  gt(e, r + l, o);
288
288
  for (let s = r; s < r + l; s++) {
289
289
  const d = e[s];
290
290
  if (d)
291
- for (let y = n; y < n + a; y++)
291
+ for (let y = n; y < n + u; y++)
292
292
  y < o && (d[y] = !0);
293
293
  }
294
294
  }
295
295
  function zt(e, n, r) {
296
- let a = Math.max(0, n);
296
+ let u = Math.max(0, n);
297
297
  for (; ; ) {
298
- if (Be(e, a, r))
299
- return a;
300
- a++;
298
+ if (Be(e, u, r))
299
+ return u;
300
+ u++;
301
301
  }
302
302
  }
303
- function $e(e, n, r, a) {
303
+ function $e(e, n, r, u) {
304
304
  const l = [], o = [];
305
305
  let s = 0, d = 0;
306
306
  for (const y of e) {
@@ -335,21 +335,21 @@ function $e(e, n, r, a) {
335
335
  }
336
336
  const {
337
337
  x,
338
- y: u
338
+ y: a
339
339
  } = p;
340
- if (Ie(o, x, u, i, m, r), l.push({
340
+ if (Ie(o, x, a, i, m, r), l.push({
341
341
  i: y,
342
342
  x,
343
- y: u,
343
+ y: a,
344
344
  w: i,
345
345
  h: m,
346
346
  minW: 1,
347
347
  maxW: r,
348
348
  minH: 1,
349
- isResizable: a,
349
+ isResizable: u,
350
350
  static: !1
351
- }), u > s)
352
- s = u, d = Math.max(0, ht(o, s, r, 0)), d === -1 && (s = zt(o, s, r), d = ht(o, s, r, 0));
351
+ }), a > s)
352
+ s = a, d = Math.max(0, ht(o, s, r, 0)), d === -1 && (s = zt(o, s, r), d = ht(o, s, r, 0));
353
353
  else {
354
354
  const b = ht(o, s, r, x + i);
355
355
  b === -1 ? (s = zt(o, s, r), d = ht(o, s, r, 0)) : d = b;
@@ -361,9 +361,9 @@ function Pt(e) {
361
361
  return [...e].sort((n, r) => n.y - r.y || n.x - r.x).map((n) => n.i);
362
362
  }
363
363
  const sr = (e) => Object.keys(e).sort((n, r) => (e[r] || 0) - (e[n] || 0))[0] ?? "lg";
364
- function je(e, n, r, a, l = 0, o = 0) {
364
+ function je(e, n, r, u, l = 0, o = 0) {
365
365
  const s = e.reduce((i, m) => Math.max(i, m.y + m.h), 0), d = Array.from({
366
- length: Math.max(s, o) + a + 1
366
+ length: Math.max(s, o) + u + 1
367
367
  }, () => Array(n).fill(!1));
368
368
  for (const {
369
369
  x: i,
@@ -371,27 +371,27 @@ function je(e, n, r, a, l = 0, o = 0) {
371
371
  w: p,
372
372
  h: x
373
373
  } of e)
374
- for (let u = m; u < m + x; u++) {
375
- d[u] || (d[u] = Array(n).fill(!1));
376
- const b = d[u];
374
+ for (let a = m; a < m + x; a++) {
375
+ d[a] || (d[a] = Array(n).fill(!1));
376
+ const b = d[a];
377
377
  for (let v = i; v < i + p; v++)
378
- u >= 0 && v >= 0 && v < n && b && (b[v] = !0);
378
+ a >= 0 && v >= 0 && v < n && b && (b[v] = !0);
379
379
  }
380
380
  const y = (i, m) => {
381
- for (let p = m; p < m + a; p++) {
381
+ for (let p = m; p < m + u; p++) {
382
382
  d[p] || (d[p] = Array(n).fill(!1));
383
383
  const x = d[p];
384
- for (let u = i; u < i + r; u++)
385
- if (u >= n || x && x[u])
384
+ for (let a = i; a < i + r; a++)
385
+ if (a >= n || x && x[a])
386
386
  return !1;
387
387
  }
388
388
  return !0;
389
389
  }, N = (i, m) => {
390
- for (let p = m; p < m + a; p++) {
390
+ for (let p = m; p < m + u; p++) {
391
391
  d[p] || (d[p] = Array(n).fill(!1));
392
392
  const x = d[p];
393
- for (let u = i; u < i + r; u++)
394
- u < n && x && (x[u] = !0);
393
+ for (let a = i; a < i + r; a++)
394
+ a < n && x && (x[a] = !0);
395
395
  }
396
396
  };
397
397
  let A = o;
@@ -432,7 +432,7 @@ const or = (e) => {
432
432
  xs: 3,
433
433
  xxs: 2
434
434
  },
435
- rowHeights: a = {
435
+ rowHeights: u = {
436
436
  lg: 248,
437
437
  md: 248,
438
438
  sm: 248,
@@ -451,7 +451,7 @@ const or = (e) => {
451
451
  useCSSTransforms: m = !0,
452
452
  compactType: p = "horizontal",
453
453
  smartCompact: x = !0,
454
- resizeHandles: u = ["se", "sw", "ne", "nw", "s", "w", "e", "n"],
454
+ resizeHandles: a = ["se", "sw", "ne", "nw", "s", "w", "e", "n"],
455
455
  draggableHandle: b = `.${J.dragHandle}`,
456
456
  draggableCancel: v = `button, input, select, textarea, .${J.noDrag}, .${Qt.topSlot}, .${ye.root}`,
457
457
  maxRows: Ut,
@@ -482,7 +482,7 @@ const or = (e) => {
482
482
  xxs: []
483
483
  }), K = B("lg"), Q = B([]), j = Dt > 0, [kt, Wt] = P(!1), [Ct, Ot] = P(null), lt = B(null), Nt = B(!1), At = B(null), ft = B(null), C = G(() => {
484
484
  lt.current && (clearTimeout(lt.current), lt.current = null);
485
- }, []), ut = G(() => {
485
+ }, []), at = G(() => {
486
486
  Wt(!1), Ot(null), Nt.current = !1;
487
487
  }, []), te = 64;
488
488
  et(() => {
@@ -532,23 +532,23 @@ const or = (e) => {
532
532
  }, Dt);
533
533
  }, O = () => {
534
534
  C(), w(), ft.current = null, Nt.current || requestAnimationFrame(() => {
535
- ut();
535
+ at();
536
536
  });
537
537
  };
538
538
  return t.addEventListener("pointerdown", D), document.addEventListener("pointerup", O), () => {
539
539
  t.removeEventListener("pointerdown", D), document.removeEventListener("pointerup", O), C(), w();
540
540
  };
541
- }, [j, Dt, C, ut]);
541
+ }, [j, Dt, C, at]);
542
542
  const St = j ? l && kt : l, [I, _t] = P({
543
543
  lg: [],
544
544
  md: [],
545
545
  sm: [],
546
546
  xs: [],
547
547
  xxs: []
548
- }), [qt, ee] = P("lg"), [S, re] = P(a.lg ?? Xt), [ne, at] = P(p), [ie, Bt] = P(!1), se = yt(() => b.split(".").join(" "), [b]), oe = yt(() => Ht ?? Xe, [Ht]), dt = yt(() => new Map(e.map((t) => [t.id, t.type])), [e]), L = B(/* @__PURE__ */ new Map()), mt = G((t) => L.current.get(t) ?? dt.get(t) ?? "s", [dt]), $ = G((t) => t.map((f) => ({
548
+ }), [qt, ee] = P("lg"), [S, re] = P(u.lg ?? Xt), [ne, ut] = P(p), [ie, Bt] = P(!1), se = yt(() => b.split(".").join(" "), [b]), oe = yt(() => Ht ?? Xe, [Ht]), dt = yt(() => new Map(e.map((t) => [t.id, t.type])), [e]), L = B(/* @__PURE__ */ new Map()), mt = G((t) => L.current.get(t) ?? dt.get(t) ?? "s", [dt]), $ = G((t) => t.map((f) => ({
549
549
  id: f,
550
550
  type: mt(f)
551
- })), [mt]), Mt = G((t) => a[t] ?? a.md ?? Xt, [a]), H = G((t, f, c) => {
551
+ })), [mt]), Mt = G((t) => u[t] ?? u.md ?? Xt, [u]), H = G((t, f, c) => {
552
552
  const w = c ?? R, h = f[t] ?? [], D = V.current[t] ?? [], O = new Map(h.map((k) => [k.i, k])), g = new Map(D.map((k) => [k.i, k]));
553
553
  return w.map((k) => {
554
554
  const E = mt(k), T = O.get(k) ?? g.get(k) ?? null, W = U.current[k] ?? tt(E), X = T ? {
@@ -608,7 +608,7 @@ const or = (e) => {
608
608
  const O = Q.current[D - 1], g = Q.current[D];
609
609
  !O || !g || (w += Math.abs(g.x - O.x), h += Math.abs(g.y - O.y));
610
610
  }
611
- w + h < 10 || (w > h * 1.5 ? at("horizontal") : h > w * 1.5 && at("vertical"));
611
+ w + h < 10 || (w > h * 1.5 ? ut("horizontal") : h > w * 1.5 && ut("vertical"));
612
612
  }, [x]), jt = G(() => {
613
613
  requestAnimationFrame(() => {
614
614
  requestAnimationFrame(() => {
@@ -634,11 +634,11 @@ const or = (e) => {
634
634
  });
635
635
  }, [e]);
636
636
  const ce = G((t, f, c, w, h, D) => {
637
- Q.current = [], at(p), j && (Nt.current = !0), st == null || st(t, f, c, w, h, D);
637
+ Q.current = [], ut(p), j && (Nt.current = !0), st == null || st(t, f, c, w, h, D);
638
638
  }, [p, st, j]), le = G((t, f, c, w, h, D) => {
639
639
  $t(h.clientX, h.clientY), it == null || it(t, f, c, w, h, D);
640
640
  }, [$t, it]), fe = G((t, f, c, w, h, D) => {
641
- ot == null || ot(t, f, c, w, h, D), j && ut();
641
+ ot == null || ot(t, f, c, w, h, D), j && at();
642
642
  const O = Pt(t);
643
643
  _("[GridDND] dragStop: nextOrder(readingOrder)", O), ct(O);
644
644
  const g = q(O), k = K.current, E = H(k, g, O);
@@ -650,10 +650,10 @@ const or = (e) => {
650
650
  }, g, {
651
651
  itemsOrder: O,
652
652
  itemsOrderTyped: $(O)
653
- }), at(p);
653
+ }), ut(p);
654
654
  const T = t, W = g[k];
655
655
  Ft(T, W) ? _("[GridDND] dragStop: live layout == target (OK)") : (_("[GridDND] dragStop: live layout != target → forceSyncWithRgl()"), jt());
656
- }, [ot, j, ut, q, H, F, M, r, S, p, jt, _, $]), ue = G((t, f) => {
656
+ }, [ot, j, at, q, H, F, M, r, S, p, jt, _, $]), ae = G((t, f) => {
657
657
  _("RGL onLayoutChange", {
658
658
  cur: t,
659
659
  all: f
@@ -702,7 +702,7 @@ const or = (e) => {
702
702
  }, {
703
703
  itemsOrder: R
704
704
  });
705
- }, [M, H, I, r, S, R, _]), ae = G((t) => {
705
+ }, [M, H, I, r, S, R, _]), ue = G((t) => {
706
706
  K.current = t, ee(t), re(Mt(t));
707
707
  const f = q(R), c = H(t, f, R);
708
708
  rt == null || rt(t, {
@@ -816,7 +816,7 @@ const or = (e) => {
816
816
  userSelect: "none",
817
817
  touchAction: "none"
818
818
  } : {}
819
- }, children: /* @__PURE__ */ Z(He, { className: "layout", layouts: I, breakpoints: n, cols: r, rowHeight: S, margin: s, containerPadding: d, isDraggable: St, isResizable: o, onLayoutChange: ue, onBreakpointChange: ae, autoSize: i, useCSSTransforms: m, preventCollision: y, compactType: ie ? null : x ? ne : p, allowOverlap: N, isBounded: A, draggableHandle: b, draggableCancel: v, resizeHandles: o ? u : [], maxRows: Ut, transformScale: Vt, onWidthChange: de, onDrag: le, onDragStart: ce, onDragStop: fe, style: {
819
+ }, children: /* @__PURE__ */ Z(He, { className: "layout", layouts: I, breakpoints: n, cols: r, rowHeight: S, margin: s, containerPadding: d, isDraggable: St, isResizable: o, onLayoutChange: ae, onBreakpointChange: ue, autoSize: i, useCSSTransforms: m, preventCollision: y, compactType: ie ? null : x ? ne : p, allowOverlap: N, isBounded: A, draggableHandle: b, draggableCancel: v, resizeHandles: o ? a : [], maxRows: Ut, transformScale: Vt, onWidthChange: de, onDrag: le, onDragStart: ce, onDragStop: fe, style: {
820
820
  background: "transparent",
821
821
  ...Zt
822
822
  }, children: me.map((t) => /* @__PURE__ */ Z(Se, { $isDraggable: j ? kt && Ct === t.id : l, children: /* @__PURE__ */ Z(oe, { isDraggable: St, className: se, children: typeof bt == "function" ? bt(t, () => Rt(t.id), (f) => Gt(t.id, f)) : bt }) }, t.id)) }) });
@@ -4,7 +4,7 @@ import { Box as tt } from "../components/Box/index.mjs";
4
4
  import { EmbedIconButton as et } from "@salutejs/sdds-finai";
5
5
  import { spacing8x as v, surfaceSolidCard as nt, spacing12x as ot, shadowDownSoftS as it, spacing6x as st, surfaceSolidSecondary as rt, spacing16x as j, outlineSolidSecondary as at, outlineSolidSecondaryHover as lt } from "@salutejs/sdds-themes/tokens/sdds_finai";
6
6
  import p, { css as ct } from "styled-components";
7
- import { t as dt, e as ut, d as pt } from "./utils-u1KJ37g3.mjs";
7
+ import { t as dt, f as ut, e as pt } from "./utils-Hu77fGGe.mjs";
8
8
  import { useCallback as O, useEffect as M, useMemo as B, useState as A, useRef as k } from "react";
9
9
  const W = {
10
10
  icon: "left-panel__toggle-button",
@@ -1 +1 @@
1
- "use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),A=require("./utils-ChDQGRjv.cjs"),n=require("react"),z={icon:"left-panel__toggle-button",leftBlockIsResizing:"left-panel__is-resizing"},te=72,ne=56,q=240,se=540,$=.2,ie=h(Z.Box).withConfig({displayName:"styled__PanelContainer"})(["width:100%;height:100%;min-width:","px;display:flex;background-color:",";margin-right:",";border-radius:",";box-shadow:",";transition:",";max-width:",";position:relative;overflow:hidden;padding-right:",";"],({minWidth:e})=>e,()=>s.surfaceSolidCard,({$isAdaptive1280:e})=>e?s.spacing8x:s.spacing12x,s.spacing8x,()=>s.shadowDownSoftS,e=>e.$resizing?"none":`max-width ${$}s ease-in-out, opacity ${$}s ease-in-out`,e=>e.width!==void 0?`${Math.min(e.width,e.maxWidth)}px`:`${e.minWidth}px`,({showResizeable:e})=>e?s.spacing6x:0),oe=h.div.withConfig({displayName:"styled__PanelCrossfade"})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]),W=h.css(["grid-area:1 / 1;min-width:0;min-height:0;opacity:",";visibility:",";pointer-events:",";transition:opacity ","s ease-in-out,visibility 0s ",";"],({$active:e})=>e?1:0,({$active:e})=>e?"visible":"hidden",({$active:e})=>e?"auto":"none",$,({$active:e})=>e?"0s":`${$}s`),re=h.div.withConfig({displayName:"styled__PanelContent"})(["",";width:100%;height:100%;margin-top:0;position:relative;"],W),ae=h.div.withConfig({displayName:"styled__PanelCollapsedContent"})(["",";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:",";width:100%;"],W,({$isAdaptive1280:e,showResizeable:t})=>t?e?"6px":"10px":s.spacing8x),le=h.div.withConfig({displayName:"styled__PanelCollapsedBody"})(["gap:",";display:flex;flex-direction:column;"],s.spacing8x),ce=h(ee.EmbedIconButton).withConfig({displayName:"styled__PanelIconButton"})(["z-index:1;position:",";top:",";right:",";width:","px !important;height:","px !important;.left-panel__toggle-button{transform:",";}"],e=>e.isAbsolute?"absolute":"static",s.spacing8x,s.spacing8x,({$isAdaptive1280:e})=>e?32:40,({$isAdaptive1280:e})=>e?32:40,e=>e.collapsed?"rotate(270deg)":"rotate(90deg)"),de=h.div.withConfig({displayName:"styled__PanelSeparator"})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:",";}&::after{content:'';position:absolute;top:",";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:",";background-color:",";}&:hover{&::after{background-color:",";}}"],()=>s.surfaceSolidSecondary,`calc(50% - ${s.spacing16x} / 2)`,s.spacing16x,()=>s.outlineSolidSecondary,()=>s.outlineSolidSecondaryHover),j=({onClick:e,collapsed:t=!1,isAbsolute:o=!1,isAdaptive1280:a=!1,...u})=>c.jsx(ce,{onClick:e,$isAdaptive1280:a,collapsed:t,isAbsolute:o,view:"secondary",size:a?"s":"l",...u,children:c.jsx(Y.IconArrowBarDown,{className:z.icon})}),T=({setWidth:e,isResizingRef:t,setIsResizing:o,panelRef:a,minWidth:u,maxWidth:b,parentRef:P,isCollapsed:C,onResize:m})=>{const L=n.useCallback(()=>{var f;document.body.style.cursor="col-resize",document.body.style.userSelect="none",t.current=!0,o(!0),(f=a.current)==null||f.classList.add(z.leftBlockIsResizing)},[a,t,o]);return n.useEffect(()=>{const f=()=>{var _,r;document.body.style.cursor="auto",document.body.style.userSelect="",t.current=!1,o(!1),(_=a.current)==null||_.classList.remove(z.leftBlockIsResizing);const g=((r=a.current)==null?void 0:r.clientWidth)??0;g>u&&g<q&&e(u)},B=g=>{if(!t.current||!a.current||!P.current)return;g.preventDefault();const d=P.current.getBoundingClientRect(),r=g.clientX-d.left,l=A.clamp(u,r,b);e(l),!C&&m&&m(l)},x=A.throttleWithLastCall(B,16);return window.addEventListener("mousemove",x),window.addEventListener("mouseup",f),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",f)}},[e,t,o,a,u,b,P,C,m]),{startResizing:L}},X=e=>({buttonSize:e?"xs":"s"}),H=(e,t)=>t??(e?ne:te),E=(e,t)=>typeof e=="function"?e(t):e,O=({widthState:e,minWidth:t,maxWidth:o=se,disableMediaAdaptive:a=!1,collapseState:u,containerProps:b,contentProps:P,collapsedContentProps:C,expandedContent:m,collapsedContent:L,collapsedFooterContent:f,showToggleButton:B=!0,showResizeable:x=!0,onResize:g,onToggleCollapse:d})=>{const{down:_}=A.useBreakpoint(),r=!a&&_("xl"),l=H(r,t),w=n.useMemo(()=>X(r),[r]),R=n.useMemo(()=>E(m,w),[m,w]),F=n.useMemo(()=>E(L,w),[L,w]),K=n.useMemo(()=>E(f,w),[f,w]),V=n.useState(!1),[i,I]=u??V,G=n.useState(Number(i?l:o)),[y,v]=e??G,N=n.useRef(null),M=n.useRef(null),k=n.useRef(!1),[J,Q]=n.useState(!1),{startResizing:U}=T({setWidth:v,isResizingRef:k,setIsResizing:Q,panelRef:N,minWidth:l,maxWidth:o,parentRef:M,isCollapsed:i,onResize:g});n.useEffect(()=>{if(y!==void 0){const p=y<q;p!==i&&(I(p),d&&!k.current&&d(p))}},[y,i,d,I]),n.useEffect(()=>{!k.current&&i&&y!==l&&v(l)},[i,l,v,y]);const D=n.useCallback(()=>{I(p=>{const S=!p;return d&&d(S),v(S?l:o),S})},[d,I,v,l,o]);return c.jsxs(ie,{ref:N,collapsed:i,maxWidth:o,minWidth:l,width:y,$resizing:J,$isAdaptive1280:r,showResizeable:x,...b,children:[c.jsxs(oe,{children:[c.jsxs(re,{$active:!i,"aria-hidden":i,...P,children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r,isAbsolute:!0}),R]}),c.jsxs(ae,{$active:i,"aria-hidden":!i,$isAdaptive1280:r,showResizeable:x,...C,children:[c.jsxs(le,{children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r}),F]}),K]})]}),x&&c.jsx(de,{onMouseDown:p=>{var S;p.preventDefault(),(S=N.current)!=null&&S.parentElement&&(M.current=N.current.parentElement),U()}})]})};O.LeftPanelToggleButton=j;exports.LeftPanel=O;exports.LeftPanelToggleButton=j;exports.getLeftPanelMinWidth=H;exports.getLeftPanelSlotSizes=X;exports.renderLeftPanelSlot=E;exports.toggleButtonClassNames=z;exports.useResize=T;
1
+ "use strict";const c=require("react/jsx-runtime"),Y=require("@salutejs/plasma-icons"),Z=require("../components/Box/index.cjs"),ee=require("@salutejs/sdds-finai"),s=require("@salutejs/sdds-themes/tokens/sdds_finai"),h=require("styled-components"),A=require("./utils-OQNruMpn.cjs"),n=require("react"),z={icon:"left-panel__toggle-button",leftBlockIsResizing:"left-panel__is-resizing"},te=72,ne=56,q=240,se=540,$=.2,ie=h(Z.Box).withConfig({displayName:"styled__PanelContainer"})(["width:100%;height:100%;min-width:","px;display:flex;background-color:",";margin-right:",";border-radius:",";box-shadow:",";transition:",";max-width:",";position:relative;overflow:hidden;padding-right:",";"],({minWidth:e})=>e,()=>s.surfaceSolidCard,({$isAdaptive1280:e})=>e?s.spacing8x:s.spacing12x,s.spacing8x,()=>s.shadowDownSoftS,e=>e.$resizing?"none":`max-width ${$}s ease-in-out, opacity ${$}s ease-in-out`,e=>e.width!==void 0?`${Math.min(e.width,e.maxWidth)}px`:`${e.minWidth}px`,({showResizeable:e})=>e?s.spacing6x:0),oe=h.div.withConfig({displayName:"styled__PanelCrossfade"})(["flex:1 1 auto;min-width:0;height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden;"]),W=h.css(["grid-area:1 / 1;min-width:0;min-height:0;opacity:",";visibility:",";pointer-events:",";transition:opacity ","s ease-in-out,visibility 0s ",";"],({$active:e})=>e?1:0,({$active:e})=>e?"visible":"hidden",({$active:e})=>e?"auto":"none",$,({$active:e})=>e?"0s":`${$}s`),re=h.div.withConfig({displayName:"styled__PanelContent"})(["",";width:100%;height:100%;margin-top:0;position:relative;"],W),ae=h.div.withConfig({displayName:"styled__PanelCollapsedContent"})(["",";height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:",";width:100%;"],W,({$isAdaptive1280:e,showResizeable:t})=>t?e?"6px":"10px":s.spacing8x),le=h.div.withConfig({displayName:"styled__PanelCollapsedBody"})(["gap:",";display:flex;flex-direction:column;"],s.spacing8x),ce=h(ee.EmbedIconButton).withConfig({displayName:"styled__PanelIconButton"})(["z-index:1;position:",";top:",";right:",";width:","px !important;height:","px !important;.left-panel__toggle-button{transform:",";}"],e=>e.isAbsolute?"absolute":"static",s.spacing8x,s.spacing8x,({$isAdaptive1280:e})=>e?32:40,({$isAdaptive1280:e})=>e?32:40,e=>e.collapsed?"rotate(270deg)":"rotate(90deg)"),de=h.div.withConfig({displayName:"styled__PanelSeparator"})(["position:absolute;top:0;right:0px;width:12px;height:100%;cursor:col-resize;z-index:10;&::before{content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);width:12px;height:100%;background-color:",";}&::after{content:'';position:absolute;top:",";left:50%;transform:translateX(-50%);border-radius:95px;width:4px;height:",";background-color:",";}&:hover{&::after{background-color:",";}}"],()=>s.surfaceSolidSecondary,`calc(50% - ${s.spacing16x} / 2)`,s.spacing16x,()=>s.outlineSolidSecondary,()=>s.outlineSolidSecondaryHover),j=({onClick:e,collapsed:t=!1,isAbsolute:o=!1,isAdaptive1280:a=!1,...u})=>c.jsx(ce,{onClick:e,$isAdaptive1280:a,collapsed:t,isAbsolute:o,view:"secondary",size:a?"s":"l",...u,children:c.jsx(Y.IconArrowBarDown,{className:z.icon})}),T=({setWidth:e,isResizingRef:t,setIsResizing:o,panelRef:a,minWidth:u,maxWidth:b,parentRef:P,isCollapsed:C,onResize:m})=>{const L=n.useCallback(()=>{var f;document.body.style.cursor="col-resize",document.body.style.userSelect="none",t.current=!0,o(!0),(f=a.current)==null||f.classList.add(z.leftBlockIsResizing)},[a,t,o]);return n.useEffect(()=>{const f=()=>{var _,r;document.body.style.cursor="auto",document.body.style.userSelect="",t.current=!1,o(!1),(_=a.current)==null||_.classList.remove(z.leftBlockIsResizing);const g=((r=a.current)==null?void 0:r.clientWidth)??0;g>u&&g<q&&e(u)},B=g=>{if(!t.current||!a.current||!P.current)return;g.preventDefault();const d=P.current.getBoundingClientRect(),r=g.clientX-d.left,l=A.clamp(u,r,b);e(l),!C&&m&&m(l)},x=A.throttleWithLastCall(B,16);return window.addEventListener("mousemove",x),window.addEventListener("mouseup",f),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",f)}},[e,t,o,a,u,b,P,C,m]),{startResizing:L}},X=e=>({buttonSize:e?"xs":"s"}),H=(e,t)=>t??(e?ne:te),E=(e,t)=>typeof e=="function"?e(t):e,O=({widthState:e,minWidth:t,maxWidth:o=se,disableMediaAdaptive:a=!1,collapseState:u,containerProps:b,contentProps:P,collapsedContentProps:C,expandedContent:m,collapsedContent:L,collapsedFooterContent:f,showToggleButton:B=!0,showResizeable:x=!0,onResize:g,onToggleCollapse:d})=>{const{down:_}=A.useBreakpoint(),r=!a&&_("xl"),l=H(r,t),w=n.useMemo(()=>X(r),[r]),R=n.useMemo(()=>E(m,w),[m,w]),F=n.useMemo(()=>E(L,w),[L,w]),K=n.useMemo(()=>E(f,w),[f,w]),V=n.useState(!1),[i,I]=u??V,G=n.useState(Number(i?l:o)),[y,v]=e??G,N=n.useRef(null),M=n.useRef(null),k=n.useRef(!1),[J,Q]=n.useState(!1),{startResizing:U}=T({setWidth:v,isResizingRef:k,setIsResizing:Q,panelRef:N,minWidth:l,maxWidth:o,parentRef:M,isCollapsed:i,onResize:g});n.useEffect(()=>{if(y!==void 0){const p=y<q;p!==i&&(I(p),d&&!k.current&&d(p))}},[y,i,d,I]),n.useEffect(()=>{!k.current&&i&&y!==l&&v(l)},[i,l,v,y]);const D=n.useCallback(()=>{I(p=>{const S=!p;return d&&d(S),v(S?l:o),S})},[d,I,v,l,o]);return c.jsxs(ie,{ref:N,collapsed:i,maxWidth:o,minWidth:l,width:y,$resizing:J,$isAdaptive1280:r,showResizeable:x,...b,children:[c.jsxs(oe,{children:[c.jsxs(re,{$active:!i,"aria-hidden":i,...P,children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r,isAbsolute:!0}),R]}),c.jsxs(ae,{$active:i,"aria-hidden":!i,$isAdaptive1280:r,showResizeable:x,...C,children:[c.jsxs(le,{children:[B&&c.jsx(j,{onClick:D,collapsed:i,isAdaptive1280:r}),F]}),K]})]}),x&&c.jsx(de,{onMouseDown:p=>{var S;p.preventDefault(),(S=N.current)!=null&&S.parentElement&&(M.current=N.current.parentElement),U()}})]})};O.LeftPanelToggleButton=j;exports.LeftPanel=O;exports.LeftPanelToggleButton=j;exports.getLeftPanelMinWidth=H;exports.getLeftPanelSlotSizes=X;exports.renderLeftPanelSlot=E;exports.toggleButtonClassNames=z;exports.useResize=T;
@@ -3,12 +3,12 @@ import { jsxs as E, jsx as g } from "react/jsx-runtime";
3
3
  import { Box as A } from "../components/Box/index.mjs";
4
4
  import { Chip as O, ChipGroup as F, TabItem as G, Button as M, Tabs as H } from "@salutejs/sdds-finai";
5
5
  import { Collapse as P } from "../components/Collapse/index.mjs";
6
- import { o as N, C as q } from "./Table-tUWuA3Ri.mjs";
6
+ import { o as N, C as q } from "./Table-FrYs56BB.mjs";
7
7
  import { IconClose as K } from "@salutejs/plasma-icons";
8
- import { c as T, u as U } from "./utils-u1KJ37g3.mjs";
8
+ import { c as T, u as U } from "./utils-Hu77fGGe.mjs";
9
9
  import W, { css as Z } from "styled-components";
10
10
  import { borderRadiusS as X, textPrimary as Y, onLightTextSecondary as J, bodyS as Q } from "@salutejs/sdds-themes/tokens/sdds_finai";
11
- import { F as tt } from "./FiltersActions-BJ5gD6Nx.mjs";
11
+ import { F as tt } from "./FiltersActions-CS27WxA6.mjs";
12
12
  const x = "list-of-filters", h = {
13
13
  chipsGroup: `${x}__chip-group`,
14
14
  chipsGroupLabel: `${x}__chip-group__label`,
@@ -1 +1 @@
1
- "use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-vv1HTrxe.cjs"),$=require("@salutejs/plasma-icons"),q=require("./utils-ChDQGRjv.cjs"),B=require("styled-components"),k=require("@salutejs/sdds-themes/tokens/sdds_finai"),I=require("./FiltersActions-Bg5wvHFG.cjs"),_="list-of-filters",f={chipsGroup:`${_}__chip-group`,chipsGroupLabel:`${_}__chip-group__label`,chipsGroupCount:`${_}__chip-group__count`,chip:`${_}__chip`,clearButtonBlock:`${_}__clear-button-block`,chipsContainer:`${_}__chips-container`,container:`${_}__container`},N=e=>"groupId"in e,W=()=>B.css(k.bodyS),G=250,M=B(w.ChipGroup).withConfig({displayName:"ChipOrGroup__StyledChipGroup"})(["&{border-radius:",";padding:4px 2px;"," align-items:center;&.","{gap:4px;& .",":first-child,& ."," + .","{margin-left:4px;}& .","{display:inline-block;min-width:0;max-width:","px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& .","{color:",";margin-left:4px;}& ."," svg{color:"," !important;}}}"],()=>k.borderRadiusS,()=>W(),f.chipsGroup,f.chip,f.chipsGroupLabel,f.chip,f.chipsGroupLabel,G,f.chipsGroupCount,()=>k.textPrimary,f.chip,()=>k.onLightTextSecondary),V=({itemOrGroup:e,maxLengthInGroup:i=2,ellipsisLabel:h=!1,chipStyle:n,renderGroupLabel:u,renderChipLabel:r})=>{if(N(e)){const p=e,b=p.items.slice(0,i),d=p.items.length-b.length,l=u?u(p):p.groupLabel;return g.jsxs(M,{className:f.chipsGroup,size:"xs",gap:"wide",view:"default",isCommonChipStyles:!1,children:[h?g.jsx("span",{className:f.chipsGroupLabel,title:l,children:l}):l,b.map(t=>g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(p,t):t.label.toString(),size:"xs",pilled:!0,onClick:t.onClick,style:{maxWidth:180,...A.overflowDotsStyle,...n&&n(p,t)},appearance:"transparent"},t.id)),d>0&&g.jsx(I.FiltersActionsTooltip,{groupLabel:l,items:p.items.map(t=>r?r(p,t):t.label.toString()),children:g.jsxs("span",{className:f.chipsGroupCount,children:["+",d]})})]})}return g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(null,e):e.label.toString(),size:"xs",pilled:!0,onClick:e.onClick,style:{maxWidth:150,...A.overflowDotsStyle,...n&&n(e,void 0)},appearance:"transparent"})},H=(e,i)=>{y.useEffect(()=>{var p;if(!i)return;const h=(p=e.current)==null?void 0:p.querySelector(".tabs-clip-scroll"),n=h==null?void 0:h.firstElementChild;if(!h)return;const u=()=>{h.dispatchEvent(new Event("scroll",{bubbles:!0}))},r=q.createSafeResizeObserver(u);return r.observe(h),n&&r.observe(n),()=>{r.disconnect()}},[e,i])},P=(e,i,h)=>{var c,s;const n=y.useRef(null),u=!!n.current,[r,p]=y.useState(0),b=n.current,d=(c=n.current)==null?void 0:c.firstChild,l=(s=n.current)==null?void 0:s.lastChild,t=(b&&d&&l&&b.offsetWidth-d.offsetWidth-l.offsetWidth-i*2-h*2)??void 0;return y.useEffect(()=>{const o=n.current;let m=0;function j(){m=(o==null?void 0:o.offsetWidth)??0,p(m)}j();const S=q.createSafeResizeObserver(j);return e&&o&&S.observe(o),()=>{S.disconnect()}},[e,u]),{refForContainer:n,maxWidthForCenterElement:t}},K={xs:{height:32,paddingInline:0}},D=1,F=`${D}px solid ${()=>A.COLORS.border}`,U=B(w.Tabs).withConfig({displayName:"ListOfFilters__StyledTabs"})({"&":{"& .tabs-clip-scroll":{overflowY:"hidden"},"& button.tab-item-animated":{marginLeft:"8px","&:first-of-type":{marginLeft:"0px"}}}}),Z=({opened:e,items:i,clearAll:h,size:n="xs",paddingTop:u=0,maxLengthInGroup:r=2,ellipsisLabel:p=!1,sizeOnOpen:b,leftSlot:d,paddingInline:l,maxHeight:t,chipStyle:c,renderGroupLabel:s,renderChipLabel:o,showResetAllFiltersButton:m=!0,extraCss:j={}})=>{const S=K[n],z=l??S.paddingInline,C=t??S.height,{refForContainer:L}=P(e,z,D);return q.useDebouncedValue(e,200),H(L,e),g.jsx(T.Collapse,{isOpen:e,sizeOnOpen:b??C+u,unMountOnClose:!0,children:g.jsxs(O.Box,{ref:L,className:f.container,$css:{display:"flex",borderInline:F,borderTop:F,paddingInline:z,maxHeight:C,marginTop:u,flexDirection:"row-reverse",...j},children:[g.jsx(O.Box,{$css:"display: inline;",children:d??null}),g.jsx(U,{className:f.chipsContainer,view:"clear",size:"xs",style:{height:C-D,flex:1,minWidth:0,overflow:"hidden"},children:!!i.length&&i.map((a,x)=>{let v;return"groupId"in a&&(v=a.groupId??x),"id"in a&&(v=a.id??x),g.jsx(w.TabItem,{view:"clear",onClick:E=>E.preventDefault(),children:g.jsx(V,{maxLengthInGroup:r,ellipsisLabel:p,itemOrGroup:a,chipStyle:c,renderGroupLabel:s,renderChipLabel:o})},v)})}),g.jsx(O.Box,{className:f.clearButtonBlock,$css:"display: inline-flex; margin-left: auto;",children:m&&g.jsx(w.Button,{view:"clear",size:"xs",text:"Сбросить все",disabled:!i.length,contentLeft:g.jsx($.IconClose,{size:"xs",color:"inherit"}),onClick:h})})]})})},R=y.memo(Z),X=e=>e==null?"":e instanceof Date?e.toLocaleDateString():Array.isArray(e)?e.map(i=>i instanceof Date?i.toLocaleDateString():String(i??"")).join(", "):String(e),Y=({filters:e,filtersInfo:i,options:h,updateFilters:n,order:u})=>{const{labelFromValueMaps:r}=y.useMemo(()=>{const d={};for(const l of Object.entries(h)){const[t,c]=l;d[t]=new Map(c.map(s=>[String(s.value),s.label]))}return{labelFromValueMaps:d}},[h]),p=y.useCallback(()=>{for(const d of Object.entries(i)){const[l,t]=d;n(l,t.clearedValue)}},[i,n]);return{...y.useMemo(()=>{const d=Object.entries(e).reduce((t,c)=>{var L;const s=c[0],o=c[1],m=Array.isArray(o);if(!(m&&o.length||!m&&o&&o!==!1)||o===i[s].clearedValue)return t;if(typeof o=="boolean"){const a={id:s,label:i[s].label,onClick:()=>{n(s,i[s].clearedValue)}};return t.push(a),t}const C={groupId:s,groupLabel:i[s].label,items:[]};if(m)C.items=o.map(a=>{var x,v;return{id:a,label:((v=(x=r==null?void 0:r[s])==null?void 0:x.get)==null?void 0:v.call(x,a))??a.toString(),onClick:()=>{n(s,o.filter(E=>E!==a))}}});else{const a=r==null?void 0:r[s],x=((L=a==null?void 0:a.get)==null?void 0:L.call(a,o))??X(o);C.items=[{id:o.toString(),label:x,onClick:()=>{n(s,"clearedValue"in i[s]?i[s].clearedValue:"")}}]}return t.push(C),t},[]);let l=d;if(u&&u!=="default"){if(typeof u=="function")l=u(d);else if(Array.isArray(u)){const t=new Map;d.forEach(c=>{const s="groupId"in c?c.groupId:String(c.id);t.set(s,c)}),l=[],u.forEach(c=>{const s=t.get(c);s&&(l.push(s),t.delete(c))}),t.size>0&&Array.from(t.keys()).sort().forEach(s=>{const o=t.get(s);o&&l.push(o)})}}return{filterListOpened:d.length>0,filterList:l}},[e,i,r,n,u]),clearAll:p,labelFromValueMaps:r}},J=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));exports.ListOfFilters=R;exports.ListOfFilters_lazy=J;exports.isGroup=N;exports.listOfFiltersClassNames=f;exports.useFiltersList=Y;
1
+ "use strict";const y=require("react"),g=require("react/jsx-runtime"),O=require("../components/Box/index.cjs"),w=require("@salutejs/sdds-finai"),T=require("../components/Collapse/index.cjs"),A=require("./Table-CZludfzU.cjs"),$=require("@salutejs/plasma-icons"),q=require("./utils-OQNruMpn.cjs"),B=require("styled-components"),k=require("@salutejs/sdds-themes/tokens/sdds_finai"),I=require("./FiltersActions-Cie245Po.cjs"),_="list-of-filters",f={chipsGroup:`${_}__chip-group`,chipsGroupLabel:`${_}__chip-group__label`,chipsGroupCount:`${_}__chip-group__count`,chip:`${_}__chip`,clearButtonBlock:`${_}__clear-button-block`,chipsContainer:`${_}__chips-container`,container:`${_}__container`},N=e=>"groupId"in e,W=()=>B.css(k.bodyS),G=250,M=B(w.ChipGroup).withConfig({displayName:"ChipOrGroup__StyledChipGroup"})(["&{border-radius:",";padding:4px 2px;"," align-items:center;&.","{gap:4px;& .",":first-child,& ."," + .","{margin-left:4px;}& .","{display:inline-block;min-width:0;max-width:","px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& .","{color:",";margin-left:4px;}& ."," svg{color:"," !important;}}}"],()=>k.borderRadiusS,()=>W(),f.chipsGroup,f.chip,f.chipsGroupLabel,f.chip,f.chipsGroupLabel,G,f.chipsGroupCount,()=>k.textPrimary,f.chip,()=>k.onLightTextSecondary),V=({itemOrGroup:e,maxLengthInGroup:i=2,ellipsisLabel:h=!1,chipStyle:n,renderGroupLabel:u,renderChipLabel:r})=>{if(N(e)){const p=e,b=p.items.slice(0,i),d=p.items.length-b.length,l=u?u(p):p.groupLabel;return g.jsxs(M,{className:f.chipsGroup,size:"xs",gap:"wide",view:"default",isCommonChipStyles:!1,children:[h?g.jsx("span",{className:f.chipsGroupLabel,title:l,children:l}):l,b.map(t=>g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(p,t):t.label.toString(),size:"xs",pilled:!0,onClick:t.onClick,style:{maxWidth:180,...A.overflowDotsStyle,...n&&n(p,t)},appearance:"transparent"},t.id)),d>0&&g.jsx(I.FiltersActionsTooltip,{groupLabel:l,items:p.items.map(t=>r?r(p,t):t.label.toString()),children:g.jsxs("span",{className:f.chipsGroupCount,children:["+",d]})})]})}return g.jsx(w.Chip,{className:f.chip,title:"Удалить фильтр",view:"default",text:r?r(null,e):e.label.toString(),size:"xs",pilled:!0,onClick:e.onClick,style:{maxWidth:150,...A.overflowDotsStyle,...n&&n(e,void 0)},appearance:"transparent"})},H=(e,i)=>{y.useEffect(()=>{var p;if(!i)return;const h=(p=e.current)==null?void 0:p.querySelector(".tabs-clip-scroll"),n=h==null?void 0:h.firstElementChild;if(!h)return;const u=()=>{h.dispatchEvent(new Event("scroll",{bubbles:!0}))},r=q.createSafeResizeObserver(u);return r.observe(h),n&&r.observe(n),()=>{r.disconnect()}},[e,i])},P=(e,i,h)=>{var c,s;const n=y.useRef(null),u=!!n.current,[r,p]=y.useState(0),b=n.current,d=(c=n.current)==null?void 0:c.firstChild,l=(s=n.current)==null?void 0:s.lastChild,t=(b&&d&&l&&b.offsetWidth-d.offsetWidth-l.offsetWidth-i*2-h*2)??void 0;return y.useEffect(()=>{const o=n.current;let m=0;function j(){m=(o==null?void 0:o.offsetWidth)??0,p(m)}j();const S=q.createSafeResizeObserver(j);return e&&o&&S.observe(o),()=>{S.disconnect()}},[e,u]),{refForContainer:n,maxWidthForCenterElement:t}},K={xs:{height:32,paddingInline:0}},D=1,F=`${D}px solid ${()=>A.COLORS.border}`,U=B(w.Tabs).withConfig({displayName:"ListOfFilters__StyledTabs"})({"&":{"& .tabs-clip-scroll":{overflowY:"hidden"},"& button.tab-item-animated":{marginLeft:"8px","&:first-of-type":{marginLeft:"0px"}}}}),Z=({opened:e,items:i,clearAll:h,size:n="xs",paddingTop:u=0,maxLengthInGroup:r=2,ellipsisLabel:p=!1,sizeOnOpen:b,leftSlot:d,paddingInline:l,maxHeight:t,chipStyle:c,renderGroupLabel:s,renderChipLabel:o,showResetAllFiltersButton:m=!0,extraCss:j={}})=>{const S=K[n],z=l??S.paddingInline,C=t??S.height,{refForContainer:L}=P(e,z,D);return q.useDebouncedValue(e,200),H(L,e),g.jsx(T.Collapse,{isOpen:e,sizeOnOpen:b??C+u,unMountOnClose:!0,children:g.jsxs(O.Box,{ref:L,className:f.container,$css:{display:"flex",borderInline:F,borderTop:F,paddingInline:z,maxHeight:C,marginTop:u,flexDirection:"row-reverse",...j},children:[g.jsx(O.Box,{$css:"display: inline;",children:d??null}),g.jsx(U,{className:f.chipsContainer,view:"clear",size:"xs",style:{height:C-D,flex:1,minWidth:0,overflow:"hidden"},children:!!i.length&&i.map((a,x)=>{let v;return"groupId"in a&&(v=a.groupId??x),"id"in a&&(v=a.id??x),g.jsx(w.TabItem,{view:"clear",onClick:E=>E.preventDefault(),children:g.jsx(V,{maxLengthInGroup:r,ellipsisLabel:p,itemOrGroup:a,chipStyle:c,renderGroupLabel:s,renderChipLabel:o})},v)})}),g.jsx(O.Box,{className:f.clearButtonBlock,$css:"display: inline-flex; margin-left: auto;",children:m&&g.jsx(w.Button,{view:"clear",size:"xs",text:"Сбросить все",disabled:!i.length,contentLeft:g.jsx($.IconClose,{size:"xs",color:"inherit"}),onClick:h})})]})})},R=y.memo(Z),X=e=>e==null?"":e instanceof Date?e.toLocaleDateString():Array.isArray(e)?e.map(i=>i instanceof Date?i.toLocaleDateString():String(i??"")).join(", "):String(e),Y=({filters:e,filtersInfo:i,options:h,updateFilters:n,order:u})=>{const{labelFromValueMaps:r}=y.useMemo(()=>{const d={};for(const l of Object.entries(h)){const[t,c]=l;d[t]=new Map(c.map(s=>[String(s.value),s.label]))}return{labelFromValueMaps:d}},[h]),p=y.useCallback(()=>{for(const d of Object.entries(i)){const[l,t]=d;n(l,t.clearedValue)}},[i,n]);return{...y.useMemo(()=>{const d=Object.entries(e).reduce((t,c)=>{var L;const s=c[0],o=c[1],m=Array.isArray(o);if(!(m&&o.length||!m&&o&&o!==!1)||o===i[s].clearedValue)return t;if(typeof o=="boolean"){const a={id:s,label:i[s].label,onClick:()=>{n(s,i[s].clearedValue)}};return t.push(a),t}const C={groupId:s,groupLabel:i[s].label,items:[]};if(m)C.items=o.map(a=>{var x,v;return{id:a,label:((v=(x=r==null?void 0:r[s])==null?void 0:x.get)==null?void 0:v.call(x,a))??a.toString(),onClick:()=>{n(s,o.filter(E=>E!==a))}}});else{const a=r==null?void 0:r[s],x=((L=a==null?void 0:a.get)==null?void 0:L.call(a,o))??X(o);C.items=[{id:o.toString(),label:x,onClick:()=>{n(s,"clearedValue"in i[s]?i[s].clearedValue:"")}}]}return t.push(C),t},[]);let l=d;if(u&&u!=="default"){if(typeof u=="function")l=u(d);else if(Array.isArray(u)){const t=new Map;d.forEach(c=>{const s="groupId"in c?c.groupId:String(c.id);t.set(s,c)}),l=[],u.forEach(c=>{const s=t.get(c);s&&(l.push(s),t.delete(c))}),t.size>0&&Array.from(t.keys()).sort().forEach(s=>{const o=t.get(s);o&&l.push(o)})}}return{filterListOpened:d.length>0,filterList:l}},[e,i,r,n,u]),clearAll:p,labelFromValueMaps:r}},J=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));exports.ListOfFilters=R;exports.ListOfFilters_lazy=J;exports.isGroup=N;exports.listOfFiltersClassNames=f;exports.useFiltersList=Y;
@@ -0,0 +1 @@
1
+ "use strict";const g=require("react/jsx-runtime"),b=require("@salutejs/sdds-finai"),Rt=require("@salutejs/plasma-icons"),xt=require("./utils-OQNruMpn.cjs"),p=require("react"),Wt=require("./Table-CZludfzU.cjs"),Vt=require("../constants/index.cjs"),Et=require("@salutejs/sdds-themes/tokens/sdds_finai"),M=require("styled-components"),jt=require("../components/Box/index.cjs"),se=require("../components/Collapse/index.cjs"),Pt=require("./AiAgentPopup-CLGSjg5L.cjs"),ht=24,L=4,wt=44,Nt=40,Ct=24,Q={top:12,right:8,bottom:12,left:24},Bt={top:0,right:10,bottom:0,left:24},ie=Q.left+Q.right,vt=90,qt=110,gt=100,oe=300,Tt=550,Ut=350,Gt=50,Ht=100,Xt=({buttons:t,visibleButtonsCount:i})=>{const{visibleButtons:o,buttonsInDropdown:n}=p.useMemo(()=>{const e=t??[],c=new Set,h=[];e.forEach((f,u)=>{f.view==="accent"?c.add(u):h.push(u)});const l=c.size,a=Math.max(0,i-l),s=new Set(h.slice(0,a)),r=[],x=[];return e.forEach((f,u)=>{c.has(u)||s.has(u)?r.push(f):x.push(f)}),{visibleButtons:r,buttonsInDropdown:x}},[t,i]);return{visibleButtons:o,buttonsInDropdown:n,allButtons:t??[]}},Yt=({isCollapsed:t,setIsCollapsed:i,isSidebarOpen:o,calculatePositionForState:n,calculatePosition:e,setTranslateX:c,shouldApplySidebarOffsetRef:h,wasAutoCollapsedRef:l})=>({handleToggleCollapse:p.useCallback(()=>{const s=!t,r=n(s);r!==void 0&&c(r),o&&(s?h.current=!0:(h.current=!1,l.current=!1)),i(s),setTimeout(()=>{e()},Tt)},[t,o,n,e,c,h,l,i])}),Jt=({isCollapsed:t,containerRef:i,contentRef:o,middleSectionRef:n,buttonRefs:e,moreButtonRef:c,collapseButtonRef:h,leftSectionRef:l,dividerRef:a,buttons:s,isHaveSomeFeatureInSidebar:r,getContainerWidth:x,setVisibleButtonsCount:f,minPadding:u=Ct,leftPadding:E=Q.left,rightPadding:m=Q.right,moreButtonWidthEstimate:I=Nt,enableDebugLogs:A=!1})=>{const N=p.useRef([]),z=p.useCallback(()=>{var dt,X,pt,rt,ut,W;const y=x();if(!y||y===0||!s||s.length===0)return A&&console.debug("❌ calculateInitialCompression: нет tableWidth или buttons"),!1;if(!s.every((w,C)=>e.current[C]!==null&&e.current[C]!==void 0))return A&&console.debug("❌ calculateInitialCompression: ref'ы еще не установлены",{buttonsCount:s.length,refsCount:e.current.filter(Boolean).length,refs:e.current.map((w,C)=>({index:C,hasRef:!!w}))}),!1;const S=y-(r?wt:0),q=((dt=l==null?void 0:l.current)==null?void 0:dt.getBoundingClientRect().width)??0,k=((X=n.current)==null?void 0:X.getBoundingClientRect().width)??0,$=s.length>0,R=$?((pt=a==null?void 0:a.current)==null?void 0:pt.getBoundingClientRect().width)??0:0,U=$?L:0,tt=$&&k>0?L:0,ot=R+tt+U,at=L*2,ct=q+k+ot+(((rt=h.current)==null?void 0:rt.getBoundingClientRect().width)??ht)+(E+m)+at,T=[];let P=!0;for(let w=0;w<s.length;w+=1){const C=e.current[w];if(!C){P=!1;break}const F=C.querySelector("button, a")||C;if(!F||!F.isConnected){P=!1;break}const ft=F.getBoundingClientRect(),lt=ft.width||F.offsetWidth||F.scrollWidth||F.clientWidth;if(lt>0)T.push(lt),N.current[w]=lt;else{console.debug("❌ calculateInitialCompression: кнопка не отрендерилась",{index:w,text:(ut=s[w])==null?void 0:ut.text,width:lt,isConnected:F.isConnected,rect:ft}),P=!1;break}}if(!P||T.length!==s.length)return A&&console.debug("❌ calculateInitialCompression: не все кнопки измерены",{allButtonsMeasured:P,buttonWidthsLength:T.length,buttonsLength:s.length}),!1;const et=((W=c.current)==null?void 0:W.getBoundingClientRect().width)??I,v=S-u*2,O=[],j=[];s.forEach((w,C)=>{if(T[C]===void 0)return;(w==null?void 0:w.view)==="accent"?O.push(C):j.push(C)});let V=0;O.forEach(w=>{const C=T[w];C!==void 0&&(V+=C)});const G=new Set(O);let nt=V,st=0;for(let w=0;w<j.length;w+=1){const C=j[w],D=typeof C<"u"?T[C]:0;if(D===void 0)continue;const ft=w<j.length-1?et+L:0,mt=(G.size+1-1)*L,At=nt+D+mt+ft;if(ct+At<=v)nt+=D,st+=1,typeof C<"u"&&G.add(C);else break}const H=G.size;return f(H),console.debug("✅ calculateInitialCompression: успешно выполнено",{buttonWidths:T,visibleCount:H,accentCount:O.length,regularVisibleCount:st}),!0},[s,x,r,f,e,l,n,c,h,a,A,u,E,m,I]);return{calculateCompression:p.useCallback(()=>{t||!i.current||!o.current||requestAnimationFrame(()=>{setTimeout(()=>{var lt,mt,At,It,Mt,St,Dt;const y=x();if(!y||y===0)return;const _=y-(r?wt:0);A&&(console.group("🔧 MassActions Compression"),console.debug("📏 Размеры контейнера:",JSON.stringify({tableWidth:y,isHaveSomeFeatureInSidebar:r,togglePanelWidth:r?wt:0,availableWidth:_,minPaddingRequired:u*2,maxPanelWidthAllowed:_-u*2},null,2)));const S=((lt=l==null?void 0:l.current)==null?void 0:lt.getBoundingClientRect().width)??0,q=((mt=n.current)==null?void 0:mt.getBoundingClientRect().width)??0,k=((s==null?void 0:s.length)??0)>0,$=k?((At=a==null?void 0:a.current)==null?void 0:At.getBoundingClientRect().width)??0:0,R=k?L:0,U=k&&q>0?L:0,tt=$+U+R;let ot=null;if(l!=null&&l.current){const d=l.current.getBoundingClientRect(),{children:B}=l.current,K=[];for(let Y=0;Y<B.length;Y+=1){const Z=B[Y];if(Z){const it=Z.getBoundingClientRect();K.push({tagName:Z.tagName,className:Z.className,width:it.width,height:it.height})}}ot={width:d.width,height:d.height,children:K,childrenTotalWidth:K.reduce((Y,Z)=>Y+Z.width,0)}}const at=L*2,ct=S+q+tt+(((It=h.current)==null?void 0:It.getBoundingClientRect().width)??ht)+(E+m)+at;A&&console.debug("🔲 Фиксированные элементы:",JSON.stringify({leftSectionWidth:S,leftSectionDetails:ot,middleSectionWidth:q,divider:{shouldShow:k,wrapperWidth:$,gapLeft:U,gapRight:R,totalWidth:tt},collapseButtonWidth:((Mt=h.current)==null?void 0:Mt.getBoundingClientRect().width)??ht,containerPadding:E+m,gapsBetweenFixedElements:at,fixedElementsTotal:ct},null,2));const T=[];let P=!0;for(let d=0;d<((s==null?void 0:s.length)??0);d+=1){const B=e.current[d];if(B){const Y=B.querySelector("button, a")||B,it=Y.getBoundingClientRect().width||Y.offsetWidth||Y.scrollWidth||Y.clientWidth;it>0?(T.push(it),N.current[d]=it):N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}else N.current[d]!==void 0?T.push(N.current[d]??gt):(P=!1,T.push(gt))}if(!P&&T.length===0&&((s==null?void 0:s.length)??0)>0)return;const et=((St=c.current)==null?void 0:St.getBoundingClientRect().width)??I,v=_-u*2,O=i.current?i.current.getBoundingClientRect().width:0;A&&(console.debug("🎯 Ограничения и текущее состояние:",JSON.stringify({targetContainer:{tableWidth:y,availableWidth:_,minPaddingEach:u,minPaddingTotal:u*2,maxPanelWidth:v},currentPanel:{width:O,exceedsMax:O>v,exceedsAvailable:O>_,leftPadding:u,rightPadding:u},moreButtonWidth:et},null,2)),console.debug("🔘 Ширины кнопок:",JSON.stringify({buttons:s==null?void 0:s.map((d,B)=>({index:B,text:d.text,view:d.view,isAccent:d.view==="accent",width:T[B]})),totalButtonsWidth:T.reduce((d,B)=>d+B,0),averageButtonWidth:T.length>0?T.reduce((d,B)=>d+B,0)/T.length:0},null,2)));const j=s??[],V=[],G=[];j.forEach((d,B)=>{if(T[B]===void 0)return;(d==null?void 0:d.view)==="accent"?V.push(B):G.push(B)}),A&&console.debug("🎨 Распределение:",{accentCount:V.length,regularCount:G.length,accentButtons:V.map(d=>{var B;return{index:d,text:(B=j[d])==null?void 0:B.text,width:T[d]}})});let nt=0;V.forEach(d=>{const B=T[d];B!==void 0&&(nt+=B)});const st=new Set(V);let H=nt,dt=0;for(let d=0;d<G.length;d+=1){const B=G[d],K=typeof B<"u"?T[B]:0;if(K===void 0)continue;const Z=d<G.length-1?et+L:0,it=st.size+1,Lt=(it-1)*L,kt=H+K+Lt+Z,_t=ct+kt,yt=_t+3;if(A&&console.debug(` 🔍 Проверка кнопки ${d}:`,{text:typeof B<"u"?(Dt=j[B])==null?void 0:Dt.text:"",width:K,totalButtonsWidthBefore:H,visibleCountAfter:it,gapsBetweenButtons:Lt,moreButtonSpace:Z,requiredWidth:kt,testPanelWidth:_t,testWithBuffer:yt,maxPanelWidth:v,fits:_t<=v,fitsWithBuffer:yt<=v}),yt<=v)H+=K,dt+=1,typeof B<"u"&&st.add(B);else break}const X=st.size,rt=j.length-X>0,ut=X>0?(X-1)*L:0,W=H+ut+(rt?et+L:0),w=ct+W,C=[],D=[];j.forEach((d,B)=>{st.has(B)?C.push(d):D.push(d)});const F=X,ft={fixedElements:{leftSection:S,middleSection:q,divider:tt,collapseButton:ht,containerPadding:E+m,gapsBetweenFixedElements:at,total:ct},buttons:{accentButtonsWidth:nt,visibleRegularButtonsWidth:H-nt,totalButtonsWidth:H,gapsBetweenVisibleButtons:ut,buttonsAreaWidth:W,visibleButtonsCount:X,hiddenButtonsCount:D.length},moreButton:rt?{width:et,gap:L,total:et+L}:null,final:{calculatedWidth:w,actualPanelWidth:O,widthDifference:O-w,maxAllowedWidth:v,availableWidth:_,fits:w<=v,actualFits:O<=v,exceedsBy:w>v?w-v:0,actualExceedsBy:O>v?O-v:0,leftPaddingRequired:u,rightPaddingRequired:u,totalPaddingRequired:u*2}};A&&(console.debug("✅ Результат компрессии:",JSON.stringify({summary:{totalButtons:j.length,accentCount:V.length,visibleRegularCount:dt,visibleCount:F,hiddenCount:D.length,finalPanelWidth:w,maxPanelWidth:v,fits:w<=v,hasMoreButton:rt},breakdown:ft},null,2)),console.debug("👁️ Видимые кнопки:",{buttons:C.map(d=>({text:d.text,view:d.view,isAccent:d.view==="accent"}))}),console.debug("📦 Кнопки в dropdown:",{buttons:D.map(d=>({text:d.text,view:d.view}))}),console.groupEnd()),f(X)},Gt)})},[t,i,o,x,r,A,l,n,s,a,c,h,u,E,m,I,f,e]),calculateInitialCompression:z,measuredButtonWidthsRef:N}},Ft=t=>{const[i,o]=p.useState(0),n=p.useCallback(()=>typeof t=="function"?t():t.current,[t]),e=p.useCallback(()=>{const c=n();return c?c.getBoundingClientRect().width:0},[n]);return p.useEffect(()=>{const c=n();if(!c)return;o(c.getBoundingClientRect().width);const h=xt.createSafeResizeObserver(l=>{for(const a of l){const{width:s}=a.contentRect;o(s)}});return h.observe(c),()=>{h.disconnect()}},[n]),{containerWidth:i,getContainerWidth:e,getContainer:n}},Kt=({containerRef:t,buttonRefs:i,buttons:o,isVisible:n,isCollapsed:e,visibleButtonsCount:c,selectedCount:h,setIsCollapsed:l,setVisibleButtonsCount:a,calculatePosition:s,calculateCompression:r,measuredButtonWidthsRef:x,containerWidth:f})=>{p.useEffect(()=>{f>0&&(s(),r())},[f,s,r]),p.useLayoutEffect(()=>{if(!t.current)return;const u=xt.createSafeResizeObserver(()=>{s()});return u.observe(t.current),()=>{u.disconnect()}},[s,t]),p.useEffect(()=>{i.current=Array((o==null?void 0:o.length)??0).fill(null),a((o==null?void 0:o.length)??0),x.current=[]},[o==null?void 0:o.length,i,a,x]),p.useEffect(()=>{if(n&&!e){const u=setTimeout(()=>{r(),s()},Ht);return()=>{clearTimeout(u)}}},[n,e,r,s]),p.useEffect(()=>{if(e){s();return}s()},[e,c,s]),p.useEffect(()=>()=>{(!n||h===0)&&l(!1)},[n,h,l])},Zt=({containerRef:t,collapseButtonRef:i,leftSectionRef:o,getContainerWidth:n,isHaveSomeFeatureInSidebar:e,sidebarConfig:c,visibleButtonsCount:h,setTranslateX:l,minPadding:a=Ct,enableDebugLogs:s=!1})=>{const r=(c==null?void 0:c.isOpen)??!1,x=(c==null?void 0:c.width)??0,f=(c==null?void 0:c.togglePanelWidth)??wt,u=p.useRef(!1),E=p.useCallback(I=>{var k,$;const A=n();if(!A||A===0)return;const N=x+f,z=r?N/2:0,J=e?f/2:0;let y=-(z+J),_;if(I){const R=((k=o==null?void 0:o.current)==null?void 0:k.getBoundingClientRect().width)??vt,U=(($=i.current)==null?void 0:$.getBoundingClientRect().width)??ht,tt=Bt.top+Bt.right+Bt.left;_=R+U+tt}else if(t.current)_=t.current.getBoundingClientRect().width;else{const R=h*gt,U=Q.top+Q.right+Q.left;_=vt+qt+ht+R+U}const S=A/2;return S-_/2+y<a&&(y=a-(S-_/2)),y},[n,t,i,o,e,r,x,f,h,a]);return{calculatePosition:p.useCallback(()=>{const I=n();if(!I||I===0||!t.current)return;s&&console.group("📍 MassActions Position");const A=x+f,N=r?A/2:0,z=e?f/2:0;let J=-(N+z);const y=t.current.getBoundingClientRect().width,_=I/2,S=_-y/2+J;S<a&&(J=a-(_-y/2)),s&&(console.log("🎯 Позиционирование:",JSON.stringify({tableWidth:I,panelWidth:y,tableCenter:_,sidebarWidth:x,toggleSidebarPanelWidth:f,isSidebarOpen:r,isHaveSomeFeatureInSidebar:e,totalSidebarWidth:A,sidebarOffset:N,togglePanelOffset:z,idealTranslateX:-(N+z),leftEdgePosition:S,minPadding:a,finalTranslateX:J,adjusted:S<Ct},null,2)),console.groupEnd()),l(J),r?u.current=!0:u.current=!1},[n,t,s,x,f,e,r,l,a]),calculatePositionForState:E,shouldApplySidebarOffsetRef:u}},Qt=({isCollapsed:t,setIsCollapsed:i,calculatePositionForState:o,calculatePosition:n,setTranslateX:e,shouldApplySidebarOffsetRef:c,sidebarConfig:h,getContainerWidth:l})=>{const a=(h==null?void 0:h.isOpen)??!1,s=(h==null?void 0:h.width)??0,r=p.useRef(!1),x=p.useRef(a);return p.useEffect(()=>{if(!h)return;const u=x.current!==a;if(x.current=a,!u){n();return}if(a)if(t)n();else{r.current=!0;const E=o(!0);E!==void 0&&(e(E),c.current=!0),i(!0),setTimeout(()=>{n()},Tt)}else if(t){r.current=!1,c.current=!1;const E=o(!1);E!==void 0&&e(E),i(!1),setTimeout(()=>{n()},Tt)}else c.current=!1,n()},[a,s,l]),{isSidebarOpen:a,sidebarWidth:s,wasAutoCollapsedRef:r}},bt=t=>{const i=p.useRef(t),[o,n]=p.useState(t>0);return p.useEffect(()=>{var l;const e=i.current,c=e===0&&t>0,h=e>0&&t===0;if(c||h){const a=()=>{n(t>0)};document.startViewTransition?(l=document.startViewTransition)==null||l.call(document,a):a()}else n(t>0);i.current=t},[t]),o},ce="mass-actions-panel",zt={surfaceSolidCard:()=>Et.surfaceSolidCard,outlineSolidPrimary:()=>Et.outlineSolidPrimary},re=M(b.LinkButton).withConfig({displayName:"styled__StyledLinkButton"})({paddingInline:Vt.s.x8}),te=t=>M(t).withConfig({displayName:"styled__getButtonWithDropdown"})([""," ",""],({$hasDropdown:i})=>i&&M.css(["& > div > span:last-child{max-width:fit-content;min-width:unset;}"]),({$buttonStyles:i})=>i&&M.css(["",""],i)),le=te(b.Button),ae=te(re),de=M.div.withConfig({displayName:"styled__MassActionsContainer"})(["position:absolute;bottom:","px;left:50%;transform:",";background:",";border:2px solid ",";padding:",";border-radius:14px;display:block;width:fit-content;max-width:",";view-transition-name:",";opacity:",";transition:padding 0.3s cubic-bezier(0.4,0,0.2,1),transform 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.2s ease-in-out;will-change:padding,transform,max-width;box-shadow:",";"],({$bottom:t=24})=>t,({$translateX:t})=>t!==void 0?`translateX(calc(-50% + ${t}px))`:"translateX(-50%)",zt.surfaceSolidCard,zt.outlineSolidPrimary,({$isCollapsed:t,$size:i})=>{const o=i==="xs";return t?o?"0px 2px 0px 12px":"0px 10px 0px 24px":o?"4px 2px 4px 12px":"12px 8px 12px 24px"},({$isCollapsed:t})=>t?"350":"2000px",ce,({$isInitialCalculationComplete:t})=>t?1:0,Et.shadowDownHardS),ue=M.div.withConfig({displayName:"styled__MassActionsContent"})(["display:flex;align-items:center;gap:",";"],({$isCollapsed:t,$isCompact:i})=>t?i?"4px":"8px":"0px"),he=M.div.withConfig({displayName:"styled__ActionsWrapper"})(["display:flex;max-height:",";align-items:center;gap:4px;flex:1;justify-content:flex-end;overflow:hidden;min-width:0;transition:max-height 0.2s cubic-bezier(0.4,0,0.2,1),opacity 0.3s cubic-bezier(0.4,0,0.2,1),max-width 0.1s cubic-bezier(0.4,0,0.2,1),margin 0.3s cubic-bezier(0.4,0,0.2,1),gap 0.3s cubic-bezier(0.4,0,0.2,1);",""],({$isCollapsed:t})=>t?"0":"40px",({$isCollapsed:t})=>t?M.css(["opacity:0;max-width:0;margin:0;gap:0;"]):M.css(["opacity:1;max-width:2000px;"])),pe=M.div.withConfig({displayName:"styled__HiddenButtonsMeasurementContainer"})(["position:absolute;left:-9999px;top:0;display:flex;gap:4px;align-items:center;z-index:-1;pointer-events:none;width:auto;height:auto;"]),fe=M.div.withConfig({displayName:"styled__ButtonMeasurementWrapper"})(["display:inline-flex;width:auto;height:auto;"]),ge=M.div.withConfig({displayName:"styled__VisibleButtonWrapper"})(["margin-left:0;"]),xe=M(Rt.IconDoubleDisclosureUp).withConfig({displayName:"styled__CollapseIcon"})(["transition:all 0.3s;transform:",";"],({$isCollapsed:t})=>t?"scaleY(1)":"scaleY(-1)"),we=M(b.EmbedIconButton).withConfig({displayName:"styled__CollapseButton"})(["padding:",";"],({$isCompact:t})=>t?Vt.s.x8:Et.spacing10x);M(b.Button).withConfig({displayName:"styled__MoreButton"})(["margin-left:0;"]);const me=M(b.Divider).withConfig({displayName:"styled__StyledDivider"})(["padding-left:1px;margin-left:12px;margin-right:8px;"]),Ae=t=>{if(typeof t=="string"&&t.startsWith("link")){const i=t.slice(4);return i.charAt(0).toLowerCase()+i.slice(1)}return t??"default"},Be={size:"s",view:"linkDefault"},Ot=({type:t,view:i,showLabel:o,text:n,buttonStyles:e,dropdown:c,useTableDropdown:h=!1,...l})=>{const a=t??"linkButton",{view:s,...r}=Be,x=i??s,f=o?n:void 0,u=!!c;let E;if(a==="button"){const m=l,I=m.text??f;E=g.jsx(le,{...r,...m,view:x,text:I,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}else{const m=String(x??"linkDefault"),A=m.startsWith("link")?Ae(m):m;E=g.jsx(ae,{...r,...l,view:A,text:f,$hasDropdown:u,$showLabel:o,$buttonStyles:e})}if(c&&c.items&&c.items.length>0)if(h)E=g.jsx(Wt.TableDropdown,{...c,children:E});else{const{$css:m,...I}=c;E=g.jsx(b.Dropdown,{...I,children:E})}return E},ee=({selectedCount:t,maxCount:i,label:o="Выбрано",showCheckbox:n=!1,checked:e=!1,onCheckboxChange:c,className:h,indeterminate:l})=>{const{down:a}=xt.useBreakpoint(),s=a("xl"),r=t>0,x=s?"BodyXS":"BodyS",f=typeof i=="number"&&t>i?`${i}+`:`${t}`,u=(()=>{if(t===0)return"0px";const m=f.length;return`${Math.max(16,7.1+m*6.1)+4}px`})(),E=n?g.jsxs(jt.Box,{$css:{display:"flex",alignItems:"center",gap:"4px"},children:[g.jsx(b.Checkbox,{checked:e,indeterminate:l,onChange:c,size:"m"}),g.jsx(Pt.Typography,{variant:x,children:o})]}):g.jsx(Pt.Typography,{variant:x,children:o});return g.jsxs(jt.Box,{className:h,$css:{display:"flex",alignItems:"center"},children:[E,g.jsx(se.Collapse,{duration:.3,orientation:"horizontal",isOpen:r,unMountOnClose:!0,sizeOnOpen:u,extContainerCss:{overflow:"visible",display:"flex",justifyContent:"flex-end"},intContainerCss:{always:{opacity:"0",transition:".3s ease"},onOpen:{opacity:1}},children:r&&g.jsx(Wt.AnimatedCounter,{className:"counter",count:t,maxCount:i,size:"xs",view:"accent",style:{marginBottom:"3px"}},t)})]})},Ee=(t=[])=>p.useMemo(()=>{const i=[],o={},n=new Map;return t.forEach(e=>{var c,h;if(e.dropdown){const l=`group-${e.key||e.text||Date.now()}`,a="items"in e.dropdown?e.dropdown.items||[]:[],s="onItemSelect"in e.dropdown?e.dropdown.onItemSelect:void 0;s&&n.set(l.toString(),s);const[r,x]=xt.processDropdownItems(a,s);x.forEach((f,u)=>n.set(u,f)),(c=e.dropdown)!=null&&c.$css&&Object.assign(o,(h=e.dropdown)==null?void 0:h.$css),i.push({label:e.text??"",value:l,contentLeft:e.contentLeft,items:r,className:e.className,disabled:e.disabled})}else{const l=e.key||e.text||`btn-${Date.now()}`,a={label:e.text||"Кнопка",value:l.toString(),disabled:e.disabled,contentLeft:e.contentLeft};e.onClick&&n.set(l.toString(),(s,r)=>{var f;const x={...r,nativeEvent:r.nativeEvent,preventDefault:r.preventDefault,stopPropagation:r.stopPropagation,target:r.target,currentTarget:r.currentTarget};(f=e.onClick)==null||f.call(e,x)}),i.push(a)}}),{dropdownItems:i,handlerMap:n,$summaryCSS:o}},[t]),Ce=({buttons:t=[],dividerIndexes:i=[],triggerSlot:o,dropdownProps:n,useTableDropdown:e=!1})=>{const{dropdownItems:c,handlerMap:h,$summaryCSS:l}=Ee(t),a=xt.useDropdownItemClickHandler(h),[s,r]=p.useState(!1),x=c.map((m,I)=>(i.includes(I)&&(m.dividerAfter=!0),m)),f={closeOnSelect:!0,...n,onItemSelect:a,items:x,onToggle:m=>r(m),portal:"document",view:(n==null?void 0:n.view)||"default"},{portal:u,...E}=f;return e?g.jsx(Wt.TableDropdown,{$css:l,...E,children:o}):g.jsx(b.Dropdown,{...f,children:o})},Te=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},Ie=({button:t,isCompact:i,compactSize:o="xs",useTableDropdown:n=!1})=>{const e=t.size??(i?o:"s");return g.jsx(Ot,{...t,size:e,showLabel:!0,useTableDropdown:n})},$t=(t,i,o=!1,n="xs")=>t.type==="button"?g.jsx(Te,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}):g.jsx(Ie,{button:t,isCompact:i,compactSize:n,useTableDropdown:o}),ne=({containerRef:t,leftSection:i,middleSection:o,buttons:n,sidebarConfig:e,isHaveSomeFeatureInSidebar:c=!1,collapsedDropdownProps:h,selectedCount:l,show:a,useTableDropdown:s=!1,enableDebugLogs:r=!1,bottom:x=16,minPadding:f=16,size:u})=>{const{down:E}=xt.useBreakpoint(),m=u?u==="xs":E("xl"),I=u?"xxs":"xs",[A,N]=p.useState(!1),z=p.useRef(null),J=p.useRef(null),y=p.useRef(null),_=p.useRef([]),S=p.useRef(null),q=p.useRef(null),k=p.useRef(null),$=p.useRef(null),[R,U]=p.useState((n==null?void 0:n.length)??0),[tt,ot]=p.useState(void 0),[at,ct]=p.useState(!1),{containerWidth:T,getContainerWidth:P}=Ft(t),et=bt(l),v=a!==void 0?a:et,{calculatePosition:O,calculatePositionForState:j,shouldApplySidebarOffsetRef:V}=Zt({containerRef:z,collapseButtonRef:q,leftSectionRef:k,getContainerWidth:P,isHaveSomeFeatureInSidebar:c,sidebarConfig:e,visibleButtonsCount:R,setTranslateX:ot,minPadding:f}),{calculateCompression:G,measuredButtonWidthsRef:nt}=Jt({isCollapsed:A,containerRef:z,contentRef:J,middleSectionRef:y,buttonRefs:_,moreButtonRef:S,collapseButtonRef:q,leftSectionRef:k,dividerRef:$,buttons:n,isHaveSomeFeatureInSidebar:c,getContainerWidth:P,setVisibleButtonsCount:U,enableDebugLogs:r,minPadding:f,leftPadding:Q.left,rightPadding:Q.right,moreButtonWidthEstimate:m?32:Nt}),{isSidebarOpen:st,wasAutoCollapsedRef:H}=Qt({isCollapsed:A,setIsCollapsed:N,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,sidebarConfig:e,getContainerWidth:P}),{handleToggleCollapse:dt}=Yt({isCollapsed:A,setIsCollapsed:N,isSidebarOpen:st,calculatePositionForState:j,calculatePosition:O,setTranslateX:ot,shouldApplySidebarOffsetRef:V,wasAutoCollapsedRef:H}),{visibleButtons:X,buttonsInDropdown:pt,allButtons:rt}=Xt({buttons:n,visibleButtonsCount:R});if(p.useEffect(()=>{const W=setTimeout(()=>ct(!0),Ut);return()=>clearTimeout(W)},[]),Kt({containerRef:z,buttonRefs:_,buttons:n,isVisible:v,isCollapsed:A,visibleButtonsCount:R,selectedCount:l,setIsCollapsed:N,setVisibleButtonsCount:U,calculatePosition:O,calculateCompression:G,measuredButtonWidthsRef:nt,containerWidth:T}),!v)return null;const ut=!A&&((n==null?void 0:n.length)??0)>0;return g.jsx(de,{ref:z,$isCollapsed:A,$size:u,$translateX:tt,$isInitialCalculationComplete:at,$bottom:x,children:g.jsxs(ue,{ref:J,$isCollapsed:A,$isCompact:m,children:[g.jsx(pe,{children:rt.map((W,w)=>{const C=W.key??`${W.text}${w}`;return g.jsx(fe,{ref:D=>{_.current[w]=D},children:$t(W,m,s,I)},`measure-${C}`)})}),g.jsx("div",{ref:k,children:i}),g.jsxs(he,{$isCollapsed:A,children:[o&&g.jsx("div",{ref:y,children:o}),ut&&g.jsx("div",{ref:$,children:g.jsx(me,{orientation:"vertical",length:"16px"})}),pt.length>0&&g.jsx("div",{ref:W=>{S.current=W},children:g.jsx(Ce,{buttons:pt,useTableDropdown:s,dropdownProps:{placement:"top",...h},triggerSlot:g.jsx(b.IconButton,{view:"secondary",size:m?I:"s",contentLeft:g.jsx(Rt.IconDotsVerticalCenteredOutline,{size:m?"xs":"s"})})})}),X.map((W,w)=>{const C=W.key??`${W.text}${w}`,D=g.jsx(ge,{children:$t(W,m,s,I)},C);return W.disabled&&W.disabledTooltipProps?g.jsx(b.Tooltip,{trigger:"hover",...W.disabledTooltipProps,children:D},C):D})]}),g.jsx("div",{ref:q,children:g.jsx(we,{size:m?"s":"m",$isCollapsed:A,$isCompact:m,onClick:dt,children:g.jsx(xe,{size:m?"xs":"s",$isCollapsed:A})})})]})})};ne.Counter=ee;exports.ACTION_BUTTON_WIDTH_ESTIMATE=gt;exports.ANIMATION_COMPLETE_DELAY=Tt;exports.ANIMATION_DURATION=oe;exports.COLLAPSE_BUTTON_WIDTH=ht;exports.COMPRESSION_CALCULATION_DELAY=Gt;exports.CONTAINER_PADDING_HORIZONTAL=ie;exports.COUNTER_WIDTH_ESTIMATE=vt;exports.DELAY_BEFORE_SHOW_PANEL=Ut;exports.ELEMENTS_GAP=L;exports.INITIAL_POSITION_CALCULATION_DELAY=Ht;exports.MIN_PANEL_PADDING=Ct;exports.MORE_BUTTON_WIDTH_ESTIMATE=Nt;exports.MassActions=ne;exports.MassActionsButton=Ot;exports.MassActionsCounter=ee;exports.PANEL_PADDING_COLLAPSED=Bt;exports.PANEL_PADDING_EXPANDED=Q;exports.RESET_BUTTON_WIDTH_ESTIMATE=qt;exports.TOGGLE_SIDEBAR_PANEL_WIDTH=wt;exports.useMassActionsButtons=Xt;exports.useMassActionsCollapse=Yt;exports.useMassActionsCompression=Jt;exports.useMassActionsContainer=Ft;exports.useMassActionsEffects=Kt;exports.useMassActionsPosition=Zt;exports.useMassActionsSidebar=Qt;exports.useMassActionsVisibility=bt;