@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
@@ -60,7 +60,7 @@ const genericAnnotationProperties = ({
60
60
  <>
61
61
  <Icon
62
62
  data-tip="Hide/Show"
63
- onClick={(e) => {
63
+ onClick={e => {
64
64
  e.stopPropagation();
65
65
  const upperType = startCase(annotationType);
66
66
  if (checked) {
@@ -109,7 +109,7 @@ const genericAnnotationProperties = ({
109
109
  path: "color",
110
110
  type: "string",
111
111
  width: 50,
112
- render: (color) => {
112
+ render: color => {
113
113
  return (
114
114
  <div
115
115
  style={{ height: 20, width: 20, background: color }}
@@ -129,7 +129,7 @@ const genericAnnotationProperties = ({
129
129
  type: "string",
130
130
  getValueToFilterOn: (o, { keyedPartTags }) => {
131
131
  const toRet = (o.tags || [])
132
- .map((tagId) => {
132
+ .map(tagId => {
133
133
  const tag = keyedPartTags[tagId];
134
134
  if (!tag) return "";
135
135
  return tag.label;
@@ -181,11 +181,11 @@ const genericAnnotationProperties = ({
181
181
  selectedAnnotationId
182
182
  } = this.props;
183
183
  const annotationPropertiesSelectedEntities =
184
- _annotationPropertiesSelectedEntities.filter((a) => annotations[a.id]);
184
+ _annotationPropertiesSelectedEntities.filter(a => annotations[a.id]);
185
185
 
186
186
  const deleteAnnotation = this.props[`delete${annotationTypeUpper}`];
187
187
 
188
- const annotationsToUse = map(annotations, (annotation) => {
188
+ const annotationsToUse = map(annotations, annotation => {
189
189
  return {
190
190
  ...annotation,
191
191
  ...(annotation.strand === undefined && {
@@ -197,107 +197,105 @@ const genericAnnotationProperties = ({
197
197
 
198
198
  return (
199
199
  <DataTable
200
- topLeftItems={getVisFilter(
201
- createCommandMenu(
202
- isFunction(visSubmenu) ? visSubmenu(this.props) : visSubmenu,
203
- this.commands,
204
- {
205
- useTicks: true
206
- }
207
- )
208
- )}
209
- annotationPropertiesSelectedEntities={
210
- annotationPropertiesSelectedEntities
211
- }
212
- leftOfSearchBarItems={
213
- <>
214
- {!readOnly && (
215
- <ButtonGroup style={{ marginTop: 3, marginRight: 4 }}>
216
- <Tooltip
217
- position="top"
218
- modifiers={popoverOverflowModifiers}
219
- content="New"
220
- >
221
- <AnchorButton
222
- disabled={!sequenceLength}
223
- icon="plus"
224
- className="tgNewAnnBtn"
225
- onClick={() => {
226
- showAddOrEditAnnotationDialog({
227
- type: annotationType,
228
- annotation: pick(
229
- selectionLayer,
230
- "start",
231
- "end",
232
- "forward"
233
- )
234
- });
235
- }}
236
- ></AnchorButton>
237
- </Tooltip>
238
- <Tooltip
239
- position="top"
240
- modifiers={popoverOverflowModifiers}
241
- content="Edit"
242
- >
243
- <AnchorButton
244
- onClick={() => {
245
- showAddOrEditAnnotationDialog({
246
- type: annotationType,
247
- annotation: annotationPropertiesSelectedEntities[0]
248
- });
249
- }}
250
- disabled={
251
- annotationPropertiesSelectedEntities.length !== 1
252
- }
253
- icon="edit"
254
- ></AnchorButton>
255
- </Tooltip>
200
+ topLeftItems={getVisFilter(
201
+ createCommandMenu(
202
+ isFunction(visSubmenu) ? visSubmenu(this.props) : visSubmenu,
203
+ this.commands,
204
+ {
205
+ useTicks: true
206
+ }
207
+ )
208
+ )}
209
+ annotationPropertiesSelectedEntities={
210
+ annotationPropertiesSelectedEntities
211
+ }
212
+ leftOfSearchBarItems={
213
+ <>
214
+ {!readOnly && (
215
+ <ButtonGroup style={{ marginTop: 3, marginRight: 4 }}>
216
+ <Tooltip
217
+ position="top"
218
+ modifiers={popoverOverflowModifiers}
219
+ content="New"
220
+ >
221
+ <AnchorButton
222
+ disabled={!sequenceLength}
223
+ icon="plus"
224
+ className="tgNewAnnBtn"
225
+ onClick={() => {
226
+ showAddOrEditAnnotationDialog({
227
+ type: annotationType,
228
+ annotation: pick(
229
+ selectionLayer,
230
+ "start",
231
+ "end",
232
+ "forward"
233
+ )
234
+ });
235
+ }}
236
+ ></AnchorButton>
237
+ </Tooltip>
238
+ <Tooltip
239
+ position="top"
240
+ modifiers={popoverOverflowModifiers}
241
+ content="Edit"
242
+ >
243
+ <AnchorButton
244
+ onClick={() => {
245
+ showAddOrEditAnnotationDialog({
246
+ type: annotationType,
247
+ annotation: annotationPropertiesSelectedEntities[0]
248
+ });
249
+ }}
250
+ disabled={
251
+ annotationPropertiesSelectedEntities.length !== 1
252
+ }
253
+ icon="edit"
254
+ ></AnchorButton>
255
+ </Tooltip>
256
256
 
257
- {["feature"].includes(annotationType) && (
258
- <CmdButton
259
- text=""
260
- icon="cog"
261
- data-tip="Configure Feature Types"
262
- cmd={this.commands.onConfigureFeatureTypesClick}
263
- />
264
- )}
265
- {["part", "primer", "feature"].includes(annotationType) && (
266
- <CmdButton
267
- text=""
268
- icon={removeDuplicatesIcon}
269
- data-tip="Remove Duplicates"
270
- cmd={
271
- this.commands[
272
- `showRemoveDuplicatesDialog${
273
- annotationTypeUpper + "s"
274
- }`
275
- ]
276
- }
277
- />
278
- )}
257
+ {["feature"].includes(annotationType) && (
258
+ <CmdButton
259
+ text=""
260
+ icon="cog"
261
+ data-tip="Configure Feature Types"
262
+ cmd={this.commands.onConfigureFeatureTypesClick}
263
+ />
264
+ )}
265
+ {["part", "primer", "feature"].includes(annotationType) && (
266
+ <CmdButton
267
+ text=""
268
+ icon={removeDuplicatesIcon}
269
+ data-tip="Remove Duplicates"
270
+ cmd={
271
+ this.commands[
272
+ `showRemoveDuplicatesDialog${
273
+ annotationTypeUpper + "s"
274
+ }`
275
+ ]
276
+ }
277
+ />
278
+ )}
279
279
 
280
- {additionalFooterEls && additionalFooterEls(this.props)}
281
- <Tooltip
282
- position="top"
283
- modifiers={popoverOverflowModifiers}
284
- content="Delete"
285
- >
286
- <AnchorButton
287
- onClick={() => {
288
- deleteAnnotation(
289
- annotationPropertiesSelectedEntities
290
- );
291
- }}
292
- className="tgDeleteAnnsBtn"
293
- intent="danger"
294
- disabled={!annotationPropertiesSelectedEntities.length}
295
- icon="trash"
296
- ></AnchorButton>
297
- </Tooltip>
298
- </ButtonGroup>
299
- )}
300
- {/* {createCommandMenu(
280
+ {additionalFooterEls && additionalFooterEls(this.props)}
281
+ <Tooltip
282
+ position="top"
283
+ modifiers={popoverOverflowModifiers}
284
+ content="Delete"
285
+ >
286
+ <AnchorButton
287
+ onClick={() => {
288
+ deleteAnnotation(annotationPropertiesSelectedEntities);
289
+ }}
290
+ className="tgDeleteAnnsBtn"
291
+ intent="danger"
292
+ disabled={!annotationPropertiesSelectedEntities.length}
293
+ icon="trash"
294
+ ></AnchorButton>
295
+ </Tooltip>
296
+ </ButtonGroup>
297
+ )}
298
+ {/* {createCommandMenu(
301
299
  {
302
300
  cmd: "featureFilterIndividualCmd",
303
301
  // text: 'hahah',
@@ -308,43 +306,43 @@ const genericAnnotationProperties = ({
308
306
  useTicks: true
309
307
  }
310
308
  )} */}
311
- {/* <CmdCheckbox
309
+ {/* <CmdCheckbox
312
310
  prefix="Show "
313
311
  cmd={this.commands.featureFilterIndividualCmd}
314
312
  /> */}
315
- </>
316
- }
317
- onDoubleClick={(annotation) => {
318
- showAddOrEditAnnotationDialog({
319
- type: annotationType,
320
- annotation
321
- });
322
- }}
323
- withCheckboxes
324
- showFeatureIndividual={this.props.showFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
325
- hideFeatureIndividual={this.props.hideFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
326
- showPartIndividual={this.props.showPartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
327
- hidePartIndividual={this.props.hidePartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
328
- showPrimerIndividual={this.props.showPrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
329
- hidePrimerIndividual={this.props.hidePrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
330
- annotationVisibility={annotationVisibility} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
331
- featureLengthsToHide={this.props.featureLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
332
- primerLengthsToHide={this.props.primerLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
333
- partLengthsToHide={this.props.partLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
334
- sequence={sequence} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
335
- noPadding
336
- noFullscreenButton
337
- onRowSelect={this.onRowSelect}
338
- selectedIds={selectedAnnotationId}
339
- formName="annotationProperties"
340
- noRouter
341
- isProtein={isProtein}
342
- keyedPartTags={getKeyedTagsAndTagOptions(allPartTags)}
343
- compact
344
- isInfinite
345
- schema={this.schema}
346
- entities={annotationsToUse}
347
- />
313
+ </>
314
+ }
315
+ onDoubleClick={annotation => {
316
+ showAddOrEditAnnotationDialog({
317
+ type: annotationType,
318
+ annotation
319
+ });
320
+ }}
321
+ withCheckboxes
322
+ showFeatureIndividual={this.props.showFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
323
+ hideFeatureIndividual={this.props.hideFeatureIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
324
+ showPartIndividual={this.props.showPartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
325
+ hidePartIndividual={this.props.hidePartIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
326
+ showPrimerIndividual={this.props.showPrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
327
+ hidePrimerIndividual={this.props.hidePrimerIndividual} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
328
+ annotationVisibility={annotationVisibility} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
329
+ featureLengthsToHide={this.props.featureLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
330
+ primerLengthsToHide={this.props.primerLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
331
+ partLengthsToHide={this.props.partLengthsToHide} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
332
+ sequence={sequence} //we need to pass this in order to force the DT to rerenderannotationVisibility={annotationVisibility}
333
+ noPadding
334
+ noFullscreenButton
335
+ onRowSelect={this.onRowSelect}
336
+ selectedIds={selectedAnnotationId}
337
+ formName="annotationProperties"
338
+ noRouter
339
+ isProtein={isProtein}
340
+ keyedPartTags={getKeyedTagsAndTagOptions(allPartTags)}
341
+ compact
342
+ isInfinite
343
+ schema={this.schema}
344
+ entities={annotationsToUse}
345
+ />
348
346
  );
349
347
  }
350
348
  }
@@ -35,7 +35,7 @@ class OrfProperties extends React.Component {
35
35
  };
36
36
  render() {
37
37
  const { orfs, sequenceLength, annotationVisibility } = this.props;
38
- const orfsToUse = map(orfs, (orf) => {
38
+ const orfsToUse = map(orfs, orf => {
39
39
  return {
40
40
  ...orf,
41
41
  color: getOrfColor(orf),
@@ -69,7 +69,7 @@ class OrfProperties extends React.Component {
69
69
  {
70
70
  path: "color",
71
71
  type: "string",
72
- render: (color) => {
72
+ render: color => {
73
73
  return (
74
74
  <div style={{ height: 20, width: 20, background: color }} />
75
75
  );
@@ -94,7 +94,7 @@ class OrfProperties extends React.Component {
94
94
  }
95
95
 
96
96
  export default compose(
97
- connectToEditor((editorState) => {
97
+ connectToEditor(editorState => {
98
98
  const {
99
99
  readOnly,
100
100
  annotationVisibility = {},
@@ -9,7 +9,7 @@ export default genericAnnotationProperties({
9
9
  visSubmenu: primersSubmenu,
10
10
  noType: true,
11
11
  withBases: true,
12
- additionalFooterEls: (props) => {
12
+ additionalFooterEls: props => {
13
13
  return (
14
14
  <Button onClick={props.createNewPCR} intent="success">
15
15
  Simulate PCR
@@ -41,7 +41,7 @@ class TranslationProperties extends React.Component {
41
41
  selectedAnnotationId,
42
42
  annotationVisibility
43
43
  } = this.props;
44
- const translationsToUse = map(translations, (translation) => {
44
+ const translationsToUse = map(translations, translation => {
45
45
  let aaString = "";
46
46
  for (let i = 0; i < translation.aminoAcids.length; i++) {
47
47
  aaString += translation.aminoAcids[i].aminoAcid.value;
@@ -134,7 +134,7 @@ class TranslationProperties extends React.Component {
134
134
  }
135
135
 
136
136
  export default compose(
137
- connectToEditor((editorState) => {
137
+ connectToEditor(editorState => {
138
138
  const { readOnly, annotationVisibility = {}, sequenceData } = editorState;
139
139
  return {
140
140
  readOnly,
@@ -15,7 +15,7 @@ import "./style.css";
15
15
  import { userDefinedHandlersAndOpts } from "../../Editor/userDefinedHandlersAndOpts";
16
16
  import { pick } from "lodash";
17
17
 
18
- const PropertiesContainer = (Comp) => (props) => {
18
+ const PropertiesContainer = Comp => props => {
19
19
  const { additionalFooterEls, additionalHeaderEls, ...rest } = props;
20
20
  return (
21
21
  <React.Fragment>
@@ -67,12 +67,12 @@ export class PropertiesDialog extends React.Component {
67
67
  let { tabId, selectedAnnotationId } = propertiesTool;
68
68
  if (
69
69
  propertiesList
70
- .map((nameOrOverride) => nameOrOverride.name || nameOrOverride)
70
+ .map(nameOrOverride => nameOrOverride.name || nameOrOverride)
71
71
  .indexOf(tabId) === -1
72
72
  ) {
73
73
  tabId = propertiesList[0].name || propertiesList[0];
74
74
  }
75
- const propertiesTabs = flatMap(propertiesList, (nameOrOverride) => {
75
+ const propertiesTabs = flatMap(propertiesList, nameOrOverride => {
76
76
  if (annotationsToSupport[nameOrOverride] === false) {
77
77
  return [];
78
78
  }
@@ -73,7 +73,7 @@ class RemoveDuplicatesDialog extends React.Component {
73
73
  const annotations = sequenceData[type];
74
74
  const dups = [];
75
75
  const seqsHashByStartEndStrandName = {};
76
- forEach(annotations, (a) => {
76
+ forEach(annotations, a => {
77
77
  const hash = `${ignoreStartAndEnd ? "" : a.start}&${
78
78
  ignoreStartAndEnd ? "" : a.end
79
79
  }&${ignoreStrand ? "" : a.strand}&${ignoreName ? "" : a.name}`;
@@ -88,7 +88,7 @@ class RemoveDuplicatesDialog extends React.Component {
88
88
  render() {
89
89
  const { duplicatesToRemoveSelectedEntities, hideModal, type } = this.props;
90
90
 
91
- const selectedIds = this.state.dups.map((d) => d.id);
91
+ const selectedIds = this.state.dups.map(d => d.id);
92
92
  // const sequenceLength = sequenceData.sequence.length;
93
93
  // const isCirc = (this.state || {}).circular;
94
94
  return (
@@ -162,7 +162,7 @@ class RemoveDuplicatesDialog extends React.Component {
162
162
  intent="primary"
163
163
  onClick={() => {
164
164
  this.props[camelCase(`delete_${type}`).slice(0, -1)](
165
- duplicatesToRemoveSelectedEntities.map((d) => d.id)
165
+ duplicatesToRemoveSelectedEntities.map(d => d.id)
166
166
  );
167
167
  window.toastr.success(
168
168
  `Successfully Deleted ${
@@ -40,7 +40,7 @@ export default compose(
40
40
  class SelectDialog extends React.Component {
41
41
  updateTempHighlight =
42
42
  ({ isStart, isEnd } = {}) =>
43
- (val) => {
43
+ val => {
44
44
  const { selectionLayerUpdate, from, to, invalid } = this.props;
45
45
  if (invalid) return;
46
46
  selectionLayerUpdate(
@@ -80,7 +80,7 @@ export default compose(
80
80
 
81
81
  return (
82
82
  <form
83
- onSubmit={handleSubmit((data) => {
83
+ onSubmit={handleSubmit(data => {
84
84
  if (onSubmit) onSubmit(data);
85
85
  hideModal();
86
86
  tryToRefocusEditor();
@@ -143,7 +143,7 @@ export default compose(
143
143
  }
144
144
  );
145
145
 
146
- const normalizeToInt = (val) => {
146
+ const normalizeToInt = val => {
147
147
  const int = Math.round(val);
148
148
  const normalizedVal = `${int >= 0 ? int : 1}`;
149
149
  return normalizedVal;
@@ -48,12 +48,12 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
48
48
 
49
49
  const stepSize = this.props.stepSize || (max - min) / 10;
50
50
  if (bindOutsideChangeHelper) {
51
- bindOutsideChangeHelper.triggerChange = (fn) => {
51
+ bindOutsideChangeHelper.triggerChange = fn => {
52
52
  const valToPass =
53
53
  isNumber(value) && !isNaN(value) ? value : initialValue;
54
54
  return fn({
55
55
  value: valToPass,
56
- changeValue: (newVal) => {
56
+ changeValue: newVal => {
57
57
  const newnew = clamp(newVal, min, max);
58
58
  this.setState({ value: newnew });
59
59
  this.props.onChange && this.props.onChange(newnew);
@@ -65,7 +65,7 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
65
65
  return (
66
66
  <div
67
67
  className={`${className} ${smallSlider ? "small-slider" : ""}`}
68
- onClick={(e) => {
68
+ onClick={e => {
69
69
  onClick && onClick(e);
70
70
  preventDefaultStopPropagation(e);
71
71
  }}
@@ -100,10 +100,10 @@ export default class UncontrolledSliderWithPlusMinusBtns extends React.Component
100
100
  />
101
101
  <Slider
102
102
  {...{ ...rest, value }}
103
- onRelease={(newVal) =>
103
+ onRelease={newVal =>
104
104
  this.props.onRelease && this.props.onRelease(newVal)
105
105
  }
106
- onChange={(value) => {
106
+ onChange={value => {
107
107
  this.setState({ value });
108
108
  this.props.onChange && this.props.onChange(value);
109
109
  }}
@@ -25,7 +25,7 @@ class SimpleGenericDialogForm extends React.Component {
25
25
  } = this.props;
26
26
  return (
27
27
  <form
28
- onSubmit={handleSubmit((data) => {
28
+ onSubmit={handleSubmit(data => {
29
29
  if (onSubmit) onSubmit(data);
30
30
  hideModal();
31
31
  tryToRefocusEditor();
@@ -1,9 +1,6 @@
1
1
  import React from "react";
2
2
  import withEditorProps from "../withEditorProps";
3
- import {
4
- TgSelect,
5
- getKeyedTagsAndTagOptions
6
- } from "@teselagen/ui";
3
+ import { TgSelect, getKeyedTagsAndTagOptions } from "@teselagen/ui";
7
4
  import { flatMap } from "lodash";
8
5
  import { uniqBy } from "lodash";
9
6
 
@@ -30,7 +27,7 @@ function PartToolDropdown({
30
27
 
31
28
  const tags = uniqBy(
32
29
  flatMap(sequenceData.parts, ({ tags }) => {
33
- return flatMap(tags, (t) => {
30
+ return flatMap(tags, t => {
34
31
  const tag = keyedTags[t];
35
32
  if (!tag) return [];
36
33
  return tag;
@@ -15,7 +15,7 @@ export function withHoveredIdFromContext(Component) {
15
15
  return function HoveredIdComponent(props) {
16
16
  return (
17
17
  <HoveredIdContext.Consumer>
18
- {(contexts) => <Component {...props} {...contexts} />}
18
+ {contexts => <Component {...props} {...contexts} />}
19
19
  </HoveredIdContext.Consumer>
20
20
  );
21
21
  };
@@ -65,7 +65,7 @@ export default compose(
65
65
  hoveredAnnotationActions)
66
66
  ),
67
67
  withHandlers({
68
- onMouseOver: (props) => (e) => {
68
+ onMouseOver: props => e => {
69
69
  const { editorName, id, hoveredAnnotationUpdate } = props;
70
70
  const isIdHashmap = typeof id === "object";
71
71
  const idToPass = isIdHashmap ? Object.keys(id)[0] : id;
@@ -79,7 +79,7 @@ export default compose(
79
79
  hoveredAnnotationUpdate &&
80
80
  hoveredAnnotationUpdate(idToPass, { editorName });
81
81
  },
82
- onMouseLeave: (props) => (e) => {
82
+ onMouseLeave: props => e => {
83
83
  hoveredAnnEasyStore.hoveredAnn = undefined;
84
84
  const { editorName, hoveredAnnotationClear } = props;
85
85
  e.stopPropagation();
@@ -45,7 +45,7 @@ const defaultVisibilities = {
45
45
  const defaultVisibilityTypes = Object.keys(defaultVisibilities);
46
46
 
47
47
  try {
48
- defaultVisibilityTypes.forEach((type) => {
48
+ defaultVisibilityTypes.forEach(type => {
49
49
  const newVal = JSON.parse(window.localStorage.getItem(type));
50
50
  if (newVal)
51
51
  defaultVisibilities[type] = {
@@ -75,7 +75,7 @@ const highlightRangeProps = {
75
75
  ignoreGaps: true
76
76
  };
77
77
  function addHighlightedDifferences(alignmentTracks) {
78
- return alignmentTracks.map((track) => {
78
+ return alignmentTracks.map(track => {
79
79
  if (track.isUnmapped) {
80
80
  return track;
81
81
  }
@@ -92,7 +92,7 @@ function addHighlightedDifferences(alignmentTracks) {
92
92
  matchHighlightRanges,
93
93
  additionalSelectionLayers: matchHighlightRanges
94
94
  .filter(({ isMatch }) => !isMatch)
95
- .map((range) => {
95
+ .map(range => {
96
96
  return { ...range, ...highlightRangeProps };
97
97
  }),
98
98
  mismatches
@@ -120,7 +120,7 @@ export default (state = {}, { payload = {}, type }) => {
120
120
  }
121
121
 
122
122
  if (type === "UPDATE_ALIGNMENT_VIEW_VISIBILITY") {
123
- defaultVisibilityTypes.forEach((type) => {
123
+ defaultVisibilityTypes.forEach(type => {
124
124
  if (
125
125
  (type.startsWith("pairwise_") && payload.pairwiseAlignments) ||
126
126
  (!type.startsWith("pairwise_") && !payload.pairwiseAlignments)
@@ -239,7 +239,7 @@ export default (state = {}, { payload = {}, type }) => {
239
239
  payloadToUse.alignmentTracks,
240
240
  payload.alignmentType
241
241
  );
242
- (payloadToUse.pairwiseAlignments || []).forEach((alignment) => {
242
+ (payloadToUse.pairwiseAlignments || []).forEach(alignment => {
243
243
  const error = alignment;
244
244
  if (error) {
245
245
  hasError = error;
@@ -310,7 +310,7 @@ function checkForIssues(alignmentTracks, alignmentType) {
310
310
 
311
311
  const alignmentTrackLength = alignmentTracks[0].alignmentData.sequence.length;
312
312
  let hasError;
313
- alignmentTracks.some((track) => {
313
+ alignmentTracks.some(track => {
314
314
  if (track.alignmentData.sequence.length !== alignmentTrackLength) {
315
315
  console.error("incorrect length", alignmentTracks);
316
316
 
@@ -69,7 +69,7 @@ export const resetPartIndividualToHide = createAction(
69
69
  // ------------------------------------
70
70
  const annotationVisibility = createMergedDefaultStateReducer(
71
71
  {
72
- [resetPartIndividualToHide]: (state) => {
72
+ [resetPartIndividualToHide]: state => {
73
73
  return {
74
74
  ...state,
75
75
  partIndividualToHide: {}
@@ -94,7 +94,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
94
94
  }
95
95
  };
96
96
  },
97
- [resetFeatureIndividualToHide]: (state) => {
97
+ [resetFeatureIndividualToHide]: state => {
98
98
  return {
99
99
  ...state,
100
100
  featureIndividualToHide: {}
@@ -119,7 +119,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
119
119
  }
120
120
  };
121
121
  },
122
- [resetPrimerIndividualToHide]: (state) => {
122
+ [resetPrimerIndividualToHide]: state => {
123
123
  return {
124
124
  ...state,
125
125
  primerIndividualToHide: {}
@@ -144,7 +144,7 @@ const annotationVisibility = createMergedDefaultStateReducer(
144
144
  }
145
145
  };
146
146
  },
147
- [resetFeatureTypesToHide]: (state) => {
147
+ [resetFeatureTypesToHide]: state => {
148
148
  return {
149
149
  ...state,
150
150
  featureTypesToHide: {}
@@ -19,7 +19,7 @@ export default createMergedDefaultStateReducer(
19
19
  [updateFeatureLengthsToHide]: (state, payload) => {
20
20
  return { ...state, ...payload };
21
21
  },
22
- [toggleFeatureLengthsToHide]: (state) => {
22
+ [toggleFeatureLengthsToHide]: state => {
23
23
  return { ...state, enabled: !state["enabled"] };
24
24
  }
25
25
  },