@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import "core-js/modules/es.array.iterator.js";
|
|
3
|
+
import "core-js/modules/es.map.js";
|
|
4
|
+
import "core-js/modules/es.object.to-string.js";
|
|
5
|
+
import "core-js/modules/es.string.iterator.js";
|
|
6
|
+
import "core-js/modules/es.string.starts-with.js";
|
|
7
|
+
import "core-js/modules/es.weak-map.js";
|
|
8
|
+
import "core-js/modules/esnext.map.get-or-insert.js";
|
|
9
|
+
import "core-js/modules/esnext.map.get-or-insert-computed.js";
|
|
10
|
+
import "core-js/modules/esnext.weak-map.get-or-insert.js";
|
|
11
|
+
import "core-js/modules/esnext.weak-map.get-or-insert-computed.js";
|
|
12
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { CircleCheck, CircleMinus, CirclePlay, CircleXmark, CodeCommit, CodeMerge, Eraser, LayoutHeaderCellsLarge, ListTimeline, Molecule, Shuffle } from '@gravity-ui/icons';
|
|
15
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
// Map, Reduce and MapReduce paths are adapted from the corresponding neutral
|
|
18
|
+
// operation icons in ytsaurus/ytsaurus-ui (Apache-2.0).
|
|
19
|
+
var MapOperationIcon = function MapOperationIcon(props) {
|
|
20
|
+
return /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({
|
|
21
|
+
width: "16",
|
|
22
|
+
height: "16",
|
|
23
|
+
viewBox: "0 0 16 16",
|
|
24
|
+
fill: "none",
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
26
|
+
}, props), {}, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
d: "M3 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M2.25.5a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5M3 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 3 8m-.75-2.25a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5M3 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M2.25 11a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m11.5-8a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5m0-2.5a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5m0-3a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m.75 7.5a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m-.75-2.25a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5"
|
|
31
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
32
|
+
d: "M4 2.8h8M4 8h8m-5-2.5L9.5 8 7 10.5m-3 2.8h8",
|
|
33
|
+
stroke: "currentColor",
|
|
34
|
+
strokeWidth: "1.5",
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeLinejoin: "round"
|
|
37
|
+
})]
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
var ReduceOperationIcon = function ReduceOperationIcon(props) {
|
|
41
|
+
return /*#__PURE__*/_jsx("svg", _objectSpread(_objectSpread({
|
|
42
|
+
width: "16",
|
|
43
|
+
height: "16",
|
|
44
|
+
viewBox: "0 0 16 16",
|
|
45
|
+
fill: "none",
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
47
|
+
}, props), {}, {
|
|
48
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
49
|
+
fill: "currentColor",
|
|
50
|
+
fillRule: "evenodd",
|
|
51
|
+
d: "M4 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M3.25.5a2.25 2.25 0 0 1 2.122 1.5h.378a3 3 0 0 1 3 3v2.25h3.94l-1.22-1.22a.75.75 0 0 1 1.06-1.06l2.5 2.5a.75.75 0 0 1 0 1.06l-2.5 2.5a.75.75 0 1 1-1.06-1.06l1.22-1.22H8.75V11a3 3 0 0 1-3 3h-.378a2.25 2.25 0 1 1 0-1.5h.378A1.5 1.5 0 0 0 7.25 11V8.75H5.372a2.25 2.25 0 1 1 0-1.5H7.25V5a1.5 1.5 0 0 0-1.5-1.5h-.378A2.25 2.25 0 1 1 3.25.5M4 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 4 8m0 5.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0"
|
|
52
|
+
})
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
var MapReduceOperationIcon = function MapReduceOperationIcon(props) {
|
|
56
|
+
return /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({
|
|
57
|
+
width: "16",
|
|
58
|
+
height: "16",
|
|
59
|
+
viewBox: "0 0 16 16",
|
|
60
|
+
fill: "none",
|
|
61
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
62
|
+
}, props), {}, {
|
|
63
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
64
|
+
fill: "currentColor",
|
|
65
|
+
fillRule: "evenodd",
|
|
66
|
+
d: "M3 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M4.372 3.5A2.25 2.25 0 1 1 4.372 2H6.25a3 3 0 0 1 3 3v.896A2.25 2.25 0 0 1 10.572 7.25H14a.75.75 0 0 1 0 1.5h-3.428A2.25 2.25 0 0 1 9.25 10.104V11a3 3 0 0 1-3 3H4.372a2.25 2.25 0 1 1 0-1.5H6.25a1.5 1.5 0 0 0 1.5-1.5v-.861a2.25 2.25 0 0 1-1.423-1.393L6.25 8.75H4.372a2.25 2.25 0 1 1 0-1.5H6.25l.077.004A2.25 2.25 0 0 1 7.75 5.861V5a1.5 1.5 0 0 0-1.5-1.5zM3 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 3 8m0 5.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M9.2 8a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0"
|
|
67
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
68
|
+
d: "M12.5 5.5 15 8l-2.5 2.5",
|
|
69
|
+
stroke: "currentColor",
|
|
70
|
+
strokeWidth: "1.5",
|
|
71
|
+
strokeLinecap: "round",
|
|
72
|
+
strokeLinejoin: "round"
|
|
73
|
+
})]
|
|
74
|
+
}));
|
|
75
|
+
};
|
|
76
|
+
var operationIcons = {
|
|
77
|
+
read: ListTimeline,
|
|
78
|
+
map: MapOperationIcon,
|
|
79
|
+
reduce: ReduceOperationIcon,
|
|
80
|
+
'map-reduce': MapReduceOperationIcon,
|
|
81
|
+
merge: CodeMerge,
|
|
82
|
+
sort: Shuffle,
|
|
83
|
+
erase: Eraser,
|
|
84
|
+
commit: CodeCommit,
|
|
85
|
+
operation: Molecule
|
|
86
|
+
};
|
|
87
|
+
var statusIcons = {
|
|
88
|
+
running: CirclePlay,
|
|
89
|
+
completed: CircleCheck,
|
|
90
|
+
failed: CircleXmark,
|
|
91
|
+
aborted: CircleMinus
|
|
92
|
+
};
|
|
93
|
+
var statusIconSvgCache = new Map();
|
|
94
|
+
var defaultIconSvgCache = new Map();
|
|
95
|
+
var customIconSvgCache = new WeakMap();
|
|
96
|
+
export function getDefaultQueryGraphNodeIcon(node) {
|
|
97
|
+
var _node$operationType;
|
|
98
|
+
var IconComponent = node.kind === 'operation' ? operationIcons[(_node$operationType = node.operationType) !== null && _node$operationType !== void 0 ? _node$operationType : 'operation'] : LayoutHeaderCellsLarge;
|
|
99
|
+
return /*#__PURE__*/_jsx(IconComponent, {});
|
|
100
|
+
}
|
|
101
|
+
export function getQueryGraphNodeIcon(node) {
|
|
102
|
+
return /*#__PURE__*/React.isValidElement(node.icon) && queryGraphIconToSvg(node.icon) ? node.icon : getDefaultQueryGraphNodeIcon(node);
|
|
103
|
+
}
|
|
104
|
+
export function getQueryGraphNodeIconSvgs(node) {
|
|
105
|
+
var _node$operationType2;
|
|
106
|
+
var defaultKey = node.kind === 'operation' ? "operation:".concat((_node$operationType2 = node.operationType) !== null && _node$operationType2 !== void 0 ? _node$operationType2 : 'operation') : 'resource';
|
|
107
|
+
var defaultIconColorToken = '--g-color-text-misc';
|
|
108
|
+
var fallbackIconSvg = defaultIconSvgCache.get(defaultKey);
|
|
109
|
+
if (!fallbackIconSvg) {
|
|
110
|
+
var _queryGraphIconToSvg;
|
|
111
|
+
fallbackIconSvg = (_queryGraphIconToSvg = queryGraphIconToSvg(getDefaultQueryGraphNodeIcon(node))) !== null && _queryGraphIconToSvg !== void 0 ? _queryGraphIconToSvg : '';
|
|
112
|
+
defaultIconSvgCache.set(defaultKey, fallbackIconSvg);
|
|
113
|
+
}
|
|
114
|
+
if (! /*#__PURE__*/React.isValidElement(node.icon)) {
|
|
115
|
+
return {
|
|
116
|
+
iconSvg: fallbackIconSvg,
|
|
117
|
+
fallbackIconSvg: fallbackIconSvg,
|
|
118
|
+
iconColorToken: defaultIconColorToken,
|
|
119
|
+
fallbackIconColorToken: defaultIconColorToken
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
var iconSvg = customIconSvgCache.get(node.icon);
|
|
123
|
+
if (!customIconSvgCache.has(node.icon)) {
|
|
124
|
+
iconSvg = queryGraphIconToSvg(node.icon);
|
|
125
|
+
customIconSvgCache.set(node.icon, iconSvg);
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
iconSvg: iconSvg !== null && iconSvg !== void 0 ? iconSvg : fallbackIconSvg,
|
|
129
|
+
fallbackIconSvg: fallbackIconSvg,
|
|
130
|
+
iconColorToken: iconSvg ? '--g-color-text-primary' : defaultIconColorToken,
|
|
131
|
+
fallbackIconColorToken: defaultIconColorToken
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export function queryGraphIconToSvg(icon) {
|
|
135
|
+
if (! /*#__PURE__*/React.isValidElement(icon)) return undefined;
|
|
136
|
+
try {
|
|
137
|
+
var markup = renderToStaticMarkup(icon);
|
|
138
|
+
return markup.startsWith('<svg') ? markup : undefined;
|
|
139
|
+
} catch (_unused) {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
export function getQueryGraphStatusIconSvg(status) {
|
|
144
|
+
if (statusIconSvgCache.has(status)) return statusIconSvgCache.get(status);
|
|
145
|
+
var StatusIcon = statusIcons[status];
|
|
146
|
+
var svg = StatusIcon ? queryGraphIconToSvg(/*#__PURE__*/_jsx(StatusIcon, {})) : undefined;
|
|
147
|
+
statusIconSvgCache.set(status, svg);
|
|
148
|
+
return svg;
|
|
149
|
+
}
|
|
150
|
+
// #sourceMappingURL=queryGraphIcons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","CircleCheck","CircleMinus","CirclePlay","CircleXmark","CodeCommit","CodeMerge","Eraser","LayoutHeaderCellsLarge","ListTimeline","Molecule","Shuffle","renderToStaticMarkup","jsx","_jsx","jsxs","_jsxs","MapOperationIcon","props","_objectSpread","width","height","viewBox","fill","xmlns","children","fillRule","d","stroke","strokeWidth","strokeLinecap","strokeLinejoin","ReduceOperationIcon","MapReduceOperationIcon","operationIcons","read","map","reduce","merge","sort","erase","commit","operation","statusIcons","running","completed","failed","aborted","statusIconSvgCache","Map","defaultIconSvgCache","customIconSvgCache","WeakMap","getDefaultQueryGraphNodeIcon","node","_node$operationType","IconComponent","kind","operationType","getQueryGraphNodeIcon","isValidElement","icon","queryGraphIconToSvg","getQueryGraphNodeIconSvgs","_node$operationType2","defaultKey","concat","defaultIconColorToken","fallbackIconSvg","get","_queryGraphIconToSvg","set","iconSvg","iconColorToken","fallbackIconColorToken","has","undefined","markup","startsWith","_unused","getQueryGraphStatusIconSvg","status","StatusIcon","svg"],"sources":["queryGraphIcons.tsx"],"sourcesContent":["import React from 'react';\nimport {\n CircleCheck,\n CircleMinus,\n CirclePlay,\n CircleXmark,\n CodeCommit,\n CodeMerge,\n Eraser,\n LayoutHeaderCellsLarge,\n ListTimeline,\n Molecule,\n Shuffle,\n} from '@gravity-ui/icons';\nimport {renderToStaticMarkup} from 'react-dom/server';\n\nimport type {\n QueryGraphNode,\n QueryGraphNodeStatus,\n QueryGraphOperationType,\n} from '../../../types/queryGraph';\n\ntype SvgIcon = (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;\n\n// Map, Reduce and MapReduce paths are adapted from the corresponding neutral\n// operation icons in ytsaurus/ytsaurus-ui (Apache-2.0).\nconst MapOperationIcon: SvgIcon = (props) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M3 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M2.25.5a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5M3 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 3 8m-.75-2.25a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5M3 13.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M2.25 11a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m11.5-8a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5m0-2.5a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5m0-3a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5m.75 7.5a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m-.75-2.25a2.25 2.25 0 1 1 0 4.5 2.25 2.25 0 0 1 0-4.5\"\n />\n <path\n d=\"M4 2.8h8M4 8h8m-5-2.5L9.5 8 7 10.5m-3 2.8h8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst ReduceOperationIcon: SvgIcon = (props) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M4 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M3.25.5a2.25 2.25 0 0 1 2.122 1.5h.378a3 3 0 0 1 3 3v2.25h3.94l-1.22-1.22a.75.75 0 0 1 1.06-1.06l2.5 2.5a.75.75 0 0 1 0 1.06l-2.5 2.5a.75.75 0 1 1-1.06-1.06l1.22-1.22H8.75V11a3 3 0 0 1-3 3h-.378a2.25 2.25 0 1 1 0-1.5h.378A1.5 1.5 0 0 0 7.25 11V8.75H5.372a2.25 2.25 0 1 1 0-1.5H7.25V5a1.5 1.5 0 0 0-1.5-1.5h-.378A2.25 2.25 0 1 1 3.25.5M4 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 4 8m0 5.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0\"\n />\n </svg>\n);\n\nconst MapReduceOperationIcon: SvgIcon = (props) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M3 2.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M4.372 3.5A2.25 2.25 0 1 1 4.372 2H6.25a3 3 0 0 1 3 3v.896A2.25 2.25 0 0 1 10.572 7.25H14a.75.75 0 0 1 0 1.5h-3.428A2.25 2.25 0 0 1 9.25 10.104V11a3 3 0 0 1-3 3H4.372a2.25 2.25 0 1 1 0-1.5H6.25a1.5 1.5 0 0 0 1.5-1.5v-.861a2.25 2.25 0 0 1-1.423-1.393L6.25 8.75H4.372a2.25 2.25 0 1 1 0-1.5H6.25l.077.004A2.25 2.25 0 0 1 7.75 5.861V5a1.5 1.5 0 0 0-1.5-1.5zM3 8a.75.75 0 1 1-1.5 0A.75.75 0 0 1 3 8m0 5.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0M9.2 8a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0\"\n />\n <path\n d=\"M12.5 5.5 15 8l-2.5 2.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst operationIcons: Record<QueryGraphOperationType, SvgIcon> = {\n read: ListTimeline,\n map: MapOperationIcon,\n reduce: ReduceOperationIcon,\n 'map-reduce': MapReduceOperationIcon,\n merge: CodeMerge,\n sort: Shuffle,\n erase: Eraser,\n commit: CodeCommit,\n operation: Molecule,\n};\n\nconst statusIcons: Partial<Record<QueryGraphNodeStatus, SvgIcon>> = {\n running: CirclePlay,\n completed: CircleCheck,\n failed: CircleXmark,\n aborted: CircleMinus,\n};\nconst statusIconSvgCache = new Map<QueryGraphNodeStatus, string | undefined>();\nconst defaultIconSvgCache = new Map<string, string>();\nconst customIconSvgCache = new WeakMap<object, string | undefined>();\n\nexport function getDefaultQueryGraphNodeIcon(node: QueryGraphNode): React.ReactElement {\n const IconComponent =\n node.kind === 'operation'\n ? operationIcons[node.operationType ?? 'operation']\n : LayoutHeaderCellsLarge;\n return <IconComponent />;\n}\n\nexport function getQueryGraphNodeIcon(node: QueryGraphNode): React.ReactElement {\n return React.isValidElement(node.icon) && queryGraphIconToSvg(node.icon)\n ? node.icon\n : getDefaultQueryGraphNodeIcon(node);\n}\n\nexport function getQueryGraphNodeIconSvgs(node: QueryGraphNode) {\n const defaultKey =\n node.kind === 'operation' ? `operation:${node.operationType ?? 'operation'}` : 'resource';\n const defaultIconColorToken = '--g-color-text-misc';\n let fallbackIconSvg = defaultIconSvgCache.get(defaultKey);\n if (!fallbackIconSvg) {\n fallbackIconSvg = queryGraphIconToSvg(getDefaultQueryGraphNodeIcon(node)) ?? '';\n defaultIconSvgCache.set(defaultKey, fallbackIconSvg);\n }\n\n if (!React.isValidElement(node.icon)) {\n return {\n iconSvg: fallbackIconSvg,\n fallbackIconSvg,\n iconColorToken: defaultIconColorToken,\n fallbackIconColorToken: defaultIconColorToken,\n };\n }\n let iconSvg = customIconSvgCache.get(node.icon);\n if (!customIconSvgCache.has(node.icon)) {\n iconSvg = queryGraphIconToSvg(node.icon);\n customIconSvgCache.set(node.icon, iconSvg);\n }\n return {\n iconSvg: iconSvg ?? fallbackIconSvg,\n fallbackIconSvg,\n iconColorToken: iconSvg ? '--g-color-text-primary' : defaultIconColorToken,\n fallbackIconColorToken: defaultIconColorToken,\n };\n}\n\nexport function queryGraphIconToSvg(icon: React.ReactNode): string | undefined {\n if (!React.isValidElement(icon)) return undefined;\n try {\n const markup = renderToStaticMarkup(icon);\n return markup.startsWith('<svg') ? markup : undefined;\n } catch {\n return undefined;\n }\n}\n\nexport function getQueryGraphStatusIconSvg(status: QueryGraphNodeStatus) {\n if (statusIconSvgCache.has(status)) return statusIconSvgCache.get(status);\n const StatusIcon = statusIcons[status];\n const svg = StatusIcon ? queryGraphIconToSvg(<StatusIcon />) : undefined;\n statusIconSvgCache.set(status, svg);\n return svg;\n}\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,EACNC,sBAAsB,EACtBC,YAAY,EACZC,QAAQ,EACRC,OAAO,QACJ,mBAAmB;AAC1B,SAAQC,oBAAoB,QAAO,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUtD;AACA;AACA,IAAMC,gBAAyB,GAAG,SAA5BA,gBAAyBA,CAAIC,KAAK;EAAA,oBACpCF,KAAA,QAAAG,aAAA,CAAAA,aAAA;IACIC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACXC,KAAK,EAAC;EAA4B,GAC9BN,KAAK;IAAAO,QAAA,gBAETX,IAAA;MACIS,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CAAC,EAAE,OAAOe,SAAS;EACjD,IAAI;IACA,IAAMC,MAAM,GAAGjE,oBAAoB,CAACiD,IAAI,CAAC;IACzC,OAAOgB,MAAM,CAACC,UAAU,CAAC,MAAM,CAAC,GAAGD,MAAM,GAAGD,SAAS;EACzD,CAAC,CAAC,OAAAG,OAAA,EAAM;IACJ,OAAOH,SAAS;EACpB;AACJ;AAEA,OAAO,SAASI,0BAA0BA,CAACC,MAA4B,EAAE;EACrE,IAAIjC,kBAAkB,CAAC2B,GAAG,CAACM,MAAM,CAAC,EAAE,OAAOjC,kBAAkB,CAACqB,GAAG,CAACY,MAAM,CAAC;EACzE,IAAMC,UAAU,GAAGvC,WAAW,CAACsC,MAAM,CAAC;EACtC,IAAME,GAAG,GAAGD,UAAU,GAAGpB,mBAAmB,cAAChD,IAAA,CAACoE,UAAU,IAAE,CAAC,CAAC,GAAGN,SAAS;EACxE5B,kBAAkB,CAACuB,GAAG,CAACU,MAAM,EAAEE,GAAG,CAAC;EACnC,OAAOA,GAAG;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ConverterResult } from '@gravity-ui/graph';
|
|
2
|
+
type QueryGraphLayoutInput = {
|
|
3
|
+
structureKey: string;
|
|
4
|
+
blocks: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}>;
|
|
9
|
+
connections: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
sourceBlockId: string;
|
|
12
|
+
targetBlockId: string;
|
|
13
|
+
}>;
|
|
14
|
+
onError?: (error: Error) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function useQueryGraphLayout({ structureKey, blocks, connections, onError, }: QueryGraphLayoutInput): {
|
|
17
|
+
result: ConverterResult | undefined;
|
|
18
|
+
resolvedStructureKey: string | undefined;
|
|
19
|
+
isInitialLoading: boolean;
|
|
20
|
+
error: Error | undefined;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useLayeredLayout } from '@gravity-ui/graph';
|
|
4
|
+
export function useQueryGraphLayout(_ref) {
|
|
5
|
+
var structureKey = _ref.structureKey,
|
|
6
|
+
blocks = _ref.blocks,
|
|
7
|
+
connections = _ref.connections,
|
|
8
|
+
onError = _ref.onError;
|
|
9
|
+
var onErrorRef = useRef(onError);
|
|
10
|
+
onErrorRef.current = onError;
|
|
11
|
+
var requestedKeyRef = useRef(structureKey);
|
|
12
|
+
var _useState = useState(),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
resolved = _useState2[0],
|
|
15
|
+
setResolved = _useState2[1];
|
|
16
|
+
var _useState3 = useState(),
|
|
17
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
18
|
+
error = _useState4[0],
|
|
19
|
+
setError = _useState4[1];
|
|
20
|
+
var handleError = useCallback(function (nextError) {
|
|
21
|
+
var _onErrorRef$current;
|
|
22
|
+
setError(nextError);
|
|
23
|
+
(_onErrorRef$current = onErrorRef.current) === null || _onErrorRef$current === void 0 || _onErrorRef$current.call(onErrorRef, nextError);
|
|
24
|
+
}, []);
|
|
25
|
+
var _useLayeredLayout = useLayeredLayout({
|
|
26
|
+
blocks: blocks,
|
|
27
|
+
connections: connections,
|
|
28
|
+
onError: handleError
|
|
29
|
+
}),
|
|
30
|
+
result = _useLayeredLayout.result,
|
|
31
|
+
isLoading = _useLayeredLayout.isLoading;
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
setError(undefined);
|
|
34
|
+
}, [structureKey]);
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
if (isLoading) requestedKeyRef.current = structureKey;
|
|
37
|
+
}, [isLoading, structureKey]);
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
if (!isLoading && result && requestedKeyRef.current === structureKey) {
|
|
40
|
+
setResolved({
|
|
41
|
+
structureKey: structureKey,
|
|
42
|
+
result: result
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, [isLoading, result, structureKey]);
|
|
46
|
+
return {
|
|
47
|
+
result: resolved === null || resolved === void 0 ? void 0 : resolved.result,
|
|
48
|
+
resolvedStructureKey: resolved === null || resolved === void 0 ? void 0 : resolved.structureKey,
|
|
49
|
+
isInitialLoading: isLoading && !resolved,
|
|
50
|
+
error: error
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// #sourceMappingURL=useQueryGraphLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useRef","useState","useLayeredLayout","useQueryGraphLayout","_ref","structureKey","blocks","connections","onError","onErrorRef","current","requestedKeyRef","_useState","_useState2","_slicedToArray","resolved","setResolved","_useState3","_useState4","error","setError","handleError","nextError","_onErrorRef$current","call","_useLayeredLayout","result","isLoading","undefined","resolvedStructureKey","isInitialLoading"],"sources":["useQueryGraphLayout.ts"],"sourcesContent":["import {useCallback, useEffect, useRef, useState} from 'react';\nimport {type ConverterResult, useLayeredLayout} from '@gravity-ui/graph';\n\ntype QueryGraphLayoutInput = {\n structureKey: string;\n blocks: Array<{id: string; width: number; height: number}>;\n connections: Array<{\n id: string;\n sourceBlockId: string;\n targetBlockId: string;\n }>;\n onError?: (error: Error) => void;\n};\n\ntype ResolvedLayout = {structureKey: string; result: ConverterResult};\n\nexport function useQueryGraphLayout({\n structureKey,\n blocks,\n connections,\n onError,\n}: QueryGraphLayoutInput) {\n const onErrorRef = useRef(onError);\n onErrorRef.current = onError;\n const requestedKeyRef = useRef(structureKey);\n const [resolved, setResolved] = useState<ResolvedLayout>();\n const [error, setError] = useState<Error>();\n\n const handleError = useCallback((nextError: Error) => {\n setError(nextError);\n onErrorRef.current?.(nextError);\n }, []);\n const {result, isLoading} = useLayeredLayout({blocks, connections, onError: handleError});\n\n useEffect(() => {\n setError(undefined);\n }, [structureKey]);\n useEffect(() => {\n if (isLoading) requestedKeyRef.current = structureKey;\n }, [isLoading, structureKey]);\n useEffect(() => {\n if (!isLoading && result && requestedKeyRef.current === structureKey) {\n setResolved({structureKey, result});\n }\n }, [isLoading, result, structureKey]);\n\n return {\n result: resolved?.result,\n resolvedStructureKey: resolved?.structureKey,\n isInitialLoading: isLoading && !resolved,\n error,\n };\n}\n"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAO,OAAO;AAC9D,SAA8BC,gBAAgB,QAAO,mBAAmB;AAexE,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAKT;EAAA,IAJtBC,YAAY,GAAAD,IAAA,CAAZC,YAAY;IACZC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;EAEP,IAAMC,UAAU,GAAGT,MAAM,CAACQ,OAAO,CAAC;EAClCC,UAAU,CAACC,OAAO,GAAGF,OAAO;EAC5B,IAAMG,eAAe,GAAGX,MAAM,CAACK,YAAY,CAAC;EAC5C,IAAAO,SAAA,GAAgCX,QAAQ,CAAiB,CAAC;IAAAY,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAAnDG,QAAQ,GAAAF,UAAA;IAAEG,WAAW,GAAAH,UAAA;EAC5B,IAAAI,UAAA,GAA0BhB,QAAQ,CAAQ,CAAC;IAAAiB,UAAA,GAAAJ,cAAA,CAAAG,UAAA;IAApCE,KAAK,GAAAD,UAAA;IAAEE,QAAQ,GAAAF,UAAA;EAEtB,IAAMG,WAAW,GAAGvB,WAAW,CAAC,UAACwB,SAAgB,EAAK;IAAA,IAAAC,mBAAA;IAClDH,QAAQ,CAACE,SAAS,CAAC;IACnB,CAAAC,mBAAA,GAAAd,UAAU,CAACC,OAAO,cAAAa,mBAAA,eAAlBA,mBAAA,CAAAC,IAAA,CAAAf,UAAU,EAAWa,SAAS,CAAC;EACnC,CAAC,EAAE,EAAE,CAAC;EACN,IAAAG,iBAAA,GAA4BvB,gBAAgB,CAAC;MAACI,MAAM,EAANA,MAAM;MAAEC,WAAW,EAAXA,WAAW;MAAEC,OAAO,EAAEa;IAAW,CAAC,CAAC;IAAlFK,MAAM,GAAAD,iBAAA,CAANC,MAAM;IAAEC,SAAS,GAAAF,iBAAA,CAATE,SAAS;EAExB5B,SAAS,CAAC,YAAM;IACZqB,QAAQ,CAACQ,SAAS,CAAC;EACvB,CAAC,EAAE,CAACvB,YAAY,CAAC,CAAC;EAClBN,SAAS,CAAC,YAAM;IACZ,IAAI4B,SAAS,EAAEhB,eAAe,CAACD,OAAO,GAAGL,YAAY;EACzD,CAAC,EAAE,CAACsB,SAAS,EAAEtB,YAAY,CAAC,CAAC;EAC7BN,SAAS,CAAC,YAAM;IACZ,IAAI,CAAC4B,SAAS,IAAID,MAAM,IAAIf,eAAe,CAACD,OAAO,KAAKL,YAAY,EAAE;MAClEW,WAAW,CAAC;QAACX,YAAY,EAAZA,YAAY;QAAEqB,MAAM,EAANA;MAAM,CAAC,CAAC;IACvC;EACJ,CAAC,EAAE,CAACC,SAAS,EAAED,MAAM,EAAErB,YAAY,CAAC,CAAC;EAErC,OAAO;IACHqB,MAAM,EAAEX,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEW,MAAM;IACxBG,oBAAoB,EAAEd,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEV,YAAY;IAC5CyB,gBAAgB,EAAEH,SAAS,IAAI,CAACZ,QAAQ;IACxCI,KAAK,EAALA;EACJ,CAAC;AACL","ignoreList":[]}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import "core-js/modules/es.array.concat.js";
|
|
3
|
+
import "core-js/modules/es.array.map.js";
|
|
4
|
+
import "core-js/modules/es.function.name.js";
|
|
5
|
+
import "core-js/modules/es.object.to-string.js";
|
|
6
|
+
function operation(_ref) {
|
|
7
|
+
var id = _ref.id,
|
|
8
|
+
name = _ref.name,
|
|
9
|
+
label = _ref.label,
|
|
10
|
+
_ref$inputs = _ref.inputs,
|
|
11
|
+
inputs = _ref$inputs === void 0 ? 1 : _ref$inputs,
|
|
12
|
+
_ref$outputs = _ref.outputs,
|
|
13
|
+
outputs = _ref$outputs === void 0 ? 1 : _ref$outputs,
|
|
14
|
+
_ref$status = _ref.status,
|
|
15
|
+
status = _ref$status === void 0 ? 'completed' : _ref$status,
|
|
16
|
+
_ref$total = _ref.total,
|
|
17
|
+
total = _ref$total === void 0 ? 100 : _ref$total,
|
|
18
|
+
_ref$completed = _ref.completed,
|
|
19
|
+
completed = _ref$completed === void 0 ? total : _ref$completed,
|
|
20
|
+
running = _ref.running;
|
|
21
|
+
var pending = Math.max(0, total - completed - (running !== null && running !== void 0 ? running : 0));
|
|
22
|
+
return {
|
|
23
|
+
id: id,
|
|
24
|
+
kind: 'operation',
|
|
25
|
+
name: name,
|
|
26
|
+
label: label,
|
|
27
|
+
status: status,
|
|
28
|
+
progress: {
|
|
29
|
+
total: total,
|
|
30
|
+
completed: completed,
|
|
31
|
+
running: running,
|
|
32
|
+
pending: pending
|
|
33
|
+
},
|
|
34
|
+
popup: {
|
|
35
|
+
details: [{
|
|
36
|
+
name: 'Operation ID',
|
|
37
|
+
value: id
|
|
38
|
+
}, {
|
|
39
|
+
name: 'Inputs',
|
|
40
|
+
value: inputs
|
|
41
|
+
}, {
|
|
42
|
+
name: 'Outputs',
|
|
43
|
+
value: outputs
|
|
44
|
+
}],
|
|
45
|
+
jobs: {
|
|
46
|
+
total: total,
|
|
47
|
+
completed: completed,
|
|
48
|
+
running: running,
|
|
49
|
+
pending: pending
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// The topology is adapted from a processed production graph. Product-specific names and
|
|
56
|
+
// backend fields are intentionally normalized to the public QueryGraph contract.
|
|
57
|
+
export var largeGraphNodes = [{
|
|
58
|
+
id: '25',
|
|
59
|
+
kind: 'input',
|
|
60
|
+
name: 'date_dim',
|
|
61
|
+
label: 'tpcds/3TB/date_dim',
|
|
62
|
+
popup: {
|
|
63
|
+
details: [{
|
|
64
|
+
name: 'Path',
|
|
65
|
+
value: 'tpcds/3TB/date_dim'
|
|
66
|
+
}]
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
id: '26',
|
|
70
|
+
kind: 'input',
|
|
71
|
+
name: 'web_sales',
|
|
72
|
+
label: 'tpcds/3TB/web_sales',
|
|
73
|
+
popup: {
|
|
74
|
+
details: [{
|
|
75
|
+
name: 'Path',
|
|
76
|
+
value: 'tpcds/3TB/web_sales'
|
|
77
|
+
}]
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
id: '27',
|
|
81
|
+
kind: 'input',
|
|
82
|
+
name: 'customer_address',
|
|
83
|
+
label: 'tpcds/3TB/customer_address',
|
|
84
|
+
popup: {
|
|
85
|
+
details: [{
|
|
86
|
+
name: 'Path',
|
|
87
|
+
value: 'tpcds/3TB/customer_address'
|
|
88
|
+
}]
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
id: '153',
|
|
92
|
+
kind: 'input',
|
|
93
|
+
name: 'store_sales',
|
|
94
|
+
label: 'tpcds/3TB/store_sales',
|
|
95
|
+
popup: {
|
|
96
|
+
details: [{
|
|
97
|
+
name: 'Path',
|
|
98
|
+
value: 'tpcds/3TB/store_sales'
|
|
99
|
+
}]
|
|
100
|
+
}
|
|
101
|
+
}, operation({
|
|
102
|
+
id: '21',
|
|
103
|
+
name: 'Sort',
|
|
104
|
+
total: 48
|
|
105
|
+
}), operation({
|
|
106
|
+
id: '41',
|
|
107
|
+
name: 'Reduce',
|
|
108
|
+
label: '2 inputs',
|
|
109
|
+
inputs: 2,
|
|
110
|
+
total: 96
|
|
111
|
+
}), operation({
|
|
112
|
+
id: '50',
|
|
113
|
+
name: 'MapReduce',
|
|
114
|
+
label: '2 inputs',
|
|
115
|
+
inputs: 2,
|
|
116
|
+
total: 180
|
|
117
|
+
}), operation({
|
|
118
|
+
id: '67',
|
|
119
|
+
name: 'MapReduce',
|
|
120
|
+
label: '3 outputs',
|
|
121
|
+
outputs: 3,
|
|
122
|
+
total: 240
|
|
123
|
+
}), operation({
|
|
124
|
+
id: '92',
|
|
125
|
+
name: 'Merge',
|
|
126
|
+
total: 72
|
|
127
|
+
}), operation({
|
|
128
|
+
id: '96',
|
|
129
|
+
name: 'Merge',
|
|
130
|
+
total: 84
|
|
131
|
+
}), operation({
|
|
132
|
+
id: '100',
|
|
133
|
+
name: 'Merge',
|
|
134
|
+
total: 64
|
|
135
|
+
}), operation({
|
|
136
|
+
id: '38',
|
|
137
|
+
name: 'Reduce',
|
|
138
|
+
label: '2 inputs',
|
|
139
|
+
inputs: 2,
|
|
140
|
+
total: 112
|
|
141
|
+
}), operation({
|
|
142
|
+
id: '59',
|
|
143
|
+
name: 'MapReduce',
|
|
144
|
+
label: '2 inputs',
|
|
145
|
+
inputs: 2,
|
|
146
|
+
total: 196
|
|
147
|
+
}), operation({
|
|
148
|
+
id: '75',
|
|
149
|
+
name: 'MapReduce',
|
|
150
|
+
label: '3 outputs',
|
|
151
|
+
outputs: 3,
|
|
152
|
+
total: 256
|
|
153
|
+
}), operation({
|
|
154
|
+
id: '105',
|
|
155
|
+
name: 'Merge',
|
|
156
|
+
total: 80
|
|
157
|
+
}), operation({
|
|
158
|
+
id: '109',
|
|
159
|
+
name: 'Merge',
|
|
160
|
+
total: 88
|
|
161
|
+
}), operation({
|
|
162
|
+
id: '140',
|
|
163
|
+
name: 'Map',
|
|
164
|
+
total: 144
|
|
165
|
+
}), operation({
|
|
166
|
+
id: '171',
|
|
167
|
+
name: 'Map',
|
|
168
|
+
status: 'running',
|
|
169
|
+
total: 128,
|
|
170
|
+
completed: 72,
|
|
171
|
+
running: 16
|
|
172
|
+
}), operation({
|
|
173
|
+
id: '179',
|
|
174
|
+
name: 'Map',
|
|
175
|
+
status: 'waiting',
|
|
176
|
+
total: 96,
|
|
177
|
+
completed: 0
|
|
178
|
+
}), operation({
|
|
179
|
+
id: '186',
|
|
180
|
+
name: 'Map',
|
|
181
|
+
status: 'not-started',
|
|
182
|
+
total: 80,
|
|
183
|
+
completed: 0
|
|
184
|
+
}), operation({
|
|
185
|
+
id: '192',
|
|
186
|
+
name: 'Map',
|
|
187
|
+
status: 'not-started',
|
|
188
|
+
total: 64,
|
|
189
|
+
completed: 0
|
|
190
|
+
}), operation({
|
|
191
|
+
id: '197',
|
|
192
|
+
name: 'Sort',
|
|
193
|
+
status: 'not-started',
|
|
194
|
+
total: 48,
|
|
195
|
+
completed: 0
|
|
196
|
+
}), operation({
|
|
197
|
+
id: '200',
|
|
198
|
+
name: 'Fetch result',
|
|
199
|
+
status: 'not-started',
|
|
200
|
+
total: 1,
|
|
201
|
+
completed: 0
|
|
202
|
+
}), operation({
|
|
203
|
+
id: '198',
|
|
204
|
+
name: 'Commit result',
|
|
205
|
+
status: 'not-started',
|
|
206
|
+
total: 1,
|
|
207
|
+
completed: 0
|
|
208
|
+
})];
|
|
209
|
+
var topology = [['25', '21'], ['26', '41'], ['21', '41'], ['27', '50'], ['41', '50'], ['50', '67'], ['67', '92'], ['67', '96'], ['67', '100'], ['153', '38'], ['21', '38'], ['27', '59'], ['38', '59'], ['59', '75'], ['75', '105'], ['75', '109'], ['75', '140'], ['109', '140'], ['75', '171'], ['105', '171'], ['140', '171'], ['67', '179'], ['100', '179'], ['171', '179'], ['67', '186'], ['96', '186'], ['179', '186'], ['67', '192'], ['92', '192'], ['186', '192'], ['192', '197'], ['197', '200'], ['200', '198']];
|
|
210
|
+
export var largeGraphEdges = topology.map(function (_ref2) {
|
|
211
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
212
|
+
source = _ref3[0],
|
|
213
|
+
target = _ref3[1];
|
|
214
|
+
return {
|
|
215
|
+
id: "".concat(source, "-").concat(target),
|
|
216
|
+
source: source,
|
|
217
|
+
target: target
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
// #sourceMappingURL=largeGraphData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["operation","_ref","id","name","label","_ref$inputs","inputs","_ref$outputs","outputs","_ref$status","status","_ref$total","total","_ref$completed","completed","running","pending","Math","max","kind","progress","popup","details","value","jobs","largeGraphNodes","topology","largeGraphEdges","map","_ref2","_ref3","_slicedToArray","source","target","concat"],"sources":["largeGraphData.ts"],"sourcesContent":["import type {QueryGraphEdge, QueryGraphNode, QueryGraphNodeStatus} from '../../../types/queryGraph';\n\ntype OperationOptions = {\n id: string;\n name: string;\n label?: string;\n inputs?: number;\n outputs?: number;\n status?: QueryGraphNodeStatus;\n total?: number;\n completed?: number;\n running?: number;\n};\n\nfunction operation({\n id,\n name,\n label,\n inputs = 1,\n outputs = 1,\n status = 'completed',\n total = 100,\n completed = total,\n running,\n}: OperationOptions): QueryGraphNode {\n const pending = Math.max(0, total - completed - (running ?? 0));\n\n return {\n id,\n kind: 'operation',\n name,\n label,\n status,\n progress: {total, completed, running, pending},\n popup: {\n details: [\n {name: 'Operation ID', value: id},\n {name: 'Inputs', value: inputs},\n {name: 'Outputs', value: outputs},\n ],\n jobs: {total, completed, running, pending},\n },\n };\n}\n\n// The topology is adapted from a processed production graph. Product-specific names and\n// backend fields are intentionally normalized to the public QueryGraph contract.\nexport const largeGraphNodes: QueryGraphNode[] = [\n {\n id: '25',\n kind: 'input',\n name: 'date_dim',\n label: 'tpcds/3TB/date_dim',\n popup: {details: [{name: 'Path', value: 'tpcds/3TB/date_dim'}]},\n },\n {\n id: '26',\n kind: 'input',\n name: 'web_sales',\n label: 'tpcds/3TB/web_sales',\n popup: {details: [{name: 'Path', value: 'tpcds/3TB/web_sales'}]},\n },\n {\n id: '27',\n kind: 'input',\n name: 'customer_address',\n label: 'tpcds/3TB/customer_address',\n popup: {details: [{name: 'Path', value: 'tpcds/3TB/customer_address'}]},\n },\n {\n id: '153',\n kind: 'input',\n name: 'store_sales',\n label: 'tpcds/3TB/store_sales',\n popup: {details: [{name: 'Path', value: 'tpcds/3TB/store_sales'}]},\n },\n operation({id: '21', name: 'Sort', total: 48}),\n operation({id: '41', name: 'Reduce', label: '2 inputs', inputs: 2, total: 96}),\n operation({id: '50', name: 'MapReduce', label: '2 inputs', inputs: 2, total: 180}),\n operation({id: '67', name: 'MapReduce', label: '3 outputs', outputs: 3, total: 240}),\n operation({id: '92', name: 'Merge', total: 72}),\n operation({id: '96', name: 'Merge', total: 84}),\n operation({id: '100', name: 'Merge', total: 64}),\n operation({id: '38', name: 'Reduce', label: '2 inputs', inputs: 2, total: 112}),\n operation({id: '59', name: 'MapReduce', label: '2 inputs', inputs: 2, total: 196}),\n operation({id: '75', name: 'MapReduce', label: '3 outputs', outputs: 3, total: 256}),\n operation({id: '105', name: 'Merge', total: 80}),\n operation({id: '109', name: 'Merge', total: 88}),\n operation({id: '140', name: 'Map', total: 144}),\n operation({\n id: '171',\n name: 'Map',\n status: 'running',\n total: 128,\n completed: 72,\n running: 16,\n }),\n operation({id: '179', name: 'Map', status: 'waiting', total: 96, completed: 0}),\n operation({id: '186', name: 'Map', status: 'not-started', total: 80, completed: 0}),\n operation({id: '192', name: 'Map', status: 'not-started', total: 64, completed: 0}),\n operation({id: '197', name: 'Sort', status: 'not-started', total: 48, completed: 0}),\n operation({id: '200', name: 'Fetch result', status: 'not-started', total: 1, completed: 0}),\n operation({id: '198', name: 'Commit result', status: 'not-started', total: 1, completed: 0}),\n];\n\nconst topology = [\n ['25', '21'],\n ['26', '41'],\n ['21', '41'],\n ['27', '50'],\n ['41', '50'],\n ['50', '67'],\n ['67', '92'],\n ['67', '96'],\n ['67', '100'],\n ['153', '38'],\n ['21', '38'],\n ['27', '59'],\n ['38', '59'],\n ['59', '75'],\n ['75', '105'],\n ['75', '109'],\n ['75', '140'],\n ['109', '140'],\n ['75', '171'],\n ['105', '171'],\n ['140', '171'],\n ['67', '179'],\n ['100', '179'],\n ['171', '179'],\n ['67', '186'],\n ['96', '186'],\n ['179', '186'],\n ['67', '192'],\n ['92', '192'],\n ['186', '192'],\n ['192', '197'],\n ['197', '200'],\n ['200', '198'],\n] as const;\n\nexport const largeGraphEdges: QueryGraphEdge[] = topology.map(([source, target]) => ({\n id: `${source}-${target}`,\n source,\n target,\n}));\n"],"mappings":";;;;;AAcA,SAASA,SAASA,CAAAC,IAAA,EAUmB;EAAA,IATjCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAAC,WAAA,GAAAJ,IAAA,CACLK,MAAM;IAANA,MAAM,GAAAD,WAAA,cAAG,CAAC,GAAAA,WAAA;IAAAE,YAAA,GAAAN,IAAA,CACVO,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,CAAC,GAAAA,YAAA;IAAAE,WAAA,GAAAR,IAAA,CACXS,MAAM;IAANA,MAAM,GAAAD,WAAA,cAAG,WAAW,GAAAA,WAAA;IAAAE,UAAA,GAAAV,IAAA,CACpBW,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,GAAG,GAAAA,UAAA;IAAAE,cAAA,GAAAZ,IAAA,CACXa,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGD,KAAK,GAAAC,cAAA;IACjBE,OAAO,GAAAd,IAAA,CAAPc,OAAO;EAEP,IAAMC,OAAO,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEN,KAAK,GAAGE,SAAS,IAAIC,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,CAAC,CAAC,CAAC;EAE/D,OAAO;IACHb,EAAE,EAAFA,EAAE;IACFiB,IAAI,EAAE,WAAW;IACjBhB,IAAI,EAAJA,IAAI;IACJC,KAAK,EAALA,KAAK;IACLM,MAAM,EAANA,MAAM;IACNU,QAAQ,EAAE;MAACR,KAAK,EAALA,KA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,CAAC,EACd,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,IAAI,EAAE,KAAK,CAAC,EACb,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,CAAC,KAAK,EAAE,KAAK,CAAC,CACR;AAEV,OAAO,IAAMC,eAAiC,GAAGD,QAAQ,CAACE,GAAG,CAAC,UAAAC,KAAA;EAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,KAAA;IAAEG,MAAM,GAAAF,KAAA;IAAEG,MAAM,GAAAH,KAAA;EAAA,OAAO;IACjF5B,EAAE,KAAAgC,MAAA,CAAKF,MAAM,OAAAE,MAAA,CAAID,MAAM,CAAE;IACzBD,MAAM,EAANA,MAAM;IACNC,MAAM,EAANA;EACJ,CAAC;AAAA,CAAC,CAAC","ignoreList":[]}
|
|
@@ -53,3 +53,5 @@ export { MonacoLanguage, YT_DARK_HC_MONACO_THEME, YT_DARK_MONACO_THEME, YT_LIGHT
|
|
|
53
53
|
export type { MonacoThemeName } from './MonacoEditor';
|
|
54
54
|
export * from './AttachmentList';
|
|
55
55
|
export * from './AttachmentListPlaceholder';
|
|
56
|
+
export { QueryGraph } from './QueryGraph';
|
|
57
|
+
export type { QueryGraphProps } from './QueryGraph';
|
|
@@ -30,4 +30,5 @@ export { ErrorTree } from "./ErrorTree";
|
|
|
30
30
|
export { MonacoLanguage, YT_DARK_HC_MONACO_THEME, YT_DARK_MONACO_THEME, YT_LIGHT_HC_MONACO_THEME, YT_LIGHT_MONACO_THEME, MONACO_THEME_BY_UI } from "./MonacoEditor";
|
|
31
31
|
export * from "./AttachmentList";
|
|
32
32
|
export * from "./AttachmentListPlaceholder";
|
|
33
|
+
export { QueryGraph } from "./QueryGraph";
|
|
33
34
|
// #sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DataTable","QueryResultsTable","formatQueryResultType","QueryStatusIcon","QueryDuration","LazyList","ListSpinner","Breadcrumbs","PathEditor","HistoryFilter","HistoryPrivateIcon","FieldsSelector","EditableRowTitle","RowActionsMenu","FieldsSearchToolbar","HistoryGroupHeader","EmptyContent","ClusterRow","NavigationItemRow","NavigationActionButtons","SkeletonRows","RowLink","SearchRowLayout","SearchWithButtons","MonacoEditor","AddChartButton","DEFAULT_ADD_CHART_BUTTON_OPTIONS","ChartEditorForm","Chart","ErrorTree","MonacoLanguage","YT_DARK_HC_MONACO_THEME","YT_DARK_MONACO_THEME","YT_LIGHT_HC_MONACO_THEME","YT_LIGHT_MONACO_THEME","MONACO_THEME_BY_UI"],"sources":["index.ts"],"sourcesContent":["export {DataTable} from './DataTable';\nexport type {DataTableProps, Column} from './DataTable';\nexport {QueryResultsTable, formatQueryResultType} from './QueryResultsTable';\nexport type {QueryResultsTableProps} from './QueryResultsTable';\nexport {QueryStatusIcon} from './QueryStatusIcon';\nexport {QueryDuration} from './QueryDuration';\nexport {LazyList} from './LazyList';\nexport type {LazyListProps} from './LazyList';\nexport {ListSpinner} from './ListSpinner';\nexport type {ListSpinnerProps} from './ListSpinner';\nexport {Breadcrumbs} from './Breadcrumbs';\nexport type {BreadcrumbsProps} from './Breadcrumbs';\nexport {PathEditor} from './PathEditor';\nexport type {PathEditorProps} from './PathEditor';\nexport {HistoryFilter} from './HistoryFilter';\nexport {HistoryPrivateIcon} from './HistoryPrivateIcon';\nexport {FieldsSelector} from './FieldsSelector';\nexport type {FieldsSelectorOption, FieldsSelectorProps} from './FieldsSelector';\nexport {EditableRowTitle} from './EditableRowTitle';\nexport type {EditableRowTitleProps} from './EditableRowTitle';\nexport {RowActionsMenu} from './RowActionsMenu';\nexport type {RowActionsMenuProps} from './RowActionsMenu';\nexport {FieldsSearchToolbar} from './FieldsSearchToolbar';\nexport type {FieldsSearchToolbarProps} from './FieldsSearchToolbar';\nexport {HistoryGroupHeader} from './HistoryGroupHeader';\nexport {EmptyContent} from './EmptyContent';\nexport type {EmptyContentProps, EmptyContentVariant} from './EmptyContent';\nexport {ClusterRow} from './ClusterRow';\nexport type {ClusterRowProps} from './ClusterRow';\nexport {NavigationItemRow} from './NavigationItemRow';\nexport type {NavigationItemRowProps} from './NavigationItemRow';\nexport {NavigationActionButtons} from './NavigationActionButtons';\nexport type {NavigationActionButtonsProps} from './NavigationActionButtons';\nexport {SkeletonRows} from './SkeletonRows';\nexport type {SkeletonRowsProps} from './SkeletonRows';\nexport {RowLink} from './RowLink';\nexport type {RowLinkProps} from './RowLink';\nexport {SearchRowLayout} from './SearchRowLayout';\nexport type {SearchRowLayoutProps} from './SearchRowLayout';\nexport {SearchWithButtons} from './SearchWithButtons';\nexport type {SearchWithButtonsProps} from './SearchWithButtons';\nexport {MonacoEditor} from './MonacoEditor';\nexport type {MonacoEditorConfig} from './MonacoEditor';\nexport {AddChartButton, DEFAULT_ADD_CHART_BUTTON_OPTIONS} from './AddChartButton';\nexport type {\n AddChartButtonOption,\n AddChartButtonProps,\n DefaultAddChartButtonValue,\n} from './AddChartButton';\nexport {ChartEditorForm} from './ChartEditorForm';\nexport type {\n ChartEditorFormProps,\n ChartEditorFormValues,\n ChartEditorLabels,\n ChartEditorOption,\n} from './ChartEditorForm';\nexport * from './Dashboard';\nexport {Chart} from './Chart';\nexport type {ChartAction, ChartProps} from './Chart';\nexport {ErrorTree} from './ErrorTree';\nexport {\n MonacoLanguage,\n YT_DARK_HC_MONACO_THEME,\n YT_DARK_MONACO_THEME,\n YT_LIGHT_HC_MONACO_THEME,\n YT_LIGHT_MONACO_THEME,\n MONACO_THEME_BY_UI,\n} from './MonacoEditor';\nexport type {MonacoThemeName} from './MonacoEditor';\nexport * from './AttachmentList';\nexport * from './AttachmentListPlaceholder';\n"],"mappings":"AAAA,SAAQA,SAAS;AAEjB,SAAQC,iBAAiB,EAAEC,qBAAqB;AAEhD,SAAQC,eAAe;AACvB,SAAQC,aAAa;AACrB,SAAQC,QAAQ;AAEhB,SAAQC,WAAW;AAEnB,SAAQC,WAAW;AAEnB,SAAQC,UAAU;AAElB,SAAQC,aAAa;AACrB,SAAQC,kBAAkB;AAC1B,SAAQC,cAAc;AAEtB,SAAQC,gBAAgB;AAExB,SAAQC,cAAc;AAEtB,SAAQC,mBAAmB;AAE3B,SAAQC,kBAAkB;AAC1B,SAAQC,YAAY;AAEpB,SAAQC,UAAU;AAElB,SAAQC,iBAAiB;AAEzB,SAAQC,uBAAuB;AAE/B,SAAQC,YAAY;AAEpB,SAAQC,OAAO;AAEf,SAAQC,eAAe;AAEvB,SAAQC,iBAAiB;AAEzB,SAAQC,YAAY;AAEpB,SAAQC,cAAc,EAAEC,gCAAgC;AAMxD,SAAQC,eAAe;AAOvB;AACA,SAAQC,KAAK;AAEb,SAAQC,SAAS;AACjB,SACIC,cAAc,EACdC,uBAAuB,EACvBC,oBAAoB,EACpBC,wBAAwB,EACxBC,qBAAqB,EACrBC,kBAAkB;AAGtB;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["DataTable","QueryResultsTable","formatQueryResultType","QueryStatusIcon","QueryDuration","LazyList","ListSpinner","Breadcrumbs","PathEditor","HistoryFilter","HistoryPrivateIcon","FieldsSelector","EditableRowTitle","RowActionsMenu","FieldsSearchToolbar","HistoryGroupHeader","EmptyContent","ClusterRow","NavigationItemRow","NavigationActionButtons","SkeletonRows","RowLink","SearchRowLayout","SearchWithButtons","MonacoEditor","AddChartButton","DEFAULT_ADD_CHART_BUTTON_OPTIONS","ChartEditorForm","Chart","ErrorTree","MonacoLanguage","YT_DARK_HC_MONACO_THEME","YT_DARK_MONACO_THEME","YT_LIGHT_HC_MONACO_THEME","YT_LIGHT_MONACO_THEME","MONACO_THEME_BY_UI","QueryGraph"],"sources":["index.ts"],"sourcesContent":["export {DataTable} from './DataTable';\nexport type {DataTableProps, Column} from './DataTable';\nexport {QueryResultsTable, formatQueryResultType} from './QueryResultsTable';\nexport type {QueryResultsTableProps} from './QueryResultsTable';\nexport {QueryStatusIcon} from './QueryStatusIcon';\nexport {QueryDuration} from './QueryDuration';\nexport {LazyList} from './LazyList';\nexport type {LazyListProps} from './LazyList';\nexport {ListSpinner} from './ListSpinner';\nexport type {ListSpinnerProps} from './ListSpinner';\nexport {Breadcrumbs} from './Breadcrumbs';\nexport type {BreadcrumbsProps} from './Breadcrumbs';\nexport {PathEditor} from './PathEditor';\nexport type {PathEditorProps} from './PathEditor';\nexport {HistoryFilter} from './HistoryFilter';\nexport {HistoryPrivateIcon} from './HistoryPrivateIcon';\nexport {FieldsSelector} from './FieldsSelector';\nexport type {FieldsSelectorOption, FieldsSelectorProps} from './FieldsSelector';\nexport {EditableRowTitle} from './EditableRowTitle';\nexport type {EditableRowTitleProps} from './EditableRowTitle';\nexport {RowActionsMenu} from './RowActionsMenu';\nexport type {RowActionsMenuProps} from './RowActionsMenu';\nexport {FieldsSearchToolbar} from './FieldsSearchToolbar';\nexport type {FieldsSearchToolbarProps} from './FieldsSearchToolbar';\nexport {HistoryGroupHeader} from './HistoryGroupHeader';\nexport {EmptyContent} from './EmptyContent';\nexport type {EmptyContentProps, EmptyContentVariant} from './EmptyContent';\nexport {ClusterRow} from './ClusterRow';\nexport type {ClusterRowProps} from './ClusterRow';\nexport {NavigationItemRow} from './NavigationItemRow';\nexport type {NavigationItemRowProps} from './NavigationItemRow';\nexport {NavigationActionButtons} from './NavigationActionButtons';\nexport type {NavigationActionButtonsProps} from './NavigationActionButtons';\nexport {SkeletonRows} from './SkeletonRows';\nexport type {SkeletonRowsProps} from './SkeletonRows';\nexport {RowLink} from './RowLink';\nexport type {RowLinkProps} from './RowLink';\nexport {SearchRowLayout} from './SearchRowLayout';\nexport type {SearchRowLayoutProps} from './SearchRowLayout';\nexport {SearchWithButtons} from './SearchWithButtons';\nexport type {SearchWithButtonsProps} from './SearchWithButtons';\nexport {MonacoEditor} from './MonacoEditor';\nexport type {MonacoEditorConfig} from './MonacoEditor';\nexport {AddChartButton, DEFAULT_ADD_CHART_BUTTON_OPTIONS} from './AddChartButton';\nexport type {\n AddChartButtonOption,\n AddChartButtonProps,\n DefaultAddChartButtonValue,\n} from './AddChartButton';\nexport {ChartEditorForm} from './ChartEditorForm';\nexport type {\n ChartEditorFormProps,\n ChartEditorFormValues,\n ChartEditorLabels,\n ChartEditorOption,\n} from './ChartEditorForm';\nexport * from './Dashboard';\nexport {Chart} from './Chart';\nexport type {ChartAction, ChartProps} from './Chart';\nexport {ErrorTree} from './ErrorTree';\nexport {\n MonacoLanguage,\n YT_DARK_HC_MONACO_THEME,\n YT_DARK_MONACO_THEME,\n YT_LIGHT_HC_MONACO_THEME,\n YT_LIGHT_MONACO_THEME,\n MONACO_THEME_BY_UI,\n} from './MonacoEditor';\nexport type {MonacoThemeName} from './MonacoEditor';\nexport * from './AttachmentList';\nexport * from './AttachmentListPlaceholder';\nexport {QueryGraph} from './QueryGraph';\nexport type {QueryGraphProps} from './QueryGraph';\n"],"mappings":"AAAA,SAAQA,SAAS;AAEjB,SAAQC,iBAAiB,EAAEC,qBAAqB;AAEhD,SAAQC,eAAe;AACvB,SAAQC,aAAa;AACrB,SAAQC,QAAQ;AAEhB,SAAQC,WAAW;AAEnB,SAAQC,WAAW;AAEnB,SAAQC,UAAU;AAElB,SAAQC,aAAa;AACrB,SAAQC,kBAAkB;AAC1B,SAAQC,cAAc;AAEtB,SAAQC,gBAAgB;AAExB,SAAQC,cAAc;AAEtB,SAAQC,mBAAmB;AAE3B,SAAQC,kBAAkB;AAC1B,SAAQC,YAAY;AAEpB,SAAQC,UAAU;AAElB,SAAQC,iBAAiB;AAEzB,SAAQC,uBAAuB;AAE/B,SAAQC,YAAY;AAEpB,SAAQC,OAAO;AAEf,SAAQC,eAAe;AAEvB,SAAQC,iBAAiB;AAEzB,SAAQC,YAAY;AAEpB,SAAQC,cAAc,EAAEC,gCAAgC;AAMxD,SAAQC,eAAe;AAOvB;AACA,SAAQC,KAAK;AAEb,SAAQC,SAAS;AACjB,SACIC,cAAc,EACdC,uBAAuB,EACvBC,oBAAoB,EACpBC,wBAAwB,EACxBC,qBAAqB,EACrBC,kBAAkB;AAGtB;AACA;AACA,SAAQC,UAAU","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Column } from '../components';
|
|
1
|
+
import type { Column } from '../components/DataTable';
|
|
2
2
|
export declare function buildColumnsFromKeys<TRow extends Record<string, unknown>>(columns: string[], emptyText: string): Array<Column<TRow>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEmptyValue","buildColumnsFromKeys","columns","emptyText","map","column","name","header","render","_ref","row","value"],"sources":["buildColumnsFromKeys.ts"],"sourcesContent":["import type {ReactNode} from 'react';\nimport type {Column} from '../components';\nimport {isEmptyValue} from './isEmptyValue';\n\nexport function buildColumnsFromKeys<TRow extends Record<string, unknown>>(\n columns: string[],\n emptyText: string,\n): Array<Column<TRow>> {\n return columns.map((column) => ({\n name: column,\n header: column,\n render: ({row}) => {\n const value = row[column];\n return isEmptyValue(value) ? emptyText : (value as ReactNode);\n },\n }));\n}\n"],"mappings":";;;;AAEA,SAAQA,YAAY;AAEpB,OAAO,SAASC,oBAAoBA,CAChCC,OAAiB,EACjBC,SAAiB,EACE;EACnB,OAAOD,OAAO,CAACE,GAAG,CAAC,UAACC,MAAM;IAAA,OAAM;MAC5BC,IAAI,EAAED,MAAM;MACZE,MAAM,EAAEF,MAAM;MACdG,MAAM,EAAE,SAARA,MAAMA,CAAAC,IAAA,EAAa;QAAA,IAATC,GAAG,GAAAD,IAAA,CAAHC,GAAG;QACT,IAAMC,KAAK,GAAGD,GAAG,CAACL,MAAM,CAAC;QACzB,OAAOL,YAAY,CAACW,KAAK,CAAC,GAAGR,SAAS,GAAIQ,KAAmB;MACjE;IACJ,CAAC;EAAA,CAAC,CAAC;AACP","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["isEmptyValue","buildColumnsFromKeys","columns","emptyText","map","column","name","header","render","_ref","row","value"],"sources":["buildColumnsFromKeys.ts"],"sourcesContent":["import type {ReactNode} from 'react';\nimport type {Column} from '../components/DataTable';\nimport {isEmptyValue} from './isEmptyValue';\n\nexport function buildColumnsFromKeys<TRow extends Record<string, unknown>>(\n columns: string[],\n emptyText: string,\n): Array<Column<TRow>> {\n return columns.map((column) => ({\n name: column,\n header: column,\n render: ({row}) => {\n const value = row[column];\n return isEmptyValue(value) ? emptyText : (value as ReactNode);\n },\n }));\n}\n"],"mappings":";;;;AAEA,SAAQA,YAAY;AAEpB,OAAO,SAASC,oBAAoBA,CAChCC,OAAiB,EACjBC,SAAiB,EACE;EACnB,OAAOD,OAAO,CAACE,GAAG,CAAC,UAACC,MAAM;IAAA,OAAM;MAC5BC,IAAI,EAAED,MAAM;MACZE,MAAM,EAAEF,MAAM;MACdG,MAAM,EAAE,SAARA,MAAMA,CAAAC,IAAA,EAAa;QAAA,IAATC,GAAG,GAAAD,IAAA,CAAHC,GAAG;QACT,IAAMC,KAAK,GAAGD,GAAG,CAACL,MAAM,CAAC;QACzB,OAAOL,YAAY,CAACW,KAAK,CAAC,GAAGR,SAAS,GAAIQ,KAAmB;MACjE;IACJ,CAAC;EAAA,CAAC,CAAC;AACP","ignoreList":[]}
|
package/build/esm/index.d.ts
CHANGED
package/build/esm/index.js
CHANGED
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './modules';\nexport * from './widgets';\nexport * from './types/queryList';\nexport * from './types/history';\nexport type {SavedQuery} from './types/savedQueries';\nexport * from './types/tutorial';\nexport * from './types/navigation';\nexport * from './types/pathEditor';\nexport * from './types/errorTree';\nexport * from './types/queryStatistics';\nexport * from './types/queryResults';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './modules';\nexport * from './widgets';\nexport * from './types/queryList';\nexport * from './types/history';\nexport type {SavedQuery} from './types/savedQueries';\nexport * from './types/tutorial';\nexport * from './types/navigation';\nexport * from './types/pathEditor';\nexport * from './types/errorTree';\nexport * from './types/queryStatistics';\nexport * from './types/queryResults';\nexport * from './types/queryGraph';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAmC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NavigationCluster, RenderNavigationCluster } from '../../types/navigation';
|
|
2
|
+
import type { NavigationCluster, RenderNavigationCluster } from '../../types/navigation';
|
|
3
3
|
import './ClustersList.scss';
|
|
4
4
|
export type ClustersListProps<T extends NavigationCluster = NavigationCluster> = {
|
|
5
5
|
items: T[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'bem-cn-lite';
|
|
3
|
-
import { ClusterRow
|
|
3
|
+
import { ClusterRow } from "../../components/ClusterRow";
|
|
4
|
+
import { LazyList } from "../../components/LazyList";
|
|
4
5
|
import { NAVIGATION_ROW_HEIGHT } from "../../constants/row";
|
|
5
6
|
import "./ClustersList.css";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","ClusterRow","LazyList","NAVIGATION_ROW_HEIGHT","jsx","_jsx","block","ClustersList","_ref","items","loading","error","hasMore","onLoadMore","emptyContent","renderRowItem","onItemClick","className","itemHeight","renderItem","cluster","isActive","index","_renderRowItem"],"sources":["ClustersList.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {NavigationCluster, RenderNavigationCluster} from '../../types/navigation';\nimport {ClusterRow
|
|
1
|
+
{"version":3,"names":["React","cn","ClusterRow","LazyList","NAVIGATION_ROW_HEIGHT","jsx","_jsx","block","ClustersList","_ref","items","loading","error","hasMore","onLoadMore","emptyContent","renderRowItem","onItemClick","className","itemHeight","renderItem","cluster","isActive","index","_renderRowItem"],"sources":["ClustersList.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport type {NavigationCluster, RenderNavigationCluster} from '../../types/navigation';\nimport {ClusterRow} from '../../components/ClusterRow';\nimport {LazyList} from '../../components/LazyList';\nimport {NAVIGATION_ROW_HEIGHT} from '../../constants/row';\nimport './ClustersList.scss';\n\nconst block = cn('qp-clusters-list');\n\nexport type ClustersListProps<T extends NavigationCluster = NavigationCluster> = {\n items: T[];\n loading?: boolean;\n error?: React.ReactNode;\n hasMore?: boolean;\n onLoadMore?: () => void;\n emptyContent?: React.ReactNode;\n renderRowItem?: RenderNavigationCluster<T>;\n onItemClick?: (cluster: T) => void;\n className?: string;\n};\n\nexport const ClustersList = <T extends NavigationCluster = NavigationCluster>({\n items,\n loading,\n error,\n hasMore,\n onLoadMore,\n emptyContent,\n renderRowItem,\n onItemClick,\n className,\n}: ClustersListProps<T>) => {\n return (\n <LazyList<T>\n className={block(null, className)}\n items={items}\n itemHeight={() => NAVIGATION_ROW_HEIGHT}\n renderItem={(cluster, isActive, index) =>\n renderRowItem?.({cluster, index, isActive}) ?? <ClusterRow cluster={cluster} />\n }\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n loading={loading}\n error={error}\n emptyContent={emptyContent}\n onItemClick={onItemClick}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,aAAa;AAE5B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