@gravity-ui/querieskit 1.1.0 → 1.2.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/CHANGELOG.md +12 -0
- package/build/cjs/components/EditableRowTitle/EditableRowTitle.d.ts +7 -0
- package/build/cjs/{modules/HistoryRow/HistoryRowTitle.js → components/EditableRowTitle/EditableRowTitle.js} +4 -6
- package/build/cjs/components/EditableRowTitle/EditableRowTitle.js.map +1 -0
- package/build/cjs/components/EditableRowTitle/index.d.ts +2 -0
- package/build/cjs/components/EditableRowTitle/index.js +13 -0
- package/build/cjs/components/EditableRowTitle/index.js.map +1 -0
- package/build/cjs/components/HistoryFilter/HistoryFilter.d.ts +2 -2
- package/build/cjs/components/HistoryFilter/HistoryFilter.js.map +1 -1
- package/build/cjs/components/LazyList/LazyList.css +0 -2
- package/build/cjs/components/LazyList/LazyList.css.map +1 -1
- package/build/cjs/components/RowActionsMenu/RowActionsMenu.d.ts +7 -0
- package/build/cjs/{modules/HistoryRow/HistoryRowMenu.js → components/RowActionsMenu/RowActionsMenu.js} +9 -6
- package/build/cjs/components/RowActionsMenu/RowActionsMenu.js.map +1 -0
- package/build/cjs/components/RowActionsMenu/index.d.ts +2 -0
- package/build/cjs/components/RowActionsMenu/index.js +13 -0
- package/build/cjs/components/RowActionsMenu/index.js.map +1 -0
- package/build/cjs/components/index.d.ts +4 -0
- package/build/cjs/components/index.js +16 -0
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/helpers/getListKey.d.ts +2 -2
- package/build/cjs/helpers/getListKey.js.map +1 -1
- package/build/cjs/helpers/isFieldVisible.d.ts +5 -4
- package/build/cjs/helpers/isFieldVisible.js +2 -2
- package/build/cjs/helpers/isFieldVisible.js.map +1 -1
- package/build/cjs/helpers/time.d.ts +1 -0
- package/build/cjs/helpers/time.js +7 -3
- package/build/cjs/helpers/time.js.map +1 -1
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +11 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/modules/HistoryComparisonActions/HistoryComparisonActions.css +5 -0
- package/build/cjs/modules/HistoryComparisonActions/HistoryComparisonActions.css.map +1 -0
- package/build/cjs/modules/HistoryComparisonActions/HistoryComparisonActions.d.ts +8 -0
- package/build/cjs/{widgets/QueriesHistory/ComparisonActions.js → modules/HistoryComparisonActions/HistoryComparisonActions.js} +11 -11
- package/build/cjs/modules/HistoryComparisonActions/HistoryComparisonActions.js.map +1 -0
- package/build/cjs/modules/HistoryComparisonActions/index.d.ts +2 -0
- package/build/cjs/modules/HistoryComparisonActions/index.js +13 -0
- package/build/cjs/modules/HistoryComparisonActions/index.js.map +1 -0
- package/build/cjs/modules/HistoryHeader/HistoryHeader.d.ts +2 -2
- package/build/cjs/modules/HistoryHeader/HistoryHeader.js.map +1 -1
- package/build/cjs/modules/HistoryRow/HistoryRow.d.ts +3 -2
- package/build/cjs/modules/HistoryRow/HistoryRow.js +2 -4
- package/build/cjs/modules/HistoryRow/HistoryRow.js.map +1 -1
- package/build/cjs/modules/HistoryRow/HistoryRow.stories.js.map +1 -1
- package/build/cjs/modules/HistorySearchRow/HistorySearchRow.d.ts +3 -2
- package/build/cjs/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
- package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListHeader.js +1 -7
- package/build/cjs/modules/NavigationItemsList/internal/NavigationItemsListHeader.js.map +1 -1
- package/build/cjs/modules/QueriesList/QueriesList.css +10 -0
- package/build/cjs/modules/QueriesList/QueriesList.css.map +1 -0
- package/build/cjs/modules/QueriesList/QueriesList.d.ts +19 -0
- package/build/cjs/modules/QueriesList/QueriesList.js +75 -0
- package/build/cjs/modules/QueriesList/QueriesList.js.map +1 -0
- package/build/cjs/modules/QueriesList/index.d.ts +2 -0
- package/build/cjs/modules/QueriesList/index.js +13 -0
- package/build/cjs/modules/QueriesList/index.js.map +1 -0
- package/build/cjs/modules/RowsList/RowsList.d.ts +11 -11
- package/build/cjs/modules/RowsList/RowsList.js +5 -1
- package/build/cjs/modules/RowsList/RowsList.js.map +1 -1
- package/build/cjs/modules/RowsList/helpers/prepareRowData.d.ts +9 -9
- package/build/cjs/modules/RowsList/helpers/prepareRowData.js.map +1 -1
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.css +17 -0
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.css.map +1 -0
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.d.ts +9 -0
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js +78 -0
- package/build/cjs/modules/SavedQueryRow/SavedQueryRow.js.map +1 -0
- package/build/cjs/modules/SavedQueryRow/index.d.ts +2 -0
- package/build/cjs/modules/SavedQueryRow/index.js +13 -0
- package/build/cjs/modules/SavedQueryRow/index.js.map +1 -0
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.css +12 -0
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.css.map +1 -0
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +9 -0
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +65 -0
- package/build/cjs/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -0
- package/build/cjs/modules/SavedQuerySearchRow/index.d.ts +2 -0
- package/build/cjs/modules/SavedQuerySearchRow/index.js +13 -0
- package/build/cjs/modules/SavedQuerySearchRow/index.js.map +1 -0
- package/build/cjs/modules/index.d.ts +8 -2
- package/build/cjs/modules/index.js +32 -8
- package/build/cjs/modules/index.js.map +1 -1
- package/build/cjs/types/history.d.ts +4 -85
- package/build/cjs/types/history.js.map +1 -1
- package/build/cjs/types/queryList.d.ts +83 -0
- package/build/cjs/types/queryList.js +6 -0
- package/build/cjs/types/queryList.js.map +1 -0
- package/build/cjs/types/savedQueries.d.ts +6 -0
- package/build/cjs/types/savedQueries.js +6 -0
- package/build/cjs/types/savedQueries.js.map +1 -0
- package/build/cjs/types/tutorial.d.ts +2 -2
- package/build/cjs/types/tutorial.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.css +0 -6
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.css.map +1 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.d.ts +11 -10
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.js +15 -34
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
- package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.d.ts +4 -0
- package/build/cjs/{modules/HistoryList → widgets/QueriesHistory/internal}/HistoryRowContent.js +4 -5
- package/build/cjs/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -0
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.css +3 -0
- package/build/cjs/widgets/QueriesNavigation/QueriesNavigation.css.map +1 -1
- package/build/cjs/widgets/SavedQueries/SavedQueries.css +4 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.css.map +1 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.d.ts +21 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.js +58 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.js.map +1 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.stories.d.ts +8 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.stories.js +286 -0
- package/build/cjs/widgets/SavedQueries/SavedQueries.stories.js.map +1 -0
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.d.ts +8 -0
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js +33 -0
- package/build/cjs/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -0
- package/build/cjs/widgets/SavedQueries/i18n/dicts.d.ts +9 -0
- package/build/cjs/widgets/SavedQueries/i18n/dicts.js +14 -0
- package/build/cjs/widgets/SavedQueries/i18n/dicts.js.map +1 -0
- package/build/cjs/widgets/SavedQueries/i18n/en.json +3 -0
- package/build/cjs/widgets/SavedQueries/i18n/index.d.ts +6 -0
- package/build/cjs/widgets/SavedQueries/i18n/index.js +11 -0
- package/build/cjs/widgets/SavedQueries/i18n/index.js.map +1 -0
- package/build/cjs/widgets/SavedQueries/i18n/ru.json +3 -0
- package/build/cjs/widgets/SavedQueries/index.d.ts +2 -0
- package/build/cjs/widgets/SavedQueries/index.js +13 -0
- package/build/cjs/widgets/SavedQueries/index.js.map +1 -0
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
- package/build/cjs/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.d.ts +5 -5
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/build/cjs/widgets/TutorialsHistory/TutorialsHistory.stories.js.map +1 -1
- package/build/cjs/widgets/index.d.ts +2 -0
- package/build/cjs/widgets/index.js +7 -0
- package/build/cjs/widgets/index.js.map +1 -1
- package/build/esm/components/EditableRowTitle/EditableRowTitle.d.ts +7 -0
- package/build/esm/{modules/HistoryRow/HistoryRowTitle.js → components/EditableRowTitle/EditableRowTitle.js} +4 -6
- package/build/esm/components/EditableRowTitle/EditableRowTitle.js.map +1 -0
- package/build/esm/components/EditableRowTitle/index.d.ts +2 -0
- package/build/esm/components/EditableRowTitle/index.js +2 -0
- package/build/esm/components/EditableRowTitle/index.js.map +1 -0
- package/build/esm/components/HistoryFilter/HistoryFilter.d.ts +2 -2
- package/build/esm/components/HistoryFilter/HistoryFilter.js.map +1 -1
- package/build/esm/components/LazyList/LazyList.css +0 -2
- package/build/esm/components/LazyList/LazyList.css.map +1 -1
- package/build/esm/components/LazyList/LazyList.scss +6 -6
- package/build/esm/components/RowActionsMenu/RowActionsMenu.d.ts +7 -0
- package/build/esm/{modules/HistoryRow/HistoryRowMenu.js → components/RowActionsMenu/RowActionsMenu.js} +8 -5
- package/build/esm/components/RowActionsMenu/RowActionsMenu.js.map +1 -0
- package/build/esm/components/RowActionsMenu/index.d.ts +2 -0
- package/build/esm/components/RowActionsMenu/index.js +2 -0
- package/build/esm/components/RowActionsMenu/index.js.map +1 -0
- package/build/esm/components/index.d.ts +4 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/helpers/getListKey.d.ts +2 -2
- package/build/esm/helpers/getListKey.js.map +1 -1
- package/build/esm/helpers/isFieldVisible.d.ts +5 -4
- package/build/esm/helpers/isFieldVisible.js +2 -2
- package/build/esm/helpers/isFieldVisible.js.map +1 -1
- package/build/esm/helpers/time.d.ts +1 -0
- package/build/esm/helpers/time.js +6 -2
- package/build/esm/helpers/time.js.map +1 -1
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/modules/HistoryComparisonActions/HistoryComparisonActions.css +5 -0
- package/build/esm/modules/HistoryComparisonActions/HistoryComparisonActions.css.map +1 -0
- package/build/esm/modules/HistoryComparisonActions/HistoryComparisonActions.d.ts +8 -0
- package/build/esm/{widgets/QueriesHistory/ComparisonActions.js → modules/HistoryComparisonActions/HistoryComparisonActions.js} +10 -10
- package/build/esm/modules/HistoryComparisonActions/HistoryComparisonActions.js.map +1 -0
- package/build/esm/{widgets/QueriesHistory/ComparisonActions.scss → modules/HistoryComparisonActions/HistoryComparisonActions.scss} +2 -2
- package/build/esm/modules/HistoryComparisonActions/index.d.ts +2 -0
- package/build/esm/modules/HistoryComparisonActions/index.js +2 -0
- package/build/esm/modules/HistoryComparisonActions/index.js.map +1 -0
- package/build/esm/modules/HistoryHeader/HistoryHeader.d.ts +2 -2
- package/build/esm/modules/HistoryHeader/HistoryHeader.js.map +1 -1
- package/build/esm/modules/HistoryRow/HistoryRow.d.ts +3 -2
- package/build/esm/modules/HistoryRow/HistoryRow.js +3 -5
- package/build/esm/modules/HistoryRow/HistoryRow.js.map +1 -1
- package/build/esm/modules/HistoryRow/HistoryRow.stories.js.map +1 -1
- package/build/esm/modules/HistorySearchRow/HistorySearchRow.d.ts +3 -2
- package/build/esm/modules/HistorySearchRow/HistorySearchRow.js.map +1 -1
- package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListHeader.js +1 -7
- package/build/esm/modules/NavigationItemsList/internal/NavigationItemsListHeader.js.map +1 -1
- package/build/esm/modules/QueriesList/QueriesList.css +10 -0
- package/build/esm/modules/QueriesList/QueriesList.css.map +1 -0
- package/build/esm/modules/QueriesList/QueriesList.d.ts +19 -0
- package/build/esm/modules/QueriesList/QueriesList.js +68 -0
- package/build/esm/modules/QueriesList/QueriesList.js.map +1 -0
- package/build/esm/modules/QueriesList/QueriesList.scss +10 -0
- package/build/esm/modules/QueriesList/index.d.ts +2 -0
- package/build/esm/modules/QueriesList/index.js +2 -0
- package/build/esm/modules/QueriesList/index.js.map +1 -0
- package/build/esm/modules/RowsList/RowsList.d.ts +11 -11
- package/build/esm/modules/RowsList/RowsList.js +5 -1
- package/build/esm/modules/RowsList/RowsList.js.map +1 -1
- package/build/esm/modules/RowsList/helpers/prepareRowData.d.ts +9 -9
- package/build/esm/modules/RowsList/helpers/prepareRowData.js.map +1 -1
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.css +17 -0
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.css.map +1 -0
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.d.ts +9 -0
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.js +71 -0
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.js.map +1 -0
- package/build/esm/modules/SavedQueryRow/SavedQueryRow.scss +20 -0
- package/build/esm/modules/SavedQueryRow/index.d.ts +2 -0
- package/build/esm/modules/SavedQueryRow/index.js +2 -0
- package/build/esm/modules/SavedQueryRow/index.js.map +1 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.css +12 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.css.map +1 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.d.ts +9 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js +58 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.js.map +1 -0
- package/build/esm/modules/SavedQuerySearchRow/SavedQuerySearchRow.scss +15 -0
- package/build/esm/modules/SavedQuerySearchRow/index.d.ts +2 -0
- package/build/esm/modules/SavedQuerySearchRow/index.js +2 -0
- package/build/esm/modules/SavedQuerySearchRow/index.js.map +1 -0
- package/build/esm/modules/index.d.ts +8 -2
- package/build/esm/modules/index.js +4 -1
- package/build/esm/modules/index.js.map +1 -1
- package/build/esm/types/history.d.ts +4 -85
- package/build/esm/types/history.js.map +1 -1
- package/build/esm/types/queryList.d.ts +83 -0
- package/build/esm/types/queryList.js +2 -0
- package/build/esm/types/queryList.js.map +1 -0
- package/build/esm/types/savedQueries.d.ts +6 -0
- package/build/esm/types/savedQueries.js +2 -0
- package/build/esm/types/savedQueries.js.map +1 -0
- package/build/esm/types/tutorial.d.ts +2 -2
- package/build/esm/types/tutorial.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.css +0 -6
- package/build/esm/widgets/QueriesHistory/QueriesHistory.css.map +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.d.ts +11 -10
- package/build/esm/widgets/QueriesHistory/QueriesHistory.js +16 -35
- package/build/esm/widgets/QueriesHistory/QueriesHistory.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/QueriesHistory.scss +1 -8
- package/build/esm/widgets/QueriesHistory/QueriesHistory.stories.js.map +1 -1
- package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.d.ts +4 -0
- package/build/esm/{modules/HistoryList → widgets/QueriesHistory/internal}/HistoryRowContent.js +2 -3
- package/build/esm/widgets/QueriesHistory/internal/HistoryRowContent.js.map +1 -0
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.css +3 -0
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.css.map +1 -1
- package/build/esm/widgets/QueriesNavigation/QueriesNavigation.scss +2 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.css +4 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.css.map +1 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.d.ts +21 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.js +51 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.js.map +1 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.scss +3 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.stories.d.ts +8 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.stories.js +278 -0
- package/build/esm/widgets/SavedQueries/SavedQueries.stories.js.map +1 -0
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.d.ts +8 -0
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js +26 -0
- package/build/esm/widgets/SavedQueries/SavedQueryRowContent.js.map +1 -0
- package/build/esm/widgets/SavedQueries/i18n/dicts.d.ts +9 -0
- package/build/esm/widgets/SavedQueries/i18n/dicts.js +7 -0
- package/build/esm/widgets/SavedQueries/i18n/dicts.js.map +1 -0
- package/build/esm/widgets/SavedQueries/i18n/en.json +3 -0
- package/build/esm/widgets/SavedQueries/i18n/index.d.ts +6 -0
- package/build/esm/widgets/SavedQueries/i18n/index.js +4 -0
- package/build/esm/widgets/SavedQueries/i18n/index.js.map +1 -0
- package/build/esm/widgets/SavedQueries/i18n/ru.json +3 -0
- package/build/esm/widgets/SavedQueries/index.d.ts +2 -0
- package/build/esm/widgets/SavedQueries/index.js +2 -0
- package/build/esm/widgets/SavedQueries/index.js.map +1 -0
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.d.ts +2 -2
- package/build/esm/widgets/TutorialsHistory/TutorialRowContent.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.d.ts +5 -5
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.js.map +1 -1
- package/build/esm/widgets/TutorialsHistory/TutorialsHistory.stories.js.map +1 -1
- package/build/esm/widgets/index.d.ts +2 -0
- package/build/esm/widgets/index.js +1 -0
- package/build/esm/widgets/index.js.map +1 -1
- package/package.json +1 -1
- package/src/{modules/HistoryRow/HistoryRowTitle.tsx → components/EditableRowTitle/EditableRowTitle.tsx} +10 -12
- package/src/components/EditableRowTitle/index.ts +2 -0
- package/src/components/HistoryFilter/HistoryFilter.tsx +2 -2
- package/src/components/LazyList/LazyList.scss +6 -6
- package/src/components/RowActionsMenu/RowActionsMenu.tsx +47 -0
- package/src/components/RowActionsMenu/index.ts +2 -0
- package/src/components/index.ts +4 -0
- package/src/helpers/getListKey.ts +4 -4
- package/src/helpers/isFieldVisible.ts +5 -4
- package/src/helpers/time.ts +4 -0
- package/src/index.ts +2 -0
- package/src/{widgets/QueriesHistory/ComparisonActions.scss → modules/HistoryComparisonActions/HistoryComparisonActions.scss} +2 -2
- package/src/{widgets/QueriesHistory/ComparisonActions.tsx → modules/HistoryComparisonActions/HistoryComparisonActions.tsx} +8 -8
- package/src/modules/HistoryComparisonActions/index.ts +2 -0
- package/src/modules/HistoryHeader/HistoryHeader.tsx +2 -2
- package/src/modules/HistoryRow/HistoryRow.stories.tsx +3 -2
- package/src/modules/HistoryRow/HistoryRow.tsx +13 -7
- package/src/modules/HistorySearchRow/HistorySearchRow.tsx +3 -2
- package/src/modules/NavigationItemsList/internal/NavigationItemsListHeader.tsx +1 -5
- package/src/modules/QueriesList/QueriesList.scss +10 -0
- package/src/modules/QueriesList/QueriesList.tsx +98 -0
- package/src/modules/QueriesList/index.ts +2 -0
- package/src/modules/RowsList/RowsList.tsx +27 -23
- package/src/modules/RowsList/helpers/prepareRowData.ts +18 -18
- package/src/modules/SavedQueryRow/SavedQueryRow.scss +20 -0
- package/src/modules/SavedQueryRow/SavedQueryRow.tsx +60 -0
- package/src/modules/SavedQueryRow/index.ts +2 -0
- package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.scss +15 -0
- package/src/modules/SavedQuerySearchRow/SavedQuerySearchRow.tsx +58 -0
- package/src/modules/SavedQuerySearchRow/index.ts +2 -0
- package/src/modules/index.ts +8 -2
- package/src/types/history.ts +4 -95
- package/src/types/queryList.ts +92 -0
- package/src/types/savedQueries.ts +7 -0
- package/src/types/tutorial.ts +2 -2
- package/src/widgets/QueriesHistory/QueriesHistory.scss +1 -8
- package/src/widgets/QueriesHistory/QueriesHistory.stories.tsx +11 -11
- package/src/widgets/QueriesHistory/QueriesHistory.tsx +35 -61
- package/src/{modules/HistoryList → widgets/QueriesHistory/internal}/HistoryRowContent.tsx +5 -5
- package/src/widgets/QueriesNavigation/QueriesNavigation.scss +2 -0
- package/src/widgets/SavedQueries/SavedQueries.scss +3 -0
- package/src/widgets/SavedQueries/SavedQueries.stories.tsx +192 -0
- package/src/widgets/SavedQueries/SavedQueries.tsx +77 -0
- package/src/widgets/SavedQueries/SavedQueryRowContent.tsx +26 -0
- package/src/widgets/SavedQueries/i18n/dicts.ts +4 -0
- package/src/widgets/SavedQueries/i18n/en.json +3 -0
- package/src/widgets/SavedQueries/i18n/index.ts +4 -0
- package/src/widgets/SavedQueries/i18n/ru.json +3 -0
- package/src/widgets/SavedQueries/index.ts +2 -0
- package/src/widgets/TutorialsHistory/TutorialRowContent.tsx +2 -2
- package/src/widgets/TutorialsHistory/TutorialsHistory.stories.tsx +3 -3
- package/src/widgets/TutorialsHistory/TutorialsHistory.tsx +5 -9
- package/src/widgets/index.ts +2 -0
- package/build/cjs/modules/HistoryList/HistoryList.d.ts +0 -16
- package/build/cjs/modules/HistoryList/HistoryList.js +0 -24
- package/build/cjs/modules/HistoryList/HistoryList.js.map +0 -1
- package/build/cjs/modules/HistoryList/HistoryList.stories.d.ts +0 -14
- package/build/cjs/modules/HistoryList/HistoryList.stories.js +0 -245
- package/build/cjs/modules/HistoryList/HistoryList.stories.js.map +0 -1
- package/build/cjs/modules/HistoryList/HistoryRowContent.d.ts +0 -3
- package/build/cjs/modules/HistoryList/HistoryRowContent.js.map +0 -1
- package/build/cjs/modules/HistoryList/index.d.ts +0 -2
- package/build/cjs/modules/HistoryList/index.js +0 -13
- package/build/cjs/modules/HistoryList/index.js.map +0 -1
- package/build/cjs/modules/HistoryRow/HistoryRowMenu.d.ts +0 -8
- package/build/cjs/modules/HistoryRow/HistoryRowMenu.js.map +0 -1
- package/build/cjs/modules/HistoryRow/HistoryRowTitle.d.ts +0 -8
- package/build/cjs/modules/HistoryRow/HistoryRowTitle.js.map +0 -1
- package/build/cjs/widgets/QueriesHistory/ComparisonActions.css +0 -5
- package/build/cjs/widgets/QueriesHistory/ComparisonActions.css.map +0 -1
- package/build/cjs/widgets/QueriesHistory/ComparisonActions.d.ts +0 -9
- package/build/cjs/widgets/QueriesHistory/ComparisonActions.js.map +0 -1
- package/build/esm/modules/HistoryList/HistoryList.d.ts +0 -16
- package/build/esm/modules/HistoryList/HistoryList.js +0 -17
- package/build/esm/modules/HistoryList/HistoryList.js.map +0 -1
- package/build/esm/modules/HistoryList/HistoryList.stories.d.ts +0 -14
- package/build/esm/modules/HistoryList/HistoryList.stories.js +0 -237
- package/build/esm/modules/HistoryList/HistoryList.stories.js.map +0 -1
- package/build/esm/modules/HistoryList/HistoryRowContent.d.ts +0 -3
- package/build/esm/modules/HistoryList/HistoryRowContent.js.map +0 -1
- package/build/esm/modules/HistoryList/index.d.ts +0 -2
- package/build/esm/modules/HistoryList/index.js +0 -2
- package/build/esm/modules/HistoryList/index.js.map +0 -1
- package/build/esm/modules/HistoryRow/HistoryRowMenu.d.ts +0 -8
- package/build/esm/modules/HistoryRow/HistoryRowMenu.js.map +0 -1
- package/build/esm/modules/HistoryRow/HistoryRowTitle.d.ts +0 -8
- package/build/esm/modules/HistoryRow/HistoryRowTitle.js.map +0 -1
- package/build/esm/widgets/QueriesHistory/ComparisonActions.css +0 -5
- package/build/esm/widgets/QueriesHistory/ComparisonActions.css.map +0 -1
- package/build/esm/widgets/QueriesHistory/ComparisonActions.d.ts +0 -9
- package/build/esm/widgets/QueriesHistory/ComparisonActions.js.map +0 -1
- package/src/modules/HistoryList/HistoryList.stories.tsx +0 -181
- package/src/modules/HistoryList/HistoryList.tsx +0 -41
- package/src/modules/HistoryList/index.ts +0 -2
- package/src/modules/HistoryRow/HistoryRowMenu.tsx +0 -47
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addI18Keysets","dicts"],"sources":["index.ts"],"sourcesContent":["import {addI18Keysets} from '../../../i18n';\nimport dicts from './dicts';\n\nexport default addI18Keysets('qp:saved-queries', dicts);\n"],"mappings":"AAAA,SAAQA,aAAa;AACrB,OAAOC,KAAK;AAEZ,eAAeD,aAAa,CAAC,kBAAkB,EAAEC,KAAK,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SavedQueries"],"sources":["index.ts"],"sourcesContent":["export {SavedQueries} from './SavedQueries';\nexport type {SavedQueriesProps} from './SavedQueries';\n"],"mappings":"AAAA,SAAQA,YAAY","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { QueryListRowRenderData } from '../../types/queryList';
|
|
3
3
|
import { TutorialHistoryRow } from '../../types/tutorial';
|
|
4
|
-
export declare const TutorialRowContent: <T extends TutorialHistoryRow>({ item, variant, }:
|
|
4
|
+
export declare const TutorialRowContent: <T extends TutorialHistoryRow>({ item, variant, }: QueryListRowRenderData<T>) => React.JSX.Element;
|
|
@@ -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 {
|
|
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, TutorialSearchRow} from '../../modules';\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,EAAEC,iBAAiB;AAAuB,SAAAC,GAAA,IAAAC,IAAA;AAE7D,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,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { QueryListFilterConfig, QueryListItem, QueryListSearchConfig } from '../../types/queryList';
|
|
3
3
|
import { TutorialHistoryRow } from '../../types/tutorial';
|
|
4
4
|
import './TutorialsHistory.scss';
|
|
5
5
|
export type TutorialsHistoryProps<T extends TutorialHistoryRow = TutorialHistoryRow> = {
|
|
6
6
|
className?: string;
|
|
7
7
|
title?: string;
|
|
8
8
|
logo?: React.ReactNode;
|
|
9
|
-
search:
|
|
10
|
-
filter?:
|
|
11
|
-
items:
|
|
9
|
+
search: QueryListSearchConfig;
|
|
10
|
+
filter?: QueryListFilterConfig;
|
|
11
|
+
items: QueryListItem<T>[];
|
|
12
12
|
selectedRowId?: T['id'];
|
|
13
|
-
onListItemClick?: (item:
|
|
13
|
+
onListItemClick?: (item: QueryListItem<T>) => void;
|
|
14
14
|
};
|
|
15
15
|
export declare const TutorialsHistory: <T extends TutorialHistoryRow>({ title, logo, search, filter, items, selectedRowId, onListItemClick, className, }: TutorialsHistoryProps<T>) => React.JSX.Element;
|
|
@@ -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","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, HistoryLayout, RowsList} from '../../modules';\nimport i18n from './i18n';\nimport {
|
|
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","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, HistoryLayout, RowsList} from '../../modules';\nimport i18n from './i18n';\nimport {QueryListFilterConfig, QueryListItem, QueryListSearchConfig} from '../../types/queryList';\nimport {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 showSearchResults = Boolean(search.fullSearch && search.value?.trim());\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 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,EAAEC,aAAa,EAAEC,QAAQ;AAC9C,OAAOC,IAAI;AAGX,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,IAAMC,iBAAiB,GAAGC,OAAO,CAACP,MAAM,CAACQ,UAAU,MAAAX,aAAA,GAAIG,MAAM,CAACS,KAAK,cAAAZ,aAAA,uBAAZA,aAAA,CAAca,IAAI,CAAC,CAAC,EAAC;EAC5E,IAAMC,UAAU,GAAGL,iBAAiB,GAAG,QAAQ,GAAG,SAAS;EAE3D,oBACIb,IAAA,CAACP,aAAa;IACVmB,SAAS,EAAEX,KAAK,CAAC,IAAI,EAAEW,SAAS,CAAE;IAClCP,KAAK,EAAEA,KAAK,IAAIV,IAAI,CAAC,iBAAiB,CAAE;IACxCW,IAAI,EAAEA,IAAK;IACXa,MAAM,eACFnB,IAAA,CAACR,aAAa;MACVe,MAAM,EAAEA,MAAM,CAACS,KAAM;MACrBD,UAAU,EAAER,MAAM,CAACQ,UAAW;MAC9BK,QAAQ,EAAEb,MAAM,CAACa,QAAS;MAC1BZ,MAAM,EAAEA,MAAO;MACfa,QAAQ,EAAEd,MAAM,CAACc;IAAS,CAC7B,CACJ;IAAAC,QAAA,eAEDtB,IAAA,CAACN,QAAQ;MAELe,KAAK,EAAEA,KAAM;MACbS,UAAU,EAAEA,UAAW;MACvBR,aAAa,EAAEA,aAAc;MAC7Ba,SAAS,EAAE,SAAXA,SAASA,CAAGC,IAAI;QAAA,oBAAKxB,IAAA,CAACH,kBAAkB,EAAA4B,aAAA,KAAKD,IAAI,CAAG,CAAC;MAAA,CAAC;MACtDE,eAAe,EAAEZ,OAAO,CAACN,MAAM,CAAE;MACjCmB,WAAW,EAAEhB;IAAgB,GANxBf,UAAU,CAACa,KAAK,EAAES,UAAU,CAOpC;EAAC,CACS,CAAC;AAExB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","TutorialsHistory","action","jsx","_jsx","QUERY","filterFields","id","type","title","initialValue","items","logFilterApply","logFilterReset","BASE_ITEMS","query","height","meta","component","tags","parameters","layout","DefaultStory","_useState","concat","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","handleOnSearch","data","newItems","filter","item","_item$query","toLowerCase","searchValue","includes","style","width","children","fields","onApply","onReset","hasClear","onUpdate","EmptyStory","_useState5","_useState6","Default","render","Empty"],"sources":["TutorialsHistory.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {TutorialsHistory} from './TutorialsHistory';\nimport {
|
|
1
|
+
{"version":3,"names":["React","useState","TutorialsHistory","action","jsx","_jsx","QUERY","filterFields","id","type","title","initialValue","items","logFilterApply","logFilterReset","BASE_ITEMS","query","height","meta","component","tags","parameters","layout","DefaultStory","_useState","concat","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","handleOnSearch","data","newItems","filter","item","_item$query","toLowerCase","searchValue","includes","style","width","children","fields","onApply","onReset","hasClear","onUpdate","EmptyStory","_useState5","_useState6","Default","render","Empty"],"sources":["TutorialsHistory.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {TutorialsHistory} from './TutorialsHistory';\nimport {QueryListFilterConfig, QueryListItem} from '../../types/queryList';\nimport {TutorialHistoryRow} from '../../types/tutorial';\nimport {action} from 'storybook/actions';\n\nconst 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`;\n\nconst filterFields: QueryListFilterConfig['fields'] = [\n {id: 'onlyMine', type: 'switch', title: 'My queries only', initialValue: true},\n {id: 'range', type: 'rangeDatePicker', title: 'Period'},\n {\n id: 'dialect',\n type: 'checkboxGroup',\n title: 'Dialect',\n initialValue: [],\n items: [\n {id: 'yql', title: 'YQL'},\n {id: 'sql', title: 'SQL'},\n ],\n },\n];\n\nconst logFilterApply = action('onFilterApply');\nconst logFilterReset = action('onFilterReset');\n\nconst BASE_ITEMS: QueryListItem<TutorialHistoryRow>[] = [\n {\n id: 1,\n title: 'Getting started with YQL',\n query: QUERY,\n height: 28,\n },\n {\n id: 2,\n title: 'Working with tables',\n query: QUERY,\n height: 28,\n },\n {\n id: 3,\n title: 'Window functions',\n query: QUERY,\n height: 28,\n },\n];\n\nconst meta: Meta<typeof TutorialsHistory> = {\n title: 'Widgets/TutorialsHistory',\n component: TutorialsHistory,\n tags: ['autodocs'],\n parameters: {\n layout: 'padded',\n },\n};\n\nexport default meta;\ntype Story = StoryObj<typeof TutorialsHistory>;\n\nconst DefaultStory = () => {\n const [items, setItems] = useState([...BASE_ITEMS]);\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n const handleOnSearch = (data: {value: string; fullSearch: boolean}) => {\n setSearch(data);\n\n if (!data.value) {\n setItems(BASE_ITEMS);\n return;\n }\n\n const newItems = BASE_ITEMS.filter((item) => {\n if (!('id' in item)) return false;\n\n const title = item.title.toLowerCase();\n const query = item.query?.toLowerCase();\n const searchValue = data.value.toLowerCase();\n\n if (data.fullSearch) {\n return title.includes(searchValue) || query?.includes(searchValue);\n }\n\n return title.includes(searchValue);\n });\n setItems(newItems);\n };\n\n return (\n <div style={{width: 300, height: 500}}>\n <TutorialsHistory\n title=\"Tutorials\"\n items={items}\n filter={{\n fields: filterFields,\n onApply: logFilterApply,\n onReset: logFilterReset('reset'),\n }}\n search={{\n value: search.value,\n fullSearch: search.fullSearch,\n hasClear: true,\n onUpdate: handleOnSearch,\n }}\n />\n </div>\n );\n};\n\nconst EmptyStory = () => {\n const [search, setSearch] = useState({value: '', fullSearch: false});\n\n return (\n <div style={{width: 300, height: 500}}>\n <TutorialsHistory\n title=\"Tutorials\"\n items={[]}\n search={{\n value: search.value,\n fullSearch: search.fullSearch,\n hasClear: true,\n onUpdate: setSearch,\n }}\n />\n </div>\n );\n};\n\nexport const Default: Story = {render: () => <DefaultStory />};\nexport const Empty: Story = {render: () => <EmptyStory />};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { QueriesHistory } from './QueriesHistory';
|
|
2
2
|
export type { QueriesHistoryProps } from './QueriesHistory';
|
|
3
|
+
export { SavedQueries } from './SavedQueries';
|
|
4
|
+
export type { SavedQueriesProps } from './SavedQueries';
|
|
3
5
|
export { DashboardCharts } from './DashboardCharts';
|
|
4
6
|
export { TutorialsHistory } from './TutorialsHistory';
|
|
5
7
|
export type { TutorialsHistoryProps } from './TutorialsHistory';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { QueriesHistory } from "./QueriesHistory";
|
|
2
|
+
export { SavedQueries } from "./SavedQueries";
|
|
2
3
|
export { DashboardCharts } from "./DashboardCharts";
|
|
3
4
|
export { TutorialsHistory } from "./TutorialsHistory";
|
|
4
5
|
export { QueriesNavigation, createTableDetailConfig, createNavigationDetailResolver } from "./QueriesNavigation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["QueriesHistory","DashboardCharts","TutorialsHistory","QueriesNavigation","createTableDetailConfig","createNavigationDetailResolver"],"sources":["index.ts"],"sourcesContent":["export {QueriesHistory} from './QueriesHistory';\nexport type {QueriesHistoryProps} from './QueriesHistory';\nexport {DashboardCharts} from './DashboardCharts';\nexport {TutorialsHistory} from './TutorialsHistory';\nexport type {TutorialsHistoryProps} from './TutorialsHistory';\nexport {\n QueriesNavigation,\n createTableDetailConfig,\n createNavigationDetailResolver,\n} from './QueriesNavigation';\nexport type {\n QueriesNavigationProps,\n CreateTableDetailConfigOptions,\n NavigationPreviewResolver,\n NavigationSchemaResolver,\n} from './QueriesNavigation';\n"],"mappings":"AAAA,SAAQA,cAAc;AAEtB,SAAQC,eAAe;AACvB,SAAQC,gBAAgB;AAExB,SACIC,iBAAiB,EACjBC,uBAAuB,EACvBC,8BAA8B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["QueriesHistory","SavedQueries","DashboardCharts","TutorialsHistory","QueriesNavigation","createTableDetailConfig","createNavigationDetailResolver"],"sources":["index.ts"],"sourcesContent":["export {QueriesHistory} from './QueriesHistory';\nexport type {QueriesHistoryProps} from './QueriesHistory';\nexport {SavedQueries} from './SavedQueries';\nexport type {SavedQueriesProps} from './SavedQueries';\nexport {DashboardCharts} from './DashboardCharts';\nexport {TutorialsHistory} from './TutorialsHistory';\nexport type {TutorialsHistoryProps} from './TutorialsHistory';\nexport {\n QueriesNavigation,\n createTableDetailConfig,\n createNavigationDetailResolver,\n} from './QueriesNavigation';\nexport type {\n QueriesNavigationProps,\n CreateTableDetailConfigOptions,\n NavigationPreviewResolver,\n NavigationSchemaResolver,\n} from './QueriesNavigation';\n"],"mappings":"AAAA,SAAQA,cAAc;AAEtB,SAAQC,YAAY;AAEpB,SAAQC,eAAe;AACvB,SAAQC,gBAAgB;AAExB,SACIC,iBAAiB,EACjBC,uBAAuB,EACvBC,8BAA8B","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import React, {KeyboardEvent, useState} from 'react';
|
|
2
|
-
import {QueryHistoryEditingRenderData, QueryHistoryRow} from '../../types/history';
|
|
1
|
+
import React, {KeyboardEvent, useEffect, useState} from 'react';
|
|
3
2
|
import {Text, TextInput} from '@gravity-ui/uikit';
|
|
4
|
-
import '
|
|
3
|
+
import {QueryListEditingRenderData, QueryListRow} from '../../types/queryList';
|
|
5
4
|
|
|
6
|
-
export type
|
|
5
|
+
export type EditableRowTitleProps<T extends QueryListRow = QueryListRow> = {
|
|
7
6
|
item: T;
|
|
8
|
-
editing?:
|
|
7
|
+
editing?: QueryListEditingRenderData<T>;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
|
-
export const
|
|
10
|
+
export const EditableRowTitle = <T extends QueryListRow>({
|
|
11
|
+
item,
|
|
12
|
+
editing,
|
|
13
|
+
}: EditableRowTitleProps<T>) => {
|
|
12
14
|
const [title, setTitle] = useState(item.title);
|
|
13
15
|
const isEditing = Boolean(editing?.enabled);
|
|
14
16
|
const isTitleEmpty = !title.trim();
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
useEffect(() => {
|
|
17
19
|
setTitle(item.title);
|
|
18
20
|
}, [item.id, item.title]);
|
|
19
21
|
|
|
@@ -61,9 +63,5 @@ export const HistoryRowTitle = <T extends QueryHistoryRow>({item, editing}: Prop
|
|
|
61
63
|
);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
|
-
return
|
|
65
|
-
<Text variant="subheader-1" ellipsis>
|
|
66
|
-
{item.title}
|
|
67
|
-
</Text>
|
|
68
|
-
);
|
|
66
|
+
return <Text ellipsis>{item.title}</Text>;
|
|
69
67
|
};
|
|
@@ -3,7 +3,7 @@ import {Button, Flex, Icon, Popup} from '@gravity-ui/uikit';
|
|
|
3
3
|
import FunnelIcon from '@gravity-ui/icons/svgs/funnel.svg';
|
|
4
4
|
import ArrowRotateLeftIcon from '@gravity-ui/icons/svgs/arrow-rotate-left.svg';
|
|
5
5
|
import {useToggle} from '../../helpers/useToggle';
|
|
6
|
-
import {
|
|
6
|
+
import {QueryListFilterConfig} from '../../types/queryList';
|
|
7
7
|
import cn from 'bem-cn-lite';
|
|
8
8
|
import {SimpleForm} from '../SimpleForm';
|
|
9
9
|
import i18n from './i18n';
|
|
@@ -11,7 +11,7 @@ import './HistoryFilter.scss';
|
|
|
11
11
|
|
|
12
12
|
const block = cn('qp-history-filter');
|
|
13
13
|
|
|
14
|
-
export const HistoryFilter: FC<
|
|
14
|
+
export const HistoryFilter: FC<QueryListFilterConfig> = ({
|
|
15
15
|
fields = [],
|
|
16
16
|
values,
|
|
17
17
|
initialValues,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
.g-list__item_selected:hover {
|
|
3
3
|
background-color: var(--g-color-base-selection-hover);
|
|
4
4
|
}
|
|
5
|
-
}
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
6
|
+
&__sentinel {
|
|
7
|
+
height: 1px;
|
|
8
|
+
}
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
&__spinner {
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
13
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, {MouseEvent, useMemo} from 'react';
|
|
2
|
+
import {Button, DropdownMenu, DropdownMenuItem, Icon} from '@gravity-ui/uikit';
|
|
3
|
+
import EllipsisIcon from '@gravity-ui/icons/svgs/ellipsis.svg';
|
|
4
|
+
import {QueryListRow, QueryListRowAction} from '../../types/queryList';
|
|
5
|
+
|
|
6
|
+
export type RowActionsMenuProps<T extends QueryListRow = QueryListRow> = {
|
|
7
|
+
item: T;
|
|
8
|
+
actions?: QueryListRowAction<T>[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const RowActionsMenu = <T extends QueryListRow>({item, actions}: RowActionsMenuProps<T>) => {
|
|
12
|
+
const items = useMemo(() => {
|
|
13
|
+
return actions?.map<DropdownMenuItem>(({icon, text, theme, hidden, disabled, onClick}) => {
|
|
14
|
+
return {
|
|
15
|
+
text,
|
|
16
|
+
theme,
|
|
17
|
+
hidden,
|
|
18
|
+
disabled,
|
|
19
|
+
iconStart: icon,
|
|
20
|
+
action: () => {
|
|
21
|
+
onClick(item);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}, [actions, item]);
|
|
26
|
+
|
|
27
|
+
if (!actions?.length) return null;
|
|
28
|
+
|
|
29
|
+
const handleClick = (event: MouseEvent<HTMLDivElement>) => {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div onClick={handleClick}>
|
|
36
|
+
<DropdownMenu
|
|
37
|
+
size="s"
|
|
38
|
+
renderSwitcher={(props) => (
|
|
39
|
+
<Button {...props} size="xs">
|
|
40
|
+
<Icon data={EllipsisIcon} size={12} />
|
|
41
|
+
</Button>
|
|
42
|
+
)}
|
|
43
|
+
items={items}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -14,6 +14,10 @@ export {HistoryFilter} from './HistoryFilter';
|
|
|
14
14
|
export {HistoryPrivateIcon} from './HistoryPrivateIcon';
|
|
15
15
|
export {FieldsSelector} from './FieldsSelector';
|
|
16
16
|
export type {FieldsSelectorOption, FieldsSelectorProps} from './FieldsSelector';
|
|
17
|
+
export {EditableRowTitle} from './EditableRowTitle';
|
|
18
|
+
export type {EditableRowTitleProps} from './EditableRowTitle';
|
|
19
|
+
export {RowActionsMenu} from './RowActionsMenu';
|
|
20
|
+
export type {RowActionsMenuProps} from './RowActionsMenu';
|
|
17
21
|
export {FieldsSearchToolbar} from './FieldsSearchToolbar';
|
|
18
22
|
export type {FieldsSearchToolbarProps} from './FieldsSearchToolbar';
|
|
19
23
|
export {HistoryGroupHeader} from './HistoryGroupHeader';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {QueryListItem, QueryListRow, QueryListRowVariant} from '../types/queryList';
|
|
2
2
|
|
|
3
|
-
export const getListKey = <T extends
|
|
4
|
-
items:
|
|
5
|
-
variant:
|
|
3
|
+
export const getListKey = <T extends QueryListRow>(
|
|
4
|
+
items: QueryListItem<T>[],
|
|
5
|
+
variant: QueryListRowVariant,
|
|
6
6
|
): string => {
|
|
7
7
|
const itemsKey = items
|
|
8
8
|
.map((item) => ('header' in item ? `h:${item.header}` : `r:${item.id}`))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {QueryListFieldKey} from '../types/queryList';
|
|
2
|
+
import {QueryHistoryRow} from '../types/history';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* A field is visible either when no `visibleFields` config is provided
|
|
@@ -6,14 +7,14 @@ import {QueryHistoryFieldKey, QueryHistoryRow} from '../types/history';
|
|
|
6
7
|
* the field key is explicitly included in `visibleFields.value`.
|
|
7
8
|
*
|
|
8
9
|
* `visibleFields` is accepted loosely as `{value: string[]}` (rather than the
|
|
9
|
-
* generic `
|
|
10
|
+
* generic `QueryListVisibleFieldsConfig<T>`) so this helper works for any
|
|
10
11
|
* `T extends QueryHistoryRow` without fighting TS variance on generic key
|
|
11
|
-
* unions; `field` still uses `
|
|
12
|
+
* unions; `field` still uses `QueryListFieldKey<QueryHistoryRow>` to keep
|
|
12
13
|
* typo-protection for the built-in fields checked by the row renderers.
|
|
13
14
|
*/
|
|
14
15
|
export const isFieldVisible = (
|
|
15
16
|
visibleFields: {value: string[]} | undefined,
|
|
16
|
-
field:
|
|
17
|
+
field: QueryListFieldKey<QueryHistoryRow>,
|
|
17
18
|
): boolean => {
|
|
18
19
|
return visibleFields === undefined || visibleFields.value.includes(field);
|
|
19
20
|
};
|
package/src/helpers/time.ts
CHANGED
|
@@ -20,6 +20,10 @@ export const formatTimeCanonical = (ts: Date) => {
|
|
|
20
20
|
return dateTimeParse(ts)?.format('DD.MM.YYYY, HH:mm');
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
export const formatDateCanonical = (ts: Date) => {
|
|
24
|
+
return dateTimeParse(ts)?.format('DD.MM.YYYY');
|
|
25
|
+
};
|
|
26
|
+
|
|
23
27
|
export const getTimestampFromDate = (date: Date) => {
|
|
24
28
|
return dateTimeParse(date)?.valueOf();
|
|
25
29
|
};
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './modules';
|
|
3
3
|
export * from './widgets';
|
|
4
|
+
export * from './types/queryList';
|
|
4
5
|
export * from './types/history';
|
|
6
|
+
export type {SavedQuery} from './types/savedQueries';
|
|
5
7
|
export * from './types/tutorial';
|
|
6
8
|
export * from './types/navigation';
|
|
7
9
|
export * from './types/pathEditor';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {Button, Flex, Icon} from '@gravity-ui/uikit';
|
|
3
|
-
import {QueryHistoryComparisonConfig, QueryHistoryRow} from '../../types/history';
|
|
4
|
-
import ArrowRotateRightIcon from '@gravity-ui/icons/svgs/arrow-rotate-right.svg';
|
|
5
3
|
import ArrowRightArrowLeftIcon from '@gravity-ui/icons/svgs/arrow-right-arrow-left.svg';
|
|
6
|
-
import '
|
|
4
|
+
import ArrowRotateRightIcon from '@gravity-ui/icons/svgs/arrow-rotate-right.svg';
|
|
5
|
+
import {QueryListComparisonConfig, QueryListRow} from '../../types/queryList';
|
|
7
6
|
import cn from 'bem-cn-lite';
|
|
7
|
+
import './HistoryComparisonActions.scss';
|
|
8
8
|
|
|
9
|
-
type
|
|
10
|
-
comparison:
|
|
9
|
+
export type HistoryComparisonActionsProps<T extends QueryListRow = QueryListRow> = {
|
|
10
|
+
comparison: QueryListComparisonConfig<T>;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const block = cn('qp-
|
|
14
|
+
const block = cn('qp-history-comparison-actions');
|
|
15
15
|
|
|
16
|
-
export const
|
|
16
|
+
export const HistoryComparisonActions = <T extends QueryListRow>({
|
|
17
17
|
comparison: {enabled, comparedRowIds, onCompare, onCancel},
|
|
18
18
|
className,
|
|
19
|
-
}:
|
|
19
|
+
}: HistoryComparisonActionsProps<T>) => {
|
|
20
20
|
if (!enabled) return null;
|
|
21
21
|
|
|
22
22
|
return (
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, {FC, useEffect, useState} from 'react';
|
|
2
2
|
import {FullSearchToggleButton} from './internal/FullSearchToggleButton';
|
|
3
3
|
import {HistoryFilter, SearchWithButtons} from '../../components';
|
|
4
|
-
import {
|
|
4
|
+
import {QueryListFilterConfig} from '../../types/queryList';
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
search?: string;
|
|
8
8
|
fullSearch?: boolean;
|
|
9
9
|
hasClear?: boolean;
|
|
10
|
-
filter?:
|
|
10
|
+
filter?: QueryListFilterConfig;
|
|
11
11
|
onUpdate: (data: {value: string; fullSearch: boolean}) => void;
|
|
12
12
|
className?: string;
|
|
13
13
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type {Meta, StoryObj} from '@storybook/react';
|
|
3
3
|
import {HistoryRow} from './HistoryRow';
|
|
4
|
-
import {
|
|
4
|
+
import {QueryListRowAction} from '../../types/queryList';
|
|
5
|
+
import {QueryHistoryRow} from '../../types/history';
|
|
5
6
|
|
|
6
7
|
const now = Date.now();
|
|
7
8
|
const min = 60 * 1000;
|
|
@@ -19,7 +20,7 @@ const makeRow = (overrides: Partial<QueryHistoryRow>): QueryHistoryRow => ({
|
|
|
19
20
|
...overrides,
|
|
20
21
|
});
|
|
21
22
|
|
|
22
|
-
const defaultActions: Array<
|
|
23
|
+
const defaultActions: Array<QueryListRowAction<QueryHistoryRow>> = [
|
|
23
24
|
{text: 'Run again', onClick: (row) => alert(`Run: ${row.title}`)},
|
|
24
25
|
{text: 'Copy', onClick: (row) => alert(`Copy: ${row.title}`)},
|
|
25
26
|
{text: 'Delete', onClick: (row) => alert(`Delete: ${row.title}`)},
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {QueryListRowRenderData} from '../../types/queryList';
|
|
3
|
+
import {QueryHistoryRow} from '../../types/history';
|
|
3
4
|
import {Flex, Text} from '@gravity-ui/uikit';
|
|
4
5
|
import './HistoryRow.scss';
|
|
5
6
|
import cn from 'bem-cn-lite';
|
|
6
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
EditableRowTitle,
|
|
9
|
+
HistoryPrivateIcon,
|
|
10
|
+
QueryDuration,
|
|
11
|
+
QueryStatusIcon,
|
|
12
|
+
RowActionsMenu,
|
|
13
|
+
RowLink,
|
|
14
|
+
} from '../../components';
|
|
7
15
|
import {formatTime} from '../../helpers/time';
|
|
8
16
|
import {isFieldVisible} from '../../helpers/isFieldVisible';
|
|
9
|
-
import {HistoryRowTitle} from './HistoryRowTitle';
|
|
10
|
-
import {HistoryRowMenu} from './HistoryRowMenu';
|
|
11
17
|
|
|
12
18
|
export type Props<T extends QueryHistoryRow> = {
|
|
13
19
|
item: T;
|
|
14
|
-
} & Omit<
|
|
20
|
+
} & Omit<QueryListRowRenderData<T>, 'item' | 'variant'>;
|
|
15
21
|
|
|
16
22
|
const block = cn('qp-history-row');
|
|
17
23
|
|
|
@@ -38,8 +44,8 @@ export const HistoryRow = <T extends QueryHistoryRow>({
|
|
|
38
44
|
<QueryStatusIcon status={status} />
|
|
39
45
|
<Flex direction="column" gap={1} className={block('right-column')}>
|
|
40
46
|
<Flex justifyContent="space-between" className={block('header')}>
|
|
41
|
-
<
|
|
42
|
-
{showMenu && <
|
|
47
|
+
<EditableRowTitle item={item} editing={editing} />
|
|
48
|
+
{showMenu && <RowActionsMenu item={item} actions={actions} />}
|
|
43
49
|
</Flex>
|
|
44
50
|
<div className={block('data')}>
|
|
45
51
|
{isFieldVisible(visibleFields, 'duration') && startTime && (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {Flex, Text} from '@gravity-ui/uikit';
|
|
3
|
-
import {
|
|
3
|
+
import {QueryListRowRenderData} from '../../types/queryList';
|
|
4
|
+
import {QueryHistoryRow} from '../../types/history';
|
|
4
5
|
import {
|
|
5
6
|
HistoryPrivateIcon,
|
|
6
7
|
QueryDuration,
|
|
@@ -17,7 +18,7 @@ const block = cn('qp-history-search-row');
|
|
|
17
18
|
|
|
18
19
|
export type Props<T extends QueryHistoryRow> = {
|
|
19
20
|
item: T;
|
|
20
|
-
} & Omit<
|
|
21
|
+
} & Omit<QueryListRowRenderData<T>, 'item' | 'variant'>;
|
|
21
22
|
|
|
22
23
|
export const HistorySearchRow = <T extends QueryHistoryRow>({
|
|
23
24
|
item,
|
|
@@ -28,11 +28,7 @@ export const NavigationItemsListHeader: FC<NavigationItemsListHeaderProps> = ({
|
|
|
28
28
|
className,
|
|
29
29
|
}) => {
|
|
30
30
|
if (!onSortUpdate) {
|
|
31
|
-
return
|
|
32
|
-
<Flex alignItems="center" className={block(null, className)}>
|
|
33
|
-
<Text>{titleLabel}</Text>
|
|
34
|
-
</Flex>
|
|
35
|
-
);
|
|
31
|
+
return null;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
const handleClick = () => {
|