@vitessce/statistical-plots 3.1.0 → 3.1.2

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { useMemo, Suspense, useCallback, useState, useEffect } from "react";
2
+ import React__default, { useId, useMemo, Suspense, useCallback, useState, useEffect } from "react";
3
3
  import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordination, useGridItemSize, useFeatureSelection, useFeatureLabelsData, useObsFeatureMatrixIndices, useObsSetsData, useReady, useUrls, TitleInfo, useObsFeatureMatrixData } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
@@ -1323,6 +1323,363 @@ const COMPONENT_COORDINATION_TYPES = {
1323
1323
  CoordinationType$1.FEATURE_SELECTION
1324
1324
  ]
1325
1325
  };
1326
+ function commonjsRequire(path2) {
1327
+ throw new Error('Could not dynamically require "' + path2 + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1328
+ }
1329
+ var pluralize = { exports: {} };
1330
+ (function(module2, exports2) {
1331
+ (function(root2, pluralize2) {
1332
+ if (typeof commonjsRequire === "function" && true && true) {
1333
+ module2.exports = pluralize2();
1334
+ } else {
1335
+ root2.pluralize = pluralize2();
1336
+ }
1337
+ })(commonjsGlobal, function() {
1338
+ var pluralRules = [];
1339
+ var singularRules = [];
1340
+ var uncountables = {};
1341
+ var irregularPlurals = {};
1342
+ var irregularSingles = {};
1343
+ function sanitizeRule(rule2) {
1344
+ if (typeof rule2 === "string") {
1345
+ return new RegExp("^" + rule2 + "$", "i");
1346
+ }
1347
+ return rule2;
1348
+ }
1349
+ function restoreCase(word, token) {
1350
+ if (word === token)
1351
+ return token;
1352
+ if (word === word.toLowerCase())
1353
+ return token.toLowerCase();
1354
+ if (word === word.toUpperCase())
1355
+ return token.toUpperCase();
1356
+ if (word[0] === word[0].toUpperCase()) {
1357
+ return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
1358
+ }
1359
+ return token.toLowerCase();
1360
+ }
1361
+ function interpolate2(str, args) {
1362
+ return str.replace(/\$(\d{1,2})/g, function(match2, index2) {
1363
+ return args[index2] || "";
1364
+ });
1365
+ }
1366
+ function replace2(word, rule2) {
1367
+ return word.replace(rule2[0], function(match2, index2) {
1368
+ var result = interpolate2(rule2[1], arguments);
1369
+ if (match2 === "") {
1370
+ return restoreCase(word[index2 - 1], result);
1371
+ }
1372
+ return restoreCase(match2, result);
1373
+ });
1374
+ }
1375
+ function sanitizeWord(token, word, rules) {
1376
+ if (!token.length || uncountables.hasOwnProperty(token)) {
1377
+ return word;
1378
+ }
1379
+ var len = rules.length;
1380
+ while (len--) {
1381
+ var rule2 = rules[len];
1382
+ if (rule2[0].test(word))
1383
+ return replace2(word, rule2);
1384
+ }
1385
+ return word;
1386
+ }
1387
+ function replaceWord(replaceMap, keepMap, rules) {
1388
+ return function(word) {
1389
+ var token = word.toLowerCase();
1390
+ if (keepMap.hasOwnProperty(token)) {
1391
+ return restoreCase(word, token);
1392
+ }
1393
+ if (replaceMap.hasOwnProperty(token)) {
1394
+ return restoreCase(word, replaceMap[token]);
1395
+ }
1396
+ return sanitizeWord(token, word, rules);
1397
+ };
1398
+ }
1399
+ function checkWord(replaceMap, keepMap, rules, bool) {
1400
+ return function(word) {
1401
+ var token = word.toLowerCase();
1402
+ if (keepMap.hasOwnProperty(token))
1403
+ return true;
1404
+ if (replaceMap.hasOwnProperty(token))
1405
+ return false;
1406
+ return sanitizeWord(token, token, rules) === token;
1407
+ };
1408
+ }
1409
+ function pluralize2(word, count2, inclusive) {
1410
+ var pluralized = count2 === 1 ? pluralize2.singular(word) : pluralize2.plural(word);
1411
+ return (inclusive ? count2 + " " : "") + pluralized;
1412
+ }
1413
+ pluralize2.plural = replaceWord(
1414
+ irregularSingles,
1415
+ irregularPlurals,
1416
+ pluralRules
1417
+ );
1418
+ pluralize2.isPlural = checkWord(
1419
+ irregularSingles,
1420
+ irregularPlurals,
1421
+ pluralRules
1422
+ );
1423
+ pluralize2.singular = replaceWord(
1424
+ irregularPlurals,
1425
+ irregularSingles,
1426
+ singularRules
1427
+ );
1428
+ pluralize2.isSingular = checkWord(
1429
+ irregularPlurals,
1430
+ irregularSingles,
1431
+ singularRules
1432
+ );
1433
+ pluralize2.addPluralRule = function(rule2, replacement) {
1434
+ pluralRules.push([sanitizeRule(rule2), replacement]);
1435
+ };
1436
+ pluralize2.addSingularRule = function(rule2, replacement) {
1437
+ singularRules.push([sanitizeRule(rule2), replacement]);
1438
+ };
1439
+ pluralize2.addUncountableRule = function(word) {
1440
+ if (typeof word === "string") {
1441
+ uncountables[word.toLowerCase()] = true;
1442
+ return;
1443
+ }
1444
+ pluralize2.addPluralRule(word, "$0");
1445
+ pluralize2.addSingularRule(word, "$0");
1446
+ };
1447
+ pluralize2.addIrregularRule = function(single, plural) {
1448
+ plural = plural.toLowerCase();
1449
+ single = single.toLowerCase();
1450
+ irregularSingles[single] = plural;
1451
+ irregularPlurals[plural] = single;
1452
+ };
1453
+ [
1454
+ // Pronouns.
1455
+ ["I", "we"],
1456
+ ["me", "us"],
1457
+ ["he", "they"],
1458
+ ["she", "they"],
1459
+ ["them", "them"],
1460
+ ["myself", "ourselves"],
1461
+ ["yourself", "yourselves"],
1462
+ ["itself", "themselves"],
1463
+ ["herself", "themselves"],
1464
+ ["himself", "themselves"],
1465
+ ["themself", "themselves"],
1466
+ ["is", "are"],
1467
+ ["was", "were"],
1468
+ ["has", "have"],
1469
+ ["this", "these"],
1470
+ ["that", "those"],
1471
+ // Words ending in with a consonant and `o`.
1472
+ ["echo", "echoes"],
1473
+ ["dingo", "dingoes"],
1474
+ ["volcano", "volcanoes"],
1475
+ ["tornado", "tornadoes"],
1476
+ ["torpedo", "torpedoes"],
1477
+ // Ends with `us`.
1478
+ ["genus", "genera"],
1479
+ ["viscus", "viscera"],
1480
+ // Ends with `ma`.
1481
+ ["stigma", "stigmata"],
1482
+ ["stoma", "stomata"],
1483
+ ["dogma", "dogmata"],
1484
+ ["lemma", "lemmata"],
1485
+ ["schema", "schemata"],
1486
+ ["anathema", "anathemata"],
1487
+ // Other irregular rules.
1488
+ ["ox", "oxen"],
1489
+ ["axe", "axes"],
1490
+ ["die", "dice"],
1491
+ ["yes", "yeses"],
1492
+ ["foot", "feet"],
1493
+ ["eave", "eaves"],
1494
+ ["goose", "geese"],
1495
+ ["tooth", "teeth"],
1496
+ ["quiz", "quizzes"],
1497
+ ["human", "humans"],
1498
+ ["proof", "proofs"],
1499
+ ["carve", "carves"],
1500
+ ["valve", "valves"],
1501
+ ["looey", "looies"],
1502
+ ["thief", "thieves"],
1503
+ ["groove", "grooves"],
1504
+ ["pickaxe", "pickaxes"],
1505
+ ["passerby", "passersby"]
1506
+ ].forEach(function(rule2) {
1507
+ return pluralize2.addIrregularRule(rule2[0], rule2[1]);
1508
+ });
1509
+ [
1510
+ [/s?$/i, "s"],
1511
+ [/[^\u0000-\u007F]$/i, "$0"],
1512
+ [/([^aeiou]ese)$/i, "$1"],
1513
+ [/(ax|test)is$/i, "$1es"],
1514
+ [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"],
1515
+ [/(e[mn]u)s?$/i, "$1s"],
1516
+ [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"],
1517
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"],
1518
+ [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"],
1519
+ [/(seraph|cherub)(?:im)?$/i, "$1im"],
1520
+ [/(her|at|gr)o$/i, "$1oes"],
1521
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"],
1522
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"],
1523
+ [/sis$/i, "ses"],
1524
+ [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"],
1525
+ [/([^aeiouy]|qu)y$/i, "$1ies"],
1526
+ [/([^ch][ieo][ln])ey$/i, "$1ies"],
1527
+ [/(x|ch|ss|sh|zz)$/i, "$1es"],
1528
+ [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"],
1529
+ [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"],
1530
+ [/(pe)(?:rson|ople)$/i, "$1ople"],
1531
+ [/(child)(?:ren)?$/i, "$1ren"],
1532
+ [/eaux$/i, "$0"],
1533
+ [/m[ae]n$/i, "men"],
1534
+ ["thou", "you"]
1535
+ ].forEach(function(rule2) {
1536
+ return pluralize2.addPluralRule(rule2[0], rule2[1]);
1537
+ });
1538
+ [
1539
+ [/s$/i, ""],
1540
+ [/(ss)$/i, "$1"],
1541
+ [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"],
1542
+ [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"],
1543
+ [/ies$/i, "y"],
1544
+ [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"],
1545
+ [/\b(mon|smil)ies$/i, "$1ey"],
1546
+ [/\b((?:tit)?m|l)ice$/i, "$1ouse"],
1547
+ [/(seraph|cherub)im$/i, "$1"],
1548
+ [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"],
1549
+ [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"],
1550
+ [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"],
1551
+ [/(test)(?:is|es)$/i, "$1is"],
1552
+ [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"],
1553
+ [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"],
1554
+ [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"],
1555
+ [/(alumn|alg|vertebr)ae$/i, "$1a"],
1556
+ [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"],
1557
+ [/(matr|append)ices$/i, "$1ix"],
1558
+ [/(pe)(rson|ople)$/i, "$1rson"],
1559
+ [/(child)ren$/i, "$1"],
1560
+ [/(eau)x?$/i, "$1"],
1561
+ [/men$/i, "man"]
1562
+ ].forEach(function(rule2) {
1563
+ return pluralize2.addSingularRule(rule2[0], rule2[1]);
1564
+ });
1565
+ [
1566
+ // Singular words with no plurals.
1567
+ "adulthood",
1568
+ "advice",
1569
+ "agenda",
1570
+ "aid",
1571
+ "aircraft",
1572
+ "alcohol",
1573
+ "ammo",
1574
+ "analytics",
1575
+ "anime",
1576
+ "athletics",
1577
+ "audio",
1578
+ "bison",
1579
+ "blood",
1580
+ "bream",
1581
+ "buffalo",
1582
+ "butter",
1583
+ "carp",
1584
+ "cash",
1585
+ "chassis",
1586
+ "chess",
1587
+ "clothing",
1588
+ "cod",
1589
+ "commerce",
1590
+ "cooperation",
1591
+ "corps",
1592
+ "debris",
1593
+ "diabetes",
1594
+ "digestion",
1595
+ "elk",
1596
+ "energy",
1597
+ "equipment",
1598
+ "excretion",
1599
+ "expertise",
1600
+ "firmware",
1601
+ "flounder",
1602
+ "fun",
1603
+ "gallows",
1604
+ "garbage",
1605
+ "graffiti",
1606
+ "hardware",
1607
+ "headquarters",
1608
+ "health",
1609
+ "herpes",
1610
+ "highjinks",
1611
+ "homework",
1612
+ "housework",
1613
+ "information",
1614
+ "jeans",
1615
+ "justice",
1616
+ "kudos",
1617
+ "labour",
1618
+ "literature",
1619
+ "machinery",
1620
+ "mackerel",
1621
+ "mail",
1622
+ "media",
1623
+ "mews",
1624
+ "moose",
1625
+ "music",
1626
+ "mud",
1627
+ "manga",
1628
+ "news",
1629
+ "only",
1630
+ "personnel",
1631
+ "pike",
1632
+ "plankton",
1633
+ "pliers",
1634
+ "police",
1635
+ "pollution",
1636
+ "premises",
1637
+ "rain",
1638
+ "research",
1639
+ "rice",
1640
+ "salmon",
1641
+ "scissors",
1642
+ "series",
1643
+ "sewage",
1644
+ "shambles",
1645
+ "shrimp",
1646
+ "software",
1647
+ "species",
1648
+ "staff",
1649
+ "swine",
1650
+ "tennis",
1651
+ "traffic",
1652
+ "transportation",
1653
+ "trout",
1654
+ "tuna",
1655
+ "wealth",
1656
+ "welfare",
1657
+ "whiting",
1658
+ "wildebeest",
1659
+ "wildlife",
1660
+ "you",
1661
+ /pok[eé]mon$/i,
1662
+ // Regexes.
1663
+ /[^aeiou]ese$/i,
1664
+ // "chinese", "japanese"
1665
+ /deer$/i,
1666
+ // "deer", "reindeer"
1667
+ /fish$/i,
1668
+ // "fish", "blowfish", "angelfish"
1669
+ /measles$/i,
1670
+ /o[iu]s$/i,
1671
+ // "carnivorous"
1672
+ /pox$/i,
1673
+ // "chickpox", "smallpox"
1674
+ /sheep$/i
1675
+ ].forEach(pluralize2.addUncountableRule);
1676
+ return pluralize2;
1677
+ });
1678
+ })(pluralize);
1679
+ var pluralizeExports = pluralize.exports;
1680
+ const plur = /* @__PURE__ */ getDefaultExportFromCjs(pluralizeExports);
1681
+ plur.addPluralRule("glomerulus", "glomeruli");
1682
+ plur.addPluralRule("interstitium", "interstitia");
1326
1683
  function fromEntries(iterable) {
1327
1684
  return [...iterable].reduce((obj, { 0: key2, 1: val }) => Object.assign(obj, { [key2]: val }), {});
1328
1685
  }
@@ -28447,6 +28804,7 @@ function CellSetExpressionPlotOptions(props) {
28447
28804
  setFeatureValueTransformCoefficient,
28448
28805
  transformOptions
28449
28806
  } = props;
28807
+ const cellSetExpressionPlotOptionsId = useId();
28450
28808
  const classes = usePlotOptionsStyles();
28451
28809
  const handleTransformChange = (event2) => {
28452
28810
  setFeatureValueTransform(event2.target.value === "" ? null : event2.target.value);
@@ -28464,36 +28822,48 @@ function CellSetExpressionPlotOptions(props) {
28464
28822
  };
28465
28823
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(OptionsContainer, { children: [
28466
28824
  /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
28467
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, children: "Transform" }),
28468
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28825
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28826
+ "label",
28827
+ {
28828
+ htmlFor: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`,
28829
+ children: "Transform"
28830
+ }
28831
+ ) }),
28832
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28469
28833
  OptionSelect,
28470
28834
  {
28471
28835
  className: classes.select,
28472
28836
  value: featureValueTransform === null ? "" : featureValueTransform,
28473
28837
  onChange: handleTransformChange,
28474
28838
  inputProps: {
28475
- id: "scatterplot-transform-select"
28839
+ id: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`
28476
28840
  },
28477
28841
  children: transformOptions.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: opt.value === null ? "" : opt.value, children: opt.name }, opt.name))
28478
- },
28479
- "gating-transform-select"
28842
+ }
28480
28843
  ) })
28481
28844
  ] }),
28482
28845
  /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow$1, { children: [
28483
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, children: "Transform Coefficient" }),
28484
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28846
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.labelCell, variant: "head", scope: "row", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28847
+ "label",
28848
+ {
28849
+ htmlFor: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`,
28850
+ children: "Transform Coefficient"
28851
+ }
28852
+ ) }),
28853
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell$1, { className: classes.inputCell, variant: "body", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28485
28854
  TextField$1,
28486
28855
  {
28487
- label: "Number",
28856
+ label: "Transform Coefficient",
28488
28857
  type: "number",
28489
28858
  onChange: handleTransformCoefficientChange,
28490
28859
  value: featureValueTransformCoefficient,
28491
28860
  InputLabelProps: {
28492
28861
  shrink: true
28493
- }
28862
+ },
28863
+ id: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`
28494
28864
  }
28495
28865
  ) })
28496
- ] }, "transform-coefficient-option-row")
28866
+ ] })
28497
28867
  ] });
28498
28868
  }
28499
28869
  function accessor(fn, fields, name2) {
@@ -1 +1 @@
1
- {"version":3,"file":"CellSetExpressionPlotOptions.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotOptions.js"],"names":[],"mappings":"AAIA,8EAoEC"}
1
+ {"version":3,"file":"CellSetExpressionPlotOptions.d.ts","sourceRoot":"","sources":["../src/CellSetExpressionPlotOptions.js"],"names":[],"mappings":"AAIA,8EAiFC"}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
2
+ import React, { useId } from 'react';
3
3
  import { TableCell, TableRow, TextField } from '@material-ui/core';
4
4
  import { usePlotOptionsStyles, OptionsContainer, OptionSelect } from '@vitessce/vit-s';
5
5
  export default function CellSetExpressionPlotOptions(props) {
6
6
  const { featureValueTransform, setFeatureValueTransform, featureValueTransformCoefficient, setFeatureValueTransformCoefficient, transformOptions, } = props;
7
+ const cellSetExpressionPlotOptionsId = useId();
7
8
  const classes = usePlotOptionsStyles();
8
9
  const handleTransformChange = (event) => {
9
10
  setFeatureValueTransform(event.target.value === '' ? null : event.target.value);
@@ -22,9 +23,9 @@ export default function CellSetExpressionPlotOptions(props) {
22
23
  }
23
24
  }
24
25
  };
25
- return (_jsxs(OptionsContainer, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, children: "Transform" }), _jsx(TableCell, { className: classes.inputCell, children: _jsx(OptionSelect, { className: classes.select, value: featureValueTransform === null ? '' : featureValueTransform, onChange: handleTransformChange, inputProps: {
26
- id: 'scatterplot-transform-select',
27
- }, children: transformOptions.map(opt => (_jsx("option", { value: opt.value === null ? '' : opt.value, children: opt.name }, opt.name))) }, "gating-transform-select") })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, children: "Transform Coefficient" }), _jsx(TableCell, { className: classes.inputCell, children: _jsx(TextField, { label: "Number", type: "number", onChange: handleTransformCoefficientChange, value: featureValueTransformCoefficient, InputLabelProps: {
26
+ return (_jsxs(OptionsContainer, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`, children: "Transform" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(OptionSelect, { className: classes.select, value: featureValueTransform === null ? '' : featureValueTransform, onChange: handleTransformChange, inputProps: {
27
+ id: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`,
28
+ }, children: transformOptions.map(opt => (_jsx("option", { value: opt.value === null ? '' : opt.value, children: opt.name }, opt.name))) }) })] }), _jsxs(TableRow, { children: [_jsx(TableCell, { className: classes.labelCell, variant: "head", scope: "row", children: _jsx("label", { htmlFor: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`, children: "Transform Coefficient" }) }), _jsx(TableCell, { className: classes.inputCell, variant: "body", children: _jsx(TextField, { label: "Transform Coefficient", type: "number", onChange: handleTransformCoefficientChange, value: featureValueTransformCoefficient, InputLabelProps: {
28
29
  shrink: true,
29
- } }) })] }, "transform-coefficient-option-row")] }));
30
+ }, id: `cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}` }) })] })] }));
30
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/statistical-plots",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,11 +19,11 @@
19
19
  "@material-ui/core": "~4.12.3",
20
20
  "d3-array": "^2.4.0",
21
21
  "lodash-es": "^4.17.21",
22
- "@vitessce/constants-internal": "3.1.0",
23
- "@vitessce/sets-utils": "3.1.0",
24
- "@vitessce/utils": "3.1.0",
25
- "@vitessce/vega": "3.1.0",
26
- "@vitessce/vit-s": "3.1.0"
22
+ "@vitessce/constants-internal": "3.1.2",
23
+ "@vitessce/sets-utils": "3.1.2",
24
+ "@vitessce/utils": "3.1.2",
25
+ "@vitessce/vega": "3.1.2",
26
+ "@vitessce/vit-s": "3.1.2"
27
27
  },
28
28
  "devDependencies": {
29
29
  "react": "^18.0.0",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useId } from 'react';
2
2
  import { TableCell, TableRow, TextField } from '@material-ui/core';
3
3
  import { usePlotOptionsStyles, OptionsContainer, OptionSelect } from '@vitessce/vit-s';
4
4
 
@@ -10,6 +10,9 @@ export default function CellSetExpressionPlotOptions(props) {
10
10
  setFeatureValueTransformCoefficient,
11
11
  transformOptions,
12
12
  } = props;
13
+
14
+ const cellSetExpressionPlotOptionsId = useId();
15
+
13
16
  const classes = usePlotOptionsStyles();
14
17
 
15
18
  const handleTransformChange = (event) => {
@@ -33,15 +36,20 @@ export default function CellSetExpressionPlotOptions(props) {
33
36
  return (
34
37
  <OptionsContainer>
35
38
  <TableRow>
36
- <TableCell className={classes.labelCell}>Transform</TableCell>
37
- <TableCell className={classes.inputCell}>
39
+ <TableCell className={classes.labelCell} variant="head" scope="row">
40
+ <label
41
+ htmlFor={`cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`}
42
+ >
43
+ Transform
44
+ </label>
45
+ </TableCell>
46
+ <TableCell className={classes.inputCell} variant="body">
38
47
  <OptionSelect
39
- key="gating-transform-select"
40
48
  className={classes.select}
41
49
  value={featureValueTransform === null ? '' : featureValueTransform}
42
50
  onChange={handleTransformChange}
43
51
  inputProps={{
44
- id: 'scatterplot-transform-select',
52
+ id: `cellset-expression-transform-select-${cellSetExpressionPlotOptionsId}`,
45
53
  }}
46
54
  >
47
55
  {transformOptions.map(opt => (
@@ -52,19 +60,24 @@ export default function CellSetExpressionPlotOptions(props) {
52
60
  </OptionSelect>
53
61
  </TableCell>
54
62
  </TableRow>
55
- <TableRow key="transform-coefficient-option-row">
56
- <TableCell className={classes.labelCell}>
57
- Transform Coefficient
63
+ <TableRow>
64
+ <TableCell className={classes.labelCell} variant="head" scope="row">
65
+ <label
66
+ htmlFor={`cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`}
67
+ >
68
+ Transform Coefficient
69
+ </label>
58
70
  </TableCell>
59
- <TableCell className={classes.inputCell}>
71
+ <TableCell className={classes.inputCell} variant="body">
60
72
  <TextField
61
- label="Number"
73
+ label="Transform Coefficient"
62
74
  type="number"
63
75
  onChange={handleTransformCoefficientChange}
64
76
  value={featureValueTransformCoefficient}
65
77
  InputLabelProps={{
66
78
  shrink: true,
67
79
  }}
80
+ id={`cellset-expression-transform-coeff-${cellSetExpressionPlotOptionsId}`}
68
81
  />
69
82
  </TableCell>
70
83
  </TableRow>