@teselagen/ove 0.6.1-beta.1 → 0.7.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/DigestTool/DigestTool.d.ts +2 -10
- package/Menlo.ttf +0 -0
- package/Monaco.ttf +0 -0
- package/helperComponents/PropertiesDialog/index.d.ts +2 -7
- package/helperComponents/PropertiesDialog/utils.d.ts +5 -5
- package/html2canvas.esm--JN4fLQL.mjs +7891 -0
- package/html2canvas.esm-B7d7VJmQ.js +7891 -0
- package/html2canvas.esm-GLpiTZLt.cjs +7891 -0
- package/html2canvas.esm-GLpiTZLt.js +7891 -0
- package/html2canvas.esm-nFNn58sx.js +7891 -0
- package/html2canvas.esm-nFNn58sx.mjs +7891 -0
- package/index.cjs.js +78073 -73781
- package/index.es.js +78467 -74175
- package/index.umd.js +81406 -77036
- package/package.json +7 -8
- package/src/AutoAnnotate.js +1 -0
- package/src/CircularView/Labels/index.js +1 -15
- package/src/CircularView/index.js +3 -4
- package/src/CreateAnnotationsPage.js +1 -1
- package/src/CutsiteFilter/index.js +51 -55
- package/src/DigestTool/DigestTool.js +193 -188
- package/src/GlobalDialogUtils.js +1 -0
- package/src/PCRTool/PCRTool.js +8 -2
- package/src/Reflex/reflex-styles.css +10 -10
- package/src/RowItem/CutsiteSelectionLayers.js +1 -1
- package/src/RowItem/SelectionLayer/index.js +2 -2
- package/src/RowItem/Sequence.js +0 -1
- package/src/RowItem/Translations/Translation.js +1 -0
- package/src/RowItem/index.js +0 -1
- package/src/helperComponents/AddOrEditAnnotationDialog/index.js +8 -4
- package/src/helperComponents/AddOrEditFeatureDialog/index.js +9 -7
- package/src/helperComponents/AddOrEditPartDialog/index.js +3 -3
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +3 -7
- package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +126 -135
- package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +52 -50
- package/src/helperComponents/PropertiesDialog/OrfProperties.js +1 -1
- package/src/helperComponents/PropertiesDialog/SingleEnzymeCutsiteInfo.js +59 -51
- package/src/helperComponents/PropertiesDialog/index.js +115 -114
- package/src/helperComponents/PropertiesDialog/utils.js +5 -5
- package/src/helperComponents/RemoveDuplicates/index.js +149 -165
- package/src/utils/useFormValue.js +7 -0
- package/src/withEditorInteractions/index.js +8 -7
- package/style.css +287 -263
- package/utils/useFormValue.d.ts +1 -0
package/src/PCRTool/PCRTool.js
CHANGED
|
@@ -123,7 +123,10 @@ function PCRTool(props) {
|
|
|
123
123
|
inlineLabel
|
|
124
124
|
tooltipError
|
|
125
125
|
options={forwardPrimers}
|
|
126
|
-
defaultValue={
|
|
126
|
+
defaultValue={
|
|
127
|
+
forwardPrimer ??
|
|
128
|
+
(forwardPrimers[0] ? forwardPrimers[0].value : undefined)
|
|
129
|
+
}
|
|
127
130
|
name="forwardPrimer"
|
|
128
131
|
label="Forward Primer:"
|
|
129
132
|
/>
|
|
@@ -132,7 +135,10 @@ function PCRTool(props) {
|
|
|
132
135
|
inlineLabel
|
|
133
136
|
tooltipError
|
|
134
137
|
options={reversePrimers}
|
|
135
|
-
defaultValue={
|
|
138
|
+
defaultValue={
|
|
139
|
+
reversePrimer ??
|
|
140
|
+
(reversePrimers[0] ? reversePrimers[0].value : undefined)
|
|
141
|
+
}
|
|
136
142
|
name="reversePrimer"
|
|
137
143
|
label="Reverse Primer:"
|
|
138
144
|
/>
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.reflex-layout > .reflex-splitter {
|
|
37
|
-
background-color: #
|
|
37
|
+
background-color: #f1f1f1;
|
|
38
38
|
z-index: 100;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.reflex-layout > .reflex-splitter.active,
|
|
42
42
|
.reflex-layout > .reflex-splitter:hover {
|
|
43
|
-
background-color: #
|
|
43
|
+
background-color: #cccccc;
|
|
44
44
|
transition: all 1s ease;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.reflex-layout.horizontal > .reflex-splitter {
|
|
48
|
-
border-bottom: 1px solid #
|
|
49
|
-
border-top: 1px solid #
|
|
48
|
+
border-bottom: 1px solid #f1f1f1;
|
|
49
|
+
border-top: 1px solid #f1f1f1;
|
|
50
50
|
cursor: row-resize;
|
|
51
51
|
width: 100%;
|
|
52
52
|
height: 2px;
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
|
|
55
55
|
.reflex-layout.horizontal > .reflex-splitter:hover,
|
|
56
56
|
.reflex-layout.horizontal > .reflex-splitter.active {
|
|
57
|
-
border-bottom: 1px solid #
|
|
58
|
-
border-top: 1px solid #
|
|
57
|
+
border-bottom: 1px solid #cccccc;
|
|
58
|
+
border-top: 1px solid #cccccc;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.reflex-layout.vertical > .reflex-splitter {
|
|
62
|
-
border-right: 1px solid #
|
|
63
|
-
border-left: 1px solid #
|
|
62
|
+
border-right: 1px solid #f1f1f1;
|
|
63
|
+
border-left: 1px solid #f1f1f1;
|
|
64
64
|
cursor: col-resize;
|
|
65
65
|
height: 95%;
|
|
66
66
|
width: 2px;
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
|
|
74
74
|
.reflex-layout.vertical > .reflex-splitter:hover,
|
|
75
75
|
.reflex-layout.vertical > .reflex-splitter.active {
|
|
76
|
-
border-right: 1px solid #
|
|
77
|
-
border-left: 1px solid #
|
|
76
|
+
border-right: 1px solid #cccccc;
|
|
77
|
+
border-left: 1px solid #cccccc;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.reflex-layout > .reflex-splitter.reflex-thin {
|
|
@@ -26,10 +26,10 @@ export const CutsiteSelectionLayers = connectToEditor(
|
|
|
26
26
|
layer.start > -1 && (
|
|
27
27
|
<SelectionLayer
|
|
28
28
|
hideTitle
|
|
29
|
+
key={"restrictionSiteRange" + index}
|
|
29
30
|
{...annotationCommonProps}
|
|
30
31
|
{...{
|
|
31
32
|
id: cutsite.id,
|
|
32
|
-
key: "restrictionSiteRange" + index,
|
|
33
33
|
height: showReverseSequence ? sequenceHeight * 2 : sequenceHeight,
|
|
34
34
|
regions: [layer],
|
|
35
35
|
row: alignmentData
|
|
@@ -105,6 +105,7 @@ function SelectionLayer(props) {
|
|
|
105
105
|
caretSvgs = [
|
|
106
106
|
overlap.start === start && (
|
|
107
107
|
<Caret
|
|
108
|
+
key={key + "caret1"}
|
|
108
109
|
{...{
|
|
109
110
|
leftMargin,
|
|
110
111
|
onClick: _onClick || preventDefaultStopPropagation,
|
|
@@ -115,7 +116,6 @@ function SelectionLayer(props) {
|
|
|
115
116
|
getGaps,
|
|
116
117
|
isDraggable,
|
|
117
118
|
ignoreGaps,
|
|
118
|
-
key: key + "caret1",
|
|
119
119
|
sequenceLength,
|
|
120
120
|
className:
|
|
121
121
|
classNameToPass +
|
|
@@ -127,6 +127,7 @@ function SelectionLayer(props) {
|
|
|
127
127
|
),
|
|
128
128
|
overlap.end === end && (
|
|
129
129
|
<Caret
|
|
130
|
+
key={key + "caret2"}
|
|
130
131
|
{...{
|
|
131
132
|
leftMargin,
|
|
132
133
|
onClick: _onClick || preventDefaultStopPropagation,
|
|
@@ -137,7 +138,6 @@ function SelectionLayer(props) {
|
|
|
137
138
|
getGaps,
|
|
138
139
|
style: selectionLayer.style,
|
|
139
140
|
ignoreGaps,
|
|
140
|
-
key: key + "caret2",
|
|
141
141
|
sequenceLength,
|
|
142
142
|
className:
|
|
143
143
|
classNameToPass +
|
package/src/RowItem/Sequence.js
CHANGED
package/src/RowItem/index.js
CHANGED
|
@@ -190,7 +190,7 @@ class AddOrEditAnnotationDialog extends React.Component {
|
|
|
190
190
|
sequenceData = { sequence: "" },
|
|
191
191
|
handleSubmit,
|
|
192
192
|
beforeAnnotationCreate,
|
|
193
|
-
|
|
193
|
+
RenderTypes,
|
|
194
194
|
renderTags,
|
|
195
195
|
RenderBases,
|
|
196
196
|
allowMultipleFeatureDirections,
|
|
@@ -210,6 +210,7 @@ class AddOrEditAnnotationDialog extends React.Component {
|
|
|
210
210
|
overlapsSelf,
|
|
211
211
|
start,
|
|
212
212
|
end,
|
|
213
|
+
type,
|
|
213
214
|
readOnly,
|
|
214
215
|
getAdditionalEditAnnotationComps,
|
|
215
216
|
advancedOptions,
|
|
@@ -370,7 +371,9 @@ class AddOrEditAnnotationDialog extends React.Component {
|
|
|
370
371
|
/>
|
|
371
372
|
))}
|
|
372
373
|
|
|
373
|
-
{
|
|
374
|
+
{RenderTypes && (
|
|
375
|
+
<RenderTypes readOnly={this.props.readOnly} type={type}></RenderTypes>
|
|
376
|
+
)}
|
|
374
377
|
{renderTags || null}
|
|
375
378
|
|
|
376
379
|
{/* {allowPrimerBasesToBeEdited && RenderBases ? null : !renderLocations || */}
|
|
@@ -387,7 +390,7 @@ class AddOrEditAnnotationDialog extends React.Component {
|
|
|
387
390
|
format={this.formatStart}
|
|
388
391
|
parse={this.parseStart}
|
|
389
392
|
tooltipError
|
|
390
|
-
defaultValue={1}
|
|
393
|
+
defaultValue={start ?? 1}
|
|
391
394
|
min={1}
|
|
392
395
|
max={sequenceLength || 1}
|
|
393
396
|
name="start"
|
|
@@ -401,7 +404,7 @@ class AddOrEditAnnotationDialog extends React.Component {
|
|
|
401
404
|
parse={this.parseEnd}
|
|
402
405
|
inlineLabel
|
|
403
406
|
tooltipError
|
|
404
|
-
defaultValue={sequenceData.isProtein ? 3 : 1}
|
|
407
|
+
defaultValue={end ?? (sequenceData.isProtein ? 3 : 1)}
|
|
405
408
|
min={1}
|
|
406
409
|
max={sequenceLength || 1}
|
|
407
410
|
name="end"
|
|
@@ -569,6 +572,7 @@ export default ({ formName, getProps, dialogProps }) => {
|
|
|
569
572
|
tgFormValues(
|
|
570
573
|
"start",
|
|
571
574
|
"end",
|
|
575
|
+
"type",
|
|
572
576
|
"overlapsSelf",
|
|
573
577
|
"locations",
|
|
574
578
|
"bases",
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
import AddOrEditAnnotationDialog from "../AddOrEditAnnotationDialog";
|
|
8
8
|
import { ReactSelectField } from "@teselagen/ui";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const RenderTypes = ({ readOnly, type }) => (
|
|
11
11
|
<ReactSelectField
|
|
12
12
|
inlineLabel
|
|
13
13
|
tooltipError
|
|
14
14
|
disabled={readOnly}
|
|
15
|
-
defaultValue="misc_feature"
|
|
16
|
-
options={getFeatureTypes().map(
|
|
15
|
+
defaultValue={type ?? "misc_feature"}
|
|
16
|
+
options={getFeatureTypes().map(featureType => {
|
|
17
17
|
return {
|
|
18
18
|
label: (
|
|
19
19
|
<div
|
|
@@ -25,16 +25,18 @@ const renderTypes = ({ readOnly }) => (
|
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
27
|
style={{
|
|
28
|
-
background: getFeatureToColorMap({ includeHidden: true })[
|
|
28
|
+
background: getFeatureToColorMap({ includeHidden: true })[
|
|
29
|
+
featureType
|
|
30
|
+
],
|
|
29
31
|
height: 15,
|
|
30
32
|
width: 15,
|
|
31
33
|
marginRight: 5
|
|
32
34
|
}}
|
|
33
35
|
/>
|
|
34
|
-
{
|
|
36
|
+
{featureType}
|
|
35
37
|
</div>
|
|
36
38
|
),
|
|
37
|
-
value:
|
|
39
|
+
value: featureType
|
|
38
40
|
};
|
|
39
41
|
})}
|
|
40
42
|
name="type"
|
|
@@ -52,7 +54,7 @@ export default AddOrEditAnnotationDialog({
|
|
|
52
54
|
upsertAnnotation: props.upsertFeature,
|
|
53
55
|
// renderLocations: true, //tnw enable this eventually for proteins
|
|
54
56
|
renderLocations: !props.sequenceData.isProtein,
|
|
55
|
-
|
|
57
|
+
RenderTypes,
|
|
56
58
|
annotationTypePlural: "features"
|
|
57
59
|
})
|
|
58
60
|
});
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
import { getFeatureTypes } from "@teselagen/sequence-utils";
|
|
10
10
|
import { get } from "lodash-es";
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const RenderTypes = ({ readOnly, type }) => (
|
|
13
13
|
<ReactSelectField
|
|
14
14
|
inlineLabel
|
|
15
15
|
tooltipError
|
|
16
16
|
disabled={readOnly}
|
|
17
|
-
defaultValue="misc_feature"
|
|
17
|
+
defaultValue={type ?? "misc_feature"}
|
|
18
18
|
options={getFeatureTypes().map(type => {
|
|
19
19
|
return {
|
|
20
20
|
label: type,
|
|
@@ -88,7 +88,7 @@ export default AddOrEditAnnotationDialog({
|
|
|
88
88
|
advancedOptions: props.allowPartsToOverlapSelf
|
|
89
89
|
? renderAdvancedOptions({ readOnly: props.readOnly })
|
|
90
90
|
: undefined,
|
|
91
|
-
|
|
91
|
+
RenderTypes,
|
|
92
92
|
renderTags:
|
|
93
93
|
props.allPartTags &&
|
|
94
94
|
getRenderTags({
|
|
@@ -33,9 +33,9 @@ const CustomContentEditable = generateField(function CustomContentEditable({
|
|
|
33
33
|
start,
|
|
34
34
|
end,
|
|
35
35
|
primerBindsOn,
|
|
36
|
-
bases,
|
|
37
36
|
forward
|
|
38
37
|
}) {
|
|
38
|
+
const bases = input.value;
|
|
39
39
|
const [hasTempError, setTempError] = useState(false);
|
|
40
40
|
const inputRef = useRef(null);
|
|
41
41
|
const [caretPosition, setCaretPosition] = useState({ start: 0, end: 0 });
|
|
@@ -194,7 +194,7 @@ const RenderBases = props => {
|
|
|
194
194
|
label="Linked Oligo?"
|
|
195
195
|
tooltipInfo={`Check this box to link this primer to an oligo in your Oligo Library. If the primer bases match exactly the bases of an existing oligo, it will be linked to that existing oligo. If the bases don't match, a new oligo will be created in the library.`}
|
|
196
196
|
noMarginBottom
|
|
197
|
-
defaultValue={true}
|
|
197
|
+
defaultValue={useLinkedOligo ?? true}
|
|
198
198
|
disabled={readOnly}
|
|
199
199
|
></CheckboxField>
|
|
200
200
|
{useLinkedOligo && (
|
|
@@ -221,11 +221,7 @@ const RenderBases = props => {
|
|
|
221
221
|
sequenceLength={sequenceLength}
|
|
222
222
|
disabled={readOnly}
|
|
223
223
|
{...props}
|
|
224
|
-
{
|
|
225
|
-
? {
|
|
226
|
-
defaultValue
|
|
227
|
-
}
|
|
228
|
-
: {})}
|
|
224
|
+
defaultValue={bases ?? defaultValue}
|
|
229
225
|
name="bases"
|
|
230
226
|
label={
|
|
231
227
|
<div className="tg-bases-label">
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
withSelectedEntities,
|
|
5
|
-
createCommandMenu
|
|
6
|
-
} from "@teselagen/ui";
|
|
7
|
-
import { map, get } from "lodash-es";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
|
+
import { DataTable, createCommandMenu } from "@teselagen/ui";
|
|
3
|
+
import { get } from "lodash-es";
|
|
8
4
|
import CutsiteFilter from "../../CutsiteFilter";
|
|
9
5
|
import { Button, ButtonGroup } from "@blueprintjs/core";
|
|
10
6
|
import { connectToEditor } from "../../withEditorProps";
|
|
11
7
|
import { compose } from "recompose";
|
|
12
8
|
import selectors from "../../selectors";
|
|
13
|
-
import
|
|
9
|
+
import _commands from "../../commands";
|
|
14
10
|
import { userDefinedHandlersAndOpts } from "../../Editor/userDefinedHandlersAndOpts";
|
|
15
11
|
import { pick } from "lodash-es";
|
|
16
12
|
import SingleEnzymeCutsiteInfo from "./SingleEnzymeCutsiteInfo";
|
|
@@ -18,105 +14,107 @@ import { withRestrictionEnzymes } from "../../CutsiteFilter/withRestrictionEnzym
|
|
|
18
14
|
import { cutsitesSubmenu } from "../../MenuBar/viewSubmenu";
|
|
19
15
|
import { getVisFilter } from "./GenericAnnotationProperties";
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
const schema = {
|
|
18
|
+
fields: [
|
|
19
|
+
{ path: "name", type: "string" },
|
|
20
|
+
{ path: "numberOfCuts", type: "number" },
|
|
21
|
+
{ path: "groups", type: "string" }
|
|
22
|
+
]
|
|
23
|
+
};
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<SingleEnzymeCutsiteInfo
|
|
30
|
-
{...{
|
|
31
|
-
allRestrictionEnzymes: this.props.allRestrictionEnzymes,
|
|
32
|
-
allCutsites: this.props.allCutsites,
|
|
33
|
-
filteredCutsites: this.props.filteredCutsites,
|
|
34
|
-
editorName: this.props.editorName,
|
|
35
|
-
dispatch: this.props.dispatch,
|
|
36
|
-
selectedAnnotationId: this.props.selectedAnnotationId,
|
|
37
|
-
cutsiteGroup: row.original.cutsiteGroup,
|
|
38
|
-
enzyme: row.original.enzyme
|
|
39
|
-
}}
|
|
40
|
-
></SingleEnzymeCutsiteInfo>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
25
|
+
const defaultValues = { order: ["numberOfCuts"] };
|
|
43
26
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
27
|
+
const CutsiteProperties = props => {
|
|
28
|
+
const commands = _commands({ props });
|
|
29
|
+
const {
|
|
30
|
+
allRestrictionEnzymes,
|
|
31
|
+
allCutsites,
|
|
32
|
+
annotationVisibilityShow,
|
|
33
|
+
createNewDigest,
|
|
34
|
+
dispatch,
|
|
35
|
+
editorName,
|
|
36
|
+
filteredCutsites,
|
|
37
|
+
selectedAnnotationId
|
|
38
|
+
} = props;
|
|
51
39
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
const SubComponent = useCallback(
|
|
41
|
+
row => (
|
|
42
|
+
<SingleEnzymeCutsiteInfo
|
|
43
|
+
allRestrictionEnzymes={allRestrictionEnzymes}
|
|
44
|
+
allCutsites={allCutsites}
|
|
45
|
+
filteredCutsites={filteredCutsites}
|
|
46
|
+
editorName={editorName}
|
|
47
|
+
dispatch={dispatch}
|
|
48
|
+
selectedAnnotationId={selectedAnnotationId}
|
|
49
|
+
cutsiteGroup={row.original.cutsiteGroup}
|
|
50
|
+
enzyme={row.original.enzyme}
|
|
51
|
+
/>
|
|
52
|
+
),
|
|
53
|
+
[
|
|
54
|
+
allCutsites,
|
|
55
|
+
allRestrictionEnzymes,
|
|
56
|
+
dispatch,
|
|
57
57
|
editorName,
|
|
58
|
-
|
|
59
|
-
filteredCutsites: allCutsites,
|
|
58
|
+
filteredCutsites,
|
|
60
59
|
selectedAnnotationId
|
|
61
|
-
|
|
60
|
+
]
|
|
61
|
+
);
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let groups = "";
|
|
67
|
-
const exisitingEnzymeGroups = window.getExistingEnzymeGroups();
|
|
63
|
+
const onChangeHook = useCallback(() => {
|
|
64
|
+
annotationVisibilityShow("cutsites");
|
|
65
|
+
}, [annotationVisibilityShow]);
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
if (exisitingEnzymeGroups[key].includes(name)) groups += key;
|
|
71
|
-
groups += " ";
|
|
72
|
-
});
|
|
67
|
+
const { cutsitesByName, cutsitesById } = filteredCutsites;
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
name
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
69
|
+
const cutsitesToUse = useMemo(
|
|
70
|
+
() =>
|
|
71
|
+
Object.values(cutsitesByName || {}).map(cutsiteGroup => {
|
|
72
|
+
const name = cutsiteGroup[0].restrictionEnzyme.name;
|
|
73
|
+
let groups = "";
|
|
74
|
+
const exisitingEnzymeGroups = window.getExistingEnzymeGroups();
|
|
75
|
+
|
|
76
|
+
Object.keys(exisitingEnzymeGroups).forEach(key => {
|
|
77
|
+
if (exisitingEnzymeGroups[key].includes(name)) groups += key;
|
|
78
|
+
groups += " ";
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
cutsiteGroup,
|
|
83
|
+
id: name,
|
|
84
|
+
name,
|
|
85
|
+
numberOfCuts: cutsiteGroup.length,
|
|
86
|
+
enzyme: cutsiteGroup[0].restrictionEnzyme,
|
|
87
|
+
groups
|
|
88
|
+
};
|
|
89
|
+
}),
|
|
90
|
+
[cutsitesByName]
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const selectedIds = useMemo(
|
|
94
|
+
() => get(cutsitesById[selectedAnnotationId], "restrictionEnzyme.name"),
|
|
95
|
+
[cutsitesById, selectedAnnotationId]
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<>
|
|
100
|
+
<div
|
|
101
|
+
style={{
|
|
102
|
+
marginBottom: 10,
|
|
103
|
+
paddingTop: 3,
|
|
104
|
+
display: "flex",
|
|
105
|
+
// flexWrap: 'wrap',
|
|
106
|
+
width: "100%",
|
|
107
|
+
// justifyContent: "space-between",
|
|
108
|
+
alignItems: "center"
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
{getVisFilter(
|
|
112
|
+
createCommandMenu(cutsitesSubmenu, commands, {
|
|
113
|
+
useTicks: true
|
|
114
|
+
})
|
|
115
|
+
)}
|
|
116
|
+
<ButtonGroup>
|
|
98
117
|
<Button
|
|
99
|
-
style={{ marginLeft: 10, cursor: "auto" }}
|
|
100
|
-
disabled
|
|
101
|
-
minimal
|
|
102
|
-
icon="filter"
|
|
103
|
-
/> */}
|
|
104
|
-
{getVisFilter(
|
|
105
|
-
createCommandMenu(cutsitesSubmenu, this.commands, {
|
|
106
|
-
useTicks: true
|
|
107
|
-
})
|
|
108
|
-
)}
|
|
109
|
-
<ButtonGroup>
|
|
110
|
-
<Button
|
|
111
|
-
intent="success"
|
|
112
|
-
data-tip="Virtual Digest"
|
|
113
|
-
icon="cut"
|
|
114
|
-
style={{ marginLeft: 15, flexGrow: -1 }}
|
|
115
|
-
onClick={() => {
|
|
116
|
-
createNewDigest();
|
|
117
|
-
}}
|
|
118
|
-
></Button>
|
|
119
|
-
{/* <Button
|
|
120
118
|
intent="success"
|
|
121
119
|
data-tip="Virtual Digest"
|
|
122
120
|
icon="cut"
|
|
@@ -124,43 +122,37 @@ class CutsiteProperties extends React.Component {
|
|
|
124
122
|
onClick={() => {
|
|
125
123
|
createNewDigest();
|
|
126
124
|
}}
|
|
127
|
-
>
|
|
128
|
-
</Button> */}
|
|
129
|
-
</ButtonGroup>
|
|
130
|
-
|
|
131
|
-
<CutsiteFilter
|
|
132
|
-
{...pick(this.props, userDefinedHandlersAndOpts)}
|
|
133
|
-
style={{ marginLeft: "auto", marginRight: 3 }}
|
|
134
|
-
editorName={editorName}
|
|
135
|
-
manageEnzymesToLeft
|
|
136
|
-
onChangeHook={this.onChangeHook}
|
|
137
125
|
/>
|
|
138
|
-
</
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
noSelect
|
|
146
|
-
noHeader
|
|
147
|
-
noFooter
|
|
148
|
-
withExpandAndCollapseAllButton
|
|
149
|
-
noFullscreenButton
|
|
150
|
-
noPadding
|
|
151
|
-
defaults={{ order: ["numberOfCuts"] }}
|
|
152
|
-
formName="cutsiteProperties"
|
|
153
|
-
noRouter
|
|
154
|
-
withSearch={false}
|
|
155
|
-
SubComponent={this.SubComponent}
|
|
156
|
-
isInfinite
|
|
157
|
-
schema={this.schema}
|
|
158
|
-
entities={cutsitesToUse}
|
|
126
|
+
</ButtonGroup>
|
|
127
|
+
<CutsiteFilter
|
|
128
|
+
{...pick(props, userDefinedHandlersAndOpts)}
|
|
129
|
+
style={{ marginLeft: "auto", marginRight: 3 }}
|
|
130
|
+
editorName={editorName}
|
|
131
|
+
manageEnzymesToLeft
|
|
132
|
+
onChangeHook={onChangeHook}
|
|
159
133
|
/>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
134
|
+
</div>
|
|
135
|
+
<DataTable
|
|
136
|
+
selectedIds={selectedIds}
|
|
137
|
+
compact
|
|
138
|
+
noSelect
|
|
139
|
+
noHeader
|
|
140
|
+
noFooter
|
|
141
|
+
withExpandAndCollapseAllButton
|
|
142
|
+
noFullscreenButton
|
|
143
|
+
noPadding
|
|
144
|
+
defaults={defaultValues}
|
|
145
|
+
formName="cutsiteProperties"
|
|
146
|
+
noRouter
|
|
147
|
+
withSearch={false}
|
|
148
|
+
SubComponent={SubComponent}
|
|
149
|
+
isInfinite
|
|
150
|
+
schema={schema}
|
|
151
|
+
entities={cutsitesToUse}
|
|
152
|
+
/>
|
|
153
|
+
</>
|
|
154
|
+
);
|
|
155
|
+
};
|
|
164
156
|
|
|
165
157
|
export default compose(
|
|
166
158
|
connectToEditor((editorState, ownProps) => {
|
|
@@ -180,6 +172,5 @@ export default compose(
|
|
|
180
172
|
cutsites: cutsites.cutsitesArray
|
|
181
173
|
};
|
|
182
174
|
}),
|
|
183
|
-
withRestrictionEnzymes
|
|
184
|
-
withSelectedEntities("cutsiteProperties")
|
|
175
|
+
withRestrictionEnzymes
|
|
185
176
|
)(CutsiteProperties);
|