@databiosphere/findable-ui 49.3.0 → 49.4.1

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "49.3.0"
2
+ ".": "49.4.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [49.4.1](https://github.com/DataBiosphere/findable-ui/compare/v49.4.0...v49.4.1) (2026-03-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update metadata download to use azul_url ([#817](https://github.com/DataBiosphere/findable-ui/issues/817)) ([e493d99](https://github.com/DataBiosphere/findable-ui/commit/e493d9938b3603ccd0bbf0d7f5dda2586ec53d00))
9
+ * update metadata download to use azul_url [#816](https://github.com/DataBiosphere/findable-ui/issues/816) ([e493d99](https://github.com/DataBiosphere/findable-ui/commit/e493d9938b3603ccd0bbf0d7f5dda2586ec53d00))
10
+
11
+ ## [49.4.0](https://github.com/DataBiosphere/findable-ui/compare/v49.3.0...v49.4.0) (2026-03-04)
12
+
13
+
14
+ ### Features
15
+
16
+ * add tracking to research mode submit ([#812](https://github.com/DataBiosphere/findable-ui/issues/812)) ([#813](https://github.com/DataBiosphere/findable-ui/issues/813)) ([de4fac9](https://github.com/DataBiosphere/findable-ui/commit/de4fac9690dadd441fa14b5edafe8691f0bc5ebb))
17
+
3
18
  ## [49.3.0](https://github.com/DataBiosphere/findable-ui/compare/v49.2.0...v49.3.0) (2026-03-02)
4
19
 
5
20
 
@@ -10,8 +10,15 @@ export declare function getDataLayer(): DataLayer | undefined;
10
10
  */
11
11
  export declare function getGTMId(): string | undefined;
12
12
  /**
13
- * Send custom event to GTM.
13
+ * Sends a custom event to GTM without params.
14
+ * @param eventName - Event name.
15
+ * @returns void.
16
+ */
17
+ export declare function track(eventName: Exclude<EVENT_NAME, keyof EventParams>): void;
18
+ /**
19
+ * Sends a custom event to GTM with params.
14
20
  * @param eventName - Event name.
15
21
  * @param params - Event params.
22
+ * @returns void.
16
23
  */
17
- export declare function track(eventName: EVENT_NAME, params: EventParams[typeof eventName]): void;
24
+ export declare function track<E extends keyof EventParams>(eventName: E, params: EventParams[E]): void;
@@ -20,15 +20,10 @@ export function getGTMId() {
20
20
  function isTrackingEnabled() {
21
21
  return !!getDataLayer();
22
22
  }
23
- /**
24
- * Send custom event to GTM.
25
- * @param eventName - Event name.
26
- * @param params - Event params.
27
- */
28
23
  export function track(eventName, params) {
29
24
  if (!isTrackingEnabled()) {
30
25
  return;
31
26
  }
32
- const event = { event: eventName, params: params };
27
+ const event = { event: eventName, params };
33
28
  getDataLayer().push(event);
34
29
  }
@@ -4,6 +4,7 @@ export type DataLayer = any;
4
4
  */
5
5
  export declare enum EVENT_NAME {
6
6
  BULK_DOWNLOAD_REQUESTED = "bulk_download_requested",
7
+ CHAT_SUBMITTED = "chat_submitted",
7
8
  ENTITY_SELECTED = "entity_selected",
8
9
  ENTITY_TABLE_PAGINATED = "entity_table_paginated",
9
10
  ENTITY_TABLE_SORTED = "entity_table_sorted",
@@ -4,6 +4,7 @@
4
4
  export var EVENT_NAME;
5
5
  (function (EVENT_NAME) {
6
6
  EVENT_NAME["BULK_DOWNLOAD_REQUESTED"] = "bulk_download_requested";
7
+ EVENT_NAME["CHAT_SUBMITTED"] = "chat_submitted";
7
8
  EVENT_NAME["ENTITY_SELECTED"] = "entity_selected";
8
9
  EVENT_NAME["ENTITY_TABLE_PAGINATED"] = "entity_table_paginated";
9
10
  EVENT_NAME["ENTITY_TABLE_SORTED"] = "entity_table_sorted";
@@ -71,6 +71,6 @@ function getManifestSpreadsheet(files) {
71
71
  const file = files[0];
72
72
  return {
73
73
  fileName: file.files[0]?.name,
74
- fileUrl: buildFetchFileUrl(file.files[0]?.url),
74
+ fileUrl: buildFetchFileUrl(file.files[0]?.azul_url),
75
75
  };
76
76
  }
@@ -1,6 +1,8 @@
1
1
  import { useCallback, useRef } from "react";
2
2
  import { fetchResponse } from "../../../../query/fetch";
3
3
  import { useChatDispatch } from "../../../hooks/UseChatDispatch/hook";
4
+ import { track } from "../../../../../../common/analytics/analytics";
5
+ import { EVENT_NAME } from "../../../../../../common/analytics/entities";
4
6
  /**
5
7
  * Hook that manages query submission and abort lifecycle.
6
8
  * @param url - The API URL to send queries to.
@@ -16,6 +18,8 @@ export const useSubmit = (url) => {
16
18
  const { query } = payload;
17
19
  if (!query)
18
20
  return;
21
+ // Tracking chat submission event.
22
+ track(EVENT_NAME.CHAT_SUBMITTED);
19
23
  const form = e.currentTarget;
20
24
  // Dispatch query and loading state.
21
25
  dispatch.onSetQuery(query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "49.3.0",
3
+ "version": "49.4.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -26,17 +26,25 @@ function isTrackingEnabled(): boolean {
26
26
  }
27
27
 
28
28
  /**
29
- * Send custom event to GTM.
29
+ * Sends a custom event to GTM without params.
30
+ * @param eventName - Event name.
31
+ * @returns void.
32
+ */
33
+ export function track(eventName: Exclude<EVENT_NAME, keyof EventParams>): void;
34
+ /**
35
+ * Sends a custom event to GTM with params.
30
36
  * @param eventName - Event name.
31
37
  * @param params - Event params.
38
+ * @returns void.
32
39
  */
33
- export function track(
34
- eventName: EVENT_NAME,
35
- params: EventParams[typeof eventName],
36
- ): void {
40
+ export function track<E extends keyof EventParams>(
41
+ eventName: E,
42
+ params: EventParams[E],
43
+ ): void;
44
+ export function track(eventName: EVENT_NAME, params?: unknown): void {
37
45
  if (!isTrackingEnabled()) {
38
46
  return;
39
47
  }
40
- const event = { event: eventName, params: params };
48
+ const event = { event: eventName, params };
41
49
  getDataLayer().push(event);
42
50
  }
@@ -6,6 +6,7 @@ export type DataLayer = any;
6
6
  */
7
7
  export enum EVENT_NAME {
8
8
  BULK_DOWNLOAD_REQUESTED = "bulk_download_requested",
9
+ CHAT_SUBMITTED = "chat_submitted",
9
10
  ENTITY_SELECTED = "entity_selected",
10
11
  ENTITY_TABLE_PAGINATED = "entity_table_paginated",
11
12
  ENTITY_TABLE_SORTED = "entity_table_sorted",
@@ -105,6 +105,6 @@ function getManifestSpreadsheet(
105
105
 
106
106
  return {
107
107
  fileName: file.files[0]?.name,
108
- fileUrl: buildFetchFileUrl(file.files[0]?.url),
108
+ fileUrl: buildFetchFileUrl(file.files[0]?.azul_url),
109
109
  };
110
110
  }
@@ -7,6 +7,8 @@ import {
7
7
  OnSubmitPayload,
8
8
  QueryContextValue,
9
9
  } from "../../types";
10
+ import { track } from "../../../../../../common/analytics/analytics";
11
+ import { EVENT_NAME } from "../../../../../../common/analytics/entities";
10
12
 
11
13
  /**
12
14
  * Hook that manages query submission and abort lifecycle.
@@ -30,6 +32,9 @@ export const useSubmit = (url: string): Pick<QueryContextValue, "onSubmit"> => {
30
32
  const { query } = payload;
31
33
  if (!query) return;
32
34
 
35
+ // Tracking chat submission event.
36
+ track(EVENT_NAME.CHAT_SUBMITTED);
37
+
33
38
  const form = e.currentTarget;
34
39
 
35
40
  // Dispatch query and loading state.