@databiosphere/findable-ui 44.0.0 → 45.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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/lib/components/DataDictionary/components/Table/options/core/constants.js +2 -1
- package/lib/components/DataDictionary/components/Table/options/hook.js +2 -0
- package/lib/components/Detail/components/Table/table.js +4 -1
- package/lib/components/Index/table/hook.js +4 -1
- package/lib/components/Table/common/columnDef.js +2 -0
- package/lib/components/Table/common/utils.d.ts +0 -6
- package/lib/components/Table/common/utils.js +0 -63
- package/lib/components/Table/components/TableFeatures/TableDownload/tableDownload.d.ts +3 -0
- package/lib/components/Table/components/TableFeatures/TableDownload/tableDownload.js +9 -0
- package/lib/components/Table/components/{DownloadEntityResults/downloadEntityResults.styles.js → TableFeatures/TableDownload/tableDownload.styles.js} +1 -1
- package/lib/components/Table/components/TableFeatures/TableDownload/types.d.ts +5 -0
- package/lib/components/Table/components/TableFeatures/TableDownload/types.js +1 -0
- package/lib/components/Table/components/TableToolbar/tableToolbar.js +3 -3
- package/lib/components/Table/components/TableToolbar2/tableToolbar2.d.ts +3 -0
- package/lib/components/Table/components/TableToolbar2/tableToolbar2.js +8 -0
- package/lib/components/Table/components/TableToolbar2/tableToolbar2.styles.d.ts +10 -0
- package/lib/components/Table/components/TableToolbar2/tableToolbar2.styles.js +16 -0
- package/lib/components/Table/components/TableToolbar2/types.d.ts +4 -0
- package/lib/components/Table/components/TableToolbar2/types.js +1 -0
- package/lib/components/Table/featureOptions/tableDownload/constants.d.ts +3 -0
- package/lib/components/Table/featureOptions/tableDownload/constants.js +3 -0
- package/lib/components/Table/features/TableDownload/constants.d.ts +2 -0
- package/lib/components/Table/features/TableDownload/constants.js +10 -0
- package/lib/components/Table/features/TableDownload/onDownload/utils.d.ts +14 -0
- package/lib/components/Table/features/TableDownload/onDownload/utils.js +63 -0
- package/lib/components/Table/features/TableDownload/types.d.ts +15 -0
- package/lib/components/Table/features/TableDownload/types.js +1 -0
- package/lib/components/Table/features/TableDownload/utils.d.ts +19 -0
- package/lib/components/Table/features/TableDownload/utils.js +46 -0
- package/lib/components/Table/features/entities.d.ts +8 -3
- package/lib/config/entities.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/DataDictionary/components/Table/options/core/constants.ts +2 -1
- package/src/components/DataDictionary/components/Table/options/hook.ts +2 -0
- package/src/components/Detail/components/Table/table.tsx +4 -1
- package/src/components/Index/table/hook.ts +4 -1
- package/src/components/Table/common/columnDef.ts +2 -0
- package/src/components/Table/common/utils.ts +0 -75
- package/src/components/Table/components/{DownloadEntityResults/downloadEntityResults.styles.ts → TableFeatures/TableDownload/tableDownload.styles.ts} +1 -1
- package/src/components/Table/components/TableFeatures/TableDownload/tableDownload.tsx +23 -0
- package/src/components/Table/components/TableFeatures/TableDownload/types.ts +7 -0
- package/src/components/Table/components/TableToolbar/tableToolbar.tsx +3 -8
- package/src/components/Table/components/TableToolbar2/tableToolbar2.styles.ts +18 -0
- package/src/components/Table/components/TableToolbar2/tableToolbar2.tsx +17 -0
- package/src/components/Table/components/TableToolbar2/types.ts +5 -0
- package/src/components/Table/featureOptions/tableDownload/constants.ts +9 -0
- package/src/components/Table/features/TableDownload/constants.ts +24 -0
- package/src/components/Table/features/TableDownload/onDownload/utils.ts +76 -0
- package/src/components/Table/features/TableDownload/types.ts +19 -0
- package/src/components/Table/features/TableDownload/utils.ts +60 -0
- package/src/components/Table/features/entities.ts +19 -3
- package/src/config/entities.ts +0 -1
- package/types/data-explorer-ui.d.ts +16 -2
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +0 -6
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +0 -18
- package/lib/components/common/Button/components/FileDownloadButton/fileDownloadButton.d.ts +0 -5
- package/lib/components/common/Button/components/FileDownloadButton/fileDownloadButton.js +0 -14
- package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +0 -39
- package/src/components/common/Button/components/FileDownloadButton/fileDownloadButton.tsx +0 -27
- /package/lib/components/Table/components/{DownloadEntityResults/downloadEntityResults.styles.d.ts → TableFeatures/TableDownload/tableDownload.styles.d.ts} +0 -0
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Box } from "@mui/material";
|
|
2
|
-
import React, { useEffect, useRef } from "react";
|
|
3
|
-
|
|
4
|
-
export interface FileDownloadButtonProps {
|
|
5
|
-
fileName?: string;
|
|
6
|
-
fileUrl?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const FileDownloadButton = ({
|
|
10
|
-
fileName,
|
|
11
|
-
fileUrl,
|
|
12
|
-
}: FileDownloadButtonProps): JSX.Element => {
|
|
13
|
-
const downloadRef = useRef<HTMLAnchorElement>(null);
|
|
14
|
-
|
|
15
|
-
// Initiates file download when file url request is successful.
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
if (downloadRef.current && fileName && fileUrl) {
|
|
18
|
-
downloadRef.current.setAttribute("href", fileUrl);
|
|
19
|
-
downloadRef.current.setAttribute("download", fileName);
|
|
20
|
-
downloadRef.current.click();
|
|
21
|
-
}
|
|
22
|
-
}, [fileName, fileUrl]);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<Box component="a" download ref={downloadRef} sx={{ display: "none" }} />
|
|
26
|
-
);
|
|
27
|
-
};
|