@teselagen/ove 0.8.29 → 0.8.31
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/RowItem/utils.d.ts +1 -0
- package/helperComponents/PropertiesDialog/utils.d.ts +1 -0
- package/index.cjs.js +455 -256
- package/index.es.js +455 -256
- package/index.umd.js +455 -256
- package/package.json +3 -3
- package/selectors/cutsitesSelector.d.ts +1 -9
- package/selectors/filteredCutsitesSelector.d.ts +5 -1
- package/src/Editor/index.js +2 -0
- package/src/Editor/userDefinedHandlersAndOpts.js +2 -0
- package/src/GlobalDialog.js +11 -1
- package/src/GlobalDialogUtils.js +14 -2
- package/src/RowItem/StackedAnnotations/PointedAnnotation.js +101 -34
- package/src/RowItem/utils.js +19 -3
- package/src/commands/index.js +1 -1
- package/src/helperComponents/PropertiesDialog/OrfProperties.js +2 -3
- package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -1
- package/src/helperComponents/PropertiesDialog/utils.js +29 -0
- package/src/selectors/cutsitesSelector.js +57 -2
- package/src/utils/getAnnotationNameAndStartStopString.js +1 -1
- package/src/withEditorInteractions/createSequenceInputPopup.js +4 -2
- package/src/withEditorInteractions/index.js +12 -5
- package/src/withEditorProps/index.js +21 -8
|
@@ -39,6 +39,7 @@ import { createSelector, defaultMemoize } from "reselect";
|
|
|
39
39
|
import domtoimage from "dom-to-image";
|
|
40
40
|
import {
|
|
41
41
|
hideDialog,
|
|
42
|
+
dialogHolder,
|
|
42
43
|
showAddOrEditAnnotationDialog,
|
|
43
44
|
showDialog
|
|
44
45
|
} from "../GlobalDialogUtils";
|
|
@@ -141,7 +142,8 @@ export const handleSave =
|
|
|
141
142
|
readOnly,
|
|
142
143
|
alwaysAllowSave,
|
|
143
144
|
sequenceData,
|
|
144
|
-
lastSavedIdUpdate
|
|
145
|
+
lastSavedIdUpdate,
|
|
146
|
+
getAcceptedInsertChars
|
|
145
147
|
} = props;
|
|
146
148
|
const saveHandler = opts.isSaveAs ? onSaveAs || onSave : onSave;
|
|
147
149
|
|
|
@@ -162,7 +164,8 @@ export const handleSave =
|
|
|
162
164
|
opts,
|
|
163
165
|
tidyUpSequenceData(sequenceData, {
|
|
164
166
|
doNotRemoveInvalidChars: true,
|
|
165
|
-
annotationsAsObjects: true
|
|
167
|
+
annotationsAsObjects: true,
|
|
168
|
+
getAcceptedInsertChars
|
|
166
169
|
}),
|
|
167
170
|
props,
|
|
168
171
|
updateLastSavedIdToCurrent
|
|
@@ -367,8 +370,8 @@ export default compose(
|
|
|
367
370
|
options
|
|
368
371
|
} = props.beforeSequenceInsertOrDelete
|
|
369
372
|
? (await props.beforeSequenceInsertOrDelete(
|
|
370
|
-
tidyUpSequenceData(_sequenceDataToInsert),
|
|
371
|
-
tidyUpSequenceData(_existingSequenceData),
|
|
373
|
+
tidyUpSequenceData(_sequenceDataToInsert, { getAcceptedInsertChars: props.getAcceptedInsertChars }),
|
|
374
|
+
tidyUpSequenceData(_existingSequenceData, { getAcceptedInsertChars: props.getAcceptedInsertChars }),
|
|
372
375
|
_caretPositionOrRange,
|
|
373
376
|
_options
|
|
374
377
|
)) || {}
|
|
@@ -555,7 +558,11 @@ const getEditorState = createSelector(
|
|
|
555
558
|
state => state.VectorEditor,
|
|
556
559
|
(state, editorName) => editorName,
|
|
557
560
|
(VectorEditor, editorName) => {
|
|
558
|
-
|
|
561
|
+
const editorState = VectorEditor[editorName];
|
|
562
|
+
editorState && (editorState.editorSize = Object.values(VectorEditor).filter(
|
|
563
|
+
editorItem => editorItem?.sequenceData
|
|
564
|
+
).length);
|
|
565
|
+
return editorState;
|
|
559
566
|
}
|
|
560
567
|
);
|
|
561
568
|
|
|
@@ -595,6 +602,10 @@ function mapStateToProps(state, ownProps) {
|
|
|
595
602
|
annotationTypePlural,
|
|
596
603
|
sequenceLength
|
|
597
604
|
);
|
|
605
|
+
if (dialogHolder.editorName) {
|
|
606
|
+
annotationToAdd =
|
|
607
|
+
dialogHolder.editorName === editorName ? annotationToAdd : undefined;
|
|
608
|
+
}
|
|
598
609
|
}
|
|
599
610
|
});
|
|
600
611
|
|
|
@@ -623,7 +634,7 @@ function mapStateToProps(state, ownProps) {
|
|
|
623
634
|
const selectedCutsites = s.selectedCutsitesSelector(editorState);
|
|
624
635
|
const allCutsites = s.cutsitesSelector(
|
|
625
636
|
editorState,
|
|
626
|
-
ownProps.additionalEnzymes
|
|
637
|
+
ownProps.additionalEnzymes,
|
|
627
638
|
);
|
|
628
639
|
|
|
629
640
|
const { matchedSearchLayer, searchLayers, matchesTotal } =
|
|
@@ -887,13 +898,15 @@ export function getShowGCContent(state, ownProps) {
|
|
|
887
898
|
return toRet;
|
|
888
899
|
}
|
|
889
900
|
|
|
890
|
-
function jsonToJson(incomingJson) {
|
|
901
|
+
function jsonToJson(incomingJson, options) {
|
|
902
|
+
const {getAcceptedInsertChars} = options || {};
|
|
891
903
|
return JSON.stringify(
|
|
892
904
|
omit(
|
|
893
905
|
cleanUpTeselagenJsonForExport(
|
|
894
906
|
tidyUpSequenceData(incomingJson, {
|
|
895
907
|
doNotRemoveInvalidChars: true,
|
|
896
|
-
annotationsAsObjects: false
|
|
908
|
+
annotationsAsObjects: false,
|
|
909
|
+
getAcceptedInsertChars
|
|
897
910
|
})
|
|
898
911
|
),
|
|
899
912
|
[
|