@teselagen/ove 0.3.50 → 0.3.52
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/html2canvas.esm-388ff992.js +7891 -0
- package/html2canvas.esm-65f48ee4.mjs +7891 -0
- package/index.cjs.js +1336 -9178
- package/index.es.js +1336 -9178
- package/index.umd.js +11215 -11169
- package/package.json +5 -6
- package/src/DigestTool/Ladder.js +12 -12
- package/src/index.js +0 -1
- package/src/redux/alignments.js +9 -3
- package/src/style.css +2 -2
- package/src/withEditorInteractions/index.js +5 -2
- package/src/withEditorProps/index.js +8 -2
- package/style.css +3 -57
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@teselagen/ove",
         | 
| 3 | 
            -
              "version": "0.3. | 
| 3 | 
            +
              "version": "0.3.52",
         | 
| 4 4 | 
             
              "main": "./src/index.js",
         | 
| 5 5 | 
             
              "exports": {
         | 
| 6 6 | 
             
                ".": {
         | 
| @@ -13,21 +13,20 @@ | |
| 13 13 | 
             
                "node": "16.20.2"
         | 
| 14 14 | 
             
              },
         | 
| 15 15 | 
             
              "dependencies": {
         | 
| 16 | 
            -
                "@teselagen/sequence-utils": "0.3. | 
| 16 | 
            +
                "@teselagen/sequence-utils": "0.3.12",
         | 
| 17 17 | 
             
                "@teselagen/range-utils": "0.3.7",
         | 
| 18 | 
            -
                "@teselagen/ui": "0.3. | 
| 18 | 
            +
                "@teselagen/ui": "0.3.41",
         | 
| 19 19 | 
             
                "@teselagen/file-utils": "0.3.9",
         | 
| 20 20 | 
             
                "@teselagen/bounce-loader": "0.3.11",
         | 
| 21 | 
            -
                "@teselagen/bio-parsers": "0.4. | 
| 21 | 
            +
                "@teselagen/bio-parsers": "0.4.5",
         | 
| 22 22 | 
             
                "@blueprintjs/core": "3.52.0",
         | 
| 23 23 | 
             
                "@blueprintjs/datetime": "3.23.19",
         | 
| 24 24 | 
             
                "@blueprintjs/icons": "3.33.0",
         | 
| 25 25 | 
             
                "@blueprintjs/select": "3.18.11",
         | 
| 26 | 
            -
                "@fontsource/ubuntu-mono": "^4.5.11",
         | 
| 27 26 | 
             
                "@hello-pangea/dnd": "16.2.0",
         | 
| 28 27 | 
             
                "@risingstack/react-easy-state": "^6.3.0",
         | 
| 29 28 | 
             
                "@teselagen/react-list": "0.8.18",
         | 
| 30 | 
            -
                "@teselagen/react-table": "6.10. | 
| 29 | 
            +
                "@teselagen/react-table": "6.10.16",
         | 
| 31 30 | 
             
                "@use-gesture/react": "^10.2.23",
         | 
| 32 31 | 
             
                "axios": "^0.21.1",
         | 
| 33 32 | 
             
                "bluebird": "3.7.2",
         | 
    
        package/src/DigestTool/Ladder.js
    CHANGED
    
    | @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            /* eslint-disable react/jsx-no-bind */
         | 
| 2 2 | 
             
            import React, { useState } from "react";
         | 
| 3 3 | 
             
            import { showConfirmationDialog, TgSelect } from "@teselagen/ui";
         | 
| 4 | 
            -
            import html2canvas from "html2canvas";
         | 
| 5 4 |  | 
| 6 5 | 
             
            import "./Ladder.css";
         | 
| 7 6 | 
             
            import { Button, Tooltip } from "@blueprintjs/core";
         | 
| @@ -123,18 +122,19 @@ export default function Ladder({ | |
| 123 122 | 
             
                        icon="duplicate"
         | 
| 124 123 | 
             
                        minimal
         | 
| 125 124 | 
             
                        style={{ position: "absolute", top: 5, right: 5, color: "white" }}
         | 
| 126 | 
            -
                        onClick={() => {
         | 
| 125 | 
            +
                        onClick={async () => {
         | 
| 127 126 | 
             
                          try {
         | 
| 128 | 
            -
                            html2canvas | 
| 129 | 
            -
             | 
| 130 | 
            -
             | 
| 131 | 
            -
             | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
             | 
| 135 | 
            -
             | 
| 136 | 
            -
             | 
| 137 | 
            -
             | 
| 127 | 
            +
                            const canvas = await import("html2canvas");
         | 
| 128 | 
            +
                            canvas.default(document.querySelector(".ve-digest-container")).then(
         | 
| 129 | 
            +
                              canvas => {
         | 
| 130 | 
            +
                                canvas.toBlob(blob =>
         | 
| 131 | 
            +
                                  navigator.clipboard.write([
         | 
| 132 | 
            +
                                    new window.ClipboardItem({ "image/png": blob })
         | 
| 133 | 
            +
                                  ])
         | 
| 134 | 
            +
                                );
         | 
| 135 | 
            +
                                window.toastr.success("Image copied to clipboard!");
         | 
| 136 | 
            +
                              }
         | 
| 137 | 
            +
                            );
         | 
| 138 138 | 
             
                          } catch (e) {
         | 
| 139 139 | 
             
                            window.toastr.error(
         | 
| 140 140 | 
             
                              "Error copying the image, try just taking a screenshot instead ;)"
         | 
    
        package/src/index.js
    CHANGED
    
    
    
        package/src/redux/alignments.js
    CHANGED
    
    | @@ -79,7 +79,9 @@ function addHighlightedDifferences(alignmentTracks) { | |
| 79 79 | 
             
                if (track.isUnmapped) {
         | 
| 80 80 | 
             
                  return track;
         | 
| 81 81 | 
             
                }
         | 
| 82 | 
            -
                const sequenceData = tidyUpSequenceData(track.sequenceData | 
| 82 | 
            +
                const sequenceData = tidyUpSequenceData(track.sequenceData, {
         | 
| 83 | 
            +
                  doNotRemoveInvalidChars: true
         | 
| 84 | 
            +
                });
         | 
| 83 85 | 
             
                const matchHighlightRanges = getRangeMatchesBetweenTemplateAndNonTemplate(
         | 
| 84 86 | 
             
                  alignmentTracks[0].alignmentData.sequence,
         | 
| 85 87 | 
             
                  track.alignmentData.sequence
         | 
| @@ -179,7 +181,9 @@ export default (state = {}, { payload = {}, type }) => { | |
| 179 181 | 
             
                    {
         | 
| 180 182 | 
             
                      //add the template seq as the first track in the Pairwise Alignment Overview
         | 
| 181 183 | 
             
                      ...templateSeq,
         | 
| 182 | 
            -
                      sequenceData: tidyUpSequenceData(templateSeq.sequenceData | 
| 184 | 
            +
                      sequenceData: tidyUpSequenceData(templateSeq.sequenceData, {
         | 
| 185 | 
            +
                        doNotRemoveInvalidChars: true
         | 
| 186 | 
            +
                      }),
         | 
| 183 187 | 
             
                      alignmentData: { sequence: templateSeq.sequenceData.sequence } //remove the gaps from the template sequence
         | 
| 184 188 | 
             
                    }
         | 
| 185 189 | 
             
                  ]; // start with just the template seq in there!
         | 
| @@ -213,7 +217,9 @@ export default (state = {}, { payload = {}, type }) => { | |
| 213 217 | 
             
                    const alignedSeqMinusInserts = {
         | 
| 214 218 | 
             
                      ...alignedSeq,
         | 
| 215 219 | 
             
                      sequenceData: {
         | 
| 216 | 
            -
                        ...tidyUpSequenceData(alignedSeq.sequenceData | 
| 220 | 
            +
                        ...tidyUpSequenceData(alignedSeq.sequenceData, {
         | 
| 221 | 
            +
                          doNotRemoveInvalidChars: true
         | 
| 222 | 
            +
                        }),
         | 
| 217 223 | 
             
                        sequence: template.sequenceData.sequence
         | 
| 218 224 | 
             
                      },
         | 
| 219 225 | 
             
                      additionalSelectionLayers,
         | 
    
        package/src/style.css
    CHANGED
    
    
| @@ -283,7 +283,7 @@ function VectorInteractionHOC(Component /* options */) { | |
| 283 283 | 
             
                          }
         | 
| 284 284 | 
             
                        }
         | 
| 285 285 | 
             
                      ),
         | 
| 286 | 
            -
                    { annotationsAsObjects: true }
         | 
| 286 | 
            +
                    { doNotRemoveInvalidChars: true, annotationsAsObjects: true }
         | 
| 287 287 | 
             
                  );
         | 
| 288 288 |  | 
| 289 289 | 
             
                  if (
         | 
| @@ -314,7 +314,10 @@ function VectorInteractionHOC(Component /* options */) { | |
| 314 314 | 
             
                    this.handleDnaDelete(false);
         | 
| 315 315 | 
             
                    onCut(
         | 
| 316 316 | 
             
                      e,
         | 
| 317 | 
            -
                      tidyUpSequenceData(seqData, { | 
| 317 | 
            +
                      tidyUpSequenceData(seqData, {
         | 
| 318 | 
            +
                        doNotRemoveInvalidChars: true,
         | 
| 319 | 
            +
                        annotationsAsObjects: true
         | 
| 320 | 
            +
                      }),
         | 
| 318 321 | 
             
                      this.props
         | 
| 319 322 | 
             
                    );
         | 
| 320 323 | 
             
                    document.body.removeEventListener("cut", this.handleCut);
         | 
| @@ -160,7 +160,10 @@ export const handleSave = | |
| 160 160 | 
             
                  saveHandler &&
         | 
| 161 161 | 
             
                  saveHandler(
         | 
| 162 162 | 
             
                    opts,
         | 
| 163 | 
            -
                    tidyUpSequenceData(sequenceData, { | 
| 163 | 
            +
                    tidyUpSequenceData(sequenceData, {
         | 
| 164 | 
            +
                      doNotRemoveInvalidChars: true,
         | 
| 165 | 
            +
                      annotationsAsObjects: true
         | 
| 166 | 
            +
                    }),
         | 
| 164 167 | 
             
                    props,
         | 
| 165 168 | 
             
                    updateLastSavedIdToCurrent
         | 
| 166 169 | 
             
                  );
         | 
| @@ -869,7 +872,10 @@ function jsonToJson(incomingJson) { | |
| 869 872 | 
             
              return JSON.stringify(
         | 
| 870 873 | 
             
                omit(
         | 
| 871 874 | 
             
                  cleanUpTeselagenJsonForExport(
         | 
| 872 | 
            -
                    tidyUpSequenceData(incomingJson, { | 
| 875 | 
            +
                    tidyUpSequenceData(incomingJson, {
         | 
| 876 | 
            +
                      doNotRemoveInvalidChars: true,
         | 
| 877 | 
            +
                      annotationsAsObjects: false
         | 
| 878 | 
            +
                    })
         | 
| 873 879 | 
             
                  ),
         | 
| 874 880 | 
             
                  [
         | 
| 875 881 | 
             
                    "sequenceFragments",
         |