@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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import './style.css';
2
- import { Icon, Classes, Button, Intent, Keys, MenuItem, Tag, useHotkeys, Popover, Tooltip, Toaster, Position, Menu, MenuDivider, NumericInput, InputGroup, Spinner, FormGroup, TextArea, Checkbox, Switch, EditableText, RadioGroup, Callout, ContextMenu, Dialog, Card, Tabs, Tab, Colors, KeyCombo, Slider as Slider$1, ButtonGroup, AnchorButton, HTMLSelect, Label, ResizeSensor, FocusStyleManager } from '@blueprintjs/core';
2
+ import { Icon, Classes, Button, Intent, Keys, MenuItem, Tag, useHotkeys, Popover, Tooltip, Toaster, Position, Menu, MenuDivider, NumericInput, InputGroup, Spinner, FormGroup, TextArea, Checkbox, Switch, EditableText, RadioGroup, Callout, ContextMenu, Dialog, Card, Tabs, Tab, Colors, KeyCombo, AnchorButton, Slider as Slider$1, ButtonGroup, HTMLSelect, Label, ResizeSensor, FocusStyleManager } from '@blueprintjs/core';
3
3
  import * as React$3 from 'react';
4
4
  import React__default$1, { forwardRef, useImperativeHandle, Fragment, useMemo as useMemo$1, useRef, useReducer, useEffect, useCallback as useCallback$1, useState, memo, Component, PureComponent, createElement, isValidElement, useContext, useLayoutEffect as useLayoutEffect$1 } from 'react';
5
5
  import ReactDOM$1, { unstable_batchedUpdates, findDOMNode as findDOMNode$2, flushSync, unmountComponentAtNode, render as render$2 } from 'react-dom';
@@ -7404,7 +7404,7 @@ function getPlainObjectKeys(object) {
7404
7404
  var ownKeys$8 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {
7405
7405
  return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
7406
7406
  } : /* istanbul ignore next */Object.getOwnPropertyNames;
7407
- function toPrimitive$2(value) {
7407
+ function toPrimitive$3(value) {
7408
7408
  return value === null ? null : typeof value === "object" ? "" + value : value;
7409
7409
  }
7410
7410
  function hasProp(target, prop) {
@@ -8333,7 +8333,7 @@ var ObservableValue = /*#__PURE__*/function (_Atom) {
8333
8333
  return this.name_ + "[" + this.value_ + "]";
8334
8334
  };
8335
8335
  _proto.valueOf = function valueOf() {
8336
- return toPrimitive$2(this.get());
8336
+ return toPrimitive$3(this.get());
8337
8337
  };
8338
8338
  _proto[_Symbol$toPrimitive] = function () {
8339
8339
  return this.valueOf();
@@ -8561,7 +8561,7 @@ var ComputedValue = /*#__PURE__*/function () {
8561
8561
  return this.name_ + "[" + this.derivation.toString() + "]";
8562
8562
  };
8563
8563
  _proto.valueOf = function valueOf() {
8564
- return toPrimitive$2(this.get());
8564
+ return toPrimitive$3(this.get());
8565
8565
  };
8566
8566
  _proto[_Symbol$toPrimitive$1] = function () {
8567
8567
  return this.valueOf();
@@ -30287,17 +30287,9 @@ function require_domCreate () {
30287
30287
  return _domCreate;
30288
30288
  }
30289
30289
 
30290
- var _ie8DomDefine;
30291
- var hasRequired_ie8DomDefine;
30292
-
30293
- function require_ie8DomDefine () {
30294
- if (hasRequired_ie8DomDefine) return _ie8DomDefine;
30295
- hasRequired_ie8DomDefine = 1;
30296
- _ie8DomDefine = !require_descriptors() && !_fails(function () {
30297
- return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
30298
- });
30299
- return _ie8DomDefine;
30300
- }
30290
+ var _ie8DomDefine = !require_descriptors() && !_fails(function () {
30291
+ return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
30292
+ });
30301
30293
 
30302
30294
  // 7.1.1 ToPrimitive(input [, PreferredType])
30303
30295
  var isObject$d = _isObject;
@@ -30312,29 +30304,22 @@ var _toPrimitive$1 = function (it, S) {
30312
30304
  throw TypeError("Can't convert object to primitive value");
30313
30305
  };
30314
30306
 
30315
- var hasRequired_objectDp;
30316
-
30317
- function require_objectDp () {
30318
- if (hasRequired_objectDp) return _objectDp;
30319
- hasRequired_objectDp = 1;
30320
- var anObject = _anObject;
30321
- var IE8_DOM_DEFINE = require_ie8DomDefine();
30322
- var toPrimitive = _toPrimitive$1;
30323
- var dP = Object.defineProperty;
30324
-
30325
- _objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
30326
- anObject(O);
30327
- P = toPrimitive(P, true);
30328
- anObject(Attributes);
30329
- if (IE8_DOM_DEFINE) try {
30330
- return dP(O, P, Attributes);
30331
- } catch (e) { /* empty */ }
30332
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
30333
- if ('value' in Attributes) O[P] = Attributes.value;
30334
- return O;
30335
- };
30336
- return _objectDp;
30337
- }
30307
+ var anObject$3 = _anObject;
30308
+ var IE8_DOM_DEFINE$1 = _ie8DomDefine;
30309
+ var toPrimitive$2 = _toPrimitive$1;
30310
+ var dP$2 = Object.defineProperty;
30311
+
30312
+ _objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
30313
+ anObject$3(O);
30314
+ P = toPrimitive$2(P, true);
30315
+ anObject$3(Attributes);
30316
+ if (IE8_DOM_DEFINE$1) try {
30317
+ return dP$2(O, P, Attributes);
30318
+ } catch (e) { /* empty */ }
30319
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
30320
+ if ('value' in Attributes) O[P] = Attributes.value;
30321
+ return O;
30322
+ };
30338
30323
 
30339
30324
  var _propertyDesc = function (bitmap, value) {
30340
30325
  return {
@@ -30345,10 +30330,10 @@ var _propertyDesc = function (bitmap, value) {
30345
30330
  };
30346
30331
  };
30347
30332
 
30348
- var dP$2 = require_objectDp();
30333
+ var dP$1 = _objectDp;
30349
30334
  var createDesc$3 = _propertyDesc;
30350
30335
  var _hide = require_descriptors() ? function (object, key, value) {
30351
- return dP$2.f(object, key, createDesc$3(1, value));
30336
+ return dP$1.f(object, key, createDesc$3(1, value));
30352
30337
  } : function (object, key, value) {
30353
30338
  object[key] = value;
30354
30339
  return object;
@@ -30364,7 +30349,7 @@ var core$3 = _coreExports;
30364
30349
  var ctx$1 = _ctx;
30365
30350
  var hide$3 = _hide;
30366
30351
  var has$e = _has;
30367
- var PROTOTYPE$2 = 'prototype';
30352
+ var PROTOTYPE$1 = 'prototype';
30368
30353
 
30369
30354
  var $export$8 = function (type, name, source) {
30370
30355
  var IS_FORCED = type & $export$8.F;
@@ -30374,8 +30359,8 @@ var $export$8 = function (type, name, source) {
30374
30359
  var IS_BIND = type & $export$8.B;
30375
30360
  var IS_WRAP = type & $export$8.W;
30376
30361
  var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
30377
- var expProto = exports[PROTOTYPE$2];
30378
- var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$2];
30362
+ var expProto = exports[PROTOTYPE$1];
30363
+ var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$1];
30379
30364
  var key, own, out;
30380
30365
  if (IS_GLOBAL) source = name;
30381
30366
  for (key in source) {
@@ -30399,7 +30384,7 @@ var $export$8 = function (type, name, source) {
30399
30384
  } return new C(a, b, c);
30400
30385
  } return C.apply(this, arguments);
30401
30386
  };
30402
- F[PROTOTYPE$2] = C[PROTOTYPE$2];
30387
+ F[PROTOTYPE$1] = C[PROTOTYPE$1];
30403
30388
  return F;
30404
30389
  // make static versions for prototype methods
30405
30390
  })(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
@@ -30536,14 +30521,14 @@ var _sharedKey = function (key) {
30536
30521
  var has$d = _has;
30537
30522
  var toIObject$4 = _toIobject;
30538
30523
  var arrayIndexOf = _arrayIncludes$1(false);
30539
- var IE_PROTO$2 = _sharedKey('IE_PROTO');
30524
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
30540
30525
 
30541
30526
  var _objectKeysInternal = function (object, names) {
30542
30527
  var O = toIObject$4(object);
30543
30528
  var i = 0;
30544
30529
  var result = [];
30545
30530
  var key;
30546
- for (key in O) if (key != IE_PROTO$2) has$d(O, key) && result.push(key);
30531
+ for (key in O) if (key != IE_PROTO$1) has$d(O, key) && result.push(key);
30547
30532
  // Don't enum bug & hidden keys
30548
30533
  while (names.length > i) if (has$d(O, key = names[i++])) {
30549
30534
  ~arrayIndexOf(result, key) || result.push(key);
@@ -30558,10 +30543,10 @@ var _enumBugKeys = (
30558
30543
 
30559
30544
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
30560
30545
  var $keys$3 = _objectKeysInternal;
30561
- var enumBugKeys$1 = _enumBugKeys;
30546
+ var enumBugKeys = _enumBugKeys;
30562
30547
 
30563
30548
  var _objectKeys = Object.keys || function keys(O) {
30564
- return $keys$3(O, enumBugKeys$1);
30549
+ return $keys$3(O, enumBugKeys);
30565
30550
  };
30566
30551
 
30567
30552
  var _objectGops = {};
@@ -30570,14 +30555,7 @@ _objectGops.f = Object.getOwnPropertySymbols;
30570
30555
 
30571
30556
  var _objectPie = {};
30572
30557
 
30573
- var hasRequired_objectPie;
30574
-
30575
- function require_objectPie () {
30576
- if (hasRequired_objectPie) return _objectPie;
30577
- hasRequired_objectPie = 1;
30578
- _objectPie.f = {}.propertyIsEnumerable;
30579
- return _objectPie;
30580
- }
30558
+ _objectPie.f = {}.propertyIsEnumerable;
30581
30559
 
30582
30560
  // 7.1.13 ToObject(argument)
30583
30561
  var defined$1 = _defined;
@@ -30595,7 +30573,7 @@ function require_objectAssign () {
30595
30573
  var DESCRIPTORS = require_descriptors();
30596
30574
  var getKeys = _objectKeys;
30597
30575
  var gOPS = _objectGops;
30598
- var pIE = require_objectPie();
30576
+ var pIE = _objectPie;
30599
30577
  var toObject = _toObject;
30600
30578
  var IObject = require_iobject();
30601
30579
  var $assign = Object.assign;
@@ -30668,19 +30646,27 @@ var _iterators = {};
30668
30646
 
30669
30647
  var _redefine = _hide;
30670
30648
 
30671
- var dP$1 = require_objectDp();
30672
- var anObject$4 = _anObject;
30673
- var getKeys$1 = _objectKeys;
30649
+ var _objectDps;
30650
+ var hasRequired_objectDps;
30674
30651
 
30675
- var _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
30676
- anObject$4(O);
30677
- var keys = getKeys$1(Properties);
30678
- var length = keys.length;
30679
- var i = 0;
30680
- var P;
30681
- while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
30682
- return O;
30683
- };
30652
+ function require_objectDps () {
30653
+ if (hasRequired_objectDps) return _objectDps;
30654
+ hasRequired_objectDps = 1;
30655
+ var dP = _objectDp;
30656
+ var anObject = _anObject;
30657
+ var getKeys = _objectKeys;
30658
+
30659
+ _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
30660
+ anObject(O);
30661
+ var keys = getKeys(Properties);
30662
+ var length = keys.length;
30663
+ var i = 0;
30664
+ var P;
30665
+ while (length > i) dP.f(O, P = keys[i++], Properties[P]);
30666
+ return O;
30667
+ };
30668
+ return _objectDps;
30669
+ }
30684
30670
 
30685
30671
  var _html;
30686
30672
  var hasRequired_html;
@@ -30693,47 +30679,55 @@ function require_html () {
30693
30679
  return _html;
30694
30680
  }
30695
30681
 
30696
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30697
- var anObject$3 = _anObject;
30698
- var dPs = _objectDps;
30699
- var enumBugKeys = _enumBugKeys;
30700
- var IE_PROTO$1 = _sharedKey('IE_PROTO');
30701
- var Empty = function () { /* empty */ };
30702
- var PROTOTYPE$1 = 'prototype';
30682
+ var _objectCreate;
30683
+ var hasRequired_objectCreate;
30703
30684
 
30704
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
30705
- var createDict = function () {
30706
- // Thrash, waste and sodomy: IE GC bug
30707
- var iframe = require_domCreate()('iframe');
30708
- var i = enumBugKeys.length;
30709
- var lt = '<';
30710
- var gt = '>';
30711
- var iframeDocument;
30712
- iframe.style.display = 'none';
30713
- require_html().appendChild(iframe);
30714
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30715
- // createDict = iframe.contentWindow.Object;
30716
- // html.removeChild(iframe);
30717
- iframeDocument = iframe.contentWindow.document;
30718
- iframeDocument.open();
30719
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30720
- iframeDocument.close();
30721
- createDict = iframeDocument.F;
30722
- while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
30723
- return createDict();
30724
- };
30725
-
30726
- var _objectCreate = Object.create || function create(O, Properties) {
30727
- var result;
30728
- if (O !== null) {
30729
- Empty[PROTOTYPE$1] = anObject$3(O);
30730
- result = new Empty();
30731
- Empty[PROTOTYPE$1] = null;
30732
- // add "__proto__" for Object.getPrototypeOf polyfill
30733
- result[IE_PROTO$1] = O;
30734
- } else result = createDict();
30735
- return Properties === undefined ? result : dPs(result, Properties);
30736
- };
30685
+ function require_objectCreate () {
30686
+ if (hasRequired_objectCreate) return _objectCreate;
30687
+ hasRequired_objectCreate = 1;
30688
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30689
+ var anObject = _anObject;
30690
+ var dPs = require_objectDps();
30691
+ var enumBugKeys = _enumBugKeys;
30692
+ var IE_PROTO = _sharedKey('IE_PROTO');
30693
+ var Empty = function () { /* empty */ };
30694
+ var PROTOTYPE = 'prototype';
30695
+
30696
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
30697
+ var createDict = function () {
30698
+ // Thrash, waste and sodomy: IE GC bug
30699
+ var iframe = require_domCreate()('iframe');
30700
+ var i = enumBugKeys.length;
30701
+ var lt = '<';
30702
+ var gt = '>';
30703
+ var iframeDocument;
30704
+ iframe.style.display = 'none';
30705
+ require_html().appendChild(iframe);
30706
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30707
+ // createDict = iframe.contentWindow.Object;
30708
+ // html.removeChild(iframe);
30709
+ iframeDocument = iframe.contentWindow.document;
30710
+ iframeDocument.open();
30711
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30712
+ iframeDocument.close();
30713
+ createDict = iframeDocument.F;
30714
+ while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
30715
+ return createDict();
30716
+ };
30717
+
30718
+ _objectCreate = Object.create || function create(O, Properties) {
30719
+ var result;
30720
+ if (O !== null) {
30721
+ Empty[PROTOTYPE] = anObject(O);
30722
+ result = new Empty();
30723
+ Empty[PROTOTYPE] = null;
30724
+ // add "__proto__" for Object.getPrototypeOf polyfill
30725
+ result[IE_PROTO] = O;
30726
+ } else result = createDict();
30727
+ return Properties === undefined ? result : dPs(result, Properties);
30728
+ };
30729
+ return _objectCreate;
30730
+ }
30737
30731
 
30738
30732
  var _wks = {exports: {}};
30739
30733
 
@@ -30751,7 +30745,7 @@ $exports.store = store$2;
30751
30745
 
30752
30746
  var _wksExports = _wks.exports;
30753
30747
 
30754
- var def = require_objectDp().f;
30748
+ var def = _objectDp.f;
30755
30749
  var has$c = _has;
30756
30750
  var TAG$1 = _wksExports('toStringTag');
30757
30751
 
@@ -30759,7 +30753,7 @@ var _setToStringTag = function (it, tag, stat) {
30759
30753
  if (it && !has$c(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
30760
30754
  };
30761
30755
 
30762
- var create$4 = _objectCreate;
30756
+ var create$4 = require_objectCreate();
30763
30757
  var descriptor = _propertyDesc;
30764
30758
  var setToStringTag$2 = _setToStringTag;
30765
30759
  var IteratorPrototype = {};
@@ -31065,7 +31059,7 @@ var _isArrayIter = function (it) {
31065
31059
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
31066
31060
  };
31067
31061
 
31068
- var $defineProperty$2 = require_objectDp();
31062
+ var $defineProperty$2 = _objectDp;
31069
31063
  var createDesc$2 = _propertyDesc;
31070
31064
 
31071
31065
  var _createProperty = function (object, index, value) {
@@ -31198,7 +31192,7 @@ var _default$9 = function (instance, Constructor) {
31198
31192
 
31199
31193
  var $export$3 = _export;
31200
31194
  // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
31201
- $export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: require_objectDp().f });
31195
+ $export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: _objectDp.f });
31202
31196
 
31203
31197
  var $Object$2 = _coreExports.Object;
31204
31198
  var defineProperty$c = function defineProperty(it, key, desc) {
@@ -31246,7 +31240,7 @@ var _meta = {exports: {}};
31246
31240
  var META$1 = _uid('meta');
31247
31241
  var isObject$c = _isObject;
31248
31242
  var has$a = _has;
31249
- var setDesc = require_objectDp().f;
31243
+ var setDesc = _objectDp.f;
31250
31244
  var id$1 = 0;
31251
31245
  var isExtensible = Object.isExtensible || function () {
31252
31246
  return true;
@@ -31301,7 +31295,7 @@ var _metaExports = _meta.exports;
31301
31295
 
31302
31296
  var core = _coreExports;
31303
31297
  var wksExt$1 = _wksExt;
31304
- var defineProperty$a = require_objectDp().f;
31298
+ var defineProperty$a = _objectDp.f;
31305
31299
  var _wksDefine = function (name) {
31306
31300
  var $Symbol = core.Symbol || (core.Symbol = {} );
31307
31301
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$a($Symbol, name, { value: wksExt$1.f(name) });
@@ -31310,7 +31304,7 @@ var _wksDefine = function (name) {
31310
31304
  // all enumerable object keys, includes symbols
31311
31305
  var getKeys = _objectKeys;
31312
31306
  var gOPS$1 = _objectGops;
31313
- var pIE$1 = require_objectPie();
31307
+ var pIE$1 = _objectPie;
31314
31308
  var _enumKeys = function (it) {
31315
31309
  var result = getKeys(it);
31316
31310
  var getSymbols = gOPS$1.f;
@@ -31363,12 +31357,12 @@ _objectGopnExt.f = function getOwnPropertyNames(it) {
31363
31357
 
31364
31358
  var _objectGopd = {};
31365
31359
 
31366
- var pIE = require_objectPie();
31360
+ var pIE = _objectPie;
31367
31361
  var createDesc$1 = _propertyDesc;
31368
31362
  var toIObject$1 = _toIobject;
31369
31363
  var toPrimitive$1 = _toPrimitive$1;
31370
31364
  var has$9 = _has;
31371
- var IE8_DOM_DEFINE = require_ie8DomDefine();
31365
+ var IE8_DOM_DEFINE = _ie8DomDefine;
31372
31366
  var gOPD$5 = Object.getOwnPropertyDescriptor;
31373
31367
 
31374
31368
  _objectGopd.f = require_descriptors() ? gOPD$5 : function getOwnPropertyDescriptor(O, P) {
@@ -31402,11 +31396,11 @@ var toObject$1 = _toObject;
31402
31396
  var toIObject = _toIobject;
31403
31397
  var toPrimitive = _toPrimitive$1;
31404
31398
  var createDesc = _propertyDesc;
31405
- var _create$1 = _objectCreate;
31399
+ var _create$1 = require_objectCreate();
31406
31400
  var gOPNExt = _objectGopnExt;
31407
31401
  var $GOPD = _objectGopd;
31408
31402
  var $GOPS = _objectGops;
31409
- var $DP = require_objectDp();
31403
+ var $DP = _objectDp;
31410
31404
  var $keys$1 = _objectKeys;
31411
31405
  var gOPD$4 = $GOPD.f;
31412
31406
  var dP = $DP.f;
@@ -31531,7 +31525,7 @@ if (!USE_NATIVE) {
31531
31525
  $GOPD.f = $getOwnPropertyDescriptor;
31532
31526
  $DP.f = $defineProperty$1;
31533
31527
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
31534
- require_objectPie().f = $propertyIsEnumerable;
31528
+ _objectPie.f = $propertyIsEnumerable;
31535
31529
  $GOPS.f = $getOwnPropertySymbols;
31536
31530
 
31537
31531
  if (DESCRIPTORS && !_library) {
@@ -31712,7 +31706,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
31712
31706
 
31713
31707
  var $export = _export;
31714
31708
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
31715
- $export($export.S, 'Object', { create: _objectCreate });
31709
+ $export($export.S, 'Object', { create: require_objectCreate() });
31716
31710
 
31717
31711
  var $Object$1 = _coreExports.Object;
31718
31712
  var create$3 = function create(P, D) {
@@ -92017,6 +92011,8 @@ const PreviewCsvData = observer(function(props) {
92017
92011
  userSchema = exampleData,
92018
92012
  initialEntities
92019
92013
  } = props;
92014
+ const rerenderKey = useRef(0);
92015
+ rerenderKey.current = rerenderKey.current + 1;
92020
92016
  const data = userSchema.userData && userSchema.userData.length && userSchema.userData.map((row) => {
92021
92017
  const toRet = {
92022
92018
  _isClean: row._isClean
@@ -92063,6 +92059,7 @@ const PreviewCsvData = observer(function(props) {
92063
92059
  {
92064
92060
  maxWidth: 800,
92065
92061
  maxHeight: 500,
92062
+ rerenderKey: rerenderKey.current,
92066
92063
  destroyOnUnmount: false,
92067
92064
  doNotValidateUntouchedRows: true,
92068
92065
  formName: datatableFormName || "editableCellTable",
@@ -106628,8 +106625,8 @@ function getOverlapsOfPotentiallyCircularRanges(rangeA, rangeB, maxRangeLength,
106628
106625
  maxRangeLength
106629
106626
  );
106630
106627
  let overlaps = [];
106631
- normalizedRangeA.forEach(function(nonCircularRangeA, iA) {
106632
- normalizedRangeB.forEach(function(nonCircularRangeB, iB) {
106628
+ normalizedRangeA.forEach(function(nonCircularRangeA) {
106629
+ normalizedRangeB.forEach(function(nonCircularRangeB) {
106633
106630
  const overlap = getOverlapOfNonCircularRanges(
106634
106631
  nonCircularRangeA,
106635
106632
  nonCircularRangeB
@@ -106641,7 +106638,7 @@ function getOverlapsOfPotentiallyCircularRanges(rangeA, rangeB, maxRangeLength,
106641
106638
  });
106642
106639
  if (joinIfPossible && normalizedRangeA.length === 2 && normalizedRangeB.length === 2 && maxRangeLength) {
106643
106640
  const joinedOverlap = {};
106644
- overlaps = lodashExports.flatMap(overlaps, (o, i) => {
106641
+ overlaps = lodashExports.flatMap(overlaps, (o) => {
106645
106642
  if (o.start === 0) {
106646
106643
  joinedOverlap.end = o.end;
106647
106644
  return [];
@@ -107131,7 +107128,7 @@ function translateRange(rangeToBeAdjusted, translateBy, rangeLength) {
107131
107128
  });
107132
107129
  }
107133
107130
 
107134
- function flipRelativeRange(innerRange, outerRange, sequenceLength, options) {
107131
+ function flipRelativeRange(innerRange, outerRange, sequenceLength) {
107135
107132
  const isFullyContained = isRangeWithinRange(
107136
107133
  innerRange,
107137
107134
  outerRange,
@@ -107143,7 +107140,7 @@ function flipRelativeRange(innerRange, outerRange, sequenceLength, options) {
107143
107140
  return flipNonFullyContainedRange(innerRange, outerRange, sequenceLength);
107144
107141
  }
107145
107142
  }
107146
- function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, options) {
107143
+ function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength) {
107147
107144
  const outerFullyContained = isRangeWithinRange(
107148
107145
  outerRange,
107149
107146
  innerRange,
@@ -107184,9 +107181,8 @@ function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, opti
107184
107181
  sequenceLength
107185
107182
  );
107186
107183
  if (overlaps.length >= 1) {
107187
- let overlapExtendsForward;
107188
107184
  const firstOverlap = overlaps[0];
107189
- overlapExtendsForward = firstOverlap.start !== outerRange.start;
107185
+ const overlapExtendsForward = firstOverlap.start !== outerRange.start;
107190
107186
  const flippedTruncatedInner = flipFullyContainedRange(
107191
107187
  firstOverlap,
107192
107188
  outerRange,
@@ -107207,7 +107203,7 @@ function flipNonFullyContainedRange(innerRange, outerRange, sequenceLength, opti
107207
107203
  }
107208
107204
  return flippedInnerRange;
107209
107205
  }
107210
- function flipFullyContainedRange(innerRange, outerRange, sequenceLength, options) {
107206
+ function flipFullyContainedRange(innerRange, outerRange, sequenceLength) {
107211
107207
  const translateBy = -outerRange.start;
107212
107208
  const translatedOuterRange = translateRange(
107213
107209
  outerRange,
@@ -107335,6 +107331,7 @@ function getYOffsetForPotentiallyCircularRange(range, YOffsetLevelsWithRanges, a
107335
107331
  rangesAlreadyAddedToYOffset.push(range);
107336
107332
  return true;
107337
107333
  }
107334
+ return false;
107338
107335
  });
107339
107336
  if (!openYOffsetFound) {
107340
107337
  yOffset = YOffsetLevelsWithRanges.length;
@@ -113805,9 +113802,9 @@ function coerceLocation({
113805
113802
  function filterAminoAcidSequenceString(sequenceString, options) {
113806
113803
  options = options || {};
113807
113804
  if (options.includeStopCodon) {
113808
- return sequenceString.replace(/[^xtgalmfwkqespvicyhrndu.*]/gi, "");
113805
+ return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu.*]/gi, "");
113809
113806
  }
113810
- return sequenceString.replace(/[^xtgalmfwkqespvicyhrndu]/gi, "");
113807
+ return sequenceString?.replace(/[^xtgalmfwkqespvicyhrndu]/gi, "");
113811
113808
  }
113812
113809
 
113813
113810
  function getDegenerateDnaStringFromAAString(aaString) {
@@ -124038,7 +124035,6 @@ function genbankToJson(string, options = {}) {
124038
124035
  }
124039
124036
  function parseLocus(line) {
124040
124037
  result = createInitialSequence(options);
124041
- let locusName;
124042
124038
  let circular;
124043
124039
  let gbDivision;
124044
124040
  let date;
@@ -124049,7 +124045,7 @@ function genbankToJson(string, options = {}) {
124049
124045
  );
124050
124046
  addMessage("Import Warning: Locus line contains no values: " + line);
124051
124047
  }
124052
- locusName = lineArr[1];
124048
+ const locusName = lineArr[1];
124053
124049
  for (let i = 1; i < lineArr.length; i++) {
124054
124050
  if (lineArr[i].match(/circular/gi)) {
124055
124051
  circular = true;
@@ -124196,10 +124192,10 @@ function genbankToJson(string, options = {}) {
124196
124192
  }
124197
124193
  }
124198
124194
  function parseFeatureNote(line) {
124199
- let newLine, lineArr;
124195
+ let newLine;
124200
124196
  newLine = line.trimLeft();
124201
124197
  newLine = newLine.replace(/^\/|"$/g, "");
124202
- lineArr = newLine.split(/="|=/);
124198
+ const lineArr = newLine.split(/="|=/);
124203
124199
  let val = lineArr.slice(1).join("=");
124204
124200
  if (val) {
124205
124201
  val = val.replace(/\\/g, " ");
@@ -137667,7 +137663,6 @@ function createGenbankLocus(serSeq, options) {
137667
137663
  if (serSeq.sequence.symbols) {
137668
137664
  serSeq.sequence = serSeq.sequence.symbols.split("");
137669
137665
  }
137670
- let tmp;
137671
137666
  let dnaType;
137672
137667
  if (serSeq.isProtein) {
137673
137668
  dnaType = "";
@@ -137684,7 +137679,7 @@ function createGenbankLocus(serSeq, options) {
137684
137679
  line += " ";
137685
137680
  line += StringUtil.lpad(String(serSeq.sequence.length), " ", 11);
137686
137681
  line += serSeq.isProtein ? " aa " : " bp ";
137687
- tmp = "";
137682
+ const tmp = "";
137688
137683
  line += StringUtil.lpad(tmp, " ", 3);
137689
137684
  line += StringUtil.rpad(dnaType, " ", 6);
137690
137685
  line += " ";
@@ -142918,6 +142913,7 @@ function mapStateToProps(state, ownProps) {
142918
142913
  if (!editorState) {
142919
142914
  return editorReducer({}, {});
142920
142915
  }
142916
+ const sequenceLength = selectors.sequenceLengthSelector(editorState);
142921
142917
  const { findTool, annotationsToSupport = {} } = editorState;
142922
142918
  const visibilities = getVisibilities(editorState);
142923
142919
  let annotationToAdd;
@@ -142928,7 +142924,13 @@ function mapStateToProps(state, ownProps) {
142928
142924
  ].forEach(([n, type, annotationTypePlural]) => {
142929
142925
  const vals = getFormValues(n)(state);
142930
142926
  if (vals) {
142931
- annotationToAdd = getAnnToAdd(vals, n, type, annotationTypePlural);
142927
+ annotationToAdd = getAnnToAdd(
142928
+ vals,
142929
+ n,
142930
+ type,
142931
+ annotationTypePlural,
142932
+ sequenceLength
142933
+ );
142932
142934
  }
142933
142935
  });
142934
142936
  const toReturn = {
@@ -142952,7 +142954,6 @@ function mapStateToProps(state, ownProps) {
142952
142954
  editorState,
142953
142955
  ownProps.additionalEnzymes
142954
142956
  );
142955
- const sequenceLength = selectors.sequenceLengthSelector(editorState);
142956
142957
  const { matchedSearchLayer, searchLayers, matchesTotal } = getSearchLayersAndMatch(editorState);
142957
142958
  const annotationSearchMatches = selectors.annotationSearchSelector(editorState);
142958
142959
  const _sequenceDataToUse = getSequenceDataToUse(
@@ -143228,21 +143229,26 @@ const getFindTool = createSelector(
143228
143229
  };
143229
143230
  }
143230
143231
  );
143231
- const getAnnToAdd = defaultMemoize((vals, n, type, annotationTypePlural) => {
143232
- const annToAdd = {
143233
- color: getFeatureToColorMap({ includeHidden: true })[vals.type || "primer_bind"],
143234
- //we won't have the correct color yet so we set it here
143235
- ...vals,
143236
- formName: n,
143237
- type,
143238
- annotationTypePlural,
143239
- name: vals.name || "Untitled"
143240
- };
143241
- if (!vals.useLinkedOligo) {
143242
- delete annToAdd.bases;
143232
+ const getAnnToAdd = defaultMemoize(
143233
+ (vals, n, type, annotationTypePlural, sequenceLength) => {
143234
+ const annToAdd = normalizeRange(
143235
+ {
143236
+ color: getFeatureToColorMap({ includeHidden: true })[vals.type || "primer_bind"],
143237
+ //we won't have the correct color yet so we set it here
143238
+ ...vals,
143239
+ formName: n,
143240
+ type,
143241
+ annotationTypePlural,
143242
+ name: vals.name || "Untitled"
143243
+ },
143244
+ sequenceLength
143245
+ );
143246
+ if (!vals.useLinkedOligo) {
143247
+ delete annToAdd.bases;
143248
+ }
143249
+ return annToAdd;
143243
143250
  }
143244
- return annToAdd;
143245
- });
143251
+ );
143246
143252
  const getSeqDataWithAnnToAdd = defaultMemoize(
143247
143253
  (seqData, ann, allowMultipleFeatureDirections) => {
143248
143254
  if (ann) {
@@ -161153,7 +161159,7 @@ function showFileDialog({ multiple = false, onSelect }) {
161153
161159
  }
161154
161160
 
161155
161161
  const name = "@teselagen/ove";
161156
- const version = "0.3.11";
161162
+ const version = "0.3.13";
161157
161163
  const main = "./src/index.js";
161158
161164
  const exports$1 = {
161159
161165
  ".": {
@@ -161695,6 +161701,184 @@ function ToggleShowMeltingTemp(props) {
161695
161701
  );
161696
161702
  }
161697
161703
 
161704
+ const style$i = '';
161705
+
161706
+ class ToolbarItem extends React__default$1.Component {
161707
+ toggleDropdown = ({ forceClose } = {}) => {
161708
+ const { toolName, isOpen } = this.props;
161709
+ this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
161710
+ };
161711
+ render() {
161712
+ const { overrides = {} } = this.props;
161713
+ const {
161714
+ isOpen,
161715
+ index,
161716
+ Icon: Icon$1,
161717
+ // dynamicIcon,
161718
+ onIconClick = lodashExports.noop,
161719
+ tooltip = "",
161720
+ tooltipToggled,
161721
+ dropdowntooltip = "",
161722
+ Dropdown,
161723
+ disabled,
161724
+ isHidden,
161725
+ renderIconAbove,
161726
+ noDropdownIcon,
161727
+ IconWrapper,
161728
+ editorName,
161729
+ popoverDisabled,
161730
+ IconWrapperProps,
161731
+ toolName,
161732
+ dropdownicon,
161733
+ tooltipDisabled,
161734
+ toggled = false,
161735
+ ...rest
161736
+ } = { ...this.props, ...overrides };
161737
+ if (!toolName)
161738
+ console.warn("toolName is required!");
161739
+ if (isHidden)
161740
+ return null;
161741
+ let tooltipToDisplay = tooltip;
161742
+ if (toggled && tooltipToggled) {
161743
+ tooltipToDisplay = tooltipToggled;
161744
+ }
161745
+ const buttonTarget = /* @__PURE__ */ React__default$1.createElement(
161746
+ "div",
161747
+ {
161748
+ className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
161749
+ },
161750
+ renderIconAbove && /* @__PURE__ */ React__default$1.createElement("div", null, /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarItem" }, Icon$1)),
161751
+ Icon$1 && !renderIconAbove && /* @__PURE__ */ React__default$1.createElement(
161752
+ Tooltip,
161753
+ {
161754
+ disabled: tooltipDisabled,
161755
+ portalClassName: "ve-toolbar-item-popover",
161756
+ content: tooltipToDisplay
161757
+ },
161758
+ /* @__PURE__ */ React__default$1.createElement(
161759
+ AnchorButton,
161760
+ {
161761
+ intent: Intent.PRIMARY,
161762
+ onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
161763
+ active: toggled,
161764
+ disabled,
161765
+ minimal: true,
161766
+ icon: React__default$1.isValidElement(Icon$1) ? Icon$1 : /* @__PURE__ */ React__default$1.createElement(Icon$1, { toggleDropdown: this.toggleDropdown })
161767
+ }
161768
+ )
161769
+ ),
161770
+ Dropdown && !noDropdownIcon ? /* @__PURE__ */ React__default$1.createElement(Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React__default$1.createElement(
161771
+ "div",
161772
+ {
161773
+ className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
161774
+ onClick: this.toggleDropdown
161775
+ },
161776
+ dropdownicon ? /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React__default$1.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React__default$1.createElement(
161777
+ Icon,
161778
+ {
161779
+ "data-test": toolName + "Dropdown",
161780
+ iconSize: 13,
161781
+ icon: "caret-up"
161782
+ }
161783
+ ) : /* @__PURE__ */ React__default$1.createElement(
161784
+ Icon,
161785
+ {
161786
+ "data-test": toolName + "Dropdown",
161787
+ iconSize: 13,
161788
+ icon: "caret-down"
161789
+ }
161790
+ )
161791
+ )) : null
161792
+ );
161793
+ const content = /* @__PURE__ */ React__default$1.createElement(
161794
+ "div",
161795
+ {
161796
+ ref: (n) => {
161797
+ if (n)
161798
+ this.dropdownNode = n;
161799
+ },
161800
+ style: { padding: 10, minWidth: 250, maxWidth: 350 },
161801
+ className: "ve-toolbar-dropdown content"
161802
+ },
161803
+ Dropdown && /* @__PURE__ */ React__default$1.createElement(
161804
+ Dropdown,
161805
+ {
161806
+ ...rest,
161807
+ editorName,
161808
+ toggleDropdown: this.toggleDropdown
161809
+ }
161810
+ )
161811
+ );
161812
+ const target = IconWrapper ? /* @__PURE__ */ React__default$1.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React__default$1.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React__default$1.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
161813
+ return /* @__PURE__ */ React__default$1.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React__default$1.createElement(
161814
+ Popover,
161815
+ {
161816
+ disabled: popoverDisabled,
161817
+ isOpen: !!Dropdown && isOpen,
161818
+ onClose: (e) => {
161819
+ let srcElement;
161820
+ if (e) {
161821
+ srcElement = e.srcElement || e.target;
161822
+ }
161823
+ if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
161824
+ return;
161825
+ }
161826
+ this.toggleDropdown({ forceClose: true });
161827
+ },
161828
+ canEscapeKeyClose: true,
161829
+ minimal: true,
161830
+ position: Position.BOTTOM,
161831
+ target,
161832
+ content
161833
+ }
161834
+ ));
161835
+ }
161836
+ }
161837
+ const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
161838
+ isOpen: toolBar.openItem === toolName
161839
+ }))(ToolbarItem);
161840
+
161841
+ const editTool = connectToEditor((editorState) => {
161842
+ return {
161843
+ readOnly: editorState.readOnly
161844
+ };
161845
+ })((props) => {
161846
+ const { toolbarItemProps, readOnly, disableSetReadOnly } = props;
161847
+ const [isLoading, setIsLoading] = useState(false);
161848
+ const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
161849
+ if (isLoading) {
161850
+ return "Loading...";
161851
+ } else if (disableSetReadOnly2) {
161852
+ return "You do not have permission to edit locks on this sequence";
161853
+ }
161854
+ return readOnly2 ? "Click to enable editing" : "Click to disable editing";
161855
+ };
161856
+ return /* @__PURE__ */ React__default$1.createElement(
161857
+ ToolbarItem$1,
161858
+ {
161859
+ ...{
161860
+ disabled: isLoading || disableSetReadOnly,
161861
+ Icon: /* @__PURE__ */ React__default$1.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
161862
+ onIconClick: () => handleReadOnlyChange(!readOnly, { ...props, setIsLoading }),
161863
+ tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
161864
+ ...toolbarItemProps
161865
+ }
161866
+ }
161867
+ );
161868
+ });
161869
+ async function handleReadOnlyChange(newVal, { beforeReadOnlyChange, updateReadOnlyMode, setIsLoading = () => {
161870
+ } }) {
161871
+ if (beforeReadOnlyChange) {
161872
+ setIsLoading(true);
161873
+ const shouldChange = await beforeReadOnlyChange(newVal);
161874
+ setIsLoading(false);
161875
+ if (shouldChange === false) {
161876
+ return;
161877
+ }
161878
+ }
161879
+ updateReadOnlyMode(newVal);
161880
+ }
161881
+
161698
161882
  const isProtein = (props) => props.sequenceData && props.sequenceData.isProtein;
161699
161883
  const isOligo = (props) => props.sequenceData && props.sequenceData.isOligo;
161700
161884
  const isRna = (props) => props.sequenceData && props.sequenceData.isRna;
@@ -161778,7 +161962,7 @@ const fileCommandDefs = {
161778
161962
  isDisabled: (props) => props.disableSetReadOnly || !props.onSave,
161779
161963
  isHidden: (props) => !props.toggleReadOnlyMode,
161780
161964
  isActive: (props) => props.readOnly,
161781
- handler: (props) => props.toggleReadOnlyMode()
161965
+ handler: (props) => handleReadOnlyChange(!props.readOnly, props)
161782
161966
  },
161783
161967
  importSequence: {
161784
161968
  isHidden: (props) => props.hideSingleImport,
@@ -167663,7 +167847,7 @@ function getEditDeleteHandlers(type, annotation) {
167663
167847
  ];
167664
167848
  }
167665
167849
 
167666
- const style$i = '';
167850
+ const style$h = '';
167667
167851
 
167668
167852
  function SequenceName({ sequenceName, sequenceLength, isProtein }) {
167669
167853
  return /* @__PURE__ */ React__default$1.createElement("div", { key: "circViewSvgCenterText", style: { textAlign: "center" } }, /* @__PURE__ */ React__default$1.createElement("span", null, sequenceName, " "), /* @__PURE__ */ React__default$1.createElement("br", null), /* @__PURE__ */ React__default$1.createElement("span", null, isProtein ? `${Math.floor(sequenceLength / 3)} AAs` : `${sequenceLength} bps`));
@@ -170049,7 +170233,7 @@ function VisibilityOptions$2({
170049
170233
  );
170050
170234
  }
170051
170235
 
170052
- const style$h = '';
170236
+ const style$g = '';
170053
170237
 
170054
170238
  const simpleDialog = '';
170055
170239
 
@@ -170326,7 +170510,7 @@ function combineLabels(labels, numberOfBuckets) {
170326
170510
  return combinedLabels;
170327
170511
  }
170328
170512
 
170329
- const style$g = '';
170513
+ const style$f = '';
170330
170514
 
170331
170515
  const fontWidthToFontSize = 1.75;
170332
170516
  const getTextLength = (text) => {
@@ -172529,7 +172713,7 @@ function DrawAnnotationInner({
172529
172713
  }
172530
172714
  const DrawAnnotation = withHover(DrawAnnotationInner);
172531
172715
 
172532
- const style$f = '';
172716
+ const style$e = '';
172533
172717
 
172534
172718
  function c(u,e,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),m=useRef(),v=useRef(),d=useRef(u),p=useRef(!0);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;useEffect(function(){return p.current=!0,function(){p.current=!1;}},[]);var h=useMemo$1(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}
172535
172719
 
@@ -173462,7 +173646,7 @@ function CircularView(props) {
173462
173646
  }
173463
173647
  const CircularView$1 = withEditorInteractions(CircularView);
173464
173648
 
173465
- const style$e = '';
173649
+ const style$d = '';
173466
173650
 
173467
173651
  class PrintDialog extends React__default$1.Component {
173468
173652
  state = {
@@ -173943,7 +174127,7 @@ const RemoveDuplicates = compose$1(
173943
174127
  tgFormValues("ignoreName", "ignoreStrand", "ignoreStartAndEnd")
173944
174128
  )(RemoveDuplicatesDialog);
173945
174129
 
173946
- const style$d = '';
174130
+ const style$c = '';
173947
174131
 
173948
174132
  var isMobile$2 = {exports: {}};
173949
174133
 
@@ -174965,7 +175149,7 @@ const normalizeToInt = (val) => {
174965
175149
  return normalizedVal;
174966
175150
  };
174967
175151
 
174968
- const style$c = '';
175152
+ const style$b = '';
174969
175153
 
174970
175154
  const EnzymeViewer = ({
174971
175155
  extraClasses = "",
@@ -175040,7 +175224,7 @@ const EnzymeViewer = ({
175040
175224
  );
175041
175225
  };
175042
175226
 
175043
- const style$b = '';
175227
+ const style$a = '';
175044
175228
 
175045
175229
  const upsertLocalEnzymeGroups = (newGroups) => {
175046
175230
  const existingGroups = window.getExistingEnzymeGroups();
@@ -175736,7 +175920,7 @@ const HoverView = view(({ allEnzymesByName }) => {
175736
175920
  );
175737
175921
  });
175738
175922
 
175739
- const style$a = '';
175923
+ const style$9 = '';
175740
175924
 
175741
175925
  const CreateCustomEnzyme = function(props) {
175742
175926
  const paddingStart = "-------";
@@ -176561,143 +176745,6 @@ function getIsEnzymeHidden({ name, allRestrictionEnzymes }) {
176561
176745
  return isHidden;
176562
176746
  }
176563
176747
 
176564
- const style$9 = '';
176565
-
176566
- class ToolbarItem extends React__default$1.Component {
176567
- toggleDropdown = ({ forceClose } = {}) => {
176568
- const { toolName, isOpen } = this.props;
176569
- this.props.openToolbarItemUpdate(isOpen || forceClose ? "" : toolName);
176570
- };
176571
- render() {
176572
- const { overrides = {} } = this.props;
176573
- const {
176574
- isOpen,
176575
- index,
176576
- Icon: Icon$1,
176577
- // dynamicIcon,
176578
- onIconClick = lodashExports.noop,
176579
- tooltip = "",
176580
- tooltipToggled,
176581
- dropdowntooltip = "",
176582
- Dropdown,
176583
- disabled,
176584
- isHidden,
176585
- renderIconAbove,
176586
- noDropdownIcon,
176587
- IconWrapper,
176588
- editorName,
176589
- popoverDisabled,
176590
- IconWrapperProps,
176591
- toolName,
176592
- dropdownicon,
176593
- tooltipDisabled,
176594
- toggled = false,
176595
- ...rest
176596
- } = { ...this.props, ...overrides };
176597
- if (!toolName)
176598
- console.warn("toolName is required!");
176599
- if (isHidden)
176600
- return null;
176601
- let tooltipToDisplay = tooltip;
176602
- if (toggled && tooltipToggled) {
176603
- tooltipToDisplay = tooltipToggled;
176604
- }
176605
- const buttonTarget = /* @__PURE__ */ React__default$1.createElement(
176606
- "div",
176607
- {
176608
- className: `veToolbarItemOuter ve-tool-container-${toolName}` + (disabled ? " disabled " : "")
176609
- },
176610
- renderIconAbove && /* @__PURE__ */ React__default$1.createElement("div", null, /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarItem" }, Icon$1)),
176611
- Icon$1 && !renderIconAbove && /* @__PURE__ */ React__default$1.createElement(
176612
- Tooltip,
176613
- {
176614
- disabled: tooltipDisabled,
176615
- portalClassName: "ve-toolbar-item-popover",
176616
- content: tooltipToDisplay
176617
- },
176618
- /* @__PURE__ */ React__default$1.createElement(
176619
- AnchorButton,
176620
- {
176621
- intent: Intent.PRIMARY,
176622
- onClick: onIconClick === "toggleDropdown" ? this.toggleDropdown : onIconClick,
176623
- active: toggled,
176624
- disabled,
176625
- minimal: true,
176626
- icon: React__default$1.isValidElement(Icon$1) ? Icon$1 : /* @__PURE__ */ React__default$1.createElement(Icon$1, { toggleDropdown: this.toggleDropdown })
176627
- }
176628
- )
176629
- ),
176630
- Dropdown && !noDropdownIcon ? /* @__PURE__ */ React__default$1.createElement(Tooltip, { disabled: tooltipDisabled, content: dropdowntooltip }, /* @__PURE__ */ React__default$1.createElement(
176631
- "div",
176632
- {
176633
- className: (isOpen ? " isOpen " : "") + (dropdownicon ? "" : " veToolbarDropdown"),
176634
- onClick: this.toggleDropdown
176635
- },
176636
- dropdownicon ? /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarIcon" }, /* @__PURE__ */ React__default$1.createElement("div", null, dropdownicon)) : isOpen ? /* @__PURE__ */ React__default$1.createElement(
176637
- Icon,
176638
- {
176639
- "data-test": toolName + "Dropdown",
176640
- iconSize: 13,
176641
- icon: "caret-up"
176642
- }
176643
- ) : /* @__PURE__ */ React__default$1.createElement(
176644
- Icon,
176645
- {
176646
- "data-test": toolName + "Dropdown",
176647
- iconSize: 13,
176648
- icon: "caret-down"
176649
- }
176650
- )
176651
- )) : null
176652
- );
176653
- const content = /* @__PURE__ */ React__default$1.createElement(
176654
- "div",
176655
- {
176656
- ref: (n) => {
176657
- if (n)
176658
- this.dropdownNode = n;
176659
- },
176660
- style: { padding: 10, minWidth: 250, maxWidth: 350 },
176661
- className: "ve-toolbar-dropdown content"
176662
- },
176663
- Dropdown && /* @__PURE__ */ React__default$1.createElement(
176664
- Dropdown,
176665
- {
176666
- ...rest,
176667
- editorName,
176668
- toggleDropdown: this.toggleDropdown
176669
- }
176670
- )
176671
- );
176672
- const target = IconWrapper ? /* @__PURE__ */ React__default$1.createElement(IconWrapper, { ...IconWrapperProps }, ({ getRootProps, getInputProps }) => /* @__PURE__ */ React__default$1.createElement("div", { ...getRootProps() }, /* @__PURE__ */ React__default$1.createElement("input", { ...getInputProps() }), buttonTarget)) : buttonTarget;
176673
- return /* @__PURE__ */ React__default$1.createElement("div", { style: { display: "flex", alignItems: "center" } }, index !== 0 && /* @__PURE__ */ React__default$1.createElement("div", { className: "veToolbarSpacer" }), /* @__PURE__ */ React__default$1.createElement(
176674
- Popover,
176675
- {
176676
- disabled: popoverDisabled,
176677
- isOpen: !!Dropdown && isOpen,
176678
- onClose: (e) => {
176679
- let srcElement;
176680
- if (e) {
176681
- srcElement = e.srcElement || e.target;
176682
- }
176683
- if (e && srcElement && this.dropdownNode && (this.dropdownNode.contains(srcElement) || !document.body.contains(srcElement))) {
176684
- return;
176685
- }
176686
- this.toggleDropdown({ forceClose: true });
176687
- },
176688
- canEscapeKeyClose: true,
176689
- minimal: true,
176690
- position: Position.BOTTOM,
176691
- target,
176692
- content
176693
- }
176694
- ));
176695
- }
176696
- }
176697
- const ToolbarItem$1 = connectToEditor(({ toolBar = {} }, { toolName }) => ({
176698
- isOpen: toolBar.openItem === toolName
176699
- }))(ToolbarItem);
176700
-
176701
176748
  function array_move(arr, old_index, new_index) {
176702
176749
  if (new_index >= arr.length) {
176703
176750
  let k = new_index - arr.length + 1;
@@ -177351,30 +177398,30 @@ class AddOrEditAnnotationDialog extends React__default$1.Component {
177351
177398
  formatStart = (val) => {
177352
177399
  const { isProtein } = this.props.sequenceData || {};
177353
177400
  if (isProtein) {
177354
- return (val + 2) / 3;
177401
+ return lodashExports.round((val + 2) / 3);
177355
177402
  }
177356
- return val;
177403
+ return lodashExports.round(val);
177357
177404
  };
177358
177405
  formatEnd = (val) => {
177359
177406
  const { isProtein } = this.props.sequenceData || {};
177360
177407
  if (isProtein) {
177361
- return val / 3;
177408
+ return lodashExports.round(val / 3);
177362
177409
  }
177363
- return val;
177410
+ return lodashExports.round(val);
177364
177411
  };
177365
177412
  parseStart = (val) => {
177366
177413
  const { isProtein } = this.props.sequenceData || {};
177367
177414
  if (isProtein) {
177368
- return val * 3 - 2;
177415
+ return lodashExports.round(val * 3 - 2);
177369
177416
  }
177370
- return val;
177417
+ return lodashExports.round(val);
177371
177418
  };
177372
177419
  parseEnd = (val) => {
177373
177420
  const { isProtein } = this.props.sequenceData || {};
177374
177421
  if (isProtein) {
177375
- return val * 3;
177422
+ return lodashExports.round(val * 3);
177376
177423
  }
177377
- return val;
177424
+ return lodashExports.round(val);
177378
177425
  };
177379
177426
  renderLocations = (props) => {
177380
177427
  const { fields } = props;
@@ -183100,7 +183147,7 @@ function addClickableLabel(toRet, { closeDropDown }) {
183100
183147
  }
183101
183148
 
183102
183149
  const userDefinedHandlersAndOpts = [
183103
- "onChangeEditLock",
183150
+ "beforeReadOnlyChange",
183104
183151
  "defaultLinkedOligoMessage",
183105
183152
  "allowMultipleFeatureDirections",
183106
183153
  "getAdditionalEditAnnotationComps",
@@ -183363,49 +183410,6 @@ const OrfToolDropdown = withEditorProps(
183363
183410
  }
183364
183411
  );
183365
183412
 
183366
- const editTool = connectToEditor((editorState) => {
183367
- return {
183368
- readOnly: editorState.readOnly
183369
- };
183370
- })(
183371
- ({
183372
- toolbarItemProps,
183373
- readOnly,
183374
- toggleReadOnlyMode,
183375
- disableSetReadOnly,
183376
- onChangeEditLock
183377
- }) => {
183378
- const [isLoading, setIsLoading] = useState(false);
183379
- const readOnlyTooltip = ({ readOnly: readOnly2, disableSetReadOnly: disableSetReadOnly2 }) => {
183380
- if (isLoading) {
183381
- return "Loading...";
183382
- } else if (disableSetReadOnly2) {
183383
- return "You do not have permission to edit locks on this sequence";
183384
- }
183385
- return readOnly2 ? "Click to enable editing" : "Click to disable editing";
183386
- };
183387
- return /* @__PURE__ */ React__default$1.createElement(
183388
- ToolbarItem$1,
183389
- {
183390
- ...{
183391
- disabled: isLoading || disableSetReadOnly,
183392
- Icon: /* @__PURE__ */ React__default$1.createElement(Icon, { icon: readOnly ? "lock" : "unlock" }),
183393
- onIconClick: async () => {
183394
- if (onChangeEditLock) {
183395
- setIsLoading(true);
183396
- await onChangeEditLock(!readOnly);
183397
- setIsLoading(false);
183398
- }
183399
- toggleReadOnlyMode();
183400
- },
183401
- tooltip: readOnlyTooltip({ readOnly, disableSetReadOnly }),
183402
- ...toolbarItemProps
183403
- }
183404
- }
183405
- );
183406
- }
183407
- );
183408
-
183409
183413
  const style$4 = '';
183410
183414
 
183411
183415
  const opts = [
@@ -184026,31 +184030,22 @@ const style$3 = '';
184026
184030
 
184027
184031
  const EditReadOnlyItem = connectToEditor(({ readOnly }) => ({
184028
184032
  readOnly
184029
- }))(
184030
- ({
184031
- onSave,
184032
- readOnly,
184033
- showReadOnly,
184034
- disableSetReadOnly,
184035
- updateReadOnlyMode
184036
- }) => {
184037
- return showReadOnly ? /* @__PURE__ */ React__default$1.createElement(StatusBarItem, { dataTest: "veStatusBar-readOnly" }, onSave ? /* @__PURE__ */ React__default$1.createElement(
184038
- HTMLSelect,
184039
- {
184040
- options: [
184041
- { label: "Read Only", value: "readOnly" },
184042
- { label: "Editable", value: "editable" }
184043
- ],
184044
- disabled: disableSetReadOnly || !onSave,
184045
- className: Classes.MINIMAL,
184046
- value: readOnly ? "readOnly" : "editable",
184047
- onChange: ({ target: { value } }) => {
184048
- updateReadOnlyMode(value === "readOnly");
184049
- }
184050
- }
184051
- ) : readOnly ? "Read Only" : "Editable") : null;
184052
- }
184053
- );
184033
+ }))((props) => {
184034
+ const { onSave, readOnly, showReadOnly, disableSetReadOnly } = props;
184035
+ return showReadOnly ? /* @__PURE__ */ React__default$1.createElement(StatusBarItem, { dataTest: "veStatusBar-readOnly" }, onSave ? /* @__PURE__ */ React__default$1.createElement(
184036
+ HTMLSelect,
184037
+ {
184038
+ options: [
184039
+ { label: "Read Only", value: "readOnly" },
184040
+ { label: "Editable", value: "editable" }
184041
+ ],
184042
+ disabled: disableSetReadOnly || !onSave,
184043
+ className: Classes.MINIMAL,
184044
+ value: readOnly ? "readOnly" : "editable",
184045
+ onChange: ({ target: { value } }) => handleReadOnlyChange(value === "readOnly", props)
184046
+ }
184047
+ ) : readOnly ? "Read Only" : "Editable") : null;
184048
+ });
184054
184049
  const ShowSelectionItem = compose(
184055
184050
  connectToEditor(
184056
184051
  ({ selectionLayer, caretPosition, sequenceData = { sequence: "" } }, ownProps, ...rest) => {
@@ -184197,11 +184192,13 @@ function StatusBar({
184197
184192
  showGCContentByDefault,
184198
184193
  onSelectionOrCaretChanged,
184199
184194
  GCDecimalDigits = 1,
184200
- isProtein
184195
+ isProtein,
184196
+ beforeReadOnlyChange
184201
184197
  }) {
184202
184198
  return /* @__PURE__ */ React__default$1.createElement("div", { className: "veStatusBar" }, showMoleculeType && /* @__PURE__ */ React__default$1.createElement(ShowTypeItem, { editorName }), /* @__PURE__ */ React__default$1.createElement(
184203
184199
  EditReadOnlyItem,
184204
184200
  {
184201
+ beforeReadOnlyChange,
184205
184202
  editorName,
184206
184203
  onSave,
184207
184204
  disableSetReadOnly,
@@ -184640,7 +184637,6 @@ class GeneralProperties extends React__default$1.Component {
184640
184637
  disableSetReadOnly,
184641
184638
  updateAvailability,
184642
184639
  sequenceData,
184643
- updateReadOnlyMode,
184644
184640
  onSave,
184645
184641
  showAvailability,
184646
184642
  sequenceNameUpdate
@@ -184695,10 +184691,9 @@ class GeneralProperties extends React__default$1.Component {
184695
184691
  ))), /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-column-left bp3-label" }, "Length"), " ", /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-column-right" }, " ", isProtein ? proteinSequence.length : sequence.length)), showReadOnly && /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-flex-row" }, /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-column-left bp3-label" }, "Is Editable"), " ", /* @__PURE__ */ React__default$1.createElement("div", { className: "ve-column-right" }, " ", /* @__PURE__ */ React__default$1.createElement(
184696
184692
  BPSelect,
184697
184693
  {
184694
+ className: "veReadOnlySelect",
184698
184695
  disabled: !onSave || disableSetReadOnly,
184699
- onChange: (val) => {
184700
- updateReadOnlyMode(val === "readOnly");
184701
- },
184696
+ onChange: (val) => handleReadOnlyChange(val === "readOnly", this.props),
184702
184697
  value: readOnly ? "readOnly" : "editable",
184703
184698
  options: [
184704
184699
  { label: "Read Only", value: "readOnly" },
@@ -194771,7 +194766,7 @@ class Editor extends React__default$1.Component {
194771
194766
  contentLeft: this.props.contentLeft,
194772
194767
  editorName,
194773
194768
  withDigestTool: true,
194774
- onChangeEditLock: this.props.onChangeEditLock,
194769
+ beforeReadOnlyChange: this.props.beforeReadOnlyChange,
194775
194770
  ...ToolBarProps
194776
194771
  }
194777
194772
  ),