@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,83 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RegisteredFormFields } from './forms';
|
|
3
|
+
/** ISO 8601 date string or Unix timestamp in milliseconds. */
|
|
4
|
+
export type QueryTimestamp = string | number;
|
|
5
|
+
export type QueryListRowRenderProps = {
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export type QueryListHeader = {
|
|
9
|
+
header: string;
|
|
10
|
+
} & QueryListRowRenderProps;
|
|
11
|
+
export type QueryListRow = {
|
|
12
|
+
id: number;
|
|
13
|
+
title: string;
|
|
14
|
+
query?: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
} & QueryListRowRenderProps;
|
|
17
|
+
export type QueryListItem<T extends QueryListRow = QueryListRow> = QueryListHeader | T;
|
|
18
|
+
export type QueryListRowVariant = 'default' | 'search';
|
|
19
|
+
export type QueryListRowAction<T extends QueryListRow = QueryListRow> = {
|
|
20
|
+
text: ReactNode;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
theme?: 'normal' | 'danger';
|
|
23
|
+
hidden?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
onClick: (item: T) => void;
|
|
26
|
+
};
|
|
27
|
+
export type QueryListSearchConfig = {
|
|
28
|
+
value?: string;
|
|
29
|
+
fullSearch?: boolean;
|
|
30
|
+
hasClear?: boolean;
|
|
31
|
+
onUpdate: (data: {
|
|
32
|
+
value: string;
|
|
33
|
+
fullSearch: boolean;
|
|
34
|
+
}) => void;
|
|
35
|
+
};
|
|
36
|
+
export type QueryListFilterConfig = {
|
|
37
|
+
fields?: RegisteredFormFields[];
|
|
38
|
+
values?: Record<string, any>;
|
|
39
|
+
initialValues?: Record<string, any>;
|
|
40
|
+
isChanged?: boolean;
|
|
41
|
+
onApply?: (values: Record<string, any>) => void;
|
|
42
|
+
onReset?: () => void;
|
|
43
|
+
};
|
|
44
|
+
export type QueryListEditingConfig<T extends QueryListRow = QueryListRow> = {
|
|
45
|
+
rowId?: T['id'];
|
|
46
|
+
onSubmit?: (item: T, title: string) => void;
|
|
47
|
+
onCancel?: (item: T) => void;
|
|
48
|
+
};
|
|
49
|
+
export type QueryListComparisonConfig<T extends QueryListRow = QueryListRow> = {
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
comparedRowIds: T['id'][];
|
|
52
|
+
onChange: (item: T, selected: boolean) => void;
|
|
53
|
+
onCancel: () => void;
|
|
54
|
+
onCompare: () => void;
|
|
55
|
+
};
|
|
56
|
+
type RowFieldKey<T extends QueryListRow> = Exclude<keyof T & string, keyof QueryListRowRenderProps>;
|
|
57
|
+
export type QueryListFieldKey<T extends QueryListRow = QueryListRow> = RowFieldKey<T> | 'duration';
|
|
58
|
+
export type QueryListFieldOption<K extends string = string> = {
|
|
59
|
+
id: K;
|
|
60
|
+
title: ReactNode;
|
|
61
|
+
};
|
|
62
|
+
export type QueryListVisibleFieldsConfig<T extends QueryListRow = QueryListRow> = {
|
|
63
|
+
value: QueryListFieldKey<T>[];
|
|
64
|
+
fields: QueryListFieldOption<QueryListFieldKey<T>>[];
|
|
65
|
+
onChange: (value: QueryListFieldKey<T>[]) => void;
|
|
66
|
+
};
|
|
67
|
+
export type QueryListEditingRenderData<T extends QueryListRow = QueryListRow> = {
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
} & Pick<QueryListEditingConfig<T>, 'onSubmit' | 'onCancel'>;
|
|
70
|
+
export type QueryListRowRenderData<T extends QueryListRow = QueryListRow> = {
|
|
71
|
+
item: QueryListItem<T>;
|
|
72
|
+
index: number;
|
|
73
|
+
isActive: boolean;
|
|
74
|
+
variant: QueryListRowVariant;
|
|
75
|
+
comparison?: {
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
checked: boolean;
|
|
78
|
+
};
|
|
79
|
+
visibleFields?: QueryListVisibleFieldsConfig<T>;
|
|
80
|
+
actions?: QueryListRowAction<T>[];
|
|
81
|
+
editing?: QueryListEditingRenderData<T>;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["queryList.ts"],"sourcesContent":["import {ReactNode} from 'react';\nimport {RegisteredFormFields} from './forms';\n\n/** ISO 8601 date string or Unix timestamp in milliseconds. */\nexport type QueryTimestamp = string | number;\n\nexport type QueryListRowRenderProps = {height: number};\n\nexport type QueryListHeader = {header: string} & QueryListRowRenderProps;\n\nexport type QueryListRow = {\n id: number;\n title: string;\n query?: string;\n href?: string;\n} & QueryListRowRenderProps;\n\nexport type QueryListItem<T extends QueryListRow = QueryListRow> = QueryListHeader | T;\n\nexport type QueryListRowVariant = 'default' | 'search';\n\nexport type QueryListRowAction<T extends QueryListRow = QueryListRow> = {\n text: ReactNode;\n icon?: ReactNode;\n theme?: 'normal' | 'danger';\n hidden?: boolean;\n disabled?: boolean;\n onClick: (item: T) => void;\n};\n\nexport type QueryListSearchConfig = {\n value?: string;\n fullSearch?: boolean;\n hasClear?: boolean;\n onUpdate: (data: {value: string; fullSearch: boolean}) => void;\n};\n\nexport type QueryListFilterConfig = {\n fields?: RegisteredFormFields[];\n values?: Record<string, any>;\n initialValues?: Record<string, any>;\n isChanged?: boolean;\n onApply?: (values: Record<string, any>) => void;\n onReset?: () => void;\n};\n\nexport type QueryListEditingConfig<T extends QueryListRow = QueryListRow> = {\n rowId?: T['id'];\n onSubmit?: (item: T, title: string) => void;\n onCancel?: (item: T) => void;\n};\n\nexport type QueryListComparisonConfig<T extends QueryListRow = QueryListRow> = {\n enabled: boolean;\n comparedRowIds: T['id'][];\n onChange: (item: T, selected: boolean) => void;\n onCancel: () => void;\n onCompare: () => void;\n};\n\ntype RowFieldKey<T extends QueryListRow> = Exclude<keyof T & string, keyof QueryListRowRenderProps>;\n\nexport type QueryListFieldKey<T extends QueryListRow = QueryListRow> = RowFieldKey<T> | 'duration';\n\nexport type QueryListFieldOption<K extends string = string> = {\n id: K;\n title: ReactNode;\n};\n\nexport type QueryListVisibleFieldsConfig<T extends QueryListRow = QueryListRow> = {\n value: QueryListFieldKey<T>[];\n fields: QueryListFieldOption<QueryListFieldKey<T>>[];\n onChange: (value: QueryListFieldKey<T>[]) => void;\n};\n\nexport type QueryListEditingRenderData<T extends QueryListRow = QueryListRow> = {\n enabled: boolean;\n} & Pick<QueryListEditingConfig<T>, 'onSubmit' | 'onCancel'>;\n\nexport type QueryListRowRenderData<T extends QueryListRow = QueryListRow> = {\n item: QueryListItem<T>;\n index: number;\n isActive: boolean;\n variant: QueryListRowVariant;\n comparison?: {\n enabled: boolean;\n checked: boolean;\n };\n visibleFields?: QueryListVisibleFieldsConfig<T>;\n actions?: QueryListRowAction<T>[];\n editing?: QueryListEditingRenderData<T>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["savedQueries.ts"],"sourcesContent":["import {QueryListRow, QueryTimestamp} from './queryList';\n\nexport type SavedQuery = QueryListRow & {\n savedAt?: QueryTimestamp;\n engine?: string;\n author?: string;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type TutorialHistoryRow =
|
|
1
|
+
import { QueryListRow } from './queryList';
|
|
2
|
+
export type TutorialHistoryRow = QueryListRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["tutorial.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":[],"sources":["tutorial.ts"],"sourcesContent":["import {QueryListRow} from './queryList';\n\nexport type TutorialHistoryRow = QueryListRow;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["QueriesHistory.scss"],"names":[],"mappings":"AAAA;EACE,YAAA;AACF
|
|
1
|
+
{"version":3,"sources":["QueriesHistory.scss"],"names":[],"mappings":"AAAA;EACE,YAAA;AACF","file":"QueriesHistory.css","sourcesContent":[".qp-query-history {\n height: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { QueryListComparisonConfig, QueryListEditingConfig, QueryListFilterConfig, QueryListItem, QueryListRowAction, QueryListRowRenderData, QueryListSearchConfig, QueryListVisibleFieldsConfig } from '../../types/queryList';
|
|
3
|
+
import { QueryHistoryRow } from '../../types/history';
|
|
3
4
|
import './QueriesHistory.scss';
|
|
4
5
|
export type QueriesHistoryProps<T extends QueryHistoryRow = QueryHistoryRow> = {
|
|
5
6
|
className?: string;
|
|
6
7
|
title?: string;
|
|
7
8
|
logo?: React.ReactNode;
|
|
8
|
-
search:
|
|
9
|
-
filter?:
|
|
10
|
-
items:
|
|
9
|
+
search: QueryListSearchConfig;
|
|
10
|
+
filter?: QueryListFilterConfig;
|
|
11
|
+
items: QueryListItem<T>[];
|
|
11
12
|
selectedRowId?: T['id'];
|
|
12
|
-
editing?:
|
|
13
|
-
comparison?:
|
|
14
|
-
visibleFields?:
|
|
15
|
-
renderRowItem?: (data:
|
|
16
|
-
getRowActions?: (item: T) =>
|
|
17
|
-
onListItemClick?: (item:
|
|
13
|
+
editing?: QueryListEditingConfig<T>;
|
|
14
|
+
comparison?: QueryListComparisonConfig<T>;
|
|
15
|
+
visibleFields?: QueryListVisibleFieldsConfig<T>;
|
|
16
|
+
renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;
|
|
17
|
+
getRowActions?: (item: T) => QueryListRowAction<T>[];
|
|
18
|
+
onListItemClick?: (item: QueryListItem<T>) => void;
|
|
18
19
|
};
|
|
19
20
|
export declare const QueriesHistory: <T extends QueryHistoryRow>({ title, logo, search, filter, items, selectedRowId, editing, comparison, visibleFields, renderRowItem, getRowActions, onListItemClick, className, }: QueriesHistoryProps<T>) => React.JSX.Element;
|
|
@@ -11,20 +11,16 @@ require("core-js/modules/es.iterator.filter.js");
|
|
|
11
11
|
require("core-js/modules/es.object.to-string.js");
|
|
12
12
|
require("core-js/modules/es.regexp.exec.js");
|
|
13
13
|
require("core-js/modules/es.string.search.js");
|
|
14
|
-
require("core-js/modules/es.string.trim.js");
|
|
15
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
16
16
|
var _modules = require("../../modules");
|
|
17
17
|
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
18
|
-
var
|
|
19
|
-
var _getListKey = require("../../helpers/getListKey");
|
|
20
|
-
var _ComparisonActions = require("./ComparisonActions");
|
|
21
|
-
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
18
|
+
var _HistoryRowContent = require("./internal/HistoryRowContent");
|
|
22
19
|
require("./QueriesHistory.css");
|
|
23
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
22
|
var block = (0, _bemCnLite.default)('qp-query-history');
|
|
26
23
|
var QueriesHistory = exports.QueriesHistory = function QueriesHistory(_ref) {
|
|
27
|
-
var _search$value;
|
|
28
24
|
var title = _ref.title,
|
|
29
25
|
logo = _ref.logo,
|
|
30
26
|
search = _ref.search,
|
|
@@ -38,37 +34,22 @@ var QueriesHistory = exports.QueriesHistory = function QueriesHistory(_ref) {
|
|
|
38
34
|
getRowActions = _ref.getRowActions,
|
|
39
35
|
onListItemClick = _ref.onListItemClick,
|
|
40
36
|
className = _ref.className;
|
|
41
|
-
|
|
42
|
-
var rowVariant = showSearchResults ? 'search' : 'default';
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.HistoryLayout, {
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.QueriesList, {
|
|
44
38
|
className: block(null, className),
|
|
45
39
|
title: title || (0, _i18n.default)('title_history'),
|
|
46
40
|
logo: logo,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}),
|
|
60
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.HistoryList, {
|
|
61
|
-
items: items,
|
|
62
|
-
rowVariant: rowVariant,
|
|
63
|
-
selectedRowId: selectedRowId,
|
|
64
|
-
visibleFields: visibleFields,
|
|
65
|
-
editing: editing,
|
|
66
|
-
comparison: comparison,
|
|
67
|
-
renderRowItem: renderRowItem,
|
|
68
|
-
getRowActions: getRowActions,
|
|
69
|
-
showFiltersHint: Boolean(filter),
|
|
70
|
-
onItemClick: onListItemClick
|
|
71
|
-
}, (0, _getListKey.getListKey)(items, rowVariant))
|
|
41
|
+
search: search,
|
|
42
|
+
filter: filter,
|
|
43
|
+
items: items,
|
|
44
|
+
selectedRowId: selectedRowId,
|
|
45
|
+
visibleFields: visibleFields,
|
|
46
|
+
editing: editing,
|
|
47
|
+
comparison: comparison,
|
|
48
|
+
getRowActions: getRowActions,
|
|
49
|
+
renderRow: function renderRow(data) {
|
|
50
|
+
return renderRowItem ? renderRowItem(data) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_HistoryRowContent.HistoryRowContent, (0, _objectSpread2.default)({}, data));
|
|
51
|
+
},
|
|
52
|
+
onListItemClick: onListItemClick
|
|
72
53
|
});
|
|
73
54
|
};
|
|
74
55
|
// #sourceMappingURL=QueriesHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_bemCnLite","_modules","_i18n","_HistoryRowContent","_jsxRuntime","e","__esModule","default","block","cn","QueriesHistory","exports","_ref","title","logo","search","filter","items","selectedRowId","editing","comparison","visibleFields","renderRowItem","getRowActions","onListItemClick","className","_jsx","QueriesList","i18n","renderRow","data","HistoryRowContent","_objectSpread"],"sources":["QueriesHistory.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {QueriesList} from '../../modules';\nimport i18n from './i18n';\nimport {\n QueryListComparisonConfig,\n QueryListEditingConfig,\n QueryListFilterConfig,\n QueryListItem,\n QueryListRowAction,\n QueryListRowRenderData,\n QueryListSearchConfig,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {QueryHistoryRow} from '../../types/history';\nimport {HistoryRowContent} from './internal/HistoryRowContent';\nimport './QueriesHistory.scss';\n\nexport type QueriesHistoryProps<T extends QueryHistoryRow = QueryHistoryRow> = {\n className?: string;\n title?: string;\n logo?: React.ReactNode;\n search: QueryListSearchConfig;\n filter?: QueryListFilterConfig;\n items: QueryListItem<T>[];\n selectedRowId?: T['id'];\n editing?: QueryListEditingConfig<T>;\n comparison?: QueryListComparisonConfig<T>;\n visibleFields?: QueryListVisibleFieldsConfig<T>;\n renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n getRowActions?: (item: T) => QueryListRowAction<T>[];\n onListItemClick?: (item: QueryListItem<T>) => void;\n};\n\nconst block = cn('qp-query-history');\n\nexport const QueriesHistory = <T extends QueryHistoryRow>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n editing,\n comparison,\n visibleFields,\n renderRowItem,\n getRowActions,\n onListItemClick,\n className,\n}: QueriesHistoryProps<T>) => {\n return (\n <QueriesList\n className={block(null, className)}\n title={title || i18n('title_history')}\n logo={logo}\n search={search}\n filter={filter}\n items={items}\n selectedRowId={selectedRowId}\n visibleFields={visibleFields}\n editing={editing}\n comparison={comparison}\n getRowActions={getRowActions}\n renderRow={(data) =>\n renderRowItem ? renderRowItem(data) : <HistoryRowContent {...data} />\n }\n onListItemClick={onListItemClick}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,M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,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAC7BG,aAAa,EAAEA,aAAc;IAC7BF,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAEA,UAAW;IACvBG,aAAa,EAAEA,aAAc;IAC7BM,SAAS,EAAE,SAAXA,SAASA,CAAGC,IAAI;MAAA,OACZR,aAAa,GAAGA,aAAa,CAACQ,IAAI,CAAC,gBAAG,IAAAJ,eAAA,EAACK,oCAAiB,MAAAC,sBAAA,MAAKF,IAAI,CAAG,CAAC;IAAA,CACxE;IACDN,eAAe,EAAEA;EAAgB,CACpC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_QueriesHistory","_actions","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_interopRequireDefault","now","Date","min","QUERY","BASE_ITEMS","header","height","id","title","status","engine","mode","startTime","endTime","query","activeFields","fields","filterFields","type","initialValue","items","logFilterApply","action","logFilterReset","meta","component","QueriesHistory","tags","parameters","layout","_default","exports","DefaultStory","_useState","useState","concat","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","_useState5","_useState6","visibleFields","setVisibleFields","_useState7","_useState8","compareMode","setCompareMode","_useState9","_useState0","comparedRows","setComparedRows","_useState1","undefined","_useState10","editingId","setEditingId","handleCompareChange","item","selected","result","_toConsumableArray","slice","filter","length","handleCompareCancel","handleEditSubmit","index","findIndex","_objectSpread","handleEditCancel","handleCompare","handleOnSearch","data","newItems","_item$query","toLowerCase","searchValue","includes","_jsx","style","width","children","onChange","hasClear","onUpdate","onApply","onReset","getRowActions","text","onClick","comparison","enabled","comparedRowIds","onCancel","onCompare","editing","rowId","onSubmit","EmptyStory","_useState11","_useState12","Default","render","Empty"],"sources":["QueriesHistory.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {QueriesHistory} from './QueriesHistory';\nimport {\n QueryHistoryFieldKey,\n QueryHistoryFilterConfig,\n QueryHistoryItem,\n QueryHistoryRow,\n QueryHistoryVisibleFieldsConfig,\n} from '../../types/history';\nimport {action} from 'storybook/actions';\n\nconst now = Date.now();\nconst min = 60 * 1000;\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 BASE_ITEMS: QueryHistoryItem<QueryHistoryRow>[] = [\n {header: 'Today', height: 28},\n {\n id: 1,\n title: 'Query 1',\n status: 'completed',\n engine: 'YQL',\n mode: 'Validation',\n startTime: now - 2 * min,\n endTime: now - min,\n query: QUERY,\n height: 52,\n },\n {\n id: 2,\n title: 'Query 2',\n status: 'failed',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - 10 * min,\n endTime: now - 9 * min,\n query: QUERY,\n height: 52,\n },\n {\n id: 3,\n title: 'Query 3',\n status: 'running',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - min,\n query: QUERY,\n height: 52,\n },\n {header: 'Yesterday', height: 28},\n {\n id: 4,\n title: 'Query 4',\n status: 'aborted',\n engine: 'YQL',\n mode: 'Validation',\n startTime: now - 25 * 60 * min,\n endTime: now - 24 * 60 * min,\n query: 'SELECT 1',\n height: 52,\n },\n {\n id: 5,\n title: 'Query 5',\n status: 'draft',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - 30 * 60 * min,\n query: QUERY,\n height: 52,\n },\n];\n\ntype VisibleFields = QueryHistoryVisibleFieldsConfig<QueryHistoryRow>['fields'];\nconst activeFields: QueryHistoryFieldKey<QueryHistoryRow>[] = [\n 'duration',\n 'mode',\n 'startTime',\n 'engine',\n 'isPrivate',\n];\nconst fields: VisibleFields = [\n {\n id: 'duration',\n title: 'Duration',\n },\n {\n id: 'mode',\n title: 'Mode',\n },\n {\n id: 'startTime',\n title: 'Start time',\n },\n {\n id: 'engine',\n title: 'Engine',\n },\n {\n id: 'isPrivate',\n title: 'ACO',\n },\n];\n\nconst filterFields: QueryHistoryFilterConfig['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 meta: Meta<typeof QueriesHistory> = {\n title: 'Widgets/QueriesHistory',\n component: QueriesHistory,\n tags: ['autodocs'],\n parameters: {\n layout: 'padded',\n },\n};\n\nexport default meta;\ntype Story = StoryObj<typeof QueriesHistory>;\n\nconst DefaultStory = () => {\n const [items, setItems] = useState([...BASE_ITEMS]);\n const [search, setSearch] = useState({value: '', fullSearch: false});\n const [visibleFields, setVisibleFields] =\n useState<QueryHistoryFieldKey<QueryHistoryRow>[]>(activeFields);\n const [compareMode, setCompareMode] = useState(false);\n const [comparedRows, setComparedRows] = useState<number[]>([]);\n const [editingId, setEditingId] = useState<number | undefined>(undefined);\n\n const handleCompareChange = (item: QueryHistoryRow, selected: boolean) => {\n const result = selected\n ? [...comparedRows.slice(0, 1), item.id]\n : comparedRows.filter((id) => id !== item.id);\n setComparedRows(result);\n\n if (!result.length) setCompareMode(false);\n };\n\n const handleCompareCancel = () => {\n setComparedRows([]);\n setCompareMode(false);\n };\n\n const handleEditSubmit = (item: QueryHistoryRow, title: string) => {\n const index = items.findIndex((i) => 'id' in i && i.id === item.id);\n if (index < 0) return;\n\n const result = [...items];\n result[index] = {...result[index], title};\n setItems(result);\n setEditingId(undefined);\n };\n\n const handleEditCancel = () => {\n setEditingId(undefined);\n };\n\n const handleCompare = () => {\n action('onCompare')(comparedRows);\n };\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 <QueriesHistory\n title=\"History\"\n items={items}\n visibleFields={{value: visibleFields, fields, onChange: setVisibleFields}}\n search={{\n value: search.value,\n fullSearch: search.fullSearch,\n hasClear: true,\n onUpdate: handleOnSearch,\n }}\n filter={{\n fields: filterFields,\n onApply: logFilterApply,\n onReset: logFilterReset('reset'),\n }}\n getRowActions={() => [\n {\n text: 'Compare',\n onClick: (item) => {\n setCompareMode(true);\n setComparedRows([item.id]);\n },\n },\n {\n text: 'Edit',\n onClick: (item) => {\n setEditingId(item.id);\n },\n },\n ]}\n comparison={{\n enabled: compareMode,\n comparedRowIds: comparedRows,\n onChange: handleCompareChange,\n onCancel: handleCompareCancel,\n onCompare: handleCompare,\n }}\n editing={{\n rowId: editingId,\n onSubmit: handleEditSubmit,\n onCancel: handleEditCancel,\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 <QueriesHistory\n title=\"History\"\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":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAQA,IAAAE,QAAA,GAAAF,OAAA;AAAyC,IAAAG,WAAA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AU,GAAG,SAAbA,UAAUA,CAAA,EAAS;EACrB,IAAAC,WAAA,GAA4B,IAAAvE,eAAQ,EAAC;MAACM,KAAK,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAK,CAAC,CAAC;IAAAiE,WAAA,OAAArE,uBAAA,EAAAoE,WAAA;IAA7D9D,MAAM,GAAA+D,WAAA;IAAE9D,SAAS,GAAA8D,WAAA;EAExB,oBACI,IAAAtB,eAAA;IAAKC,KAAK,EAAE;MAACC,KAAK,EAAE,GAAG;MAAEhF,MAAM,EAAE;IAAG,CAAE;IAAAiF,QAAA,eAClC,IAAAH,eAAA,EAAC1D,8BAAc;MACXlB,KAAK,EAAC,SAAS;MACfY,KAAK,EAAE,EAAG;MACVuB,MAAM,EAAE;QACJH,KAAK,EAAEG,MAAM,CAACH,KAAK;QACnBC,UAAU,EAAEE,MAAM,CAACF,UAAU;QAC7BgD,QAAQ,EAAE,IAAI;QACdC,QAAQ,EAAE9C;MACd;IAAE,CACL;EAAC,CACD,CAAC;AAEd,CAAC;AAEM,IAAM+D,OAAc,GAAA5E,OAAA,CAAA4E,OAAA,GAAG;EAACC,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ,IAAAxB,eAAA,EAACpD,YAAY,IAAE,CAAC;EAAA;AAAA,CAAC;AACvD,IAAM6E,KAAY,GAAA9E,OAAA,CAAA8E,KAAA,GAAG;EAACD,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ,IAAAxB,eAAA,EAACoB,UAAU,IAAE,CAAC;EAAA;AAAA,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_QueriesHistory","_actions","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_interopRequireDefault","now","Date","min","QUERY","BASE_ITEMS","header","height","id","title","status","engine","mode","startTime","endTime","query","activeFields","fields","filterFields","type","initialValue","items","logFilterApply","action","logFilterReset","meta","component","QueriesHistory","tags","parameters","layout","_default","exports","DefaultStory","_useState","useState","concat","_useState2","_slicedToArray","setItems","_useState3","value","fullSearch","_useState4","search","setSearch","_useState5","_useState6","visibleFields","setVisibleFields","_useState7","_useState8","compareMode","setCompareMode","_useState9","_useState0","comparedRows","setComparedRows","_useState1","undefined","_useState10","editingId","setEditingId","handleCompareChange","item","selected","result","_toConsumableArray","slice","filter","length","handleCompareCancel","handleEditSubmit","index","findIndex","_objectSpread","handleEditCancel","handleCompare","handleOnSearch","data","newItems","_item$query","toLowerCase","searchValue","includes","_jsx","style","width","children","onChange","hasClear","onUpdate","onApply","onReset","getRowActions","text","onClick","comparison","enabled","comparedRowIds","onCancel","onCompare","editing","rowId","onSubmit","EmptyStory","_useState11","_useState12","Default","render","Empty"],"sources":["QueriesHistory.stories.tsx"],"sourcesContent":["import React, {useState} from 'react';\nimport type {Meta, StoryObj} from '@storybook/react';\nimport {QueriesHistory} from './QueriesHistory';\nimport {\n QueryListFieldKey,\n QueryListFilterConfig,\n QueryListItem,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {QueryHistoryRow} from '../../types/history';\nimport {action} from 'storybook/actions';\n\nconst now = Date.now();\nconst min = 60 * 1000;\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 BASE_ITEMS: QueryListItem<QueryHistoryRow>[] = [\n {header: 'Today', height: 28},\n {\n id: 1,\n title: 'Query 1',\n status: 'completed',\n engine: 'YQL',\n mode: 'Validation',\n startTime: now - 2 * min,\n endTime: now - min,\n query: QUERY,\n height: 52,\n },\n {\n id: 2,\n title: 'Query 2',\n status: 'failed',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - 10 * min,\n endTime: now - 9 * min,\n query: QUERY,\n height: 52,\n },\n {\n id: 3,\n title: 'Query 3',\n status: 'running',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - min,\n query: QUERY,\n height: 52,\n },\n {header: 'Yesterday', height: 28},\n {\n id: 4,\n title: 'Query 4',\n status: 'aborted',\n engine: 'YQL',\n mode: 'Validation',\n startTime: now - 25 * 60 * min,\n endTime: now - 24 * 60 * min,\n query: 'SELECT 1',\n height: 52,\n },\n {\n id: 5,\n title: 'Query 5',\n status: 'draft',\n engine: 'YQL',\n mode: 'Test',\n startTime: now - 30 * 60 * min,\n query: QUERY,\n height: 52,\n },\n];\n\ntype VisibleFields = QueryListVisibleFieldsConfig<QueryHistoryRow>['fields'];\nconst activeFields: QueryListFieldKey<QueryHistoryRow>[] = [\n 'duration',\n 'mode',\n 'startTime',\n 'engine',\n 'isPrivate',\n];\nconst fields: VisibleFields = [\n {\n id: 'duration',\n title: 'Duration',\n },\n {\n id: 'mode',\n title: 'Mode',\n },\n {\n id: 'startTime',\n title: 'Start time',\n },\n {\n id: 'engine',\n title: 'Engine',\n },\n {\n id: 'isPrivate',\n title: 'ACO',\n },\n];\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 meta: Meta<typeof QueriesHistory> = {\n title: 'Widgets/QueriesHistory',\n component: QueriesHistory,\n tags: ['autodocs'],\n parameters: {\n layout: 'padded',\n },\n};\n\nexport default meta;\ntype Story = StoryObj<typeof QueriesHistory>;\n\nconst DefaultStory = () => {\n const [items, setItems] = useState([...BASE_ITEMS]);\n const [search, setSearch] = useState({value: '', fullSearch: false});\n const [visibleFields, setVisibleFields] =\n useState<QueryListFieldKey<QueryHistoryRow>[]>(activeFields);\n const [compareMode, setCompareMode] = useState(false);\n const [comparedRows, setComparedRows] = useState<number[]>([]);\n const [editingId, setEditingId] = useState<number | undefined>(undefined);\n\n const handleCompareChange = (item: QueryHistoryRow, selected: boolean) => {\n const result = selected\n ? [...comparedRows.slice(0, 1), item.id]\n : comparedRows.filter((id) => id !== item.id);\n setComparedRows(result);\n\n if (!result.length) setCompareMode(false);\n };\n\n const handleCompareCancel = () => {\n setComparedRows([]);\n setCompareMode(false);\n };\n\n const handleEditSubmit = (item: QueryHistoryRow, title: string) => {\n const index = items.findIndex((i) => 'id' in i && i.id === item.id);\n if (index < 0) return;\n\n const result = [...items];\n result[index] = {...result[index], title};\n setItems(result);\n setEditingId(undefined);\n };\n\n const handleEditCancel = () => {\n setEditingId(undefined);\n };\n\n const handleCompare = () => {\n action('onCompare')(comparedRows);\n };\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 <QueriesHistory\n title=\"History\"\n items={items}\n visibleFields={{value: visibleFields, fields, onChange: setVisibleFields}}\n search={{\n value: search.value,\n fullSearch: search.fullSearch,\n hasClear: true,\n onUpdate: handleOnSearch,\n }}\n filter={{\n fields: filterFields,\n onApply: logFilterApply,\n onReset: logFilterReset('reset'),\n }}\n getRowActions={() => [\n {\n text: 'Compare',\n onClick: (item) => {\n setCompareMode(true);\n setComparedRows([item.id]);\n },\n },\n {\n text: 'Edit',\n onClick: (item) => {\n setEditingId(item.id);\n },\n },\n ]}\n comparison={{\n enabled: compareMode,\n comparedRowIds: comparedRows,\n onChange: handleCompareChange,\n onCancel: handleCompareCancel,\n onCompare: handleCompare,\n }}\n editing={{\n rowId: editingId,\n onSubmit: handleEditSubmit,\n onCancel: handleEditCancel,\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 <QueriesHistory\n title=\"History\"\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":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAQA,IAAAE,QAAA,GAAAF,OAAA;AAAyC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,c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AAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ,IAAAxB,eAAA,EAACpD,YAAY,IAAE,CAAC;EAAA;AAAA,CAAC;AACvD,IAAM6E,KAAY,GAAA9E,OAAA,CAAA8E,KAAA,GAAG;EAACD,MAAM,EAAE,SAARA,MAAMA,CAAA;IAAA,oBAAQ,IAAAxB,eAAA,EAACoB,UAAU,IAAE,CAAC;EAAA;AAAA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QueryListRowRenderData } from '../../../types/queryList';
|
|
3
|
+
import { QueryHistoryRow } from '../../../types/history';
|
|
4
|
+
export declare const HistoryRowContent: <T extends QueryHistoryRow>({ variant, ...data }: QueryListRowRenderData<T>) => React.JSX.Element;
|
package/build/cjs/{modules/HistoryList → widgets/QueriesHistory/internal}/HistoryRowContent.js
RENAMED
|
@@ -7,9 +7,8 @@ exports.HistoryRowContent = void 0;
|
|
|
7
7
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _components = require("
|
|
11
|
-
var
|
|
12
|
-
var _HistorySearchRow = require("../HistorySearchRow");
|
|
10
|
+
var _components = require("../../../components");
|
|
11
|
+
var _modules = require("../../../modules");
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
var _excluded = ["variant"];
|
|
@@ -22,9 +21,9 @@ var HistoryRowContent = exports.HistoryRowContent = function HistoryRowContent(_
|
|
|
22
21
|
title: item.header
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
|
-
return variant === 'search' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
return variant === 'search' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.HistorySearchRow, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
26
25
|
item: item
|
|
27
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
26
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.HistoryRow, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
28
27
|
item: item
|
|
29
28
|
}));
|
|
30
29
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_components","_modules","_jsxRuntime","e","__esModule","default","HistoryRowContent","exports","_ref","variant","data","_objectWithoutProperties","_excluded","item","_jsx","HistoryGroupHeader","title","header","HistorySearchRow","_objectSpread","HistoryRow"],"sources":["HistoryRowContent.tsx"],"sourcesContent":["import React from 'react';\nimport {HistoryGroupHeader} from '../../../components';\nimport {HistoryRow, HistorySearchRow} from '../../../modules';\nimport {QueryListRowRenderData} from '../../../types/queryList';\nimport {QueryHistoryRow} from '../../../types/history';\n\nexport const HistoryRowContent = <T extends QueryHistoryRow>({\n variant,\n ...data\n}: QueryListRowRenderData<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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAA8D,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;;AAIvD,IAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,SAApBA,iBAAiBA,CAAAE,IAAA,EAGG;EAAA,IAF7BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACJC,IAAI,OAAAC,iCAAA,EAAAH,IAAA,EAAAI,SAAA;EAEP,IAAOC,IAAI,GAAIH,IAAI,CAAZG,IAAI;EAEX,IAAI,QAAQ,IAAIA,IAAI,EAAE;IAClB,oBAAO,IAAAC,eAAA,EAACC,8BAAkB;MAACC,KAAK,EAAEH,IAAI,CAACI;IAAO,CAAE,CAAC;EACrD;EAEA,OAAOR,OAAO,KAAK,QAAQ,gBACvB,IAAAK,eAAA,EAACI,yBAAgB,MAAAC,sBAAA,MAAAA,sBAAA,MAAKT,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CAAC,gBAE1C,IAAAC,eAAA,EAACM,mBAAU,MAAAD,sBAAA,MAAAA,sBAAA,MAAKT,IAAI;IAAEG,IAAI,EAAEA;EAAK,EAAE,CACtC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["QueriesNavigation.scss"],"names":[],"mappings":"AACE;EAEE,2BAAA;EACA,kBAAA;
|
|
1
|
+
{"version":3,"sources":["QueriesNavigation.scss"],"names":[],"mappings":"AAAA;EACE,YAAA;AACF;AACE;EAEE,2BAAA;EACA,kBAAA;AAAJ","file":"QueriesNavigation.css","sourcesContent":[".qp-queries-navigation {\n height: 100%;\n\n &__empty,\n &__error {\n padding: var(--g-spacing-2);\n text-align: center;\n }\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["SavedQueries.scss"],"names":[],"mappings":"AAAA;EACE,YAAA;AACF","file":"SavedQueries.css","sourcesContent":[".qp-saved-queries {\n height: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QueryListComparisonConfig, QueryListEditingConfig, QueryListFilterConfig, QueryListItem, QueryListRowAction, QueryListRowRenderData, QueryListSearchConfig, QueryListVisibleFieldsConfig } from '../../types/queryList';
|
|
3
|
+
import { SavedQuery } from '../../types/savedQueries';
|
|
4
|
+
import './SavedQueries.scss';
|
|
5
|
+
export type SavedQueriesProps<T extends SavedQuery = SavedQuery> = {
|
|
6
|
+
className?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
search: QueryListSearchConfig;
|
|
10
|
+
filter?: QueryListFilterConfig;
|
|
11
|
+
items: QueryListItem<T>[];
|
|
12
|
+
selectedRowId?: T['id'];
|
|
13
|
+
editing?: QueryListEditingConfig<T>;
|
|
14
|
+
comparison?: QueryListComparisonConfig<T>;
|
|
15
|
+
visibleFields?: QueryListVisibleFieldsConfig<T>;
|
|
16
|
+
renderAuthor?: (item: T) => React.ReactNode;
|
|
17
|
+
renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;
|
|
18
|
+
getRowActions?: (item: T) => QueryListRowAction<T>[];
|
|
19
|
+
onListItemClick?: (item: QueryListItem<T>) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const SavedQueries: <T extends SavedQuery>({ title, logo, search, filter, items, selectedRowId, editing, comparison, visibleFields, renderAuthor, renderRowItem, getRowActions, onListItemClick, className, }: SavedQueriesProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SavedQueries = void 0;
|
|
7
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
8
|
+
require("core-js/modules/es.array.filter.js");
|
|
9
|
+
require("core-js/modules/es.iterator.constructor.js");
|
|
10
|
+
require("core-js/modules/es.iterator.filter.js");
|
|
11
|
+
require("core-js/modules/es.object.to-string.js");
|
|
12
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
13
|
+
require("core-js/modules/es.string.search.js");
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _bemCnLite = _interopRequireDefault(require("bem-cn-lite"));
|
|
16
|
+
var _modules = require("../../modules");
|
|
17
|
+
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
18
|
+
var _SavedQueryRowContent = require("./SavedQueryRowContent");
|
|
19
|
+
require("./SavedQueries.css");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
var block = (0, _bemCnLite.default)('qp-saved-queries');
|
|
23
|
+
var SavedQueries = exports.SavedQueries = function SavedQueries(_ref) {
|
|
24
|
+
var title = _ref.title,
|
|
25
|
+
logo = _ref.logo,
|
|
26
|
+
search = _ref.search,
|
|
27
|
+
filter = _ref.filter,
|
|
28
|
+
items = _ref.items,
|
|
29
|
+
selectedRowId = _ref.selectedRowId,
|
|
30
|
+
editing = _ref.editing,
|
|
31
|
+
comparison = _ref.comparison,
|
|
32
|
+
visibleFields = _ref.visibleFields,
|
|
33
|
+
renderAuthor = _ref.renderAuthor,
|
|
34
|
+
renderRowItem = _ref.renderRowItem,
|
|
35
|
+
getRowActions = _ref.getRowActions,
|
|
36
|
+
onListItemClick = _ref.onListItemClick,
|
|
37
|
+
className = _ref.className;
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_modules.QueriesList, {
|
|
39
|
+
className: block(null, className),
|
|
40
|
+
title: title || (0, _i18n.default)('title_saved'),
|
|
41
|
+
logo: logo,
|
|
42
|
+
search: search,
|
|
43
|
+
filter: filter,
|
|
44
|
+
items: items,
|
|
45
|
+
selectedRowId: selectedRowId,
|
|
46
|
+
visibleFields: visibleFields,
|
|
47
|
+
editing: editing,
|
|
48
|
+
comparison: comparison,
|
|
49
|
+
getRowActions: getRowActions,
|
|
50
|
+
renderRow: function renderRow(data) {
|
|
51
|
+
return renderRowItem ? renderRowItem(data) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_SavedQueryRowContent.SavedQueryRowContent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
52
|
+
renderAuthor: renderAuthor
|
|
53
|
+
}));
|
|
54
|
+
},
|
|
55
|
+
onListItemClick: onListItemClick
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
// #sourceMappingURL=SavedQueries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_bemCnLite","_modules","_i18n","_SavedQueryRowContent","_jsxRuntime","e","__esModule","default","block","cn","SavedQueries","exports","_ref","title","logo","search","filter","items","selectedRowId","editing","comparison","visibleFields","renderAuthor","renderRowItem","getRowActions","onListItemClick","className","_jsx","QueriesList","i18n","renderRow","data","SavedQueryRowContent","_objectSpread"],"sources":["SavedQueries.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'bem-cn-lite';\nimport {QueriesList} from '../../modules';\nimport {\n QueryListComparisonConfig,\n QueryListEditingConfig,\n QueryListFilterConfig,\n QueryListItem,\n QueryListRowAction,\n QueryListRowRenderData,\n QueryListSearchConfig,\n QueryListVisibleFieldsConfig,\n} from '../../types/queryList';\nimport {SavedQuery} from '../../types/savedQueries';\nimport i18n from './i18n';\nimport {SavedQueryRowContent} from './SavedQueryRowContent';\nimport './SavedQueries.scss';\n\nexport type SavedQueriesProps<T extends SavedQuery = SavedQuery> = {\n className?: string;\n title?: string;\n logo?: React.ReactNode;\n search: QueryListSearchConfig;\n filter?: QueryListFilterConfig;\n items: QueryListItem<T>[];\n selectedRowId?: T['id'];\n editing?: QueryListEditingConfig<T>;\n comparison?: QueryListComparisonConfig<T>;\n visibleFields?: QueryListVisibleFieldsConfig<T>;\n renderAuthor?: (item: T) => React.ReactNode;\n renderRowItem?: (data: QueryListRowRenderData<T>) => React.ReactNode;\n getRowActions?: (item: T) => QueryListRowAction<T>[];\n onListItemClick?: (item: QueryListItem<T>) => void;\n};\n\nconst block = cn('qp-saved-queries');\n\nexport const SavedQueries = <T extends SavedQuery>({\n title,\n logo,\n search,\n filter,\n items,\n selectedRowId,\n editing,\n comparison,\n visibleFields,\n renderAuthor,\n renderRowItem,\n getRowActions,\n onListItemClick,\n className,\n}: SavedQueriesProps<T>) => {\n return (\n <QueriesList\n className={block(null, className)}\n title={title || i18n('title_saved')}\n logo={logo}\n search={search}\n filter={filter}\n items={items}\n selectedRowId={selectedRowId}\n visibleFields={visibleFields}\n editing={editing}\n comparison={comparison}\n getRowActions={getRowActions}\n renderRow={(data) =>\n renderRowItem ? (\n renderRowItem(data)\n ) : (\n <SavedQueryRowContent {...data} renderAuthor={renderAuthor} />\n )\n }\n onListItemClick={onListItemClick}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAYA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AACAA,OAAA;AAA6B,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmB7B,IAAMG,KAAK,GAAG,IAAAC,kBAAE,EAAC,kBAAkB,CAAC;AAE7B,IAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,SAAfA,YAAYA,CAAAE,IAAA,EAeG;EAAA,IAdxBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IACNC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IACVC,aAAa,GAAAT,IAAA,CAAbS,aAAa;IACbC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACZC,aAAa,GAAAX,IAAA,CAAbW,aAAa;IACbC,aAAa,GAAAZ,IAAA,CAAbY,aAAa;IACbC,eAAe,GAAAb,IAAA,CAAfa,eAAe;IACfC,SAAS,GAAAd,IAAA,CAATc,SAAS;EAET,oBACI,IAAAC,eAAA,EAACC,oBAAW;IACRF,SAAS,EAAElB,KAAK,CAAC,IAAI,EAAEkB,SAAS,CAAE;IAClCb,KAAK,EAAEA,KAAK,IAAI,IAAAgB,aAAI,EAAC,aAAa,CAAE;IACpCf,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfC,MAAM,EAAEA,MAAO;IACfC,KAAK,EAAEA,KAAM;IACbC,aAAa,EAAEA,aAAc;IAC7BG,aAAa,EAAEA,aAAc;IAC7BF,OAAO,EAAEA,OAAQ;IACjBC,UAAU,EAAEA,UAAW;IACvBI,aAAa,EAAEA,aAAc;IAC7BM,SAAS,EAAE,SAAXA,SAASA,CAAGC,IAAI;MAAA,OACZR,aAAa,GACTA,aAAa,CAACQ,IAAI,CAAC,gBAEnB,IAAAJ,eAAA,EAACK,0CAAoB,MAAAC,sBAAA,MAAAA,sBAAA,MAAKF,IAAI;QAAET,YAAY,EAAEA;MAAa,EAAE,CAChE;IAAA,CACJ;IACDG,eAAe,EAAEA;EAAgB,CACpC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SavedQueries } from './SavedQueries';
|
|
3
|
+
declare const meta: Meta<typeof SavedQueries>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SavedQueries>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomAuthor: Story;
|
|
8
|
+
export declare const Empty: Story;
|