@weng-lab/genomebrowser-ui 0.1.6 → 0.1.7

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,2 +1,2 @@
1
1
  import { TreeViewWrapperProps } from '../types';
2
- export declare function TreeViewWrapper({ store, items, activeTracks, isSearchResult, }: TreeViewWrapperProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TreeViewWrapper({ store, items, trackIds, isSearchResult, }: TreeViewWrapperProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import { StoreApi, UseBoundStore } from 'zustand';
2
- import { SelectionState, SelectionAction, RowInfo } from './types';
2
+ import { SelectionAction, SelectionState } from './types';
3
3
  export type SelectionStoreInstance = UseBoundStore<StoreApi<SelectionState & SelectionAction>>;
4
- export declare function createSelectionStore(initialTracks?: Map<string, RowInfo>): UseBoundStore<StoreApi<SelectionState & SelectionAction>>;
4
+ export declare function createSelectionStore(initialIds?: Set<string>): UseBoundStore<StoreApi<SelectionState & SelectionAction>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -51,6 +51,10 @@ export type ExtendedTreeItemProps = {
51
51
  label: string;
52
52
  icon: string;
53
53
  isAssayItem?: boolean;
54
+ /**
55
+ * The assay name for leaf nodes (experiment accession items)
56
+ */
57
+ assayName?: string;
54
58
  /**
55
59
  * list of all the experimentAccession values in the children/grandchildren of the item, or the accession of the item itself
56
60
  * this is used in updating the rowSelectionModel when removing items from the Tree View panel
@@ -61,14 +65,14 @@ export type ExtendedTreeItemProps = {
61
65
  export type TreeViewWrapperProps = {
62
66
  store: SelectionStoreInstance;
63
67
  items: TreeViewBaseItem<ExtendedTreeItemProps>[];
64
- selectedTracks: Map<string, RowInfo>;
65
- activeTracks: Set<string>;
68
+ trackIds: Set<string>;
66
69
  isSearchResult: boolean;
67
70
  };
68
71
  export interface CustomLabelProps {
69
72
  id: string;
70
73
  children: React.ReactNode;
71
74
  isAssayItem?: boolean;
75
+ assayName?: string;
72
76
  icon: React.ElementType | React.ReactElement;
73
77
  }
74
78
  export interface CustomTreeItemProps extends Omit<UseTreeItemParameters, "rootRef">, Omit<React.HTMLAttributes<HTMLLIElement>, "onFocus"> {
@@ -79,11 +83,11 @@ export interface CustomTreeItemProps extends Omit<UseTreeItemParameters, "rootRe
79
83
  */
80
84
  export type SelectionState = {
81
85
  maxTracks: number;
82
- selectedTracks: Map<string, RowInfo>;
86
+ selectedIds: Set<string>;
83
87
  };
84
88
  export type SelectionAction = {
85
- selectedIds: () => Set<string>;
86
- setSelected: (tracks: Map<string, RowInfo>) => void;
89
+ getTrackIds: () => Set<string>;
90
+ setSelected: (ids: Set<string>) => void;
87
91
  removeIds: (removedIds: Set<string>) => void;
88
92
  clear: () => void;
89
93
  };
@@ -108,7 +112,7 @@ interface BaseTableProps extends Omit<DataGridPremiumProps, "columns"> {
108
112
  }
109
113
  type DataGridWrapperProps = {
110
114
  rows: RowInfo[];
111
- selectedTracks: Map<string, RowInfo>;
115
+ selectedIds: Set<string>;
112
116
  handleSelection: (newSelection: GridRowSelectionModel) => void;
113
117
  sortedAssay: boolean;
114
118
  };