@teselagen/ove 0.3.56 → 0.3.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.umd.js CHANGED
@@ -23362,6 +23362,21 @@ var __async = (__this, __arguments, generator) => {
23362
23362
  render: render$1
23363
23363
  });
23364
23364
  const tippy = "";
23365
+ let isDragging$1 = false;
23366
+ let canSetDragging = false;
23367
+ document.addEventListener("mousedown", () => {
23368
+ canSetDragging = true;
23369
+ isDragging$1 = false;
23370
+ });
23371
+ document.addEventListener("mousemove", () => {
23372
+ if (canSetDragging) {
23373
+ isDragging$1 = true;
23374
+ }
23375
+ });
23376
+ document.addEventListener("mouseup", () => {
23377
+ canSetDragging = false;
23378
+ isDragging$1 = false;
23379
+ });
23365
23380
  let tippys = [];
23366
23381
  let recentlyHidden = false;
23367
23382
  let clearMe;
@@ -23466,7 +23481,7 @@ var __async = (__this, __arguments, generator) => {
23466
23481
  dataAvoid,
23467
23482
  dataAvoidBackup
23468
23483
  };
23469
- if (dataTip && !document.body.classList.contains("drag-active")) {
23484
+ if (dataTip && !document.body.classList.contains("drag-active") && !isDragging$1) {
23470
23485
  inner2(dataTip, el2, opts2);
23471
23486
  break;
23472
23487
  } else if (isEllipsized && el2.offsetWidth < el2.scrollWidth - 4 && //the -4 is adding a teeny bit of tolerance to fix issues with the column headers getting tooltips even when fully visible
@@ -25891,7 +25906,7 @@ var __async = (__this, __arguments, generator) => {
25891
25906
  }, [onFileDialogCancel]);
25892
25907
  var rootRef = reactExports.useRef(null);
25893
25908
  var inputRef = reactExports.useRef(null);
25894
- var _useReducer = reactExports.useReducer(reducer$1, initialState), _useReducer2 = _slicedToArray$5(_useReducer, 2), state2 = _useReducer2[0], dispatch = _useReducer2[1];
25909
+ var _useReducer = reactExports.useReducer(reducer$2, initialState), _useReducer2 = _slicedToArray$5(_useReducer, 2), state2 = _useReducer2[0], dispatch = _useReducer2[1];
25895
25910
  var isFocused = state2.isFocused, isFileDialogActive = state2.isFileDialogActive, draggedFiles = state2.draggedFiles;
25896
25911
  var onWindowFocus = /* @__PURE__ */ __name(function onWindowFocus2() {
25897
25912
  if (isFileDialogActive) {
@@ -26198,7 +26213,7 @@ var __async = (__this, __arguments, generator) => {
26198
26213
  });
26199
26214
  }
26200
26215
  __name(useDropzone, "useDropzone");
26201
- function reducer$1(state2, action2) {
26216
+ function reducer$2(state2, action2) {
26202
26217
  switch (action2.type) {
26203
26218
  case "focus":
26204
26219
  return _objectSpread$2(_objectSpread$2({}, state2), {}, {
@@ -26233,7 +26248,7 @@ var __async = (__this, __arguments, generator) => {
26233
26248
  return state2;
26234
26249
  }
26235
26250
  }
26236
- __name(reducer$1, "reducer$1");
26251
+ __name(reducer$2, "reducer$2");
26237
26252
  function noop$6() {
26238
26253
  }
26239
26254
  __name(noop$6, "noop$6");
@@ -27119,10 +27134,10 @@ var __async = (__this, __arguments, generator) => {
27119
27134
  /* istanbul ignore next */
27120
27135
  Object.getOwnPropertyNames
27121
27136
  );
27122
- function toPrimitive$2(value) {
27137
+ function toPrimitive$3(value) {
27123
27138
  return value === null ? null : typeof value === "object" ? "" + value : value;
27124
27139
  }
27125
- __name(toPrimitive$2, "toPrimitive$2");
27140
+ __name(toPrimitive$3, "toPrimitive$3");
27126
27141
  function hasProp(target, prop2) {
27127
27142
  return objectPrototype$2.hasOwnProperty.call(target, prop2);
27128
27143
  }
@@ -28019,7 +28034,7 @@ var __async = (__this, __arguments, generator) => {
28019
28034
  return this.name_ + "[" + this.value_ + "]";
28020
28035
  }, "toString");
28021
28036
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
28022
- return toPrimitive$2(this.get());
28037
+ return toPrimitive$3(this.get());
28023
28038
  }, "valueOf");
28024
28039
  _proto[_Symbol$toPrimitive] = function() {
28025
28040
  return this.valueOf();
@@ -28204,7 +28219,7 @@ var __async = (__this, __arguments, generator) => {
28204
28219
  return this.name_ + "[" + this.derivation.toString() + "]";
28205
28220
  }, "toString");
28206
28221
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
28207
- return toPrimitive$2(this.get());
28222
+ return toPrimitive$3(this.get());
28208
28223
  }, "valueOf");
28209
28224
  _proto[_Symbol$toPrimitive$1] = function() {
28210
28225
  return this.valueOf();
@@ -32266,12 +32281,12 @@ var __async = (__this, __arguments, generator) => {
32266
32281
  return ExtendableBuiltin;
32267
32282
  }
32268
32283
  __name(_extendableBuiltin, "_extendableBuiltin");
32269
- (function(_extendableBuiltin2) {
32270
- _inherits$p(ExtendableError, _extendableBuiltin2);
32271
- function ExtendableError() {
32284
+ var ExtendableError = function(_extendableBuiltin2) {
32285
+ _inherits$p(ExtendableError2, _extendableBuiltin2);
32286
+ function ExtendableError2() {
32272
32287
  var message = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
32273
- _classCallCheck$p(this, ExtendableError);
32274
- var _this = _possibleConstructorReturn$p(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
32288
+ _classCallCheck$p(this, ExtendableError2);
32289
+ var _this = _possibleConstructorReturn$p(this, (ExtendableError2.__proto__ || Object.getPrototypeOf(ExtendableError2)).call(this, message));
32275
32290
  Object.defineProperty(_this, "message", {
32276
32291
  configurable: true,
32277
32292
  enumerable: false,
@@ -32296,10 +32311,22 @@ var __async = (__this, __arguments, generator) => {
32296
32311
  });
32297
32312
  return _this;
32298
32313
  }
32299
- __name(ExtendableError, "ExtendableError");
32300
- return ExtendableError;
32301
- })(_extendableBuiltin(Error));
32314
+ __name(ExtendableError2, "ExtendableError");
32315
+ return ExtendableError2;
32316
+ }(_extendableBuiltin(Error));
32302
32317
  var __FLAG__ = "@@redux-form/submission-error-flag";
32318
+ var SubmissionError = /* @__PURE__ */ function(_ExtendableError) {
32319
+ _inheritsLoose$2(SubmissionError2, _ExtendableError);
32320
+ function SubmissionError2(errors) {
32321
+ var _this;
32322
+ _this = _ExtendableError.call(this, "Submit Validation Failed") || this;
32323
+ _this.errors = errors;
32324
+ return _this;
32325
+ }
32326
+ __name(SubmissionError2, "SubmissionError");
32327
+ return SubmissionError2;
32328
+ }(ExtendableError);
32329
+ SubmissionError.__FLAG__ = __FLAG__;
32303
32330
  function isSubmissionError(error) {
32304
32331
  return (error && error.constructor && error.constructor.__FLAG__ === __FLAG__) === true;
32305
32332
  }
@@ -44862,20 +44889,11 @@ ${latestSubscriptionCallbackError.current.stack}
44862
44889
  return true;
44863
44890
  }
44864
44891
  }, "_fails");
44865
- var _descriptors;
44866
- var hasRequired_descriptors;
44867
- function require_descriptors() {
44868
- if (hasRequired_descriptors)
44869
- return _descriptors;
44870
- hasRequired_descriptors = 1;
44871
- _descriptors = !_fails(function() {
44872
- return Object.defineProperty({}, "a", { get: function() {
44873
- return 7;
44874
- } }).a != 7;
44875
- });
44876
- return _descriptors;
44877
- }
44878
- __name(require_descriptors, "require_descriptors");
44892
+ var _descriptors = !_fails(function() {
44893
+ return Object.defineProperty({}, "a", { get: function() {
44894
+ return 7;
44895
+ } }).a != 7;
44896
+ });
44879
44897
  var _domCreate;
44880
44898
  var hasRequired_domCreate;
44881
44899
  function require_domCreate() {
@@ -44891,7 +44909,7 @@ ${latestSubscriptionCallbackError.current.stack}
44891
44909
  return _domCreate;
44892
44910
  }
44893
44911
  __name(require_domCreate, "require_domCreate");
44894
- var _ie8DomDefine = !require_descriptors() && !_fails(function() {
44912
+ var _ie8DomDefine = !_descriptors && !_fails(function() {
44895
44913
  return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
44896
44914
  return 7;
44897
44915
  } }).a != 7;
@@ -44909,33 +44927,25 @@ ${latestSubscriptionCallbackError.current.stack}
44909
44927
  return val2;
44910
44928
  throw TypeError("Can't convert object to primitive value");
44911
44929
  }, "_toPrimitive$1");
44912
- var hasRequired_objectDp;
44913
- function require_objectDp() {
44914
- if (hasRequired_objectDp)
44915
- return _objectDp;
44916
- hasRequired_objectDp = 1;
44917
- var anObject2 = _anObject;
44918
- var IE8_DOM_DEFINE2 = _ie8DomDefine;
44919
- var toPrimitive2 = _toPrimitive$1;
44920
- var dP2 = Object.defineProperty;
44921
- _objectDp.f = require_descriptors() ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
44922
- anObject2(O2);
44923
- P2 = toPrimitive2(P2, true);
44924
- anObject2(Attributes);
44925
- if (IE8_DOM_DEFINE2)
44926
- try {
44927
- return dP2(O2, P2, Attributes);
44928
- } catch (e2) {
44929
- }
44930
- if ("get" in Attributes || "set" in Attributes)
44931
- throw TypeError("Accessors not supported!");
44932
- if ("value" in Attributes)
44933
- O2[P2] = Attributes.value;
44934
- return O2;
44935
- }, "defineProperty");
44936
- return _objectDp;
44937
- }
44938
- __name(require_objectDp, "require_objectDp");
44930
+ var anObject$5 = _anObject;
44931
+ var IE8_DOM_DEFINE$1 = _ie8DomDefine;
44932
+ var toPrimitive$2 = _toPrimitive$1;
44933
+ var dP$3 = Object.defineProperty;
44934
+ _objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
44935
+ anObject$5(O2);
44936
+ P2 = toPrimitive$2(P2, true);
44937
+ anObject$5(Attributes);
44938
+ if (IE8_DOM_DEFINE$1)
44939
+ try {
44940
+ return dP$3(O2, P2, Attributes);
44941
+ } catch (e2) {
44942
+ }
44943
+ if ("get" in Attributes || "set" in Attributes)
44944
+ throw TypeError("Accessors not supported!");
44945
+ if ("value" in Attributes)
44946
+ O2[P2] = Attributes.value;
44947
+ return O2;
44948
+ }, "defineProperty");
44939
44949
  var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
44940
44950
  return {
44941
44951
  enumerable: !(bitmap & 1),
@@ -44944,9 +44954,9 @@ ${latestSubscriptionCallbackError.current.stack}
44944
44954
  value
44945
44955
  };
44946
44956
  }, "_propertyDesc");
44947
- var dP$2 = require_objectDp();
44957
+ var dP$2 = _objectDp;
44948
44958
  var createDesc$3 = _propertyDesc;
44949
- var _hide = require_descriptors() ? function(object2, key2, value) {
44959
+ var _hide = _descriptors ? function(object2, key2, value) {
44950
44960
  return dP$2.f(object2, key2, createDesc$3(1, value));
44951
44961
  } : function(object2, key2, value) {
44952
44962
  object2[key2] = value;
@@ -45018,16 +45028,25 @@ ${latestSubscriptionCallbackError.current.stack}
45018
45028
  var _cof = /* @__PURE__ */ __name(function(it) {
45019
45029
  return toString$4.call(it).slice(8, -1);
45020
45030
  }, "_cof");
45021
- var cof$2 = _cof;
45022
- var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
45023
- return cof$2(it) == "String" ? it.split("") : Object(it);
45024
- };
45031
+ var _iobject;
45032
+ var hasRequired_iobject;
45033
+ function require_iobject() {
45034
+ if (hasRequired_iobject)
45035
+ return _iobject;
45036
+ hasRequired_iobject = 1;
45037
+ var cof2 = _cof;
45038
+ _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
45039
+ return cof2(it) == "String" ? it.split("") : Object(it);
45040
+ };
45041
+ return _iobject;
45042
+ }
45043
+ __name(require_iobject, "require_iobject");
45025
45044
  var _defined = /* @__PURE__ */ __name(function(it) {
45026
45045
  if (it == void 0)
45027
45046
  throw TypeError("Can't call method on " + it);
45028
45047
  return it;
45029
45048
  }, "_defined");
45030
- var IObject = _iobject;
45049
+ var IObject = require_iobject();
45031
45050
  var defined$2 = _defined;
45032
45051
  var _toIobject = /* @__PURE__ */ __name(function(it) {
45033
45052
  return IObject(defined$2(it));
@@ -45124,7 +45143,15 @@ ${latestSubscriptionCallbackError.current.stack}
45124
45143
  var _objectGops = {};
45125
45144
  _objectGops.f = Object.getOwnPropertySymbols;
45126
45145
  var _objectPie = {};
45127
- _objectPie.f = {}.propertyIsEnumerable;
45146
+ var hasRequired_objectPie;
45147
+ function require_objectPie() {
45148
+ if (hasRequired_objectPie)
45149
+ return _objectPie;
45150
+ hasRequired_objectPie = 1;
45151
+ _objectPie.f = {}.propertyIsEnumerable;
45152
+ return _objectPie;
45153
+ }
45154
+ __name(require_objectPie, "require_objectPie");
45128
45155
  var defined$1 = _defined;
45129
45156
  var _toObject = /* @__PURE__ */ __name(function(it) {
45130
45157
  return Object(defined$1(it));
@@ -45135,12 +45162,12 @@ ${latestSubscriptionCallbackError.current.stack}
45135
45162
  if (hasRequired_objectAssign)
45136
45163
  return _objectAssign;
45137
45164
  hasRequired_objectAssign = 1;
45138
- var DESCRIPTORS2 = require_descriptors();
45165
+ var DESCRIPTORS2 = _descriptors;
45139
45166
  var getKeys2 = _objectKeys;
45140
45167
  var gOPS2 = _objectGops;
45141
- var pIE2 = _objectPie;
45168
+ var pIE2 = require_objectPie();
45142
45169
  var toObject2 = _toObject;
45143
- var IObject2 = _iobject;
45170
+ var IObject2 = require_iobject();
45144
45171
  var $assign = Object.assign;
45145
45172
  _objectAssign = !$assign || _fails(function() {
45146
45173
  var A2 = {};
@@ -45201,10 +45228,10 @@ ${latestSubscriptionCallbackError.current.stack}
45201
45228
  }, "_iterStep");
45202
45229
  var _iterators = {};
45203
45230
  var _redefine = _hide;
45204
- var dP$1 = require_objectDp();
45231
+ var dP$1 = _objectDp;
45205
45232
  var anObject$4 = _anObject;
45206
45233
  var getKeys$1 = _objectKeys;
45207
- var _objectDps = require_descriptors() ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
45234
+ var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
45208
45235
  anObject$4(O2);
45209
45236
  var keys2 = getKeys$1(Properties2);
45210
45237
  var length = keys2.length;
@@ -45271,7 +45298,7 @@ ${latestSubscriptionCallbackError.current.stack}
45271
45298
  };
45272
45299
  $exports.store = store$2;
45273
45300
  var _wksExports = _wks.exports;
45274
- var def = require_objectDp().f;
45301
+ var def = _objectDp.f;
45275
45302
  var has$b = _has;
45276
45303
  var TAG$1 = _wksExports("toStringTag");
45277
45304
  var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
@@ -45544,7 +45571,7 @@ ${latestSubscriptionCallbackError.current.stack}
45544
45571
  var _isArrayIter = /* @__PURE__ */ __name(function(it) {
45545
45572
  return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
45546
45573
  }, "_isArrayIter");
45547
- var $defineProperty$1 = require_objectDp();
45574
+ var $defineProperty$1 = _objectDp;
45548
45575
  var createDesc$2 = _propertyDesc;
45549
45576
  var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
45550
45577
  if (index2 in object2)
@@ -45673,7 +45700,7 @@ ${latestSubscriptionCallbackError.current.stack}
45673
45700
  }
45674
45701
  }, "_default$8");
45675
45702
  var $export$3 = _export;
45676
- $export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty: require_objectDp().f });
45703
+ $export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
45677
45704
  var $Object$1 = _coreExports.Object;
45678
45705
  var defineProperty$6 = /* @__PURE__ */ __name(function defineProperty2(it, key2, desc) {
45679
45706
  return $Object$1.defineProperty(it, key2, desc);
@@ -45714,7 +45741,7 @@ ${latestSubscriptionCallbackError.current.stack}
45714
45741
  var META$1 = _uid("meta");
45715
45742
  var isObject$5 = _isObject;
45716
45743
  var has$9 = _has;
45717
- var setDesc = require_objectDp().f;
45744
+ var setDesc = _objectDp.f;
45718
45745
  var id$1 = 0;
45719
45746
  var isExtensible = Object.isExtensible || function() {
45720
45747
  return true;
@@ -45767,7 +45794,7 @@ ${latestSubscriptionCallbackError.current.stack}
45767
45794
  var _metaExports = _meta.exports;
45768
45795
  var core = _coreExports;
45769
45796
  var wksExt$1 = _wksExt;
45770
- var defineProperty$4 = require_objectDp().f;
45797
+ var defineProperty$4 = _objectDp.f;
45771
45798
  var _wksDefine = /* @__PURE__ */ __name(function(name2) {
45772
45799
  var $Symbol2 = core.Symbol || (core.Symbol = {});
45773
45800
  if (name2.charAt(0) != "_" && !(name2 in $Symbol2))
@@ -45775,7 +45802,7 @@ ${latestSubscriptionCallbackError.current.stack}
45775
45802
  }, "_wksDefine");
45776
45803
  var getKeys = _objectKeys;
45777
45804
  var gOPS$1 = _objectGops;
45778
- var pIE$1 = _objectPie;
45805
+ var pIE$1 = require_objectPie();
45779
45806
  var _enumKeys = /* @__PURE__ */ __name(function(it) {
45780
45807
  var result = getKeys(it);
45781
45808
  var getSymbols2 = gOPS$1.f;
@@ -45816,14 +45843,14 @@ ${latestSubscriptionCallbackError.current.stack}
45816
45843
  return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
45817
45844
  }, "getOwnPropertyNames");
45818
45845
  var _objectGopd = {};
45819
- var pIE = _objectPie;
45846
+ var pIE = require_objectPie();
45820
45847
  var createDesc$1 = _propertyDesc;
45821
45848
  var toIObject$1 = _toIobject;
45822
45849
  var toPrimitive$1 = _toPrimitive$1;
45823
45850
  var has$8 = _has;
45824
45851
  var IE8_DOM_DEFINE = _ie8DomDefine;
45825
45852
  var gOPD$2 = Object.getOwnPropertyDescriptor;
45826
- _objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
45853
+ _objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
45827
45854
  O2 = toIObject$1(O2);
45828
45855
  P2 = toPrimitive$1(P2, true);
45829
45856
  if (IE8_DOM_DEFINE)
@@ -45836,7 +45863,7 @@ ${latestSubscriptionCallbackError.current.stack}
45836
45863
  }, "getOwnPropertyDescriptor");
45837
45864
  var global$1 = _globalExports;
45838
45865
  var has$7 = _has;
45839
- var DESCRIPTORS = require_descriptors();
45866
+ var DESCRIPTORS = _descriptors;
45840
45867
  var $export$2 = _export;
45841
45868
  var redefine = _redefine;
45842
45869
  var META = _metaExports.KEY;
@@ -45859,7 +45886,7 @@ ${latestSubscriptionCallbackError.current.stack}
45859
45886
  var gOPNExt = _objectGopnExt;
45860
45887
  var $GOPD = _objectGopd;
45861
45888
  var $GOPS = _objectGops;
45862
- var $DP = require_objectDp();
45889
+ var $DP = _objectDp;
45863
45890
  var $keys$1 = _objectKeys;
45864
45891
  var gOPD$1 = $GOPD.f;
45865
45892
  var dP = $DP.f;
@@ -45996,7 +46023,7 @@ ${latestSubscriptionCallbackError.current.stack}
45996
46023
  $GOPD.f = $getOwnPropertyDescriptor;
45997
46024
  $DP.f = $defineProperty;
45998
46025
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
45999
- _objectPie.f = $propertyIsEnumerable;
46026
+ require_objectPie().f = $propertyIsEnumerable;
46000
46027
  $GOPS.f = $getOwnPropertySymbols;
46001
46028
  if (DESCRIPTORS && !_library) {
46002
46029
  redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
@@ -86128,6 +86155,16 @@ ${latestSubscriptionCallbackError.current.stack}
86128
86155
  lodashExports.set(entity, path2, nv);
86129
86156
  return { entity, error };
86130
86157
  }, "editCellHelper");
86158
+ const throwFormError = /* @__PURE__ */ __name((error) => {
86159
+ if (error.message) {
86160
+ console.error("error:", error);
86161
+ }
86162
+ const errorToUse = error.message ? { _error: error.message } : typeof error === "string" ? { _error: error } : error;
86163
+ if (!errorToUse._error) {
86164
+ errorToUse._error = "Error Submitting Form";
86165
+ }
86166
+ throw new SubmissionError(errorToUse);
86167
+ }, "throwFormError");
86131
86168
  T$1();
86132
86169
  const PRIMARY_SELECTED_VAL = "main_cell";
86133
86170
  dayjs.extend(localizedFormat);
@@ -86625,7 +86662,12 @@ ${latestSubscriptionCallbackError.current.stack}
86625
86662
  const { change: change2, schema: schema2 } = computePresets(this.props);
86626
86663
  change2(
86627
86664
  "reduxFormCellValidation",
86628
- validateTableWideErrors({ entities, schema: schema2, newCellValidate })
86665
+ validateTableWideErrors({
86666
+ entities,
86667
+ schema: schema2,
86668
+ newCellValidate,
86669
+ props: this.props
86670
+ })
86629
86671
  );
86630
86672
  }, "updateValidation"));
86631
86673
  __publicField(this, "handleDeleteCell", /* @__PURE__ */ __name(() => {
@@ -87987,10 +88029,38 @@ ${latestSubscriptionCallbackError.current.stack}
87987
88029
  indexToStartAt: entities2.length
87988
88030
  }
87989
88031
  );
87990
- entities2.splice(entities2.length, 0, ...newEnts);
88032
+ if (lodashExports.every(entities2, "_isClean")) {
88033
+ lodashExports.forEach(newEnts, (e2, i2) => {
88034
+ entities2[i2] = e2;
88035
+ });
88036
+ } else {
88037
+ entities2.splice(entities2.length, 0, ...newEnts);
88038
+ }
87991
88039
  this.updateValidation(entities2, __spreadValues(__spreadValues({}, reduxFormCellValidation), validationErrors));
87992
88040
  });
87993
88041
  }, "addEditableTableEntities"));
88042
+ __publicField(this, "getEditableTableInfoAndThrowFormError", /* @__PURE__ */ __name(() => {
88043
+ const { schema: schema2, reduxFormEntities, reduxFormCellValidation } = computePresets(this.props);
88044
+ const { entsToUse, validationToUse } = removeCleanRows(
88045
+ reduxFormEntities,
88046
+ reduxFormCellValidation
88047
+ );
88048
+ const validationWTableErrs = validateTableWideErrors({
88049
+ entities: entsToUse,
88050
+ schema: schema2,
88051
+ newCellValidate: validationToUse
88052
+ });
88053
+ if (!(entsToUse == null ? void 0 : entsToUse.length)) {
88054
+ throwFormError(
88055
+ "Please add at least one row to the table before submitting."
88056
+ );
88057
+ }
88058
+ const invalid = lodashExports.isEmpty(validationWTableErrs) || !lodashExports.some(validationWTableErrs, (v2) => v2) ? void 0 : validationWTableErrs;
88059
+ if (invalid) {
88060
+ throwFormError("Please fix the errors in the table before submitting.");
88061
+ }
88062
+ return entsToUse;
88063
+ }, "getEditableTableInfoAndThrowFormError"));
87994
88064
  __publicField(this, "insertRows", /* @__PURE__ */ __name(({ above, numRows = 1, appendToBottom } = {}) => {
87995
88065
  const { entities = [], reduxFormCellValidation } = computePresets(
87996
88066
  this.props
@@ -88385,6 +88455,7 @@ ${latestSubscriptionCallbackError.current.stack}
88385
88455
  }, "renderColumnHeader"));
88386
88456
  if (this.props.helperProp) {
88387
88457
  this.props.helperProp.addEditableTableEntities = this.addEditableTableEntities;
88458
+ this.props.helperProp.getEditableTableInfoAndThrowFormError = this.getEditableTableInfoAndThrowFormError;
88388
88459
  }
88389
88460
  this.hotkeyEnabler = withHotkeys(__spreadProps(__spreadValues({
88390
88461
  moveUpARow: {
@@ -89396,6 +89467,26 @@ ${latestSubscriptionCallbackError.current.stack}
89396
89467
  }
89397
89468
  return newVal2;
89398
89469
  }, "formatPasteData");
89470
+ function removeCleanRows(reduxFormEntities, reduxFormCellValidation) {
89471
+ const toFilterOut = {};
89472
+ const entsToUse = (reduxFormEntities || []).filter((e2) => {
89473
+ if (!(e2._isClean || isEntityClean(e2)))
89474
+ return true;
89475
+ else {
89476
+ toFilterOut[getIdOrCodeOrIndex(e2)] = true;
89477
+ return false;
89478
+ }
89479
+ });
89480
+ const validationToUse = {};
89481
+ lodashExports.forEach(reduxFormCellValidation, (v2, k2) => {
89482
+ const [rowId] = k2.split(":");
89483
+ if (!toFilterOut[rowId]) {
89484
+ validationToUse[k2] = v2;
89485
+ }
89486
+ });
89487
+ return { entsToUse, validationToUse };
89488
+ }
89489
+ __name(removeCleanRows, "removeCleanRows");
89399
89490
  const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component) => (props) => {
89400
89491
  const r2 = reactExports.useRef();
89401
89492
  const memoedHotkeys = reactExports.useMemo(
@@ -91911,26 +92002,6 @@ ${latestSubscriptionCallbackError.current.stack}
91911
92002
  });
91912
92003
  }
91913
92004
  __name(asyncValidateHelper, "asyncValidateHelper");
91914
- function removeCleanRows(reduxFormEntities, reduxFormCellValidation) {
91915
- const toFilterOut = {};
91916
- const entsToUse = (reduxFormEntities || []).filter((e2) => {
91917
- if (!(e2._isClean || isEntityClean(e2)))
91918
- return true;
91919
- else {
91920
- toFilterOut[getIdOrCodeOrIndex(e2)] = true;
91921
- return false;
91922
- }
91923
- });
91924
- const validationToUse = {};
91925
- lodashExports.forEach(reduxFormCellValidation, (v2, k2) => {
91926
- const [rowId] = k2.split(":");
91927
- if (!toFilterOut[rowId]) {
91928
- validationToUse[k2] = v2;
91929
- }
91930
- });
91931
- return { entsToUse, validationToUse };
91932
- }
91933
- __name(removeCleanRows, "removeCleanRows");
91934
92005
  function maybeStripIdFromEntities(ents, validateAgainstSchema) {
91935
92006
  var _a2;
91936
92007
  let toRet;
@@ -137046,7 +137117,7 @@ ${seq.sequence}
137046
137117
  activePanelId && dispatch(setPanelAsActive(activePanelId, meta2));
137047
137118
  };
137048
137119
  }, "collapseSplitScreen");
137049
- const panelsShown = createReducer(
137120
+ const reducer$1 = createReducer(
137050
137121
  {
137051
137122
  [addPanelIfItDoesntAlreadyExist]: (state2, panelToAdd) => {
137052
137123
  if (!state2.some((panelGroup) => {
@@ -137081,8 +137152,15 @@ ${seq.sequence}
137081
137152
  indexToClose = i2;
137082
137153
  });
137083
137154
  if (indexToClose > -1) {
137084
- return removeItem(group, indexToClose).map((tab2, i2) => {
137085
- if (i2 === 0)
137155
+ const newPanels = removeItem(group, indexToClose);
137156
+ let mostRecentIndex = 0;
137157
+ newPanels.forEach((p2) => {
137158
+ if (p2.lastActive > newPanels[mostRecentIndex].lastActive) {
137159
+ mostRecentIndex = newPanels.indexOf(p2);
137160
+ }
137161
+ });
137162
+ return newPanels.map((tab2, i2) => {
137163
+ if (i2 === mostRecentIndex)
137086
137164
  return __spreadProps(__spreadValues({}, tab2), { active: true });
137087
137165
  else {
137088
137166
  return tab2;
@@ -137179,6 +137257,17 @@ ${seq.sequence}
137179
137257
  ]
137180
137258
  ]
137181
137259
  );
137260
+ const panelsShown = /* @__PURE__ */ __name((state2, action2) => {
137261
+ const nextState = reducer$1(state2, action2);
137262
+ nextState.forEach((pg2) => {
137263
+ pg2.forEach((p2) => {
137264
+ if (p2.active) {
137265
+ p2.lastActive = Date.now().toString();
137266
+ }
137267
+ });
137268
+ });
137269
+ return nextState;
137270
+ }, "panelsShown");
137182
137271
  function flipActiveForGroup(group, setCircActive) {
137183
137272
  const activeTab = group.find(({ active: active2 }) => active2);
137184
137273
  if ((activeTab == null ? void 0 : activeTab.id) === (setCircActive ? "rail" : "circular")) {
@@ -151067,6 +151156,7 @@ ${seq.sequence}
151067
151156
  "rect",
151068
151157
  {
151069
151158
  className: "veAxisTick",
151159
+ "data-test": tickMarkPosition + 1,
151070
151160
  key: "axisTickMarkPath " + i2 + " " + tickMarkPosition,
151071
151161
  x: xCenter,
151072
151162
  width: 1,
@@ -155227,7 +155317,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155227
155317
  }
155228
155318
  __name(showFileDialog, "showFileDialog");
155229
155319
  const name = "@teselagen/ove";
155230
- const version = "0.3.55";
155320
+ const version = "0.3.56";
155231
155321
  const main = "./src/index.js";
155232
155322
  const exports$1 = {
155233
155323
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.56",
3
+ "version": "0.3.57",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -15,8 +15,8 @@
15
15
  "dependencies": {
16
16
  "@teselagen/sequence-utils": "0.3.13",
17
17
  "@teselagen/range-utils": "0.3.7",
18
- "@teselagen/ui": "0.3.44",
19
- "@teselagen/file-utils": "0.3.9",
18
+ "@teselagen/ui": "0.3.48",
19
+ "@teselagen/file-utils": "0.3.11",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
21
  "@teselagen/bio-parsers": "0.4.7",
22
22
  "@blueprintjs/core": "3.52.0",
@@ -88,6 +88,7 @@ const Axis = function (props) {
88
88
  tickMarkSVG.push(
89
89
  <rect
90
90
  className="veAxisTick"
91
+ data-test={tickMarkPosition + 1}
91
92
  key={"axisTickMarkPath " + i + " " + tickMarkPosition}
92
93
  x={xCenter}
93
94
  width={1}
@@ -104,7 +104,7 @@ export const collapseSplitScreen = (activePanelId, meta) => {
104
104
  // ------------------------------------
105
105
  // Reducer
106
106
  // ------------------------------------
107
- export default createReducer(
107
+ const reducer = createReducer(
108
108
  {
109
109
  [addPanelIfItDoesntAlreadyExist]: (state, panelToAdd) => {
110
110
  if (
@@ -140,8 +140,16 @@ export default createReducer(
140
140
  if (id === idToClose) indexToClose = i;
141
141
  });
142
142
  if (indexToClose > -1) {
143
- return removeItem(group, indexToClose).map((tab, i) => {
144
- if (i === 0) return { ...tab, active: true };
143
+ const newPanels = removeItem(group, indexToClose);
144
+ let mostRecentIndex = 0;
145
+ newPanels.forEach(p => {
146
+ if (p.lastActive > newPanels[mostRecentIndex].lastActive) {
147
+ mostRecentIndex = newPanels.indexOf(p);
148
+ }
149
+ });
150
+
151
+ return newPanels.map((tab, i) => {
152
+ if (i === mostRecentIndex) return { ...tab, active: true };
145
153
  else {
146
154
  return tab;
147
155
  }
@@ -258,6 +266,17 @@ export default createReducer(
258
266
  ]
259
267
  );
260
268
 
269
+ export default (state, action) => {
270
+ const nextState = reducer(state, action);
271
+ nextState.forEach(pg => {
272
+ pg.forEach(p => {
273
+ if (p.active) {
274
+ p.lastActive = Date.now().toString();
275
+ }
276
+ });
277
+ });
278
+ return nextState;
279
+ };
261
280
  function flipActiveForGroup(group, setCircActive) {
262
281
  const activeTab = group.find(({ active }) => active);
263
282
  if (activeTab?.id === (setCircActive ? "rail" : "circular")) {
package/style.css CHANGED
@@ -9546,9 +9546,9 @@ body:not(.drag-active)
9546
9546
  .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-button {
9547
9547
  margin: 0;
9548
9548
  }
9549
- .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-tag-input-values > * {
9549
+ /* .tg-dropdown-cell-edit-container .bp3-tag-input .bp3-tag-input-values > * {
9550
9550
  margin-bottom: 0;
9551
- }
9551
+ } */
9552
9552
  .tg-dropdown-cell-edit-container:not(.tg-dropdown-cell-edit-container-multi)
9553
9553
  .bp3-tag-input {
9554
9554
  min-height: 0;