@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
|
@@ -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;
|
|
@@ -3,8 +3,12 @@ import "core-js/modules/es.regexp.exec.js";
|
|
|
3
3
|
import "core-js/modules/es.string.search.js";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Flex, Text } from '@gravity-ui/uikit';
|
|
6
|
-
import { ClustersList
|
|
7
|
-
import {
|
|
6
|
+
import { ClustersList } from "../../modules/ClustersList";
|
|
7
|
+
import { NavigationDetail } from "../../modules/NavigationDetail";
|
|
8
|
+
import { NavigationHeader } from "../../modules/NavigationHeader";
|
|
9
|
+
import { NavigationItemsList } from "../../modules/NavigationItemsList";
|
|
10
|
+
import { EmptyContent } from "../../components/EmptyContent";
|
|
11
|
+
import { SearchWithButtons } from "../../components/SearchWithButtons";
|
|
8
12
|
import { createEmptyDetailConfig } from "./helpers/createEmptyDetailConfig";
|
|
9
13
|
import i18n from "./i18n";
|
|
10
14
|
import cn from 'bem-cn-lite';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Flex","Text","ClustersList","NavigationDetail","NavigationHeader","NavigationItemsList","EmptyContent","SearchWithButtons","createEmptyDetailConfig","i18n","cn","jsx","_jsx","jsxs","_jsxs","block","QueriesNavigation","_ref","_resolveDetail","location","onUpdate","_ref$clusters","clusters","_ref$items","items","header","search","sort","listState","detail","renderClusterItem","renderNavigationItem","onClusterClick","onItemClick","className","_ref2","loading","error","hasMore","onLoadMore","_ref3","actions","onLoadSuggestions","_ref4","searchValue","value","onSearchUpdate","_ref5","sortValue","onSortUpdate","_ref6","openedItem","onItemOpen","onDetailClose","onClose","resolveDetail","resolve","detailSearch","onDetailSearchUpdate","detailActiveTab","activeTab","onDetailTabUpdate","onTabUpdate","detailActions","resolvedDetailActions","resolvedErrorContent","color","children","openedConfig","undefined","body","type","item","config","cluster","handleNavigate","next","handleClusterClick","id","path","handleItemClick","hasChildren","direction","gap","placeholder","emptyContent","variant","renderRowItem","titleLabel"],"sources":["QueriesNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport {Flex, Text} from '@gravity-ui/uikit';\nimport {ClustersList, NavigationDetail, NavigationHeader, NavigationItemsList} from '../../modules';\nimport {EmptyContent, SearchWithButtons} from '../../components';\nimport {\n NavigationCluster,\n NavigationDetailConfig,\n NavigationDetailPanelConfig,\n NavigationHeaderConfig,\n NavigationItem,\n NavigationListStateConfig,\n NavigationLocation,\n NavigationSearchConfig,\n NavigationSortConfig,\n RenderNavigationCluster,\n RenderNavigationItem,\n} from '../../types/navigation';\nimport {createEmptyDetailConfig} from './helpers/createEmptyDetailConfig';\nimport i18n from './i18n';\nimport cn from 'bem-cn-lite';\nimport './QueriesNavigation.scss';\n\nconst block = cn('qp-queries-navigation');\n\nexport type QueriesNavigationProps<\n TItem extends NavigationItem = NavigationItem,\n TCluster extends NavigationCluster = NavigationCluster,\n> = {\n location: NavigationLocation;\n onUpdate: (location: NavigationLocation) => void;\n clusters?: TCluster[];\n items?: TItem[];\n header?: NavigationHeaderConfig;\n search?: NavigationSearchConfig;\n sort?: NavigationSortConfig;\n listState?: NavigationListStateConfig;\n detail?: NavigationDetailPanelConfig<TItem>;\n renderClusterItem?: RenderNavigationCluster<TCluster>;\n renderNavigationItem?: RenderNavigationItem<TItem>;\n onClusterClick?: (cluster: TCluster) => void;\n onItemClick?: (item: TItem) => void;\n className?: string;\n};\n\ntype NavigationBody<TItem extends NavigationItem> =\n | {type: 'loading'}\n | {type: 'details'; item: TItem; config: NavigationDetailConfig}\n | {type: 'clusters'}\n | {type: 'items'};\n\nexport const QueriesNavigation = <\n TItem extends NavigationItem = NavigationItem,\n TCluster extends NavigationCluster = NavigationCluster,\n>({\n location,\n onUpdate,\n clusters = [],\n items = [],\n header,\n search,\n sort,\n listState,\n detail,\n renderClusterItem,\n renderNavigationItem,\n onClusterClick,\n onItemClick,\n className,\n}: QueriesNavigationProps<TItem, TCluster>) => {\n const {loading, error, hasMore, onLoadMore} = listState ?? {};\n const {actions, onLoadSuggestions} = header ?? {};\n const {value: searchValue, onUpdate: onSearchUpdate} = search ?? {};\n const {value: sortValue, onUpdate: onSortUpdate} = sort ?? {};\n const {\n openedItem,\n onItemOpen,\n onClose: onDetailClose,\n resolve: resolveDetail,\n search: detailSearch,\n onSearchUpdate: onDetailSearchUpdate,\n activeTab: detailActiveTab,\n onTabUpdate: onDetailTabUpdate,\n actions: detailActions,\n } = detail ?? {};\n\n const resolvedDetailActions = detailActions ?? actions;\n\n const resolvedErrorContent = error ? (\n <Text color=\"danger\" className={block('error')}>\n {error === true ? i18n('alert_load-error') : error}\n </Text>\n ) : null;\n\n const openedConfig = openedItem\n ? (resolveDetail?.(openedItem) ?? createEmptyDetailConfig(openedItem))\n : undefined;\n\n const body: NavigationBody<TItem> = (() => {\n if (loading) {\n return {type: 'loading'};\n }\n if (openedItem && openedConfig) {\n return {type: 'details', item: openedItem, config: openedConfig};\n }\n if (!location.cluster) {\n return {type: 'clusters'};\n }\n return {type: 'items'};\n })();\n\n const handleNavigate = (next: NavigationLocation) => {\n onDetailClose?.();\n onUpdate(next);\n };\n\n const handleClusterClick = (cluster: TCluster) => {\n handleNavigate({cluster: cluster.id, path: undefined});\n onClusterClick?.(cluster);\n };\n\n const handleItemClick = (item: TItem) => {\n if (item.hasChildren) {\n handleNavigate({cluster: location.cluster, path: item.path});\n } else {\n onItemOpen?.(item);\n }\n onItemClick?.(item);\n };\n\n if (body.type === 'details') {\n return (\n <NavigationDetail\n key={body.item.path}\n config={body.config}\n location={{cluster: location.cluster, path: body.item.path}}\n actions={resolvedDetailActions}\n onUpdate={handleNavigate}\n onLoadSuggestions={onLoadSuggestions}\n search={detailSearch}\n onSearchUpdate={onDetailSearchUpdate}\n activeTab={detailActiveTab}\n onTabUpdate={onDetailTabUpdate}\n className={block(null, className)}\n />\n );\n }\n\n return (\n <Flex direction=\"column\" gap={1} className={block(null, className)}>\n <NavigationHeader\n location={location}\n actions={actions}\n onUpdate={handleNavigate}\n onLoadSuggestions={onLoadSuggestions}\n />\n <SearchWithButtons\n placeholder={i18n('field_search-placeholder')}\n value={searchValue}\n onUpdate={onSearchUpdate}\n />\n {body.type === 'clusters' || (body.type === 'loading' && !location.cluster) ? (\n <ClustersList<TCluster>\n items={clusters}\n loading={loading}\n error={resolvedErrorContent}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n emptyContent={\n <EmptyContent variant={searchValue ? 'nothing-found' : 'no-clusters'} />\n }\n renderRowItem={renderClusterItem}\n onItemClick={handleClusterClick}\n />\n ) : (\n <NavigationItemsList<TItem>\n items={items}\n path={location.path}\n search={searchValue}\n sort={sortValue}\n onSortUpdate={onSortUpdate}\n titleLabel={i18n('title_name')}\n loading={loading}\n error={resolvedErrorContent}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n emptyContent={\n <EmptyContent variant={searchValue ? 'nothing-found' : 'no-files'} />\n }\n renderRowItem={renderNavigationItem}\n onItemClick={handleItemClick}\n />\n )}\n </Flex>\n );\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,mBAAmB;AAC5C,SAAQC,YAAY,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,mBAAmB;AAC7E,SAAQC,YAAY,EAAEC,iBAAiB;AAcvC,SAAQC,uBAAuB;AAC/B,OAAOC,IAAI;AACX,OAAOC,EAAE,MAAM,aAAa;AAC5B;AAAkC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,IAAMC,KAAK,GAAGL,EAAE,CAAC,uBAAuB,CAAC;AA4BzC,OAAO,IAAMM,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAkBiB;EAAA,IAAAC,cAAA;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,CAAE,CAC1E;MACD2C,aAAa,EAAEzD,iBAAkB;MACjCG,WAAW,EAAE4C;IAAmB,CACnC,CAAC,gBAEFjE,IAAA,CAACP,mBAAmB;MAChBmB,KAAK,EAAEA,KAAM;MACbuD,IAAI,EAAE5D,QAAQ,CAAC4D,IAAK;MACpBrD,MAAM,EAAEkB,WAAY;MACpBjB,IAAI,EAAEqB,SAAU;MAChBC,YAAY,EAAEA,YAAa;MAC3BuC,UAAU,EAAE/E,IAAI,CAAC,YAAY,CAAE;MAC/B2B,OAAO,EAAEA,OAAQ;MACjBC,KAAK,EAAE4B,oBAAqB;MAC5B3B,OAAO,EAAEA,OAAQ;MACjBC,UAAU,EAAEA,UAAW;MACvB8C,YAAY,eACRzE,IAAA,CAACN,YAAY;QAACgF,OAAO,EAAE1C,WAAW,GAAG,eAAe,GAAG;MAAW,CAAE,CACvE;MACD2C,aAAa,EAAExD,oBAAqB;MACpCE,WAAW,EAAE+C;IAAgB,CAChC,CACJ;EAAA,CACC,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Flex","Text","ClustersList","NavigationDetail","NavigationHeader","NavigationItemsList","EmptyContent","SearchWithButtons","createEmptyDetailConfig","i18n","cn","jsx","_jsx","jsxs","_jsxs","block","QueriesNavigation","_ref","_resolveDetail","location","onUpdate","_ref$clusters","clusters","_ref$items","items","header","search","sort","listState","detail","renderClusterItem","renderNavigationItem","onClusterClick","onItemClick","className","_ref2","loading","error","hasMore","onLoadMore","_ref3","actions","onLoadSuggestions","_ref4","searchValue","value","onSearchUpdate","_ref5","sortValue","onSortUpdate","_ref6","openedItem","onItemOpen","onDetailClose","onClose","resolveDetail","resolve","detailSearch","onDetailSearchUpdate","detailActiveTab","activeTab","onDetailTabUpdate","onTabUpdate","detailActions","resolvedDetailActions","resolvedErrorContent","color","children","openedConfig","undefined","body","type","item","config","cluster","handleNavigate","next","handleClusterClick","id","path","handleItemClick","hasChildren","direction","gap","placeholder","emptyContent","variant","renderRowItem","titleLabel"],"sources":["QueriesNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport {Flex, Text} from '@gravity-ui/uikit';\nimport {ClustersList} from '../../modules/ClustersList';\nimport {NavigationDetail} from '../../modules/NavigationDetail';\nimport {NavigationHeader} from '../../modules/NavigationHeader';\nimport {NavigationItemsList} from '../../modules/NavigationItemsList';\nimport {EmptyContent} from '../../components/EmptyContent';\nimport {SearchWithButtons} from '../../components/SearchWithButtons';\nimport type {\n NavigationCluster,\n NavigationDetailConfig,\n NavigationDetailPanelConfig,\n NavigationHeaderConfig,\n NavigationItem,\n NavigationListStateConfig,\n NavigationLocation,\n NavigationSearchConfig,\n NavigationSortConfig,\n RenderNavigationCluster,\n RenderNavigationItem,\n} from '../../types/navigation';\nimport {createEmptyDetailConfig} from './helpers/createEmptyDetailConfig';\nimport i18n from './i18n';\nimport cn from 'bem-cn-lite';\nimport './QueriesNavigation.scss';\n\nconst block = cn('qp-queries-navigation');\n\nexport type QueriesNavigationProps<\n TItem extends NavigationItem = NavigationItem,\n TCluster extends NavigationCluster = NavigationCluster,\n> = {\n location: NavigationLocation;\n onUpdate: (location: NavigationLocation) => void;\n clusters?: TCluster[];\n items?: TItem[];\n header?: NavigationHeaderConfig;\n search?: NavigationSearchConfig;\n sort?: NavigationSortConfig;\n listState?: NavigationListStateConfig;\n detail?: NavigationDetailPanelConfig<TItem>;\n renderClusterItem?: RenderNavigationCluster<TCluster>;\n renderNavigationItem?: RenderNavigationItem<TItem>;\n onClusterClick?: (cluster: TCluster) => void;\n onItemClick?: (item: TItem) => void;\n className?: string;\n};\n\ntype NavigationBody<TItem extends NavigationItem> =\n | {type: 'loading'}\n | {type: 'details'; item: TItem; config: NavigationDetailConfig}\n | {type: 'clusters'}\n | {type: 'items'};\n\nexport const QueriesNavigation = <\n TItem extends NavigationItem = NavigationItem,\n TCluster extends NavigationCluster = NavigationCluster,\n>({\n location,\n onUpdate,\n clusters = [],\n items = [],\n header,\n search,\n sort,\n listState,\n detail,\n renderClusterItem,\n renderNavigationItem,\n onClusterClick,\n onItemClick,\n className,\n}: QueriesNavigationProps<TItem, TCluster>) => {\n const {loading, error, hasMore, onLoadMore} = listState ?? {};\n const {actions, onLoadSuggestions} = header ?? {};\n const {value: searchValue, onUpdate: onSearchUpdate} = search ?? {};\n const {value: sortValue, onUpdate: onSortUpdate} = sort ?? {};\n const {\n openedItem,\n onItemOpen,\n onClose: onDetailClose,\n resolve: resolveDetail,\n search: detailSearch,\n onSearchUpdate: onDetailSearchUpdate,\n activeTab: detailActiveTab,\n onTabUpdate: onDetailTabUpdate,\n actions: detailActions,\n } = detail ?? {};\n\n const resolvedDetailActions = detailActions ?? actions;\n\n const resolvedErrorContent = error ? (\n <Text color=\"danger\" className={block('error')}>\n {error === true ? i18n('alert_load-error') : error}\n </Text>\n ) : null;\n\n const openedConfig = openedItem\n ? (resolveDetail?.(openedItem) ?? createEmptyDetailConfig(openedItem))\n : undefined;\n\n const body: NavigationBody<TItem> = (() => {\n if (loading) {\n return {type: 'loading'};\n }\n if (openedItem && openedConfig) {\n return {type: 'details', item: openedItem, config: openedConfig};\n }\n if (!location.cluster) {\n return {type: 'clusters'};\n }\n return {type: 'items'};\n })();\n\n const handleNavigate = (next: NavigationLocation) => {\n onDetailClose?.();\n onUpdate(next);\n };\n\n const handleClusterClick = (cluster: TCluster) => {\n handleNavigate({cluster: cluster.id, path: undefined});\n onClusterClick?.(cluster);\n };\n\n const handleItemClick = (item: TItem) => {\n if (item.hasChildren) {\n handleNavigate({cluster: location.cluster, path: item.path});\n } else {\n onItemOpen?.(item);\n }\n onItemClick?.(item);\n };\n\n if (body.type === 'details') {\n return (\n <NavigationDetail\n key={body.item.path}\n config={body.config}\n location={{cluster: location.cluster, path: body.item.path}}\n actions={resolvedDetailActions}\n onUpdate={handleNavigate}\n onLoadSuggestions={onLoadSuggestions}\n search={detailSearch}\n onSearchUpdate={onDetailSearchUpdate}\n activeTab={detailActiveTab}\n onTabUpdate={onDetailTabUpdate}\n className={block(null, className)}\n />\n );\n }\n\n return (\n <Flex direction=\"column\" gap={1} className={block(null, className)}>\n <NavigationHeader\n location={location}\n actions={actions}\n onUpdate={handleNavigate}\n onLoadSuggestions={onLoadSuggestions}\n />\n <SearchWithButtons\n placeholder={i18n('field_search-placeholder')}\n value={searchValue}\n onUpdate={onSearchUpdate}\n />\n {body.type === 'clusters' || (body.type === 'loading' && !location.cluster) ? (\n <ClustersList<TCluster>\n items={clusters}\n loading={loading}\n error={resolvedErrorContent}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n emptyContent={\n <EmptyContent variant={searchValue ? 'nothing-found' : 'no-clusters'} />\n }\n renderRowItem={renderClusterItem}\n onItemClick={handleClusterClick}\n />\n ) : (\n <NavigationItemsList<TItem>\n items={items}\n path={location.path}\n search={searchValue}\n sort={sortValue}\n onSortUpdate={onSortUpdate}\n titleLabel={i18n('title_name')}\n loading={loading}\n error={resolvedErrorContent}\n hasMore={hasMore}\n onLoadMore={onLoadMore}\n emptyContent={\n <EmptyContent variant={searchValue ? 'nothing-found' : 'no-files'} />\n }\n renderRowItem={renderNavigationItem}\n onItemClick={handleItemClick}\n />\n )}\n </Flex>\n );\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,IAAI,EAAEC,IAAI,QAAO,mBAAmB;AAC5C,SAAQC,YAAY;AACpB,SAAQC,gBAAgB;AACxB,SAAQC,gBAAgB;AACxB,SAAQC,mBAAmB;AAC3B,SAAQC,YAAY;AACpB,SAAQC,iBAAiB;AAczB,SAAQC,uBAAuB;AAC/B,OAAOC,IAAI;AACX,OAAOC,EAAE,MAAM,aAAa;AAC5B;AAAkC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,IAAMC,KAAK,GAAGL,EAAE,CAAC,uBAAuB,CAAC;AA4BzC,OAAO,IAAMM,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAkBiB;EAAA,IAA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AAG;MAAc,CAAE,CAC1E;MACD2C,aAAa,EAAEzD,iBAAkB;MACjCG,WAAW,EAAE4C;IAAmB,CACnC,CAAC,gBAEFjE,IAAA,CAACP,mBAAmB;MAChBmB,KAAK,EAAEA,KAAM;MACbuD,IAAI,EAAE5D,QAAQ,CAAC4D,IAAK;MACpBrD,MAAM,EAAEkB,WAAY;MACpBjB,IAAI,EAAEqB,SAAU;MAChBC,YAAY,EAAEA,YAAa;MAC3BuC,UAAU,EAAE/E,IAAI,CAAC,YAAY,CAAE;MAC/B2B,OAAO,EAAEA,OAAQ;MACjBC,KAAK,EAAE4B,oBAAqB;MAC5B3B,OAAO,EAAEA,OAAQ;MACjBC,UAAU,EAAEA,UAAW;MACvB8C,YAAY,eACRzE,IAAA,CAACN,YAAY;QAACgF,OAAO,EAAE1C,WAAW,GAAG,eAAe,GAAG;MAAW,CAAE,CACvE;MACD2C,aAAa,EAAExD,oBAAqB;MACpCE,WAAW,EAAE+C;IAAgB,CAChC,CACJ;EAAA,CACC,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EmptyContent } from "../../../components";
|
|
2
|
+
import { EmptyContent } from "../../../components/EmptyContent";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
export var createEmptyDetailConfig = function createEmptyDetailConfig(_item) {
|
|
5
5
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","EmptyContent","jsx","_jsx","createEmptyDetailConfig","_item","tabs","emptyContent","variant"],"sources":["createEmptyDetailConfig.tsx"],"sourcesContent":["import React from 'react';\nimport type {NavigationDetailConfig, NavigationItem} from '../../../types/navigation';\nimport {EmptyContent} from '../../../components';\n\nexport const createEmptyDetailConfig = (_item: NavigationItem): NavigationDetailConfig => ({\n tabs: [],\n emptyContent: <EmptyContent variant=\"no-files\" />,\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,YAAY;
|
|
1
|
+
{"version":3,"names":["React","EmptyContent","jsx","_jsx","createEmptyDetailConfig","_item","tabs","emptyContent","variant"],"sources":["createEmptyDetailConfig.tsx"],"sourcesContent":["import React from 'react';\nimport type {NavigationDetailConfig, NavigationItem} from '../../../types/navigation';\nimport {EmptyContent} from '../../../components/EmptyContent';\n\nexport const createEmptyDetailConfig = (_item: NavigationItem): NavigationDetailConfig => ({\n tabs: [],\n emptyContent: <EmptyContent variant=\"no-files\" />,\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,YAAY;AAA0C,SAAAC,GAAA,IAAAC,IAAA;AAE9D,OAAO,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,KAAqB;EAAA,OAA8B;IACvFC,IAAI,EAAE,EAAE;IACRC,YAAY,eAAEJ,IAAA,CAACF,YAAY;MAACO,OAAO,EAAC;IAAU,CAAE;EACpD,CAAC;AAAA,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import "core-js/modules/es.regexp.exec.js";
|
|
2
2
|
import "core-js/modules/es.string.search.js";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { NavigationMeta
|
|
4
|
+
import { NavigationMeta } from "../../../modules/NavigationMeta";
|
|
5
|
+
import { NavigationPreview } from "../../../modules/NavigationPreview";
|
|
6
|
+
import { NavigationSchema } from "../../../modules/NavigationSchema";
|
|
7
|
+
import { NavigationView } from "../../../modules/NavigationView";
|
|
5
8
|
import i18n from "../i18n";
|
|
6
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
10
|
export var createTableDetailConfig = function createTableDetailConfig(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","NavigationMeta","NavigationPreview","NavigationSchema","NavigationView","i18n","jsx","_jsx","createTableDetailConfig","options","_ref","resolveSchema","resolvePreview","resolveMeta","renderMeta","resolveView","item","tabs","id","title","renderContent","_ref2","search","onSearchUpdate","searchPlaceholder","schema","data","columns","_ref3","preview","rows","meta","groups","view","render","undefined","sections","defaultTab","hasSearch"],"sources":["createTableDetailConfig.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"names":["React","NavigationMeta","NavigationPreview","NavigationSchema","NavigationView","i18n","jsx","_jsx","createTableDetailConfig","options","_ref","resolveSchema","resolvePreview","resolveMeta","renderMeta","resolveView","item","tabs","id","title","renderContent","_ref2","search","onSearchUpdate","searchPlaceholder","schema","data","columns","_ref3","preview","rows","meta","groups","view","render","undefined","sections","defaultTab","hasSearch"],"sources":["createTableDetailConfig.tsx"],"sourcesContent":["import React from 'react';\nimport {NavigationMeta} from '../../../modules/NavigationMeta';\nimport {NavigationPreview} from '../../../modules/NavigationPreview';\nimport {NavigationSchema} from '../../../modules/NavigationSchema';\nimport {NavigationView} from '../../../modules/NavigationView';\nimport type {\n NavigationDetailConfig,\n NavigationDetailConfigFactory,\n NavigationItem,\n NavigationMetaConfig,\n NavigationMetaItem,\n NavigationPreviewConfig,\n NavigationPreviewRow,\n NavigationSchemaColumn,\n NavigationSchemaConfig,\n NavigationViewConfig,\n} from '../../../types/navigation';\nimport i18n from '../i18n';\n\nexport type NavigationSchemaResolver<\n TItem extends NavigationItem = NavigationItem,\n TColumn extends NavigationSchemaColumn = NavigationSchemaColumn,\n> = (item: TItem) => NavigationSchemaConfig<TColumn> | undefined;\n\nexport type NavigationPreviewResolver<\n TItem extends NavigationItem = NavigationItem,\n TRow extends NavigationPreviewRow = NavigationPreviewRow,\n> = (item: TItem) => NavigationPreviewConfig<TRow> | undefined;\n\nexport type NavigationMetaResolver<\n TItem extends NavigationItem = NavigationItem,\n TMetaItem extends NavigationMetaItem = NavigationMetaItem,\n> = (item: TItem) => NavigationMetaConfig<TMetaItem> | undefined;\n\nexport type NavigationMetaRenderer<TMetaItem extends NavigationMetaItem = NavigationMetaItem> = (\n data: NavigationMetaConfig<TMetaItem>,\n) => React.ReactNode;\n\nexport type NavigationViewResolver<\n TItem extends NavigationItem = NavigationItem,\n TRow extends NavigationPreviewRow = NavigationPreviewRow,\n> = (item: TItem) => NavigationViewConfig<TRow> | undefined;\n\nexport type CreateTableDetailConfigOptions<\n TItem extends NavigationItem = NavigationItem,\n TColumn extends NavigationSchemaColumn = NavigationSchemaColumn,\n TRow extends NavigationPreviewRow = NavigationPreviewRow,\n TMetaItem extends NavigationMetaItem = NavigationMetaItem,\n> = {\n resolveSchema?: NavigationSchemaResolver<TItem, TColumn>;\n resolvePreview?: NavigationPreviewResolver<TItem, TRow>;\n resolveMeta?: NavigationMetaResolver<TItem, TMetaItem>;\n renderMeta?: NavigationMetaRenderer<TMetaItem>;\n resolveView?: NavigationViewResolver<TItem, TRow>;\n};\n\nexport const createTableDetailConfig = <\n TItem extends NavigationItem = NavigationItem,\n TColumn extends NavigationSchemaColumn = NavigationSchemaColumn,\n TRow extends NavigationPreviewRow = NavigationPreviewRow,\n TMetaItem extends NavigationMetaItem = NavigationMetaItem,\n>(\n options?: CreateTableDetailConfigOptions<TItem, TColumn, TRow, TMetaItem>,\n): NavigationDetailConfigFactory<TItem> => {\n const {resolveSchema, resolvePreview, resolveMeta, renderMeta, resolveView} = options ?? {};\n\n return (item): NavigationDetailConfig => ({\n tabs: [\n {\n id: 'schema',\n title: i18n('tab_schema'),\n renderContent: ({search, onSearchUpdate, searchPlaceholder}) => {\n const schema = resolveSchema?.(item);\n return (\n <NavigationSchema<TColumn>\n data={schema ?? {columns: []}}\n search={search}\n onSearchUpdate={onSearchUpdate}\n searchPlaceholder={searchPlaceholder}\n />\n );\n },\n },\n {\n id: 'preview',\n title: i18n('tab_preview'),\n renderContent: ({search, onSearchUpdate, searchPlaceholder}) => {\n const preview = resolvePreview?.(item);\n return (\n <NavigationPreview<TRow>\n data={preview ?? {columns: [], rows: []}}\n search={search}\n onSearchUpdate={onSearchUpdate}\n searchPlaceholder={searchPlaceholder}\n />\n );\n },\n },\n {\n id: 'meta',\n title: i18n('tab_meta'),\n renderContent: () => {\n const meta = resolveMeta?.(item);\n return (\n <NavigationMeta<TMetaItem>\n data={meta ?? {groups: []}}\n view={renderMeta ? {render: renderMeta} : undefined}\n />\n );\n },\n },\n {\n id: 'view',\n title: i18n('tab_view'),\n renderContent: () => {\n const view = resolveView?.(item);\n return <NavigationView<TRow> data={view ?? {sections: []}} />;\n },\n },\n ],\n defaultTab: 'schema',\n hasSearch: false,\n searchPlaceholder: i18n('field_detail-search-placeholder'),\n });\n};\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,cAAc;AACtB,SAAQC,iBAAiB;AACzB,SAAQC,gBAAgB;AACxB,SAAQC,cAAc;AAatB,OAAOC,IAAI;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAuC3B,OAAO,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAMhCC,OAAyE,EAClC;EACvC,IAAAC,IAAA,GAA8ED,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,CAAC,CAAC;IAApFE,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IAAEC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,WAAW,GAAAL,IAAA,CAAXK,WAAW;EAE1E,OAAO,UAACC,IAAI;IAAA,OAA8B;MACtCC,IAAI,EAAE,CACF;QACIC,EAAE,EAAE,QAAQ;QACZC,KAAK,EAAEd,IAAI,CAAC,YAAY,CAAC;QACzBe,aAAa,EAAE,SAAfA,aAAaA,CAAAC,KAAA,EAAmD;UAAA,IAA/CC,MAAM,GAAAD,KAAA,CAANC,MAAM;YAAEC,cAAc,GAAAF,KAAA,CAAdE,cAAc;YAAEC,iBAAiB,GAAAH,KAAA,CAAjBG,iBAAiB;UACtD,IAAMC,MAAM,GAAGd,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAG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U,CAAC,GAAGqB;UAAU,CACvD,CAAC;QAEV;MACJ,CAAC,EACD;QACIjB,EAAE,EAAE,MAAM;QACVC,KAAK,EAAEd,IAAI,CAAC,UAAU,CAAC;QACvBe,aAAa,EAAE,SAAfA,aAAaA,CAAA,EAAQ;UACjB,IAAMa,IAAI,GAAGlB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAGC,IAAI,CAAC;UAChC,oBAAOT,IAAA,CAACH,cAAc;YAAOsB,IAAI,EAAEO,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAI;cAACG,QAAQ,EAAE;YAAE;UAAE,CAAE,CAAC;QACjE;MACJ,CAAC,CACJ;MACDC,UAAU,EAAE,QAAQ;MACpBC,SAAS,EAAE,KAAK;MAChBd,iBAAiB,EAAEnB,IAAI,CAAC,iCAAiC;IAC7D,CAAC;EAAA,CAAC;AACN,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { Flex, SegmentedRadioGroup, Text } from '@gravity-ui/uikit';
|
|
4
4
|
import cn from 'bem-cn-lite';
|
|
5
|
-
import { QueryResultsTable } from "../../components";
|
|
5
|
+
import { QueryResultsTable } from "../../components/QueryResultsTable";
|
|
6
6
|
import { QueryResultsSchema } from "./internal/QueryResultsSchema";
|
|
7
7
|
import i18n from "./i18n";
|
|
8
8
|
import "./QueryResults.css";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useState","Flex","SegmentedRadioGroup","Text","cn","QueryResultsTable","QueryResultsSchema","i18n","jsx","_jsx","jsxs","_jsxs","block","QueryResults","_ref","columns","rows","_ref$totalRows","totalRows","length","loading","errorContent","rowKey","formatterSettings","maxVisibleLines","title","toolbarContent","actions","controlledView","view","_ref$defaultView","defaultView","onViewChange","renderSchema","className","_useState","_useState2","_slicedToArray","uncontrolledView","setUncontrolledView","handleViewChange","nextView","next","undefined","schema","content","color","children","direction","gap","variant","alignItems","value","onUpdate","width","size","Option","count","visible","total"],"sources":["QueryResults.tsx"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {Flex, SegmentedRadioGroup, Text} from '@gravity-ui/uikit';\nimport cn from 'bem-cn-lite';\nimport {QueryResultsTable} from '../../components';\nimport type {\n QueryResultColumn,\n QueryResultFormatterSettings,\n QueryResultsSchemaRenderContext,\n QueryResultsView,\n} from '../../types/queryResults';\nimport {QueryResultsSchema} from './internal/QueryResultsSchema';\nimport i18n from './i18n';\n\nimport './QueryResults.scss';\n\nconst block = cn('qp-query-results');\n\nexport type QueryResultsProps<TRow extends Record<string, unknown>> = {\n columns: Array<QueryResultColumn<TRow>>;\n /** Values use the YQL wire representation consumed by @gravity-ui/unipika. */\n rows: TRow[];\n totalRows?: number;\n loading?: boolean;\n errorContent?: React.ReactNode;\n rowKey?: (row: TRow, index: number) => string | number;\n formatterSettings?: QueryResultFormatterSettings;\n maxVisibleLines?: number;\n title?: React.ReactNode;\n toolbarContent?: React.ReactNode;\n actions?: React.ReactNode;\n view?: QueryResultsView;\n defaultView?: QueryResultsView;\n onViewChange?: (view: QueryResultsView) => void;\n renderSchema?: (context: QueryResultsSchemaRenderContext<TRow>) => React.ReactNode;\n className?: string;\n};\n\nexport function QueryResults<TRow extends Record<string, unknown>>({\n columns,\n rows,\n totalRows = rows.length,\n loading,\n errorContent,\n rowKey,\n formatterSettings,\n maxVisibleLines,\n title,\n toolbarContent,\n actions,\n view: controlledView,\n defaultView = 'result',\n onViewChange,\n renderSchema,\n className,\n}: QueryResultsProps<TRow>) {\n const [uncontrolledView, setUncontrolledView] = useState<QueryResultsView>(defaultView);\n const view = controlledView ?? uncontrolledView;\n\n const handleViewChange = useCallback(\n (nextView: string) => {\n const next = nextView as QueryResultsView;\n if (controlledView === undefined) {\n setUncontrolledView(next);\n }\n onViewChange?.(next);\n },\n [controlledView, onViewChange],\n );\n\n const schema = renderSchema?.({columns});\n let content: React.ReactNode;\n\n if (errorContent) {\n content = <Text color=\"danger\">{errorContent}</Text>;\n } else if (view === 'schema') {\n content = schema ?? <QueryResultsSchema columns={columns} loading={loading} />;\n } else {\n content = (\n <QueryResultsTable\n columns={columns}\n rows={rows}\n loading={loading}\n rowKey={rowKey}\n formatterSettings={formatterSettings}\n maxVisibleLines={maxVisibleLines}\n />\n );\n }\n\n return (\n <Flex direction=\"column\" gap={2} className={block(null, className)}>\n {title && <Text variant=\"subheader-1\">{title}</Text>}\n <Flex gap={2} alignItems=\"center\" className={block('toolbar')}>\n <SegmentedRadioGroup\n value={view}\n onUpdate={handleViewChange}\n width=\"auto\"\n size=\"s\"\n className={block('views')}\n >\n <SegmentedRadioGroup.Option value=\"result\">\n {i18n('tab_result')}\n </SegmentedRadioGroup.Option>\n <SegmentedRadioGroup.Option value=\"schema\">\n {i18n('tab_schema')}\n </SegmentedRadioGroup.Option>\n </SegmentedRadioGroup>\n <Text color=\"secondary\" className={block('rows-info')}>\n {i18n('context_rows-info', {\n count: totalRows,\n visible: rows.length,\n total: totalRows,\n })}\n </Text>\n {toolbarContent && <div className={block('toolbar-content')}>{toolbarContent}</div>}\n {actions && <div className={block('actions')}>{actions}</div>}\n </Flex>\n <div className={block('content')}>{content}</div>\n </Flex>\n );\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAClD,SAAQC,IAAI,EAAEC,mBAAmB,EAAEC,IAAI,QAAO,mBAAmB;AACjE,OAAOC,EAAE,MAAM,aAAa;AAC5B,SAAQC,iBAAiB;AAOzB,SAAQC,kBAAkB;AAC1B,OAAOC,IAAI;AAEX;AAA6B,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE7B,IAAMC,KAAK,GAAGR,EAAE,CAAC,kBAAkB,CAAC;AAsBpC,OAAO,SAASS,YAAYA,CAAAC,IAAA,EAiBA;EAAA,IAhBxBC,OAAO,GAAAD,IA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AC,MAAM;QACZC,IAAI,EAAC,GAAG;QACRrB,SAAS,EAAEtB,KAAK,CAAC,OAAO,CAAE;QAAAmC,QAAA,gBAE1BtC,IAAA,CAACP,mBAAmB,CAACsD,MAAM;UAACJ,KAAK,EAAC,QAAQ;UAAAL,QAAA,EACrCxC,IAAI,CAAC,YAAY;QAAC,CACK,CAAC,eAC7BE,IAAA,CAACP,mBAAmB,CAACsD,MAAM;UAACJ,KAAK,EAAC,QAAQ;UAAAL,QAAA,EACrCxC,IAAI,CAAC,YAAY;QAAC,CACK,CAAC;MAAA,CACZ,CAAC,eACtBE,IAAA,CAACN,IAAI;QAAC2C,KAAK,EAAC,WAAW;QAACZ,SAAS,EAAEtB,KAAK,CAAC,WAAW,CAAE;QAAAmC,QAAA,EACjDxC,IAAI,CAAC,mBAAmB,EAAE;UACvBkD,KAAK,EAAEvC,SAAS;UAChBwC,OAAO,EAAE1C,IAAI,CAACG,MAAM;UACpBwC,KAAK,EAAEzC;QACX,CAAC;MAAC,CACA,CAAC,EACNQ,cAAc,iBAAIjB,IAAA;QAAKyB,SAAS,EAAEtB,KAAK,CAAC,iBAAiB,CAAE;QAAAmC,QAAA,EAAErB;MAAc,CAAM,CAAC,EAClFC,OAAO,iBAAIlB,IAAA;QAAKyB,SAAS,EAAEtB,KAAK,CAAC,SAAS,CAAE;QAAAmC,QAAA,EAAEpB;MAAO,CAAM,CAAC;IAAA,CAC3D,CAAC,eACPlB,IAAA;MAAKyB,SAAS,EAAEtB,KAAK,CAAC,SAAS,CAAE;MAAAmC,QAAA,EAAEF;IAAO,CAAM,CAAC;EAAA,CAC/C,CAAC;AAEf","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useState","Flex","SegmentedRadioGroup","Text","cn","QueryResultsTable","QueryResultsSchema","i18n","jsx","_jsx","jsxs","_jsxs","block","QueryResults","_ref","columns","rows","_ref$totalRows","totalRows","length","loading","errorContent","rowKey","formatterSettings","maxVisibleLines","title","toolbarContent","actions","controlledView","view","_ref$defaultView","defaultView","onViewChange","renderSchema","className","_useState","_useState2","_slicedToArray","uncontrolledView","setUncontrolledView","handleViewChange","nextView","next","undefined","schema","content","color","children","direction","gap","variant","alignItems","value","onUpdate","width","size","Option","count","visible","total"],"sources":["QueryResults.tsx"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {Flex, SegmentedRadioGroup, Text} from '@gravity-ui/uikit';\nimport cn from 'bem-cn-lite';\nimport {QueryResultsTable} from '../../components/QueryResultsTable';\nimport type {\n QueryResultColumn,\n QueryResultFormatterSettings,\n QueryResultsSchemaRenderContext,\n QueryResultsView,\n} from '../../types/queryResults';\nimport {QueryResultsSchema} from './internal/QueryResultsSchema';\nimport i18n from './i18n';\n\nimport './QueryResults.scss';\n\nconst block = cn('qp-query-results');\n\nexport type QueryResultsProps<TRow extends Record<string, unknown>> = {\n columns: Array<QueryResultColumn<TRow>>;\n /** Values use the YQL wire representation consumed by @gravity-ui/unipika. */\n rows: TRow[];\n totalRows?: number;\n loading?: boolean;\n errorContent?: React.ReactNode;\n rowKey?: (row: TRow, index: number) => string | number;\n formatterSettings?: QueryResultFormatterSettings;\n maxVisibleLines?: number;\n title?: React.ReactNode;\n toolbarContent?: React.ReactNode;\n actions?: React.ReactNode;\n view?: QueryResultsView;\n defaultView?: QueryResultsView;\n onViewChange?: (view: QueryResultsView) => void;\n renderSchema?: (context: QueryResultsSchemaRenderContext<TRow>) => React.ReactNode;\n className?: string;\n};\n\nexport function QueryResults<TRow extends Record<string, unknown>>({\n columns,\n rows,\n totalRows = rows.length,\n loading,\n errorContent,\n rowKey,\n formatterSettings,\n maxVisibleLines,\n title,\n toolbarContent,\n actions,\n view: controlledView,\n defaultView = 'result',\n onViewChange,\n renderSchema,\n className,\n}: QueryResultsProps<TRow>) {\n const [uncontrolledView, setUncontrolledView] = useState<QueryResultsView>(defaultView);\n const view = controlledView ?? uncontrolledView;\n\n const handleViewChange = useCallback(\n (nextView: string) => {\n const next = nextView as QueryResultsView;\n if (controlledView === undefined) {\n setUncontrolledView(next);\n }\n onViewChange?.(next);\n },\n [controlledView, onViewChange],\n );\n\n const schema = renderSchema?.({columns});\n let content: React.ReactNode;\n\n if (errorContent) {\n content = <Text color=\"danger\">{errorContent}</Text>;\n } else if (view === 'schema') {\n content = schema ?? <QueryResultsSchema columns={columns} loading={loading} />;\n } else {\n content = (\n <QueryResultsTable\n columns={columns}\n rows={rows}\n loading={loading}\n rowKey={rowKey}\n formatterSettings={formatterSettings}\n maxVisibleLines={maxVisibleLines}\n />\n );\n }\n\n return (\n <Flex direction=\"column\" gap={2} className={block(null, className)}>\n {title && <Text variant=\"subheader-1\">{title}</Text>}\n <Flex gap={2} alignItems=\"center\" className={block('toolbar')}>\n <SegmentedRadioGroup\n value={view}\n onUpdate={handleViewChange}\n width=\"auto\"\n size=\"s\"\n className={block('views')}\n >\n <SegmentedRadioGroup.Option value=\"result\">\n {i18n('tab_result')}\n </SegmentedRadioGroup.Option>\n <SegmentedRadioGroup.Option value=\"schema\">\n {i18n('tab_schema')}\n </SegmentedRadioGroup.Option>\n </SegmentedRadioGroup>\n <Text color=\"secondary\" className={block('rows-info')}>\n {i18n('context_rows-info', {\n count: totalRows,\n visible: rows.length,\n total: totalRows,\n })}\n </Text>\n {toolbarContent && <div className={block('toolbar-content')}>{toolbarContent}</div>}\n {actions && <div className={block('actions')}>{actions}</div>}\n </Flex>\n <div className={block('content')}>{content}</div>\n </Flex>\n );\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAClD,SAAQC,IAAI,EAAEC,mBAAmB,EAAEC,IAAI,QAAO,mBAAmB;AACjE,OAAOC,EAAE,MAAM,aAAa;AAC5B,SAAQC,iBAAiB;AAOzB,SAAQC,kBAAkB;AAC1B,OAAOC,IAAI;AAEX;AAA6B,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE7B,IAAMC,KAAK,GAAGR,EAAE,CAAC,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A,CAACT,mBAAmB;QAChBkD,KAAK,EAAEvB,IAAK;QACZwB,QAAQ,EAAEb,gBAAiB;QAC3Bc,KAAK,EAAC,MAAM;QACZC,IAAI,EAAC,GAAG;QACRrB,SAAS,EAAEtB,KAAK,CAAC,OAAO,CAAE;QAAAmC,QAAA,gBAE1BtC,IAAA,CAACP,mBAAmB,CAACsD,MAAM;UAACJ,KAAK,EAAC,QAAQ;UAAAL,QAAA,EACrCxC,IAAI,CAAC,YAAY;QAAC,CACK,CAAC,eAC7BE,IAAA,CAACP,mBAAmB,CAACsD,MAAM;UAACJ,KAAK,EAAC,QAAQ;UAAAL,QAAA,EACrCxC,IAAI,CAAC,YAAY;QAAC,CACK,CAAC;MAAA,CACZ,CAAC,eACtBE,IAAA,CAACN,IAAI;QAAC2C,KAAK,EAAC,WAAW;QAACZ,SAAS,EAAEtB,KAAK,CAAC,WAAW,CAAE;QAAAmC,QAAA,EACjDxC,IAAI,CAAC,mBAAmB,EAAE;UACvBkD,KAAK,EAAEvC,SAAS;UAChBwC,OAAO,EAAE1C,IAAI,CAACG,MAAM;UACpBwC,KAAK,EAAEzC;QACX,CAAC;MAAC,CACA,CAAC,EACNQ,cAAc,iBAAIjB,IAAA;QAAKyB,SAAS,EAAEtB,KAAK,CAAC,iBAAiB,CAAE;QAAAmC,QAAA,EAAErB;MAAc,CAAM,CAAC,EAClFC,OAAO,iBAAIlB,IAAA;QAAKyB,SAAS,EAAEtB,KAAK,CAAC,SAAS,CAAE;QAAAmC,QAAA,EAAEpB;MAAO,CAAM,CAAC;IAAA,CAC3D,CAAC,eACPlB,IAAA;MAAKyB,SAAS,EAAEtB,KAAK,CAAC,SAAS,CAAE;MAAAmC,QAAA,EAAEF;IAAO,CAAM,CAAC;EAAA,CAC/C,CAAC;AAEf","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const _default: ((key: "field_name" | "
|
|
1
|
+
declare const _default: ((key: "field_name" | "field_type" | "tab_result" | "tab_schema" | "context_rows-info", params?: import("@gravity-ui/i18n").Params) => string) & {
|
|
2
2
|
keysetData: {
|
|
3
|
-
"qp:query-results": Record<"field_name" | "
|
|
3
|
+
"qp:query-results": Record<"field_name" | "field_type" | "tab_result" | "tab_schema" | "context_rows-info", import("@gravity-ui/i18n").KeyData>;
|
|
4
4
|
};
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "core-js/modules/es.function.name.js";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import { DataTable
|
|
3
|
+
import { DataTable } from "../../../components/DataTable";
|
|
4
|
+
import { formatQueryResultType } from "../../../components/QueryResultsTable";
|
|
4
5
|
import i18n from "../i18n";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
export function QueryResultsSchema(_ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","DataTable","formatQueryResultType","i18n","jsx","_jsx","QueryResultsSchema","_ref","columns","loading","tableColumns","name","header","render","_ref2","_row$header","row","_ref3","children","type","data","loaded","settings","displayIndices","sortable","stripedRows"],"sources":["QueryResultsSchema.tsx"],"sourcesContent":["import React, {useMemo} from 'react';\nimport type {Column} from '@gravity-ui/react-data-table';\nimport {DataTable
|
|
1
|
+
{"version":3,"names":["React","useMemo","DataTable","formatQueryResultType","i18n","jsx","_jsx","QueryResultsSchema","_ref","columns","loading","tableColumns","name","header","render","_ref2","_row$header","row","_ref3","children","type","data","loaded","settings","displayIndices","sortable","stripedRows"],"sources":["QueryResultsSchema.tsx"],"sourcesContent":["import React, {useMemo} from 'react';\nimport type {Column} from '@gravity-ui/react-data-table';\nimport {DataTable} from '../../../components/DataTable';\nimport {formatQueryResultType} from '../../../components/QueryResultsTable';\nimport type {QueryResultColumn} from '../../../types/queryResults';\nimport i18n from '../i18n';\n\nexport type QueryResultsSchemaProps<TRow extends Record<string, unknown>> = {\n columns: Array<QueryResultColumn<TRow>>;\n loading?: boolean;\n};\n\nexport function QueryResultsSchema<TRow extends Record<string, unknown>>({\n columns,\n loading,\n}: QueryResultsSchemaProps<TRow>) {\n const tableColumns = useMemo<Array<Column<QueryResultColumn<TRow>>>>(\n () => [\n {\n name: 'name',\n header: i18n('field_name'),\n render: ({row}) => row.header ?? row.name,\n },\n {\n name: 'type',\n header: i18n('field_type'),\n render: ({row}) => <code>{formatQueryResultType(row.type)}</code>,\n },\n ],\n [],\n );\n\n return (\n <DataTable<QueryResultColumn<TRow>>\n columns={tableColumns}\n data={columns}\n loading={loading}\n loaded={!loading}\n settings={{displayIndices: false, sortable: false, stripedRows: true}}\n />\n );\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AAEpC,SAAQC,SAAS;AACjB,SAAQC,qBAAqB;AAE7B,OAAOC,IAAI;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAO3B,OAAO,SAASC,kBAAkBA,CAAAC,IAAA,EAGA;EAAA,IAF9BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,OAAO,GAAAF,IAAA,CAAPE,OAAO;EAEP,IAAMC,YAAY,GAAGV,OAAO,CACxB;IAAA,OAAM,CACF;MACIW,IAAI,EAAE,MAAM;MACZC,MAAM,EAAET,IAAI,CAAC,YAAY,CAAC;MAC1BU,MAAM,EAAE,SAARA,MAAMA,CAAAC,KAAA;QAAA,IAAAC,WAAA;QAAA,IAAIC,GAAG,GAAAF,KAAA,CAAHE,GAAG;QAAA,QAAAD,WAAA,GAAMC,GAAG,CAACJ,MAAM,cAAAG,WAAA,cAAAA,WAAA,GAAIC,GAAG,CAACL,IAAI;MAAA;IAC7C,CAAC,EACD;MACIA,IAAI,EAAE,MAAM;MACZC,MAAM,EAAET,IAAI,CAAC,YAAY,CAAC;MAC1BU,MAAM,EAAE,SAARA,MAAMA,CAAAI,KAAA;QAAA,IAAID,GAAG,GAAAC,KAAA,CAAHD,GAAG;QAAA,oBAAMX,IAAA;UAAAa,QAAA,EAAOhB,qBAAqB,CAACc,GAAG,CAACG,IAAI;QAAC,CAAO,CAAC;MAAA;IACrE,CAAC,CACJ;EAAA,GACD,EACJ,CAAC;EAED,oBACId,IAAA,CAACJ,SAAS;IACNO,OAAO,EAAEE,YAAa;IACtBU,IAAI,EAAEZ,OAAQ;IACdC,OAAO,EAAEA,OAAQ;IACjBY,MAAM,EAAE,CAACZ,OAAQ;IACjBa,QAAQ,EAAE;MAACC,cAAc,EAAE,KAAK;MAAEC,QAAQ,EAAE,KAAK;MAAEC,WAAW,EAAE;IAAI;EAAE,CACzE,CAAC;AAEV","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryListComparisonConfig, QueryListEditingConfig, QueryListFilterConfig, QueryListItem, QueryListRowAction, QueryListRowRenderData, QueryListSearchConfig, QueryListVisibleFieldsConfig } from '../../types/queryList';
|
|
3
|
-
import { SavedQuery } from '../../types/savedQueries';
|
|
2
|
+
import type { QueryListComparisonConfig, QueryListEditingConfig, QueryListFilterConfig, QueryListItem, QueryListRowAction, QueryListRowRenderData, QueryListSearchConfig, QueryListVisibleFieldsConfig } from '../../types/queryList';
|
|
3
|
+
import type { SavedQuery } from '../../types/savedQueries';
|
|
4
4
|
import './SavedQueries.scss';
|
|
5
5
|
export type SavedQueriesProps<T extends SavedQuery = SavedQuery> = {
|
|
6
6
|
className?: string;
|
|
@@ -7,7 +7,7 @@ import "core-js/modules/es.regexp.exec.js";
|
|
|
7
7
|
import "core-js/modules/es.string.search.js";
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import cn from 'bem-cn-lite';
|
|
10
|
-
import { QueriesList } from "../../modules";
|
|
10
|
+
import { QueriesList } from "../../modules/QueriesList";
|
|
11
11
|
import i18n from "./i18n";
|
|
12
12
|
import { SavedQueryRowContent } from "./SavedQueryRowContent";
|
|
13
13
|
import "./SavedQueries.css";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","QueriesList","i18n","SavedQueryRowContent","jsx","_jsx","block","SavedQueries","_ref","title","logo","search","filter","items","selectedRowId","editing","comparison","visibleFields","renderAuthor","renderRowItem","getRowActions","onListItemClick","className","renderRow","data","_objectSpread"],"sources":["SavedQueries.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {QueriesList} from '../../modules';\nimport {\n QueryListComparisonConfig,\n QueryListEditingConfig,\n QueryListFilterConfig,\n QueryListItem,\n QueryListRowAction,\n QueryListRowRenderData,\n QueryListSearchConfig,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {SavedQuery} from '../../types/savedQueries';\nimport i18n from './i18n';\nimport {SavedQueryRowContent} from './SavedQueryRowContent';\nimport './SavedQueries.scss';\n\nexport type SavedQueriesProps<T extends SavedQuery = SavedQuery> = {\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 renderAuthor?: (item: T) => React.ReactNode;\n renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n getRowActions?: (item: T) => QueryListRowAction<T>[];\n onListItemClick?: (item: QueryListItem<T>) => void;\n};\n\nconst block = cn('qp-saved-queries');\n\nexport const SavedQueries = <T extends SavedQuery>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n editing,\n comparison,\n visibleFields,\n renderAuthor,\n renderRowItem,\n getRowActions,\n onListItemClick,\n className,\n}: SavedQueriesProps<T>) => {\n return (\n <QueriesList\n className={block(null, className)}\n title={title || i18n('title_saved')}\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 ? (\n renderRowItem(data)\n ) : (\n <SavedQueryRowContent {...data} renderAuthor={renderAuthor} />\n )\n }\n onListItemClick={onListItemClick}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,aAAa;AAC5B,SAAQC,WAAW;AAYnB,OAAOC,IAAI;AACX,SAAQC,oBAAoB;AAC5B;AAA6B,SAAAC,GAAA,IAAAC,IAAA;AAmB7B,IAAMC,KAAK,GAAGN,EAAE,CAAC,kBAAkB,CAAC;AAEpC,OAAO,IAAMO,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAeG;EAAA,IAdxBC,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;IACbC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IACVC,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,aAAa,GAAAX,IAAA,CAAbW,aAAa;IACbC,aAAa,GAAAZ,IAAA,CAAbY,aAAa;IACbC,eAAe,GAAAb,IAAA,CAAfa,eAAe;IACfC,SAAS,GAAAd,IAAA,CAATc,SAAS;EAET,oBACIjB,IAAA,CAACJ,WAAW;IACRqB,SAAS,EAAEhB,KAAK,CAAC,IAAI,EAAEgB,SAAS,CAAE;IAClCb,KAAK,EAAEA,KAAK,IAAIP,IAAI,CAAC,aAAa,CAAE;IACpCQ,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfC,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAC7BG,aAAa,EAAEA,aAAc;IAC7BF,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAEA,UAAW;IACvBI,aAAa,EAAEA,aAAc;IAC7BG,SAAS,EAAE,SAAXA,SAASA,CAAGC,IAAI;MAAA,OACZL,aAAa,GACTA,aAAa,CAACK,IAAI,CAAC,gBAEnBnB,IAAA,CAACF,oBAAoB,EAAAsB,aAAA,CAAAA,aAAA,KAAKD,IAAI;QAAEN,YAAY,EAAEA;MAAa,EAAE,CAChE;IAAA,CACJ;IACDG,eAAe,EAAEA;EAAgB,CACpC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","cn","QueriesList","i18n","SavedQueryRowContent","jsx","_jsx","block","SavedQueries","_ref","title","logo","search","filter","items","selectedRowId","editing","comparison","visibleFields","renderAuthor","renderRowItem","getRowActions","onListItemClick","className","renderRow","data","_objectSpread"],"sources":["SavedQueries.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {QueriesList} from '../../modules/QueriesList';\nimport type {\n QueryListComparisonConfig,\n QueryListEditingConfig,\n QueryListFilterConfig,\n QueryListItem,\n QueryListRowAction,\n QueryListRowRenderData,\n QueryListSearchConfig,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport type {SavedQuery} from '../../types/savedQueries';\nimport i18n from './i18n';\nimport {SavedQueryRowContent} from './SavedQueryRowContent';\nimport './SavedQueries.scss';\n\nexport type SavedQueriesProps<T extends SavedQuery = SavedQuery> = {\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 renderAuthor?: (item: T) => React.ReactNode;\n renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n getRowActions?: (item: T) => QueryListRowAction<T>[];\n onListItemClick?: (item: QueryListItem<T>) => void;\n};\n\nconst block = cn('qp-saved-queries');\n\nexport const SavedQueries = <T extends SavedQuery>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n editing,\n comparison,\n visibleFields,\n renderAuthor,\n renderRowItem,\n getRowActions,\n onListItemClick,\n className,\n}: SavedQueriesProps<T>) => {\n return (\n <QueriesList\n className={block(null, className)}\n title={title || i18n('title_saved')}\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 ? (\n renderRowItem(data)\n ) : (\n <SavedQueryRowContent {...data} renderAuthor={renderAuthor} />\n )\n }\n onListItemClick={onListItemClick}\n />\n );\n};\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,aAAa;AAC5B,SAAQC,WAAW;AAYnB,OAAOC,IAAI;AACX,SAAQC,oBAAoB;AAC5B;AAA6B,SAAAC,GAAA,IAAAC,IAAA;AAmB7B,IAAMC,KAAK,GAAGN,EAAE,CAAC,kBAAkB,CAAC;AAEpC,OAAO,IAAMO,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAeG;EAAA,IAdxBC,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;IACbC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IACVC,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,aAAa,GAAAX,IAAA,CAAbW,aAAa;IACbC,aAAa,GAAAZ,IAAA,CAAbY,aAAa;IACbC,eAAe,GAAAb,IAAA,CAAfa,eAAe;IACfC,SAAS,GAAAd,IAAA,CAATc,SAAS;EAET,oBACIjB,IAAA,CAACJ,WAAW;IACRqB,SAAS,EAAEhB,KAAK,CAAC,IAAI,EAAEgB,SAAS,CAAE;IAClCb,KAAK,EAAEA,KAAK,IAAIP,IAAI,CAAC,aAAa,CAAE;IACpCQ,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfC,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAC7BG,aAAa,EAAEA,aAAc;IAC7BF,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAEA,UAAW;IACvBI,aAAa,EAAEA,aAAc;IAC7BG,SAAS,EAAE,SAAXA,SAASA,CAAGC,IAAI;MAAA,OACZL,aAAa,GACTA,aAAa,CAACK,IAAI,CAAC,gBAEnBnB,IAAA,CAACF,oBAAoB,EAAAsB,aAAA,CAAAA,aAAA,KAAKD,IAAI;QAAEN,YAAY,EAAEA;MAAa,EAAE,CAChE;IAAA,CACJ;IACDG,eAAe,EAAEA;EAAgB,CACpC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryListRowRenderData } from '../../types/queryList';
|
|
3
|
-
import { SavedQuery } from '../../types/savedQueries';
|
|
2
|
+
import type { QueryListRowRenderData } from '../../types/queryList';
|
|
3
|
+
import type { SavedQuery } from '../../types/savedQueries';
|
|
4
4
|
type Props<T extends SavedQuery> = QueryListRowRenderData<T> & {
|
|
5
5
|
renderAuthor?: (item: T) => React.ReactNode;
|
|
6
6
|
};
|
|
@@ -2,8 +2,9 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["item", "variant", "renderAuthor"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { HistoryGroupHeader } from "../../components";
|
|
6
|
-
import { SavedQueryRow
|
|
5
|
+
import { HistoryGroupHeader } from "../../components/HistoryGroupHeader";
|
|
6
|
+
import { SavedQueryRow } from "../../modules/SavedQueryRow";
|
|
7
|
+
import { SavedQuerySearchRow } from "../../modules/SavedQuerySearchRow";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export var SavedQueryRowContent = function SavedQueryRowContent(_ref) {
|
|
9
10
|
var item = _ref.item,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","HistoryGroupHeader","SavedQueryRow","SavedQuerySearchRow","jsx","_jsx","SavedQueryRowContent","_ref","item","variant","renderAuthor","data","_objectWithoutProperties","_excluded","title","header","_objectSpread"],"sources":["SavedQueryRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryGroupHeader} from '../../components';\nimport {SavedQueryRow
|
|
1
|
+
{"version":3,"names":["React","HistoryGroupHeader","SavedQueryRow","SavedQuerySearchRow","jsx","_jsx","SavedQueryRowContent","_ref","item","variant","renderAuthor","data","_objectWithoutProperties","_excluded","title","header","_objectSpread"],"sources":["SavedQueryRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryGroupHeader} from '../../components/HistoryGroupHeader';\nimport {SavedQueryRow} from '../../modules/SavedQueryRow';\nimport {SavedQuerySearchRow} from '../../modules/SavedQuerySearchRow';\nimport type {QueryListRowRenderData} from '../../types/queryList';\nimport type {SavedQuery} from '../../types/savedQueries';\n\ntype Props<T extends SavedQuery> = QueryListRowRenderData<T> & {\n renderAuthor?: (item: T) => React.ReactNode;\n};\n\nexport const SavedQueryRowContent = <T extends SavedQuery>({\n item,\n variant,\n renderAuthor,\n ...data\n}: Props<T>) => {\n if ('header' in item) {\n return <HistoryGroupHeader title={item.header} />;\n }\n\n return variant === 'search' ? (\n <SavedQuerySearchRow {...data} item={item} renderAuthor={renderAuthor} />\n ) : (\n <SavedQueryRow {...data} item={item} renderAuthor={renderAuthor} />\n );\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,kBAAkB;AAC1B,SAAQC,aAAa;AACrB,SAAQC,mBAAmB;AAA2C,SAAAC,GAAA,IAAAC,IAAA;AAQtE,OAAO,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAKjB;EAAA,IAJZC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACTC,IAAI,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAEP,IAAI,QAAQ,IAAIL,IAAI,EAAE;IAClB,oBAAOH,IAAA,CAACJ,kBAAkB;MAACa,KAAK,EAAEN,IAAI,CAACO;IAAO,CAAE,CAAC;EACrD;EAEA,OAAON,OAAO,KAAK,QAAQ,gBACvBJ,IAAA,CAACF,mBAAmB,EAAAa,aAAA,CAAAA,aAAA,KAAKL,IAAI;IAAEH,IAAI,EAAEA,IAAK;IAACE,YAAY,EAAEA;EAAa,EAAE,CAAC,gBAEzEL,IAAA,CAACH,aAAa,EAAAc,aAAA,CAAAA,aAAA,KAAKL,IAAI;IAAEH,IAAI,EAAEA,IAAK;IAACE,YAAY,EAAEA;EAAa,EAAE,CACrE;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryListRowRenderData } from '../../types/queryList';
|
|
3
|
-
import { TutorialHistoryRow } from '../../types/tutorial';
|
|
2
|
+
import type { QueryListRowRenderData } from '../../types/queryList';
|
|
3
|
+
import type { TutorialHistoryRow } from '../../types/tutorial';
|
|
4
4
|
export declare const TutorialRowContent: <T extends TutorialHistoryRow>({ item, variant, }: QueryListRowRenderData<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HistoryGroupHeader } from "../../components";
|
|
3
|
-
import { TutorialRow
|
|
2
|
+
import { HistoryGroupHeader } from "../../components/HistoryGroupHeader";
|
|
3
|
+
import { TutorialRow } from "../../modules/TutorialRow";
|
|
4
|
+
import { TutorialSearchRow } from "../../modules/TutorialSearchRow";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
export var TutorialRowContent = function TutorialRowContent(_ref) {
|
|
6
7
|
var item = _ref.item,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","HistoryGroupHeader","TutorialRow","TutorialSearchRow","jsx","_jsx","TutorialRowContent","_ref","item","variant","title","header"],"sources":["TutorialRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {QueryListRowRenderData} from '../../types/queryList';\nimport {TutorialHistoryRow} from '../../types/tutorial';\nimport {HistoryGroupHeader} from '../../components';\nimport {TutorialRow
|
|
1
|
+
{"version":3,"names":["React","HistoryGroupHeader","TutorialRow","TutorialSearchRow","jsx","_jsx","TutorialRowContent","_ref","item","variant","title","header"],"sources":["TutorialRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport type {QueryListRowRenderData} from '../../types/queryList';\nimport type {TutorialHistoryRow} from '../../types/tutorial';\nimport {HistoryGroupHeader} from '../../components/HistoryGroupHeader';\nimport {TutorialRow} from '../../modules/TutorialRow';\nimport {TutorialSearchRow} from '../../modules/TutorialSearchRow';\n\nexport const TutorialRowContent = <T extends TutorialHistoryRow>({\n item,\n variant,\n}: QueryListRowRenderData<T>) => {\n if ('header' in item) {\n return <HistoryGroupHeader title={item.header} />;\n }\n\n return variant === 'search' ? <TutorialSearchRow item={item} /> : <TutorialRow item={item} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAAQC,kBAAkB;AAC1B,SAAQC,WAAW;AACnB,SAAQC,iBAAiB;AAAyC,SAAAC,GAAA,IAAAC,IAAA;AAElE,OAAO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAGE;EAAA,IAF7BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,OAAO,GAAAF,IAAA,CAAPE,OAAO;EAEP,IAAI,QAAQ,IAAID,IAAI,EAAE;IAClB,oBAAOH,IAAA,CAACJ,kBAAkB;MAACS,KAAK,EAAEF,IAAI,CAACG;IAAO,CAAE,CAAC;EACrD;EAEA,OAAOF,OAAO,KAAK,QAAQ,gBAAGJ,IAAA,CAACF,iBAAiB;IAACK,IAAI,EAAEA;EAAK,CAAE,CAAC,gBAAGH,IAAA,CAACH,WAAW;IAACM,IAAI,EAAEA;EAAK,CAAE,CAAC;AACjG,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryListFilterConfig, QueryListItem, QueryListSearchConfig } from '../../types/queryList';
|
|
3
|
-
import { TutorialHistoryRow } from '../../types/tutorial';
|
|
2
|
+
import type { QueryListFilterConfig, QueryListItem, QueryListSearchConfig } from '../../types/queryList';
|
|
3
|
+
import type { TutorialHistoryRow } from '../../types/tutorial';
|
|
4
4
|
import './TutorialsHistory.scss';
|
|
5
5
|
export type TutorialsHistoryProps<T extends TutorialHistoryRow = TutorialHistoryRow> = {
|
|
6
6
|
className?: string;
|
|
@@ -7,7 +7,9 @@ import "core-js/modules/es.regexp.exec.js";
|
|
|
7
7
|
import "core-js/modules/es.string.search.js";
|
|
8
8
|
import "core-js/modules/es.string.trim.js";
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { HistoryHeader
|
|
10
|
+
import { HistoryHeader } from "../../modules/HistoryHeader";
|
|
11
|
+
import { HistoryLayout } from "../../modules/HistoryLayout";
|
|
12
|
+
import { RowsList } from "../../modules/RowsList";
|
|
11
13
|
import i18n from "./i18n";
|
|
12
14
|
import { getListKey } from "../../helpers/getListKey";
|
|
13
15
|
import { TutorialRowContent } from "./TutorialRowContent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","HistoryHeader","HistoryLayout","RowsList","i18n","getListKey","TutorialRowContent","cn","jsx","_jsx","block","TutorialsHistory","_ref","_search$value","title","logo","search","filter","items","selectedRowId","onListItemClick","className","fullSearchAvailable","showSearchResults","Boolean","fullSearch","value","trim","rowVariant","header","hasClear","onUpdate","children","renderRow","data","_objectSpread","showFiltersHint","onItemClick"],"sources":["TutorialsHistory.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryHeader
|
|
1
|
+
{"version":3,"names":["React","HistoryHeader","HistoryLayout","RowsList","i18n","getListKey","TutorialRowContent","cn","jsx","_jsx","block","TutorialsHistory","_ref","_search$value","title","logo","search","filter","items","selectedRowId","onListItemClick","className","fullSearchAvailable","showSearchResults","Boolean","fullSearch","value","trim","rowVariant","header","hasClear","onUpdate","children","renderRow","data","_objectSpread","showFiltersHint","onItemClick"],"sources":["TutorialsHistory.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryHeader} from '../../modules/HistoryHeader';\nimport {HistoryLayout} from '../../modules/HistoryLayout';\nimport {RowsList} from '../../modules/RowsList';\nimport i18n from './i18n';\nimport type {\n QueryListFilterConfig,\n QueryListItem,\n QueryListSearchConfig,\n} from '../../types/queryList';\nimport type {TutorialHistoryRow} from '../../types/tutorial';\nimport {getListKey} from '../../helpers/getListKey';\nimport {TutorialRowContent} from './TutorialRowContent';\nimport cn from 'bem-cn-lite';\nimport './TutorialsHistory.scss';\n\nexport type TutorialsHistoryProps<T extends TutorialHistoryRow = TutorialHistoryRow> = {\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 onListItemClick?: (item: QueryListItem<T>) => void;\n};\n\nconst block = cn('qp-tutorials-history');\n\nexport const TutorialsHistory = <T extends TutorialHistoryRow>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n onListItemClick,\n className,\n}: TutorialsHistoryProps<T>) => {\n const fullSearchAvailable = search.fullSearchAvailable !== false;\n const showSearchResults = Boolean(\n fullSearchAvailable && search.fullSearch && search.value?.trim(),\n );\n const rowVariant = showSearchResults ? 'search' : 'default';\n\n return (\n <HistoryLayout\n className={block(null, className)}\n title={title || i18n('title_tutorials')}\n logo={logo}\n header={\n <HistoryHeader\n search={search.value}\n fullSearch={search.fullSearch}\n fullSearchAvailable={fullSearchAvailable}\n hasClear={search.hasClear}\n filter={filter}\n onUpdate={search.onUpdate}\n />\n }\n >\n <RowsList\n key={getListKey(items, rowVariant)}\n items={items}\n rowVariant={rowVariant}\n selectedRowId={selectedRowId}\n renderRow={(data) => <TutorialRowContent {...data} />}\n showFiltersHint={Boolean(filter)}\n onItemClick={onListItemClick}\n />\n </HistoryLayout>\n );\n};\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,aAAa;AACrB,SAAQC,aAAa;AACrB,SAAQC,QAAQ;AAChB,OAAOC,IAAI;AAOX,SAAQC,UAAU;AAClB,SAAQC,kBAAkB;AAC1B,OAAOC,EAAE,MAAM,aAAa;AAC5B;AAAiC,SAAAC,GAAA,IAAAC,IAAA;AAajC,IAAMC,KAAK,GAAGH,EAAE,CAAC,sBAAsB,CAAC;AAExC,OAAO,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EASG;EAAA,IAAAC,aAAA;EAAA,IAR5BC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,eAAe,GAAAR,IAAA,CAAfQ,eAAe;IACfC,SAAS,GAAAT,IAAA,CAATS,SAAS;EAET,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ui/querieskit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Query page component library",
|
|
5
5
|
"main": "./build/cjs/index.js",
|
|
6
6
|
"module": "./build/esm/index.js",
|
|
@@ -25,7 +25,67 @@
|
|
|
25
25
|
"default": "./build/cjs/index.js"
|
|
26
26
|
},
|
|
27
27
|
"./build/*": "./build/*",
|
|
28
|
-
"./package.json": "./package.json"
|
|
28
|
+
"./package.json": "./package.json",
|
|
29
|
+
"./widgets/QueriesHistory": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./build/esm/widgets/QueriesHistory/index.d.ts",
|
|
32
|
+
"default": "./build/esm/widgets/QueriesHistory/index.js"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./build/cjs/widgets/QueriesHistory/index.d.ts",
|
|
36
|
+
"default": "./build/cjs/widgets/QueriesHistory/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./widgets/SavedQueries": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./build/esm/widgets/SavedQueries/index.d.ts",
|
|
42
|
+
"default": "./build/esm/widgets/SavedQueries/index.js"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./build/cjs/widgets/SavedQueries/index.d.ts",
|
|
46
|
+
"default": "./build/cjs/widgets/SavedQueries/index.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./widgets/TutorialsHistory": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./build/esm/widgets/TutorialsHistory/index.d.ts",
|
|
52
|
+
"default": "./build/esm/widgets/TutorialsHistory/index.js"
|
|
53
|
+
},
|
|
54
|
+
"require": {
|
|
55
|
+
"types": "./build/cjs/widgets/TutorialsHistory/index.d.ts",
|
|
56
|
+
"default": "./build/cjs/widgets/TutorialsHistory/index.js"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./widgets/QueriesNavigation": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./build/esm/widgets/QueriesNavigation/index.d.ts",
|
|
62
|
+
"default": "./build/esm/widgets/QueriesNavigation/index.js"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./build/cjs/widgets/QueriesNavigation/index.d.ts",
|
|
66
|
+
"default": "./build/cjs/widgets/QueriesNavigation/index.js"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"./widgets/QueryResults": {
|
|
70
|
+
"import": {
|
|
71
|
+
"types": "./build/esm/widgets/QueryResults/index.d.ts",
|
|
72
|
+
"default": "./build/esm/widgets/QueryResults/index.js"
|
|
73
|
+
},
|
|
74
|
+
"require": {
|
|
75
|
+
"types": "./build/cjs/widgets/QueryResults/index.d.ts",
|
|
76
|
+
"default": "./build/cjs/widgets/QueryResults/index.js"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"./widgets/DashboardCharts": {
|
|
80
|
+
"import": {
|
|
81
|
+
"types": "./build/esm/widgets/DashboardCharts/index.d.ts",
|
|
82
|
+
"default": "./build/esm/widgets/DashboardCharts/index.js"
|
|
83
|
+
},
|
|
84
|
+
"require": {
|
|
85
|
+
"types": "./build/cjs/widgets/DashboardCharts/index.d.ts",
|
|
86
|
+
"default": "./build/cjs/widgets/DashboardCharts/index.js"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
29
89
|
},
|
|
30
90
|
"files": [
|
|
31
91
|
"build"
|
|
@@ -39,7 +99,8 @@
|
|
|
39
99
|
"test": "npm run test:timezones && npm run test:components",
|
|
40
100
|
"test:timezones": "TZ=UTC vitest run tests/helpers/time.test.ts && TZ=Europe/Moscow vitest run tests/helpers/time.test.ts && TZ=Asia/Kolkata vitest run tests/helpers/time.test.ts && TZ=America/New_York vitest run tests/helpers/time.test.ts",
|
|
41
101
|
"test:components": "vitest run tests/components",
|
|
42
|
-
"prepublishOnly": "npm run build"
|
|
102
|
+
"prepublishOnly": "npm run build",
|
|
103
|
+
"test:tree-shaking": "npm run build && node tests/tree-shaking/check.mjs"
|
|
43
104
|
},
|
|
44
105
|
"repository": {
|
|
45
106
|
"type": "git",
|
|
@@ -72,10 +133,12 @@
|
|
|
72
133
|
"react": "^19.2.7",
|
|
73
134
|
"react-dom": "^19.2.7",
|
|
74
135
|
"storybook": "^10.5.0",
|
|
136
|
+
"tsx": "^4.23.13",
|
|
75
137
|
"typescript": "^6.0.3",
|
|
76
138
|
"vite": "^8.1.5",
|
|
77
139
|
"vite-plugin-svgr": "^5.2.0",
|
|
78
|
-
"vitest": "^3.2.4"
|
|
140
|
+
"vitest": "^3.2.4",
|
|
141
|
+
"esbuild": "^0.28.1"
|
|
79
142
|
},
|
|
80
143
|
"peerDependencies": {
|
|
81
144
|
"@gravity-ui/icons": ">=2.0.0",
|
|
@@ -87,11 +150,27 @@
|
|
|
87
150
|
"@gravity-ui/charts": "^1.57.2",
|
|
88
151
|
"@gravity-ui/dashkit": "^10.4.0",
|
|
89
152
|
"@gravity-ui/date-components": "^3.4.2",
|
|
153
|
+
"@gravity-ui/graph": "1.11.3",
|
|
90
154
|
"@gravity-ui/i18n": "^1.8.0",
|
|
91
155
|
"@gravity-ui/illustrations": "^2.1.1",
|
|
92
156
|
"@gravity-ui/react-data-table": "^2.2.1",
|
|
93
157
|
"@gravity-ui/unipika": "^5.6.3",
|
|
94
158
|
"bem-cn-lite": "^4.1.0",
|
|
95
159
|
"monaco-editor": "^0.56.0"
|
|
96
|
-
}
|
|
160
|
+
},
|
|
161
|
+
"overrides": {
|
|
162
|
+
"@gravity-ui/graph": {
|
|
163
|
+
"react": "$react",
|
|
164
|
+
"react-dom": "$react-dom"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"sideEffects": [
|
|
168
|
+
"**/*.css",
|
|
169
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/monaco.contribution.js",
|
|
170
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/clickhouse/clickhouse.contribution.js",
|
|
171
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/yql/yql.contribution.js",
|
|
172
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/yql_ansi/yql_ansi.contribution.js",
|
|
173
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/s-expressions/s-expressions.contribution.js",
|
|
174
|
+
"./build/*/components/MonacoEditor/monaco-yql-languages/themes/themes.contribution.js"
|
|
175
|
+
]
|
|
97
176
|
}
|