@teselagen/ove 0.8.22 → 0.8.25
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/index.cjs.js +295 -232
- package/index.es.js +295 -232
- package/package.json +8 -8
- package/selectors/orfsSelector.d.ts +1 -1
- package/src/LinearView/index.js +27 -25
- package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +224 -210
- package/src/selectors/orfsSelector.js +1 -0
- package/src/selectors/searchLayersSelector.js +21 -18
- package/index.umd.js +0 -183000
- package/src/utils/pureNoFunc.js +0 -18
- package/utils/pureNoFunc.d.ts +0 -2
package/index.es.js
CHANGED
|
@@ -17242,23 +17242,6 @@ const useTableEntities = /* @__PURE__ */ __name((tableFormName) => {
|
|
|
17242
17242
|
const { allOrderedEntities, selectedEntities } = useSelector(entitySelector);
|
|
17243
17243
|
return { selectTableEntities, allOrderedEntities, selectedEntities };
|
|
17244
17244
|
}, "useTableEntities");
|
|
17245
|
-
const isEqualIgnoreFunctions = /* @__PURE__ */ __name((o1, o2) => {
|
|
17246
|
-
const isEq = isEqualWith(o1, o2, function(val1, val2) {
|
|
17247
|
-
if (isFunction$2(val1) && isFunction$2(val2)) {
|
|
17248
|
-
return val1 === val2 || val1.toString() === val2.toString();
|
|
17249
|
-
}
|
|
17250
|
-
if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
|
|
17251
|
-
return true;
|
|
17252
|
-
});
|
|
17253
|
-
return isEq;
|
|
17254
|
-
}, "isEqualIgnoreFunctions");
|
|
17255
|
-
const useDeepEqualMemo = /* @__PURE__ */ __name((value) => {
|
|
17256
|
-
const ref2 = useRef();
|
|
17257
|
-
if (!isEqualIgnoreFunctions(value, ref2.current)) {
|
|
17258
|
-
ref2.current = value;
|
|
17259
|
-
}
|
|
17260
|
-
return ref2.current;
|
|
17261
|
-
}, "useDeepEqualMemo");
|
|
17262
17245
|
function rowClick(e, rowInfo, entities, {
|
|
17263
17246
|
reduxFormSelectedEntityIdMap,
|
|
17264
17247
|
isSingleSelect,
|
|
@@ -56552,6 +56535,33 @@ if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === "object") {
|
|
|
56552
56535
|
$mobx
|
|
56553
56536
|
});
|
|
56554
56537
|
}
|
|
56538
|
+
const isEqualIgnoreFunctions = /* @__PURE__ */ __name((o1, o2) => {
|
|
56539
|
+
const isEq = isEqualWith(o1, o2, function(val1, val2) {
|
|
56540
|
+
if (isFunction$2(val1) && isFunction$2(val2)) {
|
|
56541
|
+
return val1 === val2 || val1.toString() === val2.toString();
|
|
56542
|
+
}
|
|
56543
|
+
if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
|
|
56544
|
+
return true;
|
|
56545
|
+
});
|
|
56546
|
+
return isEq;
|
|
56547
|
+
}, "isEqualIgnoreFunctions");
|
|
56548
|
+
const useDeepEqualMemoIgnoreFns = /* @__PURE__ */ __name((value) => {
|
|
56549
|
+
const ref2 = useRef();
|
|
56550
|
+
if (!isEqualIgnoreFunctions(value, ref2.current)) {
|
|
56551
|
+
ref2.current = value;
|
|
56552
|
+
}
|
|
56553
|
+
return ref2.current;
|
|
56554
|
+
}, "useDeepEqualMemoIgnoreFns");
|
|
56555
|
+
const useDeepEqualMemo = /* @__PURE__ */ __name((value) => {
|
|
56556
|
+
const ref2 = useRef();
|
|
56557
|
+
if (!isEqual$3(value, ref2.current)) {
|
|
56558
|
+
ref2.current = value;
|
|
56559
|
+
}
|
|
56560
|
+
return ref2.current;
|
|
56561
|
+
}, "useDeepEqualMemo");
|
|
56562
|
+
const useMemoDeepEqual = /* @__PURE__ */ __name((value, depsArray) => {
|
|
56563
|
+
return useMemo$1(value, useDeepEqualMemo(depsArray));
|
|
56564
|
+
}, "useMemoDeepEqual");
|
|
56555
56565
|
T();
|
|
56556
56566
|
const IS_LINUX = window.navigator.platform.toLowerCase().search("linux") > -1;
|
|
56557
56567
|
const itemSizeEstimators = {
|
|
@@ -56638,9 +56648,11 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56638
56648
|
"reduxFormSelectedEntityIdMap"
|
|
56639
56649
|
);
|
|
56640
56650
|
}, "dtFormParamsSelector"));
|
|
56641
|
-
const reduxFormCellValidation =
|
|
56642
|
-
|
|
56643
|
-
|
|
56651
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
56652
|
+
_reduxFormCellValidation
|
|
56653
|
+
);
|
|
56654
|
+
const reduxFormQueryParams = useDeepEqualMemoIgnoreFns(_reduxFormQueryParams);
|
|
56655
|
+
const reduxFormSelectedEntityIdMap = useDeepEqualMemoIgnoreFns(
|
|
56644
56656
|
_reduxFormSelectedEntityIdMap
|
|
56645
56657
|
);
|
|
56646
56658
|
let props = ownProps;
|
|
@@ -56715,7 +56727,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56715
56727
|
const tmp = (urlConnected ? getCurrentParamsFromUrl(history.location) : reduxFormQueryParams) || {};
|
|
56716
56728
|
return tmp;
|
|
56717
56729
|
}, [history, reduxFormQueryParams, urlConnected]);
|
|
56718
|
-
const currentParams =
|
|
56730
|
+
const currentParams = useDeepEqualMemoIgnoreFns(_currentParams);
|
|
56719
56731
|
const tableParams = useMemo$1(() => {
|
|
56720
56732
|
if (!isTableParamsConnected) {
|
|
56721
56733
|
const setNewParams2 = /* @__PURE__ */ __name((newParams) => {
|
|
@@ -56896,8 +56908,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56896
56908
|
() => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
|
|
56897
56909
|
[_origEntities, reduxFormEntities]
|
|
56898
56910
|
);
|
|
56899
|
-
const entities =
|
|
56900
|
-
const entitiesAcrossPages =
|
|
56911
|
+
const entities = useDeepEqualMemoIgnoreFns(_entities);
|
|
56912
|
+
const entitiesAcrossPages = useDeepEqualMemoIgnoreFns(_entitiesAcrossPages);
|
|
56901
56913
|
useEffect(() => {
|
|
56902
56914
|
change$1("allOrderedEntities", entitiesAcrossPages);
|
|
56903
56915
|
if (entities.length === 0 || isEmpty$1(reduxFormSelectedEntityIdMap)) return;
|
|
@@ -61461,7 +61473,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
61461
61473
|
return (_b2 = (_a3 = state2.form) == null ? void 0 : _a3[dataTableForm]) == null ? void 0 : _b2.values.reduxFormEntities;
|
|
61462
61474
|
}
|
|
61463
61475
|
);
|
|
61464
|
-
const reduxFormEntities =
|
|
61476
|
+
const reduxFormEntities = useDeepEqualMemoIgnoreFns(_reduxFormEntities);
|
|
61465
61477
|
useEffect(() => {
|
|
61466
61478
|
return () => dispatch(destroy$1(dataTableForm));
|
|
61467
61479
|
}, [dataTableForm, dispatch]);
|
|
@@ -61471,7 +61483,9 @@ const SimpleInsertDataDialog = compose(
|
|
|
61471
61483
|
return (_b2 = (_a3 = state2.form) == null ? void 0 : _a3[dataTableForm]) == null ? void 0 : _b2.values.reduxFormCellValidation;
|
|
61472
61484
|
}, "_reduxFormCellValidationSelector")
|
|
61473
61485
|
);
|
|
61474
|
-
const reduxFormCellValidation =
|
|
61486
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
61487
|
+
_reduxFormCellValidation
|
|
61488
|
+
);
|
|
61475
61489
|
const { entsToUse, validationToUse } = useMemo$1(
|
|
61476
61490
|
() => removeCleanRows(reduxFormEntities, reduxFormCellValidation),
|
|
61477
61491
|
[reduxFormEntities, reduxFormCellValidation]
|
|
@@ -61556,8 +61570,10 @@ const UploadCsvWizardDialogInner = reduxForm()(({
|
|
|
61556
61570
|
"reduxFormCellValidation"
|
|
61557
61571
|
);
|
|
61558
61572
|
}, "dtFormNameSelector"));
|
|
61559
|
-
const reduxFormEntities =
|
|
61560
|
-
const reduxFormCellValidation =
|
|
61573
|
+
const reduxFormEntities = useDeepEqualMemoIgnoreFns(_reduxFormEntities);
|
|
61574
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
61575
|
+
_reduxFormCellValidation
|
|
61576
|
+
);
|
|
61561
61577
|
let inner2;
|
|
61562
61578
|
if (hasSubmitted) {
|
|
61563
61579
|
inner2 = /* @__PURE__ */ React__default.createElement(
|
|
@@ -61859,8 +61875,10 @@ const UploadCsvWizardDialog = compose(
|
|
|
61859
61875
|
};
|
|
61860
61876
|
}
|
|
61861
61877
|
});
|
|
61862
|
-
const reduxFormEntitiesArray =
|
|
61863
|
-
|
|
61878
|
+
const reduxFormEntitiesArray = useDeepEqualMemoIgnoreFns(
|
|
61879
|
+
_reduxFormEntitiesArray
|
|
61880
|
+
);
|
|
61881
|
+
const finishedFiles = useDeepEqualMemoIgnoreFns(_finishedFiles);
|
|
61864
61882
|
const [hasSubmittedOuter, setSubmittedOuter] = useState();
|
|
61865
61883
|
const [steps, setSteps] = useState(getInitialSteps(true));
|
|
61866
61884
|
const [focusedTab, setFocusedTab] = useState(0);
|
|
@@ -70365,12 +70383,21 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React_
|
|
|
70365
70383
|
}, RndProps),
|
|
70366
70384
|
/* @__PURE__ */ React__default.createElement(
|
|
70367
70385
|
Dialog,
|
|
70368
|
-
__spreadValues({
|
|
70386
|
+
__spreadProps(__spreadValues({
|
|
70369
70387
|
enforceFocus: false,
|
|
70370
70388
|
hasBackdrop: false,
|
|
70371
70389
|
usePortal: false,
|
|
70372
70390
|
canEscapeKeyClose: true
|
|
70373
|
-
}, rest)
|
|
70391
|
+
}, rest), {
|
|
70392
|
+
title: /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8 } }, /* @__PURE__ */ React__default.createElement(
|
|
70393
|
+
Icon,
|
|
70394
|
+
{
|
|
70395
|
+
size: "14",
|
|
70396
|
+
"data-tip": "I'm a resizable draggable dialog!",
|
|
70397
|
+
icon: "move"
|
|
70398
|
+
}
|
|
70399
|
+
), rest.title)
|
|
70400
|
+
})
|
|
70374
70401
|
)
|
|
70375
70402
|
)
|
|
70376
70403
|
);
|
|
@@ -73644,7 +73671,7 @@ const genbankFeatureTypes = [
|
|
|
73644
73671
|
{ name: "regulatory", color: "#3F6C51" },
|
|
73645
73672
|
{ name: "SecStr", color: "#7B4B94" },
|
|
73646
73673
|
{ name: "Site", color: "#7D82B8" },
|
|
73647
|
-
{ name: "telomere", color: "DE9151" },
|
|
73674
|
+
{ name: "telomere", color: "#DE9151" },
|
|
73648
73675
|
{ name: "tmRNA", color: "#B7E3CC" },
|
|
73649
73676
|
{ name: "unsure", color: "#C4FFB2" },
|
|
73650
73677
|
{ name: "V_segment", color: "#D6F7A3" },
|
|
@@ -83783,7 +83810,10 @@ function getOrfsFromSequence(options) {
|
|
|
83783
83810
|
return nonDuplicatedOrfRanges;
|
|
83784
83811
|
}
|
|
83785
83812
|
__name(getOrfsFromSequence, "getOrfsFromSequence");
|
|
83786
|
-
function findOrfsInPlasmid(sequence2, circular2, minimumOrfSize2, useAdditionalOrfStartCodons2) {
|
|
83813
|
+
function findOrfsInPlasmid(sequence2, circular2, minimumOrfSize2, useAdditionalOrfStartCodons2, isProteinOrOligo) {
|
|
83814
|
+
if (isProteinOrOligo) {
|
|
83815
|
+
return [];
|
|
83816
|
+
}
|
|
83787
83817
|
const forwardOrfs = getOrfsFromSequence({
|
|
83788
83818
|
sequence: sequence2,
|
|
83789
83819
|
minimumOrfSize: minimumOrfSize2,
|
|
@@ -84011,6 +84041,15 @@ function getAnnotationsBetweenRange(annotationsToBeAdjusted, range2, maxLength,
|
|
|
84011
84041
|
}
|
|
84012
84042
|
const overlaps = getZeroedRangeOverlaps(annotation, range2, maxLength).map(
|
|
84013
84043
|
(overlap) => {
|
|
84044
|
+
const allLocations = annotation.locations;
|
|
84045
|
+
if (allLocations && allLocations.length) {
|
|
84046
|
+
const newLocations = allLocations.filter((loc) => {
|
|
84047
|
+
return isRangeWithinRange(loc, overlap, maxLength);
|
|
84048
|
+
});
|
|
84049
|
+
return assignIn({}, annotation, overlap, {
|
|
84050
|
+
locations: newLocations
|
|
84051
|
+
});
|
|
84052
|
+
}
|
|
84014
84053
|
return assignIn({}, annotation, overlap);
|
|
84015
84054
|
}
|
|
84016
84055
|
);
|
|
@@ -98068,6 +98107,10 @@ const orfsSelector = createSelector(
|
|
|
98068
98107
|
circularSelector,
|
|
98069
98108
|
minimumOrfSizeSelector,
|
|
98070
98109
|
(state2) => state2.useAdditionalOrfStartCodons,
|
|
98110
|
+
(state2) => {
|
|
98111
|
+
var _a2, _b2;
|
|
98112
|
+
return ((_a2 = state2.sequenceData) == null ? void 0 : _a2.isProtein) || ((_b2 = state2.sequenceData) == null ? void 0 : _b2.isOligo);
|
|
98113
|
+
},
|
|
98071
98114
|
findOrfsInPlasmid
|
|
98072
98115
|
);
|
|
98073
98116
|
function translationsRawSelector(sequenceData2) {
|
|
@@ -98103,10 +98146,7 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98103
98146
|
end: end2 * 3 + 2
|
|
98104
98147
|
});
|
|
98105
98148
|
});
|
|
98106
|
-
return [
|
|
98107
|
-
...toReturn,
|
|
98108
|
-
...r2
|
|
98109
|
-
];
|
|
98149
|
+
return [...toReturn, ...r2];
|
|
98110
98150
|
}
|
|
98111
98151
|
if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
|
|
98112
98152
|
const approxMatches = findApproxMatches(
|
|
@@ -98124,9 +98164,12 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98124
98164
|
isSearchLayer: true,
|
|
98125
98165
|
forward: true
|
|
98126
98166
|
})).sort((a2, b3) => a2.start - b3.start);
|
|
98127
|
-
return [
|
|
98128
|
-
|
|
98129
|
-
|
|
98167
|
+
return [
|
|
98168
|
+
...toReturn,
|
|
98169
|
+
...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
|
|
98170
|
+
className: "veSearchLayer"
|
|
98171
|
+
}))
|
|
98172
|
+
];
|
|
98130
98173
|
}
|
|
98131
98174
|
const matches = findSequenceMatches(sequence2, searchString, {
|
|
98132
98175
|
isCircular,
|
|
@@ -98136,11 +98179,14 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98136
98179
|
}).sort(({ start: start2 }, { start: start22 }) => {
|
|
98137
98180
|
return start2 - start22;
|
|
98138
98181
|
});
|
|
98139
|
-
return [
|
|
98140
|
-
|
|
98141
|
-
|
|
98142
|
-
|
|
98143
|
-
|
|
98182
|
+
return [
|
|
98183
|
+
...toReturn,
|
|
98184
|
+
...matches.map((match) => __spreadProps(__spreadValues({}, match), {
|
|
98185
|
+
forward: !match.bottomStrand,
|
|
98186
|
+
className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
|
|
98187
|
+
isSearchLayer: true
|
|
98188
|
+
}))
|
|
98189
|
+
];
|
|
98144
98190
|
}
|
|
98145
98191
|
__name(searchLayersSelector, "searchLayersSelector");
|
|
98146
98192
|
const searchLayersSelector$1 = createSelector(
|
|
@@ -98153,7 +98199,10 @@ const searchLayersSelector$1 = createSelector(
|
|
|
98153
98199
|
(state2) => state2.sequenceData.isProtein,
|
|
98154
98200
|
(state2) => state2.sequenceData.proteinSequence,
|
|
98155
98201
|
(state2) => state2.findTool && state2.findTool.mismatchesAllowed,
|
|
98156
|
-
(state2) =>
|
|
98202
|
+
(state2) => {
|
|
98203
|
+
var _a2;
|
|
98204
|
+
return (_a2 = state2.temporaryAnnotations) == null ? void 0 : _a2.searchLayers;
|
|
98205
|
+
},
|
|
98157
98206
|
searchLayersSelector
|
|
98158
98207
|
);
|
|
98159
98208
|
const translationSearchMatchesSelector = createSelector(
|
|
@@ -116919,7 +116968,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
116919
116968
|
input.click();
|
|
116920
116969
|
}
|
|
116921
116970
|
__name(showFileDialog, "showFileDialog");
|
|
116922
|
-
const version = "0.8.
|
|
116971
|
+
const version = "0.8.25";
|
|
116923
116972
|
const packageJson = {
|
|
116924
116973
|
version
|
|
116925
116974
|
};
|
|
@@ -124298,28 +124347,30 @@ const __LinearView = class __LinearView extends React__default.Component {
|
|
|
124298
124347
|
maxAnnotationsToDisplay
|
|
124299
124348
|
} = this.props;
|
|
124300
124349
|
this.paredDownMessages = [];
|
|
124301
|
-
const paredDownSeqData = [
|
|
124302
|
-
|
|
124303
|
-
|
|
124304
|
-
|
|
124305
|
-
|
|
124306
|
-
|
|
124307
|
-
|
|
124350
|
+
const paredDownSeqData = [
|
|
124351
|
+
"parts",
|
|
124352
|
+
"features",
|
|
124353
|
+
"cutsites",
|
|
124354
|
+
"primers"
|
|
124355
|
+
].reduce((acc, type2) => {
|
|
124356
|
+
const nameUpper = startCase(type2);
|
|
124357
|
+
const maxToShow = (maxAnnotationsToDisplay ? maxAnnotationsToDisplay[type2] : limits[type2]) || 50;
|
|
124358
|
+
const [annotations, paredDown] = pareDownAnnotations(
|
|
124359
|
+
sequenceData2["filtered" + nameUpper] || sequenceData2[type2] || {},
|
|
124360
|
+
maxToShow
|
|
124361
|
+
);
|
|
124362
|
+
if (paredDown) {
|
|
124363
|
+
this.paredDownMessages.push(
|
|
124364
|
+
getParedDownWarning({
|
|
124365
|
+
nameUpper,
|
|
124366
|
+
isAdjustable: !maxAnnotationsToDisplay,
|
|
124367
|
+
maxToShow
|
|
124368
|
+
})
|
|
124308
124369
|
);
|
|
124309
|
-
|
|
124310
|
-
|
|
124311
|
-
|
|
124312
|
-
|
|
124313
|
-
isAdjustable: !maxAnnotationsToDisplay,
|
|
124314
|
-
maxToShow
|
|
124315
|
-
})
|
|
124316
|
-
);
|
|
124317
|
-
}
|
|
124318
|
-
acc[type2] = annotations;
|
|
124319
|
-
return acc;
|
|
124320
|
-
},
|
|
124321
|
-
{}
|
|
124322
|
-
);
|
|
124370
|
+
}
|
|
124371
|
+
acc[type2] = annotations;
|
|
124372
|
+
return acc;
|
|
124373
|
+
}, {});
|
|
124323
124374
|
this.rowData = prepareRowData(
|
|
124324
124375
|
__spreadValues(__spreadValues({}, sequenceData2), paredDownSeqData),
|
|
124325
124376
|
sequenceData2.sequence ? sequenceData2.sequence.length : 0
|
|
@@ -143882,12 +143933,29 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143882
143933
|
additionalFooterEls
|
|
143883
143934
|
}) => {
|
|
143884
143935
|
const annotationTypeUpper = upperFirst(annotationType);
|
|
143885
|
-
const
|
|
143886
|
-
|
|
143887
|
-
|
|
143888
|
-
|
|
143936
|
+
const AnnotationProperties = /* @__PURE__ */ __name((props) => {
|
|
143937
|
+
var _a2, _b2, _c;
|
|
143938
|
+
const {
|
|
143939
|
+
readOnly: readOnly2,
|
|
143940
|
+
annotations = {},
|
|
143941
|
+
annotationVisibility: annotationVisibility2,
|
|
143942
|
+
sequenceLength,
|
|
143943
|
+
selectionLayer: selectionLayer2,
|
|
143944
|
+
sequence: sequence2,
|
|
143945
|
+
isProtein: isProtein2,
|
|
143946
|
+
allPartTags,
|
|
143947
|
+
annotationPropertiesSelectedEntities: _annotationPropertiesSelectedEntities,
|
|
143948
|
+
selectedAnnotationId,
|
|
143949
|
+
PropertiesProps,
|
|
143950
|
+
dispatch,
|
|
143951
|
+
editorName
|
|
143952
|
+
} = props;
|
|
143953
|
+
const instanceRef = React__default.useRef({ props });
|
|
143954
|
+
instanceRef.current.props = props;
|
|
143955
|
+
const cmds = React__default.useMemo(() => getCommands(instanceRef.current), []);
|
|
143956
|
+
const onRowSelect = React__default.useCallback(
|
|
143957
|
+
([record]) => {
|
|
143889
143958
|
if (!record) return;
|
|
143890
|
-
const { dispatch, editorName } = this.props;
|
|
143891
143959
|
dispatch({
|
|
143892
143960
|
type: "SELECTION_LAYER_UPDATE",
|
|
143893
143961
|
payload: record,
|
|
@@ -143895,44 +143963,33 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143895
143963
|
editorName
|
|
143896
143964
|
}
|
|
143897
143965
|
});
|
|
143898
|
-
},
|
|
143899
|
-
|
|
143900
|
-
|
|
143901
|
-
|
|
143902
|
-
|
|
143903
|
-
|
|
143904
|
-
|
|
143905
|
-
annotations = {},
|
|
143906
|
-
annotationVisibility: annotationVisibility2,
|
|
143907
|
-
sequenceLength,
|
|
143908
|
-
selectionLayer: selectionLayer2,
|
|
143909
|
-
sequence: sequence2,
|
|
143910
|
-
isProtein: isProtein2,
|
|
143911
|
-
allPartTags,
|
|
143912
|
-
annotationPropertiesSelectedEntities: _annotationPropertiesSelectedEntities,
|
|
143913
|
-
selectedAnnotationId,
|
|
143914
|
-
PropertiesProps
|
|
143915
|
-
} = this.props;
|
|
143916
|
-
const annotationPropertiesSelectedEntities = _annotationPropertiesSelectedEntities.filter((a2) => annotations[a2.id]);
|
|
143917
|
-
const deleteAnnotation = this.props[`delete${annotationTypeUpper}`];
|
|
143918
|
-
const annotationsToUse = map$3(annotations, (annotation) => {
|
|
143966
|
+
},
|
|
143967
|
+
[dispatch, editorName]
|
|
143968
|
+
);
|
|
143969
|
+
const annotationPropertiesSelectedEntities = _annotationPropertiesSelectedEntities.filter((a2) => annotations[a2.id]);
|
|
143970
|
+
const deleteAnnotation = props[`delete${annotationTypeUpper}`];
|
|
143971
|
+
const annotationsToUse = React__default.useMemo(
|
|
143972
|
+
() => map$3(annotations, (annotation) => {
|
|
143919
143973
|
return __spreadProps(__spreadValues(__spreadValues({}, annotation), annotation.strand === void 0 && {
|
|
143920
143974
|
strand: annotation.forward ? 1 : -1
|
|
143921
143975
|
}), {
|
|
143922
143976
|
size: getRangeLength(annotation, sequenceLength)
|
|
143923
143977
|
});
|
|
143924
|
-
})
|
|
143925
|
-
|
|
143926
|
-
|
|
143927
|
-
|
|
143928
|
-
|
|
143929
|
-
|
|
143978
|
+
}),
|
|
143979
|
+
[annotations, sequenceLength]
|
|
143980
|
+
);
|
|
143981
|
+
const keyedPartTags = (_a2 = getKeyedTagsAndTagOptions(allPartTags)) != null ? _a2 : {};
|
|
143982
|
+
const additionalColumns = ((_c = (_b2 = PropertiesProps == null ? void 0 : PropertiesProps.propertiesList) == null ? void 0 : _b2.find(
|
|
143983
|
+
(p2) => (p2.name || p2) === (pluralize(annotationType) || "")
|
|
143984
|
+
)) == null ? void 0 : _c.additionalColumns) || [];
|
|
143985
|
+
const schema2 = useMemoDeepEqual(
|
|
143986
|
+
() => ({
|
|
143930
143987
|
fields: [
|
|
143931
143988
|
{
|
|
143932
143989
|
path: "name",
|
|
143933
143990
|
type: "string",
|
|
143934
143991
|
render: /* @__PURE__ */ __name((name2, ann) => {
|
|
143935
|
-
const checked = !
|
|
143992
|
+
const checked = !annotationVisibility2[`${annotationType}IndividualToHide`][ann.id];
|
|
143936
143993
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
143937
143994
|
Icon,
|
|
143938
143995
|
{
|
|
@@ -143941,9 +143998,9 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143941
143998
|
e.stopPropagation();
|
|
143942
143999
|
const upperType = startCase(annotationType);
|
|
143943
144000
|
if (checked) {
|
|
143944
|
-
|
|
144001
|
+
props[`hide${upperType}Individual`]([ann.id]);
|
|
143945
144002
|
} else {
|
|
143946
|
-
|
|
144003
|
+
props[`show${upperType}Individual`]([ann.id]);
|
|
143947
144004
|
}
|
|
143948
144005
|
}, "onClick"),
|
|
143949
144006
|
style: {
|
|
@@ -143964,7 +144021,7 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143964
144021
|
render: /* @__PURE__ */ __name((bases, primer) => {
|
|
143965
144022
|
let bps = bases;
|
|
143966
144023
|
if (!bases) {
|
|
143967
|
-
bps = getSequenceWithinRange(primer,
|
|
144024
|
+
bps = getSequenceWithinRange(primer, sequence2);
|
|
143968
144025
|
if (!primer.forward) {
|
|
143969
144026
|
bps = getReverseComplementSequenceString(bps);
|
|
143970
144027
|
}
|
|
@@ -143989,8 +144046,8 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143989
144046
|
}, "render")
|
|
143990
144047
|
}
|
|
143991
144048
|
],
|
|
143992
|
-
sizeSchema(
|
|
143993
|
-
...withTags &&
|
|
144049
|
+
sizeSchema(isProtein2),
|
|
144050
|
+
...withTags && allPartTags ? [
|
|
143994
144051
|
{
|
|
143995
144052
|
path: "tags",
|
|
143996
144053
|
type: "string",
|
|
@@ -144014,138 +144071,144 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
144014
144071
|
{ path: "strand", type: "number" },
|
|
144015
144072
|
...additionalColumns
|
|
144016
144073
|
]
|
|
144017
|
-
}
|
|
144018
|
-
|
|
144019
|
-
|
|
144020
|
-
|
|
144021
|
-
|
|
144022
|
-
|
|
144023
|
-
|
|
144024
|
-
|
|
144025
|
-
|
|
144026
|
-
|
|
144027
|
-
|
|
144028
|
-
|
|
144029
|
-
|
|
144030
|
-
|
|
144031
|
-
|
|
144032
|
-
|
|
144033
|
-
|
|
144034
|
-
position: "top",
|
|
144035
|
-
modifiers: popoverOverflowModifiers,
|
|
144036
|
-
content: "New"
|
|
144037
|
-
},
|
|
144038
|
-
/* @__PURE__ */ React__default.createElement(
|
|
144039
|
-
AnchorButton,
|
|
144040
|
-
{
|
|
144041
|
-
disabled: !sequenceLength,
|
|
144042
|
-
icon: "plus",
|
|
144043
|
-
className: "tgNewAnnBtn",
|
|
144044
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
144045
|
-
showAddOrEditAnnotationDialog({
|
|
144046
|
-
type: annotationType,
|
|
144047
|
-
annotation: pick$1(
|
|
144048
|
-
selectionLayer2,
|
|
144049
|
-
"start",
|
|
144050
|
-
"end",
|
|
144051
|
-
"forward"
|
|
144052
|
-
)
|
|
144053
|
-
});
|
|
144054
|
-
}, "onClick")
|
|
144055
|
-
}
|
|
144056
|
-
)
|
|
144057
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
144058
|
-
Tooltip,
|
|
144074
|
+
}),
|
|
144075
|
+
[
|
|
144076
|
+
additionalColumns,
|
|
144077
|
+
allPartTags,
|
|
144078
|
+
annotationVisibility2,
|
|
144079
|
+
isProtein2,
|
|
144080
|
+
keyedPartTags,
|
|
144081
|
+
sequence2
|
|
144082
|
+
]
|
|
144083
|
+
);
|
|
144084
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
144085
|
+
WrappedDT,
|
|
144086
|
+
{
|
|
144087
|
+
topLeftItems: getVisFilter(
|
|
144088
|
+
createCommandMenu(
|
|
144089
|
+
isFunction$2(visSubmenu) ? visSubmenu(props) : visSubmenu,
|
|
144090
|
+
cmds,
|
|
144059
144091
|
{
|
|
144060
|
-
|
|
144061
|
-
|
|
144062
|
-
|
|
144063
|
-
|
|
144064
|
-
|
|
144065
|
-
|
|
144066
|
-
|
|
144067
|
-
|
|
144068
|
-
|
|
144069
|
-
|
|
144070
|
-
|
|
144071
|
-
|
|
144072
|
-
|
|
144073
|
-
|
|
144074
|
-
icon: "edit"
|
|
144075
|
-
}
|
|
144076
|
-
)
|
|
144077
|
-
), ["feature"].includes(annotationType) && /* @__PURE__ */ React__default.createElement(
|
|
144078
|
-
CmdButton,
|
|
144092
|
+
useTicks: true
|
|
144093
|
+
}
|
|
144094
|
+
)
|
|
144095
|
+
),
|
|
144096
|
+
annotationPropertiesSelectedEntities,
|
|
144097
|
+
leftOfSearchBarItems: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !readOnly2 && /* @__PURE__ */ React__default.createElement(ButtonGroup, { style: { marginTop: 3, marginRight: 4 } }, /* @__PURE__ */ React__default.createElement(
|
|
144098
|
+
Tooltip,
|
|
144099
|
+
{
|
|
144100
|
+
position: "top",
|
|
144101
|
+
modifiers: popoverOverflowModifiers,
|
|
144102
|
+
content: "New"
|
|
144103
|
+
},
|
|
144104
|
+
/* @__PURE__ */ React__default.createElement(
|
|
144105
|
+
AnchorButton,
|
|
144079
144106
|
{
|
|
144080
|
-
|
|
144081
|
-
icon: "
|
|
144082
|
-
|
|
144083
|
-
|
|
144107
|
+
disabled: !sequenceLength,
|
|
144108
|
+
icon: "plus",
|
|
144109
|
+
className: "tgNewAnnBtn",
|
|
144110
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144111
|
+
showAddOrEditAnnotationDialog({
|
|
144112
|
+
type: annotationType,
|
|
144113
|
+
annotation: pick$1(
|
|
144114
|
+
selectionLayer2,
|
|
144115
|
+
"start",
|
|
144116
|
+
"end",
|
|
144117
|
+
"forward"
|
|
144118
|
+
)
|
|
144119
|
+
});
|
|
144120
|
+
}, "onClick")
|
|
144084
144121
|
}
|
|
144085
|
-
)
|
|
144086
|
-
|
|
144122
|
+
)
|
|
144123
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
144124
|
+
Tooltip,
|
|
144125
|
+
{
|
|
144126
|
+
position: "top",
|
|
144127
|
+
modifiers: popoverOverflowModifiers,
|
|
144128
|
+
content: "Edit"
|
|
144129
|
+
},
|
|
144130
|
+
/* @__PURE__ */ React__default.createElement(
|
|
144131
|
+
AnchorButton,
|
|
144087
144132
|
{
|
|
144088
|
-
|
|
144089
|
-
|
|
144090
|
-
|
|
144091
|
-
|
|
144133
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144134
|
+
showAddOrEditAnnotationDialog({
|
|
144135
|
+
type: annotationType,
|
|
144136
|
+
annotation: annotationPropertiesSelectedEntities[0]
|
|
144137
|
+
});
|
|
144138
|
+
}, "onClick"),
|
|
144139
|
+
disabled: annotationPropertiesSelectedEntities.length !== 1,
|
|
144140
|
+
icon: "edit"
|
|
144092
144141
|
}
|
|
144093
|
-
)
|
|
144094
|
-
|
|
144142
|
+
)
|
|
144143
|
+
), ["feature"].includes(annotationType) && /* @__PURE__ */ React__default.createElement(
|
|
144144
|
+
CmdButton,
|
|
144145
|
+
{
|
|
144146
|
+
text: "",
|
|
144147
|
+
icon: "cog",
|
|
144148
|
+
"data-tip": "Configure Feature Types",
|
|
144149
|
+
cmd: cmds.onConfigureFeatureTypesClick
|
|
144150
|
+
}
|
|
144151
|
+
), ["part", "primer", "feature"].includes(annotationType) && /* @__PURE__ */ React__default.createElement(
|
|
144152
|
+
CmdButton,
|
|
144153
|
+
{
|
|
144154
|
+
text: "",
|
|
144155
|
+
icon: removeDuplicatesIcon,
|
|
144156
|
+
"data-tip": "Remove Duplicates",
|
|
144157
|
+
cmd: cmds[`showRemoveDuplicatesDialog${annotationTypeUpper + "s"}`]
|
|
144158
|
+
}
|
|
144159
|
+
), additionalFooterEls && additionalFooterEls(props), /* @__PURE__ */ React__default.createElement(
|
|
144160
|
+
Tooltip,
|
|
144161
|
+
{
|
|
144162
|
+
position: "top",
|
|
144163
|
+
modifiers: popoverOverflowModifiers,
|
|
144164
|
+
content: "Delete"
|
|
144165
|
+
},
|
|
144166
|
+
/* @__PURE__ */ React__default.createElement(
|
|
144167
|
+
AnchorButton,
|
|
144095
144168
|
{
|
|
144096
|
-
|
|
144097
|
-
|
|
144098
|
-
|
|
144099
|
-
|
|
144100
|
-
|
|
144101
|
-
|
|
144102
|
-
|
|
144103
|
-
|
|
144104
|
-
|
|
144105
|
-
|
|
144106
|
-
|
|
144107
|
-
|
|
144108
|
-
|
|
144109
|
-
|
|
144110
|
-
|
|
144111
|
-
|
|
144112
|
-
|
|
144113
|
-
|
|
144114
|
-
|
|
144115
|
-
|
|
144116
|
-
|
|
144117
|
-
|
|
144118
|
-
|
|
144119
|
-
|
|
144120
|
-
|
|
144121
|
-
|
|
144122
|
-
|
|
144123
|
-
|
|
144124
|
-
|
|
144125
|
-
|
|
144126
|
-
|
|
144127
|
-
|
|
144128
|
-
|
|
144129
|
-
|
|
144130
|
-
|
|
144131
|
-
|
|
144132
|
-
|
|
144133
|
-
|
|
144134
|
-
|
|
144135
|
-
|
|
144136
|
-
|
|
144137
|
-
|
|
144138
|
-
|
|
144139
|
-
isInfinite: true,
|
|
144140
|
-
withDisplayOptions: true,
|
|
144141
|
-
schema: this.schema,
|
|
144142
|
-
entities: annotationsToUse
|
|
144143
|
-
}
|
|
144144
|
-
);
|
|
144145
|
-
}
|
|
144146
|
-
};
|
|
144147
|
-
__name(_AnnotationProperties, "AnnotationProperties");
|
|
144148
|
-
let AnnotationProperties = _AnnotationProperties;
|
|
144169
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144170
|
+
deleteAnnotation(annotationPropertiesSelectedEntities);
|
|
144171
|
+
}, "onClick"),
|
|
144172
|
+
className: "tgDeleteAnnsBtn",
|
|
144173
|
+
intent: "danger",
|
|
144174
|
+
disabled: !annotationPropertiesSelectedEntities.length,
|
|
144175
|
+
icon: "trash"
|
|
144176
|
+
}
|
|
144177
|
+
)
|
|
144178
|
+
))),
|
|
144179
|
+
onDoubleClick: /* @__PURE__ */ __name((annotation) => {
|
|
144180
|
+
showAddOrEditAnnotationDialog({
|
|
144181
|
+
type: annotationType,
|
|
144182
|
+
annotation
|
|
144183
|
+
});
|
|
144184
|
+
}, "onDoubleClick"),
|
|
144185
|
+
withCheckboxes: true,
|
|
144186
|
+
showFeatureIndividual: props.showFeatureIndividual,
|
|
144187
|
+
hideFeatureIndividual: props.hideFeatureIndividual,
|
|
144188
|
+
showPartIndividual: props.showPartIndividual,
|
|
144189
|
+
hidePartIndividual: props.hidePartIndividual,
|
|
144190
|
+
showPrimerIndividual: props.showPrimerIndividual,
|
|
144191
|
+
hidePrimerIndividual: props.hidePrimerIndividual,
|
|
144192
|
+
annotationVisibility: annotationVisibility2,
|
|
144193
|
+
featureLengthsToHide: props.featureLengthsToHide,
|
|
144194
|
+
primerLengthsToHide: props.primerLengthsToHide,
|
|
144195
|
+
partLengthsToHide: props.partLengthsToHide,
|
|
144196
|
+
sequence: sequence2,
|
|
144197
|
+
noPadding: true,
|
|
144198
|
+
noFullscreenButton: true,
|
|
144199
|
+
onRowSelect,
|
|
144200
|
+
selectedIds: selectedAnnotationId,
|
|
144201
|
+
formName: "annotationProperties",
|
|
144202
|
+
noRouter: true,
|
|
144203
|
+
isProtein: isProtein2,
|
|
144204
|
+
compact: true,
|
|
144205
|
+
isInfinite: true,
|
|
144206
|
+
withDisplayOptions: true,
|
|
144207
|
+
schema: schema2,
|
|
144208
|
+
entities: annotationsToUse
|
|
144209
|
+
}
|
|
144210
|
+
);
|
|
144211
|
+
}, "AnnotationProperties");
|
|
144149
144212
|
return compose(
|
|
144150
144213
|
connectToEditor(
|
|
144151
144214
|
({
|