@teselagen/ove 0.4.3 → 0.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -13,9 +13,9 @@
13
13
  "node": "16.20.2"
14
14
  },
15
15
  "dependencies": {
16
- "@teselagen/sequence-utils": "0.3.18",
16
+ "@teselagen/sequence-utils": "0.3.19",
17
17
  "@teselagen/range-utils": "0.3.7",
18
- "@teselagen/ui": "0.3.75",
18
+ "@teselagen/ui": "0.3.76",
19
19
  "@teselagen/file-utils": "0.3.16",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
21
  "@teselagen/bio-parsers": "0.4.10",
@@ -1049,6 +1049,7 @@ export class AlignmentView extends React.Component {
1049
1049
  additionalSelectionLayerRightClickedOptions,
1050
1050
  selectionLayerRightClicked,
1051
1051
  additionalTopEl,
1052
+ additionalTopLeftEl,
1052
1053
  handleAlignmentRename,
1053
1054
  alignmentVisibilityToolOptions
1054
1055
  } = this.props;
@@ -1449,6 +1450,7 @@ export class AlignmentView extends React.Component {
1449
1450
  }}
1450
1451
  className="ve-alignment-top-bar"
1451
1452
  >
1453
+ {additionalTopLeftEl}
1452
1454
  {handleBackButtonClicked && (
1453
1455
  <Tooltip content="Back to Pairwise Alignment Overview">
1454
1456
  <Button
@@ -1,3 +1,6 @@
1
+ .tg-pinch-helper {
2
+ width: 100%;
3
+ }
1
4
  .ove-slider .bp3-slider {
2
5
  min-width: 10px !important;
3
6
  margin-bottom: 4px;
@@ -30,6 +30,7 @@ export default class FillWindow extends React.Component {
30
30
  <div
31
31
  {...rest}
32
32
  style={{
33
+ zIndex: 10,
33
34
  width,
34
35
  height,
35
36
  position: "fixed",
@@ -2,6 +2,7 @@
2
2
  .veEditor {
3
3
  position: relative;
4
4
  flex-grow: 1;
5
+ min-width: 0px;
5
6
  }
6
7
 
7
8
  .taProductViewer {
@@ -41,7 +41,8 @@ export default [
41
41
  showInSearchMenu: true,
42
42
  submenu: [
43
43
  { cmd: "exportSequenceAsGenbank" },
44
- { cmd: "exportSequenceAsFasta" },
44
+ { cmd: "exportDNASequenceAsFasta" },
45
+ { cmd: "exportProteinSequenceAsFasta" },
45
46
  { cmd: "exportSequenceAsTeselagenJson" }
46
47
  ]
47
48
  },
@@ -102,8 +102,8 @@ export default props => {
102
102
  )
103
103
  ? CircularView
104
104
  : _sequenceData.isOligo && _sequenceData.sequence
105
- ? SimpleOligoPreview
106
- : LinearView;
105
+ ? SimpleOligoPreview
106
+ : LinearView;
107
107
  if (withChoosePreviewType && previewType === "row") {
108
108
  Component = RowView;
109
109
  tickSpacing = undefined;
@@ -291,7 +291,8 @@ const DownloadBtn = withHandlers({ exportSequenceToFile })(props => {
291
291
  showContextMenu(
292
292
  [
293
293
  "exportSequenceAsGenbank",
294
- "exportSequenceAsFasta",
294
+ "exportDNASequenceAsFasta",
295
+ "exportProteinSequenceAsFasta",
295
296
  "exportSequenceAsTeselagenJson"
296
297
  ],
297
298
  [
@@ -28,7 +28,8 @@ const Dropdown = withEditorProps(props => {
28
28
  {createCommandMenu(
29
29
  [
30
30
  "exportSequenceAsGenbank",
31
- "exportSequenceAsFasta",
31
+ "exportDNASequenceAsFasta",
32
+ "exportProteinSequenceAsFasta",
32
33
  "exportSequenceAsTeselagenJson"
33
34
  ],
34
35
  getCommands({ props })
@@ -264,9 +264,24 @@ const fileCommandDefs = {
264
264
  handler: props =>
265
265
  props.exportSequenceToFile(isProtein(props) ? "genpept" : "genbank")
266
266
  },
267
- exportSequenceAsFasta: {
268
- name: "Download FASTA File",
269
- handler: props => props.exportSequenceToFile("fasta")
267
+ exportDNASequenceAsFasta: {
268
+ name: props =>
269
+ `Download ${props.sequenceData.isProtein ? "DNA " : ""}FASTA File`,
270
+ isHidden: props => !props.sequenceData.sequence,
271
+ handler: props =>
272
+ props.exportSequenceToFile("fasta", {
273
+ sequence: props.sequenceData.sequence,
274
+ size: props.sequenceData.size
275
+ })
276
+ },
277
+ exportProteinSequenceAsFasta: {
278
+ name: "Download AA FASTA File",
279
+ isHidden: props => !props.sequenceData.proteinSequence,
280
+ handler: props =>
281
+ props.exportSequenceToFile("fasta", {
282
+ sequence: props.sequenceData.proteinSequence,
283
+ size: props.sequenceData.proteinSize
284
+ })
270
285
  },
271
286
  exportSequenceAsTeselagenJson: {
272
287
  name: "Download Teselagen JSON File",
package/src/index.js CHANGED
@@ -3,13 +3,7 @@ import { showContextMenu } from "@teselagen/ui";
3
3
  import "./createVectorEditor";
4
4
  import "./style.css";
5
5
  export { getUserGroupLabel } from "./CutsiteFilter/AdditionalCutsiteInfoDialog";
6
-
7
6
  window.tgCreateMenu = showContextMenu;
8
- // window.tgCreateMenu = (menu, e, e2) => {
9
- // (e||e2).stopPropagation()
10
- // (e || e2)
11
- // } //add this to the window so people can easily override the default context menus
12
-
13
7
  FocusStyleManager.onlyShowFocusOnTabs();
14
8
  export { getGaps } from "./AlignmentView/getGaps";
15
9
  export { default as createVectorEditor } from "./createVectorEditor";
package/src/style.css CHANGED
@@ -96,3 +96,9 @@ body.tg-no-scroll-body {
96
96
  .bp3-dark .veToolbar-outer {
97
97
  background: #202b33;
98
98
  }
99
+ /* .veVersionHistoryView {
100
+ background: #ebf1f5;
101
+ }
102
+ .bp3-dark .veVersionHistoryView {
103
+ background: #202b33;
104
+ } */
@@ -50,8 +50,8 @@ const getUpperOrLowerSeq = defaultMemoize(
50
50
  uppercaseSequenceMapFont === "uppercase"
51
51
  ? sequence.toUpperCase()
52
52
  : uppercaseSequenceMapFont === "lowercase"
53
- ? sequence.toLowerCase()
54
- : sequence
53
+ ? sequence.toLowerCase()
54
+ : sequence
55
55
  );
56
56
 
57
57
  const getTypesToOmit = annotationsToSupport => {
@@ -284,7 +284,7 @@ export const importSequenceFromFile =
284
284
  }
285
285
  };
286
286
 
287
- export const exportSequenceToFile = props => format => {
287
+ export const exportSequenceToFile = props => (format, options) => {
288
288
  const { sequenceData } = props;
289
289
  let convert, fileExt;
290
290
 
@@ -304,7 +304,9 @@ export const exportSequenceToFile = props => format => {
304
304
  console.error(`Invalid export format: '${format}'`); // dev error
305
305
  return;
306
306
  }
307
- const blob = new Blob([convert(sequenceData)], { type: "text/plain" });
307
+ const blob = new Blob([convert(sequenceData, options)], {
308
+ type: "text/plain"
309
+ });
308
310
  const filename = `${sequenceData.name || "Untitled_Sequence"}.${fileExt}`;
309
311
  FileSaver.saveAs(blob, filename);
310
312
  window.toastr.success("File Downloaded Successfully");
@@ -441,16 +443,16 @@ export default compose(
441
443
  selectionLayer.start > -1
442
444
  ? { ...selectionLayer, id: undefined }
443
445
  : caretPosition > -1
444
- ? {
445
- start: caretPosition,
446
- end: sequenceData.isProtein
447
- ? caretPosition + 2
448
- : caretPosition
449
- }
450
- : {
451
- start: 0,
452
- end: sequenceData.isProtein ? 2 : 0
453
- };
446
+ ? {
447
+ start: caretPosition,
448
+ end: sequenceData.isProtein
449
+ ? caretPosition + 2
450
+ : caretPosition
451
+ }
452
+ : {
453
+ start: 0,
454
+ end: sequenceData.isProtein ? 2 : 0
455
+ };
454
456
  showAddOrEditAnnotationDialog({
455
457
  type: key.toLowerCase(),
456
458
  annotation: {
package/style.css CHANGED
@@ -8975,10 +8975,10 @@ code {
8975
8975
  display: none;
8976
8976
  }
8977
8977
 
8978
- .isDataTitle .tippy-arrow {
8978
+ .isDataTitle .tippy-box[data-theme~="teselagen"] .tippy-arrow {
8979
8979
  opacity: 0 !important;
8980
8980
  }
8981
- .isDataTitle .tippy-box {
8981
+ .isDataTitle .tippy-box[data-theme~="teselagen"] {
8982
8982
  background-color: #4f4a50f4 !important;
8983
8983
  border-radius: 0 !important;
8984
8984
  color: #f3f3f3 !important;
@@ -8987,24 +8987,24 @@ code {
8987
8987
  padding: 0px 0px !important;
8988
8988
  }
8989
8989
 
8990
- [data-tippy-root] {
8990
+ [data-tippy-root]:has(.tippy-box[data-theme~="teselagen"]) {
8991
8991
  z-index: 100000 !important;
8992
8992
  }
8993
8993
 
8994
- [data-tippy-root] .tippy-box {
8994
+ [data-tippy-root] .tippy-box[data-theme~="teselagen"] {
8995
8995
  background-color: #394b59;
8996
8996
  color: #f5f8fa;
8997
8997
  padding: 4px 4px;
8998
8998
  word-break: break-word;
8999
8999
  }
9000
- [data-tippy-root] .tippy-arrow {
9000
+ [data-tippy-root] .tippy-box[data-theme~="teselagen"] .tippy-arrow {
9001
9001
  color: #394b59;
9002
9002
  }
9003
- .bp3-dark [data-tippy-root] .tippy-box {
9003
+ .bp3-dark [data-tippy-root] .tippy-box[data-theme~="teselagen"] {
9004
9004
  background-color: #e1e8ed;
9005
9005
  color: #394b59;
9006
9006
  }
9007
- .bp3-dark [data-tippy-root] .tippy-arrow {
9007
+ .bp3-dark [data-tippy-root] .tippy-box[data-theme~="teselagen"] .tippy-arrow {
9008
9008
  /* background-color: #e1e8ed; */
9009
9009
  color: #e1e8ed;
9010
9010
  }
@@ -9410,7 +9410,7 @@ body:not(.drag-active)
9410
9410
  }
9411
9411
 
9412
9412
  .ReactTable .rt-tr-group.selected {
9413
- background: lightblue !important;
9413
+ background: #e4f3f8 !important;
9414
9414
  }
9415
9415
 
9416
9416
  .ReactTable .rt-tr-group.disabled {
@@ -9634,7 +9634,9 @@ body:not(.drag-active)
9634
9634
  .bp3-dark .ReactTable .rt-tbody {
9635
9635
  background: #30404d !important;
9636
9636
  }
9637
-
9637
+ .ReactTable .rt-thead.-header {
9638
+ box-shadow: none;
9639
+ }
9638
9640
  .bp3-dark .ReactTable .rt-thead.-header {
9639
9641
  color: #f5f8fa !important;
9640
9642
  }
@@ -10999,6 +11001,9 @@ li.bp3-menu-divider:last-child {
10999
11001
  height: 12px;
11000
11002
  top: 2px;
11001
11003
  }
11004
+ .tg-pinch-helper {
11005
+ width: 100%;
11006
+ }
11002
11007
  .ove-slider .bp3-slider {
11003
11008
  min-width: 10px !important;
11004
11009
  margin-bottom: 4px;
@@ -11696,6 +11701,7 @@ path.partWithSelectedTag {
11696
11701
  .veEditor {
11697
11702
  position: relative;
11698
11703
  flex-grow: 1;
11704
+ min-width: 0px;
11699
11705
  }
11700
11706
  .taProductViewer {
11701
11707
  display: flex;
@@ -12025,3 +12031,9 @@ body.tg-no-scroll-body {
12025
12031
  .bp3-dark .veToolbar-outer {
12026
12032
  background: #202b33;
12027
12033
  }
12034
+ /* .veVersionHistoryView {
12035
+ background: #ebf1f5;
12036
+ }
12037
+ .bp3-dark .veVersionHistoryView {
12038
+ background: #202b33;
12039
+ } */