@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.
- package/README.md +28 -0
- package/build/cjs/components/QueryGraph/QueryGraph.css +70 -0
- package/build/cjs/components/QueryGraph/QueryGraph.css.map +1 -0
- package/build/cjs/components/QueryGraph/QueryGraph.d.ts +4 -0
- package/build/cjs/components/QueryGraph/QueryGraph.js +517 -0
- package/build/cjs/components/QueryGraph/QueryGraph.js.map +1 -0
- package/build/cjs/components/QueryGraph/QueryGraph.stories.d.ts +16 -0
- package/build/cjs/components/QueryGraph/QueryGraph.stories.js +339 -0
- package/build/cjs/components/QueryGraph/QueryGraph.stories.js.map +1 -0
- package/build/cjs/components/QueryGraph/helpers/layout.d.ts +9 -0
- package/build/cjs/components/QueryGraph/helpers/layout.js +138 -0
- package/build/cjs/components/QueryGraph/helpers/layout.js.map +1 -0
- package/build/cjs/components/QueryGraph/helpers/presentation.d.ts +18 -0
- package/build/cjs/components/QueryGraph/helpers/presentation.js +44 -0
- package/build/cjs/components/QueryGraph/helpers/presentation.js.map +1 -0
- package/build/cjs/components/QueryGraph/i18n/dicts.d.ts +55 -0
- package/build/cjs/components/QueryGraph/i18n/dicts.js +14 -0
- package/build/cjs/components/QueryGraph/i18n/dicts.js.map +1 -0
- package/build/cjs/components/QueryGraph/i18n/en.json +26 -0
- package/build/cjs/components/QueryGraph/i18n/index.d.ts +6 -0
- package/build/cjs/components/QueryGraph/i18n/index.js +11 -0
- package/build/cjs/components/QueryGraph/i18n/index.js.map +1 -0
- package/build/cjs/components/QueryGraph/i18n/ru.json +26 -0
- package/build/cjs/components/QueryGraph/index.d.ts +2 -0
- package/build/cjs/components/QueryGraph/index.js +13 -0
- package/build/cjs/components/QueryGraph/index.js.map +1 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.d.ts +24 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.js +307 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphCanvasBlock.js.map +1 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.d.ts +5 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.js +242 -0
- package/build/cjs/components/QueryGraph/internal/QueryGraphPopup.js.map +1 -0
- package/build/cjs/components/QueryGraph/internal/queryGraphIcons.d.ts +12 -0
- package/build/cjs/components/QueryGraph/internal/queryGraphIcons.js +161 -0
- package/build/cjs/components/QueryGraph/internal/queryGraphIcons.js.map +1 -0
- package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.d.ts +22 -0
- package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.js +60 -0
- package/build/cjs/components/QueryGraph/internal/useQueryGraphLayout.js.map +1 -0
- package/build/cjs/components/QueryGraph/story/largeGraphData.d.ts +3 -0
- package/build/cjs/components/QueryGraph/story/largeGraphData.js +227 -0
- package/build/cjs/components/QueryGraph/story/largeGraphData.js.map +1 -0
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +9 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/helpers/buildColumnsFromKeys.d.ts +1 -1
- package/build/cjs/helpers/buildColumnsFromKeys.js.map +1 -1
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +11 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/modules/ClustersList/ClustersList.d.ts +1 -1
- package/build/cjs/modules/ClustersList/ClustersList.js +4 -3
- package/build/cjs/modules/ClustersList/ClustersList.js.map +1 -1
- package/build/cjs/modules/HistoryHeader/HistoryHeader.js +4 -3
- package/build/cjs/modules/HistoryHeader/HistoryHeader.js.map +1 -1
- package/build/cjs/modules/HistoryRow/HistoryRow.js +12 -7
- package/build/cjs/modules/HistoryRow/HistoryRow.js.map +1 -1
- package/build/cjs/modules/HistorySearchRow/HistorySearchRow.js +8 -5
- package/build/cjs/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
- package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.d.ts +1 -1
- package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js +5 -5
- package/build/cjs/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js.map +1 -1
- package/build/cjs/modules/NavigationDetail/NavigationDetail.d.ts +1 -1
- package/build/cjs/modules/NavigationDetail/NavigationDetail.js +2 -2
- package/build/cjs/modules/NavigationDetail/NavigationDetail.js.map +1 -1
- package/build/cjs/modules/NavigationHeader/NavigationHeader.d.ts +1 -1
- package/build/cjs/modules/NavigationHeader/NavigationHeader.js +2 -2
- package/build/cjs/modules/NavigationHeader/NavigationHeader.js.map +1 -1
- package/build/cjs/modules/NavigationItemsList/NavigationItemsList.d.ts +1 -1
- package/build/cjs/modules/NavigationItemsList/NavigationItemsList.js +4 -3
- package/build/cjs/modules/NavigationItemsList/NavigationItemsList.js.map +1 -1
- package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.d.ts +1 -1
- package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js +2 -2
- package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js.map +1 -1
- package/build/cjs/modules/NavigationMeta/NavigationMeta.js +4 -3
- package/build/cjs/modules/NavigationMeta/NavigationMeta.js.map +1 -1
- package/build/cjs/modules/NavigationMeta/i18n/index.d.ts +2 -2
- package/build/cjs/modules/NavigationPreview/NavigationPreview.d.ts +1 -1
- package/build/cjs/modules/NavigationPreview/NavigationPreview.js +6 -4
- package/build/cjs/modules/NavigationPreview/NavigationPreview.js.map +1 -1
- package/build/cjs/modules/NavigationPreview/helpers/buildPreviewColumns.d.ts +1 -1
- package/build/cjs/modules/NavigationPreview/helpers/buildPreviewColumns.js.map +1 -1
- package/build/cjs/modules/NavigationSchema/NavigationSchema.d.ts +1 -1
- package/build/cjs/modules/NavigationSchema/NavigationSchema.js +4 -3
- package/build/cjs/modules/NavigationSchema/NavigationSchema.js.map +1 -1
- package/build/cjs/modules/NavigationSchema/helpers/buildSchemaColumns.d.ts +1 -1
- package/build/cjs/modules/NavigationSchema/helpers/buildSchemaColumns.js.map +1 -1
- package/build/cjs/modules/NavigationView/NavigationView.d.ts +1 -1
- package/build/cjs/modules/NavigationView/NavigationView.js +4 -3
- package/build/cjs/modules/NavigationView/NavigationView.js.map +1 -1
- package/build/cjs/modules/NavigationView/helpers/buildViewColumns.d.ts +1 -1
- package/build/cjs/modules/NavigationView/helpers/buildViewColumns.js.map +1 -1
- package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.d.ts +1 -1
- package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.js +4 -3
- package/build/cjs/modules/NavigationView/internal/NavigationViewSectionItem.js.map +1 -1
- package/build/cjs/modules/QueriesList/QueriesList.js +2 -2
- package/build/cjs/modules/QueriesList/QueriesList.js.map +1 -1
- package/build/cjs/modules/QueryProgress/QueryProgress.css +64 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.css.map +1 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.d.ts +4 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.js +135 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.js.map +1 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.stories.d.ts +7 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.stories.js +38 -0
- package/build/cjs/modules/QueryProgress/QueryProgress.stories.js.map +1 -0
- package/build/cjs/modules/QueryProgress/i18n/dicts.d.ts +25 -0
- package/build/cjs/modules/QueryProgress/i18n/dicts.js +14 -0
- package/build/cjs/modules/QueryProgress/i18n/dicts.js.map +1 -0
- package/build/cjs/modules/QueryProgress/i18n/en.json +11 -0
- package/build/cjs/modules/QueryProgress/i18n/index.d.ts +6 -0
- package/build/cjs/modules/QueryProgress/i18n/index.js +11 -0
- package/build/cjs/modules/QueryProgress/i18n/index.js.map +1 -0
- package/build/cjs/modules/QueryProgress/i18n/ru.json +11 -0
- package/build/cjs/modules/QueryProgress/index.d.ts +2 -0
- package/build/cjs/modules/QueryProgress/index.js +13 -0
- package/build/cjs/modules/QueryProgress/index.js.map +1 -0
- package/build/cjs/modules/QueryStatistics/i18n/index.d.ts +2 -2
- package/build/cjs/modules/RowsList/RowsList.js +4 -3
- package/build/cjs/modules/RowsList/RowsList.js.map +1 -1
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.d.ts +2 -2
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js +6 -4
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js.map +1 -1
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +2 -2
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +4 -3
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -1
- package/build/cjs/modules/TutorialRow/TutorialRow.d.ts +1 -1
- package/build/cjs/modules/TutorialRow/TutorialRow.js +2 -2
- package/build/cjs/modules/TutorialRow/TutorialRow.js.map +1 -1
- package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.d.ts +1 -1
- package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.js +4 -3
- package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.js.map +1 -1
- package/build/cjs/modules/index.d.ts +2 -0
- package/build/cjs/modules/index.js +8 -0
- package/build/cjs/modules/index.js.map +1 -1
- package/build/cjs/types/queryGraph.d.ts +87 -0
- package/build/cjs/types/queryGraph.js +6 -0
- package/build/cjs/types/queryGraph.js.map +1 -0
- package/build/cjs/widgets/DashboardCharts/DashboardCharts.js +8 -6
- package/build/cjs/widgets/DashboardCharts/DashboardCharts.js.map +1 -1
- package/build/cjs/widgets/DashboardCharts/types.d.ts +3 -3
- package/build/cjs/widgets/DashboardCharts/types.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.js +2 -2
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.js +6 -5
- package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -1
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.d.ts +1 -1
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.js +13 -9
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.js.map +1 -1
- package/build/cjs/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js +2 -2
- package/build/cjs/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js.map +1 -1
- package/build/cjs/widgets/QueriesNavigation/helpers/createTableDetailConfig.js +8 -5
- package/build/cjs/widgets/QueriesNavigation/helpers/createTableDetailConfig.js.map +1 -1
- package/build/cjs/widgets/QueryResults/QueryResults.js +2 -2
- package/build/cjs/widgets/QueryResults/QueryResults.js.map +1 -1
- package/build/cjs/widgets/QueryResults/i18n/index.d.ts +2 -2
- package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js +4 -3
- package/build/cjs/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -1
- package/build/cjs/widgets/SavedQueries/SavedQueries.d.ts +2 -2
- package/build/cjs/widgets/SavedQueries/SavedQueries.js +2 -2
- package/build/cjs/widgets/SavedQueries/SavedQueries.js.map +1 -1
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.d.ts +2 -2
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js +6 -5
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js +6 -5
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.d.ts +2 -2
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js +6 -4
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/build/esm/components/QueryGraph/QueryGraph.css +70 -0
- package/build/esm/components/QueryGraph/QueryGraph.css.map +1 -0
- package/build/esm/components/QueryGraph/QueryGraph.d.ts +4 -0
- package/build/esm/components/QueryGraph/QueryGraph.js +510 -0
- package/build/esm/components/QueryGraph/QueryGraph.js.map +1 -0
- package/build/esm/components/QueryGraph/QueryGraph.scss +81 -0
- package/build/esm/components/QueryGraph/QueryGraph.stories.d.ts +16 -0
- package/build/esm/components/QueryGraph/QueryGraph.stories.js +331 -0
- package/build/esm/components/QueryGraph/QueryGraph.stories.js.map +1 -0
- package/build/esm/components/QueryGraph/helpers/layout.d.ts +9 -0
- package/build/esm/components/QueryGraph/helpers/layout.js +128 -0
- package/build/esm/components/QueryGraph/helpers/layout.js.map +1 -0
- package/build/esm/components/QueryGraph/helpers/presentation.d.ts +18 -0
- package/build/esm/components/QueryGraph/helpers/presentation.js +35 -0
- package/build/esm/components/QueryGraph/helpers/presentation.js.map +1 -0
- package/build/esm/components/QueryGraph/i18n/dicts.d.ts +55 -0
- package/build/esm/components/QueryGraph/i18n/dicts.js +7 -0
- package/build/esm/components/QueryGraph/i18n/dicts.js.map +1 -0
- package/build/esm/components/QueryGraph/i18n/en.json +26 -0
- package/build/esm/components/QueryGraph/i18n/index.d.ts +6 -0
- package/build/esm/components/QueryGraph/i18n/index.js +4 -0
- package/build/esm/components/QueryGraph/i18n/index.js.map +1 -0
- package/build/esm/components/QueryGraph/i18n/ru.json +26 -0
- package/build/esm/components/QueryGraph/index.d.ts +2 -0
- package/build/esm/components/QueryGraph/index.js +2 -0
- package/build/esm/components/QueryGraph/index.js.map +1 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.d.ts +24 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.js +299 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphCanvasBlock.js.map +1 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphPopup.d.ts +5 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphPopup.js +234 -0
- package/build/esm/components/QueryGraph/internal/QueryGraphPopup.js.map +1 -0
- package/build/esm/components/QueryGraph/internal/queryGraphIcons.d.ts +12 -0
- package/build/esm/components/QueryGraph/internal/queryGraphIcons.js +150 -0
- package/build/esm/components/QueryGraph/internal/queryGraphIcons.js.map +1 -0
- package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.d.ts +22 -0
- package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.js +53 -0
- package/build/esm/components/QueryGraph/internal/useQueryGraphLayout.js.map +1 -0
- package/build/esm/components/QueryGraph/story/largeGraphData.d.ts +3 -0
- package/build/esm/components/QueryGraph/story/largeGraphData.js +220 -0
- package/build/esm/components/QueryGraph/story/largeGraphData.js.map +1 -0
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/helpers/buildColumnsFromKeys.d.ts +1 -1
- package/build/esm/helpers/buildColumnsFromKeys.js.map +1 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/modules/ClustersList/ClustersList.d.ts +1 -1
- package/build/esm/modules/ClustersList/ClustersList.js +2 -1
- package/build/esm/modules/ClustersList/ClustersList.js.map +1 -1
- package/build/esm/modules/HistoryHeader/HistoryHeader.js +2 -1
- package/build/esm/modules/HistoryHeader/HistoryHeader.js.map +1 -1
- package/build/esm/modules/HistoryRow/HistoryRow.js +6 -1
- package/build/esm/modules/HistoryRow/HistoryRow.js.map +1 -1
- package/build/esm/modules/HistorySearchRow/HistorySearchRow.js +4 -1
- package/build/esm/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
- package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.d.ts +1 -1
- package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js +1 -1
- package/build/esm/modules/HistorySearchRow/helpers/resolveMonacoLanguage.js.map +1 -1
- package/build/esm/modules/NavigationDetail/NavigationDetail.d.ts +1 -1
- package/build/esm/modules/NavigationDetail/NavigationDetail.js +1 -1
- package/build/esm/modules/NavigationDetail/NavigationDetail.js.map +1 -1
- package/build/esm/modules/NavigationHeader/NavigationHeader.d.ts +1 -1
- package/build/esm/modules/NavigationHeader/NavigationHeader.js +1 -1
- package/build/esm/modules/NavigationHeader/NavigationHeader.js.map +1 -1
- package/build/esm/modules/NavigationItemsList/NavigationItemsList.d.ts +1 -1
- package/build/esm/modules/NavigationItemsList/NavigationItemsList.js +2 -1
- package/build/esm/modules/NavigationItemsList/NavigationItemsList.js.map +1 -1
- package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.d.ts +1 -1
- package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js +1 -1
- package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListEmptyState.js.map +1 -1
- package/build/esm/modules/NavigationMeta/NavigationMeta.js +2 -1
- package/build/esm/modules/NavigationMeta/NavigationMeta.js.map +1 -1
- package/build/esm/modules/NavigationMeta/i18n/index.d.ts +2 -2
- package/build/esm/modules/NavigationPreview/NavigationPreview.d.ts +1 -1
- package/build/esm/modules/NavigationPreview/NavigationPreview.js +3 -1
- package/build/esm/modules/NavigationPreview/NavigationPreview.js.map +1 -1
- package/build/esm/modules/NavigationPreview/helpers/buildPreviewColumns.d.ts +1 -1
- package/build/esm/modules/NavigationPreview/helpers/buildPreviewColumns.js.map +1 -1
- package/build/esm/modules/NavigationSchema/NavigationSchema.d.ts +1 -1
- package/build/esm/modules/NavigationSchema/NavigationSchema.js +2 -1
- package/build/esm/modules/NavigationSchema/NavigationSchema.js.map +1 -1
- package/build/esm/modules/NavigationSchema/helpers/buildSchemaColumns.d.ts +1 -1
- package/build/esm/modules/NavigationSchema/helpers/buildSchemaColumns.js.map +1 -1
- package/build/esm/modules/NavigationView/NavigationView.d.ts +1 -1
- package/build/esm/modules/NavigationView/NavigationView.js +2 -1
- package/build/esm/modules/NavigationView/NavigationView.js.map +1 -1
- package/build/esm/modules/NavigationView/helpers/buildViewColumns.d.ts +1 -1
- package/build/esm/modules/NavigationView/helpers/buildViewColumns.js.map +1 -1
- package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.d.ts +1 -1
- package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.js +2 -1
- package/build/esm/modules/NavigationView/internal/NavigationViewSectionItem.js.map +1 -1
- package/build/esm/modules/QueriesList/QueriesList.js +1 -1
- package/build/esm/modules/QueriesList/QueriesList.js.map +1 -1
- package/build/esm/modules/QueryProgress/QueryProgress.css +64 -0
- package/build/esm/modules/QueryProgress/QueryProgress.css.map +1 -0
- package/build/esm/modules/QueryProgress/QueryProgress.d.ts +4 -0
- package/build/esm/modules/QueryProgress/QueryProgress.js +127 -0
- package/build/esm/modules/QueryProgress/QueryProgress.js.map +1 -0
- package/build/esm/modules/QueryProgress/QueryProgress.scss +72 -0
- package/build/esm/modules/QueryProgress/QueryProgress.stories.d.ts +7 -0
- package/build/esm/modules/QueryProgress/QueryProgress.stories.js +31 -0
- package/build/esm/modules/QueryProgress/QueryProgress.stories.js.map +1 -0
- package/build/esm/modules/QueryProgress/i18n/dicts.d.ts +25 -0
- package/build/esm/modules/QueryProgress/i18n/dicts.js +7 -0
- package/build/esm/modules/QueryProgress/i18n/dicts.js.map +1 -0
- package/build/esm/modules/QueryProgress/i18n/en.json +11 -0
- package/build/esm/modules/QueryProgress/i18n/index.d.ts +6 -0
- package/build/esm/modules/QueryProgress/i18n/index.js +4 -0
- package/build/esm/modules/QueryProgress/i18n/index.js.map +1 -0
- package/build/esm/modules/QueryProgress/i18n/ru.json +11 -0
- package/build/esm/modules/QueryProgress/index.d.ts +2 -0
- package/build/esm/modules/QueryProgress/index.js +2 -0
- package/build/esm/modules/QueryProgress/index.js.map +1 -0
- package/build/esm/modules/QueryStatistics/i18n/index.d.ts +2 -2
- package/build/esm/modules/RowsList/RowsList.js +2 -1
- package/build/esm/modules/RowsList/RowsList.js.map +1 -1
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.d.ts +2 -2
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.js +3 -1
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.js.map +1 -1
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +2 -2
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +2 -1
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -1
- package/build/esm/modules/TutorialRow/TutorialRow.d.ts +1 -1
- package/build/esm/modules/TutorialRow/TutorialRow.js +1 -1
- package/build/esm/modules/TutorialRow/TutorialRow.js.map +1 -1
- package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.d.ts +1 -1
- package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.js +2 -1
- package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.js.map +1 -1
- package/build/esm/modules/index.d.ts +2 -0
- package/build/esm/modules/index.js +1 -0
- package/build/esm/modules/index.js.map +1 -1
- package/build/esm/types/queryGraph.d.ts +87 -0
- package/build/esm/types/queryGraph.js +2 -0
- package/build/esm/types/queryGraph.js.map +1 -0
- package/build/esm/widgets/DashboardCharts/DashboardCharts.js +4 -2
- package/build/esm/widgets/DashboardCharts/DashboardCharts.js.map +1 -1
- package/build/esm/widgets/DashboardCharts/types.d.ts +3 -3
- package/build/esm/widgets/DashboardCharts/types.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.js +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.js +3 -2
- package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -1
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.d.ts +1 -1
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.js +6 -2
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.js.map +1 -1
- package/build/esm/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js +1 -1
- package/build/esm/widgets/QueriesNavigation/helpers/createEmptyDetailConfig.js.map +1 -1
- package/build/esm/widgets/QueriesNavigation/helpers/createTableDetailConfig.js +4 -1
- package/build/esm/widgets/QueriesNavigation/helpers/createTableDetailConfig.js.map +1 -1
- package/build/esm/widgets/QueryResults/QueryResults.js +1 -1
- package/build/esm/widgets/QueryResults/QueryResults.js.map +1 -1
- package/build/esm/widgets/QueryResults/i18n/index.d.ts +2 -2
- package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js +2 -1
- package/build/esm/widgets/QueryResults/internal/QueryResultsSchema.js.map +1 -1
- package/build/esm/widgets/SavedQueries/SavedQueries.d.ts +2 -2
- package/build/esm/widgets/SavedQueries/SavedQueries.js +1 -1
- package/build/esm/widgets/SavedQueries/SavedQueries.js.map +1 -1
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.d.ts +2 -2
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js +3 -2
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js +3 -2
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.d.ts +2 -2
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js +3 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/package.json +84 -5
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TutorialSearchRow = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _uikit = require("@gravity-ui/uikit");
|
|
9
|
-
var
|
|
9
|
+
var _MonacoEditor = require("../../components/MonacoEditor");
|
|
10
|
+
var _SearchRowLayout = require("../../components/SearchRowLayout");
|
|
10
11
|
require("./TutorialSearchRow.css");
|
|
11
12
|
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -18,9 +19,9 @@ var TutorialSearchRow = exports.TutorialSearchRow = function TutorialSearchRow(_
|
|
|
18
19
|
id = item.id,
|
|
19
20
|
title = item.title,
|
|
20
21
|
query = item.query;
|
|
21
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchRowLayout.SearchRowLayout, {
|
|
22
23
|
query: query,
|
|
23
|
-
language:
|
|
24
|
+
language: _MonacoEditor.MonacoLanguage.YQL,
|
|
24
25
|
href: href,
|
|
25
26
|
className: block(),
|
|
26
27
|
header: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikit.Flex, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_uikit","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_uikit","_MonacoEditor","_SearchRowLayout","_bemCnLite","_jsxRuntime","e","__esModule","default","block","cn","TutorialSearchRow","exports","_ref","item","href","id","title","query","_jsx","SearchRowLayout","language","MonacoLanguage","YQL","className","header","_jsxs","Flex","gap","alignItems","children","Text","color","ellipsis"],"sources":["TutorialSearchRow.tsx"],"sourcesContent":["import React from 'react';\nimport {Flex, Text} from '@gravity-ui/uikit';\nimport type {TutorialHistoryRow} from '../../types/tutorial';\nimport {MonacoLanguage} from '../../components/MonacoEditor';\nimport {SearchRowLayout} from '../../components/SearchRowLayout';\nimport './TutorialSearchRow.scss';\nimport cn from 'bem-cn-lite';\n\nconst block = cn('qp-tutorial-search-row');\n\nexport type TutorialSearchRowProps<T extends TutorialHistoryRow = TutorialHistoryRow> = {\n item: T;\n};\n\nexport const TutorialSearchRow = <T extends TutorialHistoryRow>({\n item,\n}: TutorialSearchRowProps<T>) => {\n const {href, id, title, query} = item;\n\n return (\n <SearchRowLayout\n query={query}\n language={MonacoLanguage.YQL}\n href={href}\n className={block()}\n header={\n <Flex gap={2} alignItems=\"center\" className={block('header')}>\n <Text color=\"secondary\">{id}.</Text>\n <Text ellipsis>{title}</Text>\n </Flex>\n }\n />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACAA,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA6B,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7B,IAAMG,KAAK,GAAG,IAAAC,kBAAE,EAAC,wBAAwB,CAAC;AAMnC,IAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,SAApBA,iBAAiBA,CAAAE,IAAA,EAEG;EAAA,IAD7BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;EAEJ,IAAOC,IAAI,GAAsBD,IAAI,CAA9BC,IAAI;IAAEC,EAAE,GAAkBF,IAAI,CAAxBE,EAAE;IAAEC,KAAK,GAAWH,IAAI,CAApBG,KAAK;IAAEC,KAAK,GAAIJ,IAAI,CAAbI,KAAK;EAE7B,oBACI,IAAAC,eAAA,EAACC,gCAAe;IACZF,KAAK,EAAEA,KAAM;IACbG,QAAQ,EAAEC,4BAAc,CAACC,GAAI;IAC7BR,IAAI,EAAEA,IAAK;IACXS,SAAS,EAAEf,KAAK,CAAC,CAAE;IACnBgB,MAAM,eACF,IAAAC,gBAAA,EAACC,WAAI;MAACC,GAAG,EAAE,CAAE;MAACC,UAAU,EAAC,QAAQ;MAACL,SAAS,EAAEf,KAAK,CAAC,QAAQ,CAAE;MAAAqB,QAAA,gBACzD,IAAAJ,gBAAA,EAACK,WAAI;QAACC,KAAK,EAAC,WAAW;QAAAF,QAAA,GAAEd,EAAE,EAAC,GAAC;MAAA,CAAM,CAAC,eACpC,IAAAG,eAAA,EAACY,WAAI;QAACE,QAAQ;QAAAH,QAAA,EAAEb;MAAK,CAAO,CAAC;IAAA,CAC3B;EACT,CACJ,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -30,6 +30,8 @@ export type { NavigationDetailProps } from './NavigationDetail';
|
|
|
30
30
|
export { NavigationSchema, buildSchemaColumns, filterSchema } from './NavigationSchema';
|
|
31
31
|
export type { NavigationSchemaProps, NavigationSchemaViewConfig } from './NavigationSchema';
|
|
32
32
|
export { QueryStatistics } from './QueryStatistics';
|
|
33
|
+
export { QueryProgress } from './QueryProgress';
|
|
34
|
+
export type { QueryProgressProps, QueryProgressView } from './QueryProgress';
|
|
33
35
|
export type { QueryStatisticsColumn, QueryStatisticsColumnConfig, QueryStatisticsExtraColumn, QueryStatisticsExtraColumnContext, QueryStatisticsFormatValueContext, QueryStatisticsGroup, QueryStatisticsItem, QueryStatisticsMetric, QueryStatisticsProps, QueryStatisticsValues, } from './QueryStatistics';
|
|
34
36
|
export { NavigationPreview, buildPreviewColumns, filterPreviewRows } from './NavigationPreview';
|
|
35
37
|
export type { NavigationPreviewProps, NavigationPreviewViewConfig } from './NavigationPreview';
|
|
@@ -23,6 +23,7 @@ var _exportNames = {
|
|
|
23
23
|
buildSchemaColumns: true,
|
|
24
24
|
filterSchema: true,
|
|
25
25
|
QueryStatistics: true,
|
|
26
|
+
QueryProgress: true,
|
|
26
27
|
NavigationPreview: true,
|
|
27
28
|
buildPreviewColumns: true,
|
|
28
29
|
filterPreviewRows: true,
|
|
@@ -115,6 +116,12 @@ Object.defineProperty(exports, "QueriesList", {
|
|
|
115
116
|
return _QueriesList.QueriesList;
|
|
116
117
|
}
|
|
117
118
|
});
|
|
119
|
+
Object.defineProperty(exports, "QueryProgress", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () {
|
|
122
|
+
return _QueryProgress.QueryProgress;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
118
125
|
Object.defineProperty(exports, "QueryStatistics", {
|
|
119
126
|
enumerable: true,
|
|
120
127
|
get: function () {
|
|
@@ -228,6 +235,7 @@ var _NavigationItemsList = require("./NavigationItemsList");
|
|
|
228
235
|
var _NavigationDetail = require("./NavigationDetail");
|
|
229
236
|
var _NavigationSchema = require("./NavigationSchema");
|
|
230
237
|
var _QueryStatistics = require("./QueryStatistics");
|
|
238
|
+
var _QueryProgress = require("./QueryProgress");
|
|
231
239
|
var _NavigationPreview = require("./NavigationPreview");
|
|
232
240
|
var _NavigationMeta = require("./NavigationMeta");
|
|
233
241
|
var _NavigationView = require("./NavigationView");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_HistoryHeader","require","_HistoryLayout","_HistoryComparisonActions","_NavigationHeader","_RowsList","_QueriesList","_HistoryRow","_HistorySearchRow","_SavedQueryRow","_SavedQuerySearchRow","_ChartEditor","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Attachments","_TutorialRow","_TutorialSearchRow","_ClustersList","_NavigationItemsList","_NavigationDetail","_NavigationSchema","_QueryStatistics","_NavigationPreview","_NavigationMeta","_NavigationView"],"sources":["index.ts"],"sourcesContent":["export {HistoryHeader} from './HistoryHeader';\nexport {HistoryLayout} from './HistoryLayout';\nexport {HistoryComparisonActions} from './HistoryComparisonActions';\nexport type {HistoryComparisonActionsProps} from './HistoryComparisonActions';\nexport {NavigationHeader} from './NavigationHeader';\nexport type {NavigationHeaderProps} from './NavigationHeader';\nexport type {HistoryLayoutProps} from './HistoryLayout';\nexport {RowsList} from './RowsList';\nexport type {RowsListProps} from './RowsList';\nexport {QueriesList} from './QueriesList';\nexport type {QueriesListProps} from './QueriesList';\nexport {HistoryRow} from './HistoryRow';\nexport {HistorySearchRow} from './HistorySearchRow';\nexport {SavedQueryRow} from './SavedQueryRow';\nexport type {SavedQueryRowProps} from './SavedQueryRow';\nexport {SavedQuerySearchRow} from './SavedQuerySearchRow';\nexport type {SavedQuerySearchRowProps} from './SavedQuerySearchRow';\nexport * from './ChartEditor';\nexport * from './Attachments';\nexport {TutorialRow} from './TutorialRow';\nexport type {TutorialRowProps} from './TutorialRow';\nexport {TutorialSearchRow} from './TutorialSearchRow';\nexport type {TutorialSearchRowProps} from './TutorialSearchRow';\nexport {ClustersList} from './ClustersList';\nexport type {ClustersListProps} from './ClustersList';\nexport {NavigationItemsList} from './NavigationItemsList';\nexport type {NavigationItemsListProps} from './NavigationItemsList';\nexport {NavigationDetail} from './NavigationDetail';\nexport type {NavigationDetailProps} from './NavigationDetail';\nexport {NavigationSchema, buildSchemaColumns, filterSchema} from './NavigationSchema';\nexport type {NavigationSchemaProps, NavigationSchemaViewConfig} from './NavigationSchema';\nexport {QueryStatistics} from './QueryStatistics';\nexport type {\n QueryStatisticsColumn,\n QueryStatisticsColumnConfig,\n QueryStatisticsExtraColumn,\n QueryStatisticsExtraColumnContext,\n QueryStatisticsFormatValueContext,\n QueryStatisticsGroup,\n QueryStatisticsItem,\n QueryStatisticsMetric,\n QueryStatisticsProps,\n QueryStatisticsValues,\n} from './QueryStatistics';\nexport {NavigationPreview, buildPreviewColumns, filterPreviewRows} from './NavigationPreview';\nexport type {NavigationPreviewProps, NavigationPreviewViewConfig} from './NavigationPreview';\nexport {NavigationMeta, buildMetaGroups} from './NavigationMeta';\nexport type {NavigationMetaProps, NavigationMetaViewConfig} from './NavigationMeta';\nexport {NavigationView, buildViewColumns} from './NavigationView';\nexport type {NavigationViewProps, NavigationViewViewConfig} from './NavigationView';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_HistoryHeader","require","_HistoryLayout","_HistoryComparisonActions","_NavigationHeader","_RowsList","_QueriesList","_HistoryRow","_HistorySearchRow","_SavedQueryRow","_SavedQuerySearchRow","_ChartEditor","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Attachments","_TutorialRow","_TutorialSearchRow","_ClustersList","_NavigationItemsList","_NavigationDetail","_NavigationSchema","_QueryStatistics","_QueryProgress","_NavigationPreview","_NavigationMeta","_NavigationView"],"sources":["index.ts"],"sourcesContent":["export {HistoryHeader} from './HistoryHeader';\nexport {HistoryLayout} from './HistoryLayout';\nexport {HistoryComparisonActions} from './HistoryComparisonActions';\nexport type {HistoryComparisonActionsProps} from './HistoryComparisonActions';\nexport {NavigationHeader} from './NavigationHeader';\nexport type {NavigationHeaderProps} from './NavigationHeader';\nexport type {HistoryLayoutProps} from './HistoryLayout';\nexport {RowsList} from './RowsList';\nexport type {RowsListProps} from './RowsList';\nexport {QueriesList} from './QueriesList';\nexport type {QueriesListProps} from './QueriesList';\nexport {HistoryRow} from './HistoryRow';\nexport {HistorySearchRow} from './HistorySearchRow';\nexport {SavedQueryRow} from './SavedQueryRow';\nexport type {SavedQueryRowProps} from './SavedQueryRow';\nexport {SavedQuerySearchRow} from './SavedQuerySearchRow';\nexport type {SavedQuerySearchRowProps} from './SavedQuerySearchRow';\nexport * from './ChartEditor';\nexport * from './Attachments';\nexport {TutorialRow} from './TutorialRow';\nexport type {TutorialRowProps} from './TutorialRow';\nexport {TutorialSearchRow} from './TutorialSearchRow';\nexport type {TutorialSearchRowProps} from './TutorialSearchRow';\nexport {ClustersList} from './ClustersList';\nexport type {ClustersListProps} from './ClustersList';\nexport {NavigationItemsList} from './NavigationItemsList';\nexport type {NavigationItemsListProps} from './NavigationItemsList';\nexport {NavigationDetail} from './NavigationDetail';\nexport type {NavigationDetailProps} from './NavigationDetail';\nexport {NavigationSchema, buildSchemaColumns, filterSchema} from './NavigationSchema';\nexport type {NavigationSchemaProps, NavigationSchemaViewConfig} from './NavigationSchema';\nexport {QueryStatistics} from './QueryStatistics';\nexport {QueryProgress} from './QueryProgress';\nexport type {QueryProgressProps, QueryProgressView} from './QueryProgress';\nexport type {\n QueryStatisticsColumn,\n QueryStatisticsColumnConfig,\n QueryStatisticsExtraColumn,\n QueryStatisticsExtraColumnContext,\n QueryStatisticsFormatValueContext,\n QueryStatisticsGroup,\n QueryStatisticsItem,\n QueryStatisticsMetric,\n QueryStatisticsProps,\n QueryStatisticsValues,\n} from './QueryStatistics';\nexport {NavigationPreview, buildPreviewColumns, filterPreviewRows} from './NavigationPreview';\nexport type {NavigationPreviewProps, NavigationPreviewViewConfig} from './NavigationPreview';\nexport {NavigationMeta, buildMetaGroups} from './NavigationMeta';\nexport type {NavigationMetaProps, NavigationMetaViewConfig} from './NavigationMeta';\nexport {NavigationView, buildViewColumns} from './NavigationView';\nexport type {NavigationViewProps, NavigationViewViewConfig} from './NavigationView';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAGA,IAAAI,SAAA,GAAAJ,OAAA;AAEA,IAAAK,YAAA,GAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAEA,IAAAS,oBAAA,GAAAT,OAAA;AAEA,IAAAU,YAAA,GAAAV,OAAA;AAAAW,MAAA,CAAAC,IAAA,CAAAF,YAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,YAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,YAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,YAAA,GAAAvB,OAAA;AAAAW,MAAA,CAAAC,IAAA,CAAAW,YAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,YAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,YAAA,GAAAxB,OAAA;AAEA,IAAAyB,kBAAA,GAAAzB,OAAA;AAEA,IAAA0B,aAAA,GAAA1B,OAAA;AAEA,IAAA2B,oBAAA,GAAA3B,OAAA;AAEA,IAAA4B,iBAAA,GAAA5B,OAAA;AAEA,IAAA6B,iBAAA,GAAA7B,OAAA;AAEA,IAAA8B,gBAAA,GAAA9B,OAAA;AACA,IAAA+B,cAAA,GAAA/B,OAAA;AAcA,IAAAgC,kBAAA,GAAAhC,OAAA;AAEA,IAAAiC,eAAA,GAAAjC,OAAA;AAEA,IAAAkC,eAAA,GAAAlC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type QueryGraphNodeKind = 'operation' | 'input' | 'output';
|
|
3
|
+
export type QueryGraphOperationType = 'read' | 'map' | 'reduce' | 'map-reduce' | 'merge' | 'sort' | 'erase' | 'commit' | 'operation';
|
|
4
|
+
export type QueryGraphNodeStatus = 'not-started' | 'waiting' | 'running' | 'completed' | 'failed' | 'aborted';
|
|
5
|
+
export type QueryGraphJobCounts = {
|
|
6
|
+
total?: number;
|
|
7
|
+
pending?: number;
|
|
8
|
+
running?: number;
|
|
9
|
+
completed?: number;
|
|
10
|
+
failed?: number;
|
|
11
|
+
aborted?: number;
|
|
12
|
+
};
|
|
13
|
+
export type QueryGraphProgress = QueryGraphJobCounts & {
|
|
14
|
+
/** A value between 0 and 1. Takes precedence over completed / total. */
|
|
15
|
+
fraction?: number;
|
|
16
|
+
};
|
|
17
|
+
export type QueryGraphStage = {
|
|
18
|
+
name: string;
|
|
19
|
+
duration: number;
|
|
20
|
+
};
|
|
21
|
+
export type QueryGraphDetailValue = string | number | boolean | null | QueryGraphDetailValue[];
|
|
22
|
+
export type QueryGraphDetail = {
|
|
23
|
+
name: string;
|
|
24
|
+
value?: QueryGraphDetailValue;
|
|
25
|
+
children?: QueryGraphDetail[];
|
|
26
|
+
};
|
|
27
|
+
export type QueryGraphSchemaColumn = {
|
|
28
|
+
name: string;
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
export type QueryGraphSchema = {
|
|
32
|
+
name: string;
|
|
33
|
+
columns: QueryGraphSchemaColumn[];
|
|
34
|
+
};
|
|
35
|
+
export type QueryGraphNodePopup = {
|
|
36
|
+
stages?: QueryGraphStage[];
|
|
37
|
+
details?: QueryGraphDetail[];
|
|
38
|
+
jobs?: QueryGraphJobCounts;
|
|
39
|
+
inputs?: QueryGraphSchema[];
|
|
40
|
+
outputs?: QueryGraphSchema[];
|
|
41
|
+
};
|
|
42
|
+
export type QueryGraphNode = {
|
|
43
|
+
id: string;
|
|
44
|
+
kind: QueryGraphNodeKind;
|
|
45
|
+
name: string;
|
|
46
|
+
label?: string;
|
|
47
|
+
operationType?: QueryGraphOperationType;
|
|
48
|
+
/**
|
|
49
|
+
* Overrides the built-in operation icon. Canvas rendering supports static SVG React markup.
|
|
50
|
+
* Non-SVG content falls back to the icon selected by `operationType`.
|
|
51
|
+
*/
|
|
52
|
+
icon?: React.ReactNode;
|
|
53
|
+
status?: QueryGraphNodeStatus;
|
|
54
|
+
progress?: QueryGraphProgress;
|
|
55
|
+
popup?: QueryGraphNodePopup;
|
|
56
|
+
};
|
|
57
|
+
export type QueryGraphEdge = {
|
|
58
|
+
id: string;
|
|
59
|
+
source: string;
|
|
60
|
+
target: string;
|
|
61
|
+
};
|
|
62
|
+
export type QueryGraphRenderPopupContext = {
|
|
63
|
+
node: QueryGraphNode;
|
|
64
|
+
defaultContent: React.ReactNode;
|
|
65
|
+
};
|
|
66
|
+
export type QueryGraphProps = {
|
|
67
|
+
nodes: QueryGraphNode[];
|
|
68
|
+
edges: QueryGraphEdge[];
|
|
69
|
+
loading?: boolean;
|
|
70
|
+
errorContent?: React.ReactNode;
|
|
71
|
+
className?: string;
|
|
72
|
+
autoCenter?: boolean;
|
|
73
|
+
/** Pauses rendering while preserving the camera state. */
|
|
74
|
+
active?: boolean;
|
|
75
|
+
largeGraphThreshold?: number | false;
|
|
76
|
+
renderNodePopup?: (context: QueryGraphRenderPopupContext) => React.ReactNode;
|
|
77
|
+
onNodeClick?: (node: QueryGraphNode, event: MouseEvent) => void;
|
|
78
|
+
onError?: (error: Error) => void;
|
|
79
|
+
};
|
|
80
|
+
export type QueryProgressView = 'graph' | 'timeline';
|
|
81
|
+
export type QueryProgressProps = {
|
|
82
|
+
graphProps: QueryGraphProps;
|
|
83
|
+
view?: QueryProgressView;
|
|
84
|
+
defaultView?: QueryProgressView;
|
|
85
|
+
onViewChange?: (view: QueryProgressView) => void;
|
|
86
|
+
className?: string;
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["queryGraph.ts"],"sourcesContent":["import type React from 'react';\n\nexport type QueryGraphNodeKind = 'operation' | 'input' | 'output';\nexport type QueryGraphOperationType =\n 'read' | 'map' | 'reduce' | 'map-reduce' | 'merge' | 'sort' | 'erase' | 'commit' | 'operation';\nexport type QueryGraphNodeStatus =\n 'not-started' | 'waiting' | 'running' | 'completed' | 'failed' | 'aborted';\n\nexport type QueryGraphJobCounts = {\n total?: number;\n pending?: number;\n running?: number;\n completed?: number;\n failed?: number;\n aborted?: number;\n};\n\nexport type QueryGraphProgress = QueryGraphJobCounts & {\n /** A value between 0 and 1. Takes precedence over completed / total. */\n fraction?: number;\n};\n\nexport type QueryGraphStage = {name: string; duration: number};\nexport type QueryGraphDetailValue = string | number | boolean | null | QueryGraphDetailValue[];\nexport type QueryGraphDetail = {\n name: string;\n value?: QueryGraphDetailValue;\n children?: QueryGraphDetail[];\n};\nexport type QueryGraphSchemaColumn = {name: string; type: string};\nexport type QueryGraphSchema = {\n name: string;\n columns: QueryGraphSchemaColumn[];\n};\n\nexport type QueryGraphNodePopup = {\n stages?: QueryGraphStage[];\n details?: QueryGraphDetail[];\n jobs?: QueryGraphJobCounts;\n inputs?: QueryGraphSchema[];\n outputs?: QueryGraphSchema[];\n};\n\nexport type QueryGraphNode = {\n id: string;\n kind: QueryGraphNodeKind;\n name: string;\n label?: string;\n operationType?: QueryGraphOperationType;\n /**\n * Overrides the built-in operation icon. Canvas rendering supports static SVG React markup.\n * Non-SVG content falls back to the icon selected by `operationType`.\n */\n icon?: React.ReactNode;\n status?: QueryGraphNodeStatus;\n progress?: QueryGraphProgress;\n popup?: QueryGraphNodePopup;\n};\n\nexport type QueryGraphEdge = {id: string; source: string; target: string};\n\nexport type QueryGraphRenderPopupContext = {\n node: QueryGraphNode;\n defaultContent: React.ReactNode;\n};\n\nexport type QueryGraphProps = {\n nodes: QueryGraphNode[];\n edges: QueryGraphEdge[];\n loading?: boolean;\n errorContent?: React.ReactNode;\n className?: string;\n autoCenter?: boolean;\n /** Pauses rendering while preserving the camera state. */\n active?: boolean;\n largeGraphThreshold?: number | false;\n renderNodePopup?: (context: QueryGraphRenderPopupContext) => React.ReactNode;\n onNodeClick?: (node: QueryGraphNode, event: MouseEvent) => void;\n onError?: (error: Error) => void;\n};\n\nexport type QueryProgressView = 'graph' | 'timeline';\nexport type QueryProgressProps = {\n graphProps: QueryGraphProps;\n view?: QueryProgressView;\n defaultView?: QueryProgressView;\n onViewChange?: (view: QueryProgressView) => void;\n className?: string;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -19,8 +19,10 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
19
19
|
require("core-js/modules/es.string.replace.js");
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
var _uikit = require("@gravity-ui/uikit");
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var _ChartEditor = require("../../modules/ChartEditor");
|
|
23
|
+
var _AddChartButton = require("../../components/AddChartButton");
|
|
24
|
+
var _Chart = require("../../components/Chart");
|
|
25
|
+
var _Dashboard = require("../../components/Dashboard");
|
|
24
26
|
var _EmptyDashboardPlaceholder = require("./internal/EmptyDashboardPlaceholder");
|
|
25
27
|
var _chartTypeIcons = require("./helpers/chartTypeIcons");
|
|
26
28
|
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
@@ -123,7 +125,7 @@ var DashboardCharts = exports.DashboardCharts = function DashboardCharts(_ref) {
|
|
|
123
125
|
chartData = _ref2.chartData;
|
|
124
126
|
return {
|
|
125
127
|
id: id,
|
|
126
|
-
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
128
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chart.Chart, {
|
|
127
129
|
data: chartData,
|
|
128
130
|
controlsVisibility: "hover",
|
|
129
131
|
onPencilEdit: function onPencilEdit() {
|
|
@@ -147,7 +149,7 @@ var DashboardCharts = exports.DashboardCharts = function DashboardCharts(_ref) {
|
|
|
147
149
|
height: "100%",
|
|
148
150
|
gap: gap,
|
|
149
151
|
className: block(null, className),
|
|
150
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
152
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AddChartButton.AddChartButton, {
|
|
151
153
|
text: (0, _i18n.default)('action_add-chart'),
|
|
152
154
|
options: allowedCharts.map(function (chartType) {
|
|
153
155
|
return {
|
|
@@ -158,7 +160,7 @@ var DashboardCharts = exports.DashboardCharts = function DashboardCharts(_ref) {
|
|
|
158
160
|
}),
|
|
159
161
|
onSelect: handleChartSelect,
|
|
160
162
|
disabled: allowedCharts.length === 0
|
|
161
|
-
}), chartItems.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
163
|
+
}), chartItems.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dashboard.Dashboard, (0, _objectSpread2.default)({
|
|
162
164
|
items: dashboardItems,
|
|
163
165
|
defaultLayout: defaultLayout,
|
|
164
166
|
onLayoutChange: handleLayoutChange,
|
|
@@ -176,7 +178,7 @@ var DashboardCharts = exports.DashboardCharts = function DashboardCharts(_ref) {
|
|
|
176
178
|
},
|
|
177
179
|
contentOverflow: "auto",
|
|
178
180
|
contentClassName: block('modal'),
|
|
179
|
-
children: draftChart && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
181
|
+
children: draftChart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartEditor.ChartEditor, (0, _objectSpread2.default)({
|
|
180
182
|
chartSeriesMap: draftChart.chartSeries,
|
|
181
183
|
formValues: draftChart.formValues,
|
|
182
184
|
onSubmit: handleSubmitChart,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_uikit","_modules","_components","_EmptyDashboardPlaceholder","_chartTypeIcons","_i18n","_interopRequireDefault","_bemCnLite","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","block","cn","DashboardCharts","exports","_ref","customerChartsItems","chartItems","defaultLayout","dataSource","emptyTitle","emptyDescription","chartEditorProps","dashboardProps","onItemsChange","onLayoutChange","className","_ref$gap","gap","_useState","useState","_useState2","_slicedToArray","innerChartItems","setInnerChartItems","_useState3","_useState4","draftChart","setDraftChart","allowedCharts","useMemo","keys","handleChartSelect","chartType","chartSeries","dataIds","formValues","length","axisType","handleCancelDraft","handleSubmitChart","chart","_draftChart$id","newChart","id","crypto","randomUUID","replace","chartData","actualChartItems","map","ch","concat","_toConsumableArray","handleEditChart","useCallback","_chart$title","_chart$xAxis","_chart$yAxis","_chart$legend","_chart$xAxis2","_chart$xAxis3","series","data","type","selectedDataIds","s","seriesId","chartTitle","title","text","xTitle","xAxis","yTitle","yAxis","showLegend","legend","enabled","axisCategories","categories","handleDeleteChart","newChartItems","filter","item","handleLayoutChange","patchedLayout","dashboardItems","_ref2","content","_jsx","Chart","controlsVisibility","onPencilEdit","actions","i18n","onClick","_jsxs","React","Fragment","children","Flex","as","direction","width","height","AddChartButton","options","value","icon","CHART_TYPE_ICONS","onSelect","disabled","Dashboard","_objectSpread","items","EmptyDashboardPlaceholder","Modal","open","Boolean","onOpenChange","contentOverflow","contentClassName","ChartEditor","chartSeriesMap","onSubmit","onCancel","axisVariants","formProps","labels","submitLabel"],"sources":["DashboardCharts.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport {ChartSeries} from '@gravity-ui/charts';\nimport {Flex, Modal} from '@gravity-ui/uikit';\nimport {ChartEditor, ChartEditorProps} from '../../modules';\nimport {AddChartButton, Chart, Dashboard} from '../../components';\nimport {ChartData} from '../../modules/ChartEditor/types';\nimport type {DashboardChartsProps, DashboardItem} from './types';\nimport {EmptyDashboardPlaceholder} from './internal/EmptyDashboardPlaceholder';\nimport {CHART_TYPE_ICONS} from './helpers/chartTypeIcons';\nimport {ConfigLayout} from '@gravity-ui/dashkit';\nimport i18n from './i18n';\nimport cn from 'bem-cn-lite';\nimport './DashboardCharts.scss';\n\nconst block = cn('qp-dashboard-charts');\n\nexport const DashboardCharts = ({\n chartItems: customerChartsItems,\n defaultLayout,\n dataSource,\n emptyTitle,\n emptyDescription,\n chartEditorProps,\n dashboardProps,\n onItemsChange,\n onLayoutChange,\n className,\n gap = 1,\n}: DashboardChartsProps) => {\n const [innerChartItems, setInnerChartItems] = useState<DashboardItem[]>(\n customerChartsItems ?? [],\n );\n\n const chartItems = customerChartsItems ?? innerChartItems;\n\n const [draftChart, setDraftChart] = useState<{\n id?: string;\n chartSeries: ChartEditorProps['chartSeriesMap'];\n formValues: ChartEditorProps['formValues'];\n } | null>(null);\n\n const allowedCharts = useMemo(\n () => Object.keys(dataSource) as ChartSeries['type'][],\n [dataSource],\n );\n\n const handleChartSelect = (chartType: ChartSeries['type']) => {\n const chartSeries = dataSource[chartType];\n\n if (chartSeries) {\n const dataIds = Object.keys(chartSeries);\n\n setDraftChart({\n chartSeries,\n formValues: {\n dataIds: dataIds.length ? [dataIds[0]] : [],\n axisType: 'linear',\n },\n });\n }\n };\n\n const handleCancelDraft = () => {\n setDraftChart(null);\n };\n\n const handleSubmitChart = (chart: ChartData) => {\n if (!draftChart) return;\n\n const newChart = {\n id: draftChart.id ?? crypto.randomUUID().replace(/-/g, ''),\n chartData: chart,\n };\n\n const actualChartItems = draftChart.id\n ? chartItems.map((ch) => (ch.id === newChart.id ? newChart : ch))\n : [...chartItems, newChart];\n\n setDraftChart(null);\n setInnerChartItems(actualChartItems);\n onItemsChange?.(actualChartItems);\n };\n\n const handleEditChart = useCallback(\n (id: string, chart: DashboardItem['chartData']) => {\n const chartType = chart.series.data[0].type;\n const chartSeries = dataSource[chartType];\n\n if (!chartSeries) return;\n\n const selectedDataIds = chart.series.data.map((s) => s.seriesId);\n\n setDraftChart({\n id,\n chartSeries,\n formValues: {\n dataIds: selectedDataIds,\n chartTitle: chart.title?.text,\n xTitle: chart.xAxis?.title?.text,\n yTitle: chart.yAxis?.[0].title?.text,\n showLegend: chart?.legend?.enabled,\n axisType: chart.xAxis?.type,\n axisCategories: chart.xAxis?.categories,\n },\n });\n },\n [dataSource],\n );\n\n const handleDeleteChart = useCallback(\n (id: string) => {\n const newChartItems = chartItems.filter((item) => item.id !== id);\n\n setInnerChartItems(newChartItems);\n\n onItemsChange?.(newChartItems);\n },\n [chartItems, onItemsChange],\n );\n\n const handleLayoutChange = (patchedLayout: ConfigLayout[]) => {\n onLayoutChange?.(patchedLayout);\n };\n\n const dashboardItems = useMemo(\n () =>\n chartItems.map(({id, chartData}) => ({\n id,\n content: (\n <Chart\n key={id}\n data={chartData}\n controlsVisibility=\"hover\"\n onPencilEdit={() => handleEditChart(id, chartData)}\n actions={[\n {\n text: i18n('action_delete-chart'),\n onClick: () => handleDeleteChart(id),\n },\n ]}\n />\n ),\n })),\n [chartItems, handleEditChart, handleDeleteChart],\n );\n\n return (\n <React.Fragment>\n <Flex\n as=\"section\"\n direction=\"column\"\n width=\"100%\"\n height=\"100%\"\n gap={gap}\n className={block(null, className)}\n >\n <AddChartButton\n text={i18n('action_add-chart')}\n options={allowedCharts.map((chartType) => ({\n value: chartType,\n text: chartType,\n icon: CHART_TYPE_ICONS[chartType],\n }))}\n onSelect={handleChartSelect}\n disabled={allowedCharts.length === 0}\n />\n\n {chartItems.length > 0 ? (\n <Dashboard\n items={dashboardItems}\n defaultLayout={defaultLayout}\n onLayoutChange={handleLayoutChange}\n className={block('dashboard')}\n {...dashboardProps}\n />\n ) : (\n <EmptyDashboardPlaceholder\n emptyTitle={emptyTitle}\n emptyDescription={emptyDescription}\n />\n )}\n </Flex>\n\n <Modal\n open={Boolean(draftChart)}\n onOpenChange={(open) => {\n if (!open) {\n setDraftChart(null);\n }\n }}\n contentOverflow=\"auto\"\n contentClassName={block('modal')}\n >\n {draftChart && (\n <ChartEditor\n chartSeriesMap={draftChart.chartSeries}\n formValues={draftChart.formValues}\n onSubmit={handleSubmitChart}\n onCancel={handleCancelDraft}\n axisVariants={['linear', 'datetime', 'logarithmic']}\n formProps={{\n labels: {\n submitLabel: draftChart.id\n ? i18n('action_save-chart')\n : i18n('action_add-chart'),\n },\n }}\n {...chartEditor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EAAE5B,cAAe;QACtB9E,aAAa,EAAEA,aAAc;QAC7BO,cAAc,EAAEqE,kBAAmB;QACnCpE,SAAS,EAAEf,KAAK,CAAC,WAAW;MAAE,GAC1BY,cAAc,CACrB,CAAC,gBAEF,IAAA4E,eAAA,EAAC0B,oDAAyB;QACtBzG,UAAU,EAAEA,UAAW;QACvBC,gBAAgB,EAAEA;MAAiB,CACtC,CACJ;IAAA,CACC,CAAC,eAEP,IAAA8E,eAAA,EAAC2B,YAAK;MACFC,IAAI,EAAEC,OAAO,CAAC3F,UAAU,CAAE;MAC1B4F,YAAY,EAAE,SAAdA,YAAYA,CAAGF,IAAI,EAAK;QACpB,IAAI,CAACA,IAAI,EAAE;UACPzF,aAAa,CAAC,IAAI,CAAC;QACvB;MACJ,CAAE;MACF4F,eAAe,EAAC,MAAM;MACtBC,gBAAgB,EAAExH,KAAK,CAAC,OAAO,CAAE;MAAAkG,QAAA,EAEhCxE,UAAU,iBACP,IAAA8D,eAAA,EAACiC,oBAAW,MAAAT,sBAAA;QACRU,cAAc,EAAEhG,UAAU,CAACO,WAAY;QACvCE,UAAU,EAAET,UAAU,CAACS,UAAW;QAClCwF,QAAQ,EAAEpF,iBAAkB;QAC5BqF,QAAQ,EAAEtF,iBAAkB;QAC5BuF,YAAY,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAE;QACpDC,SAAS,EAAE;UACPC,MAAM,EAAE;YACJC,WAAW,EAAEtG,UAAU,CAACiB,EAAE,GACpB,IAAAkD,aAAI,EAAC,mBAAmB,CAAC,GACzB,IAAAA,aAAI,EAAC,kBAAkB;UACjC;QACJ;MAAE,GACElF,gBAAgB,CACvB;IACJ,CACE,CAAC;EAAA,CACI,CAAC;AAEzB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_uikit","_ChartEditor","_AddChartButton","_Chart","_Dashboard","_EmptyDashboardPlaceholder","_chartTypeIcons","_i18n","_interopRequireDefault","_bemCnLite","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","block","cn","DashboardCharts","exports","_ref","customerChartsItems","chartItems","defaultLayout","dataSource","emptyTitle","emptyDescription","chartEditorProps","dashboardProps","onItemsChange","onLayoutChange","className","_ref$gap","gap","_useState","useState","_useState2","_slicedToArray","innerChartItems","setInnerChartItems","_useState3","_useState4","draftChart","setDraftChart","allowedCharts","useMemo","keys","handleChartSelect","chartType","chartSeries","dataIds","formValues","length","axisType","handleCancelDraft","handleSubmitChart","chart","_draftChart$id","newChart","id","crypto","randomUUID","replace","chartData","actualChartItems","map","ch","concat","_toConsumableArray","handleEditChart","useCallback","_chart$title","_chart$xAxis","_chart$yAxis","_chart$legend","_chart$xAxis2","_chart$xAxis3","series","data","type","selectedDataIds","s","seriesId","chartTitle","title","text","xTitle","xAxis","yTitle","yAxis","showLegend","legend","enabled","axisCategories","categories","handleDeleteChart","newChartItems","filter","item","handleLayoutChange","patchedLayout","dashboardItems","_ref2","content","_jsx","Chart","controlsVisibility","onPencilEdit","actions","i18n","onClick","_jsxs","React","Fragment","children","Flex","as","direction","width","height","AddChartButton","options","value","icon","CHART_TYPE_ICONS","onSelect","disabled","Dashboard","_objectSpread","items","EmptyDashboardPlaceholder","Modal","open","Boolean","onOpenChange","contentOverflow","contentClassName","ChartEditor","chartSeriesMap","onSubmit","onCancel","axisVariants","formProps","labels","submitLabel"],"sources":["DashboardCharts.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport type {ChartSeries} from '@gravity-ui/charts';\nimport {Flex, Modal} from '@gravity-ui/uikit';\nimport {ChartEditor} from '../../modules/ChartEditor';\nimport type {ChartEditorProps} from '../../modules/ChartEditor';\nimport {AddChartButton} from '../../components/AddChartButton';\nimport {Chart} from '../../components/Chart';\nimport {Dashboard} from '../../components/Dashboard';\nimport type {ChartData} from '../../modules/ChartEditor/types';\nimport type {DashboardChartsProps, DashboardItem} from './types';\nimport {EmptyDashboardPlaceholder} from './internal/EmptyDashboardPlaceholder';\nimport {CHART_TYPE_ICONS} from './helpers/chartTypeIcons';\nimport type {ConfigLayout} from '@gravity-ui/dashkit';\nimport i18n from './i18n';\nimport cn from 'bem-cn-lite';\nimport './DashboardCharts.scss';\n\nconst block = cn('qp-dashboard-charts');\n\nexport const DashboardCharts = ({\n chartItems: customerChartsItems,\n defaultLayout,\n dataSource,\n emptyTitle,\n emptyDescription,\n chartEditorProps,\n dashboardProps,\n onItemsChange,\n onLayoutChange,\n className,\n gap = 1,\n}: DashboardChartsProps) => {\n const [innerChartItems, setInnerChartItems] = useState<DashboardItem[]>(\n customerChartsItems ?? [],\n );\n\n const chartItems = customerChartsItems ?? innerChartItems;\n\n const [draftChart, setDraftChart] = useState<{\n id?: string;\n chartSeries: ChartEditorProps['chartSeriesMap'];\n formValues: ChartEditorProps['formValues'];\n } | null>(null);\n\n const allowedCharts = useMemo(\n () => Object.keys(dataSource) as ChartSeries['type'][],\n [dataSource],\n );\n\n const handleChartSelect = (chartType: ChartSeries['type']) => {\n const chartSeries = dataSource[chartType];\n\n if (chartSeries) {\n const dataIds = Object.keys(chartSeries);\n\n setDraftChart({\n chartSeries,\n formValues: {\n dataIds: dataIds.length ? [dataIds[0]] : [],\n axisType: 'linear',\n },\n });\n }\n };\n\n const handleCancelDraft = () => {\n setDraftChart(null);\n };\n\n const handleSubmitChart = (chart: ChartData) => {\n if (!draftChart) return;\n\n const newChart = {\n id: draftChart.id ?? crypto.randomUUID().replace(/-/g, ''),\n chartData: chart,\n };\n\n const actualChartItems = draftChart.id\n ? chartItems.map((ch) => (ch.id === newChart.id ? newChart : ch))\n : [...chartItems, newChart];\n\n setDraftChart(null);\n setInnerChartItems(actualChartItems);\n onItemsChange?.(actualChartItems);\n };\n\n const handleEditChart = useCallback(\n (id: string, chart: DashboardItem['chartData']) => {\n const chartType = chart.series.data[0].type;\n const chartSeries = dataSource[chartType];\n\n if (!chartSeries) return;\n\n const selectedDataIds = chart.series.data.map((s) => s.seriesId);\n\n setDraftChart({\n id,\n chartSeries,\n formValues: {\n dataIds: selectedDataIds,\n chartTitle: chart.title?.text,\n xTitle: chart.xAxis?.title?.text,\n yTitle: chart.yAxis?.[0].title?.text,\n showLegend: chart?.legend?.enabled,\n axisType: chart.xAxis?.type,\n axisCategories: chart.xAxis?.categories,\n },\n });\n },\n [dataSource],\n );\n\n const handleDeleteChart = useCallback(\n (id: string) => {\n const newChartItems = chartItems.filter((item) => item.id !== id);\n\n setInnerChartItems(newChartItems);\n\n onItemsChange?.(newChartItems);\n },\n [chartItems, onItemsChange],\n );\n\n const handleLayoutChange = (patchedLayout: ConfigLayout[]) => {\n onLayoutChange?.(patchedLayout);\n };\n\n const dashboardItems = useMemo(\n () =>\n chartItems.map(({id, chartData}) => ({\n id,\n content: (\n <Chart\n key={id}\n data={chartData}\n controlsVisibility=\"hover\"\n onPencilEdit={() => handleEditChart(id, chartData)}\n actions={[\n {\n text: i18n('action_delete-chart'),\n onClick: () => handleDeleteChart(id),\n },\n ]}\n />\n ),\n })),\n [chartItems, handleEditChart, handleDeleteChart],\n );\n\n return (\n <React.Fragment>\n <Flex\n as=\"section\"\n direction=\"column\"\n width=\"100%\"\n height=\"100%\"\n gap={gap}\n className={block(null, className)}\n >\n <AddChartButton\n text={i18n('action_add-chart')}\n options={allowedCharts.map((chartType) => ({\n value: chartType,\n text: chartType,\n icon: CHART_TYPE_ICONS[chartType],\n }))}\n onSelect={handleChartSelect}\n disabled={allowedCharts.length === 0}\n />\n\n {chartItems.length > 0 ? (\n <Dashboard\n items={dashboardItems}\n defaultLayout={defaultLayout}\n onLayoutChange={handleLayoutChange}\n className={block('dashboard')}\n {...dashboardProps}\n />\n ) : (\n <EmptyDashboardPlaceholder\n emptyTitle={emptyTitle}\n emptyDescription={emptyDescription}\n />\n )}\n </Flex>\n\n <Modal\n open={Boolean(draftChart)}\n onOpenChange={(open) => {\n if (!open) {\n setDraftChart(null);\n }\n }}\n contentOverflow=\"auto\"\n contentClassName={block('modal')}\n >\n {draftChart && (\n <ChartEditor\n chartSeriesMap={draftChart.chartSeries}\n formValues={draftChart.formValues}\n onSubmit={handleSubmitChart}\n onCancel={handleCancelDraft}\n axisVariants={['linear', 'datetime', 'logarithmic']}\n formProps={{\n labels: {\n submitLabel: draftChart.id\n ? i18n('action_save-chart')\n : i18n('action_add-chart'),\n },\n }}\n {...chartEditorProps}\n />\n )}\n </Modal>\n </React.Fragment>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAGA,IAAAM,0BAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AAEA,IAAAQ,KAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,UAAA,GAAAD,sBAAA,CAAAT,OAAA;AACAA,OAAA;AAAgC,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAD,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,CAAAa,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,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AAEtG,UAAU,CAACiB,EAAE,GACpB,IAAAkD,aAAI,EAAC,mBAAmB,CAAC,GACzB,IAAAA,aAAI,EAAC,kBAAkB;UACjC;QACJ;MAAE,GACElF,gBAAgB,CACvB;IACJ,CACE,CAAC;EAAA,CACI,CAAC;AAEzB,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DashboardProps } from '../../components';
|
|
1
|
+
import type { DashboardProps } from '../../components/Dashboard';
|
|
2
2
|
import type { ConfigLayout } from '@gravity-ui/dashkit';
|
|
3
3
|
import type { ChartData, ChartSeries } from '../../modules/ChartEditor/types';
|
|
4
|
-
import { ChartEditorProps } from '../../modules';
|
|
5
|
-
import { FlexProps } from '@gravity-ui/uikit';
|
|
4
|
+
import type { ChartEditorProps } from '../../modules/ChartEditor';
|
|
5
|
+
import type { FlexProps } from '@gravity-ui/uikit';
|
|
6
6
|
export type DashboardItem = {
|
|
7
7
|
id: string;
|
|
8
8
|
chartData: ChartData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {DashboardProps} from '../../components';\nimport type {ConfigLayout} from '@gravity-ui/dashkit';\nimport type {ChartData, ChartSeries} from '../../modules/ChartEditor/types';\nimport {ChartEditorProps} from '../../modules';\nimport {FlexProps} from '@gravity-ui/uikit';\n\nexport type DashboardItem = {\n id: string;\n chartData: ChartData;\n};\n\nexport type DashboardChartsProps = {\n dataSource: {\n [chartType in ChartSeries['type']]?: ChartEditorProps['chartSeriesMap'];\n };\n\n emptyTitle?: string;\n emptyDescription?: string;\n className?: string;\n gap?: FlexProps['gap'];\n\n chartEditorProps?: Omit<ChartEditorProps, 'onSubmit' | 'onCancel' | 'chartSeriesMap'>;\n dashboardProps?: Pick<DashboardProps, 'grid' | 'focusable' | 'className'>;\n\n chartItems?: DashboardItem[];\n defaultLayout?: DashboardProps['defaultLayout'];\n\n onItemsChange?: (items: DashboardItem[]) => void;\n onLayoutChange?: (layout: ConfigLayout[]) => void;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {DashboardProps} from '../../components/Dashboard';\nimport type {ConfigLayout} from '@gravity-ui/dashkit';\nimport type {ChartData, ChartSeries} from '../../modules/ChartEditor/types';\nimport type {ChartEditorProps} from '../../modules/ChartEditor';\nimport type {FlexProps} from '@gravity-ui/uikit';\n\nexport type DashboardItem = {\n id: string;\n chartData: ChartData;\n};\n\nexport type DashboardChartsProps = {\n dataSource: {\n [chartType in ChartSeries['type']]?: ChartEditorProps['chartSeriesMap'];\n };\n\n emptyTitle?: string;\n emptyDescription?: string;\n className?: string;\n gap?: FlexProps['gap'];\n\n chartEditorProps?: Omit<ChartEditorProps, 'onSubmit' | 'onCancel' | 'chartSeriesMap'>;\n dashboardProps?: Pick<DashboardProps, 'grid' | 'focusable' | 'className'>;\n\n chartItems?: DashboardItem[];\n defaultLayout?: DashboardProps['defaultLayout'];\n\n onItemsChange?: (items: DashboardItem[]) => void;\n onLayoutChange?: (layout: ConfigLayout[]) => void;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
13
13
|
require("core-js/modules/es.string.search.js");
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
16
|
-
var
|
|
16
|
+
var _QueriesList = require("../../modules/QueriesList");
|
|
17
17
|
var _HistoryRowContent = require("./internal/HistoryRowContent");
|
|
18
18
|
require("./QueriesHistory.css");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -37,7 +37,7 @@ var QueriesHistory = exports.QueriesHistory = function QueriesHistory(_ref) {
|
|
|
37
37
|
onLoadMore = _ref.onLoadMore,
|
|
38
38
|
renderLink = _ref.renderLink,
|
|
39
39
|
className = _ref.className;
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueriesList.QueriesList, {
|
|
41
41
|
className: block(null, className),
|
|
42
42
|
title: title,
|
|
43
43
|
logo: logo,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_bemCnLite","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_bemCnLite","_QueriesList","_HistoryRowContent","_jsxRuntime","e","__esModule","default","block","cn","QueriesHistory","exports","_ref","title","logo","search","filter","items","selectedRowId","editing","comparison","visibleFields","renderRowItem","getRowActions","onListItemClick","hasMore","loading","onLoadMore","renderLink","className","_jsx","QueriesList","renderRow","data","HistoryRowContent","_objectSpread"],"sources":["QueriesHistory.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {QueriesList} from '../../modules/QueriesList';\nimport {\n QueryListComparisonConfig,\n QueryListEditingConfig,\n QueryListFilterConfig,\n QueryListItem,\n QueryListLinkRenderer,\n QueryListRowAction,\n QueryListRowRenderData,\n QueryListSearchConfig,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {QueryHistoryRow} from '../../types/history';\nimport {HistoryRowContent} from './internal/HistoryRowContent';\nimport './QueriesHistory.scss';\n\nexport type QueriesHistoryProps<T extends QueryHistoryRow = QueryHistoryRow> = {\n className?: string;\n title?: string;\n logo?: React.ReactNode;\n search: QueryListSearchConfig;\n filter?: QueryListFilterConfig;\n items: QueryListItem<T>[];\n selectedRowId?: T['id'];\n editing?: QueryListEditingConfig<T>;\n comparison?: QueryListComparisonConfig<T>;\n visibleFields?: QueryListVisibleFieldsConfig<T>;\n renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n getRowActions?: (item: T) => QueryListRowAction<T>[];\n onListItemClick?: (item: QueryListItem<T>) => void;\n hasMore?: boolean;\n loading?: boolean;\n onLoadMore?: () => void;\n renderLink?: QueryListLinkRenderer;\n};\n\nconst block = cn('qp-query-history');\n\nexport const QueriesHistory = <T extends QueryHistoryRow>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n editing,\n comparison,\n visibleFields,\n renderRowItem,\n getRowActions,\n onListItemClick,\n hasMore,\n loading,\n onLoadMore,\n renderLink,\n className,\n}: QueriesHistoryProps<T>) => {\n return (\n <QueriesList\n className={block(null, className)}\n title={title}\n logo={logo}\n search={search}\n filter={filter}\n items={items}\n selectedRowId={selectedRowId}\n visibleFields={visibleFields}\n editing={editing}\n comparison={comparison}\n getRowActions={getRowActions}\n renderRow={(data) =>\n renderRowItem ? renderRowItem(data) : <HistoryRowContent {...data} />\n }\n onListItemClick={onListItemClick}\n hasMore={hasMore}\n loading={loading}\n onLoadMore={onLoadMore}\n renderLink={renderLink}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAaA,IAAAG,kBAAA,GAAAH,OAAA;AACAA,OAAA;AAA+B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAsB/B,IAAMG,KAAK,GAAG,IAAAC,kBAAE,EAAC,kBAAkB,CAAC;AAE7B,IAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAAE,IAAA,EAkBG;EAAA,IAjB1BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACb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/helpers/objectSpread2"));
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _HistoryGroupHeader = require("../../../components/HistoryGroupHeader");
|
|
11
|
+
var _HistoryRow = require("../../../modules/HistoryRow");
|
|
12
|
+
var _HistorySearchRow = require("../../../modules/HistorySearchRow");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
var _excluded = ["variant"];
|
|
@@ -17,13 +18,13 @@ var HistoryRowContent = exports.HistoryRowContent = function HistoryRowContent(_
|
|
|
17
18
|
data = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
19
|
var item = data.item;
|
|
19
20
|
if ('header' in item) {
|
|
20
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HistoryGroupHeader.HistoryGroupHeader, {
|
|
21
22
|
title: item.header
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
return variant === 'search' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
25
|
+
return variant === 'search' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_HistorySearchRow.HistorySearchRow, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
25
26
|
item: item
|
|
26
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
27
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_HistoryRow.HistoryRow, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
27
28
|
item: item
|
|
28
29
|
}));
|
|
29
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_HistoryGroupHeader","_HistoryRow","_HistorySearchRow","_jsxRuntime","e","__esModule","default","HistoryRowContent","exports","_ref","variant","data","_objectWithoutProperties","_excluded","item","_jsx","HistoryGroupHeader","title","header","HistorySearchRow","_objectSpread","HistoryRow"],"sources":["HistoryRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryGroupHeader} from '../../../components/HistoryGroupHeader';\nimport {HistoryRow} from '../../../modules/HistoryRow';\nimport {HistorySearchRow} from '../../../modules/HistorySearchRow';\nimport {QueryListRowRenderData} from '../../../types/queryList';\nimport {QueryHistoryRow} from '../../../types/history';\n\nexport const HistoryRowContent = <T extends QueryHistoryRow>({\n variant,\n ...data\n}: QueryListRowRenderData<T>) => {\n const {item} = data;\n\n if ('header' in item) {\n return <HistoryGroupHeader title={item.header} />;\n }\n\n return variant === 'search' ? (\n <HistorySearchRow {...data} item={item} />\n ) : (\n <HistoryRow {...data} item={item} />\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAAmE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;;AAI5D,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,SAApBA,iBAAiBA,CAAAE,IAAA,EAGG;EAAA,IAF7BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACJC,IAAI,OAAAC,iCAAA,EAAAH,IAAA,EAAAI,SAAA;EAEP,IAAOC,IAAI,GAAIH,IAAI,CAAZG,IAAI;EAEX,IAAI,QAAQ,IAAIA,IAAI,EAAE;IAClB,oBAAO,IAAAC,eAAA,EAACC,sCAAkB;MAACC,KAAK,EAAEH,IAAI,CAACI;IAAO,CAAE,CAAC;EACrD;EAEA,OAAOR,OAAO,KAAK,QAAQ,gBACvB,IAAAK,eAAA,EAACI,kCAAgB,MAAAC,sBAAA,MAAAA,sBAAA,MAAKT,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CAAC,gBAE1C,IAAAC,eAAA,EAACM,sBAAU,MAAAD,sBAAA,MAAAA,sBAAA,MAAKT,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CACtC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NavigationCluster, NavigationDetailPanelConfig, NavigationHeaderConfig, NavigationItem, NavigationListStateConfig, NavigationLocation, NavigationSearchConfig, NavigationSortConfig, RenderNavigationCluster, RenderNavigationItem } from '../../types/navigation';
|
|
2
|
+
import type { NavigationCluster, NavigationDetailPanelConfig, NavigationHeaderConfig, NavigationItem, NavigationListStateConfig, NavigationLocation, NavigationSearchConfig, NavigationSortConfig, RenderNavigationCluster, RenderNavigationItem } from '../../types/navigation';
|
|
3
3
|
import './QueriesNavigation.scss';
|
|
4
4
|
export type QueriesNavigationProps<TItem extends NavigationItem = NavigationItem, TCluster extends NavigationCluster = NavigationCluster> = {
|
|
5
5
|
location: NavigationLocation;
|
|
@@ -9,8 +9,12 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
9
9
|
require("core-js/modules/es.string.search.js");
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _uikit = require("@gravity-ui/uikit");
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var _ClustersList = require("../../modules/ClustersList");
|
|
13
|
+
var _NavigationDetail = require("../../modules/NavigationDetail");
|
|
14
|
+
var _NavigationHeader = require("../../modules/NavigationHeader");
|
|
15
|
+
var _NavigationItemsList = require("../../modules/NavigationItemsList");
|
|
16
|
+
var _EmptyContent = require("../../components/EmptyContent");
|
|
17
|
+
var _SearchWithButtons = require("../../components/SearchWithButtons");
|
|
14
18
|
var _createEmptyDetailConfig = require("./helpers/createEmptyDetailConfig");
|
|
15
19
|
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
16
20
|
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
@@ -112,7 +116,7 @@ var QueriesNavigation = exports.QueriesNavigation = function QueriesNavigation(_
|
|
|
112
116
|
onItemClick === null || onItemClick === void 0 || onItemClick(item);
|
|
113
117
|
};
|
|
114
118
|
if (body.type === 'details') {
|
|
115
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationDetail.NavigationDetail, {
|
|
116
120
|
config: body.config,
|
|
117
121
|
location: {
|
|
118
122
|
cluster: location.cluster,
|
|
@@ -132,27 +136,27 @@ var QueriesNavigation = exports.QueriesNavigation = function QueriesNavigation(_
|
|
|
132
136
|
direction: "column",
|
|
133
137
|
gap: 1,
|
|
134
138
|
className: block(null, className),
|
|
135
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
139
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationHeader.NavigationHeader, {
|
|
136
140
|
location: location,
|
|
137
141
|
actions: actions,
|
|
138
142
|
onUpdate: handleNavigate,
|
|
139
143
|
onLoadSuggestions: onLoadSuggestions
|
|
140
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchWithButtons.SearchWithButtons, {
|
|
141
145
|
placeholder: (0, _i18n.default)('field_search-placeholder'),
|
|
142
146
|
value: searchValue,
|
|
143
147
|
onUpdate: onSearchUpdate
|
|
144
|
-
}), body.type === 'clusters' || body.type === 'loading' && !location.cluster ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
148
|
+
}), body.type === 'clusters' || body.type === 'loading' && !location.cluster ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClustersList.ClustersList, {
|
|
145
149
|
items: clusters,
|
|
146
150
|
loading: loading,
|
|
147
151
|
error: resolvedErrorContent,
|
|
148
152
|
hasMore: hasMore,
|
|
149
153
|
onLoadMore: onLoadMore,
|
|
150
|
-
emptyContent: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
154
|
+
emptyContent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyContent.EmptyContent, {
|
|
151
155
|
variant: searchValue ? 'nothing-found' : 'no-clusters'
|
|
152
156
|
}),
|
|
153
157
|
renderRowItem: renderClusterItem,
|
|
154
158
|
onItemClick: handleClusterClick
|
|
155
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
159
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_NavigationItemsList.NavigationItemsList, {
|
|
156
160
|
items: items,
|
|
157
161
|
path: location.path,
|
|
158
162
|
search: searchValue,
|
|
@@ -163,7 +167,7 @@ var QueriesNavigation = exports.QueriesNavigation = function QueriesNavigation(_
|
|
|
163
167
|
error: resolvedErrorContent,
|
|
164
168
|
hasMore: hasMore,
|
|
165
169
|
onLoadMore: onLoadMore,
|
|
166
|
-
emptyContent: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
170
|
+
emptyContent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyContent.EmptyContent, {
|
|
167
171
|
variant: searchValue ? 'nothing-found' : 'no-files'
|
|
168
172
|
}),
|
|
169
173
|
renderRowItem: renderNavigationItem,
|