@teselagen/ove 0.3.12 → 0.3.14
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 +379 -384
- package/index.mjs +380 -385
- package/index.umd.js +366 -341
- package/package.json +2 -2
- package/src/Editor/index.js +1 -1
- package/src/Editor/userDefinedHandlersAndOpts.js +1 -1
- package/src/StatusBar/index.js +29 -33
- package/src/ToolBar/editTool.js +39 -36
- package/src/commands/index.js +2 -1
- package/src/helperComponents/AddOrEditAnnotationDialog/index.js +9 -9
- package/src/helperComponents/PropertiesDialog/GeneralProperties.js +5 -4
- package/src/withEditorProps/index.js +29 -18
- package/style.css +138 -138
package/index.js
CHANGED
|
@@ -7425,7 +7425,7 @@ function getPlainObjectKeys(object) {
|
|
|
7425
7425
|
var ownKeys$8 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {
|
|
7426
7426
|
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
|
|
7427
7427
|
} : /* istanbul ignore next */Object.getOwnPropertyNames;
|
|
7428
|
-
function toPrimitive$
|
|
7428
|
+
function toPrimitive$3(value) {
|
|
7429
7429
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
7430
7430
|
}
|
|
7431
7431
|
function hasProp(target, prop) {
|
|
@@ -8354,7 +8354,7 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
|
|
|
8354
8354
|
return this.name_ + "[" + this.value_ + "]";
|
|
8355
8355
|
};
|
|
8356
8356
|
_proto.valueOf = function valueOf() {
|
|
8357
|
-
return toPrimitive$
|
|
8357
|
+
return toPrimitive$3(this.get());
|
|
8358
8358
|
};
|
|
8359
8359
|
_proto[_Symbol$toPrimitive] = function () {
|
|
8360
8360
|
return this.valueOf();
|
|
@@ -8582,7 +8582,7 @@ var ComputedValue = /*#__PURE__*/function () {
|
|
|
8582
8582
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
8583
8583
|
};
|
|
8584
8584
|
_proto.valueOf = function valueOf() {
|
|
8585
|
-
return toPrimitive$
|
|
8585
|
+
return toPrimitive$3(this.get());
|
|
8586
8586
|
};
|
|
8587
8587
|
_proto[_Symbol$toPrimitive$1] = function () {
|
|
8588
8588
|
return this.valueOf();
|
|
@@ -30308,17 +30308,9 @@ function require_domCreate () {
|
|
|
30308
30308
|
return _domCreate;
|
|
30309
30309
|
}
|
|
30310
30310
|
|
|
30311
|
-
var _ie8DomDefine
|
|
30312
|
-
|
|
30313
|
-
|
|
30314
|
-
function require_ie8DomDefine () {
|
|
30315
|
-
if (hasRequired_ie8DomDefine) return _ie8DomDefine;
|
|
30316
|
-
hasRequired_ie8DomDefine = 1;
|
|
30317
|
-
_ie8DomDefine = !require_descriptors() && !_fails(function () {
|
|
30318
|
-
return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
30319
|
-
});
|
|
30320
|
-
return _ie8DomDefine;
|
|
30321
|
-
}
|
|
30311
|
+
var _ie8DomDefine = !require_descriptors() && !_fails(function () {
|
|
30312
|
+
return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
30313
|
+
});
|
|
30322
30314
|
|
|
30323
30315
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
30324
30316
|
var isObject$d = _isObject;
|
|
@@ -30333,29 +30325,22 @@ var _toPrimitive$1 = function (it, S) {
|
|
|
30333
30325
|
throw TypeError("Can't convert object to primitive value");
|
|
30334
30326
|
};
|
|
30335
30327
|
|
|
30336
|
-
var
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30347
|
-
|
|
30348
|
-
|
|
30349
|
-
|
|
30350
|
-
|
|
30351
|
-
|
|
30352
|
-
} catch (e) { /* empty */ }
|
|
30353
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30354
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
30355
|
-
return O;
|
|
30356
|
-
};
|
|
30357
|
-
return _objectDp;
|
|
30358
|
-
}
|
|
30328
|
+
var anObject$3 = _anObject;
|
|
30329
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
30330
|
+
var toPrimitive$2 = _toPrimitive$1;
|
|
30331
|
+
var dP$2 = Object.defineProperty;
|
|
30332
|
+
|
|
30333
|
+
_objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
30334
|
+
anObject$3(O);
|
|
30335
|
+
P = toPrimitive$2(P, true);
|
|
30336
|
+
anObject$3(Attributes);
|
|
30337
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
30338
|
+
return dP$2(O, P, Attributes);
|
|
30339
|
+
} catch (e) { /* empty */ }
|
|
30340
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30341
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
30342
|
+
return O;
|
|
30343
|
+
};
|
|
30359
30344
|
|
|
30360
30345
|
var _propertyDesc = function (bitmap, value) {
|
|
30361
30346
|
return {
|
|
@@ -30366,10 +30351,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30366
30351
|
};
|
|
30367
30352
|
};
|
|
30368
30353
|
|
|
30369
|
-
var dP$
|
|
30354
|
+
var dP$1 = _objectDp;
|
|
30370
30355
|
var createDesc$3 = _propertyDesc;
|
|
30371
30356
|
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30372
|
-
return dP$
|
|
30357
|
+
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30373
30358
|
} : function (object, key, value) {
|
|
30374
30359
|
object[key] = value;
|
|
30375
30360
|
return object;
|
|
@@ -30385,7 +30370,7 @@ var core$3 = _coreExports;
|
|
|
30385
30370
|
var ctx$1 = _ctx;
|
|
30386
30371
|
var hide$3 = _hide;
|
|
30387
30372
|
var has$e = _has;
|
|
30388
|
-
var PROTOTYPE$
|
|
30373
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30389
30374
|
|
|
30390
30375
|
var $export$8 = function (type, name, source) {
|
|
30391
30376
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30395,8 +30380,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30395
30380
|
var IS_BIND = type & $export$8.B;
|
|
30396
30381
|
var IS_WRAP = type & $export$8.W;
|
|
30397
30382
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30398
|
-
var expProto = exports[PROTOTYPE$
|
|
30399
|
-
var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$
|
|
30383
|
+
var expProto = exports[PROTOTYPE$1];
|
|
30384
|
+
var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$1];
|
|
30400
30385
|
var key, own, out;
|
|
30401
30386
|
if (IS_GLOBAL) source = name;
|
|
30402
30387
|
for (key in source) {
|
|
@@ -30420,7 +30405,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30420
30405
|
} return new C(a, b, c);
|
|
30421
30406
|
} return C.apply(this, arguments);
|
|
30422
30407
|
};
|
|
30423
|
-
F[PROTOTYPE$
|
|
30408
|
+
F[PROTOTYPE$1] = C[PROTOTYPE$1];
|
|
30424
30409
|
return F;
|
|
30425
30410
|
// make static versions for prototype methods
|
|
30426
30411
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30557,14 +30542,14 @@ var _sharedKey = function (key) {
|
|
|
30557
30542
|
var has$d = _has;
|
|
30558
30543
|
var toIObject$4 = _toIobject;
|
|
30559
30544
|
var arrayIndexOf = _arrayIncludes$1(false);
|
|
30560
|
-
var IE_PROTO$
|
|
30545
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30561
30546
|
|
|
30562
30547
|
var _objectKeysInternal = function (object, names) {
|
|
30563
30548
|
var O = toIObject$4(object);
|
|
30564
30549
|
var i = 0;
|
|
30565
30550
|
var result = [];
|
|
30566
30551
|
var key;
|
|
30567
|
-
for (key in O) if (key != IE_PROTO$
|
|
30552
|
+
for (key in O) if (key != IE_PROTO$1) has$d(O, key) && result.push(key);
|
|
30568
30553
|
// Don't enum bug & hidden keys
|
|
30569
30554
|
while (names.length > i) if (has$d(O, key = names[i++])) {
|
|
30570
30555
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30579,10 +30564,10 @@ var _enumBugKeys = (
|
|
|
30579
30564
|
|
|
30580
30565
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30581
30566
|
var $keys$3 = _objectKeysInternal;
|
|
30582
|
-
var enumBugKeys
|
|
30567
|
+
var enumBugKeys = _enumBugKeys;
|
|
30583
30568
|
|
|
30584
30569
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30585
|
-
return $keys$3(O, enumBugKeys
|
|
30570
|
+
return $keys$3(O, enumBugKeys);
|
|
30586
30571
|
};
|
|
30587
30572
|
|
|
30588
30573
|
var _objectGops = {};
|
|
@@ -30591,14 +30576,7 @@ _objectGops.f = Object.getOwnPropertySymbols;
|
|
|
30591
30576
|
|
|
30592
30577
|
var _objectPie = {};
|
|
30593
30578
|
|
|
30594
|
-
|
|
30595
|
-
|
|
30596
|
-
function require_objectPie () {
|
|
30597
|
-
if (hasRequired_objectPie) return _objectPie;
|
|
30598
|
-
hasRequired_objectPie = 1;
|
|
30599
|
-
_objectPie.f = {}.propertyIsEnumerable;
|
|
30600
|
-
return _objectPie;
|
|
30601
|
-
}
|
|
30579
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
30602
30580
|
|
|
30603
30581
|
// 7.1.13 ToObject(argument)
|
|
30604
30582
|
var defined$1 = _defined;
|
|
@@ -30616,7 +30594,7 @@ function require_objectAssign () {
|
|
|
30616
30594
|
var DESCRIPTORS = require_descriptors();
|
|
30617
30595
|
var getKeys = _objectKeys;
|
|
30618
30596
|
var gOPS = _objectGops;
|
|
30619
|
-
var pIE =
|
|
30597
|
+
var pIE = _objectPie;
|
|
30620
30598
|
var toObject = _toObject;
|
|
30621
30599
|
var IObject = require_iobject();
|
|
30622
30600
|
var $assign = Object.assign;
|
|
@@ -30689,19 +30667,27 @@ var _iterators = {};
|
|
|
30689
30667
|
|
|
30690
30668
|
var _redefine = _hide;
|
|
30691
30669
|
|
|
30692
|
-
var
|
|
30693
|
-
var
|
|
30694
|
-
var getKeys$1 = _objectKeys;
|
|
30670
|
+
var _objectDps;
|
|
30671
|
+
var hasRequired_objectDps;
|
|
30695
30672
|
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
|
|
30701
|
-
|
|
30702
|
-
|
|
30703
|
-
|
|
30704
|
-
|
|
30673
|
+
function require_objectDps () {
|
|
30674
|
+
if (hasRequired_objectDps) return _objectDps;
|
|
30675
|
+
hasRequired_objectDps = 1;
|
|
30676
|
+
var dP = _objectDp;
|
|
30677
|
+
var anObject = _anObject;
|
|
30678
|
+
var getKeys = _objectKeys;
|
|
30679
|
+
|
|
30680
|
+
_objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30681
|
+
anObject(O);
|
|
30682
|
+
var keys = getKeys(Properties);
|
|
30683
|
+
var length = keys.length;
|
|
30684
|
+
var i = 0;
|
|
30685
|
+
var P;
|
|
30686
|
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
30687
|
+
return O;
|
|
30688
|
+
};
|
|
30689
|
+
return _objectDps;
|
|
30690
|
+
}
|
|
30705
30691
|
|
|
30706
30692
|
var _html;
|
|
30707
30693
|
var hasRequired_html;
|
|
@@ -30714,47 +30700,55 @@ function require_html () {
|
|
|
30714
30700
|
return _html;
|
|
30715
30701
|
}
|
|
30716
30702
|
|
|
30717
|
-
|
|
30718
|
-
var
|
|
30719
|
-
var dPs = _objectDps;
|
|
30720
|
-
var enumBugKeys = _enumBugKeys;
|
|
30721
|
-
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30722
|
-
var Empty = function () { /* empty */ };
|
|
30723
|
-
var PROTOTYPE$1 = 'prototype';
|
|
30703
|
+
var _objectCreate;
|
|
30704
|
+
var hasRequired_objectCreate;
|
|
30724
30705
|
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30706
|
+
function require_objectCreate () {
|
|
30707
|
+
if (hasRequired_objectCreate) return _objectCreate;
|
|
30708
|
+
hasRequired_objectCreate = 1;
|
|
30709
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30710
|
+
var anObject = _anObject;
|
|
30711
|
+
var dPs = require_objectDps();
|
|
30712
|
+
var enumBugKeys = _enumBugKeys;
|
|
30713
|
+
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30714
|
+
var Empty = function () { /* empty */ };
|
|
30715
|
+
var PROTOTYPE = 'prototype';
|
|
30716
|
+
|
|
30717
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30718
|
+
var createDict = function () {
|
|
30719
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30720
|
+
var iframe = require_domCreate()('iframe');
|
|
30721
|
+
var i = enumBugKeys.length;
|
|
30722
|
+
var lt = '<';
|
|
30723
|
+
var gt = '>';
|
|
30724
|
+
var iframeDocument;
|
|
30725
|
+
iframe.style.display = 'none';
|
|
30726
|
+
require_html().appendChild(iframe);
|
|
30727
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30728
|
+
// createDict = iframe.contentWindow.Object;
|
|
30729
|
+
// html.removeChild(iframe);
|
|
30730
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30731
|
+
iframeDocument.open();
|
|
30732
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30733
|
+
iframeDocument.close();
|
|
30734
|
+
createDict = iframeDocument.F;
|
|
30735
|
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30736
|
+
return createDict();
|
|
30737
|
+
};
|
|
30738
|
+
|
|
30739
|
+
_objectCreate = Object.create || function create(O, Properties) {
|
|
30740
|
+
var result;
|
|
30741
|
+
if (O !== null) {
|
|
30742
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
30743
|
+
result = new Empty();
|
|
30744
|
+
Empty[PROTOTYPE] = null;
|
|
30745
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30746
|
+
result[IE_PROTO] = O;
|
|
30747
|
+
} else result = createDict();
|
|
30748
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30749
|
+
};
|
|
30750
|
+
return _objectCreate;
|
|
30751
|
+
}
|
|
30758
30752
|
|
|
30759
30753
|
var _wks = {exports: {}};
|
|
30760
30754
|
|
|
@@ -30772,7 +30766,7 @@ $exports.store = store$2;
|
|
|
30772
30766
|
|
|
30773
30767
|
var _wksExports = _wks.exports;
|
|
30774
30768
|
|
|
30775
|
-
var def =
|
|
30769
|
+
var def = _objectDp.f;
|
|
30776
30770
|
var has$c = _has;
|
|
30777
30771
|
var TAG$1 = _wksExports('toStringTag');
|
|
30778
30772
|
|
|
@@ -30780,7 +30774,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30780
30774
|
if (it && !has$c(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30781
30775
|
};
|
|
30782
30776
|
|
|
30783
|
-
var create$4 =
|
|
30777
|
+
var create$4 = require_objectCreate();
|
|
30784
30778
|
var descriptor = _propertyDesc;
|
|
30785
30779
|
var setToStringTag$2 = _setToStringTag;
|
|
30786
30780
|
var IteratorPrototype = {};
|
|
@@ -31086,7 +31080,7 @@ var _isArrayIter = function (it) {
|
|
|
31086
31080
|
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
31087
31081
|
};
|
|
31088
31082
|
|
|
31089
|
-
var $defineProperty$2 =
|
|
31083
|
+
var $defineProperty$2 = _objectDp;
|
|
31090
31084
|
var createDesc$2 = _propertyDesc;
|
|
31091
31085
|
|
|
31092
31086
|
var _createProperty = function (object, index, value) {
|
|
@@ -31219,7 +31213,7 @@ var _default$9 = function (instance, Constructor) {
|
|
|
31219
31213
|
|
|
31220
31214
|
var $export$3 = _export;
|
|
31221
31215
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
31222
|
-
$export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty:
|
|
31216
|
+
$export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: _objectDp.f });
|
|
31223
31217
|
|
|
31224
31218
|
var $Object$2 = _coreExports.Object;
|
|
31225
31219
|
var defineProperty$c = function defineProperty(it, key, desc) {
|
|
@@ -31267,7 +31261,7 @@ var _meta = {exports: {}};
|
|
|
31267
31261
|
var META$1 = _uid('meta');
|
|
31268
31262
|
var isObject$c = _isObject;
|
|
31269
31263
|
var has$a = _has;
|
|
31270
|
-
var setDesc =
|
|
31264
|
+
var setDesc = _objectDp.f;
|
|
31271
31265
|
var id$1 = 0;
|
|
31272
31266
|
var isExtensible = Object.isExtensible || function () {
|
|
31273
31267
|
return true;
|
|
@@ -31322,7 +31316,7 @@ var _metaExports = _meta.exports;
|
|
|
31322
31316
|
|
|
31323
31317
|
var core = _coreExports;
|
|
31324
31318
|
var wksExt$1 = _wksExt;
|
|
31325
|
-
var defineProperty$a =
|
|
31319
|
+
var defineProperty$a = _objectDp.f;
|
|
31326
31320
|
var _wksDefine = function (name) {
|
|
31327
31321
|
var $Symbol = core.Symbol || (core.Symbol = {} );
|
|
31328
31322
|
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$a($Symbol, name, { value: wksExt$1.f(name) });
|
|
@@ -31331,7 +31325,7 @@ var _wksDefine = function (name) {
|
|
|
31331
31325
|
// all enumerable object keys, includes symbols
|
|
31332
31326
|
var getKeys = _objectKeys;
|
|
31333
31327
|
var gOPS$1 = _objectGops;
|
|
31334
|
-
var pIE$1 =
|
|
31328
|
+
var pIE$1 = _objectPie;
|
|
31335
31329
|
var _enumKeys = function (it) {
|
|
31336
31330
|
var result = getKeys(it);
|
|
31337
31331
|
var getSymbols = gOPS$1.f;
|
|
@@ -31384,12 +31378,12 @@ _objectGopnExt.f = function getOwnPropertyNames(it) {
|
|
|
31384
31378
|
|
|
31385
31379
|
var _objectGopd = {};
|
|
31386
31380
|
|
|
31387
|
-
var pIE =
|
|
31381
|
+
var pIE = _objectPie;
|
|
31388
31382
|
var createDesc$1 = _propertyDesc;
|
|
31389
31383
|
var toIObject$1 = _toIobject;
|
|
31390
31384
|
var toPrimitive$1 = _toPrimitive$1;
|
|
31391
31385
|
var has$9 = _has;
|
|
31392
|
-
var IE8_DOM_DEFINE =
|
|
31386
|
+
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
31393
31387
|
var gOPD$5 = Object.getOwnPropertyDescriptor;
|
|
31394
31388
|
|
|
31395
31389
|
_objectGopd.f = require_descriptors() ? gOPD$5 : function getOwnPropertyDescriptor(O, P) {
|
|
@@ -31423,11 +31417,11 @@ var toObject$1 = _toObject;
|
|
|
31423
31417
|
var toIObject = _toIobject;
|
|
31424
31418
|
var toPrimitive = _toPrimitive$1;
|
|
31425
31419
|
var createDesc = _propertyDesc;
|
|
31426
|
-
var _create$1 =
|
|
31420
|
+
var _create$1 = require_objectCreate();
|
|
31427
31421
|
var gOPNExt = _objectGopnExt;
|
|
31428
31422
|
var $GOPD = _objectGopd;
|
|
31429
31423
|
var $GOPS = _objectGops;
|
|
31430
|
-
var $DP =
|
|
31424
|
+
var $DP = _objectDp;
|
|
31431
31425
|
var $keys$1 = _objectKeys;
|
|
31432
31426
|
var gOPD$4 = $GOPD.f;
|
|
31433
31427
|
var dP = $DP.f;
|
|
@@ -31552,7 +31546,7 @@ if (!USE_NATIVE) {
|
|
|
31552
31546
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
31553
31547
|
$DP.f = $defineProperty$1;
|
|
31554
31548
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
31555
|
-
|
|
31549
|
+
_objectPie.f = $propertyIsEnumerable;
|
|
31556
31550
|
$GOPS.f = $getOwnPropertySymbols;
|
|
31557
31551
|
|
|
31558
31552
|
if (DESCRIPTORS && !_library) {
|
|
@@ -31733,7 +31727,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31733
31727
|
|
|
31734
31728
|
var $export = _export;
|
|
31735
31729
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31736
|
-
$export($export.S, 'Object', { create:
|
|
31730
|
+
$export($export.S, 'Object', { create: require_objectCreate() });
|
|
31737
31731
|
|
|
31738
31732
|
var $Object$1 = _coreExports.Object;
|
|
31739
31733
|
var create$3 = function create(P, D) {
|
|
@@ -92038,6 +92032,8 @@ const PreviewCsvData = observer(function(props) {
|
|
|
92038
92032
|
userSchema = exampleData,
|
|
92039
92033
|
initialEntities
|
|
92040
92034
|
} = props;
|
|
92035
|
+
const rerenderKey = React$3.useRef(0);
|
|
92036
|
+
rerenderKey.current = rerenderKey.current + 1;
|
|
92041
92037
|
const data = userSchema.userData && userSchema.userData.length && userSchema.userData.map((row) => {
|
|
92042
92038
|
const toRet = {
|
|
92043
92039
|
_isClean: row._isClean
|
|
@@ -92084,6 +92080,7 @@ const PreviewCsvData = observer(function(props) {
|
|
|
92084
92080
|
{
|
|
92085
92081
|
maxWidth: 800,
|
|
92086
92082
|
maxHeight: 500,
|
|
92083
|
+
rerenderKey: rerenderKey.current,
|
|
92087
92084
|
destroyOnUnmount: false,
|
|
92088
92085
|
doNotValidateUntouchedRows: true,
|
|
92089
92086
|
formName: datatableFormName || "editableCellTable",
|
|
@@ -106649,8 +106646,8 @@ function getOverlapsOfPotentiallyCircularRanges(rangeA, rangeB, maxRangeLength,
|
|
|
106649
106646
|
maxRangeLength
|
|
106650
106647
|
);
|
|
106651
106648
|
let overlaps = [];
|
|
106652
|
-
normalizedRangeA.forEach(function(nonCircularRangeA
|
|
106653
|
-
normalizedRangeB.forEach(function(nonCircularRangeB
|
|
106649
|
+
normalizedRangeA.forEach(function(nonCircularRangeA) {
|
|
106650
|
+
normalizedRangeB.forEach(function(nonCircularRangeB) {
|
|
106654
106651
|
const overlap = getOverlapOfNonCircularRanges(
|
|
106655
106652
|
nonCircularRangeA,
|
|
106656
106653
|
nonCircularRangeB
|
|
@@ -106662,7 +106659,7 @@ function getOverlapsOfPotentiallyCircularRanges(rangeA, rangeB, maxRangeLength,
|
|
|
106662
106659
|
});
|
|
106663
106660
|
if (joinIfPossible && normalizedRangeA.length === 2 && normalizedRangeB.length === 2 && maxRangeLength) {
|
|
106664
106661
|
const joinedOverlap = {};
|
|
106665
|
-
overlaps = lodashExports.flatMap(overlaps, (o
|
|
106662
|
+
overlaps = lodashExports.flatMap(overlaps, (o) => {
|
|
106666
106663
|
if (o.start === 0) {
|
|
106667
106664
|
joinedOverlap.end = o.end;
|
|
106668
106665
|
return [];
|
|
@@ -107152,7 +107149,7 @@ function translateRange(rangeToBeAdjusted, translateBy, rangeLength) {
|
|
|
107152
107149
|
});
|
|
107153
107150
|
}
|
|
107154
107151
|
|
|
107155
|
-
function flipRelativeRange(innerRange, outerRange, sequenceLength
|
|
107152
|
+
function flipRelativeRange(innerRange, outerRange, sequenceLength) {
|
|
107156
107153
|
const isFullyContained = isRangeWithinRange(
|
|
107157
107154
|
innerRange,
|
|
107158
107155
|
outerRange,
|
|
@@ -107164,7 +107161,7 @@ function flipRelativeRange(innerRange, outerRange, sequenceLength, options) {
|
|
|
107164
107161
|
return flipNonFullyContainedRange(innerRange, outerRange, sequenceLength);
|
|
107165
107162
|
}
|
|
107166
107163
|
}
|
|
107167
|
-
function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength
|
|
107164
|
+
function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength) {
|
|
107168
107165
|
const outerFullyContained = isRangeWithinRange(
|
|
107169
107166
|
outerRange,
|
|
107170
107167
|
innerRange,
|
|
@@ -107205,9 +107202,8 @@ function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, opti
|
|
|
107205
107202
|
sequenceLength
|
|
107206
107203
|
);
|
|
107207
107204
|
if (overlaps.length >= 1) {
|
|
107208
|
-
let overlapExtendsForward;
|
|
107209
107205
|
const firstOverlap = overlaps[0];
|
|
107210
|
-
overlapExtendsForward = firstOverlap.start !== outerRange.start;
|
|
107206
|
+
const overlapExtendsForward = firstOverlap.start !== outerRange.start;
|
|
107211
107207
|
const flippedTruncatedInner = flipFullyContainedRange(
|
|
107212
107208
|
firstOverlap,
|
|
107213
107209
|
outerRange,
|
|
@@ -107228,7 +107224,7 @@ function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, opti
|
|
|
107228
107224
|
}
|
|
107229
107225
|
return flippedInnerRange;
|
|
107230
107226
|
}
|
|
107231
|
-
function flipFullyContainedRange(innerRange, outerRange, sequenceLength
|
|
107227
|
+
function flipFullyContainedRange(innerRange, outerRange, sequenceLength) {
|
|
107232
107228
|
const translateBy = -outerRange.start;
|
|
107233
107229
|
const translatedOuterRange = translateRange(
|
|
107234
107230
|
outerRange,
|
|
@@ -107356,6 +107352,7 @@ function getYOffsetForPotentiallyCircularRange(range, YOffsetLevelsWithRanges, a
|
|
|
107356
107352
|
rangesAlreadyAddedToYOffset.push(range);
|
|
107357
107353
|
return true;
|
|
107358
107354
|
}
|
|
107355
|
+
return false;
|
|
107359
107356
|
});
|
|
107360
107357
|
if (!openYOffsetFound) {
|
|
107361
107358
|
yOffset = YOffsetLevelsWithRanges.length;
|
|
@@ -113826,9 +113823,9 @@ function coerceLocation({
|
|
|
113826
113823
|
function filterAminoAcidSequenceString(sequenceString, options) {
|
|
113827
113824
|
options = options || {};
|
|
113828
113825
|
if (options.includeStopCodon) {
|
|
113829
|
-
return sequenceString
|
|
113826
|
+
return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu.*]/gi, "");
|
|
113830
113827
|
}
|
|
113831
|
-
return sequenceString
|
|
113828
|
+
return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu]/gi, "");
|
|
113832
113829
|
}
|
|
113833
113830
|
|
|
113834
113831
|
function getDegenerateDnaStringFromAAString(aaString) {
|
|
@@ -124059,7 +124056,6 @@ function genbankToJson(string, options = {}) {
|
|
|
124059
124056
|
}
|
|
124060
124057
|
function parseLocus(line) {
|
|
124061
124058
|
result = createInitialSequence(options);
|
|
124062
|
-
let locusName;
|
|
124063
124059
|
let circular;
|
|
124064
124060
|
let gbDivision;
|
|
124065
124061
|
let date;
|
|
@@ -124070,7 +124066,7 @@ function genbankToJson(string, options = {}) {
|
|
|
124070
124066
|
);
|
|
124071
124067
|
addMessage("Import Warning: Locus line contains no values: " + line);
|
|
124072
124068
|
}
|
|
124073
|
-
locusName = lineArr[1];
|
|
124069
|
+
const locusName = lineArr[1];
|
|
124074
124070
|
for (let i = 1; i < lineArr.length; i++) {
|
|
124075
124071
|
if (lineArr[i].match(/circular/gi)) {
|
|
124076
124072
|
circular = true;
|
|
@@ -124217,10 +124213,10 @@ function genbankToJson(string, options = {}) {
|
|
|
124217
124213
|
}
|
|
124218
124214
|
}
|
|
124219
124215
|
function parseFeatureNote(line) {
|
|
124220
|
-
let newLine
|
|
124216
|
+
let newLine;
|
|
124221
124217
|
newLine = line.trimLeft();
|
|
124222
124218
|
newLine = newLine.replace(/^\/|"$/g, "");
|
|
124223
|
-
lineArr = newLine.split(/="|=/);
|
|
124219
|
+
const lineArr = newLine.split(/="|=/);
|
|
124224
124220
|
let val = lineArr.slice(1).join("=");
|
|
124225
124221
|
if (val) {
|
|
124226
124222
|
val = val.replace(/\\/g, " ");
|
|
@@ -137688,7 +137684,6 @@ function createGenbankLocus(serSeq, options) {
|
|
|
137688
137684
|
if (serSeq.sequence.symbols) {
|
|
137689
137685
|
serSeq.sequence = serSeq.sequence.symbols.split("");
|
|
137690
137686
|
}
|
|
137691
|
-
let tmp;
|
|
137692
137687
|
let dnaType;
|
|
137693
137688
|
if (serSeq.isProtein) {
|
|
137694
137689
|
dnaType = "";
|
|
@@ -137705,7 +137700,7 @@ function createGenbankLocus(serSeq, options) {
|
|
|
137705
137700
|
line += " ";
|
|
137706
137701
|
line += StringUtil.lpad(String(serSeq.sequence.length), " ", 11);
|
|
137707
137702
|
line += serSeq.isProtein ? " aa " : " bp ";
|
|
137708
|
-
tmp = "";
|
|
137703
|
+
const tmp = "";
|
|
137709
137704
|
line += StringUtil.lpad(tmp, " ", 3);
|
|
137710
137705
|
line += StringUtil.rpad(dnaType, " ", 6);
|
|
137711
137706
|
line += " ";
|
|
@@ -142939,6 +142934,7 @@ function mapStateToProps(state, ownProps) {
|
|
|
142939
142934
|
if (!editorState) {
|
|
142940
142935
|
return editorReducer({}, {});
|
|
142941
142936
|
}
|
|
142937
|
+
const sequenceLength = selectors.sequenceLengthSelector(editorState);
|
|
142942
142938
|
const { findTool, annotationsToSupport = {} } = editorState;
|
|
142943
142939
|
const visibilities = getVisibilities(editorState);
|
|
142944
142940
|
let annotationToAdd;
|
|
@@ -142949,7 +142945,13 @@ function mapStateToProps(state, ownProps) {
|
|
|
142949
142945
|
].forEach(([n, type, annotationTypePlural]) => {
|
|
142950
142946
|
const vals = reduxForm.getFormValues(n)(state);
|
|
142951
142947
|
if (vals) {
|
|
142952
|
-
annotationToAdd = getAnnToAdd(
|
|
142948
|
+
annotationToAdd = getAnnToAdd(
|
|
142949
|
+
vals,
|
|
142950
|
+
n,
|
|
142951
|
+
type,
|
|
142952
|
+
annotationTypePlural,
|
|
142953
|
+
sequenceLength
|
|
142954
|
+
);
|
|
142953
142955
|
}
|
|
142954
142956
|
});
|
|
142955
142957
|
const toReturn = {
|
|
@@ -142973,7 +142975,6 @@ function mapStateToProps(state, ownProps) {
|
|
|
142973
142975
|
editorState,
|
|
142974
142976
|
ownProps.additionalEnzymes
|
|
142975
142977
|
);
|
|
142976
|
-
const sequenceLength = selectors.sequenceLengthSelector(editorState);
|
|
142977
142978
|
const { matchedSearchLayer, searchLayers, matchesTotal } = getSearchLayersAndMatch(editorState);
|
|
142978
142979
|
const annotationSearchMatches = selectors.annotationSearchSelector(editorState);
|
|
142979
142980
|
const _sequenceDataToUse = getSequenceDataToUse(
|
|
@@ -143249,21 +143250,26 @@ const getFindTool = createSelector(
|
|
|
143249
143250
|
};
|
|
143250
143251
|
}
|
|
143251
143252
|
);
|
|
143252
|
-
const getAnnToAdd = defaultMemoize(
|
|
143253
|
-
|
|
143254
|
-
|
|
143255
|
-
|
|
143256
|
-
|
|
143257
|
-
|
|
143258
|
-
|
|
143259
|
-
|
|
143260
|
-
|
|
143261
|
-
|
|
143262
|
-
|
|
143263
|
-
|
|
143253
|
+
const getAnnToAdd = defaultMemoize(
|
|
143254
|
+
(vals, n, type, annotationTypePlural, sequenceLength) => {
|
|
143255
|
+
const annToAdd = normalizeRange(
|
|
143256
|
+
{
|
|
143257
|
+
color: getFeatureToColorMap({ includeHidden: true })[vals.type || "primer_bind"],
|
|
143258
|
+
//we won't have the correct color yet so we set it here
|
|
143259
|
+
...vals,
|
|
143260
|
+
formName: n,
|
|
143261
|
+
type,
|
|
143262
|
+
annotationTypePlural,
|
|
143263
|
+
name: vals.name || "Untitled"
|
|
143264
|
+
},
|
|
143265
|
+
sequenceLength
|
|
143266
|
+
);
|
|
143267
|
+
if (!vals.useLinkedOligo) {
|
|
143268
|
+
delete annToAdd.bases;
|
|
143269
|
+
}
|
|
143270
|
+
return annToAdd;
|
|
143264
143271
|
}
|
|
143265
|
-
|
|
143266
|
-
});
|
|
143272
|
+
);
|
|
143267
143273
|
const getSeqDataWithAnnToAdd = defaultMemoize(
|
|
143268
143274
|
(seqData, ann, allowMultipleFeatureDirections) => {
|
|
143269
143275
|
if (ann) {
|
|
@@ -161174,7 +161180,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
161174
161180
|
}
|
|
161175
161181
|
|
|
161176
161182
|
const name = "@teselagen/ove";
|
|
161177
|
-
const version = "0.3.
|
|
161183
|
+
const version = "0.3.13";
|
|
161178
161184
|
const main = "./src/index.js";
|
|
161179
161185
|
const exports$1 = {
|
|
161180
161186
|
".": {
|
|
@@ -161716,6 +161722,184 @@ function ToggleShowMeltingTemp(props) {
|
|
|
161716
161722
|
);
|
|
161717
161723
|
}
|
|
161718
161724
|
|
|
161725
|
+
const style$i = '';
|
|
161726
|
+
|
|
161727
|
+
class ToolbarItem extends React$3.Component {
|
|
161728
|
+
toggleDropdown = ({ forceClose } = {}) => {
|
|
161729
|
+
const { toolName, isOpen } = this.props;
|
|
161730
|
+
this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
|
|
161731
|
+
};
|
|
161732
|
+
render() {
|
|
161733
|
+
const { overrides = {} } = this.props;
|
|
161734
|
+
const {
|
|
161735
|
+
isOpen,
|
|
161736
|
+
index,
|
|
161737
|
+
Icon,
|
|
161738
|
+
// dynamicIcon,
|
|
161739
|
+
onIconClick = lodashExports.noop,
|
|
161740
|
+
tooltip = "",
|
|
161741
|
+
tooltipToggled,
|
|
161742
|
+
dropdowntooltip = "",
|
|
161743
|
+
Dropdown,
|
|
161744
|
+
disabled,
|
|
161745
|
+
isHidden,
|
|
161746
|
+
renderIconAbove,
|
|
161747
|
+
noDropdownIcon,
|
|
161748
|
+
IconWrapper,
|
|
161749
|
+
editorName,
|
|
161750
|
+
popoverDisabled,
|
|
161751
|
+
IconWrapperProps,
|
|
161752
|
+
toolName,
|
|
161753
|
+
dropdownicon,
|
|
161754
|
+
tooltipDisabled,
|
|
161755
|
+
toggled = false,
|
|
161756
|
+
...rest
|
|
161757
|
+
} = { ...this.props, ...overrides };
|
|
161758
|
+
if (!toolName)
|
|
161759
|
+
console.warn("toolName is required!");
|
|
161760
|
+
if (isHidden)
|
|
161761
|
+
return null;
|
|
161762
|
+
let tooltipToDisplay = tooltip;
|
|
161763
|
+
if (toggled && tooltipToggled) {
|
|
161764
|
+
tooltipToDisplay = tooltipToggled;
|
|
161765
|
+
}
|
|
161766
|
+
const buttonTarget = /* @__PURE__ */ React$3.createElement(
|
|
161767
|
+
"div",
|
|
161768
|
+
{
|
|
161769
|
+
className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
|
|
161770
|
+
},
|
|
161771
|
+
renderIconAbove && /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarItem" }, Icon)),
|
|
161772
|
+
Icon && !renderIconAbove && /* @__PURE__ */ React$3.createElement(
|
|
161773
|
+
core$5.Tooltip,
|
|
161774
|
+
{
|
|
161775
|
+
disabled: tooltipDisabled,
|
|
161776
|
+
portalClassName: "ve-toolbar-item-popover",
|
|
161777
|
+
content: tooltipToDisplay
|
|
161778
|
+
},
|
|
161779
|
+
/* @__PURE__ */ React$3.createElement(
|
|
161780
|
+
core$5.AnchorButton,
|
|
161781
|
+
{
|
|
161782
|
+
intent: core$5.Intent.PRIMARY,
|
|
161783
|
+
onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
|
|
161784
|
+
active: toggled,
|
|
161785
|
+
disabled,
|
|
161786
|
+
minimal: true,
|
|
161787
|
+
icon: React$3.isValidElement(Icon) ? Icon : /* @__PURE__ */ React$3.createElement(Icon, { toggleDropdown: this.toggleDropdown })
|
|
161788
|
+
}
|
|
161789
|
+
)
|
|
161790
|
+
),
|
|
161791
|
+
Dropdown && !noDropdownIcon ? /* @__PURE__ */ React$3.createElement(core$5.Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React$3.createElement(
|
|
161792
|
+
"div",
|
|
161793
|
+
{
|
|
161794
|
+
className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
|
|
161795
|
+
onClick: this.toggleDropdown
|
|
161796
|
+
},
|
|
161797
|
+
dropdownicon ? /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React$3.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React$3.createElement(
|
|
161798
|
+
core$5.Icon,
|
|
161799
|
+
{
|
|
161800
|
+
"data-test": toolName + "Dropdown",
|
|
161801
|
+
iconSize: 13,
|
|
161802
|
+
icon: "caret-up"
|
|
161803
|
+
}
|
|
161804
|
+
) : /* @__PURE__ */ React$3.createElement(
|
|
161805
|
+
core$5.Icon,
|
|
161806
|
+
{
|
|
161807
|
+
"data-test": toolName + "Dropdown",
|
|
161808
|
+
iconSize: 13,
|
|
161809
|
+
icon: "caret-down"
|
|
161810
|
+
}
|
|
161811
|
+
)
|
|
161812
|
+
)) : null
|
|
161813
|
+
);
|
|
161814
|
+
const content = /* @__PURE__ */ React$3.createElement(
|
|
161815
|
+
"div",
|
|
161816
|
+
{
|
|
161817
|
+
ref: (n) => {
|
|
161818
|
+
if (n)
|
|
161819
|
+
this.dropdownNode = n;
|
|
161820
|
+
},
|
|
161821
|
+
style: { padding: 10, minWidth: 250, maxWidth: 350 },
|
|
161822
|
+
className: "ve-toolbar-dropdown content"
|
|
161823
|
+
},
|
|
161824
|
+
Dropdown && /* @__PURE__ */ React$3.createElement(
|
|
161825
|
+
Dropdown,
|
|
161826
|
+
{
|
|
161827
|
+
...rest,
|
|
161828
|
+
editorName,
|
|
161829
|
+
toggleDropdown: this.toggleDropdown
|
|
161830
|
+
}
|
|
161831
|
+
)
|
|
161832
|
+
);
|
|
161833
|
+
const target = IconWrapper ? /* @__PURE__ */ React$3.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React$3.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React$3.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
|
|
161834
|
+
return /* @__PURE__ */ React$3.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React$3.createElement(
|
|
161835
|
+
core$5.Popover,
|
|
161836
|
+
{
|
|
161837
|
+
disabled: popoverDisabled,
|
|
161838
|
+
isOpen: !!Dropdown && isOpen,
|
|
161839
|
+
onClose: (e) => {
|
|
161840
|
+
let srcElement;
|
|
161841
|
+
if (e) {
|
|
161842
|
+
srcElement = e.srcElement || e.target;
|
|
161843
|
+
}
|
|
161844
|
+
if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
|
|
161845
|
+
return;
|
|
161846
|
+
}
|
|
161847
|
+
this.toggleDropdown({ forceClose: true });
|
|
161848
|
+
},
|
|
161849
|
+
canEscapeKeyClose: true,
|
|
161850
|
+
minimal: true,
|
|
161851
|
+
position: core$5.Position.BOTTOM,
|
|
161852
|
+
target,
|
|
161853
|
+
content
|
|
161854
|
+
}
|
|
161855
|
+
));
|
|
161856
|
+
}
|
|
161857
|
+
}
|
|
161858
|
+
const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
|
|
161859
|
+
isOpen: toolBar.openItem === toolName
|
|
161860
|
+
}))(ToolbarItem);
|
|
161861
|
+
|
|
161862
|
+
const editTool = connectToEditor((editorState) => {
|
|
161863
|
+
return {
|
|
161864
|
+
readOnly: editorState.readOnly
|
|
161865
|
+
};
|
|
161866
|
+
})((props) => {
|
|
161867
|
+
const { toolbarItemProps, readOnly, disableSetReadOnly } = props;
|
|
161868
|
+
const [isLoading, setIsLoading] = React$3.useState(false);
|
|
161869
|
+
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
161870
|
+
if (isLoading) {
|
|
161871
|
+
return "Loading...";
|
|
161872
|
+
} else if (disableSetReadOnly2) {
|
|
161873
|
+
return "You do not have permission to edit locks on this sequence";
|
|
161874
|
+
}
|
|
161875
|
+
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
161876
|
+
};
|
|
161877
|
+
return /* @__PURE__ */ React$3.createElement(
|
|
161878
|
+
ToolbarItem$1,
|
|
161879
|
+
{
|
|
161880
|
+
...{
|
|
161881
|
+
disabled: isLoading || disableSetReadOnly,
|
|
161882
|
+
Icon: /* @__PURE__ */ React$3.createElement(core$5.Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
161883
|
+
onIconClick: () => handleReadOnlyChange(!readOnly, { ...props, setIsLoading }),
|
|
161884
|
+
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
|
161885
|
+
...toolbarItemProps
|
|
161886
|
+
}
|
|
161887
|
+
}
|
|
161888
|
+
);
|
|
161889
|
+
});
|
|
161890
|
+
async function handleReadOnlyChange(newVal, { beforeReadOnlyChange, updateReadOnlyMode, setIsLoading = () => {
|
|
161891
|
+
} }) {
|
|
161892
|
+
if (beforeReadOnlyChange) {
|
|
161893
|
+
setIsLoading(true);
|
|
161894
|
+
const shouldChange = await beforeReadOnlyChange(newVal);
|
|
161895
|
+
setIsLoading(false);
|
|
161896
|
+
if (shouldChange === false) {
|
|
161897
|
+
return;
|
|
161898
|
+
}
|
|
161899
|
+
}
|
|
161900
|
+
updateReadOnlyMode(newVal);
|
|
161901
|
+
}
|
|
161902
|
+
|
|
161719
161903
|
const isProtein = (props) => props.sequenceData && props.sequenceData.isProtein;
|
|
161720
161904
|
const isOligo = (props) => props.sequenceData && props.sequenceData.isOligo;
|
|
161721
161905
|
const isRna = (props) => props.sequenceData && props.sequenceData.isRna;
|
|
@@ -161799,7 +161983,7 @@ const fileCommandDefs = {
|
|
|
161799
161983
|
isDisabled: (props) => props.disableSetReadOnly || !props.onSave,
|
|
161800
161984
|
isHidden: (props) => !props.toggleReadOnlyMode,
|
|
161801
161985
|
isActive: (props) => props.readOnly,
|
|
161802
|
-
handler: (props) => props.
|
|
161986
|
+
handler: (props) => handleReadOnlyChange(!props.readOnly, props)
|
|
161803
161987
|
},
|
|
161804
161988
|
importSequence: {
|
|
161805
161989
|
isHidden: (props) => props.hideSingleImport,
|
|
@@ -167684,7 +167868,7 @@ function getEditDeleteHandlers(type, annotation) {
|
|
|
167684
167868
|
];
|
|
167685
167869
|
}
|
|
167686
167870
|
|
|
167687
|
-
const style$
|
|
167871
|
+
const style$h = '';
|
|
167688
167872
|
|
|
167689
167873
|
function SequenceName({ sequenceName, sequenceLength, isProtein }) {
|
|
167690
167874
|
return /* @__PURE__ */ React$3.createElement("div", { key: "circViewSvgCenterText", style: { textAlign: "center" } }, /* @__PURE__ */ React$3.createElement("span", null, sequenceName, " "), /* @__PURE__ */ React$3.createElement("br", null), /* @__PURE__ */ React$3.createElement("span", null, isProtein ? `${Math.floor(sequenceLength / 3)} AAs` : `${sequenceLength} bps`));
|
|
@@ -170070,7 +170254,7 @@ function VisibilityOptions$2({
|
|
|
170070
170254
|
);
|
|
170071
170255
|
}
|
|
170072
170256
|
|
|
170073
|
-
const style$
|
|
170257
|
+
const style$g = '';
|
|
170074
170258
|
|
|
170075
170259
|
const simpleDialog = '';
|
|
170076
170260
|
|
|
@@ -170347,7 +170531,7 @@ function combineLabels(labels, numberOfBuckets) {
|
|
|
170347
170531
|
return combinedLabels;
|
|
170348
170532
|
}
|
|
170349
170533
|
|
|
170350
|
-
const style$
|
|
170534
|
+
const style$f = '';
|
|
170351
170535
|
|
|
170352
170536
|
const fontWidthToFontSize = 1.75;
|
|
170353
170537
|
const getTextLength = (text) => {
|
|
@@ -172550,7 +172734,7 @@ function DrawAnnotationInner({
|
|
|
172550
172734
|
}
|
|
172551
172735
|
const DrawAnnotation = withHover(DrawAnnotationInner);
|
|
172552
172736
|
|
|
172553
|
-
const style$
|
|
172737
|
+
const style$e = '';
|
|
172554
172738
|
|
|
172555
172739
|
function c(u,e,c){var i=this,a=React$3.useRef(null),o=React$3.useRef(0),f=React$3.useRef(null),l=React$3.useRef([]),m=React$3.useRef(),v=React$3.useRef(),d=React$3.useRef(u),p=React$3.useRef(!0);React$3.useEffect(function(){d.current=u;},[u]);var g=!e&&0!==e&&"undefined"!=typeof window;if("function"!=typeof u)throw new TypeError("Expected a function");e=+e||0;var w=!!(c=c||{}).leading,s=!("trailing"in c)||!!c.trailing,x="maxWait"in c,y=x?Math.max(+c.maxWait||0,e):null;React$3.useEffect(function(){return p.current=!0,function(){p.current=!1;}},[]);var h=React$3.useMemo(function(){var r=function(r){var n=l.current,t=m.current;return l.current=m.current=null,o.current=r,v.current=d.current.apply(t,n)},n=function(r,n){g&&cancelAnimationFrame(f.current),f.current=g?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!p.current)return !1;var n=r-a.current;return !a.current||n>=e||n<0||x&&r-o.current>=y},u=function(n){return f.current=null,s&&l.current?r(n):(l.current=m.current=null,v.current)},c=function r(){var c=Date.now();if(t(c))return u(c);if(p.current){var i=e-(c-a.current),f=x?Math.min(i,y-(c-o.current)):i;n(r,f);}},h=function(){var u=Date.now(),d=t(u);if(l.current=[].slice.call(arguments),m.current=i,a.current=u,d){if(!f.current&&p.current)return o.current=a.current,n(c,e),w?r(a.current):v.current;if(x)return n(c,e),r(a.current)}return f.current||n(c,e),v.current};return h.cancel=function(){f.current&&(g?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=m.current=f.current=null;},h.isPending=function(){return !!f.current},h.flush=function(){return f.current?u(Date.now()):v.current},h},[w,x,e,y,s,g]);return h}
|
|
172556
172740
|
|
|
@@ -173483,7 +173667,7 @@ function CircularView(props) {
|
|
|
173483
173667
|
}
|
|
173484
173668
|
const CircularView$1 = withEditorInteractions(CircularView);
|
|
173485
173669
|
|
|
173486
|
-
const style$
|
|
173670
|
+
const style$d = '';
|
|
173487
173671
|
|
|
173488
173672
|
class PrintDialog extends React$3.Component {
|
|
173489
173673
|
state = {
|
|
@@ -173964,7 +174148,7 @@ const RemoveDuplicates = redux.compose(
|
|
|
173964
174148
|
tgFormValues("ignoreName", "ignoreStrand", "ignoreStartAndEnd")
|
|
173965
174149
|
)(RemoveDuplicatesDialog);
|
|
173966
174150
|
|
|
173967
|
-
const style$
|
|
174151
|
+
const style$c = '';
|
|
173968
174152
|
|
|
173969
174153
|
var isMobile$2 = {exports: {}};
|
|
173970
174154
|
|
|
@@ -174986,7 +175170,7 @@ const normalizeToInt = (val) => {
|
|
|
174986
175170
|
return normalizedVal;
|
|
174987
175171
|
};
|
|
174988
175172
|
|
|
174989
|
-
const style$
|
|
175173
|
+
const style$b = '';
|
|
174990
175174
|
|
|
174991
175175
|
const EnzymeViewer = ({
|
|
174992
175176
|
extraClasses = "",
|
|
@@ -175061,7 +175245,7 @@ const EnzymeViewer = ({
|
|
|
175061
175245
|
);
|
|
175062
175246
|
};
|
|
175063
175247
|
|
|
175064
|
-
const style$
|
|
175248
|
+
const style$a = '';
|
|
175065
175249
|
|
|
175066
175250
|
const upsertLocalEnzymeGroups = (newGroups) => {
|
|
175067
175251
|
const existingGroups = window.getExistingEnzymeGroups();
|
|
@@ -175757,7 +175941,7 @@ const HoverView = view(({ allEnzymesByName }) => {
|
|
|
175757
175941
|
);
|
|
175758
175942
|
});
|
|
175759
175943
|
|
|
175760
|
-
const style$
|
|
175944
|
+
const style$9 = '';
|
|
175761
175945
|
|
|
175762
175946
|
const CreateCustomEnzyme = function(props) {
|
|
175763
175947
|
const paddingStart = "-------";
|
|
@@ -176582,143 +176766,6 @@ function getIsEnzymeHidden({ name, allRestrictionEnzymes }) {
|
|
|
176582
176766
|
return isHidden;
|
|
176583
176767
|
}
|
|
176584
176768
|
|
|
176585
|
-
const style$9 = '';
|
|
176586
|
-
|
|
176587
|
-
class ToolbarItem extends React$3.Component {
|
|
176588
|
-
toggleDropdown = ({ forceClose } = {}) => {
|
|
176589
|
-
const { toolName, isOpen } = this.props;
|
|
176590
|
-
this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
|
|
176591
|
-
};
|
|
176592
|
-
render() {
|
|
176593
|
-
const { overrides = {} } = this.props;
|
|
176594
|
-
const {
|
|
176595
|
-
isOpen,
|
|
176596
|
-
index,
|
|
176597
|
-
Icon,
|
|
176598
|
-
// dynamicIcon,
|
|
176599
|
-
onIconClick = lodashExports.noop,
|
|
176600
|
-
tooltip = "",
|
|
176601
|
-
tooltipToggled,
|
|
176602
|
-
dropdowntooltip = "",
|
|
176603
|
-
Dropdown,
|
|
176604
|
-
disabled,
|
|
176605
|
-
isHidden,
|
|
176606
|
-
renderIconAbove,
|
|
176607
|
-
noDropdownIcon,
|
|
176608
|
-
IconWrapper,
|
|
176609
|
-
editorName,
|
|
176610
|
-
popoverDisabled,
|
|
176611
|
-
IconWrapperProps,
|
|
176612
|
-
toolName,
|
|
176613
|
-
dropdownicon,
|
|
176614
|
-
tooltipDisabled,
|
|
176615
|
-
toggled = false,
|
|
176616
|
-
...rest
|
|
176617
|
-
} = { ...this.props, ...overrides };
|
|
176618
|
-
if (!toolName)
|
|
176619
|
-
console.warn("toolName is required!");
|
|
176620
|
-
if (isHidden)
|
|
176621
|
-
return null;
|
|
176622
|
-
let tooltipToDisplay = tooltip;
|
|
176623
|
-
if (toggled && tooltipToggled) {
|
|
176624
|
-
tooltipToDisplay = tooltipToggled;
|
|
176625
|
-
}
|
|
176626
|
-
const buttonTarget = /* @__PURE__ */ React$3.createElement(
|
|
176627
|
-
"div",
|
|
176628
|
-
{
|
|
176629
|
-
className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
|
|
176630
|
-
},
|
|
176631
|
-
renderIconAbove && /* @__PURE__ */ React$3.createElement("div", null, /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarItem" }, Icon)),
|
|
176632
|
-
Icon && !renderIconAbove && /* @__PURE__ */ React$3.createElement(
|
|
176633
|
-
core$5.Tooltip,
|
|
176634
|
-
{
|
|
176635
|
-
disabled: tooltipDisabled,
|
|
176636
|
-
portalClassName: "ve-toolbar-item-popover",
|
|
176637
|
-
content: tooltipToDisplay
|
|
176638
|
-
},
|
|
176639
|
-
/* @__PURE__ */ React$3.createElement(
|
|
176640
|
-
core$5.AnchorButton,
|
|
176641
|
-
{
|
|
176642
|
-
intent: core$5.Intent.PRIMARY,
|
|
176643
|
-
onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
|
|
176644
|
-
active: toggled,
|
|
176645
|
-
disabled,
|
|
176646
|
-
minimal: true,
|
|
176647
|
-
icon: React$3.isValidElement(Icon) ? Icon : /* @__PURE__ */ React$3.createElement(Icon, { toggleDropdown: this.toggleDropdown })
|
|
176648
|
-
}
|
|
176649
|
-
)
|
|
176650
|
-
),
|
|
176651
|
-
Dropdown && !noDropdownIcon ? /* @__PURE__ */ React$3.createElement(core$5.Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React$3.createElement(
|
|
176652
|
-
"div",
|
|
176653
|
-
{
|
|
176654
|
-
className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
|
|
176655
|
-
onClick: this.toggleDropdown
|
|
176656
|
-
},
|
|
176657
|
-
dropdownicon ? /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React$3.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React$3.createElement(
|
|
176658
|
-
core$5.Icon,
|
|
176659
|
-
{
|
|
176660
|
-
"data-test": toolName + "Dropdown",
|
|
176661
|
-
iconSize: 13,
|
|
176662
|
-
icon: "caret-up"
|
|
176663
|
-
}
|
|
176664
|
-
) : /* @__PURE__ */ React$3.createElement(
|
|
176665
|
-
core$5.Icon,
|
|
176666
|
-
{
|
|
176667
|
-
"data-test": toolName + "Dropdown",
|
|
176668
|
-
iconSize: 13,
|
|
176669
|
-
icon: "caret-down"
|
|
176670
|
-
}
|
|
176671
|
-
)
|
|
176672
|
-
)) : null
|
|
176673
|
-
);
|
|
176674
|
-
const content = /* @__PURE__ */ React$3.createElement(
|
|
176675
|
-
"div",
|
|
176676
|
-
{
|
|
176677
|
-
ref: (n) => {
|
|
176678
|
-
if (n)
|
|
176679
|
-
this.dropdownNode = n;
|
|
176680
|
-
},
|
|
176681
|
-
style: { padding: 10, minWidth: 250, maxWidth: 350 },
|
|
176682
|
-
className: "ve-toolbar-dropdown content"
|
|
176683
|
-
},
|
|
176684
|
-
Dropdown && /* @__PURE__ */ React$3.createElement(
|
|
176685
|
-
Dropdown,
|
|
176686
|
-
{
|
|
176687
|
-
...rest,
|
|
176688
|
-
editorName,
|
|
176689
|
-
toggleDropdown: this.toggleDropdown
|
|
176690
|
-
}
|
|
176691
|
-
)
|
|
176692
|
-
);
|
|
176693
|
-
const target = IconWrapper ? /* @__PURE__ */ React$3.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React$3.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React$3.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
|
|
176694
|
-
return /* @__PURE__ */ React$3.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React$3.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React$3.createElement(
|
|
176695
|
-
core$5.Popover,
|
|
176696
|
-
{
|
|
176697
|
-
disabled: popoverDisabled,
|
|
176698
|
-
isOpen: !!Dropdown && isOpen,
|
|
176699
|
-
onClose: (e) => {
|
|
176700
|
-
let srcElement;
|
|
176701
|
-
if (e) {
|
|
176702
|
-
srcElement = e.srcElement || e.target;
|
|
176703
|
-
}
|
|
176704
|
-
if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
|
|
176705
|
-
return;
|
|
176706
|
-
}
|
|
176707
|
-
this.toggleDropdown({ forceClose: true });
|
|
176708
|
-
},
|
|
176709
|
-
canEscapeKeyClose: true,
|
|
176710
|
-
minimal: true,
|
|
176711
|
-
position: core$5.Position.BOTTOM,
|
|
176712
|
-
target,
|
|
176713
|
-
content
|
|
176714
|
-
}
|
|
176715
|
-
));
|
|
176716
|
-
}
|
|
176717
|
-
}
|
|
176718
|
-
const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
|
|
176719
|
-
isOpen: toolBar.openItem === toolName
|
|
176720
|
-
}))(ToolbarItem);
|
|
176721
|
-
|
|
176722
176769
|
function array_move(arr, old_index, new_index) {
|
|
176723
176770
|
if (new_index >= arr.length) {
|
|
176724
176771
|
let k = new_index - arr.length + 1;
|
|
@@ -177372,30 +177419,30 @@ class AddOrEditAnnotationDialog extends React$3.Component {
|
|
|
177372
177419
|
formatStart = (val) => {
|
|
177373
177420
|
const { isProtein } = this.props.sequenceData || {};
|
|
177374
177421
|
if (isProtein) {
|
|
177375
|
-
return (val + 2) / 3;
|
|
177422
|
+
return lodashExports.round((val + 2) / 3);
|
|
177376
177423
|
}
|
|
177377
|
-
return val;
|
|
177424
|
+
return lodashExports.round(val);
|
|
177378
177425
|
};
|
|
177379
177426
|
formatEnd = (val) => {
|
|
177380
177427
|
const { isProtein } = this.props.sequenceData || {};
|
|
177381
177428
|
if (isProtein) {
|
|
177382
|
-
return val / 3;
|
|
177429
|
+
return lodashExports.round(val / 3);
|
|
177383
177430
|
}
|
|
177384
|
-
return val;
|
|
177431
|
+
return lodashExports.round(val);
|
|
177385
177432
|
};
|
|
177386
177433
|
parseStart = (val) => {
|
|
177387
177434
|
const { isProtein } = this.props.sequenceData || {};
|
|
177388
177435
|
if (isProtein) {
|
|
177389
|
-
return val * 3 - 2;
|
|
177436
|
+
return lodashExports.round(val * 3 - 2);
|
|
177390
177437
|
}
|
|
177391
|
-
return val;
|
|
177438
|
+
return lodashExports.round(val);
|
|
177392
177439
|
};
|
|
177393
177440
|
parseEnd = (val) => {
|
|
177394
177441
|
const { isProtein } = this.props.sequenceData || {};
|
|
177395
177442
|
if (isProtein) {
|
|
177396
|
-
return val * 3;
|
|
177443
|
+
return lodashExports.round(val * 3);
|
|
177397
177444
|
}
|
|
177398
|
-
return val;
|
|
177445
|
+
return lodashExports.round(val);
|
|
177399
177446
|
};
|
|
177400
177447
|
renderLocations = (props) => {
|
|
177401
177448
|
const { fields } = props;
|
|
@@ -183121,7 +183168,7 @@ function addClickableLabel(toRet, { closeDropDown }) {
|
|
|
183121
183168
|
}
|
|
183122
183169
|
|
|
183123
183170
|
const userDefinedHandlersAndOpts = [
|
|
183124
|
-
"
|
|
183171
|
+
"beforeReadOnlyChange",
|
|
183125
183172
|
"defaultLinkedOligoMessage",
|
|
183126
183173
|
"allowMultipleFeatureDirections",
|
|
183127
183174
|
"getAdditionalEditAnnotationComps",
|
|
@@ -183384,49 +183431,6 @@ const OrfToolDropdown = withEditorProps(
|
|
|
183384
183431
|
}
|
|
183385
183432
|
);
|
|
183386
183433
|
|
|
183387
|
-
const editTool = connectToEditor((editorState) => {
|
|
183388
|
-
return {
|
|
183389
|
-
readOnly: editorState.readOnly
|
|
183390
|
-
};
|
|
183391
|
-
})(
|
|
183392
|
-
({
|
|
183393
|
-
toolbarItemProps,
|
|
183394
|
-
readOnly,
|
|
183395
|
-
toggleReadOnlyMode,
|
|
183396
|
-
disableSetReadOnly,
|
|
183397
|
-
onChangeEditLock
|
|
183398
|
-
}) => {
|
|
183399
|
-
const [isLoading, setIsLoading] = React$3.useState(false);
|
|
183400
|
-
const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
|
|
183401
|
-
if (isLoading) {
|
|
183402
|
-
return "Loading...";
|
|
183403
|
-
} else if (disableSetReadOnly2) {
|
|
183404
|
-
return "You do not have permission to edit locks on this sequence";
|
|
183405
|
-
}
|
|
183406
|
-
return readOnly2 ? "Click to enable editing" : "Click to disable editing";
|
|
183407
|
-
};
|
|
183408
|
-
return /* @__PURE__ */ React$3.createElement(
|
|
183409
|
-
ToolbarItem$1,
|
|
183410
|
-
{
|
|
183411
|
-
...{
|
|
183412
|
-
disabled: isLoading || disableSetReadOnly,
|
|
183413
|
-
Icon: /* @__PURE__ */ React$3.createElement(core$5.Icon, { icon: readOnly ? "lock" : "unlock" }),
|
|
183414
|
-
onIconClick: async () => {
|
|
183415
|
-
if (onChangeEditLock) {
|
|
183416
|
-
setIsLoading(true);
|
|
183417
|
-
await onChangeEditLock(!readOnly);
|
|
183418
|
-
setIsLoading(false);
|
|
183419
|
-
}
|
|
183420
|
-
toggleReadOnlyMode();
|
|
183421
|
-
},
|
|
183422
|
-
tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
|
|
183423
|
-
...toolbarItemProps
|
|
183424
|
-
}
|
|
183425
|
-
}
|
|
183426
|
-
);
|
|
183427
|
-
}
|
|
183428
|
-
);
|
|
183429
|
-
|
|
183430
183434
|
const style$4 = '';
|
|
183431
183435
|
|
|
183432
183436
|
const opts = [
|
|
@@ -184047,31 +184051,22 @@ const style$3 = '';
|
|
|
184047
184051
|
|
|
184048
184052
|
const EditReadOnlyItem = connectToEditor(({ readOnly }) => ({
|
|
184049
184053
|
readOnly
|
|
184050
|
-
}))(
|
|
184051
|
-
|
|
184052
|
-
|
|
184053
|
-
|
|
184054
|
-
|
|
184055
|
-
|
|
184056
|
-
|
|
184057
|
-
|
|
184058
|
-
|
|
184059
|
-
|
|
184060
|
-
|
|
184061
|
-
|
|
184062
|
-
|
|
184063
|
-
|
|
184064
|
-
|
|
184065
|
-
|
|
184066
|
-
className: core$5.Classes.MINIMAL,
|
|
184067
|
-
value: readOnly ? "readOnly" : "editable",
|
|
184068
|
-
onChange: ({ target: { value } }) => {
|
|
184069
|
-
updateReadOnlyMode(value === "readOnly");
|
|
184070
|
-
}
|
|
184071
|
-
}
|
|
184072
|
-
) : readOnly ? "Read Only" : "Editable") : null;
|
|
184073
|
-
}
|
|
184074
|
-
);
|
|
184054
|
+
}))((props) => {
|
|
184055
|
+
const { onSave, readOnly, showReadOnly, disableSetReadOnly } = props;
|
|
184056
|
+
return showReadOnly ? /* @__PURE__ */ React$3.createElement(StatusBarItem, { dataTest: "veStatusBar-readOnly" }, onSave ? /* @__PURE__ */ React$3.createElement(
|
|
184057
|
+
core$5.HTMLSelect,
|
|
184058
|
+
{
|
|
184059
|
+
options: [
|
|
184060
|
+
{ label: "Read Only", value: "readOnly" },
|
|
184061
|
+
{ label: "Editable", value: "editable" }
|
|
184062
|
+
],
|
|
184063
|
+
disabled: disableSetReadOnly || !onSave,
|
|
184064
|
+
className: core$5.Classes.MINIMAL,
|
|
184065
|
+
value: readOnly ? "readOnly" : "editable",
|
|
184066
|
+
onChange: ({ target: { value } }) => handleReadOnlyChange(value === "readOnly", props)
|
|
184067
|
+
}
|
|
184068
|
+
) : readOnly ? "Read Only" : "Editable") : null;
|
|
184069
|
+
});
|
|
184075
184070
|
const ShowSelectionItem = compose(
|
|
184076
184071
|
connectToEditor(
|
|
184077
184072
|
({ selectionLayer, caretPosition, sequenceData = { sequence: "" } }, ownProps, ...rest) => {
|
|
@@ -184218,11 +184213,13 @@ function StatusBar({
|
|
|
184218
184213
|
showGCContentByDefault,
|
|
184219
184214
|
onSelectionOrCaretChanged,
|
|
184220
184215
|
GCDecimalDigits = 1,
|
|
184221
|
-
isProtein
|
|
184216
|
+
isProtein,
|
|
184217
|
+
beforeReadOnlyChange
|
|
184222
184218
|
}) {
|
|
184223
184219
|
return /* @__PURE__ */ React$3.createElement("div", { className: "veStatusBar" }, showMoleculeType && /* @__PURE__ */ React$3.createElement(ShowTypeItem, { editorName }), /* @__PURE__ */ React$3.createElement(
|
|
184224
184220
|
EditReadOnlyItem,
|
|
184225
184221
|
{
|
|
184222
|
+
beforeReadOnlyChange,
|
|
184226
184223
|
editorName,
|
|
184227
184224
|
onSave,
|
|
184228
184225
|
disableSetReadOnly,
|
|
@@ -184661,7 +184658,6 @@ class GeneralProperties extends React$3.Component {
|
|
|
184661
184658
|
disableSetReadOnly,
|
|
184662
184659
|
updateAvailability,
|
|
184663
184660
|
sequenceData,
|
|
184664
|
-
updateReadOnlyMode,
|
|
184665
184661
|
onSave,
|
|
184666
184662
|
showAvailability,
|
|
184667
184663
|
sequenceNameUpdate
|
|
@@ -184716,10 +184712,9 @@ class GeneralProperties extends React$3.Component {
|
|
|
184716
184712
|
))), /* @__PURE__ */ React$3.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-left bp3-label" }, "Length"), " ", /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-right" }, " ", isProtein ? proteinSequence.length : sequence.length)), showReadOnly && /* @__PURE__ */ React$3.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-left bp3-label" }, "Is Editable"), " ", /* @__PURE__ */ React$3.createElement("div", { className: "ve-column-right" }, " ", /* @__PURE__ */ React$3.createElement(
|
|
184717
184713
|
BPSelect,
|
|
184718
184714
|
{
|
|
184715
|
+
className: "veReadOnlySelect",
|
|
184719
184716
|
disabled: !onSave || disableSetReadOnly,
|
|
184720
|
-
onChange: (val) =>
|
|
184721
|
-
updateReadOnlyMode(val === "readOnly");
|
|
184722
|
-
},
|
|
184717
|
+
onChange: (val) => handleReadOnlyChange(val === "readOnly", this.props),
|
|
184723
184718
|
value: readOnly ? "readOnly" : "editable",
|
|
184724
184719
|
options: [
|
|
184725
184720
|
{ label: "Read Only", value: "readOnly" },
|
|
@@ -194792,7 +194787,7 @@ class Editor extends React$3.Component {
|
|
|
194792
194787
|
contentLeft: this.props.contentLeft,
|
|
194793
194788
|
editorName,
|
|
194794
194789
|
withDigestTool: true,
|
|
194795
|
-
|
|
194790
|
+
beforeReadOnlyChange: this.props.beforeReadOnlyChange,
|
|
194796
194791
|
...ToolBarProps
|
|
194797
194792
|
}
|
|
194798
194793
|
),
|