@vitessce/feature-list 3.5.2 → 3.5.4
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/index.js +125 -193
- package/dist-tsc/FeatureList.d.ts.map +1 -1
- package/dist-tsc/FeatureList.js +8 -2
- package/dist-tsc/FeatureListSubscriber.d.ts.map +1 -1
- package/dist-tsc/FeatureListSubscriber.js +5 -3
- package/package.json +4 -4
- package/src/FeatureList.js +10 -3
- package/src/FeatureListSubscriber.js +10 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useMemo, useContext, useRef } from "react";
|
|
3
|
-
import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useFeatureLabelsData, useObsFeatureMatrixIndices, useReady, useUrls, TitleInfo } from "@vitessce/vit-s";
|
|
3
|
+
import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useFeatureLabelsData, useExpandedFeatureLabelsMap, useObsFeatureMatrixIndices, useReady, useUrls, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import ReactDOM__default from "react-dom";
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1288,6 +1288,12 @@ function capitalize$1(word) {
|
|
|
1288
1288
|
function pluralize(word, count = null) {
|
|
1289
1289
|
return plur(word, count);
|
|
1290
1290
|
}
|
|
1291
|
+
function cleanFeatureId(featureName) {
|
|
1292
|
+
if (featureName.startsWith("ENSG")) {
|
|
1293
|
+
return featureName.split(".")[0];
|
|
1294
|
+
}
|
|
1295
|
+
return featureName;
|
|
1296
|
+
}
|
|
1291
1297
|
const ViewType = {
|
|
1292
1298
|
DESCRIPTION: "description",
|
|
1293
1299
|
STATUS: "status",
|
|
@@ -1306,7 +1312,8 @@ const ViewType = {
|
|
|
1306
1312
|
FEATURE_VALUE_HISTOGRAM: "featureValueHistogram",
|
|
1307
1313
|
DOT_PLOT: "dotPlot",
|
|
1308
1314
|
FEATURE_BAR_PLOT: "featureBarPlot",
|
|
1309
|
-
BIOMARKER_SELECT: "biomarkerSelect"
|
|
1315
|
+
BIOMARKER_SELECT: "biomarkerSelect",
|
|
1316
|
+
LINK_CONTROLLER: "linkController"
|
|
1310
1317
|
};
|
|
1311
1318
|
const CoordinationType = {
|
|
1312
1319
|
META_COORDINATION_SCOPES: "metaCoordinationScopes",
|
|
@@ -1865,6 +1872,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1865
1872
|
CoordinationType.OBS_COLOR_ENCODING,
|
|
1866
1873
|
CoordinationType.ADDITIONAL_OBS_SETS
|
|
1867
1874
|
],
|
|
1875
|
+
[ViewType.LINK_CONTROLLER]: [],
|
|
1868
1876
|
[ViewType.BIOMARKER_SELECT]: [
|
|
1869
1877
|
CoordinationType.FEATURE_SELECTION,
|
|
1870
1878
|
CoordinationType.SAMPLE_SET_SELECTION
|
|
@@ -4063,7 +4071,7 @@ function _toPropertyKey(arg) {
|
|
|
4063
4071
|
var key = _toPrimitive(arg, "string");
|
|
4064
4072
|
return _typeof$2(key) === "symbol" ? key : String(key);
|
|
4065
4073
|
}
|
|
4066
|
-
function _defineProperty
|
|
4074
|
+
function _defineProperty(obj, key, value) {
|
|
4067
4075
|
key = _toPropertyKey(key);
|
|
4068
4076
|
if (key in obj) {
|
|
4069
4077
|
Object.defineProperty(obj, key, {
|
|
@@ -4079,7 +4087,7 @@ function _defineProperty$1(obj, key, value) {
|
|
|
4079
4087
|
}
|
|
4080
4088
|
var specialProperty = "exact-prop: ";
|
|
4081
4089
|
function exactProp(propTypes2) {
|
|
4082
|
-
return _extends$2({}, propTypes2, _defineProperty
|
|
4090
|
+
return _extends$2({}, propTypes2, _defineProperty({}, specialProperty, function(props) {
|
|
4083
4091
|
var unsupportedProps = Object.keys(props).filter(function(prop) {
|
|
4084
4092
|
return !propTypes2.hasOwnProperty(prop);
|
|
4085
4093
|
});
|
|
@@ -4450,20 +4458,7 @@ function lighten(color, coefficient) {
|
|
|
4450
4458
|
}
|
|
4451
4459
|
return recomposeColor(color);
|
|
4452
4460
|
}
|
|
4453
|
-
function
|
|
4454
|
-
if (key in obj) {
|
|
4455
|
-
Object.defineProperty(obj, key, {
|
|
4456
|
-
value,
|
|
4457
|
-
enumerable: true,
|
|
4458
|
-
configurable: true,
|
|
4459
|
-
writable: true
|
|
4460
|
-
});
|
|
4461
|
-
} else {
|
|
4462
|
-
obj[key] = value;
|
|
4463
|
-
}
|
|
4464
|
-
return obj;
|
|
4465
|
-
}
|
|
4466
|
-
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
4461
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
4467
4462
|
if (source == null)
|
|
4468
4463
|
return {};
|
|
4469
4464
|
var target = {};
|
|
@@ -4477,10 +4472,10 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
|
4477
4472
|
}
|
|
4478
4473
|
return target;
|
|
4479
4474
|
}
|
|
4480
|
-
function _objectWithoutProperties
|
|
4475
|
+
function _objectWithoutProperties(source, excluded) {
|
|
4481
4476
|
if (source == null)
|
|
4482
4477
|
return {};
|
|
4483
|
-
var target = _objectWithoutPropertiesLoose
|
|
4478
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
4484
4479
|
var key, i;
|
|
4485
4480
|
if (Object.getOwnPropertySymbols) {
|
|
4486
4481
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -4495,20 +4490,6 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
4495
4490
|
}
|
|
4496
4491
|
return target;
|
|
4497
4492
|
}
|
|
4498
|
-
function _extends$1() {
|
|
4499
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
4500
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4501
|
-
var source = arguments[i];
|
|
4502
|
-
for (var key in source) {
|
|
4503
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4504
|
-
target[key] = source[key];
|
|
4505
|
-
}
|
|
4506
|
-
}
|
|
4507
|
-
}
|
|
4508
|
-
return target;
|
|
4509
|
-
};
|
|
4510
|
-
return _extends$1.apply(this, arguments);
|
|
4511
|
-
}
|
|
4512
4493
|
var keys = ["xs", "sm", "md", "lg", "xl"];
|
|
4513
4494
|
function createBreakpoints(breakpoints) {
|
|
4514
4495
|
var _breakpoints$values = breakpoints.values, values2 = _breakpoints$values === void 0 ? {
|
|
@@ -4517,7 +4498,7 @@ function createBreakpoints(breakpoints) {
|
|
|
4517
4498
|
md: 960,
|
|
4518
4499
|
lg: 1280,
|
|
4519
4500
|
xl: 1920
|
|
4520
|
-
} : _breakpoints$values, _breakpoints$unit = breakpoints.unit, unit = _breakpoints$unit === void 0 ? "px" : _breakpoints$unit, _breakpoints$step = breakpoints.step, step = _breakpoints$step === void 0 ? 5 : _breakpoints$step, other = _objectWithoutProperties
|
|
4501
|
+
} : _breakpoints$values, _breakpoints$unit = breakpoints.unit, unit = _breakpoints$unit === void 0 ? "px" : _breakpoints$unit, _breakpoints$step = breakpoints.step, step = _breakpoints$step === void 0 ? 5 : _breakpoints$step, other = _objectWithoutProperties(breakpoints, ["values", "unit", "step"]);
|
|
4521
4502
|
function up(key) {
|
|
4522
4503
|
var value = typeof values2[key] === "number" ? values2[key] : key;
|
|
4523
4504
|
return "@media (min-width:".concat(value).concat(unit, ")");
|
|
@@ -4551,7 +4532,7 @@ function createBreakpoints(breakpoints) {
|
|
|
4551
4532
|
}
|
|
4552
4533
|
return values2[key];
|
|
4553
4534
|
}
|
|
4554
|
-
return _extends$
|
|
4535
|
+
return _extends$2({
|
|
4555
4536
|
keys,
|
|
4556
4537
|
values: values2,
|
|
4557
4538
|
up,
|
|
@@ -4563,14 +4544,14 @@ function createBreakpoints(breakpoints) {
|
|
|
4563
4544
|
}
|
|
4564
4545
|
function createMixins(breakpoints, spacing, mixins) {
|
|
4565
4546
|
var _toolbar;
|
|
4566
|
-
return _extends$
|
|
4547
|
+
return _extends$2({
|
|
4567
4548
|
gutters: function gutters() {
|
|
4568
4549
|
var styles8 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4569
4550
|
console.warn(["Material-UI: theme.mixins.gutters() is deprecated.", "You can use the source of the mixin directly:", "\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n"));
|
|
4570
|
-
return _extends$
|
|
4551
|
+
return _extends$2({
|
|
4571
4552
|
paddingLeft: spacing(2),
|
|
4572
4553
|
paddingRight: spacing(2)
|
|
4573
|
-
}, styles8, _defineProperty({}, breakpoints.up("sm"), _extends$
|
|
4554
|
+
}, styles8, _defineProperty({}, breakpoints.up("sm"), _extends$2({
|
|
4574
4555
|
paddingLeft: spacing(3),
|
|
4575
4556
|
paddingRight: spacing(3)
|
|
4576
4557
|
}, styles8[breakpoints.up("sm")])));
|
|
@@ -4689,7 +4670,7 @@ function createPalette(palette) {
|
|
|
4689
4670
|
light: green$1[300],
|
|
4690
4671
|
main: green$1[500],
|
|
4691
4672
|
dark: green$1[700]
|
|
4692
|
-
} : _palette$success, _palette$type = palette.type, type = _palette$type === void 0 ? "light" : _palette$type, _palette$contrastThre = palette.contrastThreshold, contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre, _palette$tonalOffset = palette.tonalOffset, tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset, other = _objectWithoutProperties
|
|
4673
|
+
} : _palette$success, _palette$type = palette.type, type = _palette$type === void 0 ? "light" : _palette$type, _palette$contrastThre = palette.contrastThreshold, contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre, _palette$tonalOffset = palette.tonalOffset, tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset, other = _objectWithoutProperties(palette, ["primary", "secondary", "error", "warning", "info", "success", "type", "contrastThreshold", "tonalOffset"]);
|
|
4693
4674
|
function getContrastText(background) {
|
|
4694
4675
|
var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;
|
|
4695
4676
|
{
|
|
@@ -4704,7 +4685,7 @@ function createPalette(palette) {
|
|
|
4704
4685
|
var mainShade = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 500;
|
|
4705
4686
|
var lightShade = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 300;
|
|
4706
4687
|
var darkShade = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 700;
|
|
4707
|
-
color = _extends$
|
|
4688
|
+
color = _extends$2({}, color);
|
|
4708
4689
|
if (!color.main && color[mainShade]) {
|
|
4709
4690
|
color.main = color[mainShade];
|
|
4710
4691
|
}
|
|
@@ -4730,7 +4711,7 @@ function createPalette(palette) {
|
|
|
4730
4711
|
console.error("Material-UI: The palette type `".concat(type, "` is not supported."));
|
|
4731
4712
|
}
|
|
4732
4713
|
}
|
|
4733
|
-
var paletteOutput = deepmerge(_extends$
|
|
4714
|
+
var paletteOutput = deepmerge(_extends$2({
|
|
4734
4715
|
// A collection of common colors.
|
|
4735
4716
|
common: common$1,
|
|
4736
4717
|
// The palette type, can be light or dark.
|
|
@@ -4781,7 +4762,7 @@ var caseAllCaps = {
|
|
|
4781
4762
|
};
|
|
4782
4763
|
var defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
|
|
4783
4764
|
function createTypography(palette, typography) {
|
|
4784
|
-
var _ref = typeof typography === "function" ? typography(palette) : typography, _ref$fontFamily = _ref.fontFamily, fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily, _ref$fontSize = _ref.fontSize, fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize, _ref$fontWeightLight = _ref.fontWeightLight, fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight, _ref$fontWeightRegula = _ref.fontWeightRegular, fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula, _ref$fontWeightMedium = _ref.fontWeightMedium, fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium, _ref$fontWeightBold = _ref.fontWeightBold, fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold, _ref$htmlFontSize = _ref.htmlFontSize, htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize, allVariants = _ref.allVariants, pxToRem2 = _ref.pxToRem, other = _objectWithoutProperties
|
|
4765
|
+
var _ref = typeof typography === "function" ? typography(palette) : typography, _ref$fontFamily = _ref.fontFamily, fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily, _ref$fontSize = _ref.fontSize, fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize, _ref$fontWeightLight = _ref.fontWeightLight, fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight, _ref$fontWeightRegula = _ref.fontWeightRegular, fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula, _ref$fontWeightMedium = _ref.fontWeightMedium, fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium, _ref$fontWeightBold = _ref.fontWeightBold, fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold, _ref$htmlFontSize = _ref.htmlFontSize, htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize, allVariants = _ref.allVariants, pxToRem2 = _ref.pxToRem, other = _objectWithoutProperties(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]);
|
|
4785
4766
|
{
|
|
4786
4767
|
if (typeof fontSize !== "number") {
|
|
4787
4768
|
console.error("Material-UI: `fontSize` is required to be a number.");
|
|
@@ -4795,7 +4776,7 @@ function createTypography(palette, typography) {
|
|
|
4795
4776
|
return "".concat(size2 / htmlFontSize * coef, "rem");
|
|
4796
4777
|
};
|
|
4797
4778
|
var buildVariant = function buildVariant2(fontWeight, size2, lineHeight, letterSpacing, casing) {
|
|
4798
|
-
return _extends$
|
|
4779
|
+
return _extends$2({
|
|
4799
4780
|
fontFamily,
|
|
4800
4781
|
fontWeight,
|
|
4801
4782
|
fontSize: pxToRem(size2),
|
|
@@ -4820,7 +4801,7 @@ function createTypography(palette, typography) {
|
|
|
4820
4801
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
4821
4802
|
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
4822
4803
|
};
|
|
4823
|
-
return deepmerge(_extends$
|
|
4804
|
+
return deepmerge(_extends$2({
|
|
4824
4805
|
htmlFontSize,
|
|
4825
4806
|
pxToRem,
|
|
4826
4807
|
round: roundWithDeprecationWarning,
|
|
@@ -4850,39 +4831,75 @@ var shape = {
|
|
|
4850
4831
|
const shape$1 = shape;
|
|
4851
4832
|
var responsivePropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]);
|
|
4852
4833
|
const responsivePropType$1 = responsivePropType;
|
|
4853
|
-
function _arrayLikeToArray
|
|
4834
|
+
function _arrayLikeToArray(arr, len) {
|
|
4854
4835
|
if (len == null || len > arr.length)
|
|
4855
4836
|
len = arr.length;
|
|
4856
4837
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
4857
4838
|
arr2[i] = arr[i];
|
|
4858
4839
|
return arr2;
|
|
4859
4840
|
}
|
|
4860
|
-
function _arrayWithoutHoles
|
|
4841
|
+
function _arrayWithoutHoles(arr) {
|
|
4861
4842
|
if (Array.isArray(arr))
|
|
4862
|
-
return _arrayLikeToArray
|
|
4843
|
+
return _arrayLikeToArray(arr);
|
|
4863
4844
|
}
|
|
4864
|
-
function _iterableToArray
|
|
4845
|
+
function _iterableToArray(iter) {
|
|
4865
4846
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
4866
4847
|
return Array.from(iter);
|
|
4867
4848
|
}
|
|
4868
|
-
function _unsupportedIterableToArray
|
|
4849
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
4869
4850
|
if (!o)
|
|
4870
4851
|
return;
|
|
4871
4852
|
if (typeof o === "string")
|
|
4872
|
-
return _arrayLikeToArray
|
|
4853
|
+
return _arrayLikeToArray(o, minLen);
|
|
4873
4854
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4874
4855
|
if (n === "Object" && o.constructor)
|
|
4875
4856
|
n = o.constructor.name;
|
|
4876
4857
|
if (n === "Map" || n === "Set")
|
|
4877
4858
|
return Array.from(o);
|
|
4878
4859
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
4879
|
-
return _arrayLikeToArray
|
|
4860
|
+
return _arrayLikeToArray(o, minLen);
|
|
4880
4861
|
}
|
|
4881
|
-
function _nonIterableSpread
|
|
4862
|
+
function _nonIterableSpread() {
|
|
4882
4863
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4883
4864
|
}
|
|
4884
|
-
function _toConsumableArray
|
|
4885
|
-
return _arrayWithoutHoles
|
|
4865
|
+
function _toConsumableArray(arr) {
|
|
4866
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
4867
|
+
}
|
|
4868
|
+
function _arrayWithHoles(arr) {
|
|
4869
|
+
if (Array.isArray(arr))
|
|
4870
|
+
return arr;
|
|
4871
|
+
}
|
|
4872
|
+
function _iterableToArrayLimit(arr, i) {
|
|
4873
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
4874
|
+
if (null != _i) {
|
|
4875
|
+
var _s, _e, _x, _r, _arr = [], _n = true, _d = false;
|
|
4876
|
+
try {
|
|
4877
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
4878
|
+
if (Object(_i) !== _i)
|
|
4879
|
+
return;
|
|
4880
|
+
_n = false;
|
|
4881
|
+
} else
|
|
4882
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
4883
|
+
;
|
|
4884
|
+
} catch (err) {
|
|
4885
|
+
_d = true, _e = err;
|
|
4886
|
+
} finally {
|
|
4887
|
+
try {
|
|
4888
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r))
|
|
4889
|
+
return;
|
|
4890
|
+
} finally {
|
|
4891
|
+
if (_d)
|
|
4892
|
+
throw _e;
|
|
4893
|
+
}
|
|
4894
|
+
}
|
|
4895
|
+
return _arr;
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
function _nonIterableRest() {
|
|
4899
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4900
|
+
}
|
|
4901
|
+
function _slicedToArray(arr, i) {
|
|
4902
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
4886
4903
|
}
|
|
4887
4904
|
var spacingKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "p", "pt", "pr", "pb", "pl", "px", "py", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY"];
|
|
4888
4905
|
function createUnarySpacing(theme) {
|
|
@@ -5000,7 +5017,7 @@ const transitions = {
|
|
|
5000
5017
|
create: function create() {
|
|
5001
5018
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["all"];
|
|
5002
5019
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5003
|
-
var _options$duration = options.duration, durationOption = _options$duration === void 0 ? duration.standard : _options$duration, _options$easing = options.easing, easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing, _options$delay = options.delay, delay = _options$delay === void 0 ? 0 : _options$delay, other = _objectWithoutProperties
|
|
5020
|
+
var _options$duration = options.duration, durationOption = _options$duration === void 0 ? duration.standard : _options$duration, _options$easing = options.easing, easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing, _options$delay = options.delay, delay = _options$delay === void 0 ? 0 : _options$delay, other = _objectWithoutProperties(options, ["duration", "easing", "delay"]);
|
|
5004
5021
|
{
|
|
5005
5022
|
var isString = function isString2(value) {
|
|
5006
5023
|
return typeof value === "string";
|
|
@@ -5048,7 +5065,7 @@ var zIndex = {
|
|
|
5048
5065
|
const zIndex$1 = zIndex;
|
|
5049
5066
|
function createTheme() {
|
|
5050
5067
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5051
|
-
var _options$breakpoints = options.breakpoints, breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints, _options$mixins = options.mixins, mixinsInput = _options$mixins === void 0 ? {} : _options$mixins, _options$palette = options.palette, paletteInput = _options$palette === void 0 ? {} : _options$palette, spacingInput = options.spacing, _options$typography = options.typography, typographyInput = _options$typography === void 0 ? {} : _options$typography, other = _objectWithoutProperties
|
|
5068
|
+
var _options$breakpoints = options.breakpoints, breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints, _options$mixins = options.mixins, mixinsInput = _options$mixins === void 0 ? {} : _options$mixins, _options$palette = options.palette, paletteInput = _options$palette === void 0 ? {} : _options$palette, spacingInput = options.spacing, _options$typography = options.typography, typographyInput = _options$typography === void 0 ? {} : _options$typography, other = _objectWithoutProperties(options, ["breakpoints", "mixins", "palette", "spacing", "typography"]);
|
|
5052
5069
|
var palette = createPalette(paletteInput);
|
|
5053
5070
|
var breakpoints = createBreakpoints(breakpointsInput);
|
|
5054
5071
|
var spacing = createSpacing(spacingInput);
|
|
@@ -5211,20 +5228,6 @@ function _assertThisInitialized(self2) {
|
|
|
5211
5228
|
}
|
|
5212
5229
|
return self2;
|
|
5213
5230
|
}
|
|
5214
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
5215
|
-
if (source == null)
|
|
5216
|
-
return {};
|
|
5217
|
-
var target = {};
|
|
5218
|
-
var sourceKeys = Object.keys(source);
|
|
5219
|
-
var key, i;
|
|
5220
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
5221
|
-
key = sourceKeys[i];
|
|
5222
|
-
if (excluded.indexOf(key) >= 0)
|
|
5223
|
-
continue;
|
|
5224
|
-
target[key] = source[key];
|
|
5225
|
-
}
|
|
5226
|
-
return target;
|
|
5227
|
-
}
|
|
5228
5231
|
var plainObjectConstrurctor = {}.constructor;
|
|
5229
5232
|
function cloneStyle(style) {
|
|
5230
5233
|
if (style == null || typeof style !== "object")
|
|
@@ -6699,6 +6702,20 @@ var functionPlugin = function functionPlugin2() {
|
|
|
6699
6702
|
};
|
|
6700
6703
|
};
|
|
6701
6704
|
const functions = functionPlugin;
|
|
6705
|
+
function _extends$1() {
|
|
6706
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
6707
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6708
|
+
var source = arguments[i];
|
|
6709
|
+
for (var key in source) {
|
|
6710
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6711
|
+
target[key] = source[key];
|
|
6712
|
+
}
|
|
6713
|
+
}
|
|
6714
|
+
}
|
|
6715
|
+
return target;
|
|
6716
|
+
};
|
|
6717
|
+
return _extends$1.apply(this, arguments);
|
|
6718
|
+
}
|
|
6702
6719
|
var at = "@global";
|
|
6703
6720
|
var atPrefix = "@global ";
|
|
6704
6721
|
var GlobalContainerRule = /* @__PURE__ */ function() {
|
|
@@ -7447,7 +7464,7 @@ var propertyDetectors = plugins.filter(function(p) {
|
|
|
7447
7464
|
var noPrefill = plugins.filter(function(p) {
|
|
7448
7465
|
return p.noPrefill;
|
|
7449
7466
|
}).reduce(function(a, p) {
|
|
7450
|
-
a.push.apply(a, _toConsumableArray
|
|
7467
|
+
a.push.apply(a, _toConsumableArray(p.noPrefill));
|
|
7451
7468
|
return a;
|
|
7452
7469
|
}, []);
|
|
7453
7470
|
var el;
|
|
@@ -7623,24 +7640,6 @@ function jssPreset() {
|
|
|
7623
7640
|
]
|
|
7624
7641
|
};
|
|
7625
7642
|
}
|
|
7626
|
-
function _objectWithoutProperties(source, excluded) {
|
|
7627
|
-
if (source == null)
|
|
7628
|
-
return {};
|
|
7629
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
7630
|
-
var key, i;
|
|
7631
|
-
if (Object.getOwnPropertySymbols) {
|
|
7632
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
7633
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
7634
|
-
key = sourceSymbolKeys[i];
|
|
7635
|
-
if (excluded.indexOf(key) >= 0)
|
|
7636
|
-
continue;
|
|
7637
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
7638
|
-
continue;
|
|
7639
|
-
target[key] = source[key];
|
|
7640
|
-
}
|
|
7641
|
-
}
|
|
7642
|
-
return target;
|
|
7643
|
-
}
|
|
7644
7643
|
function mergeClasses() {
|
|
7645
7644
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7646
7645
|
var baseClasses = options.baseClasses, newClasses = options.newClasses, Component = options.Component;
|
|
@@ -8234,12 +8233,12 @@ var defaultTheme = createTheme();
|
|
|
8234
8233
|
const defaultTheme$1 = defaultTheme;
|
|
8235
8234
|
function makeStyles(stylesOrCreator) {
|
|
8236
8235
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
8237
|
-
return makeStyles$1(stylesOrCreator, _extends$
|
|
8236
|
+
return makeStyles$1(stylesOrCreator, _extends$2({
|
|
8238
8237
|
defaultTheme: defaultTheme$1
|
|
8239
8238
|
}, options));
|
|
8240
8239
|
}
|
|
8241
8240
|
function withStyles2(stylesOrCreator, options) {
|
|
8242
|
-
return withStylesWithoutDefault(stylesOrCreator, _extends$
|
|
8241
|
+
return withStylesWithoutDefault(stylesOrCreator, _extends$2({
|
|
8243
8242
|
defaultTheme: defaultTheme$1
|
|
8244
8243
|
}, options));
|
|
8245
8244
|
}
|
|
@@ -8299,8 +8298,8 @@ var styles$7 = function styles(theme) {
|
|
|
8299
8298
|
};
|
|
8300
8299
|
};
|
|
8301
8300
|
var SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(props, ref) {
|
|
8302
|
-
var children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "inherit" : _props$color, _props$component = props.component, Component = _props$component === void 0 ? "svg" : _props$component, _props$fontSize = props.fontSize, fontSize = _props$fontSize === void 0 ? "medium" : _props$fontSize, htmlColor = props.htmlColor, titleAccess = props.titleAccess, _props$viewBox = props.viewBox, viewBox = _props$viewBox === void 0 ? "0 0 24 24" : _props$viewBox, other = _objectWithoutProperties
|
|
8303
|
-
return /* @__PURE__ */ React.createElement(Component, _extends$
|
|
8301
|
+
var children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "inherit" : _props$color, _props$component = props.component, Component = _props$component === void 0 ? "svg" : _props$component, _props$fontSize = props.fontSize, fontSize = _props$fontSize === void 0 ? "medium" : _props$fontSize, htmlColor = props.htmlColor, titleAccess = props.titleAccess, _props$viewBox = props.viewBox, viewBox = _props$viewBox === void 0 ? "0 0 24 24" : _props$viewBox, other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"]);
|
|
8302
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$2({
|
|
8304
8303
|
className: clsx(classes.root, className, color !== "inherit" && classes["color".concat(capitalize(color))], fontSize !== "default" && fontSize !== "medium" && classes["fontSize".concat(capitalize(fontSize))]),
|
|
8305
8304
|
focusable: "false",
|
|
8306
8305
|
viewBox,
|
|
@@ -8378,7 +8377,7 @@ const SvgIcon$1 = withStyles2(styles$7, {
|
|
|
8378
8377
|
})(SvgIcon);
|
|
8379
8378
|
function createSvgIcon(path, displayName) {
|
|
8380
8379
|
var Component = function Component2(props, ref) {
|
|
8381
|
-
return /* @__PURE__ */ React__default.createElement(SvgIcon$1, _extends$
|
|
8380
|
+
return /* @__PURE__ */ React__default.createElement(SvgIcon$1, _extends$2({
|
|
8382
8381
|
ref
|
|
8383
8382
|
}, props), path);
|
|
8384
8383
|
};
|
|
@@ -8536,69 +8535,6 @@ function useIsFocusVisible() {
|
|
|
8536
8535
|
ref
|
|
8537
8536
|
};
|
|
8538
8537
|
}
|
|
8539
|
-
function _arrayWithHoles(arr) {
|
|
8540
|
-
if (Array.isArray(arr))
|
|
8541
|
-
return arr;
|
|
8542
|
-
}
|
|
8543
|
-
function _iterableToArray(iter) {
|
|
8544
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
8545
|
-
return Array.from(iter);
|
|
8546
|
-
}
|
|
8547
|
-
function _arrayLikeToArray(arr, len) {
|
|
8548
|
-
if (len == null || len > arr.length)
|
|
8549
|
-
len = arr.length;
|
|
8550
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
8551
|
-
arr2[i] = arr[i];
|
|
8552
|
-
}
|
|
8553
|
-
return arr2;
|
|
8554
|
-
}
|
|
8555
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
8556
|
-
if (!o)
|
|
8557
|
-
return;
|
|
8558
|
-
if (typeof o === "string")
|
|
8559
|
-
return _arrayLikeToArray(o, minLen);
|
|
8560
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
8561
|
-
if (n === "Object" && o.constructor)
|
|
8562
|
-
n = o.constructor.name;
|
|
8563
|
-
if (n === "Map" || n === "Set")
|
|
8564
|
-
return Array.from(o);
|
|
8565
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
8566
|
-
return _arrayLikeToArray(o, minLen);
|
|
8567
|
-
}
|
|
8568
|
-
function _nonIterableRest() {
|
|
8569
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8570
|
-
}
|
|
8571
|
-
function _iterableToArrayLimit(arr, i) {
|
|
8572
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
8573
|
-
if (_i == null)
|
|
8574
|
-
return;
|
|
8575
|
-
var _arr = [];
|
|
8576
|
-
var _n = true;
|
|
8577
|
-
var _d = false;
|
|
8578
|
-
var _s, _e;
|
|
8579
|
-
try {
|
|
8580
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
8581
|
-
_arr.push(_s.value);
|
|
8582
|
-
if (i && _arr.length === i)
|
|
8583
|
-
break;
|
|
8584
|
-
}
|
|
8585
|
-
} catch (err) {
|
|
8586
|
-
_d = true;
|
|
8587
|
-
_e = err;
|
|
8588
|
-
} finally {
|
|
8589
|
-
try {
|
|
8590
|
-
if (!_n && _i["return"] != null)
|
|
8591
|
-
_i["return"]();
|
|
8592
|
-
} finally {
|
|
8593
|
-
if (_d)
|
|
8594
|
-
throw _e;
|
|
8595
|
-
}
|
|
8596
|
-
}
|
|
8597
|
-
return _arr;
|
|
8598
|
-
}
|
|
8599
|
-
function _slicedToArray(arr, i) {
|
|
8600
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
8601
|
-
}
|
|
8602
8538
|
const TransitionGroupContext = React__default.createContext(null);
|
|
8603
8539
|
function getChildMapping(children, mapFn) {
|
|
8604
8540
|
var mapper = function mapper2(child) {
|
|
@@ -8829,16 +8765,6 @@ TransitionGroup.propTypes = {
|
|
|
8829
8765
|
};
|
|
8830
8766
|
TransitionGroup.defaultProps = defaultProps;
|
|
8831
8767
|
const TransitionGroup$1 = TransitionGroup;
|
|
8832
|
-
function _arrayWithoutHoles(arr) {
|
|
8833
|
-
if (Array.isArray(arr))
|
|
8834
|
-
return _arrayLikeToArray(arr);
|
|
8835
|
-
}
|
|
8836
|
-
function _nonIterableSpread() {
|
|
8837
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8838
|
-
}
|
|
8839
|
-
function _toConsumableArray(arr) {
|
|
8840
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
8841
|
-
}
|
|
8842
8768
|
var useEnhancedEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
8843
8769
|
function Ripple(props) {
|
|
8844
8770
|
var classes = props.classes, _props$pulsate = props.pulsate, pulsate = _props$pulsate === void 0 ? false : _props$pulsate, rippleX = props.rippleX, rippleY = props.rippleY, rippleSize = props.rippleSize, inProp = props.in, _props$onExited = props.onExited, onExited = _props$onExited === void 0 ? function() {
|
|
@@ -8989,7 +8915,7 @@ var styles$6 = function styles2(theme) {
|
|
|
8989
8915
|
};
|
|
8990
8916
|
};
|
|
8991
8917
|
var TouchRipple = /* @__PURE__ */ React.forwardRef(function TouchRipple2(props, ref) {
|
|
8992
|
-
var _props$center = props.center, centerProp = _props$center === void 0 ? false : _props$center, classes = props.classes, className = props.className, other = _objectWithoutProperties
|
|
8918
|
+
var _props$center = props.center, centerProp = _props$center === void 0 ? false : _props$center, classes = props.classes, className = props.className, other = _objectWithoutProperties(props, ["center", "classes", "className"]);
|
|
8993
8919
|
var _React$useState = React.useState([]), ripples = _React$useState[0], setRipples = _React$useState[1];
|
|
8994
8920
|
var nextKey = React.useRef(0);
|
|
8995
8921
|
var rippleCallback = React.useRef(null);
|
|
@@ -9124,7 +9050,7 @@ var TouchRipple = /* @__PURE__ */ React.forwardRef(function TouchRipple2(props,
|
|
|
9124
9050
|
stop
|
|
9125
9051
|
};
|
|
9126
9052
|
}, [pulsate, start, stop]);
|
|
9127
|
-
return /* @__PURE__ */ React.createElement("span", _extends$
|
|
9053
|
+
return /* @__PURE__ */ React.createElement("span", _extends$2({
|
|
9128
9054
|
className: clsx(classes.root, className),
|
|
9129
9055
|
ref: container
|
|
9130
9056
|
}, other), /* @__PURE__ */ React.createElement(TransitionGroup$1, {
|
|
@@ -9199,7 +9125,7 @@ var styles$5 = {
|
|
|
9199
9125
|
focusVisible: {}
|
|
9200
9126
|
};
|
|
9201
9127
|
var ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(props, ref) {
|
|
9202
|
-
var action = props.action, buttonRefProp = props.buttonRef, _props$centerRipple = props.centerRipple, centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, children = props.children, classes = props.classes, className = props.className, _props$component = props.component, component = _props$component === void 0 ? "button" : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableRipple = props.disableRipple, disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, _props$disableTouchRi = props.disableTouchRipple, disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, _props$focusRipple = props.focusRipple, focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, focusVisibleClassName = props.focusVisibleClassName, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onFocusVisible = props.onFocusVisible, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onMouseDown = props.onMouseDown, onMouseLeave = props.onMouseLeave, onMouseUp = props.onMouseUp, onTouchEnd = props.onTouchEnd, onTouchMove = props.onTouchMove, onTouchStart = props.onTouchStart, onDragLeave = props.onDragLeave, _props$tabIndex = props.tabIndex, tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, TouchRippleProps = props.TouchRippleProps, _props$type = props.type, type = _props$type === void 0 ? "button" : _props$type, other = _objectWithoutProperties
|
|
9128
|
+
var action = props.action, buttonRefProp = props.buttonRef, _props$centerRipple = props.centerRipple, centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, children = props.children, classes = props.classes, className = props.className, _props$component = props.component, component = _props$component === void 0 ? "button" : _props$component, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableRipple = props.disableRipple, disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, _props$disableTouchRi = props.disableTouchRipple, disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, _props$focusRipple = props.focusRipple, focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, focusVisibleClassName = props.focusVisibleClassName, onBlur = props.onBlur, onClick = props.onClick, onFocus = props.onFocus, onFocusVisible = props.onFocusVisible, onKeyDown = props.onKeyDown, onKeyUp = props.onKeyUp, onMouseDown = props.onMouseDown, onMouseLeave = props.onMouseLeave, onMouseUp = props.onMouseUp, onTouchEnd = props.onTouchEnd, onTouchMove = props.onTouchMove, onTouchStart = props.onTouchStart, onDragLeave = props.onDragLeave, _props$tabIndex = props.tabIndex, tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, TouchRippleProps = props.TouchRippleProps, _props$type = props.type, type = _props$type === void 0 ? "button" : _props$type, other = _objectWithoutProperties(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]);
|
|
9203
9129
|
var buttonRef = React.useRef(null);
|
|
9204
9130
|
function getButtonNode() {
|
|
9205
9131
|
return ReactDOM.findDOMNode(buttonRef.current);
|
|
@@ -9343,7 +9269,7 @@ var ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(props, re
|
|
|
9343
9269
|
}
|
|
9344
9270
|
}, [enableTouchRipple]);
|
|
9345
9271
|
}
|
|
9346
|
-
return /* @__PURE__ */ React.createElement(ComponentProp, _extends$
|
|
9272
|
+
return /* @__PURE__ */ React.createElement(ComponentProp, _extends$2({
|
|
9347
9273
|
className: clsx(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled),
|
|
9348
9274
|
onBlur: handleBlur,
|
|
9349
9275
|
onClick,
|
|
@@ -9361,7 +9287,7 @@ var ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(props, re
|
|
|
9361
9287
|
tabIndex: disabled ? -1 : tabIndex
|
|
9362
9288
|
}, buttonProps, other), children, enableTouchRipple ? (
|
|
9363
9289
|
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
9364
|
-
/* @__PURE__ */ React.createElement(TouchRipple$1, _extends$
|
|
9290
|
+
/* @__PURE__ */ React.createElement(TouchRipple$1, _extends$2({
|
|
9365
9291
|
ref: rippleRef,
|
|
9366
9292
|
center: centerRipple
|
|
9367
9293
|
}, TouchRippleProps))
|
|
@@ -9592,8 +9518,8 @@ var styles$4 = function styles3(theme) {
|
|
|
9592
9518
|
};
|
|
9593
9519
|
};
|
|
9594
9520
|
var IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(props, ref) {
|
|
9595
|
-
var _props$edge = props.edge, edge = _props$edge === void 0 ? false : _props$edge, children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "default" : _props$color, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableFocusRi = props.disableFocusRipple, disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties
|
|
9596
|
-
return /* @__PURE__ */ React.createElement(ButtonBase$1, _extends$
|
|
9521
|
+
var _props$edge = props.edge, edge = _props$edge === void 0 ? false : _props$edge, children = props.children, classes = props.classes, className = props.className, _props$color = props.color, color = _props$color === void 0 ? "default" : _props$color, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$disableFocusRi = props.disableFocusRipple, disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]);
|
|
9522
|
+
return /* @__PURE__ */ React.createElement(ButtonBase$1, _extends$2({
|
|
9597
9523
|
className: clsx(classes.root, className, color !== "default" && classes["color".concat(capitalize(color))], disabled && classes.disabled, size2 === "small" && classes["size".concat(capitalize(size2))], {
|
|
9598
9524
|
"start": classes.edgeStart,
|
|
9599
9525
|
"end": classes.edgeEnd
|
|
@@ -9688,7 +9614,7 @@ var styles$3 = {
|
|
|
9688
9614
|
}
|
|
9689
9615
|
};
|
|
9690
9616
|
var SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props, ref) {
|
|
9691
|
-
var autoFocus = props.autoFocus, checkedProp = props.checked, checkedIcon = props.checkedIcon, classes = props.classes, className = props.className, defaultChecked = props.defaultChecked, disabledProp = props.disabled, icon = props.icon, id = props.id, inputProps = props.inputProps, inputRef = props.inputRef, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, required = props.required, tabIndex = props.tabIndex, type = props.type, value = props.value, other = _objectWithoutProperties
|
|
9617
|
+
var autoFocus = props.autoFocus, checkedProp = props.checked, checkedIcon = props.checkedIcon, classes = props.classes, className = props.className, defaultChecked = props.defaultChecked, disabledProp = props.disabled, icon = props.icon, id = props.id, inputProps = props.inputProps, inputRef = props.inputRef, name = props.name, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, readOnly = props.readOnly, required = props.required, tabIndex = props.tabIndex, type = props.type, value = props.value, other = _objectWithoutProperties(props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "defaultChecked", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]);
|
|
9692
9618
|
var _useControlled = useControlled({
|
|
9693
9619
|
controlled: checkedProp,
|
|
9694
9620
|
default: Boolean(defaultChecked),
|
|
@@ -9726,7 +9652,7 @@ var SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props, re
|
|
|
9726
9652
|
}
|
|
9727
9653
|
}
|
|
9728
9654
|
var hasLabelFor = type === "checkbox" || type === "radio";
|
|
9729
|
-
return /* @__PURE__ */ React.createElement(IconButton$1, _extends$
|
|
9655
|
+
return /* @__PURE__ */ React.createElement(IconButton$1, _extends$2({
|
|
9730
9656
|
component: "span",
|
|
9731
9657
|
className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),
|
|
9732
9658
|
disabled,
|
|
@@ -9735,7 +9661,7 @@ var SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props, re
|
|
|
9735
9661
|
onFocus: handleFocus,
|
|
9736
9662
|
onBlur: handleBlur,
|
|
9737
9663
|
ref
|
|
9738
|
-
}, other), /* @__PURE__ */ React.createElement("input", _extends$
|
|
9664
|
+
}, other), /* @__PURE__ */ React.createElement("input", _extends$2({
|
|
9739
9665
|
autoFocus,
|
|
9740
9666
|
checked: checkedProp,
|
|
9741
9667
|
defaultChecked,
|
|
@@ -9901,10 +9827,10 @@ var defaultCheckedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, null)
|
|
|
9901
9827
|
var defaultIcon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, null);
|
|
9902
9828
|
var defaultIndeterminateIcon = /* @__PURE__ */ React.createElement(IndeterminateCheckBoxIcon, null);
|
|
9903
9829
|
var Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(props, ref) {
|
|
9904
|
-
var _props$checkedIcon = props.checkedIcon, checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon, classes = props.classes, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, _props$icon = props.icon, iconProp = _props$icon === void 0 ? defaultIcon : _props$icon, _props$indeterminate = props.indeterminate, indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate, _props$indeterminateI = props.indeterminateIcon, indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI, inputProps = props.inputProps, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties
|
|
9830
|
+
var _props$checkedIcon = props.checkedIcon, checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon, classes = props.classes, _props$color = props.color, color = _props$color === void 0 ? "secondary" : _props$color, _props$icon = props.icon, iconProp = _props$icon === void 0 ? defaultIcon : _props$icon, _props$indeterminate = props.indeterminate, indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate, _props$indeterminateI = props.indeterminateIcon, indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI, inputProps = props.inputProps, _props$size = props.size, size2 = _props$size === void 0 ? "medium" : _props$size, other = _objectWithoutProperties(props, ["checkedIcon", "classes", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"]);
|
|
9905
9831
|
var icon = indeterminate ? indeterminateIconProp : iconProp;
|
|
9906
9832
|
var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
|
|
9907
|
-
return /* @__PURE__ */ React.createElement(SwitchBase$1, _extends$
|
|
9833
|
+
return /* @__PURE__ */ React.createElement(SwitchBase$1, _extends$2({
|
|
9908
9834
|
type: "checkbox",
|
|
9909
9835
|
classes: {
|
|
9910
9836
|
root: clsx(classes.root, classes["color".concat(capitalize(color))], indeterminate && classes.indeterminate),
|
|
@@ -9912,7 +9838,7 @@ var Checkbox = /* @__PURE__ */ React.forwardRef(function Checkbox2(props, ref) {
|
|
|
9912
9838
|
disabled: classes.disabled
|
|
9913
9839
|
},
|
|
9914
9840
|
color,
|
|
9915
|
-
inputProps: _extends$
|
|
9841
|
+
inputProps: _extends$2({
|
|
9916
9842
|
"data-indeterminate": indeterminate
|
|
9917
9843
|
}, inputProps),
|
|
9918
9844
|
icon: /* @__PURE__ */ React.cloneElement(icon, {
|
|
@@ -10019,7 +9945,7 @@ const Tablelvl2Context$1 = Tablelvl2Context;
|
|
|
10019
9945
|
var styles$1 = function styles5(theme) {
|
|
10020
9946
|
return {
|
|
10021
9947
|
/* Styles applied to the root element. */
|
|
10022
|
-
root: _extends$
|
|
9948
|
+
root: _extends$2({}, theme.typography.body2, {
|
|
10023
9949
|
display: "table-cell",
|
|
10024
9950
|
verticalAlign: "inherit",
|
|
10025
9951
|
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
@@ -10108,7 +10034,7 @@ var styles$1 = function styles5(theme) {
|
|
|
10108
10034
|
};
|
|
10109
10035
|
};
|
|
10110
10036
|
var TableCell = /* @__PURE__ */ React.forwardRef(function TableCell2(props, ref) {
|
|
10111
|
-
var _props$align = props.align, align = _props$align === void 0 ? "inherit" : _props$align, classes = props.classes, className = props.className, component = props.component, paddingProp = props.padding, scopeProp = props.scope, sizeProp = props.size, sortDirection = props.sortDirection, variantProp = props.variant, other = _objectWithoutProperties
|
|
10037
|
+
var _props$align = props.align, align = _props$align === void 0 ? "inherit" : _props$align, classes = props.classes, className = props.className, component = props.component, paddingProp = props.padding, scopeProp = props.scope, sizeProp = props.size, sortDirection = props.sortDirection, variantProp = props.variant, other = _objectWithoutProperties(props, ["align", "classes", "className", "component", "padding", "scope", "size", "sortDirection", "variant"]);
|
|
10112
10038
|
var table = React.useContext(TableContext$1);
|
|
10113
10039
|
var tablelvl2 = React.useContext(Tablelvl2Context$1);
|
|
10114
10040
|
var isHeadCell = tablelvl2 && tablelvl2.variant === "head";
|
|
@@ -10131,7 +10057,7 @@ var TableCell = /* @__PURE__ */ React.forwardRef(function TableCell2(props, ref)
|
|
|
10131
10057
|
if (sortDirection) {
|
|
10132
10058
|
ariaSort = sortDirection === "asc" ? "ascending" : "descending";
|
|
10133
10059
|
}
|
|
10134
|
-
return /* @__PURE__ */ React.createElement(Component, _extends$
|
|
10060
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$2({
|
|
10135
10061
|
ref,
|
|
10136
10062
|
className: clsx(classes.root, classes[variant], className, align !== "inherit" && classes["align".concat(capitalize(align))], padding !== "normal" && classes["padding".concat(capitalize(padding))], size2 !== "medium" && classes["size".concat(capitalize(size2))], variant === "head" && table && table.stickyHeader && classes.stickyHeader),
|
|
10137
10063
|
"aria-sort": ariaSort,
|
|
@@ -10226,9 +10152,9 @@ var styles6 = function styles7(theme) {
|
|
|
10226
10152
|
};
|
|
10227
10153
|
var defaultComponent = "tr";
|
|
10228
10154
|
var TableRow = /* @__PURE__ */ React.forwardRef(function TableRow2(props, ref) {
|
|
10229
|
-
var classes = props.classes, className = props.className, _props$component = props.component, Component = _props$component === void 0 ? defaultComponent : _props$component, _props$hover = props.hover, hover = _props$hover === void 0 ? false : _props$hover, _props$selected = props.selected, selected = _props$selected === void 0 ? false : _props$selected, other = _objectWithoutProperties
|
|
10155
|
+
var classes = props.classes, className = props.className, _props$component = props.component, Component = _props$component === void 0 ? defaultComponent : _props$component, _props$hover = props.hover, hover = _props$hover === void 0 ? false : _props$hover, _props$selected = props.selected, selected = _props$selected === void 0 ? false : _props$selected, other = _objectWithoutProperties(props, ["classes", "className", "component", "hover", "selected"]);
|
|
10230
10156
|
var tablelvl2 = React.useContext(Tablelvl2Context$1);
|
|
10231
|
-
return /* @__PURE__ */ React.createElement(Component, _extends$
|
|
10157
|
+
return /* @__PURE__ */ React.createElement(Component, _extends$2({
|
|
10232
10158
|
ref,
|
|
10233
10159
|
className: clsx(classes.root, className, tablelvl2 && {
|
|
10234
10160
|
"head": classes.head,
|
|
@@ -14782,8 +14708,8 @@ function FeatureList(props) {
|
|
|
14782
14708
|
const selectableTableSortKey = featureListSortKey === "featureIndex" ? "key" : "name";
|
|
14783
14709
|
useEffect(() => {
|
|
14784
14710
|
const results = geneList.filter((gene) => {
|
|
14785
|
-
var _a;
|
|
14786
|
-
return gene.toLowerCase().includes(searchTerm.toLowerCase()) || ((_a = featureLabelsMap == null ? void 0 : featureLabelsMap.get(gene)) == null ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
14711
|
+
var _a, _b;
|
|
14712
|
+
return gene.toLowerCase().includes(searchTerm.toLowerCase()) || ((_a = featureLabelsMap == null ? void 0 : featureLabelsMap.get(gene)) == null ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase())) || ((_b = featureLabelsMap == null ? void 0 : featureLabelsMap.get(cleanFeatureId(gene))) == null ? void 0 : _b.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
14787
14713
|
});
|
|
14788
14714
|
setSearchResults(results);
|
|
14789
14715
|
}, [searchTerm, geneList, featureLabelsMap]);
|
|
@@ -14804,7 +14730,7 @@ function FeatureList(props) {
|
|
|
14804
14730
|
const preSortedData = searchResults.filter((gene) => geneFilter ? geneFilter.includes(gene) : true).map(
|
|
14805
14731
|
(gene) => ({
|
|
14806
14732
|
key: gene,
|
|
14807
|
-
name: (featureLabelsMap == null ? void 0 : featureLabelsMap.get(gene)) || gene,
|
|
14733
|
+
name: (featureLabelsMap == null ? void 0 : featureLabelsMap.get(gene)) || (featureLabelsMap == null ? void 0 : featureLabelsMap.get(cleanFeatureId(gene))) || gene,
|
|
14808
14734
|
value: geneSelection ? geneSelection.includes(gene) : false
|
|
14809
14735
|
})
|
|
14810
14736
|
);
|
|
@@ -15111,6 +15037,11 @@ function FeatureListSubscriber(props) {
|
|
|
15111
15037
|
{},
|
|
15112
15038
|
{ featureType }
|
|
15113
15039
|
);
|
|
15040
|
+
const [expandedFeatureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
|
15041
|
+
featureType,
|
|
15042
|
+
featureLabelsMap,
|
|
15043
|
+
{ stripCuriePrefixes: true }
|
|
15044
|
+
);
|
|
15114
15045
|
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(
|
|
15115
15046
|
loaders,
|
|
15116
15047
|
dataset,
|
|
@@ -15119,6 +15050,7 @@ function FeatureListSubscriber(props) {
|
|
|
15119
15050
|
);
|
|
15120
15051
|
const isReady = useReady([
|
|
15121
15052
|
featureLabelsStatus,
|
|
15053
|
+
expandedFeatureLabelsStatus,
|
|
15122
15054
|
matrixIndicesStatus
|
|
15123
15055
|
]);
|
|
15124
15056
|
const urls = useUrls([
|
|
@@ -15127,7 +15059,7 @@ function FeatureListSubscriber(props) {
|
|
|
15127
15059
|
]);
|
|
15128
15060
|
const geneList = featureIndex || [];
|
|
15129
15061
|
const numGenes = geneList.length;
|
|
15130
|
-
const hasFeatureLabels = Boolean(
|
|
15062
|
+
const hasFeatureLabels = Boolean(expandedFeatureLabelsMap);
|
|
15131
15063
|
function setGeneSelectionAndColorEncoding(newSelection) {
|
|
15132
15064
|
setGeneSelection(newSelection);
|
|
15133
15065
|
setCellColorEncoding("geneSelection");
|
|
@@ -15159,7 +15091,7 @@ function FeatureListSubscriber(props) {
|
|
|
15159
15091
|
setFeatureListSortKey,
|
|
15160
15092
|
showFeatureTable,
|
|
15161
15093
|
setShowFeatureTable,
|
|
15162
|
-
hasFeatureLabels
|
|
15094
|
+
hasFeatureLabels,
|
|
15163
15095
|
primaryColumnName
|
|
15164
15096
|
}
|
|
15165
15097
|
),
|
|
@@ -15171,7 +15103,7 @@ function FeatureListSubscriber(props) {
|
|
|
15171
15103
|
geneList,
|
|
15172
15104
|
featureListSort,
|
|
15173
15105
|
featureListSortKey: featureListSortKey || initialSortKey,
|
|
15174
|
-
featureLabelsMap,
|
|
15106
|
+
featureLabelsMap: expandedFeatureLabelsMap,
|
|
15175
15107
|
featureType,
|
|
15176
15108
|
geneSelection,
|
|
15177
15109
|
geneFilter,
|
|
@@ -15179,7 +15111,7 @@ function FeatureListSubscriber(props) {
|
|
|
15179
15111
|
setGeneFilter,
|
|
15180
15112
|
setGeneHighlight,
|
|
15181
15113
|
enableMultiSelect,
|
|
15182
|
-
hasFeatureLabels
|
|
15114
|
+
hasFeatureLabels,
|
|
15183
15115
|
primaryColumnName
|
|
15184
15116
|
}
|
|
15185
15117
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeatureList.d.ts","sourceRoot":"","sources":["../src/FeatureList.js"],"names":[],"mappings":"AAgBA,6DAsHC"}
|
package/dist-tsc/FeatureList.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import React, { useEffect, useState, useMemo } from 'react';
|
|
3
3
|
import { every } from 'lodash-es';
|
|
4
4
|
import { makeStyles } from '@material-ui/core';
|
|
5
|
+
import { cleanFeatureId } from '@vitessce/utils';
|
|
5
6
|
import { SelectableTable } from './selectable-table/index.js';
|
|
6
7
|
import { ALT_COLNAME } from './constants.js';
|
|
7
8
|
const useStyles = makeStyles(() => ({
|
|
@@ -24,7 +25,10 @@ export default function FeatureList(props) {
|
|
|
24
25
|
useEffect(() => {
|
|
25
26
|
const results = geneList
|
|
26
27
|
.filter(gene => (gene.toLowerCase().includes(searchTerm.toLowerCase())
|
|
27
|
-
|| featureLabelsMap?.get(gene)
|
|
28
|
+
|| featureLabelsMap?.get(gene)
|
|
29
|
+
?.toLowerCase().includes(searchTerm.toLowerCase())
|
|
30
|
+
|| featureLabelsMap?.get(cleanFeatureId(gene))
|
|
31
|
+
?.toLowerCase().includes(searchTerm.toLowerCase())));
|
|
28
32
|
setSearchResults(results);
|
|
29
33
|
}, [searchTerm, geneList, featureLabelsMap]);
|
|
30
34
|
function onChange(selection) {
|
|
@@ -47,7 +51,9 @@ export default function FeatureList(props) {
|
|
|
47
51
|
.filter(gene => (geneFilter ? geneFilter.includes(gene) : true))
|
|
48
52
|
.map(gene => ({
|
|
49
53
|
key: gene,
|
|
50
|
-
name: featureLabelsMap?.get(gene)
|
|
54
|
+
name: (featureLabelsMap?.get(gene)
|
|
55
|
+
|| featureLabelsMap?.get(cleanFeatureId(gene))
|
|
56
|
+
|| gene),
|
|
51
57
|
value: (geneSelection ? geneSelection.includes(gene) : false),
|
|
52
58
|
}));
|
|
53
59
|
if (preSortedData && featureListSort === 'alphabetical' && preSortedData.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FeatureListSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureListSubscriber.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CAlBG;IAAsB,KAAK,EAAnB,MAAM;IACQ,kBAAkB,EAAhC,MAAM;IAEU,mBAAmB;IAErB,KAAK,EAAnB,MAAM;IACQ,sBAAsB,EAApC,MAAM;IAEQ,4BAA4B,EAA1C,MAAM;IAES,iBAAiB,EAAhC,OAAO;IAEQ,SAAS,EAAxB,OAAO;IAC0B,IAAI,EAArC,cAAc,GAAC,UAAU;IAGkB,OAAO,EAAlD,cAAc,GAAC,eAAe,GAAC,IAAI;CAC7C,eA2HA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { pluralize as plur, capitalize, commaNumber } from '@vitessce/utils';
|
|
4
|
-
import { TitleInfo, useReady, useUrls, useFeatureLabelsData, useObsFeatureMatrixIndices, useCoordination, useLoaders, } from '@vitessce/vit-s';
|
|
4
|
+
import { TitleInfo, useReady, useUrls, useFeatureLabelsData, useObsFeatureMatrixIndices, useCoordination, useLoaders, useExpandedFeatureLabelsMap, } from '@vitessce/vit-s';
|
|
5
5
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
6
6
|
import FeatureList from './FeatureList.js';
|
|
7
7
|
import FeatureListOptions from './FeatureListOptions.js';
|
|
@@ -36,9 +36,11 @@ export function FeatureListSubscriber(props) {
|
|
|
36
36
|
// Get data from loaders using the data hooks.
|
|
37
37
|
// TODO: support multiple feature labels using featureLabelsType coordination values.
|
|
38
38
|
const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
|
|
39
|
+
const [expandedFeatureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(featureType, featureLabelsMap, { stripCuriePrefixes: true });
|
|
39
40
|
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(loaders, dataset, true, { obsType, featureType });
|
|
40
41
|
const isReady = useReady([
|
|
41
42
|
featureLabelsStatus,
|
|
43
|
+
expandedFeatureLabelsStatus,
|
|
42
44
|
matrixIndicesStatus,
|
|
43
45
|
]);
|
|
44
46
|
const urls = useUrls([
|
|
@@ -47,7 +49,7 @@ export function FeatureListSubscriber(props) {
|
|
|
47
49
|
]);
|
|
48
50
|
const geneList = featureIndex || [];
|
|
49
51
|
const numGenes = geneList.length;
|
|
50
|
-
const hasFeatureLabels = Boolean(
|
|
52
|
+
const hasFeatureLabels = Boolean(expandedFeatureLabelsMap);
|
|
51
53
|
function setGeneSelectionAndColorEncoding(newSelection) {
|
|
52
54
|
setGeneSelection(newSelection);
|
|
53
55
|
setCellColorEncoding('geneSelection');
|
|
@@ -61,5 +63,5 @@ export function FeatureListSubscriber(props) {
|
|
|
61
63
|
// Virtual scroll is used but this allows for the same styling as a scroll component
|
|
62
64
|
// even though this no longer uses the TitleInfo component's
|
|
63
65
|
// scroll css (SelectableTable is virtual scroll).
|
|
64
|
-
isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels:
|
|
66
|
+
isScroll: true, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: isReady, urls: urls, helpText: helpText, options: (_jsx(FeatureListOptions, { featureListSort: featureListSort, setFeatureListSort: setFeatureListSort, featureListSortKey: featureListSortKey || initialSortKey, setFeatureListSortKey: setFeatureListSortKey, showFeatureTable: showFeatureTable, setShowFeatureTable: setShowFeatureTable, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName })), children: _jsx(FeatureList, { hasColorEncoding: cellColorEncoding === 'geneSelection', showFeatureTable: showFeatureTable, geneList: geneList, featureListSort: featureListSort, featureListSortKey: featureListSortKey || initialSortKey, featureLabelsMap: expandedFeatureLabelsMap, featureType: featureType, geneSelection: geneSelection, geneFilter: geneFilter, setGeneSelection: setGeneSelectionAndColorEncoding, setGeneFilter: setGeneFilter, setGeneHighlight: setGeneHighlight, enableMultiSelect: enableMultiSelect, hasFeatureLabels: hasFeatureLabels, primaryColumnName: primaryColumnName }) }));
|
|
65
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/feature-list",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4",
|
|
4
4
|
"author": "HIDIVE Lab at HMS",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"react-virtualized": "^9.22.2",
|
|
23
23
|
"uuid": "^9.0.0",
|
|
24
24
|
"react-aria": "^3.28.0",
|
|
25
|
-
"@vitessce/constants-internal": "3.5.
|
|
26
|
-
"@vitessce/utils": "3.5.
|
|
27
|
-
"@vitessce/vit-s": "3.5.
|
|
25
|
+
"@vitessce/constants-internal": "3.5.4",
|
|
26
|
+
"@vitessce/utils": "3.5.4",
|
|
27
|
+
"@vitessce/vit-s": "3.5.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@testing-library/jest-dom": "^5.16.4",
|
package/src/FeatureList.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, useMemo } from 'react';
|
|
2
2
|
import { every } from 'lodash-es';
|
|
3
3
|
import { makeStyles } from '@material-ui/core';
|
|
4
|
+
import { cleanFeatureId } from '@vitessce/utils';
|
|
4
5
|
import { SelectableTable } from './selectable-table/index.js';
|
|
5
6
|
import { ALT_COLNAME } from './constants.js';
|
|
6
7
|
|
|
@@ -39,12 +40,14 @@ export default function FeatureList(props) {
|
|
|
39
40
|
// passing to the SelectableTable component.
|
|
40
41
|
const selectableTableSortKey = (featureListSortKey === 'featureIndex' ? 'key' : 'name');
|
|
41
42
|
|
|
42
|
-
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
const results = geneList
|
|
45
45
|
.filter(gene => (
|
|
46
46
|
gene.toLowerCase().includes(searchTerm.toLowerCase())
|
|
47
|
-
|| featureLabelsMap?.get(gene)
|
|
47
|
+
|| featureLabelsMap?.get(gene)
|
|
48
|
+
?.toLowerCase().includes(searchTerm.toLowerCase())
|
|
49
|
+
|| featureLabelsMap?.get(cleanFeatureId(gene))
|
|
50
|
+
?.toLowerCase().includes(searchTerm.toLowerCase())
|
|
48
51
|
));
|
|
49
52
|
setSearchResults(results);
|
|
50
53
|
}, [searchTerm, geneList, featureLabelsMap]);
|
|
@@ -69,7 +72,11 @@ export default function FeatureList(props) {
|
|
|
69
72
|
.map(
|
|
70
73
|
gene => ({
|
|
71
74
|
key: gene,
|
|
72
|
-
name:
|
|
75
|
+
name: (
|
|
76
|
+
featureLabelsMap?.get(gene)
|
|
77
|
+
|| featureLabelsMap?.get(cleanFeatureId(gene))
|
|
78
|
+
|| gene
|
|
79
|
+
),
|
|
73
80
|
value: (geneSelection ? geneSelection.includes(gene) : false),
|
|
74
81
|
}),
|
|
75
82
|
);
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
useReady, useUrls,
|
|
6
6
|
useFeatureLabelsData, useObsFeatureMatrixIndices,
|
|
7
7
|
useCoordination, useLoaders,
|
|
8
|
+
useExpandedFeatureLabelsMap,
|
|
8
9
|
} from '@vitessce/vit-s';
|
|
9
10
|
import { ViewType, COMPONENT_COORDINATION_TYPES, ViewHelpMapping } from '@vitessce/constants-internal';
|
|
10
11
|
import FeatureList from './FeatureList.js';
|
|
@@ -75,21 +76,26 @@ export function FeatureListSubscriber(props) {
|
|
|
75
76
|
loaders, dataset, false, {}, {},
|
|
76
77
|
{ featureType },
|
|
77
78
|
);
|
|
79
|
+
const [expandedFeatureLabelsMap, expandedFeatureLabelsStatus] = useExpandedFeatureLabelsMap(
|
|
80
|
+
featureType, featureLabelsMap, { stripCuriePrefixes: true },
|
|
81
|
+
);
|
|
78
82
|
const [{ featureIndex }, matrixIndicesStatus, obsFeatureMatrixUrls] = useObsFeatureMatrixIndices(
|
|
79
83
|
loaders, dataset, true,
|
|
80
84
|
{ obsType, featureType },
|
|
81
85
|
);
|
|
82
86
|
const isReady = useReady([
|
|
83
87
|
featureLabelsStatus,
|
|
88
|
+
expandedFeatureLabelsStatus,
|
|
84
89
|
matrixIndicesStatus,
|
|
85
90
|
]);
|
|
86
91
|
const urls = useUrls([
|
|
87
92
|
featureLabelsUrls,
|
|
88
93
|
obsFeatureMatrixUrls,
|
|
89
94
|
]);
|
|
95
|
+
|
|
90
96
|
const geneList = featureIndex || [];
|
|
91
97
|
const numGenes = geneList.length;
|
|
92
|
-
const hasFeatureLabels = Boolean(
|
|
98
|
+
const hasFeatureLabels = Boolean(expandedFeatureLabelsMap);
|
|
93
99
|
|
|
94
100
|
function setGeneSelectionAndColorEncoding(newSelection) {
|
|
95
101
|
setGeneSelection(newSelection);
|
|
@@ -125,7 +131,7 @@ export function FeatureListSubscriber(props) {
|
|
|
125
131
|
setFeatureListSortKey={setFeatureListSortKey}
|
|
126
132
|
showFeatureTable={showFeatureTable}
|
|
127
133
|
setShowFeatureTable={setShowFeatureTable}
|
|
128
|
-
hasFeatureLabels={
|
|
134
|
+
hasFeatureLabels={hasFeatureLabels}
|
|
129
135
|
primaryColumnName={primaryColumnName}
|
|
130
136
|
/>
|
|
131
137
|
)}
|
|
@@ -136,7 +142,7 @@ export function FeatureListSubscriber(props) {
|
|
|
136
142
|
geneList={geneList}
|
|
137
143
|
featureListSort={featureListSort}
|
|
138
144
|
featureListSortKey={featureListSortKey || initialSortKey}
|
|
139
|
-
featureLabelsMap={
|
|
145
|
+
featureLabelsMap={expandedFeatureLabelsMap}
|
|
140
146
|
featureType={featureType}
|
|
141
147
|
geneSelection={geneSelection}
|
|
142
148
|
geneFilter={geneFilter}
|
|
@@ -144,7 +150,7 @@ export function FeatureListSubscriber(props) {
|
|
|
144
150
|
setGeneFilter={setGeneFilter}
|
|
145
151
|
setGeneHighlight={setGeneHighlight}
|
|
146
152
|
enableMultiSelect={enableMultiSelect}
|
|
147
|
-
hasFeatureLabels={
|
|
153
|
+
hasFeatureLabels={hasFeatureLabels}
|
|
148
154
|
primaryColumnName={primaryColumnName}
|
|
149
155
|
/>
|
|
150
156
|
</TitleInfo>
|