@databiosphere/findable-ui 3.1.0 → 4.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 (83) hide show
  1. package/lib/components/Detail/components/DetailViewTable/detailViewTable.d.ts +3 -2
  2. package/lib/components/Detail/components/DetailViewTable/detailViewTable.js +14 -2
  3. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +4 -1
  4. package/lib/components/Detail/components/Table/components/TableRows/tableRows.d.ts +1 -1
  5. package/lib/components/Detail/components/Table/components/TableRows/tableRows.js +21 -2
  6. package/lib/components/Detail/components/Table/table.d.ts +3 -1
  7. package/lib/components/Detail/components/Table/table.js +3 -7
  8. package/lib/components/Links/common/constants.d.ts +1 -0
  9. package/lib/components/Links/common/constants.js +4 -0
  10. package/lib/components/Links/common/entities.d.ts +8 -0
  11. package/lib/components/Links/common/utils.d.ts +13 -0
  12. package/lib/components/Links/common/utils.js +21 -1
  13. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.d.ts +7 -0
  14. package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.js +148 -0
  15. package/lib/components/Links/components/Link/link.d.ts +2 -2
  16. package/lib/components/Links/components/Link/link.js +22 -6
  17. package/lib/components/Table/common/gridTable.styles.js +9 -1
  18. package/lib/components/Table/common/utils.d.ts +6 -0
  19. package/lib/components/Table/common/utils.js +10 -1
  20. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.d.ts +4 -3
  21. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.js +21 -3
  22. package/lib/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.js +4 -0
  23. package/lib/components/Table/components/TableHead/tableHead.js +4 -1
  24. package/lib/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -1
  25. package/lib/components/TableCreator/common/utils.js +1 -5
  26. package/lib/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.d.ts +3 -0
  27. package/lib/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.js +25 -0
  28. package/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.d.ts +3 -0
  29. package/lib/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.js +25 -0
  30. package/lib/components/common/Progress/components/CircularProgress/circularProgress.d.ts +7 -0
  31. package/lib/components/common/Progress/components/CircularProgress/circularProgress.js +28 -0
  32. package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.d.ts +5 -0
  33. package/lib/components/common/Progress/components/CircularProgress/circularProgress.styles.js +11 -0
  34. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.d.ts +7 -0
  35. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.js +44 -0
  36. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.d.ts +3 -0
  37. package/lib/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.js +32 -0
  38. package/lib/providers/exploreState/initializer/constants.d.ts +2 -0
  39. package/lib/providers/exploreState/initializer/constants.js +7 -1
  40. package/lib/providers/exploreState/initializer/utils.js +1 -8
  41. package/lib/providers/exploreState/payloads/entities.d.ts +8 -1
  42. package/lib/providers/exploreState/utils.d.ts +4 -2
  43. package/lib/providers/exploreState/utils.js +4 -4
  44. package/lib/providers/exploreState.d.ts +10 -2
  45. package/lib/providers/exploreState.js +13 -0
  46. package/lib/styles/common/mixins/colors.d.ts +3 -3
  47. package/lib/styles/common/mixins/colors.js +7 -7
  48. package/lib/theme/common/components.d.ts +6 -0
  49. package/lib/theme/common/components.js +31 -1
  50. package/lib/theme/theme.js +1 -0
  51. package/package.json +1 -1
  52. package/src/components/Detail/components/DetailViewTable/detailViewTable.tsx +4 -2
  53. package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +6 -1
  54. package/src/components/Detail/components/Table/components/TableRows/tableRows.tsx +29 -6
  55. package/src/components/Detail/components/Table/table.tsx +6 -1
  56. package/src/components/Links/common/constants.ts +1 -0
  57. package/src/components/Links/common/entities.ts +11 -0
  58. package/src/components/Links/common/utils.ts +28 -0
  59. package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +172 -0
  60. package/src/components/Links/components/Link/link.tsx +36 -14
  61. package/src/components/Table/common/gridTable.styles.ts +9 -1
  62. package/src/components/Table/common/utils.ts +9 -0
  63. package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.styles.ts +4 -0
  64. package/src/components/Table/components/TableCell/components/CollapsableCell/collapsableCell.tsx +26 -4
  65. package/src/components/Table/components/TableHead/tableHead.tsx +32 -21
  66. package/src/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +5 -1
  67. package/src/components/TableCreator/common/utils.ts +1 -0
  68. package/src/components/common/CustomIcon/components/AddLinkIcon/addLinkIcon.tsx +18 -0
  69. package/src/components/common/CustomIcon/components/UnLinkIcon/unLinkIcon.tsx +18 -0
  70. package/src/components/common/Progress/components/CircularProgress/circularProgress.styles.ts +6 -0
  71. package/src/components/common/Progress/components/CircularProgress/circularProgress.tsx +26 -0
  72. package/src/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.styles.ts +33 -0
  73. package/src/components/common/Progress/components/CircularProgress/components/CircularProgressTrack/circularProgressTrack.tsx +23 -0
  74. package/src/providers/exploreState/initializer/constants.ts +8 -0
  75. package/src/providers/exploreState/initializer/utils.ts +6 -9
  76. package/src/providers/exploreState/payloads/entities.ts +8 -0
  77. package/src/providers/exploreState/utils.ts +11 -7
  78. package/src/providers/exploreState.tsx +33 -0
  79. package/src/styles/common/mixins/colors.ts +6 -6
  80. package/src/theme/common/components.ts +32 -0
  81. package/src/theme/theme.ts +1 -0
  82. package/types/data-explorer-ui.d.ts +12 -0
  83. package/src/components/Detail/components/Table/components/TableHead/tableHead.tsx +0 -34
@@ -0,0 +1,18 @@
1
+ import { SvgIcon } from "@mui/material";
2
+ import React from "react";
3
+ import { CustomSVGIconProps } from "../../common/entities";
4
+
5
+ export const UnLinkIcon = ({
6
+ fontSize = "xsmall",
7
+ viewBox = "0 0 18 18",
8
+ ...props /* Spread props to allow for Mui SvgIconProps specific prop overrides e.g. "htmlColor". */
9
+ }: CustomSVGIconProps): JSX.Element => {
10
+ return (
11
+ <SvgIcon fontSize={fontSize} viewBox={viewBox} {...props}>
12
+ <path
13
+ d="M11.4561 9.52501L10.2373 8.325H11.0196C11.2123 8.325 11.3738 8.38968 11.5042 8.51905C11.6346 8.64843 11.6998 8.80875 11.6998 9C11.6998 9.11245 11.6748 9.21253 11.6248 9.30001C11.5748 9.38749 11.5123 9.46246 11.4373 9.52501H11.4561ZM14.8873 15.825C14.7498 15.9625 14.5904 16.0312 14.4092 16.0312C14.2279 16.0312 14.0685 15.9625 13.9311 15.825L2.15605 4.06874C2.01856 3.93124 1.94981 3.77187 1.94981 3.59062C1.94981 3.40937 2.01856 3.25 2.15605 3.11249C2.29355 2.97499 2.45293 2.90625 2.63418 2.90625C2.81543 2.90625 2.97481 2.97499 3.1123 3.11249L14.8873 14.8875C15.0248 15.025 15.0935 15.1812 15.0935 15.3562C15.0935 15.5313 15.0248 15.6875 14.8873 15.825ZM5.3998 12.6C4.4038 12.6 3.5548 12.249 2.8528 11.547C2.1508 10.845 1.7998 9.99598 1.7998 9C1.7998 8.20087 2.03731 7.48855 2.51231 6.86305C2.9873 6.23768 3.6623 5.74374 4.53731 5.38125L5.8498 6.75H5.41855C4.78105 6.75 4.24356 6.96874 3.80606 7.40625C3.36856 7.84375 3.1498 8.37499 3.1498 9C3.1498 9.625 3.36856 10.1563 3.80606 10.5938C4.24356 11.0313 4.77481 11.25 5.3998 11.25H7.4248C7.61605 11.25 7.77636 11.3143 7.90575 11.4429C8.03512 11.5715 8.0998 11.7309 8.0998 11.9211C8.0998 12.1112 8.03512 12.2719 7.90575 12.4031C7.77636 12.5343 7.61605 12.6 7.4248 12.6H5.3998ZM6.97274 9.67495C6.78661 9.67495 6.62793 9.61069 6.49668 9.48208C6.36543 9.35347 6.2998 9.19408 6.2998 9.00391C6.2998 8.81381 6.3645 8.65312 6.49387 8.52187C6.62325 8.39062 6.78355 8.325 6.9748 8.325H7.34981L8.68105 9.67495H6.97274ZM13.6686 11.775C13.5686 11.625 13.5342 11.4594 13.5654 11.2781C13.5966 11.0969 13.6873 10.9563 13.8373 10.8562C14.1498 10.6437 14.3967 10.375 14.5779 10.05C14.7592 9.72499 14.8498 9.37498 14.8498 9C14.8498 8.37499 14.631 7.84375 14.1935 7.40625C13.756 6.96874 13.2248 6.75 12.5998 6.75H10.5748C10.3836 6.75 10.2233 6.68568 10.0938 6.55705C9.96451 6.42844 9.8998 6.26905 9.8998 6.07893C9.8998 5.8888 9.96451 5.72812 10.0938 5.59687C10.2233 5.46563 10.3836 5.4 10.5748 5.4H12.5998C13.5958 5.4 14.4448 5.751 15.1468 6.453C15.8488 7.155 16.1998 8.00399 16.1998 9C16.1998 9.6034 16.0561 10.1667 15.7685 10.69C15.4811 11.2133 15.0873 11.6375 14.5873 11.9625C14.4373 12.0625 14.2716 12.0937 14.0904 12.0563C13.9092 12.0187 13.7685 11.925 13.6686 11.775Z"
14
+ fill="currentColor"
15
+ />
16
+ </SvgIcon>
17
+ );
18
+ };
@@ -0,0 +1,6 @@
1
+ import styled from "@emotion/styled";
2
+
3
+ export const ProgressPositioner = styled.div`
4
+ display: flex;
5
+ position: relative; /* positions track */
6
+ `;
@@ -0,0 +1,26 @@
1
+ import {
2
+ CircularProgress as MCircularProgress,
3
+ CircularProgressProps as MCircularProgressProps,
4
+ } from "@mui/material";
5
+ import React, { ElementType } from "react";
6
+ import { ProgressPositioner } from "./circularProgress.styles";
7
+ import { CircularProgressTrack } from "./components/CircularProgressTrack/circularProgressTrack";
8
+
9
+ export interface CircularProgressProps extends MCircularProgressProps {
10
+ className?: string;
11
+ Track?: ElementType<CircularProgressProps>;
12
+ }
13
+
14
+ export const CircularProgress = ({
15
+ className,
16
+ value,
17
+ Track = CircularProgressTrack,
18
+ ...props /* Spread props to allow for CircularProgress specific props e.g. "disableShrink". */
19
+ }: CircularProgressProps): JSX.Element => {
20
+ return (
21
+ <ProgressPositioner className={className}>
22
+ <Track {...props} />
23
+ <MCircularProgress value={value} {...props} />
24
+ </ProgressPositioner>
25
+ );
26
+ };
@@ -0,0 +1,33 @@
1
+ import styled from "@emotion/styled";
2
+ import { CircularProgress as MCircularProgress } from "@mui/material";
3
+ import {
4
+ alertLight,
5
+ infoLight,
6
+ smokeLight,
7
+ successLight,
8
+ warningLight,
9
+ } from "../../../../../../../styles/common/mixins/colors";
10
+
11
+ export const CircularProgress = styled(MCircularProgress)`
12
+ color: ${smokeLight};
13
+ left: 0;
14
+ position: absolute;
15
+ top: 0;
16
+ z-index: 0;
17
+
18
+ &.MuiCircularProgress-colorAlert {
19
+ color: ${alertLight};
20
+ }
21
+
22
+ &.MuiCircularProgress-colorInfo {
23
+ color: ${infoLight};
24
+ }
25
+
26
+ &.MuiCircularProgress-colorSuccess {
27
+ color: ${successLight};
28
+ }
29
+
30
+ &.MuiCircularProgress-colorWarning {
31
+ color: ${warningLight};
32
+ }
33
+ `;
@@ -0,0 +1,23 @@
1
+ import { CircularProgressProps as MCircularProgressProps } from "@mui/material";
2
+ import React, { Fragment } from "react";
3
+ import { CircularProgress } from "./circularProgressTrack.styles";
4
+
5
+ export interface CircularProgressTrackProps extends MCircularProgressProps {
6
+ className?: string;
7
+ track?: boolean;
8
+ }
9
+
10
+ export const CircularProgressTrack = ({
11
+ className,
12
+ track = true,
13
+ value = 100,
14
+ ...props /* Spread props to allow for CircularProgress specific props e.g. "disableShrink". */
15
+ }: CircularProgressTrackProps): JSX.Element => {
16
+ return (
17
+ <Fragment>
18
+ {track && (
19
+ <CircularProgress className={className} value={value} {...props} />
20
+ )}
21
+ </Fragment>
22
+ );
23
+ };
@@ -1,6 +1,14 @@
1
+ import { CategoryGroup } from "../../../config/entities";
1
2
  import { ExploreState, PaginationState } from "../../exploreState";
3
+ import { SELECT_CATEGORY_KEY } from "../constants";
2
4
  import { EntityState } from "../entities";
3
5
 
6
+ export const DEFAULT_CATEGORY_GROUP_SAVED_FILTERS: CategoryGroup = {
7
+ categoryConfigs: [
8
+ { key: SELECT_CATEGORY_KEY.SAVED_FILTERS, label: "Saved Filters" },
9
+ ],
10
+ };
11
+
4
12
  export const DEFAULT_ENTITY_STATE: EntityState = {
5
13
  categoryViews: [],
6
14
  filterState: [],
@@ -20,7 +20,11 @@ import {
20
20
  SavedFilterByCategoryValueKey,
21
21
  } from "../entities";
22
22
  import { getEntityCategoryGroupConfigKey, getFilterCount } from "../utils";
23
- import { DEFAULT_ENTITY_STATE, INITIAL_STATE } from "./constants";
23
+ import {
24
+ DEFAULT_CATEGORY_GROUP_SAVED_FILTERS,
25
+ DEFAULT_ENTITY_STATE,
26
+ INITIAL_STATE,
27
+ } from "./constants";
24
28
 
25
29
  /**
26
30
  * Builds category groups from the given category group config (adds the saved filters category to the category groups).
@@ -32,14 +36,7 @@ function buildCategoryGroups(
32
36
  ): CategoryGroup[] {
33
37
  const { categoryGroups, savedFilters } = categoryGroupConfig;
34
38
  if (!savedFilters) return categoryGroups;
35
- const clonedCategoryGroups = [...categoryGroups];
36
- const savedFiltersCategoryGroup: CategoryGroup = {
37
- categoryConfigs: [
38
- { key: SELECT_CATEGORY_KEY.SAVED_FILTERS, label: "Saved Filters" },
39
- ],
40
- };
41
- clonedCategoryGroups.unshift(savedFiltersCategoryGroup);
42
- return clonedCategoryGroups;
39
+ return [DEFAULT_CATEGORY_GROUP_SAVED_FILTERS, ...categoryGroups];
43
40
  }
44
41
 
45
42
  /**
@@ -8,6 +8,7 @@ import {
8
8
  CategoryValueKey,
9
9
  PaginationDirectionType,
10
10
  SelectCategory,
11
+ SelectedFilter,
11
12
  } from "../../../common/entities";
12
13
  import {
13
14
  ENTITY_VIEW,
@@ -71,6 +72,13 @@ export type ToggleEntityViewPayload = ENTITY_VIEW;
71
72
  */
72
73
  export type UpdateColumnVisibilityPayload = VisibilityState;
73
74
 
75
+ /**
76
+ * Update entity filters payload.
77
+ */
78
+ export interface UpdateEntityFiltersPayload {
79
+ entityListType: string;
80
+ filters: SelectedFilter[];
81
+ }
74
82
  /**
75
83
  * Update entity view access payload.
76
84
  */
@@ -158,13 +158,16 @@ export function resetPage(paginationState: PaginationState): PaginationState {
158
158
  /**
159
159
  * Resets row selection for the current entity and entities that share the same category group config key.
160
160
  * @param state - Explore state.
161
+ * @param categoryGroupConfigKey - Category group config key.
161
162
  * @returns entity page state mapper with row selection reset.
162
163
  */
163
- export function resetRowSelection(state: ExploreState): EntityPageStateMapper {
164
- const categoryGroupConfigKey = getEntityCategoryGroupConfigKey(
164
+ export function resetRowSelection(
165
+ state: ExploreState,
166
+ categoryGroupConfigKey = getEntityCategoryGroupConfigKey(
165
167
  state.tabValue,
166
168
  state.entityPageState
167
- );
169
+ )
170
+ ): EntityPageStateMapper {
168
171
  return Object.entries(state.entityPageState).reduce(
169
172
  (acc, [entityPath, entityPageState]) => {
170
173
  if (entityPageState.categoryGroupConfigKey === categoryGroupConfigKey) {
@@ -247,16 +250,17 @@ export function updateEntityPageStateSorting(
247
250
  * Updates entity state by category group config key.
248
251
  * @param state - Explore state.
249
252
  * @param nextEntityState - Partial next entity state.
253
+ * @param categoryGroupConfigKey - Category group config key.
250
254
  * @returns updated entity state by category group config key.
251
255
  */
252
256
  export function updateEntityStateByCategoryGroupConfigKey(
253
257
  state: ExploreState,
254
- nextEntityState: Partial<EntityState>
255
- ): void {
256
- const categoryGroupConfigKey = getEntityCategoryGroupConfigKey(
258
+ nextEntityState: Partial<EntityState>,
259
+ categoryGroupConfigKey = getEntityCategoryGroupConfigKey(
257
260
  state.tabValue,
258
261
  state.entityPageState
259
- );
262
+ )
263
+ ): void {
260
264
  const entityState = getEntityState(state, categoryGroupConfigKey);
261
265
  if (entityState) {
262
266
  setEntityStateByCategoryGroupConfigKey(categoryGroupConfigKey, state, {
@@ -36,6 +36,7 @@ import {
36
36
  ResetExploreResponsePayload,
37
37
  ToggleEntityViewPayload,
38
38
  UpdateColumnVisibilityPayload,
39
+ UpdateEntityFiltersPayload,
39
40
  UpdateEntityViewAccessPayload,
40
41
  UpdateFilterPayload,
41
42
  UpdateRowSelectionPayload,
@@ -239,6 +240,7 @@ export enum ExploreActionKind {
239
240
  SelectEntityType = "SELECT_ENTITY_TYPE",
240
241
  ToggleEntityView = "TOGGLE_ENTITY_VIEW",
241
242
  UpdateColumnVisibility = "UPDATE_COLUMN_VISIBILITY",
243
+ UpdateEntityFilters = "UPDATE_ENTITY_FILTERS",
242
244
  UpdateEntityViewAccess = "UPDATE_ENTITY_VIEW_ACCESS",
243
245
  UpdateFilter = "UPDATE_FILTER",
244
246
  UpdateRowSelection = "UPDATE_ROW_SELECTION",
@@ -260,6 +262,7 @@ export type ExploreAction =
260
262
  | SelectEntityTypeAction
261
263
  | ToggleEntityViewAction
262
264
  | UpdateColumnVisibilityAction
265
+ | UpdateEntityFiltersAction
263
266
  | UpdateEntityViewAccessAction
264
267
  | UpdateFilterAction
265
268
  | UpdateRowSelectionAction
@@ -353,6 +356,14 @@ type UpdateColumnVisibilityAction = {
353
356
  type: ExploreActionKind.UpdateColumnVisibility;
354
357
  };
355
358
 
359
+ /**
360
+ * Update entity filters action.
361
+ */
362
+ type UpdateEntityFiltersAction = {
363
+ payload: UpdateEntityFiltersPayload;
364
+ type: ExploreActionKind.UpdateEntityFilters;
365
+ };
366
+
356
367
  /**
357
368
  * Update entity view access action.
358
369
  */
@@ -586,6 +597,28 @@ function exploreReducer(
586
597
  ),
587
598
  };
588
599
  }
600
+ /**
601
+ * Update entity filters.
602
+ */
603
+ case ExploreActionKind.UpdateEntityFilters: {
604
+ const { entityListType, filters: filterState } = payload;
605
+ const categoryGroupConfigKey = getEntityCategoryGroupConfigKey(
606
+ entityListType,
607
+ state.entityPageState
608
+ );
609
+ updateEntityStateByCategoryGroupConfigKey(
610
+ state,
611
+ {
612
+ filterState,
613
+ savedFilterState: [], // Clear saved filter state.
614
+ },
615
+ categoryGroupConfigKey
616
+ );
617
+ return {
618
+ ...state,
619
+ entityPageState: resetRowSelection(state, categoryGroupConfigKey),
620
+ };
621
+ }
589
622
  /**
590
623
  * Update entity view access
591
624
  **/
@@ -2,6 +2,8 @@ import { CommonColors, PaletteColor } from "@mui/material/styles/createPalette";
2
2
  import { ThemeProps } from "../../../theme/theme";
3
3
 
4
4
  // Alert
5
+ export const alertLight = ({ theme }: ThemeProps): PaletteColor["light"] =>
6
+ theme.palette.alert.light;
5
7
  export const alertLightest = ({
6
8
  theme,
7
9
  }: ThemeProps): PaletteColor["lightest"] => theme.palette.alert.lightest;
@@ -13,8 +15,6 @@ export const errorMain = ({ theme }: ThemeProps): PaletteColor["main"] =>
13
15
  theme.palette.error.main;
14
16
 
15
17
  // Info
16
- export const infoDark = ({ theme }: ThemeProps): PaletteColor["dark"] =>
17
- theme.palette.info.dark;
18
18
  export const infoLight = ({ theme }: ThemeProps): PaletteColor["light"] =>
19
19
  theme.palette.info.light;
20
20
  export const infoLightest = ({ theme }: ThemeProps): PaletteColor["lightest"] =>
@@ -23,12 +23,8 @@ export const infoMain = ({ theme }: ThemeProps): PaletteColor["main"] =>
23
23
  theme.palette.info.main;
24
24
 
25
25
  // Ink
26
- export const inkDark = ({ theme }: ThemeProps): PaletteColor["dark"] =>
27
- theme.palette.ink.dark;
28
26
  export const inkLight = ({ theme }: ThemeProps): PaletteColor["light"] =>
29
27
  theme.palette.ink.light;
30
- export const inkLightest = ({ theme }: ThemeProps): PaletteColor["lightest"] =>
31
- theme.palette.ink.lightest;
32
28
  export const inkMain = ({ theme }: ThemeProps): PaletteColor["main"] =>
33
29
  theme.palette.ink.main;
34
30
 
@@ -50,6 +46,8 @@ export const smokeMain = ({ theme }: ThemeProps): PaletteColor["main"] =>
50
46
  theme.palette.smoke.main;
51
47
 
52
48
  // Success
49
+ export const successLight = ({ theme }: ThemeProps): PaletteColor["light"] =>
50
+ theme.palette.success.light;
53
51
  export const successLightest = ({
54
52
  theme,
55
53
  }: ThemeProps): PaletteColor["lightest"] => theme.palette.success.lightest;
@@ -57,6 +55,8 @@ export const successMain = ({ theme }: ThemeProps): PaletteColor["main"] =>
57
55
  theme.palette.success.main;
58
56
 
59
57
  // Warning
58
+ export const warningLight = ({ theme }: ThemeProps): PaletteColor["light"] =>
59
+ theme.palette.warning.light;
60
60
  export const warningLightest = ({
61
61
  theme,
62
62
  }: ThemeProps): PaletteColor["lightest"] => theme.palette.warning.lightest;
@@ -615,6 +615,33 @@ export const MuiChip = (theme: Theme): Components["MuiChip"] => {
615
615
  };
616
616
  };
617
617
 
618
+ /**
619
+ * MuiCircularProgress Component
620
+ * @param theme - Theme.
621
+ * @returns MuiCircularProgress component theme styles.
622
+ */
623
+ export const MuiCircularProgress = (
624
+ theme: Theme
625
+ ): Components["MuiCircularProgress"] => {
626
+ return {
627
+ styleOverrides: {
628
+ circle: {
629
+ strokeLinecap: "round",
630
+ },
631
+ },
632
+ variants: [
633
+ {
634
+ props: {
635
+ color: "alert",
636
+ },
637
+ style: {
638
+ color: theme.palette.alert.main,
639
+ },
640
+ },
641
+ ],
642
+ };
643
+ };
644
+
618
645
  /**
619
646
  * MuiCssBaseline Component
620
647
  * @param theme - Theme.
@@ -943,6 +970,11 @@ export const MuiLink: Components["MuiLink"] = {
943
970
  defaultProps: {
944
971
  underline: "hover",
945
972
  },
973
+ styleOverrides: {
974
+ root: {
975
+ cursor: "pointer",
976
+ },
977
+ },
946
978
  };
947
979
 
948
980
  /**
@@ -83,6 +83,7 @@ export function createAppTheme(customOptions?: ThemeOptions): Theme {
83
83
  MuiCard: C.MuiCard,
84
84
  MuiCheckbox: C.MuiCheckbox(theme),
85
85
  MuiChip: C.MuiChip(theme),
86
+ MuiCircularProgress: C.MuiCircularProgress(theme),
86
87
  MuiCssBaseline: C.MuiCssBaseline(theme),
87
88
  MuiDialog: C.MuiDialog(theme),
88
89
  MuiDialogActions: C.MuiDialogActions,
@@ -3,6 +3,7 @@ import type {} from "@mui/material/Alert";
3
3
  import type {} from "@mui/material/Button";
4
4
  import type {} from "@mui/material/Checkbox";
5
5
  import type {} from "@mui/material/Chip";
6
+ import type {} from "@mui/material/CircularProgress";
6
7
  import type {} from "@mui/material/IconButton";
7
8
  import type {} from "@mui/material/Paper";
8
9
  import type {} from "@mui/material/styles";
@@ -14,6 +15,7 @@ import type {} from "@mui/material/Tabs";
14
15
  import type {} from "@mui/material/Toolbar";
15
16
  import type {} from "@mui/material/Typography";
16
17
  import { RowData } from "@tanstack/react-table";
18
+ import type {} from "@tanstack/table-core";
17
19
  import { DataLayer } from "../src/common/analytics/entities";
18
20
  import { GridTrackSize } from "../src/config/entities";
19
21
 
@@ -54,6 +56,15 @@ declare module "@mui/material/Button" {
54
56
  }
55
57
  }
56
58
 
59
+ /**
60
+ * CircularProgress prop options.
61
+ */
62
+ declare module "@mui/material/CircularProgress" {
63
+ interface CircularProgressPropsColorOverrides {
64
+ alert: true;
65
+ }
66
+ }
67
+
57
68
  /**
58
69
  * Checkbox prop options.
59
70
  */
@@ -245,6 +256,7 @@ declare module "@tanstack/table-core" {
245
256
  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- TData and TValue are unused variables.
246
257
  interface ColumnMeta<TData extends RowData, TValue> {
247
258
  columnPinned?: boolean;
259
+ enableSortingInteraction?: boolean; // Flag to enable sorting interaction UI (e.g. sort icon) button; defaults to true.
248
260
  header?: string;
249
261
  width?: GridTrackSize;
250
262
  }
@@ -1,34 +0,0 @@
1
- import { TableCell, TableHead as MTableHead, TableRow } from "@mui/material";
2
- import { flexRender, Table } from "@tanstack/react-table";
3
- import React, { Fragment } from "react";
4
- import { ROW_DIRECTION } from "../../../../../Table/common/entities";
5
-
6
- export interface TableBodyProps<T> {
7
- rowDirection: ROW_DIRECTION;
8
- tableInstance: Table<T>;
9
- }
10
-
11
- export const TableHead = <T extends object>({
12
- rowDirection,
13
- tableInstance,
14
- }: TableBodyProps<T>): JSX.Element => {
15
- return (
16
- <Fragment>
17
- {rowDirection === ROW_DIRECTION.DEFAULT &&
18
- tableInstance.getHeaderGroups().map((headerGroup) => (
19
- <MTableHead key={headerGroup.id}>
20
- <TableRow>
21
- {headerGroup.headers.map((header) => (
22
- <TableCell key={header.id}>
23
- {flexRender(
24
- header.column.columnDef.header,
25
- header.getContext()
26
- )}
27
- </TableCell>
28
- ))}
29
- </TableRow>
30
- </MTableHead>
31
- ))}
32
- </Fragment>
33
- );
34
- };