@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.cjs.js
CHANGED
|
@@ -17260,23 +17260,6 @@ const useTableEntities = /* @__PURE__ */ __name((tableFormName) => {
|
|
|
17260
17260
|
const { allOrderedEntities, selectedEntities } = reactRedux.useSelector(entitySelector);
|
|
17261
17261
|
return { selectTableEntities, allOrderedEntities, selectedEntities };
|
|
17262
17262
|
}, "useTableEntities");
|
|
17263
|
-
const isEqualIgnoreFunctions = /* @__PURE__ */ __name((o1, o2) => {
|
|
17264
|
-
const isEq = isEqualWith(o1, o2, function(val1, val2) {
|
|
17265
|
-
if (isFunction$2(val1) && isFunction$2(val2)) {
|
|
17266
|
-
return val1 === val2 || val1.toString() === val2.toString();
|
|
17267
|
-
}
|
|
17268
|
-
if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
|
|
17269
|
-
return true;
|
|
17270
|
-
});
|
|
17271
|
-
return isEq;
|
|
17272
|
-
}, "isEqualIgnoreFunctions");
|
|
17273
|
-
const useDeepEqualMemo = /* @__PURE__ */ __name((value) => {
|
|
17274
|
-
const ref2 = React.useRef();
|
|
17275
|
-
if (!isEqualIgnoreFunctions(value, ref2.current)) {
|
|
17276
|
-
ref2.current = value;
|
|
17277
|
-
}
|
|
17278
|
-
return ref2.current;
|
|
17279
|
-
}, "useDeepEqualMemo");
|
|
17280
17263
|
function rowClick(e, rowInfo, entities, {
|
|
17281
17264
|
reduxFormSelectedEntityIdMap,
|
|
17282
17265
|
isSingleSelect,
|
|
@@ -56570,6 +56553,33 @@ if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === "object") {
|
|
|
56570
56553
|
$mobx
|
|
56571
56554
|
});
|
|
56572
56555
|
}
|
|
56556
|
+
const isEqualIgnoreFunctions = /* @__PURE__ */ __name((o1, o2) => {
|
|
56557
|
+
const isEq = isEqualWith(o1, o2, function(val1, val2) {
|
|
56558
|
+
if (isFunction$2(val1) && isFunction$2(val2)) {
|
|
56559
|
+
return val1 === val2 || val1.toString() === val2.toString();
|
|
56560
|
+
}
|
|
56561
|
+
if (val1 && val1.constructor && val1.constructor.name === "FiberNode")
|
|
56562
|
+
return true;
|
|
56563
|
+
});
|
|
56564
|
+
return isEq;
|
|
56565
|
+
}, "isEqualIgnoreFunctions");
|
|
56566
|
+
const useDeepEqualMemoIgnoreFns = /* @__PURE__ */ __name((value) => {
|
|
56567
|
+
const ref2 = React.useRef();
|
|
56568
|
+
if (!isEqualIgnoreFunctions(value, ref2.current)) {
|
|
56569
|
+
ref2.current = value;
|
|
56570
|
+
}
|
|
56571
|
+
return ref2.current;
|
|
56572
|
+
}, "useDeepEqualMemoIgnoreFns");
|
|
56573
|
+
const useDeepEqualMemo = /* @__PURE__ */ __name((value) => {
|
|
56574
|
+
const ref2 = React.useRef();
|
|
56575
|
+
if (!isEqual$3(value, ref2.current)) {
|
|
56576
|
+
ref2.current = value;
|
|
56577
|
+
}
|
|
56578
|
+
return ref2.current;
|
|
56579
|
+
}, "useDeepEqualMemo");
|
|
56580
|
+
const useMemoDeepEqual = /* @__PURE__ */ __name((value, depsArray) => {
|
|
56581
|
+
return React.useMemo(value, useDeepEqualMemo(depsArray));
|
|
56582
|
+
}, "useMemoDeepEqual");
|
|
56573
56583
|
T();
|
|
56574
56584
|
const IS_LINUX = window.navigator.platform.toLowerCase().search("linux") > -1;
|
|
56575
56585
|
const itemSizeEstimators = {
|
|
@@ -56656,9 +56666,11 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56656
56666
|
"reduxFormSelectedEntityIdMap"
|
|
56657
56667
|
);
|
|
56658
56668
|
}, "dtFormParamsSelector"));
|
|
56659
|
-
const reduxFormCellValidation =
|
|
56660
|
-
|
|
56661
|
-
|
|
56669
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
56670
|
+
_reduxFormCellValidation
|
|
56671
|
+
);
|
|
56672
|
+
const reduxFormQueryParams = useDeepEqualMemoIgnoreFns(_reduxFormQueryParams);
|
|
56673
|
+
const reduxFormSelectedEntityIdMap = useDeepEqualMemoIgnoreFns(
|
|
56662
56674
|
_reduxFormSelectedEntityIdMap
|
|
56663
56675
|
);
|
|
56664
56676
|
let props = ownProps;
|
|
@@ -56733,7 +56745,7 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56733
56745
|
const tmp = (urlConnected ? getCurrentParamsFromUrl(history.location) : reduxFormQueryParams) || {};
|
|
56734
56746
|
return tmp;
|
|
56735
56747
|
}, [history, reduxFormQueryParams, urlConnected]);
|
|
56736
|
-
const currentParams =
|
|
56748
|
+
const currentParams = useDeepEqualMemoIgnoreFns(_currentParams);
|
|
56737
56749
|
const tableParams = React.useMemo(() => {
|
|
56738
56750
|
if (!isTableParamsConnected) {
|
|
56739
56751
|
const setNewParams2 = /* @__PURE__ */ __name((newParams) => {
|
|
@@ -56914,8 +56926,8 @@ const DataTable = /* @__PURE__ */ __name((_w) => {
|
|
|
56914
56926
|
() => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
|
|
56915
56927
|
[_origEntities, reduxFormEntities]
|
|
56916
56928
|
);
|
|
56917
|
-
const entities =
|
|
56918
|
-
const entitiesAcrossPages =
|
|
56929
|
+
const entities = useDeepEqualMemoIgnoreFns(_entities);
|
|
56930
|
+
const entitiesAcrossPages = useDeepEqualMemoIgnoreFns(_entitiesAcrossPages);
|
|
56919
56931
|
React.useEffect(() => {
|
|
56920
56932
|
change("allOrderedEntities", entitiesAcrossPages);
|
|
56921
56933
|
if (entities.length === 0 || isEmpty$1(reduxFormSelectedEntityIdMap)) return;
|
|
@@ -61479,7 +61491,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
61479
61491
|
return (_b2 = (_a3 = state2.form) == null ? void 0 : _a3[dataTableForm]) == null ? void 0 : _b2.values.reduxFormEntities;
|
|
61480
61492
|
}
|
|
61481
61493
|
);
|
|
61482
|
-
const reduxFormEntities =
|
|
61494
|
+
const reduxFormEntities = useDeepEqualMemoIgnoreFns(_reduxFormEntities);
|
|
61483
61495
|
React.useEffect(() => {
|
|
61484
61496
|
return () => dispatch(reduxForm.destroy(dataTableForm));
|
|
61485
61497
|
}, [dataTableForm, dispatch]);
|
|
@@ -61489,7 +61501,9 @@ const SimpleInsertDataDialog = compose(
|
|
|
61489
61501
|
return (_b2 = (_a3 = state2.form) == null ? void 0 : _a3[dataTableForm]) == null ? void 0 : _b2.values.reduxFormCellValidation;
|
|
61490
61502
|
}, "_reduxFormCellValidationSelector")
|
|
61491
61503
|
);
|
|
61492
|
-
const reduxFormCellValidation =
|
|
61504
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
61505
|
+
_reduxFormCellValidation
|
|
61506
|
+
);
|
|
61493
61507
|
const { entsToUse, validationToUse } = React.useMemo(
|
|
61494
61508
|
() => removeCleanRows(reduxFormEntities, reduxFormCellValidation),
|
|
61495
61509
|
[reduxFormEntities, reduxFormCellValidation]
|
|
@@ -61574,8 +61588,10 @@ const UploadCsvWizardDialogInner = reduxForm.reduxForm()(({
|
|
|
61574
61588
|
"reduxFormCellValidation"
|
|
61575
61589
|
);
|
|
61576
61590
|
}, "dtFormNameSelector"));
|
|
61577
|
-
const reduxFormEntities =
|
|
61578
|
-
const reduxFormCellValidation =
|
|
61591
|
+
const reduxFormEntities = useDeepEqualMemoIgnoreFns(_reduxFormEntities);
|
|
61592
|
+
const reduxFormCellValidation = useDeepEqualMemoIgnoreFns(
|
|
61593
|
+
_reduxFormCellValidation
|
|
61594
|
+
);
|
|
61579
61595
|
let inner2;
|
|
61580
61596
|
if (hasSubmitted) {
|
|
61581
61597
|
inner2 = /* @__PURE__ */ React.createElement(
|
|
@@ -61877,8 +61893,10 @@ const UploadCsvWizardDialog = compose(
|
|
|
61877
61893
|
};
|
|
61878
61894
|
}
|
|
61879
61895
|
});
|
|
61880
|
-
const reduxFormEntitiesArray =
|
|
61881
|
-
|
|
61896
|
+
const reduxFormEntitiesArray = useDeepEqualMemoIgnoreFns(
|
|
61897
|
+
_reduxFormEntitiesArray
|
|
61898
|
+
);
|
|
61899
|
+
const finishedFiles = useDeepEqualMemoIgnoreFns(_finishedFiles);
|
|
61882
61900
|
const [hasSubmittedOuter, setSubmittedOuter] = React.useState();
|
|
61883
61901
|
const [steps, setSteps] = React.useState(getInitialSteps(true));
|
|
61884
61902
|
const [focusedTab, setFocusedTab] = React.useState(0);
|
|
@@ -70383,12 +70401,21 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React.
|
|
|
70383
70401
|
}, RndProps),
|
|
70384
70402
|
/* @__PURE__ */ React.createElement(
|
|
70385
70403
|
core.Dialog,
|
|
70386
|
-
__spreadValues({
|
|
70404
|
+
__spreadProps(__spreadValues({
|
|
70387
70405
|
enforceFocus: false,
|
|
70388
70406
|
hasBackdrop: false,
|
|
70389
70407
|
usePortal: false,
|
|
70390
70408
|
canEscapeKeyClose: true
|
|
70391
|
-
}, rest)
|
|
70409
|
+
}, rest), {
|
|
70410
|
+
title: /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8 } }, /* @__PURE__ */ React.createElement(
|
|
70411
|
+
core.Icon,
|
|
70412
|
+
{
|
|
70413
|
+
size: "14",
|
|
70414
|
+
"data-tip": "I'm a resizable draggable dialog!",
|
|
70415
|
+
icon: "move"
|
|
70416
|
+
}
|
|
70417
|
+
), rest.title)
|
|
70418
|
+
})
|
|
70392
70419
|
)
|
|
70393
70420
|
)
|
|
70394
70421
|
);
|
|
@@ -73662,7 +73689,7 @@ const genbankFeatureTypes = [
|
|
|
73662
73689
|
{ name: "regulatory", color: "#3F6C51" },
|
|
73663
73690
|
{ name: "SecStr", color: "#7B4B94" },
|
|
73664
73691
|
{ name: "Site", color: "#7D82B8" },
|
|
73665
|
-
{ name: "telomere", color: "DE9151" },
|
|
73692
|
+
{ name: "telomere", color: "#DE9151" },
|
|
73666
73693
|
{ name: "tmRNA", color: "#B7E3CC" },
|
|
73667
73694
|
{ name: "unsure", color: "#C4FFB2" },
|
|
73668
73695
|
{ name: "V_segment", color: "#D6F7A3" },
|
|
@@ -83801,7 +83828,10 @@ function getOrfsFromSequence(options) {
|
|
|
83801
83828
|
return nonDuplicatedOrfRanges;
|
|
83802
83829
|
}
|
|
83803
83830
|
__name(getOrfsFromSequence, "getOrfsFromSequence");
|
|
83804
|
-
function findOrfsInPlasmid(sequence2, circular2, minimumOrfSize2, useAdditionalOrfStartCodons2) {
|
|
83831
|
+
function findOrfsInPlasmid(sequence2, circular2, minimumOrfSize2, useAdditionalOrfStartCodons2, isProteinOrOligo) {
|
|
83832
|
+
if (isProteinOrOligo) {
|
|
83833
|
+
return [];
|
|
83834
|
+
}
|
|
83805
83835
|
const forwardOrfs = getOrfsFromSequence({
|
|
83806
83836
|
sequence: sequence2,
|
|
83807
83837
|
minimumOrfSize: minimumOrfSize2,
|
|
@@ -84029,6 +84059,15 @@ function getAnnotationsBetweenRange(annotationsToBeAdjusted, range2, maxLength,
|
|
|
84029
84059
|
}
|
|
84030
84060
|
const overlaps = getZeroedRangeOverlaps(annotation, range2, maxLength).map(
|
|
84031
84061
|
(overlap) => {
|
|
84062
|
+
const allLocations = annotation.locations;
|
|
84063
|
+
if (allLocations && allLocations.length) {
|
|
84064
|
+
const newLocations = allLocations.filter((loc) => {
|
|
84065
|
+
return isRangeWithinRange(loc, overlap, maxLength);
|
|
84066
|
+
});
|
|
84067
|
+
return assignIn({}, annotation, overlap, {
|
|
84068
|
+
locations: newLocations
|
|
84069
|
+
});
|
|
84070
|
+
}
|
|
84032
84071
|
return assignIn({}, annotation, overlap);
|
|
84033
84072
|
}
|
|
84034
84073
|
);
|
|
@@ -98086,6 +98125,10 @@ const orfsSelector = createSelector(
|
|
|
98086
98125
|
circularSelector,
|
|
98087
98126
|
minimumOrfSizeSelector,
|
|
98088
98127
|
(state2) => state2.useAdditionalOrfStartCodons,
|
|
98128
|
+
(state2) => {
|
|
98129
|
+
var _a2, _b2;
|
|
98130
|
+
return ((_a2 = state2.sequenceData) == null ? void 0 : _a2.isProtein) || ((_b2 = state2.sequenceData) == null ? void 0 : _b2.isOligo);
|
|
98131
|
+
},
|
|
98089
98132
|
findOrfsInPlasmid
|
|
98090
98133
|
);
|
|
98091
98134
|
function translationsRawSelector(sequenceData2) {
|
|
@@ -98121,10 +98164,7 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98121
98164
|
end: end2 * 3 + 2
|
|
98122
98165
|
});
|
|
98123
98166
|
});
|
|
98124
|
-
return [
|
|
98125
|
-
...toReturn,
|
|
98126
|
-
...r2
|
|
98127
|
-
];
|
|
98167
|
+
return [...toReturn, ...r2];
|
|
98128
98168
|
}
|
|
98129
98169
|
if (dnaOrAA === "DNA" && ambiguousOrLiteral === "LITERAL" && mismatchesAllowed > 0) {
|
|
98130
98170
|
const approxMatches = findApproxMatches(
|
|
@@ -98142,9 +98182,12 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98142
98182
|
isSearchLayer: true,
|
|
98143
98183
|
forward: true
|
|
98144
98184
|
})).sort((a2, b3) => a2.start - b3.start);
|
|
98145
|
-
return [
|
|
98146
|
-
|
|
98147
|
-
|
|
98185
|
+
return [
|
|
98186
|
+
...toReturn,
|
|
98187
|
+
...matches2.map((match) => __spreadProps(__spreadValues({}, match), {
|
|
98188
|
+
className: "veSearchLayer"
|
|
98189
|
+
}))
|
|
98190
|
+
];
|
|
98148
98191
|
}
|
|
98149
98192
|
const matches = findSequenceMatches(sequence2, searchString, {
|
|
98150
98193
|
isCircular,
|
|
@@ -98154,11 +98197,14 @@ function searchLayersSelector(sequence2, isCircular, isOpen, searchString, ambig
|
|
|
98154
98197
|
}).sort(({ start: start2 }, { start: start22 }) => {
|
|
98155
98198
|
return start2 - start22;
|
|
98156
98199
|
});
|
|
98157
|
-
return [
|
|
98158
|
-
|
|
98159
|
-
|
|
98160
|
-
|
|
98161
|
-
|
|
98200
|
+
return [
|
|
98201
|
+
...toReturn,
|
|
98202
|
+
...matches.map((match) => __spreadProps(__spreadValues({}, match), {
|
|
98203
|
+
forward: !match.bottomStrand,
|
|
98204
|
+
className: "veSearchLayer " + (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
|
|
98205
|
+
isSearchLayer: true
|
|
98206
|
+
}))
|
|
98207
|
+
];
|
|
98162
98208
|
}
|
|
98163
98209
|
__name(searchLayersSelector, "searchLayersSelector");
|
|
98164
98210
|
const searchLayersSelector$1 = createSelector(
|
|
@@ -98171,7 +98217,10 @@ const searchLayersSelector$1 = createSelector(
|
|
|
98171
98217
|
(state2) => state2.sequenceData.isProtein,
|
|
98172
98218
|
(state2) => state2.sequenceData.proteinSequence,
|
|
98173
98219
|
(state2) => state2.findTool && state2.findTool.mismatchesAllowed,
|
|
98174
|
-
(state2) =>
|
|
98220
|
+
(state2) => {
|
|
98221
|
+
var _a2;
|
|
98222
|
+
return (_a2 = state2.temporaryAnnotations) == null ? void 0 : _a2.searchLayers;
|
|
98223
|
+
},
|
|
98175
98224
|
searchLayersSelector
|
|
98176
98225
|
);
|
|
98177
98226
|
const translationSearchMatchesSelector = createSelector(
|
|
@@ -116937,7 +116986,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
116937
116986
|
input.click();
|
|
116938
116987
|
}
|
|
116939
116988
|
__name(showFileDialog, "showFileDialog");
|
|
116940
|
-
const version = "0.8.
|
|
116989
|
+
const version = "0.8.25";
|
|
116941
116990
|
const packageJson = {
|
|
116942
116991
|
version
|
|
116943
116992
|
};
|
|
@@ -124316,28 +124365,30 @@ const __LinearView = class __LinearView extends React.Component {
|
|
|
124316
124365
|
maxAnnotationsToDisplay
|
|
124317
124366
|
} = this.props;
|
|
124318
124367
|
this.paredDownMessages = [];
|
|
124319
|
-
const paredDownSeqData = [
|
|
124320
|
-
|
|
124321
|
-
|
|
124322
|
-
|
|
124323
|
-
|
|
124324
|
-
|
|
124325
|
-
|
|
124368
|
+
const paredDownSeqData = [
|
|
124369
|
+
"parts",
|
|
124370
|
+
"features",
|
|
124371
|
+
"cutsites",
|
|
124372
|
+
"primers"
|
|
124373
|
+
].reduce((acc, type2) => {
|
|
124374
|
+
const nameUpper = startCase(type2);
|
|
124375
|
+
const maxToShow = (maxAnnotationsToDisplay ? maxAnnotationsToDisplay[type2] : limits[type2]) || 50;
|
|
124376
|
+
const [annotations, paredDown] = pareDownAnnotations(
|
|
124377
|
+
sequenceData2["filtered" + nameUpper] || sequenceData2[type2] || {},
|
|
124378
|
+
maxToShow
|
|
124379
|
+
);
|
|
124380
|
+
if (paredDown) {
|
|
124381
|
+
this.paredDownMessages.push(
|
|
124382
|
+
getParedDownWarning({
|
|
124383
|
+
nameUpper,
|
|
124384
|
+
isAdjustable: !maxAnnotationsToDisplay,
|
|
124385
|
+
maxToShow
|
|
124386
|
+
})
|
|
124326
124387
|
);
|
|
124327
|
-
|
|
124328
|
-
|
|
124329
|
-
|
|
124330
|
-
|
|
124331
|
-
isAdjustable: !maxAnnotationsToDisplay,
|
|
124332
|
-
maxToShow
|
|
124333
|
-
})
|
|
124334
|
-
);
|
|
124335
|
-
}
|
|
124336
|
-
acc[type2] = annotations;
|
|
124337
|
-
return acc;
|
|
124338
|
-
},
|
|
124339
|
-
{}
|
|
124340
|
-
);
|
|
124388
|
+
}
|
|
124389
|
+
acc[type2] = annotations;
|
|
124390
|
+
return acc;
|
|
124391
|
+
}, {});
|
|
124341
124392
|
this.rowData = prepareRowData(
|
|
124342
124393
|
__spreadValues(__spreadValues({}, sequenceData2), paredDownSeqData),
|
|
124343
124394
|
sequenceData2.sequence ? sequenceData2.sequence.length : 0
|
|
@@ -143900,12 +143951,29 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143900
143951
|
additionalFooterEls
|
|
143901
143952
|
}) => {
|
|
143902
143953
|
const annotationTypeUpper = upperFirst(annotationType);
|
|
143903
|
-
const
|
|
143904
|
-
|
|
143905
|
-
|
|
143906
|
-
|
|
143954
|
+
const AnnotationProperties = /* @__PURE__ */ __name((props) => {
|
|
143955
|
+
var _a2, _b2, _c;
|
|
143956
|
+
const {
|
|
143957
|
+
readOnly: readOnly2,
|
|
143958
|
+
annotations = {},
|
|
143959
|
+
annotationVisibility: annotationVisibility2,
|
|
143960
|
+
sequenceLength,
|
|
143961
|
+
selectionLayer: selectionLayer2,
|
|
143962
|
+
sequence: sequence2,
|
|
143963
|
+
isProtein: isProtein2,
|
|
143964
|
+
allPartTags,
|
|
143965
|
+
annotationPropertiesSelectedEntities: _annotationPropertiesSelectedEntities,
|
|
143966
|
+
selectedAnnotationId,
|
|
143967
|
+
PropertiesProps,
|
|
143968
|
+
dispatch,
|
|
143969
|
+
editorName
|
|
143970
|
+
} = props;
|
|
143971
|
+
const instanceRef = React.useRef({ props });
|
|
143972
|
+
instanceRef.current.props = props;
|
|
143973
|
+
const cmds = React.useMemo(() => getCommands(instanceRef.current), []);
|
|
143974
|
+
const onRowSelect = React.useCallback(
|
|
143975
|
+
([record]) => {
|
|
143907
143976
|
if (!record) return;
|
|
143908
|
-
const { dispatch, editorName } = this.props;
|
|
143909
143977
|
dispatch({
|
|
143910
143978
|
type: "SELECTION_LAYER_UPDATE",
|
|
143911
143979
|
payload: record,
|
|
@@ -143913,44 +143981,33 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143913
143981
|
editorName
|
|
143914
143982
|
}
|
|
143915
143983
|
});
|
|
143916
|
-
},
|
|
143917
|
-
|
|
143918
|
-
|
|
143919
|
-
|
|
143920
|
-
|
|
143921
|
-
|
|
143922
|
-
|
|
143923
|
-
annotations = {},
|
|
143924
|
-
annotationVisibility: annotationVisibility2,
|
|
143925
|
-
sequenceLength,
|
|
143926
|
-
selectionLayer: selectionLayer2,
|
|
143927
|
-
sequence: sequence2,
|
|
143928
|
-
isProtein: isProtein2,
|
|
143929
|
-
allPartTags,
|
|
143930
|
-
annotationPropertiesSelectedEntities: _annotationPropertiesSelectedEntities,
|
|
143931
|
-
selectedAnnotationId,
|
|
143932
|
-
PropertiesProps
|
|
143933
|
-
} = this.props;
|
|
143934
|
-
const annotationPropertiesSelectedEntities = _annotationPropertiesSelectedEntities.filter((a2) => annotations[a2.id]);
|
|
143935
|
-
const deleteAnnotation = this.props[`delete${annotationTypeUpper}`];
|
|
143936
|
-
const annotationsToUse = map$3(annotations, (annotation) => {
|
|
143984
|
+
},
|
|
143985
|
+
[dispatch, editorName]
|
|
143986
|
+
);
|
|
143987
|
+
const annotationPropertiesSelectedEntities = _annotationPropertiesSelectedEntities.filter((a2) => annotations[a2.id]);
|
|
143988
|
+
const deleteAnnotation = props[`delete${annotationTypeUpper}`];
|
|
143989
|
+
const annotationsToUse = React.useMemo(
|
|
143990
|
+
() => map$3(annotations, (annotation) => {
|
|
143937
143991
|
return __spreadProps(__spreadValues(__spreadValues({}, annotation), annotation.strand === void 0 && {
|
|
143938
143992
|
strand: annotation.forward ? 1 : -1
|
|
143939
143993
|
}), {
|
|
143940
143994
|
size: getRangeLength(annotation, sequenceLength)
|
|
143941
143995
|
});
|
|
143942
|
-
})
|
|
143943
|
-
|
|
143944
|
-
|
|
143945
|
-
|
|
143946
|
-
|
|
143947
|
-
|
|
143996
|
+
}),
|
|
143997
|
+
[annotations, sequenceLength]
|
|
143998
|
+
);
|
|
143999
|
+
const keyedPartTags = (_a2 = getKeyedTagsAndTagOptions(allPartTags)) != null ? _a2 : {};
|
|
144000
|
+
const additionalColumns = ((_c = (_b2 = PropertiesProps == null ? void 0 : PropertiesProps.propertiesList) == null ? void 0 : _b2.find(
|
|
144001
|
+
(p2) => (p2.name || p2) === (pluralize(annotationType) || "")
|
|
144002
|
+
)) == null ? void 0 : _c.additionalColumns) || [];
|
|
144003
|
+
const schema2 = useMemoDeepEqual(
|
|
144004
|
+
() => ({
|
|
143948
144005
|
fields: [
|
|
143949
144006
|
{
|
|
143950
144007
|
path: "name",
|
|
143951
144008
|
type: "string",
|
|
143952
144009
|
render: /* @__PURE__ */ __name((name2, ann) => {
|
|
143953
|
-
const checked = !
|
|
144010
|
+
const checked = !annotationVisibility2[`${annotationType}IndividualToHide`][ann.id];
|
|
143954
144011
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
143955
144012
|
core.Icon,
|
|
143956
144013
|
{
|
|
@@ -143959,9 +144016,9 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143959
144016
|
e.stopPropagation();
|
|
143960
144017
|
const upperType = startCase(annotationType);
|
|
143961
144018
|
if (checked) {
|
|
143962
|
-
|
|
144019
|
+
props[`hide${upperType}Individual`]([ann.id]);
|
|
143963
144020
|
} else {
|
|
143964
|
-
|
|
144021
|
+
props[`show${upperType}Individual`]([ann.id]);
|
|
143965
144022
|
}
|
|
143966
144023
|
}, "onClick"),
|
|
143967
144024
|
style: {
|
|
@@ -143982,7 +144039,7 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
143982
144039
|
render: /* @__PURE__ */ __name((bases, primer) => {
|
|
143983
144040
|
let bps = bases;
|
|
143984
144041
|
if (!bases) {
|
|
143985
|
-
bps = getSequenceWithinRange(primer,
|
|
144042
|
+
bps = getSequenceWithinRange(primer, sequence2);
|
|
143986
144043
|
if (!primer.forward) {
|
|
143987
144044
|
bps = getReverseComplementSequenceString(bps);
|
|
143988
144045
|
}
|
|
@@ -144007,8 +144064,8 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
144007
144064
|
}, "render")
|
|
144008
144065
|
}
|
|
144009
144066
|
],
|
|
144010
|
-
sizeSchema(
|
|
144011
|
-
...withTags &&
|
|
144067
|
+
sizeSchema(isProtein2),
|
|
144068
|
+
...withTags && allPartTags ? [
|
|
144012
144069
|
{
|
|
144013
144070
|
path: "tags",
|
|
144014
144071
|
type: "string",
|
|
@@ -144032,138 +144089,144 @@ const genericAnnotationProperties = /* @__PURE__ */ __name(({
|
|
|
144032
144089
|
{ path: "strand", type: "number" },
|
|
144033
144090
|
...additionalColumns
|
|
144034
144091
|
]
|
|
144035
|
-
}
|
|
144036
|
-
|
|
144037
|
-
|
|
144038
|
-
|
|
144039
|
-
|
|
144040
|
-
|
|
144041
|
-
|
|
144042
|
-
|
|
144043
|
-
|
|
144044
|
-
|
|
144045
|
-
|
|
144046
|
-
|
|
144047
|
-
|
|
144048
|
-
|
|
144049
|
-
|
|
144050
|
-
|
|
144051
|
-
|
|
144052
|
-
position: "top",
|
|
144053
|
-
modifiers: popoverOverflowModifiers,
|
|
144054
|
-
content: "New"
|
|
144055
|
-
},
|
|
144056
|
-
/* @__PURE__ */ React.createElement(
|
|
144057
|
-
core.AnchorButton,
|
|
144058
|
-
{
|
|
144059
|
-
disabled: !sequenceLength,
|
|
144060
|
-
icon: "plus",
|
|
144061
|
-
className: "tgNewAnnBtn",
|
|
144062
|
-
onClick: /* @__PURE__ */ __name(() => {
|
|
144063
|
-
showAddOrEditAnnotationDialog({
|
|
144064
|
-
type: annotationType,
|
|
144065
|
-
annotation: pick$1(
|
|
144066
|
-
selectionLayer2,
|
|
144067
|
-
"start",
|
|
144068
|
-
"end",
|
|
144069
|
-
"forward"
|
|
144070
|
-
)
|
|
144071
|
-
});
|
|
144072
|
-
}, "onClick")
|
|
144073
|
-
}
|
|
144074
|
-
)
|
|
144075
|
-
), /* @__PURE__ */ React.createElement(
|
|
144076
|
-
core.Tooltip,
|
|
144092
|
+
}),
|
|
144093
|
+
[
|
|
144094
|
+
additionalColumns,
|
|
144095
|
+
allPartTags,
|
|
144096
|
+
annotationVisibility2,
|
|
144097
|
+
isProtein2,
|
|
144098
|
+
keyedPartTags,
|
|
144099
|
+
sequence2
|
|
144100
|
+
]
|
|
144101
|
+
);
|
|
144102
|
+
return /* @__PURE__ */ React.createElement(
|
|
144103
|
+
WrappedDT,
|
|
144104
|
+
{
|
|
144105
|
+
topLeftItems: getVisFilter(
|
|
144106
|
+
createCommandMenu(
|
|
144107
|
+
isFunction$2(visSubmenu) ? visSubmenu(props) : visSubmenu,
|
|
144108
|
+
cmds,
|
|
144077
144109
|
{
|
|
144078
|
-
|
|
144079
|
-
|
|
144080
|
-
|
|
144081
|
-
|
|
144082
|
-
|
|
144083
|
-
|
|
144084
|
-
|
|
144085
|
-
|
|
144086
|
-
|
|
144087
|
-
|
|
144088
|
-
|
|
144089
|
-
|
|
144090
|
-
|
|
144091
|
-
|
|
144092
|
-
icon: "edit"
|
|
144093
|
-
}
|
|
144094
|
-
)
|
|
144095
|
-
), ["feature"].includes(annotationType) && /* @__PURE__ */ React.createElement(
|
|
144096
|
-
CmdButton,
|
|
144110
|
+
useTicks: true
|
|
144111
|
+
}
|
|
144112
|
+
)
|
|
144113
|
+
),
|
|
144114
|
+
annotationPropertiesSelectedEntities,
|
|
144115
|
+
leftOfSearchBarItems: /* @__PURE__ */ React.createElement(React.Fragment, null, !readOnly2 && /* @__PURE__ */ React.createElement(core.ButtonGroup, { style: { marginTop: 3, marginRight: 4 } }, /* @__PURE__ */ React.createElement(
|
|
144116
|
+
core.Tooltip,
|
|
144117
|
+
{
|
|
144118
|
+
position: "top",
|
|
144119
|
+
modifiers: popoverOverflowModifiers,
|
|
144120
|
+
content: "New"
|
|
144121
|
+
},
|
|
144122
|
+
/* @__PURE__ */ React.createElement(
|
|
144123
|
+
core.AnchorButton,
|
|
144097
144124
|
{
|
|
144098
|
-
|
|
144099
|
-
icon: "
|
|
144100
|
-
|
|
144101
|
-
|
|
144125
|
+
disabled: !sequenceLength,
|
|
144126
|
+
icon: "plus",
|
|
144127
|
+
className: "tgNewAnnBtn",
|
|
144128
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144129
|
+
showAddOrEditAnnotationDialog({
|
|
144130
|
+
type: annotationType,
|
|
144131
|
+
annotation: pick$1(
|
|
144132
|
+
selectionLayer2,
|
|
144133
|
+
"start",
|
|
144134
|
+
"end",
|
|
144135
|
+
"forward"
|
|
144136
|
+
)
|
|
144137
|
+
});
|
|
144138
|
+
}, "onClick")
|
|
144102
144139
|
}
|
|
144103
|
-
)
|
|
144104
|
-
|
|
144140
|
+
)
|
|
144141
|
+
), /* @__PURE__ */ React.createElement(
|
|
144142
|
+
core.Tooltip,
|
|
144143
|
+
{
|
|
144144
|
+
position: "top",
|
|
144145
|
+
modifiers: popoverOverflowModifiers,
|
|
144146
|
+
content: "Edit"
|
|
144147
|
+
},
|
|
144148
|
+
/* @__PURE__ */ React.createElement(
|
|
144149
|
+
core.AnchorButton,
|
|
144105
144150
|
{
|
|
144106
|
-
|
|
144107
|
-
|
|
144108
|
-
|
|
144109
|
-
|
|
144151
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144152
|
+
showAddOrEditAnnotationDialog({
|
|
144153
|
+
type: annotationType,
|
|
144154
|
+
annotation: annotationPropertiesSelectedEntities[0]
|
|
144155
|
+
});
|
|
144156
|
+
}, "onClick"),
|
|
144157
|
+
disabled: annotationPropertiesSelectedEntities.length !== 1,
|
|
144158
|
+
icon: "edit"
|
|
144110
144159
|
}
|
|
144111
|
-
)
|
|
144112
|
-
|
|
144160
|
+
)
|
|
144161
|
+
), ["feature"].includes(annotationType) && /* @__PURE__ */ React.createElement(
|
|
144162
|
+
CmdButton,
|
|
144163
|
+
{
|
|
144164
|
+
text: "",
|
|
144165
|
+
icon: "cog",
|
|
144166
|
+
"data-tip": "Configure Feature Types",
|
|
144167
|
+
cmd: cmds.onConfigureFeatureTypesClick
|
|
144168
|
+
}
|
|
144169
|
+
), ["part", "primer", "feature"].includes(annotationType) && /* @__PURE__ */ React.createElement(
|
|
144170
|
+
CmdButton,
|
|
144171
|
+
{
|
|
144172
|
+
text: "",
|
|
144173
|
+
icon: removeDuplicatesIcon,
|
|
144174
|
+
"data-tip": "Remove Duplicates",
|
|
144175
|
+
cmd: cmds[`showRemoveDuplicatesDialog${annotationTypeUpper + "s"}`]
|
|
144176
|
+
}
|
|
144177
|
+
), additionalFooterEls && additionalFooterEls(props), /* @__PURE__ */ React.createElement(
|
|
144178
|
+
core.Tooltip,
|
|
144179
|
+
{
|
|
144180
|
+
position: "top",
|
|
144181
|
+
modifiers: popoverOverflowModifiers,
|
|
144182
|
+
content: "Delete"
|
|
144183
|
+
},
|
|
144184
|
+
/* @__PURE__ */ React.createElement(
|
|
144185
|
+
core.AnchorButton,
|
|
144113
144186
|
{
|
|
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
|
-
|
|
144140
|
-
|
|
144141
|
-
|
|
144142
|
-
|
|
144143
|
-
|
|
144144
|
-
|
|
144145
|
-
|
|
144146
|
-
|
|
144147
|
-
|
|
144148
|
-
|
|
144149
|
-
|
|
144150
|
-
|
|
144151
|
-
|
|
144152
|
-
|
|
144153
|
-
|
|
144154
|
-
|
|
144155
|
-
|
|
144156
|
-
|
|
144157
|
-
isInfinite: true,
|
|
144158
|
-
withDisplayOptions: true,
|
|
144159
|
-
schema: this.schema,
|
|
144160
|
-
entities: annotationsToUse
|
|
144161
|
-
}
|
|
144162
|
-
);
|
|
144163
|
-
}
|
|
144164
|
-
};
|
|
144165
|
-
__name(_AnnotationProperties, "AnnotationProperties");
|
|
144166
|
-
let AnnotationProperties = _AnnotationProperties;
|
|
144187
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
144188
|
+
deleteAnnotation(annotationPropertiesSelectedEntities);
|
|
144189
|
+
}, "onClick"),
|
|
144190
|
+
className: "tgDeleteAnnsBtn",
|
|
144191
|
+
intent: "danger",
|
|
144192
|
+
disabled: !annotationPropertiesSelectedEntities.length,
|
|
144193
|
+
icon: "trash"
|
|
144194
|
+
}
|
|
144195
|
+
)
|
|
144196
|
+
))),
|
|
144197
|
+
onDoubleClick: /* @__PURE__ */ __name((annotation) => {
|
|
144198
|
+
showAddOrEditAnnotationDialog({
|
|
144199
|
+
type: annotationType,
|
|
144200
|
+
annotation
|
|
144201
|
+
});
|
|
144202
|
+
}, "onDoubleClick"),
|
|
144203
|
+
withCheckboxes: true,
|
|
144204
|
+
showFeatureIndividual: props.showFeatureIndividual,
|
|
144205
|
+
hideFeatureIndividual: props.hideFeatureIndividual,
|
|
144206
|
+
showPartIndividual: props.showPartIndividual,
|
|
144207
|
+
hidePartIndividual: props.hidePartIndividual,
|
|
144208
|
+
showPrimerIndividual: props.showPrimerIndividual,
|
|
144209
|
+
hidePrimerIndividual: props.hidePrimerIndividual,
|
|
144210
|
+
annotationVisibility: annotationVisibility2,
|
|
144211
|
+
featureLengthsToHide: props.featureLengthsToHide,
|
|
144212
|
+
primerLengthsToHide: props.primerLengthsToHide,
|
|
144213
|
+
partLengthsToHide: props.partLengthsToHide,
|
|
144214
|
+
sequence: sequence2,
|
|
144215
|
+
noPadding: true,
|
|
144216
|
+
noFullscreenButton: true,
|
|
144217
|
+
onRowSelect,
|
|
144218
|
+
selectedIds: selectedAnnotationId,
|
|
144219
|
+
formName: "annotationProperties",
|
|
144220
|
+
noRouter: true,
|
|
144221
|
+
isProtein: isProtein2,
|
|
144222
|
+
compact: true,
|
|
144223
|
+
isInfinite: true,
|
|
144224
|
+
withDisplayOptions: true,
|
|
144225
|
+
schema: schema2,
|
|
144226
|
+
entities: annotationsToUse
|
|
144227
|
+
}
|
|
144228
|
+
);
|
|
144229
|
+
}, "AnnotationProperties");
|
|
144167
144230
|
return compose(
|
|
144168
144231
|
connectToEditor(
|
|
144169
144232
|
({
|