@daisforge/ui 1.14.1 → 1.15.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 (284) hide show
  1. package/chunks/AnalyticalWidget-BSpo7GCr.mjs +535 -0
  2. package/chunks/AnalyticalWidget-D_g7b36w.cjs +43 -0
  3. package/chunks/{ApprovalCenter-XCXGHaEP.mjs → ApprovalCenter-B0yUrIFR.mjs} +1 -1
  4. package/chunks/{ApprovalCenter-DG3YvEkY.cjs → ApprovalCenter-BeD-ALq3.cjs} +1 -1
  5. package/chunks/{BlockTitle-3YmyxJHJ.cjs → BlockTitle-BcV_T7TJ.cjs} +1 -1
  6. package/chunks/{BlockTitle-DDWF1ZeV.mjs → BlockTitle-D-4agd3o.mjs} +1 -1
  7. package/chunks/{FiltersActions-C38x0y5T.mjs → FiltersActions-DlV5c-6Y.mjs} +3 -3
  8. package/chunks/{FiltersActions-CvAwGV9F.cjs → FiltersActions-Dw5QqWa8.cjs} +1 -1
  9. package/chunks/{GridDND-BnK1dEhJ.mjs → GridDND-BhSmT9qp.mjs} +125 -131
  10. package/chunks/GridDND-D7-FwG3y.cjs +1 -0
  11. package/chunks/{ListOfFilters-DNzfSG-p.cjs → ListOfFilters-DEkjOH7o.cjs} +1 -1
  12. package/chunks/{ListOfFilters-Cji5UH2J.mjs → ListOfFilters-DngSRGOp.mjs} +2 -2
  13. package/chunks/{MassActions-BOG04zip.mjs → MassActions-CA35MxqC.mjs} +2 -2
  14. package/chunks/{MassActions-DCk9APKP.cjs → MassActions-Cphn-d4v.cjs} +1 -1
  15. package/chunks/{PageTitle-CQ_6jZ0x.mjs → PageTitle-BjLWtqbD.mjs} +1 -1
  16. package/chunks/{PageTitle-BIllremL.cjs → PageTitle-S-pY5lbg.cjs} +1 -1
  17. package/chunks/{Stories-dFpUqS5T.mjs → Stories-BCtwdhv0.mjs} +1 -1
  18. package/chunks/{Stories-e_CX_1CS.cjs → Stories-CkjLhZAi.cjs} +1 -1
  19. package/chunks/{Table-CrJFfavU.cjs → Table-C2ehPQDQ.cjs} +1 -1
  20. package/chunks/{Table-f0CmcIhI.mjs → Table-DBKZzRuR.mjs} +4 -4
  21. package/chunks/{TableCanvas-1bi1WWeP.mjs → TableCanvas-1y-yKIq1.mjs} +4 -4
  22. package/chunks/{TableCanvas-DqF5YxEY.cjs → TableCanvas-CE8Fv99t.cjs} +1 -1
  23. package/components/AnalyticalWidget/AnalyticalWidget.constants.d.ts +2 -0
  24. package/components/AnalyticalWidget/AnalyticalWidget.d.ts +13 -54
  25. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +14 -0
  26. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.styled.d.ts +3 -0
  27. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
  28. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.d.ts +3 -2
  29. package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +4 -3
  30. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
  31. package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +2 -2
  32. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.d.ts +1 -1
  33. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/AnalyticalWidgetHeader.styled.d.ts +1 -75
  34. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
  35. package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
  36. package/components/AnalyticalWidget/index.cjs +1 -1
  37. package/components/AnalyticalWidget/index.mjs +1 -1
  38. package/components/ApprovalCenter/components/index.cjs +1 -1
  39. package/components/ApprovalCenter/components/index.mjs +1 -1
  40. package/components/ApprovalCenter/index.cjs +1 -1
  41. package/components/ApprovalCenter/index.mjs +1 -1
  42. package/components/AutocompleteSearch/index.cjs +1 -1
  43. package/components/AutocompleteSearch/index.mjs +1 -1
  44. package/components/BlockTitle/index.cjs +1 -1
  45. package/components/BlockTitle/index.mjs +1 -1
  46. package/components/BlockTitle/utils/index.cjs +1 -1
  47. package/components/BlockTitle/utils/index.mjs +1 -1
  48. package/components/Combobox/index.cjs +1 -1
  49. package/components/Combobox/index.mjs +1 -1
  50. package/components/GridDND/GridDND.ItemWrapper.d.ts +1 -2
  51. package/components/GridDND/GridDND.d.ts +1 -1
  52. package/components/GridDND/index.cjs +1 -1
  53. package/components/GridDND/index.mjs +1 -1
  54. package/components/GridDND/utils/index.cjs +1 -1
  55. package/components/GridDND/utils/index.mjs +1 -1
  56. package/components/ListOfFilters/index.cjs +1 -1
  57. package/components/ListOfFilters/index.mjs +1 -1
  58. package/components/MassActions/hooks/index.cjs +1 -1
  59. package/components/MassActions/hooks/index.mjs +1 -1
  60. package/components/MassActions/index.cjs +1 -1
  61. package/components/MassActions/index.mjs +1 -1
  62. package/components/PageTitle/index.cjs +1 -1
  63. package/components/PageTitle/index.mjs +1 -1
  64. package/components/PageTitle/utils/index.cjs +1 -1
  65. package/components/PageTitle/utils/index.mjs +1 -1
  66. package/components/PopoverDF/index.cjs +1 -1
  67. package/components/PopoverDF/index.mjs +1 -1
  68. package/components/PopupDF/index.cjs +1 -1
  69. package/components/PopupDF/index.mjs +1 -1
  70. package/components/Stories/components/StoriesBanner/index.cjs +1 -1
  71. package/components/Stories/components/StoriesBanner/index.mjs +1 -1
  72. package/components/Stories/components/StoriesContent/index.cjs +1 -1
  73. package/components/Stories/components/StoriesContent/index.mjs +1 -1
  74. package/components/Stories/components/StoriesPreview/index.cjs +1 -1
  75. package/components/Stories/components/StoriesPreview/index.mjs +1 -1
  76. package/components/Stories/components/StoriesProgress/index.cjs +1 -1
  77. package/components/Stories/components/StoriesProgress/index.mjs +1 -1
  78. package/components/Stories/components/StoriesViewer/index.cjs +1 -1
  79. package/components/Stories/components/StoriesViewer/index.mjs +1 -1
  80. package/components/Stories/index.cjs +1 -1
  81. package/components/Stories/index.mjs +1 -1
  82. package/components/Table/components/TableDropdown/index.cjs +1 -1
  83. package/components/Table/components/TableDropdown/index.mjs +1 -1
  84. package/components/Table/feature-collapse-table/index.cjs +1 -1
  85. package/components/Table/feature-collapse-table/index.mjs +1 -1
  86. package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
  87. package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
  88. package/components/Table/feature-column-control/index.cjs +1 -1
  89. package/components/Table/feature-column-control/index.mjs +1 -1
  90. package/components/Table/feature-columns-grouping/index.cjs +1 -1
  91. package/components/Table/feature-columns-grouping/index.mjs +1 -1
  92. package/components/Table/feature-context-menu/index.cjs +1 -1
  93. package/components/Table/feature-context-menu/index.mjs +1 -1
  94. package/components/Table/feature-edit/index.cjs +1 -1
  95. package/components/Table/feature-edit/index.mjs +1 -1
  96. package/components/Table/feature-filtering/combobox/index.cjs +1 -1
  97. package/components/Table/feature-filtering/combobox/index.mjs +1 -1
  98. package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
  99. package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
  100. package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
  101. package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
  102. package/components/Table/feature-filtering/index.cjs +1 -1
  103. package/components/Table/feature-filtering/index.mjs +1 -1
  104. package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  105. package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  106. package/components/Table/feature-infinity-scroll/index.cjs +1 -1
  107. package/components/Table/feature-infinity-scroll/index.mjs +1 -1
  108. package/components/Table/feature-key-text/index.cjs +1 -1
  109. package/components/Table/feature-key-text/index.mjs +1 -1
  110. package/components/Table/feature-pagination/index.cjs +1 -1
  111. package/components/Table/feature-pagination/index.mjs +1 -1
  112. package/components/Table/feature-right-sidebar/index.cjs +1 -1
  113. package/components/Table/feature-right-sidebar/index.mjs +1 -1
  114. package/components/Table/feature-row-detail/index.cjs +1 -1
  115. package/components/Table/feature-row-detail/index.mjs +1 -1
  116. package/components/Table/feature-row-instruments/index.cjs +1 -1
  117. package/components/Table/feature-row-instruments/index.mjs +1 -1
  118. package/components/Table/feature-row-size/index.cjs +1 -1
  119. package/components/Table/feature-row-size/index.mjs +1 -1
  120. package/components/Table/feature-rows-grouping/index.cjs +1 -1
  121. package/components/Table/feature-rows-grouping/index.mjs +1 -1
  122. package/components/Table/feature-searching/index.cjs +1 -1
  123. package/components/Table/feature-searching/index.mjs +1 -1
  124. package/components/Table/feature-select-row/index.cjs +1 -1
  125. package/components/Table/feature-select-row/index.mjs +1 -1
  126. package/components/Table/feature-sorting/index.cjs +1 -1
  127. package/components/Table/feature-sorting/index.mjs +1 -1
  128. package/components/Table/feature-table-settings/index.cjs +1 -1
  129. package/components/Table/feature-table-settings/index.mjs +1 -1
  130. package/components/Table/feature-tree/index.cjs +1 -1
  131. package/components/Table/feature-tree/index.mjs +1 -1
  132. package/components/Table/index.cjs +1 -1
  133. package/components/Table/index.mjs +1 -1
  134. package/components/Table/renders/formatCell/index.cjs +1 -1
  135. package/components/Table/renders/formatCell/index.mjs +1 -1
  136. package/components/Table/styles/index.cjs +1 -1
  137. package/components/Table/styles/index.mjs +1 -1
  138. package/components/Table/table-hooks/index.cjs +1 -1
  139. package/components/Table/table-hooks/index.mjs +1 -1
  140. package/components/Table/types/index.cjs +1 -1
  141. package/components/Table/types/index.mjs +1 -1
  142. package/components/Table/utils/index.cjs +1 -1
  143. package/components/Table/utils/index.mjs +1 -1
  144. package/components/Table/widgets/control-block/index.cjs +1 -1
  145. package/components/Table/widgets/control-block/index.mjs +1 -1
  146. package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
  147. package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
  148. package/components/Table/widgets/index.cjs +1 -1
  149. package/components/Table/widgets/index.mjs +1 -1
  150. package/components/Table/widgets/mass-actions/index.cjs +1 -1
  151. package/components/Table/widgets/mass-actions/index.mjs +1 -1
  152. package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
  153. package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
  154. package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
  155. package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
  156. package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
  157. package/components/TableCanvas/TableGlideInstance/index.mjs +1 -1
  158. package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
  159. package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
  160. package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
  161. package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
  162. package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
  163. package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
  164. package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
  165. package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
  166. package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
  167. package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
  168. package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
  169. package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
  170. package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
  171. package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
  172. package/components/TableCanvas/feature-column-control/index.cjs +1 -1
  173. package/components/TableCanvas/feature-column-control/index.mjs +1 -1
  174. package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
  175. package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
  176. package/components/TableCanvas/feature-content-state/index.cjs +1 -1
  177. package/components/TableCanvas/feature-content-state/index.mjs +1 -1
  178. package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
  179. package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
  180. package/components/TableCanvas/feature-edit/index.cjs +1 -1
  181. package/components/TableCanvas/feature-edit/index.mjs +1 -1
  182. package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
  183. package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
  184. package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
  185. package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
  186. package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
  187. package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
  188. package/components/TableCanvas/feature-filtering/index.cjs +1 -1
  189. package/components/TableCanvas/feature-filtering/index.mjs +1 -1
  190. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
  191. package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
  192. package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
  193. package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
  194. package/components/TableCanvas/feature-key-text/index.cjs +1 -1
  195. package/components/TableCanvas/feature-key-text/index.mjs +1 -1
  196. package/components/TableCanvas/feature-notifications/index.cjs +1 -1
  197. package/components/TableCanvas/feature-notifications/index.mjs +1 -1
  198. package/components/TableCanvas/feature-pagination/index.cjs +1 -1
  199. package/components/TableCanvas/feature-pagination/index.mjs +1 -1
  200. package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
  201. package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
  202. package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
  203. package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
  204. package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
  205. package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
  206. package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
  207. package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
  208. package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
  209. package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
  210. package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
  211. package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
  212. package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
  213. package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
  214. package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
  215. package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
  216. package/components/TableCanvas/feature-row-size/index.cjs +1 -1
  217. package/components/TableCanvas/feature-row-size/index.mjs +1 -1
  218. package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
  219. package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
  220. package/components/TableCanvas/feature-searching/index.cjs +1 -1
  221. package/components/TableCanvas/feature-searching/index.mjs +1 -1
  222. package/components/TableCanvas/feature-select-row/index.cjs +1 -1
  223. package/components/TableCanvas/feature-select-row/index.mjs +1 -1
  224. package/components/TableCanvas/feature-sorting/index.cjs +1 -1
  225. package/components/TableCanvas/feature-sorting/index.mjs +1 -1
  226. package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
  227. package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
  228. package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
  229. package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
  230. package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
  231. package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
  232. package/components/TableCanvas/feature-tree/index.cjs +1 -1
  233. package/components/TableCanvas/feature-tree/index.mjs +1 -1
  234. package/components/TableCanvas/index.cjs +1 -1
  235. package/components/TableCanvas/index.mjs +1 -1
  236. package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
  237. package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
  238. package/components/TableCanvas/styles/index.cjs +1 -1
  239. package/components/TableCanvas/styles/index.mjs +1 -1
  240. package/components/TableCanvas/table-hooks/index.cjs +1 -1
  241. package/components/TableCanvas/table-hooks/index.mjs +1 -1
  242. package/components/TableCanvas/types/index.cjs +1 -1
  243. package/components/TableCanvas/types/index.mjs +1 -1
  244. package/components/TableCanvas/utils/index.cjs +1 -1
  245. package/components/TableCanvas/utils/index.mjs +1 -1
  246. package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
  247. package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
  248. package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
  249. package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
  250. package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
  251. package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
  252. package/components/TableCanvas/widgets/index.cjs +1 -1
  253. package/components/TableCanvas/widgets/index.mjs +1 -1
  254. package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
  255. package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
  256. package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
  257. package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
  258. package/components/TableContract/index.cjs +1 -1
  259. package/components/TableContract/index.mjs +1 -1
  260. package/components/Tooltip/index.cjs +1 -1
  261. package/components/Tooltip/index.mjs +1 -1
  262. package/components/TourWidget/index.cjs +1 -1
  263. package/components/TourWidget/index.mjs +1 -1
  264. package/components/Typography/index.cjs +1 -1
  265. package/components/Typography/index.mjs +1 -1
  266. package/components/Widget/index.cjs +1 -1
  267. package/components/Widget/index.mjs +1 -1
  268. package/formComponents/FormCombobox/index.cjs +1 -1
  269. package/formComponents/FormCombobox/index.mjs +1 -1
  270. package/formComponents/FormSwitch/index.cjs +1 -1
  271. package/formComponents/FormSwitch/index.mjs +1 -1
  272. package/index.cjs +1 -1
  273. package/index.mjs +11 -11
  274. package/layouts/FiltersActions/hooks/index.cjs +1 -1
  275. package/layouts/FiltersActions/hooks/index.mjs +1 -1
  276. package/layouts/FiltersActions/index.cjs +1 -1
  277. package/layouts/FiltersActions/index.mjs +1 -1
  278. package/mcp-data/component-index.json +57 -131
  279. package/package.json +1 -1
  280. package/shared/utils/inputs/index.cjs +1 -1
  281. package/shared/utils/inputs/index.mjs +6 -6
  282. package/chunks/AnalyticalWidget-B6czTLSw.cjs +0 -43
  283. package/chunks/AnalyticalWidget-BWggL9xa.mjs +0 -528
  284. package/chunks/GridDND-CVAlpElj.cjs +0 -1
@@ -0,0 +1,535 @@
1
+ import { EmbeddedButton as tt } from "@salutejs/sdds-finai/beta";
2
+ import { IconButtonFilter as et } from "../components/IconButton/index.mjs";
3
+ import { Dropdown as it, ChipGroup as nt, Chip as lt, Tooltip as E, TextXS as at, TextS as ot, TextM as dt, TextL as rt, H5 as st, H4 as pt, H3 as ct, H2 as ht, H1 as gt, DsplS as yt, DsplM as mt, DsplL as ut, BodyXXS as xt, BodyXS as ft, BodyS as wt, BodyM as V, BodyL as St, Link as vt } from "@salutejs/sdds-finai";
4
+ import { jsx as i, jsxs as S } from "react/jsx-runtime";
5
+ import { textPrimary as $, inverseTextPrimary as Wt, bodyXS as _t, textTertiary as Ct, bodyM as Tt, textSecondary as C, bodyMBold as bt, surfaceSolidCard as At } from "@salutejs/sdds-themes/tokens/sdds_finai";
6
+ import l, { css as b } from "styled-components";
7
+ import { u as Ht, a as Nt, m as w, b as N } from "./utils-D4eJY8pa.mjs";
8
+ import { useRef as R, createElement as It, useState as Rt, useCallback as I, useEffect as G, isValidElement as Et } from "react";
9
+ import { IconDotsVerticalOutline as $t, IconDotsHorizontalOutline as Bt, IconInfoCircleOutline as Lt } from "@salutejs/plasma-icons";
10
+ import { Collapse as Dt } from "../components/Collapse/index.mjs";
11
+ const kt = {
12
+ l: {
13
+ xl: {
14
+ minWidth: "448px",
15
+ maxWidth: "unset",
16
+ // 608
17
+ width: "100%",
18
+ minHeight: "512px",
19
+ padding: "12px",
20
+ borderRadius: "16px"
21
+ },
22
+ lg: {
23
+ minWidth: "448px",
24
+ maxWidth: "unset",
25
+ // 608
26
+ width: "100%",
27
+ minHeight: "512px",
28
+ // 432px
29
+ padding: "12px",
30
+ borderRadius: "16px"
31
+ },
32
+ md: {
33
+ minWidth: "448px",
34
+ maxWidth: "unset",
35
+ // 608
36
+ width: "100%",
37
+ minHeight: "512px",
38
+ // 344px
39
+ padding: "12px",
40
+ borderRadius: "16px"
41
+ }
42
+ },
43
+ m: {
44
+ xl: {
45
+ minWidth: "448px",
46
+ maxWidth: "unset",
47
+ // 608
48
+ width: "100%",
49
+ minHeight: "248px",
50
+ padding: "12px",
51
+ borderRadius: "16px"
52
+ },
53
+ lg: {
54
+ minWidth: "448px",
55
+ maxWidth: "unset",
56
+ // 608
57
+ width: "100%",
58
+ minHeight: "248px",
59
+ // 208px
60
+ padding: "12px",
61
+ borderRadius: "16px"
62
+ },
63
+ md: {
64
+ minWidth: "448px",
65
+ maxWidth: "unset",
66
+ // 608
67
+ width: "100%",
68
+ minHeight: "248px",
69
+ // 172px
70
+ padding: "12px",
71
+ borderRadius: "16px"
72
+ }
73
+ },
74
+ s: {
75
+ xl: {
76
+ minWidth: "216px",
77
+ maxWidth: "unset",
78
+ // 296px
79
+ width: "100%",
80
+ minHeight: "248px",
81
+ padding: "12px",
82
+ borderRadius: "16px"
83
+ },
84
+ lg: {
85
+ minWidth: "216px",
86
+ maxWidth: "unset",
87
+ // 296px
88
+ width: "100%",
89
+ minHeight: "248px",
90
+ // 208px
91
+ padding: "12px",
92
+ borderRadius: "16px"
93
+ },
94
+ md: {
95
+ minWidth: "216px",
96
+ maxWidth: "unset",
97
+ // 296px
98
+ width: "100%",
99
+ minHeight: "248px",
100
+ // 172px
101
+ padding: "12px",
102
+ borderRadius: "16px"
103
+ }
104
+ }
105
+ }, Mt = {
106
+ l: {
107
+ topSlot: !0,
108
+ // Filters + chips
109
+ middleSlot: !0
110
+ // Tabs
111
+ },
112
+ m: {
113
+ topSlot: !0,
114
+ // Filters + chips
115
+ middleSlot: !1
116
+ // Tabs
117
+ },
118
+ s: {
119
+ topSlot: !0,
120
+ // Filters + chips
121
+ middleSlot: !1
122
+ // Tabs
123
+ }
124
+ }, r = {
125
+ root: "analytical-widget",
126
+ header: "analytical-widget__header",
127
+ popoverInfo: "analytical-widget__popover-info",
128
+ topSlot: "analytical-widget__top-slot",
129
+ middleSlot: "analytical-widget__middle-slot",
130
+ contentSlot: "analytical-widget__content",
131
+ headerActions: "analytical-widget__header-actions",
132
+ selfSpacedTopSlot: "analytical-widget__self-spaced-top-slot",
133
+ // Маркер на корне виджета: rightSlot шапки заполнен. По нему абсолютная
134
+ // dots-кнопка (сиблинг) поднимает top с 12 до 16 через CSS.
135
+ hasRightSlot: "analytical-widget--has-right-slot"
136
+ }, Ot = l.div.withConfig({
137
+ displayName: "AnalyticalWidgetIconButtonDotsstyled__StyledAbsoluteDots"
138
+ })(["position:absolute;top:", "px;right:", "px;.", " ~ &,&:has(~ .", "),&:has(~ * .", "){top:", "px;}"], ({
139
+ $offset: t
140
+ }) => t, ({
141
+ $offset: t
142
+ }) => t, r.hasRightSlot, r.hasRightSlot, r.hasRightSlot, ({
143
+ $offset: t
144
+ }) => t + 4), zt = ({
145
+ dropdownProps: t,
146
+ iconSize: e,
147
+ iconOrientation: a = "vertical",
148
+ view: d = "secondary",
149
+ size: o = "m",
150
+ absolute: s = !1,
151
+ absoluteOffset: n = 12,
152
+ style: g,
153
+ ...p
154
+ }) => {
155
+ const c = /* @__PURE__ */ i(tt, { view: d, size: o, style: g, ...p, children: /* @__PURE__ */ i(a === "vertical" ? $t : Bt, { size: e ?? "s", color: $ }) }), f = t ? /* @__PURE__ */ i(it, { ...t, children: c }) : c;
156
+ return s ? /* @__PURE__ */ i(Ot, { $offset: n, children: f }) : f;
157
+ }, Gt = l(lt).withConfig({
158
+ displayName: "AnalyticalWidgetChipsGroupstyled__StyledChip"
159
+ })(["max-height:20px;max-width:180px;border-radius:12px;padding-inline:8px;"]), Ft = l(nt).withConfig({
160
+ displayName: "AnalyticalWidgetChipsGroupstyled__StyledChipGroup"
161
+ })(["--analytical-widget-chips-gap:4px;gap:var(--analytical-widget-chips-gap);padding-top:8px;"]), Vt = ({
162
+ chips: t,
163
+ commonView: e = "default",
164
+ commonSize: a = "xs",
165
+ opened: d = !1,
166
+ ...o
167
+ }) => {
168
+ const s = Ht(d, 300, !1), n = R(t);
169
+ t.length > 0 && (n.current = t);
170
+ const g = t.length > 0 ? t : n.current;
171
+ return /* @__PURE__ */ i("div", { className: r.selfSpacedTopSlot, children: /* @__PURE__ */ i(Dt, { isOpen: s, unMountOnClose: !0, children: /* @__PURE__ */ i(Ft, { view: e, size: a, isCommonChipStyles: !1, ...o, children: g.map(({
172
+ key: p,
173
+ view: y,
174
+ ...c
175
+ }, f) => /* @__PURE__ */ It(Gt, { size: "xs", appearance: "transparent", ...c, key: p ?? `${c == null ? void 0 : c.name}-${f}` })) }) }) });
176
+ }, Xt = l.div.withConfig({
177
+ displayName: "TooltipList__StyledTooltipContent"
178
+ })(["color:", ";", ";max-height:130px;overflow-y:auto;padding-block:2px;padding-right:2px;& > ul{padding-top:1px;display:flex;flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;}& li{padding-left:12px;position:relative;&::before{content:'•';position:absolute;left:2px;}}"], () => Wt, () => b(_t)), Yt = ({
179
+ groupLabel: t,
180
+ items: e
181
+ }) => /* @__PURE__ */ S(Xt, { children: [
182
+ /* @__PURE__ */ i("span", { children: t }),
183
+ /* @__PURE__ */ i("ul", { children: e.map((a, d) => (
184
+ // eslint-disable-next-line react/no-array-index-key
185
+ /* @__PURE__ */ i("li", { children: a }, `${a}-${d}`)
186
+ )) })
187
+ ] }), jt = l.div.withConfig({
188
+ displayName: "TooltipList__FullWidthWrapper"
189
+ })(["width:100%;& .popover-target,& .popover-wrapper{width:100%;}"]), He = ({
190
+ groupLabel: t,
191
+ items: e,
192
+ children: a,
193
+ fullWidth: d,
194
+ ...o
195
+ }) => {
196
+ const s = e.length > 0, n = /* @__PURE__ */ i(
197
+ E,
198
+ {
199
+ usePortal: !0,
200
+ size: "s",
201
+ mouseEnterDelay: 500,
202
+ ...o,
203
+ trigger: s ? o.trigger ?? "hover" : "none",
204
+ text: s ? /* @__PURE__ */ i(Yt, { groupLabel: t, items: e }) : null,
205
+ opened: s ? o.opened : !1,
206
+ children: a
207
+ }
208
+ );
209
+ return d ? /* @__PURE__ */ i(jt, { children: n }) : n;
210
+ }, Pt = {
211
+ BodyL: St,
212
+ BodyM: V,
213
+ BodyS: wt,
214
+ BodyXS: ft,
215
+ BodyXXS: xt,
216
+ DsplL: ut,
217
+ DsplM: mt,
218
+ DsplS: yt,
219
+ H1: gt,
220
+ H2: ht,
221
+ H3: ct,
222
+ H4: pt,
223
+ H5: st,
224
+ TextL: rt,
225
+ TextM: dt,
226
+ TextS: ot,
227
+ TextXS: at
228
+ };
229
+ function B({
230
+ variant: t,
231
+ children: e,
232
+ refTypography: a,
233
+ ...d
234
+ }) {
235
+ const o = Pt[t];
236
+ return /* @__PURE__ */ i(o, { ...d, ref: a, children: e });
237
+ }
238
+ B.displayName = "Typography";
239
+ const T = "typography-with-auto-tooltip-root";
240
+ let v = !1, x = null, _ = 0;
241
+ function X() {
242
+ if (typeof document > "u")
243
+ return;
244
+ const t = document.getElementById(T);
245
+ t && t.querySelectorAll("[id^='plasma-popover-root']:empty").forEach((e) => e.remove());
246
+ }
247
+ function qt() {
248
+ v || (v = !0, x = setTimeout(() => {
249
+ v = !1, x = null, X();
250
+ }, 0));
251
+ }
252
+ function Jt() {
253
+ x && (clearTimeout(x), x = null), v = !1;
254
+ }
255
+ function Kt() {
256
+ x && (clearTimeout(x), x = null), v = !1, X();
257
+ }
258
+ function Qt() {
259
+ if (!(typeof document > "u")) {
260
+ if (_ += 1, _ === 1) {
261
+ const t = document.createElement("div");
262
+ t.id = T, document.body.appendChild(t);
263
+ }
264
+ return () => {
265
+ if (_ -= 1, _ === 0) {
266
+ const t = document.getElementById(T);
267
+ t && (t.querySelectorAll("[id^='plasma-popover-root']").length > 0 || t.remove());
268
+ }
269
+ };
270
+ }
271
+ }
272
+ function Ut() {
273
+ return {
274
+ schedule: qt,
275
+ flush: Kt,
276
+ cancel: Jt,
277
+ getContainerId: () => T,
278
+ createContainer: Qt
279
+ };
280
+ }
281
+ const Zt = l(E).withConfig({
282
+ displayName: "TypographyWithAutoTooltipstyled__StyledTooltip"
283
+ })(["&.popover-target{width:100%;}"]), te = l.div.withConfig({
284
+ displayName: "TypographyWithAutoTooltipstyled__StyleTooltipWrapper"
285
+ })(["display:flex;align-items:center;min-width:0;& .popover-target{width:100%;}& .popover-wrapper{overflow:hidden;width:100%;display:flex;}"]), ee = 1, L = ({
286
+ tooltipText: t,
287
+ tooltipProps: e,
288
+ lines: a = 1,
289
+ className: d,
290
+ children: o,
291
+ ...s
292
+ }) => {
293
+ const {
294
+ mouseEnterDelay: n = 500,
295
+ mouseLeaveDelay: g = 0,
296
+ ...p
297
+ } = e || {}, y = R(null), [c, f] = Rt(!1), H = R(), {
298
+ schedule: W,
299
+ getContainerId: j,
300
+ createContainer: D
301
+ } = Ut(), k = I(() => {
302
+ if (!y.current)
303
+ return !1;
304
+ const h = y.current;
305
+ if (a > 1)
306
+ return h.scrollHeight > h.clientHeight || h.scrollWidth > h.clientWidth;
307
+ try {
308
+ const m = document.createRange();
309
+ m.selectNodeContents(h);
310
+ const Q = m.getBoundingClientRect().width, U = h.getBoundingClientRect().width;
311
+ m.detach();
312
+ const Z = window.devicePixelRatio || 1;
313
+ return (Q - U) * Z > ee;
314
+ } catch {
315
+ return !1;
316
+ }
317
+ }, [a]), P = I(() => {
318
+ k() && (H.current = setTimeout(() => {
319
+ f(!0);
320
+ }, n));
321
+ }, [k, n]), q = I(() => {
322
+ clearTimeout(H.current), setTimeout(() => {
323
+ f(!1), W();
324
+ }, g);
325
+ }, [g, W]), {
326
+ variant: J,
327
+ bold: M,
328
+ size: O,
329
+ ...u
330
+ } = s, K = {
331
+ variant: J,
332
+ ...M !== void 0 && {
333
+ bold: M
334
+ },
335
+ ...O !== void 0 && {
336
+ size: O
337
+ },
338
+ ...u,
339
+ refTypography: y,
340
+ onMouseEnter: (h) => {
341
+ var m;
342
+ (m = u.onMouseEnter) == null || m.call(u, h);
343
+ },
344
+ onMouseLeave: (h) => {
345
+ var m;
346
+ (m = u.onMouseLeave) == null || m.call(u, h);
347
+ },
348
+ style: {
349
+ ...Nt({
350
+ lines: a
351
+ }),
352
+ ...u.style || {}
353
+ },
354
+ children: o
355
+ }, z = /* @__PURE__ */ i(B, { ...K, children: o });
356
+ return G(() => D(), [D]), G(() => () => {
357
+ clearTimeout(H.current), W();
358
+ }, [W]), /* @__PURE__ */ i(te, { className: d, onMouseEnter: P, onMouseLeave: q, children: c ? /* @__PURE__ */ i(Zt, { opened: c, text: t ?? "", target: z, frame: j(), ...p }) : z });
359
+ }, ie = () => b(bt), Y = () => b(Tt), ne = l.header.withConfig({
360
+ displayName: "AnalyticalWidgetHeaderstyled__StyledHeader"
361
+ })(["display:flex;justify-content:space-between;align-items:center;padding-right:24px;& .popover-wrapper:has(.", "){display:flex;flex-shrink:0;height:100%;align-items:center;transition:none;}"], r.popoverInfo), le = l.div.withConfig({
362
+ displayName: "AnalyticalWidgetHeaderstyled__StyledLeftSlot"
363
+ })(["display:flex;flex-direction:column;flex:1 1 auto;min-width:0;gap:2px;min-height:32px;margin-right:16px;"]), ae = l.div.withConfig({
364
+ displayName: "AnalyticalWidgetHeaderstyled__StyledTitleContainer"
365
+ })(["margin:0;display:flex;align-items:center;flex-shrink:1;min-width:0;"]);
366
+ l.p.withConfig({
367
+ displayName: "AnalyticalWidgetHeaderstyled__StyledTitle"
368
+ })(["margin:0;white-space:'nowrap';overflow:'hidden';text-overflow:'ellipsis';", ";color:", ";"], () => ie(), () => $);
369
+ const oe = l(L).withConfig({
370
+ displayName: "AnalyticalWidgetHeaderstyled__StyledTitleWithTooltip"
371
+ })(["display:flex;flex-shrink:1;align-items:center;min-width:0;margin-right:4px;"]), de = l(L).withConfig({
372
+ displayName: "AnalyticalWidgetHeaderstyled__StyledSubTitleWithTooltip"
373
+ })(["display:flex;flex-shrink:1;align-items:center;min-width:0;margin-right:4px;"]), re = l.p.withConfig({
374
+ displayName: "AnalyticalWidgetHeaderstyled__StyledAfterTitle"
375
+ })(["flex-shrink:0;margin:0;margin-right:4px;white-space:'nowrap';overflow:'hidden';text-overflow:'ellipsis';", " color:", ";text-transform:uppercase;"], () => Y(), () => Ct), se = l.div.attrs({
376
+ className: r.headerActions
377
+ }).withConfig({
378
+ displayName: "AnalyticalWidgetHeaderstyled__StyledHeaderActions"
379
+ })(["display:inline-flex;align-items:center;flex-shrink:0;opacity:0;transition:opacity 0.3s ease;"]);
380
+ l.p.withConfig({
381
+ displayName: "AnalyticalWidgetHeaderstyled__StyledSubtitle"
382
+ })(["", " flex-shrink:1;margin:0;min-width:0;color:", ";"], () => Y(), () => C);
383
+ l(B).withConfig({
384
+ displayName: "AnalyticalWidgetHeaderstyled__StyledSubtitleTypography"
385
+ })(["color:", ";"], () => C);
386
+ const pe = l(vt).withConfig({
387
+ displayName: "AnalyticalWidgetHeaderstyled__StyledTitleLink"
388
+ })(["display:flex;min-width:0;flex-shrink:1;"]);
389
+ l(L).withConfig({
390
+ displayName: "AnalyticalWidgetHeaderstyled__StyleSubtitledWithTooltip"
391
+ })(["flex-shrink:1;margin:0;min-width:0;"]);
392
+ const ce = l.div.withConfig({
393
+ displayName: "AnalyticalWidgetHeaderstyled__StyledRightSlot"
394
+ })(["align-self:start;flex-shrink:0;"]), F = ({
395
+ title: t,
396
+ titleTooltipProps: e
397
+ }) => /* @__PURE__ */ i(oe, { tooltipText: t, tooltipProps: {
398
+ placement: "top",
399
+ ...e
400
+ }, variant: "BodyM", bold: !0, style: {
401
+ color: $,
402
+ wordBreak: "normal"
403
+ }, lines: 1, children: t }), he = ({
404
+ title: t,
405
+ titleTooltipProps: e,
406
+ badge: a,
407
+ badgeStyles: d,
408
+ subtitle: o,
409
+ subtitleTooltipProps: s,
410
+ infoTooltipText: n,
411
+ infoTooltipProps: g,
412
+ rightSlot: p,
413
+ className: y,
414
+ titleLinkProps: c
415
+ }) => /* @__PURE__ */ S(ne, { className: w(r.header, y), children: [
416
+ /* @__PURE__ */ S(le, { children: [
417
+ /* @__PURE__ */ S(ae, { children: [
418
+ t && c ? /* @__PURE__ */ i(pe, { underline: "none", ...c, children: /* @__PURE__ */ i(F, { title: t, titleTooltipProps: e }) }) : /* @__PURE__ */ i(F, { title: t, titleTooltipProps: e }),
419
+ a && /* @__PURE__ */ i(re, { style: d, children: a }),
420
+ n && /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(E, { trigger: "hover", placement: "top", text: n, target: /* @__PURE__ */ i(Lt, { size: "xs", style: {
421
+ cursor: "pointer",
422
+ color: C
423
+ } }), className: w(r.popoverInfo), ...g }) })
424
+ ] }),
425
+ o && /* @__PURE__ */ i(de, { variant: "BodyXS", tooltipText: o, style: {
426
+ color: C,
427
+ wordBreak: "normal"
428
+ }, tooltipProps: {
429
+ placement: "top",
430
+ ...s
431
+ }, lines: 1, children: o })
432
+ ] }),
433
+ p && /* @__PURE__ */ i(ce, { children: p })
434
+ ] }), ge = (t) => {
435
+ const e = kt[t];
436
+ return {
437
+ xl: `
438
+ --analytical-widget-padding: ${e.xl.padding};
439
+ --analytical-widget-br: ${e.xl.borderRadius};
440
+ --analytical-widget-min-height: ${e.xl.minHeight};
441
+ --analytical-widget-min-width: ${e.xl.minWidth || "unset"};
442
+ --analytical-widget-max-width: ${e.xl.maxWidth || "unset"};
443
+
444
+ width: ${e.xl.width};
445
+ min-height: var(--analytical-widget-min-height);
446
+ height: 100%;
447
+ min-width: var(--analytical-widget-min-width);
448
+ max-width: var(--analytical-widget-max-width);
449
+ padding: var(--analytical-widget-padding);
450
+ border-radius: var(--analytical-widget-br);
451
+ `,
452
+ lg: `
453
+ --analytical-widget-padding: ${e.lg.padding};
454
+ --analytical-widget-br: ${e.lg.borderRadius};
455
+ --analytical-widget-min-height: ${e.lg.minHeight};
456
+ --analytical-widget-min-width: ${e.lg.minWidth || "unset"};
457
+ --analytical-widget-max-width: ${e.lg.maxWidth || "unset"};
458
+
459
+ width: ${e.lg.width};
460
+ min-height: var(--analytical-widget-min-height);
461
+ height: 100%;
462
+ min-width: var(--analytical-widget-min-width);
463
+ max-width: var(--analytical-widget-max-width);
464
+ padding: var(--analytical-widget-padding);
465
+ border-radius: var(--analytical-widget-br);
466
+ `,
467
+ md: `
468
+ --analytical-widget-padding: ${e.md.padding};
469
+ --analytical-widget-br: ${e.md.borderRadius};
470
+ --analytical-widget-min-height: ${e.md.minHeight};
471
+ --analytical-widget-min-width: ${e.md.minWidth || "unset"};
472
+ --analytical-widget-max-width: ${e.md.maxWidth || "unset"};
473
+
474
+ width: ${e.md.width};
475
+ min-height: var(--analytical-widget-min-height);
476
+ height: 100%;
477
+ min-width: var(--analytical-widget-min-width);
478
+ max-width: var(--analytical-widget-max-width);
479
+ padding: var(--analytical-widget-padding);
480
+ border-radius: var(--analytical-widget-br);
481
+ `
482
+ };
483
+ }, ye = l.article.withConfig({
484
+ displayName: "AnalyticalWidgetstyled__StyledWidget"
485
+ })(["--analytical-widget-bg:", ";display:flex;flex-direction:column;box-sizing:border-box;background:var(--analytical-widget-bg);&:hover{.", "{opacity:1;}}", " ", ""], At, r.headerActions, ({
486
+ $size: t
487
+ }) => {
488
+ const e = ge(t);
489
+ return b(["", " ", " ", " "], N.exact(0, 1439)(e.md), N.exact(1440, 1919)(e.lg), N.exact(1920, 1e5)(e.xl));
490
+ }, ({
491
+ $css: t
492
+ }) => t), me = l(V).withConfig({
493
+ displayName: "AnalyticalWidgetstyled__StyledTopSlot"
494
+ })(["overflow:hidden;margin-top:8px;&:empty{margin-top:0;}&:has(.", "){margin-top:0;}"], r.selfSpacedTopSlot), ue = l.div.withConfig({
495
+ displayName: "AnalyticalWidgetstyled__StyledMiddleSlot"
496
+ })(["overflow:hidden;padding-top:8px;"]), xe = l.div.withConfig({
497
+ displayName: "AnalyticalWidgetstyled__StyledContent"
498
+ })(["position:relative;flex:1;min-height:30px;margin-top:8px;overflow-y:", ";"], ({
499
+ scrollable: t
500
+ }) => t ? "auto" : "visible"), A = ({
501
+ size: t = "l",
502
+ scrollable: e = !0,
503
+ headerSlot: a,
504
+ topSlot: d,
505
+ middleSlot: o,
506
+ contentSlot: s,
507
+ classes: n,
508
+ $css: g
509
+ }) => {
510
+ const p = Mt[t], y = Et(a) && !!a.props.rightSlot;
511
+ return /* @__PURE__ */ S(ye, { $size: t, $css: g, className: w(r.root, y ? r.hasRightSlot : void 0, n == null ? void 0 : n.root), children: [
512
+ /* @__PURE__ */ i("div", { style: {
513
+ minHeight: "32px"
514
+ }, children: a }),
515
+ p.topSlot && d || p.middleSlot && o ? /* @__PURE__ */ S("div", { children: [
516
+ p.topSlot && d && /* @__PURE__ */ i(me, { className: w(r.topSlot, n == null ? void 0 : n.topSlot), children: d }),
517
+ p.middleSlot && o && /* @__PURE__ */ i(ue, { className: w(r.middleSlot, n == null ? void 0 : n.middleSlot), children: o })
518
+ ] }) : null,
519
+ /* @__PURE__ */ i(xe, { scrollable: e, className: w(r.contentSlot, n == null ? void 0 : n.contentSlot), children: s })
520
+ ] });
521
+ };
522
+ A.Header = he;
523
+ A.FilterIconButton = et;
524
+ A.DotsIconButton = zt;
525
+ A.Chips = Vt;
526
+ export {
527
+ A,
528
+ B as T,
529
+ L as a,
530
+ r as b,
531
+ He as c,
532
+ zt as d,
533
+ Vt as e,
534
+ he as f
535
+ };
@@ -0,0 +1,43 @@
1
+ "use strict";const Q=require("@salutejs/sdds-finai/beta"),U=require("../components/IconButton/index.cjs"),a=require("@salutejs/sdds-finai"),i=require("react/jsx-runtime"),g=require("@salutejs/sdds-themes/tokens/sdds_finai"),n=require("styled-components"),u=require("./utils-DvDFSlCG.cjs"),m=require("react"),I=require("@salutejs/plasma-icons"),Z=require("../components/Collapse/index.cjs"),tt={l:{xl:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"512px",padding:"12px",borderRadius:"16px"},lg:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"512px",padding:"12px",borderRadius:"16px"},md:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"512px",padding:"12px",borderRadius:"16px"}},m:{xl:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"},lg:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"},md:{minWidth:"448px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"}},s:{xl:{minWidth:"216px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"},lg:{minWidth:"216px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"},md:{minWidth:"216px",maxWidth:"unset",width:"100%",minHeight:"248px",padding:"12px",borderRadius:"16px"}}},et={l:{topSlot:!0,middleSlot:!0},m:{topSlot:!0,middleSlot:!1},s:{topSlot:!0,middleSlot:!1}},s={root:"analytical-widget",header:"analytical-widget__header",popoverInfo:"analytical-widget__popover-info",topSlot:"analytical-widget__top-slot",middleSlot:"analytical-widget__middle-slot",contentSlot:"analytical-widget__content",headerActions:"analytical-widget__header-actions",selfSpacedTopSlot:"analytical-widget__self-spaced-top-slot",hasRightSlot:"analytical-widget--has-right-slot"},it=n.div.withConfig({displayName:"AnalyticalWidgetIconButtonDotsstyled__StyledAbsoluteDots"})(["position:absolute;top:","px;right:","px;."," ~ &,&:has(~ .","),&:has(~ * .","){top:","px;}"],({$offset:t})=>t,({$offset:t})=>t,s.hasRightSlot,s.hasRightSlot,s.hasRightSlot,({$offset:t})=>t+4),k=({dropdownProps:t,iconSize:e,iconOrientation:o="vertical",view:r="secondary",size:d="m",absolute:p=!1,absoluteOffset:l=12,style:x,...c})=>{const w=o==="vertical"?I.IconDotsVerticalOutline:I.IconDotsHorizontalOutline,h=i.jsx(Q.EmbeddedButton,{view:r,size:d,style:x,...c,children:i.jsx(w,{size:e??"s",color:g.textPrimary})}),C=t?i.jsx(a.Dropdown,{...t,children:h}):h;return p?i.jsx(it,{$offset:l,children:C}):C},nt=n(a.Chip).withConfig({displayName:"AnalyticalWidgetChipsGroupstyled__StyledChip"})(["max-height:20px;max-width:180px;border-radius:12px;padding-inline:8px;"]),lt=n(a.ChipGroup).withConfig({displayName:"AnalyticalWidgetChipsGroupstyled__StyledChipGroup"})(["--analytical-widget-chips-gap:4px;gap:var(--analytical-widget-chips-gap);padding-top:8px;"]),M=({chips:t,commonView:e="default",commonSize:o="xs",opened:r=!1,...d})=>{const p=u.useDebouncedValue(r,300,!1),l=m.useRef(t);t.length>0&&(l.current=t);const x=t.length>0?t:l.current;return i.jsx("div",{className:s.selfSpacedTopSlot,children:i.jsx(Z.Collapse,{isOpen:p,unMountOnClose:!0,children:i.jsx(lt,{view:e,size:o,isCommonChipStyles:!1,...d,children:x.map(({key:c,view:w,...h},C)=>m.createElement(nt,{size:"xs",appearance:"transparent",...h,key:c??`${h==null?void 0:h.name}-${C}`}))})})})},at=n.div.withConfig({displayName:"TooltipList__StyledTooltipContent"})(["color:",";",";max-height:130px;overflow-y:auto;padding-block:2px;padding-right:2px;& > ul{padding-top:1px;display:flex;flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;}& li{padding-left:12px;position:relative;&::before{content:'•';position:absolute;left:2px;}}"],()=>g.inverseTextPrimary,()=>n.css(g.bodyXS)),ot=({groupLabel:t,items:e})=>i.jsxs(at,{children:[i.jsx("span",{children:t}),i.jsx("ul",{children:e.map((o,r)=>i.jsx("li",{children:o},`${o}-${r}`))})]}),dt=n.div.withConfig({displayName:"TooltipList__FullWidthWrapper"})(["width:100%;& .popover-target,& .popover-wrapper{width:100%;}"]),rt=({groupLabel:t,items:e,children:o,fullWidth:r,...d})=>{const p=e.length>0,l=i.jsx(a.Tooltip,{usePortal:!0,size:"s",mouseEnterDelay:500,...d,trigger:p?d.trigger??"hover":"none",text:p?i.jsx(ot,{groupLabel:t,items:e}):null,opened:p?d.opened:!1,children:o});return r?i.jsx(dt,{children:l}):l},st={BodyL:a.BodyL,BodyM:a.BodyM,BodyS:a.BodyS,BodyXS:a.BodyXS,BodyXXS:a.BodyXXS,DsplL:a.DsplL,DsplM:a.DsplM,DsplS:a.DsplS,H1:a.H1,H2:a.H2,H3:a.H3,H4:a.H4,H5:a.H5,TextL:a.TextL,TextM:a.TextM,TextS:a.TextS,TextXS:a.TextXS};function H({variant:t,children:e,refTypography:o,...r}){const d=st[t];return i.jsx(d,{...r,ref:o,children:e})}H.displayName="Typography";const A="typography-with-auto-tooltip-root";let T=!1,v=null,b=0;function O(){if(typeof document>"u")return;const t=document.getElementById(A);t&&t.querySelectorAll("[id^='plasma-popover-root']:empty").forEach(e=>e.remove())}function pt(){T||(T=!0,v=setTimeout(()=>{T=!1,v=null,O()},0))}function ct(){v&&(clearTimeout(v),v=null),T=!1}function ht(){v&&(clearTimeout(v),v=null),T=!1,O()}function gt(){if(!(typeof document>"u")){if(b+=1,b===1){const t=document.createElement("div");t.id=A,document.body.appendChild(t)}return()=>{if(b-=1,b===0){const t=document.getElementById(A);t&&(t.querySelectorAll("[id^='plasma-popover-root']").length>0||t.remove())}}}}function yt(){return{schedule:pt,flush:ht,cancel:ct,getContainerId:()=>A,createContainer:gt}}const mt=n(a.Tooltip).withConfig({displayName:"TypographyWithAutoTooltipstyled__StyledTooltip"})(["&.popover-target{width:100%;}"]),ut=n.div.withConfig({displayName:"TypographyWithAutoTooltipstyled__StyleTooltipWrapper"})(["display:flex;align-items:center;min-width:0;& .popover-target{width:100%;}& .popover-wrapper{overflow:hidden;width:100%;display:flex;}"]),xt=1,j=({tooltipText:t,tooltipProps:e,lines:o=1,className:r,children:d,...p})=>{const{mouseEnterDelay:l=500,mouseLeaveDelay:x=0,...c}=e||{},w=m.useRef(null),[h,C]=m.useState(!1),N=m.useRef(),{schedule:_,getContainerId:z,createContainer:R}=yt(),B=m.useCallback(()=>{if(!w.current)return!1;const y=w.current;if(o>1)return y.scrollHeight>y.clientHeight||y.scrollWidth>y.clientWidth;try{const f=document.createRange();f.selectNodeContents(y);const Y=f.getBoundingClientRect().width,J=y.getBoundingClientRect().width;f.detach();const K=window.devicePixelRatio||1;return(Y-J)*K>xt}catch{return!1}},[o]),G=m.useCallback(()=>{B()&&(N.current=setTimeout(()=>{C(!0)},l))},[B,l]),F=m.useCallback(()=>{clearTimeout(N.current),setTimeout(()=>{C(!1),_()},x)},[x,_]),{variant:V,bold:L,size:E,...S}=p,P={variant:V,...L!==void 0&&{bold:L},...E!==void 0&&{size:E},...S,refTypography:w,onMouseEnter:y=>{var f;(f=S.onMouseEnter)==null||f.call(S,y)},onMouseLeave:y=>{var f;(f=S.onMouseLeave)==null||f.call(S,y)},style:{...u.truncateText({lines:o}),...S.style||{}},children:d},D=i.jsx(H,{...P,children:d});return m.useEffect(()=>R(),[R]),m.useEffect(()=>()=>{clearTimeout(N.current),_()},[_]),i.jsx(ut,{className:r,onMouseEnter:G,onMouseLeave:F,children:h?i.jsx(mt,{opened:h,text:t??"",target:D,frame:z(),...c}):D})},wt=()=>n.css(g.bodyMBold),q=()=>n.css(g.bodyM),ft=n.header.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledHeader"})(["display:flex;justify-content:space-between;align-items:center;padding-right:24px;& .popover-wrapper:has(.","){display:flex;flex-shrink:0;height:100%;align-items:center;transition:none;}"],s.popoverInfo),St=n.div.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledLeftSlot"})(["display:flex;flex-direction:column;flex:1 1 auto;min-width:0;gap:2px;min-height:32px;margin-right:16px;"]),vt=n.div.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledTitleContainer"})(["margin:0;display:flex;align-items:center;flex-shrink:1;min-width:0;"]);n.p.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledTitle"})(["margin:0;white-space:'nowrap';overflow:'hidden';text-overflow:'ellipsis';",";color:",";"],()=>wt(),()=>g.textPrimary);const Ct=n(j).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledTitleWithTooltip"})(["display:flex;flex-shrink:1;align-items:center;min-width:0;margin-right:4px;"]),Tt=n(j).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledSubTitleWithTooltip"})(["display:flex;flex-shrink:1;align-items:center;min-width:0;margin-right:4px;"]),Wt=n.p.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledAfterTitle"})(["flex-shrink:0;margin:0;margin-right:4px;white-space:'nowrap';overflow:'hidden';text-overflow:'ellipsis';"," color:",";text-transform:uppercase;"],()=>q(),()=>g.textTertiary),_t=n.div.attrs({className:s.headerActions}).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledHeaderActions"})(["display:inline-flex;align-items:center;flex-shrink:0;opacity:0;transition:opacity 0.3s ease;"]);n.p.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledSubtitle"})([""," flex-shrink:1;margin:0;min-width:0;color:",";"],()=>q(),()=>g.textSecondary);n(H).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledSubtitleTypography"})(["color:",";"],()=>g.textSecondary);const bt=n(a.Link).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledTitleLink"})(["display:flex;min-width:0;flex-shrink:1;"]);n(j).withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyleSubtitledWithTooltip"})(["flex-shrink:1;margin:0;min-width:0;"]);const At=n.div.withConfig({displayName:"AnalyticalWidgetHeaderstyled__StyledRightSlot"})(["align-self:start;flex-shrink:0;"]),$=({title:t,titleTooltipProps:e})=>i.jsx(Ct,{tooltipText:t,tooltipProps:{placement:"top",...e},variant:"BodyM",bold:!0,style:{color:g.textPrimary,wordBreak:"normal"},lines:1,children:t}),X=({title:t,titleTooltipProps:e,badge:o,badgeStyles:r,subtitle:d,subtitleTooltipProps:p,infoTooltipText:l,infoTooltipProps:x,rightSlot:c,className:w,titleLinkProps:h})=>i.jsxs(ft,{className:u.mergeClasses(s.header,w),children:[i.jsxs(St,{children:[i.jsxs(vt,{children:[t&&h?i.jsx(bt,{underline:"none",...h,children:i.jsx($,{title:t,titleTooltipProps:e})}):i.jsx($,{title:t,titleTooltipProps:e}),o&&i.jsx(Wt,{style:r,children:o}),l&&i.jsx(_t,{children:i.jsx(a.Tooltip,{trigger:"hover",placement:"top",text:l,target:i.jsx(I.IconInfoCircleOutline,{size:"xs",style:{cursor:"pointer",color:g.textSecondary}}),className:u.mergeClasses(s.popoverInfo),...x})})]}),d&&i.jsx(Tt,{variant:"BodyXS",tooltipText:d,style:{color:g.textSecondary,wordBreak:"normal"},tooltipProps:{placement:"top",...p},lines:1,children:d})]}),c&&i.jsx(At,{children:c})]}),Ht=t=>{const e=tt[t];return{xl:`
2
+ --analytical-widget-padding: ${e.xl.padding};
3
+ --analytical-widget-br: ${e.xl.borderRadius};
4
+ --analytical-widget-min-height: ${e.xl.minHeight};
5
+ --analytical-widget-min-width: ${e.xl.minWidth||"unset"};
6
+ --analytical-widget-max-width: ${e.xl.maxWidth||"unset"};
7
+
8
+ width: ${e.xl.width};
9
+ min-height: var(--analytical-widget-min-height);
10
+ height: 100%;
11
+ min-width: var(--analytical-widget-min-width);
12
+ max-width: var(--analytical-widget-max-width);
13
+ padding: var(--analytical-widget-padding);
14
+ border-radius: var(--analytical-widget-br);
15
+ `,lg:`
16
+ --analytical-widget-padding: ${e.lg.padding};
17
+ --analytical-widget-br: ${e.lg.borderRadius};
18
+ --analytical-widget-min-height: ${e.lg.minHeight};
19
+ --analytical-widget-min-width: ${e.lg.minWidth||"unset"};
20
+ --analytical-widget-max-width: ${e.lg.maxWidth||"unset"};
21
+
22
+ width: ${e.lg.width};
23
+ min-height: var(--analytical-widget-min-height);
24
+ height: 100%;
25
+ min-width: var(--analytical-widget-min-width);
26
+ max-width: var(--analytical-widget-max-width);
27
+ padding: var(--analytical-widget-padding);
28
+ border-radius: var(--analytical-widget-br);
29
+ `,md:`
30
+ --analytical-widget-padding: ${e.md.padding};
31
+ --analytical-widget-br: ${e.md.borderRadius};
32
+ --analytical-widget-min-height: ${e.md.minHeight};
33
+ --analytical-widget-min-width: ${e.md.minWidth||"unset"};
34
+ --analytical-widget-max-width: ${e.md.maxWidth||"unset"};
35
+
36
+ width: ${e.md.width};
37
+ min-height: var(--analytical-widget-min-height);
38
+ height: 100%;
39
+ min-width: var(--analytical-widget-min-width);
40
+ max-width: var(--analytical-widget-max-width);
41
+ padding: var(--analytical-widget-padding);
42
+ border-radius: var(--analytical-widget-br);
43
+ `}},jt=n.article.withConfig({displayName:"AnalyticalWidgetstyled__StyledWidget"})(["--analytical-widget-bg:",";display:flex;flex-direction:column;box-sizing:border-box;background:var(--analytical-widget-bg);&:hover{.","{opacity:1;}}"," ",""],g.surfaceSolidCard,s.headerActions,({$size:t})=>{const e=Ht(t);return n.css([""," "," "," "],u.media.exact(0,1439)(e.md),u.media.exact(1440,1919)(e.lg),u.media.exact(1920,1e5)(e.xl))},({$css:t})=>t),Nt=n(a.BodyM).withConfig({displayName:"AnalyticalWidgetstyled__StyledTopSlot"})(["overflow:hidden;margin-top:8px;&:empty{margin-top:0;}&:has(.","){margin-top:0;}"],s.selfSpacedTopSlot),It=n.div.withConfig({displayName:"AnalyticalWidgetstyled__StyledMiddleSlot"})(["overflow:hidden;padding-top:8px;"]),Rt=n.div.withConfig({displayName:"AnalyticalWidgetstyled__StyledContent"})(["position:relative;flex:1;min-height:30px;margin-top:8px;overflow-y:",";"],({scrollable:t})=>t?"auto":"visible"),W=({size:t="l",scrollable:e=!0,headerSlot:o,topSlot:r,middleSlot:d,contentSlot:p,classes:l,$css:x})=>{const c=et[t],w=m.isValidElement(o)&&!!o.props.rightSlot;return i.jsxs(jt,{$size:t,$css:x,className:u.mergeClasses(s.root,w?s.hasRightSlot:void 0,l==null?void 0:l.root),children:[i.jsx("div",{style:{minHeight:"32px"},children:o}),c.topSlot&&r||c.middleSlot&&d?i.jsxs("div",{children:[c.topSlot&&r&&i.jsx(Nt,{className:u.mergeClasses(s.topSlot,l==null?void 0:l.topSlot),children:r}),c.middleSlot&&d&&i.jsx(It,{className:u.mergeClasses(s.middleSlot,l==null?void 0:l.middleSlot),children:d})]}):null,i.jsx(Rt,{scrollable:e,className:u.mergeClasses(s.contentSlot,l==null?void 0:l.contentSlot),children:p})]})};W.Header=X;W.FilterIconButton=U.IconButtonFilter;W.DotsIconButton=k;W.Chips=M;exports.AnalyticalWidget=W;exports.AnalyticalWidgetChipsGroup=M;exports.AnalyticalWidgetHeader=X;exports.AnalyticalWidgetIconButtonDots=k;exports.TooltipList=rt;exports.Typography=H;exports.TypographyWithAutoTooltip=j;exports.analyticalWidgetClassNames=s;
@@ -4,7 +4,7 @@ import { useState as nt } from "react";
4
4
  import { textNegative as W, surfacePositive as R, textWarning as P, surfaceTransparentSecondary as Y, surfaceSolidCard as O, textSecondary as T, textPrimary as I } from "@salutejs/sdds-themes/tokens/sdds_finai";
5
5
  import { IconCloseCircleFill as j, IconDoneCircleFill as u, IconFocusOutline as st, IconInProgressFill as rt } from "@salutejs/plasma-icons";
6
6
  import s from "styled-components";
7
- import { T as f } from "./AnalyticalWidget-BWggL9xa.mjs";
7
+ import { T as f } from "./AnalyticalWidget-BSpo7GCr.mjs";
8
8
  import { E as lt } from "./EmptyState-BB3duGQw.mjs";
9
9
  const at = {
10
10
  DEFAULT: /* @__PURE__ */ t(u, { size: "xs", color: Y }),
@@ -1 +1 @@
1
- "use strict";const o=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),W=require("react"),r=require("@salutejs/sdds-themes/tokens/sdds_finai"),y=require("@salutejs/plasma-icons"),l=require("styled-components"),h=require("./AnalyticalWidget-B6czTLSw.cjs"),R=require("./EmptyState-Du-RIjie.cjs"),P={DEFAULT:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfaceTransparentSecondary}),WAIT:e.jsx(y.IconFocusOutline,{size:"xs",color:r.textWarning}),SUCCESSFUL:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfacePositive}),FAILURE:e.jsx(y.IconCloseCircleFill,{size:"xs",color:r.textNegative})},_={DEFAULT:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfaceTransparentSecondary}),WAIT:e.jsx(y.IconInProgressFill,{size:"xs",color:r.textWarning}),SUCCESSFUL:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfacePositive}),FAILURE:e.jsx(y.IconCloseCircleFill,{size:"xs",color:r.textNegative})},q={DEFAULT:"inactive",WAIT:"active",SUCCESSFUL:"completed",FAILURE:"completed"},Y={DEFAULT:"default",WAIT:"warning",SUCCESSFUL:"positive",FAILURE:"negative"},O={LIFE_CYCLE:"Жизненный цикл",HISTORY:"История изменений"},I=l.div.withConfig({displayName:"styled__ApprovalCenterContainer"})(["min-width:360px;min-height:600px;width:100%;height:100%;border-radius:16px;display:flex;flex-direction:column;flex:1;padding:12px 4px 12px 16px;background:",";",""],()=>r.surfaceSolidCard,({$css:s})=>s),V=l.div.withConfig({displayName:"styled__ApprovalCenterContentWrapper"})(["margin-top:20px;min-height:0;flex-direction:column;display:flex;flex:1;"]),X=l.div.withConfig({displayName:"styled__PreviewContainer"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;flex:1;"]),M=l.div.withConfig({displayName:"styled__LifeCycleContainer"})(["overflow-y:auto;min-height:0;flex:1;display:flex;flex-direction:column;padding-right:12px;"]),K=l.div.withConfig({displayName:"styled__LifeCycleAccordionTitle"})(["display:flex;align-items:center;gap:4px;"]),D=l.div.withConfig({displayName:"styled__LifeCycleStageContent"})(["> *:not(:first-child){margin-top:8px;}> .comment:not(:first-child){margin-top:2px;}"]),$=l.div.withConfig({displayName:"styled__LifeCycleAssignees"})(["display:flex;flex-direction:column;gap:8px;"]),B=l.div.withConfig({displayName:"styled__LifeCycleButtonsWrapper"})(["display:flex;gap:4px;"]),G=l.div.withConfig({displayName:"styled__LifeCycleStageButtonsWrapper"})(["display:flex;gap:16px;"]),E=l(o.Button).withConfig({displayName:"styled__LifeCycleStyledButton"})(["margin-top:8px;"]),J=l.div.withConfig({displayName:"styled__HistoryContainer"})(["display:flex;flex-direction:column;flex:1;min-height:0;gap:12px;overflow-y:auto;padding-right:12px;"]),Q=l.div.withConfig({displayName:"styled__HistoryDay"})(["display:flex;flex-direction:column;gap:12px;"]),Z=l.div.withConfig({displayName:"styled__HistoryDate"})(["top:0px;position:sticky;display:flex;justify-content:center;width:100%;"]),ee=l.div.withConfig({displayName:"styled__HistoryActions"})(["display:flex;flex-direction:column;gap:12px;"]);l(o.Badge).withConfig({displayName:"styled__HistoryStyledBadge"})(["flex-shrink:0;white-space:nowrap;"]);const T=s=>{const{historyByDay:p}=s;return e.jsx(J,{children:p.map(c=>e.jsxs(Q,{children:[e.jsx(Z,{children:e.jsx(o.Badge,{size:"m",text:c.date,view:"light",customColor:r.textSecondary,customBackgroundColor:r.surfaceSolidCard})}),e.jsx(ee,{children:c.actions.map(i=>e.jsx(o.Cell,{size:"s",title:i.title,subtitle:i.time,contentLeft:P[i.status]}))})]},c.date))})};function d(s){return s!=null}function g(s){return Array.isArray(s)&&s.length>0}function te(s){const p=new Intl.DateTimeFormat("ru-RU",{day:"numeric",month:"long"}),c=new Intl.DateTimeFormat("ru-RU",{hour:"2-digit",minute:"2-digit",hour12:!1}),i=new Date,t=new Map;for(const a of s){const n=new Date(a.actionDate),m=n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()?"Сегодня":p.format(n),v=c.format(n),u={status:a.status,title:a.actionTitle,time:v};let x=t.get(m);x===void 0&&(x=[],t.set(m,x)),x.push(u)}return Array.from(t,([a,n])=>({date:a,actions:n}))}const w=s=>{const{lifeCycle:p}=s,c=p.map(i=>({title:i.title,status:q[i.status],completedItemView:Y[i.status],content:d(i.stages)?e.jsxs(e.Fragment,{children:[e.jsx(o.Accordion,{size:"s",view:"clear",defaultActiveEventKey:i.stages.reduce((t,a,n)=>(a.open&&t.push(n),t),[]),children:i.stages.map((t,a)=>e.jsx(o.AccordionItem,{contentLeft:d(t.tooltip)?e.jsx(o.ViewContainer,{view:"onDark",children:e.jsx(o.Tooltip,{maxWidth:250,offset:[2,11],target:_[t.status],trigger:"hover",placement:"top-start",text:t.tooltip.text})}):_[t.status],title:e.jsxs(K,{children:[e.jsx(h.Typography,{variant:"TextS",children:t.title}),d(t.mark)&&(t.mark.tooltip?e.jsx(o.ViewContainer,{view:"onDark",children:e.jsx(o.Tooltip,{maxWidth:250,offset:[2,11],target:t.mark.icon,trigger:"hover",placement:"top-start",text:t.mark.tooltip.text})}):t.mark.icon)]}),eventKey:a,children:e.jsxs(D,{children:[g(t.assignee)&&e.jsx($,{children:t.assignee.map(n=>e.jsx(h.Typography,{variant:"TextXS",bold:!0,color:r.textPrimary,children:n},n))}),d(t.comment)&&e.jsx(h.Typography,{variant:"TextXS",color:r.textPrimary,children:t.comment}),g(t.buttons)&&e.jsx(G,{children:t.buttons.map(n=>e.jsx(o.LinkButton,{contentLeft:n.contentLeft,text:n.text,size:"xxs",onClick:n.onClick},n.text))}),d(t.actionTitle)&&e.jsx(h.Typography,{variant:"TextXS",color:r.textSecondary,children:t.actionTitle})]})},t.title))}),g(i.buttons)&&e.jsx(B,{children:i.buttons.map(t=>e.jsx(E,{text:t.text,contentLeft:t.contentLeft,view:"secondary",size:"xs"}))})]}):e.jsxs(D,{children:[e.jsx(h.Typography,{variant:"BodyXS",color:r.textSecondary,children:i.actionTitle}),g(i.buttons)&&e.jsx(B,{children:i.buttons.map(t=>e.jsx(E,{text:t.text,contentLeft:t.contentLeft,view:"secondary",size:"xs"}))})]})}));return e.jsx(M,{children:e.jsx(o.Steps,{style:{paddingTop:"1px",height:"auto"},items:c,orientation:"vertical",size:"m"})})},L=s=>{const{preview:p}=s,{button:c,loading:i}=p??{},t=d(c);return e.jsx(X,{children:i?e.jsx(o.Spinner,{size:"l",view:"default"}):e.jsx(R.EmptyState,{size:"m",variant:"no-content",buttons:t?[{props:{text:c.text,children:c.text,view:"accent",onClick:c.onClick},type:"link"}]:void 0})})},ie=s=>{const{className:p,$css:c,preview:i,tabs:t,lifeCycle:a,history:n}=s,[f,m]=W.useState(t.active),v=t.available.length>1,u=t.available[0],x=u==="LIFE_CYCLE",N=u==="HISTORY",b=f==="LIFE_CYCLE",z=f==="HISTORY",S=d(a),H=d(n),A=d(i),j=H?te(n):null,F=d(j);if(v){const k=e.jsxs(V,{children:[S&&b&&e.jsx(w,{lifeCycle:a}),F&&z&&e.jsx(T,{historyByDay:j})]});return e.jsx(I,{className:p,$css:c,children:A?e.jsx(L,{preview:i}):e.jsxs(e.Fragment,{children:[e.jsx(o.Tabs,{view:"divider",size:"s",orientation:"horizontal",children:t.available.map(C=>e.jsx(o.TabItem,{view:"divider",size:"s",selected:C===f,onClick:()=>m(C),children:O[C]},C))}),k]})})}const U=e.jsxs(e.Fragment,{children:[S&&x&&e.jsx(w,{lifeCycle:a}),F&&N&&e.jsx(T,{historyByDay:j})]});return e.jsx(I,{children:A?e.jsx(L,{preview:i}):U})};exports.ApprovalCenter=ie;exports.History=T;exports.LifeCycle=w;exports.Preview=L;
1
+ "use strict";const o=require("@salutejs/sdds-finai"),e=require("react/jsx-runtime"),W=require("react"),r=require("@salutejs/sdds-themes/tokens/sdds_finai"),y=require("@salutejs/plasma-icons"),l=require("styled-components"),h=require("./AnalyticalWidget-D_g7b36w.cjs"),R=require("./EmptyState-Du-RIjie.cjs"),P={DEFAULT:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfaceTransparentSecondary}),WAIT:e.jsx(y.IconFocusOutline,{size:"xs",color:r.textWarning}),SUCCESSFUL:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfacePositive}),FAILURE:e.jsx(y.IconCloseCircleFill,{size:"xs",color:r.textNegative})},_={DEFAULT:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfaceTransparentSecondary}),WAIT:e.jsx(y.IconInProgressFill,{size:"xs",color:r.textWarning}),SUCCESSFUL:e.jsx(y.IconDoneCircleFill,{size:"xs",color:r.surfacePositive}),FAILURE:e.jsx(y.IconCloseCircleFill,{size:"xs",color:r.textNegative})},q={DEFAULT:"inactive",WAIT:"active",SUCCESSFUL:"completed",FAILURE:"completed"},Y={DEFAULT:"default",WAIT:"warning",SUCCESSFUL:"positive",FAILURE:"negative"},O={LIFE_CYCLE:"Жизненный цикл",HISTORY:"История изменений"},I=l.div.withConfig({displayName:"styled__ApprovalCenterContainer"})(["min-width:360px;min-height:600px;width:100%;height:100%;border-radius:16px;display:flex;flex-direction:column;flex:1;padding:12px 4px 12px 16px;background:",";",""],()=>r.surfaceSolidCard,({$css:s})=>s),V=l.div.withConfig({displayName:"styled__ApprovalCenterContentWrapper"})(["margin-top:20px;min-height:0;flex-direction:column;display:flex;flex:1;"]),X=l.div.withConfig({displayName:"styled__PreviewContainer"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;flex:1;"]),M=l.div.withConfig({displayName:"styled__LifeCycleContainer"})(["overflow-y:auto;min-height:0;flex:1;display:flex;flex-direction:column;padding-right:12px;"]),K=l.div.withConfig({displayName:"styled__LifeCycleAccordionTitle"})(["display:flex;align-items:center;gap:4px;"]),D=l.div.withConfig({displayName:"styled__LifeCycleStageContent"})(["> *:not(:first-child){margin-top:8px;}> .comment:not(:first-child){margin-top:2px;}"]),$=l.div.withConfig({displayName:"styled__LifeCycleAssignees"})(["display:flex;flex-direction:column;gap:8px;"]),B=l.div.withConfig({displayName:"styled__LifeCycleButtonsWrapper"})(["display:flex;gap:4px;"]),G=l.div.withConfig({displayName:"styled__LifeCycleStageButtonsWrapper"})(["display:flex;gap:16px;"]),E=l(o.Button).withConfig({displayName:"styled__LifeCycleStyledButton"})(["margin-top:8px;"]),J=l.div.withConfig({displayName:"styled__HistoryContainer"})(["display:flex;flex-direction:column;flex:1;min-height:0;gap:12px;overflow-y:auto;padding-right:12px;"]),Q=l.div.withConfig({displayName:"styled__HistoryDay"})(["display:flex;flex-direction:column;gap:12px;"]),Z=l.div.withConfig({displayName:"styled__HistoryDate"})(["top:0px;position:sticky;display:flex;justify-content:center;width:100%;"]),ee=l.div.withConfig({displayName:"styled__HistoryActions"})(["display:flex;flex-direction:column;gap:12px;"]);l(o.Badge).withConfig({displayName:"styled__HistoryStyledBadge"})(["flex-shrink:0;white-space:nowrap;"]);const T=s=>{const{historyByDay:p}=s;return e.jsx(J,{children:p.map(c=>e.jsxs(Q,{children:[e.jsx(Z,{children:e.jsx(o.Badge,{size:"m",text:c.date,view:"light",customColor:r.textSecondary,customBackgroundColor:r.surfaceSolidCard})}),e.jsx(ee,{children:c.actions.map(i=>e.jsx(o.Cell,{size:"s",title:i.title,subtitle:i.time,contentLeft:P[i.status]}))})]},c.date))})};function d(s){return s!=null}function g(s){return Array.isArray(s)&&s.length>0}function te(s){const p=new Intl.DateTimeFormat("ru-RU",{day:"numeric",month:"long"}),c=new Intl.DateTimeFormat("ru-RU",{hour:"2-digit",minute:"2-digit",hour12:!1}),i=new Date,t=new Map;for(const a of s){const n=new Date(a.actionDate),m=n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate()?"Сегодня":p.format(n),v=c.format(n),u={status:a.status,title:a.actionTitle,time:v};let x=t.get(m);x===void 0&&(x=[],t.set(m,x)),x.push(u)}return Array.from(t,([a,n])=>({date:a,actions:n}))}const w=s=>{const{lifeCycle:p}=s,c=p.map(i=>({title:i.title,status:q[i.status],completedItemView:Y[i.status],content:d(i.stages)?e.jsxs(e.Fragment,{children:[e.jsx(o.Accordion,{size:"s",view:"clear",defaultActiveEventKey:i.stages.reduce((t,a,n)=>(a.open&&t.push(n),t),[]),children:i.stages.map((t,a)=>e.jsx(o.AccordionItem,{contentLeft:d(t.tooltip)?e.jsx(o.ViewContainer,{view:"onDark",children:e.jsx(o.Tooltip,{maxWidth:250,offset:[2,11],target:_[t.status],trigger:"hover",placement:"top-start",text:t.tooltip.text})}):_[t.status],title:e.jsxs(K,{children:[e.jsx(h.Typography,{variant:"TextS",children:t.title}),d(t.mark)&&(t.mark.tooltip?e.jsx(o.ViewContainer,{view:"onDark",children:e.jsx(o.Tooltip,{maxWidth:250,offset:[2,11],target:t.mark.icon,trigger:"hover",placement:"top-start",text:t.mark.tooltip.text})}):t.mark.icon)]}),eventKey:a,children:e.jsxs(D,{children:[g(t.assignee)&&e.jsx($,{children:t.assignee.map(n=>e.jsx(h.Typography,{variant:"TextXS",bold:!0,color:r.textPrimary,children:n},n))}),d(t.comment)&&e.jsx(h.Typography,{variant:"TextXS",color:r.textPrimary,children:t.comment}),g(t.buttons)&&e.jsx(G,{children:t.buttons.map(n=>e.jsx(o.LinkButton,{contentLeft:n.contentLeft,text:n.text,size:"xxs",onClick:n.onClick},n.text))}),d(t.actionTitle)&&e.jsx(h.Typography,{variant:"TextXS",color:r.textSecondary,children:t.actionTitle})]})},t.title))}),g(i.buttons)&&e.jsx(B,{children:i.buttons.map(t=>e.jsx(E,{text:t.text,contentLeft:t.contentLeft,view:"secondary",size:"xs"}))})]}):e.jsxs(D,{children:[e.jsx(h.Typography,{variant:"BodyXS",color:r.textSecondary,children:i.actionTitle}),g(i.buttons)&&e.jsx(B,{children:i.buttons.map(t=>e.jsx(E,{text:t.text,contentLeft:t.contentLeft,view:"secondary",size:"xs"}))})]})}));return e.jsx(M,{children:e.jsx(o.Steps,{style:{paddingTop:"1px",height:"auto"},items:c,orientation:"vertical",size:"m"})})},L=s=>{const{preview:p}=s,{button:c,loading:i}=p??{},t=d(c);return e.jsx(X,{children:i?e.jsx(o.Spinner,{size:"l",view:"default"}):e.jsx(R.EmptyState,{size:"m",variant:"no-content",buttons:t?[{props:{text:c.text,children:c.text,view:"accent",onClick:c.onClick},type:"link"}]:void 0})})},ie=s=>{const{className:p,$css:c,preview:i,tabs:t,lifeCycle:a,history:n}=s,[f,m]=W.useState(t.active),v=t.available.length>1,u=t.available[0],x=u==="LIFE_CYCLE",N=u==="HISTORY",b=f==="LIFE_CYCLE",z=f==="HISTORY",S=d(a),H=d(n),A=d(i),j=H?te(n):null,F=d(j);if(v){const k=e.jsxs(V,{children:[S&&b&&e.jsx(w,{lifeCycle:a}),F&&z&&e.jsx(T,{historyByDay:j})]});return e.jsx(I,{className:p,$css:c,children:A?e.jsx(L,{preview:i}):e.jsxs(e.Fragment,{children:[e.jsx(o.Tabs,{view:"divider",size:"s",orientation:"horizontal",children:t.available.map(C=>e.jsx(o.TabItem,{view:"divider",size:"s",selected:C===f,onClick:()=>m(C),children:O[C]},C))}),k]})})}const U=e.jsxs(e.Fragment,{children:[S&&x&&e.jsx(w,{lifeCycle:a}),F&&N&&e.jsx(T,{historyByDay:j})]});return e.jsx(I,{children:A?e.jsx(L,{preview:i}):U})};exports.ApprovalCenter=ie;exports.History=T;exports.LifeCycle=w;exports.Preview=L;