@gravity-ui/querieskit 1.5.1 → 1.7.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 +62 -3
- 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 +309 -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 +4 -2
- package/build/cjs/modules/TutorialRow/TutorialRow.js +5 -3
- package/build/cjs/modules/TutorialRow/TutorialRow.js.map +1 -1
- package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.d.ts +4 -2
- package/build/cjs/modules/TutorialSearchRow/TutorialSearchRow.js +7 -4
- 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 +3 -3
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js +12 -8
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.d.ts +8 -3
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js +19 -7
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.stories.d.ts +5 -0
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.stories.js +244 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.stories.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 +301 -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 +4 -2
- package/build/esm/modules/TutorialRow/TutorialRow.js +4 -2
- package/build/esm/modules/TutorialRow/TutorialRow.js.map +1 -1
- package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.d.ts +4 -2
- package/build/esm/modules/TutorialSearchRow/TutorialSearchRow.js +5 -2
- 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 +3 -3
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js +9 -5
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.d.ts +8 -3
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js +16 -4
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.stories.d.ts +5 -0
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.stories.js +244 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.stories.js.map +1 -1
- package/package.json +84 -5
|
@@ -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,IAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,cAAA,GAAAH,IAAA,CACJI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGD,IAAI,CAACG,MAAM,GAAAF,cAAA;IACvBG,OAAO,GAAAN,IAAA,CAAPM,OAAO;IACPC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,MAAM,GAAAR,IAAA,CAANQ,MAAM;IACNC,iBAAiB,GAAAT,IAAA,CAAjBS,iBAAiB;IACjBC,eAAe,GAAAV,IAAA,CAAfU,eAAe;IACfC,KAAK,GAAAX,IAAA,CAALW,KAAK;IACLC,cAAc,GAAAZ,IAAA,CAAdY,cAAc;IACdC,OAAO,GAAAb,IAAA,CAAPa,OAAO;IACDC,cAAc,GAAAd,IAAA,CAApBe,IAAI;IAAAC,gBAAA,GAAAhB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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,kBAAkB,CAAC;AAsBpC,OAAO,SAASS,YAAYA,CAAAC,IAAA,EAiBA;EAAA,IAhBxBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,cAAA,GAAAH,IAAA,CACJI,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAGD,IAAI,CAACG,MAAM,GAAAF,cAAA;IACvBG,OAAO,GAAAN,IAAA,CAAPM,OAAO;IACPC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,MAAM,GAAAR,IAAA,CAANQ,MAAM;IACNC,iBAAiB,GAAAT,IAAA,CAAjBS,iBAAiB;IACjBC,eAAe,GAAAV,IAAA,CAAfU,eAAe;IACfC,KAAK,GAAAX,IAAA,CAALW,KAAK;IACLC,cAAc,GAAAZ,IAAA,CAAdY,cAAc;IACdC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AK,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,KA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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';
|
|
4
|
-
export declare const TutorialRowContent: <T extends TutorialHistoryRow>({ item, variant, }: QueryListRowRenderData<T>) => React.JSX.Element;
|
|
2
|
+
import type { QueryListRowRenderData } from '../../types/queryList';
|
|
3
|
+
import type { TutorialHistoryRow } from '../../types/tutorial';
|
|
4
|
+
export declare const TutorialRowContent: <T extends TutorialHistoryRow>({ item, variant, renderLink, }: QueryListRowRenderData<T>) => React.JSX.Element;
|
|
@@ -1,19 +1,23 @@
|
|
|
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,
|
|
7
|
-
variant = _ref.variant
|
|
8
|
+
variant = _ref.variant,
|
|
9
|
+
renderLink = _ref.renderLink;
|
|
8
10
|
if ('header' in item) {
|
|
9
11
|
return /*#__PURE__*/_jsx(HistoryGroupHeader, {
|
|
10
12
|
title: item.header
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
15
|
return variant === 'search' ? /*#__PURE__*/_jsx(TutorialSearchRow, {
|
|
14
|
-
item: item
|
|
16
|
+
item: item,
|
|
17
|
+
renderLink: renderLink
|
|
15
18
|
}) : /*#__PURE__*/_jsx(TutorialRow, {
|
|
16
|
-
item: item
|
|
19
|
+
item: item,
|
|
20
|
+
renderLink: renderLink
|
|
17
21
|
});
|
|
18
22
|
};
|
|
19
23
|
// #sourceMappingURL=TutorialRowContent.js.map
|
|
@@ -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","renderLink","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 renderLink,\n}: QueryListRowRenderData<T>) => {\n if ('header' in item) {\n return <HistoryGroupHeader title={item.header} />;\n }\n\n return variant === 'search' ? (\n <TutorialSearchRow item={item} renderLink={renderLink} />\n ) : (\n <TutorialRow item={item} renderLink={renderLink} />\n );\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,EAIE;EAAA,IAH7BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,UAAU,GAAAH,IAAA,CAAVG,UAAU;EAEV,IAAI,QAAQ,IAAIF,IAAI,EAAE;IAClB,oBAAOH,IAAA,CAACJ,kBAAkB;MAACU,KAAK,EAAEH,IAAI,CAACI;IAAO,CAAE,CAAC;EACrD;EAEA,OAAOH,OAAO,KAAK,QAAQ,gBACvBJ,IAAA,CAACF,iBAAiB;IAACK,IAAI,EAAEA,IAAK;IAACE,UAAU,EAAEA;EAAW,CAAE,CAAC,gBAEzDL,IAAA,CAACH,WAAW;IAACM,IAAI,EAAEA,IAAK;IAACE,UAAU,EAAEA;EAAW,CAAE,CACrD;AACL,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, QueryListLinkRenderer, QueryListRowRenderData, 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;
|
|
@@ -10,6 +10,11 @@ export type TutorialsHistoryProps<T extends TutorialHistoryRow = TutorialHistory
|
|
|
10
10
|
filter?: QueryListFilterConfig;
|
|
11
11
|
items: QueryListItem<T>[];
|
|
12
12
|
selectedRowId?: T['id'];
|
|
13
|
+
renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;
|
|
13
14
|
onListItemClick?: (item: QueryListItem<T>) => void;
|
|
15
|
+
hasMore?: boolean;
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
onLoadMore?: () => void;
|
|
18
|
+
renderLink?: QueryListLinkRenderer;
|
|
14
19
|
};
|
|
15
|
-
export declare const TutorialsHistory: <T extends TutorialHistoryRow>({ title, logo, search, filter, items, selectedRowId, onListItemClick, className, }: TutorialsHistoryProps<T>) => React.JSX.Element;
|
|
20
|
+
export declare const TutorialsHistory: <T extends TutorialHistoryRow>({ title, logo, search, filter, items, selectedRowId, renderRowItem, onListItemClick, hasMore, loading, onLoadMore, renderLink, className, }: TutorialsHistoryProps<T>) => React.JSX.Element;
|
|
@@ -7,9 +7,11 @@ 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
|
-
import {
|
|
14
|
+
import { useListKey } from "../../helpers/useListKey";
|
|
13
15
|
import { TutorialRowContent } from "./TutorialRowContent";
|
|
14
16
|
import cn from 'bem-cn-lite';
|
|
15
17
|
import "./TutorialsHistory.css";
|
|
@@ -23,11 +25,17 @@ export var TutorialsHistory = function TutorialsHistory(_ref) {
|
|
|
23
25
|
filter = _ref.filter,
|
|
24
26
|
items = _ref.items,
|
|
25
27
|
selectedRowId = _ref.selectedRowId,
|
|
28
|
+
renderRowItem = _ref.renderRowItem,
|
|
26
29
|
onListItemClick = _ref.onListItemClick,
|
|
30
|
+
hasMore = _ref.hasMore,
|
|
31
|
+
loading = _ref.loading,
|
|
32
|
+
onLoadMore = _ref.onLoadMore,
|
|
33
|
+
renderLink = _ref.renderLink,
|
|
27
34
|
className = _ref.className;
|
|
28
35
|
var fullSearchAvailable = search.fullSearchAvailable !== false;
|
|
29
36
|
var showSearchResults = Boolean(fullSearchAvailable && search.fullSearch && ((_search$value = search.value) === null || _search$value === void 0 ? void 0 : _search$value.trim()));
|
|
30
37
|
var rowVariant = showSearchResults ? 'search' : 'default';
|
|
38
|
+
var listKey = useListKey(items, rowVariant, Boolean(onLoadMore));
|
|
31
39
|
return /*#__PURE__*/_jsx(HistoryLayout, {
|
|
32
40
|
className: block(null, className),
|
|
33
41
|
title: title || i18n('title_tutorials'),
|
|
@@ -45,11 +53,15 @@ export var TutorialsHistory = function TutorialsHistory(_ref) {
|
|
|
45
53
|
rowVariant: rowVariant,
|
|
46
54
|
selectedRowId: selectedRowId,
|
|
47
55
|
renderRow: function renderRow(data) {
|
|
48
|
-
return /*#__PURE__*/_jsx(TutorialRowContent, _objectSpread({}, data));
|
|
56
|
+
return renderRowItem ? renderRowItem(data) : /*#__PURE__*/_jsx(TutorialRowContent, _objectSpread({}, data));
|
|
49
57
|
},
|
|
50
58
|
showFiltersHint: Boolean(filter),
|
|
59
|
+
hasMore: hasMore,
|
|
60
|
+
loading: loading,
|
|
61
|
+
onLoadMore: onLoadMore,
|
|
62
|
+
renderLink: renderLink,
|
|
51
63
|
onItemClick: onListItemClick
|
|
52
|
-
},
|
|
64
|
+
}, listKey)
|
|
53
65
|
});
|
|
54
66
|
};
|
|
55
67
|
// #sourceMappingURL=TutorialsHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","HistoryHeader","HistoryLayout","RowsList","i18n","
|
|
1
|
+
{"version":3,"names":["React","HistoryHeader","HistoryLayout","RowsList","i18n","useListKey","TutorialRowContent","cn","jsx","_jsx","block","TutorialsHistory","_ref","_search$value","title","logo","search","filter","items","selectedRowId","renderRowItem","onListItemClick","hasMore","loading","onLoadMore","renderLink","className","fullSearchAvailable","showSearchResults","Boolean","fullSearch","value","trim","rowVariant","listKey","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 QueryListLinkRenderer,\n QueryListRowRenderData,\n QueryListSearchConfig,\n} from '../../types/queryList';\nimport type {TutorialHistoryRow} from '../../types/tutorial';\nimport {useListKey} from '../../helpers/useListKey';\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 renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n onListItemClick?: (item: QueryListItem<T>) => void;\n hasMore?: boolean;\n loading?: boolean;\n onLoadMore?: () => void;\n renderLink?: QueryListLinkRenderer;\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 renderRowItem,\n onListItemClick,\n hasMore,\n loading,\n onLoadMore,\n renderLink,\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 const listKey = useListKey(items, rowVariant, Boolean(onLoadMore));\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={listKey}\n items={items}\n rowVariant={rowVariant}\n selectedRowId={selectedRowId}\n renderRow={(data) =>\n renderRowItem ? renderRowItem(data) : <TutorialRowContent {...data} />\n }\n showFiltersHint={Boolean(filter)}\n hasMore={hasMore}\n loading={loading}\n onLoadMore={onLoadMore}\n renderLink={renderLink}\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;AASX,SAAQC,UAAU;AAClB,SAAQC,kBAAkB;AAC1B,OAAOC,EAAE,MAAM,aAAa;AAC5B;AAAiC,SAAAC,GAAA,IAAAC,IAAA;AAkBjC,IAAMC,KAAK,GAAGH,EAAE,CAAC,sBAAsB,CAAC;AAExC,OAAO,IAAMI,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAcG;EAAA,IAAAC,aAAA;EAAA,IAb5BC,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,aAAa,GAAAR,IAAA,CAAbQ,aAAa;IACbC,eAAe,GAAAT,IAAA,CAAfS,eAAe;IACfC,OAAO,GAAAV,IAAA,CAAPU,OAAO;IACPC,OAAO,GAAAX,IAAA,CAAPW,OAAO;IACPC,UAAU,GAAAZ,IAAA,CAAVY,UAAU;IACVC,UAAU,GAAAb,IAAA,CAAVa,UAAU;IACVC,SAAS,GAAAd,IAAA,CAATc,SA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C,OAAO,EAAEA,OAAQ;MACjBC,UAAU,EAAEA,UAAW;MACvBC,UAAU,EAAEA,UAAW;MACvBkB,WAAW,EAAEtB;IAAgB,GAZxBa,OAaR;EAAC,CACS,CAAC;AAExB,CAAC","ignoreList":[]}
|
|
@@ -5,3 +5,8 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof TutorialsHistory>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Empty: Story;
|
|
8
|
+
export declare const InitialLoading: Story;
|
|
9
|
+
export declare const Paginated: Story;
|
|
10
|
+
export declare const LoadingMore: Story;
|
|
11
|
+
export declare const RouterLinks: Story;
|
|
12
|
+
export declare const CustomRowRenderer: Story;
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
5
|
+
var _excluded = ["onClick"];
|
|
2
6
|
import "core-js/modules/es.array.concat.js";
|
|
3
7
|
import "core-js/modules/es.array.filter.js";
|
|
8
|
+
import "core-js/modules/es.array.from.js";
|
|
4
9
|
import "core-js/modules/es.array.includes.js";
|
|
10
|
+
import "core-js/modules/es.array.map.js";
|
|
5
11
|
import "core-js/modules/es.object.to-string.js";
|
|
6
12
|
import "core-js/modules/es.string.includes.js";
|
|
13
|
+
import "core-js/modules/es.string.iterator.js";
|
|
14
|
+
import "core-js/modules/web.timers.js";
|
|
7
15
|
import React, { useState } from 'react';
|
|
16
|
+
import { Flex, Icon, Text } from '@gravity-ui/uikit';
|
|
17
|
+
var BookOpenIcon = function BookOpenIcon(props) {
|
|
18
|
+
return /*#__PURE__*/_jsx("svg", _objectSpread(_objectSpread({}, props), {}, {
|
|
19
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
d: "M7.345 2.634q.136.069.268.145L8 3l.387-.221q.133-.076.268-.145a6.7 6.7 0 0 1 6.052-.03c.486.242.793.74.793 1.283v8.938c0 .65-.526 1.175-1.175 1.175h-.04c-.187 0-.37-.05-.529-.146a4.8 4.8 0 0 0-4.61-.177l-.199.1A2.1 2.1 0 0 1 8 14h-.117a1.6 1.6 0 0 1-.726-.171l-.233-.117a4.94 4.94 0 0 0-4.748.183.74.74 0 0 1-.381.105h-.12A1.175 1.175 0 0 1 .5 12.825V3.887c0-.543.307-1.04.793-1.284a6.7 6.7 0 0 1 6.052.03m1.405 9.572V4.3l.382-.218A5.2 5.2 0 0 1 14 3.927v8.357a6.3 6.3 0 0 0-5.25-.078m-1.5.005V4.299l-.382-.218A5.2 5.2 0 0 0 2 3.927v8.365a6.44 6.44 0 0 1 5.25-.082",
|
|
23
|
+
clipRule: "evenodd"
|
|
24
|
+
})
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
BookOpenIcon.defaultProps = {
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
29
|
+
width: "16",
|
|
30
|
+
height: "16",
|
|
31
|
+
fill: "none",
|
|
32
|
+
viewBox: "0 0 16 16"
|
|
33
|
+
};
|
|
34
|
+
import { HistoryGroupHeader, RowLink } from "../../components";
|
|
8
35
|
import { TutorialsHistory } from "./TutorialsHistory";
|
|
9
36
|
import { action } from 'storybook/actions';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
37
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
38
|
var QUERY = "use test;\n\nSELECT\n \"test_session\" AS session_id,\n \"test_task\" AS task_id,\n SUBSTRING(\"test\", 1, 1) AS truncated_char";
|
|
12
39
|
var filterFields = [{
|
|
13
40
|
id: 'onlyMine',
|
|
@@ -49,6 +76,56 @@ var BASE_ITEMS = [{
|
|
|
49
76
|
query: QUERY,
|
|
50
77
|
height: 28
|
|
51
78
|
}];
|
|
79
|
+
var LINK_ITEMS = BASE_ITEMS.map(function (item) {
|
|
80
|
+
return 'id' in item ? _objectSpread(_objectSpread({}, item), {}, {
|
|
81
|
+
href: "/tutorials/".concat(item.id)
|
|
82
|
+
}) : item;
|
|
83
|
+
});
|
|
84
|
+
var PAGINATION_PAGES = [Array.from({
|
|
85
|
+
length: 8
|
|
86
|
+
}, function (_, index) {
|
|
87
|
+
return {
|
|
88
|
+
id: "basics-".concat(index + 1),
|
|
89
|
+
title: "YQL basics: lesson ".concat(index + 1),
|
|
90
|
+
query: QUERY,
|
|
91
|
+
href: "/tutorials/basics-".concat(index + 1),
|
|
92
|
+
height: 28
|
|
93
|
+
};
|
|
94
|
+
}), Array.from({
|
|
95
|
+
length: 8
|
|
96
|
+
}, function (_, index) {
|
|
97
|
+
return {
|
|
98
|
+
id: "advanced-".concat(index + 1),
|
|
99
|
+
title: "Advanced YQL: lesson ".concat(index + 1),
|
|
100
|
+
query: QUERY,
|
|
101
|
+
href: "/tutorials/advanced-".concat(index + 1),
|
|
102
|
+
height: 28
|
|
103
|
+
};
|
|
104
|
+
})];
|
|
105
|
+
var CUSTOM_ROW_ITEMS = [{
|
|
106
|
+
header: 'Getting started',
|
|
107
|
+
height: 28
|
|
108
|
+
}, {
|
|
109
|
+
id: '01HZXB4K8P7Y2Q9T6M3N5R1C0A',
|
|
110
|
+
title: 'Getting started with YQL',
|
|
111
|
+
href: '/tutorials/getting-started',
|
|
112
|
+
height: 32
|
|
113
|
+
}];
|
|
114
|
+
var renderRouterLink = function renderRouterLink(_ref) {
|
|
115
|
+
var _onClick = _ref.onClick,
|
|
116
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
117
|
+
return /*#__PURE__*/_jsx("a", _objectSpread(_objectSpread({}, props), {}, {
|
|
118
|
+
"data-router-link": true,
|
|
119
|
+
onClick: function onClick(event) {
|
|
120
|
+
_onClick === null || _onClick === void 0 || _onClick(event);
|
|
121
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
action('routerNavigate')(props.href);
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
52
129
|
var meta = {
|
|
53
130
|
title: 'Widgets/TutorialsHistory',
|
|
54
131
|
component: TutorialsHistory,
|
|
@@ -136,6 +213,117 @@ var EmptyStory = function EmptyStory() {
|
|
|
136
213
|
})
|
|
137
214
|
});
|
|
138
215
|
};
|
|
216
|
+
var PaginatedStory = function PaginatedStory() {
|
|
217
|
+
var _useState7 = useState(PAGINATION_PAGES[0]),
|
|
218
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
219
|
+
items = _useState8[0],
|
|
220
|
+
setItems = _useState8[1];
|
|
221
|
+
var _useState9 = useState(1),
|
|
222
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
223
|
+
page = _useState0[0],
|
|
224
|
+
setPage = _useState0[1];
|
|
225
|
+
var _useState1 = useState(false),
|
|
226
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
227
|
+
loading = _useState10[0],
|
|
228
|
+
setLoading = _useState10[1];
|
|
229
|
+
var handleLoadMore = function handleLoadMore() {
|
|
230
|
+
var nextPage = PAGINATION_PAGES[page];
|
|
231
|
+
if (loading || !nextPage) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
action('onLoadMore')(page);
|
|
235
|
+
setLoading(true);
|
|
236
|
+
window.setTimeout(function () {
|
|
237
|
+
setItems(function (currentItems) {
|
|
238
|
+
return [].concat(_toConsumableArray(currentItems), _toConsumableArray(nextPage));
|
|
239
|
+
});
|
|
240
|
+
setPage(function (currentPage) {
|
|
241
|
+
return currentPage + 1;
|
|
242
|
+
});
|
|
243
|
+
setLoading(false);
|
|
244
|
+
}, 1500);
|
|
245
|
+
};
|
|
246
|
+
return /*#__PURE__*/_jsx("div", {
|
|
247
|
+
style: {
|
|
248
|
+
width: 300,
|
|
249
|
+
height: 300
|
|
250
|
+
},
|
|
251
|
+
children: /*#__PURE__*/_jsx(TutorialsHistory, {
|
|
252
|
+
title: "Paginated tutorials",
|
|
253
|
+
items: items,
|
|
254
|
+
selectedRowId: "basics-2",
|
|
255
|
+
loading: loading,
|
|
256
|
+
hasMore: page < PAGINATION_PAGES.length,
|
|
257
|
+
onLoadMore: handleLoadMore,
|
|
258
|
+
renderLink: renderRouterLink,
|
|
259
|
+
search: {
|
|
260
|
+
onUpdate: action('onSearchUpdate')
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
var RouterLinksStory = function RouterLinksStory() {
|
|
266
|
+
var _useState11 = useState({
|
|
267
|
+
value: '',
|
|
268
|
+
fullSearch: false
|
|
269
|
+
}),
|
|
270
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
271
|
+
search = _useState12[0],
|
|
272
|
+
setSearch = _useState12[1];
|
|
273
|
+
return /*#__PURE__*/_jsx("div", {
|
|
274
|
+
style: {
|
|
275
|
+
width: 500,
|
|
276
|
+
height: 500
|
|
277
|
+
},
|
|
278
|
+
children: /*#__PURE__*/_jsx(TutorialsHistory, {
|
|
279
|
+
title: "Router links",
|
|
280
|
+
items: LINK_ITEMS,
|
|
281
|
+
renderLink: renderRouterLink,
|
|
282
|
+
search: _objectSpread(_objectSpread({}, search), {}, {
|
|
283
|
+
hasClear: true,
|
|
284
|
+
onUpdate: setSearch
|
|
285
|
+
})
|
|
286
|
+
})
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
var CustomRowRendererStory = function CustomRowRendererStory() {
|
|
290
|
+
return /*#__PURE__*/_jsx("div", {
|
|
291
|
+
style: {
|
|
292
|
+
width: 400,
|
|
293
|
+
height: 300
|
|
294
|
+
},
|
|
295
|
+
children: /*#__PURE__*/_jsx(TutorialsHistory, {
|
|
296
|
+
title: "Custom tutorial rows",
|
|
297
|
+
items: CUSTOM_ROW_ITEMS,
|
|
298
|
+
selectedRowId: "01HZXB4K8P7Y2Q9T6M3N5R1C0A",
|
|
299
|
+
renderLink: renderRouterLink,
|
|
300
|
+
renderRowItem: function renderRowItem(_ref2) {
|
|
301
|
+
var item = _ref2.item,
|
|
302
|
+
renderLink = _ref2.renderLink;
|
|
303
|
+
return 'header' in item ? /*#__PURE__*/_jsx(HistoryGroupHeader, {
|
|
304
|
+
title: item.header
|
|
305
|
+
}) : /*#__PURE__*/_jsx(RowLink, {
|
|
306
|
+
href: item.href,
|
|
307
|
+
renderLink: renderLink,
|
|
308
|
+
children: /*#__PURE__*/_jsxs(Flex, {
|
|
309
|
+
alignItems: "center",
|
|
310
|
+
gap: 2,
|
|
311
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
312
|
+
data: BookOpenIcon,
|
|
313
|
+
size: 16
|
|
314
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
315
|
+
ellipsis: true,
|
|
316
|
+
children: item.title
|
|
317
|
+
})]
|
|
318
|
+
})
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
search: {
|
|
322
|
+
onUpdate: action('onSearchUpdate')
|
|
323
|
+
}
|
|
324
|
+
})
|
|
325
|
+
});
|
|
326
|
+
};
|
|
139
327
|
export var Default = {
|
|
140
328
|
render: function render() {
|
|
141
329
|
return /*#__PURE__*/_jsx(DefaultStory, {});
|
|
@@ -146,4 +334,59 @@ export var Empty = {
|
|
|
146
334
|
return /*#__PURE__*/_jsx(EmptyStory, {});
|
|
147
335
|
}
|
|
148
336
|
};
|
|
337
|
+
export var InitialLoading = {
|
|
338
|
+
args: {
|
|
339
|
+
title: 'Loading tutorials',
|
|
340
|
+
items: [],
|
|
341
|
+
loading: true,
|
|
342
|
+
search: {
|
|
343
|
+
onUpdate: action('onSearchUpdate')
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
decorators: [function (StoryComponent) {
|
|
347
|
+
return /*#__PURE__*/_jsx("div", {
|
|
348
|
+
style: {
|
|
349
|
+
width: 300,
|
|
350
|
+
height: 500
|
|
351
|
+
},
|
|
352
|
+
children: /*#__PURE__*/_jsx(StoryComponent, {})
|
|
353
|
+
});
|
|
354
|
+
}]
|
|
355
|
+
};
|
|
356
|
+
export var Paginated = {
|
|
357
|
+
render: function render() {
|
|
358
|
+
return /*#__PURE__*/_jsx(PaginatedStory, {});
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
export var LoadingMore = {
|
|
362
|
+
args: {
|
|
363
|
+
title: 'Loading next page',
|
|
364
|
+
items: PAGINATION_PAGES[0],
|
|
365
|
+
loading: true,
|
|
366
|
+
hasMore: true,
|
|
367
|
+
onLoadMore: action('onLoadMore'),
|
|
368
|
+
search: {
|
|
369
|
+
onUpdate: action('onSearchUpdate')
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
decorators: [function (StoryComponent) {
|
|
373
|
+
return /*#__PURE__*/_jsx("div", {
|
|
374
|
+
style: {
|
|
375
|
+
width: 300,
|
|
376
|
+
height: 300
|
|
377
|
+
},
|
|
378
|
+
children: /*#__PURE__*/_jsx(StoryComponent, {})
|
|
379
|
+
});
|
|
380
|
+
}]
|
|
381
|
+
};
|
|
382
|
+
export var RouterLinks = {
|
|
383
|
+
render: function render() {
|
|
384
|
+
return /*#__PURE__*/_jsx(RouterLinksStory, {});
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
export var CustomRowRenderer = {
|
|
388
|
+
render: function render() {
|
|
389
|
+
return /*#__PURE__*/_jsx(CustomRowRendererStory, {});
|
|
390
|
+
}
|
|
391
|
+
};
|
|
149
392
|
// #sourceMappingURL=TutorialsHistory.stories.js.map
|