@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.
- package/.github/workflows/release-please.yml +3 -6
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +19 -0
- package/lib/common/analytics/entities.d.ts +8 -0
- package/lib/common/analytics/entities.js +3 -0
- package/lib/components/Export/common/tracking.d.ts +10 -3
- package/lib/components/Export/common/tracking.js +17 -3
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +1 -1
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +4 -4
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
- package/lib/components/Export/components/ExportToTerra/exportToTerra.js +4 -4
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.js +2 -2
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +1 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.js +4 -4
- package/lib/components/Filter/components/FilterTag/filterTag.styles.d.ts +1 -1
- package/lib/components/Index/components/AzulFileDownload/azulFileDownload.d.ts +4 -1
- package/lib/components/Index/components/AzulFileDownload/azulFileDownload.js +3 -1
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.d.ts +2 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.js +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.d.ts +2 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.js +27 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.d.ts +15 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.js +26 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/constants.d.ts +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/constants.js +27 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/types.d.ts +12 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/types.js +1 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/utils.d.ts +19 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/utils.js +29 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.d.ts +3 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.js +10 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.d.ts +5 -0
- package/lib/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.js +9 -0
- package/lib/components/Layout/components/Footer/footer.d.ts +3 -2
- package/lib/components/Layout/components/Footer/footer.js +4 -3
- package/lib/components/Layout/components/Outline/components/ContentsTab/contentsTab.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
- package/lib/components/Support/components/SupportRequest/components/Dialog/dialog.styles.js +5 -0
- package/lib/components/Support/components/ViewSupport/viewSupport.styles.js +5 -0
- package/lib/components/Table/common/utils.js +0 -1
- package/lib/components/common/Tabs/tabs.styles.d.ts +1 -1
- package/lib/config/entities.d.ts +1 -0
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +1 -1
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +3 -2
- package/lib/hooks/useFileManifest/common/entities.d.ts +5 -5
- package/lib/hooks/useFileManifest/common/entities.js +7 -6
- package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +3 -1
- package/lib/hooks/useFileManifest/useRequestFileManifest.js +4 -1
- package/lib/providers/fileManifestState/actions.d.ts +9 -0
- package/lib/providers/fileManifestState/actions.js +19 -0
- package/lib/providers/fileManifestState/constants.d.ts +4 -0
- package/lib/providers/fileManifestState/constants.js +25 -0
- package/lib/providers/fileManifestState/utils.d.ts +34 -0
- package/lib/providers/fileManifestState/utils.js +80 -0
- package/lib/providers/fileManifestState.d.ts +5 -19
- package/lib/providers/fileManifestState.js +17 -37
- package/lib/styles/common/mui/chip.d.ts +11 -0
- package/lib/styles/common/mui/chip.js +25 -0
- package/lib/theme/common/components.js +16 -0
- package/lib/views/ExportView/exportView.js +1 -1
- package/package.json +1 -1
- package/release-please-config.json +23 -0
- package/src/common/analytics/entities.ts +8 -0
- package/src/components/Export/common/tracking.ts +22 -3
- package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +4 -2
- package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +9 -3
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +7 -1
- package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +4 -2
- package/src/components/Index/components/AzulFileDownload/azulFileDownload.tsx +8 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/constants.ts +5 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/title.tsx +53 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/components/Tooltip/components/Title/utils.ts +31 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/constants.ts +30 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/types.ts +14 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/utils.ts +32 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.styles.ts +10 -0
- package/src/components/Layout/components/Footer/components/VersionInfo/versionInfo.tsx +31 -0
- package/src/components/Layout/components/Footer/footer.tsx +5 -2
- package/src/components/Support/components/SupportRequest/components/Dialog/dialog.styles.ts +5 -0
- package/src/components/Support/components/ViewSupport/viewSupport.styles.ts +5 -0
- package/src/components/Table/common/utils.ts +0 -1
- package/src/config/entities.ts +1 -0
- package/src/hooks/useFileManifest/common/buildFileManifestRequestURL.ts +3 -4
- package/src/hooks/useFileManifest/common/entities.ts +5 -6
- package/src/hooks/useFileManifest/useRequestFileManifest.ts +5 -0
- package/src/providers/fileManifestState/actions.ts +34 -0
- package/src/providers/fileManifestState/constants.ts +31 -0
- package/src/providers/fileManifestState/utils.ts +108 -0
- package/src/providers/fileManifestState.tsx +30 -58
- package/src/styles/common/mui/chip.ts +36 -0
- package/src/theme/common/components.ts +16 -0
- package/src/views/ExportView/exportView.tsx +1 -1
- package/tests/azulFileDownload.test.tsx +11 -6
- package/tests/fileManifestRequestFilters.test.ts +160 -0
- 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
|
+
});
|