@teselagen/ove 0.3.7 → 0.3.9
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.js +196864 -0
- package/index.mjs +196810 -0
- package/index.umd.js +27 -7
- package/package.json +13 -3
- package/src/ToolBar/ToolbarItem.js +0 -2
- package/src/ToolBar/editTool.js +12 -5
package/index.umd.js
CHANGED
|
@@ -114214,6 +114214,8 @@
|
|
|
114214
114214
|
const selectedTr = table.querySelector(
|
|
114215
114215
|
`.rt-tr-group.with-row-data[data-test-id="${rowId}"]`
|
|
114216
114216
|
);
|
|
114217
|
+
if (!selectedTr)
|
|
114218
|
+
return;
|
|
114217
114219
|
const selectedIndex = selectedTr.dataset.index;
|
|
114218
114220
|
if (selectedTr && trs.length) {
|
|
114219
114221
|
let updateScrollIfNecessary = function() {
|
|
@@ -188640,12 +188642,24 @@ double click --> edit`}`;
|
|
|
188640
188642
|
}
|
|
188641
188643
|
|
|
188642
188644
|
const name = "@teselagen/ove";
|
|
188643
|
-
const version = "0.3.
|
|
188645
|
+
const version = "0.3.8";
|
|
188644
188646
|
const main = "./src/index.js";
|
|
188647
|
+
const exports$1 = {
|
|
188648
|
+
".": {
|
|
188649
|
+
"import": "./index.mjs",
|
|
188650
|
+
require: "./index.js"
|
|
188651
|
+
},
|
|
188652
|
+
"./style.css": "./style.css"
|
|
188653
|
+
};
|
|
188654
|
+
const volta = {
|
|
188655
|
+
node: "16.20.2"
|
|
188656
|
+
};
|
|
188645
188657
|
const packageJson = {
|
|
188646
188658
|
name: name,
|
|
188647
188659
|
version: version,
|
|
188648
|
-
main: main
|
|
188660
|
+
main: main,
|
|
188661
|
+
exports: exports$1,
|
|
188662
|
+
volta: volta
|
|
188649
188663
|
};
|
|
188650
188664
|
|
|
188651
188665
|
const PartTagSearch = withEditorProps(PartToolDropdown);
|
|
@@ -207274,8 +207288,11 @@ ${seqDataToCopy}\r
|
|
|
207274
207288
|
disableSetReadOnly,
|
|
207275
207289
|
onChangeEditLock
|
|
207276
207290
|
}) => {
|
|
207291
|
+
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
207277
207292
|
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
207278
|
-
if (
|
|
207293
|
+
if (isLoading) {
|
|
207294
|
+
return "Loading...";
|
|
207295
|
+
} else if (disableSetReadOnly2) {
|
|
207279
207296
|
return "You do not have permission to edit locks on this sequence";
|
|
207280
207297
|
}
|
|
207281
207298
|
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
@@ -207284,11 +207301,14 @@ ${seqDataToCopy}\r
|
|
|
207284
207301
|
ToolbarItem$1,
|
|
207285
207302
|
{
|
|
207286
207303
|
...{
|
|
207287
|
-
disabled: disableSetReadOnly,
|
|
207304
|
+
disabled: isLoading || disableSetReadOnly,
|
|
207288
207305
|
Icon: /* @__PURE__ */ React$3.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
207289
|
-
onIconClick: () => {
|
|
207290
|
-
if (onChangeEditLock)
|
|
207291
|
-
|
|
207306
|
+
onIconClick: async () => {
|
|
207307
|
+
if (onChangeEditLock) {
|
|
207308
|
+
setIsLoading(true);
|
|
207309
|
+
await onChangeEditLock(!readOnly);
|
|
207310
|
+
setIsLoading(false);
|
|
207311
|
+
}
|
|
207292
207312
|
toggleReadOnlyMode();
|
|
207293
207313
|
},
|
|
207294
207314
|
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ove",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./index.mjs",
|
|
8
|
+
"require": "./index.js"
|
|
9
|
+
},
|
|
10
|
+
"./style.css": "./style.css"
|
|
11
|
+
},
|
|
12
|
+
"volta": {
|
|
13
|
+
"node": "16.20.2"
|
|
14
|
+
},
|
|
5
15
|
"dependencies": {
|
|
6
16
|
"@teselagen/sequence-utils": "0.3.7",
|
|
7
17
|
"@teselagen/range-utils": "0.3.7",
|
|
@@ -34,8 +44,8 @@
|
|
|
34
44
|
"dom-to-image": "^2.6.0",
|
|
35
45
|
"downloadjs": "^1.4.7",
|
|
36
46
|
"escape-string-regexp": "1.0.5",
|
|
37
|
-
"fast-xml-parser": "4.2.
|
|
38
|
-
"fflate": "0.
|
|
47
|
+
"fast-xml-parser": "4.2.7",
|
|
48
|
+
"fflate": "0.8.0",
|
|
39
49
|
"file-saver": "^2.0.5",
|
|
40
50
|
"fuse.js": "^6.6.2",
|
|
41
51
|
"fuzzysearch": "^1.0.3",
|
package/src/ToolBar/editTool.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import { Icon } from "@blueprintjs/core";
|
|
3
3
|
import ToolbarItem from "./ToolbarItem";
|
|
4
4
|
import { connectToEditor } from "../withEditorProps";
|
|
@@ -15,8 +15,11 @@ export default connectToEditor((editorState) => {
|
|
|
15
15
|
disableSetReadOnly,
|
|
16
16
|
onChangeEditLock
|
|
17
17
|
}) => {
|
|
18
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
18
19
|
const readOnlyTooltip = ({ readOnly, disableSetReadOnly }) => {
|
|
19
|
-
if (
|
|
20
|
+
if (isLoading) {
|
|
21
|
+
return "Loading...";
|
|
22
|
+
} else if (disableSetReadOnly) {
|
|
20
23
|
return "You do not have permission to edit locks on this sequence";
|
|
21
24
|
}
|
|
22
25
|
return readOnly ? "Click to enable editing" : "Click to disable editing";
|
|
@@ -24,10 +27,14 @@ export default connectToEditor((editorState) => {
|
|
|
24
27
|
return (
|
|
25
28
|
<ToolbarItem
|
|
26
29
|
{...{
|
|
27
|
-
disabled: disableSetReadOnly,
|
|
30
|
+
disabled: isLoading || disableSetReadOnly,
|
|
28
31
|
Icon: <Icon icon={readOnly ? "lock" : "unlock"} />,
|
|
29
|
-
onIconClick: () => {
|
|
30
|
-
if (onChangeEditLock)
|
|
32
|
+
onIconClick: async () => {
|
|
33
|
+
if (onChangeEditLock) {
|
|
34
|
+
setIsLoading(true);
|
|
35
|
+
await onChangeEditLock(!readOnly);
|
|
36
|
+
setIsLoading(false);
|
|
37
|
+
}
|
|
31
38
|
toggleReadOnlyMode();
|
|
32
39
|
},
|
|
33
40
|
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|