@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.
Files changed (62) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +20 -0
  3. package/lib/components/DataDictionary/components/Table/options/core/constants.js +2 -1
  4. package/lib/components/DataDictionary/components/Table/options/hook.js +2 -0
  5. package/lib/components/Detail/components/Table/table.js +4 -1
  6. package/lib/components/Index/table/hook.js +4 -1
  7. package/lib/components/Table/common/columnDef.js +2 -0
  8. package/lib/components/Table/common/utils.d.ts +0 -6
  9. package/lib/components/Table/common/utils.js +0 -63
  10. package/lib/components/Table/components/TableFeatures/TableDownload/tableDownload.d.ts +3 -0
  11. package/lib/components/Table/components/TableFeatures/TableDownload/tableDownload.js +9 -0
  12. package/lib/components/Table/components/{DownloadEntityResults/downloadEntityResults.styles.js → TableFeatures/TableDownload/tableDownload.styles.js} +1 -1
  13. package/lib/components/Table/components/TableFeatures/TableDownload/types.d.ts +5 -0
  14. package/lib/components/Table/components/TableFeatures/TableDownload/types.js +1 -0
  15. package/lib/components/Table/components/TableToolbar/tableToolbar.js +3 -3
  16. package/lib/components/Table/components/TableToolbar2/tableToolbar2.d.ts +3 -0
  17. package/lib/components/Table/components/TableToolbar2/tableToolbar2.js +8 -0
  18. package/lib/components/Table/components/TableToolbar2/tableToolbar2.styles.d.ts +10 -0
  19. package/lib/components/Table/components/TableToolbar2/tableToolbar2.styles.js +16 -0
  20. package/lib/components/Table/components/TableToolbar2/types.d.ts +4 -0
  21. package/lib/components/Table/components/TableToolbar2/types.js +1 -0
  22. package/lib/components/Table/featureOptions/tableDownload/constants.d.ts +3 -0
  23. package/lib/components/Table/featureOptions/tableDownload/constants.js +3 -0
  24. package/lib/components/Table/features/TableDownload/constants.d.ts +2 -0
  25. package/lib/components/Table/features/TableDownload/constants.js +10 -0
  26. package/lib/components/Table/features/TableDownload/onDownload/utils.d.ts +14 -0
  27. package/lib/components/Table/features/TableDownload/onDownload/utils.js +63 -0
  28. package/lib/components/Table/features/TableDownload/types.d.ts +15 -0
  29. package/lib/components/Table/features/TableDownload/types.js +1 -0
  30. package/lib/components/Table/features/TableDownload/utils.d.ts +19 -0
  31. package/lib/components/Table/features/TableDownload/utils.js +46 -0
  32. package/lib/components/Table/features/entities.d.ts +8 -3
  33. package/lib/config/entities.d.ts +0 -1
  34. package/package.json +1 -1
  35. package/src/components/DataDictionary/components/Table/options/core/constants.ts +2 -1
  36. package/src/components/DataDictionary/components/Table/options/hook.ts +2 -0
  37. package/src/components/Detail/components/Table/table.tsx +4 -1
  38. package/src/components/Index/table/hook.ts +4 -1
  39. package/src/components/Table/common/columnDef.ts +2 -0
  40. package/src/components/Table/common/utils.ts +0 -75
  41. package/src/components/Table/components/{DownloadEntityResults/downloadEntityResults.styles.ts → TableFeatures/TableDownload/tableDownload.styles.ts} +1 -1
  42. package/src/components/Table/components/TableFeatures/TableDownload/tableDownload.tsx +23 -0
  43. package/src/components/Table/components/TableFeatures/TableDownload/types.ts +7 -0
  44. package/src/components/Table/components/TableToolbar/tableToolbar.tsx +3 -8
  45. package/src/components/Table/components/TableToolbar2/tableToolbar2.styles.ts +18 -0
  46. package/src/components/Table/components/TableToolbar2/tableToolbar2.tsx +17 -0
  47. package/src/components/Table/components/TableToolbar2/types.ts +5 -0
  48. package/src/components/Table/featureOptions/tableDownload/constants.ts +9 -0
  49. package/src/components/Table/features/TableDownload/constants.ts +24 -0
  50. package/src/components/Table/features/TableDownload/onDownload/utils.ts +76 -0
  51. package/src/components/Table/features/TableDownload/types.ts +19 -0
  52. package/src/components/Table/features/TableDownload/utils.ts +60 -0
  53. package/src/components/Table/features/entities.ts +19 -3
  54. package/src/config/entities.ts +0 -1
  55. package/types/data-explorer-ui.d.ts +16 -2
  56. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +0 -6
  57. package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +0 -18
  58. package/lib/components/common/Button/components/FileDownloadButton/fileDownloadButton.d.ts +0 -5
  59. package/lib/components/common/Button/components/FileDownloadButton/fileDownloadButton.js +0 -14
  60. package/src/components/Table/components/DownloadEntityResults/downloadEntityResults.tsx +0 -39
  61. package/src/components/common/Button/components/FileDownloadButton/fileDownloadButton.tsx +0 -27
  62. /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
- };