@databiosphere/findable-ui 13.0.1 → 14.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 (127) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/common/analytics/entities.d.ts +10 -7
  3. package/lib/common/analytics/entities.js +2 -3
  4. package/lib/components/Export/common/tracking.d.ts +12 -3
  5. package/lib/components/Export/common/tracking.js +23 -12
  6. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +1 -1
  7. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +2 -16
  8. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.js +6 -3
  9. package/lib/components/Export/components/ExportToTerra/exportToTerra.js +9 -1
  10. package/lib/components/Export/components/ManifestDownload/manifestDownload.js +7 -1
  11. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.d.ts +2 -2
  12. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.js +1 -1
  13. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.styles.js +0 -1
  14. package/lib/components/Links/components/Link/link.d.ts +2 -3
  15. package/lib/components/Links/components/Link/link.js +1 -2
  16. package/lib/components/common/Alert/alert.d.ts +4 -12
  17. package/lib/components/common/Alert/alert.js +5 -7
  18. package/lib/components/common/Alert/alert.styles.d.ts +1 -11
  19. package/lib/components/common/Alert/alert.styles.js +18 -24
  20. package/lib/components/common/Alert/constants.d.ts +2 -0
  21. package/lib/components/common/Alert/constants.js +27 -0
  22. package/lib/components/common/Alert/hooks/useTransition/types.d.ts +5 -0
  23. package/lib/components/common/Alert/hooks/useTransition/types.js +1 -0
  24. package/lib/components/common/Alert/hooks/useTransition/useTransition.d.ts +7 -0
  25. package/lib/components/common/Alert/hooks/useTransition/useTransition.js +20 -0
  26. package/lib/components/common/Banner/banner.d.ts +4 -7
  27. package/lib/components/common/Banner/banner.js +4 -3
  28. package/lib/components/common/Banner/banner.styles.d.ts +3 -0
  29. package/lib/components/common/Banner/banner.styles.js +28 -0
  30. package/lib/components/common/Banner/components/CookieBanner/constants.d.ts +2 -0
  31. package/lib/components/common/Banner/components/CookieBanner/constants.js +7 -0
  32. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.d.ts +3 -3
  33. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.js +17 -31
  34. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.d.ts +1 -1
  35. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.js +2 -16
  36. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.d.ts +3 -7
  37. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.js +6 -4
  38. package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.d.ts +3 -8
  39. package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.js +6 -8
  40. package/lib/components/common/Banner/components/SystemStatus/systemStatus.d.ts +3 -8
  41. package/lib/components/common/Banner/components/SystemStatus/systemStatus.js +6 -8
  42. package/lib/components/common/Banner/constants.d.ts +2 -0
  43. package/lib/components/common/Banner/constants.js +9 -0
  44. package/lib/components/common/Breadcrumbs/breadcrumbs.d.ts +2 -2
  45. package/lib/components/common/Breadcrumbs/breadcrumbs.js +3 -4
  46. package/lib/components/common/Paper/paper.styles.js +18 -12
  47. package/lib/components/types.d.ts +10 -0
  48. package/lib/components/types.js +1 -0
  49. package/lib/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
  50. package/lib/hooks/useLocalStorage/useLocalStorage.js +1 -1
  51. package/lib/styles/common/constants/size.d.ts +5 -0
  52. package/lib/styles/common/constants/size.js +6 -0
  53. package/lib/styles/common/mui/alert.d.ts +4 -0
  54. package/lib/styles/common/mui/alert.js +20 -0
  55. package/lib/styles/common/mui/icon.d.ts +2 -0
  56. package/lib/styles/common/mui/icon.js +6 -0
  57. package/lib/theme/common/components.d.ts +0 -12
  58. package/lib/theme/common/components.js +17 -157
  59. package/lib/theme/components/index.d.ts +2 -0
  60. package/lib/theme/components/index.js +2 -0
  61. package/lib/theme/components/muiAlert.d.ts +2 -0
  62. package/lib/theme/components/muiAlert.js +121 -0
  63. package/lib/theme/components/muiAlertTitle.d.ts +2 -0
  64. package/lib/theme/components/muiAlertTitle.js +12 -0
  65. package/lib/theme/theme.js +3 -2
  66. package/package.json +4 -4
  67. package/src/common/analytics/entities.ts +9 -6
  68. package/src/common/analytics/readme-analytics.md +9 -7
  69. package/src/components/Export/common/tracking.ts +26 -15
  70. package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +2 -30
  71. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.tsx +16 -18
  72. package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +11 -1
  73. package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +9 -1
  74. package/src/components/Layout/components/Header/components/Content/components/Logo/logo.styles.ts +0 -1
  75. package/src/components/Layout/components/Header/components/Content/components/Logo/logo.tsx +3 -2
  76. package/src/components/Links/components/Link/link.tsx +17 -16
  77. package/src/components/common/Alert/alert.styles.ts +22 -25
  78. package/src/components/common/Alert/alert.tsx +14 -35
  79. package/src/components/common/Alert/constants.ts +29 -0
  80. package/src/components/common/Alert/hooks/useTransition/types.ts +5 -0
  81. package/src/components/common/Alert/hooks/useTransition/useTransition.ts +25 -0
  82. package/src/components/common/Banner/banner.styles.ts +29 -0
  83. package/src/components/common/Banner/banner.tsx +11 -18
  84. package/src/components/common/Banner/components/CookieBanner/constants.ts +9 -0
  85. package/src/components/common/Banner/components/CookieBanner/cookieBanner.styles.ts +2 -16
  86. package/src/components/common/Banner/components/CookieBanner/cookieBanner.tsx +36 -64
  87. package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.tsx +12 -17
  88. package/src/components/common/Banner/components/SystemIndexing/systemIndexing.tsx +11 -22
  89. package/src/components/common/Banner/components/SystemStatus/systemStatus.tsx +11 -22
  90. package/src/components/common/Banner/constants.ts +11 -0
  91. package/src/components/common/Breadcrumbs/breadcrumbs.tsx +6 -10
  92. package/src/components/common/Paper/paper.styles.ts +18 -12
  93. package/src/components/types.ts +13 -0
  94. package/src/hooks/useLocalStorage/useLocalStorage.ts +2 -2
  95. package/src/styles/common/constants/size.ts +5 -0
  96. package/src/styles/common/mui/alert.ts +24 -0
  97. package/src/styles/common/mui/icon.ts +8 -0
  98. package/src/theme/common/components.ts +16 -159
  99. package/src/theme/components/index.ts +2 -0
  100. package/src/theme/components/muiAlert.ts +123 -0
  101. package/src/theme/components/muiAlertTitle.ts +14 -0
  102. package/src/theme/theme.ts +3 -2
  103. package/types/data-explorer-ui.d.ts +6 -5
  104. package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
  105. package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
  106. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
  107. package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
  108. package/lib/components/common/Alert/alert.stories.d.ts +0 -6
  109. package/lib/components/common/Alert/alert.stories.js +0 -36
  110. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
  111. package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
  112. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
  113. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
  114. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
  115. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
  116. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
  117. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
  118. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
  119. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
  120. package/src/components/Index/components/TitleCell/titleCell.styles.ts +0 -7
  121. package/src/components/Index/components/TitleCell/titleCell.tsx +0 -22
  122. package/src/components/common/Alert/alert.stories.tsx +0 -41
  123. package/src/components/common/Alert/components/AlertText/alertText.styles.ts +0 -20
  124. package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.ts +0 -20
  125. package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.tsx +0 -27
  126. package/src/components/common/Banner/components/DismissibleBanner/dismissibleBanner.tsx +0 -44
  127. package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.ts +0 -22
@@ -0,0 +1,121 @@
1
+ import { ErrorIcon } from "../../components/common/CustomIcon/components/ErrorIcon/errorIcon";
2
+ import { InfoIcon } from "../../components/common/CustomIcon/components/InfoIcon/infoIcon";
3
+ import { SuccessIcon } from "../../components/common/CustomIcon/components/SuccessIcon/successIcon";
4
+ import { WarningIcon } from "../../components/common/CustomIcon/components/WarningIcon/warningIcon";
5
+ import { SIZE } from "../../styles/common/constants/size";
6
+ import { COLOR, SEVERITY, VARIANT } from "../../styles/common/mui/alert";
7
+ import { FONT_SIZE } from "../../styles/common/mui/icon";
8
+ import { alpha32 } from "../common/palette";
9
+ import { TEXT_BODY_500 } from "../common/typography";
10
+ export const MuiAlert = (theme) => {
11
+ return {
12
+ defaultProps: {
13
+ elevation: 1,
14
+ iconMapping: {
15
+ error: ErrorIcon({ fontSize: FONT_SIZE.SMALL }),
16
+ info: InfoIcon({ fontSize: FONT_SIZE.SMALL }),
17
+ success: SuccessIcon({ fontSize: FONT_SIZE.SMALL }),
18
+ warning: WarningIcon({ fontSize: FONT_SIZE.SMALL }),
19
+ },
20
+ size: SIZE.MEDIUM,
21
+ },
22
+ styleOverrides: {
23
+ icon: {
24
+ opacity: 1,
25
+ padding: 0,
26
+ },
27
+ message: {
28
+ ...theme.typography[TEXT_BODY_500], // default size - "medium"
29
+ display: "grid",
30
+ gap: 4,
31
+ padding: 0,
32
+ },
33
+ root: {
34
+ alignItems: "flex-start",
35
+ borderRadius: 8,
36
+ color: theme.palette.ink.main,
37
+ padding: 16,
38
+ variants: [
39
+ {
40
+ props: { severity: SEVERITY.ERROR },
41
+ style: {
42
+ backgroundColor: theme.palette.alert.lightest,
43
+ border: `1px solid ${theme.palette.alert.main}${alpha32}`,
44
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
45
+ "& .MuiAlert-icon": {
46
+ color: theme.palette.alert.main,
47
+ },
48
+ },
49
+ },
50
+ {
51
+ props: { severity: SEVERITY.INFO },
52
+ style: {
53
+ backgroundColor: theme.palette.info.lightest,
54
+ border: `1px solid ${theme.palette.info.main}${alpha32}`,
55
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
56
+ "& .MuiAlert-icon": {
57
+ color: theme.palette.info.main,
58
+ },
59
+ },
60
+ },
61
+ {
62
+ props: { severity: SEVERITY.SUCCESS },
63
+ style: {
64
+ backgroundColor: theme.palette.success.lightest,
65
+ border: `1px solid ${theme.palette.success.main}${alpha32}`,
66
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
67
+ "& .MuiAlert-icon": {
68
+ color: theme.palette.success.main,
69
+ },
70
+ },
71
+ },
72
+ {
73
+ props: { severity: SEVERITY.WARNING },
74
+ style: {
75
+ backgroundColor: theme.palette.warning.lightest,
76
+ border: `1px solid ${theme.palette.warning.main}${alpha32}`,
77
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
78
+ "& .MuiAlert-icon": {
79
+ color: theme.palette.warning.main,
80
+ },
81
+ },
82
+ },
83
+ {
84
+ props: { color: COLOR.INK },
85
+ style: {
86
+ backgroundColor: theme.palette.ink.main,
87
+ color: theme.palette.common.white,
88
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
89
+ ".MuiLink-root": {
90
+ color: theme.palette.common.white,
91
+ },
92
+ },
93
+ },
94
+ {
95
+ props: { color: COLOR.PRIMARY },
96
+ style: {
97
+ backgroundColor: theme.palette.primary.main,
98
+ color: theme.palette.common.white,
99
+ // eslint-disable-next-line sort-keys -- disabling key order for readability
100
+ ".MuiLink-root": {
101
+ color: theme.palette.common.white,
102
+ },
103
+ },
104
+ },
105
+ {
106
+ props: { color: COLOR.SMOKE },
107
+ style: {
108
+ backgroundColor: theme.palette.smoke.light,
109
+ },
110
+ },
111
+ {
112
+ props: { variant: VARIANT.FILLED },
113
+ style: {
114
+ border: "none",
115
+ },
116
+ },
117
+ ],
118
+ },
119
+ },
120
+ };
121
+ };
@@ -0,0 +1,2 @@
1
+ import { Components } from "@mui/material";
2
+ export declare const MuiAlertTitle: Components["MuiAlertTitle"];
@@ -0,0 +1,12 @@
1
+ import { TEXT_BODY_500 } from "../common/typography";
2
+ export const MuiAlertTitle = {
3
+ defaultProps: {
4
+ gutterBottom: false,
5
+ variant: TEXT_BODY_500,
6
+ },
7
+ styleOverrides: {
8
+ root: {
9
+ margin: 0,
10
+ },
11
+ },
12
+ };
@@ -4,6 +4,7 @@ import * as C from "./common/components";
4
4
  import * as P from "./common/palette";
5
5
  import { shadows } from "./common/shadows";
6
6
  import * as T from "./common/typography";
7
+ import * as M from "./components";
7
8
  /**
8
9
  * Returns a generated theme with customization.
9
10
  * @param customOptions - Custom theme option overrides.
@@ -59,8 +60,8 @@ export function createAppTheme(customOptions) {
59
60
  MuiAccordion: C.MuiAccordion(theme),
60
61
  MuiAccordionDetails: C.MuiAccordionDetails,
61
62
  MuiAccordionSummary: C.MuiAccordionSummary,
62
- MuiAlert: C.MuiAlert(theme),
63
- MuiAlertTitle: C.MuiAlertTitle(theme),
63
+ MuiAlert: M.MuiAlert(theme),
64
+ MuiAlertTitle: M.MuiAlertTitle,
64
65
  MuiAppBar: C.MuiAppBar,
65
66
  MuiBackdrop: C.MuiBackdrop(theme),
66
67
  MuiBreadcrumbs: C.MuiBreadcrumbs(theme),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "13.0.1",
3
+ "version": "14.0.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "@commitlint/cli": "^17.4.2",
26
26
  "@commitlint/config-conventional": "^17.4.2",
27
- "@mui/types": "^7.2.16",
27
+ "@mui/types": "^7.2.18",
28
28
  "@next/eslint-plugin-next": "^14.1.0",
29
29
  "@storybook/addon-actions": "^7.6.17",
30
30
  "@storybook/addon-essentials": "^7.6.17",
@@ -67,8 +67,8 @@
67
67
  "peerDependencies": {
68
68
  "@emotion/react": "^11.13.3",
69
69
  "@emotion/styled": "^11.13.0",
70
- "@mui/icons-material": "^6.0.2",
71
- "@mui/material": "^6.0.2",
70
+ "@mui/icons-material": "^6.1.5",
71
+ "@mui/material": "^6.1.5",
72
72
  "@tanstack/react-table": "^8.19.2",
73
73
  "@tanstack/react-virtual": "^3.0.0-beta.59",
74
74
  "copy-to-clipboard": "3.3.1",
@@ -10,19 +10,18 @@ export enum EVENT_NAME {
10
10
  ENTITY_TABLE_PAGINATED = "entity_table_paginated",
11
11
  ENTITY_TABLE_SORTED = "entity_table_sorted",
12
12
  FILTER_SELECTED = "filter_selected",
13
+ INDEX_ANALYZE_IN_TERRA_REQUESTED = "index_analyze_in_terra_requested",
14
+ INDEX_FILE_MANIFEST_REQUESTED = "index_file_manifest_requested",
13
15
  }
14
16
 
15
17
  /**
16
18
  * Set of analytics event parameters.
17
19
  */
18
20
  export enum EVENT_PARAM {
19
- CATALOG = "catalog",
20
21
  COLUMN_NAME = "column_name",
21
- CURRENT_QUERY = "current_query",
22
22
  ENTITY_NAME = "entity_name",
23
23
  FILTER_NAME = "filter_name",
24
24
  FILTER_VALUE = "filter_value",
25
- INDEX = "index",
26
25
  PAGINATION_DIRECTION = "pagination_direction",
27
26
  SORT_DIRECTION = "sort_direction",
28
27
  TOOL_NAME = "tool_name",
@@ -49,9 +48,7 @@ export enum SORT_DIRECTION {
49
48
  */
50
49
  export type EventParams = {
51
50
  [EVENT_NAME.BULK_DOWNLOAD_REQUESTED]: {
52
- [EVENT_PARAM.CATALOG]: string;
53
- [EVENT_PARAM.CURRENT_QUERY]: string;
54
- [EVENT_PARAM.INDEX]: string;
51
+ [EVENT_PARAM.ENTITY_NAME]: string;
55
52
  [EVENT_PARAM.TOOL_NAME]: string;
56
53
  };
57
54
  [EVENT_NAME.ENTITY_SELECTED]: { [EVENT_PARAM.ENTITY_NAME]: string };
@@ -68,4 +65,10 @@ export type EventParams = {
68
65
  [EVENT_PARAM.FILTER_NAME]: string;
69
66
  [EVENT_PARAM.FILTER_VALUE]: string;
70
67
  };
68
+ [EVENT_NAME.INDEX_ANALYZE_IN_TERRA_REQUESTED]: {
69
+ [EVENT_PARAM.ENTITY_NAME]: string;
70
+ };
71
+ [EVENT_NAME.INDEX_FILE_MANIFEST_REQUESTED]: {
72
+ [EVENT_PARAM.ENTITY_NAME]: string;
73
+ };
71
74
  };
@@ -6,13 +6,15 @@ See below a list of the currently available events.
6
6
 
7
7
  ### GA4 Event Inventory
8
8
 
9
- | Event | Parameters | Description |
10
- | ------------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
11
- | `bulk_download_requested` | `catalog`, `current_query`, `index`, `tool_name` | Runs when the HCA-DCP "Request curl command" button is selected |
12
- | `entity_selected` | `entity_name` | Runs when an entity (tab) is selected |
13
- | `entity_table_paginated` | `entity_name`, `pagination_direction` | Runs when the page forward/backwards buttons are clicked |
14
- | `entity_table_sorted` | `entity_name`, `column_name`, `sort_direction` | Runs each time a column in the entity table is sorted |
15
- | `filter_selected` | `filter_name`, `filter_value` | Runs each time a filter is selected |
9
+ | Event | Parameters | Description |
10
+ | ---------------------------------- | ---------------------------------------------- | -------------------------------------------------------------- |
11
+ | `bulk_download_requested` | `entity_name`, `tool_name` | Runs when the index "Request curl command" button is selected |
12
+ | `index_analyze_in_terra_requested` | `entity_name` | Runs when the index "Analyze in Terra" button is selected |
13
+ | `index_file_manifest_requested` | `entity_name` | Runs when the index "Request File Manifest" button is selected |
14
+ | `entity_selected` | `entity_name` | Runs when an entity (tab) is selected |
15
+ | `entity_table_paginated` | `entity_name`, `pagination_direction` | Runs when the page forward/backwards buttons are clicked |
16
+ | `entity_table_sorted` | `entity_name`, `column_name`, `sort_direction` | Runs each time a column in the entity table is sorted |
17
+ | `filter_selected` | `filter_name`, `filter_value` | Runs each time a filter is selected |
16
18
 
17
19
  ### Tracking-related ID Inventory
18
20
 
@@ -3,27 +3,38 @@ import { EVENT_NAME, EVENT_PARAM } from "../../../common/analytics/entities";
3
3
 
4
4
  /**
5
5
  * Executes event tracking for bulk download.
6
- * @param index - Index.
6
+ * @param entity_name - Entity (tab) name.
7
7
  * @param toolName - Tool name.
8
- * @param requestParams - Request params.
9
8
  */
10
9
  export function bulkDownloadTracking(
11
- index: string,
12
- toolName: string,
13
- requestParams?: URLSearchParams
10
+ entity_name: string,
11
+ toolName: string
14
12
  ): void {
15
- if (!requestParams) {
16
- return;
17
- }
18
- // Grab catalog and current query from the request params.
19
- const catalog = requestParams.get("catalog") as string; // Catalog will be defined.
20
- const currentQuery = requestParams.get("filters") as string; // Filters will be defined.
21
-
22
13
  // Track the bulk download requested event.
23
14
  track(EVENT_NAME.BULK_DOWNLOAD_REQUESTED, {
24
- [EVENT_PARAM.CATALOG]: catalog,
25
- [EVENT_PARAM.CURRENT_QUERY]: currentQuery,
26
- [EVENT_PARAM.INDEX]: index,
15
+ [EVENT_PARAM.ENTITY_NAME]: entity_name,
27
16
  [EVENT_PARAM.TOOL_NAME]: toolName,
28
17
  });
29
18
  }
19
+
20
+ /**
21
+ * Executes event tracking for the file manifest export.
22
+ * @param entity_name - Entity (tab) name.
23
+ */
24
+ export function fileManifestTracking(entity_name: string): void {
25
+ // Track the file manifest requested event.
26
+ track(EVENT_NAME.INDEX_FILE_MANIFEST_REQUESTED, {
27
+ [EVENT_PARAM.ENTITY_NAME]: entity_name,
28
+ });
29
+ }
30
+
31
+ /**
32
+ * Executes event tracking for the Terra export.
33
+ * @param entity_name - Entity (tab) name.
34
+ */
35
+ export function exportToTerraTracking(entity_name: string): void {
36
+ // Track the export to terra event.
37
+ track(EVENT_NAME.INDEX_ANALYZE_IN_TERRA_REQUESTED, {
38
+ [EVENT_PARAM.ENTITY_NAME]: entity_name,
39
+ });
40
+ }
@@ -2,10 +2,7 @@ import React, { ElementType, useState } from "react";
2
2
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
3
3
  import { Filters } from "../../../../common/entities";
4
4
  import { useExploreState } from "../../../../hooks/useExploreState";
5
- import {
6
- FILE_MANIFEST_TYPE,
7
- FileManifestType,
8
- } from "../../../../hooks/useFileManifest/common/entities";
5
+ import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
9
6
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
10
7
  import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
11
8
  import { FileLocation } from "../../../../hooks/useRequestFileLocation";
@@ -35,7 +32,6 @@ export const DownloadCurlCommand = ({
35
32
  DownloadCurlStart,
36
33
  DownloadCurlSuccess,
37
34
  fileManifestState,
38
- fileManifestType,
39
35
  fileSummaryFacetName,
40
36
  filters,
41
37
  formFacet,
@@ -50,7 +46,6 @@ export const DownloadCurlCommand = ({
50
46
  const {
51
47
  exploreState: { tabValue: entityList },
52
48
  } = useExploreState();
53
- const { requestParams } = fileManifestState;
54
49
  const { data, isLoading, run } = useFileManifest();
55
50
  const curlCommand = getBulkDownloadCurlCommand(data, executionEnvironment);
56
51
  return curlCommand ? (
@@ -68,12 +63,7 @@ export const DownloadCurlCommand = ({
68
63
  isLoading={isLoading}
69
64
  onRequestManifest={(): void => {
70
65
  // Execute GTM tracking.
71
- track(
72
- fileManifestType,
73
- entityList,
74
- executionEnvironment,
75
- requestParams
76
- );
66
+ bulkDownloadTracking(entityList, executionEnvironment);
77
67
  // Request manifest.
78
68
  run();
79
69
  }}
@@ -98,21 +88,3 @@ function getBulkDownloadCurlCommand(
98
88
  }
99
89
  return commandLine[executionEnvironment];
100
90
  }
101
-
102
- /**
103
- * Executes GTM tracking.
104
- * @param fileManifestType - File manifest type.
105
- * @param index - Index.
106
- * @param toolName - Execution environment.
107
- * @param requestParams - Request params.
108
- */
109
- function track(
110
- fileManifestType: FileManifestType,
111
- index: string,
112
- toolName: string,
113
- requestParams?: URLSearchParams
114
- ): void {
115
- if (fileManifestType === FILE_MANIFEST_TYPE.BULK_DOWNLOAD) {
116
- bulkDownloadTracking(index, toolName, requestParams);
117
- }
118
- }
@@ -3,7 +3,9 @@ import {
3
3
  expireTimeInSeconds,
4
4
  useAuthenticationNIHExpiry,
5
5
  } from "../../../../../../../../hooks/useAuthentication/useAuthenticationNIHExpiry";
6
- import { FluidAlert } from "../../../../../../../common/Alert/alert.styles";
6
+ import { Alert } from "../../../../../../../common/Alert/alert";
7
+ import { ALERT_PROPS } from "../../../../../../../common/Alert/constants";
8
+ import { FluidPaper } from "../../../../../../../common/Paper/paper.styles";
7
9
  import { Link } from "../../../../../../../Links/components/Link/link";
8
10
 
9
11
  export const NIHAccountExpiryWarning = (): JSX.Element | null => {
@@ -14,23 +16,19 @@ export const NIHAccountExpiryWarning = (): JSX.Element | null => {
14
16
  if (!isReady) return null;
15
17
 
16
18
  return linkWillExpire || linkExpired ? (
17
- <FluidAlert
18
- severity="warning"
19
- title={
20
- <>
21
- <span>{getExpiryMessage(linkExpired, linkExpireTime)}</span>{" "}
22
- <span>
23
- Please{" "}
24
- <Link
25
- label="renew your account"
26
- url="https://support.terra.bio/hc/en-us/articles/360038086332-Linking-authorization-accessing-controlled-data-on-external-servers#heading-4"
27
- />{" "}
28
- link.
29
- </span>
30
- </>
31
- }
32
- variant="banner"
33
- />
19
+ <Alert {...ALERT_PROPS.STANDARD_WARNING} component={FluidPaper}>
20
+ <span>
21
+ <span>{getExpiryMessage(linkExpired, linkExpireTime)}</span>{" "}
22
+ <span>
23
+ Please{" "}
24
+ <Link
25
+ label="renew your account"
26
+ url="https://support.terra.bio/hc/en-us/articles/360038086332-Linking-authorization-accessing-controlled-data-on-external-servers#heading-4"
27
+ />{" "}
28
+ link.
29
+ </span>
30
+ </span>
31
+ </Alert>
34
32
  ) : null;
35
33
  };
36
34
 
@@ -1,11 +1,13 @@
1
1
  import React, { ElementType } from "react";
2
2
  import { Filters } from "../../../../common/entities";
3
+ import { useExploreState } from "../../../../hooks/useExploreState";
3
4
  import { useExportToTerraResponseURL } from "../../../../hooks/useExportToTerraResponseURL";
4
5
  import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
5
6
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
6
7
  import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
7
8
  import { FileManifestState } from "../../../../providers/fileManifestState";
8
9
  import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
10
+ import { exportToTerraTracking } from "../../common/tracking";
9
11
  import { ExportToTerraNotStarted } from "./components/ExportToTerraNotStarted/exportToTerraNotStarted";
10
12
  import { ExportToTerraReady } from "./components/ExportToTerraReady/exportToTerraReady";
11
13
 
@@ -33,6 +35,9 @@ export const ExportToTerra = ({
33
35
  manifestDownloadFormat,
34
36
  manifestDownloadFormats,
35
37
  }: ExportToTerraProps): JSX.Element => {
38
+ const {
39
+ exploreState: { tabValue: entityList },
40
+ } = useExploreState();
36
41
  useRequestFileManifest(manifestDownloadFormat, filters, fileSummaryFacetName);
37
42
  const { requestParams } = fileManifestState;
38
43
  const { data, isLoading, run } = useFileManifest();
@@ -50,7 +55,12 @@ export const ExportToTerra = ({
50
55
  formFacet={formFacet}
51
56
  isLoading={isLoading}
52
57
  manifestDownloadFormats={manifestDownloadFormats}
53
- onRequestManifest={run}
58
+ onRequestManifest={(): void => {
59
+ // Execute GA tracking
60
+ exportToTerraTracking(entityList);
61
+ // Request manifest
62
+ run();
63
+ }}
54
64
  />
55
65
  );
56
66
  };
@@ -1,12 +1,14 @@
1
1
  import React, { ElementType } from "react";
2
2
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
3
3
  import { Filters } from "../../../../common/entities";
4
+ import { useExploreState } from "../../../../hooks/useExploreState";
4
5
  import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
5
6
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
6
7
  import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
7
8
  import { FileLocation } from "../../../../hooks/useRequestFileLocation";
8
9
  import { FileManifestState } from "../../../../providers/fileManifestState";
9
10
  import { FormFacet } from "../../common/entities";
11
+ import { fileManifestTracking } from "../../common/tracking";
10
12
  import { ManifestDownloadNotStarted } from "./components/ManifestDownloadNotStarted/manifestDownloadNotStarted";
11
13
  import { ManifestDownloadReady } from "./components/ManifestDownloadReady/manifestDownloadReady";
12
14
 
@@ -35,6 +37,9 @@ export const ManifestDownload = ({
35
37
  filters,
36
38
  fileSummaryFacetName
37
39
  );
40
+ const {
41
+ exploreState: { tabValue: entityList },
42
+ } = useExploreState();
38
43
  const { data, isLoading, run } = useFileManifest();
39
44
  const manifestURL = getManifestDownloadURL(data);
40
45
  return manifestURL ? (
@@ -49,7 +54,10 @@ export const ManifestDownload = ({
49
54
  fileManifestState={fileManifestState}
50
55
  formFacet={formFacet}
51
56
  isLoading={isLoading}
52
- onRequestManifest={run}
57
+ onRequestManifest={(): void => {
58
+ fileManifestTracking(entityList);
59
+ run();
60
+ }}
53
61
  />
54
62
  );
55
63
  };
@@ -4,7 +4,6 @@ import { Link } from "../../../../../../../Links/components/Link/link";
4
4
  export const StyledLink = styled(Link)`
5
5
  &.MuiLink-root {
6
6
  flex: none;
7
- text-decoration: none !important;
8
7
  img {
9
8
  margin: 0;
10
9
  }
@@ -4,11 +4,11 @@ import {
4
4
  StaticImage,
5
5
  } from "../../../../../../../common/StaticImage/staticImage";
6
6
  import { ANCHOR_TARGET } from "../../../../../../../Links/common/entities";
7
+ import { BaseComponentProps } from "../../../../../../../types";
7
8
  import { StyledLink } from "./logo.styles";
8
9
 
9
- export interface LogoProps {
10
+ export interface LogoProps extends BaseComponentProps {
10
11
  alt: string;
11
- className?: string;
12
12
  height?: number;
13
13
  link: string;
14
14
  src: ImageSrc;
@@ -30,6 +30,7 @@ export const Logo = ({
30
30
  className={className}
31
31
  label={<StaticImage alt={alt} height={height} src={src} width={width} />}
32
32
  target={target}
33
+ underline="none"
33
34
  url={link}
34
35
  />
35
36
  );
@@ -8,6 +8,7 @@ import React, { ReactNode } from "react";
8
8
  import { isValidUrl } from "../../../../common/utils";
9
9
  import { CopyToClipboard } from "../../../common/CopyToClipboard/copyToClipboard";
10
10
  import { TypographyProps } from "../../../common/Typography/common/entities";
11
+ import { BaseComponentProps } from "../../../types";
11
12
  import { ANCHOR_TARGET, REL_ATTRIBUTE, Url } from "../../common/entities";
12
13
  import {
13
14
  isClientSideNavigation,
@@ -16,11 +17,11 @@ import {
16
17
  } from "../../common/utils";
17
18
  import { ExploreViewLink } from "./components/ExploreViewLink/exploreViewLink";
18
19
 
19
- export interface LinkProps {
20
- className?: string;
20
+ export interface LinkProps
21
+ extends BaseComponentProps,
22
+ Omit<MLinkProps, "children" | "component"> {
21
23
  copyable?: boolean;
22
24
  label: ReactNode /* link label may be an element */;
23
- noWrap?: MLinkProps["noWrap"];
24
25
  onClick?: () => void;
25
26
  target?: ANCHOR_TARGET;
26
27
  TypographyProps?: TypographyProps;
@@ -55,19 +56,19 @@ export const Link = ({
55
56
  /* Client-side navigation */
56
57
  return (
57
58
  <>
58
- <NLink href={url} legacyBehavior passHref>
59
- <MLink
60
- className={className}
61
- rel={REL_ATTRIBUTE.NO_OPENER}
62
- noWrap={noWrap}
63
- target={target || ANCHOR_TARGET.SELF}
64
- onClick={onClick}
65
- {...TypographyProps}
66
- {...props}
67
- >
68
- {label}
69
- </MLink>
70
- </NLink>
59
+ <MLink
60
+ className={className}
61
+ component={NLink}
62
+ href={url}
63
+ noWrap={noWrap}
64
+ onClick={onClick}
65
+ rel={REL_ATTRIBUTE.NO_OPENER}
66
+ target={target || ANCHOR_TARGET.SELF}
67
+ {...TypographyProps}
68
+ {...props}
69
+ >
70
+ {label}
71
+ </MLink>
71
72
  {copyable && <CopyToClipboard copyStr={url} />}
72
73
  </>
73
74
  );
@@ -1,28 +1,25 @@
1
+ import { css } from "@emotion/react";
1
2
  import styled from "@emotion/styled";
2
- import { TABLET } from "../../../theme/common/breakpoints";
3
- import { Alert } from "./alert";
3
+ import { Alert } from "@mui/material";
4
+ import { SIZE } from "../../../styles/common/constants/size";
5
+ import {
6
+ textBody4002Lines,
7
+ textBodyLarge500,
8
+ } from "../../../styles/common/mixins/fonts";
4
9
 
5
- /**
6
- * Flat alert - typically used when in full stretch or full "bleed" across a container.
7
- * e.g. the entire width of mobile viewports.
8
- */
9
- export const FlatAlert = styled(Alert)`
10
- border-left: none;
11
- border-radius: 0;
12
- border-right: none;
13
- box-shadow: none;
14
- `;
15
-
16
- /* eslint-disable valid-jsdoc -- disable require param */
17
- /**
18
- * Fluid alert - typically used to transition between flat paper (mobile) and rounded paper (tablet or desktop).
19
- */
20
- /* eslint-enable valid-jsdoc -- disable require param */
21
- export const FluidAlert = styled(Alert)`
22
- ${({ theme }) => theme.breakpoints.down(TABLET)} {
23
- border-left: none;
24
- border-radius: 0;
25
- border-right: none;
26
- box-shadow: none;
27
- }
10
+ export const StyledAlert = styled(Alert)`
11
+ ${(props) =>
12
+ props.size === SIZE.LARGE &&
13
+ css`
14
+ padding: 20px;
15
+ .MuiAlert-icon {
16
+ padding: 2px 0;
17
+ }
18
+ .MuiAlert-message {
19
+ ${textBody4002Lines(props)};
20
+ .MuiAlertTitle-root {
21
+ ${textBodyLarge500(props)};
22
+ }
23
+ }
24
+ `}
28
25
  `;