@teselagen/ove 0.3.11 → 0.3.13
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.js +529 -422
- package/index.mjs +530 -423
- package/index.umd.js +532 -402
- package/package.json +2 -2
- package/src/AlignmentView/AlignmentVisibilityTool.js +1 -1
- package/src/AlignmentView/EditTrackNameDialog.js +1 -5
- package/src/AlignmentView/HorizontalPanelDragHandle.js +2 -2
- package/src/AlignmentView/Minimap.js +12 -12
- package/src/AlignmentView/PairwiseAlignmentView.js +1 -1
- package/src/AlignmentView/getGapMap.js +1 -1
- package/src/AlignmentView/getTrackFromEvent.js +1 -1
- package/src/AlignmentView/index.js +32 -37
- package/src/AutoAnnotate.js +48 -48
- package/src/CircularView/Cutsites.js +3 -3
- package/src/CircularView/Labels/index.js +7 -7
- package/src/CircularView/Labels/relaxLabels_DEPRECATED.js +5 -5
- package/src/CircularView/RotateCircularViewSlider.js +1 -1
- package/src/CircularView/SelectionLayer.js +2 -2
- package/src/CircularView/drawAnnotations.js +3 -3
- package/src/CircularView/getAngleForPositionMidpoint.js +1 -1
- package/src/CircularView/index.d.ts +11 -11
- package/src/CircularView/index.js +9 -9
- package/src/CreateAnnotationsPage.js +7 -5
- package/src/CreateCustomEnzyme/index.js +1 -5
- package/src/CutsiteFilter/AdditionalCutsiteInfoDialog.js +11 -11
- package/src/CutsiteFilter/index.js +12 -12
- package/src/DigestTool/AddLaddersDialog.js +1 -1
- package/src/DigestTool/DigestTool.js +3 -3
- package/src/DigestTool/Ladder.js +8 -8
- package/src/DigestTool/ladderDefaults.js +1 -2
- package/src/Editor/CommandHotkeyHandler.js +1 -1
- package/src/Editor/DropHandler.js +2 -2
- package/src/Editor/index.js +15 -15
- package/src/Editor/userDefinedHandlersAndOpts.js +3 -1
- package/src/FindBar/index.js +6 -6
- package/src/GlobalDialogUtils.js +6 -0
- package/src/LinearView/ZoomLinearView.js +1 -1
- package/src/LinearView/index.js +7 -7
- package/src/MenuBar/index.js +1 -1
- package/src/MenuBar/viewSubmenu.js +1 -1
- package/src/PCRTool/PCRTool.js +19 -19
- package/src/Reflex/Browser.js +4 -5
- package/src/Reflex/ReflexContainer.js +3 -3
- package/src/Reflex/ReflexElement.js +2 -2
- package/src/RowItem/Axis.js +1 -1
- package/src/RowItem/Caret/index.js +1 -1
- package/src/RowItem/Chromatograms/Chromatogram.js +3 -3
- package/src/RowItem/CutsiteSelectionLayers.js +1 -1
- package/src/RowItem/Cutsites.js +1 -1
- package/src/RowItem/Labels.js +2 -2
- package/src/RowItem/Orfs.js +2 -2
- package/src/RowItem/Sequence.js +4 -4
- package/src/RowItem/StackedAnnotations/PointedAnnotation.js +3 -3
- package/src/RowItem/StackedAnnotations/getStructuredBases.js +1 -1
- package/src/RowItem/Translations/AASliver.js +71 -75
- package/src/RowItem/Translations/index.js +1 -1
- package/src/RowItem/getCutsiteLabelHeights.js +1 -1
- package/src/RowItem/index.js +14 -8
- package/src/RowView/estimateRowHeight.js +5 -5
- package/src/RowView/index.d.ts +7 -7
- package/src/RowView/index.js +11 -12
- package/src/SimpleCircularOrLinearView.js +6 -6
- package/src/StatusBar/MeltingTemp.js +3 -3
- package/src/StatusBar/index.js +29 -33
- package/src/ToolBar/ToolbarItem.js +2 -2
- package/src/ToolBar/alignmentTool.js +9 -9
- package/src/ToolBar/editTool.js +41 -37
- package/src/ToolBar/findTool.js +2 -2
- package/src/ToolBar/importTool.js +1 -1
- package/src/ToolBar/index.js +2 -2
- package/src/ToolBar/oligoTool.js +1 -1
- package/src/ToolBar/orfTool.js +1 -6
- package/src/ToolBar/printTool.js +2 -2
- package/src/ToolBar/visibilityTool.js +1 -1
- package/src/VersionHistoryView/index.js +2 -2
- package/src/commands/index.js +237 -230
- package/src/createVectorEditor/index.js +4 -4
- package/src/fileUtils.js +18 -18
- package/src/helperComponents/AddOrEditAnnotationDialog/index.js +22 -15
- package/src/helperComponents/AddOrEditFeatureDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPartDialog/index.js +2 -2
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +5 -5
- package/src/helperComponents/EnzymesDialog/index.js +17 -22
- package/src/helperComponents/GoToDialog.js +5 -1
- package/src/helperComponents/MergeFeaturesDialog/index.js +3 -3
- package/src/helperComponents/PinchHelper/PinchHelper.js +1 -1
- package/src/helperComponents/PrintDialog/index.js +4 -4
- package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/GenbankView.js +1 -1
- package/src/helperComponents/PropertiesDialog/GeneralProperties.js +10 -8
- package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +136 -138
- package/src/helperComponents/PropertiesDialog/OrfProperties.js +3 -3
- package/src/helperComponents/PropertiesDialog/PrimerProperties.js +1 -1
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -2
- package/src/helperComponents/PropertiesDialog/index.js +3 -3
- package/src/helperComponents/RemoveDuplicates/index.js +3 -3
- package/src/helperComponents/SelectDialog.js +3 -3
- package/src/helperComponents/UncontrolledSliderWithPlusMinusBtns.js +5 -5
- package/src/helperComponents/createSimpleDialog.js +1 -1
- package/src/helperComponents/partTagSearch.js +2 -5
- package/src/helperComponents/withHover.js +3 -3
- package/src/redux/alignments.js +6 -6
- package/src/redux/annotationVisibility.js +4 -4
- package/src/redux/featureLengthsToHide.js +1 -1
- package/src/redux/frameTranslations.js +3 -3
- package/src/redux/middleware.js +2 -2
- package/src/redux/panelsShown.js +19 -19
- package/src/redux/partLengthsToHide.js +1 -1
- package/src/redux/primerLengthsToHide.js +1 -1
- package/src/redux/readOnly.js +1 -4
- package/src/redux/selectionLayer.js +1 -1
- package/src/redux/sequenceData/features.js +1 -1
- package/src/redux/sequenceData/upsertDeleteActionGenerator.js +1 -1
- package/src/redux/sequenceDataHistory.js +5 -5
- package/src/redux/toolBar.js +2 -4
- package/src/redux/utils/createMetaAction.js +2 -2
- package/src/redux/versionHistory.js +1 -2
- package/src/selectors/annotationSearchSelector.js +4 -4
- package/src/selectors/circularSelector.js +1 -1
- package/src/selectors/cutsiteLabelColorSelector.js +1 -1
- package/src/selectors/filteredCutsitesSelector.js +6 -6
- package/src/selectors/filteredFeaturesSelector.js +4 -4
- package/src/selectors/filteredPartsSelector.js +5 -5
- package/src/selectors/filteredPrimersSelector.js +3 -3
- package/src/selectors/isEnzymeFilterAndSelector.js +1 -1
- package/src/selectors/orfsSelector.js +1 -1
- package/src/selectors/restrictionEnzymesSelector.js +2 -2
- package/src/selectors/searchLayersSelector.js +7 -7
- package/src/selectors/sequenceLengthSelector.js +1 -1
- package/src/selectors/sequenceSelector.js +1 -1
- package/src/selectors/tagsToBoldSelector.js +1 -1
- package/src/selectors/translationsSelector.js +7 -7
- package/src/updateEditor.js +1 -1
- package/src/utils/PassThrough.js +1 -1
- package/src/utils/addWrappedAddons.js +1 -1
- package/src/utils/annotationTypes.js +2 -2
- package/src/utils/combineReducersDontIgnoreKeys.js +1 -1
- package/src/utils/editorUtils.js +2 -2
- package/src/utils/massageTickSpacing.js +1 -1
- package/src/utils/onlyUpdateForKeysDeep.js +1 -1
- package/src/utils/pureNoFunc.js +1 -1
- package/src/utils/shouldRerender.js +1 -1
- package/src/utils/showFileDialog.js +6 -7
- package/src/utils/updateLabelsForInViewFeatures.js +1 -1
- package/src/utils/useAnnotationLimits.js +1 -1
- package/src/withEditorInteractions/Keyboard.js +2 -3
- package/src/withEditorInteractions/createSequenceInputPopup.js +4 -4
- package/src/withEditorInteractions/index.js +93 -55
- package/src/withEditorProps/index.js +39 -37
- package/style.css +138 -138
package/index.umd.js
CHANGED
|
@@ -57193,12 +57193,20 @@
|
|
|
57193
57193
|
return toString$4.call(it).slice(8, -1);
|
|
57194
57194
|
};
|
|
57195
57195
|
|
|
57196
|
-
|
|
57197
|
-
var
|
|
57198
|
-
|
|
57199
|
-
|
|
57200
|
-
|
|
57201
|
-
|
|
57196
|
+
var _iobject;
|
|
57197
|
+
var hasRequired_iobject;
|
|
57198
|
+
|
|
57199
|
+
function require_iobject () {
|
|
57200
|
+
if (hasRequired_iobject) return _iobject;
|
|
57201
|
+
hasRequired_iobject = 1;
|
|
57202
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
57203
|
+
var cof = _cof;
|
|
57204
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
57205
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
57206
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
57207
|
+
};
|
|
57208
|
+
return _iobject;
|
|
57209
|
+
}
|
|
57202
57210
|
|
|
57203
57211
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
57204
57212
|
var _defined = function (it) {
|
|
@@ -57207,7 +57215,7 @@
|
|
|
57207
57215
|
};
|
|
57208
57216
|
|
|
57209
57217
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
57210
|
-
var IObject =
|
|
57218
|
+
var IObject = require_iobject();
|
|
57211
57219
|
var defined$2 = _defined;
|
|
57212
57220
|
var _toIobject = function (it) {
|
|
57213
57221
|
return IObject(defined$2(it));
|
|
@@ -57354,7 +57362,7 @@
|
|
|
57354
57362
|
var gOPS = _objectGops;
|
|
57355
57363
|
var pIE = require_objectPie();
|
|
57356
57364
|
var toObject = _toObject;
|
|
57357
|
-
var IObject =
|
|
57365
|
+
var IObject = require_iobject();
|
|
57358
57366
|
var $assign = Object.assign;
|
|
57359
57367
|
|
|
57360
57368
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -113755,13 +113763,7 @@
|
|
|
113755
113763
|
return {};
|
|
113756
113764
|
}
|
|
113757
113765
|
const mergedOpts = getMergedOpts(topLevelOptions, ownProps);
|
|
113758
|
-
const {
|
|
113759
|
-
formName,
|
|
113760
|
-
urlConnected,
|
|
113761
|
-
history,
|
|
113762
|
-
defaults,
|
|
113763
|
-
onlyOneFilter
|
|
113764
|
-
} = mergedOpts;
|
|
113766
|
+
const { formName, urlConnected, history, defaults, onlyOneFilter } = mergedOpts;
|
|
113765
113767
|
function updateSearch(val) {
|
|
113766
113768
|
setTimeout(function() {
|
|
113767
113769
|
dispatch(change(formName, "reduxFormSearchInput", val || ""));
|
|
@@ -113800,12 +113802,7 @@
|
|
|
113800
113802
|
action(...args, currentParams);
|
|
113801
113803
|
};
|
|
113802
113804
|
});
|
|
113803
|
-
const {
|
|
113804
|
-
variables,
|
|
113805
|
-
selectedEntities,
|
|
113806
|
-
mergedOpts,
|
|
113807
|
-
...restStateProps
|
|
113808
|
-
} = stateProps;
|
|
113805
|
+
const { variables, selectedEntities, mergedOpts, ...restStateProps } = stateProps;
|
|
113809
113806
|
const changeFormValue = (...args) => dispatchProps.dispatch(change(formName, ...args));
|
|
113810
113807
|
const tableParams = {
|
|
113811
113808
|
changeFormValue,
|
|
@@ -117701,7 +117698,9 @@
|
|
|
117701
117698
|
return doNotTriggerClick();
|
|
117702
117699
|
}
|
|
117703
117700
|
const parentEl = r.current?.closest(".bp3-dialog-container");
|
|
117704
|
-
const dialogs = document.querySelectorAll(
|
|
117701
|
+
const dialogs = document.querySelectorAll(
|
|
117702
|
+
".bp3-dialog-container"
|
|
117703
|
+
);
|
|
117705
117704
|
const numDialogs = dialogs?.length;
|
|
117706
117705
|
if (numDialogs > 1) {
|
|
117707
117706
|
const topMostDialog = dialogs[numDialogs - 1];
|
|
@@ -118040,6 +118039,7 @@
|
|
|
118040
118039
|
marginBottom: 10,
|
|
118041
118040
|
marginLeft: 20,
|
|
118042
118041
|
fontSize: 10
|
|
118042
|
+
/* color: Colors.RED1 */
|
|
118043
118043
|
}
|
|
118044
118044
|
},
|
|
118045
118045
|
userMatchedHeader && [
|
|
@@ -120028,10 +120028,7 @@
|
|
|
120028
120028
|
if (props.filesWIssues.length > 0) {
|
|
120029
120029
|
const reduxFormEntitiesArray = [];
|
|
120030
120030
|
const finishedFiles = props.filesWIssues.map((f, i) => {
|
|
120031
|
-
const {
|
|
120032
|
-
reduxFormEntities,
|
|
120033
|
-
reduxFormCellValidation
|
|
120034
|
-
} = formValueSelector(`editableCellTable-${i}`)(
|
|
120031
|
+
const { reduxFormEntities, reduxFormCellValidation } = formValueSelector(`editableCellTable-${i}`)(
|
|
120035
120032
|
state,
|
|
120036
120033
|
"reduxFormEntities",
|
|
120037
120034
|
"reduxFormCellValidation"
|
|
@@ -120408,6 +120405,8 @@
|
|
|
120408
120405
|
userSchema = exampleData,
|
|
120409
120406
|
initialEntities
|
|
120410
120407
|
} = props;
|
|
120408
|
+
const rerenderKey = reactExports.useRef(0);
|
|
120409
|
+
rerenderKey.current = rerenderKey.current + 1;
|
|
120411
120410
|
const data = userSchema.userData && userSchema.userData.length && userSchema.userData.map((row) => {
|
|
120412
120411
|
const toRet = {
|
|
120413
120412
|
_isClean: row._isClean
|
|
@@ -120454,6 +120453,7 @@
|
|
|
120454
120453
|
{
|
|
120455
120454
|
maxWidth: 800,
|
|
120456
120455
|
maxHeight: 500,
|
|
120456
|
+
rerenderKey: rerenderKey.current,
|
|
120457
120457
|
destroyOnUnmount: false,
|
|
120458
120458
|
doNotValidateUntouchedRows: true,
|
|
120459
120459
|
formName: datatableFormName || "editableCellTable",
|
|
@@ -132275,7 +132275,14 @@
|
|
|
132275
132275
|
}
|
|
132276
132276
|
}),
|
|
132277
132277
|
branch(({ navTo }) => navTo, withRouter$1)
|
|
132278
|
-
)(function({
|
|
132278
|
+
)(function({
|
|
132279
|
+
navTo,
|
|
132280
|
+
context,
|
|
132281
|
+
staticContext,
|
|
132282
|
+
didMount,
|
|
132283
|
+
willUnmount,
|
|
132284
|
+
...props
|
|
132285
|
+
}) {
|
|
132279
132286
|
let MenuItemComp = MenuItem;
|
|
132280
132287
|
if (navTo) {
|
|
132281
132288
|
MenuItemComp = MenuItemLink;
|
|
@@ -133333,11 +133340,7 @@
|
|
|
133333
133340
|
return handlers;
|
|
133334
133341
|
}
|
|
133335
133342
|
|
|
133336
|
-
const withCommand = (mappings) => (WrappedComponent) => ({
|
|
133337
|
-
cmd,
|
|
133338
|
-
cmdOptions = {},
|
|
133339
|
-
...props
|
|
133340
|
-
}) => {
|
|
133343
|
+
const withCommand = (mappings) => (WrappedComponent) => ({ cmd, cmdOptions = {}, ...props }) => {
|
|
133341
133344
|
const mappedProps = {};
|
|
133342
133345
|
Object.keys(mappings).forEach((k) => {
|
|
133343
133346
|
mappedProps[k] = mappings[k] === "execute" ? (event) => cmd.execute({ event }) : typeof mappings[k] === "function" ? mappings[k](cmd, props) : cmd[mappings[k]];
|
|
@@ -134484,9 +134487,9 @@
|
|
|
134484
134487
|
}
|
|
134485
134488
|
},
|
|
134486
134489
|
{
|
|
134487
|
-
|
|
134488
|
-
|
|
134489
|
-
|
|
134490
|
+
1: false,
|
|
134491
|
+
2: false,
|
|
134492
|
+
3: false,
|
|
134490
134493
|
"-1": false,
|
|
134491
134494
|
"-2": false,
|
|
134492
134495
|
"-3": false
|
|
@@ -135215,9 +135218,14 @@
|
|
|
135215
135218
|
|
|
135216
135219
|
function checkIfPotentiallyCircularRangesOverlap(range, comparisonRange) {
|
|
135217
135220
|
return splitRangeIntoTwoPartsIfItIsCircular(range, Infinity).some(function(splitRange) {
|
|
135218
|
-
return splitRangeIntoTwoPartsIfItIsCircular(comparisonRange, Infinity).some(
|
|
135219
|
-
|
|
135220
|
-
|
|
135221
|
+
return splitRangeIntoTwoPartsIfItIsCircular(comparisonRange, Infinity).some(
|
|
135222
|
+
function(splitComparisonRange) {
|
|
135223
|
+
return checkIfNonCircularRangesOverlap(
|
|
135224
|
+
splitRange,
|
|
135225
|
+
splitComparisonRange
|
|
135226
|
+
);
|
|
135227
|
+
}
|
|
135228
|
+
);
|
|
135221
135229
|
});
|
|
135222
135230
|
}
|
|
135223
135231
|
|
|
@@ -135227,15 +135235,19 @@
|
|
|
135227
135235
|
return overlaps;
|
|
135228
135236
|
} else if (overlaps.length === 2) {
|
|
135229
135237
|
if (overlaps[0].start === 0 && overlaps[1].end + 1 === sequenceLength && !originalRangeLinear) {
|
|
135230
|
-
return [
|
|
135231
|
-
|
|
135232
|
-
|
|
135233
|
-
|
|
135238
|
+
return [
|
|
135239
|
+
{
|
|
135240
|
+
start: overlaps[1].start,
|
|
135241
|
+
end: overlaps[0].end
|
|
135242
|
+
}
|
|
135243
|
+
];
|
|
135234
135244
|
} else if (overlaps[1].start === 0 && overlaps[0].end + 1 === sequenceLength && !originalRangeLinear) {
|
|
135235
|
-
return [
|
|
135236
|
-
|
|
135237
|
-
|
|
135238
|
-
|
|
135245
|
+
return [
|
|
135246
|
+
{
|
|
135247
|
+
start: overlaps[0].start,
|
|
135248
|
+
end: overlaps[1].end
|
|
135249
|
+
}
|
|
135250
|
+
];
|
|
135239
135251
|
} else {
|
|
135240
135252
|
return overlaps;
|
|
135241
135253
|
}
|
|
@@ -135243,17 +135255,29 @@
|
|
|
135243
135255
|
const firstOverlap = overlaps[0];
|
|
135244
135256
|
const secondOverlap = overlaps[1];
|
|
135245
135257
|
const thirdOverlap = overlaps[2];
|
|
135246
|
-
let collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135258
|
+
let collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135259
|
+
[firstOverlap, secondOverlap],
|
|
135260
|
+
sequenceLength,
|
|
135261
|
+
optionalOriginalRange
|
|
135262
|
+
);
|
|
135247
135263
|
if (collapsedOverlaps.length === 1) {
|
|
135248
135264
|
collapsedOverlaps.push(thirdOverlap);
|
|
135249
135265
|
return collapsedOverlaps;
|
|
135250
135266
|
} else {
|
|
135251
|
-
collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135267
|
+
collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135268
|
+
[firstOverlap, thirdOverlap],
|
|
135269
|
+
sequenceLength,
|
|
135270
|
+
optionalOriginalRange
|
|
135271
|
+
);
|
|
135252
135272
|
if (collapsedOverlaps.length === 1) {
|
|
135253
135273
|
collapsedOverlaps.push(secondOverlap);
|
|
135254
135274
|
return collapsedOverlaps;
|
|
135255
135275
|
} else {
|
|
135256
|
-
collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135276
|
+
collapsedOverlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135277
|
+
[secondOverlap, thirdOverlap],
|
|
135278
|
+
sequenceLength,
|
|
135279
|
+
optionalOriginalRange
|
|
135280
|
+
);
|
|
135257
135281
|
if (collapsedOverlaps.length === 1) {
|
|
135258
135282
|
collapsedOverlaps.push(firstOverlap);
|
|
135259
135283
|
return collapsedOverlaps;
|
|
@@ -135275,11 +135299,18 @@
|
|
|
135275
135299
|
}
|
|
135276
135300
|
|
|
135277
135301
|
function convertRangeTo0Based(range) {
|
|
135278
|
-
return convertRangeIndices(range, {
|
|
135302
|
+
return convertRangeIndices(range, {
|
|
135303
|
+
inclusive1BasedStart: true,
|
|
135304
|
+
inclusive1BasedEnd: true
|
|
135305
|
+
});
|
|
135279
135306
|
}
|
|
135280
135307
|
|
|
135281
135308
|
function convertRangeTo1Based(range) {
|
|
135282
|
-
return convertRangeIndices(
|
|
135309
|
+
return convertRangeIndices(
|
|
135310
|
+
range,
|
|
135311
|
+
{},
|
|
135312
|
+
{ inclusive1BasedStart: true, inclusive1BasedEnd: true }
|
|
135313
|
+
);
|
|
135283
135314
|
}
|
|
135284
135315
|
|
|
135285
135316
|
function provideInclusiveOptions(funToWrap) {
|
|
@@ -135384,7 +135415,11 @@
|
|
|
135384
135415
|
let endMoved = true;
|
|
135385
135416
|
if (range.end >= position) {
|
|
135386
135417
|
if (position + maxLength - range.start > range.end - position) {
|
|
135387
|
-
newRange.end = normalizePositionByRangeLength(
|
|
135418
|
+
newRange.end = normalizePositionByRangeLength(
|
|
135419
|
+
position - 1,
|
|
135420
|
+
maxLength,
|
|
135421
|
+
false
|
|
135422
|
+
);
|
|
135388
135423
|
} else {
|
|
135389
135424
|
newRange.start = position;
|
|
135390
135425
|
endMoved = false;
|
|
@@ -135457,19 +135492,31 @@
|
|
|
135457
135492
|
if (range.start > range.end) {
|
|
135458
135493
|
return expandOrContractCircularRangeToPosition(range, position, maxLength);
|
|
135459
135494
|
} else {
|
|
135460
|
-
return expandOrContractNonCircularRangeToPosition(
|
|
135495
|
+
return expandOrContractNonCircularRangeToPosition(
|
|
135496
|
+
range,
|
|
135497
|
+
position);
|
|
135461
135498
|
}
|
|
135462
135499
|
}
|
|
135463
135500
|
|
|
135464
135501
|
function translateRange(rangeToBeAdjusted, translateBy, rangeLength) {
|
|
135465
135502
|
return lodashExports.assign({}, rangeToBeAdjusted, {
|
|
135466
|
-
start: normalizePositionByRangeLength(
|
|
135467
|
-
|
|
135503
|
+
start: normalizePositionByRangeLength(
|
|
135504
|
+
rangeToBeAdjusted.start + translateBy,
|
|
135505
|
+
rangeLength
|
|
135506
|
+
),
|
|
135507
|
+
end: normalizePositionByRangeLength(
|
|
135508
|
+
rangeToBeAdjusted.end + translateBy,
|
|
135509
|
+
rangeLength
|
|
135510
|
+
)
|
|
135468
135511
|
});
|
|
135469
135512
|
}
|
|
135470
135513
|
|
|
135471
135514
|
function flipRelativeRange(innerRange, outerRange, sequenceLength, options) {
|
|
135472
|
-
const isFullyContained = isRangeWithinRange(
|
|
135515
|
+
const isFullyContained = isRangeWithinRange(
|
|
135516
|
+
innerRange,
|
|
135517
|
+
outerRange,
|
|
135518
|
+
sequenceLength
|
|
135519
|
+
);
|
|
135473
135520
|
if (isFullyContained) {
|
|
135474
135521
|
return flipFullyContainedRange(innerRange, outerRange, sequenceLength);
|
|
135475
135522
|
} else {
|
|
@@ -135477,40 +135524,91 @@
|
|
|
135477
135524
|
}
|
|
135478
135525
|
}
|
|
135479
135526
|
function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, options) {
|
|
135480
|
-
const outerFullyContained = isRangeWithinRange(
|
|
135527
|
+
const outerFullyContained = isRangeWithinRange(
|
|
135528
|
+
outerRange,
|
|
135529
|
+
innerRange,
|
|
135530
|
+
sequenceLength
|
|
135531
|
+
);
|
|
135481
135532
|
let flippedInnerRange;
|
|
135482
135533
|
if (outerFullyContained) {
|
|
135483
|
-
const expandBy1 = getRangeLength(
|
|
135484
|
-
|
|
135485
|
-
|
|
135486
|
-
|
|
135487
|
-
|
|
135488
|
-
|
|
135489
|
-
|
|
135490
|
-
|
|
135491
|
-
|
|
135492
|
-
|
|
135534
|
+
const expandBy1 = getRangeLength(
|
|
135535
|
+
{
|
|
135536
|
+
start: innerRange.start,
|
|
135537
|
+
end: outerRange.start
|
|
135538
|
+
},
|
|
135539
|
+
sequenceLength
|
|
135540
|
+
) - 1;
|
|
135541
|
+
flippedInnerRange = expandOrContractRangeByLength(
|
|
135542
|
+
outerRange,
|
|
135543
|
+
expandBy1,
|
|
135544
|
+
false,
|
|
135545
|
+
sequenceLength
|
|
135546
|
+
);
|
|
135547
|
+
const expandBy2 = getRangeLength(
|
|
135548
|
+
{
|
|
135549
|
+
end: innerRange.end,
|
|
135550
|
+
start: outerRange.end
|
|
135551
|
+
},
|
|
135552
|
+
sequenceLength
|
|
135553
|
+
) - 1;
|
|
135554
|
+
flippedInnerRange = expandOrContractRangeByLength(
|
|
135555
|
+
flippedInnerRange,
|
|
135556
|
+
expandBy2,
|
|
135557
|
+
true,
|
|
135558
|
+
sequenceLength
|
|
135559
|
+
);
|
|
135493
135560
|
} else {
|
|
135494
|
-
const overlaps = getOverlapsOfPotentiallyCircularRanges(
|
|
135561
|
+
const overlaps = getOverlapsOfPotentiallyCircularRanges(
|
|
135562
|
+
innerRange,
|
|
135563
|
+
outerRange,
|
|
135564
|
+
sequenceLength
|
|
135565
|
+
);
|
|
135495
135566
|
if (overlaps.length >= 1) {
|
|
135496
135567
|
let overlapExtendsForward;
|
|
135497
135568
|
const firstOverlap = overlaps[0];
|
|
135498
135569
|
overlapExtendsForward = firstOverlap.start !== outerRange.start;
|
|
135499
|
-
const flippedTruncatedInner = flipFullyContainedRange(
|
|
135570
|
+
const flippedTruncatedInner = flipFullyContainedRange(
|
|
135571
|
+
firstOverlap,
|
|
135572
|
+
outerRange,
|
|
135573
|
+
sequenceLength
|
|
135574
|
+
);
|
|
135500
135575
|
const lengthToExtend = getRangeLength(innerRange, sequenceLength) - getRangeLength(flippedTruncatedInner, sequenceLength);
|
|
135501
|
-
flippedInnerRange = expandOrContractRangeByLength(
|
|
135576
|
+
flippedInnerRange = expandOrContractRangeByLength(
|
|
135577
|
+
flippedTruncatedInner,
|
|
135578
|
+
lengthToExtend,
|
|
135579
|
+
overlapExtendsForward,
|
|
135580
|
+
sequenceLength
|
|
135581
|
+
);
|
|
135502
135582
|
} else {
|
|
135503
|
-
throw new Error(
|
|
135583
|
+
throw new Error(
|
|
135584
|
+
"This case (relative ranges that do not overlap) is unsupported! "
|
|
135585
|
+
);
|
|
135504
135586
|
}
|
|
135505
135587
|
}
|
|
135506
135588
|
return flippedInnerRange;
|
|
135507
135589
|
}
|
|
135508
135590
|
function flipFullyContainedRange(innerRange, outerRange, sequenceLength, options) {
|
|
135509
135591
|
const translateBy = -outerRange.start;
|
|
135510
|
-
const translatedOuterRange = translateRange(
|
|
135511
|
-
|
|
135512
|
-
|
|
135513
|
-
|
|
135592
|
+
const translatedOuterRange = translateRange(
|
|
135593
|
+
outerRange,
|
|
135594
|
+
translateBy,
|
|
135595
|
+
sequenceLength
|
|
135596
|
+
);
|
|
135597
|
+
const translatedInnerRange = translateRange(
|
|
135598
|
+
innerRange,
|
|
135599
|
+
translateBy,
|
|
135600
|
+
sequenceLength
|
|
135601
|
+
);
|
|
135602
|
+
const translatedFlippedInnerRange = flipNonOriginSpanningContainedRange(
|
|
135603
|
+
translatedInnerRange,
|
|
135604
|
+
translatedOuterRange,
|
|
135605
|
+
sequenceLength
|
|
135606
|
+
);
|
|
135607
|
+
const flippedInnerRange = translateRange(
|
|
135608
|
+
translatedFlippedInnerRange,
|
|
135609
|
+
-translateBy,
|
|
135610
|
+
sequenceLength
|
|
135611
|
+
);
|
|
135514
135612
|
return flippedInnerRange;
|
|
135515
135613
|
}
|
|
135516
135614
|
function flipNonOriginSpanningContainedRange(innerRange, outerRange, sequenceLength) {
|
|
@@ -135682,9 +135780,15 @@
|
|
|
135682
135780
|
}
|
|
135683
135781
|
|
|
135684
135782
|
function zeroSubrangeByContainerRange(subRange, containerRange, sequenceLength) {
|
|
135685
|
-
const trimmedSubRange = trimRangeByAnotherRange(
|
|
135783
|
+
const trimmedSubRange = trimRangeByAnotherRange(
|
|
135784
|
+
subRange,
|
|
135785
|
+
containerRange,
|
|
135786
|
+
sequenceLength
|
|
135787
|
+
);
|
|
135686
135788
|
if (trimmedSubRange) {
|
|
135687
|
-
throw new Error(
|
|
135789
|
+
throw new Error(
|
|
135790
|
+
"subRange must be fully contained by containerRange! Otherwise this function does not make sense"
|
|
135791
|
+
);
|
|
135688
135792
|
}
|
|
135689
135793
|
const newSubrange = {};
|
|
135690
135794
|
newSubrange.start = subRange.start - containerRange.start;
|
|
@@ -135711,12 +135815,24 @@
|
|
|
135711
135815
|
}
|
|
135712
135816
|
|
|
135713
135817
|
function getZeroedRangeOverlaps(annotation, selection, sequenceLength) {
|
|
135714
|
-
const overlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135818
|
+
const overlaps = collapseOverlapsGeneratedFromRangeComparisonIfPossible(
|
|
135819
|
+
getOverlapsOfPotentiallyCircularRanges(
|
|
135820
|
+
annotation,
|
|
135821
|
+
selection,
|
|
135822
|
+
sequenceLength
|
|
135823
|
+
),
|
|
135824
|
+
sequenceLength,
|
|
135825
|
+
annotation
|
|
135826
|
+
);
|
|
135715
135827
|
const zeroedOverlaps = overlaps.map((overlap) => {
|
|
135716
|
-
return zeroSubrangeByContainerRange(
|
|
135717
|
-
|
|
135718
|
-
|
|
135719
|
-
|
|
135828
|
+
return zeroSubrangeByContainerRange(
|
|
135829
|
+
overlap,
|
|
135830
|
+
{
|
|
135831
|
+
start: selection.start,
|
|
135832
|
+
end: normalizePositionByRangeLength(selection.start - 1, sequenceLength)
|
|
135833
|
+
},
|
|
135834
|
+
sequenceLength
|
|
135835
|
+
);
|
|
135720
135836
|
});
|
|
135721
135837
|
return zeroedOverlaps;
|
|
135722
135838
|
}
|
|
@@ -142069,9 +142185,9 @@
|
|
|
142069
142185
|
function filterAminoAcidSequenceString(sequenceString, options) {
|
|
142070
142186
|
options = options || {};
|
|
142071
142187
|
if (options.includeStopCodon) {
|
|
142072
|
-
return sequenceString
|
|
142188
|
+
return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu.*]/gi, "");
|
|
142073
142189
|
}
|
|
142074
|
-
return sequenceString
|
|
142190
|
+
return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu]/gi, "");
|
|
142075
142191
|
}
|
|
142076
142192
|
|
|
142077
142193
|
function getDegenerateDnaStringFromAAString(aaString) {
|
|
@@ -142422,7 +142538,7 @@
|
|
|
142422
142538
|
calculateTemperature: function(sequence, type, A, R, C, Na) {
|
|
142423
142539
|
if (typeof type === "undefined") {
|
|
142424
142540
|
type = this.TABLE_BRESLAUER;
|
|
142425
|
-
} else if (type != this.TABLE_BRESLAUER &&
|
|
142541
|
+
} else if (type != this.TABLE_BRESLAUER && type != this.TABLE_UNIFIED && type != this.TABLE_SUGIMOTO) {
|
|
142426
142542
|
throw new Error("Invalid table type!");
|
|
142427
142543
|
}
|
|
142428
142544
|
if (!A) {
|
|
@@ -150681,12 +150797,7 @@
|
|
|
150681
150797
|
return matches;
|
|
150682
150798
|
}
|
|
150683
150799
|
function findSequenceMatchesTopStrand(sequence, searchString, options = {}) {
|
|
150684
|
-
const {
|
|
150685
|
-
isCircular,
|
|
150686
|
-
isAmbiguous,
|
|
150687
|
-
isProteinSequence,
|
|
150688
|
-
isProteinSearch
|
|
150689
|
-
} = options;
|
|
150800
|
+
const { isCircular, isAmbiguous, isProteinSequence, isProteinSearch } = options;
|
|
150690
150801
|
let searchStringToUse = escapeStringRegexp(searchString);
|
|
150691
150802
|
if (isAmbiguous) {
|
|
150692
150803
|
if (isProteinSearch || isProteinSequence) {
|
|
@@ -150768,7 +150879,10 @@
|
|
|
150768
150879
|
|
|
150769
150880
|
function getComplementSequenceString(sequence, isRna) {
|
|
150770
150881
|
let complementSeqString = "";
|
|
150771
|
-
const complementMap = lodashExports.merge(
|
|
150882
|
+
const complementMap = lodashExports.merge(
|
|
150883
|
+
DNAComplementMap,
|
|
150884
|
+
isRna ? { a: "u", A: "U" } : { a: "t", A: "T" }
|
|
150885
|
+
);
|
|
150772
150886
|
for (let i = 0; i < sequence.length; i++) {
|
|
150773
150887
|
let complementChar = complementMap[sequence[i]];
|
|
150774
150888
|
if (!complementChar) {
|
|
@@ -163439,10 +163553,7 @@
|
|
|
163439
163553
|
});
|
|
163440
163554
|
}
|
|
163441
163555
|
});
|
|
163442
|
-
const toRet = lodashExports.filter(
|
|
163443
|
-
resultArray,
|
|
163444
|
-
(r) => r?.parsedSequence?.sequence?.length
|
|
163445
|
-
);
|
|
163556
|
+
const toRet = lodashExports.filter(resultArray, (r) => r?.parsedSequence?.sequence?.length);
|
|
163446
163557
|
if (toRet.length)
|
|
163447
163558
|
return toRet;
|
|
163448
163559
|
return onFileParsed(resultArray);
|
|
@@ -163544,10 +163655,7 @@
|
|
|
163544
163655
|
messages: ["Error while parsing JBEI format"]
|
|
163545
163656
|
});
|
|
163546
163657
|
}
|
|
163547
|
-
const toRet = lodashExports.filter(
|
|
163548
|
-
resultArray,
|
|
163549
|
-
(r) => r?.parsedSequence?.sequence?.length
|
|
163550
|
-
);
|
|
163658
|
+
const toRet = lodashExports.filter(resultArray, (r) => r?.parsedSequence?.sequence?.length);
|
|
163551
163659
|
if (toRet.length)
|
|
163552
163660
|
return toRet;
|
|
163553
163661
|
return onFileParsed(resultArray);
|
|
@@ -166822,10 +166930,7 @@
|
|
|
166822
166930
|
lastSavedIdUpdate
|
|
166823
166931
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
166824
166932
|
|
|
166825
|
-
const toggleReadOnlyMode = createMetaAction(
|
|
166826
|
-
"TOGGLE_READ_ONLY_MODE",
|
|
166827
|
-
lodashExports.noop
|
|
166828
|
-
);
|
|
166933
|
+
const toggleReadOnlyMode = createMetaAction("TOGGLE_READ_ONLY_MODE", lodashExports.noop);
|
|
166829
166934
|
const updateReadOnlyMode = createMetaAction("UPDATE_READ_ONLY_MODE");
|
|
166830
166935
|
const readOnly = createReducer(
|
|
166831
166936
|
{
|
|
@@ -169804,6 +169909,9 @@
|
|
|
169804
169909
|
overrideName: `AddOrEdit${nameUpper}DialogOverride`,
|
|
169805
169910
|
dialogType,
|
|
169806
169911
|
props: {
|
|
169912
|
+
...annotation.isEditLocked && {
|
|
169913
|
+
readOnly: typeof annotation.isEditLocked === "string" ? annotation.isEditLocked : "This annotation is locked"
|
|
169914
|
+
},
|
|
169807
169915
|
dialogProps: {
|
|
169808
169916
|
title: annotation && annotation.id ? `Edit ${nameUpper}` : `New ${nameUpper}`
|
|
169809
169917
|
},
|
|
@@ -170445,7 +170553,8 @@
|
|
|
170445
170553
|
editorName,
|
|
170446
170554
|
sequenceData: sequenceDataFromProps,
|
|
170447
170555
|
allowSeqDataOverride,
|
|
170448
|
-
allowMultipleFeatureDirections
|
|
170556
|
+
allowMultipleFeatureDirections,
|
|
170557
|
+
readOnly
|
|
170449
170558
|
} = ownProps;
|
|
170450
170559
|
const editorState = getEditorState(state, editorName);
|
|
170451
170560
|
const meta = { editorName };
|
|
@@ -170505,6 +170614,7 @@
|
|
|
170505
170614
|
const f = getFindTool(findTool, matchesTotal);
|
|
170506
170615
|
return {
|
|
170507
170616
|
...editorState,
|
|
170617
|
+
readOnly: readOnly || editorState.readOnly,
|
|
170508
170618
|
meta,
|
|
170509
170619
|
annotationToAdd,
|
|
170510
170620
|
...newSelection && { selectionLayer: newSelection },
|
|
@@ -188651,7 +188761,7 @@ double click --> edit`}`;
|
|
|
188651
188761
|
}
|
|
188652
188762
|
|
|
188653
188763
|
const name = "@teselagen/ove";
|
|
188654
|
-
const version = "0.3.
|
|
188764
|
+
const version = "0.3.12";
|
|
188655
188765
|
const main = "./src/index.js";
|
|
188656
188766
|
const exports$1 = {
|
|
188657
188767
|
".": {
|
|
@@ -189193,6 +189303,184 @@ double click --> edit`}`;
|
|
|
189193
189303
|
);
|
|
189194
189304
|
}
|
|
189195
189305
|
|
|
189306
|
+
const style$i = '';
|
|
189307
|
+
|
|
189308
|
+
class ToolbarItem extends React$3.Component {
|
|
189309
|
+
toggleDropdown = ({ forceClose } = {}) => {
|
|
189310
|
+
const { toolName, isOpen } = this.props;
|
|
189311
|
+
this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
|
|
189312
|
+
};
|
|
189313
|
+
render() {
|
|
189314
|
+
const { overrides = {} } = this.props;
|
|
189315
|
+
const {
|
|
189316
|
+
isOpen,
|
|
189317
|
+
index,
|
|
189318
|
+
Icon: Icon$1,
|
|
189319
|
+
// dynamicIcon,
|
|
189320
|
+
onIconClick = lodashExports.noop,
|
|
189321
|
+
tooltip = "",
|
|
189322
|
+
tooltipToggled,
|
|
189323
|
+
dropdowntooltip = "",
|
|
189324
|
+
Dropdown,
|
|
189325
|
+
disabled,
|
|
189326
|
+
isHidden,
|
|
189327
|
+
renderIconAbove,
|
|
189328
|
+
noDropdownIcon,
|
|
189329
|
+
IconWrapper,
|
|
189330
|
+
editorName,
|
|
189331
|
+
popoverDisabled,
|
|
189332
|
+
IconWrapperProps,
|
|
189333
|
+
toolName,
|
|
189334
|
+
dropdownicon,
|
|
189335
|
+
tooltipDisabled,
|
|
189336
|
+
toggled = false,
|
|
189337
|
+
...rest
|
|
189338
|
+
} = { ...this.props, ...overrides };
|
|
189339
|
+
if (!toolName)
|
|
189340
|
+
console.warn("toolName is required!");
|
|
189341
|
+
if (isHidden)
|
|
189342
|
+
return null;
|
|
189343
|
+
let tooltipToDisplay = tooltip;
|
|
189344
|
+
if (toggled && tooltipToggled) {
|
|
189345
|
+
tooltipToDisplay = tooltipToggled;
|
|
189346
|
+
}
|
|
189347
|
+
const buttonTarget = /* @__PURE__ */ React$3.createElement(
|
|
189348
|
+
"div",
|
|
189349
|
+
{
|
|
189350
|
+
className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
|
|
189351
|
+
},
|
|
189352
|
+
renderIconAbove && /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarItem" }, Icon$1)),
|
|
189353
|
+
Icon$1 && !renderIconAbove && /* @__PURE__ */ React$3.createElement(
|
|
189354
|
+
Tooltip,
|
|
189355
|
+
{
|
|
189356
|
+
disabled: tooltipDisabled,
|
|
189357
|
+
portalClassName: "ve-toolbar-item-popover",
|
|
189358
|
+
content: tooltipToDisplay
|
|
189359
|
+
},
|
|
189360
|
+
/* @__PURE__ */ React$3.createElement(
|
|
189361
|
+
AnchorButton,
|
|
189362
|
+
{
|
|
189363
|
+
intent: Intent.PRIMARY,
|
|
189364
|
+
onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
|
|
189365
|
+
active: toggled,
|
|
189366
|
+
disabled,
|
|
189367
|
+
minimal: true,
|
|
189368
|
+
icon: React$3.isValidElement(Icon$1) ? Icon$1 : /* @__PURE__ */ React$3.createElement(Icon$1, { toggleDropdown: this.toggleDropdown })
|
|
189369
|
+
}
|
|
189370
|
+
)
|
|
189371
|
+
),
|
|
189372
|
+
Dropdown && !noDropdownIcon ? /* @__PURE__ */ React$3.createElement(Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React$3.createElement(
|
|
189373
|
+
"div",
|
|
189374
|
+
{
|
|
189375
|
+
className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
|
|
189376
|
+
onClick: this.toggleDropdown
|
|
189377
|
+
},
|
|
189378
|
+
dropdownicon ? /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React$3.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React$3.createElement(
|
|
189379
|
+
Icon,
|
|
189380
|
+
{
|
|
189381
|
+
"data-test": toolName + "Dropdown",
|
|
189382
|
+
iconSize: 13,
|
|
189383
|
+
icon: "caret-up"
|
|
189384
|
+
}
|
|
189385
|
+
) : /* @__PURE__ */ React$3.createElement(
|
|
189386
|
+
Icon,
|
|
189387
|
+
{
|
|
189388
|
+
"data-test": toolName + "Dropdown",
|
|
189389
|
+
iconSize: 13,
|
|
189390
|
+
icon: "caret-down"
|
|
189391
|
+
}
|
|
189392
|
+
)
|
|
189393
|
+
)) : null
|
|
189394
|
+
);
|
|
189395
|
+
const content = /* @__PURE__ */ React$3.createElement(
|
|
189396
|
+
"div",
|
|
189397
|
+
{
|
|
189398
|
+
ref: (n) => {
|
|
189399
|
+
if (n)
|
|
189400
|
+
this.dropdownNode = n;
|
|
189401
|
+
},
|
|
189402
|
+
style: { padding: 10, minWidth: 250, maxWidth: 350 },
|
|
189403
|
+
className: "ve-toolbar-dropdown content"
|
|
189404
|
+
},
|
|
189405
|
+
Dropdown && /* @__PURE__ */ React$3.createElement(
|
|
189406
|
+
Dropdown,
|
|
189407
|
+
{
|
|
189408
|
+
...rest,
|
|
189409
|
+
editorName,
|
|
189410
|
+
toggleDropdown: this.toggleDropdown
|
|
189411
|
+
}
|
|
189412
|
+
)
|
|
189413
|
+
);
|
|
189414
|
+
const target = IconWrapper ? /* @__PURE__ */ React$3.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React$3.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React$3.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
|
|
189415
|
+
return /* @__PURE__ */ React$3.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React$3.createElement(
|
|
189416
|
+
Popover,
|
|
189417
|
+
{
|
|
189418
|
+
disabled: popoverDisabled,
|
|
189419
|
+
isOpen: !!Dropdown && isOpen,
|
|
189420
|
+
onClose: (e) => {
|
|
189421
|
+
let srcElement;
|
|
189422
|
+
if (e) {
|
|
189423
|
+
srcElement = e.srcElement || e.target;
|
|
189424
|
+
}
|
|
189425
|
+
if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
|
|
189426
|
+
return;
|
|
189427
|
+
}
|
|
189428
|
+
this.toggleDropdown({ forceClose: true });
|
|
189429
|
+
},
|
|
189430
|
+
canEscapeKeyClose: true,
|
|
189431
|
+
minimal: true,
|
|
189432
|
+
position: Position.BOTTOM,
|
|
189433
|
+
target,
|
|
189434
|
+
content
|
|
189435
|
+
}
|
|
189436
|
+
));
|
|
189437
|
+
}
|
|
189438
|
+
}
|
|
189439
|
+
const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
|
|
189440
|
+
isOpen: toolBar.openItem === toolName
|
|
189441
|
+
}))(ToolbarItem);
|
|
189442
|
+
|
|
189443
|
+
const editTool = connectToEditor((editorState) => {
|
|
189444
|
+
return {
|
|
189445
|
+
readOnly: editorState.readOnly
|
|
189446
|
+
};
|
|
189447
|
+
})((props) => {
|
|
189448
|
+
const { toolbarItemProps, readOnly, disableSetReadOnly } = props;
|
|
189449
|
+
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
189450
|
+
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
189451
|
+
if (isLoading) {
|
|
189452
|
+
return "Loading...";
|
|
189453
|
+
} else if (disableSetReadOnly2) {
|
|
189454
|
+
return "You do not have permission to edit locks on this sequence";
|
|
189455
|
+
}
|
|
189456
|
+
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
189457
|
+
};
|
|
189458
|
+
return /* @__PURE__ */ React$3.createElement(
|
|
189459
|
+
ToolbarItem$1,
|
|
189460
|
+
{
|
|
189461
|
+
...{
|
|
189462
|
+
disabled: isLoading || disableSetReadOnly,
|
|
189463
|
+
Icon: /* @__PURE__ */ React$3.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
189464
|
+
onIconClick: () => handleReadOnlyChange(!readOnly, { ...props, setIsLoading }),
|
|
189465
|
+
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
|
189466
|
+
...toolbarItemProps
|
|
189467
|
+
}
|
|
189468
|
+
}
|
|
189469
|
+
);
|
|
189470
|
+
});
|
|
189471
|
+
async function handleReadOnlyChange(newVal, { beforeReadOnlyChange, updateReadOnlyMode, setIsLoading = () => {
|
|
189472
|
+
} }) {
|
|
189473
|
+
if (beforeReadOnlyChange) {
|
|
189474
|
+
setIsLoading(true);
|
|
189475
|
+
const shouldChange = await beforeReadOnlyChange(newVal);
|
|
189476
|
+
setIsLoading(false);
|
|
189477
|
+
if (shouldChange === false) {
|
|
189478
|
+
return;
|
|
189479
|
+
}
|
|
189480
|
+
}
|
|
189481
|
+
updateReadOnlyMode(newVal);
|
|
189482
|
+
}
|
|
189483
|
+
|
|
189196
189484
|
const isProtein = (props) => props.sequenceData && props.sequenceData.isProtein;
|
|
189197
189485
|
const isOligo = (props) => props.sequenceData && props.sequenceData.isOligo;
|
|
189198
189486
|
const isRna = (props) => props.sequenceData && props.sequenceData.isRna;
|
|
@@ -189261,7 +189549,7 @@ double click --> edit`}`;
|
|
|
189261
189549
|
isHidden: isProtein
|
|
189262
189550
|
},
|
|
189263
189551
|
deleteSequence: {
|
|
189264
|
-
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || !props.onDelete,
|
|
189552
|
+
isDisabled: (props) => props.disableBpEditing && bpEditingDisabledTooltip || props.readOnly && readOnlyDisabledTooltip || !props.onDelete,
|
|
189265
189553
|
isHidden: (props) => !props.onDelete,
|
|
189266
189554
|
handler: (props) => props.onDelete(props.sequenceData)
|
|
189267
189555
|
},
|
|
@@ -189276,7 +189564,7 @@ double click --> edit`}`;
|
|
|
189276
189564
|
isDisabled: (props) => props.disableSetReadOnly || !props.onSave,
|
|
189277
189565
|
isHidden: (props) => !props.toggleReadOnlyMode,
|
|
189278
189566
|
isActive: (props) => props.readOnly,
|
|
189279
|
-
handler: (props) => props.
|
|
189567
|
+
handler: (props) => handleReadOnlyChange(!props.readOnly, props)
|
|
189280
189568
|
},
|
|
189281
189569
|
importSequence: {
|
|
189282
189570
|
isHidden: (props) => props.hideSingleImport,
|
|
@@ -189460,6 +189748,7 @@ double click --> edit`}`;
|
|
|
189460
189748
|
};
|
|
189461
189749
|
});
|
|
189462
189750
|
const readOnlyDisabledTooltip = "Sorry this function is not allowed in Read-Only Mode";
|
|
189751
|
+
const bpEditingDisabledTooltip = "Sequence Editing Disabled";
|
|
189463
189752
|
const noSelection = ({ selectionLayer = {} }) => !(selectionLayer.start > -1 && selectionLayer.end > -1) && "Selection Required";
|
|
189464
189753
|
const triggerClipboardCommand = (type) => {
|
|
189465
189754
|
const wrapper = document.querySelector(".veVectorInteractionWrapper");
|
|
@@ -189491,8 +189780,8 @@ double click --> edit`}`;
|
|
|
189491
189780
|
handler: lodashExports.noop
|
|
189492
189781
|
},
|
|
189493
189782
|
cut: {
|
|
189494
|
-
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0,
|
|
189495
|
-
isHidden: (props) => props.readOnly,
|
|
189783
|
+
isDisabled: (props) => props.disableBpEditing && bpEditingDisabledTooltip || props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0,
|
|
189784
|
+
isHidden: (props) => props.readOnly || props.disableBpEditing,
|
|
189496
189785
|
handler: () => {
|
|
189497
189786
|
triggerClipboardCommand("cut");
|
|
189498
189787
|
},
|
|
@@ -189517,7 +189806,7 @@ double click --> edit`}`;
|
|
|
189517
189806
|
},
|
|
189518
189807
|
paste: {
|
|
189519
189808
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip,
|
|
189520
|
-
isHidden: (props) => props.readOnly,
|
|
189809
|
+
isHidden: (props) => props.readOnly || props.disableBpEditing,
|
|
189521
189810
|
handler: () => triggerClipboardCommand("paste"),
|
|
189522
189811
|
hotkey: "mod+v"
|
|
189523
189812
|
},
|
|
@@ -189671,12 +189960,12 @@ double click --> edit`}`;
|
|
|
189671
189960
|
hotkey: "mod+i"
|
|
189672
189961
|
},
|
|
189673
189962
|
complementSelection: {
|
|
189674
|
-
isHidden: (props) => props.readOnly || isProtein(props),
|
|
189963
|
+
isHidden: (props) => props.readOnly || isProtein(props) || props.disableBpEditing,
|
|
189675
189964
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || noSelection(props),
|
|
189676
189965
|
handler: (props) => props.handleComplementSelection()
|
|
189677
189966
|
},
|
|
189678
189967
|
complementEntireSequence: {
|
|
189679
|
-
isHidden: (props) => props.readOnly || isProtein(props),
|
|
189968
|
+
isHidden: (props) => props.readOnly || isProtein(props) || props.disableBpEditing,
|
|
189680
189969
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0,
|
|
189681
189970
|
handler: (props) => props.handleComplementSequence()
|
|
189682
189971
|
},
|
|
@@ -189828,13 +190117,13 @@ double click --> edit`}`;
|
|
|
189828
190117
|
// }
|
|
189829
190118
|
// },
|
|
189830
190119
|
reverseComplementSelection: {
|
|
189831
|
-
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || noSelection(props),
|
|
190120
|
+
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || noSelection(props) || props.disableBpEditing,
|
|
189832
190121
|
isHidden: (props) => props.readOnly || isProtein(props),
|
|
189833
190122
|
handler: (props) => props.handleReverseComplementSelection(),
|
|
189834
190123
|
hotkey: "mod+e"
|
|
189835
190124
|
},
|
|
189836
190125
|
reverseComplementEntireSequence: {
|
|
189837
|
-
isHidden: (props) => props.readOnly || isProtein(props),
|
|
190126
|
+
isHidden: (props) => props.readOnly || isProtein(props) || props.disableBpEditing,
|
|
189838
190127
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0,
|
|
189839
190128
|
handler: (props) => props.handleReverseComplementSequence()
|
|
189840
190129
|
},
|
|
@@ -189984,7 +190273,7 @@ double click --> edit`}`;
|
|
|
189984
190273
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0
|
|
189985
190274
|
},
|
|
189986
190275
|
rotateToCaretPosition: {
|
|
189987
|
-
isHidden: (props) => props.readOnly || isProtein(props),
|
|
190276
|
+
isHidden: (props) => props.readOnly || isProtein(props) || props.disableBpEditing,
|
|
189988
190277
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip || props.caretPosition === -1 && "You must first place cursor" || !props.sequenceData.circular && "Disabled for Linear Sequences" || props.sequenceLength === 0,
|
|
189989
190278
|
handler: (props) => props.handleRotateToCaretPosition(),
|
|
189990
190279
|
hotkey: "mod+b"
|
|
@@ -189993,13 +190282,13 @@ double click --> edit`}`;
|
|
|
189993
190282
|
};
|
|
189994
190283
|
const cirularityCommandDefs = {
|
|
189995
190284
|
circular: {
|
|
189996
|
-
isHidden: (props) => props.readOnly || isProtein(props),
|
|
190285
|
+
isHidden: (props) => props.readOnly || isProtein(props) || props.disableBpEditing,
|
|
189997
190286
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip,
|
|
189998
190287
|
handler: (props) => props.updateCircular(true),
|
|
189999
190288
|
isActive: (props) => props && props.sequenceData.circular
|
|
190000
190289
|
},
|
|
190001
190290
|
linear: {
|
|
190002
|
-
isHidden: (props) => props.readOnly,
|
|
190291
|
+
isHidden: (props) => props.readOnly || props.disableBpEditing,
|
|
190003
190292
|
isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip,
|
|
190004
190293
|
handler: (props) => props.updateCircular(false),
|
|
190005
190294
|
isActive: (props) => props && !props.sequenceData.circular
|
|
@@ -190026,29 +190315,27 @@ double click --> edit`}`;
|
|
|
190026
190315
|
}
|
|
190027
190316
|
];
|
|
190028
190317
|
const labelToggleCommandDefs = {};
|
|
190029
|
-
["feature", "part", "cutsite", "primer", ...nicheAnnotations].forEach(
|
|
190030
|
-
|
|
190031
|
-
|
|
190032
|
-
|
|
190033
|
-
|
|
190034
|
-
|
|
190035
|
-
|
|
190036
|
-
|
|
190037
|
-
|
|
190038
|
-
|
|
190039
|
-
|
|
190040
|
-
|
|
190041
|
-
|
|
190042
|
-
|
|
190043
|
-
|
|
190044
|
-
|
|
190045
|
-
|
|
190046
|
-
|
|
190047
|
-
|
|
190048
|
-
|
|
190049
|
-
|
|
190050
|
-
}
|
|
190051
|
-
);
|
|
190318
|
+
["feature", "part", "cutsite", "primer", ...nicheAnnotations].forEach((_type) => {
|
|
190319
|
+
let rest = {};
|
|
190320
|
+
let type = _type;
|
|
190321
|
+
if (_type.type) {
|
|
190322
|
+
type = _type.type.slice(0, -1);
|
|
190323
|
+
rest = _type;
|
|
190324
|
+
}
|
|
190325
|
+
const cmdId = `toggle${lodashExports.upperFirst(type)}Labels`;
|
|
190326
|
+
const plural = type + "s";
|
|
190327
|
+
labelToggleCommandDefs[cmdId] = {
|
|
190328
|
+
toggle: ["show", "hide"],
|
|
190329
|
+
handler: (props) => props.annotationLabelVisibilityToggle(plural),
|
|
190330
|
+
isHidden: (props) => {
|
|
190331
|
+
return props && props.typesToOmit && props.typesToOmit[plural] === false;
|
|
190332
|
+
},
|
|
190333
|
+
...rest,
|
|
190334
|
+
isActive: (props) => {
|
|
190335
|
+
return props && props.annotationLabelVisibility[plural];
|
|
190336
|
+
}
|
|
190337
|
+
};
|
|
190338
|
+
});
|
|
190052
190339
|
const editAnnotationCommandDefs = ["feature", "part", "primer"].reduce(
|
|
190053
190340
|
(acc, key) => {
|
|
190054
190341
|
acc[`edit${lodashExports.upperFirst(key)}`] = {
|
|
@@ -191621,8 +191908,12 @@ double click --> edit`}`;
|
|
|
191621
191908
|
caretPosition = -1,
|
|
191622
191909
|
selectionLayer = { start: -1, end: -1 },
|
|
191623
191910
|
readOnly,
|
|
191624
|
-
onPaste
|
|
191911
|
+
onPaste,
|
|
191912
|
+
disableBpEditing
|
|
191625
191913
|
} = this.props;
|
|
191914
|
+
if (disableBpEditing) {
|
|
191915
|
+
return window.toastr.warning("Sorry the underlying sequence is locked");
|
|
191916
|
+
}
|
|
191626
191917
|
if (readOnly) {
|
|
191627
191918
|
return window.toastr.warning("Sorry the sequence is Read-Only");
|
|
191628
191919
|
}
|
|
@@ -191663,6 +191954,7 @@ double click --> edit`}`;
|
|
|
191663
191954
|
sequenceData,
|
|
191664
191955
|
selectionLayer,
|
|
191665
191956
|
copyOptions,
|
|
191957
|
+
disableBpEditing,
|
|
191666
191958
|
readOnly
|
|
191667
191959
|
} = this.props;
|
|
191668
191960
|
const onCut = this.props.onCut || this.props.onCopy || lodashExports.noop;
|
|
@@ -191688,7 +191980,7 @@ double click --> edit`}`;
|
|
|
191688
191980
|
);
|
|
191689
191981
|
if (!(this.sequenceDataToCopy || {}).textToCopy && !seqData.sequence.length)
|
|
191690
191982
|
return window.toastr.warning(
|
|
191691
|
-
`No Sequence Selected To ${isCut && !readOnly ? "Cut" : "Copy"}`
|
|
191983
|
+
`No Sequence Selected To ${isCut && !(readOnly || disableBpEditing) ? "Cut" : "Copy"}`
|
|
191692
191984
|
);
|
|
191693
191985
|
const clipboardData = e.clipboardData;
|
|
191694
191986
|
const textToCopy = (this.sequenceDataToCopy || {}).textToCopy !== void 0 ? this.sequenceDataToCopy.textToCopy : seqData.isProtein ? seqData.proteinSequence : seqData.sequence;
|
|
@@ -191696,7 +191988,7 @@ double click --> edit`}`;
|
|
|
191696
191988
|
clipboardData.setData("text/plain", textToCopy);
|
|
191697
191989
|
clipboardData.setData("application/json", JSON.stringify(seqData));
|
|
191698
191990
|
e.preventDefault();
|
|
191699
|
-
if (isCut && !readOnly) {
|
|
191991
|
+
if (isCut && !(readOnly || disableBpEditing) && !disableBpEditing) {
|
|
191700
191992
|
this.handleDnaDelete(false);
|
|
191701
191993
|
onCut(
|
|
191702
191994
|
e,
|
|
@@ -191709,7 +192001,7 @@ double click --> edit`}`;
|
|
|
191709
192001
|
document.body.removeEventListener("copy", this.handleCopy);
|
|
191710
192002
|
}
|
|
191711
192003
|
window.toastr.success(
|
|
191712
|
-
`Selection ${isCut && !readOnly ? "Cut" : "Copied"}`
|
|
192004
|
+
`Selection ${isCut && !(readOnly || disableBpEditing) && !disableBpEditing ? "Cut" : "Copied"}`
|
|
191713
192005
|
);
|
|
191714
192006
|
this.sequenceDataToCopy = void 0;
|
|
191715
192007
|
};
|
|
@@ -191720,14 +192012,18 @@ double click --> edit`}`;
|
|
|
191720
192012
|
caretPosition = -1,
|
|
191721
192013
|
selectionLayer = { start: -1, end: -1 },
|
|
191722
192014
|
sequenceData = { sequence: "" },
|
|
191723
|
-
readOnly
|
|
192015
|
+
readOnly,
|
|
192016
|
+
disableBpEditing
|
|
191724
192017
|
// updateSequenceData,
|
|
191725
192018
|
// wrappedInsertSequenceDataAtPositionOrRange
|
|
191726
192019
|
// handleInsert
|
|
191727
192020
|
} = this.props;
|
|
191728
192021
|
const sequenceLength = sequenceData.sequence.length;
|
|
191729
192022
|
const isReplace = selectionLayer.start > -1;
|
|
191730
|
-
if (
|
|
192023
|
+
if (disableBpEditing) {
|
|
192024
|
+
return window.toastr.warning("Sorry the underlying sequence is locked");
|
|
192025
|
+
}
|
|
192026
|
+
if (readOnly || disableBpEditing) {
|
|
191731
192027
|
window.toastr.warning("Sorry the sequence is Read-Only");
|
|
191732
192028
|
} else {
|
|
191733
192029
|
createSequenceInputPopup({
|
|
@@ -191755,13 +192051,17 @@ double click --> edit`}`;
|
|
|
191755
192051
|
selectionLayer = { start: -1, end: -1 },
|
|
191756
192052
|
sequenceData = { sequence: "" },
|
|
191757
192053
|
readOnly,
|
|
192054
|
+
disableBpEditing,
|
|
191758
192055
|
updateSequenceData,
|
|
191759
192056
|
wrappedInsertSequenceDataAtPositionOrRange,
|
|
191760
192057
|
caretPositionUpdate
|
|
191761
192058
|
// handleInsert
|
|
191762
192059
|
} = this.props;
|
|
191763
192060
|
const sequenceLength = sequenceData.sequence.length;
|
|
191764
|
-
if (
|
|
192061
|
+
if (disableBpEditing) {
|
|
192062
|
+
return window.toastr.warning("Sorry the underlying sequence is locked");
|
|
192063
|
+
}
|
|
192064
|
+
if (readOnly || disableBpEditing) {
|
|
191765
192065
|
return window.toastr.warning("Sorry the sequence is Read-Only");
|
|
191766
192066
|
}
|
|
191767
192067
|
if (sequenceLength > 0) {
|
|
@@ -191892,7 +192192,7 @@ double click --> edit`}`;
|
|
|
191892
192192
|
};
|
|
191893
192193
|
// eslint-disable-next-line no-unused-vars
|
|
191894
192194
|
getCopyOptions = (annotation) => {
|
|
191895
|
-
const { sequenceData, readOnly, selectionLayer } = this.props;
|
|
192195
|
+
const { sequenceData, readOnly, disableBpEditing, selectionLayer } = this.props;
|
|
191896
192196
|
const { isProtein } = sequenceData;
|
|
191897
192197
|
const makeTextCopyable = (transformFunc, className, action = "copy") => {
|
|
191898
192198
|
return new Clipboard$1(`.${className}`, {
|
|
@@ -191952,7 +192252,7 @@ double click --> edit`}`;
|
|
|
191952
192252
|
}
|
|
191953
192253
|
};
|
|
191954
192254
|
return [
|
|
191955
|
-
...readOnly ? [] : [
|
|
192255
|
+
...readOnly || disableBpEditing ? [] : [
|
|
191956
192256
|
{
|
|
191957
192257
|
text: "Replace",
|
|
191958
192258
|
...this.insertHelper
|
|
@@ -192026,21 +192326,14 @@ double click --> edit`}`;
|
|
|
192026
192326
|
this.openVeCopyAAReverse && this.openVeCopyAAReverse.destroy();
|
|
192027
192327
|
},
|
|
192028
192328
|
didMount: ({ className }) => {
|
|
192029
|
-
this.openVeCopyAAReverse = makeTextCopyable(
|
|
192030
|
-
(selectedSeqData)
|
|
192031
|
-
|
|
192032
|
-
|
|
192033
|
-
|
|
192034
|
-
|
|
192035
|
-
|
|
192036
|
-
|
|
192037
|
-
return {
|
|
192038
|
-
...revSeqData,
|
|
192039
|
-
textToCopy
|
|
192040
|
-
};
|
|
192041
|
-
},
|
|
192042
|
-
className
|
|
192043
|
-
);
|
|
192329
|
+
this.openVeCopyAAReverse = makeTextCopyable((selectedSeqData) => {
|
|
192330
|
+
const revSeqData = getReverseComplementSequenceAndAnnoations(selectedSeqData);
|
|
192331
|
+
const textToCopy = isProtein ? revSeqData.proteinSequence.toUpperCase() : getAminoAcidStringFromSequenceString(revSeqData.sequence);
|
|
192332
|
+
return {
|
|
192333
|
+
...revSeqData,
|
|
192334
|
+
textToCopy
|
|
192335
|
+
};
|
|
192336
|
+
}, className);
|
|
192044
192337
|
}
|
|
192045
192338
|
},
|
|
192046
192339
|
{
|
|
@@ -192147,11 +192440,12 @@ double click --> edit`}`;
|
|
|
192147
192440
|
({ nearestCaretPos, shiftHeld, event }) => {
|
|
192148
192441
|
this.updateSelectionOrCaret(shiftHeld, nearestCaretPos);
|
|
192149
192442
|
const {
|
|
192150
|
-
readOnly
|
|
192443
|
+
readOnly,
|
|
192444
|
+
disableBpEditing
|
|
192151
192445
|
// sequenceData: { circular }
|
|
192152
192446
|
} = this.props;
|
|
192153
192447
|
const menu = [
|
|
192154
|
-
...readOnly ? [] : [
|
|
192448
|
+
...readOnly || disableBpEditing ? [] : [
|
|
192155
192449
|
{
|
|
192156
192450
|
text: "Insert",
|
|
192157
192451
|
...this.insertHelper
|
|
@@ -192197,8 +192491,7 @@ double click --> edit`}`;
|
|
|
192197
192491
|
overlapsSelf: annotation.overlapsSelf
|
|
192198
192492
|
});
|
|
192199
192493
|
return [
|
|
192200
|
-
"
|
|
192201
|
-
"deletePart",
|
|
192494
|
+
...getEditDeleteHandlers("Part", annotation),
|
|
192202
192495
|
"--",
|
|
192203
192496
|
...this.getSelectionMenuOptions(annotation),
|
|
192204
192497
|
"--",
|
|
@@ -192240,8 +192533,7 @@ double click --> edit`}`;
|
|
|
192240
192533
|
event.persist();
|
|
192241
192534
|
const { readOnly, annotationsToSupport: { parts } = {} } = this.props;
|
|
192242
192535
|
return [
|
|
192243
|
-
"
|
|
192244
|
-
"deleteFeature",
|
|
192536
|
+
...getEditDeleteHandlers("Feature", annotation),
|
|
192245
192537
|
...this.getSelectionMenuOptions(annotation),
|
|
192246
192538
|
...readOnly ? [] : [
|
|
192247
192539
|
...parts && [
|
|
@@ -192308,8 +192600,7 @@ double click --> edit`}`;
|
|
|
192308
192600
|
end: annotation.end
|
|
192309
192601
|
});
|
|
192310
192602
|
return [
|
|
192311
|
-
"
|
|
192312
|
-
"deletePrimer",
|
|
192603
|
+
...getEditDeleteHandlers("Primer", annotation),
|
|
192313
192604
|
...this.getSelectionMenuOptions(annotation),
|
|
192314
192605
|
"showRemoveDuplicatesDialogPrimers",
|
|
192315
192606
|
"viewPrimerProperties"
|
|
@@ -192519,8 +192810,30 @@ double click --> edit`}`;
|
|
|
192519
192810
|
end: newSelectionLayerEnd % newSeqData.sequence.length
|
|
192520
192811
|
});
|
|
192521
192812
|
};
|
|
192813
|
+
function getEditDeleteHandlers(type, annotation) {
|
|
192814
|
+
return [
|
|
192815
|
+
...annotation.isEditLocked ? [
|
|
192816
|
+
{
|
|
192817
|
+
shouldDismissPopover: false,
|
|
192818
|
+
text: /* @__PURE__ */ React$3.createElement(
|
|
192819
|
+
"div",
|
|
192820
|
+
{
|
|
192821
|
+
style: {
|
|
192822
|
+
fontSize: 11,
|
|
192823
|
+
fontStyle: "italic",
|
|
192824
|
+
color: "rgba(0,0,0,.5)"
|
|
192825
|
+
}
|
|
192826
|
+
},
|
|
192827
|
+
typeof annotation.isEditLocked === "string" ? annotation.isEditLocked : `Note: This Annotation is Locked`
|
|
192828
|
+
)
|
|
192829
|
+
}
|
|
192830
|
+
] : [],
|
|
192831
|
+
`edit${type}`,
|
|
192832
|
+
...annotation.isEditLocked ? [] : [`delete${type}`]
|
|
192833
|
+
];
|
|
192834
|
+
}
|
|
192522
192835
|
|
|
192523
|
-
const style$
|
|
192836
|
+
const style$h = '';
|
|
192524
192837
|
|
|
192525
192838
|
function SequenceName({ sequenceName, sequenceLength, isProtein }) {
|
|
192526
192839
|
return /* @__PURE__ */ React$3.createElement("div", { key: "circViewSvgCenterText", style: { textAlign: "center" } }, /* @__PURE__ */ React$3.createElement("span", null, sequenceName, " "), /* @__PURE__ */ React$3.createElement("br", null), /* @__PURE__ */ React$3.createElement("span", null, isProtein ? `${Math.floor(sequenceLength / 3)} AAs` : `${sequenceLength} bps`));
|
|
@@ -194906,7 +195219,7 @@ double click --> edit`}`;
|
|
|
194906
195219
|
);
|
|
194907
195220
|
}
|
|
194908
195221
|
|
|
194909
|
-
const style$
|
|
195222
|
+
const style$g = '';
|
|
194910
195223
|
|
|
194911
195224
|
const simpleDialog = '';
|
|
194912
195225
|
|
|
@@ -195183,7 +195496,7 @@ double click --> edit`}`;
|
|
|
195183
195496
|
return combinedLabels;
|
|
195184
195497
|
}
|
|
195185
195498
|
|
|
195186
|
-
const style$
|
|
195499
|
+
const style$f = '';
|
|
195187
195500
|
|
|
195188
195501
|
const fontWidthToFontSize = 1.75;
|
|
195189
195502
|
const getTextLength = (text) => {
|
|
@@ -197386,7 +197699,7 @@ double click --> edit`}`;
|
|
|
197386
197699
|
}
|
|
197387
197700
|
const DrawAnnotation = withHover(DrawAnnotationInner);
|
|
197388
197701
|
|
|
197389
|
-
const style$
|
|
197702
|
+
const style$e = '';
|
|
197390
197703
|
|
|
197391
197704
|
function c(u,e,c){var i=this,a=reactExports.useRef(null),o=reactExports.useRef(0),f=reactExports.useRef(null),l=reactExports.useRef([]),m=reactExports.useRef(),v=reactExports.useRef(),d=reactExports.useRef(u),p=reactExports.useRef(!0);reactExports.useEffect(function(){d.current=u;},[u]);var g=!e&&0!==e&&"undefined"!=typeof window;if("function"!=typeof u)throw new TypeError("Expected a function");e=+e||0;var w=!!(c=c||{}).leading,s=!("trailing"in c)||!!c.trailing,x="maxWait"in c,y=x?Math.max(+c.maxWait||0,e):null;reactExports.useEffect(function(){return p.current=!0,function(){p.current=!1;}},[]);var h=reactExports.useMemo(function(){var r=function(r){var n=l.current,t=m.current;return l.current=m.current=null,o.current=r,v.current=d.current.apply(t,n)},n=function(r,n){g&&cancelAnimationFrame(f.current),f.current=g?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!p.current)return !1;var n=r-a.current;return !a.current||n>=e||n<0||x&&r-o.current>=y},u=function(n){return f.current=null,s&&l.current?r(n):(l.current=m.current=null,v.current)},c=function r(){var c=Date.now();if(t(c))return u(c);if(p.current){var i=e-(c-a.current),f=x?Math.min(i,y-(c-o.current)):i;n(r,f);}},h=function(){var u=Date.now(),d=t(u);if(l.current=[].slice.call(arguments),m.current=i,a.current=u,d){if(!f.current&&p.current)return o.current=a.current,n(c,e),w?r(a.current):v.current;if(x)return n(c,e),r(a.current)}return f.current||n(c,e),v.current};return h.cancel=function(){f.current&&(g?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=m.current=f.current=null;},h.isPending=function(){return !!f.current},h.flush=function(){return f.current?u(Date.now()):v.current},h},[w,x,e,y,s,g]);return h}
|
|
197392
197705
|
|
|
@@ -198319,7 +198632,7 @@ double click --> edit`}`;
|
|
|
198319
198632
|
}
|
|
198320
198633
|
const CircularView$1 = withEditorInteractions(CircularView);
|
|
198321
198634
|
|
|
198322
|
-
const style$
|
|
198635
|
+
const style$d = '';
|
|
198323
198636
|
|
|
198324
198637
|
class PrintDialog extends React$3.Component {
|
|
198325
198638
|
state = {
|
|
@@ -198800,7 +199113,7 @@ double click --> edit`}`;
|
|
|
198800
199113
|
tgFormValues("ignoreName", "ignoreStrand", "ignoreStartAndEnd")
|
|
198801
199114
|
)(RemoveDuplicatesDialog);
|
|
198802
199115
|
|
|
198803
|
-
const style$
|
|
199116
|
+
const style$c = '';
|
|
198804
199117
|
|
|
198805
199118
|
var isMobile$2 = {exports: {}};
|
|
198806
199119
|
|
|
@@ -199676,7 +199989,11 @@ double click --> edit`}`;
|
|
|
199676
199989
|
}
|
|
199677
199990
|
}
|
|
199678
199991
|
],
|
|
199679
|
-
withDialogProps: {
|
|
199992
|
+
withDialogProps: {
|
|
199993
|
+
title: "Go To",
|
|
199994
|
+
height: 190,
|
|
199995
|
+
onCloseHook: tryToRefocusEditor
|
|
199996
|
+
}
|
|
199680
199997
|
});
|
|
199681
199998
|
|
|
199682
199999
|
const validate$1 = (val, vals, props) => {
|
|
@@ -199818,7 +200135,7 @@ double click --> edit`}`;
|
|
|
199818
200135
|
return normalizedVal;
|
|
199819
200136
|
};
|
|
199820
200137
|
|
|
199821
|
-
const style$
|
|
200138
|
+
const style$b = '';
|
|
199822
200139
|
|
|
199823
200140
|
const EnzymeViewer = ({
|
|
199824
200141
|
extraClasses = "",
|
|
@@ -199893,7 +200210,7 @@ double click --> edit`}`;
|
|
|
199893
200210
|
);
|
|
199894
200211
|
};
|
|
199895
200212
|
|
|
199896
|
-
const style$
|
|
200213
|
+
const style$a = '';
|
|
199897
200214
|
|
|
199898
200215
|
const upsertLocalEnzymeGroups = (newGroups) => {
|
|
199899
200216
|
const existingGroups = window.getExistingEnzymeGroups();
|
|
@@ -200589,7 +200906,7 @@ double click --> edit`}`;
|
|
|
200589
200906
|
);
|
|
200590
200907
|
});
|
|
200591
200908
|
|
|
200592
|
-
const style$
|
|
200909
|
+
const style$9 = '';
|
|
200593
200910
|
|
|
200594
200911
|
const CreateCustomEnzyme = function(props) {
|
|
200595
200912
|
const paddingStart = "-------";
|
|
@@ -201414,143 +201731,6 @@ double click --> edit`}`;
|
|
|
201414
201731
|
return isHidden;
|
|
201415
201732
|
}
|
|
201416
201733
|
|
|
201417
|
-
const style$9 = '';
|
|
201418
|
-
|
|
201419
|
-
class ToolbarItem extends React$3.Component {
|
|
201420
|
-
toggleDropdown = ({ forceClose } = {}) => {
|
|
201421
|
-
const { toolName, isOpen } = this.props;
|
|
201422
|
-
this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
|
|
201423
|
-
};
|
|
201424
|
-
render() {
|
|
201425
|
-
const { overrides = {} } = this.props;
|
|
201426
|
-
const {
|
|
201427
|
-
isOpen,
|
|
201428
|
-
index,
|
|
201429
|
-
Icon: Icon$1,
|
|
201430
|
-
// dynamicIcon,
|
|
201431
|
-
onIconClick = lodashExports.noop,
|
|
201432
|
-
tooltip = "",
|
|
201433
|
-
tooltipToggled,
|
|
201434
|
-
dropdowntooltip = "",
|
|
201435
|
-
Dropdown,
|
|
201436
|
-
disabled,
|
|
201437
|
-
isHidden,
|
|
201438
|
-
renderIconAbove,
|
|
201439
|
-
noDropdownIcon,
|
|
201440
|
-
IconWrapper,
|
|
201441
|
-
editorName,
|
|
201442
|
-
popoverDisabled,
|
|
201443
|
-
IconWrapperProps,
|
|
201444
|
-
toolName,
|
|
201445
|
-
dropdownicon,
|
|
201446
|
-
tooltipDisabled,
|
|
201447
|
-
toggled = false,
|
|
201448
|
-
...rest
|
|
201449
|
-
} = { ...this.props, ...overrides };
|
|
201450
|
-
if (!toolName)
|
|
201451
|
-
console.warn("toolName is required!");
|
|
201452
|
-
if (isHidden)
|
|
201453
|
-
return null;
|
|
201454
|
-
let tooltipToDisplay = tooltip;
|
|
201455
|
-
if (toggled && tooltipToggled) {
|
|
201456
|
-
tooltipToDisplay = tooltipToggled;
|
|
201457
|
-
}
|
|
201458
|
-
const buttonTarget = /* @__PURE__ */ React$3.createElement(
|
|
201459
|
-
"div",
|
|
201460
|
-
{
|
|
201461
|
-
className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
|
|
201462
|
-
},
|
|
201463
|
-
renderIconAbove && /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarItem" }, Icon$1)),
|
|
201464
|
-
Icon$1 && !renderIconAbove && /* @__PURE__ */ React$3.createElement(
|
|
201465
|
-
Tooltip,
|
|
201466
|
-
{
|
|
201467
|
-
disabled: tooltipDisabled,
|
|
201468
|
-
portalClassName: "ve-toolbar-item-popover",
|
|
201469
|
-
content: tooltipToDisplay
|
|
201470
|
-
},
|
|
201471
|
-
/* @__PURE__ */ React$3.createElement(
|
|
201472
|
-
AnchorButton,
|
|
201473
|
-
{
|
|
201474
|
-
intent: Intent.PRIMARY,
|
|
201475
|
-
onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
|
|
201476
|
-
active: toggled,
|
|
201477
|
-
disabled,
|
|
201478
|
-
minimal: true,
|
|
201479
|
-
icon: React$3.isValidElement(Icon$1) ? Icon$1 : /* @__PURE__ */ React$3.createElement(Icon$1, { toggleDropdown: this.toggleDropdown })
|
|
201480
|
-
}
|
|
201481
|
-
)
|
|
201482
|
-
),
|
|
201483
|
-
Dropdown && !noDropdownIcon ? /* @__PURE__ */ React$3.createElement(Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React$3.createElement(
|
|
201484
|
-
"div",
|
|
201485
|
-
{
|
|
201486
|
-
className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
|
|
201487
|
-
onClick: this.toggleDropdown
|
|
201488
|
-
},
|
|
201489
|
-
dropdownicon ? /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React$3.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React$3.createElement(
|
|
201490
|
-
Icon,
|
|
201491
|
-
{
|
|
201492
|
-
"data-test": toolName + "Dropdown",
|
|
201493
|
-
iconSize: 13,
|
|
201494
|
-
icon: "caret-up"
|
|
201495
|
-
}
|
|
201496
|
-
) : /* @__PURE__ */ React$3.createElement(
|
|
201497
|
-
Icon,
|
|
201498
|
-
{
|
|
201499
|
-
"data-test": toolName + "Dropdown",
|
|
201500
|
-
iconSize: 13,
|
|
201501
|
-
icon: "caret-down"
|
|
201502
|
-
}
|
|
201503
|
-
)
|
|
201504
|
-
)) : null
|
|
201505
|
-
);
|
|
201506
|
-
const content = /* @__PURE__ */ React$3.createElement(
|
|
201507
|
-
"div",
|
|
201508
|
-
{
|
|
201509
|
-
ref: (n) => {
|
|
201510
|
-
if (n)
|
|
201511
|
-
this.dropdownNode = n;
|
|
201512
|
-
},
|
|
201513
|
-
style: { padding: 10, minWidth: 250, maxWidth: 350 },
|
|
201514
|
-
className: "ve-toolbar-dropdown content"
|
|
201515
|
-
},
|
|
201516
|
-
Dropdown && /* @__PURE__ */ React$3.createElement(
|
|
201517
|
-
Dropdown,
|
|
201518
|
-
{
|
|
201519
|
-
...rest,
|
|
201520
|
-
editorName,
|
|
201521
|
-
toggleDropdown: this.toggleDropdown
|
|
201522
|
-
}
|
|
201523
|
-
)
|
|
201524
|
-
);
|
|
201525
|
-
const target = IconWrapper ? /* @__PURE__ */ React$3.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React$3.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React$3.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
|
|
201526
|
-
return /* @__PURE__ */ React$3.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React$3.createElement(
|
|
201527
|
-
Popover,
|
|
201528
|
-
{
|
|
201529
|
-
disabled: popoverDisabled,
|
|
201530
|
-
isOpen: !!Dropdown && isOpen,
|
|
201531
|
-
onClose: (e) => {
|
|
201532
|
-
let srcElement;
|
|
201533
|
-
if (e) {
|
|
201534
|
-
srcElement = e.srcElement || e.target;
|
|
201535
|
-
}
|
|
201536
|
-
if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
|
|
201537
|
-
return;
|
|
201538
|
-
}
|
|
201539
|
-
this.toggleDropdown({ forceClose: true });
|
|
201540
|
-
},
|
|
201541
|
-
canEscapeKeyClose: true,
|
|
201542
|
-
minimal: true,
|
|
201543
|
-
position: Position.BOTTOM,
|
|
201544
|
-
target,
|
|
201545
|
-
content
|
|
201546
|
-
}
|
|
201547
|
-
));
|
|
201548
|
-
}
|
|
201549
|
-
}
|
|
201550
|
-
const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
|
|
201551
|
-
isOpen: toolBar.openItem === toolName
|
|
201552
|
-
}))(ToolbarItem);
|
|
201553
|
-
|
|
201554
201734
|
function array_move(arr, old_index, new_index) {
|
|
201555
201735
|
if (new_index >= arr.length) {
|
|
201556
201736
|
let k = new_index - arr.length + 1;
|
|
@@ -202336,6 +202516,7 @@ double click --> edit`}`;
|
|
|
202336
202516
|
overlapsSelf,
|
|
202337
202517
|
start,
|
|
202338
202518
|
end,
|
|
202519
|
+
readOnly,
|
|
202339
202520
|
getAdditionalEditAnnotationComps,
|
|
202340
202521
|
advancedOptions,
|
|
202341
202522
|
advancedDefaultOpen,
|
|
@@ -202430,10 +202611,11 @@ double click --> edit`}`;
|
|
|
202430
202611
|
"tg-upsert-annotation"
|
|
202431
202612
|
)
|
|
202432
202613
|
},
|
|
202614
|
+
typeof readOnly === "string" ? /* @__PURE__ */ React$3.createElement(Callout, { intent: "primary", style: { marginBottom: 10 } }, readOnly) : null,
|
|
202433
202615
|
/* @__PURE__ */ React$3.createElement(
|
|
202434
202616
|
InputField,
|
|
202435
202617
|
{
|
|
202436
|
-
disabled:
|
|
202618
|
+
disabled: readOnly,
|
|
202437
202619
|
inlineLabel: true,
|
|
202438
202620
|
tooltipError: true,
|
|
202439
202621
|
autoFocus: true,
|
|
@@ -205371,15 +205553,15 @@ ${seqDataToCopy}\r
|
|
|
205371
205553
|
}
|
|
205372
205554
|
// Edge 20+
|
|
205373
205555
|
static isEdge() {
|
|
205374
|
-
return Browser.isBrowser() &&
|
|
205556
|
+
return Browser.isBrowser() && !Browser.isIE() && !!window.StyleMedia;
|
|
205375
205557
|
}
|
|
205376
205558
|
// Chrome 1+
|
|
205377
205559
|
static isChrome() {
|
|
205378
|
-
return Browser.isBrowser() &&
|
|
205560
|
+
return Browser.isBrowser() && !!window.chrome && !!window.chrome.webstore;
|
|
205379
205561
|
}
|
|
205380
205562
|
// Blink engine detection
|
|
205381
205563
|
static isBlink() {
|
|
205382
|
-
return Browser.isBrowser() && (
|
|
205564
|
+
return Browser.isBrowser() && (Browser.isChrome() || Browser.isOpera()) && !!window.CSS;
|
|
205383
205565
|
}
|
|
205384
205566
|
static getUserAgent() {
|
|
205385
205567
|
return typeof navigator === "undefined" ? "" : navigator.userAgent;
|
|
@@ -207024,7 +207206,7 @@ ${seqDataToCopy}\r
|
|
|
207024
207206
|
}
|
|
207025
207207
|
|
|
207026
207208
|
const userDefinedHandlersAndOpts = [
|
|
207027
|
-
"
|
|
207209
|
+
"beforeReadOnlyChange",
|
|
207028
207210
|
"defaultLinkedOligoMessage",
|
|
207029
207211
|
"allowMultipleFeatureDirections",
|
|
207030
207212
|
"getAdditionalEditAnnotationComps",
|
|
@@ -207045,6 +207227,8 @@ ${seqDataToCopy}\r
|
|
|
207045
207227
|
"hideSingleImport",
|
|
207046
207228
|
"beforeAnnotationCreate",
|
|
207047
207229
|
"disableSetReadOnly",
|
|
207230
|
+
"allowAnnotationEditLocking",
|
|
207231
|
+
"disableBpEditing",
|
|
207048
207232
|
"showReadOnly",
|
|
207049
207233
|
"showCircularity",
|
|
207050
207234
|
"onHiddenEnzymeAdd",
|
|
@@ -207285,49 +207469,6 @@ ${seqDataToCopy}\r
|
|
|
207285
207469
|
}
|
|
207286
207470
|
);
|
|
207287
207471
|
|
|
207288
|
-
const editTool = connectToEditor((editorState) => {
|
|
207289
|
-
return {
|
|
207290
|
-
readOnly: editorState.readOnly
|
|
207291
|
-
};
|
|
207292
|
-
})(
|
|
207293
|
-
({
|
|
207294
|
-
toolbarItemProps,
|
|
207295
|
-
readOnly,
|
|
207296
|
-
toggleReadOnlyMode,
|
|
207297
|
-
disableSetReadOnly,
|
|
207298
|
-
onChangeEditLock
|
|
207299
|
-
}) => {
|
|
207300
|
-
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
207301
|
-
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
207302
|
-
if (isLoading) {
|
|
207303
|
-
return "Loading...";
|
|
207304
|
-
} else if (disableSetReadOnly2) {
|
|
207305
|
-
return "You do not have permission to edit locks on this sequence";
|
|
207306
|
-
}
|
|
207307
|
-
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
207308
|
-
};
|
|
207309
|
-
return /* @__PURE__ */ React$3.createElement(
|
|
207310
|
-
ToolbarItem$1,
|
|
207311
|
-
{
|
|
207312
|
-
...{
|
|
207313
|
-
disabled: isLoading || disableSetReadOnly,
|
|
207314
|
-
Icon: /* @__PURE__ */ React$3.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
207315
|
-
onIconClick: async () => {
|
|
207316
|
-
if (onChangeEditLock) {
|
|
207317
|
-
setIsLoading(true);
|
|
207318
|
-
await onChangeEditLock(!readOnly);
|
|
207319
|
-
setIsLoading(false);
|
|
207320
|
-
}
|
|
207321
|
-
toggleReadOnlyMode();
|
|
207322
|
-
},
|
|
207323
|
-
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
|
207324
|
-
...toolbarItemProps
|
|
207325
|
-
}
|
|
207326
|
-
}
|
|
207327
|
-
);
|
|
207328
|
-
}
|
|
207329
|
-
);
|
|
207330
|
-
|
|
207331
207472
|
const style$4 = '';
|
|
207332
207473
|
|
|
207333
207474
|
const opts = [
|
|
@@ -207948,31 +208089,22 @@ ${seqDataToCopy}\r
|
|
|
207948
208089
|
|
|
207949
208090
|
const EditReadOnlyItem = connectToEditor(({ readOnly }) => ({
|
|
207950
208091
|
readOnly
|
|
207951
|
-
}))(
|
|
207952
|
-
|
|
207953
|
-
|
|
207954
|
-
|
|
207955
|
-
|
|
207956
|
-
|
|
207957
|
-
|
|
207958
|
-
|
|
207959
|
-
|
|
207960
|
-
|
|
207961
|
-
|
|
207962
|
-
|
|
207963
|
-
|
|
207964
|
-
|
|
207965
|
-
|
|
207966
|
-
|
|
207967
|
-
className: MINIMAL,
|
|
207968
|
-
value: readOnly ? "readOnly" : "editable",
|
|
207969
|
-
onChange: ({ target: { value } }) => {
|
|
207970
|
-
updateReadOnlyMode(value === "readOnly");
|
|
207971
|
-
}
|
|
207972
|
-
}
|
|
207973
|
-
) : readOnly ? "Read Only" : "Editable") : null;
|
|
207974
|
-
}
|
|
207975
|
-
);
|
|
208092
|
+
}))((props) => {
|
|
208093
|
+
const { onSave, readOnly, showReadOnly, disableSetReadOnly } = props;
|
|
208094
|
+
return showReadOnly ? /* @__PURE__ */ React$3.createElement(StatusBarItem, { dataTest: "veStatusBar-readOnly" }, onSave ? /* @__PURE__ */ React$3.createElement(
|
|
208095
|
+
HTMLSelect,
|
|
208096
|
+
{
|
|
208097
|
+
options: [
|
|
208098
|
+
{ label: "Read Only", value: "readOnly" },
|
|
208099
|
+
{ label: "Editable", value: "editable" }
|
|
208100
|
+
],
|
|
208101
|
+
disabled: disableSetReadOnly || !onSave,
|
|
208102
|
+
className: MINIMAL,
|
|
208103
|
+
value: readOnly ? "readOnly" : "editable",
|
|
208104
|
+
onChange: ({ target: { value } }) => handleReadOnlyChange(value === "readOnly", props)
|
|
208105
|
+
}
|
|
208106
|
+
) : readOnly ? "Read Only" : "Editable") : null;
|
|
208107
|
+
});
|
|
207976
208108
|
const ShowSelectionItem = compose(
|
|
207977
208109
|
connectToEditor(
|
|
207978
208110
|
({ selectionLayer, caretPosition, sequenceData = { sequence: "" } }, ownProps, ...rest) => {
|
|
@@ -208119,11 +208251,13 @@ ${seqDataToCopy}\r
|
|
|
208119
208251
|
showGCContentByDefault,
|
|
208120
208252
|
onSelectionOrCaretChanged,
|
|
208121
208253
|
GCDecimalDigits = 1,
|
|
208122
|
-
isProtein
|
|
208254
|
+
isProtein,
|
|
208255
|
+
beforeReadOnlyChange
|
|
208123
208256
|
}) {
|
|
208124
208257
|
return /* @__PURE__ */ React$3.createElement("div", { className: "veStatusBar" }, showMoleculeType && /* @__PURE__ */ React$3.createElement(ShowTypeItem, { editorName }), /* @__PURE__ */ React$3.createElement(
|
|
208125
208258
|
EditReadOnlyItem,
|
|
208126
208259
|
{
|
|
208260
|
+
beforeReadOnlyChange,
|
|
208127
208261
|
editorName,
|
|
208128
208262
|
onSave,
|
|
208129
208263
|
disableSetReadOnly,
|
|
@@ -208458,9 +208592,7 @@ ${seqDataToCopy}\r
|
|
|
208458
208592
|
AnchorButton,
|
|
208459
208593
|
{
|
|
208460
208594
|
onClick: () => {
|
|
208461
|
-
deleteAnnotation(
|
|
208462
|
-
annotationPropertiesSelectedEntities
|
|
208463
|
-
);
|
|
208595
|
+
deleteAnnotation(annotationPropertiesSelectedEntities);
|
|
208464
208596
|
},
|
|
208465
208597
|
className: "tgDeleteAnnsBtn",
|
|
208466
208598
|
intent: "danger",
|
|
@@ -208564,7 +208696,6 @@ ${seqDataToCopy}\r
|
|
|
208564
208696
|
disableSetReadOnly,
|
|
208565
208697
|
updateAvailability,
|
|
208566
208698
|
sequenceData,
|
|
208567
|
-
updateReadOnlyMode,
|
|
208568
208699
|
onSave,
|
|
208569
208700
|
showAvailability,
|
|
208570
208701
|
sequenceNameUpdate
|
|
@@ -208619,10 +208750,9 @@ ${seqDataToCopy}\r
|
|
|
208619
208750
|
))), /* @__PURE__ */ React$3.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-left bp3-label" }, "Length"), " ", /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-right" }, " ", isProtein ? proteinSequence.length : sequence.length)), showReadOnly && /* @__PURE__ */ React$3.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-left bp3-label" }, "Is Editable"), " ", /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-right" }, " ", /* @__PURE__ */ React$3.createElement(
|
|
208620
208751
|
BPSelect,
|
|
208621
208752
|
{
|
|
208753
|
+
className: "veReadOnlySelect",
|
|
208622
208754
|
disabled: !onSave || disableSetReadOnly,
|
|
208623
|
-
onChange: (val) =>
|
|
208624
|
-
updateReadOnlyMode(val === "readOnly");
|
|
208625
|
-
},
|
|
208755
|
+
onChange: (val) => console.log(`val:`, val) || handleReadOnlyChange(val === "readOnly", this.props),
|
|
208626
208756
|
value: readOnly ? "readOnly" : "editable",
|
|
208627
208757
|
options: [
|
|
208628
208758
|
{ label: "Read Only", value: "readOnly" },
|
|
@@ -218695,7 +218825,7 @@ ${seqDataToCopy}\r
|
|
|
218695
218825
|
contentLeft: this.props.contentLeft,
|
|
218696
218826
|
editorName,
|
|
218697
218827
|
withDigestTool: true,
|
|
218698
|
-
|
|
218828
|
+
beforeReadOnlyChange: this.props.beforeReadOnlyChange,
|
|
218699
218829
|
...ToolBarProps
|
|
218700
218830
|
}
|
|
218701
218831
|
),
|