@databiosphere/findable-ui 5.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.
Files changed (183) hide show
  1. package/README.md +5 -1
  2. package/lib/components/ComponentCreator/ComponentCreator.d.ts +4 -2
  3. package/lib/components/ComponentCreator/ComponentCreator.js +6 -8
  4. package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -3
  5. package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +1 -1
  6. package/lib/components/Detail/components/Table/common/utils.d.ts +2 -2
  7. package/lib/components/Detail/components/Table/components/TableBody/tableBody.d.ts +3 -3
  8. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
  9. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -4
  10. package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +2 -2
  11. package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +2 -1
  12. package/lib/components/Detail/components/Table/table.d.ts +3 -4
  13. package/lib/components/Detail/components/Table/table.js +2 -1
  14. package/lib/components/Filter/components/Filters/filters.d.ts +1 -1
  15. package/lib/components/Index/components/Cell/cell.d.ts +3 -0
  16. package/lib/components/Index/components/Cell/cell.js +3 -0
  17. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +3 -0
  18. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +3 -0
  19. package/lib/components/Index/components/NTag/nTag.d.ts +3 -0
  20. package/lib/components/Index/components/NTag/nTag.js +3 -0
  21. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +6 -1
  22. package/lib/components/Index/components/NTagCell/nTagCell.js +6 -2
  23. package/lib/components/Layout/components/Outline/common/constants.d.ts +1 -1
  24. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +1 -1
  25. package/lib/components/Links/components/Link/link.d.ts +3 -1
  26. package/lib/components/Links/components/Link/link.js +4 -4
  27. package/lib/components/Table/common/gridTable.styles.js +8 -2
  28. package/lib/components/Table/common/utils.d.ts +19 -14
  29. package/lib/components/Table/common/utils.js +26 -11
  30. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +3 -3
  31. package/lib/components/Table/components/PaginationSummary/paginationSummary.js +9 -8
  32. package/lib/components/Table/components/TableBody/tableBody.d.ts +3 -3
  33. package/lib/components/Table/components/TableCell/common/utils.d.ts +3 -3
  34. package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.d.ts +7 -0
  35. package/lib/components/Table/components/TableCell/components/BasicCell/basicCell.js +55 -0
  36. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.d.ts +6 -0
  37. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.js +93 -0
  38. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.d.ts +5 -0
  39. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.js +16 -0
  40. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.d.ts +7 -0
  41. package/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.js +24 -0
  42. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.d.ts +9 -0
  43. package/lib/components/Table/components/TableCell/components/NTagCell/nTagCell.js +53 -0
  44. package/lib/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.d.ts +2 -2
  45. package/lib/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.d.ts +2 -2
  46. package/lib/components/Table/components/TableHead/tableHead.d.ts +3 -3
  47. package/lib/components/Table/components/TableRow/tableRow.styles.d.ts +16 -0
  48. package/lib/components/Table/components/TableRow/tableRow.styles.js +22 -0
  49. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.d.ts +3 -3
  50. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +3 -2
  51. package/lib/components/Table/components/TableRows/tableRows.d.ts +3 -3
  52. package/lib/components/Table/components/TableRows/tableRows.js +3 -1
  53. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.d.ts +2 -0
  54. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.js +12 -0
  55. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.d.ts +9 -0
  56. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.js +32 -0
  57. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.d.ts +6 -0
  58. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.js +35 -0
  59. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.d.ts +12 -0
  60. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.js +32 -0
  61. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.d.ts +5 -0
  62. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.js +50 -0
  63. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.d.ts +7 -0
  64. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.js +16 -0
  65. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.d.ts +5 -0
  66. package/lib/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.js +17 -0
  67. package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.d.ts +8 -0
  68. package/lib/components/Table/components/TableToolbar/components/RowPreview/rowPreview.js +14 -0
  69. package/lib/components/Table/components/TableToolbar/components/RowSelection/rowSelection.d.ts +3 -3
  70. package/lib/components/Table/components/TableToolbar/tableToolbar.d.ts +3 -3
  71. package/lib/components/Table/components/TableToolbar/tableToolbar.js +9 -6
  72. package/lib/components/Table/features/RowPreview/constants.d.ts +2 -0
  73. package/lib/components/Table/features/RowPreview/constants.js +45 -0
  74. package/lib/components/Table/features/RowPreview/entities.d.ts +22 -0
  75. package/lib/components/Table/features/RowPreview/entities.js +2 -0
  76. package/lib/components/Table/features/RowPreview/utils.d.ts +33 -0
  77. package/lib/components/Table/features/RowPreview/utils.js +89 -0
  78. package/lib/components/Table/features/entities.d.ts +7 -0
  79. package/lib/components/Table/features/entities.js +2 -0
  80. package/lib/components/Table/table.d.ts +4 -12
  81. package/lib/components/Table/table.js +26 -38
  82. package/lib/components/TableCreator/common/entities.d.ts +1 -1
  83. package/lib/components/TableCreator/tableCreator.d.ts +2 -9
  84. package/lib/components/TableCreator/tableCreator.js +4 -4
  85. package/lib/components/common/Button/button.d.ts +1 -1
  86. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.d.ts +7 -0
  87. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.js +17 -0
  88. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.d.ts +5 -0
  89. package/lib/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.js +17 -0
  90. package/lib/components/common/Drawer/components/drawer.styles.d.ts +5 -0
  91. package/lib/components/common/Drawer/components/drawer.styles.js +11 -0
  92. package/lib/components/common/Drawer/drawer.d.ts +7 -0
  93. package/lib/components/common/Drawer/drawer.js +24 -0
  94. package/lib/components/common/Grid/grid.d.ts +1 -1
  95. package/lib/components/common/Typography/common/entities.d.ts +2 -0
  96. package/lib/components/common/Typography/common/entities.js +2 -0
  97. package/lib/config/entities.d.ts +7 -25
  98. package/lib/providers/exploreState/entities.d.ts +3 -2
  99. package/lib/providers/exploreState/initializer/constants.js +1 -3
  100. package/lib/providers/exploreState/initializer/utils.js +1 -0
  101. package/lib/providers/exploreState/payloads/entities.d.ts +6 -11
  102. package/lib/providers/exploreState/utils.d.ts +12 -10
  103. package/lib/providers/exploreState/utils.js +20 -24
  104. package/lib/providers/exploreState.d.ts +12 -32
  105. package/lib/providers/exploreState.js +47 -36
  106. package/lib/styles/common/mixins/colors.d.ts +2 -1
  107. package/lib/styles/common/mixins/colors.js +3 -1
  108. package/lib/theme/common/components.js +11 -2
  109. package/lib/theme/common/palette.d.ts +3 -1
  110. package/lib/theme/common/palette.js +4 -1
  111. package/lib/views/ExploreView/exploreView.js +4 -6
  112. package/package.json +2 -2
  113. package/src/components/ComponentCreator/ComponentCreator.tsx +6 -1
  114. package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -4
  115. package/src/components/Detail/components/Table/common/utils.ts +2 -2
  116. package/src/components/Detail/components/Table/components/TableBody/tableBody.tsx +3 -3
  117. package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -7
  118. package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +10 -6
  119. package/src/components/Detail/components/Table/table.tsx +6 -3
  120. package/src/components/Filter/components/Filters/filters.tsx +1 -1
  121. package/src/components/Index/components/Cell/cell.tsx +4 -0
  122. package/src/components/Index/components/NTag/components/Tooltip/tooltip.tsx +4 -0
  123. package/src/components/Index/components/NTag/nTag.tsx +4 -0
  124. package/src/components/Index/components/NTagCell/nTagCell.tsx +22 -3
  125. package/src/components/Layout/components/Outline/common/constants.ts +1 -1
  126. package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +1 -1
  127. package/src/components/Links/components/Link/link.tsx +15 -2
  128. package/src/components/Table/common/gridTable.styles.ts +8 -2
  129. package/src/components/Table/common/utils.ts +55 -24
  130. package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +3 -3
  131. package/src/components/Table/components/PaginationSummary/paginationSummary.tsx +11 -9
  132. package/src/components/Table/components/TableBody/tableBody.tsx +3 -3
  133. package/src/components/Table/components/TableCell/common/utils.ts +3 -3
  134. package/src/components/Table/components/TableCell/components/BasicCell/basicCell.tsx +52 -0
  135. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.styles.ts +11 -0
  136. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip.tsx +86 -0
  137. package/src/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag.tsx +21 -0
  138. package/src/components/Table/components/TableCell/components/NTagCell/nTagCell.tsx +70 -0
  139. package/src/components/Table/components/TableCell/components/RowSelectionCell/rowSelectionCell.tsx +2 -3
  140. package/src/components/Table/components/TableHead/components/HeadSelectionCell/headSelectionCell.tsx +2 -3
  141. package/src/components/Table/components/TableHead/tableHead.tsx +3 -3
  142. package/src/components/Table/components/TableRow/tableRow.styles.ts +22 -0
  143. package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +8 -6
  144. package/src/components/Table/components/TableRows/tableRows.tsx +9 -6
  145. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/common/constants.ts +11 -0
  146. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.styles.ts +31 -0
  147. package/src/components/Table/components/TableToolbar/components/RowPreview/components/RowDrawer/rowDrawer.tsx +52 -0
  148. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.styles.ts +48 -0
  149. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/components/RowDetail/rowDetail.tsx +53 -0
  150. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.styles.ts +12 -0
  151. package/src/components/Table/components/TableToolbar/components/RowPreview/components/Section/section.tsx +25 -0
  152. package/src/components/Table/components/TableToolbar/components/RowPreview/rowPreview.tsx +19 -0
  153. package/src/components/Table/components/TableToolbar/components/RowSelection/rowSelection.tsx +3 -3
  154. package/src/components/Table/components/TableToolbar/tableToolbar.tsx +9 -4
  155. package/src/components/Table/features/RowPreview/constants.ts +65 -0
  156. package/src/components/Table/features/RowPreview/entities.ts +25 -0
  157. package/src/components/Table/features/RowPreview/utils.ts +93 -0
  158. package/src/components/Table/features/entities.ts +13 -0
  159. package/src/components/Table/table.tsx +40 -50
  160. package/src/components/TableCreator/common/entities.ts +1 -1
  161. package/src/components/TableCreator/tableCreator.tsx +15 -22
  162. package/src/components/common/Button/button.tsx +1 -2
  163. package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.styles.ts +12 -0
  164. package/src/components/common/Drawer/components/DrawerTitle/drawerTitle.tsx +27 -0
  165. package/src/components/common/Drawer/components/drawer.styles.ts +6 -0
  166. package/src/components/common/Drawer/drawer.tsx +21 -0
  167. package/src/components/common/Grid/grid.tsx +1 -3
  168. package/src/components/common/Section/components/CollapsableSection/collapsableSection.tsx +1 -2
  169. package/src/components/common/Typography/common/entities.ts +5 -0
  170. package/src/config/entities.ts +7 -37
  171. package/src/providers/exploreState/entities.ts +7 -2
  172. package/src/providers/exploreState/initializer/constants.ts +1 -3
  173. package/src/providers/exploreState/initializer/utils.ts +2 -1
  174. package/src/providers/exploreState/payloads/entities.ts +7 -18
  175. package/src/providers/exploreState/utils.ts +25 -36
  176. package/src/providers/exploreState.tsx +93 -73
  177. package/src/styles/common/mixins/colors.ts +4 -1
  178. package/src/theme/common/components.ts +12 -0
  179. package/src/theme/common/palette.ts +4 -5
  180. package/src/theme/theme.ts +1 -2
  181. package/src/views/ExploreView/exploreView.tsx +3 -25
  182. package/types/data-explorer-ui.d.ts +21 -2
  183. package/src/hooks/useEntityListRelatedView.ts +0 -78
@@ -37,7 +37,6 @@ import {
37
37
  } from "../../hooks/useBreakpointHelper";
38
38
  import { useConfig } from "../../hooks/useConfig";
39
39
  import { useEntityList } from "../../hooks/useEntityList";
40
- import { useEntityListRelatedView } from "../../hooks/useEntityListRelatedView";
41
40
  import { useExploreState } from "../../hooks/useExploreState";
42
41
  import { useSummary } from "../../hooks/useSummary";
43
42
  import { ExploreActionKind, ExploreState } from "../../providers/exploreState";
@@ -72,18 +71,11 @@ export const ExploreView = (props: ExploreViewProps): JSX.Element => {
72
71
  const { entities, explorerTitle, summaryConfig, trackingConfig } = config;
73
72
  const { listView } = entityConfig;
74
73
  const { listHero, subTitleHero } = listView || {};
75
- const {
76
- categoryGroups,
77
- categoryViews,
78
- filterCount,
79
- isRelatedView,
80
- tabValue,
81
- } = exploreState;
74
+ const { categoryGroups, categoryViews, filterCount, tabValue } = exploreState;
82
75
  const { push } = useRouter();
83
76
  const tabs = getTabs(entities);
84
77
  const { response: summaryResponse } = useSummary(); // Fetch summary.
85
78
  useEntityList(props); // Fetch entities.
86
- useEntityListRelatedView(); // Fetch related entities.
87
79
  const { entityListType } = props;
88
80
  const categoryFilters = useMemo(
89
81
  () => buildCategoryFilters(categoryViews, categoryGroups),
@@ -194,7 +186,6 @@ export const ExploreView = (props: ExploreViewProps): JSX.Element => {
194
186
  <Filters
195
187
  categoryFilters={categoryFilters}
196
188
  closeAncestor={onCloseDrawer}
197
- disabled={isRelatedView}
198
189
  onFilter={onFilterChange.bind(null, false)}
199
190
  trackFilterOpened={trackingConfig?.trackFilterOpened}
200
191
  />
@@ -284,14 +275,7 @@ function renderList(
284
275
  entityConfig: EntityConfig,
285
276
  entityListType: string
286
277
  ): JSX.Element {
287
- const {
288
- isRelatedView,
289
- listItems,
290
- loading,
291
- paginationState,
292
- relatedListItems,
293
- tabValue,
294
- } = exploreState;
278
+ const { listItems, loading, tabValue } = exploreState;
295
279
  const { getId: getRowId, list, listView } = entityConfig;
296
280
  const { columns: columnsConfig, defaultSort } = list;
297
281
 
@@ -310,15 +294,9 @@ function renderList(
310
294
  columns={columnsConfig}
311
295
  defaultSort={defaultSort}
312
296
  getRowId={getRowId}
313
- items={
314
- isRelatedView && relatedListItems ? relatedListItems : listItems ?? []
315
- }
297
+ items={listItems ?? []}
316
298
  listView={listView}
317
299
  loading={loading}
318
- pages={paginationState.pages}
319
- pageSize={paginationState.pageSize}
320
- pagination={undefined}
321
- total={paginationState.rows}
322
300
  />
323
301
  );
324
302
  }
@@ -14,9 +14,16 @@ import type {} from "@mui/material/SvgIcon";
14
14
  import type {} from "@mui/material/Tabs";
15
15
  import type {} from "@mui/material/Toolbar";
16
16
  import type {} from "@mui/material/Typography";
17
+ import type {} from "@tanstack/react-table";
17
18
  import { RowData } from "@tanstack/react-table";
18
- import type {} from "@tanstack/table-core";
19
19
  import { DataLayer } from "../src/common/analytics/entities";
20
+ import {
21
+ CustomFeatureInitialTableState,
22
+ CustomFeatureInstance,
23
+ CustomFeatureOptions,
24
+ CustomFeatureRow,
25
+ CustomFeatureTableState,
26
+ } from "../src/components/Table/features/entities";
20
27
  import { GridTrackSize } from "../src/config/entities";
21
28
 
22
29
  /**
@@ -141,6 +148,7 @@ declare module "@mui/material/Paper" {
141
148
  menu: true;
142
149
  panel: true;
143
150
  searchbar: true;
151
+ table: true;
144
152
  }
145
153
  }
146
154
 
@@ -252,7 +260,7 @@ declare module "@emotion/react" {
252
260
  }
253
261
  }
254
262
 
255
- declare module "@tanstack/table-core" {
263
+ declare module "@tanstack/react-table" {
256
264
  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- TData and TValue are unused variables.
257
265
  interface ColumnMeta<TData extends RowData, TValue> {
258
266
  columnPinned?: boolean;
@@ -260,6 +268,17 @@ declare module "@tanstack/table-core" {
260
268
  header?: string;
261
269
  width?: GridTrackSize;
262
270
  }
271
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- empty interface is needed for extending.
272
+ interface InitialTableState extends CustomFeatureInitialTableState {}
273
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars -- empty interface is needed for extending, TData is an unused variable.
274
+ interface Row<TData extends RowData> extends CustomFeatureRow {}
275
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- empty interface is needed for extending.
276
+ interface Table<TData extends RowData> extends CustomFeatureInstance<TData> {}
277
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-unused-vars -- empty interface is needed for extending, TData is an unused variable.
278
+ interface TableOptionsResolved<TData extends RowData>
279
+ extends CustomFeatureOptions {}
280
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface -- empty interface is needed for extending.
281
+ interface TableState extends CustomFeatureTableState {}
263
282
  }
264
283
 
265
284
  /**
@@ -1,78 +0,0 @@
1
- import { useEffect } from "react";
2
- import { SelectedFilterValue } from "../common/entities";
3
- import { RelatedSearchResult } from "../config/entities";
4
- import {
5
- ExploreActionKind,
6
- ListItems,
7
- RelatedListItems,
8
- } from "../providers/exploreState";
9
- import { useAsync } from "./useAsync";
10
- import { useConfig } from "./useConfig";
11
- import { useExploreState } from "./useExploreState";
12
-
13
- /**
14
- * Returns related entity lists filtered by related search results.
15
- * @param listItems - Entity list items.
16
- * @param relatedSearchResult - Related search result.
17
- * @param excludedValues - Selected category values to be excluded from related entity lists.
18
- * @returns related entities.
19
- */
20
- export function buildRelatedEntityList(
21
- listItems: ListItems,
22
- relatedSearchResult: RelatedSearchResult | undefined,
23
- excludedValues: SelectedFilterValue | undefined
24
- ): RelatedListItems {
25
- if (relatedSearchResult) {
26
- const { resultKey, searchKey, values } = relatedSearchResult;
27
- return listItems?.filter((listItem) => {
28
- if (values.includes(listItem[resultKey].toLowerCase())) {
29
- return !excludedValues?.includes(listItem[searchKey]); // Exclude any row where any of the selected category values matches the corresponding row value.
30
- }
31
- });
32
- }
33
- }
34
-
35
- /**
36
- * Updates related entity list.
37
- */
38
- export const useEntityListRelatedView = (): void => {
39
- const { entityConfig } = useConfig();
40
- const { exploreDispatch, exploreState } = useExploreState();
41
- const { filterState, listItems } = exploreState;
42
- const { listView } = entityConfig;
43
- const relatedView = listView?.relatedView;
44
- const { relatedSearchFn, resultKey, searchKey } = relatedView || {};
45
- const { data: relatedSearchResult, run } = useAsync<
46
- RelatedSearchResult | undefined
47
- >();
48
- const selectedCategoryValues = filterState.find(
49
- ({ categoryKey }) => categoryKey === searchKey
50
- )?.value;
51
-
52
- useEffect(() => {
53
- if (relatedSearchFn) {
54
- run(relatedSearchFn(searchKey, resultKey, selectedCategoryValues));
55
- }
56
- }, [relatedSearchFn, resultKey, run, searchKey, selectedCategoryValues]);
57
-
58
- useEffect(() => {
59
- if (relatedSearchFn) {
60
- exploreDispatch({
61
- payload: {
62
- relatedListItems: buildRelatedEntityList(
63
- listItems,
64
- relatedSearchResult,
65
- selectedCategoryValues
66
- ),
67
- },
68
- type: ExploreActionKind.ProcessRelatedResponse,
69
- });
70
- }
71
- }, [
72
- exploreDispatch,
73
- listItems,
74
- relatedSearchFn,
75
- relatedSearchResult,
76
- selectedCategoryValues,
77
- ]);
78
- };