@databiosphere/findable-ui 21.2.0 → 21.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +15 -0
- package/lib/common/entities.d.ts +33 -0
- package/lib/components/DataDictionary/common/utils.d.ts +38 -0
- package/lib/components/DataDictionary/common/utils.js +122 -0
- package/lib/components/Export/components/ExportForm/components/ExportButton/exportButton.js +6 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.js +5 -2
- package/lib/components/Filter/components/Filter/filter.js +1 -1
- package/lib/components/Filter/components/FilterLabel/filterLabel.d.ts +3 -1
- package/lib/components/Filter/components/FilterLabel/filterLabel.js +4 -2
- package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +10 -5
- package/lib/components/Index/components/Tabs/common/utils.js +2 -1
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.js +1 -1
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/navigationMenuItems.js +20 -21
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/constants.d.ts +1 -0
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/constants.js +1 -0
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/navigation.d.ts +2 -1
- package/lib/components/Layout/components/Header/components/Content/components/Navigation/navigation.js +16 -17
- package/lib/components/Layout/components/Header/header.js +2 -1
- package/lib/components/Login/components/Button/types.d.ts +1 -1
- package/lib/components/Login/components/Buttons/buttons.d.ts +2 -0
- package/lib/components/Login/components/Buttons/buttons.js +5 -0
- package/lib/components/Login/components/Buttons/types.d.ts +8 -0
- package/lib/components/Login/components/Buttons/types.js +1 -0
- package/lib/components/Login/components/Section/components/Consent/consent.d.ts +3 -0
- package/lib/components/Login/components/Section/components/Consent/consent.js +14 -0
- package/lib/components/Login/components/Section/components/Consent/consent.styles.d.ts +7 -0
- package/lib/components/Login/components/Section/components/Consent/consent.styles.js +14 -0
- package/lib/components/Login/components/Section/components/Consent/types.d.ts +6 -0
- package/lib/components/Login/components/Section/components/Consent/types.js +1 -0
- package/lib/components/Login/components/Section/components/Warning/warning.d.ts +3 -0
- package/lib/components/Login/components/Section/components/Warning/warning.js +9 -0
- package/lib/components/Login/hooks/useUserConsent/types.d.ts +10 -0
- package/lib/components/Login/hooks/useUserConsent/types.js +1 -0
- package/lib/components/Login/hooks/useUserConsent/useUserConsent.d.ts +2 -0
- package/lib/components/Login/hooks/useUserConsent/useUserConsent.js +24 -0
- package/lib/components/Login/hooks/useUserLogin/types.d.ts +6 -0
- package/lib/components/Login/hooks/useUserLogin/types.js +1 -0
- package/lib/components/Login/hooks/useUserLogin/useUserLogin.d.ts +2 -0
- package/lib/components/Login/hooks/useUserLogin/useUserLogin.js +21 -0
- package/lib/components/Table/components/TableHead/tableHead.js +4 -1
- package/lib/components/common/CustomIcon/components/CloseIcon/closeIcon.d.ts +2 -0
- package/lib/components/common/CustomIcon/components/CloseIcon/closeIcon.js +6 -0
- package/lib/components/common/LoginDialog/constants.d.ts +6 -0
- package/lib/components/common/LoginDialog/constants.js +21 -0
- package/lib/components/common/LoginDialog/loginDialog.d.ts +2 -0
- package/lib/components/common/LoginDialog/loginDialog.js +27 -0
- package/lib/components/common/LoginDialog/loginDialog.styles.d.ts +3 -0
- package/lib/components/common/LoginDialog/loginDialog.styles.js +50 -0
- package/lib/components/common/LoginDialog/types.d.ts +4 -0
- package/lib/components/common/LoginDialog/types.js +1 -0
- package/lib/components/common/Tabs/tabs.d.ts +2 -0
- package/lib/components/common/Tabs/tabs.js +14 -1
- package/lib/config/entities.d.ts +6 -1
- package/lib/hooks/useCategoryFilter.js +1 -0
- package/lib/providers/config.js +9 -2
- package/lib/providers/loginGuard/common/types.d.ts +18 -0
- package/lib/providers/loginGuard/common/types.js +1 -0
- package/lib/providers/loginGuard/context.d.ts +6 -0
- package/lib/providers/loginGuard/context.js +10 -0
- package/lib/providers/loginGuard/hook.d.ts +9 -0
- package/lib/providers/loginGuard/hook.js +12 -0
- package/lib/providers/loginGuard/provider.d.ts +11 -0
- package/lib/providers/loginGuard/provider.js +55 -0
- package/lib/styles/common/mui/typography.d.ts +1 -0
- package/lib/styles/common/mui/typography.js +7 -0
- package/package.json +1 -1
- package/src/common/entities.ts +37 -0
- package/src/components/DataDictionary/common/utils.ts +160 -0
- package/src/components/Export/components/ExportForm/components/ExportButton/exportButton.tsx +8 -1
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.tsx +11 -3
- package/src/components/Filter/components/Filter/filter.tsx +1 -0
- package/src/components/Filter/components/FilterLabel/filterLabel.tsx +16 -10
- package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +12 -5
- package/src/components/Index/components/Tabs/common/utils.ts +2 -0
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenu/navigationMenu.tsx +1 -1
- package/src/components/Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/navigationMenuItems.tsx +16 -15
- package/src/components/Layout/components/Header/components/Content/components/Navigation/constants.ts +1 -0
- package/src/components/Layout/components/Header/components/Content/components/Navigation/navigation.tsx +26 -18
- package/src/components/Layout/components/Header/header.tsx +6 -1
- package/src/components/Login/components/Button/types.ts +1 -1
- package/src/components/Login/components/Buttons/buttons.tsx +22 -0
- package/src/components/Login/components/Buttons/types.ts +9 -0
- package/src/components/Login/components/Section/components/Consent/consent.styles.ts +15 -0
- package/src/components/Login/components/Section/components/Consent/consent.tsx +30 -0
- package/src/components/Login/components/Section/components/Consent/types.ts +10 -0
- package/src/components/Login/components/Section/components/Warning/warning.tsx +24 -0
- package/src/components/Login/hooks/useUserConsent/types.ts +11 -0
- package/src/components/Login/hooks/useUserConsent/useUserConsent.ts +32 -0
- package/src/components/Login/hooks/useUserLogin/types.ts +8 -0
- package/src/components/Login/hooks/useUserLogin/useUserLogin.ts +29 -0
- package/src/components/Table/components/TableHead/tableHead.tsx +26 -15
- package/src/components/common/CustomIcon/components/CloseIcon/closeIcon.tsx +17 -0
- package/src/components/common/LoginDialog/constants.ts +33 -0
- package/src/components/common/LoginDialog/loginDialog.styles.ts +51 -0
- package/src/components/common/LoginDialog/loginDialog.tsx +56 -0
- package/src/components/common/LoginDialog/types.ts +4 -0
- package/src/components/common/Tabs/tabs.tsx +33 -3
- package/src/config/entities.ts +11 -1
- package/src/hooks/useCategoryFilter.ts +1 -0
- package/src/providers/config.tsx +10 -2
- package/src/providers/loginGuard/common/types.ts +21 -0
- package/src/providers/loginGuard/context.ts +12 -0
- package/src/providers/loginGuard/hook.ts +14 -0
- package/src/providers/loginGuard/provider.tsx +76 -0
- package/src/styles/common/mui/typography.ts +8 -0
- package/tests/dataDictionary_utils.test.ts +153 -0
- package/tests/provider.test.tsx +191 -0
- package/types/data-explorer-ui.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [21.4.0](https://github.com/DataBiosphere/findable-ui/compare/v21.3.0...v21.4.0) (2025-02-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* added check login required for export/download [#283](https://github.com/DataBiosphere/findable-ui/issues/283) ([#324](https://github.com/DataBiosphere/findable-ui/issues/324)) ([badb6ab](https://github.com/DataBiosphere/findable-ui/commit/badb6abe9319625a7fdabfe290434a05115cc2a9))
|
|
9
|
+
* use anchor tags for all header and footer links ([#297](https://github.com/DataBiosphere/findable-ui/issues/297)) ([#322](https://github.com/DataBiosphere/findable-ui/issues/322)) ([95effbf](https://github.com/DataBiosphere/findable-ui/commit/95effbfcdb65d71d10141c287b34043086c261e5))
|
|
10
|
+
|
|
11
|
+
## [21.3.0](https://github.com/DataBiosphere/findable-ui/compare/v21.2.0...v21.3.0) (2025-02-14)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add data dictionary tooltip support [#4131](https://github.com/DataBiosphere/findable-ui/issues/4131) ([#320](https://github.com/DataBiosphere/findable-ui/issues/320)) ([849e5cf](https://github.com/DataBiosphere/findable-ui/commit/849e5cf5898f71be210436863c9b10baf85a8427))
|
|
17
|
+
|
|
3
18
|
## [21.2.0](https://github.com/DataBiosphere/findable-ui/compare/v21.1.1...v21.2.0) (2025-02-12)
|
|
4
19
|
|
|
5
20
|
|
package/lib/common/entities.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model of a value of a metadata class.
|
|
3
|
+
*/
|
|
4
|
+
export interface Attribute {
|
|
5
|
+
description: string;
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
1
9
|
/**
|
|
2
10
|
* Filterable metadata keys.
|
|
3
11
|
*/
|
|
@@ -10,10 +18,34 @@ export interface CategoryTag {
|
|
|
10
18
|
onRemove: () => void;
|
|
11
19
|
superseded: boolean;
|
|
12
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Model of a metadata class, to be specified manually or built from LinkML schema.
|
|
23
|
+
*/
|
|
24
|
+
export interface Class {
|
|
25
|
+
attributes: Attribute[];
|
|
26
|
+
description: string;
|
|
27
|
+
key: string;
|
|
28
|
+
label: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
13
31
|
/**
|
|
14
32
|
* Category values to be used as keys. For example, "Homo sapiens" or "10X 3' v2 sequencing".
|
|
15
33
|
*/
|
|
16
34
|
export type CategoryValueKey = unknown;
|
|
35
|
+
/**
|
|
36
|
+
* Model of a metadata dictionary containing a set of classes and their definitions.
|
|
37
|
+
*/
|
|
38
|
+
export interface DataDictionary {
|
|
39
|
+
classes: Class[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Label and description values from a data dictionary that are added to a site
|
|
43
|
+
* config value.
|
|
44
|
+
*/
|
|
45
|
+
export interface DataDictionaryAnnotation {
|
|
46
|
+
description: string;
|
|
47
|
+
label: string;
|
|
48
|
+
}
|
|
17
49
|
/**
|
|
18
50
|
* Set of selected category values.
|
|
19
51
|
*/
|
|
@@ -63,6 +95,7 @@ export interface SelectCategoryValueView {
|
|
|
63
95
|
* View model of category, for multiselect categories.
|
|
64
96
|
*/
|
|
65
97
|
export interface SelectCategoryView {
|
|
98
|
+
annotation?: DataDictionaryAnnotation;
|
|
66
99
|
isDisabled?: boolean;
|
|
67
100
|
key: CategoryKey;
|
|
68
101
|
label: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DataDictionaryAnnotation } from "../../../common/entities";
|
|
2
|
+
import { SiteConfig } from "../../../config/entities";
|
|
3
|
+
/**
|
|
4
|
+
* Annotate each entity column configuration with data dictionary values. Specifically,
|
|
5
|
+
* look up label and description for each column key.
|
|
6
|
+
* @param siteConfig - Site configuration to annotate.
|
|
7
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
8
|
+
*/
|
|
9
|
+
export declare function annotateColumnConfig(siteConfig: SiteConfig, annotationsByKey: Record<string, DataDictionaryAnnotation>): void;
|
|
10
|
+
/**
|
|
11
|
+
* Annotate filter and colummn configuration with data dictionary values. Note this
|
|
12
|
+
* functionality mutates the site config. A possible future improvement would be to
|
|
13
|
+
* create either a specific "raw" or "annotated" type to indicate clearly the point
|
|
14
|
+
* at which the config has been annotated.
|
|
15
|
+
* @param siteConfig - The site configuration to annotate.
|
|
16
|
+
*/
|
|
17
|
+
export declare function annotateSiteConfig(siteConfig: SiteConfig): void;
|
|
18
|
+
/**
|
|
19
|
+
* Annotate entity configuration with data dictionary values. Specifically, look
|
|
20
|
+
* up label and description for each entity key.
|
|
21
|
+
* @param siteConfig - The site configuration to annotate.
|
|
22
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
23
|
+
*/
|
|
24
|
+
export declare function annotateEntityConfig(siteConfig: SiteConfig, annotationsByKey: Record<string, DataDictionaryAnnotation>): void;
|
|
25
|
+
/**
|
|
26
|
+
* Annotate top-level (app-wide) category config with data dictionary values.
|
|
27
|
+
* Specifically, look up label and description for each filter key.
|
|
28
|
+
* @param siteConfig - Site configuration to annotate.
|
|
29
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
30
|
+
*/
|
|
31
|
+
export declare function annotateDefaultCategoryConfig(siteConfig: SiteConfig, annotationsByKey: Record<string, DataDictionaryAnnotation>): void;
|
|
32
|
+
/**
|
|
33
|
+
* Annotate entity-specific category config with data dictionary values. Specifically,
|
|
34
|
+
* look up label and description for each category key.
|
|
35
|
+
* @param siteConfig - Site configuration to annotate.
|
|
36
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
37
|
+
*/
|
|
38
|
+
export declare function annotateEntityCategoryConfig(siteConfig: SiteConfig, annotationsByKey: Record<string, DataDictionaryAnnotation>): void;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Annotate each entity column configuration with data dictionary values. Specifically,
|
|
3
|
+
* look up label and description for each column key.
|
|
4
|
+
* @param siteConfig - Site configuration to annotate.
|
|
5
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
6
|
+
*/
|
|
7
|
+
export function annotateColumnConfig(siteConfig, annotationsByKey) {
|
|
8
|
+
// Annotate every column in every entity.
|
|
9
|
+
siteConfig.entities.forEach((entity) => {
|
|
10
|
+
entity.list.columns.forEach((columnConfig) => {
|
|
11
|
+
// Find the annotation for the column key.
|
|
12
|
+
const annotation = annotationsByKey[columnConfig.id];
|
|
13
|
+
if (!annotation) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!columnConfig.meta) {
|
|
17
|
+
columnConfig.meta = {};
|
|
18
|
+
}
|
|
19
|
+
columnConfig.meta.annotation = annotation;
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Annotate filter and colummn configuration with data dictionary values. Note this
|
|
25
|
+
* functionality mutates the site config. A possible future improvement would be to
|
|
26
|
+
* create either a specific "raw" or "annotated" type to indicate clearly the point
|
|
27
|
+
* at which the config has been annotated.
|
|
28
|
+
* @param siteConfig - The site configuration to annotate.
|
|
29
|
+
*/
|
|
30
|
+
export function annotateSiteConfig(siteConfig) {
|
|
31
|
+
// Build and map data dictionary annotations by key.
|
|
32
|
+
const { dataDictionary } = siteConfig;
|
|
33
|
+
if (!dataDictionary) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const annotationsByKey = keyAnnotationsByKey(dataDictionary);
|
|
37
|
+
// Annotate elements of site config.
|
|
38
|
+
annotateEntityConfig(siteConfig, annotationsByKey);
|
|
39
|
+
annotateDefaultCategoryConfig(siteConfig, annotationsByKey);
|
|
40
|
+
annotateEntityCategoryConfig(siteConfig, annotationsByKey);
|
|
41
|
+
annotateColumnConfig(siteConfig, annotationsByKey);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Annotate entity configuration with data dictionary values. Specifically, look
|
|
45
|
+
* up label and description for each entity key.
|
|
46
|
+
* @param siteConfig - The site configuration to annotate.
|
|
47
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
48
|
+
*/
|
|
49
|
+
export function annotateEntityConfig(siteConfig, annotationsByKey) {
|
|
50
|
+
// Annotate every entity.
|
|
51
|
+
siteConfig.entities.forEach((entityConfig) => {
|
|
52
|
+
// Check entity for a data dictionary key.
|
|
53
|
+
const { key } = entityConfig;
|
|
54
|
+
if (!key) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// Find corresponding annotation for the key and set on entity config.
|
|
58
|
+
entityConfig.annotation = annotationsByKey[key];
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Annotate top-level (app-wide) category config with data dictionary values.
|
|
63
|
+
* Specifically, look up label and description for each filter key.
|
|
64
|
+
* @param siteConfig - Site configuration to annotate.
|
|
65
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
66
|
+
*/
|
|
67
|
+
export function annotateDefaultCategoryConfig(siteConfig, annotationsByKey) {
|
|
68
|
+
const { categoryGroupConfig } = siteConfig;
|
|
69
|
+
if (categoryGroupConfig) {
|
|
70
|
+
annotateCategoryGroupConfig(categoryGroupConfig, annotationsByKey);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Annotate entity-specific category config with data dictionary values. Specifically,
|
|
75
|
+
* look up label and description for each category key.
|
|
76
|
+
* @param siteConfig - Site configuration to annotate.
|
|
77
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
78
|
+
*/
|
|
79
|
+
export function annotateEntityCategoryConfig(siteConfig, annotationsByKey) {
|
|
80
|
+
// Annotate every category in every entity.
|
|
81
|
+
siteConfig.entities.forEach((entityConfig) => {
|
|
82
|
+
const { categoryGroupConfig } = entityConfig;
|
|
83
|
+
if (categoryGroupConfig) {
|
|
84
|
+
annotateCategoryGroupConfig(categoryGroupConfig, annotationsByKey);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Annonate category group configuration with data dictionary values.
|
|
90
|
+
* @param categoryGroupConfig - Category group to annotate.
|
|
91
|
+
* @param annotationsByKey - Data dictionary annotations keyed by key.
|
|
92
|
+
*/
|
|
93
|
+
function annotateCategoryGroupConfig(categoryGroupConfig, annotationsByKey) {
|
|
94
|
+
categoryGroupConfig.categoryGroups.forEach((categoryGroup) => {
|
|
95
|
+
categoryGroup.categoryConfigs.forEach((categorConfig) => {
|
|
96
|
+
categorConfig.annotation = annotationsByKey[categorConfig.key];
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Transform a data dictionary into a key-annotation map. Build annotations for both
|
|
102
|
+
* classes and attributes and add to map.
|
|
103
|
+
* @param dataDictionary - Data dictionary to transform into a key-annotation map.
|
|
104
|
+
* @returns Key-annotation map.
|
|
105
|
+
*/
|
|
106
|
+
function keyAnnotationsByKey(dataDictionary) {
|
|
107
|
+
return dataDictionary.classes.reduce((acc, cls) => {
|
|
108
|
+
// Add class to map.
|
|
109
|
+
acc[cls.key] = {
|
|
110
|
+
description: cls.description,
|
|
111
|
+
label: cls.label,
|
|
112
|
+
};
|
|
113
|
+
// Add each class attribute to the map.
|
|
114
|
+
cls.attributes.forEach((attribute) => {
|
|
115
|
+
acc[attribute.key] = {
|
|
116
|
+
description: attribute.description,
|
|
117
|
+
label: attribute.label,
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
return acc;
|
|
121
|
+
}, {});
|
|
122
|
+
}
|
|
@@ -2,12 +2,17 @@ import { Tooltip } from "@mui/material";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { useDownloadStatus } from "../../../../../../hooks/useDownloadStatus";
|
|
4
4
|
import { useFileManifestState } from "../../../../../../hooks/useFileManifestState";
|
|
5
|
+
import { useLoginGuard } from "../../../../../../providers/loginGuard/hook";
|
|
5
6
|
import { ButtonPrimary } from "../../../../../common/Button/components/ButtonPrimary/buttonPrimary";
|
|
6
7
|
export const ExportButton = ({ Button = ButtonPrimary, children, onClick, }) => {
|
|
7
8
|
const downloadStatus = useDownloadStatus();
|
|
8
9
|
const { fileManifestState: { isLoading }, } = useFileManifestState();
|
|
10
|
+
// Prompt user for login before export, if required.
|
|
11
|
+
const { requireLogin } = useLoginGuard();
|
|
9
12
|
return (React.createElement(Tooltip, { arrow: true, title: isLoading ? null : downloadStatus.message },
|
|
10
13
|
React.createElement("span", null,
|
|
11
|
-
React.createElement(Button, { disabled: isLoading || downloadStatus.disabled || downloadStatus.isLoading, onClick:
|
|
14
|
+
React.createElement(Button, { disabled: isLoading || downloadStatus.disabled || downloadStatus.isLoading, onClick: () => {
|
|
15
|
+
requireLogin(onClick);
|
|
16
|
+
} },
|
|
12
17
|
React.createElement("span", null, children)))));
|
|
13
18
|
};
|
|
@@ -3,6 +3,7 @@ import copy from "copy-to-clipboard";
|
|
|
3
3
|
import React, { useRef } from "react";
|
|
4
4
|
import { useDownloadStatus } from "../../../../../../../../hooks/useDownloadStatus";
|
|
5
5
|
import { useFileManifestDownload } from "../../../../../../../../hooks/useFileManifest/useFileManifestDownload";
|
|
6
|
+
import { useLoginGuard } from "../../../../../../../../providers/loginGuard/hook";
|
|
6
7
|
import { ButtonGroup } from "../../../../../../../common/ButtonGroup/buttonGroup";
|
|
7
8
|
import { ButtonGroupButton } from "../../../../../../../common/ButtonGroup/components/ButtonGroupButton/buttonGroupButton";
|
|
8
9
|
import { ContentCopyIconSmall, DownloadIconSmall, } from "../../../../../../../common/CustomIcon/common/constants";
|
|
@@ -16,6 +17,8 @@ export const FileManifestDownload = ({ filters, }) => {
|
|
|
16
17
|
const { fileName, isIdle, isLoading, manifestURL } = useFileManifestDownload(filters, disabled);
|
|
17
18
|
const isInProgress = (isIdle || isLoading) && !disabled;
|
|
18
19
|
const isReady = Boolean(manifestURL) || disabled;
|
|
20
|
+
// Prompt user for login before download and copy, if required.
|
|
21
|
+
const { requireLogin } = useLoginGuard();
|
|
19
22
|
// Copies file manifest.
|
|
20
23
|
const copyManifestURL = (url) => {
|
|
21
24
|
if (!url)
|
|
@@ -39,8 +42,8 @@ export const FileManifestDownload = ({ filters, }) => {
|
|
|
39
42
|
React.createElement(Tooltip, { arrow: true, title: message },
|
|
40
43
|
React.createElement("span", null,
|
|
41
44
|
React.createElement(ButtonGroup, { Buttons: [
|
|
42
|
-
React.createElement(ButtonGroupButton, { key: "download", action: "Download file manifest", disabled: disabled, label: React.createElement(DownloadIconSmall, null), onClick: downloadManifestURL }),
|
|
43
|
-
React.createElement(ButtonGroupButton, { key: "copy", action: "Copy file manifest", disabled: disabled, label: React.createElement(ContentCopyIconSmall, null), onClick: () => copyManifestURL(manifestURL) }),
|
|
45
|
+
React.createElement(ButtonGroupButton, { key: "download", action: "Download file manifest", disabled: disabled, label: React.createElement(DownloadIconSmall, null), onClick: () => requireLogin(downloadManifestURL) }),
|
|
46
|
+
React.createElement(ButtonGroupButton, { key: "copy", action: "Copy file manifest", disabled: disabled, label: React.createElement(ContentCopyIconSmall, null), onClick: () => requireLogin(() => copyManifestURL(manifestURL)) }),
|
|
44
47
|
] })))),
|
|
45
48
|
React.createElement(TableCell, null, fileName))) : (React.createElement(TableCell, null, "The manifest is not available for this project.")))))))));
|
|
46
49
|
};
|
|
@@ -48,7 +48,7 @@ export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterD
|
|
|
48
48
|
trackFilterOpened?.({ category: categoryView.key });
|
|
49
49
|
};
|
|
50
50
|
return (React.createElement(React.Fragment, null,
|
|
51
|
-
React.createElement(FilterLabel, { count: categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
|
|
51
|
+
React.createElement(FilterLabel, { annotation: categoryView.annotation, count: categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
|
|
52
52
|
React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, TransitionComponent: TransitionComponent, transitionDuration: TransitionDuration },
|
|
53
53
|
isOpen && isFilterDrawer && (React.createElement(IconButton, { Icon: CloseRounded, onClick: onCloseFilters, size: "medium" })),
|
|
54
54
|
React.createElement(FilterMenu, { categorySection: categorySection, categoryKey: categoryView.key, categoryLabel: categoryView.label, isFilterDrawer: isFilterDrawer, onFilter: onFilter, onCloseFilter: onCloseFilter, values: categoryView.values })),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MouseEvent } from "react";
|
|
2
|
+
import { DataDictionaryAnnotation } from "../../../../common/entities";
|
|
2
3
|
export interface FilterLabelProps {
|
|
4
|
+
annotation?: DataDictionaryAnnotation;
|
|
3
5
|
count?: number;
|
|
4
6
|
disabled?: boolean;
|
|
5
7
|
isOpen: boolean;
|
|
6
8
|
label: string;
|
|
7
9
|
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
8
10
|
}
|
|
9
|
-
export declare const FilterLabel: ({ count, disabled, isOpen, label, onClick, }: FilterLabelProps) => JSX.Element;
|
|
11
|
+
export declare const FilterLabel: ({ annotation, count, disabled, isOpen, label, onClick, }: FilterLabelProps) => JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import ArrowDropDownRoundedIcon from "@mui/icons-material/ArrowDropDownRounded";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Tooltip } from "../../../DataDictionary/components/Tooltip/tooltip";
|
|
3
4
|
import { FilterLabel as Label } from "./filterLabel.styles";
|
|
4
|
-
export const FilterLabel = ({ count, disabled = false, isOpen, label, onClick, }) => {
|
|
5
|
+
export const FilterLabel = ({ annotation, count, disabled = false, isOpen, label, onClick, }) => {
|
|
5
6
|
const filterLabel = count ? `${label}\xa0(${count})` : label; // When the count is present, a non-breaking space is used to prevent it from being on its own line
|
|
6
|
-
return (React.createElement(
|
|
7
|
+
return (React.createElement(Tooltip, { description: annotation?.description, title: annotation?.label },
|
|
8
|
+
React.createElement(Label, { color: "inherit", disabled: disabled, endIcon: React.createElement(ArrowDropDownRoundedIcon, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick }, filterLabel)));
|
|
7
9
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Box } from "@mui/material";
|
|
2
2
|
import React, { Fragment, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { useFileLocation } from "../../../../hooks/useFileLocation";
|
|
4
|
+
import { useLoginGuard } from "../../../../providers/loginGuard/hook";
|
|
4
5
|
import { DownloadIcon } from "../../../common/CustomIcon/components/DownloadIcon/downloadIcon";
|
|
5
6
|
import { LoadingIcon } from "../../../common/CustomIcon/components/LoadingIcon/loadingIcon";
|
|
6
7
|
import { IconButton } from "../../../common/IconButton/iconButton";
|
|
@@ -11,6 +12,8 @@ export const AzulFileDownload = ({ entityName, relatedEntityId, relatedEntityNam
|
|
|
11
12
|
const { fileUrl, isLoading, run } = useFileLocation(url);
|
|
12
13
|
const downloadRef = useRef(null);
|
|
13
14
|
const [isRequestPending, setIsRequestPending] = useState(false);
|
|
15
|
+
// Prompt user for login before download, if required.
|
|
16
|
+
const { requireLogin } = useLoginGuard();
|
|
14
17
|
// Initiates file download when file location request is successful.
|
|
15
18
|
useEffect(() => {
|
|
16
19
|
if (!fileUrl)
|
|
@@ -22,11 +25,13 @@ export const AzulFileDownload = ({ entityName, relatedEntityId, relatedEntityNam
|
|
|
22
25
|
downloadEl.click();
|
|
23
26
|
setIsRequestPending(false);
|
|
24
27
|
}, [fileUrl]);
|
|
28
|
+
// Initiates file download when download button is clicked.
|
|
29
|
+
const handleDownloadClick = () => {
|
|
30
|
+
setIsRequestPending(true);
|
|
31
|
+
trackFileDownloaded(entityName, relatedEntityId, relatedEntityName);
|
|
32
|
+
run();
|
|
33
|
+
};
|
|
25
34
|
return (React.createElement(Fragment, null,
|
|
26
|
-
isRequestPending ? (React.createElement(StyledIconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID, Icon: LoadingIcon, size: "medium" })) : (React.createElement(IconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID, disabled: !url, Icon: isLoading ? LoadingIcon : DownloadIcon, onClick: () =>
|
|
27
|
-
setIsRequestPending(true);
|
|
28
|
-
trackFileDownloaded(entityName, relatedEntityId, relatedEntityName);
|
|
29
|
-
run();
|
|
30
|
-
}, size: "medium" })),
|
|
35
|
+
isRequestPending ? (React.createElement(StyledIconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_PENDING_TEST_ID, Icon: LoadingIcon, size: "medium" })) : (React.createElement(IconButton, { color: "primary", "data-testid": AZUL_FILE_REQUEST_DOWNLOAD_TEST_ID, disabled: !url, Icon: isLoading ? LoadingIcon : DownloadIcon, onClick: () => requireLogin(handleDownloadClick), size: "medium" })),
|
|
31
36
|
React.createElement(Box, { component: "a", "data-testid": AZUL_FILE_DOWNLOAD_TEST_ID, download: true, ref: downloadRef, sx: { display: "none" } })));
|
|
32
37
|
};
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* @returns tabs list.
|
|
5
5
|
*/
|
|
6
6
|
export function getEntityListTabs(entities) {
|
|
7
|
-
return entities.reduce((acc, { label, listView: { enableTab = true } = {}, route, tabIcon: icon, tabIconPosition: iconPosition, }) => {
|
|
7
|
+
return entities.reduce((acc, { annotation, label, listView: { enableTab = true } = {}, route, tabIcon: icon, tabIconPosition: iconPosition, }) => {
|
|
8
8
|
if (enableTab) {
|
|
9
9
|
acc.push({
|
|
10
|
+
annotation,
|
|
10
11
|
icon,
|
|
11
12
|
iconPosition,
|
|
12
13
|
label,
|
|
@@ -26,7 +26,7 @@ export const NavigationMenu = ({ closeAncestor, isSelected = false, isSubMenu =
|
|
|
26
26
|
} },
|
|
27
27
|
React.createElement(MPaper, { variant: "menu" },
|
|
28
28
|
React.createElement(MClickAwayListener, { onClickAway: onClose },
|
|
29
|
-
React.createElement(MMenuList,
|
|
29
|
+
React.createElement(MMenuList, { component: "div" },
|
|
30
30
|
React.createElement(NavigationMenuItems, { closeMenu: () => {
|
|
31
31
|
onClose();
|
|
32
32
|
closeAncestor?.();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Divider, ListItemIcon, ListItemText, MenuItem as MMenuItem, } from "@mui/material";
|
|
2
|
-
import
|
|
1
|
+
import { Divider, ListItemIcon, ListItemText, Link as MLink, MenuItem as MMenuItem, } from "@mui/material";
|
|
2
|
+
import Link from "next/link";
|
|
3
3
|
import React, { Fragment } from "react";
|
|
4
4
|
import { TEXT_BODY_400, TEXT_BODY_500, TEXT_BODY_SMALL_400_2_LINES, TEXT_UPPERCASE_500, } from "../../../../../../../../../../theme/common/typography";
|
|
5
5
|
import { ANCHOR_TARGET, REL_ATTRIBUTE, } from "../../../../../../../../../Links/common/entities";
|
|
@@ -8,23 +8,22 @@ import { isNavigationLinkSelected } from "../../common/utils";
|
|
|
8
8
|
import { NavigationMenu } from "../NavigationMenu/navigationMenu";
|
|
9
9
|
import { POPPER_PROPS } from "./common/constants";
|
|
10
10
|
export const NavigationMenuItems = ({ closeMenu, menuItems, pathname, }) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
React.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
divider && React.createElement(Divider, null))))));
|
|
11
|
+
return (React.createElement(React.Fragment, null, menuItems.map(({ description, divider, icon, label, menuItems: nestedMenuItems, selectedPatterns, target = ANCHOR_TARGET.SELF, url, }, i) => {
|
|
12
|
+
const isClientSide = isClientSideNavigation(url);
|
|
13
|
+
return nestedMenuItems ? (React.createElement(NavigationMenu, { key: i, closeAncestor: closeMenu, isSelected: isNavigationLinkSelected(pathname, selectedPatterns), isSubMenu: true, menuItems: nestedMenuItems, menuLabel: label, pathname: pathname, popperProps: POPPER_PROPS })) : (React.createElement(Fragment, { key: i },
|
|
14
|
+
React.createElement(MMenuItem, { component: isClientSide ? Link : MLink, disabled: !url, href: url, onClick: () => closeMenu(), rel: isClientSide
|
|
15
|
+
? REL_ATTRIBUTE.NO_OPENER
|
|
16
|
+
: REL_ATTRIBUTE.NO_OPENER_NO_REFERRER, selected: isNavigationLinkSelected(pathname, selectedPatterns), target: target },
|
|
17
|
+
icon && React.createElement(ListItemIcon, null, icon),
|
|
18
|
+
React.createElement(ListItemText, { primary: label, primaryTypographyProps: {
|
|
19
|
+
variant: url
|
|
20
|
+
? description
|
|
21
|
+
? TEXT_BODY_500
|
|
22
|
+
: TEXT_BODY_400
|
|
23
|
+
: TEXT_UPPERCASE_500,
|
|
24
|
+
}, secondary: description, secondaryTypographyProps: {
|
|
25
|
+
variant: TEXT_BODY_SMALL_400_2_LINES,
|
|
26
|
+
} })),
|
|
27
|
+
divider && React.createElement(Divider, null)));
|
|
28
|
+
})));
|
|
30
29
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NAVIGATION_TEST_ID = "navigation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const NAVIGATION_TEST_ID = "navigation";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from "react";
|
|
2
2
|
import { BreakpointKey } from "../../../../../../../../hooks/useBreakpointHelper";
|
|
3
3
|
import { ANCHOR_TARGET } from "../../../../../../../Links/common/entities";
|
|
4
|
+
import { TestIdProps } from "../../../../../../../types";
|
|
4
5
|
import { SelectedMatch } from "../../../../common/entities";
|
|
5
6
|
import { HeaderProps } from "../../../../header";
|
|
6
7
|
import { MenuItem } from "./components/NavigationMenuItems/navigationMenuItems";
|
|
@@ -15,7 +16,7 @@ export interface NavLinkItem {
|
|
|
15
16
|
url: string;
|
|
16
17
|
visible?: Partial<Record<BreakpointKey, boolean>>;
|
|
17
18
|
}
|
|
18
|
-
export interface NavigationProps {
|
|
19
|
+
export interface NavigationProps extends TestIdProps {
|
|
19
20
|
className?: string;
|
|
20
21
|
closeAncestor?: () => void;
|
|
21
22
|
headerProps?: HeaderProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button, Divider } from "@mui/material";
|
|
2
|
-
import
|
|
1
|
+
import { Button, Divider, Link as MLink } from "@mui/material";
|
|
2
|
+
import Link from "next/link";
|
|
3
3
|
import React, { forwardRef, Fragment } from "react";
|
|
4
4
|
import { ANCHOR_TARGET, REL_ATTRIBUTE, } from "../../../../../../../Links/common/entities";
|
|
5
5
|
import { isClientSideNavigation } from "../../../../../../../Links/common/utils";
|
|
@@ -8,19 +8,18 @@ import { NavigationButtonLabel } from "./components/NavigationButtonLabel/naviga
|
|
|
8
8
|
import { NavigationDrawer } from "./components/NavigationDrawer/navigationDrawer";
|
|
9
9
|
import { NavigationMenu } from "./components/NavigationMenu/navigationMenu";
|
|
10
10
|
import { Navigation as Links } from "./navigation.styles";
|
|
11
|
-
export const Navigation = forwardRef(function Navigation({ className, closeAncestor, headerProps, isMenuIn = false, links, pathname, style, }, ref) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
divider && React.createElement(Divider, null))))));
|
|
11
|
+
export const Navigation = forwardRef(function Navigation({ className, closeAncestor, headerProps, isMenuIn = false, links, pathname, style, testId, }, ref) {
|
|
12
|
+
return (React.createElement(Links, { ref: ref, className: className, "data-testid": testId, isMenuIn: isMenuIn, style: style }, links.map(({ divider, label, menuItems, selectedPatterns, target = ANCHOR_TARGET.SELF, url, }, i) => {
|
|
13
|
+
const isClientSide = isClientSideNavigation(url);
|
|
14
|
+
return menuItems ? (React.createElement(Fragment, { key: i },
|
|
15
|
+
isMenuIn ? (React.createElement(NavigationDrawer, { closeAncestor: closeAncestor, headerProps: headerProps, isMenuIn: isMenuIn, isSelected: isNavigationLinkSelected(pathname, selectedPatterns), menuItems: menuItems, menuLabel: label, pathname: pathname })) : (React.createElement(NavigationMenu, { closeAncestor: closeAncestor, isSelected: isNavigationLinkSelected(pathname, selectedPatterns), menuItems: menuItems, menuLabel: label, pathname: pathname })),
|
|
16
|
+
divider && React.createElement(Divider, null))) : (React.createElement(Fragment, { key: i },
|
|
17
|
+
React.createElement(Button, { component: isClientSide ? Link : MLink, disabled: !url, href: url, onClick: () => closeAncestor?.(), rel: isClientSide
|
|
18
|
+
? REL_ATTRIBUTE.NO_OPENER
|
|
19
|
+
: REL_ATTRIBUTE.NO_OPENER_NO_REFERRER, target: target, variant: isNavigationLinkSelected(pathname, selectedPatterns)
|
|
20
|
+
? "activeNav"
|
|
21
|
+
: "nav" },
|
|
22
|
+
React.createElement(NavigationButtonLabel, { label: label })),
|
|
23
|
+
divider && React.createElement(Divider, null)));
|
|
24
|
+
})));
|
|
26
25
|
});
|
|
@@ -7,6 +7,7 @@ import { Actions } from "./components/Content/components/Actions/actions";
|
|
|
7
7
|
import { Authentication, renderButton as renderAuthenticationButton, renderIconButton as renderAuthenticationIconButton, } from "./components/Content/components/Actions/components/Authentication/authentication";
|
|
8
8
|
import { Menu } from "./components/Content/components/Actions/components/Menu/menu";
|
|
9
9
|
import { renderButton as renderSearchButton, renderIconButton as renderSearchIconButton, Search, } from "./components/Content/components/Actions/components/Search/search";
|
|
10
|
+
import { NAVIGATION_TEST_ID } from "./components/Content/components/Navigation/constants";
|
|
10
11
|
import { Navigation as DXNavigation } from "./components/Content/components/Navigation/navigation";
|
|
11
12
|
import { Slogan } from "./components/Content/components/Slogan/slogan";
|
|
12
13
|
import { Divider } from "./components/Content/components/Slogan/slogan.styles";
|
|
@@ -38,7 +39,7 @@ export const Header = ({ ...headerProps }) => {
|
|
|
38
39
|
isIn.isSloganIn && React.createElement(Slogan, { slogan: slogan }),
|
|
39
40
|
isIn.isLeftNavigationIn && (React.createElement(DXNavigation, { ...navigationProps, links: navItemsL })))),
|
|
40
41
|
React.createElement(Fade, { ...FADE_TRANSITION_PROPS, in: isIn.isCenterGroupIn },
|
|
41
|
-
React.createElement(Center, null, isIn.isCenterNavigationIn && (React.createElement(DXNavigation, { ...navigationProps, links: navItemsC })))),
|
|
42
|
+
React.createElement(Center, null, isIn.isCenterNavigationIn && (React.createElement(DXNavigation, { ...navigationProps, testId: NAVIGATION_TEST_ID, links: navItemsC })))),
|
|
42
43
|
React.createElement(Fade, { ...FADE_TRANSITION_PROPS, in: isIn.isRightGroupIn },
|
|
43
44
|
React.createElement(Right, null,
|
|
44
45
|
isIn.isRightNavigationIn && (React.createElement(DXNavigation, { ...navigationProps, links: navItemsR })),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../Button/button";
|
|
3
|
+
export const Buttons = ({ className, handleLogin, providers = [], ...props /* Mui ButtonProps */ }) => {
|
|
4
|
+
return providers?.map((provider) => (React.createElement(Button, { key: provider.id, className: className, endIcon: "icon" in provider && provider.icon, onClick: () => handleLogin(provider.id), ...props }, provider.name)));
|
|
5
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonProps } from "@mui/material";
|
|
2
|
+
import { ClientSafeProvider } from "next-auth/react";
|
|
3
|
+
import { OAuthProvider } from "../../../../config/entities";
|
|
4
|
+
import { BaseComponentProps } from "../../../../theme/common/entities";
|
|
5
|
+
export interface Props<P> extends BaseComponentProps, ButtonProps {
|
|
6
|
+
handleLogin: (providerId: string) => void;
|
|
7
|
+
providers?: ClientSafeProvider[] | OAuthProvider<P>[];
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Checkbox, Typography } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TEXT_BODY_400 } from "../../../../../../theme/common/typography";
|
|
4
|
+
import { CheckedIcon } from "../../../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
5
|
+
import { UncheckedErrorIcon } from "../../../../../common/CustomIcon/components/UncheckedErrorIcon/uncheckedErrorIcon";
|
|
6
|
+
import { UncheckedIcon } from "../../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
7
|
+
import { StyledGrid2 } from "./consent.styles";
|
|
8
|
+
export const Consent = ({ children, className, handleConsent, isDisabled, isError, ...props /* Mui Grid2Props */ }) => {
|
|
9
|
+
if (isDisabled)
|
|
10
|
+
return null;
|
|
11
|
+
return (React.createElement(StyledGrid2, { className: className, ...props },
|
|
12
|
+
React.createElement(Checkbox, { checkedIcon: React.createElement(CheckedIcon, null), icon: isError ? React.createElement(UncheckedErrorIcon, null) : React.createElement(UncheckedIcon, null), onChange: handleConsent }),
|
|
13
|
+
React.createElement(Typography, { variant: TEXT_BODY_400 }, children)));
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const StyledGrid2: import("@emotion/styled").StyledComponent<import("@mui/material").GridBaseProps & {
|
|
2
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
3
|
+
} & import("@mui/system").SystemProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
+
}, ("fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "textTransform" | "p" | "color" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontStyle" | "textAlign") | "sx" | keyof import("@mui/material").GridBaseProps> & {
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
|
+
export const StyledGrid2 = styled(Grid2) `
|
|
4
|
+
align-items: center;
|
|
5
|
+
align-self: flex-start;
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 12px;
|
|
8
|
+
|
|
9
|
+
.MuiTypography-text-body-400 {
|
|
10
|
+
.MuiLink-root {
|
|
11
|
+
color: inherit;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|