@databiosphere/findable-ui 4.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/lib/components/ComponentCreator/ComponentCreator.d.ts +4 -2
- package/lib/components/ComponentCreator/ComponentCreator.js +6 -8
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -3
- package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +1 -1
- package/lib/components/Detail/components/Table/common/utils.d.ts +2 -2
- package/lib/components/Detail/components/Table/components/TableBody/tableBody.d.ts +3 -3
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
- package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -4
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +2 -2
- package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +2 -1
- package/lib/components/Detail/components/Table/table.d.ts +3 -4
- package/lib/components/Detail/components/Table/table.js +2 -1
- package/lib/components/Filter/components/Filters/filters.d.ts +1 -1
- package/lib/components/Index/components/Cell/cell.d.ts +3 -0
- package/lib/components/Index/components/Cell/cell.js +3 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +3 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +3 -0
- package/lib/components/Index/components/NTag/nTag.d.ts +3 -0
- package/lib/components/Index/components/NTag/nTag.js +3 -0
- package/lib/components/Index/components/NTagCell/nTagCell.d.ts +6 -1
- package/lib/components/Index/components/NTagCell/nTagCell.js +6 -2
- package/lib/components/Layout/components/Outline/common/constants.d.ts +1 -1
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +1 -1
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.js +13 -1
- package/lib/components/Links/components/Link/link.d.ts +3 -1
- package/lib/components/Links/components/Link/link.js +4 -4
- package/lib/components/Table/common/gridTable.styles.js +8 -2
- package/lib/components/Table/common/utils.d.ts +19 -14
- package/lib/components/Table/common/utils.js +26 -11
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +3 -3
- package/lib/components/Table/components/PaginationSummary/paginationSummary.js +9 -8
- package/lib/components/Table/components/TableBody/tableBody.d.ts +3 -3
- package/lib/components/Table/components/TableCell/common/utils.d.ts +3 -3
- package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.d.ts +7 -0
- package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.js +55 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.d.ts +6 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.js +93 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.d.ts +5 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.js +16 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.d.ts +7 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.js +24 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.d.ts +9 -0
- package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.js +53 -0
- package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts +2 -2
- package/lib/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.d.ts +2 -2
- package/lib/components/Table/components/TableHead/tableHead.d.ts +3 -3
- package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +16 -0
- package/lib/components/Table/components/TableRow/tableRow.styles.js +22 -0
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
- package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +3 -2
- package/lib/components/Table/components/TableRows/tableRows.d.ts +3 -3
- package/lib/components/Table/components/TableRows/tableRows.js +3 -1
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.d.ts +2 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.js +12 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.d.ts +9 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.js +32 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.d.ts +6 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.js +35 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.d.ts +12 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.js +32 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.d.ts +5 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.js +50 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.d.ts +7 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.js +16 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.d.ts +5 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.js +17 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.d.ts +8 -0
- package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.js +14 -0
- package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.d.ts +3 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +3 -3
- package/lib/components/Table/components/TableToolbar/tableToolbar.js +9 -6
- package/lib/components/Table/features/RowPreview/constants.d.ts +2 -0
- package/lib/components/Table/features/RowPreview/constants.js +45 -0
- package/lib/components/Table/features/RowPreview/entities.d.ts +22 -0
- package/lib/components/Table/features/RowPreview/entities.js +2 -0
- package/lib/components/Table/features/RowPreview/utils.d.ts +33 -0
- package/lib/components/Table/features/RowPreview/utils.js +89 -0
- package/lib/components/Table/features/entities.d.ts +7 -0
- package/lib/components/Table/features/entities.js +2 -0
- package/lib/components/Table/table.d.ts +4 -12
- package/lib/components/Table/table.js +27 -39
- package/lib/components/TableCreator/common/entities.d.ts +1 -1
- package/lib/components/TableCreator/tableCreator.d.ts +2 -9
- package/lib/components/TableCreator/tableCreator.js +4 -4
- package/lib/components/common/Button/button.d.ts +1 -1
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.d.ts +7 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +17 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.d.ts +5 -0
- package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.js +17 -0
- package/lib/components/common/Drawer/components/drawer.styles.d.ts +5 -0
- package/lib/components/common/Drawer/components/drawer.styles.js +11 -0
- package/lib/components/common/Drawer/drawer.d.ts +7 -0
- package/lib/components/common/Drawer/drawer.js +24 -0
- package/lib/components/common/Grid/grid.d.ts +1 -1
- package/lib/components/common/Typography/common/entities.d.ts +2 -0
- package/lib/components/common/Typography/common/entities.js +2 -0
- package/lib/config/entities.d.ts +8 -26
- package/lib/providers/exploreState/entities.d.ts +3 -2
- package/lib/providers/exploreState/initializer/constants.js +1 -3
- package/lib/providers/exploreState/initializer/utils.js +2 -2
- package/lib/providers/exploreState/payloads/entities.d.ts +7 -11
- package/lib/providers/exploreState/utils.d.ts +12 -10
- package/lib/providers/exploreState/utils.js +20 -24
- package/lib/providers/exploreState.d.ts +12 -32
- package/lib/providers/exploreState.js +48 -36
- package/lib/styles/common/mixins/colors.d.ts +2 -1
- package/lib/styles/common/mixins/colors.js +3 -1
- package/lib/theme/common/components.js +11 -2
- package/lib/theme/common/palette.d.ts +3 -1
- package/lib/theme/common/palette.js +4 -1
- package/lib/views/ExploreView/exploreView.js +4 -6
- package/package.json +2 -2
- package/src/components/ComponentCreator/ComponentCreator.tsx +6 -1
- package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -4
- package/src/components/Detail/components/Table/common/utils.ts +2 -2
- package/src/components/Detail/components/Table/components/TableBody/tableBody.tsx +3 -3
- package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -7
- package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +10 -6
- package/src/components/Detail/components/Table/table.tsx +6 -3
- package/src/components/Filter/components/Filters/filters.tsx +1 -1
- package/src/components/Index/components/Cell/cell.tsx +4 -0
- package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +4 -0
- package/src/components/Index/components/NTag/nTag.tsx +4 -0
- package/src/components/Index/components/NTagCell/nTagCell.tsx +22 -3
- package/src/components/Layout/components/Outline/common/constants.ts +1 -1
- package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +18 -2
- package/src/components/Links/components/Link/link.tsx +15 -2
- package/src/components/Table/common/gridTable.styles.ts +8 -2
- package/src/components/Table/common/utils.ts +55 -24
- package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +3 -3
- package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +11 -9
- package/src/components/Table/components/TableBody/tableBody.tsx +3 -3
- package/src/components/Table/components/TableCell/common/utils.ts +3 -3
- package/src/components/Table/components/TableCell/components/BasicCell/basicCell.tsx +52 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.ts +11 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.tsx +86 -0
- package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.tsx +21 -0
- package/src/components/Table/components/TableCell/components/NTagCell/nTagCell.tsx +70 -0
- package/src/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.tsx +2 -3
- package/src/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.tsx +2 -3
- package/src/components/Table/components/TableHead/tableHead.tsx +3 -3
- package/src/components/Table/components/TableRow/tableRow.styles.ts +22 -0
- package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +8 -6
- package/src/components/Table/components/TableRows/tableRows.tsx +9 -6
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.ts +11 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.ts +31 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.tsx +52 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.ts +48 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.tsx +53 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.ts +12 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.tsx +25 -0
- package/src/components/Table/components/TableToolbar/components/RowPreview/rowPreview.tsx +19 -0
- package/src/components/Table/components/TableToolbar/components/RowSelection/rowSelection.tsx +3 -3
- package/src/components/Table/components/TableToolbar/tableToolbar.tsx +9 -4
- package/src/components/Table/features/RowPreview/constants.ts +65 -0
- package/src/components/Table/features/RowPreview/entities.ts +25 -0
- package/src/components/Table/features/RowPreview/utils.ts +93 -0
- package/src/components/Table/features/entities.ts +13 -0
- package/src/components/Table/table.tsx +41 -51
- package/src/components/TableCreator/common/entities.ts +1 -1
- package/src/components/TableCreator/tableCreator.tsx +15 -22
- package/src/components/common/Button/button.tsx +1 -2
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.ts +12 -0
- package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +27 -0
- package/src/components/common/Drawer/components/drawer.styles.ts +6 -0
- package/src/components/common/Drawer/drawer.tsx +21 -0
- package/src/components/common/Grid/grid.tsx +1 -3
- package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +1 -2
- package/src/components/common/Typography/common/entities.ts +5 -0
- package/src/config/entities.ts +8 -38
- package/src/providers/exploreState/entities.ts +7 -2
- package/src/providers/exploreState/initializer/constants.ts +1 -3
- package/src/providers/exploreState/initializer/utils.ts +3 -3
- package/src/providers/exploreState/payloads/entities.ts +8 -18
- package/src/providers/exploreState/utils.ts +25 -36
- package/src/providers/exploreState.tsx +95 -69
- package/src/styles/common/mixins/colors.ts +4 -1
- package/src/theme/common/components.ts +12 -0
- package/src/theme/common/palette.ts +4 -5
- package/src/theme/theme.ts +1 -2
- package/src/views/ExploreView/exploreView.tsx +3 -25
- package/types/data-explorer-ui.d.ts +21 -2
- package/src/hooks/useEntityListRelatedView.ts +0 -78
|
@@ -44,6 +44,7 @@ const pagination_1 = require("./components/Pagination/pagination");
|
|
|
44
44
|
const tableBody_1 = require("./components/TableBody/tableBody");
|
|
45
45
|
const tableHead_1 = require("./components/TableHead/tableHead");
|
|
46
46
|
const tableToolbar_1 = require("./components/TableToolbar/tableToolbar");
|
|
47
|
+
const constants_2 = require("./features/RowPreview/constants");
|
|
47
48
|
const table_styles_1 = require("./table.styles");
|
|
48
49
|
/**
|
|
49
50
|
* This table can be Controlled or Uncontrolled based on the set of props passed to it.
|
|
@@ -55,21 +56,21 @@ const table_styles_1 = require("./table.styles");
|
|
|
55
56
|
* @param tableProps.initialState - Initial table state.
|
|
56
57
|
* @param tableProps.items - Row data to display.
|
|
57
58
|
* @param tableProps.listView - List view configuration.
|
|
58
|
-
* @param tableProps.total - Total number of rows in the result set.
|
|
59
59
|
* @returns Configured table element for display.
|
|
60
60
|
*/
|
|
61
|
-
const TableComponent = ({ columns, getRowId, initialState, items, listView,
|
|
61
|
+
const TableComponent = ({ columns, getRowId, initialState, items, listView, }) => {
|
|
62
62
|
const tabletDown = (0, useBreakpointHelper_1.useBreakpointHelper)(useBreakpointHelper_1.BREAKPOINT_FN_NAME.DOWN, breakpoints_1.TABLET);
|
|
63
63
|
const exploreMode = (0, useExploreMode_1.useExploreMode)();
|
|
64
64
|
const { exploreDispatch, exploreState } = (0, useExploreState_1.useExploreState)();
|
|
65
|
-
const { entityPageState, filterState,
|
|
65
|
+
const { entityPageState, filterState, listItems, loading, paginationState, rowPreview, tabValue, } = exploreState;
|
|
66
66
|
const { columnsVisibility, enableRowSelection, rowSelection, sorting } = entityPageState[tabValue];
|
|
67
|
-
const { currentPage, pages, pageSize } = paginationState;
|
|
68
|
-
const { disablePagination = false } = listView || {};
|
|
67
|
+
const { currentPage, pages, pageSize, rows: pageCount } = paginationState;
|
|
68
|
+
const { disablePagination = false, enableRowPreview = false } = listView || {};
|
|
69
69
|
const clientFiltering = (0, utils_1.isClientFilteringEnabled)(exploreMode);
|
|
70
70
|
const rowDirection = tabletDown
|
|
71
71
|
? entities_2.ROW_DIRECTION.VERTICAL
|
|
72
72
|
: entities_2.ROW_DIRECTION.DEFAULT;
|
|
73
|
+
const pagination = (0, react_1.useMemo)(() => (0, utils_1.getTableStatePagination)(currentPage - 1, pageSize), [currentPage, pageSize]);
|
|
73
74
|
const onSortingChange = (updater) => {
|
|
74
75
|
exploreDispatch({
|
|
75
76
|
payload: typeof updater === "function" ? updater(sorting) : updater,
|
|
@@ -90,6 +91,12 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
90
91
|
type: exploreState_1.ExploreActionKind.UpdateColumnVisibility,
|
|
91
92
|
});
|
|
92
93
|
};
|
|
94
|
+
const onRowPreviewChange = (updater) => {
|
|
95
|
+
exploreDispatch({
|
|
96
|
+
payload: typeof updater === "function" ? updater(rowPreview) : updater,
|
|
97
|
+
type: exploreState_1.ExploreActionKind.UpdateRowPreview,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
93
100
|
const onRowSelectionChange = (updater) => {
|
|
94
101
|
exploreDispatch({
|
|
95
102
|
payload: typeof updater === "function" ? updater(rowSelection) : updater,
|
|
@@ -98,19 +105,19 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
98
105
|
};
|
|
99
106
|
const state = {
|
|
100
107
|
columnVisibility: columnsVisibility,
|
|
101
|
-
pagination
|
|
102
|
-
|
|
103
|
-
pageSize: disablePagination ? Number.MAX_SAFE_INTEGER : pageSize,
|
|
104
|
-
},
|
|
108
|
+
pagination,
|
|
109
|
+
rowPreview,
|
|
105
110
|
rowSelection,
|
|
106
111
|
sorting,
|
|
107
112
|
};
|
|
108
113
|
const tableInstance = (0, react_table_1.useReactTable)({
|
|
114
|
+
_features: [constants_2.ROW_PREVIEW],
|
|
109
115
|
columns,
|
|
110
116
|
data: items,
|
|
111
117
|
enableColumnFilters: true,
|
|
112
118
|
enableFilters: true,
|
|
113
|
-
enableMultiSort:
|
|
119
|
+
enableMultiSort: clientFiltering,
|
|
120
|
+
enableRowPreview,
|
|
114
121
|
enableRowSelection,
|
|
115
122
|
enableSorting: true,
|
|
116
123
|
enableSortingRemoval: false,
|
|
@@ -124,12 +131,13 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
124
131
|
getRowId,
|
|
125
132
|
getSortedRowModel: clientFiltering ? (0, react_table_1.getSortedRowModel)() : undefined,
|
|
126
133
|
initialState,
|
|
127
|
-
manualPagination:
|
|
134
|
+
manualPagination: true,
|
|
128
135
|
manualSorting: !clientFiltering,
|
|
129
136
|
onColumnVisibilityChange,
|
|
137
|
+
onRowPreviewChange,
|
|
130
138
|
onRowSelectionChange,
|
|
131
139
|
onSortingChange,
|
|
132
|
-
pageCount
|
|
140
|
+
pageCount,
|
|
133
141
|
state,
|
|
134
142
|
});
|
|
135
143
|
const { getAllColumns, getRowModel, getState, getVisibleFlatColumns, nextPage: tableNextPage, previousPage: tablePreviousPage, } = tableInstance;
|
|
@@ -155,7 +163,6 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
155
163
|
[entities_1.EVENT_PARAM.PAGINATION_DIRECTION]: entities_1.PAGINATION_DIRECTION.NEXT,
|
|
156
164
|
});
|
|
157
165
|
}
|
|
158
|
-
// const nextPage = pagination?.nextPage ?? tableNextPage;
|
|
159
166
|
nextPage();
|
|
160
167
|
scrollTop();
|
|
161
168
|
};
|
|
@@ -176,26 +183,17 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
176
183
|
previousPage();
|
|
177
184
|
scrollTop();
|
|
178
185
|
};
|
|
179
|
-
// Sets
|
|
180
|
-
// - `columnFilters` state is "cleared" for related view, and
|
|
181
|
-
// - `columnFilters` state is "set" for all other views.
|
|
186
|
+
// Sets react table column filters `columnFilters` state - for client-side filtering only - with update of filterState.
|
|
182
187
|
(0, react_1.useEffect)(() => {
|
|
183
188
|
if (clientFiltering) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
tableInstance.setColumnFilters(filterState.map(({ categoryKey, value }) => ({
|
|
189
|
-
id: categoryKey,
|
|
190
|
-
value,
|
|
191
|
-
})));
|
|
192
|
-
}
|
|
189
|
+
tableInstance.setColumnFilters(filterState.map(({ categoryKey, value }) => ({
|
|
190
|
+
id: categoryKey,
|
|
191
|
+
value,
|
|
192
|
+
})));
|
|
193
193
|
}
|
|
194
|
-
}, [clientFiltering, filterState,
|
|
194
|
+
}, [clientFiltering, filterState, tableInstance]);
|
|
195
195
|
// Process explore response - client-side filtering only.
|
|
196
196
|
(0, react_1.useEffect)(() => {
|
|
197
|
-
if (isRelatedView)
|
|
198
|
-
return;
|
|
199
197
|
if (!listItems || listItems.length === 0)
|
|
200
198
|
return;
|
|
201
199
|
if (clientFiltering) {
|
|
@@ -214,26 +212,16 @@ const TableComponent = ({ columns, getRowId, initialState, items, listView, tota
|
|
|
214
212
|
clientFiltering,
|
|
215
213
|
columnFilters,
|
|
216
214
|
exploreDispatch,
|
|
217
|
-
isRelatedView,
|
|
218
215
|
listItems,
|
|
219
216
|
results,
|
|
220
217
|
]);
|
|
221
|
-
// Unmount - reset entity view to "exact".
|
|
222
|
-
(0, react_1.useEffect)(() => {
|
|
223
|
-
return () => {
|
|
224
|
-
exploreDispatch({
|
|
225
|
-
payload: exploreState_1.ENTITY_VIEW.EXACT,
|
|
226
|
-
type: exploreState_1.ExploreActionKind.ToggleEntityView,
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
}, [exploreDispatch]);
|
|
230
218
|
function canNextPage() {
|
|
231
219
|
return currentPage < pages;
|
|
232
220
|
}
|
|
233
221
|
function canPreviousPage() {
|
|
234
222
|
return currentPage > 1;
|
|
235
223
|
}
|
|
236
|
-
return noResults ? (react_1.default.createElement(noResults_1.NoResults, { Paper: paper_styles_1.FluidPaper, title: "No Results found" })) : (react_1.default.createElement(paper_styles_1.FluidPaper,
|
|
224
|
+
return noResults ? (react_1.default.createElement(noResults_1.NoResults, { Paper: paper_styles_1.FluidPaper, title: "No Results found" })) : (react_1.default.createElement(paper_styles_1.FluidPaper, { variant: "table" },
|
|
237
225
|
react_1.default.createElement(paper_styles_1.GridPaper, null,
|
|
238
226
|
react_1.default.createElement(tableToolbar_1.TableToolbar, { listView: listView, rowDirection: rowDirection, tableInstance: tableInstance }),
|
|
239
227
|
react_1.default.createElement(material_1.TableContainer, null,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnSort } from "@tanstack/react-table";
|
|
3
|
-
import { CoreOptions } from "@tanstack/table-core";
|
|
4
|
-
import { Pagination } from "../../common/entities";
|
|
2
|
+
import { ColumnSort, CoreOptions } from "@tanstack/react-table";
|
|
5
3
|
import { ColumnConfig, ListViewConfig } from "../../config/entities";
|
|
6
4
|
export interface TableCreatorProps<T> {
|
|
7
5
|
columns: ColumnConfig<T>[];
|
|
@@ -10,10 +8,5 @@ export interface TableCreatorProps<T> {
|
|
|
10
8
|
items: T[];
|
|
11
9
|
listView?: ListViewConfig;
|
|
12
10
|
loading?: boolean;
|
|
13
|
-
pageCount?: number;
|
|
14
|
-
pages: number;
|
|
15
|
-
pageSize: number;
|
|
16
|
-
pagination?: Pagination;
|
|
17
|
-
total?: number;
|
|
18
11
|
}
|
|
19
|
-
export declare const TableCreator: <T extends
|
|
12
|
+
export declare const TableCreator: <T extends unknown>({ columns, defaultSort, getRowId, items, listView, loading, }: TableCreatorProps<T>) => JSX.Element;
|
|
@@ -35,8 +35,8 @@ const table_1 = require("../Table/table");
|
|
|
35
35
|
const constants_1 = require("./common/constants");
|
|
36
36
|
const utils_2 = require("./common/utils");
|
|
37
37
|
const tableCreator_styles_1 = require("./tableCreator.styles");
|
|
38
|
-
const createCell = (config) => function CellCreator(
|
|
39
|
-
return (react_1.default.createElement(ComponentCreator_1.ComponentCreator, { components: [config.componentConfig], response: row.original }));
|
|
38
|
+
const createCell = (config) => function CellCreator(cellContext) {
|
|
39
|
+
return (react_1.default.createElement(ComponentCreator_1.ComponentCreator, { components: [config.componentConfig], response: cellContext.row.original, viewContext: { cellContext } }));
|
|
40
40
|
};
|
|
41
41
|
const createHeaderSelectionCell = () => function CellCreator({ table }) {
|
|
42
42
|
return react_1.default.createElement(headSelectionCell_1.HeadSelectionCell, { tableInstance: table });
|
|
@@ -44,7 +44,7 @@ const createHeaderSelectionCell = () => function CellCreator({ table }) {
|
|
|
44
44
|
const createRowSelectionCell = () => function CellCreator({ row }) {
|
|
45
45
|
return react_1.default.createElement(rowSelectionCell_1.RowSelectionCell, { row: row });
|
|
46
46
|
};
|
|
47
|
-
const TableCreator = ({ columns, defaultSort, getRowId, items, listView, loading,
|
|
47
|
+
const TableCreator = ({ columns, defaultSort, getRowId, items, listView, loading, }) => {
|
|
48
48
|
const columnDefs = (0, react_1.useMemo)(() => columns.reduce((acc, columnConfig) => {
|
|
49
49
|
acc.push(Object.assign(Object.assign({}, (0, utils_2.buildBaseColumnDef)(columnConfig)), { cell: createCell(columnConfig), filterFn: utils_1.arrIncludesSome, sortingFn: utils_1.sortingFn }));
|
|
50
50
|
return acc;
|
|
@@ -54,6 +54,6 @@ const TableCreator = ({ columns, defaultSort, getRowId, items, listView, loading
|
|
|
54
54
|
const initialState = (0, utils_1.getInitialState)(columns, defaultSort);
|
|
55
55
|
return (react_1.default.createElement(tableCreator_styles_1.TableCreator, null,
|
|
56
56
|
react_1.default.createElement(loading_1.Loading, { appear: false, loading: loading || false, panelStyle: paper_1.PAPER_PANEL_STYLE.FLUID }),
|
|
57
|
-
react_1.default.createElement(table_1.Table, { columns: columnDefs,
|
|
57
|
+
react_1.default.createElement(table_1.Table, { columns: columnDefs, getRowId: getRowId, initialState: initialState, items: items, listView: listView, loading: loading })));
|
|
58
58
|
};
|
|
59
59
|
exports.TableCreator = TableCreator;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DrawerTitle = void 0;
|
|
7
|
+
const CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const drawerTitle_styles_1 = require("./drawerTitle.styles");
|
|
11
|
+
const DrawerTitle = ({ className, onClose, title, }) => {
|
|
12
|
+
return (react_1.default.createElement(drawerTitle_styles_1.DrawerTitle, { className: className },
|
|
13
|
+
title,
|
|
14
|
+
onClose && (react_1.default.createElement(material_1.IconButton, { color: "ink", edge: "end", onClick: onClose, size: "xsmall" },
|
|
15
|
+
react_1.default.createElement(CloseRounded_1.default, { color: "inkLight", fontSize: "small" })))));
|
|
16
|
+
};
|
|
17
|
+
exports.DrawerTitle = DrawerTitle;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DrawerTitle: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DrawerTitle = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
exports.DrawerTitle = styled_1.default.div `
|
|
9
|
+
align-items: center;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
padding: 14px 24px;
|
|
13
|
+
|
|
14
|
+
.MuiIconButton-root {
|
|
15
|
+
margin-right: -12px;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DrawerContent: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DrawerContent = void 0;
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
exports.DrawerContent = styled_1.default.div `
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overscroll-behavior: none;
|
|
11
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DrawerProps as MDrawerProps } from "@mui/material";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface DrawerProps extends MDrawerProps {
|
|
4
|
+
children?: ReactNode | ReactNode[];
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Drawer: ({ children, className, onClose, open, ...props }: DrawerProps) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Drawer = void 0;
|
|
18
|
+
const material_1 = require("@mui/material");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const Drawer = (_a) => {
|
|
21
|
+
var { children, className, onClose, open } = _a, props = __rest(_a, ["children", "className", "onClose", "open"]) /* Spread props to allow for Mui Drawer specific prop overrides e.g. "hideBackdrop". */;
|
|
22
|
+
return (react_1.default.createElement(material_1.Drawer, Object.assign({ className: className, onClose: onClose, open: open }, props), children));
|
|
23
|
+
};
|
|
24
|
+
exports.Drawer = Drawer;
|
package/lib/config/entities.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TabProps as MTabProps, Theme, ThemeOptions } from "@mui/material";
|
|
2
|
-
import { ColumnSort } from "@tanstack/react-table";
|
|
2
|
+
import { CellContext, ColumnSort, RowData } from "@tanstack/react-table";
|
|
3
3
|
import { JSXElementConstructor, ReactNode } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { SelectCategoryValueView, SelectedFilter } from "../common/entities";
|
|
5
5
|
import { HeroTitle } from "../components/common/Title/title";
|
|
6
6
|
import { FooterProps } from "../components/Layout/components/Footer/footer";
|
|
7
7
|
import { HeaderProps } from "../components/Layout/components/Header/header";
|
|
@@ -91,7 +91,7 @@ export interface ComponentConfig<T extends keyof JSX.IntrinsicElements | JSXElem
|
|
|
91
91
|
children?: ComponentConfig[];
|
|
92
92
|
component: React.FC<React.ComponentProps<T>>;
|
|
93
93
|
props?: React.ComponentProps<T>;
|
|
94
|
-
viewBuilder?: (model: D, viewContext?: ViewContext) => React.ComponentProps<T>;
|
|
94
|
+
viewBuilder?: (model: D, viewContext?: ViewContext<D>) => React.ComponentProps<T>;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Type to determine the array of components that will be created on using @see ComponentCreator.
|
|
@@ -210,9 +210,10 @@ export interface ListConfig<T = any> {
|
|
|
210
210
|
export interface ListViewConfig {
|
|
211
211
|
disablePagination?: boolean;
|
|
212
212
|
enableDownload?: boolean;
|
|
213
|
+
enableRowPreview?: boolean;
|
|
213
214
|
enableRowSelection?: boolean;
|
|
214
215
|
listHero?: ComponentsConfig;
|
|
215
|
-
|
|
216
|
+
rowPreviewView?: ComponentsConfig;
|
|
216
217
|
rowSelectionView?: ComponentsConfig;
|
|
217
218
|
subTitleHero?: ComponentsConfig;
|
|
218
219
|
}
|
|
@@ -244,13 +245,9 @@ export interface Override {
|
|
|
244
245
|
supersededBy?: string;
|
|
245
246
|
withdrawn?: boolean;
|
|
246
247
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Related search function.
|
|
249
|
-
*/
|
|
250
|
-
declare type RelatedSearchFunction = (searchKey: CategoryKey | undefined, resultKey: CategoryKey | undefined, selectedCategoryValues: SelectedFilterValue | undefined) => Promise<RelatedSearchResult | undefined>;
|
|
251
248
|
export interface SavedFilter {
|
|
252
249
|
filters: SelectedFilter[];
|
|
253
|
-
|
|
250
|
+
sorting?: ColumnSort[];
|
|
254
251
|
title: string;
|
|
255
252
|
}
|
|
256
253
|
/**
|
|
@@ -282,22 +279,6 @@ interface TrackingConfig {
|
|
|
282
279
|
trackFilterApplied?: TrackFilterAppliedFunction;
|
|
283
280
|
trackFilterOpened?: TrackFilterOpenedFunction;
|
|
284
281
|
}
|
|
285
|
-
/**
|
|
286
|
-
* Product of the related search function.
|
|
287
|
-
*/
|
|
288
|
-
export interface RelatedSearchResult {
|
|
289
|
-
resultKey: CategoryKey;
|
|
290
|
-
searchKey: CategoryKey;
|
|
291
|
-
values: string[];
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Related view configuration.
|
|
295
|
-
*/
|
|
296
|
-
export interface RelatedViewConfig {
|
|
297
|
-
relatedSearchFn: RelatedSearchFunction;
|
|
298
|
-
resultKey: CategoryKey;
|
|
299
|
-
searchKey: CategoryKey;
|
|
300
|
-
}
|
|
301
282
|
/**
|
|
302
283
|
* Interface that will hold the whole configuration for a given site.
|
|
303
284
|
*/
|
|
@@ -373,8 +354,9 @@ export declare type ThemeOptionsFn = (theme: Theme) => ThemeOptions;
|
|
|
373
354
|
/**
|
|
374
355
|
* View context.
|
|
375
356
|
*/
|
|
376
|
-
export interface ViewContext {
|
|
357
|
+
export interface ViewContext<T extends RowData, TData = unknown> {
|
|
377
358
|
authState: Pick<AuthContextProps, "authenticationStatus" | "isAuthenticated">;
|
|
359
|
+
cellContext?: CellContext<T, TData>;
|
|
378
360
|
entityConfig: EntityConfig;
|
|
379
361
|
exploreState: ExploreState;
|
|
380
362
|
fileManifestState: FileManifestState;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ColumnSort, RowSelectionState } from "@tanstack/react-table";
|
|
2
|
-
import { VisibilityState } from "@tanstack/table-core/src/features/Visibility";
|
|
1
|
+
import { ColumnSort, RowSelectionState, VisibilityState } from "@tanstack/react-table";
|
|
3
2
|
import { CategoryValueKey, SelectCategory, SelectCategoryView, SelectedFilter } from "../../common/entities";
|
|
3
|
+
import { RowPreviewState } from "../../components/Table/features/RowPreview/entities";
|
|
4
4
|
import { CategoryConfig, CategoryGroup, CategoryGroupConfig, EntityPath, SavedFilter } from "../../config/entities";
|
|
5
5
|
export interface EntityPageState {
|
|
6
6
|
categoryGroupConfigKey: CategoryGroupConfigKey;
|
|
7
7
|
columnsVisibility: VisibilityState;
|
|
8
8
|
enableRowSelection: boolean;
|
|
9
|
+
rowPreview: RowPreviewState;
|
|
9
10
|
rowSelection: RowSelectionState;
|
|
10
11
|
sorting: ColumnSort[];
|
|
11
12
|
}
|
|
@@ -30,11 +30,9 @@ exports.INITIAL_STATE = {
|
|
|
30
30
|
featureFlagState: undefined,
|
|
31
31
|
filterCount: 0,
|
|
32
32
|
filterState: [],
|
|
33
|
-
isRelatedView: false,
|
|
34
33
|
listItems: [],
|
|
35
|
-
listView: undefined,
|
|
36
34
|
loading: true,
|
|
37
35
|
paginationState: exports.DEFAULT_PAGINATION_STATE,
|
|
38
|
-
|
|
36
|
+
rowPreview: undefined,
|
|
39
37
|
tabValue: "",
|
|
40
38
|
};
|
|
@@ -48,8 +48,7 @@ function buildSavedFilterByCategoryValueKey(savedFilters) {
|
|
|
48
48
|
if (!savedFilters)
|
|
49
49
|
return;
|
|
50
50
|
const savedFilterByCategoryValueKey = new Map();
|
|
51
|
-
for (const { filters,
|
|
52
|
-
const sorting = sort ? [sort] : undefined;
|
|
51
|
+
for (const { filters, sorting, title } of savedFilters) {
|
|
53
52
|
savedFilterByCategoryValueKey.set(title, { filters, sorting, title });
|
|
54
53
|
}
|
|
55
54
|
return savedFilterByCategoryValueKey;
|
|
@@ -114,6 +113,7 @@ function initEntityPageState(config) {
|
|
|
114
113
|
categoryGroupConfigKey: initCategoryGroupConfigKey(config, entity),
|
|
115
114
|
columnsVisibility: initColumnVisibility(entity),
|
|
116
115
|
enableRowSelection: Boolean((_a = entity.listView) === null || _a === void 0 ? void 0 : _a.enableRowSelection),
|
|
116
|
+
rowPreview: undefined,
|
|
117
117
|
rowSelection: {},
|
|
118
118
|
sorting: (0, utils_2.getDefaultSorting)(entity),
|
|
119
119
|
} });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColumnSort, RowSelectionState, VisibilityState } from "@tanstack/react-table";
|
|
2
2
|
import { CategoryKey, CategoryValueKey, PaginationDirectionType, SelectCategory, SelectedFilter } from "../../../common/entities";
|
|
3
|
-
import {
|
|
3
|
+
import { RowPreviewState } from "../../../components/Table/features/RowPreview/entities";
|
|
4
|
+
import { ListItems, PaginationResponse } from "../../exploreState";
|
|
4
5
|
import { ListItem } from "../entities";
|
|
5
6
|
/**
|
|
6
7
|
* Apply saved filter payload.
|
|
@@ -30,20 +31,10 @@ export interface ProcessExploreResponsePayload {
|
|
|
30
31
|
paginationResponse: PaginationResponse;
|
|
31
32
|
selectCategories?: SelectCategory[];
|
|
32
33
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Process related response payload
|
|
35
|
-
*/
|
|
36
|
-
export interface ProcessRelatedResponsePayload {
|
|
37
|
-
relatedListItems: RelatedListItems;
|
|
38
|
-
}
|
|
39
34
|
/**
|
|
40
35
|
* Reset explore response payload.
|
|
41
36
|
*/
|
|
42
37
|
export declare type ResetExploreResponsePayload = undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Toggle entity view payload.
|
|
45
|
-
*/
|
|
46
|
-
export declare type ToggleEntityViewPayload = ENTITY_VIEW;
|
|
47
38
|
/**
|
|
48
39
|
* Update column visibility payload.
|
|
49
40
|
*/
|
|
@@ -54,6 +45,7 @@ export declare type UpdateColumnVisibilityPayload = VisibilityState;
|
|
|
54
45
|
export interface UpdateEntityFiltersPayload {
|
|
55
46
|
entityListType: string;
|
|
56
47
|
filters: SelectedFilter[];
|
|
48
|
+
sorting?: ColumnSort[];
|
|
57
49
|
}
|
|
58
50
|
/**
|
|
59
51
|
* Update entity view access payload.
|
|
@@ -69,6 +61,10 @@ export interface UpdateFilterPayload {
|
|
|
69
61
|
selected: boolean;
|
|
70
62
|
selectedValue: CategoryValueKey;
|
|
71
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Update row preview payload.
|
|
66
|
+
*/
|
|
67
|
+
export declare type UpdateRowPreviewPayload = RowPreviewState;
|
|
72
68
|
/**
|
|
73
69
|
* Update row selection payload.
|
|
74
70
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnSort } from "@tanstack/react-table";
|
|
2
2
|
import { CategoryKey, CategoryValueKey, SelectedFilter } from "../../common/entities";
|
|
3
|
+
import { RowPreviewState } from "../../components/Table/features/RowPreview/entities";
|
|
3
4
|
import { ExploreState, ListItems, PaginationState } from "../exploreState";
|
|
4
5
|
import { CategoryGroupConfigKey, EntityPageState, EntityPageStateMapper, EntityState, EntityStateSavedFilter, ListItem } from "./entities";
|
|
5
6
|
/**
|
|
@@ -18,6 +19,13 @@ export declare function buildEntityStateSavedFilterState(categoryKey: CategoryKe
|
|
|
18
19
|
* @returns new selected filters.
|
|
19
20
|
*/
|
|
20
21
|
export declare function buildNextSavedFilterState(state: ExploreState, selectedValue: CategoryValueKey, selected: boolean): SelectedFilter[];
|
|
22
|
+
/**
|
|
23
|
+
* Closes row preview, if row preview is enabled.
|
|
24
|
+
* If row preview is enabled, the row preview state value is set to false.
|
|
25
|
+
* @param rowPreview - Row preview state.
|
|
26
|
+
* @returns row preview state with row preview value set to false.
|
|
27
|
+
*/
|
|
28
|
+
export declare function closeRowPreview(rowPreview: RowPreviewState): RowPreviewState;
|
|
21
29
|
/**
|
|
22
30
|
* Returns the category group config key for the current entity.
|
|
23
31
|
* @param entityPath - Entity path.
|
|
@@ -67,13 +75,6 @@ export declare function patchEntityListItems(listItems: ListItems, updatedListIt
|
|
|
67
75
|
* @returns a reset pagination state.
|
|
68
76
|
*/
|
|
69
77
|
export declare function resetPage(paginationState: PaginationState): PaginationState;
|
|
70
|
-
/**
|
|
71
|
-
* Resets row selection for the current entity and entities that share the same category group config key.
|
|
72
|
-
* @param state - Explore state.
|
|
73
|
-
* @param categoryGroupConfigKey - Category group config key.
|
|
74
|
-
* @returns entity page state mapper with row selection reset.
|
|
75
|
-
*/
|
|
76
|
-
export declare function resetRowSelection(state: ExploreState, categoryGroupConfigKey?: string): EntityPageStateMapper;
|
|
77
78
|
/**
|
|
78
79
|
* Updates entity page state for the given entity path.
|
|
79
80
|
* @param entityPath - Entity path.
|
|
@@ -84,12 +85,13 @@ export declare function resetRowSelection(state: ExploreState, categoryGroupConf
|
|
|
84
85
|
export declare function updateEntityPageState(entityPath: string, // entityListType.
|
|
85
86
|
entityPageState: EntityPageStateMapper, nextEntityPageState: Partial<EntityPageState>): EntityPageStateMapper;
|
|
86
87
|
/**
|
|
87
|
-
* Updates entity page state
|
|
88
|
+
* Updates entity page state for the current entity and entities that share the same category group config key.
|
|
88
89
|
* @param state - Explore state.
|
|
89
|
-
* @param
|
|
90
|
+
* @param nextEntityPageState - Partial next entity page state.
|
|
91
|
+
* @param categoryGroupConfigKey - Category group config key.
|
|
90
92
|
* @returns entity page state.
|
|
91
93
|
*/
|
|
92
|
-
export declare function
|
|
94
|
+
export declare function updateEntityPageStateWithCommonCategoryGroupConfigKey(state: ExploreState, nextEntityPageState: Partial<EntityPageState>, categoryGroupConfigKey?: string): EntityPageStateMapper;
|
|
93
95
|
/**
|
|
94
96
|
* Updates entity state by category group config key.
|
|
95
97
|
* @param state - Explore state.
|