@teselagen/ove 0.3.11 → 0.3.12

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.
Files changed (148) hide show
  1. package/index.js +362 -209
  2. package/index.mjs +362 -209
  3. package/index.umd.js +339 -232
  4. package/package.json +1 -1
  5. package/src/AlignmentView/AlignmentVisibilityTool.js +1 -1
  6. package/src/AlignmentView/EditTrackNameDialog.js +1 -5
  7. package/src/AlignmentView/HorizontalPanelDragHandle.js +2 -2
  8. package/src/AlignmentView/Minimap.js +12 -12
  9. package/src/AlignmentView/PairwiseAlignmentView.js +1 -1
  10. package/src/AlignmentView/getGapMap.js +1 -1
  11. package/src/AlignmentView/getTrackFromEvent.js +1 -1
  12. package/src/AlignmentView/index.js +32 -37
  13. package/src/AutoAnnotate.js +48 -48
  14. package/src/CircularView/Cutsites.js +3 -3
  15. package/src/CircularView/Labels/index.js +7 -7
  16. package/src/CircularView/Labels/relaxLabels_DEPRECATED.js +5 -5
  17. package/src/CircularView/RotateCircularViewSlider.js +1 -1
  18. package/src/CircularView/SelectionLayer.js +2 -2
  19. package/src/CircularView/drawAnnotations.js +3 -3
  20. package/src/CircularView/getAngleForPositionMidpoint.js +1 -1
  21. package/src/CircularView/index.d.ts +11 -11
  22. package/src/CircularView/index.js +9 -9
  23. package/src/CreateAnnotationsPage.js +7 -5
  24. package/src/CreateCustomEnzyme/index.js +1 -5
  25. package/src/CutsiteFilter/AdditionalCutsiteInfoDialog.js +11 -11
  26. package/src/CutsiteFilter/index.js +12 -12
  27. package/src/DigestTool/AddLaddersDialog.js +1 -1
  28. package/src/DigestTool/DigestTool.js +3 -3
  29. package/src/DigestTool/Ladder.js +8 -8
  30. package/src/DigestTool/ladderDefaults.js +1 -2
  31. package/src/Editor/CommandHotkeyHandler.js +1 -1
  32. package/src/Editor/DropHandler.js +2 -2
  33. package/src/Editor/index.js +14 -14
  34. package/src/Editor/userDefinedHandlersAndOpts.js +2 -0
  35. package/src/FindBar/index.js +6 -6
  36. package/src/GlobalDialogUtils.js +6 -0
  37. package/src/LinearView/ZoomLinearView.js +1 -1
  38. package/src/LinearView/index.js +7 -7
  39. package/src/MenuBar/index.js +1 -1
  40. package/src/MenuBar/viewSubmenu.js +1 -1
  41. package/src/PCRTool/PCRTool.js +19 -19
  42. package/src/Reflex/Browser.js +4 -5
  43. package/src/Reflex/ReflexContainer.js +3 -3
  44. package/src/Reflex/ReflexElement.js +2 -2
  45. package/src/RowItem/Axis.js +1 -1
  46. package/src/RowItem/Caret/index.js +1 -1
  47. package/src/RowItem/Chromatograms/Chromatogram.js +3 -3
  48. package/src/RowItem/CutsiteSelectionLayers.js +1 -1
  49. package/src/RowItem/Cutsites.js +1 -1
  50. package/src/RowItem/Labels.js +2 -2
  51. package/src/RowItem/Orfs.js +2 -2
  52. package/src/RowItem/Sequence.js +4 -4
  53. package/src/RowItem/StackedAnnotations/PointedAnnotation.js +3 -3
  54. package/src/RowItem/StackedAnnotations/getStructuredBases.js +1 -1
  55. package/src/RowItem/Translations/AASliver.js +71 -75
  56. package/src/RowItem/Translations/index.js +1 -1
  57. package/src/RowItem/getCutsiteLabelHeights.js +1 -1
  58. package/src/RowItem/index.js +14 -8
  59. package/src/RowView/estimateRowHeight.js +5 -5
  60. package/src/RowView/index.d.ts +7 -7
  61. package/src/RowView/index.js +11 -12
  62. package/src/SimpleCircularOrLinearView.js +6 -6
  63. package/src/StatusBar/MeltingTemp.js +3 -3
  64. package/src/ToolBar/ToolbarItem.js +2 -2
  65. package/src/ToolBar/alignmentTool.js +9 -9
  66. package/src/ToolBar/editTool.js +1 -1
  67. package/src/ToolBar/findTool.js +2 -2
  68. package/src/ToolBar/importTool.js +1 -1
  69. package/src/ToolBar/index.js +2 -2
  70. package/src/ToolBar/oligoTool.js +1 -1
  71. package/src/ToolBar/orfTool.js +1 -6
  72. package/src/ToolBar/printTool.js +2 -2
  73. package/src/ToolBar/visibilityTool.js +1 -1
  74. package/src/VersionHistoryView/index.js +2 -2
  75. package/src/commands/index.js +236 -230
  76. package/src/createVectorEditor/index.js +4 -4
  77. package/src/fileUtils.js +18 -18
  78. package/src/helperComponents/AddOrEditAnnotationDialog/index.js +22 -15
  79. package/src/helperComponents/AddOrEditFeatureDialog/index.js +2 -2
  80. package/src/helperComponents/AddOrEditPartDialog/index.js +2 -2
  81. package/src/helperComponents/AddOrEditPrimerDialog/index.js +5 -5
  82. package/src/helperComponents/EnzymesDialog/index.js +17 -22
  83. package/src/helperComponents/GoToDialog.js +5 -1
  84. package/src/helperComponents/MergeFeaturesDialog/index.js +3 -3
  85. package/src/helperComponents/PinchHelper/PinchHelper.js +1 -1
  86. package/src/helperComponents/PrintDialog/index.js +4 -4
  87. package/src/helperComponents/PropertiesDialog/CutsiteProperties.js +3 -3
  88. package/src/helperComponents/PropertiesDialog/GenbankView.js +1 -1
  89. package/src/helperComponents/PropertiesDialog/GeneralProperties.js +5 -5
  90. package/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +136 -138
  91. package/src/helperComponents/PropertiesDialog/OrfProperties.js +3 -3
  92. package/src/helperComponents/PropertiesDialog/PrimerProperties.js +1 -1
  93. package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -2
  94. package/src/helperComponents/PropertiesDialog/index.js +3 -3
  95. package/src/helperComponents/RemoveDuplicates/index.js +3 -3
  96. package/src/helperComponents/SelectDialog.js +3 -3
  97. package/src/helperComponents/UncontrolledSliderWithPlusMinusBtns.js +5 -5
  98. package/src/helperComponents/createSimpleDialog.js +1 -1
  99. package/src/helperComponents/partTagSearch.js +2 -5
  100. package/src/helperComponents/withHover.js +3 -3
  101. package/src/redux/alignments.js +6 -6
  102. package/src/redux/annotationVisibility.js +4 -4
  103. package/src/redux/featureLengthsToHide.js +1 -1
  104. package/src/redux/frameTranslations.js +3 -3
  105. package/src/redux/middleware.js +2 -2
  106. package/src/redux/panelsShown.js +19 -19
  107. package/src/redux/partLengthsToHide.js +1 -1
  108. package/src/redux/primerLengthsToHide.js +1 -1
  109. package/src/redux/readOnly.js +1 -4
  110. package/src/redux/selectionLayer.js +1 -1
  111. package/src/redux/sequenceData/features.js +1 -1
  112. package/src/redux/sequenceData/upsertDeleteActionGenerator.js +1 -1
  113. package/src/redux/sequenceDataHistory.js +5 -5
  114. package/src/redux/toolBar.js +2 -4
  115. package/src/redux/utils/createMetaAction.js +2 -2
  116. package/src/redux/versionHistory.js +1 -2
  117. package/src/selectors/annotationSearchSelector.js +4 -4
  118. package/src/selectors/circularSelector.js +1 -1
  119. package/src/selectors/cutsiteLabelColorSelector.js +1 -1
  120. package/src/selectors/filteredCutsitesSelector.js +6 -6
  121. package/src/selectors/filteredFeaturesSelector.js +4 -4
  122. package/src/selectors/filteredPartsSelector.js +5 -5
  123. package/src/selectors/filteredPrimersSelector.js +3 -3
  124. package/src/selectors/isEnzymeFilterAndSelector.js +1 -1
  125. package/src/selectors/orfsSelector.js +1 -1
  126. package/src/selectors/restrictionEnzymesSelector.js +2 -2
  127. package/src/selectors/searchLayersSelector.js +7 -7
  128. package/src/selectors/sequenceLengthSelector.js +1 -1
  129. package/src/selectors/sequenceSelector.js +1 -1
  130. package/src/selectors/tagsToBoldSelector.js +1 -1
  131. package/src/selectors/translationsSelector.js +7 -7
  132. package/src/updateEditor.js +1 -1
  133. package/src/utils/PassThrough.js +1 -1
  134. package/src/utils/addWrappedAddons.js +1 -1
  135. package/src/utils/annotationTypes.js +2 -2
  136. package/src/utils/combineReducersDontIgnoreKeys.js +1 -1
  137. package/src/utils/editorUtils.js +2 -2
  138. package/src/utils/massageTickSpacing.js +1 -1
  139. package/src/utils/onlyUpdateForKeysDeep.js +1 -1
  140. package/src/utils/pureNoFunc.js +1 -1
  141. package/src/utils/shouldRerender.js +1 -1
  142. package/src/utils/showFileDialog.js +6 -7
  143. package/src/utils/updateLabelsForInViewFeatures.js +1 -1
  144. package/src/utils/useAnnotationLimits.js +1 -1
  145. package/src/withEditorInteractions/Keyboard.js +2 -3
  146. package/src/withEditorInteractions/createSequenceInputPopup.js +4 -4
  147. package/src/withEditorInteractions/index.js +93 -55
  148. package/src/withEditorProps/index.js +40 -37
@@ -31,7 +31,7 @@ import {
31
31
  } from "./withEditorInteractions/clickAndDragUtils";
32
32
 
33
33
  //this view is meant to be a helper for showing a simple (non-redux connected) circular or linear view!
34
- export default (props) => {
34
+ export default props => {
35
35
  let {
36
36
  sequenceData: _sequenceData,
37
37
  annotationVisibility: _annotationVisibility = {},
@@ -281,13 +281,13 @@ export default (props) => {
281
281
  return inner({});
282
282
  };
283
283
 
284
- const DownloadBtn = withHandlers({ exportSequenceToFile })((props) => {
284
+ const DownloadBtn = withHandlers({ exportSequenceToFile })(props => {
285
285
  return (
286
286
  <Tooltip content="Download">
287
287
  <Button
288
288
  className="veDownloadButton"
289
289
  style={{ marginRight: 10 }}
290
- onClick={(event) =>
290
+ onClick={event =>
291
291
  showContextMenu(
292
292
  [
293
293
  "exportSequenceAsGenbank",
@@ -337,7 +337,7 @@ const VisibilityOptions = ({
337
337
  <Tooltip disabled={isPopoverOpen} content="Visibility Options">
338
338
  <Popover
339
339
  minimal
340
- onInteraction={(isOpen) => {
340
+ onInteraction={isOpen => {
341
341
  setPopoverOpen(isOpen);
342
342
  }}
343
343
  isOpen={isPopoverOpen}
@@ -345,11 +345,11 @@ const VisibilityOptions = ({
345
345
  <Menu>
346
346
  {flatMap(
347
347
  ["features", "parts", "primers", "translations", "cutsites"],
348
- (name) => {
348
+ name => {
349
349
  if (!map(sequenceData[name]).length) return [];
350
350
  return (
351
351
  <MenuItem
352
- onClick={(e) => {
352
+ onClick={e => {
353
353
  setVisibilityOptions({
354
354
  ...annotationVisibility,
355
355
  [name]: !annotationVisibility[name]
@@ -9,8 +9,8 @@ import useTmType from "../utils/useTmType";
9
9
 
10
10
  export default function MeltingTemp({
11
11
  sequence,
12
- WrapperToUse = (p) => <div>{p.children}</div>,
13
- InnerWrapper = (p) => (
12
+ WrapperToUse = p => <div>{p.children}</div>,
13
+ InnerWrapper = p => (
14
14
  <Button minimal small>
15
15
  {p.children}
16
16
  </Button>
@@ -46,7 +46,7 @@ export default function MeltingTemp({
46
46
  { value: "default", label: "Default Tm" },
47
47
  { value: "neb_tm", label: "NEB Tm" }
48
48
  ]}
49
- onChange={(e) => setTmType(e.target.value)}
49
+ onChange={e => setTmType(e.target.value)}
50
50
  selectedValue={tmType}
51
51
  ></RadioGroup>
52
52
  {hasWarning && (
@@ -125,7 +125,7 @@ class ToolbarItem extends React.Component {
125
125
  );
126
126
  const content = (
127
127
  <div
128
- ref={(n) => {
128
+ ref={n => {
129
129
  if (n) this.dropdownNode = n;
130
130
  }}
131
131
  style={{ padding: 10, minWidth: 250, maxWidth: 350 }}
@@ -160,7 +160,7 @@ class ToolbarItem extends React.Component {
160
160
  <Popover
161
161
  disabled={popoverDisabled}
162
162
  isOpen={!!Dropdown && isOpen}
163
- onClose={(e) => {
163
+ onClose={e => {
164
164
  let srcElement;
165
165
  if (e) {
166
166
  srcElement = e.srcElement || e.target;
@@ -100,7 +100,7 @@ class AlignmentTool extends React.Component {
100
100
  state = {
101
101
  templateSeqIndex: 0
102
102
  };
103
- sendSelectedDataToBackendForAlignment = async (values) => {
103
+ sendSelectedDataToBackendForAlignment = async values => {
104
104
  const {
105
105
  addedSequences,
106
106
  isPairwiseAlignment,
@@ -175,7 +175,7 @@ class AlignmentTool extends React.Component {
175
175
  // const j5server = process.env.REMOTE_J5 || "http://j5server.teselagen.com"
176
176
 
177
177
  window.toastr.success("Alignment submitted.");
178
- const replaceProtocol = (url) => {
178
+ const replaceProtocol = url => {
179
179
  return url.replace("http://", window.location.protocol + "//");
180
180
  };
181
181
 
@@ -227,7 +227,7 @@ class AlignmentTool extends React.Component {
227
227
  }),
228
228
  alignmentTracks:
229
229
  alignedSequences &&
230
- alignedSequences.map((alignmentData) => {
230
+ alignedSequences.map(alignmentData => {
231
231
  return {
232
232
  sequenceData:
233
233
  seqsToAlign[
@@ -254,12 +254,12 @@ class AlignmentTool extends React.Component {
254
254
 
255
255
  handleFileUpload = (files, onChange) => {
256
256
  const { array } = this.props;
257
- flatMap(files, async (file) => {
257
+ flatMap(files, async file => {
258
258
  const results = await anyToJson(file.originalFileObj, {
259
259
  fileName: file.name,
260
260
  acceptParts: true
261
261
  });
262
- return results.forEach((result) => {
262
+ return results.forEach(result => {
263
263
  if (result.success) {
264
264
  array.push("addedSequences", result.parsedSequence);
265
265
  } else {
@@ -278,7 +278,7 @@ class AlignmentTool extends React.Component {
278
278
  <h6>Or enter sequences in plain text format</h6>
279
279
  <div>
280
280
  <AddYourOwnSeqForm
281
- addSeq={(newSeq) => {
281
+ addSeq={newSeq => {
282
282
  fields.push(newSeq);
283
283
  }}
284
284
  />
@@ -327,7 +327,7 @@ class AlignmentTool extends React.Component {
327
327
  )}
328
328
 
329
329
  <Button
330
- onClick={(e) => {
330
+ onClick={e => {
331
331
  e.stopPropagation();
332
332
  e.preventDefault();
333
333
  fields.remove(index);
@@ -443,7 +443,7 @@ const AddYourOwnSeqForm = reduxForm({
443
443
  })(({ pristine, error, handleSubmit, reset, addSeq }) => {
444
444
  return (
445
445
  <form
446
- onSubmit={handleSubmit((vals) => {
446
+ onSubmit={handleSubmit(vals => {
447
447
  reset();
448
448
  addSeq(vals);
449
449
  })}
@@ -490,7 +490,7 @@ function mottTrim(qualNums) {
490
490
  totalScore = 0;
491
491
  }
492
492
  }
493
- const firstPositiveValue = totalScoreInfo.find((e) => {
493
+ const firstPositiveValue = totalScoreInfo.find(e => {
494
494
  return e > 0;
495
495
  });
496
496
  startPos = totalScoreInfo.indexOf(firstPositiveValue);
@@ -3,7 +3,7 @@ import { Icon } from "@blueprintjs/core";
3
3
  import ToolbarItem from "./ToolbarItem";
4
4
  import { connectToEditor } from "../withEditorProps";
5
5
 
6
- export default connectToEditor((editorState) => {
6
+ export default connectToEditor(editorState => {
7
7
  return {
8
8
  readOnly: editorState.readOnly
9
9
  };
@@ -1,2 +1,2 @@
1
- import inlineFindTool from './inlineFindTool'
2
- export default inlineFindTool
1
+ import inlineFindTool from "./inlineFindTool";
2
+ export default inlineFindTool;
@@ -17,7 +17,7 @@ export default compose(
17
17
  IconWrapperProps: {
18
18
  multiple: false,
19
19
  style: {},
20
- onDrop: (files) => importSequenceFromFile(files[0])
20
+ onDrop: files => importSequenceFromFile(files[0])
21
21
  },
22
22
  tooltip: "Click or drag to import and view files (.fasta .gb .dna)",
23
23
  ...toolbarItemProps
@@ -66,7 +66,7 @@ export function ToolBar(props) {
66
66
  };
67
67
 
68
68
  const toolListToUse = useMemo(() => {
69
- return flatMap(toolList, (toolNameOrOverrides) => {
69
+ return flatMap(toolList, toolNameOrOverrides => {
70
70
  let toolName;
71
71
  let toolOverride;
72
72
  if (isString(toolNameOrOverrides)) {
@@ -196,7 +196,7 @@ export function ToolBar(props) {
196
196
  </div>
197
197
  );
198
198
  }
199
- const CloseFullscreenButton = (props) => {
199
+ const CloseFullscreenButton = props => {
200
200
  return (
201
201
  <Tooltip content="Close Fullscreen Mode">
202
202
  <Button
@@ -16,7 +16,7 @@ export default connectToEditor(editorState => {
16
16
  <ToolbarItem
17
17
  {...{
18
18
  Icon: <Icon icon="swap-horizontal" />,
19
- onIconClick: function() {
19
+ onIconClick: function () {
20
20
  annotationVisibilityToggle("primers");
21
21
  },
22
22
  isHidden,
@@ -1,11 +1,6 @@
1
1
  import { Icon } from "@blueprintjs/core";
2
2
  import React from "react";
3
- import {
4
- orfIcon,
5
- CmdCheckbox,
6
- CmdDiv,
7
- InfoHelper
8
- } from "@teselagen/ui";
3
+ import { orfIcon, CmdCheckbox, CmdDiv, InfoHelper } from "@teselagen/ui";
9
4
  import ToolbarItem from "./ToolbarItem";
10
5
  import { connectToEditor } from "../withEditorProps";
11
6
  import withEditorProps from "../withEditorProps";
@@ -1,11 +1,11 @@
1
- //TNRTODO this needs to be fixed and implemented
1
+ //TNRTODO this needs to be fixed and implemented
2
2
  import React from "react";
3
3
  import print from "./veToolbarIcons/print.png";
4
4
 
5
5
  export default () => {
6
6
  return {
7
7
  Icon: <img src={print} alt="Print Vector" />,
8
- onIconClick: function() {
8
+ onIconClick: function () {
9
9
  // var myPrintContent = document.getElementById('printdiv');
10
10
  // var myPrintWindow = window.open(windowUrl, windowName, 'left=300,top=100,width=400,height=400');
11
11
  // myPrintWindow.document.write(myPrintContent.innerHTML);
@@ -27,7 +27,7 @@ export default connectToEditor(({ toolBar = {} }) => {
27
27
  );
28
28
  });
29
29
 
30
- const VisibilityOptions = withEditorProps(function(props) {
30
+ const VisibilityOptions = withEditorProps(function (props) {
31
31
  return (
32
32
  <Menu>
33
33
  {createCommandMenu(viewSubmenu, getCommands({ props }), {
@@ -38,7 +38,7 @@ export class VersionHistoryView extends React.Component {
38
38
  // ];
39
39
  // }
40
40
  // };
41
- updateSeqData = (sequenceData) => {
41
+ updateSeqData = sequenceData => {
42
42
  this.activeSeqData = sequenceData;
43
43
  this.props.vectorEditorInitialize(
44
44
  {
@@ -81,7 +81,7 @@ export class VersionHistoryView extends React.Component {
81
81
  this.setState({
82
82
  versionList: [
83
83
  currentVersion,
84
- ...versionList.map((r) => {
84
+ ...versionList.map(r => {
85
85
  return { ...r, id: r.versionId };
86
86
  })
87
87
  ] //currentVersion should always come first