@databiosphere/findable-ui 13.0.1 → 15.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 (205) hide show
  1. package/.github/workflows/release-please.yml +3 -6
  2. package/.release-please-manifest.json +3 -0
  3. package/CHANGELOG.md +43 -0
  4. package/lib/common/analytics/entities.d.ts +18 -7
  5. package/lib/common/analytics/entities.js +5 -3
  6. package/lib/components/Export/common/tracking.d.ts +19 -3
  7. package/lib/components/Export/common/tracking.js +37 -12
  8. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +3 -17
  9. package/lib/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.js +6 -3
  10. package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
  11. package/lib/components/Export/components/ExportToTerra/exportToTerra.js +11 -3
  12. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +1 -1
  13. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.js +2 -2
  14. package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
  15. package/lib/components/Export/components/ManifestDownload/manifestDownload.js +9 -3
  16. package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +1 -1
  17. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.d.ts +4 -1
  18. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +3 -1
  19. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.d.ts +2 -0
  20. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.js +3 -0
  21. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.d.ts +2 -0
  22. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.js +27 -0
  23. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.d.ts +15 -0
  24. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.js +26 -0
  25. package/lib/components/Layout/components/Footer/components/VersionInfo/constants.d.ts +3 -0
  26. package/lib/components/Layout/components/Footer/components/VersionInfo/constants.js +27 -0
  27. package/lib/components/Layout/components/Footer/components/VersionInfo/types.d.ts +12 -0
  28. package/lib/components/Layout/components/Footer/components/VersionInfo/types.js +1 -0
  29. package/lib/components/Layout/components/Footer/components/VersionInfo/utils.d.ts +19 -0
  30. package/lib/components/Layout/components/Footer/components/VersionInfo/utils.js +29 -0
  31. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.d.ts +3 -0
  32. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.js +10 -0
  33. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +5 -0
  34. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +9 -0
  35. package/lib/components/Layout/components/Footer/footer.d.ts +3 -2
  36. package/lib/components/Layout/components/Footer/footer.js +4 -3
  37. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.d.ts +2 -2
  38. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.js +1 -1
  39. package/lib/components/Layout/components/Header/components/Content/components/Logo/logo.styles.js +0 -1
  40. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
  41. package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
  42. package/lib/components/Links/components/Link/link.d.ts +2 -3
  43. package/lib/components/Links/components/Link/link.js +1 -2
  44. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +5 -0
  45. package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +5 -0
  46. package/lib/components/Table/common/utils.js +0 -1
  47. package/lib/components/common/Alert/alert.d.ts +4 -12
  48. package/lib/components/common/Alert/alert.js +5 -7
  49. package/lib/components/common/Alert/alert.styles.d.ts +1 -11
  50. package/lib/components/common/Alert/alert.styles.js +18 -24
  51. package/lib/components/common/Alert/constants.d.ts +2 -0
  52. package/lib/components/common/Alert/constants.js +27 -0
  53. package/lib/components/common/Alert/hooks/useTransition/types.d.ts +5 -0
  54. package/lib/components/common/Alert/hooks/useTransition/types.js +1 -0
  55. package/lib/components/common/Alert/hooks/useTransition/useTransition.d.ts +7 -0
  56. package/lib/components/common/Alert/hooks/useTransition/useTransition.js +20 -0
  57. package/lib/components/common/Banner/banner.d.ts +4 -7
  58. package/lib/components/common/Banner/banner.js +4 -3
  59. package/lib/components/common/Banner/banner.styles.d.ts +3 -0
  60. package/lib/components/common/Banner/banner.styles.js +28 -0
  61. package/lib/components/common/Banner/components/CookieBanner/constants.d.ts +2 -0
  62. package/lib/components/common/Banner/components/CookieBanner/constants.js +7 -0
  63. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.d.ts +3 -3
  64. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.js +17 -31
  65. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.d.ts +1 -1
  66. package/lib/components/common/Banner/components/CookieBanner/cookieBanner.styles.js +2 -16
  67. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.d.ts +3 -7
  68. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.js +6 -4
  69. package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.d.ts +3 -8
  70. package/lib/components/common/Banner/components/SystemIndexing/systemIndexing.js +6 -8
  71. package/lib/components/common/Banner/components/SystemStatus/systemStatus.d.ts +3 -8
  72. package/lib/components/common/Banner/components/SystemStatus/systemStatus.js +6 -8
  73. package/lib/components/common/Banner/constants.d.ts +2 -0
  74. package/lib/components/common/Banner/constants.js +9 -0
  75. package/lib/components/common/Breadcrumbs/breadcrumbs.d.ts +2 -2
  76. package/lib/components/common/Breadcrumbs/breadcrumbs.js +3 -4
  77. package/lib/components/common/Paper/paper.styles.js +18 -12
  78. package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
  79. package/lib/components/types.d.ts +10 -0
  80. package/lib/components/types.js +1 -0
  81. package/lib/config/entities.d.ts +1 -0
  82. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +1 -1
  83. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +3 -2
  84. package/lib/hooks/useFileManifest/common/entities.d.ts +5 -5
  85. package/lib/hooks/useFileManifest/common/entities.js +7 -6
  86. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +3 -1
  87. package/lib/hooks/useFileManifest/useRequestFileManifest.js +4 -1
  88. package/lib/hooks/useLocalStorage/useLocalStorage.d.ts +1 -1
  89. package/lib/hooks/useLocalStorage/useLocalStorage.js +1 -1
  90. package/lib/providers/fileManifestState/actions.d.ts +9 -0
  91. package/lib/providers/fileManifestState/actions.js +19 -0
  92. package/lib/providers/fileManifestState/constants.d.ts +4 -0
  93. package/lib/providers/fileManifestState/constants.js +25 -0
  94. package/lib/providers/fileManifestState/utils.d.ts +34 -0
  95. package/lib/providers/fileManifestState/utils.js +80 -0
  96. package/lib/providers/fileManifestState.d.ts +5 -19
  97. package/lib/providers/fileManifestState.js +17 -37
  98. package/lib/styles/common/constants/size.d.ts +5 -0
  99. package/lib/styles/common/constants/size.js +6 -0
  100. package/lib/styles/common/mui/alert.d.ts +4 -0
  101. package/lib/styles/common/mui/alert.js +20 -0
  102. package/lib/styles/common/mui/chip.d.ts +11 -0
  103. package/lib/styles/common/mui/chip.js +25 -0
  104. package/lib/styles/common/mui/icon.d.ts +2 -0
  105. package/lib/styles/common/mui/icon.js +6 -0
  106. package/lib/theme/common/components.d.ts +0 -12
  107. package/lib/theme/common/components.js +33 -157
  108. package/lib/theme/components/index.d.ts +2 -0
  109. package/lib/theme/components/index.js +2 -0
  110. package/lib/theme/components/muiAlert.d.ts +2 -0
  111. package/lib/theme/components/muiAlert.js +121 -0
  112. package/lib/theme/components/muiAlertTitle.d.ts +2 -0
  113. package/lib/theme/components/muiAlertTitle.js +12 -0
  114. package/lib/theme/theme.js +3 -2
  115. package/lib/views/ExportView/exportView.js +1 -1
  116. package/package.json +4 -4
  117. package/release-please-config.json +23 -0
  118. package/src/common/analytics/entities.ts +17 -6
  119. package/src/common/analytics/readme-analytics.md +9 -7
  120. package/src/components/Export/common/tracking.ts +46 -16
  121. package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +4 -30
  122. package/src/components/Export/components/ExportToTerra/components/TerraSetUpForm/components/NIHAccountExpiryWarning/nihAccountExpiryWarning.tsx +16 -18
  123. package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +18 -2
  124. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +7 -1
  125. package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +11 -1
  126. package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +8 -0
  127. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.ts +5 -0
  128. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.tsx +53 -0
  129. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.ts +31 -0
  130. package/src/components/Layout/components/Footer/components/VersionInfo/constants.ts +30 -0
  131. package/src/components/Layout/components/Footer/components/VersionInfo/types.ts +14 -0
  132. package/src/components/Layout/components/Footer/components/VersionInfo/utils.ts +32 -0
  133. package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +10 -0
  134. package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.tsx +31 -0
  135. package/src/components/Layout/components/Footer/footer.tsx +5 -2
  136. package/src/components/Layout/components/Header/components/Content/components/Logo/logo.styles.ts +0 -1
  137. package/src/components/Layout/components/Header/components/Content/components/Logo/logo.tsx +3 -2
  138. package/src/components/Links/components/Link/link.tsx +17 -16
  139. package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +5 -0
  140. package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +5 -0
  141. package/src/components/Table/common/utils.ts +0 -1
  142. package/src/components/common/Alert/alert.styles.ts +22 -25
  143. package/src/components/common/Alert/alert.tsx +14 -35
  144. package/src/components/common/Alert/constants.ts +29 -0
  145. package/src/components/common/Alert/hooks/useTransition/types.ts +5 -0
  146. package/src/components/common/Alert/hooks/useTransition/useTransition.ts +25 -0
  147. package/src/components/common/Banner/banner.styles.ts +29 -0
  148. package/src/components/common/Banner/banner.tsx +11 -18
  149. package/src/components/common/Banner/components/CookieBanner/constants.ts +9 -0
  150. package/src/components/common/Banner/components/CookieBanner/cookieBanner.styles.ts +2 -16
  151. package/src/components/common/Banner/components/CookieBanner/cookieBanner.tsx +36 -64
  152. package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.tsx +12 -17
  153. package/src/components/common/Banner/components/SystemIndexing/systemIndexing.tsx +11 -22
  154. package/src/components/common/Banner/components/SystemStatus/systemStatus.tsx +11 -22
  155. package/src/components/common/Banner/constants.ts +11 -0
  156. package/src/components/common/Breadcrumbs/breadcrumbs.tsx +6 -10
  157. package/src/components/common/Paper/paper.styles.ts +18 -12
  158. package/src/components/types.ts +13 -0
  159. package/src/config/entities.ts +1 -0
  160. package/src/hooks/useFileManifest/common/buildFileManifestRequestURL.ts +3 -4
  161. package/src/hooks/useFileManifest/common/entities.ts +5 -6
  162. package/src/hooks/useFileManifest/useRequestFileManifest.ts +5 -0
  163. package/src/hooks/useLocalStorage/useLocalStorage.ts +2 -2
  164. package/src/providers/fileManifestState/actions.ts +34 -0
  165. package/src/providers/fileManifestState/constants.ts +31 -0
  166. package/src/providers/fileManifestState/utils.ts +108 -0
  167. package/src/providers/fileManifestState.tsx +30 -58
  168. package/src/styles/common/constants/size.ts +5 -0
  169. package/src/styles/common/mui/alert.ts +24 -0
  170. package/src/styles/common/mui/chip.ts +36 -0
  171. package/src/styles/common/mui/icon.ts +8 -0
  172. package/src/theme/common/components.ts +32 -159
  173. package/src/theme/components/index.ts +2 -0
  174. package/src/theme/components/muiAlert.ts +123 -0
  175. package/src/theme/components/muiAlertTitle.ts +14 -0
  176. package/src/theme/theme.ts +3 -2
  177. package/src/views/ExportView/exportView.tsx +1 -1
  178. package/tests/azulFileDownload.test.tsx +11 -6
  179. package/tests/fileManifestRequestFilters.test.ts +160 -0
  180. package/tests/updateFilesFacetsStatus.test.ts +84 -0
  181. package/types/data-explorer-ui.d.ts +6 -5
  182. package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
  183. package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
  184. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
  185. package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
  186. package/lib/components/common/Alert/alert.stories.d.ts +0 -6
  187. package/lib/components/common/Alert/alert.stories.js +0 -36
  188. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
  189. package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
  190. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
  191. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
  192. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
  193. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
  194. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
  195. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
  196. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
  197. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
  198. package/src/components/Index/components/TitleCell/titleCell.styles.ts +0 -7
  199. package/src/components/Index/components/TitleCell/titleCell.tsx +0 -22
  200. package/src/components/common/Alert/alert.stories.tsx +0 -41
  201. package/src/components/common/Alert/components/AlertText/alertText.styles.ts +0 -20
  202. package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.ts +0 -20
  203. package/src/components/common/Banner/components/BannerPrimary/bannerPrimary.tsx +0 -27
  204. package/src/components/common/Banner/components/DismissibleBanner/dismissibleBanner.tsx +0 -44
  205. package/src/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.ts +0 -22
@@ -3,31 +3,17 @@ import { getFilterParameterValue } from "../apis/azul/common/utils";
3
3
  import { useCatalog } from "../hooks/useCatalog";
4
4
  import { buildNextFilterState } from "../hooks/useCategoryFilter";
5
5
  import { buildFileManifestRequestURL } from "../hooks/useFileManifest/common/buildFileManifestRequestURL";
6
+ import { FILES_FACETS_STATUS, } from "../hooks/useFileManifest/common/entities";
6
7
  import { useFetchFilesFacets } from "../hooks/useFileManifest/useFetchFilesFacets";
7
8
  import { useFetchSummary } from "../hooks/useFileManifest/useFetchSummary";
8
9
  import { useFileManifestURL } from "../hooks/useFileManifest/useFileManifestURL";
9
- // Default file manifest state.
10
- export const DEFAULT_FILE_MANIFEST_STATE = {
11
- fileManifestFormat: undefined,
12
- fileSummary: undefined,
13
- fileSummaryFacetName: undefined,
14
- fileSummaryFilters: [],
15
- filesFacets: [],
16
- filters: [],
17
- isEnabled: false,
18
- isFacetsLoading: false,
19
- isFacetsSuccess: false,
20
- isFileSummaryLoading: false,
21
- isLoading: false,
22
- isSummaryLoading: false,
23
- requestParams: undefined,
24
- requestURL: undefined,
25
- summary: undefined,
26
- };
10
+ import { updateFileManifestAction } from "./fileManifestState/actions";
11
+ import { FILE_MANIFEST_STATE } from "./fileManifestState/constants";
12
+ import { getRequestFilters } from "./fileManifestState/utils";
27
13
  export const FileManifestStateContext = createContext({
28
14
  // eslint-disable-next-line @typescript-eslint/no-empty-function -- allow dummy function for default state.
29
15
  fileManifestDispatch: () => { },
30
- fileManifestState: DEFAULT_FILE_MANIFEST_STATE,
16
+ fileManifestState: FILE_MANIFEST_STATE,
31
17
  });
32
18
  export function FileManifestStateProvider({ children, }) {
33
19
  // Determine catalog.
@@ -35,7 +21,7 @@ export function FileManifestStateProvider({ children, }) {
35
21
  // Determine file manifest request data URL.
36
22
  const URL = useFileManifestURL();
37
23
  // File manifest state.
38
- const [fileManifestState, fileManifestDispatch] = useReducer((s, a) => fileManifestReducer(s, a, { URL, catalog }), DEFAULT_FILE_MANIFEST_STATE);
24
+ const [fileManifestState, fileManifestDispatch] = useReducer((s, a) => fileManifestReducer(s, a, { URL, catalog }), FILE_MANIFEST_STATE);
39
25
  const { fileSummaryFacetName, fileSummaryFilters, filters, isEnabled } = fileManifestState;
40
26
  // Fetch files facets.
41
27
  const { filesFacets, isLoading: isFacetsLoading, isSuccess: isFacetsSuccess, } = useFetchFilesFacets(filters, catalog, { size: "25" }, isEnabled);
@@ -100,6 +86,7 @@ function fileManifestReducer(state, action, fileManifestContext) {
100
86
  return {
101
87
  ...state,
102
88
  fileManifestFormat: undefined,
89
+ filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
103
90
  isEnabled: false,
104
91
  requestParams: undefined,
105
92
  requestURL: undefined,
@@ -109,28 +96,23 @@ function fileManifestReducer(state, action, fileManifestContext) {
109
96
  case FileManifestActionKind.FetchFileManifest: {
110
97
  // Get file summary filters.
111
98
  const fileSummaryFilters = buildNextFileSummaryFilterState(payload.filters, payload.fileSummaryFacetName);
112
- // Build request params and request URL.
113
- const { requestParams, requestURL } = buildFileManifestRequestURL(URL, payload.filters, catalog, payload.fileManifestFormat) || {};
114
99
  return {
115
100
  ...state,
116
101
  ...payload,
117
102
  fileSummaryFilters,
118
103
  isEnabled: true,
119
- requestParams,
120
- requestURL,
104
+ requestParams: undefined,
105
+ requestURL: undefined,
121
106
  };
122
107
  }
123
108
  // Updates file manifest.
124
109
  case FileManifestActionKind.UpdateFileManifest: {
125
- return {
126
- ...state,
127
- ...payload,
128
- };
110
+ return updateFileManifestAction(state, payload, fileManifestContext);
129
111
  }
130
112
  // Updates file manifest format.
131
113
  case FileManifestActionKind.UpdateFileManifestFormat: {
132
114
  // Build request params and request URL.
133
- const { requestParams, requestURL } = buildFileManifestRequestURL(URL, state.filters, catalog, payload) || {};
115
+ const { requestParams, requestURL } = buildFileManifestRequestURL(URL, getRequestFilters(state), catalog, payload) || {};
134
116
  return {
135
117
  ...state,
136
118
  fileManifestFormat: payload,
@@ -145,14 +127,13 @@ function fileManifestReducer(state, action, fileManifestContext) {
145
127
  payload.selected);
146
128
  // Get file summary filters.
147
129
  const fileSummaryFilters = buildNextFileSummaryFilterState(filters, state.fileSummaryFacetName);
148
- // Build request params and request URL.
149
- const { requestParams, requestURL } = buildFileManifestRequestURL(URL, filters, catalog, state.fileManifestFormat) || {};
150
130
  return {
151
131
  ...state,
152
132
  fileSummaryFilters,
133
+ filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
153
134
  filters,
154
- requestParams,
155
- requestURL,
135
+ requestParams: undefined,
136
+ requestURL: undefined,
156
137
  };
157
138
  }
158
139
  // Updates selected file manifest filters by category.
@@ -161,14 +142,13 @@ function fileManifestReducer(state, action, fileManifestContext) {
161
142
  const filters = updateCategoryFilterState(state.filters, payload, state.filesFacets);
162
143
  // Get file summary filters.
163
144
  const fileSummaryFilters = buildNextFileSummaryFilterState(filters, state.fileSummaryFacetName);
164
- // Build request params and request URL.
165
- const { requestParams, requestURL } = buildFileManifestRequestURL(URL, filters, catalog, state.fileManifestFormat) || {};
166
145
  return {
167
146
  ...state,
168
147
  fileSummaryFilters,
148
+ filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
169
149
  filters,
170
- requestParams,
171
- requestURL,
150
+ requestParams: undefined,
151
+ requestURL: undefined,
172
152
  };
173
153
  }
174
154
  default:
@@ -0,0 +1,5 @@
1
+ export declare enum SIZE {
2
+ LARGE = "large",
3
+ MEDIUM = "medium",
4
+ SMALL = "small"
5
+ }
@@ -0,0 +1,6 @@
1
+ export var SIZE;
2
+ (function (SIZE) {
3
+ SIZE["LARGE"] = "large";
4
+ SIZE["MEDIUM"] = "medium";
5
+ SIZE["SMALL"] = "small";
6
+ })(SIZE || (SIZE = {}));
@@ -0,0 +1,4 @@
1
+ import { AlertProps } from "@mui/material";
2
+ export declare const COLOR: Record<string, AlertProps["color"]>;
3
+ export declare const SEVERITY: Record<string, AlertProps["severity"]>;
4
+ export declare const VARIANT: Record<string, AlertProps["variant"]>;
@@ -0,0 +1,20 @@
1
+ export const COLOR = {
2
+ ERROR: "error",
3
+ INFO: "info",
4
+ INK: "ink",
5
+ PRIMARY: "primary",
6
+ SMOKE: "smoke",
7
+ SUCCESS: "success",
8
+ WARNING: "warning",
9
+ };
10
+ export const SEVERITY = {
11
+ ERROR: "error",
12
+ INFO: "info",
13
+ SUCCESS: "success",
14
+ WARNING: "warning",
15
+ };
16
+ export const VARIANT = {
17
+ FILLED: "filled",
18
+ OUTLINED: "outlined",
19
+ STANDARD: "standard",
20
+ };
@@ -0,0 +1,11 @@
1
+ import { ChipProps } from "@mui/material";
2
+ type ChipPropsOptions = {
3
+ COLOR: typeof COLOR;
4
+ SIZE: typeof SIZE;
5
+ VARIANT: typeof VARIANT;
6
+ };
7
+ declare const COLOR: Record<string, ChipProps["color"]>;
8
+ declare const SIZE: Record<string, ChipProps["size"]>;
9
+ declare const VARIANT: Record<string, ChipProps["variant"]>;
10
+ export declare const CHIP_PROPS: ChipPropsOptions;
11
+ export {};
@@ -0,0 +1,25 @@
1
+ const COLOR = {
2
+ DEFAULT: "default",
3
+ ERROR: "error",
4
+ INFO: "info",
5
+ PRIMARY: "primary",
6
+ SECONDARY: "secondary",
7
+ SUCCESS: "success",
8
+ WARNING: "warning",
9
+ };
10
+ const SIZE = {
11
+ MEDIUM: "medium",
12
+ SMALL: "small",
13
+ };
14
+ const VARIANT = {
15
+ FILLED: "filled",
16
+ FILTER_TAG: "filterTag",
17
+ N_TAG: "ntag",
18
+ OUTLINED: "outlined",
19
+ STATUS: "status",
20
+ };
21
+ export const CHIP_PROPS = {
22
+ COLOR,
23
+ SIZE,
24
+ VARIANT,
25
+ };
@@ -0,0 +1,2 @@
1
+ import { IconProps } from "@mui/material";
2
+ export declare const FONT_SIZE: Record<string, IconProps["fontSize"]>;
@@ -0,0 +1,6 @@
1
+ export const FONT_SIZE = {
2
+ INHERIT: "inherit",
3
+ LARGE: "large",
4
+ MEDIUM: "medium",
5
+ SMALL: "small",
6
+ };
@@ -13,18 +13,6 @@ export declare const MuiAccordionDetails: Components["MuiAccordionDetails"];
13
13
  * MuiAccordionSummary Component
14
14
  */
15
15
  export declare const MuiAccordionSummary: Components["MuiAccordionSummary"];
16
- /**
17
- * MuiAlert Component
18
- * @param theme - Theme.
19
- * @returns MuiAlert component theme styles.
20
- */
21
- export declare const MuiAlert: (theme: Theme) => Components["MuiAlert"];
22
- /**
23
- * MuiAlertTitle Component
24
- * @param theme - Theme.
25
- * @returns MuiAlertTitle component theme styles.
26
- */
27
- export declare const MuiAlertTitle: (theme: Theme) => Components["MuiAlertTitle"];
28
16
  /**
29
17
  * MuiAppBar Component
30
18
  */
@@ -1,12 +1,9 @@
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
1
  import { DropDownIcon } from "../../components/common/Form/components/Select/components/DropDownIcon/dropDownIcon";
2
+ import { CHIP_PROPS } from "../../styles/common/mui/chip";
6
3
  import { desktopUp, mobileUp, tabletUp } from "./breakpoints";
7
4
  import { alpha32, alpha60, alpha64, alpha80, black04, black08, white, } from "./palette";
8
5
  import { strokeBottom, strokeTop } from "./shadows";
9
- import { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_LARGE_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_SMALL, } from "./typography";
6
+ import { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_SMALL, } from "./typography";
10
7
  // Constants
11
8
  const FLEX_START = "flex-start";
12
9
  /**
@@ -62,157 +59,6 @@ export const MuiAccordionSummary = {
62
59
  },
63
60
  },
64
61
  };
65
- /**
66
- * MuiAlert Component
67
- * @param theme - Theme.
68
- * @returns MuiAlert component theme styles.
69
- */
70
- export const MuiAlert = (theme) => {
71
- return {
72
- defaultProps: {
73
- iconMapping: {
74
- error: ErrorIcon({ fontSize: "small" }),
75
- info: InfoIcon({ fontSize: "small" }),
76
- success: SuccessIcon({ fontSize: "small" }),
77
- warning: WarningIcon({ fontSize: "small" }),
78
- },
79
- },
80
- styleOverrides: {
81
- icon: {
82
- opacity: 1,
83
- padding: "2px 0",
84
- },
85
- message: {
86
- display: "grid",
87
- gap: 4,
88
- padding: 0,
89
- },
90
- root: {
91
- ...theme.typography[TEXT_BODY_400_2_LINES],
92
- borderRadius: 8,
93
- boxShadow: theme.shadows[1], // elevation01
94
- color: theme.palette.ink.main,
95
- },
96
- standard: {
97
- alignItems: FLEX_START,
98
- padding: 20,
99
- },
100
- standardError: {
101
- backgroundColor: theme.palette.alert.lightest,
102
- border: `1px solid ${theme.palette.alert.main}${alpha32}`,
103
- // eslint-disable-next-line sort-keys -- disabling key order for readability
104
- "& .MuiAlert-icon": {
105
- color: theme.palette.alert.main,
106
- },
107
- },
108
- standardInfo: {
109
- backgroundColor: theme.palette.info.lightest,
110
- border: `1px solid ${theme.palette.info.main}${alpha32}`,
111
- // eslint-disable-next-line sort-keys -- disabling key order for readability
112
- "& .MuiAlert-icon": {
113
- color: theme.palette.info.main,
114
- },
115
- },
116
- standardSuccess: {
117
- backgroundColor: theme.palette.success.lightest,
118
- border: `1px solid ${theme.palette.success.main}${alpha32}`,
119
- // eslint-disable-next-line sort-keys -- disabling key order for readability
120
- "& .MuiAlert-icon": {
121
- color: theme.palette.success.main,
122
- },
123
- },
124
- standardWarning: {
125
- backgroundColor: theme.palette.warning.lightest,
126
- border: `1px solid ${theme.palette.warning.main}${alpha32}`,
127
- // eslint-disable-next-line sort-keys -- disabling key order for readability
128
- "& .MuiAlert-icon": {
129
- color: theme.palette.warning.main,
130
- },
131
- },
132
- },
133
- variants: [
134
- {
135
- props: { severity: "info", variant: "neutral" },
136
- style: {
137
- backgroundColor: theme.palette.smoke.light,
138
- padding: 16,
139
- },
140
- },
141
- {
142
- props: { variant: "banner" },
143
- style: {
144
- padding: 16,
145
- // eslint-disable-next-line sort-keys -- disabling key order for readability
146
- "& .MuiAlert-icon": {
147
- padding: 0,
148
- },
149
- "& .MuiAlertTitle-root": {
150
- ...theme.typography[TEXT_BODY_500],
151
- },
152
- },
153
- },
154
- {
155
- props: { severity: "error", variant: "banner" },
156
- style: {
157
- backgroundColor: theme.palette.alert.lightest,
158
- border: `1px solid ${theme.palette.alert.main}${alpha32}`,
159
- // eslint-disable-next-line sort-keys -- disabling key order for readability
160
- "& .MuiAlert-icon": {
161
- color: theme.palette.alert.main,
162
- },
163
- },
164
- },
165
- {
166
- props: { severity: "info", variant: "banner" },
167
- style: {
168
- backgroundColor: theme.palette.info.lightest,
169
- border: `1px solid ${theme.palette.info.main}${alpha32}`,
170
- // eslint-disable-next-line sort-keys -- disabling key order for readability
171
- "& .MuiAlert-icon": {
172
- color: theme.palette.info.main,
173
- },
174
- },
175
- },
176
- {
177
- props: { severity: "success", variant: "banner" },
178
- style: {
179
- backgroundColor: theme.palette.success.lightest,
180
- border: `1px solid ${theme.palette.success.main}${alpha32}`,
181
- // eslint-disable-next-line sort-keys -- disabling key order for readability
182
- "& .MuiAlert-icon": {
183
- color: theme.palette.success.main,
184
- },
185
- },
186
- },
187
- {
188
- props: { severity: "warning", variant: "banner" },
189
- style: {
190
- backgroundColor: theme.palette.warning.lightest,
191
- border: `1px solid ${theme.palette.warning.main}${alpha32}`,
192
- // eslint-disable-next-line sort-keys -- disabling key order for readability
193
- "& .MuiAlert-icon": {
194
- color: theme.palette.warning.main,
195
- },
196
- },
197
- },
198
- ],
199
- };
200
- };
201
- /**
202
- * MuiAlertTitle Component
203
- * @param theme - Theme.
204
- * @returns MuiAlertTitle component theme styles.
205
- */
206
- export const MuiAlertTitle = (theme) => {
207
- return {
208
- styleOverrides: {
209
- root: {
210
- ...theme.typography[TEXT_BODY_LARGE_500],
211
- margin: 0,
212
- },
213
- },
214
- };
215
- };
216
62
  /**
217
63
  * MuiAppBar Component
218
64
  */
@@ -542,8 +388,23 @@ export const MuiChip = (theme) => {
542
388
  color: "inherit",
543
389
  margin: "0 -2px 0 0",
544
390
  },
391
+ label: {
392
+ ...theme.typography[TEXT_BODY_SMALL_400],
393
+ },
545
394
  },
546
395
  variants: [
396
+ {
397
+ props: { size: CHIP_PROPS.SIZE.SMALL },
398
+ style: {
399
+ height: 20,
400
+ },
401
+ },
402
+ {
403
+ props: { size: CHIP_PROPS.SIZE.MEDIUM },
404
+ style: {
405
+ height: 24,
406
+ },
407
+ },
547
408
  {
548
409
  props: { color: "default" },
549
410
  style: {
@@ -992,11 +853,14 @@ export const MuiInputBase = (theme) => {
992
853
  */
993
854
  export const MuiLink = {
994
855
  defaultProps: {
995
- underline: "hover",
856
+ underline: "always",
996
857
  },
997
858
  styleOverrides: {
998
859
  root: {
999
860
  cursor: "pointer",
861
+ textDecorationColor: "currentColor",
862
+ textDecorationSkipInk: "none",
863
+ textUnderlinePosition: "from-font",
1000
864
  },
1001
865
  },
1002
866
  };
@@ -1144,6 +1008,18 @@ export const MuiOutlinedInput = (theme) => {
1144
1008
  export const MuiPaper = (theme) => {
1145
1009
  return {
1146
1010
  variants: [
1011
+ {
1012
+ props: { elevation: 1 },
1013
+ style: {
1014
+ boxShadow: theme.shadows[1], // elevation01
1015
+ },
1016
+ },
1017
+ {
1018
+ props: { elevation: 2 },
1019
+ style: {
1020
+ boxShadow: theme.shadows[2], // elevation02
1021
+ },
1022
+ },
1147
1023
  {
1148
1024
  props: { variant: "footer" },
1149
1025
  style: {
@@ -0,0 +1,2 @@
1
+ export { MuiAlert } from "./muiAlert";
2
+ export { MuiAlertTitle } from "./muiAlertTitle";
@@ -0,0 +1,2 @@
1
+ export { MuiAlert } from "./muiAlert";
2
+ export { MuiAlertTitle } from "./muiAlertTitle";
@@ -0,0 +1,2 @@
1
+ import { Components, Theme } from "@mui/material";
2
+ export declare const MuiAlert: (theme: Theme) => Components["MuiAlert"];
@@ -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),
@@ -8,7 +8,7 @@ import { useUpdateURLSearchParams } from "../../hooks/useUpdateURLSearchParams";
8
8
  export const ExportView = (props) => {
9
9
  const { exploreState: { filterState }, } = useExploreState();
10
10
  useUpdateURLSearchParams();
11
- useRequestFileManifest(undefined, filterState, undefined);
11
+ useRequestFileManifest(undefined, undefined, filterState, undefined);
12
12
  const { tabs, top } = useExportConfig();
13
13
  const currentTab = tabs[0];
14
14
  const { mainColumn, sideColumn } = currentTab;