@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.
Files changed (126) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/components/controls/Controls.js +4 -4
  3. package/dist/cjs/components/dotplot/Dotplot.js +8 -8
  4. package/dist/cjs/components/dotplot/DotplotControls.js +5 -5
  5. package/dist/cjs/components/full-page/FullPage.js +1 -2
  6. package/dist/cjs/components/full-page/PlotAlert.js +1 -1
  7. package/dist/cjs/components/full-page/PlotTypeSelector.js +13 -13
  8. package/dist/cjs/components/heatmap/Heatmap.js +7 -7
  9. package/dist/cjs/components/icons/DotPlotIcon.js +1 -1
  10. package/dist/cjs/components/icons/HeatmapIcon.js +1 -1
  11. package/dist/cjs/components/icons/MatrixPlotIcon.1.js +1 -1
  12. package/dist/cjs/components/icons/MatrixPlotIcon.js +1 -1
  13. package/dist/cjs/components/icons/ScatterplotIcon.1.js +1 -1
  14. package/dist/cjs/components/icons/ScatterplotIcon.js +1 -1
  15. package/dist/cjs/components/icons/ViolinPlotIcon.js +1 -1
  16. package/dist/cjs/components/matrixplot/Matrixplot.js +7 -7
  17. package/dist/cjs/components/obs-list/ObsItem.js +19 -19
  18. package/dist/cjs/components/obs-list/ObsList.js +17 -17
  19. package/dist/cjs/components/obsm-list/ObsmList.js +7 -7
  20. package/dist/cjs/components/pseudospatial/Pseudospatial.js +16 -16
  21. package/dist/cjs/components/pseudospatial/PseudospatialToolbar.js +10 -10
  22. package/dist/cjs/components/scatterplot/Scatterplot.js +16 -16
  23. package/dist/cjs/components/scatterplot/ScatterplotControls.js +1 -1
  24. package/dist/cjs/components/scatterplot/SpatialControls.js +9 -9
  25. package/dist/cjs/components/scatterplot/Toolbox.js +4 -4
  26. package/dist/cjs/components/search-bar/SearchBar.js +14 -14
  27. package/dist/cjs/components/search-bar/SearchInfo.js +3 -3
  28. package/dist/cjs/components/search-bar/SearchResults.js +2 -2
  29. package/dist/cjs/components/toolbar/Toolbar.js +3 -3
  30. package/dist/cjs/components/var-list/VarItem.js +15 -15
  31. package/dist/cjs/components/var-list/VarList.js +5 -5
  32. package/dist/cjs/components/var-list/VarListToolbar.js +4 -4
  33. package/dist/cjs/components/var-list/VarSet.js +13 -13
  34. package/dist/cjs/components/violin/Violin.js +10 -10
  35. package/dist/cjs/constants/colorscales.js +19 -19
  36. package/dist/cjs/constants/constants.js +47 -47
  37. package/dist/cjs/context/DatasetContext.js +3 -3
  38. package/dist/cjs/context/FilterContext.js +2 -2
  39. package/dist/cjs/context/SettingsContext.js +57 -57
  40. package/dist/cjs/helpers/color-helper.js +2 -2
  41. package/dist/cjs/helpers/zarr-helper.js +3 -3
  42. package/dist/cjs/utils/Filter.js +1 -1
  43. package/dist/cjs/utils/Histogram.js +2 -2
  44. package/dist/cjs/utils/ImageViewer.js +2 -2
  45. package/dist/cjs/utils/Legend.js +1 -1
  46. package/dist/cjs/utils/LoadingIndicators.js +1 -1
  47. package/dist/cjs/utils/Resolver.js +7 -7
  48. package/dist/cjs/utils/Skeleton.js +1 -1
  49. package/dist/cjs/utils/StyledTooltip.js +5 -5
  50. package/dist/cjs/utils/VirtualizedList.js +7 -7
  51. package/dist/cjs/utils/errors.js +15 -15
  52. package/dist/cjs/utils/requests.js +5 -5
  53. package/dist/cjs/utils/search.js +4 -4
  54. package/dist/cjs/utils/string.js +6 -6
  55. package/dist/cjs/utils/zarrData.js +5 -5
  56. package/dist/css/cherita.css +21 -20
  57. package/dist/css/cherita.css.map +1 -1
  58. package/dist/esm/components/controls/Controls.js +9 -9
  59. package/dist/esm/components/dotplot/Dotplot.js +21 -21
  60. package/dist/esm/components/dotplot/DotplotControls.js +9 -9
  61. package/dist/esm/components/full-page/FullPage.js +22 -23
  62. package/dist/esm/components/full-page/PlotAlert.js +5 -5
  63. package/dist/esm/components/full-page/PlotTypeSelector.js +21 -21
  64. package/dist/esm/components/heatmap/Heatmap.js +20 -20
  65. package/dist/esm/components/heatmap/HeatmapControls.js +2 -2
  66. package/dist/esm/components/icons/DotPlotIcon.js +1 -1
  67. package/dist/esm/components/icons/HeatmapIcon.js +1 -1
  68. package/dist/esm/components/icons/MatrixPlotIcon.1.js +1 -1
  69. package/dist/esm/components/icons/MatrixPlotIcon.js +1 -1
  70. package/dist/esm/components/icons/ScatterplotIcon.1.js +1 -1
  71. package/dist/esm/components/icons/ScatterplotIcon.js +1 -1
  72. package/dist/esm/components/icons/ViolinPlotIcon.js +1 -1
  73. package/dist/esm/components/matrixplot/Matrixplot.js +20 -20
  74. package/dist/esm/components/matrixplot/MatrixplotControls.js +2 -2
  75. package/dist/esm/components/obs-list/ObsItem.js +37 -37
  76. package/dist/esm/components/obs-list/ObsList.js +34 -34
  77. package/dist/esm/components/obs-list/ObsToolbar.js +1 -1
  78. package/dist/esm/components/obsm-list/ObsmList.js +15 -15
  79. package/dist/esm/components/offcanvas/index.js +6 -6
  80. package/dist/esm/components/pseudospatial/Pseudospatial.js +31 -31
  81. package/dist/esm/components/pseudospatial/PseudospatialToolbar.js +17 -17
  82. package/dist/esm/components/scatterplot/Scatterplot.js +38 -38
  83. package/dist/esm/components/scatterplot/ScatterplotControls.js +9 -9
  84. package/dist/esm/components/scatterplot/SpatialControls.js +23 -23
  85. package/dist/esm/components/scatterplot/Toolbox.js +7 -7
  86. package/dist/esm/components/search-bar/SearchBar.js +27 -27
  87. package/dist/esm/components/search-bar/SearchInfo.js +14 -14
  88. package/dist/esm/components/search-bar/SearchResults.js +10 -10
  89. package/dist/esm/components/toolbar/Toolbar.js +6 -6
  90. package/dist/esm/components/var-list/VarItem.js +27 -27
  91. package/dist/esm/components/var-list/VarList.js +21 -21
  92. package/dist/esm/components/var-list/VarListToolbar.js +10 -10
  93. package/dist/esm/components/var-list/VarSet.js +22 -22
  94. package/dist/esm/components/violin/Violin.js +26 -26
  95. package/dist/esm/components/violin/ViolinControls.js +2 -2
  96. package/dist/esm/constants/colorscales.js +19 -19
  97. package/dist/esm/constants/constants.js +47 -47
  98. package/dist/esm/context/DatasetContext.js +11 -11
  99. package/dist/esm/context/FilterContext.js +3 -3
  100. package/dist/esm/context/SettingsContext.js +61 -61
  101. package/dist/esm/context/ZarrDataContext.js +3 -3
  102. package/dist/esm/helpers/color-helper.js +5 -5
  103. package/dist/esm/helpers/map-helper.js +2 -2
  104. package/dist/esm/helpers/zarr-helper.js +6 -6
  105. package/dist/esm/index.js +22 -22
  106. package/dist/esm/utils/Filter.js +8 -8
  107. package/dist/esm/utils/Histogram.js +6 -6
  108. package/dist/esm/utils/ImageViewer.js +4 -4
  109. package/dist/esm/utils/Legend.js +9 -9
  110. package/dist/esm/utils/LoadingIndicators.js +2 -2
  111. package/dist/esm/utils/Resolver.js +13 -13
  112. package/dist/esm/utils/Skeleton.js +2 -2
  113. package/dist/esm/utils/StyledTooltip.js +6 -6
  114. package/dist/esm/utils/VirtualizedList.js +9 -9
  115. package/dist/esm/utils/errors.js +15 -15
  116. package/dist/esm/utils/requests.js +8 -8
  117. package/dist/esm/utils/search.js +7 -7
  118. package/dist/esm/utils/string.js +7 -7
  119. package/dist/esm/utils/zarrData.js +13 -13
  120. package/package.json +11 -7
  121. package/scss/cherita-bootstrap.scss +2 -2
  122. package/scss/cherita.scss +24 -17
  123. package/scss/components/accordions.scss +4 -1
  124. package/scss/components/layouts.scss +13 -12
  125. package/scss/components/lists.scss +8 -4
  126. package/scss/components/plotly.scss +1 -0
package/README.md CHANGED
@@ -21,7 +21,7 @@ Install packages
21
21
  npm i
22
22
  ```
23
23
 
24
- Create a ``.env`` file within ``sites/demo`` to store environment variables for Vite to use. Within it set ``REACT_APP_API_URL`` to the backend API url like
24
+ Create a `.env` file within `sites/demo` to store environment variables for Vite to use. Within it set `REACT_APP_API_URL` to the backend API url like
25
25
 
26
26
  ```sh
27
27
  REACT_APP_API_URL=http://localhost:5000/api/
@@ -22,7 +22,7 @@ const ColorscaleSelect = () => {
22
22
  value: settings.controls.colorScale,
23
23
  onChange: e => {
24
24
  dispatch({
25
- type: "set.controls.colorScale",
25
+ type: 'set.controls.colorScale',
26
26
  colorScale: e.target.value
27
27
  });
28
28
  },
@@ -50,16 +50,16 @@ const ScaleSelect = _ref => {
50
50
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form.Label, {
51
51
  children: "Standard scale"
52
52
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form.Select, {
53
- value: settings.controls.scale[plot] || "",
53
+ value: settings.controls.scale[plot] || '',
54
54
  onChange: e => {
55
55
  dispatch({
56
- type: "set.controls.scale",
56
+ type: 'set.controls.scale',
57
57
  plot: plot,
58
58
  scale: !e.target.value.length ? null : e.target.value
59
59
  });
60
60
  },
61
61
  children: _lodash.default.values(SCALES[plot]).map(scale => /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
62
- value: scale.value || "",
62
+ value: scale.value || '',
63
63
  children: scale.name
64
64
  }, scale.value))
65
65
  })]
@@ -35,7 +35,7 @@ function Dotplot(_ref) {
35
35
  plotType,
36
36
  setPlotType
37
37
  } = _ref;
38
- const ENDPOINT = "dotplot";
38
+ const ENDPOINT = 'dotplot';
39
39
  const dataset = (0, _DatasetContext.useDataset)();
40
40
  const settings = (0, _SettingsContext.useSettings)();
41
41
  const {
@@ -94,7 +94,7 @@ function Dotplot(_ref) {
94
94
  setLayout(fetchedData.layout);
95
95
  // @TODO: keep colorAxis range from settings
96
96
  dispatch({
97
- type: "set.controls.colorAxis",
97
+ type: 'set.controls.colorAxis',
98
98
  colorAxis: {
99
99
  dmin: fetchedData.range.min.toFixed(1),
100
100
  dmax: fetchedData.range.max.toFixed(1),
@@ -139,8 +139,8 @@ function Dotplot(_ref) {
139
139
  layout: layout,
140
140
  useResizeHandler: true,
141
141
  style: {
142
- width: "100%",
143
- height: "100%"
142
+ width: '100%',
143
+ height: '100%'
144
144
  },
145
145
  config: {
146
146
  displaylogo: false,
@@ -156,17 +156,17 @@ function Dotplot(_ref) {
156
156
  setPlotType: setPlotType,
157
157
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
158
158
  className: "p-0 m-0",
159
- children: ["Select one or more", " ", showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
159
+ children: ["Select one or more", ' ', showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
160
160
  variant: "link",
161
161
  className: "border-0 p-0 align-baseline",
162
162
  onClick: setShowVars,
163
163
  children: "features"
164
- }) : "features", " ", "to display their expression across groups, then choose a", " ", showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
164
+ }) : 'features', ' ', "to display their expression across groups, then choose a", ' ', showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
165
165
  variant: "link",
166
166
  className: "border-0 p-0 align-baseline",
167
167
  onClick: setShowObs,
168
168
  children: "category"
169
- }) : "category", " ", "to group observations in the dotplot."]
169
+ }) : 'category', ' ', "to group observations in the dotplot."]
170
170
  })
171
171
  });
172
172
  } else {
@@ -175,7 +175,7 @@ function Dotplot(_ref) {
175
175
  heading: "Error displaying the dotplot",
176
176
  plotType: plotType,
177
177
  setPlotType: setPlotType,
178
- children: serverError.message || "An unexpected error occurred while generating the plot."
178
+ children: serverError.message || 'An unexpected error occurred while generating the plot.'
179
179
  });
180
180
  }
181
181
  }
@@ -78,7 +78,7 @@ function DotplotControls() {
78
78
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
79
79
  variant: "outline-primary",
80
80
  onClick: () => dispatch({
81
- type: "set.controls.colorAxis.crange",
81
+ type: 'set.controls.colorAxis.crange',
82
82
  cmin: controls.colorAxis.cmin,
83
83
  cmax: controls.colorAxis.cmax
84
84
  }),
@@ -86,7 +86,7 @@ function DotplotControls() {
86
86
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
87
87
  variant: "outline-primary",
88
88
  onClick: () => dispatch({
89
- type: "set.controls.colorAxis.crange",
89
+ type: 'set.controls.colorAxis.crange',
90
90
  cmin: settings.controls.colorAxis.dmin,
91
91
  cmax: settings.controls.colorAxis.dmax
92
92
  }),
@@ -103,7 +103,7 @@ function DotplotControls() {
103
103
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form.Control, {
104
104
  size: "sm",
105
105
  type: "number",
106
- step: "0.1",
106
+ step: '0.1',
107
107
  min: 0.0,
108
108
  value: controls.expressionCutoff,
109
109
  onChange: e => {
@@ -114,7 +114,7 @@ function DotplotControls() {
114
114
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
115
115
  variant: "outline-primary",
116
116
  onClick: () => dispatch({
117
- type: "set.controls.expressionCutoff",
117
+ type: 'set.controls.expressionCutoff',
118
118
  expressionCutoff: parseFloat(controls.expressionCutoff)
119
119
  }),
120
120
  children: "Apply"
@@ -129,7 +129,7 @@ function DotplotControls() {
129
129
  checked: settings.controls.meanOnlyExpressed,
130
130
  onChange: () => {
131
131
  dispatch({
132
- type: "set.controls.meanOnlyExpressed",
132
+ type: 'set.controls.meanOnlyExpressed',
133
133
  meanOnlyExpressed: !settings.controls.meanOnlyExpressed
134
134
  });
135
135
  }
@@ -7,7 +7,6 @@ exports.FullPage = FullPage;
7
7
  var _react = require("react");
8
8
  var _material = require("@mui/material");
9
9
  var _reactBootstrap = require("react-bootstrap");
10
- var _PlotTypeSelector = require("./PlotTypeSelector");
11
10
  var _constants = require("../../constants/constants");
12
11
  var _DatasetContext = require("../../context/DatasetContext");
13
12
  var _Dotplot = require("../dotplot/Dotplot");
@@ -18,6 +17,7 @@ var _Matrixplot = require("../matrixplot/Matrixplot");
18
17
  var _MatrixplotControls = require("../matrixplot/MatrixplotControls");
19
18
  var _ObsList = require("../obs-list/ObsList");
20
19
  var _offcanvas = require("../offcanvas");
20
+ var _PlotTypeSelector = require("./PlotTypeSelector");
21
21
  var _Pseudospatial = require("../pseudospatial/Pseudospatial");
22
22
  var _PseudospatialToolbar = require("../pseudospatial/PseudospatialToolbar");
23
23
  var _Scatterplot = require("../scatterplot/Scatterplot");
@@ -59,7 +59,6 @@ function FullPage(_ref) {
59
59
  const XlBreakpoint = (0, _material.useMediaQuery)(_constants.BREAKPOINTS.XL);
60
60
  const showObsBtn = LgBreakpoint;
61
61
  const showVarsBtn = XlBreakpoint;
62
- const showPlotBtn = showVarsBtn;
63
62
  const {
64
63
  plotControls,
65
64
  varMode,
@@ -11,7 +11,7 @@ var _constants = require("../../constants/constants");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  function PlotAlert(_ref) {
13
13
  let {
14
- variant = "warning",
14
+ variant = 'warning',
15
15
  plotType = _constants.PLOT_TYPES.SCATTERPLOT,
16
16
  setPlotType,
17
17
  heading,
@@ -22,28 +22,28 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
22
22
  const plotTypes = [{
23
23
  type: _constants.PLOT_TYPES.SCATTERPLOT,
24
24
  icon: _ScatterplotIcon.default,
25
- name: "Scatterplot",
26
- description: "Displays cells in 2D based on dimensionality reduction."
25
+ name: 'Scatterplot',
26
+ description: 'Displays cells in 2D based on dimensionality reduction.'
27
27
  }, {
28
28
  type: _constants.PLOT_TYPES.MATRIXPLOT,
29
29
  icon: _MatrixPlotIcon.default,
30
- name: "Matrix Plot",
31
- description: "Shows expression values of genes across categories."
30
+ name: 'Matrix Plot',
31
+ description: 'Shows expression values of genes across categories.'
32
32
  }, {
33
33
  type: _constants.PLOT_TYPES.DOTPLOT,
34
34
  icon: _DotPlotIcon.default,
35
- name: "Dot Plot",
36
- description: "Shows proportion and expression of genes across groups."
35
+ name: 'Dot Plot',
36
+ description: 'Shows proportion and expression of genes across groups.'
37
37
  }, {
38
38
  type: _constants.PLOT_TYPES.HEATMAP,
39
39
  icon: _HeatmapIcon.default,
40
- name: "Heatmap",
41
- description: "Visualises gene expression or feature activity as a colour-coded matrix."
40
+ name: 'Heatmap',
41
+ description: 'Visualises gene expression or feature activity as a colour-coded matrix.'
42
42
  }, {
43
43
  type: _constants.PLOT_TYPES.VIOLINPLOT,
44
44
  icon: _ViolinPlotIcon.default,
45
- name: "Violin Plot",
46
- description: "Displays distribution of gene expression across categories."
45
+ name: 'Violin Plot',
46
+ description: 'Displays distribution of gene expression across categories.'
47
47
  }];
48
48
  function PlotTypeSelector(_ref) {
49
49
  let {
@@ -68,7 +68,7 @@ function PlotTypeSelector(_ref) {
68
68
  } = _ref2;
69
69
  const isActive = currentType === type;
70
70
  const hovered = hoveredMap[type] || false;
71
- const colour = isActive ? "#005a86" : hovered ? "#0071a7" : "#000";
71
+ const colour = isActive ? '#005a86' : hovered ? '#0071a7' : '#000';
72
72
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledTooltip.StyledTooltip, {
73
73
  title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
74
74
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
@@ -79,7 +79,7 @@ function PlotTypeSelector(_ref) {
79
79
  slotProps: {
80
80
  popper: {
81
81
  modifiers: [{
82
- name: "offset",
82
+ name: 'offset',
83
83
  options: {
84
84
  offset: [0, -12]
85
85
  }
@@ -90,7 +90,7 @@ function PlotTypeSelector(_ref) {
90
90
  onMouseEnter: () => handleMouseEnter(type),
91
91
  onMouseLeave: () => handleMouseLeave(type),
92
92
  onClick: () => onChange(type),
93
- className: "plotselector-icon".concat(isActive ? " active" : ""),
93
+ className: "plotselector-icon".concat(isActive ? ' active' : ''),
94
94
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
95
95
  size: 34,
96
96
  colour: colour
@@ -35,7 +35,7 @@ function Heatmap(_ref) {
35
35
  plotType,
36
36
  setPlotType
37
37
  } = _ref;
38
- const ENDPOINT = "heatmap";
38
+ const ENDPOINT = 'heatmap';
39
39
  const dataset = (0, _DatasetContext.useDataset)();
40
40
  const settings = (0, _SettingsContext.useSettings)();
41
41
  const {
@@ -113,8 +113,8 @@ function Heatmap(_ref) {
113
113
  layout: layout,
114
114
  useResizeHandler: true,
115
115
  style: {
116
- width: "100%",
117
- height: "100%"
116
+ width: '100%',
117
+ height: '100%'
118
118
  },
119
119
  config: {
120
120
  displaylogo: false,
@@ -130,17 +130,17 @@ function Heatmap(_ref) {
130
130
  setPlotType: setPlotType,
131
131
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
132
132
  className: "p-0 m-0",
133
- children: ["Select one or more", " ", showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
133
+ children: ["Select one or more", ' ', showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
134
134
  variant: "link",
135
135
  className: "border-0 p-0 align-baseline",
136
136
  onClick: setShowVars,
137
137
  children: "features"
138
- }) : "features", " ", "to display their expression, then choose a", " ", showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
138
+ }) : 'features', ' ', "to display their expression, then choose a", ' ', showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
139
139
  variant: "link",
140
140
  className: "border-0 p-0 align-baseline",
141
141
  onClick: setShowObs,
142
142
  children: "category"
143
- }) : "category", " ", "to group observations in the heatmap."]
143
+ }) : 'category', ' ', "to group observations in the heatmap."]
144
144
  })
145
145
  });
146
146
  } else {
@@ -149,7 +149,7 @@ function Heatmap(_ref) {
149
149
  heading: "Error displaying the heatmap",
150
150
  plotType: plotType,
151
151
  setPlotType: setPlotType,
152
- children: serverError.message || "An unexpected error occurred while generating the plot."
152
+ children: serverError.message || 'An unexpected error occurred while generating the plot.'
153
153
  });
154
154
  }
155
155
  }
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function DotPlotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000",
19
+ colour = '#000',
20
20
  gap = 20
21
21
  } = _ref,
22
22
  props = _objectWithoutProperties(_ref, _excluded);
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function HeatmapIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000",
19
+ colour = '#000',
20
20
  gap = 1
21
21
  } = _ref,
22
22
  props = _objectWithoutProperties(_ref, _excluded);
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function MatrixPlotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000",
19
+ colour = '#000',
20
20
  gap = 2
21
21
  } = _ref,
22
22
  props = _objectWithoutProperties(_ref, _excluded);
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function MatrixPlotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000",
19
+ colour = '#000',
20
20
  gap = 2
21
21
  } = _ref,
22
22
  props = _objectWithoutProperties(_ref, _excluded);
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function ScatterplotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000"
19
+ colour = '#000'
20
20
  } = _ref,
21
21
  props = _objectWithoutProperties(_ref, _excluded);
22
22
  // Points with cluster assignments
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function ScatterplotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000"
19
+ colour = '#000'
20
20
  } = _ref,
21
21
  props = _objectWithoutProperties(_ref, _excluded);
22
22
  // Points with cluster assignments
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16
16
  function ViolinPlotIcon(_ref) {
17
17
  let {
18
18
  size = 40,
19
- colour = "#000"
19
+ colour = '#000'
20
20
  } = _ref,
21
21
  props = _objectWithoutProperties(_ref, _excluded);
22
22
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", _objectSpread(_objectSpread({
@@ -35,7 +35,7 @@ function Matrixplot(_ref) {
35
35
  plotType,
36
36
  setPlotType
37
37
  } = _ref;
38
- const ENDPOINT = "matrixplot";
38
+ const ENDPOINT = 'matrixplot';
39
39
  const dataset = (0, _DatasetContext.useDataset)();
40
40
  const settings = (0, _SettingsContext.useSettings)();
41
41
  const {
@@ -114,8 +114,8 @@ function Matrixplot(_ref) {
114
114
  layout: layout,
115
115
  useResizeHandler: true,
116
116
  style: {
117
- width: "100%",
118
- height: "100%"
117
+ width: '100%',
118
+ height: '100%'
119
119
  },
120
120
  config: {
121
121
  displaylogo: false,
@@ -131,17 +131,17 @@ function Matrixplot(_ref) {
131
131
  setPlotType: setPlotType,
132
132
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
133
133
  className: "p-0 m-0",
134
- children: ["Select a", " ", showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
134
+ children: ["Select a", ' ', showObsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
135
135
  variant: "link",
136
136
  className: "border-0 p-0 align-baseline",
137
137
  onClick: setShowObs,
138
138
  children: "category"
139
- }) : "category", " ", "to group observations, then choose one or more", " ", showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
139
+ }) : 'category', ' ', "to group observations, then choose one or more", ' ', showVarsBtn ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Button, {
140
140
  variant: "link",
141
141
  className: "border-0 p-0 align-baseline",
142
142
  onClick: setShowVars,
143
143
  children: "features"
144
- }) : "features", " ", "to display the matrix plot."]
144
+ }) : 'features', ' ', "to display the matrix plot."]
145
145
  })
146
146
  });
147
147
  } else {
@@ -150,7 +150,7 @@ function Matrixplot(_ref) {
150
150
  heading: "Error displaying the matrix plot",
151
151
  plotType: plotType,
152
152
  setPlotType: setPlotType,
153
- children: serverError.message || "An unexpected error occurred while generating the plot."
153
+ children: serverError.message || 'An unexpected error occurred while generating the plot.'
154
154
  });
155
155
  }
156
156
  }
@@ -48,13 +48,13 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
48
48
  // return { ...data, bins: bins };
49
49
  // }
50
50
  function getContinuousLabel(code, binEdges) {
51
- return "[ ".concat((0, _string.formatNumerical)(binEdges[code][0]), ", ").concat((0, _string.formatNumerical)(binEdges[code][1], _string.FORMATS.EXPONENTIAL)).concat(code === binEdges.length - 1 ? " ]" : " )");
51
+ return "[ ".concat((0, _string.formatNumerical)(binEdges[code][0]), ", ").concat((0, _string.formatNumerical)(binEdges[code][1], _string.FORMATS.EXPONENTIAL)).concat(code === binEdges.length - 1 ? ' ]' : ' )');
52
52
  }
53
53
  const useObsHistogram = (obs, _ref) => {
54
54
  let {
55
55
  enabled = true
56
56
  } = _ref;
57
- const ENDPOINT = "obs/histograms";
57
+ const ENDPOINT = 'obs/histograms';
58
58
  const dataset = (0, _DatasetContext.useDataset)();
59
59
  const settings = (0, _SettingsContext.useSettings)();
60
60
  const {
@@ -64,7 +64,7 @@ const useObsHistogram = (obs, _ref) => {
64
64
  const selectedVar = (0, _Resolver.useSelectedVar)();
65
65
  const [params, setParams] = (0, _react.useState)({
66
66
  url: dataset.url,
67
- obsCol: _lodash.default.omit(obs, "omit"),
67
+ obsCol: _lodash.default.omit(obs, 'omit'),
68
68
  // avoid re-rendering when toggling unselected obs
69
69
  varKey: selectedVar !== null && selectedVar !== void 0 && selectedVar.isSet ? {
70
70
  name: selectedVar === null || selectedVar === void 0 ? void 0 : selectedVar.name,
@@ -75,7 +75,7 @@ const useObsHistogram = (obs, _ref) => {
75
75
  (0, _react.useEffect)(() => {
76
76
  setParams(p => {
77
77
  return _objectSpread(_objectSpread({}, p), {}, {
78
- obsCol: _lodash.default.omit(obs, "omit"),
78
+ obsCol: _lodash.default.omit(obs, 'omit'),
79
79
  varKey: selectedVar !== null && selectedVar !== void 0 && selectedVar.isSet ? {
80
80
  name: selectedVar === null || selectedVar === void 0 ? void 0 : selectedVar.name,
81
81
  indices: selectedVar === null || selectedVar === void 0 ? void 0 : selectedVar.vars.map(v => v.index)
@@ -193,7 +193,7 @@ function CategoricalItem(_ref2) {
193
193
  className: "pl-1 m-0",
194
194
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, {
195
195
  title: isSliced ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
196
- children: ["Filtered:", " ", (0, _string.formatNumerical)(filteredStats.pct, _string.FORMATS.EXPONENTIAL), "%", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "Total: ", (0, _string.formatNumerical)(stats.pct, _string.FORMATS.EXPONENTIAL), "%"]
196
+ children: ["Filtered:", ' ', (0, _string.formatNumerical)(filteredStats.pct, _string.FORMATS.EXPONENTIAL), "%", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "Total: ", (0, _string.formatNumerical)(stats.pct, _string.FORMATS.EXPONENTIAL), "%"]
197
197
  }) : "".concat((0, _string.formatNumerical)(stats.pct, _string.FORMATS.EXPONENTIAL), "%"),
198
198
  placement: "left",
199
199
  arrow: true,
@@ -201,8 +201,8 @@ function CategoricalItem(_ref2) {
201
201
  className: "d-flex align-items-center",
202
202
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Badge, {
203
203
  className: "value-count-badge",
204
- children: [" ", isSliced && parseInt(filteredStats.value_counts) !== parseInt(stats.value_counts) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
205
- children: [(0, _string.formatNumerical)(parseInt(filteredStats.value_counts)), " ", "out of", " "]
204
+ children: [' ', isSliced && parseInt(filteredStats.value_counts) !== parseInt(stats.value_counts) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
205
+ children: [(0, _string.formatNumerical)(parseInt(filteredStats.value_counts)), ' ', "out of", ' ']
206
206
  }), (0, _string.formatNumerical)(parseInt(stats.value_counts), _string.FORMATS.EXPONENTIAL)]
207
207
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
208
208
  className: "value-pct-gauge-container",
@@ -211,8 +211,8 @@ function CategoricalItem(_ref2) {
211
211
  className: "pct-gauge filtered-pct-gauge",
212
212
  value: filteredStats.pct,
213
213
  text: null,
214
- innerRadius: "50%",
215
- outerRadius: "75%",
214
+ innerRadius: '50%',
215
+ outerRadius: '75%',
216
216
  margin: {
217
217
  top: 0,
218
218
  right: 0,
@@ -223,7 +223,7 @@ function CategoricalItem(_ref2) {
223
223
  className: "pct-gauge",
224
224
  value: stats.pct,
225
225
  text: null,
226
- innerRadius: "75%",
226
+ innerRadius: '75%',
227
227
  margin: {
228
228
  top: 0,
229
229
  right: 0,
@@ -234,7 +234,7 @@ function CategoricalItem(_ref2) {
234
234
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_xCharts.Gauge, {
235
235
  value: stats.pct,
236
236
  text: null,
237
- innerRadius: "50%",
237
+ innerRadius: '50%',
238
238
  margin: {
239
239
  top: 0,
240
240
  right: 0,
@@ -265,7 +265,7 @@ function CategoricalItem(_ref2) {
265
265
  grayParams: {
266
266
  alpha: 1
267
267
  },
268
- colorEncoding: "obs"
268
+ colorEncoding: 'obs'
269
269
  }, useUnsColors ? {
270
270
  colorscale: colors
271
271
  } : {})), ")")
@@ -355,7 +355,7 @@ function ObsContinuousStats(_ref4) {
355
355
  let {
356
356
  obs
357
357
  } = _ref4;
358
- const ENDPOINT = "obs/distribution";
358
+ const ENDPOINT = 'obs/distribution';
359
359
  const dataset = (0, _DatasetContext.useDataset)();
360
360
  const params = {
361
361
  url: dataset.url,
@@ -399,7 +399,7 @@ function ObsContinuousStats(_ref4) {
399
399
  valueFormatter: v => "".concat((0, _string.formatNumerical)(v, _string.FORMATS.EXPONENTIAL)),
400
400
  slotProps: {
401
401
  popper: {
402
- className: "feature-histogram-tooltip"
402
+ className: 'feature-histogram-tooltip'
403
403
  }
404
404
  }
405
405
  })
@@ -410,28 +410,28 @@ function ObsContinuousStats(_ref4) {
410
410
  className: "d-flex justify-content-between",
411
411
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
412
412
  children: "Min"
413
- }), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
413
+ }), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
414
414
  children: (0, _string.formatNumerical)(obs.min, _string.FORMATS.EXPONENTIAL)
415
415
  })]
416
416
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
417
417
  className: "d-flex justify-content-between",
418
418
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
419
419
  children: "Max"
420
- }), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
420
+ }), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
421
421
  children: (0, _string.formatNumerical)(obs.max, _string.FORMATS.EXPONENTIAL)
422
422
  })]
423
423
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
424
424
  className: "d-flex justify-content-between",
425
425
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
426
426
  children: "Mean"
427
- }), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
427
+ }), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
428
428
  children: (0, _string.formatNumerical)(obs.mean, _string.FORMATS.EXPONENTIAL)
429
429
  })]
430
430
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
431
431
  className: "d-flex justify-content-between",
432
432
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
433
433
  children: "Median"
434
- }), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
434
+ }), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
435
435
  children: (0, _string.formatNumerical)(obs.median, _string.FORMATS.EXPONENTIAL)
436
436
  })]
437
437
  })]
@@ -461,7 +461,7 @@ function ContinuousObs(_ref5) {
461
461
  const filteredObsData = useFilteredObsData(obs);
462
462
  const enabledHistograms = (0, _react.useMemo)(() => showHistograms && settings.colorEncoding === _constants.COLOR_ENCODINGS.VAR, [settings.colorEncoding, showHistograms]);
463
463
  const getLabel = (0, _react.useCallback)(index => {
464
- return isNaN(obs.values[index]) ? "NaN" : getContinuousLabel(obs.codes[obs.values[index]], obs.bins.binEdges);
464
+ return isNaN(obs.values[index]) ? 'NaN' : getContinuousLabel(obs.codes[obs.values[index]], obs.bins.binEdges);
465
465
  }, [obs.bins.binEdges, obs.codes, obs.values]);
466
466
  const getDataAtIndex = (0, _react.useCallback)(index => {
467
467
  var _obsHistograms$fetche2;