@teselagen/ove 0.3.51 → 0.3.53
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 +1696 -9470
- package/index.es.js +1696 -9470
- package/index.umd.js +11278 -11181
- package/package.json +4 -5
- package/src/DigestTool/Ladder.js +12 -12
- package/src/index.js +0 -1
- package/src/style.css +2 -2
- package/src/utils/onlyUpdateForKeysDeep.js +3 -3
- package/src/utils/pureNoFunc.js +3 -3
- package/src/withEditorInteractions/index.js +4 -1
- 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.53",
         | 
| 4 4 | 
             
              "main": "./src/index.js",
         | 
| 5 5 | 
             
              "exports": {
         | 
| 6 6 | 
             
                ".": {
         | 
| @@ -15,19 +15,18 @@ | |
| 15 15 | 
             
              "dependencies": {
         | 
| 16 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.42",
         | 
| 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.6",
         | 
| 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
         | 
| 129 | 
            +
                              .default(document.querySelector(".ve-digest-container"))
         | 
| 130 | 
            +
                              .then(canvas => {
         | 
| 131 | 
            +
                                canvas.toBlob(blob =>
         | 
| 132 | 
            +
                                  navigator.clipboard.write([
         | 
| 133 | 
            +
                                    new window.ClipboardItem({ "image/png": blob })
         | 
| 134 | 
            +
                                  ])
         | 
| 135 | 
            +
                                );
         | 
| 136 | 
            +
                                window.toastr.success("Image copied to clipboard!");
         | 
| 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/style.css
    CHANGED
    
    
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            import { pick } from "lodash";
         | 
| 2 2 | 
             
            import { shouldUpdate } from "recompose";
         | 
| 3 | 
            -
            import  | 
| 3 | 
            +
            import { isEqualWith, isFunction } from "lodash";
         | 
| 4 4 |  | 
| 5 5 | 
             
            // import deepEqual from "deep-equal";
         | 
| 6 6 |  | 
| @@ -22,8 +22,8 @@ const onlyUpdateForKeys = propKeys => { | |
| 22 22 | 
             
            export default onlyUpdateForKeys;
         | 
| 23 23 |  | 
| 24 24 | 
             
            const isEq = (o1, o2) => {
         | 
| 25 | 
            -
              const isEq =  | 
| 26 | 
            -
                if ( | 
| 25 | 
            +
              const isEq = isEqualWith(o1, o2, function (val1, val2) {
         | 
| 26 | 
            +
                if (isFunction(val1) && isFunction(val2)) {
         | 
| 27 27 | 
             
                  return val1 === val2 || val1.toString() === val2.toString();
         | 
| 28 28 | 
             
                }
         | 
| 29 29 | 
             
              });
         | 
    
        package/src/utils/pureNoFunc.js
    CHANGED
    
    | @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            import { shouldUpdate } from "recompose";
         | 
| 2 | 
            -
            import  | 
| 2 | 
            +
            import { isEqualWith, isFunction } from "lodash";
         | 
| 3 3 |  | 
| 4 4 | 
             
            const isEq = (o1, o2) => {
         | 
| 5 | 
            -
              const isEq =  | 
| 6 | 
            -
                if ( | 
| 5 | 
            +
              const isEq = isEqualWith(o1, o2, function (val1, val2) {
         | 
| 6 | 
            +
                if (isFunction(val1) && isFunction(val2)) {
         | 
| 7 7 | 
             
                  return val1 === val2 || val1.toString() === val2.toString();
         | 
| 8 8 | 
             
                }
         | 
| 9 9 | 
             
              });
         | 
| @@ -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",
         |