@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
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import "core-js/modules/es.array.concat.js";
|
|
4
|
-
import "core-js/modules/es.array.filter.js";
|
|
5
|
-
import "core-js/modules/es.array.join.js";
|
|
6
|
-
import "core-js/modules/es.date.now.js";
|
|
7
|
-
import "core-js/modules/es.iterator.constructor.js";
|
|
8
|
-
import "core-js/modules/es.iterator.filter.js";
|
|
9
|
-
import "core-js/modules/es.object.to-string.js";
|
|
10
|
-
import React, { useState } from 'react';
|
|
11
|
-
import { HistoryList } from "./HistoryList";
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var now = Date.now();
|
|
14
|
-
var min = 60 * 1000;
|
|
15
|
-
var ITEMS = [{
|
|
16
|
-
header: 'Today',
|
|
17
|
-
height: 28
|
|
18
|
-
}, {
|
|
19
|
-
id: 1,
|
|
20
|
-
title: 'Query 1',
|
|
21
|
-
status: 'completed',
|
|
22
|
-
engine: 'YQL',
|
|
23
|
-
startTime: now - 2 * min,
|
|
24
|
-
endTime: now - min,
|
|
25
|
-
height: 52
|
|
26
|
-
}, {
|
|
27
|
-
id: 2,
|
|
28
|
-
title: 'Query 2',
|
|
29
|
-
status: 'failed',
|
|
30
|
-
engine: 'YQL',
|
|
31
|
-
startTime: now - 10 * min,
|
|
32
|
-
endTime: now - 9 * min,
|
|
33
|
-
height: 52
|
|
34
|
-
}, {
|
|
35
|
-
id: 3,
|
|
36
|
-
title: 'Query 3',
|
|
37
|
-
status: 'running',
|
|
38
|
-
engine: 'YQL',
|
|
39
|
-
startTime: now - min,
|
|
40
|
-
height: 52
|
|
41
|
-
}, {
|
|
42
|
-
header: 'Yesterday',
|
|
43
|
-
height: 28
|
|
44
|
-
}, {
|
|
45
|
-
id: 4,
|
|
46
|
-
title: 'Query 4',
|
|
47
|
-
status: 'aborted',
|
|
48
|
-
engine: 'YQL',
|
|
49
|
-
startTime: now - 25 * 60 * min,
|
|
50
|
-
endTime: now - 24 * 60 * min,
|
|
51
|
-
height: 52
|
|
52
|
-
}, {
|
|
53
|
-
id: 5,
|
|
54
|
-
title: 'Query 5',
|
|
55
|
-
status: 'draft',
|
|
56
|
-
engine: 'YQL',
|
|
57
|
-
startTime: now - 30 * 60 * min,
|
|
58
|
-
height: 52
|
|
59
|
-
}];
|
|
60
|
-
var meta = {
|
|
61
|
-
title: 'Modules/HistoryList',
|
|
62
|
-
component: HistoryList,
|
|
63
|
-
tags: ['autodocs'],
|
|
64
|
-
parameters: {
|
|
65
|
-
layout: 'padded'
|
|
66
|
-
},
|
|
67
|
-
decorators: [function (Story) {
|
|
68
|
-
return /*#__PURE__*/_jsx("div", {
|
|
69
|
-
style: {
|
|
70
|
-
width: 420,
|
|
71
|
-
height: 480
|
|
72
|
-
},
|
|
73
|
-
children: /*#__PURE__*/_jsx(Story, {})
|
|
74
|
-
});
|
|
75
|
-
}]
|
|
76
|
-
};
|
|
77
|
-
export default meta;
|
|
78
|
-
/** Basic list with groups and all statuses */
|
|
79
|
-
export var Default = {
|
|
80
|
-
args: {
|
|
81
|
-
items: ITEMS
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/** Empty list */
|
|
86
|
-
export var Empty = {
|
|
87
|
-
args: {
|
|
88
|
-
items: []
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/** With row actions (visible on hover) */
|
|
93
|
-
export var WithActions = {
|
|
94
|
-
args: {
|
|
95
|
-
items: ITEMS,
|
|
96
|
-
getRowActions: function getRowActions(_item) {
|
|
97
|
-
return [{
|
|
98
|
-
text: 'Run again',
|
|
99
|
-
onClick: function onClick(row) {
|
|
100
|
-
return alert("Run: ".concat(row.title));
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
text: 'Copy',
|
|
104
|
-
onClick: function onClick(row) {
|
|
105
|
-
return alert("Copy: ".concat(row.title));
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
text: 'Delete',
|
|
109
|
-
onClick: function onClick(row) {
|
|
110
|
-
return alert("Delete: ".concat(row.title));
|
|
111
|
-
}
|
|
112
|
-
}];
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/** Interactive row comparison mode */
|
|
118
|
-
var WithComparisonStory = function WithComparisonStory() {
|
|
119
|
-
var _useState = useState([2]),
|
|
120
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
121
|
-
comparedRowIds = _useState2[0],
|
|
122
|
-
setComparedRowIds = _useState2[1];
|
|
123
|
-
var handleChange = function handleChange(item, selected) {
|
|
124
|
-
setComparedRowIds(function (prev) {
|
|
125
|
-
return selected ? [].concat(_toConsumableArray(prev), [item.id]) : prev.filter(function (id) {
|
|
126
|
-
return id !== item.id;
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
131
|
-
style: {
|
|
132
|
-
width: 420,
|
|
133
|
-
height: 480
|
|
134
|
-
},
|
|
135
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
136
|
-
style: {
|
|
137
|
-
marginBottom: 8,
|
|
138
|
-
fontSize: 12,
|
|
139
|
-
color: '#888'
|
|
140
|
-
},
|
|
141
|
-
children: ["Compared ids: ", comparedRowIds.join(', ') || 'none']
|
|
142
|
-
}), /*#__PURE__*/_jsx(HistoryList, {
|
|
143
|
-
items: ITEMS,
|
|
144
|
-
comparison: {
|
|
145
|
-
enabled: true,
|
|
146
|
-
comparedRowIds: comparedRowIds,
|
|
147
|
-
onChange: handleChange,
|
|
148
|
-
onCancel: function onCancel() {
|
|
149
|
-
return setComparedRowIds([]);
|
|
150
|
-
},
|
|
151
|
-
onCompare: function onCompare() {
|
|
152
|
-
return alert("Compare: ".concat(comparedRowIds.join(', ')));
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
})]
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
export var WithComparison = {
|
|
159
|
-
render: function render() {
|
|
160
|
-
return /*#__PURE__*/_jsx(WithComparisonStory, {});
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/** Row highlighted via selectedRowId */
|
|
165
|
-
var WithSelectedRowStory = function WithSelectedRowStory() {
|
|
166
|
-
var _useState3 = useState(1),
|
|
167
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
168
|
-
selectedRowId = _useState4[0],
|
|
169
|
-
setSelectedRowId = _useState4[1];
|
|
170
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
171
|
-
style: {
|
|
172
|
-
width: 420,
|
|
173
|
-
height: 480
|
|
174
|
-
},
|
|
175
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
176
|
-
style: {
|
|
177
|
-
marginBottom: 8,
|
|
178
|
-
fontSize: 12,
|
|
179
|
-
color: '#888'
|
|
180
|
-
},
|
|
181
|
-
children: ["Selected row id: ", selectedRowId !== null && selectedRowId !== void 0 ? selectedRowId : 'none']
|
|
182
|
-
}), /*#__PURE__*/_jsx(HistoryList, {
|
|
183
|
-
items: ITEMS,
|
|
184
|
-
selectedRowId: selectedRowId,
|
|
185
|
-
onItemClick: function onItemClick(item, index) {
|
|
186
|
-
if (!('header' in item)) {
|
|
187
|
-
setSelectedRowId(index);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
})]
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
export var WithSelectedRow = {
|
|
194
|
-
render: function render() {
|
|
195
|
-
return /*#__PURE__*/_jsx(WithSelectedRowStory, {});
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
/** Interactive row title editing mode */
|
|
200
|
-
var WithEditingStory = function WithEditingStory() {
|
|
201
|
-
var _useState5 = useState(1),
|
|
202
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
203
|
-
editingRowId = _useState6[0],
|
|
204
|
-
setEditingRowId = _useState6[1];
|
|
205
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
206
|
-
style: {
|
|
207
|
-
width: 420,
|
|
208
|
-
height: 480
|
|
209
|
-
},
|
|
210
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
211
|
-
style: {
|
|
212
|
-
marginBottom: 8,
|
|
213
|
-
fontSize: 12,
|
|
214
|
-
color: '#888'
|
|
215
|
-
},
|
|
216
|
-
children: ["Editing row id: ", editingRowId !== null && editingRowId !== void 0 ? editingRowId : 'none', " (row #1 is open for editing)"]
|
|
217
|
-
}), /*#__PURE__*/_jsx(HistoryList, {
|
|
218
|
-
items: ITEMS,
|
|
219
|
-
editing: {
|
|
220
|
-
rowId: editingRowId,
|
|
221
|
-
onSubmit: function onSubmit(item, title) {
|
|
222
|
-
alert("Saved row ".concat(item.id, ": \"").concat(title, "\""));
|
|
223
|
-
setEditingRowId(undefined);
|
|
224
|
-
},
|
|
225
|
-
onCancel: function onCancel() {
|
|
226
|
-
return setEditingRowId(undefined);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
})]
|
|
230
|
-
});
|
|
231
|
-
};
|
|
232
|
-
export var WithEditing = {
|
|
233
|
-
render: function render() {
|
|
234
|
-
return /*#__PURE__*/_jsx(WithEditingStory, {});
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
// #sourceMappingURL=HistoryList.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","HistoryList","jsx","_jsx","jsxs","_jsxs","now","Date","min","ITEMS","header","height","id","title","status","engine","startTime","endTime","meta","component","tags","parameters","layout","decorators","Story","style","width","children","Default","args","items","Empty","WithActions","getRowActions","_item","text","onClick","row","alert","concat","WithComparisonStory","_useState","_useState2","_slicedToArray","comparedRowIds","setComparedRowIds","handleChange","item","selected","prev","_toConsumableArray","filter","marginBottom","fontSize","color","join","comparison","enabled","onChange","onCancel","onCompare","WithComparison","render","WithSelectedRowStory","_useState3","_useState4","selectedRowId","setSelectedRowId","onItemClick","index","WithSelectedRow","WithEditingStory","_useState5","_useState6","editingRowId","setEditingRowId","editing","rowId","onSubmit","undefined","WithEditing"],"sources":["HistoryList.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {HistoryList} from './HistoryList';\nimport {QueryHistoryItem, QueryHistoryRow} from '../../types/history';\n\nconst now = Date.now();\nconst min = 60 * 1000;\n\nconst ITEMS: QueryHistoryItem<QueryHistoryRow>[] = [\n {header: 'Today', height: 28},\n {\n id: 1,\n title: 'Query 1',\n status: 'completed',\n engine: 'YQL',\n startTime: now - 2 * min,\n endTime: now - min,\n height: 52,\n },\n {\n id: 2,\n title: 'Query 2',\n status: 'failed',\n engine: 'YQL',\n startTime: now - 10 * min,\n endTime: now - 9 * min,\n height: 52,\n },\n {\n id: 3,\n title: 'Query 3',\n status: 'running',\n engine: 'YQL',\n startTime: now - min,\n height: 52,\n },\n {header: 'Yesterday', height: 28},\n {\n id: 4,\n title: 'Query 4',\n status: 'aborted',\n engine: 'YQL',\n startTime: now - 25 * 60 * min,\n endTime: now - 24 * 60 * min,\n height: 52,\n },\n {\n id: 5,\n title: 'Query 5',\n status: 'draft',\n engine: 'YQL',\n startTime: now - 30 * 60 * min,\n height: 52,\n },\n];\n\nconst meta: Meta<typeof HistoryList> = {\n title: 'Modules/HistoryList',\n component: HistoryList,\n tags: ['autodocs'],\n parameters: {\n layout: 'padded',\n },\n decorators: [\n (Story) => (\n <div style={{width: 420, height: 480}}>\n <Story />\n </div>\n ),\n ],\n};\n\nexport default meta;\ntype Story = StoryObj<typeof HistoryList>;\n\n/** Basic list with groups and all statuses */\nexport const Default: Story = {\n args: {\n items: ITEMS,\n },\n};\n\n/** Empty list */\nexport const Empty: Story = {\n args: {\n items: [],\n },\n};\n\n/** With row actions (visible on hover) */\nexport const WithActions: Story = {\n args: {\n items: ITEMS,\n getRowActions: (_item) => [\n {text: 'Run again', onClick: (row) => alert(`Run: ${row.title}`)},\n {text: 'Copy', onClick: (row) => alert(`Copy: ${row.title}`)},\n {text: 'Delete', onClick: (row) => alert(`Delete: ${row.title}`)},\n ],\n },\n};\n\n/** Interactive row comparison mode */\nconst WithComparisonStory = () => {\n const [comparedRowIds, setComparedRowIds] = useState<number[]>([2]);\n\n const handleChange = (item: QueryHistoryRow, selected: boolean) => {\n setComparedRowIds((prev) =>\n selected ? [...prev, item.id] : prev.filter((id) => id !== item.id),\n );\n };\n\n return (\n <div style={{width: 420, height: 480}}>\n <div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>\n Compared ids: {comparedRowIds.join(', ') || 'none'}\n </div>\n <HistoryList\n items={ITEMS}\n comparison={{\n enabled: true,\n comparedRowIds,\n onChange: handleChange,\n onCancel: () => setComparedRowIds([]),\n onCompare: () => alert(`Compare: ${comparedRowIds.join(', ')}`),\n }}\n />\n </div>\n );\n};\n\nexport const WithComparison: Story = {render: () => <WithComparisonStory />};\n\n/** Row highlighted via selectedRowId */\nconst WithSelectedRowStory = () => {\n const [selectedRowId, setSelectedRowId] = useState<number | undefined>(1);\n\n return (\n <div style={{width: 420, height: 480}}>\n <div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>\n Selected row id: {selectedRowId ?? 'none'}\n </div>\n <HistoryList\n items={ITEMS}\n selectedRowId={selectedRowId}\n onItemClick={(item, index) => {\n if (!('header' in item)) {\n setSelectedRowId(index);\n }\n }}\n />\n </div>\n );\n};\n\nexport const WithSelectedRow: Story = {render: () => <WithSelectedRowStory />};\n\n/** Interactive row title editing mode */\nconst WithEditingStory = () => {\n const [editingRowId, setEditingRowId] = useState<number | undefined>(1);\n\n return (\n <div style={{width: 420, height: 480}}>\n <div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>\n Editing row id: {editingRowId ?? 'none'} (row #1 is open for editing)\n </div>\n <HistoryList\n items={ITEMS}\n editing={{\n rowId: editingRowId,\n onSubmit: (item, title) => {\n alert(`Saved row ${item.id}: \"${title}\"`);\n setEditingRowId(undefined);\n },\n onCancel: () => setEditingRowId(undefined),\n }}\n />\n </div>\n );\n};\n\nexport const WithEditing: Story = {render: () => <WithEditingStory />};\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,IAAGC,QAAQ,QAAO,OAAO;AAErC,SAAQC,WAAW;AAAuB,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG1C,IAAMC,GAAG,GAAGC,IAAI,CAACD,GAAG,CAAC,CAAC;AACtB,IAAME,GAAG,GAAG,EAAE,GAAG,IAAI;AAErB,IAAMC,KAA0C,GAAG,CAC/C;EAACC,MAAM,EAAE,OAAO;EAAEC,MAAM,EAAE;AAAE,CAAC,EAC7B;EACIC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,SAAS;EAChBC,MAAM,EAAE,WAAW;EACnBC,MAAM,EAAE,KAAK;EACbC,SAAS,EAAEV,GAAG,GAAG,CAAC,GAAGE,GAAG;EACxBS,OAAO,EAAEX,GAAG,GAAGE,GAAG;EAClBG,MAAM,EAAE;AACZ,CAAC,EACD;EACIC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,SAAS;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,KAAK;EACbC,SAAS,EAAEV,GAAG,GAAG,EAAE,GAAGE,GAAG;EACzBS,OAAO,EAAEX,GAAG,GAAG,CAAC,GAAGE,GAAG;EACtBG,MAAM,EAAE;AACZ,CAAC,EACD;EACIC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,SAAS;EAChBC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE,KAAK;EACbC,SAAS,EAAEV,GAAG,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I,QAAQ,EAAE,SAAVA,QAAQA,CAAG/B,IAAI,EAAElC,KAAK,EAAK;UACvByB,KAAK,cAAAC,MAAA,CAAcQ,IAAI,CAACnC,EAAE,UAAA2B,MAAA,CAAM1B,KAAK,OAAG,CAAC;UACzC8D,eAAe,CAACI,SAAS,CAAC;QAC9B,CAAC;QACDpB,QAAQ,EAAE,SAAVA,QAAQA,CAAA;UAAA,OAAQgB,eAAe,CAACI,SAAS,CAAC;QAAA;MAC9C;IAAE,CACL,CAAC;EAAA,CACD,CAAC;AAEd,CAAC;AAED,OAAO,IAAMC,WAAkB,GAAG;EAAClB,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ3D,IAAA,CAACoE,gBAAgB,IAAE,CAAC;EAAA;AAAA,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","HistoryGroupHeader","HistoryRow","HistorySearchRow","jsx","_jsx","HistoryRowContent","_ref","variant","data","_objectWithoutProperties","_excluded","item","title","header","_objectSpread"],"sources":["HistoryRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {QueryHistoryRow, QueryHistoryRowRenderData} from '../../types/history';\nimport {HistoryGroupHeader} from '../../components';\nimport {HistoryRow} from '../HistoryRow';\nimport {HistorySearchRow} from '../HistorySearchRow';\n\nexport const HistoryRowContent = <T extends QueryHistoryRow>({\n variant,\n ...data\n}: QueryHistoryRowRenderData<T>) => {\n const {item} = data;\n\n if ('header' in item) {\n return <HistoryGroupHeader title={item.header} />;\n }\n\n return variant === 'search' ? (\n <HistorySearchRow {...data} item={item} />\n ) : (\n <HistoryRow {...data} item={item} />\n );\n};\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,kBAAkB;AAC1B,SAAQC,UAAU;AAClB,SAAQC,gBAAgB;AAA6B,SAAAC,GAAA,IAAAC,IAAA;AAErD,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAGM;EAAA,IAFhCC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACJC,IAAI,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAEP,IAAOC,IAAI,GAAIH,IAAI,CAAZG,IAAI;EAEX,IAAI,QAAQ,IAAIA,IAAI,EAAE;IAClB,oBAAOP,IAAA,CAACJ,kBAAkB;MAACY,KAAK,EAAED,IAAI,CAACE;IAAO,CAAE,CAAC;EACrD;EAEA,OAAON,OAAO,KAAK,QAAQ,gBACvBH,IAAA,CAACF,gBAAgB,EAAAY,aAAA,CAAAA,aAAA,KAAKN,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CAAC,gBAE1CP,IAAA,CAACH,UAAU,EAAAa,aAAA,CAAAA,aAAA,KAAKN,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CACtC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["HistoryList"],"sources":["index.ts"],"sourcesContent":["export {HistoryList} from './HistoryList';\nexport type {HistoryListProps} from './HistoryList';\n"],"mappings":"AAAA,SAAQA,WAAW","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { QueryHistoryRow, QueryHistoryRowAction } from '../../types/history';
|
|
3
|
-
type Props<T extends QueryHistoryRow> = {
|
|
4
|
-
item: T;
|
|
5
|
-
actions?: QueryHistoryRowAction<T>[];
|
|
6
|
-
};
|
|
7
|
-
export declare const HistoryRowMenu: <T extends QueryHistoryRow>({ item, actions }: Props<T>) => React.JSX.Element | null;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Button","DropdownMenu","Icon","jsx","_jsx","EllipsisIcon","props","_objectSpread","children","fill","fillRule","d","clipRule","defaultProps","xmlns","width","height","viewBox","HistoryRowMenu","_ref","item","actions","items","map","_ref2","icon","text","hidden","disabled","onClick","iconStart","action","length","handleClick","e","preventDefault","size","renderSwitcher","data"],"sources":["HistoryRowMenu.tsx"],"sourcesContent":["import React, {MouseEvent, useMemo} from 'react';\nimport {Button, DropdownMenu, DropdownMenuItem, Icon} from '@gravity-ui/uikit';\nimport EllipsisIcon from '@gravity-ui/icons/svgs/ellipsis.svg';\nimport {QueryHistoryRow, QueryHistoryRowAction} from '../../types/history';\n\ntype Props<T extends QueryHistoryRow> = {\n item: T;\n actions?: QueryHistoryRowAction<T>[];\n};\n\nexport const HistoryRowMenu = <T extends QueryHistoryRow>({item, actions}: Props<T>) => {\n const items = useMemo(() => {\n return actions?.map<DropdownMenuItem>(({icon, text, hidden, disabled, onClick}) => {\n return {\n text,\n hidden,\n disabled,\n iconStart: icon,\n action: () => {\n onClick(item);\n },\n };\n });\n }, [actions, item]);\n\n if (!actions || !actions.length) return null;\n\n const handleClick = (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n };\n\n return (\n <div onClick={handleClick}>\n <DropdownMenu\n size=\"s\"\n renderSwitcher={(props) => {\n return (\n <Button {...props} size=\"xs\">\n <Icon data={EllipsisIcon} size={12} />\n </Button>\n );\n }}\n items={items}\n />\n </div>\n );\n};\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAeC,OAAO,QAAO,OAAO;AAChD,SAAQC,MAAM,EAAEC,YAAY,EAAoBC,IAAI,QAAO,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,IACxEC,YAAY,YAAZA,YAAYA,CAAAC,KAAA;EAAA,oBAAAF,IAAA,QAAAG,aAAA,CAAAA,aAAA,KAAAD,KAAA;IAAAE,QAAA,eAAAJ,IAAA;MAAAK,IAAA;MAAAC,QAAA;MAAAC,CAAA;MAAAC,QAAA;IAAA;EAAA;AAAA;AAAZP,YAAY,CAAAQ,YAAA;EAAAC,KAAA;EAAAC,KAAA;EAAAC,MAAA;EAAAP,IAAA;EAAAQ,OAAA;AAAA;AAQnB,OAAO,IAAMC,cAAc,GAAG,S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ACoC,IAAI,EAAEjC,YAAa;YAAC+B,IAAI,EAAE;UAAG,CAAE;QAAC,EAClC,CAAC;MAEjB,CAAE;MACFd,KAAK,EAAEA;IAAM,CAChB;EAAC,CACD,CAAC;AAEd,CAAC","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { QueryHistoryEditingRenderData, QueryHistoryRow } from '../../types/history';
|
|
3
|
-
import './HistoryRow.scss';
|
|
4
|
-
export type Props<T extends QueryHistoryRow> = {
|
|
5
|
-
item: T;
|
|
6
|
-
editing?: QueryHistoryEditingRenderData<T>;
|
|
7
|
-
};
|
|
8
|
-
export declare const HistoryRowTitle: <T extends QueryHistoryRow>({ item, editing }: Props<T>) => React.JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Text","TextInput","jsx","_jsx","HistoryRowTitle","_ref","item","editing","_useState","title","_useState2","_slicedToArray","setTitle","isEditing","Boolean","enabled","isTitleEmpty","trim","useEffect","id","handleKeyDown","event","stopPropagation","key","_editing$onSubmit","preventDefault","nextTitle","_editing$onCancel","onCancel","call","onSubmit","_editing$onCancel2","onClick","onMouseDown","children","autoFocus","value","size","validationState","undefined","onKeyDown","onUpdate","variant","ellipsis"],"sources":["HistoryRowTitle.tsx"],"sourcesContent":["import React, {KeyboardEvent, useState} from 'react';\nimport {QueryHistoryEditingRenderData, QueryHistoryRow} from '../../types/history';\nimport {Text, TextInput} from '@gravity-ui/uikit';\nimport './HistoryRow.scss';\n\nexport type Props<T extends QueryHistoryRow> = {\n item: T;\n editing?: QueryHistoryEditingRenderData<T>;\n};\n\nexport const HistoryRowTitle = <T extends QueryHistoryRow>({item, editing}: Props<T>) => {\n const [title, setTitle] = useState(item.title);\n const isEditing = Boolean(editing?.enabled);\n const isTitleEmpty = !title.trim();\n\n React.useEffect(() => {\n setTitle(item.title);\n }, [item.id, item.title]);\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n event.stopPropagation();\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const nextTitle = title.trim();\n\n if (!nextTitle) {\n return;\n }\n\n if (nextTitle === item.title) {\n editing?.onCancel?.(item);\n setTitle(item.title);\n return;\n }\n\n editing?.onSubmit?.(item, nextTitle);\n }\n\n if (event.key === 'Escape') {\n editing?.onCancel?.(item);\n setTitle(item.title);\n }\n };\n\n if (isEditing) {\n return (\n <div\n onClick={(event) => event.stopPropagation()}\n onMouseDown={(event) => event.stopPropagation()}\n >\n <TextInput\n autoFocus\n value={title}\n size=\"s\"\n validationState={isTitleEmpty ? 'invalid' : undefined}\n onKeyDown={handleKeyDown}\n onUpdate={setTitle}\n />\n </div>\n );\n }\n\n return (\n <Text variant=\"subheader-1\" ellipsis>\n {item.title}\n </Text>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAkBC,QAAQ,QAAO,OAAO;AAEpD,SAAQC,IAAI,EAAEC,SAAS,QAAO,mBAAmB;AACjD;AAA2B,SAAAC,GAAA,IAAAC,IAAA;AAO3B,OAAO,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAA6D;EAAA,IAA7BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;EACrE,IAAAC,SAAA,GAA0BT,QAAQ,CAACO,IAAI,CAACG,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA;IAAvCC,KAAK,GAAAC,UAAA;IAAEE,QAAQ,GAAAF,UAAA;EACtB,IAAMG,SAAS,GAAGC,OAAO,CAACP,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEQ,OAAO,CAAC;EAC3C,IAAMC,YAAY,GAAG,CAACP,KAAK,CAACQ,IAAI,CAAC,CAAC;EAElCnB,KAAK,CAACoB,SAAS,CAAC,YAAM;IAClBN,QAAQ,CAACN,IAAI,CAACG,KAAK,CAAC;EACxB,CAAC,EAAE,CAACH,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AC;MAAA,CAAC;MAC5CW,WAAW,EAAE,SAAbA,WAAWA,CAAGZ,KAAK;QAAA,OAAKA,KAAK,CAACC,eAAe,CAAC,CAAC;MAAA,CAAC;MAAAY,QAAA,eAEhD/B,IAAA,CAACF,SAAS;QACNkC,SAAS;QACTC,KAAK,EAAE3B,KAAM;QACb4B,IAAI,EAAC,GAAG;QACRC,eAAe,EAAEtB,YAAY,GAAG,SAAS,GAAGuB,SAAU;QACtDC,SAAS,EAAEpB,aAAc;QACzBqB,QAAQ,EAAE7B;MAAS,CACtB;IAAC,CACD,CAAC;EAEd;EAEA,oBACIT,IAAA,CAACH,IAAI;IAAC0C,OAAO,EAAC,aAAa;IAACC,QAAQ;IAAAT,QAAA,EAC/B5B,IAAI,CAACG;EAAK,CACT,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ComparisonActions.scss"],"names":[],"mappings":"AAAA;EACE,kBAAA;EACA,0CAAA;AACF","file":"ComparisonActions.css","sourcesContent":[".qp-query-history-comparison-action {\n padding: 12px 20px;\n background: var(--g-color-base-background);\n}"],"sourceRoot":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { QueryHistoryComparisonConfig, QueryHistoryRow } from '../../types/history';
|
|
3
|
-
import './ComparisonActions.scss';
|
|
4
|
-
type Props<T extends QueryHistoryRow> = {
|
|
5
|
-
comparison: QueryHistoryComparisonConfig<T>;
|
|
6
|
-
className?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const ComparisonActions: <T extends QueryHistoryRow>({ comparison: { enabled, comparedRowIds, onCompare, onCancel }, className, }: Props<T>) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Button","Flex","Icon","ArrowRotateRightIcon","props","_jsx","_objectSpread","children","fill","fillRule","d","clipRule","defaultProps","xmlns","width","height","viewBox","ArrowRightArrowLeftIcon","cn","jsx","jsxs","_jsxs","block","ComparisonActions","_ref","_ref$comparison","comparison","enabled","comparedRowIds","onCompare","onCancel","className","gap","alignItems","justifyContent","onClick","data","size","view","disabled","length"],"sources":["ComparisonActions.tsx"],"sourcesContent":["import React from 'react';\nimport {Button, Flex, Icon} from '@gravity-ui/uikit';\nimport {QueryHistoryComparisonConfig, QueryHistoryRow} from '../../types/history';\nimport ArrowRotateRightIcon from '@gravity-ui/icons/svgs/arrow-rotate-right.svg';\nimport ArrowRightArrowLeftIcon from '@gravity-ui/icons/svgs/arrow-right-arrow-left.svg';\nimport './ComparisonActions.scss';\nimport cn from 'bem-cn-lite';\n\ntype Props<T extends QueryHistoryRow> = {\n comparison: QueryHistoryComparisonConfig<T>;\n className?: string;\n};\n\nconst block = cn('qp-query-history-comparison-action');\n\nexport const ComparisonActions = <T extends QueryHistoryRow>({\n comparison: {enabled, comparedRowIds, onCompare, onCancel},\n className,\n}: Props<T>) => {\n if (!enabled) return null;\n\n return (\n <Flex\n gap={3}\n alignItems=\"center\"\n justifyContent=\"center\"\n className={block(null, className)}\n >\n <Button onClick={onCancel} width=\"max\">\n <Icon data={ArrowRotateRightIcon} size={16} />\n </Button>\n <Button\n view=\"action\"\n onClick={onCompare}\n disabled={comparedRowIds.length < 2}\n width=\"max\"\n >\n <Icon data={ArrowRightArrowLeftIcon} size={16} />\n </Button>\n </Flex>\n );\n};\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAO,mBAAmB;AAAC,IAE9CC,oBAAoB,YAApBA,oBAAoBA,CAAAC,KAAA;EAAA,oBAAAC,IAAA,QAAAC,aAAA,CAAAA,aAAA,KAAAF,KAAA;IAAAG,QAAA,eAAAF,IAAA;MAAAG,IAAA;MAAAC,QAAA;MAAAC,CAAA;MAAAC,QAAA;IAAA;EAAA;AAAA;AAApBR,oBAAoB,CAAAS,YAAA;EAAAC,KAAA;EA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,CAAE;IAAC,CAC1C,CAAC,eACThC,IAAA,CAACL,MAAM;MACHsC,IAAI,EAAC,QAAQ;MACbH,OAAO,EAAEN,SAAU;MACnBU,QAAQ,EAAEX,cAAc,CAACY,MAAM,GAAG,CAAE;MACpC1B,KAAK,EAAC,KAAK;MAAAP,QAAA,eAEXF,IAAA,CAACH,IAAI;QAACkC,IAAI,EAAEnB,uBAAwB;QAACoB,IAAI,EAAE;MAAG,CAAE;IAAC,CAC7C,CAAC;EAAA,CACP,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react';
|
|
2
|
-
import type {Meta, StoryObj} from '@storybook/react';
|
|
3
|
-
import {HistoryList} from './HistoryList';
|
|
4
|
-
import {QueryHistoryItem, QueryHistoryRow} from '../../types/history';
|
|
5
|
-
|
|
6
|
-
const now = Date.now();
|
|
7
|
-
const min = 60 * 1000;
|
|
8
|
-
|
|
9
|
-
const ITEMS: QueryHistoryItem<QueryHistoryRow>[] = [
|
|
10
|
-
{header: 'Today', height: 28},
|
|
11
|
-
{
|
|
12
|
-
id: 1,
|
|
13
|
-
title: 'Query 1',
|
|
14
|
-
status: 'completed',
|
|
15
|
-
engine: 'YQL',
|
|
16
|
-
startTime: now - 2 * min,
|
|
17
|
-
endTime: now - min,
|
|
18
|
-
height: 52,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 2,
|
|
22
|
-
title: 'Query 2',
|
|
23
|
-
status: 'failed',
|
|
24
|
-
engine: 'YQL',
|
|
25
|
-
startTime: now - 10 * min,
|
|
26
|
-
endTime: now - 9 * min,
|
|
27
|
-
height: 52,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 3,
|
|
31
|
-
title: 'Query 3',
|
|
32
|
-
status: 'running',
|
|
33
|
-
engine: 'YQL',
|
|
34
|
-
startTime: now - min,
|
|
35
|
-
height: 52,
|
|
36
|
-
},
|
|
37
|
-
{header: 'Yesterday', height: 28},
|
|
38
|
-
{
|
|
39
|
-
id: 4,
|
|
40
|
-
title: 'Query 4',
|
|
41
|
-
status: 'aborted',
|
|
42
|
-
engine: 'YQL',
|
|
43
|
-
startTime: now - 25 * 60 * min,
|
|
44
|
-
endTime: now - 24 * 60 * min,
|
|
45
|
-
height: 52,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 5,
|
|
49
|
-
title: 'Query 5',
|
|
50
|
-
status: 'draft',
|
|
51
|
-
engine: 'YQL',
|
|
52
|
-
startTime: now - 30 * 60 * min,
|
|
53
|
-
height: 52,
|
|
54
|
-
},
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const meta: Meta<typeof HistoryList> = {
|
|
58
|
-
title: 'Modules/HistoryList',
|
|
59
|
-
component: HistoryList,
|
|
60
|
-
tags: ['autodocs'],
|
|
61
|
-
parameters: {
|
|
62
|
-
layout: 'padded',
|
|
63
|
-
},
|
|
64
|
-
decorators: [
|
|
65
|
-
(Story) => (
|
|
66
|
-
<div style={{width: 420, height: 480}}>
|
|
67
|
-
<Story />
|
|
68
|
-
</div>
|
|
69
|
-
),
|
|
70
|
-
],
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export default meta;
|
|
74
|
-
type Story = StoryObj<typeof HistoryList>;
|
|
75
|
-
|
|
76
|
-
/** Basic list with groups and all statuses */
|
|
77
|
-
export const Default: Story = {
|
|
78
|
-
args: {
|
|
79
|
-
items: ITEMS,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/** Empty list */
|
|
84
|
-
export const Empty: Story = {
|
|
85
|
-
args: {
|
|
86
|
-
items: [],
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/** With row actions (visible on hover) */
|
|
91
|
-
export const WithActions: Story = {
|
|
92
|
-
args: {
|
|
93
|
-
items: ITEMS,
|
|
94
|
-
getRowActions: (_item) => [
|
|
95
|
-
{text: 'Run again', onClick: (row) => alert(`Run: ${row.title}`)},
|
|
96
|
-
{text: 'Copy', onClick: (row) => alert(`Copy: ${row.title}`)},
|
|
97
|
-
{text: 'Delete', onClick: (row) => alert(`Delete: ${row.title}`)},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/** Interactive row comparison mode */
|
|
103
|
-
const WithComparisonStory = () => {
|
|
104
|
-
const [comparedRowIds, setComparedRowIds] = useState<number[]>([2]);
|
|
105
|
-
|
|
106
|
-
const handleChange = (item: QueryHistoryRow, selected: boolean) => {
|
|
107
|
-
setComparedRowIds((prev) =>
|
|
108
|
-
selected ? [...prev, item.id] : prev.filter((id) => id !== item.id),
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<div style={{width: 420, height: 480}}>
|
|
114
|
-
<div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>
|
|
115
|
-
Compared ids: {comparedRowIds.join(', ') || 'none'}
|
|
116
|
-
</div>
|
|
117
|
-
<HistoryList
|
|
118
|
-
items={ITEMS}
|
|
119
|
-
comparison={{
|
|
120
|
-
enabled: true,
|
|
121
|
-
comparedRowIds,
|
|
122
|
-
onChange: handleChange,
|
|
123
|
-
onCancel: () => setComparedRowIds([]),
|
|
124
|
-
onCompare: () => alert(`Compare: ${comparedRowIds.join(', ')}`),
|
|
125
|
-
}}
|
|
126
|
-
/>
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export const WithComparison: Story = {render: () => <WithComparisonStory />};
|
|
132
|
-
|
|
133
|
-
/** Row highlighted via selectedRowId */
|
|
134
|
-
const WithSelectedRowStory = () => {
|
|
135
|
-
const [selectedRowId, setSelectedRowId] = useState<number | undefined>(1);
|
|
136
|
-
|
|
137
|
-
return (
|
|
138
|
-
<div style={{width: 420, height: 480}}>
|
|
139
|
-
<div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>
|
|
140
|
-
Selected row id: {selectedRowId ?? 'none'}
|
|
141
|
-
</div>
|
|
142
|
-
<HistoryList
|
|
143
|
-
items={ITEMS}
|
|
144
|
-
selectedRowId={selectedRowId}
|
|
145
|
-
onItemClick={(item, index) => {
|
|
146
|
-
if (!('header' in item)) {
|
|
147
|
-
setSelectedRowId(index);
|
|
148
|
-
}
|
|
149
|
-
}}
|
|
150
|
-
/>
|
|
151
|
-
</div>
|
|
152
|
-
);
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export const WithSelectedRow: Story = {render: () => <WithSelectedRowStory />};
|
|
156
|
-
|
|
157
|
-
/** Interactive row title editing mode */
|
|
158
|
-
const WithEditingStory = () => {
|
|
159
|
-
const [editingRowId, setEditingRowId] = useState<number | undefined>(1);
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<div style={{width: 420, height: 480}}>
|
|
163
|
-
<div style={{marginBottom: 8, fontSize: 12, color: '#888'}}>
|
|
164
|
-
Editing row id: {editingRowId ?? 'none'} (row #1 is open for editing)
|
|
165
|
-
</div>
|
|
166
|
-
<HistoryList
|
|
167
|
-
items={ITEMS}
|
|
168
|
-
editing={{
|
|
169
|
-
rowId: editingRowId,
|
|
170
|
-
onSubmit: (item, title) => {
|
|
171
|
-
alert(`Saved row ${item.id}: "${title}"`);
|
|
172
|
-
setEditingRowId(undefined);
|
|
173
|
-
},
|
|
174
|
-
onCancel: () => setEditingRowId(undefined),
|
|
175
|
-
}}
|
|
176
|
-
/>
|
|
177
|
-
</div>
|
|
178
|
-
);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export const WithEditing: Story = {render: () => <WithEditingStory />};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
QueryHistoryComparisonConfig,
|
|
4
|
-
QueryHistoryEditingConfig,
|
|
5
|
-
QueryHistoryItem,
|
|
6
|
-
QueryHistoryRow,
|
|
7
|
-
QueryHistoryRowAction,
|
|
8
|
-
QueryHistoryRowRenderData,
|
|
9
|
-
QueryHistoryRowVariant,
|
|
10
|
-
QueryHistoryVisibleFieldsConfig,
|
|
11
|
-
} from '../../types/history';
|
|
12
|
-
import {RowsList} from '../RowsList';
|
|
13
|
-
import {HistoryRowContent} from './HistoryRowContent';
|
|
14
|
-
|
|
15
|
-
export type HistoryListProps<T extends QueryHistoryRow> = {
|
|
16
|
-
selectedRowId?: T['id'];
|
|
17
|
-
items: QueryHistoryItem<T>[];
|
|
18
|
-
rowVariant?: QueryHistoryRowVariant;
|
|
19
|
-
visibleFields?: QueryHistoryVisibleFieldsConfig<T>;
|
|
20
|
-
editing?: QueryHistoryEditingConfig<T>;
|
|
21
|
-
comparison?: QueryHistoryComparisonConfig<T>;
|
|
22
|
-
getRowActions?: (item: T) => QueryHistoryRowAction<T>[];
|
|
23
|
-
renderRowItem?: (data: QueryHistoryRowRenderData<T>) => React.ReactNode;
|
|
24
|
-
showFiltersHint?: boolean;
|
|
25
|
-
className?: string;
|
|
26
|
-
onItemClick?: (item: QueryHistoryItem<T>, index: number) => void;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const HistoryList = <T extends QueryHistoryRow>({
|
|
30
|
-
renderRowItem,
|
|
31
|
-
...props
|
|
32
|
-
}: HistoryListProps<T>) => {
|
|
33
|
-
return (
|
|
34
|
-
<RowsList
|
|
35
|
-
{...props}
|
|
36
|
-
renderRow={(data) =>
|
|
37
|
-
renderRowItem ? renderRowItem(data) : <HistoryRowContent {...data} />
|
|
38
|
-
}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
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 {QueryHistoryRow, QueryHistoryRowAction} from '../../types/history';
|
|
5
|
-
|
|
6
|
-
type Props<T extends QueryHistoryRow> = {
|
|
7
|
-
item: T;
|
|
8
|
-
actions?: QueryHistoryRowAction<T>[];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const HistoryRowMenu = <T extends QueryHistoryRow>({item, actions}: Props<T>) => {
|
|
12
|
-
const items = useMemo(() => {
|
|
13
|
-
return actions?.map<DropdownMenuItem>(({icon, text, hidden, disabled, onClick}) => {
|
|
14
|
-
return {
|
|
15
|
-
text,
|
|
16
|
-
hidden,
|
|
17
|
-
disabled,
|
|
18
|
-
iconStart: icon,
|
|
19
|
-
action: () => {
|
|
20
|
-
onClick(item);
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
}, [actions, item]);
|
|
25
|
-
|
|
26
|
-
if (!actions || !actions.length) return null;
|
|
27
|
-
|
|
28
|
-
const handleClick = (e: MouseEvent<HTMLDivElement>) => {
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div onClick={handleClick}>
|
|
34
|
-
<DropdownMenu
|
|
35
|
-
size="s"
|
|
36
|
-
renderSwitcher={(props) => {
|
|
37
|
-
return (
|
|
38
|
-
<Button {...props} size="xs">
|
|
39
|
-
<Icon data={EllipsisIcon} size={12} />
|
|
40
|
-
</Button>
|
|
41
|
-
);
|
|
42
|
-
}}
|
|
43
|
-
items={items}
|
|
44
|
-
/>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
};
|