@databiosphere/findable-ui 14.0.0 → 15.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 (96) hide show
  1. package/.github/workflows/release-please.yml +3 -6
  2. package/.release-please-manifest.json +3 -0
  3. package/CHANGELOG.md +19 -0
  4. package/lib/common/analytics/entities.d.ts +8 -0
  5. package/lib/common/analytics/entities.js +3 -0
  6. package/lib/components/Export/common/tracking.d.ts +10 -3
  7. package/lib/components/Export/common/tracking.js +17 -3
  8. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +1 -1
  9. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +4 -4
  10. package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
  11. package/lib/components/Export/components/ExportToTerra/exportToTerra.js +4 -4
  12. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +1 -1
  13. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.js +2 -2
  14. package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
  15. package/lib/components/Export/components/ManifestDownload/manifestDownload.js +4 -4
  16. package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +1 -1
  17. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.d.ts +4 -1
  18. package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +3 -1
  19. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.d.ts +2 -0
  20. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.js +3 -0
  21. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.d.ts +2 -0
  22. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.js +27 -0
  23. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.d.ts +15 -0
  24. package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.js +26 -0
  25. package/lib/components/Layout/components/Footer/components/VersionInfo/constants.d.ts +3 -0
  26. package/lib/components/Layout/components/Footer/components/VersionInfo/constants.js +27 -0
  27. package/lib/components/Layout/components/Footer/components/VersionInfo/types.d.ts +12 -0
  28. package/lib/components/Layout/components/Footer/components/VersionInfo/types.js +1 -0
  29. package/lib/components/Layout/components/Footer/components/VersionInfo/utils.d.ts +19 -0
  30. package/lib/components/Layout/components/Footer/components/VersionInfo/utils.js +29 -0
  31. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.d.ts +3 -0
  32. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.js +10 -0
  33. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +5 -0
  34. package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +9 -0
  35. package/lib/components/Layout/components/Footer/footer.d.ts +3 -2
  36. package/lib/components/Layout/components/Footer/footer.js +4 -3
  37. package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
  38. package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
  39. package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +5 -0
  40. package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +5 -0
  41. package/lib/components/Table/common/utils.js +0 -1
  42. package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
  43. package/lib/config/entities.d.ts +1 -0
  44. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +1 -1
  45. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +3 -2
  46. package/lib/hooks/useFileManifest/common/entities.d.ts +5 -5
  47. package/lib/hooks/useFileManifest/common/entities.js +7 -6
  48. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +3 -1
  49. package/lib/hooks/useFileManifest/useRequestFileManifest.js +4 -1
  50. package/lib/providers/fileManifestState/actions.d.ts +9 -0
  51. package/lib/providers/fileManifestState/actions.js +19 -0
  52. package/lib/providers/fileManifestState/constants.d.ts +4 -0
  53. package/lib/providers/fileManifestState/constants.js +25 -0
  54. package/lib/providers/fileManifestState/utils.d.ts +34 -0
  55. package/lib/providers/fileManifestState/utils.js +80 -0
  56. package/lib/providers/fileManifestState.d.ts +5 -19
  57. package/lib/providers/fileManifestState.js +17 -37
  58. package/lib/styles/common/mui/chip.d.ts +11 -0
  59. package/lib/styles/common/mui/chip.js +25 -0
  60. package/lib/theme/common/components.js +16 -0
  61. package/lib/views/ExportView/exportView.js +1 -1
  62. package/package.json +1 -1
  63. package/release-please-config.json +23 -0
  64. package/src/common/analytics/entities.ts +8 -0
  65. package/src/components/Export/common/tracking.ts +22 -3
  66. package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +4 -2
  67. package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +9 -3
  68. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +7 -1
  69. package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +4 -2
  70. package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +8 -0
  71. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.ts +5 -0
  72. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.tsx +53 -0
  73. package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.ts +31 -0
  74. package/src/components/Layout/components/Footer/components/VersionInfo/constants.ts +30 -0
  75. package/src/components/Layout/components/Footer/components/VersionInfo/types.ts +14 -0
  76. package/src/components/Layout/components/Footer/components/VersionInfo/utils.ts +32 -0
  77. package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +10 -0
  78. package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.tsx +31 -0
  79. package/src/components/Layout/components/Footer/footer.tsx +5 -2
  80. package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +5 -0
  81. package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +5 -0
  82. package/src/components/Table/common/utils.ts +0 -1
  83. package/src/config/entities.ts +1 -0
  84. package/src/hooks/useFileManifest/common/buildFileManifestRequestURL.ts +3 -4
  85. package/src/hooks/useFileManifest/common/entities.ts +5 -6
  86. package/src/hooks/useFileManifest/useRequestFileManifest.ts +5 -0
  87. package/src/providers/fileManifestState/actions.ts +34 -0
  88. package/src/providers/fileManifestState/constants.ts +31 -0
  89. package/src/providers/fileManifestState/utils.ts +108 -0
  90. package/src/providers/fileManifestState.tsx +30 -58
  91. package/src/styles/common/mui/chip.ts +36 -0
  92. package/src/theme/common/components.ts +16 -0
  93. package/src/views/ExportView/exportView.tsx +1 -1
  94. package/tests/azulFileDownload.test.tsx +11 -6
  95. package/tests/fileManifestRequestFilters.test.ts +160 -0
  96. package/tests/updateFilesFacetsStatus.test.ts +84 -0
@@ -0,0 +1,84 @@
1
+ import { FILES_FACETS_STATUS } from "../src/hooks/useFileManifest/common/entities";
2
+ import {
3
+ FileManifestState,
4
+ UpdateFileManifestPayload,
5
+ } from "../src/providers/fileManifestState";
6
+ import { FILE_MANIFEST_STATE } from "../src/providers/fileManifestState/constants";
7
+ import { updateFilesFacetsStatus } from "../src/providers/fileManifestState/utils";
8
+
9
+ const FILE_MANIFEST_STATE_NOT_STARTED: FileManifestState = {
10
+ ...FILE_MANIFEST_STATE,
11
+ filesFacetsStatus: FILES_FACETS_STATUS.NOT_STARTED,
12
+ };
13
+
14
+ const FILE_MANIFEST_STATE_IN_PROGRESS: FileManifestState = {
15
+ ...FILE_MANIFEST_STATE,
16
+ filesFacetsStatus: FILES_FACETS_STATUS.IN_PROGRESS,
17
+ };
18
+
19
+ const FILE_MANIFEST_STATE_COMPLETED: FileManifestState = {
20
+ ...FILE_MANIFEST_STATE,
21
+ filesFacetsStatus: FILES_FACETS_STATUS.COMPLETED,
22
+ };
23
+
24
+ const UPDATE_FILE_MANIFEST_PAYLOAD_IDLE = {
25
+ isFacetsLoading: false,
26
+ isFacetsSuccess: false,
27
+ } as UpdateFileManifestPayload;
28
+
29
+ const UPDATE_FILE_MANIFEST_PAYLOAD_LOADING = {
30
+ isFacetsLoading: true,
31
+ isFacetsSuccess: false,
32
+ } as UpdateFileManifestPayload;
33
+
34
+ const UPDATE_FILE_MANIFEST_PAYLOAD_SUCCESS = {
35
+ isFacetsLoading: false,
36
+ isFacetsSuccess: true,
37
+ } as UpdateFileManifestPayload;
38
+
39
+ describe("updateFilesFacetsStatus", () => {
40
+ test("files facets NOT_STARTED, request is IDLE", () => {
41
+ expect(
42
+ updateFilesFacetsStatus(
43
+ FILE_MANIFEST_STATE_NOT_STARTED,
44
+ UPDATE_FILE_MANIFEST_PAYLOAD_IDLE
45
+ )
46
+ ).toBe(FILES_FACETS_STATUS.NOT_STARTED);
47
+ });
48
+
49
+ test("files facets NOT_STARTED, request is LOADING", () => {
50
+ expect(
51
+ updateFilesFacetsStatus(
52
+ FILE_MANIFEST_STATE_NOT_STARTED,
53
+ UPDATE_FILE_MANIFEST_PAYLOAD_LOADING
54
+ )
55
+ ).toBe(FILES_FACETS_STATUS.IN_PROGRESS);
56
+ });
57
+
58
+ test("files facets IN_PROGRESS, request is LOADING", () => {
59
+ expect(
60
+ updateFilesFacetsStatus(
61
+ FILE_MANIFEST_STATE_IN_PROGRESS,
62
+ UPDATE_FILE_MANIFEST_PAYLOAD_LOADING
63
+ )
64
+ ).toBe(FILES_FACETS_STATUS.IN_PROGRESS);
65
+ });
66
+
67
+ test("files facets IN_PROGRESS, request is SUCCESS", () => {
68
+ expect(
69
+ updateFilesFacetsStatus(
70
+ FILE_MANIFEST_STATE_IN_PROGRESS,
71
+ UPDATE_FILE_MANIFEST_PAYLOAD_SUCCESS
72
+ )
73
+ ).toBe(FILES_FACETS_STATUS.COMPLETED);
74
+ });
75
+
76
+ test("files facets COMPLETED, request is SUCCESS", () => {
77
+ expect(
78
+ updateFilesFacetsStatus(
79
+ FILE_MANIFEST_STATE_COMPLETED,
80
+ UPDATE_FILE_MANIFEST_PAYLOAD_SUCCESS
81
+ )
82
+ ).toBe(FILES_FACETS_STATUS.COMPLETED);
83
+ });
84
+ });