@gravity-ui/querieskit 1.5.1 → 1.6.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 (338) hide show
  1. package/README.md +28 -0
  2. package/build/cjs/components/QueryGraph/QueryGraph.css +70 -0
  3. package/build/cjs/components/QueryGraph/QueryGraph.css.map +1 -0
  4. package/build/cjs/components/QueryGraph/QueryGraph.d.ts +4 -0
  5. package/build/cjs/components/QueryGraph/QueryGraph.js +517 -0
  6. package/build/cjs/components/QueryGraph/QueryGraph.js.map +1 -0
  7. package/build/cjs/components/QueryGraph/QueryGraph.stories.d.ts +16 -0
  8. package/build/cjs/components/QueryGraph/QueryGraph.stories.js +339 -0
  9. package/build/cjs/components/QueryGraph/QueryGraph.stories.js.map +1 -0
  10. package/build/cjs/components/QueryGraph/helpers/layout.d.ts +9 -0
  11. package/build/cjs/components/QueryGraph/helpers/layout.js +138 -0
  12. package/build/cjs/components/QueryGraph/helpers/layout.js.map +1 -0
  13. package/build/cjs/components/QueryGraph/helpers/presentation.d.ts +18 -0
  14. package/build/cjs/components/QueryGraph/helpers/presentation.js +44 -0
  15. package/build/cjs/components/QueryGraph/helpers/presentation.js.map +1 -0
  16. package/build/cjs/components/QueryGraph/i18n/dicts.d.ts +55 -0
  17. package/build/cjs/components/QueryGraph/i18n/dicts.js +14 -0
  18. package/build/cjs/components/QueryGraph/i18n/dicts.js.map +1 -0
  19. package/build/cjs/components/QueryGraph/i18n/en.json +26 -0
  20. package/build/cjs/components/QueryGraph/i18n/index.d.ts +6 -0
  21. package/build/cjs/components/QueryGraph/i18n/index.js +11 -0
  22. package/build/cjs/components/QueryGraph/i18n/index.js.map +1 -0
  23. package/build/cjs/components/QueryGraph/i18n/ru.json +26 -0
  24. package/build/cjs/components/QueryGraph/index.d.ts +2 -0
  25. package/build/cjs/components/QueryGraph/index.js +13 -0
  26. package/build/cjs/components/QueryGraph/index.js.map +1 -0
  27. package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.d.ts +24 -0
  28. package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.js +307 -0
  29. package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.js.map +1 -0
  30. package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.d.ts +5 -0
  31. package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.js +242 -0
  32. package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.js.map +1 -0
  33. package/build/cjs/components/QueryGraph/internal/queryGraphIcons.d.ts +12 -0
  34. package/build/cjs/components/QueryGraph/internal/queryGraphIcons.js +161 -0
  35. package/build/cjs/components/QueryGraph/internal/queryGraphIcons.js.map +1 -0
  36. package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.d.ts +22 -0
  37. package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.js +60 -0
  38. package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.js.map +1 -0
  39. package/build/cjs/components/QueryGraph/story/largeGraphData.d.ts +3 -0
  40. package/build/cjs/components/QueryGraph/story/largeGraphData.js +227 -0
  41. package/build/cjs/components/QueryGraph/story/largeGraphData.js.map +1 -0
  42. package/build/cjs/components/index.d.ts +2 -0
  43. package/build/cjs/components/index.js +9 -1
  44. package/build/cjs/components/index.js.map +1 -1
  45. package/build/cjs/helpers/buildColumnsFromKeys.d.ts +1 -1
  46. package/build/cjs/helpers/buildColumnsFromKeys.js.map +1 -1
  47. package/build/cjs/index.d.ts +1 -0
  48. package/build/cjs/index.js +11 -0
  49. package/build/cjs/index.js.map +1 -1
  50. package/build/cjs/modules/ClustersList/ClustersList.d.ts +1 -1
  51. package/build/cjs/modules/ClustersList/ClustersList.js +4 -3
  52. package/build/cjs/modules/ClustersList/ClustersList.js.map +1 -1
  53. package/build/cjs/modules/HistoryHeader/HistoryHeader.js +4 -3
  54. package/build/cjs/modules/HistoryHeader/HistoryHeader.js.map +1 -1
  55. package/build/cjs/modules/HistoryRow/HistoryRow.js +12 -7
  56. package/build/cjs/modules/HistoryRow/HistoryRow.js.map +1 -1
  57. package/build/cjs/modules/HistorySearchRow/HistorySearchRow.js +8 -5
  58. package/build/cjs/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
  59. package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.d.ts +1 -1
  60. package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js +5 -5
  61. package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js.map +1 -1
  62. package/build/cjs/modules/NavigationDetail/NavigationDetail.d.ts +1 -1
  63. package/build/cjs/modules/NavigationDetail/NavigationDetail.js +2 -2
  64. package/build/cjs/modules/NavigationDetail/NavigationDetail.js.map +1 -1
  65. package/build/cjs/modules/NavigationHeader/NavigationHeader.d.ts +1 -1
  66. package/build/cjs/modules/NavigationHeader/NavigationHeader.js +2 -2
  67. package/build/cjs/modules/NavigationHeader/NavigationHeader.js.map +1 -1
  68. package/build/cjs/modules/NavigationItemsList/NavigationItemsList.d.ts +1 -1
  69. package/build/cjs/modules/NavigationItemsList/NavigationItemsList.js +4 -3
  70. package/build/cjs/modules/NavigationItemsList/NavigationItemsList.js.map +1 -1
  71. package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.d.ts +1 -1
  72. package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js +2 -2
  73. package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js.map +1 -1
  74. package/build/cjs/modules/NavigationMeta/NavigationMeta.js +4 -3
  75. package/build/cjs/modules/NavigationMeta/NavigationMeta.js.map +1 -1
  76. package/build/cjs/modules/NavigationMeta/i18n/index.d.ts +2 -2
  77. package/build/cjs/modules/NavigationPreview/NavigationPreview.d.ts +1 -1
  78. package/build/cjs/modules/NavigationPreview/NavigationPreview.js +6 -4
  79. package/build/cjs/modules/NavigationPreview/NavigationPreview.js.map +1 -1
  80. package/build/cjs/modules/NavigationPreview/helpers/buildPreviewColumns.d.ts +1 -1
  81. package/build/cjs/modules/NavigationPreview/helpers/buildPreviewColumns.js.map +1 -1
  82. package/build/cjs/modules/NavigationSchema/NavigationSchema.d.ts +1 -1
  83. package/build/cjs/modules/NavigationSchema/NavigationSchema.js +4 -3
  84. package/build/cjs/modules/NavigationSchema/NavigationSchema.js.map +1 -1
  85. package/build/cjs/modules/NavigationSchema/helpers/buildSchemaColumns.d.ts +1 -1
  86. package/build/cjs/modules/NavigationSchema/helpers/buildSchemaColumns.js.map +1 -1
  87. package/build/cjs/modules/NavigationView/NavigationView.d.ts +1 -1
  88. package/build/cjs/modules/NavigationView/NavigationView.js +4 -3
  89. package/build/cjs/modules/NavigationView/NavigationView.js.map +1 -1
  90. package/build/cjs/modules/NavigationView/helpers/buildViewColumns.d.ts +1 -1
  91. package/build/cjs/modules/NavigationView/helpers/buildViewColumns.js.map +1 -1
  92. package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.d.ts +1 -1
  93. package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.js +4 -3
  94. package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.js.map +1 -1
  95. package/build/cjs/modules/QueriesList/QueriesList.js +2 -2
  96. package/build/cjs/modules/QueriesList/QueriesList.js.map +1 -1
  97. package/build/cjs/modules/QueryProgress/QueryProgress.css +64 -0
  98. package/build/cjs/modules/QueryProgress/QueryProgress.css.map +1 -0
  99. package/build/cjs/modules/QueryProgress/QueryProgress.d.ts +4 -0
  100. package/build/cjs/modules/QueryProgress/QueryProgress.js +135 -0
  101. package/build/cjs/modules/QueryProgress/QueryProgress.js.map +1 -0
  102. package/build/cjs/modules/QueryProgress/QueryProgress.stories.d.ts +7 -0
  103. package/build/cjs/modules/QueryProgress/QueryProgress.stories.js +38 -0
  104. package/build/cjs/modules/QueryProgress/QueryProgress.stories.js.map +1 -0
  105. package/build/cjs/modules/QueryProgress/i18n/dicts.d.ts +25 -0
  106. package/build/cjs/modules/QueryProgress/i18n/dicts.js +14 -0
  107. package/build/cjs/modules/QueryProgress/i18n/dicts.js.map +1 -0
  108. package/build/cjs/modules/QueryProgress/i18n/en.json +11 -0
  109. package/build/cjs/modules/QueryProgress/i18n/index.d.ts +6 -0
  110. package/build/cjs/modules/QueryProgress/i18n/index.js +11 -0
  111. package/build/cjs/modules/QueryProgress/i18n/index.js.map +1 -0
  112. package/build/cjs/modules/QueryProgress/i18n/ru.json +11 -0
  113. package/build/cjs/modules/QueryProgress/index.d.ts +2 -0
  114. package/build/cjs/modules/QueryProgress/index.js +13 -0
  115. package/build/cjs/modules/QueryProgress/index.js.map +1 -0
  116. package/build/cjs/modules/QueryStatistics/i18n/index.d.ts +2 -2
  117. package/build/cjs/modules/RowsList/RowsList.js +4 -3
  118. package/build/cjs/modules/RowsList/RowsList.js.map +1 -1
  119. package/build/cjs/modules/SavedQueryRow/SavedQueryRow.d.ts +2 -2
  120. package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js +6 -4
  121. package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js.map +1 -1
  122. package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +2 -2
  123. package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +4 -3
  124. package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -1
  125. package/build/cjs/modules/TutorialRow/TutorialRow.d.ts +1 -1
  126. package/build/cjs/modules/TutorialRow/TutorialRow.js +2 -2
  127. package/build/cjs/modules/TutorialRow/TutorialRow.js.map +1 -1
  128. package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.d.ts +1 -1
  129. package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.js +4 -3
  130. package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.js.map +1 -1
  131. package/build/cjs/modules/index.d.ts +2 -0
  132. package/build/cjs/modules/index.js +8 -0
  133. package/build/cjs/modules/index.js.map +1 -1
  134. package/build/cjs/types/queryGraph.d.ts +87 -0
  135. package/build/cjs/types/queryGraph.js +6 -0
  136. package/build/cjs/types/queryGraph.js.map +1 -0
  137. package/build/cjs/widgets/DashboardCharts/DashboardCharts.js +8 -6
  138. package/build/cjs/widgets/DashboardCharts/DashboardCharts.js.map +1 -1
  139. package/build/cjs/widgets/DashboardCharts/types.d.ts +3 -3
  140. package/build/cjs/widgets/DashboardCharts/types.js.map +1 -1
  141. package/build/cjs/widgets/QueriesHistory/QueriesHistory.js +2 -2
  142. package/build/cjs/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
  143. package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.js +6 -5
  144. package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -1
  145. package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.d.ts +1 -1
  146. package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.js +13 -9
  147. package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.js.map +1 -1
  148. package/build/cjs/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js +2 -2
  149. package/build/cjs/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js.map +1 -1
  150. package/build/cjs/widgets/QueriesNavigation/helpers/createTableDetailConfig.js +8 -5
  151. package/build/cjs/widgets/QueriesNavigation/helpers/createTableDetailConfig.js.map +1 -1
  152. package/build/cjs/widgets/QueryResults/QueryResults.js +2 -2
  153. package/build/cjs/widgets/QueryResults/QueryResults.js.map +1 -1
  154. package/build/cjs/widgets/QueryResults/i18n/index.d.ts +2 -2
  155. package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js +4 -3
  156. package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -1
  157. package/build/cjs/widgets/SavedQueries/SavedQueries.d.ts +2 -2
  158. package/build/cjs/widgets/SavedQueries/SavedQueries.js +2 -2
  159. package/build/cjs/widgets/SavedQueries/SavedQueries.js.map +1 -1
  160. package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.d.ts +2 -2
  161. package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js +6 -5
  162. package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -1
  163. package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
  164. package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js +6 -5
  165. package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
  166. package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.d.ts +2 -2
  167. package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js +6 -4
  168. package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
  169. package/build/esm/components/QueryGraph/QueryGraph.css +70 -0
  170. package/build/esm/components/QueryGraph/QueryGraph.css.map +1 -0
  171. package/build/esm/components/QueryGraph/QueryGraph.d.ts +4 -0
  172. package/build/esm/components/QueryGraph/QueryGraph.js +510 -0
  173. package/build/esm/components/QueryGraph/QueryGraph.js.map +1 -0
  174. package/build/esm/components/QueryGraph/QueryGraph.scss +81 -0
  175. package/build/esm/components/QueryGraph/QueryGraph.stories.d.ts +16 -0
  176. package/build/esm/components/QueryGraph/QueryGraph.stories.js +331 -0
  177. package/build/esm/components/QueryGraph/QueryGraph.stories.js.map +1 -0
  178. package/build/esm/components/QueryGraph/helpers/layout.d.ts +9 -0
  179. package/build/esm/components/QueryGraph/helpers/layout.js +128 -0
  180. package/build/esm/components/QueryGraph/helpers/layout.js.map +1 -0
  181. package/build/esm/components/QueryGraph/helpers/presentation.d.ts +18 -0
  182. package/build/esm/components/QueryGraph/helpers/presentation.js +35 -0
  183. package/build/esm/components/QueryGraph/helpers/presentation.js.map +1 -0
  184. package/build/esm/components/QueryGraph/i18n/dicts.d.ts +55 -0
  185. package/build/esm/components/QueryGraph/i18n/dicts.js +7 -0
  186. package/build/esm/components/QueryGraph/i18n/dicts.js.map +1 -0
  187. package/build/esm/components/QueryGraph/i18n/en.json +26 -0
  188. package/build/esm/components/QueryGraph/i18n/index.d.ts +6 -0
  189. package/build/esm/components/QueryGraph/i18n/index.js +4 -0
  190. package/build/esm/components/QueryGraph/i18n/index.js.map +1 -0
  191. package/build/esm/components/QueryGraph/i18n/ru.json +26 -0
  192. package/build/esm/components/QueryGraph/index.d.ts +2 -0
  193. package/build/esm/components/QueryGraph/index.js +2 -0
  194. package/build/esm/components/QueryGraph/index.js.map +1 -0
  195. package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.d.ts +24 -0
  196. package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.js +299 -0
  197. package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.js.map +1 -0
  198. package/build/esm/components/QueryGraph/internal/QueryGraphPopup.d.ts +5 -0
  199. package/build/esm/components/QueryGraph/internal/QueryGraphPopup.js +234 -0
  200. package/build/esm/components/QueryGraph/internal/QueryGraphPopup.js.map +1 -0
  201. package/build/esm/components/QueryGraph/internal/queryGraphIcons.d.ts +12 -0
  202. package/build/esm/components/QueryGraph/internal/queryGraphIcons.js +150 -0
  203. package/build/esm/components/QueryGraph/internal/queryGraphIcons.js.map +1 -0
  204. package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.d.ts +22 -0
  205. package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.js +53 -0
  206. package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.js.map +1 -0
  207. package/build/esm/components/QueryGraph/story/largeGraphData.d.ts +3 -0
  208. package/build/esm/components/QueryGraph/story/largeGraphData.js +220 -0
  209. package/build/esm/components/QueryGraph/story/largeGraphData.js.map +1 -0
  210. package/build/esm/components/index.d.ts +2 -0
  211. package/build/esm/components/index.js +1 -0
  212. package/build/esm/components/index.js.map +1 -1
  213. package/build/esm/helpers/buildColumnsFromKeys.d.ts +1 -1
  214. package/build/esm/helpers/buildColumnsFromKeys.js.map +1 -1
  215. package/build/esm/index.d.ts +1 -0
  216. package/build/esm/index.js +1 -0
  217. package/build/esm/index.js.map +1 -1
  218. package/build/esm/modules/ClustersList/ClustersList.d.ts +1 -1
  219. package/build/esm/modules/ClustersList/ClustersList.js +2 -1
  220. package/build/esm/modules/ClustersList/ClustersList.js.map +1 -1
  221. package/build/esm/modules/HistoryHeader/HistoryHeader.js +2 -1
  222. package/build/esm/modules/HistoryHeader/HistoryHeader.js.map +1 -1
  223. package/build/esm/modules/HistoryRow/HistoryRow.js +6 -1
  224. package/build/esm/modules/HistoryRow/HistoryRow.js.map +1 -1
  225. package/build/esm/modules/HistorySearchRow/HistorySearchRow.js +4 -1
  226. package/build/esm/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
  227. package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.d.ts +1 -1
  228. package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js +1 -1
  229. package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js.map +1 -1
  230. package/build/esm/modules/NavigationDetail/NavigationDetail.d.ts +1 -1
  231. package/build/esm/modules/NavigationDetail/NavigationDetail.js +1 -1
  232. package/build/esm/modules/NavigationDetail/NavigationDetail.js.map +1 -1
  233. package/build/esm/modules/NavigationHeader/NavigationHeader.d.ts +1 -1
  234. package/build/esm/modules/NavigationHeader/NavigationHeader.js +1 -1
  235. package/build/esm/modules/NavigationHeader/NavigationHeader.js.map +1 -1
  236. package/build/esm/modules/NavigationItemsList/NavigationItemsList.d.ts +1 -1
  237. package/build/esm/modules/NavigationItemsList/NavigationItemsList.js +2 -1
  238. package/build/esm/modules/NavigationItemsList/NavigationItemsList.js.map +1 -1
  239. package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.d.ts +1 -1
  240. package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js +1 -1
  241. package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js.map +1 -1
  242. package/build/esm/modules/NavigationMeta/NavigationMeta.js +2 -1
  243. package/build/esm/modules/NavigationMeta/NavigationMeta.js.map +1 -1
  244. package/build/esm/modules/NavigationMeta/i18n/index.d.ts +2 -2
  245. package/build/esm/modules/NavigationPreview/NavigationPreview.d.ts +1 -1
  246. package/build/esm/modules/NavigationPreview/NavigationPreview.js +3 -1
  247. package/build/esm/modules/NavigationPreview/NavigationPreview.js.map +1 -1
  248. package/build/esm/modules/NavigationPreview/helpers/buildPreviewColumns.d.ts +1 -1
  249. package/build/esm/modules/NavigationPreview/helpers/buildPreviewColumns.js.map +1 -1
  250. package/build/esm/modules/NavigationSchema/NavigationSchema.d.ts +1 -1
  251. package/build/esm/modules/NavigationSchema/NavigationSchema.js +2 -1
  252. package/build/esm/modules/NavigationSchema/NavigationSchema.js.map +1 -1
  253. package/build/esm/modules/NavigationSchema/helpers/buildSchemaColumns.d.ts +1 -1
  254. package/build/esm/modules/NavigationSchema/helpers/buildSchemaColumns.js.map +1 -1
  255. package/build/esm/modules/NavigationView/NavigationView.d.ts +1 -1
  256. package/build/esm/modules/NavigationView/NavigationView.js +2 -1
  257. package/build/esm/modules/NavigationView/NavigationView.js.map +1 -1
  258. package/build/esm/modules/NavigationView/helpers/buildViewColumns.d.ts +1 -1
  259. package/build/esm/modules/NavigationView/helpers/buildViewColumns.js.map +1 -1
  260. package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.d.ts +1 -1
  261. package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.js +2 -1
  262. package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.js.map +1 -1
  263. package/build/esm/modules/QueriesList/QueriesList.js +1 -1
  264. package/build/esm/modules/QueriesList/QueriesList.js.map +1 -1
  265. package/build/esm/modules/QueryProgress/QueryProgress.css +64 -0
  266. package/build/esm/modules/QueryProgress/QueryProgress.css.map +1 -0
  267. package/build/esm/modules/QueryProgress/QueryProgress.d.ts +4 -0
  268. package/build/esm/modules/QueryProgress/QueryProgress.js +127 -0
  269. package/build/esm/modules/QueryProgress/QueryProgress.js.map +1 -0
  270. package/build/esm/modules/QueryProgress/QueryProgress.scss +72 -0
  271. package/build/esm/modules/QueryProgress/QueryProgress.stories.d.ts +7 -0
  272. package/build/esm/modules/QueryProgress/QueryProgress.stories.js +31 -0
  273. package/build/esm/modules/QueryProgress/QueryProgress.stories.js.map +1 -0
  274. package/build/esm/modules/QueryProgress/i18n/dicts.d.ts +25 -0
  275. package/build/esm/modules/QueryProgress/i18n/dicts.js +7 -0
  276. package/build/esm/modules/QueryProgress/i18n/dicts.js.map +1 -0
  277. package/build/esm/modules/QueryProgress/i18n/en.json +11 -0
  278. package/build/esm/modules/QueryProgress/i18n/index.d.ts +6 -0
  279. package/build/esm/modules/QueryProgress/i18n/index.js +4 -0
  280. package/build/esm/modules/QueryProgress/i18n/index.js.map +1 -0
  281. package/build/esm/modules/QueryProgress/i18n/ru.json +11 -0
  282. package/build/esm/modules/QueryProgress/index.d.ts +2 -0
  283. package/build/esm/modules/QueryProgress/index.js +2 -0
  284. package/build/esm/modules/QueryProgress/index.js.map +1 -0
  285. package/build/esm/modules/QueryStatistics/i18n/index.d.ts +2 -2
  286. package/build/esm/modules/RowsList/RowsList.js +2 -1
  287. package/build/esm/modules/RowsList/RowsList.js.map +1 -1
  288. package/build/esm/modules/SavedQueryRow/SavedQueryRow.d.ts +2 -2
  289. package/build/esm/modules/SavedQueryRow/SavedQueryRow.js +3 -1
  290. package/build/esm/modules/SavedQueryRow/SavedQueryRow.js.map +1 -1
  291. package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +2 -2
  292. package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +2 -1
  293. package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -1
  294. package/build/esm/modules/TutorialRow/TutorialRow.d.ts +1 -1
  295. package/build/esm/modules/TutorialRow/TutorialRow.js +1 -1
  296. package/build/esm/modules/TutorialRow/TutorialRow.js.map +1 -1
  297. package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.d.ts +1 -1
  298. package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.js +2 -1
  299. package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.js.map +1 -1
  300. package/build/esm/modules/index.d.ts +2 -0
  301. package/build/esm/modules/index.js +1 -0
  302. package/build/esm/modules/index.js.map +1 -1
  303. package/build/esm/types/queryGraph.d.ts +87 -0
  304. package/build/esm/types/queryGraph.js +2 -0
  305. package/build/esm/types/queryGraph.js.map +1 -0
  306. package/build/esm/widgets/DashboardCharts/DashboardCharts.js +4 -2
  307. package/build/esm/widgets/DashboardCharts/DashboardCharts.js.map +1 -1
  308. package/build/esm/widgets/DashboardCharts/types.d.ts +3 -3
  309. package/build/esm/widgets/DashboardCharts/types.js.map +1 -1
  310. package/build/esm/widgets/QueriesHistory/QueriesHistory.js +1 -1
  311. package/build/esm/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
  312. package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.js +3 -2
  313. package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -1
  314. package/build/esm/widgets/QueriesNavigation/QueriesNavigation.d.ts +1 -1
  315. package/build/esm/widgets/QueriesNavigation/QueriesNavigation.js +6 -2
  316. package/build/esm/widgets/QueriesNavigation/QueriesNavigation.js.map +1 -1
  317. package/build/esm/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js +1 -1
  318. package/build/esm/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js.map +1 -1
  319. package/build/esm/widgets/QueriesNavigation/helpers/createTableDetailConfig.js +4 -1
  320. package/build/esm/widgets/QueriesNavigation/helpers/createTableDetailConfig.js.map +1 -1
  321. package/build/esm/widgets/QueryResults/QueryResults.js +1 -1
  322. package/build/esm/widgets/QueryResults/QueryResults.js.map +1 -1
  323. package/build/esm/widgets/QueryResults/i18n/index.d.ts +2 -2
  324. package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js +2 -1
  325. package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -1
  326. package/build/esm/widgets/SavedQueries/SavedQueries.d.ts +2 -2
  327. package/build/esm/widgets/SavedQueries/SavedQueries.js +1 -1
  328. package/build/esm/widgets/SavedQueries/SavedQueries.js.map +1 -1
  329. package/build/esm/widgets/SavedQueries/SavedQueryRowContent.d.ts +2 -2
  330. package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js +3 -2
  331. package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -1
  332. package/build/esm/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
  333. package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js +3 -2
  334. package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
  335. package/build/esm/widgets/TutorialsHistory/TutorialsHistory.d.ts +2 -2
  336. package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js +3 -1
  337. package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
  338. package/package.json +84 -5
@@ -0,0 +1,128 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/createForOfIteratorHelper";
3
+ import "core-js/modules/es.error.cause.js";
4
+ import "core-js/modules/es.error.to-string.js";
5
+ import "core-js/modules/es.array.filter.js";
6
+ import "core-js/modules/es.array.for-each.js";
7
+ import "core-js/modules/es.array.iterator.js";
8
+ import "core-js/modules/es.array.map.js";
9
+ import "core-js/modules/es.array.push.js";
10
+ import "core-js/modules/es.iterator.constructor.js";
11
+ import "core-js/modules/es.iterator.filter.js";
12
+ import "core-js/modules/es.iterator.for-each.js";
13
+ import "core-js/modules/es.iterator.map.js";
14
+ import "core-js/modules/es.map.js";
15
+ import "core-js/modules/es.object.to-string.js";
16
+ import "core-js/modules/es.set.js";
17
+ import "core-js/modules/es.set.difference.v2.js";
18
+ import "core-js/modules/es.set.intersection.v2.js";
19
+ import "core-js/modules/es.set.is-disjoint-from.v2.js";
20
+ import "core-js/modules/es.set.is-subset-of.v2.js";
21
+ import "core-js/modules/es.set.is-superset-of.v2.js";
22
+ import "core-js/modules/es.set.symmetric-difference.v2.js";
23
+ import "core-js/modules/es.set.union.v2.js";
24
+ import "core-js/modules/es.string.iterator.js";
25
+ import "core-js/modules/esnext.map.get-or-insert.js";
26
+ import "core-js/modules/esnext.map.get-or-insert-computed.js";
27
+ import "core-js/modules/web.dom-collections.for-each.js";
28
+ import "core-js/modules/web.dom-collections.iterator.js";
29
+ var OPERATION_SIZE = 65;
30
+ var RESOURCE_WIDTH = 36;
31
+ var RESOURCE_HEIGHT = 36;
32
+ export function getQueryGraphNodeSize(node) {
33
+ return node.kind === 'operation' ? {
34
+ width: OPERATION_SIZE,
35
+ height: OPERATION_SIZE
36
+ } : {
37
+ width: RESOURCE_WIDTH,
38
+ height: RESOURCE_HEIGHT
39
+ };
40
+ }
41
+ export function validateQueryGraph(nodes, edges) {
42
+ var ids = new Set();
43
+ var _iterator = _createForOfIteratorHelper(nodes),
44
+ _step;
45
+ try {
46
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
47
+ var node = _step.value;
48
+ if (ids.has(node.id)) throw new Error("Duplicate query graph node id: ".concat(node.id));
49
+ ids.add(node.id);
50
+ }
51
+ } catch (err) {
52
+ _iterator.e(err);
53
+ } finally {
54
+ _iterator.f();
55
+ }
56
+ var edgeIds = new Set();
57
+ var _iterator2 = _createForOfIteratorHelper(edges),
58
+ _step2;
59
+ try {
60
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
61
+ var edge = _step2.value;
62
+ if (edgeIds.has(edge.id)) throw new Error("Duplicate query graph edge id: ".concat(edge.id));
63
+ edgeIds.add(edge.id);
64
+ if (!ids.has(edge.source)) throw new Error("Unknown source node: ".concat(edge.source));
65
+ if (!ids.has(edge.target)) throw new Error("Unknown target node: ".concat(edge.target));
66
+ }
67
+ } catch (err) {
68
+ _iterator2.e(err);
69
+ } finally {
70
+ _iterator2.f();
71
+ }
72
+ var incoming = new Map(nodes.map(function (node) {
73
+ return [node.id, 0];
74
+ }));
75
+ var outgoing = new Map(nodes.map(function (node) {
76
+ return [node.id, []];
77
+ }));
78
+ edges.forEach(function (edge) {
79
+ var _incoming$get, _outgoing$get;
80
+ incoming.set(edge.target, ((_incoming$get = incoming.get(edge.target)) !== null && _incoming$get !== void 0 ? _incoming$get : 0) + 1);
81
+ (_outgoing$get = outgoing.get(edge.source)) === null || _outgoing$get === void 0 || _outgoing$get.push(edge.target);
82
+ });
83
+ var queue = nodes.filter(function (node) {
84
+ return incoming.get(node.id) === 0;
85
+ }).map(function (node) {
86
+ return node.id;
87
+ });
88
+ var visited = 0;
89
+ for (var index = 0; index < queue.length; index++) {
90
+ var _outgoing$get2;
91
+ var id = queue[index];
92
+ visited++;
93
+ var _iterator3 = _createForOfIteratorHelper((_outgoing$get2 = outgoing.get(id)) !== null && _outgoing$get2 !== void 0 ? _outgoing$get2 : []),
94
+ _step3;
95
+ try {
96
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
97
+ var _incoming$get2;
98
+ var target = _step3.value;
99
+ var nextIncoming = ((_incoming$get2 = incoming.get(target)) !== null && _incoming$get2 !== void 0 ? _incoming$get2 : 0) - 1;
100
+ incoming.set(target, nextIncoming);
101
+ if (nextIncoming === 0) queue.push(target);
102
+ }
103
+ } catch (err) {
104
+ _iterator3.e(err);
105
+ } finally {
106
+ _iterator3.f();
107
+ }
108
+ }
109
+ if (visited !== nodes.length) throw new Error('Query graph contains a cycle');
110
+ }
111
+ export function createQueryGraphConnections(edges, routes) {
112
+ return edges.map(function (edge) {
113
+ return _objectSpread({
114
+ id: edge.id,
115
+ sourceBlockId: edge.source,
116
+ targetBlockId: edge.target
117
+ }, routes === null || routes === void 0 ? void 0 : routes[edge.id]);
118
+ });
119
+ }
120
+ export function getQueryGraphProgress(node) {
121
+ var _node$progress, _node$progress$total, _node$progress2, _node$progress$comple, _node$progress3;
122
+ var fraction = (_node$progress = node.progress) === null || _node$progress === void 0 ? void 0 : _node$progress.fraction;
123
+ if (typeof fraction === 'number') return Math.min(1, Math.max(0, fraction));
124
+ var total = (_node$progress$total = (_node$progress2 = node.progress) === null || _node$progress2 === void 0 ? void 0 : _node$progress2.total) !== null && _node$progress$total !== void 0 ? _node$progress$total : 0;
125
+ if (total <= 0) return 0;
126
+ return Math.min(1, Math.max(0, ((_node$progress$comple = (_node$progress3 = node.progress) === null || _node$progress3 === void 0 ? void 0 : _node$progress3.completed) !== null && _node$progress$comple !== void 0 ? _node$progress$comple : 0) / total));
127
+ }
128
+ // #sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OPERATION_SIZE","RESOURCE_WIDTH","RESOURCE_HEIGHT","getQueryGraphNodeSize","node","kind","width","height","validateQueryGraph","nodes","edges","ids","Set","_iterator","_createForOfIteratorHelper","_step","s","n","done","value","has","id","Error","concat","add","err","e","f","edgeIds","_iterator2","_step2","edge","source","target","incoming","Map","map","outgoing","forEach","_incoming$get","_outgoing$get","set","get","push","queue","filter","visited","index","length","_outgoing$get2","_iterator3","_step3","_incoming$get2","nextIncoming","createQueryGraphConnections","routes","_objectSpread","sourceBlockId","targetBlockId","getQueryGraphProgress","_node$progress","_node$progress$total","_node$progress2","_node$progress$comple","_node$progress3","fraction","progress","Math","min","max","total","completed"],"sources":["layout.ts"],"sourcesContent":["import type {TMultipointConnection} from '@gravity-ui/graph';\n\nimport type {QueryGraphEdge, QueryGraphNode} from '../../../types/queryGraph';\n\nconst OPERATION_SIZE = 65;\nconst RESOURCE_WIDTH = 36;\nconst RESOURCE_HEIGHT = 36;\n\nexport function getQueryGraphNodeSize(node: QueryGraphNode) {\n return node.kind === 'operation'\n ? {width: OPERATION_SIZE, height: OPERATION_SIZE}\n : {width: RESOURCE_WIDTH, height: RESOURCE_HEIGHT};\n}\n\nexport function validateQueryGraph(nodes: QueryGraphNode[], edges: QueryGraphEdge[]) {\n const ids = new Set<string>();\n for (const node of nodes) {\n if (ids.has(node.id)) throw new Error(`Duplicate query graph node id: ${node.id}`);\n ids.add(node.id);\n }\n\n const edgeIds = new Set<string>();\n for (const edge of edges) {\n if (edgeIds.has(edge.id)) throw new Error(`Duplicate query graph edge id: ${edge.id}`);\n edgeIds.add(edge.id);\n if (!ids.has(edge.source)) throw new Error(`Unknown source node: ${edge.source}`);\n if (!ids.has(edge.target)) throw new Error(`Unknown target node: ${edge.target}`);\n }\n\n const incoming = new Map(nodes.map((node) => [node.id, 0]));\n const outgoing = new Map(nodes.map((node) => [node.id, [] as string[]]));\n edges.forEach((edge) => {\n incoming.set(edge.target, (incoming.get(edge.target) ?? 0) + 1);\n outgoing.get(edge.source)?.push(edge.target);\n });\n\n const queue = nodes.filter((node) => incoming.get(node.id) === 0).map((node) => node.id);\n let visited = 0;\n for (let index = 0; index < queue.length; index++) {\n const id = queue[index];\n visited++;\n for (const target of outgoing.get(id) ?? []) {\n const nextIncoming = (incoming.get(target) ?? 0) - 1;\n incoming.set(target, nextIncoming);\n if (nextIncoming === 0) queue.push(target);\n }\n }\n if (visited !== nodes.length) throw new Error('Query graph contains a cycle');\n}\n\nexport function createQueryGraphConnections(\n edges: QueryGraphEdge[],\n routes?: Record<string | number | symbol, Pick<TMultipointConnection, 'points' | 'labels'>>,\n): TMultipointConnection[] {\n return edges.map((edge) => ({\n id: edge.id,\n sourceBlockId: edge.source,\n targetBlockId: edge.target,\n ...routes?.[edge.id],\n }));\n}\n\nexport function getQueryGraphProgress(node: QueryGraphNode) {\n const fraction = node.progress?.fraction;\n if (typeof fraction === 'number') return Math.min(1, Math.max(0, fraction));\n const total = node.progress?.total ?? 0;\n if (total <= 0) return 0;\n return Math.min(1, Math.max(0, (node.progress?.completed ?? 0) / total));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,cAAc,GAAG,EAAE;AACzB,IAAMC,cAAc,GAAG,EAAE;AACzB,IAAMC,eAAe,GAAG,EAAE;AAE1B,OAAO,SAASC,qBAAqBA,CAACC,IAAoB,EAAE;EACxD,OAAOA,IAAI,CAACC,IAAI,KAAK,WAAW,GAC1B;IAAC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phNode): {
3
+ readonly kind: "icon";
4
+ readonly value?: undefined;
5
+ } | {
6
+ readonly kind: "counter";
7
+ readonly value: string;
8
+ } | {
9
+ readonly kind: "empty";
10
+ readonly value?: undefined;
11
+ };
12
+ export declare function getScaleAdjustedFontSize(fontSize: number, cameraScale: number): number;
13
+ export declare function fitCanvasFontSize(fontSize: number, measuredWidth: number, maxWidth: number): number;
14
+ export declare function fitCanvasText(context: {
15
+ measureText: (text: string) => {
16
+ width: number;
17
+ };
18
+ }, text: string, maxWidth: number, trimStart: boolean): string;
@@ -0,0 +1,35 @@
1
+ import "core-js/modules/es.array.slice.js";
2
+ export function getQueryGraphNodeContent(node) {
3
+ var _node$status, _node$progress;
4
+ var status = (_node$status = node.status) !== null && _node$status !== void 0 ? _node$status : 'not-started';
5
+ if (status === 'not-started') return {
6
+ kind: 'icon'
7
+ };
8
+ var total = (_node$progress = node.progress) === null || _node$progress === void 0 ? void 0 : _node$progress.total;
9
+ return typeof total === 'number' && total > 0 ? {
10
+ kind: 'counter',
11
+ value: String(total)
12
+ } : {
13
+ kind: 'empty'
14
+ };
15
+ }
16
+ export function getScaleAdjustedFontSize(fontSize, cameraScale) {
17
+ return cameraScale > 0 ? fontSize / cameraScale : fontSize;
18
+ }
19
+ export function fitCanvasFontSize(fontSize, measuredWidth, maxWidth) {
20
+ if (measuredWidth <= 0 || measuredWidth <= maxWidth) return fontSize;
21
+ return fontSize * (maxWidth / measuredWidth);
22
+ }
23
+ export function fitCanvasText(context, text, maxWidth, trimStart) {
24
+ if (context.measureText(text).width <= maxWidth) return text;
25
+ var ellipsis = '…';
26
+ var low = 0;
27
+ var high = text.length;
28
+ while (low < high) {
29
+ var length = Math.ceil((low + high) / 2);
30
+ var candidate = trimStart ? ellipsis + text.slice(text.length - length) : text.slice(0, length) + ellipsis;
31
+ if (context.measureText(candidate).width <= maxWidth) low = length;else high = length - 1;
32
+ }
33
+ return trimStart ? ellipsis + text.slice(text.length - low) : text.slice(0, low) + ellipsis;
34
+ }
35
+ // #sourceMappingURL=presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getQueryGraphNodeContent","node","_node$status","_node$progress","status","kind","total","progress","value","String","getScaleAdjustedFontSize","fontSize","cameraScale","fitCanvasFontSize","measuredWidth","maxWidth","fitCanvasText","context","text","trimStart","measureText","width","ellipsis","low","high","length","Math","ceil","candidate","slice"],"sources":["presentation.ts"],"sourcesContent":["import type {QueryGraphNode} from '../../../types/queryGraph';\n\nexport function getQueryGraphNodeContent(node: QueryGraphNode) {\n const status = node.status ?? 'not-started';\n if (status === 'not-started') return {kind: 'icon'} as const;\n const total = node.progress?.total;\n return typeof total === 'number' && total > 0\n ? ({kind: 'counter', value: String(total)} as const)\n : ({kind: 'empty'} as const);\n}\n\nexport function getScaleAdjustedFontSize(fontSize: number, cameraScale: number) {\n return cameraScale > 0 ? fontSize / cameraScale : fontSize;\n}\n\nexport function fitCanvasFontSize(fontSize: number, measuredWidth: number, maxWidth: number) {\n if (measuredWidth <= 0 || measuredWidth <= maxWidth) return fontSize;\n return fontSize * (maxWidth / measuredWidth);\n}\n\nexport function fitCanvasText(\n context: {measureText: (text: string) => {width: number}},\n text: string,\n maxWidth: number,\n trimStart: boolean,\n) {\n if (context.measureText(text).width <= maxWidth) return text;\n const ellipsis = '…';\n let low = 0;\n let high = text.length;\n while (low < high) {\n const length = Math.ceil((low + high) / 2);\n const candidate = trimStart\n ? ellipsis + text.slice(text.length - length)\n : text.slice(0, length) + ellipsis;\n if (context.measureText(candidate).width <= maxWidth) low = length;\n else high = length - 1;\n }\n return trimStart ? ellipsis + text.slice(text.length - low) : text.slice(0, low) + ellipsis;\n}\n"],"mappings":";AAEA,OAAO,SAASA,wBAAwBA,CAACC,IAAoB,EAAE;EAAA,IAAAC,YAAA,EAAAC,cAAA;EAC3D,IAAMC,MAAM,IAAAF,YAAA,GAAGD,IAAI,CAACG,MAAM,cAAAF,YAAA,cAAAA,YAAA,GAAI,aAAa;EAC3C,IAAIE,MAAM,K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AAC,GAC3CP,IAAI,CAACW,KAAK,CAAC,CAAC,EAAEJ,MAAM,CAAC,GAAGH,QAAQ;IACtC,IAAIL,OAAO,CAACG,WAAW,CAACQ,SAAS,CAAC,CAACP,KAAK,IAAIN,QAAQ,EAAEQ,GAAG,GAAGE,MAAM,CAAC,KAC9DD,IAAI,GAAGC,MAAM,GAAG,CAAC;EAC1B;EACA,OAAON,SAAS,GAAGG,QAAQ,GAAGJ,IAAI,CAACW,KAAK,CAACX,IAAI,CAACO,MAAM,GAAGF,GAAG,CAAC,GAAGL,IAAI,CAACW,KAAK,CAAC,CAAC,EAAEN,GAAG,CAAC,GAAGD,QAAQ;AAC/F","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ declare const _default: {
2
+ en: {
3
+ action_fit: string;
4
+ "action_zoom-in": string;
5
+ "action_zoom-out": string;
6
+ "action_show-graph": string;
7
+ "context_large-graph": string;
8
+ context_empty: string;
9
+ value_stages: string;
10
+ value_details: string;
11
+ value_jobs: string;
12
+ value_schemas: string;
13
+ field_stage: string;
14
+ field_duration: string;
15
+ field_status: string;
16
+ field_count: string;
17
+ field_name: string;
18
+ field_type: string;
19
+ value_total: string;
20
+ value_inputs: string;
21
+ value_outputs: string;
22
+ status_pending: string;
23
+ status_running: string;
24
+ status_completed: string;
25
+ status_failed: string;
26
+ status_aborted: string;
27
+ };
28
+ ru: {
29
+ action_fit: string;
30
+ "action_zoom-in": string;
31
+ "action_zoom-out": string;
32
+ "action_show-graph": string;
33
+ "context_large-graph": string;
34
+ context_empty: string;
35
+ value_stages: string;
36
+ value_details: string;
37
+ value_jobs: string;
38
+ value_schemas: string;
39
+ field_stage: string;
40
+ field_duration: string;
41
+ field_status: string;
42
+ field_count: string;
43
+ field_name: string;
44
+ field_type: string;
45
+ value_total: string;
46
+ value_inputs: string;
47
+ value_outputs: string;
48
+ status_pending: string;
49
+ status_running: string;
50
+ status_completed: string;
51
+ status_failed: string;
52
+ status_aborted: string;
53
+ };
54
+ };
55
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import en from "./en.json";
2
+ import ru from "./ru.json";
3
+ export default {
4
+ en: en,
5
+ ru: ru
6
+ };
7
+ // #sourceMappingURL=dicts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["en","ru"],"sources":["dicts.ts"],"sourcesContent":["import en from './en.json';\nimport ru from './ru.json';\n\nexport default {en, ru};\n"],"mappings":"AAAA,OAAOA,EAAE;AACT,OAAOC,EAAE;AAET,eAAe;EAACD,EAAE,EAAFA,EAAE;EAAEC,EAAE,EAAFA;AAAE,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ {
2
+ "action_fit": "Fit",
3
+ "action_zoom-in": "Zoom in",
4
+ "action_zoom-out": "Zoom out",
5
+ "action_show-graph": "Show graph",
6
+ "context_large-graph": "The graph contains {{count}} nodes and may take some time to render.",
7
+ "context_empty": "No graph data",
8
+ "value_stages": "Stages",
9
+ "value_details": "Details",
10
+ "value_jobs": "Jobs",
11
+ "value_schemas": "Schemas",
12
+ "field_stage": "Stage",
13
+ "field_duration": "Duration",
14
+ "field_status": "Status",
15
+ "field_count": "Count",
16
+ "field_name": "Name",
17
+ "field_type": "Type",
18
+ "value_total": "Total",
19
+ "value_inputs": "Inputs",
20
+ "value_outputs": "Outputs",
21
+ "status_pending": "Pending",
22
+ "status_running": "Running",
23
+ "status_completed": "Completed",
24
+ "status_failed": "Failed",
25
+ "status_aborted": "Aborted"
26
+ }
@@ -0,0 +1,6 @@
1
+ declare const _default: ((key: "field_name" | "action_fit" | "action_zoom-in" | "action_zoom-out" | "action_show-graph" | "context_large-graph" | "context_empty" | "value_stages" | "value_details" | "value_jobs" | "value_schemas" | "field_stage" | "field_duration" | "field_status" | "field_count" | "field_type" | "value_total" | "value_inputs" | "value_outputs" | "status_pending" | "status_running" | "status_completed" | "status_failed" | "status_aborted", params?: import("@gravity-ui/i18n").Params) => string) & {
2
+ keysetData: {
3
+ "qp:query-graph": Record<"field_name" | "action_fit" | "action_zoom-in" | "action_zoom-out" | "action_show-graph" | "context_large-graph" | "context_empty" | "value_stages" | "value_details" | "value_jobs" | "value_schemas" | "field_stage" | "field_duration" | "field_status" | "field_count" | "field_type" | "value_total" | "value_inputs" | "value_outputs" | "status_pending" | "status_running" | "status_completed" | "status_failed" | "status_aborted", import("@gravity-ui/i18n").KeyData>;
4
+ };
5
+ };
6
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { addI18Keysets } from "../../../i18n";
2
+ import dicts from "./dicts";
3
+ export default addI18Keysets('qp:query-graph', dicts);
4
+ // #sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["addI18Keysets","dicts"],"sources":["index.ts"],"sourcesContent":["import {addI18Keysets} from '../../../i18n';\nimport dicts from './dicts';\n\nexport default addI18Keysets('qp:query-graph', dicts);\n"],"mappings":"AAAA,SAAQA,aAAa;AACrB,OAAOC,KAAK;AAEZ,eAAeD,aAAa,CAAC,gBAAgB,EAAEC,KAAK,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ {
2
+ "action_fit": "Вписать",
3
+ "action_zoom-in": "Приблизить",
4
+ "action_zoom-out": "Отдалить",
5
+ "action_show-graph": "Показать граф",
6
+ "context_large-graph": "Граф содержит {{count}} узлов, его построение может занять некоторое время.",
7
+ "context_empty": "Нет данных графа",
8
+ "value_stages": "Этапы",
9
+ "value_details": "Детали",
10
+ "value_jobs": "Задачи",
11
+ "value_schemas": "Схемы",
12
+ "field_stage": "Этап",
13
+ "field_duration": "Длительность",
14
+ "field_status": "Статус",
15
+ "field_count": "Количество",
16
+ "field_name": "Название",
17
+ "field_type": "Тип",
18
+ "value_total": "Всего",
19
+ "value_inputs": "Входы",
20
+ "value_outputs": "Выходы",
21
+ "status_pending": "Ожидает",
22
+ "status_running": "Выполняется",
23
+ "status_completed": "Завершено",
24
+ "status_failed": "Ошибка",
25
+ "status_aborted": "Прервано"
26
+ }
@@ -0,0 +1,2 @@
1
+ export { QueryGraph } from './QueryGraph';
2
+ export type { QueryGraphProps } from '../../types/queryGraph';
@@ -0,0 +1,2 @@
1
+ export { QueryGraph } from "./QueryGraph";
2
+ // #sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["QueryGraph"],"sources":["index.ts"],"sourcesContent":["export {QueryGraph} from './QueryGraph';\nexport type {QueryGraphProps} from '../../types/queryGraph';\n"],"mappings":"AAAA,SAAQA,UAAU","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ import { CanvasBlock, type TBlock } from '@gravity-ui/graph';
2
+ import type { QueryGraphNode } from '../../../types/queryGraph';
3
+ type QueryGraphBlockMeta = {
4
+ node: QueryGraphNode;
5
+ iconSvg: string;
6
+ fallbackIconSvg: string;
7
+ iconColorToken: string;
8
+ fallbackIconColorToken: string;
9
+ };
10
+ export type QueryGraphBlock = TBlock<QueryGraphBlockMeta>;
11
+ export declare class QueryGraphCanvasBlock extends CanvasBlock<QueryGraphBlock> {
12
+ renderMinimalisticBlock(ctx: CanvasRenderingContext2D): void;
13
+ renderSchematicView(ctx: CanvasRenderingContext2D): void;
14
+ renderDetailedView(ctx: CanvasRenderingContext2D): void;
15
+ private readonly redrawAfterImageLoad;
16
+ private renderQueryNode;
17
+ private drawNodeShape;
18
+ private drawRunningOperation;
19
+ private drawCounter;
20
+ private drawStatusIcon;
21
+ private drawIcon;
22
+ private drawLabel;
23
+ }
24
+ export {};