@haniffalab/cherita-react 1.4.1-dev.2025-10-23.e95b5a90 → 1.4.1-dev.2025-10-23.55fbe6ff
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/README.md +1 -1
- package/dist/cjs/components/controls/Controls.js +4 -4
- package/dist/cjs/components/dotplot/Dotplot.js +8 -8
- package/dist/cjs/components/dotplot/DotplotControls.js +5 -5
- package/dist/cjs/components/full-page/FullPage.js +1 -2
- package/dist/cjs/components/full-page/PlotAlert.js +1 -1
- package/dist/cjs/components/full-page/PlotTypeSelector.js +13 -13
- package/dist/cjs/components/heatmap/Heatmap.js +7 -7
- package/dist/cjs/components/icons/DotPlotIcon.js +1 -1
- package/dist/cjs/components/icons/HeatmapIcon.js +1 -1
- package/dist/cjs/components/icons/MatrixPlotIcon.1.js +1 -1
- package/dist/cjs/components/icons/MatrixPlotIcon.js +1 -1
- package/dist/cjs/components/icons/ScatterplotIcon.1.js +1 -1
- package/dist/cjs/components/icons/ScatterplotIcon.js +1 -1
- package/dist/cjs/components/icons/ViolinPlotIcon.js +1 -1
- package/dist/cjs/components/matrixplot/Matrixplot.js +7 -7
- package/dist/cjs/components/obs-list/ObsItem.js +19 -19
- package/dist/cjs/components/obs-list/ObsList.js +17 -17
- package/dist/cjs/components/obsm-list/ObsmList.js +7 -7
- package/dist/cjs/components/pseudospatial/Pseudospatial.js +16 -16
- package/dist/cjs/components/pseudospatial/PseudospatialToolbar.js +10 -10
- package/dist/cjs/components/scatterplot/Scatterplot.js +16 -16
- package/dist/cjs/components/scatterplot/ScatterplotControls.js +1 -1
- package/dist/cjs/components/scatterplot/SpatialControls.js +9 -9
- package/dist/cjs/components/scatterplot/Toolbox.js +4 -4
- package/dist/cjs/components/search-bar/SearchBar.js +14 -14
- package/dist/cjs/components/search-bar/SearchInfo.js +3 -3
- package/dist/cjs/components/search-bar/SearchResults.js +2 -2
- package/dist/cjs/components/toolbar/Toolbar.js +3 -3
- package/dist/cjs/components/var-list/VarItem.js +15 -15
- package/dist/cjs/components/var-list/VarList.js +5 -5
- package/dist/cjs/components/var-list/VarListToolbar.js +4 -4
- package/dist/cjs/components/var-list/VarSet.js +13 -13
- package/dist/cjs/components/violin/Violin.js +10 -10
- package/dist/cjs/constants/colorscales.js +19 -19
- package/dist/cjs/constants/constants.js +47 -47
- package/dist/cjs/context/DatasetContext.js +3 -3
- package/dist/cjs/context/FilterContext.js +2 -2
- package/dist/cjs/context/SettingsContext.js +57 -57
- package/dist/cjs/helpers/color-helper.js +2 -2
- package/dist/cjs/helpers/zarr-helper.js +3 -3
- package/dist/cjs/utils/Filter.js +1 -1
- package/dist/cjs/utils/Histogram.js +2 -2
- package/dist/cjs/utils/ImageViewer.js +2 -2
- package/dist/cjs/utils/Legend.js +1 -1
- package/dist/cjs/utils/LoadingIndicators.js +1 -1
- package/dist/cjs/utils/Resolver.js +7 -7
- package/dist/cjs/utils/Skeleton.js +1 -1
- package/dist/cjs/utils/StyledTooltip.js +5 -5
- package/dist/cjs/utils/VirtualizedList.js +7 -7
- package/dist/cjs/utils/errors.js +15 -15
- package/dist/cjs/utils/requests.js +5 -5
- package/dist/cjs/utils/search.js +4 -4
- package/dist/cjs/utils/string.js +6 -6
- package/dist/cjs/utils/zarrData.js +5 -5
- package/dist/css/cherita.css +21 -20
- package/dist/css/cherita.css.map +1 -1
- package/dist/esm/components/controls/Controls.js +9 -9
- package/dist/esm/components/dotplot/Dotplot.js +21 -21
- package/dist/esm/components/dotplot/DotplotControls.js +9 -9
- package/dist/esm/components/full-page/FullPage.js +22 -23
- package/dist/esm/components/full-page/PlotAlert.js +5 -5
- package/dist/esm/components/full-page/PlotTypeSelector.js +21 -21
- package/dist/esm/components/heatmap/Heatmap.js +20 -20
- package/dist/esm/components/heatmap/HeatmapControls.js +2 -2
- package/dist/esm/components/icons/DotPlotIcon.js +1 -1
- package/dist/esm/components/icons/HeatmapIcon.js +1 -1
- package/dist/esm/components/icons/MatrixPlotIcon.1.js +1 -1
- package/dist/esm/components/icons/MatrixPlotIcon.js +1 -1
- package/dist/esm/components/icons/ScatterplotIcon.1.js +1 -1
- package/dist/esm/components/icons/ScatterplotIcon.js +1 -1
- package/dist/esm/components/icons/ViolinPlotIcon.js +1 -1
- package/dist/esm/components/matrixplot/Matrixplot.js +20 -20
- package/dist/esm/components/matrixplot/MatrixplotControls.js +2 -2
- package/dist/esm/components/obs-list/ObsItem.js +37 -37
- package/dist/esm/components/obs-list/ObsList.js +34 -34
- package/dist/esm/components/obs-list/ObsToolbar.js +1 -1
- package/dist/esm/components/obsm-list/ObsmList.js +15 -15
- package/dist/esm/components/offcanvas/index.js +6 -6
- package/dist/esm/components/pseudospatial/Pseudospatial.js +31 -31
- package/dist/esm/components/pseudospatial/PseudospatialToolbar.js +17 -17
- package/dist/esm/components/scatterplot/Scatterplot.js +38 -38
- package/dist/esm/components/scatterplot/ScatterplotControls.js +9 -9
- package/dist/esm/components/scatterplot/SpatialControls.js +23 -23
- package/dist/esm/components/scatterplot/Toolbox.js +7 -7
- package/dist/esm/components/search-bar/SearchBar.js +27 -27
- package/dist/esm/components/search-bar/SearchInfo.js +14 -14
- package/dist/esm/components/search-bar/SearchResults.js +10 -10
- package/dist/esm/components/toolbar/Toolbar.js +6 -6
- package/dist/esm/components/var-list/VarItem.js +27 -27
- package/dist/esm/components/var-list/VarList.js +21 -21
- package/dist/esm/components/var-list/VarListToolbar.js +10 -10
- package/dist/esm/components/var-list/VarSet.js +22 -22
- package/dist/esm/components/violin/Violin.js +26 -26
- package/dist/esm/components/violin/ViolinControls.js +2 -2
- package/dist/esm/constants/colorscales.js +19 -19
- package/dist/esm/constants/constants.js +47 -47
- package/dist/esm/context/DatasetContext.js +11 -11
- package/dist/esm/context/FilterContext.js +3 -3
- package/dist/esm/context/SettingsContext.js +61 -61
- package/dist/esm/context/ZarrDataContext.js +3 -3
- package/dist/esm/helpers/color-helper.js +5 -5
- package/dist/esm/helpers/map-helper.js +2 -2
- package/dist/esm/helpers/zarr-helper.js +6 -6
- package/dist/esm/index.js +22 -22
- package/dist/esm/utils/Filter.js +8 -8
- package/dist/esm/utils/Histogram.js +6 -6
- package/dist/esm/utils/ImageViewer.js +4 -4
- package/dist/esm/utils/Legend.js +9 -9
- package/dist/esm/utils/LoadingIndicators.js +2 -2
- package/dist/esm/utils/Resolver.js +13 -13
- package/dist/esm/utils/Skeleton.js +2 -2
- package/dist/esm/utils/StyledTooltip.js +6 -6
- package/dist/esm/utils/VirtualizedList.js +9 -9
- package/dist/esm/utils/errors.js +15 -15
- package/dist/esm/utils/requests.js +8 -8
- package/dist/esm/utils/search.js +7 -7
- package/dist/esm/utils/string.js +7 -7
- package/dist/esm/utils/zarrData.js +13 -13
- package/package.json +11 -7
- package/scss/cherita-bootstrap.scss +2 -2
- package/scss/cherita.scss +24 -17
- package/scss/components/accordions.scss +4 -1
- package/scss/components/layouts.scss +13 -12
- package/scss/components/lists.scss +8 -4
- package/scss/components/plotly.scss +1 -0
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
export const LOCAL_STORAGE_KEY =
|
|
1
|
+
export const LOCAL_STORAGE_KEY = 'CHERITA';
|
|
2
2
|
export const PLOT_TYPES = {
|
|
3
|
-
SCATTERPLOT:
|
|
4
|
-
DOTPLOT:
|
|
5
|
-
HEATMAP:
|
|
6
|
-
MATRIXPLOT:
|
|
7
|
-
VIOLINPLOT:
|
|
3
|
+
SCATTERPLOT: 'scatterplot',
|
|
4
|
+
DOTPLOT: 'dotplot',
|
|
5
|
+
HEATMAP: 'heatmap',
|
|
6
|
+
MATRIXPLOT: 'matrixplot',
|
|
7
|
+
VIOLINPLOT: 'violinplot'
|
|
8
8
|
};
|
|
9
9
|
export const COLOR_ENCODINGS = {
|
|
10
|
-
VAR:
|
|
11
|
-
OBS:
|
|
10
|
+
VAR: 'var',
|
|
11
|
+
OBS: 'obs'
|
|
12
12
|
};
|
|
13
13
|
export const OBS_TYPES = {
|
|
14
|
-
CATEGORICAL:
|
|
15
|
-
DISCRETE:
|
|
16
|
-
CONTINUOUS:
|
|
17
|
-
BOOLEAN:
|
|
14
|
+
CATEGORICAL: 'categorical',
|
|
15
|
+
DISCRETE: 'discrete',
|
|
16
|
+
CONTINUOUS: 'continuous',
|
|
17
|
+
BOOLEAN: 'boolean'
|
|
18
18
|
};
|
|
19
19
|
export const VAR_SORT = {
|
|
20
20
|
NONE: null,
|
|
21
|
-
NAME:
|
|
22
|
-
MATRIX:
|
|
21
|
+
NAME: 'name',
|
|
22
|
+
MATRIX: 'matrix'
|
|
23
23
|
};
|
|
24
24
|
export const VAR_SORT_ORDER = {
|
|
25
|
-
ASC:
|
|
26
|
-
DESC:
|
|
25
|
+
ASC: 'asc',
|
|
26
|
+
DESC: 'desc'
|
|
27
27
|
};
|
|
28
28
|
export const SELECTED_POLYGON_FILLCOLOR = [107, 170, 209, 255 / 2];
|
|
29
29
|
export const UNSELECTED_POLYGON_FILLCOLOR = [167, 191, 211, 255 / 3];
|
|
30
30
|
export const SELECTION_MODES = {
|
|
31
|
-
SINGLE:
|
|
32
|
-
MULTIPLE:
|
|
31
|
+
SINGLE: 'single',
|
|
32
|
+
MULTIPLE: 'multiple'
|
|
33
33
|
};
|
|
34
34
|
export const VIOLIN_MODES = {
|
|
35
|
-
MULTIKEY:
|
|
36
|
-
GROUPBY:
|
|
35
|
+
MULTIKEY: 'multikey',
|
|
36
|
+
GROUPBY: 'groupby'
|
|
37
37
|
};
|
|
38
38
|
export const MATRIXPLOT_SCALES = {
|
|
39
39
|
NONE: {
|
|
40
40
|
value: null,
|
|
41
|
-
name:
|
|
41
|
+
name: 'None'
|
|
42
42
|
},
|
|
43
43
|
GROUP: {
|
|
44
|
-
value:
|
|
45
|
-
name:
|
|
44
|
+
value: 'group',
|
|
45
|
+
name: 'Group'
|
|
46
46
|
},
|
|
47
47
|
VAR: {
|
|
48
|
-
value:
|
|
49
|
-
name:
|
|
48
|
+
value: 'var',
|
|
49
|
+
name: 'Var'
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
export const DOTPLOT_SCALES = {
|
|
53
53
|
NONE: {
|
|
54
54
|
value: null,
|
|
55
|
-
name:
|
|
55
|
+
name: 'None'
|
|
56
56
|
},
|
|
57
57
|
GROUP: {
|
|
58
|
-
value:
|
|
59
|
-
name:
|
|
58
|
+
value: 'group',
|
|
59
|
+
name: 'Group'
|
|
60
60
|
},
|
|
61
61
|
VAR: {
|
|
62
|
-
value:
|
|
63
|
-
name:
|
|
62
|
+
value: 'var',
|
|
63
|
+
name: 'Var'
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
export const VIOLINPLOT_SCALES = {
|
|
67
67
|
WIDTH: {
|
|
68
|
-
value:
|
|
69
|
-
name:
|
|
68
|
+
value: 'width',
|
|
69
|
+
name: 'Width'
|
|
70
70
|
},
|
|
71
71
|
COUNT: {
|
|
72
|
-
value:
|
|
73
|
-
name:
|
|
72
|
+
value: 'count',
|
|
73
|
+
name: 'Count'
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
export const PSEUDOSPATIAL_PLOT_TYPES = {
|
|
77
|
-
GENE:
|
|
78
|
-
CATEGORICAL:
|
|
79
|
-
CONTINUOUS:
|
|
80
|
-
MASKS:
|
|
77
|
+
GENE: 'gene',
|
|
78
|
+
CATEGORICAL: 'categorical',
|
|
79
|
+
CONTINUOUS: 'continuous',
|
|
80
|
+
MASKS: 'masks'
|
|
81
81
|
};
|
|
82
82
|
export const PSEUDOSPATIAL_CATEGORICAL_MODES = {
|
|
83
83
|
ACROSS: {
|
|
84
|
-
value:
|
|
85
|
-
name:
|
|
84
|
+
value: 'across',
|
|
85
|
+
name: '% across sections'
|
|
86
86
|
},
|
|
87
87
|
WITHIN: {
|
|
88
|
-
value:
|
|
89
|
-
name:
|
|
88
|
+
value: 'within',
|
|
89
|
+
name: '% within section'
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
// `default` cols to be shown out of accordion, at top of obslist
|
|
94
94
|
// default values from cellxgene schema
|
|
95
|
-
export const DEFAULT_OBS_GROUP = [
|
|
96
|
-
export const PLOTLY_MODEBAR_BUTTONS = [
|
|
95
|
+
export const DEFAULT_OBS_GROUP = ['assay', 'cell_type', 'development_stage', 'disease', 'donor_id', 'organism', 'self_reported_ethnicity', 'sex', 'suspension_type', 'tissue', 'tissue_type'];
|
|
96
|
+
export const PLOTLY_MODEBAR_BUTTONS = ['toImage', 'zoom2d', 'pan2d', 'zoomIn2d', 'zoomOut2d', 'autoScale2d', 'resetScale2d'];
|
|
97
97
|
export const BREAKPOINTS = {
|
|
98
|
-
LG:
|
|
99
|
-
XL:
|
|
98
|
+
LG: '(max-width: 991.98px)',
|
|
99
|
+
XL: '(max-width: 1199.98px)'
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
// In order of priority
|
|
103
|
-
export const DEFAULT_OBSM_KEYS = [
|
|
103
|
+
export const DEFAULT_OBSM_KEYS = ['x_umap', 'x_tsne', 'x_scvi', 'x_pca'];
|
|
@@ -6,14 +6,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import { createContext, useContext } from
|
|
10
|
-
import { createSyncStoragePersister } from
|
|
11
|
-
import { QueryClient, QueryCache } from
|
|
12
|
-
import { PersistQueryClientProvider } from
|
|
13
|
-
import _ from
|
|
14
|
-
import { FilterProvider } from
|
|
15
|
-
import { SettingsProvider } from
|
|
16
|
-
import { ZarrDataProvider } from
|
|
9
|
+
import { createContext, useContext } from 'react';
|
|
10
|
+
import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister';
|
|
11
|
+
import { QueryClient, QueryCache } from '@tanstack/react-query';
|
|
12
|
+
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
|
|
13
|
+
import _ from 'lodash';
|
|
14
|
+
import { FilterProvider } from './FilterContext';
|
|
15
|
+
import { SettingsProvider } from './SettingsContext';
|
|
16
|
+
import { ZarrDataProvider } from './ZarrDataContext';
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
export const DatasetContext = /*#__PURE__*/createContext(null);
|
|
19
19
|
const queryClient = new QueryClient({
|
|
@@ -34,7 +34,7 @@ const queryClient = new QueryClient({
|
|
|
34
34
|
})
|
|
35
35
|
});
|
|
36
36
|
// Type of queries to store responses
|
|
37
|
-
const persistKeys = [
|
|
37
|
+
const persistKeys = ['obs/cols', 'var/names', 'obsm/keys', 'obs/bins', 'obs/distribution'];
|
|
38
38
|
const persistOptions = {
|
|
39
39
|
persister: createSyncStoragePersister({
|
|
40
40
|
storage: window.localStorage
|
|
@@ -45,13 +45,13 @@ const persistOptions = {
|
|
|
45
45
|
queryKey,
|
|
46
46
|
state
|
|
47
47
|
} = _ref;
|
|
48
|
-
if (state.status ===
|
|
48
|
+
if (state.status === 'success') {
|
|
49
49
|
return persistKeys.includes(queryKey === null || queryKey === void 0 ? void 0 : queryKey[0]);
|
|
50
50
|
}
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
buster: "1.4.1-dev.2025-10-23.
|
|
54
|
+
buster: "1.4.1-dev.2025-10-23.55fbe6ff" || '0.0.0'
|
|
55
55
|
// @TODO: add maxAge and api version numbers as buster
|
|
56
56
|
};
|
|
57
57
|
const initialDataset = {
|
|
@@ -3,7 +3,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
3
3
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
-
import { useReducer, createContext, useContext } from
|
|
6
|
+
import { useReducer, createContext, useContext } from 'react';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
export const FilteredDataContext = /*#__PURE__*/createContext(null);
|
|
9
9
|
export const FilteredDataDispatchContext = /*#__PURE__*/createContext(null);
|
|
@@ -35,7 +35,7 @@ export function useFilteredDataDispatch() {
|
|
|
35
35
|
}
|
|
36
36
|
function filterReducer(filteredData, action) {
|
|
37
37
|
switch (action.type) {
|
|
38
|
-
case
|
|
38
|
+
case 'set.obs.indices':
|
|
39
39
|
{
|
|
40
40
|
return _objectSpread(_objectSpread({}, filteredData), {}, {
|
|
41
41
|
obsIndices: action.indices,
|
|
@@ -47,7 +47,7 @@ function filterReducer(filteredData, action) {
|
|
|
47
47
|
}
|
|
48
48
|
default:
|
|
49
49
|
{
|
|
50
|
-
throw Error(
|
|
50
|
+
throw Error('Unknown action: ' + action.type);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|