@teselagen/ove 0.3.52 → 0.3.54
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/index.cjs.js +149 -78
- package/index.es.js +149 -78
- package/index.umd.js +224 -162
- package/package.json +3 -3
- package/src/DigestTool/Ladder.js +4 -4
- package/src/utils/onlyUpdateForKeysDeep.js +3 -3
- package/src/utils/pureNoFunc.js +3 -3
- package/src/withEditorInteractions/index.js +3 -0
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@teselagen/ove",
         | 
| 3 | 
            -
              "version": "0.3. | 
| 3 | 
            +
              "version": "0.3.54",
         | 
| 4 4 | 
             
              "main": "./src/index.js",
         | 
| 5 5 | 
             
              "exports": {
         | 
| 6 6 | 
             
                ".": {
         | 
| @@ -15,10 +15,10 @@ | |
| 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",
         | 
    
        package/src/DigestTool/Ladder.js
    CHANGED
    
    | @@ -125,16 +125,16 @@ export default function Ladder({ | |
| 125 125 | 
             
                        onClick={async () => {
         | 
| 126 126 | 
             
                          try {
         | 
| 127 127 | 
             
                            const canvas = await import("html2canvas");
         | 
| 128 | 
            -
                            canvas | 
| 129 | 
            -
                               | 
| 128 | 
            +
                            canvas
         | 
| 129 | 
            +
                              .default(document.querySelector(".ve-digest-container"))
         | 
| 130 | 
            +
                              .then(canvas => {
         | 
| 130 131 | 
             
                                canvas.toBlob(blob =>
         | 
| 131 132 | 
             
                                  navigator.clipboard.write([
         | 
| 132 133 | 
             
                                    new window.ClipboardItem({ "image/png": blob })
         | 
| 133 134 | 
             
                                  ])
         | 
| 134 135 | 
             
                                );
         | 
| 135 136 | 
             
                                window.toastr.success("Image copied to clipboard!");
         | 
| 136 | 
            -
                              }
         | 
| 137 | 
            -
                            );
         | 
| 137 | 
            +
                              });
         | 
| 138 138 | 
             
                          } catch (e) {
         | 
| 139 139 | 
             
                            window.toastr.error(
         | 
| 140 140 | 
             
                              "Error copying the image, try just taking a screenshot instead ;)"
         | 
| @@ -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 | 
             
              });
         | 
| @@ -235,6 +235,9 @@ function VectorInteractionHOC(Component /* options */) { | |
| 235 235 | 
             
                      sequence: clipboardData.getData("text/plain") || e.target.value
         | 
| 236 236 | 
             
                    };
         | 
| 237 237 | 
             
                  }
         | 
| 238 | 
            +
                  if (sequenceData.isProtein && !seqDataToInsert.proteinSequence) {
         | 
| 239 | 
            +
                    seqDataToInsert.proteinSequence = seqDataToInsert.sequence;
         | 
| 240 | 
            +
                  }
         | 
| 238 241 |  | 
| 239 242 | 
             
                  seqDataToInsert = tidyUpSequenceData(seqDataToInsert, {
         | 
| 240 243 | 
             
                    topLevelSeqData: sequenceData,
         |