@teselagen/ove 0.3.7 → 0.3.8
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.umd.js +36 -17
- package/package.json +4 -1
- package/src/ToolBar/ToolbarItem.js +0 -2
- package/src/ToolBar/editTool.js +12 -5
package/index.umd.js
CHANGED
|
@@ -57318,11 +57318,11 @@
|
|
|
57318
57318
|
).split(',');
|
|
57319
57319
|
|
|
57320
57320
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
57321
|
-
var $keys$
|
|
57321
|
+
var $keys$2 = _objectKeysInternal;
|
|
57322
57322
|
var enumBugKeys$1 = _enumBugKeys;
|
|
57323
57323
|
|
|
57324
57324
|
var _objectKeys = Object.keys || function keys(O) {
|
|
57325
|
-
return $keys$
|
|
57325
|
+
return $keys$2(O, enumBugKeys$1);
|
|
57326
57326
|
};
|
|
57327
57327
|
|
|
57328
57328
|
var _objectGops = {};
|
|
@@ -58094,17 +58094,24 @@
|
|
|
58094
58094
|
|
|
58095
58095
|
var _objectGopn = {};
|
|
58096
58096
|
|
|
58097
|
-
|
|
58098
|
-
var $keys$2 = _objectKeysInternal;
|
|
58099
|
-
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
58097
|
+
var hasRequired_objectGopn;
|
|
58100
58098
|
|
|
58101
|
-
|
|
58102
|
-
|
|
58103
|
-
|
|
58099
|
+
function require_objectGopn () {
|
|
58100
|
+
if (hasRequired_objectGopn) return _objectGopn;
|
|
58101
|
+
hasRequired_objectGopn = 1;
|
|
58102
|
+
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
58103
|
+
var $keys = _objectKeysInternal;
|
|
58104
|
+
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
58105
|
+
|
|
58106
|
+
_objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
58107
|
+
return $keys(O, hiddenKeys);
|
|
58108
|
+
};
|
|
58109
|
+
return _objectGopn;
|
|
58110
|
+
}
|
|
58104
58111
|
|
|
58105
58112
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
58106
58113
|
var toIObject$2 = _toIobject;
|
|
58107
|
-
var gOPN$1 =
|
|
58114
|
+
var gOPN$1 = require_objectGopn().f;
|
|
58108
58115
|
var toString$3 = {}.toString;
|
|
58109
58116
|
|
|
58110
58117
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
@@ -58291,7 +58298,7 @@
|
|
|
58291
58298
|
|
|
58292
58299
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
58293
58300
|
$DP.f = $defineProperty;
|
|
58294
|
-
|
|
58301
|
+
require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
|
|
58295
58302
|
require_objectPie().f = $propertyIsEnumerable;
|
|
58296
58303
|
$GOPS.f = $getOwnPropertySymbols;
|
|
58297
58304
|
|
|
@@ -114214,6 +114221,8 @@
|
|
|
114214
114221
|
const selectedTr = table.querySelector(
|
|
114215
114222
|
`.rt-tr-group.with-row-data[data-test-id="${rowId}"]`
|
|
114216
114223
|
);
|
|
114224
|
+
if (!selectedTr)
|
|
114225
|
+
return;
|
|
114217
114226
|
const selectedIndex = selectedTr.dataset.index;
|
|
114218
114227
|
if (selectedTr && trs.length) {
|
|
114219
114228
|
let updateScrollIfNecessary = function() {
|
|
@@ -188640,12 +188649,16 @@ double click --> edit`}`;
|
|
|
188640
188649
|
}
|
|
188641
188650
|
|
|
188642
188651
|
const name = "@teselagen/ove";
|
|
188643
|
-
const version = "0.3.
|
|
188652
|
+
const version = "0.3.7";
|
|
188644
188653
|
const main = "./src/index.js";
|
|
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
|
+
volta: volta
|
|
188649
188662
|
};
|
|
188650
188663
|
|
|
188651
188664
|
const PartTagSearch = withEditorProps(PartToolDropdown);
|
|
@@ -207274,8 +207287,11 @@ ${seqDataToCopy}\r
|
|
|
207274
207287
|
disableSetReadOnly,
|
|
207275
207288
|
onChangeEditLock
|
|
207276
207289
|
}) => {
|
|
207290
|
+
const [isLoading, setIsLoading] = reactExports.useState(false);
|
|
207277
207291
|
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
207278
|
-
if (
|
|
207292
|
+
if (isLoading) {
|
|
207293
|
+
return "Loading...";
|
|
207294
|
+
} else if (disableSetReadOnly2) {
|
|
207279
207295
|
return "You do not have permission to edit locks on this sequence";
|
|
207280
207296
|
}
|
|
207281
207297
|
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
@@ -207284,11 +207300,14 @@ ${seqDataToCopy}\r
|
|
|
207284
207300
|
ToolbarItem$1,
|
|
207285
207301
|
{
|
|
207286
207302
|
...{
|
|
207287
|
-
disabled: disableSetReadOnly,
|
|
207303
|
+
disabled: isLoading || disableSetReadOnly,
|
|
207288
207304
|
Icon: /* @__PURE__ */ React$3.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
207289
|
-
onIconClick: () => {
|
|
207290
|
-
if (onChangeEditLock)
|
|
207291
|
-
|
|
207305
|
+
onIconClick: async () => {
|
|
207306
|
+
if (onChangeEditLock) {
|
|
207307
|
+
setIsLoading(true);
|
|
207308
|
+
await onChangeEditLock(!readOnly);
|
|
207309
|
+
setIsLoading(false);
|
|
207310
|
+
}
|
|
207292
207311
|
toggleReadOnlyMode();
|
|
207293
207312
|
},
|
|
207294
207313
|
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
package/package.json
CHANGED
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 }),
|