@weng-lab/genomebrowser-ui 0.1.6 → 0.1.8
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/dist/TrackSelect/TreeView/TreeViewWrapper.d.ts +1 -1
- package/dist/TrackSelect/store.d.ts +2 -2
- package/dist/TrackSelect/treeViewHelpers.d.ts +1 -0
- package/dist/TrackSelect/types.d.ts +11 -6
- package/dist/genomebrowser-ui.es.js +908 -1013
- package/dist/genomebrowser-ui.es.js.map +1 -1
- package/package.json +2 -2
- package/src/TrackSelect/.claude/settings.local.json +7 -0
- package/src/TrackSelect/DataGrid/CustomToolbar.tsx +0 -8
- package/src/TrackSelect/DataGrid/DataGridWrapper.tsx +34 -53
- package/src/TrackSelect/DataGrid/columns.tsx +107 -97
- package/src/TrackSelect/TrackSelect.tsx +151 -104
- package/src/TrackSelect/TreeView/TreeViewWrapper.tsx +6 -4
- package/src/TrackSelect/TreeView/treeViewHelpers.tsx +12 -13
- package/src/TrackSelect/store.ts +32 -9
- package/src/TrackSelect/treeViewHelpers.tsx +0 -0
- package/src/TrackSelect/types.ts +14 -6
- package/test/main.tsx +5 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TreeViewWrapperProps } from '../types';
|
|
2
|
-
export declare function TreeViewWrapper({ store, items,
|
|
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 {
|
|
2
|
+
import { SelectionAction, SelectionState } from './types';
|
|
3
3
|
export type SelectionStoreInstance = UseBoundStore<StoreApi<SelectionState & SelectionAction>>;
|
|
4
|
-
export declare function createSelectionStore(
|
|
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
|
-
|
|
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,12 @@ export interface CustomTreeItemProps extends Omit<UseTreeItemParameters, "rootRe
|
|
|
79
83
|
*/
|
|
80
84
|
export type SelectionState = {
|
|
81
85
|
maxTracks: number;
|
|
82
|
-
|
|
86
|
+
selectedIds: Set<string>;
|
|
83
87
|
};
|
|
84
88
|
export type SelectionAction = {
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
getTrackIds: () => Set<string>;
|
|
90
|
+
getTrackMap: () => Map<string, RowInfo>;
|
|
91
|
+
setSelected: (ids: Set<string>) => void;
|
|
87
92
|
removeIds: (removedIds: Set<string>) => void;
|
|
88
93
|
clear: () => void;
|
|
89
94
|
};
|
|
@@ -108,7 +113,7 @@ interface BaseTableProps extends Omit<DataGridPremiumProps, "columns"> {
|
|
|
108
113
|
}
|
|
109
114
|
type DataGridWrapperProps = {
|
|
110
115
|
rows: RowInfo[];
|
|
111
|
-
|
|
116
|
+
selectedIds: Set<string>;
|
|
112
117
|
handleSelection: (newSelection: GridRowSelectionModel) => void;
|
|
113
118
|
sortedAssay: boolean;
|
|
114
119
|
};
|