@vitessce/biomarker-select 3.5.8 → 3.5.9
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
|
@@ -22462,7 +22462,7 @@ const ExpandMoreIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path",
|
|
|
22462
22462
|
const InfoIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
|
|
22463
22463
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
|
|
22464
22464
|
}), "Info");
|
|
22465
|
-
const useStyles = makeStyles(() => ({
|
|
22465
|
+
const useStyles$1 = makeStyles(() => ({
|
|
22466
22466
|
header: {
|
|
22467
22467
|
marginTop: "10px",
|
|
22468
22468
|
marginBottom: "10px"
|
|
@@ -22505,7 +22505,7 @@ function ConfirmatoryCart(props) {
|
|
|
22505
22505
|
// eslint-disable-next-line no-unused-vars
|
|
22506
22506
|
setCurrentStratificationSelection
|
|
22507
22507
|
} = props;
|
|
22508
|
-
const classes = useStyles();
|
|
22508
|
+
const classes = useStyles$1();
|
|
22509
22509
|
const [expandedAccordions, setExpandedAccordions] = React__default.useState([
|
|
22510
22510
|
"agnostic",
|
|
22511
22511
|
"specific",
|
|
@@ -24767,7 +24767,7 @@ function SelectAgnostic(props) {
|
|
|
24767
24767
|
currentModalityAgnosticSelection,
|
|
24768
24768
|
setCurrentModalityAgnosticSelection
|
|
24769
24769
|
} = props;
|
|
24770
|
-
const classes = useStyles();
|
|
24770
|
+
const classes = useStyles$1();
|
|
24771
24771
|
const [selectedItem, setSelectedItem] = React__default.useState(null);
|
|
24772
24772
|
const [potentialItems, setPotentialItems] = React__default.useState([]);
|
|
24773
24773
|
const handleChange = async (event) => {
|
|
@@ -30750,7 +30750,7 @@ function SelectSpecific(props) {
|
|
|
30750
30750
|
setCurrentModalitySpecificSelection,
|
|
30751
30751
|
getEdges
|
|
30752
30752
|
} = props;
|
|
30753
|
-
const classes = useStyles();
|
|
30753
|
+
const classes = useStyles$1();
|
|
30754
30754
|
const queries = useQueries({
|
|
30755
30755
|
queries: (currentModalityAgnosticSelection == null ? void 0 : currentModalityAgnosticSelection.map((item) => ({
|
|
30756
30756
|
queryKey: [item.nodeType, item.kgId],
|
|
@@ -30886,7 +30886,7 @@ function ConfirmatoryStepper(props) {
|
|
|
30886
30886
|
stratifications,
|
|
30887
30887
|
onFinish
|
|
30888
30888
|
} = props;
|
|
30889
|
-
const classes = useStyles();
|
|
30889
|
+
const classes = useStyles$1();
|
|
30890
30890
|
const [activeStep, setActiveStep] = React__default.useState(0);
|
|
30891
30891
|
const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
|
|
30892
30892
|
const isStepOptional = (step) => step === 2;
|
|
@@ -31028,7 +31028,7 @@ function ExploratoryStepper(props) {
|
|
|
31028
31028
|
stratifications,
|
|
31029
31029
|
onFinish
|
|
31030
31030
|
} = props;
|
|
31031
|
-
const classes = useStyles();
|
|
31031
|
+
const classes = useStyles$1();
|
|
31032
31032
|
const [activeStep, setActiveStep] = React__default.useState(0);
|
|
31033
31033
|
const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
|
|
31034
31034
|
const isStepOptional = (step) => step === 2;
|
|
@@ -31141,7 +31141,7 @@ function ScmdUi(props) {
|
|
|
31141
31141
|
stratifications,
|
|
31142
31142
|
onFinish
|
|
31143
31143
|
} = props;
|
|
31144
|
-
const classes = useStyles();
|
|
31144
|
+
const classes = useStyles$1();
|
|
31145
31145
|
const mode = modeProp || "confirmatory";
|
|
31146
31146
|
const [tempIsVisible, setTempIsVisible] = useState(true);
|
|
31147
31147
|
const isConfirmatoryMode = mode === "confirmatory";
|
|
@@ -31309,22 +31309,69 @@ function BiomarkerSelectSubscriber(props) {
|
|
|
31309
31309
|
}
|
|
31310
31310
|
) : null });
|
|
31311
31311
|
}
|
|
31312
|
+
const useStyles = makeStyles((theme) => ({
|
|
31313
|
+
buttonContainer: {
|
|
31314
|
+
position: "absolute",
|
|
31315
|
+
right: 0,
|
|
31316
|
+
display: "flex",
|
|
31317
|
+
flexDirection: "column",
|
|
31318
|
+
justifyContent: "center",
|
|
31319
|
+
height: "100%"
|
|
31320
|
+
},
|
|
31321
|
+
headingContainer: {
|
|
31322
|
+
backgroundColor: "transparent"
|
|
31323
|
+
},
|
|
31324
|
+
headingSectionContainer: {
|
|
31325
|
+
width: "100%",
|
|
31326
|
+
display: "flex",
|
|
31327
|
+
flexDirection: "row",
|
|
31328
|
+
position: "relative"
|
|
31329
|
+
},
|
|
31330
|
+
headingText: {
|
|
31331
|
+
margin: 0,
|
|
31332
|
+
color: theme.palette.primaryForeground
|
|
31333
|
+
}
|
|
31334
|
+
}));
|
|
31312
31335
|
function ComparativeHeadingSubscriber(props) {
|
|
31313
31336
|
var _a2, _b;
|
|
31314
31337
|
const {
|
|
31315
31338
|
coordinationScopes
|
|
31316
31339
|
} = props;
|
|
31317
31340
|
const [{
|
|
31318
|
-
sampleSetSelection
|
|
31341
|
+
sampleSetSelection,
|
|
31342
|
+
featureSelection
|
|
31343
|
+
}, {
|
|
31344
|
+
setSampleSetSelection
|
|
31345
|
+
// TODO: buttons for modification of featureSelection
|
|
31346
|
+
// setFeatureSelection,
|
|
31319
31347
|
}] = useCoordination(
|
|
31320
31348
|
COMPONENT_COORDINATION_TYPES[ViewType.COMPARATIVE_HEADING],
|
|
31321
31349
|
coordinationScopes
|
|
31322
31350
|
);
|
|
31323
|
-
|
|
31324
|
-
|
|
31325
|
-
|
|
31326
|
-
|
|
31327
|
-
|
|
31351
|
+
const classes = useStyles();
|
|
31352
|
+
const swapSampleSets = useCallback(() => {
|
|
31353
|
+
if ((sampleSetSelection == null ? void 0 : sampleSetSelection.length) === 2) {
|
|
31354
|
+
setSampleSetSelection([
|
|
31355
|
+
sampleSetSelection[1],
|
|
31356
|
+
sampleSetSelection[0]
|
|
31357
|
+
]);
|
|
31358
|
+
}
|
|
31359
|
+
}, [sampleSetSelection, setSampleSetSelection]);
|
|
31360
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingContainer, children: [
|
|
31361
|
+
sampleSetSelection && sampleSetSelection.length === 2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
|
|
31362
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "45%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_a2 = sampleSetSelection == null ? void 0 : sampleSetSelection[0]) == null ? void 0 : _a2.at(-1) }) }),
|
|
31363
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, style: { textAlign: "right" }, children: "vs. " }) }),
|
|
31364
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_b = sampleSetSelection == null ? void 0 : sampleSetSelection[1]) == null ? void 0 : _b.at(-1) }) }),
|
|
31365
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: swapSampleSets, type: "button", children: "Swap" }) })
|
|
31366
|
+
] }) : null,
|
|
31367
|
+
featureSelection && featureSelection.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
|
|
31368
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: classes.headingText, children: "Selected Biomarkers: " }) }),
|
|
31369
|
+
featureSelection == null ? void 0 : featureSelection.map((featureName, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: classes.headingText, children: [
|
|
31370
|
+
featureName,
|
|
31371
|
+
i < featureSelection.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: ", " }) : null
|
|
31372
|
+
] }) }))
|
|
31373
|
+
] }) : null
|
|
31374
|
+
] });
|
|
31328
31375
|
}
|
|
31329
31376
|
var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13;
|
|
31330
31377
|
function objectConverter(columns2) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparativeHeadingSubscriber.d.ts","sourceRoot":"","sources":["../src/ComparativeHeadingSubscriber.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComparativeHeadingSubscriber.d.ts","sourceRoot":"","sources":["../src/ComparativeHeadingSubscriber.js"],"names":[],"mappings":"AA+BA,sEAuDC"}
|
|
@@ -1,9 +1,45 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
3
|
import { useCoordination, } from '@vitessce/vit-s';
|
|
4
4
|
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
5
|
+
import { makeStyles } from '@material-ui/core';
|
|
6
|
+
const useStyles = makeStyles(theme => ({
|
|
7
|
+
buttonContainer: {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
right: 0,
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
height: '100%',
|
|
14
|
+
},
|
|
15
|
+
headingContainer: {
|
|
16
|
+
backgroundColor: 'transparent',
|
|
17
|
+
},
|
|
18
|
+
headingSectionContainer: {
|
|
19
|
+
width: '100%',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'row',
|
|
22
|
+
position: 'relative',
|
|
23
|
+
},
|
|
24
|
+
headingText: {
|
|
25
|
+
margin: 0,
|
|
26
|
+
color: theme.palette.primaryForeground,
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
5
29
|
export function ComparativeHeadingSubscriber(props) {
|
|
6
30
|
const { coordinationScopes, } = props;
|
|
7
|
-
const [{ sampleSetSelection, }
|
|
8
|
-
|
|
31
|
+
const [{ sampleSetSelection, featureSelection, }, { setSampleSetSelection,
|
|
32
|
+
// TODO: buttons for modification of featureSelection
|
|
33
|
+
// setFeatureSelection,
|
|
34
|
+
}] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.COMPARATIVE_HEADING], coordinationScopes);
|
|
35
|
+
const classes = useStyles();
|
|
36
|
+
const swapSampleSets = useCallback(() => {
|
|
37
|
+
if (sampleSetSelection?.length === 2) {
|
|
38
|
+
setSampleSetSelection([
|
|
39
|
+
sampleSetSelection[1],
|
|
40
|
+
sampleSetSelection[0],
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
}, [sampleSetSelection, setSampleSetSelection]);
|
|
44
|
+
return (_jsxs("div", { className: classes.headingContainer, children: [sampleSetSelection && sampleSetSelection.length === 2 ? (_jsxs("div", { className: classes.headingSectionContainer, children: [_jsx("div", { style: { width: '45%' }, children: _jsx("h2", { className: classes.headingText, children: sampleSetSelection?.[0]?.at(-1) }) }), _jsx("div", { style: { width: '5%' }, children: _jsx("h2", { className: classes.headingText, style: { textAlign: 'right' }, children: "vs.\u00A0" }) }), _jsx("div", { style: { width: '50%' }, children: _jsx("h2", { className: classes.headingText, children: sampleSetSelection?.[1]?.at(-1) }) }), _jsx("div", { className: classes.buttonContainer, children: _jsx("button", { onClick: swapSampleSets, type: "button", children: "Swap" }) })] })) : null, featureSelection && featureSelection.length > 0 ? (_jsxs("div", { className: classes.headingSectionContainer, children: [_jsx("div", { children: _jsx("h3", { className: classes.headingText, children: "Selected Biomarkers:\u00A0" }) }), featureSelection?.map((featureName, i) => (_jsx("div", { children: _jsxs("h3", { className: classes.headingText, children: [featureName, i < featureSelection.length - 1 ? (_jsx("span", { children: ",\u00A0" })) : null] }) })))] })) : null] }));
|
|
9
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/biomarker-select",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.9",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"react-window": "^1.8.10",
|
|
25
25
|
"fuse.js": "^7.0.0",
|
|
26
26
|
"d3-dsv": "^1.1.1",
|
|
27
|
-
"@vitessce/constants-internal": "3.5.
|
|
28
|
-
"@vitessce/vit-s": "3.5.
|
|
29
|
-
"@vitessce/types": "3.5.
|
|
27
|
+
"@vitessce/constants-internal": "3.5.9",
|
|
28
|
+
"@vitessce/vit-s": "3.5.9",
|
|
29
|
+
"@vitessce/types": "3.5.9"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@testing-library/jest-dom": "^5.16.4",
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
useCoordination,
|
|
4
4
|
} from '@vitessce/vit-s';
|
|
5
5
|
import { ViewType, COMPONENT_COORDINATION_TYPES } from '@vitessce/constants-internal';
|
|
6
|
+
import { makeStyles } from '@material-ui/core';
|
|
6
7
|
|
|
8
|
+
const useStyles = makeStyles(theme => ({
|
|
9
|
+
buttonContainer: {
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
right: 0,
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
height: '100%',
|
|
16
|
+
},
|
|
17
|
+
headingContainer: {
|
|
18
|
+
backgroundColor: 'transparent',
|
|
19
|
+
},
|
|
20
|
+
headingSectionContainer: {
|
|
21
|
+
width: '100%',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
position: 'relative',
|
|
25
|
+
},
|
|
26
|
+
headingText: {
|
|
27
|
+
margin: 0,
|
|
28
|
+
color: theme.palette.primaryForeground,
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
7
31
|
|
|
8
32
|
export function ComparativeHeadingSubscriber(props) {
|
|
9
33
|
const {
|
|
@@ -12,20 +36,52 @@ export function ComparativeHeadingSubscriber(props) {
|
|
|
12
36
|
|
|
13
37
|
const [{
|
|
14
38
|
sampleSetSelection,
|
|
39
|
+
featureSelection,
|
|
40
|
+
}, {
|
|
41
|
+
setSampleSetSelection,
|
|
42
|
+
// TODO: buttons for modification of featureSelection
|
|
43
|
+
// setFeatureSelection,
|
|
15
44
|
}] = useCoordination(
|
|
16
45
|
COMPONENT_COORDINATION_TYPES[ViewType.COMPARATIVE_HEADING],
|
|
17
46
|
coordinationScopes,
|
|
18
47
|
);
|
|
19
48
|
|
|
49
|
+
const classes = useStyles();
|
|
50
|
+
|
|
51
|
+
const swapSampleSets = useCallback(() => {
|
|
52
|
+
if (sampleSetSelection?.length === 2) {
|
|
53
|
+
setSampleSetSelection([
|
|
54
|
+
sampleSetSelection[1],
|
|
55
|
+
sampleSetSelection[0],
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
58
|
+
}, [sampleSetSelection, setSampleSetSelection]);
|
|
59
|
+
|
|
20
60
|
return (
|
|
21
|
-
|
|
61
|
+
<div className={classes.headingContainer}>
|
|
22
62
|
{sampleSetSelection && sampleSetSelection.length === 2 ? (
|
|
23
|
-
<div
|
|
24
|
-
<div style={{ width: '45%' }}><h2>{sampleSetSelection?.[0]?.at(-1)}</h2></div>
|
|
25
|
-
<div style={{ width: '5%' }}><h2 style={{ textAlign: 'right' }}>vs. </h2></div>
|
|
26
|
-
<div style={{ width: '50%' }}><h2>{sampleSetSelection?.[1]?.at(-1)}</h2></div>
|
|
63
|
+
<div className={classes.headingSectionContainer}>
|
|
64
|
+
<div style={{ width: '45%' }}><h2 className={classes.headingText}>{sampleSetSelection?.[0]?.at(-1)}</h2></div>
|
|
65
|
+
<div style={{ width: '5%' }}><h2 className={classes.headingText} style={{ textAlign: 'right' }}>vs. </h2></div>
|
|
66
|
+
<div style={{ width: '50%' }}><h2 className={classes.headingText}>{sampleSetSelection?.[1]?.at(-1)}</h2></div>
|
|
67
|
+
<div className={classes.buttonContainer}>
|
|
68
|
+
<button onClick={swapSampleSets} type="button">Swap</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
) : null}
|
|
72
|
+
{featureSelection && featureSelection.length > 0 ? (
|
|
73
|
+
<div className={classes.headingSectionContainer}>
|
|
74
|
+
<div><h3 className={classes.headingText}>Selected Biomarkers: </h3></div>
|
|
75
|
+
{featureSelection?.map((featureName, i) => (
|
|
76
|
+
<div>
|
|
77
|
+
<h3 className={classes.headingText}>
|
|
78
|
+
{featureName}
|
|
79
|
+
{i < featureSelection.length - 1 ? (<span>, </span>) : null}
|
|
80
|
+
</h3>
|
|
81
|
+
</div>
|
|
82
|
+
))}
|
|
27
83
|
</div>
|
|
28
84
|
) : null}
|
|
29
|
-
|
|
85
|
+
</div>
|
|
30
86
|
);
|
|
31
87
|
}
|