@databiosphere/findable-ui 35.0.2 → 35.1.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 (161) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/lib/common/entities.d.ts +1 -0
  4. package/lib/components/DataDictionary/components/Table/hook.js +1 -0
  5. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +15 -2
  6. package/lib/providers/exploreState/entities/state.js +12 -9
  7. package/package.json +1 -1
  8. package/src/common/entities.ts +1 -0
  9. package/src/components/DataDictionary/components/Table/hook.ts +1 -0
  10. package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +17 -4
  11. package/src/providers/exploreState/entities/state.ts +13 -10
  12. package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +0 -6
  13. package/lib/components/DataDictionary/components/Table/columns/columnDef.js +0 -33
  14. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +0 -5
  15. package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +0 -5
  16. package/lib/components/DataDictionary/components/Table/columns/types.d.ts +0 -2
  17. package/lib/components/DataDictionary/components/Table/columns/types.js +0 -1
  18. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +0 -4
  19. package/lib/components/DataDictionary/components/Table/components/BasicCell/types.js +0 -1
  20. package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +0 -8
  21. package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +0 -36
  22. package/lib/components/Filter/components/Filter/filter.stories.d.ts +0 -25
  23. package/lib/components/Filter/components/Filter/filter.stories.js +0 -42
  24. package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +0 -16
  25. package/lib/components/Filter/components/FilterTag/filterTag.stories.js +0 -17
  26. package/lib/components/Filter/components/Filters/filters.stories.d.ts +0 -6
  27. package/lib/components/Filter/components/Filters/filters.stories.js +0 -91
  28. package/lib/components/Index/components/Cell/cell.d.ts +0 -7
  29. package/lib/components/Index/components/Cell/cell.js +0 -10
  30. package/lib/components/Index/components/EntitiesView/constants.d.ts +0 -1
  31. package/lib/components/Index/components/EntitiesView/constants.js +0 -1
  32. package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.d.ts +0 -13
  33. package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.js +0 -18
  34. package/lib/components/Index/components/Hero/hero.stories.d.ts +0 -23
  35. package/lib/components/Index/components/Hero/hero.stories.js +0 -22
  36. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +0 -8
  37. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +0 -57
  38. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +0 -4
  39. package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +0 -10
  40. package/lib/components/Index/components/NTag/nTag.d.ts +0 -10
  41. package/lib/components/Index/components/NTag/nTag.js +0 -8
  42. package/lib/components/Index/components/NTagCell/nTagCell.d.ts +0 -11
  43. package/lib/components/Index/components/NTagCell/nTagCell.js +0 -29
  44. package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +0 -5
  45. package/lib/components/Index/components/NTagCell/nTagCell.stories.js +0 -16
  46. package/lib/components/Index/components/TitleCell/titleCell.d.ts +0 -6
  47. package/lib/components/Index/components/TitleCell/titleCell.js +0 -10
  48. package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +0 -3
  49. package/lib/components/Index/components/TitleCell/titleCell.styles.js +0 -6
  50. package/lib/components/Index/index.stories.d.ts +0 -6
  51. package/lib/components/Index/index.stories.js +0 -26
  52. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +0 -6
  53. package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +0 -10
  54. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +0 -5
  55. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +0 -29
  56. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +0 -6
  57. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +0 -13
  58. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +0 -36
  59. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +0 -9
  60. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +0 -5
  61. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +0 -10
  62. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +0 -36
  63. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +0 -9
  64. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +0 -5
  65. package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +0 -19
  66. package/lib/components/Layout/components/Outline/common/constants.d.ts +0 -2
  67. package/lib/components/Layout/components/Outline/common/constants.js +0 -1
  68. package/lib/components/Login/login.stories.d.ts +0 -6
  69. package/lib/components/Login/login.stories.js +0 -31
  70. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +0 -16
  71. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +0 -28
  72. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +0 -5
  73. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +0 -46
  74. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +0 -3
  75. package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +0 -21
  76. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +0 -2
  77. package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +0 -37
  78. package/lib/components/TableCreator/common/constants.d.ts +0 -6
  79. package/lib/components/TableCreator/common/constants.js +0 -19
  80. package/lib/components/TableCreator/common/entities.d.ts +0 -5
  81. package/lib/components/TableCreator/common/entities.js +0 -1
  82. package/lib/components/TableCreator/tableCreator.styles.d.ts +0 -4
  83. package/lib/components/TableCreator/tableCreator.styles.js +0 -4
  84. package/lib/components/common/Alert/alert.stories.d.ts +0 -6
  85. package/lib/components/common/Alert/alert.stories.js +0 -36
  86. package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +0 -4
  87. package/lib/components/common/Alert/components/AlertText/alertText.styles.js +0 -19
  88. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +0 -7
  89. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +0 -5
  90. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +0 -3
  91. package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +0 -19
  92. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +0 -10
  93. package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +0 -16
  94. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +0 -3
  95. package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +0 -21
  96. package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +0 -3
  97. package/lib/components/common/Button/components/LoginButton/loginButton.js +0 -6
  98. package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +0 -7
  99. package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +0 -11
  100. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +0 -5
  101. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +0 -10
  102. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +0 -3
  103. package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +0 -9
  104. package/lib/hooks/useAuthentication/common/constants.d.ts +0 -4
  105. package/lib/hooks/useAuthentication/common/constants.js +0 -19
  106. package/lib/hooks/useAuthentication/common/entities.d.ts +0 -25
  107. package/lib/hooks/useAuthentication/common/entities.js +0 -11
  108. package/lib/hooks/useAuthentication/common/utils.d.ts +0 -15
  109. package/lib/hooks/useAuthentication/common/utils.js +0 -25
  110. package/lib/hooks/useAuthentication/useAuthentication.d.ts +0 -6
  111. package/lib/hooks/useAuthentication/useAuthentication.js +0 -9
  112. package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +0 -6
  113. package/lib/hooks/useAuthentication/useAuthenticationComplete.js +0 -55
  114. package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +0 -20
  115. package/lib/hooks/useAuthentication/useAuthenticationForm.js +0 -88
  116. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +0 -18
  117. package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +0 -50
  118. package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +0 -20
  119. package/lib/hooks/useAuthentication/useAuthenticationStatus.js +0 -32
  120. package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +0 -21
  121. package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +0 -41
  122. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +0 -18
  123. package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +0 -62
  124. package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +0 -24
  125. package/lib/hooks/useAuthentication/useFetchTerraProfile.js +0 -62
  126. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +0 -15
  127. package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +0 -62
  128. package/lib/hooks/useAuthentication/useTokenClient.d.ts +0 -11
  129. package/lib/hooks/useAuthentication/useTokenClient.js +0 -29
  130. package/lib/hooks/useAuthenticationConfig.d.ts +0 -6
  131. package/lib/hooks/useAuthenticationConfig.js +0 -14
  132. package/lib/hooks/useCategoryConfigs.d.ts +0 -6
  133. package/lib/hooks/useCategoryConfigs.js +0 -17
  134. package/lib/hooks/useEntityListRelatedView.d.ts +0 -15
  135. package/lib/hooks/useEntityListRelatedView.js +0 -62
  136. package/lib/hooks/useExploreMode.d.ts +0 -14
  137. package/lib/hooks/useExploreMode.js +0 -20
  138. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +0 -15
  139. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +0 -27
  140. package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +0 -5
  141. package/lib/hooks/useFileManifest/useFileManifestURL.js +0 -11
  142. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +0 -9
  143. package/lib/hooks/useFileManifest/useRequestFileManifest.js +0 -37
  144. package/lib/hooks/useLayoutState.d.ts +0 -6
  145. package/lib/hooks/useLayoutState.js +0 -9
  146. package/lib/hooks/useMenu.d.ts +0 -10
  147. package/lib/hooks/useMenu.js +0 -17
  148. package/lib/hooks/useMenuWithPosition.d.ts +0 -14
  149. package/lib/hooks/useMenuWithPosition.js +0 -33
  150. package/lib/hooks/useSessionTimeout.d.ts +0 -11
  151. package/lib/hooks/useSessionTimeout.js +0 -28
  152. package/lib/providers/authentication.d.ts +0 -51
  153. package/lib/providers/authentication.js +0 -110
  154. package/lib/providers/layoutState.d.ts +0 -40
  155. package/lib/providers/layoutState.js +0 -47
  156. package/lib/styles/common/mixins/shadows.d.ts +0 -3
  157. package/lib/styles/common/mixins/shadows.js +0 -4
  158. package/lib/styles/common/mui/palette.d.ts +0 -47
  159. package/lib/styles/common/mui/palette.js +0 -47
  160. package/lib/theme/common/entities.d.ts +0 -6
  161. package/lib/theme/common/entities.js +0 -1
@@ -1,8 +0,0 @@
1
- import { TooltipProps as MTooltipProps } from "@mui/material";
2
- export interface TooltipProps extends MTooltipProps {
3
- className?: string;
4
- }
5
- /**
6
- * @deprecated - use Tooltip from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip"
7
- */
8
- export declare const Tooltip: ({ children, className, title, ...props }: TooltipProps) => JSX.Element;
@@ -1,57 +0,0 @@
1
- import { Tooltip as MTooltip, } from "@mui/material";
2
- import { detectOverflow } from "@popperjs/core";
3
- import React, { useMemo, useState } from "react";
4
- import { TooltipContent } from "./tooltip.styles";
5
- const DEFAULT_FLIP_MODIFIER = {
6
- enabled: true,
7
- name: "flip",
8
- options: {
9
- fallbackPlacements: ["bottom", "right", "left"],
10
- },
11
- };
12
- const DEFAULT_PREVENT_OVERFLOW_MODIFIER = {
13
- enabled: true,
14
- name: "preventOverflow",
15
- options: {
16
- padding: 16,
17
- },
18
- };
19
- /**
20
- * @deprecated - use Tooltip from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/components/Tooltip/tooltip"
21
- */
22
- export const Tooltip = ({ children, className, title, ...props /* Spread props to allow for Mui Tooltip specific prop overrides. */ }) => {
23
- const [maxHeight, setMaxHeight] = useState();
24
- const modifiers = useMemo(() => [
25
- {
26
- enabled: true,
27
- fn: ({ state }) => setMaxHeight(calculateMaxHeight(state)),
28
- name: "maxHeight",
29
- phase: "main",
30
- requiresIfExists: ["offset"],
31
- },
32
- DEFAULT_FLIP_MODIFIER,
33
- DEFAULT_PREVENT_OVERFLOW_MODIFIER,
34
- ], []);
35
- return (React.createElement(MTooltip, { arrow: true, className: className, onClose: () => setMaxHeight(undefined), slotProps: {
36
- popper: { modifiers },
37
- tooltip: { style: { display: "flex", maxHeight, padding: 0 } },
38
- }, title: React.createElement(TooltipContent, null, title), ...props }, children));
39
- };
40
- /**
41
- * Calculate the max height of the tooltip based on the current popper modifier state.
42
- * @param state - Popper modifier state.
43
- * @returns tooltip maximum height.
44
- */
45
- function calculateMaxHeight(state) {
46
- const overflow = detectOverflow(state);
47
- const { placement } = state;
48
- if (placement === "left" || placement === "right") {
49
- return window.innerHeight - 32;
50
- }
51
- if (placement === "top") {
52
- return state.rects.popper.height - overflow.top - 24;
53
- }
54
- if (placement === "bottom") {
55
- return state.rects.popper.height - overflow.bottom - 24;
56
- }
57
- }
@@ -1,4 +0,0 @@
1
- export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
2
- theme?: import("@emotion/react").Theme;
3
- as?: React.ElementType;
4
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -1,10 +0,0 @@
1
- import styled from "@emotion/styled";
2
- export const TooltipContent = styled.span `
3
- overflow: scroll;
4
- overscroll-behavior: none;
5
- padding: 8px 12px;
6
-
7
- &::-webkit-scrollbar {
8
- display: none;
9
- }
10
- `;
@@ -1,10 +0,0 @@
1
- import { ReactElement } from "react";
2
- export interface NTagProps {
3
- className?: string;
4
- Tag: ReactElement;
5
- TooltipTitle: ReactElement;
6
- }
7
- /**
8
- * @deprecated - use NTag from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag"
9
- */
10
- export declare const NTag: ({ className, Tag, TooltipTitle, ...props }: NTagProps) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import { Tooltip } from "./components/Tooltip/tooltip";
3
- /**
4
- * @deprecated - use NTag from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/components/NTag/nTag"
5
- */
6
- export const NTag = ({ className, Tag, TooltipTitle, ...props /* Spread props to allow for Mui Tooltip specific prop overrides. */ }) => {
7
- return (React.createElement(Tooltip, { className: className, title: TooltipTitle, ...props }, Tag));
8
- };
@@ -1,11 +0,0 @@
1
- import { TypographyProps } from "../../../common/Typography/common/entities";
2
- export type MetadataValue = string;
3
- export interface NTagCellProps {
4
- label: string;
5
- TypographyProps?: TypographyProps;
6
- values: MetadataValue[];
7
- }
8
- /**
9
- * @deprecated - use NTagCell from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/nTagCell"
10
- */
11
- export declare const NTagCell: ({ label, TypographyProps, values, }: NTagCellProps) => JSX.Element;
@@ -1,29 +0,0 @@
1
- import { Chip as MChip, Typography, } from "@mui/material";
2
- import React, { forwardRef } from "react";
3
- import { TEXT_BODY_SMALL_400 } from "../../../../theme/common/typography";
4
- import { NTag } from "../NTag/nTag";
5
- // Template constants
6
- const MAX_DISPLAYABLE_VALUES = 1;
7
- /**
8
- * String-concatenates the specified list of metadata values to a string value, joined by a comma ",".
9
- * @param metadataValues - List of metadata values.
10
- * @returns the metadata values in a string, each value joined by a comma.
11
- */
12
- function stringifyMetadataValues(metadataValues) {
13
- return metadataValues.join(", ");
14
- }
15
- /**
16
- * Renders tag for NTag component.
17
- * Tooltip children require forward ref.
18
- */
19
- const Tag = forwardRef(function Tag(props, ref) {
20
- return React.createElement(MChip, { ref: ref, ...props });
21
- });
22
- /**
23
- * @deprecated - use NTagCell from "@databiosphere/findable-ui/lib/components/Table/components/TableCell/components/NTagCell/nTagCell"
24
- */
25
- export const NTagCell = ({ label, TypographyProps, values, }) => {
26
- const metadataCount = values.length;
27
- const showNTag = metadataCount > MAX_DISPLAYABLE_VALUES;
28
- return (React.createElement(React.Fragment, null, showNTag ? (React.createElement(NTag, { Tag: React.createElement(Tag, { label: `${metadataCount} ${label}`, variant: "ntag" }), TooltipTitle: React.createElement(Typography, { display: "block", variant: TEXT_BODY_SMALL_400 }, stringifyMetadataValues(values)) })) : (values.map((value, v) => (React.createElement(Typography, { key: `${value}${v}`, variant: "inherit", ...TypographyProps }, value))))));
29
- };
@@ -1,5 +0,0 @@
1
- import { ComponentMeta } from "@storybook/react";
2
- import { NTagCell } from "./nTagCell";
3
- declare const _default: ComponentMeta<typeof NTagCell>;
4
- export default _default;
5
- export declare const NTagCellStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./nTagCell").NTagCellProps>;
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { NTagCell } from "./nTagCell";
3
- export default {
4
- argTypes: {
5
- label: { control: "text" },
6
- values: { control: "array" },
7
- },
8
- component: NTagCell,
9
- title: "Components/Table/Cell/NTagCell",
10
- };
11
- const NTagCellTemplate = (args) => (React.createElement(NTagCell, { ...args }));
12
- export const NTagCellStory = NTagCellTemplate.bind({});
13
- NTagCellStory.args = {
14
- label: "species",
15
- values: ["Homo sapiens", "Mus musculus"],
16
- };
@@ -1,6 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { LinkProps } from "../../../Links/components/Link/link";
3
- export interface TitleCellProps extends LinkProps {
4
- title: ReactNode;
5
- }
6
- export declare const TitleCell: ({ title, ...props }: TitleCellProps) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { Typography } from "@mui/material";
2
- import React from "react";
3
- import { TEXT_BODY_400 } from "../../../../theme/common/typography";
4
- import { Link } from "../../../Links/components/Link/link";
5
- import { TitleCell as Cell } from "./titleCell.styles";
6
- export const TitleCell = ({ title, ...props }) => {
7
- return (React.createElement(Cell, { gridSx: { gap: 1 } },
8
- typeof title === "string" ? (React.createElement(Typography, { variant: TEXT_BODY_400 }, title)) : (title),
9
- React.createElement(Link, { ...props })));
10
- };
@@ -1,3 +0,0 @@
1
- export declare const TitleCell: import("@emotion/styled").StyledComponent<import("../../../common/Grid/grid").GridProps & {
2
- theme?: import("@emotion/react").Theme;
3
- }, {}, {}>;
@@ -1,6 +0,0 @@
1
- import styled from "@emotion/styled";
2
- import { textBodySmall400 } from "../../../../styles/common/mixins/fonts";
3
- import { Grid } from "../../../common/Grid/grid";
4
- export const TitleCell = styled(Grid) `
5
- ${textBodySmall400};
6
- `;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Index } from "./index";
3
- declare const _default: Meta<typeof Index>;
4
- export default _default;
5
- type Story = StoryObj<typeof Index>;
6
- export declare const IndexStory: Story;
@@ -1,26 +0,0 @@
1
- import React from "react";
2
- import { Summaries } from "./components/Hero/components/Summaries/summaries";
3
- import { SummariesStory } from "./components/Hero/components/Summaries/summaries.stories";
4
- import { Index } from "./index";
5
- export default {
6
- argTypes: {
7
- Summaries: { table: { disable: true } },
8
- Tabs: { table: { disable: true } },
9
- list: { table: { disable: true } },
10
- title: { table: { disable: true } },
11
- },
12
- component: Index,
13
- parameters: {
14
- layout: "fullscreen",
15
- },
16
- title: "Views/ExploreView",
17
- };
18
- export const IndexStory = {
19
- args: {
20
- Summaries: React.createElement(Summaries, { ...SummariesStory.args }),
21
- Tabs: undefined,
22
- chart: undefined,
23
- list: undefined,
24
- title: "Explore Data",
25
- },
26
- };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { BackPageHero } from "./backPageHero";
3
- declare const _default: Meta<typeof BackPageHero>;
4
- export default _default;
5
- type Story = StoryObj<typeof BackPageHero>;
6
- export declare const BackPageHeroStory: Story;
@@ -1,10 +0,0 @@
1
- import { BackPageHero } from "./backPageHero";
2
- export default {
3
- component: BackPageHero,
4
- title: "Components/Hero",
5
- };
6
- export const BackPageHeroStory = {
7
- args: {
8
- title: "A Single-Cell Transcriptomic Map of the Human and Mouse Pancreas Reveals Inter- and Intra-cell Population Structure",
9
- },
10
- };
@@ -1,5 +0,0 @@
1
- import { Meta } from "@storybook/react";
2
- import { AuthenticationMenu } from "./authenticationMenu";
3
- declare const _default: Meta<typeof AuthenticationMenu>;
4
- export default _default;
5
- export declare const AuthenticationMenuStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./authenticationMenu").AuthenticationMenuProps>;
@@ -1,29 +0,0 @@
1
- import React from "react";
2
- import { AuthenticationMenu } from "./authenticationMenu";
3
- export default {
4
- argTypes: {
5
- onLogout: {
6
- description: "Callback to be called when 'Logout' button is clicked",
7
- },
8
- userProfile: {
9
- description: "User profile with name and avatar",
10
- },
11
- },
12
- component: AuthenticationMenu,
13
- title: "Components/Navigation/AuthenticationMenu",
14
- };
15
- const AuthenticationMenuTemplate = (args) => React.createElement(AuthenticationMenu, { ...args });
16
- export const AuthenticationMenuStory = AuthenticationMenuTemplate.bind({});
17
- AuthenticationMenuStory.args = {
18
- userProfile: {
19
- email: "john@smith.com",
20
- email_verified: true,
21
- family_name: "Smith",
22
- given_name: "John",
23
- hd: "",
24
- locale: "",
25
- name: "john_smith",
26
- picture: "https://i.pravatar.cc/200",
27
- sub: "",
28
- },
29
- };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface RequestAuthenticationProps {
3
- closeMenu: () => void;
4
- requestAuthorization: () => void;
5
- }
6
- export declare const RequestAuthentication: ({ closeMenu, requestAuthorization, }: RequestAuthenticationProps) => JSX.Element;
@@ -1,13 +0,0 @@
1
- import LoginRoundedIcon from "@mui/icons-material/LoginRounded";
2
- import { IconButton as MIconButton } from "@mui/material";
3
- import React from "react";
4
- import { useBreakpoint } from "../../../../../../../../../../../../hooks/useBreakpoint";
5
- import { Button } from "./requestAuthentication.styles";
6
- export const RequestAuthentication = ({ closeMenu, requestAuthorization, }) => {
7
- const { mdUp } = useBreakpoint();
8
- return mdUp ? (React.createElement(Button, { onClick: requestAuthorization, startIcon: React.createElement(LoginRoundedIcon, null), variant: "nav" }, "Sign in")) : (React.createElement(MIconButton, { color: "ink", onClick: () => {
9
- closeMenu();
10
- requestAuthorization();
11
- } },
12
- React.createElement(LoginRoundedIcon, null)));
13
- };
@@ -1,36 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Button: import("@emotion/styled").StyledComponent<{
3
- children?: import("react").ReactNode;
4
- classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "primary" | "secondary" | "error" | "info" | "success" | "warning" | undefined;
6
- disabled?: boolean | undefined;
7
- disableElevation?: boolean | undefined;
8
- disableFocusRipple?: boolean | undefined;
9
- endIcon?: import("react").ReactNode;
10
- fullWidth?: boolean | undefined;
11
- href?: string | undefined;
12
- size?: "large" | "medium" | "small" | undefined;
13
- startIcon?: import("react").ReactNode;
14
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
- variant?: "nav" | "text" | "outlined" | "contained" | "activeNav" | "backNav" | undefined;
16
- } & Omit<{
17
- action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
18
- centerRipple?: boolean | undefined;
19
- children?: import("react").ReactNode;
20
- classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
21
- disabled?: boolean | undefined;
22
- disableRipple?: boolean | undefined;
23
- disableTouchRipple?: boolean | undefined;
24
- focusRipple?: boolean | undefined;
25
- focusVisibleClassName?: string | undefined;
26
- LinkComponent?: import("react").ElementType<any> | undefined;
27
- onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
28
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
29
- tabIndex?: number | undefined;
30
- TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
31
- touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
32
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
33
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
34
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "variant" | "href" | "disabled" | "action" | "size" | "fullWidth" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & {
35
- theme?: import("@emotion/react").Theme | undefined;
36
- }, {}, {}>;
@@ -1,9 +0,0 @@
1
- import styled from "@emotion/styled";
2
- import { Button as MButton } from "@mui/material";
3
- import { textBody500 } from "../../../../../../../../../../../../styles/common/mixins/fonts";
4
- export const Button = styled(MButton) `
5
- & {
6
- ${textBody500};
7
- padding: 6px 12px;
8
- }
9
- `;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export interface SearchProps {
3
- openSearch: () => void;
4
- }
5
- export declare const SearchButton: ({ openSearch }: SearchProps) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { IconButton } from "@mui/material";
2
- import React from "react";
3
- import { useBreakpoint } from "../../../../../../../../../../../../hooks/useBreakpoint";
4
- import { SearchIcon } from "../../../../../../../../../../../common/CustomIcon/components/SearchIcon/searchIcon";
5
- import { Button } from "./searchButton.styles";
6
- export const SearchButton = ({ openSearch }) => {
7
- const { mdUp } = useBreakpoint();
8
- return mdUp ? (React.createElement(Button, { onClick: openSearch, startIcon: React.createElement(SearchIcon, null), variant: "nav" }, "Search")) : (React.createElement(IconButton, { color: "ink", onClick: openSearch },
9
- React.createElement(SearchIcon, { fontSize: "medium" })));
10
- };
@@ -1,36 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Button: import("@emotion/styled").StyledComponent<{
3
- children?: import("react").ReactNode;
4
- classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "primary" | "secondary" | "error" | "info" | "success" | "warning" | undefined;
6
- disabled?: boolean | undefined;
7
- disableElevation?: boolean | undefined;
8
- disableFocusRipple?: boolean | undefined;
9
- endIcon?: import("react").ReactNode;
10
- fullWidth?: boolean | undefined;
11
- href?: string | undefined;
12
- size?: "large" | "medium" | "small" | undefined;
13
- startIcon?: import("react").ReactNode;
14
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
- variant?: "nav" | "text" | "outlined" | "contained" | "activeNav" | "backNav" | undefined;
16
- } & Omit<{
17
- action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
18
- centerRipple?: boolean | undefined;
19
- children?: import("react").ReactNode;
20
- classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
21
- disabled?: boolean | undefined;
22
- disableRipple?: boolean | undefined;
23
- disableTouchRipple?: boolean | undefined;
24
- focusRipple?: boolean | undefined;
25
- focusVisibleClassName?: string | undefined;
26
- LinkComponent?: import("react").ElementType<any> | undefined;
27
- onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
28
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
29
- tabIndex?: number | undefined;
30
- TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
31
- touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
32
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
33
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
34
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "variant" | "href" | "disabled" | "action" | "size" | "fullWidth" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & {
35
- theme?: import("@emotion/react").Theme | undefined;
36
- }, {}, {}>;
@@ -1,9 +0,0 @@
1
- import styled from "@emotion/styled";
2
- import { Button as MButton } from "@mui/material";
3
- import { textBody500 } from "../../../../../../../../../../../../styles/common/mixins/fonts";
4
- export const Button = styled(MButton) `
5
- & {
6
- ${textBody500};
7
- padding: 6px 12px;
8
- }
9
- `;
@@ -1,5 +0,0 @@
1
- import { RefObject } from "react";
2
- export interface UseMeasureHeader {
3
- headerRef: RefObject<HTMLElement>;
4
- }
5
- export declare const useMeasureHeader: () => UseMeasureHeader;
@@ -1,19 +0,0 @@
1
- import { useEffect, useRef } from "react";
2
- import { useLayoutState } from "../../../../../hooks/useLayoutState";
3
- import { getBorderBoxSizeHeight, useResizeObserver, } from "../../../../../hooks/useResizeObserver";
4
- import { LayoutActionKind } from "../../../../../providers/layoutState";
5
- export const useMeasureHeader = () => {
6
- const { layoutDispatch } = useLayoutState();
7
- const headerRef = useRef(null);
8
- const { height } = useResizeObserver(headerRef, getBorderBoxSizeHeight) || {};
9
- // Updates layout state header height.
10
- useEffect(() => {
11
- if (!height)
12
- return;
13
- layoutDispatch({
14
- payload: height,
15
- type: LayoutActionKind.UpdateHeaderHeight,
16
- });
17
- }, [height, layoutDispatch]);
18
- return { headerRef };
19
- };
@@ -1,2 +0,0 @@
1
- import { TabProps as MTabProps } from "@mui/material";
2
- export declare const DEFAULT_TAB_VALUE: MTabProps["value"];
@@ -1 +0,0 @@
1
- export const DEFAULT_TAB_VALUE = "";
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Login } from "./login";
3
- declare const _default: Meta<typeof Login>;
4
- export default _default;
5
- type Story = StoryObj<typeof Login>;
6
- export declare const LoginStory: Story;
@@ -1,31 +0,0 @@
1
- import React from "react";
2
- import { HelpIconButton } from "../common/Button/components/HelpIconButton/helpIconButton";
3
- import { Login } from "./login";
4
- export default {
5
- argTypes: {
6
- isGoogle: { control: "boolean" },
7
- termsOfService: { control: "object" },
8
- text: { control: "object" },
9
- title: { control: "text" },
10
- warning: { control: "object" },
11
- },
12
- component: Login,
13
- parameters: {
14
- layout: "fullscreen",
15
- },
16
- title: "Components/Login",
17
- };
18
- export const LoginStory = {
19
- args: {
20
- isGoogle: true,
21
- termsOfService: (React.createElement("p", null, "I have read and agree to privacy notice and terms of use")),
22
- text: (React.createElement("p", null,
23
- "Please sign in to your Data Explorer account",
24
- " ",
25
- React.createElement(HelpIconButton, { url: "https://www.google.com/" }))),
26
- title: "Sign in to your account",
27
- warning: (React.createElement("div", null,
28
- React.createElement("p", null, "WARNING NOTICE"),
29
- React.createElement("p", null, "This is a warning notice."))),
30
- },
31
- };
@@ -1,16 +0,0 @@
1
- type MenuListItemOnChangeFn = (event: unknown) => void;
2
- type onResetFn = () => void;
3
- export interface CheckboxMenuListItem {
4
- checked: boolean;
5
- disabled?: boolean;
6
- label: string;
7
- onChange: MenuListItemOnChangeFn;
8
- value: string;
9
- }
10
- export interface CheckboxMenuProps {
11
- label: string;
12
- onReset: onResetFn;
13
- options: CheckboxMenuListItem[];
14
- }
15
- export declare const CheckboxMenu: ({ label: buttonLabel, onReset, options, }: CheckboxMenuProps) => JSX.Element;
16
- export {};
@@ -1,28 +0,0 @@
1
- import { Checkbox, ListItem, ListItemButton, ListItemText, } from "@mui/material";
2
- import React, { useState } from "react";
3
- import { ButtonTextPrimary } from "../../../common/Button/components/ButtonTextPrimary/buttonTextPrimary";
4
- import { DropdownButton } from "../../../common/Button/components/DropdownButton/dropdownButton";
5
- import { CheckedIcon } from "../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
6
- import { UncheckedIcon } from "../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
7
- import { Menu } from "./checkboxMenu.styles";
8
- export const CheckboxMenu = ({ label: buttonLabel, onReset, options, }) => {
9
- const [anchorEl, setAnchorEl] = useState(null);
10
- const open = Boolean(anchorEl);
11
- const onOpenMenu = (event) => {
12
- setAnchorEl(event.currentTarget);
13
- };
14
- const onCloseMenu = () => {
15
- setAnchorEl(null);
16
- };
17
- return (React.createElement(React.Fragment, null,
18
- React.createElement(DropdownButton, { onClick: onOpenMenu, open: open }, buttonLabel),
19
- React.createElement(Menu, { anchorEl: anchorEl, anchorOrigin: { horizontal: "right", vertical: "bottom" }, onClose: onCloseMenu, open: open, slotProps: { paper: { variant: "menu" } }, transformOrigin: {
20
- horizontal: "right",
21
- vertical: "top",
22
- } },
23
- options.map(({ checked, disabled = false, label, onChange, value }) => (React.createElement(ListItemButton, { disabled: disabled, key: value, onClick: onChange, role: undefined },
24
- React.createElement(Checkbox, { checked: checked, checkedIcon: React.createElement(CheckedIcon, null), disabled: disabled, icon: React.createElement(UncheckedIcon, null) }),
25
- React.createElement(ListItemText, { disableTypography: true, primary: React.createElement("span", null, label) })))),
26
- React.createElement(ListItem, { component: "div" },
27
- React.createElement(ButtonTextPrimary, { onClick: onReset }, "Reset")))));
28
- };
@@ -1,5 +0,0 @@
1
- import { ComponentMeta } from "@storybook/react";
2
- import { CheckboxMenu } from "./checkboxMenu";
3
- declare const _default: ComponentMeta<typeof CheckboxMenu>;
4
- export default _default;
5
- export declare const CheckboxMenuStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./checkboxMenu").CheckboxMenuProps>;
@@ -1,46 +0,0 @@
1
- import React from "react";
2
- import { CheckboxMenu } from "./checkboxMenu";
3
- export default {
4
- argTypes: {
5
- label: { control: "text" },
6
- onReset: { control: { disabled: true } },
7
- options: { control: "array" },
8
- },
9
- component: CheckboxMenu,
10
- title: "Components/Common/Menu/CheckboxMenu",
11
- };
12
- const CheckboxMenuTemplate = (args) => (React.createElement(CheckboxMenu, { ...args }));
13
- const onChange = () => {
14
- // onChange function
15
- };
16
- const onReset = () => {
17
- // onReset function
18
- };
19
- export const CheckboxMenuStory = CheckboxMenuTemplate.bind({});
20
- CheckboxMenuStory.args = {
21
- label: "Options",
22
- onReset: onReset,
23
- options: [
24
- {
25
- checked: true,
26
- disabled: true,
27
- label: "Item 1",
28
- onChange,
29
- value: "item_1",
30
- },
31
- {
32
- checked: false,
33
- disabled: false,
34
- label: "Item 2",
35
- onChange,
36
- value: "item_2",
37
- },
38
- {
39
- checked: true,
40
- disabled: false,
41
- label: "Item 3",
42
- onChange,
43
- value: "item_3",
44
- },
45
- ],
46
- };
@@ -1,3 +0,0 @@
1
- export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & {
2
- theme?: import("@emotion/react").Theme;
3
- }, {}, {}>;