@databiosphere/findable-ui 16.1.0 → 18.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 (109) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/lib/apis/azul/common/filterTransformer.js +1 -1
  4. package/lib/apis/azul/common/utils.d.ts +1 -1
  5. package/lib/apis/azul/common/utils.js +5 -1
  6. package/lib/common/entities.d.ts +3 -3
  7. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +3 -2
  8. package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +6 -4
  9. package/lib/components/Export/components/ExportForm/components/ExportManifestDownloadFormatForm/exportManifestDownloadFormatForm.d.ts +3 -2
  10. package/lib/components/Export/components/ExportForm/components/ExportManifestDownloadFormatForm/exportManifestDownloadFormatForm.js +2 -12
  11. package/lib/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.d.ts +5 -2
  12. package/lib/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.js +2 -2
  13. package/lib/components/Export/components/ExportToTerra/components/ExportToTerraNotStarted/exportToTerraNotStarted.d.ts +3 -1
  14. package/lib/components/Export/components/ExportToTerra/components/ExportToTerraNotStarted/exportToTerraNotStarted.js +2 -2
  15. package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +1 -1
  16. package/lib/components/Export/components/ExportToTerra/exportToTerra.js +9 -6
  17. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.d.ts +3 -1
  18. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.js +3 -4
  19. package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +3 -2
  20. package/lib/components/Export/components/ManifestDownload/manifestDownload.js +6 -4
  21. package/lib/components/Filter/common/utils.js +1 -1
  22. package/lib/components/Filter/components/VariableSizeList/VariableSizeList.d.ts +1 -1
  23. package/lib/components/Filter/components/VariableSizeListItem/variableSizeListItem.d.ts +1 -1
  24. package/lib/components/Table/common/utils.js +1 -1
  25. package/lib/config/entities.d.ts +1 -1
  26. package/lib/hooks/types.d.ts +4 -0
  27. package/lib/hooks/types.js +5 -0
  28. package/lib/hooks/useCategoryFilter.js +5 -1
  29. package/lib/hooks/useFileManifest/common/entities.d.ts +0 -5
  30. package/lib/hooks/useFileManifest/common/entities.js +0 -6
  31. package/lib/hooks/useFileManifest/useFileManifest.d.ts +8 -5
  32. package/lib/hooks/useFileManifest/useFileManifest.js +29 -8
  33. package/lib/hooks/useFileManifest/useFileManifestDownload.js +10 -9
  34. package/lib/hooks/useFileManifest/useFileManifestFormat.d.ts +12 -0
  35. package/lib/hooks/useFileManifest/useFileManifestFormat.js +10 -0
  36. package/lib/hooks/useRequestFileLocation.d.ts +1 -4
  37. package/lib/hooks/useRequestFileLocation.js +1 -5
  38. package/lib/hooks/useRequestManifest/constants.d.ts +2 -0
  39. package/lib/hooks/useRequestManifest/constants.js +4 -0
  40. package/lib/hooks/useRequestManifest/types.d.ts +6 -0
  41. package/lib/hooks/useRequestManifest/types.js +1 -0
  42. package/lib/hooks/useRequestManifest/useRequestManifest.d.ts +10 -0
  43. package/lib/hooks/useRequestManifest/useRequestManifest.js +30 -0
  44. package/lib/hooks/useRequestManifest/utils.d.ts +65 -0
  45. package/lib/hooks/useRequestManifest/utils.js +118 -0
  46. package/lib/mocks/useRequestFileManifest.mocks.d.ts +11 -0
  47. package/lib/mocks/useRequestFileManifest.mocks.js +100 -0
  48. package/lib/providers/fileManifestState/constants.d.ts +0 -2
  49. package/lib/providers/fileManifestState/constants.js +0 -11
  50. package/lib/providers/fileManifestState.d.ts +3 -25
  51. package/lib/providers/fileManifestState.js +5 -40
  52. package/lib/viewModelBuilders/common/utils.d.ts +6 -6
  53. package/lib/viewModelBuilders/common/utils.js +10 -10
  54. package/lib/views/ExploreView/exploreView.js +1 -1
  55. package/lib/views/ExportView/exportView.js +2 -2
  56. package/package.json +1 -1
  57. package/src/apis/azul/common/filterTransformer.ts +1 -1
  58. package/src/apis/azul/common/utils.ts +4 -2
  59. package/src/common/entities.ts +3 -3
  60. package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +17 -10
  61. package/src/components/Export/components/ExportForm/components/ExportManifestDownloadFormatForm/exportManifestDownloadFormatForm.tsx +7 -16
  62. package/src/components/Export/components/ExportToTerra/components/ExportToTerraForm/exportToTerraForm.tsx +8 -4
  63. package/src/components/Export/components/ExportToTerra/components/ExportToTerraNotStarted/exportToTerraNotStarted.tsx +4 -1
  64. package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +13 -9
  65. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/manifestDownloadEntity.tsx +4 -9
  66. package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +17 -11
  67. package/src/components/Filter/common/utils.ts +1 -1
  68. package/src/components/Filter/components/VariableSizeList/VariableSizeList.tsx +1 -1
  69. package/src/components/Filter/components/VariableSizeListItem/variableSizeListItem.tsx +1 -1
  70. package/src/components/Table/common/utils.ts +1 -1
  71. package/src/config/entities.ts +1 -1
  72. package/src/hooks/types.ts +4 -0
  73. package/src/hooks/useCategoryFilter.ts +5 -1
  74. package/src/hooks/useFileManifest/common/entities.ts +0 -6
  75. package/src/hooks/useFileManifest/common/utils.ts +2 -2
  76. package/src/hooks/useFileManifest/useFileManifest.ts +34 -13
  77. package/src/hooks/useFileManifest/useFileManifestDownload.ts +21 -16
  78. package/src/hooks/useFileManifest/useFileManifestFormat.ts +23 -0
  79. package/src/hooks/useRequestFileLocation.ts +1 -5
  80. package/src/hooks/useRequestManifest/constants.ts +6 -0
  81. package/src/hooks/useRequestManifest/types.ts +7 -0
  82. package/src/hooks/useRequestManifest/useRequestManifest.ts +49 -0
  83. package/src/hooks/useRequestManifest/utils.ts +153 -0
  84. package/src/mocks/useRequestFileManifest.mocks.ts +121 -0
  85. package/src/providers/fileManifestState/constants.ts +0 -15
  86. package/src/providers/fileManifestState.tsx +7 -81
  87. package/src/viewModelBuilders/common/utils.ts +10 -10
  88. package/src/views/ExploreView/exploreView.tsx +1 -1
  89. package/src/views/ExportView/exportView.tsx +2 -2
  90. package/tests/buildRequestFilters.test.ts +68 -0
  91. package/tests/buildRequestManifest.test.ts +103 -0
  92. package/tests/useRequestManifest.test.ts +193 -0
  93. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +0 -15
  94. package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +0 -28
  95. package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +0 -5
  96. package/lib/hooks/useFileManifest/useFileManifestURL.js +0 -11
  97. package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +0 -11
  98. package/lib/hooks/useFileManifest/useRequestFileManifest.js +0 -40
  99. package/lib/providers/fileManifestState/actions.d.ts +0 -9
  100. package/lib/providers/fileManifestState/actions.js +0 -19
  101. package/lib/providers/fileManifestState/utils.d.ts +0 -34
  102. package/lib/providers/fileManifestState/utils.js +0 -80
  103. package/src/hooks/useFileManifest/common/buildFileManifestRequestURL.ts +0 -44
  104. package/src/hooks/useFileManifest/useFileManifestURL.ts +0 -12
  105. package/src/hooks/useFileManifest/useRequestFileManifest.ts +0 -51
  106. package/src/providers/fileManifestState/actions.ts +0 -34
  107. package/src/providers/fileManifestState/utils.ts +0 -108
  108. package/tests/fileManifestRequestFilters.test.ts +0 -160
  109. package/tests/updateFilesFacetsStatus.test.ts +0 -84
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "16.1.0"
2
+ ".": "18.0.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [18.0.0](https://github.com/DataBiosphere/findable-ui/compare/v17.0.0...v18.0.0) (2024-12-18)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * ensure select category value label is string and type key as unknown ([#298](https://github.com/DataBiosphere/findable-ui/issues/298)) (#299)
9
+
10
+ ### Bug Fixes
11
+
12
+ * ensure select category value label is string and type key as unknown ([#298](https://github.com/DataBiosphere/findable-ui/issues/298)) ([#299](https://github.com/DataBiosphere/findable-ui/issues/299)) ([c7b5baa](https://github.com/DataBiosphere/findable-ui/commit/c7b5baae525f6e54493a2748070fa46cc36d9f67))
13
+
14
+ ## [17.0.0](https://github.com/DataBiosphere/findable-ui/compare/v16.1.0...v17.0.0) (2024-12-12)
15
+
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ * exports via main button don't include orphans ([#287](https://github.com/DataBiosphere/findable-ui/issues/287)) (#288)
20
+
21
+ ### Features
22
+
23
+ * exports via main button don't include orphans ([#287](https://github.com/DataBiosphere/findable-ui/issues/287)) ([#288](https://github.com/DataBiosphere/findable-ui/issues/288)) ([86e3e40](https://github.com/DataBiosphere/findable-ui/commit/86e3e4047cce84a90348719c9ca7b41a3a93e4c3))
24
+
3
25
  ## [16.1.0](https://github.com/DataBiosphere/findable-ui/compare/v16.0.0...v16.1.0) (2024-12-12)
4
26
 
5
27
 
@@ -88,7 +88,7 @@ export function transformTermFacets(termFacets, filterState) {
88
88
  categoryValues.push({
89
89
  count: 0,
90
90
  key: term,
91
- label: term ?? LABEL.UNSPECIFIED,
91
+ label: String(term ?? LABEL.UNSPECIFIED),
92
92
  selected: false, // Selected state updated in filter hook
93
93
  });
94
94
  }
@@ -4,4 +4,4 @@ import { ParamValue } from "./filterTransformer";
4
4
  * @param value - Filter value.
5
5
  * @returns filter parameter value.
6
6
  */
7
- export declare function getFilterParameterValue(value: string): ParamValue;
7
+ export declare function getFilterParameterValue(value: unknown): ParamValue;
@@ -13,5 +13,9 @@ export function getFilterParameterValue(value) {
13
13
  if (value === "false") {
14
14
  return false;
15
15
  }
16
- return value;
16
+ if (typeof value === "string" || typeof value === "boolean")
17
+ return value;
18
+ if (value === null || value === undefined)
19
+ return null;
20
+ return String(value);
17
21
  }
@@ -13,7 +13,7 @@ export interface CategoryTag {
13
13
  /**
14
14
  * Category values to be used as keys. For example, "Homo sapiens" or "10X 3' v2 sequencing".
15
15
  */
16
- export type CategoryValueKey = string;
16
+ export type CategoryValueKey = unknown;
17
17
  /**
18
18
  * Set of selected category values.
19
19
  */
@@ -46,7 +46,7 @@ export interface SelectCategory {
46
46
  */
47
47
  export interface SelectCategoryValue {
48
48
  count: number;
49
- key: CategoryKey;
49
+ key: CategoryValueKey;
50
50
  label: string;
51
51
  selected: boolean;
52
52
  }
@@ -64,7 +64,7 @@ export interface SelectCategoryValueView {
64
64
  */
65
65
  export interface SelectCategoryView {
66
66
  isDisabled?: boolean;
67
- key: CategoryValueKey;
67
+ key: CategoryKey;
68
68
  label: string;
69
69
  values: SelectCategoryValueView[];
70
70
  }
@@ -2,7 +2,7 @@ import { ElementType } from "react";
2
2
  import { Filters } from "../../../../common/entities";
3
3
  import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
4
4
  import { FileManifestState } from "../../../../providers/fileManifestState";
5
- import { FormFacet } from "../../common/entities";
5
+ import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
6
6
  interface DownloadCurlCommandProps {
7
7
  DownloadCurlForm: ElementType;
8
8
  DownloadCurlStart: ElementType;
@@ -12,6 +12,7 @@ interface DownloadCurlCommandProps {
12
12
  fileSummaryFacetName: string;
13
13
  filters: Filters;
14
14
  formFacet: FormFacet;
15
+ manifestDownloadFormat?: ManifestDownloadFormat;
15
16
  }
16
- export declare const DownloadCurlCommand: ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, }: DownloadCurlCommandProps) => JSX.Element;
17
+ export declare const DownloadCurlCommand: ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, }: DownloadCurlCommandProps) => JSX.Element;
17
18
  export {};
@@ -2,16 +2,18 @@ import React, { useState } from "react";
2
2
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
3
3
  import { useExploreState } from "../../../../hooks/useExploreState";
4
4
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
5
- import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
5
+ import { useRequestFileLocation, } from "../../../../hooks/useRequestFileLocation";
6
+ import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
6
7
  import { BULK_DOWNLOAD_EXECUTION_ENVIRONMENT, } from "../../common/entities";
7
8
  import { trackBulkDownloadRequested } from "../../common/tracking";
8
9
  import { DownloadCurlCommandNotStarted } from "./components/DownloadCurlCommandNotStarted/downloadCurlCommandNotStarted";
9
10
  import { DownloadCurlCommandReady } from "./components/DownloadCurlCommandReady/downloadCurlCommandReady";
10
- export const DownloadCurlCommand = ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, }) => {
11
- useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.CURL, filters, fileSummaryFacetName);
11
+ export const DownloadCurlCommand = ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.CURL, }) => {
12
+ useFileManifest(filters, fileSummaryFacetName);
12
13
  const [executionEnvironment, setExecutionEnvironment] = useState(BULK_DOWNLOAD_EXECUTION_ENVIRONMENT.BASH);
13
14
  const { exploreState: { tabValue: entityList }, } = useExploreState();
14
- const { data, isLoading, run } = useFileManifest();
15
+ const { requestMethod, requestUrl } = useRequestManifest(manifestDownloadFormat, formFacet);
16
+ const { data, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
15
17
  const curlCommand = getBulkDownloadCurlCommand(data, executionEnvironment);
16
18
  return curlCommand ? (React.createElement(DownloadCurlCommandReady, { curlCommand: curlCommand, DownloadCurlSuccess: DownloadCurlSuccess })) : (React.createElement(DownloadCurlCommandNotStarted, { DownloadCurlForm: DownloadCurlForm, DownloadCurlStart: DownloadCurlStart, executionEnvironment: executionEnvironment, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, onRequestManifest: () => {
17
19
  // Execute GTM tracking.
@@ -1,6 +1,7 @@
1
+ import { FileManifestFormatState } from "../../../../../../hooks/useFileManifest/useFileManifestFormat";
1
2
  import { ManifestDownloadFormat } from "../../../../common/entities";
2
3
  export interface ExportManifestDownloadFormatFormProps {
3
- manifestDownloadFormat?: ManifestDownloadFormat;
4
+ fileManifestFormatState: FileManifestFormatState;
4
5
  manifestDownloadFormats: ManifestDownloadFormat[];
5
6
  }
6
- export declare const ExportManifestDownloadFormatForm: ({ manifestDownloadFormat, manifestDownloadFormats, }: ExportManifestDownloadFormatFormProps) => JSX.Element;
7
+ export declare const ExportManifestDownloadFormatForm: ({ fileManifestFormatState, manifestDownloadFormats, }: ExportManifestDownloadFormatFormProps) => JSX.Element;
@@ -1,20 +1,10 @@
1
1
  import { FormControlLabel, FormLabel, Radio, RadioGroup } from "@mui/material";
2
2
  import React from "react";
3
- import { useFileManifestState } from "../../../../../../hooks/useFileManifestState";
4
- import { FileManifestActionKind } from "../../../../../../providers/fileManifestState";
5
3
  import { RadioCheckedIcon } from "../../../../../common/CustomIcon/components/RadioCheckedIcon/radioCheckedIcon";
6
4
  import { RadioUncheckedIcon } from "../../../../../common/CustomIcon/components/RadioUncheckedIcon/radioUncheckedIcon";
7
5
  import { FormControl } from "../../exportForm.styles";
8
- export const ExportManifestDownloadFormatForm = ({ manifestDownloadFormat, manifestDownloadFormats, }) => {
9
- const { fileManifestDispatch } = useFileManifestState();
10
- // Updates file manifest format state.
11
- const onUpdateManifestFormat = (format) => {
12
- fileManifestDispatch({
13
- payload: format,
14
- type: FileManifestActionKind.UpdateFileManifestFormat,
15
- });
16
- };
6
+ export const ExportManifestDownloadFormatForm = ({ fileManifestFormatState, manifestDownloadFormats, }) => {
17
7
  return (React.createElement(FormControl, null,
18
8
  React.createElement(FormLabel, null, "Download Format"),
19
- React.createElement(RadioGroup, { value: manifestDownloadFormat ?? "" }, manifestDownloadFormats.map((manifestFormat) => (React.createElement(FormControlLabel, { control: React.createElement(Radio, { checkedIcon: React.createElement(RadioCheckedIcon, null), icon: React.createElement(RadioUncheckedIcon, null), onChange: () => onUpdateManifestFormat(manifestFormat), size: "small", value: manifestFormat }), key: manifestFormat, label: manifestFormat }))))));
9
+ React.createElement(RadioGroup, { value: fileManifestFormatState.fileManifestFormat ?? "" }, manifestDownloadFormats.map((manifestFormat) => (React.createElement(FormControlLabel, { control: React.createElement(Radio, { checkedIcon: React.createElement(RadioCheckedIcon, null), icon: React.createElement(RadioUncheckedIcon, null), onChange: () => fileManifestFormatState.setFileManifestFormat(manifestFormat), size: "small", value: manifestFormat }), key: manifestFormat, label: manifestFormat }))))));
20
10
  };
@@ -1,10 +1,13 @@
1
+ import { Dispatch, SetStateAction } from "react";
2
+ import { FileManifestFormatState } from "../../../../../../hooks/useFileManifest/useFileManifestFormat";
1
3
  import { FormFacet, ManifestDownloadFormat } from "../../../../common/entities";
2
4
  import { OnRequestManifestFn } from "../../../ExportForm/exportForm";
3
5
  export interface ExportToTerraFormProps {
6
+ fileManifestFormatState: FileManifestFormatState;
4
7
  formFacet: FormFacet;
5
8
  isLoading: boolean;
6
- manifestDownloadFormat?: ManifestDownloadFormat;
7
9
  manifestDownloadFormats: ManifestDownloadFormat[];
8
10
  onRequestManifest: OnRequestManifestFn;
11
+ setFileManifestFormat: Dispatch<SetStateAction<ManifestDownloadFormat | undefined>>;
9
12
  }
10
- export declare const ExportToTerraForm: ({ formFacet, isLoading, manifestDownloadFormat, manifestDownloadFormats, onRequestManifest, }: ExportToTerraFormProps) => JSX.Element;
13
+ export declare const ExportToTerraForm: ({ fileManifestFormatState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }: ExportToTerraFormProps) => JSX.Element;
@@ -2,9 +2,9 @@ import React from "react";
2
2
  import { ExportButton } from "../../../ExportForm/components/ExportButton/exportButton";
3
3
  import { ExportManifestDownloadFormatForm } from "../../../ExportForm/components/ExportManifestDownloadFormatForm/exportManifestDownloadFormatForm";
4
4
  import { ExportForm, } from "../../../ExportForm/exportForm";
5
- export const ExportToTerraForm = ({ formFacet, isLoading, manifestDownloadFormat, manifestDownloadFormats, onRequestManifest, }) => {
5
+ export const ExportToTerraForm = ({ fileManifestFormatState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }) => {
6
6
  return (React.createElement(ExportForm, { Button: renderButton, formFacet: formFacet, isLoading: isLoading, onRequestManifest: onRequestManifest },
7
- React.createElement(ExportManifestDownloadFormatForm, { manifestDownloadFormat: manifestDownloadFormat, manifestDownloadFormats: manifestDownloadFormats })));
7
+ React.createElement(ExportManifestDownloadFormatForm, { fileManifestFormatState: fileManifestFormatState, manifestDownloadFormats: manifestDownloadFormats })));
8
8
  };
9
9
  /**
10
10
  * Build the export button.
@@ -1,14 +1,16 @@
1
1
  import { ElementType } from "react";
2
+ import { FileManifestFormatState } from "../../../../../../hooks/useFileManifest/useFileManifestFormat";
2
3
  import { FileManifestState } from "../../../../../../providers/fileManifestState";
3
4
  import { FormFacet, ManifestDownloadFormat } from "../../../../common/entities";
4
5
  import { OnRequestManifestFn } from "../../../ExportForm/exportForm";
5
6
  export interface ExportToTerraNotStartedProps {
6
7
  ExportTerraForm: ElementType;
7
8
  ExportToTerraStart: ElementType;
9
+ fileManifestFormatState: FileManifestFormatState;
8
10
  fileManifestState: FileManifestState;
9
11
  formFacet: FormFacet;
10
12
  isLoading: boolean;
11
13
  manifestDownloadFormats: ManifestDownloadFormat[];
12
14
  onRequestManifest: OnRequestManifestFn;
13
15
  }
14
- export declare const ExportToTerraNotStarted: ({ ExportTerraForm, ExportToTerraStart, fileManifestState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }: ExportToTerraNotStartedProps) => JSX.Element;
16
+ export declare const ExportToTerraNotStarted: ({ ExportTerraForm, ExportToTerraStart, fileManifestFormatState, fileManifestState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }: ExportToTerraNotStartedProps) => JSX.Element;
@@ -3,12 +3,12 @@ import { PAPER_PANEL_STYLE } from "../../../../../common/Paper/paper";
3
3
  import { FluidPaper } from "../../../../../common/Paper/paper.styles";
4
4
  import { Loading } from "../../../../../Loading/loading";
5
5
  import { Section, SectionContent } from "../../../../export.styles";
6
- export const ExportToTerraNotStarted = ({ ExportTerraForm, ExportToTerraStart, fileManifestState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }) => {
6
+ export const ExportToTerraNotStarted = ({ ExportTerraForm, ExportToTerraStart, fileManifestFormatState, fileManifestState, formFacet, isLoading, manifestDownloadFormats, onRequestManifest, }) => {
7
7
  return (React.createElement("div", null,
8
8
  React.createElement(Loading, { loading: isLoading, panelStyle: PAPER_PANEL_STYLE.FLUID, text: "Your link will be ready shortly..." }),
9
9
  React.createElement(FluidPaper, null,
10
10
  React.createElement(Section, null,
11
11
  React.createElement(SectionContent, null,
12
12
  React.createElement(ExportToTerraStart, null)),
13
- React.createElement(ExportTerraForm, { formFacet: formFacet, isLoading: fileManifestState.isLoading, manifestDownloadFormat: fileManifestState.fileManifestFormat, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest: onRequestManifest })))));
13
+ React.createElement(ExportTerraForm, { fileManifestFormatState: fileManifestFormatState, formFacet: formFacet, isLoading: fileManifestState.isLoading, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest: onRequestManifest })))));
14
14
  };
@@ -15,4 +15,4 @@ export interface ExportToTerraProps {
15
15
  manifestDownloadFormat?: ManifestDownloadFormat;
16
16
  manifestDownloadFormats: ManifestDownloadFormat[];
17
17
  }
18
- export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }: ExportToTerraProps) => JSX.Element;
18
+ export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }: ExportToTerraProps) => JSX.Element;
@@ -2,17 +2,20 @@ import React from "react";
2
2
  import { useExploreState } from "../../../../hooks/useExploreState";
3
3
  import { useExportToTerraResponseURL } from "../../../../hooks/useExportToTerraResponseURL";
4
4
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
5
- import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
5
+ import { useFileManifestFormat } from "../../../../hooks/useFileManifest/useFileManifestFormat";
6
+ import { useRequestFileLocation } from "../../../../hooks/useRequestFileLocation";
7
+ import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
6
8
  import { trackExportToTerraRequested } from "../../common/tracking";
7
9
  import { ExportToTerraNotStarted } from "./components/ExportToTerraNotStarted/exportToTerraNotStarted";
8
10
  import { ExportToTerraReady } from "./components/ExportToTerraReady/exportToTerraReady";
9
- export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }) => {
11
+ export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }) => {
10
12
  const { exploreState: { tabValue: entityList }, } = useExploreState();
11
- useRequestFileManifest(fileManifestType, manifestDownloadFormat, filters, fileSummaryFacetName);
12
- const { requestParams } = fileManifestState;
13
- const { data, isLoading, run } = useFileManifest();
13
+ useFileManifest(filters, fileSummaryFacetName);
14
+ const fileManifestFormatState = useFileManifestFormat(manifestDownloadFormat);
15
+ const { requestMethod, requestParams, requestUrl } = useRequestManifest(fileManifestFormatState.fileManifestFormat, formFacet);
16
+ const { data, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
14
17
  const exportURL = useExportToTerraResponseURL(requestParams, data);
15
- return exportURL ? (React.createElement(ExportToTerraReady, { ExportToTerraSuccess: ExportToTerraSuccess, exportURL: exportURL })) : (React.createElement(ExportToTerraNotStarted, { ExportTerraForm: ExportForm, ExportToTerraStart: ExportToTerraStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest: () => {
18
+ return exportURL ? (React.createElement(ExportToTerraReady, { ExportToTerraSuccess: ExportToTerraSuccess, exportURL: exportURL })) : (React.createElement(ExportToTerraNotStarted, { ExportTerraForm: ExportForm, ExportToTerraStart: ExportToTerraStart, fileManifestFormatState: fileManifestFormatState, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, manifestDownloadFormats: manifestDownloadFormats, onRequestManifest: () => {
16
19
  // Execute GA tracking
17
20
  trackExportToTerraRequested(entityList);
18
21
  // Request manifest
@@ -1,8 +1,10 @@
1
1
  import { Filters } from "../../../../../../common/entities";
2
2
  import { FileManifestType } from "../../../../../../hooks/useFileManifest/common/entities";
3
+ import { ManifestDownloadFormat } from "../../../../common/entities";
3
4
  export interface ManifestDownloadEntityProps {
4
5
  fileManifestType: FileManifestType;
5
6
  filters: Filters;
7
+ manifestDownloadFormat?: ManifestDownloadFormat;
6
8
  metadataFilters: Filters;
7
9
  }
8
- export declare const ManifestDownloadEntity: ({ fileManifestType, filters, metadataFilters, }: ManifestDownloadEntityProps) => JSX.Element;
10
+ export declare const ManifestDownloadEntity: ({ filters, metadataFilters, }: ManifestDownloadEntityProps) => JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
- import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../../../apis/azul/common/entities";
3
- import { useRequestFileManifest } from "../../../../../../hooks/useFileManifest/useRequestFileManifest";
2
+ import { useFileManifest } from "../../../../../../hooks/useFileManifest/useFileManifest";
4
3
  import { FileManifestDownload } from "./components/FileManifestDownload/fileManifestDownload";
5
4
  import { FileManifestSpreadsheet } from "./components/FileManifestSpreadsheet/fileManifestSpreadsheet";
6
- export const ManifestDownloadEntity = ({ fileManifestType, filters, metadataFilters, }) => {
7
- useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, undefined);
5
+ export const ManifestDownloadEntity = ({ filters, metadataFilters, }) => {
6
+ useFileManifest(filters, undefined);
8
7
  return (React.createElement(React.Fragment, null,
9
8
  React.createElement(FileManifestSpreadsheet, { filters: metadataFilters }),
10
9
  React.createElement(FileManifestDownload, { filters: filters })));
@@ -2,7 +2,7 @@ import { ElementType } from "react";
2
2
  import { Filters } from "../../../../common/entities";
3
3
  import { FileManifestType } from "../../../../hooks/useFileManifest/common/entities";
4
4
  import { FileManifestState } from "../../../../providers/fileManifestState";
5
- import { FormFacet } from "../../common/entities";
5
+ import { FormFacet, ManifestDownloadFormat } from "../../common/entities";
6
6
  export interface ManifestDownloadProps {
7
7
  fileManifestState: FileManifestState;
8
8
  fileManifestType: FileManifestType;
@@ -10,7 +10,8 @@ export interface ManifestDownloadProps {
10
10
  filters: Filters;
11
11
  formFacet: FormFacet;
12
12
  ManifestDownloadForm: ElementType;
13
+ manifestDownloadFormat?: ManifestDownloadFormat;
13
14
  ManifestDownloadStart: ElementType;
14
15
  ManifestDownloadSuccess: ElementType;
15
16
  }
16
- export declare const ManifestDownload: ({ fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }: ManifestDownloadProps) => JSX.Element;
17
+ export declare const ManifestDownload: ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat, ManifestDownloadStart, ManifestDownloadSuccess, }: ManifestDownloadProps) => JSX.Element;
@@ -2,14 +2,16 @@ import React from "react";
2
2
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
3
3
  import { useExploreState } from "../../../../hooks/useExploreState";
4
4
  import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
5
- import { useRequestFileManifest } from "../../../../hooks/useFileManifest/useRequestFileManifest";
5
+ import { useRequestFileLocation, } from "../../../../hooks/useRequestFileLocation";
6
+ import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
6
7
  import { trackFileManifestRequested } from "../../common/tracking";
7
8
  import { ManifestDownloadNotStarted } from "./components/ManifestDownloadNotStarted/manifestDownloadNotStarted";
8
9
  import { ManifestDownloadReady } from "./components/ManifestDownloadReady/manifestDownloadReady";
9
- export const ManifestDownload = ({ fileManifestState, fileManifestType, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, ManifestDownloadStart, ManifestDownloadSuccess, }) => {
10
- useRequestFileManifest(fileManifestType, MANIFEST_DOWNLOAD_FORMAT.COMPACT, filters, fileSummaryFacetName);
10
+ export const ManifestDownload = ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.COMPACT, ManifestDownloadStart, ManifestDownloadSuccess, }) => {
11
+ useFileManifest(filters, fileSummaryFacetName);
11
12
  const { exploreState: { tabValue: entityList }, } = useExploreState();
12
- const { data, isLoading, run } = useFileManifest();
13
+ const { requestMethod, requestUrl } = useRequestManifest(manifestDownloadFormat, formFacet);
14
+ const { data, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
13
15
  const manifestURL = getManifestDownloadURL(data);
14
16
  return manifestURL ? (React.createElement(ManifestDownloadReady, { ManifestDownloadSuccess: ManifestDownloadSuccess, manifestURL: manifestURL })) : (React.createElement(ManifestDownloadNotStarted, { ManifestDownloadForm: ManifestDownloadForm, ManifestDownloadStart: ManifestDownloadStart, fileManifestState: fileManifestState, formFacet: formFacet, isLoading: isLoading, onRequestManifest: () => {
15
17
  trackFileManifestRequested(entityList);
@@ -60,7 +60,7 @@ export function getSortMatchesFn(searchTerm) {
60
60
  if (match) {
61
61
  matches.push({ labelRanges: match.ranges, score: match.score, value });
62
62
  }
63
- else {
63
+ else if (typeof value.key === "string") {
64
64
  match = matchString(value.key || "");
65
65
  if (match)
66
66
  matches.push({ score: match.score, value });
@@ -2,7 +2,7 @@ import { VariableSizeListProps as ListProps } from "react-window";
2
2
  import { CategoryKey } from "../../../../common/entities";
3
3
  import { OnFilterFn } from "../../../../hooks/useCategoryFilter";
4
4
  import { FilterMenuSearchMatch } from "../../common/entities";
5
- export type ItemSizeByItemKey = Map<string, number>;
5
+ export type ItemSizeByItemKey = Map<unknown, number>;
6
6
  export interface VariableSizeListProps {
7
7
  categoryKey: CategoryKey;
8
8
  categorySection?: string;
@@ -7,7 +7,7 @@ interface Props {
7
7
  categorySection?: string;
8
8
  matchedItem: FilterMenuSearchMatch;
9
9
  onFilter: OnFilterFn;
10
- onUpdateItemSizeByItemKey: (itemKey: string, itemSize: number) => void;
10
+ onUpdateItemSizeByItemKey: (itemKey: unknown, itemSize: number) => void;
11
11
  style: CSSProperties;
12
12
  }
13
13
  export default function VariableSizeListItem({ categoryKey, categorySection, matchedItem, onFilter, onUpdateItemSizeByItemKey, style, }: Props): JSX.Element;
@@ -42,7 +42,7 @@ export function buildCategoryViews(columns, columnFilters) {
42
42
  const values = [...getFacetedUniqueValues()].map(([value, count]) => ({
43
43
  count,
44
44
  key: value,
45
- label: value,
45
+ label: String(value ?? ""),
46
46
  selected: false, // Selected state updated in reducer.
47
47
  }));
48
48
  categoryViews.push({
@@ -262,7 +262,7 @@ export interface TrackFilterAppliedPayload {
262
262
  searchTerm: string;
263
263
  section: string;
264
264
  selected: boolean;
265
- value: string;
265
+ value: unknown;
266
266
  }
267
267
  /**
268
268
  * Filter applied tracking function
@@ -0,0 +1,4 @@
1
+ export declare enum METHOD {
2
+ GET = "GET",
3
+ PUT = "PUT"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var METHOD;
2
+ (function (METHOD) {
3
+ METHOD["GET"] = "GET";
4
+ METHOD["PUT"] = "PUT";
5
+ })(METHOD || (METHOD = {}));
@@ -158,7 +158,11 @@ function isCategoryAcceptListed(category, categoryConfigs) {
158
158
  * @returns Number indicating sort precedence of cv0 vs cv1.
159
159
  */
160
160
  function sortCategoryValueViews(cvv0, cvv1) {
161
- return COLLATOR_CASE_INSENSITIVE.compare(cvv0.label, cvv1.label);
161
+ return !cvv0.label
162
+ ? 1
163
+ : !cvv1.label
164
+ ? -1
165
+ : COLLATOR_CASE_INSENSITIVE.compare(cvv0.label, cvv1.label);
162
166
  }
163
167
  /**
164
168
  * Sort category views by display label, ascending.
@@ -38,11 +38,6 @@ export declare enum FILE_MANIFEST_TYPE {
38
38
  EXPORT_TO_TERRA = "EXPORT_TO_TERRA"
39
39
  }
40
40
  export type FileManifestType = FILE_MANIFEST_TYPE;
41
- export declare enum FILES_FACETS_STATUS {
42
- COMPLETED = "COMPLETED",
43
- IN_PROGRESS = "IN_PROGRESS",
44
- NOT_STARTED = "NOT_STARTED"
45
- }
46
41
  export type SelectedSearchTermsBySearchKey = Map<CategoryKey, Set<CategoryValueKey>>;
47
42
  /**
48
43
  * Model of an individual facet value. For example, the term "Homo Sapiens" contained in the facet "Species".
@@ -7,9 +7,3 @@ export var FILE_MANIFEST_TYPE;
7
7
  FILE_MANIFEST_TYPE["ENTITY_EXPORT_TO_TERRA"] = "ENTITY_EXPORT_TO_TERRA";
8
8
  FILE_MANIFEST_TYPE["EXPORT_TO_TERRA"] = "EXPORT_TO_TERRA";
9
9
  })(FILE_MANIFEST_TYPE || (FILE_MANIFEST_TYPE = {}));
10
- export var FILES_FACETS_STATUS;
11
- (function (FILES_FACETS_STATUS) {
12
- FILES_FACETS_STATUS["COMPLETED"] = "COMPLETED";
13
- FILES_FACETS_STATUS["IN_PROGRESS"] = "IN_PROGRESS";
14
- FILES_FACETS_STATUS["NOT_STARTED"] = "NOT_STARTED";
15
- })(FILES_FACETS_STATUS || (FILES_FACETS_STATUS = {}));
@@ -1,7 +1,10 @@
1
- import { UseRequestFileLocationResult } from "../useRequestFileLocation";
1
+ import { Filters } from "../../common/entities";
2
2
  /**
3
- * Requests file manifest.
4
- * @param requestURL - Request URL.
5
- * @returns file manifest request response, function and status.
3
+ * Initializes the file manifest with specified filters and a file summary facet name.
4
+ * This hook sets up the file manifest state by dispatching an action to fetch the manifest
5
+ * based on the provided initial filters and file summary facet name. It also ensures that
6
+ * the manifest state is cleared when the component is unmounted.
7
+ * @param initialFilters - The initial filters used to fetch the file manifest.
8
+ * @param fileSummaryFacetName - The name of the file summary facet to be used in the file manifest request.
6
9
  */
7
- export declare const useFileManifest: (requestURL?: string) => UseRequestFileLocationResult;
10
+ export declare const useFileManifest: (initialFilters?: Filters | undefined, fileSummaryFacetName?: string) => void;
@@ -1,12 +1,33 @@
1
+ import { useEffect, useState } from "react";
2
+ import { FileManifestActionKind } from "../../providers/fileManifestState";
1
3
  import { useFileManifestState } from "../useFileManifestState";
2
- import { METHOD, useRequestFileLocation, } from "../useRequestFileLocation";
3
4
  /**
4
- * Requests file manifest.
5
- * @param requestURL - Request URL.
6
- * @returns file manifest request response, function and status.
5
+ * Initializes the file manifest with specified filters and a file summary facet name.
6
+ * This hook sets up the file manifest state by dispatching an action to fetch the manifest
7
+ * based on the provided initial filters and file summary facet name. It also ensures that
8
+ * the manifest state is cleared when the component is unmounted.
9
+ * @param initialFilters - The initial filters used to fetch the file manifest.
10
+ * @param fileSummaryFacetName - The name of the file summary facet to be used in the file manifest request.
7
11
  */
8
- export const useFileManifest = (requestURL) => {
9
- const { fileManifestState } = useFileManifestState();
10
- const url = requestURL || fileManifestState.requestURL;
11
- return useRequestFileLocation(url, METHOD.PUT);
12
+ export const useFileManifest = (initialFilters = [], fileSummaryFacetName) => {
13
+ // Initial file manifest filter.
14
+ const [initFilters] = useState(() => initialFilters);
15
+ // File manifest state.
16
+ const { fileManifestDispatch } = useFileManifestState();
17
+ // Fetches file manifest with the given file manifest filters, format.
18
+ useEffect(() => {
19
+ fileManifestDispatch({
20
+ payload: {
21
+ fileSummaryFacetName,
22
+ filters: initFilters,
23
+ },
24
+ type: FileManifestActionKind.FetchFileManifest,
25
+ });
26
+ return () => {
27
+ fileManifestDispatch({
28
+ payload: undefined,
29
+ type: FileManifestActionKind.ClearFileManifest,
30
+ });
31
+ };
32
+ }, [fileManifestDispatch, fileSummaryFacetName, initFilters]);
12
33
  };
@@ -2,9 +2,9 @@ import { useEffect } from "react";
2
2
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../apis/azul/common/entities";
3
3
  import { BULK_DOWNLOAD_EXECUTION_ENVIRONMENT } from "../../components/Export/common/entities";
4
4
  import { useCatalog } from "../useCatalog";
5
- import { buildFileManifestRequestURL } from "./common/buildFileManifestRequestURL";
6
- import { useFileManifest } from "./useFileManifest";
7
- import { useFileManifestURL } from "./useFileManifestURL";
5
+ import { useConfig } from "../useConfig";
6
+ import { useRequestFileLocation, } from "../useRequestFileLocation";
7
+ import { buildRequestManifest } from "../useRequestManifest/utils";
8
8
  /**
9
9
  * Returns file manifest download url and file name.
10
10
  * @param filters - Filters.
@@ -12,13 +12,14 @@ import { useFileManifestURL } from "./useFileManifestURL";
12
12
  * @returns file manifest download url and file name.
13
13
  */
14
14
  export const useFileManifestDownload = (filters, disabled) => {
15
- // Determine file manifest request data URL.
16
- const URL = useFileManifestURL();
15
+ // Retrieve the endpoint URL from configured data source.
16
+ const config = useConfig();
17
+ const endpointUrl = config.config.dataSource.url;
17
18
  // Determine catalog.
18
19
  const catalog = useCatalog(); // catalog should be defined.
19
- // Build request URL.
20
- const { requestURL } = buildFileManifestRequestURL(URL, filters, catalog, MANIFEST_DOWNLOAD_FORMAT.COMPACT) || {};
21
- const { data, isIdle, isLoading, run } = useFileManifest(requestURL);
20
+ // Build request manifest request URL.
21
+ const { requestMethod, requestUrl } = buildRequestManifest(endpointUrl, catalog, filters, MANIFEST_DOWNLOAD_FORMAT.COMPACT);
22
+ const { data, isIdle, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
22
23
  const manifestURL = getManifestDownloadURL(data);
23
24
  const fileName = getManifestDownloadFileName(data);
24
25
  // Requests file manifest.
@@ -26,7 +27,7 @@ export const useFileManifestDownload = (filters, disabled) => {
26
27
  if (disabled)
27
28
  return;
28
29
  run();
29
- }, [disabled, requestURL, run]);
30
+ }, [disabled, requestUrl, run]);
30
31
  return {
31
32
  fileName,
32
33
  isIdle,
@@ -0,0 +1,12 @@
1
+ import { Dispatch, SetStateAction } from "react";
2
+ import { ManifestDownloadFormat } from "../../components/Export/common/entities";
3
+ export interface FileManifestFormatState {
4
+ fileManifestFormat: ManifestDownloadFormat | undefined;
5
+ setFileManifestFormat: Dispatch<SetStateAction<ManifestDownloadFormat | undefined>>;
6
+ }
7
+ /**
8
+ * Facilitates the management of file manifest format state.
9
+ * @param manifestDownloadFormat - The initial manifest download format used to fetch the file manifest.
10
+ * @returns The file manifest format state and a function to set the file manifest format.
11
+ */
12
+ export declare const useFileManifestFormat: (manifestDownloadFormat?: ManifestDownloadFormat) => FileManifestFormatState;
@@ -0,0 +1,10 @@
1
+ import { useState } from "react";
2
+ /**
3
+ * Facilitates the management of file manifest format state.
4
+ * @param manifestDownloadFormat - The initial manifest download format used to fetch the file manifest.
5
+ * @returns The file manifest format state and a function to set the file manifest format.
6
+ */
7
+ export const useFileManifestFormat = (manifestDownloadFormat) => {
8
+ const [fileManifestFormat, setFileManifestFormat] = useState(manifestDownloadFormat);
9
+ return { fileManifestFormat, setFileManifestFormat };
10
+ };
@@ -1,3 +1,4 @@
1
+ import { METHOD } from "./types";
1
2
  export interface FileLocation {
2
3
  commandLine?: {
3
4
  [key: string]: string;
@@ -14,10 +15,6 @@ export interface UseRequestFileLocationResult {
14
15
  run: () => void;
15
16
  }
16
17
  export type Method = METHOD;
17
- export declare enum METHOD {
18
- GET = "GET",
19
- PUT = "PUT"
20
- }
21
18
  /**
22
19
  * Function to make a get request and map the result to camelCase
23
20
  * @param url - url for the get request
@@ -1,12 +1,8 @@
1
1
  import { useCallback, useEffect, useRef } from "react";
2
2
  import { FILE_LOCATION_PENDING, FILE_LOCATION_SUCCESSFULLY, } from "../apis/azul/common/constants";
3
+ import { METHOD } from "./types";
3
4
  import { useAsync } from "./useAsync";
4
5
  import { useAuthentication } from "./useAuthentication/useAuthentication";
5
- export var METHOD;
6
- (function (METHOD) {
7
- METHOD["GET"] = "GET";
8
- METHOD["PUT"] = "PUT";
9
- })(METHOD || (METHOD = {}));
10
6
  /**
11
7
  * Returns fetch request options.
12
8
  * @param accessToken - Access token.