@databiosphere/findable-ui 38.0.0 → 38.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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/lib/components/Export/components/ExportSummary/components/ExportSelectedDataSummary/exportSelectedDataSummary.js +2 -1
- package/lib/components/Index/components/EntityView/components/layout/Summary/summary.js +2 -1
- package/lib/tests/testIds.d.ts +2 -0
- package/lib/tests/testIds.js +2 -0
- package/package.json +1 -1
- package/src/components/Export/components/ExportSummary/components/ExportSelectedDataSummary/exportSelectedDataSummary.tsx +2 -1
- package/src/components/Index/components/EntityView/components/layout/Summary/summary.tsx +6 -1
- package/src/tests/testIds.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [38.1.0](https://github.com/DataBiosphere/findable-ui/compare/v38.0.0...v38.1.0) (2025-07-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add data test id to summary ([#557](https://github.com/DataBiosphere/findable-ui/issues/557)) ([#558](https://github.com/DataBiosphere/findable-ui/issues/558)) ([cf97aa5](https://github.com/DataBiosphere/findable-ui/commit/cf97aa54a0ca70b0970ad169f8ae91d8585ccffd))
|
|
9
|
+
|
|
3
10
|
## [38.0.0](https://github.com/DataBiosphere/findable-ui/compare/v37.1.0...v38.0.0) (2025-07-09)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
2
3
|
import { SectionTitle } from "../../../../../common/Section/components/SectionTitle/sectionTitle";
|
|
3
4
|
import { GridPaperSection } from "../../../../../common/Section/section.styles";
|
|
4
5
|
import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
5
6
|
import { Label, Values } from "../../exportSummary.styles";
|
|
6
7
|
export const ExportSelectedDataSummary = ({ isLoading, summaries, }) => {
|
|
7
|
-
return (React.createElement(GridPaperSection,
|
|
8
|
+
return (React.createElement(GridPaperSection, { "data-testid": TEST_IDS.EXPORT_SUMMARY },
|
|
8
9
|
React.createElement(Loading, { loading: isLoading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
9
10
|
React.createElement(SectionTitle, { title: "Selected Data Summary" }),
|
|
10
11
|
summaries.map(([label, value], i) => (React.createElement("div", { key: i },
|
|
@@ -2,13 +2,14 @@ import { Typography } from "@mui/material";
|
|
|
2
2
|
import React, { Fragment } from "react";
|
|
3
3
|
import { useSummary } from "../../../../../../../hooks/useSummary";
|
|
4
4
|
import { TYPOGRAPHY_PROPS } from "../../../../../../../styles/common/mui/typography";
|
|
5
|
+
import { TEST_IDS } from "../../../../../../../tests/testIds";
|
|
5
6
|
import { GRID_PROPS } from "./constants";
|
|
6
7
|
import { StyledDot, StyledGrid } from "./summary.styles";
|
|
7
8
|
export const Summary = ({ className, }) => {
|
|
8
9
|
const { summaries } = useSummary() || {};
|
|
9
10
|
if (!summaries)
|
|
10
11
|
return null;
|
|
11
|
-
return (React.createElement(StyledGrid, { ...GRID_PROPS, className: className }, summaries.map(([count, label], i) => (React.createElement(Fragment, { key: i },
|
|
12
|
+
return (React.createElement(StyledGrid, { ...GRID_PROPS, className: className, "data-testid": TEST_IDS.ENTITY_SUMMARY }, summaries.map(([count, label], i) => (React.createElement(Fragment, { key: i },
|
|
12
13
|
i !== 0 && React.createElement(StyledDot, null),
|
|
13
14
|
React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_SMALL_500 }, count),
|
|
14
15
|
React.createElement(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, variant: TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_SMALL_400 }, label))))));
|
package/lib/tests/testIds.d.ts
CHANGED
package/lib/tests/testIds.js
CHANGED
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import { TEST_IDS } from "../../../../../../tests/testIds";
|
|
2
3
|
import { SectionTitle } from "../../../../../common/Section/components/SectionTitle/sectionTitle";
|
|
3
4
|
import { GridPaperSection } from "../../../../../common/Section/section.styles";
|
|
4
5
|
import { Loading, LOADING_PANEL_STYLE } from "../../../../../Loading/loading";
|
|
@@ -17,7 +18,7 @@ export const ExportSelectedDataSummary = ({
|
|
|
17
18
|
summaries,
|
|
18
19
|
}: ExportSelectedDataSummaryProps): JSX.Element => {
|
|
19
20
|
return (
|
|
20
|
-
<GridPaperSection>
|
|
21
|
+
<GridPaperSection data-testid={TEST_IDS.EXPORT_SUMMARY}>
|
|
21
22
|
<Loading loading={isLoading} panelStyle={LOADING_PANEL_STYLE.INHERIT} />
|
|
22
23
|
<SectionTitle title="Selected Data Summary" />
|
|
23
24
|
{summaries.map(([label, value], i) => (
|
|
@@ -2,6 +2,7 @@ import { Typography } from "@mui/material";
|
|
|
2
2
|
import React, { Fragment } from "react";
|
|
3
3
|
import { useSummary } from "../../../../../../../hooks/useSummary";
|
|
4
4
|
import { TYPOGRAPHY_PROPS } from "../../../../../../../styles/common/mui/typography";
|
|
5
|
+
import { TEST_IDS } from "../../../../../../../tests/testIds";
|
|
5
6
|
import { BaseComponentProps } from "../../../../../../types";
|
|
6
7
|
import { GRID_PROPS } from "./constants";
|
|
7
8
|
import { StyledDot, StyledGrid } from "./summary.styles";
|
|
@@ -14,7 +15,11 @@ export const Summary = ({
|
|
|
14
15
|
if (!summaries) return null;
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
|
-
<StyledGrid
|
|
18
|
+
<StyledGrid
|
|
19
|
+
{...GRID_PROPS}
|
|
20
|
+
className={className}
|
|
21
|
+
data-testid={TEST_IDS.ENTITY_SUMMARY}
|
|
22
|
+
>
|
|
18
23
|
{summaries.map(([count, label], i) => (
|
|
19
24
|
<Fragment key={i}>
|
|
20
25
|
{i !== 0 && <StyledDot />}
|
package/src/tests/testIds.ts
CHANGED