ydb-embedded-ui 6.23.1 → 6.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. package/dist/components/NodeHostWrapper/NodeHostWrapper.d.ts +6 -2
  2. package/dist/components/NodeHostWrapper/NodeHostWrapper.js.map +1 -1
  3. package/dist/components/PaginatedTable/PaginatedTable.d.ts +3 -2
  4. package/dist/components/PaginatedTable/PaginatedTable.js +15 -21
  5. package/dist/components/PaginatedTable/PaginatedTable.js.map +1 -1
  6. package/dist/components/PaginatedTable/TableChunk.d.ts +1 -2
  7. package/dist/components/PaginatedTable/TableChunk.js +5 -19
  8. package/dist/components/PaginatedTable/TableChunk.js.map +1 -1
  9. package/dist/components/PaginatedTable/useScrollBasedChunks.d.ts +9 -0
  10. package/dist/components/PaginatedTable/useScrollBasedChunks.js +35 -0
  11. package/dist/components/PaginatedTable/useScrollBasedChunks.js.map +1 -0
  12. package/dist/components/TabletsStatistic/TabletsStatistic.d.ts +2 -2
  13. package/dist/components/TabletsStatistic/TabletsStatistic.js +2 -2
  14. package/dist/components/TabletsStatistic/TabletsStatistic.js.map +1 -1
  15. package/dist/components/VDisk/VDisk.js +2 -21
  16. package/dist/components/VDisk/VDisk.js.map +1 -1
  17. package/dist/components/VDisk/VDisk.scss +2 -0
  18. package/dist/components/VDisk/VDiskWithDonorsStack.js +2 -2
  19. package/dist/components/VDisk/VDiskWithDonorsStack.js.map +1 -1
  20. package/dist/components/VDisk/utils.d.ts +2 -0
  21. package/dist/components/VDisk/utils.js +23 -0
  22. package/dist/components/VDisk/utils.js.map +1 -0
  23. package/dist/components/VDiskInfo/VDiskInfo.js +2 -2
  24. package/dist/components/VDiskInfo/VDiskInfo.js.map +1 -1
  25. package/dist/components/VDiskPopup/VDiskPopup.d.ts +2 -3
  26. package/dist/components/VDiskPopup/VDiskPopup.js +22 -3
  27. package/dist/components/VDiskPopup/VDiskPopup.js.map +1 -1
  28. package/dist/components/nodesColumns/columns.d.ts +55 -0
  29. package/dist/components/nodesColumns/columns.js +187 -0
  30. package/dist/components/nodesColumns/columns.js.map +1 -0
  31. package/dist/components/nodesColumns/constants.d.ts +39 -0
  32. package/dist/components/nodesColumns/constants.js +73 -0
  33. package/dist/components/nodesColumns/constants.js.map +1 -0
  34. package/dist/{containers/Nodes/columns → components/nodesColumns}/i18n/en.json +4 -3
  35. package/dist/components/nodesColumns/i18n/index.d.ts +2 -0
  36. package/dist/{containers/Nodes/columns → components/nodesColumns}/i18n/index.js +1 -1
  37. package/dist/components/nodesColumns/i18n/index.js.map +1 -0
  38. package/dist/components/nodesColumns/types.d.ts +8 -0
  39. package/dist/components/nodesColumns/types.js.map +1 -0
  40. package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js +8 -4
  41. package/dist/containers/AppWithClusters/ExtendedCluster/ExtendedCluster.js.map +1 -1
  42. package/dist/containers/Authentication/Authentication.js +12 -10
  43. package/dist/containers/Authentication/Authentication.js.map +1 -1
  44. package/dist/containers/Cluster/Cluster.js +1 -1
  45. package/dist/containers/Cluster/Cluster.js.map +1 -1
  46. package/dist/containers/Node/Node.js +1 -1
  47. package/dist/containers/Node/Node.js.map +1 -1
  48. package/dist/containers/Nodes/Nodes.js +1 -1
  49. package/dist/containers/Nodes/Nodes.js.map +1 -1
  50. package/dist/containers/Nodes/NodesWrapper.d.ts +2 -2
  51. package/dist/containers/Nodes/NodesWrapper.js +2 -2
  52. package/dist/containers/Nodes/NodesWrapper.js.map +1 -1
  53. package/dist/containers/Nodes/PaginatedNodes.d.ts +3 -2
  54. package/dist/containers/Nodes/PaginatedNodes.js +3 -3
  55. package/dist/containers/Nodes/PaginatedNodes.js.map +1 -1
  56. package/dist/containers/Nodes/columns/columns.d.ts +2 -7
  57. package/dist/containers/Nodes/columns/columns.js +13 -187
  58. package/dist/containers/Nodes/columns/columns.js.map +1 -1
  59. package/dist/containers/Nodes/columns/constants.d.ts +1 -38
  60. package/dist/containers/Nodes/columns/constants.js +0 -68
  61. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  62. package/dist/containers/Nodes/columns/hooks.d.ts +3 -3
  63. package/dist/containers/Nodes/columns/hooks.js +2 -1
  64. package/dist/containers/Nodes/columns/hooks.js.map +1 -1
  65. package/dist/containers/PDiskPage/PDiskPage.js +2 -2
  66. package/dist/containers/PDiskPage/PDiskPage.js.map +1 -1
  67. package/dist/containers/Storage/Disks/Disks.d.ts +2 -2
  68. package/dist/containers/Storage/Disks/Disks.js +5 -6
  69. package/dist/containers/Storage/Disks/Disks.js.map +1 -1
  70. package/dist/containers/Storage/PDisk/PDisk.d.ts +2 -2
  71. package/dist/containers/Storage/PDisk/PDisk.js +3 -6
  72. package/dist/containers/Storage/PDisk/PDisk.js.map +1 -1
  73. package/dist/containers/Storage/PaginatedStorage.d.ts +4 -1
  74. package/dist/containers/Storage/PaginatedStorage.js +3 -2
  75. package/dist/containers/Storage/PaginatedStorage.js.map +1 -1
  76. package/dist/containers/Storage/PaginatedStorageGroups.js +5 -5
  77. package/dist/containers/Storage/PaginatedStorageGroups.js.map +1 -1
  78. package/dist/containers/Storage/PaginatedStorageNodes.js +7 -7
  79. package/dist/containers/Storage/PaginatedStorageNodes.js.map +1 -1
  80. package/dist/containers/Storage/Storage.d.ts +3 -1
  81. package/dist/containers/Storage/Storage.js +3 -3
  82. package/dist/containers/Storage/Storage.js.map +1 -1
  83. package/dist/containers/Storage/StorageControls/StorageControls.js +2 -2
  84. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.d.ts +3 -2
  85. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.js +2 -2
  86. package/dist/containers/Storage/StorageGroups/PaginatedStorageGroupsTable.js.map +1 -1
  87. package/dist/containers/Storage/StorageGroups/columns/StorageGroupsColumns.scss +10 -1
  88. package/dist/containers/Storage/StorageGroups/columns/columns.js +21 -16
  89. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
  90. package/dist/containers/Storage/StorageGroups/columns/constants.js +1 -1
  91. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
  92. package/dist/containers/Storage/StorageGroups/columns/hooks.d.ts +3 -2
  93. package/dist/containers/Storage/StorageGroups/columns/hooks.js +5 -5
  94. package/dist/containers/Storage/StorageGroups/columns/hooks.js.map +1 -1
  95. package/dist/containers/Storage/StorageGroups/columns/i18n/en.json +1 -1
  96. package/dist/containers/Storage/StorageGroups/columns/i18n/index.d.ts +1 -1
  97. package/dist/containers/Storage/StorageGroups/columns/types.d.ts +3 -2
  98. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.d.ts +3 -2
  99. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js +2 -2
  100. package/dist/containers/Storage/StorageNodes/PaginatedStorageNodesTable.js.map +1 -1
  101. package/dist/containers/Storage/StorageNodes/columns/columns.d.ts +2 -38
  102. package/dist/containers/Storage/StorageNodes/columns/columns.js +34 -71
  103. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
  104. package/dist/containers/Storage/StorageNodes/columns/constants.d.ts +20 -4
  105. package/dist/containers/Storage/StorageNodes/columns/constants.js +4 -32
  106. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
  107. package/dist/containers/Storage/StorageNodes/columns/hooks.d.ts +2 -39
  108. package/dist/containers/Storage/StorageNodes/columns/hooks.js +4 -4
  109. package/dist/containers/Storage/StorageNodes/columns/hooks.js.map +1 -1
  110. package/dist/containers/Storage/StorageNodes/columns/i18n/en.json +0 -8
  111. package/dist/containers/Storage/StorageNodes/columns/i18n/index.d.ts +1 -1
  112. package/dist/containers/Storage/StorageNodes/columns/types.d.ts +5 -5
  113. package/dist/containers/Storage/StorageWrapper.d.ts +6 -3
  114. package/dist/containers/Storage/StorageWrapper.js +10 -3
  115. package/dist/containers/Storage/StorageWrapper.js.map +1 -1
  116. package/dist/containers/Storage/types.d.ts +6 -0
  117. package/dist/containers/Storage/types.js +2 -0
  118. package/dist/containers/Storage/types.js.map +1 -0
  119. package/dist/containers/Storage/utils/index.d.ts +4 -6
  120. package/dist/containers/Storage/utils/index.js +35 -9
  121. package/dist/containers/Storage/utils/index.js.map +1 -1
  122. package/dist/containers/StorageGroupPage/StorageGroupPage.js +2 -2
  123. package/dist/containers/StorageGroupPage/StorageGroupPage.js.map +1 -1
  124. package/dist/containers/Tablet/components/TabletStorageInfo/TabletStorageInfo.scss +2 -9
  125. package/dist/containers/Tenant/Diagnostics/Diagnostics.js +4 -4
  126. package/dist/containers/Tenant/Diagnostics/Diagnostics.js.map +1 -1
  127. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.d.ts +4 -0
  128. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +18 -3
  129. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js.map +1 -1
  130. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +22 -3
  131. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js.map +1 -1
  132. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +2 -1
  133. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  134. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -1
  135. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js.map +1 -1
  136. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +23 -2
  137. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  138. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -6
  139. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js.map +1 -1
  140. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +2 -1
  141. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js.map +1 -1
  142. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/en.json +2 -1
  143. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  144. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js +4 -2
  145. package/dist/containers/Tenant/Diagnostics/TopQueries/RunningQueriesData.js.map +1 -1
  146. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js +2 -1
  147. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueriesData.js.map +1 -1
  148. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +2 -1
  149. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js.map +1 -1
  150. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +3 -4
  151. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  152. package/dist/containers/Tenant/Query/Preview/Preview.js +3 -2
  153. package/dist/containers/Tenant/Query/Preview/Preview.js.map +1 -1
  154. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +1 -4
  155. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  156. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.d.ts +4 -4
  157. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js +1 -1
  158. package/dist/containers/Tenant/Query/QuerySettingsDialog/constants.js.map +1 -1
  159. package/dist/containers/Tenants/Tenants.js +10 -2
  160. package/dist/containers/Tenants/Tenants.js.map +1 -1
  161. package/dist/containers/UserSettings/i18n/en.json +0 -2
  162. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  163. package/dist/containers/UserSettings/settings.d.ts +0 -1
  164. package/dist/containers/UserSettings/settings.js +2 -7
  165. package/dist/containers/UserSettings/settings.js.map +1 -1
  166. package/dist/containers/VDiskPage/VDiskPage.js +3 -4
  167. package/dist/containers/VDiskPage/VDiskPage.js.map +1 -1
  168. package/dist/services/api.d.ts +3 -4
  169. package/dist/services/api.js +1 -3
  170. package/dist/services/api.js.map +1 -1
  171. package/dist/services/settings.d.ts +1 -2
  172. package/dist/services/settings.js +1 -2
  173. package/dist/services/settings.js.map +1 -1
  174. package/dist/store/reducers/cluster/__test__/parseGroupsStatsQueryResponse.test.js +62 -40
  175. package/dist/store/reducers/cluster/__test__/parseGroupsStatsQueryResponse.test.js.map +1 -1
  176. package/dist/store/reducers/cluster/cluster.js +0 -1
  177. package/dist/store/reducers/cluster/cluster.js.map +1 -1
  178. package/dist/store/reducers/cluster/utils.d.ts +1 -1
  179. package/dist/store/reducers/cluster/utils.js +2 -1
  180. package/dist/store/reducers/cluster/utils.js.map +1 -1
  181. package/dist/store/reducers/executeQuery.d.ts +0 -2
  182. package/dist/store/reducers/executeQuery.js +1 -2
  183. package/dist/store/reducers/executeQuery.js.map +1 -1
  184. package/dist/store/reducers/executeTopQueries/executeTopQueries.d.ts +1 -1
  185. package/dist/store/reducers/executeTopQueries/executeTopQueries.js +4 -4
  186. package/dist/store/reducers/executeTopQueries/executeTopQueries.js.map +1 -1
  187. package/dist/store/reducers/nodes/types.d.ts +2 -7
  188. package/dist/store/reducers/nodes/utils.js +0 -6
  189. package/dist/store/reducers/nodes/utils.js.map +1 -1
  190. package/dist/store/reducers/preview.js +1 -1
  191. package/dist/store/reducers/preview.js.map +1 -1
  192. package/dist/store/reducers/shardsWorkload/shardsWorkload.js +0 -1
  193. package/dist/store/reducers/shardsWorkload/shardsWorkload.js.map +1 -1
  194. package/dist/store/reducers/storage/types.d.ts +6 -7
  195. package/dist/store/reducers/storage/utils.js +23 -9
  196. package/dist/store/reducers/storage/utils.js.map +1 -1
  197. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js +0 -1
  198. package/dist/store/reducers/tenantOverview/executeTopTables/executeTopTables.js.map +1 -1
  199. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js +0 -1
  200. package/dist/store/reducers/tenantOverview/topShards/tenantOverviewTopShards.js.map +1 -1
  201. package/dist/store/reducers/tenants/types.d.ts +1 -0
  202. package/dist/store/reducers/tenants/utils.js +4 -2
  203. package/dist/store/reducers/tenants/utils.js.map +1 -1
  204. package/dist/store/reducers/viewSchema/viewSchema.js +2 -2
  205. package/dist/store/reducers/viewSchema/viewSchema.js.map +1 -1
  206. package/dist/types/additionalProps.d.ts +1 -1
  207. package/dist/types/api/cluster.d.ts +2 -0
  208. package/dist/types/api/cluster.js +3 -1
  209. package/dist/types/api/cluster.js.map +1 -1
  210. package/dist/types/api/nodes.d.ts +3 -0
  211. package/dist/types/api/nodes.js.map +1 -1
  212. package/dist/types/api/query.d.ts +16 -30
  213. package/dist/types/api/storage.d.ts +2 -2
  214. package/dist/types/store/query.d.ts +0 -1
  215. package/dist/utils/constants.d.ts +0 -1
  216. package/dist/utils/constants.js +0 -2
  217. package/dist/utils/constants.js.map +1 -1
  218. package/dist/utils/disks/__test__/calculateVDiskSeverity.test.js +1 -2
  219. package/dist/utils/disks/__test__/calculateVDiskSeverity.test.js.map +1 -1
  220. package/dist/utils/disks/calculateVDiskSeverity.js +2 -3
  221. package/dist/utils/disks/calculateVDiskSeverity.js.map +1 -1
  222. package/dist/utils/disks/prepareDisks.js +3 -0
  223. package/dist/utils/disks/prepareDisks.js.map +1 -1
  224. package/dist/utils/disks/types.d.ts +1 -0
  225. package/dist/utils/nodes.d.ts +4 -2
  226. package/dist/utils/nodes.js +10 -1
  227. package/dist/utils/nodes.js.map +1 -1
  228. package/dist/utils/query.d.ts +5 -5
  229. package/dist/utils/query.js +7 -22
  230. package/dist/utils/query.js.map +1 -1
  231. package/dist/utils/query.test.js +221 -56
  232. package/dist/utils/query.test.js.map +1 -1
  233. package/dist/utils/storage.d.ts +1 -0
  234. package/dist/utils/storage.js +3 -0
  235. package/dist/utils/storage.js.map +1 -1
  236. package/package.json +1 -1
  237. package/dist/components/PaginatedTable/useIntersectionObserver.d.ts +0 -9
  238. package/dist/components/PaginatedTable/useIntersectionObserver.js +0 -28
  239. package/dist/components/PaginatedTable/useIntersectionObserver.js.map +0 -1
  240. package/dist/containers/Nodes/columns/i18n/index.d.ts +0 -2
  241. package/dist/containers/Nodes/columns/i18n/index.js.map +0 -1
  242. package/dist/containers/Nodes/columns/types.d.ts +0 -9
  243. package/dist/containers/Nodes/columns/types.js.map +0 -1
  244. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.d.ts +0 -2
  245. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js +0 -7
  246. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/utils.js.map +0 -1
  247. /package/dist/{containers/Nodes/columns → components/nodesColumns}/types.js +0 -0
@@ -1,7 +1,11 @@
1
- import type { NodesPreparedEntity } from '../../store/reducers/nodes/types';
2
1
  import type { NodeAddress } from '../../types/additionalProps';
2
+ import type { TSystemStateInfo } from '../../types/api/nodes';
3
+ export type NodeHostData = NodeAddress & Pick<TSystemStateInfo, 'SystemState'> & {
4
+ NodeId: string | number;
5
+ TenantName?: string;
6
+ };
3
7
  interface NodeHostWrapperProps {
4
- node: NodesPreparedEntity;
8
+ node: NodeHostData;
5
9
  getNodeRef?: (node?: NodeAddress) => string | null;
6
10
  database?: string;
7
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NodeHostWrapper.js","sourceRoot":"","sources":["../../../src/components/NodeHostWrapper/NodeHostWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EAAC,+BAA+B,EAAC,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MA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,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,CAAC,UAAU;SAC1C,CAAC;QACJ,CAAC,CAAC,SAAS,CAAC;IAEhB,MAAM,kBAAkB,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAC,qBAAqB,IAAC,IAAI,EAAE,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAEvF,OAAO,CACH,KAAC,eAAe,IACZ,QAAQ,EAAE,CAAC,eAAe,EAC1B,OAAO,EAAE,KAAC,2BAA2B,IAAC,IAAI,EAAE,IAAI,GAAI,EACpD,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAC5B,QAAQ,EAAE,eAAe,CAAC,SAAS,YAEnC,KAAC,YAAY,IACT,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,WAAW,EACxB,IAAI,EAAE,QAAQ,EACd,kBAAkB,QAClB,kBAAkB,EAAE,kBAAkB,GACxC,GACY,CACrB,CAAC;AACN,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { Column, FetchData, GetRowClassName, HandleTableColumnsResize, RenderControls, RenderEmptyDataMessage, RenderErrorMessage, SortParams } from './types';
2
3
  import './PaginatedTable.scss';
3
4
  export interface PaginatedTableProps<T, F> {
@@ -9,7 +10,7 @@ export interface PaginatedTableProps<T, F> {
9
10
  columns: Column<T>[];
10
11
  getRowClassName?: GetRowClassName<T>;
11
12
  rowHeight?: number;
12
- parentContainer?: Element | null;
13
+ parentRef?: React.RefObject<HTMLElement>;
13
14
  initialSortParams?: SortParams;
14
15
  onColumnsResize?: HandleTableColumnsResize;
15
16
  renderControls?: RenderControls;
@@ -17,4 +18,4 @@ export interface PaginatedTableProps<T, F> {
17
18
  renderErrorMessage?: RenderErrorMessage;
18
19
  containerClassName?: string;
19
20
  }
20
- export declare const PaginatedTable: <T, F>({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight, parentContainer, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }: PaginatedTableProps<T, F>) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const PaginatedTable: <T, F>({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }: PaginatedTableProps<T, F>) => import("react/jsx-runtime").JSX.Element;
@@ -8,53 +8,47 @@ import { EmptyTableRow } from './TableRow';
8
8
  import { DEFAULT_TABLE_ROW_HEIGHT } from './constants';
9
9
  import i18n from './i18n';
10
10
  import { b } from './shared';
11
- import { useIntersectionObserver } from './useIntersectionObserver';
11
+ import { useScrollBasedChunks } from './useScrollBasedChunks';
12
12
  import './PaginatedTable.scss';
13
- export const PaginatedTable = ({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight = DEFAULT_TABLE_ROW_HEIGHT, parentContainer, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }) => {
13
+ export const PaginatedTable = ({ limit, initialEntitiesCount, fetchData, filters, tableName, columns, getRowClassName, rowHeight = DEFAULT_TABLE_ROW_HEIGHT, parentRef, initialSortParams, onColumnsResize, renderControls, renderErrorMessage, renderEmptyDataMessage, containerClassName, }) => {
14
14
  const initialTotal = initialEntitiesCount || limit;
15
15
  const initialFound = initialEntitiesCount || 0;
16
16
  const [sortParams, setSortParams] = React.useState(initialSortParams);
17
17
  const [totalEntities, setTotalEntities] = React.useState(initialTotal);
18
18
  const [foundEntities, setFoundEntities] = React.useState(initialFound);
19
- const [activeChunks, setActiveChunks] = React.useState([]);
20
19
  const [isInitialLoad, setIsInitialLoad] = React.useState(true);
21
- const tableContainer = React.useRef(null);
20
+ const tableRef = React.useRef(null);
21
+ const activeChunks = useScrollBasedChunks({
22
+ containerRef: parentRef !== null && parentRef !== void 0 ? parentRef : tableRef,
23
+ totalItems: foundEntities,
24
+ itemHeight: rowHeight,
25
+ chunkSize: limit,
26
+ });
22
27
  const handleDataFetched = React.useCallback((total, found) => {
23
28
  setTotalEntities(total);
24
29
  setFoundEntities(found);
25
30
  setIsInitialLoad(false);
26
31
  }, []);
27
- const onEntry = React.useCallback((id) => {
28
- setActiveChunks((prev) => [...new Set([...prev, Number(id)])]);
29
- }, []);
30
- const onLeave = React.useCallback((id) => {
31
- setActiveChunks((prev) => prev.filter((chunk) => chunk !== Number(id)));
32
- }, []);
33
- const observer = useIntersectionObserver({ onEntry, onLeave, parentContainer });
34
32
  // reset table on filters change
35
33
  React.useLayoutEffect(() => {
36
34
  var _a;
37
35
  setTotalEntities(initialTotal);
38
36
  setFoundEntities(initialFound);
39
37
  setIsInitialLoad(true);
40
- if (parentContainer) {
41
- parentContainer.scrollTo(0, 0);
38
+ if (parentRef === null || parentRef === void 0 ? void 0 : parentRef.current) {
39
+ parentRef.current.scrollTo(0, 0);
42
40
  }
43
41
  else {
44
- (_a = tableContainer.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
42
+ (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
45
43
  }
46
- setActiveChunks([0]);
47
- }, [filters, initialFound, initialTotal, limit, parentContainer]);
44
+ }, [filters, initialFound, initialTotal, limit, parentRef]);
48
45
  const renderChunks = () => {
49
- if (!observer) {
50
- return null;
51
- }
52
46
  if (!isInitialLoad && foundEntities === 0) {
53
47
  return (_jsx("tbody", { children: _jsx(EmptyTableRow, { columns: columns, children: renderEmptyDataMessage ? renderEmptyDataMessage() : i18n('empty') }) }));
54
48
  }
55
49
  const totalLength = foundEntities || limit;
56
50
  const chunksCount = Math.ceil(totalLength / limit);
57
- return getArray(chunksCount).map((value) => (_jsx(TableChunk, { id: value, limit: limit, totalLength: totalLength, rowHeight: rowHeight, columns: columns, fetchData: fetchData, filters: filters, tableName: tableName, sortParams: sortParams, getRowClassName: getRowClassName, renderErrorMessage: renderErrorMessage, onDataFetched: handleDataFetched, isActive: activeChunks.includes(value), observer: observer }, value)));
51
+ return getArray(chunksCount).map((value) => (_jsx(TableChunk, { id: value, limit: limit, totalLength: totalLength, rowHeight: rowHeight, columns: columns, fetchData: fetchData, filters: filters, tableName: tableName, sortParams: sortParams, getRowClassName: getRowClassName, renderErrorMessage: renderErrorMessage, onDataFetched: handleDataFetched, isActive: activeChunks.includes(value) }, value)));
58
52
  };
59
53
  const renderTable = () => (_jsxs("table", { className: b('table'), children: [_jsx(TableHead, { columns: columns, onSort: setSortParams, onColumnsResize: onColumnsResize }), renderChunks()] }));
60
54
  const renderContent = () => {
@@ -63,6 +57,6 @@ export const PaginatedTable = ({ limit, initialEntitiesCount, fetchData, filters
63
57
  }
64
58
  return renderTable();
65
59
  };
66
- return (_jsx("div", { ref: tableContainer, className: b(null, containerClassName), children: renderContent() }));
60
+ return (_jsx("div", { ref: tableRef, className: b(null, containerClassName), children: renderContent() }));
67
61
  };
68
62
  //# sourceMappingURL=PaginatedTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginatedTable.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/PaginatedTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,uBAAuB,EAAC,MAAM,oDAAoD,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAW3B,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAElE,OAAO,uBAAuB,CAAC;AAoB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AC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAC,CAAC,GACxC,EACnC,KAAC,uBAAuB,CAAC,KAAK,cAAE,WAAW,EAAE,GAAiC,IACxD,CAC7B,CAAC;QACN,CAAC;QAED,OAAO,WAAW,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO,CACH,cAAK,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,YAC3D,aAAa,EAAE,GACd,CACT,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"PaginatedTable.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/PaginatedTable.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,uBAAuB,EAAC,MAAM,oDAAoD,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,wBAAwB,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAC,CAAC,EAAC,MAAM,UAAU,CAAC;AAW3B,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,OAAO,uBAAuB,CAAC;AAoB/B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAO,EACjC,KAAK,EACL,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,SAAS,GAAG,wBAAwB,EACpC,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACM,EAAE,EAAE;IAC5B,MAAM,YAAY,GAAG,oBAAoB,IAAI,K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C,OAAO,CAAC,aACxB,KAAC,SAAS,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,GAAI,EACvF,YAAY,EAAE,IACX,CACX,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,IAAI,cAAc,EAAE,CAAC;YACjB,OAAO,CACH,MAAC,uBAAuB,eACpB,KAAC,uBAAuB,CAAC,QAAQ,cAC5B,cAAc,CAAC,EAAC,MAAM,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAC,CAAC,GACxC,EACnC,KAAC,uBAAuB,CAAC,KAAK,cAAE,WAAW,EAAE,GAAiC,IACxD,CAC7B,CAAC;QACN,CAAC;QAED,OAAO,WAAW,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO,CACH,cAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,YACrD,aAAa,EAAE,GACd,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -9,7 +9,6 @@ interface TableChunkProps<T, F> {
9
9
  columns: Column<T>[];
10
10
  filters?: F;
11
11
  sortParams?: SortParams;
12
- observer: IntersectionObserver;
13
12
  isActive: boolean;
14
13
  tableName: string;
15
14
  fetchData: FetchData<T, F>;
@@ -17,5 +16,5 @@ interface TableChunkProps<T, F> {
17
16
  renderErrorMessage?: (error: IResponseError) => React.ReactNode;
18
17
  onDataFetched: (total: number, found: number) => void;
19
18
  }
20
- export declare const TableChunk: <T, F>({ id, limit, totalLength, rowHeight, columns, fetchData, tableName, filters, sortParams, observer, getRowClassName, renderErrorMessage, onDataFetched, isActive, }: TableChunkProps<T, F>) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const TableChunk: <T, F>({ id, limit, totalLength, rowHeight, columns, fetchData, tableName, filters, sortParams, getRowClassName, renderErrorMessage, onDataFetched, isActive, }: TableChunkProps<T, F>) => import("react/jsx-runtime").JSX.Element;
21
20
  export {};
@@ -6,12 +6,9 @@ import { useAutoRefreshInterval } from '../../utils/hooks';
6
6
  import { ResponseError } from '../Errors/ResponseError';
7
7
  import { EmptyTableRow, LoadingTableRow, TableRow } from './TableRow';
8
8
  const DEBOUNCE_TIMEOUT = 200;
9
- // With original memo generic types are lost
10
- const typedMemo = React.memo;
11
9
  // Memoisation prevents chunks rerenders that could cause perfomance issues on big tables
12
- export const TableChunk = typedMemo(function TableChunk({ id, limit, totalLength, rowHeight, columns, fetchData, tableName, filters, sortParams, observer, getRowClassName, renderErrorMessage, onDataFetched, isActive, }) {
10
+ export const TableChunk = ({ id, limit, totalLength, rowHeight, columns, fetchData, tableName, filters, sortParams, getRowClassName, renderErrorMessage, onDataFetched, isActive, }) => {
13
11
  var _a;
14
- const ref = React.useRef(null);
15
12
  const [isTimeoutActive, setIsTimeoutActive] = React.useState(true);
16
13
  const [autoRefreshInterval] = useAutoRefreshInterval();
17
14
  const queryParams = {
@@ -38,17 +35,6 @@ export const TableChunk = typedMemo(function TableChunk({ id, limit, totalLength
38
35
  window.clearTimeout(timeout);
39
36
  };
40
37
  }, [isActive, isTimeoutActive]);
41
- React.useEffect(() => {
42
- const el = ref.current;
43
- if (el) {
44
- observer.observe(el);
45
- }
46
- return () => {
47
- if (el) {
48
- observer.unobserve(el);
49
- }
50
- };
51
- }, [observer]);
52
38
  React.useEffect(() => {
53
39
  if (currentData && isActive) {
54
40
  const { total = 0, found = 0 } = currentData;
@@ -56,8 +42,8 @@ export const TableChunk = typedMemo(function TableChunk({ id, limit, totalLength
56
42
  }
57
43
  }, [currentData, isActive, onDataFetched]);
58
44
  const chunkOffset = id * limit;
59
- const remainingLenght = totalLength - chunkOffset;
60
- const calculatedChunkLength = remainingLenght < limit ? remainingLenght : limit;
45
+ const remainingLength = totalLength - chunkOffset;
46
+ const calculatedChunkLength = remainingLength < limit ? remainingLength : limit;
61
47
  const dataLength = ((_a = currentData === null || currentData === void 0 ? void 0 : currentData.data) === null || _a === void 0 ? void 0 : _a.length) || calculatedChunkLength;
62
48
  const renderContent = () => {
63
49
  if (!isActive) {
@@ -75,12 +61,12 @@ export const TableChunk = typedMemo(function TableChunk({ id, limit, totalLength
75
61
  return currentData.data.map((rowData, index) => (_jsx(TableRow, { index: index, row: rowData, columns: columns, height: rowHeight, getRowClassName: getRowClassName }, index)));
76
62
  };
77
63
  const chunkHeight = dataLength ? dataLength * rowHeight : limit * rowHeight;
78
- return (_jsx("tbody", { ref: ref, id: id.toString(), style: {
64
+ return (_jsx("tbody", { id: id.toString(), style: {
79
65
  height: `${chunkHeight}px`,
80
66
  // Default display: table-row-group doesn't work in Safari and breaks the table
81
67
  // display: block works in Safari, but disconnects thead and tbody cell grids
82
68
  // Hack to make it work in all cases
83
69
  display: isActive ? 'table-row-group' : 'block',
84
70
  }, children: renderContent() }));
85
- });
71
+ };
86
72
  //# sourceMappingURL=TableChunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableChunk.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/TableChunk.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAC,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAGpE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,4CAA4C;AAC5C,MAAM,SAAS,GAA2B,KAAK,CAAC,IAAI,CAAC;AAoBrD,yFAAyF;AACzF,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,SAAS,UAAU,CAAO,EAC1D,EAAE,EACF,KAAK,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,SAAS,EAC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AAI,CACtC,GACW,CACnB,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACvC,KAAC,eAAe,IAEZ,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,IAHP,KAAK,CAIZ,CACL,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAED,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,QAAQ,IAEL,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAY,EACjB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,eAAe,IAL3B,KAAK,CAMZ,CACL,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;IAE5E,OAAO,CACH,gBACI,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EACjB,KAAK,EAAE;YACH,MAAM,EAAE,GAAG,WAAW,IAAI;YAC1B,+EAA+E;YAC/E,6EAA6E;YAC7E,oCAAoC;YACpC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO;SAClD,YAEA,aAAa,EAAE,GACZ,CACX,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface UseScrollBasedChunksProps {
3
+ containerRef: React.RefObject<HTMLElement>;
4
+ totalItems: number;
5
+ itemHeight: number;
6
+ chunkSize: number;
7
+ }
8
+ export declare const useScrollBasedChunks: ({ containerRef, totalItems, itemHeight, chunkSize, }: UseScrollBasedChunksProps) => number[];
9
+ export {};
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { throttle } from 'lodash';
3
+ import { getArray } from '../../utils';
4
+ const THROTTLE_DELAY = 100;
5
+ const CHUNKS_AHEAD_COUNT = 1;
6
+ export const useScrollBasedChunks = ({ containerRef, totalItems, itemHeight, chunkSize, }) => {
7
+ const [activeChunks, setActiveChunks] = React.useState(getArray(1 + CHUNKS_AHEAD_COUNT).map((index) => index));
8
+ const calculateActiveChunks = React.useCallback(() => {
9
+ const container = containerRef.current;
10
+ if (!container) {
11
+ return;
12
+ }
13
+ const { scrollTop, clientHeight } = container;
14
+ const visibleStartIndex = Math.floor(scrollTop / itemHeight);
15
+ const visibleEndIndex = Math.min(Math.ceil((scrollTop + clientHeight) / itemHeight), totalItems - 1);
16
+ const startChunk = Math.floor(visibleStartIndex / chunkSize);
17
+ const endChunk = Math.floor(visibleEndIndex / chunkSize);
18
+ const newActiveChunks = getArray(endChunk - startChunk + 1 + CHUNKS_AHEAD_COUNT).map((index) => startChunk + index);
19
+ setActiveChunks(newActiveChunks);
20
+ }, [chunkSize, containerRef, itemHeight, totalItems]);
21
+ const throttledCalculateActiveChunks = React.useMemo(() => throttle(calculateActiveChunks, THROTTLE_DELAY), [calculateActiveChunks]);
22
+ React.useEffect(() => {
23
+ const container = containerRef.current;
24
+ if (!container) {
25
+ return undefined;
26
+ }
27
+ container.addEventListener('scroll', throttledCalculateActiveChunks);
28
+ return () => {
29
+ container.removeEventListener('scroll', throttledCalculateActiveChunks);
30
+ throttledCalculateActiveChunks.cancel();
31
+ };
32
+ }, [containerRef, throttledCalculateActiveChunks]);
33
+ return activeChunks;
34
+ };
35
+ //# sourceMappingURL=useScrollBasedChunks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollBasedChunks.js","sourceRoot":"","sources":["../../../src/components/PaginatedTable/useScrollBasedChunks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAEhC,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e,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAEtD,MAAM,8BAA8B,GAAG,KAAK,CAAC,OAAO,CAChD,GAAG,EAAE,CAAC,QAAQ,CAAC,qBAAqB,EAAE,cAAc,CAAC,EACrD,CAAC,qBAAqB,CAAC,CAC1B,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,8BAA8B,CAAC,CAAC;QACrE,OAAO,GAAG,EAAE;YACR,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,8BAA8B,CAAC,CAAC;YACxE,8BAA8B,CAAC,MAAM,EAAE,CAAC;QAC5C,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,YAAY,EAAE,8BAA8B,CAAC,CAAC,CAAC;IAEnD,OAAO,YAAY,CAAC;AACxB,CAAC,CAAC"}
@@ -2,9 +2,9 @@ import type { TTabletStateInfo } from '../../types/api/tablet';
2
2
  import './TabletsStatistic.scss';
3
3
  interface TabletsStatisticProps {
4
4
  tablets: TTabletStateInfo[];
5
- path: string | undefined;
5
+ tenantName: string | undefined;
6
6
  nodeId: string | number;
7
7
  backend?: string;
8
8
  }
9
- export declare const TabletsStatistic: ({ tablets, path, nodeId, backend }: TabletsStatisticProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const TabletsStatistic: ({ tablets, tenantName, nodeId, backend, }: TabletsStatisticProps) => import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -18,11 +18,11 @@ const prepareTablets = (tablets) => {
18
18
  });
19
19
  return res.sort((x, y) => String(x.label).localeCompare(String(y.label)));
20
20
  };
21
- export const TabletsStatistic = ({ tablets = [], path, nodeId, backend }) => {
21
+ export const TabletsStatistic = ({ tablets = [], tenantName, nodeId, backend, }) => {
22
22
  const renderTabletInfo = (item, index) => {
23
23
  var _a;
24
24
  const tabletsPath = createHref(routes.node, { id: nodeId, activeTab: TABLETS }, {
25
- tenantName: path,
25
+ tenantName,
26
26
  backend,
27
27
  });
28
28
  const label = `${item.label}: ${item.count}`;
@@ -1 +1 @@
1
- {"version":3,"file":"TabletsStatistic.js","sourceRoot":"","sources":["../../../src/components/TabletsStatistic/TabletsStatistic.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAC,OAAO,EAAC,MAAM,iCAAiC,CAAC;AACxD,OAAO,MAAM,EAAE,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;AAE9D,OAAO,yBAAyB,CAAC;AAEjC,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,cAAc,GAAG,CAAC,OAA2B,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC/B,OAAO;YACH,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC;YAClC,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,0BAA0B,CAAC,MAAM,CAAC,KAAK,CAAC;SAClD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,MAAM,CA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ACV,CACJ,CAAC;QAEF,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;QAC7C,MAAM,SAAS,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW,EAAE,EAAC,CAAC,CAAC;QAElE,OAAO,OAAO,CAAC,CAAC,CAAC,CACb,YAAG,IAAI,EAAE,WAAW,EAAc,SAAS,EAAE,SAAS,YACjD,KAAK,IADiB,KAAK,CAE5B,CACP,CAAC,CAAC,CAAC,CACA,KAAC,IAAI,IAAC,EAAE,EAAE,WAAW,EAAc,SAAS,EAAE,SAAS,YAClD,KAAK,IADkB,KAAK,CAE1B,CACV,CAAC;IACN,CAAC,CAAC;IACF,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,cAAK,SAAS,EAAE,CAAC,EAAE,YAAG,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAO,CAAC;AAC9E,CAAC,CAAC"}
@@ -1,20 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { STRUCTURE } from '../../containers/Node/NodePages';
4
- import routes, { createHref, getVDiskPagePath } from '../../routes';
5
- import { useDiskPagesAvailable } from '../../store/reducers/capabilities/hooks';
6
- import { valueIsDefined } from '../../utils';
7
3
  import { cn } from '../../utils/cn';
8
- import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
9
- import { isFullVDiskData } from '../../utils/disks/helpers';
10
4
  import { DiskStateProgressBar } from '../DiskStateProgressBar/DiskStateProgressBar';
11
5
  import { InternalLink } from '../InternalLink';
12
6
  import { VDiskPopup } from '../VDiskPopup/VDiskPopup';
7
+ import { getVDiskLink } from './utils';
13
8
  import './VDisk.scss';
14
9
  const b = cn('ydb-vdisk-component');
15
10
  export const VDisk = ({ data = {}, compact, inactive, showPopup, onShowPopup, onHidePopup, progressBarClassName, }) => {
16
- const isFullData = isFullVDiskData(data);
17
- const diskPagesAvailable = useDiskPagesAvailable();
18
11
  const [isPopupVisible, setIsPopupVisible] = React.useState(false);
19
12
  const anchor = React.useRef(null);
20
13
  const handleShowPopup = () => {
@@ -25,19 +18,7 @@ export const VDisk = ({ data = {}, compact, inactive, showPopup, onShowPopup, on
25
18
  setIsPopupVisible(false);
26
19
  onHidePopup === null || onHidePopup === void 0 ? void 0 : onHidePopup();
27
20
  };
28
- let vDiskPath;
29
- if (diskPagesAvailable &&
30
- valueIsDefined(data.VDiskSlotId) &&
31
- valueIsDefined(data.PDiskId) &&
32
- valueIsDefined(data.NodeId)) {
33
- vDiskPath = getVDiskPagePath(data.VDiskSlotId, data.PDiskId, data.NodeId);
34
- }
35
- else if (valueIsDefined(data.NodeId) && isFullData) {
36
- vDiskPath = createHref(routes.node, { id: data.NodeId, activeTab: STRUCTURE }, {
37
- pdiskId: data.PDiskId,
38
- vdiskId: stringifyVdiskId(data.VDiskId),
39
- });
40
- }
21
+ const vDiskPath = getVDiskLink(data);
41
22
  return (_jsxs(React.Fragment, { children: [_jsx("div", { className: b(), ref: anchor, onMouseEnter: handleShowPopup, onMouseLeave: handleHidePopup, children: _jsx(InternalLink, { to: vDiskPath, className: b('content'), children: _jsx(DiskStateProgressBar, { diskAllocatedPercent: data.AllocatedPercent, severity: data.Severity, compact: compact, inactive: inactive, className: progressBarClassName }) }) }), _jsx(VDiskPopup, { data: data, anchorRef: anchor, open: isPopupVisible || showPopup })] }));
42
23
  };
43
24
  //# sourceMappingURL=VDisk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VDisk.js","sourceRoot":"","sources":["../../../src/components/VDisk/VDisk.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,MAAM,EAAE,EAAC,UAAU,EAAE,gBAAgB,E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E,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAChD,KAAC,oBAAoB,IACjB,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,EAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,oBAAoB,GACjC,GACS,GACb,EACN,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,IAAI,SAAS,GAAI,IACnE,CACpB,CAAC;AACN,CAAC,CAAC"}
@@ -2,6 +2,8 @@
2
2
  border-radius: 4px; // to match interactive area with disk shape
3
3
 
4
4
  &__content {
5
+ display: block;
6
+
5
7
  border-radius: 4px; // to match interactive area with disk shape
6
8
  }
7
9
  }
@@ -4,8 +4,8 @@ import { isFullVDiskData } from '../../utils/disks/helpers';
4
4
  import { Stack } from '../Stack/Stack';
5
5
  import { VDisk } from './VDisk';
6
6
  export function VDiskWithDonorsStack({ data, className, stackClassName, ...restProps }) {
7
- const donors = data === null || data === void 0 ? void 0 : data.Donors;
8
- const content = donors && donors.length > 0 ? (_jsxs(Stack, { className: stackClassName, children: [_jsx(VDisk, { data: data, ...restProps }), donors.map((donor) => {
7
+ const { Donors: donors, ...restData } = data || {};
8
+ const content = donors && donors.length > 0 ? (_jsxs(Stack, { className: stackClassName, children: [_jsx(VDisk, { data: restData, ...restProps }), donors.map((donor) => {
9
9
  const isFullData = isFullVDiskData(donor);
10
10
  // donor and acceptor are always in the same group
11
11
  return (_jsx(VDisk, { data: donor, ...restProps }, stringifyVdiskId(isFullData ? donor.VDiskId : donor)));
@@ -1 +1 @@
1
- {"version":3,"file":"VDiskWithDonorsStack.js","sourceRoot":"","sources":["../../../src/components/VDisk/VDiskWithDonorsStack.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAC3E,OAA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gBAAgB,CAAC;AAGrC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAQ9B,MAAM,UAAU,oBAAoB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,cAAc,EACd,GAAG,SAAS,EACY;IACxB,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAC,GAAG,IAAI,IAAI,EAAE,CAAC;IAEjD,MAAM,OAAO,GACT,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC1B,MAAC,KAAK,IAAC,SAAS,EAAE,cAAc,aAC5B,KAAC,KAAK,IAAC,IAAI,EAAE,QAAQ,KAAM,SAAS,GAAI,EACvC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBAClB,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;gBAE1C,kDAAkD;gBAClD,OAAO,CACH,KAAC,KAAK,IAEF,IAAI,EAAE,KAAK,KACP,SAAS,IAFR,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAG3D,CACL,CAAC;YACN,CAAC,CAAC,IACE,CACX,CAAC,CAAC,CAAC,CACA,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,KAAM,SAAS,GAAI,CACvC,CAAC;IAEN,OAAO,cAAK,SAAS,EAAE,SAAS,YAAG,OAAO,GAAO,CAAC;AACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { TVDiskStateInfo, TVSlotId } from '../../types/api/vdisk';
2
+ export declare function getVDiskLink(data: TVDiskStateInfo | TVSlotId): string | undefined;
@@ -0,0 +1,23 @@
1
+ import { STRUCTURE } from '../../containers/Node/NodePages';
2
+ import routes, { createHref, getVDiskPagePath } from '../../routes';
3
+ import { valueIsDefined } from '../../utils';
4
+ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
5
+ import { isFullVDiskData } from '../../utils/disks/helpers';
6
+ export function getVDiskLink(data) {
7
+ let vDiskPath;
8
+ const isFullData = isFullVDiskData(data);
9
+ const VDiskSlotId = isFullData ? data.VDiskSlotId : data.VSlotId;
10
+ if (valueIsDefined(VDiskSlotId) &&
11
+ valueIsDefined(data.PDiskId) &&
12
+ valueIsDefined(data.NodeId)) {
13
+ vDiskPath = getVDiskPagePath(VDiskSlotId, data.PDiskId, data.NodeId);
14
+ }
15
+ else if (valueIsDefined(data.NodeId) && isFullVDiskData(data)) {
16
+ vDiskPath = createHref(routes.node, { id: data.NodeId, activeTab: STRUCTURE }, {
17
+ pdiskId: data.PDiskId,
18
+ vdiskId: stringifyVdiskId(data.VDiskId),
19
+ });
20
+ }
21
+ return vDiskPath;
22
+ }
23
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/VDisk/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,MAAM,EAAE,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAElE,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,MAAM,UAAU,YAAY,CAAC,IAAgC;IACzD,IAAI,SAA6B,CAAC;IAElC,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAEjE,IACI,cAAc,CAAC,WAAW,CAAC;QAC3B,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAC7B,CAAC;QACC,SAAS,GAAG,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9D,SAAS,GAAG,UAAU,CAClB,MAAM,CAAC,IAAI,EACX,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAC,EACvC;YACI,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC;SAC1C,CACJ,CAAC;IACN,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -3,7 +3,7 @@ import { getVDiskPagePath } from '../../routes';
3
3
  import { selectIsUserAllowedToMakeChanges } from '../../store/reducers/authentication/authentication';
4
4
  import { valueIsDefined } from '../../utils';
5
5
  import { cn } from '../../utils/cn';
6
- import { formatStorageValuesToGb, stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters';
6
+ import { formatStorageValuesToGb } from '../../utils/dataFormatters/dataFormatters';
7
7
  import { createVDiskDeveloperUILink } from '../../utils/developerUI/developerUI';
8
8
  import { getSeverityColor } from '../../utils/disks/helpers';
9
9
  import { useTypedSelector } from '../../utils/hooks';
@@ -125,6 +125,6 @@ export function VDiskInfo({ data, withVDiskPageLink, withTitle, ...infoViewerPro
125
125
  return _jsx(InfoViewer, { info: vdiskInfo, title: title, ...infoViewerProps });
126
126
  }
127
127
  function VDiskTitle({ data }) {
128
- return (_jsxs("div", { className: b('title'), children: [vDiskInfoKeyset('vdiks-title'), _jsx(EntityStatus, { status: getSeverityColor(data.Severity), name: stringifyVdiskId(data.VDiskId) })] }));
128
+ return (_jsxs("div", { className: b('title'), children: [vDiskInfoKeyset('vdiks-title'), _jsx(EntityStatus, { status: getSeverityColor(data.Severity), name: data.StringifiedId })] }));
129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AAC,cAAc,CAAC,EACtC,GAAG,EAAE,uBAAuB,IAFvB,uBAAuB,CAG9B,CACL,CAAC;QACN,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACf,SAAS,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC;gBAC/B,KAAK,EAAE,cAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YAAG,KAAK,GAAO;aACnD,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAEpE,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,eAAe,GAAI,CAAC;AAC9E,CAAC;AAMD,SAAS,UAAU,CAA0B,EAAC,IAAI,EAAqB;IACnE,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,aACrB,eAAe,CAAC,aAAa,CAAC,EAC/B,KAAC,YAAY,IAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,GAAI,IACjF,CACT,CAAC;AACN,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import type { PopupProps } from '@gravity-ui/uikit';
2
- import type { TVDiskStateInfo } from '../../types/api/vdisk';
3
- import type { UnavailableDonor } from '../../utils/disks/types';
2
+ import type { PreparedVDisk, UnavailableDonor } from '../../utils/disks/types';
4
3
  import './VDiskPopup.scss';
5
4
  interface VDiskPopupProps extends PopupProps {
6
- data: TVDiskStateInfo | UnavailableDonor;
5
+ data: PreparedVDisk | UnavailableDonor;
7
6
  }
8
7
  export declare const VDiskPopup: ({ data, ...props }: VDiskPopupProps) => import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -11,7 +11,9 @@ import { isFullVDiskData } from '../../utils/disks/helpers';
11
11
  import { useTypedSelector } from '../../utils/hooks';
12
12
  import { bytesToGB, bytesToSpeed } from '../../utils/utils';
13
13
  import { InfoViewer } from '../InfoViewer';
14
+ import { InternalLink } from '../InternalLink';
14
15
  import { preparePDiskData } from '../PDiskPopup/PDiskPopup';
16
+ import { getVDiskLink } from '../VDisk/utils';
15
17
  import './VDiskPopup.scss';
16
18
  const b = cn('vdisk-storage-popup');
17
19
  const prepareUnavailableVDiskData = (data) => {
@@ -25,9 +27,9 @@ const prepareUnavailableVDiskData = (data) => {
25
27
  };
26
28
  const prepareVDiskData = (data) => {
27
29
  var _a, _b, _c, _d, _e, _f;
28
- const { VDiskId, VDiskState, SatisfactionRank, DiskSpace, FrontQueues, Replicated, UnsyncedVDisks, AllocatedSize, ReadThroughput, WriteThroughput, StoragePoolName, } = data;
30
+ const { StringifiedId, VDiskState, SatisfactionRank, DiskSpace, FrontQueues, Replicated, UnsyncedVDisks, AllocatedSize, ReadThroughput, WriteThroughput, StoragePoolName, } = data;
29
31
  const vdiskData = [
30
- { label: 'VDisk', value: stringifyVdiskId(VDiskId) },
32
+ { label: 'VDisk', value: StringifiedId },
31
33
  { label: 'State', value: VDiskState !== null && VDiskState !== void 0 ? VDiskState : 'not available' },
32
34
  ];
33
35
  if (StoragePoolName) {
@@ -92,9 +94,26 @@ export const VDiskPopup = ({ data, ...props }) => {
92
94
  const nodeHostsMap = useTypedSelector(selectNodeHostsMap);
93
95
  const nodeHost = valueIsDefined(data.NodeId) ? nodeHostsMap === null || nodeHostsMap === void 0 ? void 0 : nodeHostsMap.get(data.NodeId) : undefined;
94
96
  const pdiskInfo = React.useMemo(() => isFullData && data.PDisk && preparePDiskData(data.PDisk, nodeHost), [data, nodeHost, isFullData]);
97
+ const donorsInfo = [];
98
+ if ('Donors' in data && data.Donors) {
99
+ const donors = data.Donors;
100
+ for (const donor of donors) {
101
+ const isFullDonorData = isFullVDiskData(donor);
102
+ donorsInfo.push({
103
+ label: 'VDisk',
104
+ value: (_jsx(InternalLink, { to: getVDiskLink(donor), children: stringifyVdiskId(isFullDonorData
105
+ ? donor.VDiskId
106
+ : {
107
+ NodeId: donor.NodeId,
108
+ PDiskId: donor.PDiskId,
109
+ VSlotId: donor.VSlotId,
110
+ }) })),
111
+ });
112
+ }
113
+ }
95
114
  return (_jsxs(Popup, { contentClassName: b(), placement: ['top', 'bottom'], hasArrow: true,
96
115
  // bigger offset for easier switching to neighbour nodes
97
116
  // matches the default offset for popup with arrow out of a sense of beauty
98
- offset: [0, 12], ...props, children: [data.DonorMode && _jsx(Label, { className: b('donor-label'), children: "Donor" }), _jsx(InfoViewer, { title: "VDisk", info: vdiskInfo, size: "s" }), pdiskInfo && _jsx(InfoViewer, { title: "PDisk", info: pdiskInfo, size: "s" })] }));
117
+ offset: [0, 12], ...props, children: [data.DonorMode && _jsx(Label, { className: b('donor-label'), children: "Donor" }), _jsx(InfoViewer, { title: "VDisk", info: vdiskInfo, size: "s" }), pdiskInfo && _jsx(InfoViewer, { title: "PDisk", info: pdiskInfo, size: "s" }), donorsInfo.length > 0 && _jsx(InfoViewer, { title: "Donors", info: donorsInfo, size: "s" })] }));
99
118
  };
100
119
  //# sourceMappingURL=VDiskPopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VDiskPopup.js","sourceRoot":"","sources":["../../../src/components/VDiskPopup/VDiskPopup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAC,KAAK,EAAC,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,sBAAsB,EAAC,MAAM,u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