@teselagen/ove 0.4.1 → 0.4.2

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
@@ -23485,7 +23485,7 @@ var __async = (__this, __arguments, generator) => {
23485
23485
  inner2(dataTip, el2, opts2);
23486
23486
  break;
23487
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
23488
- !el2.classList.contains("no-data-tip") && !document.body.classList.contains("drag-active") && el2.textContent && ((_b2 = (_a2 = el2.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b2.call(_a2).length) !== 0) {
23488
+ !el2.classList.contains("no-data-tip") && !parentIncludesNoChildDataTip(el2, 0) && !document.body.classList.contains("drag-active") && el2.textContent && ((_b2 = (_a2 = el2.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b2.call(_a2).length) !== 0) {
23489
23489
  inner2(el2.textContent, el2, opts2);
23490
23490
  break;
23491
23491
  } else if (isEllipsized && el2.offsetWidth >= el2.scrollWidth)
@@ -23498,6 +23498,28 @@ var __async = (__this, __arguments, generator) => {
23498
23498
  }
23499
23499
  });
23500
23500
  })();
23501
+ function parentIncludesNoChildDataTip(el2, count2) {
23502
+ if (count2 > 4)
23503
+ return false;
23504
+ if (!el2)
23505
+ return false;
23506
+ if (el2.getAttribute("data-no-child-data-tip"))
23507
+ return true;
23508
+ return parentIncludesNoChildDataTip(el2.parentElement, count2 + 1);
23509
+ }
23510
+ __name(parentIncludesNoChildDataTip, "parentIncludesNoChildDataTip");
23511
+ const LoadingDots = /* @__PURE__ */ __name(() => {
23512
+ const [dots, setDots] = reactExports.useState("");
23513
+ reactExports.useEffect(() => {
23514
+ const interval = setInterval(() => {
23515
+ setDots((dots2) => {
23516
+ return dots2.length === 3 ? "" : dots2 + ".";
23517
+ });
23518
+ }, 500);
23519
+ return () => clearInterval(interval);
23520
+ }, []);
23521
+ return /* @__PURE__ */ React$2.createElement("span", null, dots);
23522
+ }, "LoadingDots");
23501
23523
  const AssignDefaultsModeContext = React$2.createContext({
23502
23524
  inAssignDefaultsMode: false,
23503
23525
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -25818,10 +25840,10 @@ var __async = (__this, __arguments, generator) => {
25818
25840
  /* istanbul ignore next */
25819
25841
  Object.getOwnPropertyNames
25820
25842
  );
25821
- function toPrimitive$3(value) {
25843
+ function toPrimitive$2(value) {
25822
25844
  return value === null ? null : typeof value === "object" ? "" + value : value;
25823
25845
  }
25824
- __name(toPrimitive$3, "toPrimitive$3");
25846
+ __name(toPrimitive$2, "toPrimitive$2");
25825
25847
  function hasProp(target, prop2) {
25826
25848
  return objectPrototype$2.hasOwnProperty.call(target, prop2);
25827
25849
  }
@@ -26718,7 +26740,7 @@ var __async = (__this, __arguments, generator) => {
26718
26740
  return this.name_ + "[" + this.value_ + "]";
26719
26741
  }, "toString");
26720
26742
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
26721
- return toPrimitive$3(this.get());
26743
+ return toPrimitive$2(this.get());
26722
26744
  }, "valueOf");
26723
26745
  _proto[_Symbol$toPrimitive] = function() {
26724
26746
  return this.valueOf();
@@ -26903,7 +26925,7 @@ var __async = (__this, __arguments, generator) => {
26903
26925
  return this.name_ + "[" + this.derivation.toString() + "]";
26904
26926
  }, "toString");
26905
26927
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
26906
- return toPrimitive$3(this.get());
26928
+ return toPrimitive$2(this.get());
26907
26929
  }, "valueOf");
26908
26930
  _proto[_Symbol$toPrimitive$1] = function() {
26909
26931
  return this.valueOf();
@@ -43573,11 +43595,20 @@ ${latestSubscriptionCallbackError.current.stack}
43573
43595
  return true;
43574
43596
  }
43575
43597
  }, "_fails");
43576
- var _descriptors = !_fails(function() {
43577
- return Object.defineProperty({}, "a", { get: function() {
43578
- return 7;
43579
- } }).a != 7;
43580
- });
43598
+ var _descriptors;
43599
+ var hasRequired_descriptors;
43600
+ function require_descriptors() {
43601
+ if (hasRequired_descriptors)
43602
+ return _descriptors;
43603
+ hasRequired_descriptors = 1;
43604
+ _descriptors = !_fails(function() {
43605
+ return Object.defineProperty({}, "a", { get: function() {
43606
+ return 7;
43607
+ } }).a != 7;
43608
+ });
43609
+ return _descriptors;
43610
+ }
43611
+ __name(require_descriptors, "require_descriptors");
43581
43612
  var _domCreate;
43582
43613
  var hasRequired_domCreate;
43583
43614
  function require_domCreate() {
@@ -43593,11 +43624,20 @@ ${latestSubscriptionCallbackError.current.stack}
43593
43624
  return _domCreate;
43594
43625
  }
43595
43626
  __name(require_domCreate, "require_domCreate");
43596
- var _ie8DomDefine = !_descriptors && !_fails(function() {
43597
- return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
43598
- return 7;
43599
- } }).a != 7;
43600
- });
43627
+ var _ie8DomDefine;
43628
+ var hasRequired_ie8DomDefine;
43629
+ function require_ie8DomDefine() {
43630
+ if (hasRequired_ie8DomDefine)
43631
+ return _ie8DomDefine;
43632
+ hasRequired_ie8DomDefine = 1;
43633
+ _ie8DomDefine = !require_descriptors() && !_fails(function() {
43634
+ return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
43635
+ return 7;
43636
+ } }).a != 7;
43637
+ });
43638
+ return _ie8DomDefine;
43639
+ }
43640
+ __name(require_ie8DomDefine, "require_ie8DomDefine");
43601
43641
  var isObject$6 = _isObject;
43602
43642
  var _toPrimitive$1 = /* @__PURE__ */ __name(function(it, S2) {
43603
43643
  if (!isObject$6(it))
@@ -43611,25 +43651,33 @@ ${latestSubscriptionCallbackError.current.stack}
43611
43651
  return val2;
43612
43652
  throw TypeError("Can't convert object to primitive value");
43613
43653
  }, "_toPrimitive$1");
43614
- var anObject$5 = _anObject;
43615
- var IE8_DOM_DEFINE$1 = _ie8DomDefine;
43616
- var toPrimitive$2 = _toPrimitive$1;
43617
- var dP$3 = Object.defineProperty;
43618
- _objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
43619
- anObject$5(O2);
43620
- P2 = toPrimitive$2(P2, true);
43621
- anObject$5(Attributes);
43622
- if (IE8_DOM_DEFINE$1)
43623
- try {
43624
- return dP$3(O2, P2, Attributes);
43625
- } catch (e2) {
43626
- }
43627
- if ("get" in Attributes || "set" in Attributes)
43628
- throw TypeError("Accessors not supported!");
43629
- if ("value" in Attributes)
43630
- O2[P2] = Attributes.value;
43631
- return O2;
43632
- }, "defineProperty");
43654
+ var hasRequired_objectDp;
43655
+ function require_objectDp() {
43656
+ if (hasRequired_objectDp)
43657
+ return _objectDp;
43658
+ hasRequired_objectDp = 1;
43659
+ var anObject2 = _anObject;
43660
+ var IE8_DOM_DEFINE2 = require_ie8DomDefine();
43661
+ var toPrimitive2 = _toPrimitive$1;
43662
+ var dP2 = Object.defineProperty;
43663
+ _objectDp.f = require_descriptors() ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
43664
+ anObject2(O2);
43665
+ P2 = toPrimitive2(P2, true);
43666
+ anObject2(Attributes);
43667
+ if (IE8_DOM_DEFINE2)
43668
+ try {
43669
+ return dP2(O2, P2, Attributes);
43670
+ } catch (e2) {
43671
+ }
43672
+ if ("get" in Attributes || "set" in Attributes)
43673
+ throw TypeError("Accessors not supported!");
43674
+ if ("value" in Attributes)
43675
+ O2[P2] = Attributes.value;
43676
+ return O2;
43677
+ }, "defineProperty");
43678
+ return _objectDp;
43679
+ }
43680
+ __name(require_objectDp, "require_objectDp");
43633
43681
  var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
43634
43682
  return {
43635
43683
  enumerable: !(bitmap & 1),
@@ -43638,9 +43686,9 @@ ${latestSubscriptionCallbackError.current.stack}
43638
43686
  value
43639
43687
  };
43640
43688
  }, "_propertyDesc");
43641
- var dP$2 = _objectDp;
43689
+ var dP$2 = require_objectDp();
43642
43690
  var createDesc$3 = _propertyDesc;
43643
- var _hide = _descriptors ? function(object2, key2, value) {
43691
+ var _hide = require_descriptors() ? function(object2, key2, value) {
43644
43692
  return dP$2.f(object2, key2, createDesc$3(1, value));
43645
43693
  } : function(object2, key2, value) {
43646
43694
  object2[key2] = value;
@@ -43712,16 +43760,25 @@ ${latestSubscriptionCallbackError.current.stack}
43712
43760
  var _cof = /* @__PURE__ */ __name(function(it) {
43713
43761
  return toString$4.call(it).slice(8, -1);
43714
43762
  }, "_cof");
43715
- var cof$2 = _cof;
43716
- var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
43717
- return cof$2(it) == "String" ? it.split("") : Object(it);
43718
- };
43763
+ var _iobject;
43764
+ var hasRequired_iobject;
43765
+ function require_iobject() {
43766
+ if (hasRequired_iobject)
43767
+ return _iobject;
43768
+ hasRequired_iobject = 1;
43769
+ var cof2 = _cof;
43770
+ _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
43771
+ return cof2(it) == "String" ? it.split("") : Object(it);
43772
+ };
43773
+ return _iobject;
43774
+ }
43775
+ __name(require_iobject, "require_iobject");
43719
43776
  var _defined = /* @__PURE__ */ __name(function(it) {
43720
43777
  if (it == void 0)
43721
43778
  throw TypeError("Can't call method on " + it);
43722
43779
  return it;
43723
43780
  }, "_defined");
43724
- var IObject = _iobject;
43781
+ var IObject = require_iobject();
43725
43782
  var defined$2 = _defined;
43726
43783
  var _toIobject = /* @__PURE__ */ __name(function(it) {
43727
43784
  return IObject(defined$2(it));
@@ -43810,10 +43867,10 @@ ${latestSubscriptionCallbackError.current.stack}
43810
43867
  return result;
43811
43868
  }, "_objectKeysInternal");
43812
43869
  var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
43813
- var $keys$3 = _objectKeysInternal;
43870
+ var $keys$2 = _objectKeysInternal;
43814
43871
  var enumBugKeys$1 = _enumBugKeys;
43815
43872
  var _objectKeys = Object.keys || /* @__PURE__ */ __name(function keys2(O2) {
43816
- return $keys$3(O2, enumBugKeys$1);
43873
+ return $keys$2(O2, enumBugKeys$1);
43817
43874
  }, "keys");
43818
43875
  var _objectGops = {};
43819
43876
  _objectGops.f = Object.getOwnPropertySymbols;
@@ -43837,12 +43894,12 @@ ${latestSubscriptionCallbackError.current.stack}
43837
43894
  if (hasRequired_objectAssign)
43838
43895
  return _objectAssign;
43839
43896
  hasRequired_objectAssign = 1;
43840
- var DESCRIPTORS2 = _descriptors;
43897
+ var DESCRIPTORS2 = require_descriptors();
43841
43898
  var getKeys2 = _objectKeys;
43842
43899
  var gOPS2 = _objectGops;
43843
43900
  var pIE2 = require_objectPie();
43844
43901
  var toObject2 = _toObject;
43845
- var IObject2 = _iobject;
43902
+ var IObject2 = require_iobject();
43846
43903
  var $assign = Object.assign;
43847
43904
  _objectAssign = !$assign || _fails(function() {
43848
43905
  var A2 = {};
@@ -43903,10 +43960,10 @@ ${latestSubscriptionCallbackError.current.stack}
43903
43960
  }, "_iterStep");
43904
43961
  var _iterators = {};
43905
43962
  var _redefine = _hide;
43906
- var dP$1 = _objectDp;
43963
+ var dP$1 = require_objectDp();
43907
43964
  var anObject$4 = _anObject;
43908
43965
  var getKeys$1 = _objectKeys;
43909
- var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
43966
+ var _objectDps = require_descriptors() ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
43910
43967
  anObject$4(O2);
43911
43968
  var keys2 = getKeys$1(Properties2);
43912
43969
  var length = keys2.length;
@@ -43973,7 +44030,7 @@ ${latestSubscriptionCallbackError.current.stack}
43973
44030
  };
43974
44031
  $exports.store = store$2;
43975
44032
  var _wksExports = _wks.exports;
43976
- var def = _objectDp.f;
44033
+ var def = require_objectDp().f;
43977
44034
  var has$b = _has;
43978
44035
  var TAG$1 = _wksExports("toStringTag");
43979
44036
  var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
@@ -44246,7 +44303,7 @@ ${latestSubscriptionCallbackError.current.stack}
44246
44303
  var _isArrayIter = /* @__PURE__ */ __name(function(it) {
44247
44304
  return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
44248
44305
  }, "_isArrayIter");
44249
- var $defineProperty$1 = _objectDp;
44306
+ var $defineProperty$1 = require_objectDp();
44250
44307
  var createDesc$2 = _propertyDesc;
44251
44308
  var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
44252
44309
  if (index2 in object2)
@@ -44375,7 +44432,7 @@ ${latestSubscriptionCallbackError.current.stack}
44375
44432
  }
44376
44433
  }, "_default$8");
44377
44434
  var $export$3 = _export;
44378
- $export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
44435
+ $export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty: require_objectDp().f });
44379
44436
  var $Object$1 = _coreExports.Object;
44380
44437
  var defineProperty$6 = /* @__PURE__ */ __name(function defineProperty2(it, key2, desc) {
44381
44438
  return $Object$1.defineProperty(it, key2, desc);
@@ -44416,7 +44473,7 @@ ${latestSubscriptionCallbackError.current.stack}
44416
44473
  var META$1 = _uid("meta");
44417
44474
  var isObject$5 = _isObject;
44418
44475
  var has$9 = _has;
44419
- var setDesc = _objectDp.f;
44476
+ var setDesc = require_objectDp().f;
44420
44477
  var id$1 = 0;
44421
44478
  var isExtensible = Object.isExtensible || function() {
44422
44479
  return true;
@@ -44469,7 +44526,7 @@ ${latestSubscriptionCallbackError.current.stack}
44469
44526
  var _metaExports = _meta.exports;
44470
44527
  var core = _coreExports;
44471
44528
  var wksExt$1 = _wksExt;
44472
- var defineProperty$4 = _objectDp.f;
44529
+ var defineProperty$4 = require_objectDp().f;
44473
44530
  var _wksDefine = /* @__PURE__ */ __name(function(name2) {
44474
44531
  var $Symbol2 = core.Symbol || (core.Symbol = {});
44475
44532
  if (name2.charAt(0) != "_" && !(name2 in $Symbol2))
@@ -44498,13 +44555,21 @@ ${latestSubscriptionCallbackError.current.stack}
44498
44555
  }, "isArray");
44499
44556
  var _objectGopnExt = {};
44500
44557
  var _objectGopn = {};
44501
- var $keys$2 = _objectKeysInternal;
44502
- var hiddenKeys = _enumBugKeys.concat("length", "prototype");
44503
- _objectGopn.f = Object.getOwnPropertyNames || /* @__PURE__ */ __name(function getOwnPropertyNames2(O2) {
44504
- return $keys$2(O2, hiddenKeys);
44505
- }, "getOwnPropertyNames");
44558
+ var hasRequired_objectGopn;
44559
+ function require_objectGopn() {
44560
+ if (hasRequired_objectGopn)
44561
+ return _objectGopn;
44562
+ hasRequired_objectGopn = 1;
44563
+ var $keys2 = _objectKeysInternal;
44564
+ var hiddenKeys = _enumBugKeys.concat("length", "prototype");
44565
+ _objectGopn.f = Object.getOwnPropertyNames || /* @__PURE__ */ __name(function getOwnPropertyNames2(O2) {
44566
+ return $keys2(O2, hiddenKeys);
44567
+ }, "getOwnPropertyNames");
44568
+ return _objectGopn;
44569
+ }
44570
+ __name(require_objectGopn, "require_objectGopn");
44506
44571
  var toIObject$2 = _toIobject;
44507
- var gOPN$1 = _objectGopn.f;
44572
+ var gOPN$1 = require_objectGopn().f;
44508
44573
  var toString$3 = {}.toString;
44509
44574
  var windowNames = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
44510
44575
  var getWindowNames = /* @__PURE__ */ __name(function(it) {
@@ -44523,9 +44588,9 @@ ${latestSubscriptionCallbackError.current.stack}
44523
44588
  var toIObject$1 = _toIobject;
44524
44589
  var toPrimitive$1 = _toPrimitive$1;
44525
44590
  var has$8 = _has;
44526
- var IE8_DOM_DEFINE = _ie8DomDefine;
44591
+ var IE8_DOM_DEFINE = require_ie8DomDefine();
44527
44592
  var gOPD$2 = Object.getOwnPropertyDescriptor;
44528
- _objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
44593
+ _objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
44529
44594
  O2 = toIObject$1(O2);
44530
44595
  P2 = toPrimitive$1(P2, true);
44531
44596
  if (IE8_DOM_DEFINE)
@@ -44538,7 +44603,7 @@ ${latestSubscriptionCallbackError.current.stack}
44538
44603
  }, "getOwnPropertyDescriptor");
44539
44604
  var global$1 = _globalExports;
44540
44605
  var has$7 = _has;
44541
- var DESCRIPTORS = _descriptors;
44606
+ var DESCRIPTORS = require_descriptors();
44542
44607
  var $export$2 = _export;
44543
44608
  var redefine = _redefine;
44544
44609
  var META = _metaExports.KEY;
@@ -44561,7 +44626,7 @@ ${latestSubscriptionCallbackError.current.stack}
44561
44626
  var gOPNExt = _objectGopnExt;
44562
44627
  var $GOPD = _objectGopd;
44563
44628
  var $GOPS = _objectGops;
44564
- var $DP = _objectDp;
44629
+ var $DP = require_objectDp();
44565
44630
  var $keys$1 = _objectKeys;
44566
44631
  var gOPD$1 = $GOPD.f;
44567
44632
  var dP = $DP.f;
@@ -44697,7 +44762,7 @@ ${latestSubscriptionCallbackError.current.stack}
44697
44762
  }, "toString"));
44698
44763
  $GOPD.f = $getOwnPropertyDescriptor;
44699
44764
  $DP.f = $defineProperty;
44700
- _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
44765
+ require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
44701
44766
  require_objectPie().f = $propertyIsEnumerable;
44702
44767
  $GOPS.f = $getOwnPropertySymbols;
44703
44768
  if (DESCRIPTORS && !_library) {
@@ -64987,27 +65052,51 @@ ${latestSubscriptionCallbackError.current.stack}
64987
65052
  value: void 0
64988
65053
  });
64989
65054
  let TgSelect = _TgSelect;
64990
- const TgSelect$1 = withProps((props) => {
64991
- const { multi, value, options } = props;
64992
- let optionsToRet = options;
64993
- if (multi && value) {
64994
- const valArray = getValueArray(value);
64995
- optionsToRet = options.filter((op) => {
64996
- const isOptionSelected = valArray.some((val2) => {
64997
- if (!val2)
64998
- return false;
64999
- const matching = lodashExports.isEqual(val2.value, op.value);
65000
- return matching;
65055
+ const withAsyncOptions = /* @__PURE__ */ __name((Component) => (props) => {
65056
+ const _a2 = props, { loadOptions, options } = _a2, rest = __objRest(_a2, ["loadOptions", "options"]);
65057
+ const [asyncOptions, setAsyncOptions] = reactExports.useState([]);
65058
+ const [isLoading, setLoading] = reactExports.useState(false);
65059
+ reactExports.useEffect(() => {
65060
+ if (loadOptions) {
65061
+ setLoading(true);
65062
+ loadOptions().then((options2) => {
65063
+ setAsyncOptions(options2);
65064
+ setLoading(false);
65001
65065
  });
65002
- return !isOptionSelected;
65003
- });
65004
- }
65005
- return {
65006
- // unfilteredOptions is needed for finding selected items
65007
- unfilteredOptions: options,
65008
- options: optionsToRet
65009
- };
65010
- })(TgSelect);
65066
+ }
65067
+ }, [loadOptions]);
65068
+ return /* @__PURE__ */ React$2.createElement(
65069
+ Component,
65070
+ __spreadProps(__spreadValues({}, rest), {
65071
+ isLoading: isLoading || rest.isLoading,
65072
+ options: loadOptions ? asyncOptions : options
65073
+ })
65074
+ );
65075
+ }, "withAsyncOptions");
65076
+ const TgSelect$1 = compose$1(
65077
+ withAsyncOptions,
65078
+ withProps((props) => {
65079
+ const { multi, value, options = [] } = props;
65080
+ let optionsToRet = options;
65081
+ if (multi && value) {
65082
+ const valArray = getValueArray(value);
65083
+ optionsToRet = options.filter((op) => {
65084
+ const isOptionSelected = valArray.some((val2) => {
65085
+ if (!val2)
65086
+ return false;
65087
+ const matching = lodashExports.isEqual(val2.value, op.value);
65088
+ return matching;
65089
+ });
65090
+ return !isOptionSelected;
65091
+ });
65092
+ }
65093
+ return {
65094
+ // unfilteredOptions is needed for finding selected items
65095
+ unfilteredOptions: options,
65096
+ options: optionsToRet
65097
+ };
65098
+ })
65099
+ )(TgSelect);
65011
65100
  const itemDisabled = /* @__PURE__ */ __name((i2) => i2.disabled, "itemDisabled");
65012
65101
  const noResultsDefault = /* @__PURE__ */ React$2.createElement("div", null, "No Results...");
65013
65102
  const renderCreateNewOption$1 = /* @__PURE__ */ __name((query, active2, handleClick) => /* @__PURE__ */ React$2.createElement(
@@ -72440,19 +72529,59 @@ ${latestSubscriptionCallbackError.current.stack}
72440
72529
  if (intent === Intent.DANGER) {
72441
72530
  console.error("Toastr error message: ", message);
72442
72531
  }
72532
+ const maybeAddClearAll = /* @__PURE__ */ __name(() => {
72533
+ const existingClearAllButtons = document.querySelectorAll(`.tg-clear-all-toasts`);
72534
+ existingClearAllButtons.forEach((button) => {
72535
+ button.remove();
72536
+ });
72537
+ const activeToasts = document.querySelectorAll(
72538
+ `.bp3-toast:not(.bp3-toast-exit)`
72539
+ );
72540
+ if (activeToasts.length > 1) {
72541
+ const topToaster = document.querySelector(`.bp3-toast`);
72542
+ if (!topToaster)
72543
+ return;
72544
+ const closeButton = document.createElement("div");
72545
+ closeButton.classList.add(
72546
+ BUTTON,
72547
+ LARGE,
72548
+ INTENT_PRIMARY,
72549
+ "tg-clear-all-toasts"
72550
+ );
72551
+ closeButton.innerText = "Clear all";
72552
+ closeButton.onclick = window.__tgClearAllToasts;
72553
+ closeButton.style.position = "absolute";
72554
+ closeButton.style.right = "-100px";
72555
+ topToaster.appendChild(closeButton);
72556
+ }
72557
+ }, "maybeAddClearAll");
72443
72558
  const uniqKey = toastToUse.show(
72444
72559
  {
72445
72560
  intent,
72446
72561
  message,
72447
- timeout: options.timeout || updatedTimeout || intent === Intent.DANGER ? 6e4 : void 0,
72562
+ onDismiss: () => {
72563
+ if (options.onDismiss) {
72564
+ options.onDismiss();
72565
+ }
72566
+ setTimeout(() => {
72567
+ maybeAddClearAll();
72568
+ }, 0);
72569
+ },
72570
+ timeout: options.timeout || updatedTimeout || (!window.Cypress && intent === Intent.DANGER ? 6e4 : void 0),
72448
72571
  action: options.action,
72449
72572
  icon: options.icon,
72450
72573
  className: classNames$1("preserve-newline", options.className)
72451
72574
  },
72452
72575
  options.key
72453
72576
  );
72577
+ setTimeout(() => {
72578
+ maybeAddClearAll();
72579
+ }, 0);
72454
72580
  function clear() {
72455
72581
  toastToUse.dismiss(uniqKey);
72582
+ setTimeout(() => {
72583
+ maybeAddClearAll();
72584
+ }, 0);
72456
72585
  }
72457
72586
  __name(clear, "clear");
72458
72587
  clear.key = uniqKey;
@@ -72622,6 +72751,7 @@ ${latestSubscriptionCallbackError.current.stack}
72622
72751
  intent: Intent.SUCCESS,
72623
72752
  text: "Filter",
72624
72753
  secondaryText: "Clear",
72754
+ secondaryIntent: Intent.DANGER,
72625
72755
  secondaryAction: () => {
72626
72756
  currentFilter && removeSingleFilter(currentFilter.filterOn);
72627
72757
  }
@@ -85333,17 +85463,20 @@ ${latestSubscriptionCallbackError.current.stack}
85333
85463
  });
85334
85464
  }
85335
85465
  }, "handleSelectAllRows"));
85466
+ __publicField(this, "updateValidationHelper", /* @__PURE__ */ __name(() => {
85467
+ const { entities, reduxFormCellValidation } = computePresets(this.props);
85468
+ this.updateValidation(entities, reduxFormCellValidation);
85469
+ }, "updateValidationHelper"));
85336
85470
  __publicField(this, "updateValidation", /* @__PURE__ */ __name((entities, newCellValidate) => {
85337
85471
  const { change: change2, schema: schema2 } = computePresets(this.props);
85338
- change2(
85339
- "reduxFormCellValidation",
85340
- validateTableWideErrors({
85341
- entities,
85342
- schema: schema2,
85343
- newCellValidate,
85344
- props: this.props
85345
- })
85346
- );
85472
+ const tableWideErr = validateTableWideErrors({
85473
+ entities,
85474
+ schema: schema2,
85475
+ newCellValidate,
85476
+ props: this.props
85477
+ });
85478
+ change2("reduxFormCellValidation", tableWideErr);
85479
+ this.forceUpdate();
85347
85480
  }, "updateValidation"));
85348
85481
  __publicField(this, "handleDeleteCell", /* @__PURE__ */ __name(() => {
85349
85482
  const {
@@ -85409,7 +85542,7 @@ ${latestSubscriptionCallbackError.current.stack}
85409
85542
  onFinishMsg: "Column Copied"
85410
85543
  });
85411
85544
  }, "handleCopyColumn"));
85412
- __publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
85545
+ __publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg, isDownload } = {}) => {
85413
85546
  let textToCopy = [];
85414
85547
  const jsonToCopy = [];
85415
85548
  lodashExports.forEach(rowElsToCopy, (rowEl) => {
@@ -85420,7 +85553,15 @@ ${latestSubscriptionCallbackError.current.stack}
85420
85553
  textToCopy = textToCopy.filter((text2) => text2).join("\n");
85421
85554
  if (!textToCopy)
85422
85555
  return window.toastr.warning("No text to copy");
85423
- this.handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
85556
+ if (isDownload) {
85557
+ downloadjs(textToCopy.replaceAll(" ", ","), "tableData.csv", "text/csv");
85558
+ } else {
85559
+ this.handleCopyHelper(
85560
+ textToCopy,
85561
+ jsonToCopy,
85562
+ onFinishMsg || "Row Copied"
85563
+ );
85564
+ }
85424
85565
  }, "handleCopyRows"));
85425
85566
  __publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn2) => {
85426
85567
  const { change: change2, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
@@ -85473,14 +85614,14 @@ ${latestSubscriptionCallbackError.current.stack}
85473
85614
  window.toastr.success(message);
85474
85615
  }
85475
85616
  }, "handleCopyHelper"));
85476
- __publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
85617
+ __publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2, opts2) => {
85477
85618
  try {
85478
85619
  const allRowEls = getAllRows(e2);
85479
85620
  if (!allRowEls)
85480
85621
  return;
85481
- this.handleCopyRows(allRowEls, {
85622
+ this.handleCopyRows(allRowEls, __spreadProps(__spreadValues({}, opts2), {
85482
85623
  onFinishMsg: "Table Copied"
85483
- });
85624
+ }));
85484
85625
  } catch (error) {
85485
85626
  console.error(`error:`, error);
85486
85627
  window.toastr.error("Error copying rows.");
@@ -85728,7 +85869,8 @@ ${latestSubscriptionCallbackError.current.stack}
85728
85869
  getRowClassName && getRowClassName(rowInfo, state2, this.props),
85729
85870
  {
85730
85871
  disabled: rowDisabled,
85731
- selected: rowSelected && !withCheckboxes
85872
+ selected: rowSelected && !withCheckboxes,
85873
+ "rt-tr-last-row": rowInfo.index === entities.length - 1
85732
85874
  }
85733
85875
  ),
85734
85876
  "data-test-id": dataId === void 0 ? rowInfo.index : dataId,
@@ -85825,7 +85967,8 @@ ${latestSubscriptionCallbackError.current.stack}
85825
85967
  this.startCellEdit(cellId);
85826
85968
  }
85827
85969
  }, err2 && {
85828
- "data-tip": (err2 == null ? void 0 : err2.message) || err2
85970
+ "data-tip": (err2 == null ? void 0 : err2.message) || err2,
85971
+ "data-no-child-data-tip": true
85829
85972
  }), {
85830
85973
  onContextMenu: (e2) => {
85831
85974
  if (!isPrimarySelected) {
@@ -87131,6 +87274,7 @@ ${latestSubscriptionCallbackError.current.stack}
87131
87274
  );
87132
87275
  }, "renderColumnHeader"));
87133
87276
  if (this.props.helperProp) {
87277
+ this.props.helperProp.updateValidationHelper = this.updateValidationHelper;
87134
87278
  this.props.helperProp.addEditableTableEntities = this.addEditableTableEntities;
87135
87279
  this.props.helperProp.getEditableTableInfoAndThrowFormError = this.getEditableTableInfoAndThrowFormError;
87136
87280
  }
@@ -87730,27 +87874,6 @@ ${latestSubscriptionCallbackError.current.stack}
87730
87874
  if (n2)
87731
87875
  this.table = n2;
87732
87876
  },
87733
- additionalBodyEl: isCellEditable && !onlyShowRowsWErrors && /* @__PURE__ */ React$2.createElement(
87734
- "div",
87735
- {
87736
- style: {
87737
- width: "100%",
87738
- display: "flex",
87739
- justifyContent: "center"
87740
- }
87741
- },
87742
- /* @__PURE__ */ React$2.createElement(
87743
- Button,
87744
- {
87745
- icon: "add",
87746
- onClick: () => {
87747
- this.insertRows({ numRows: 10, appendToBottom: true });
87748
- },
87749
- minimal: true
87750
- },
87751
- "Add 10 Rows"
87752
- )
87753
- ),
87754
87877
  className: classNames$1({
87755
87878
  isCellEditable,
87756
87879
  "tg-table-loading": isLoading,
@@ -87792,6 +87915,37 @@ ${latestSubscriptionCallbackError.current.stack}
87792
87915
  SubComponent: SubComponentToUse
87793
87916
  }, ReactTableProps)
87794
87917
  ),
87918
+ isCellEditable && /* @__PURE__ */ React$2.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React$2.createElement(
87919
+ "div",
87920
+ {
87921
+ style: {
87922
+ width: "100%",
87923
+ display: "flex",
87924
+ justifyContent: "center"
87925
+ }
87926
+ },
87927
+ !onlyShowRowsWErrors && /* @__PURE__ */ React$2.createElement(
87928
+ Button,
87929
+ {
87930
+ icon: "add",
87931
+ onClick: () => {
87932
+ this.insertRows({ numRows: 10, appendToBottom: true });
87933
+ },
87934
+ minimal: true
87935
+ },
87936
+ "Add 10 Rows"
87937
+ )
87938
+ ), /* @__PURE__ */ React$2.createElement(
87939
+ Button,
87940
+ {
87941
+ onClick: (e2) => {
87942
+ this.handleCopyTable(e2, { isDownload: true });
87943
+ },
87944
+ "data-tip": "Download Table as CSV",
87945
+ minimal: true,
87946
+ icon: "download"
87947
+ }
87948
+ )),
87795
87949
  !noFooter && /* @__PURE__ */ React$2.createElement(
87796
87950
  "div",
87797
87951
  {
@@ -88399,6 +88553,7 @@ ${latestSubscriptionCallbackError.current.stack}
88399
88553
  onMultiFileUploadSubmit,
88400
88554
  doAllFilesHaveSameHeaders,
88401
88555
  csvValidationIssue,
88556
+ ignoredHeadersMsg,
88402
88557
  searchResults,
88403
88558
  matchedHeaders,
88404
88559
  userSchema,
@@ -88416,7 +88571,7 @@ ${latestSubscriptionCallbackError.current.stack}
88416
88571
  if (v2)
88417
88572
  flippedMatchedHeaders[v2] = k2;
88418
88573
  });
88419
- return /* @__PURE__ */ React$2.createElement("div", { style: { maxWidth: 500 } }, !onMultiFileUploadSubmit && /* @__PURE__ */ React$2.createElement(Callout, { style: { width: "fit-content" }, intent: "warning" }, csvValidationIssue), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement(
88574
+ return /* @__PURE__ */ React$2.createElement("div", { style: { maxWidth: 500 } }, !onMultiFileUploadSubmit && /* @__PURE__ */ React$2.createElement(Callout, { style: { width: "fit-content" }, intent: "warning" }, csvValidationIssue), !onMultiFileUploadSubmit && ignoredHeadersMsg && /* @__PURE__ */ React$2.createElement(Callout, { style: { width: "fit-content" }, intent: "warning" }, ignoredHeadersMsg), /* @__PURE__ */ React$2.createElement("br", null), /* @__PURE__ */ React$2.createElement(
88420
88575
  "tr",
88421
88576
  {
88422
88577
  style: {
@@ -88805,7 +88960,7 @@ ${latestSubscriptionCallbackError.current.stack}
88805
88960
  };
88806
88961
  var Config = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, BasicOptions), MatchOptions), FuzzyOptions), AdvancedOptions$1);
88807
88962
  const SPACE$2 = /[^ ]+/g;
88808
- function norm(weight = 1, mantissa = 3) {
88963
+ function norm$1(weight = 1, mantissa = 3) {
88809
88964
  const cache2 = /* @__PURE__ */ new Map();
88810
88965
  const m2 = Math.pow(10, mantissa);
88811
88966
  return {
@@ -88824,13 +88979,13 @@ ${latestSubscriptionCallbackError.current.stack}
88824
88979
  }
88825
88980
  };
88826
88981
  }
88827
- __name(norm, "norm");
88982
+ __name(norm$1, "norm$1");
88828
88983
  const _FuseIndex = class _FuseIndex {
88829
88984
  constructor({
88830
88985
  getFn = Config.getFn,
88831
88986
  fieldNormWeight = Config.fieldNormWeight
88832
88987
  } = {}) {
88833
- this.norm = norm(fieldNormWeight, 3);
88988
+ this.norm = norm$1(fieldNormWeight, 3);
88834
88989
  this.getFn = getFn;
88835
88990
  this.isCreated = false;
88836
88991
  this.setIndexRecords();
@@ -89979,7 +90134,7 @@ ${latestSubscriptionCallbackError.current.stack}
89979
90134
  }) {
89980
90135
  yield resolveValidateAgainstSchema();
89981
90136
  const userSchema = getSchema(incomingData);
89982
- const { searchResults, csvValidationIssue } = yield matchSchemas({
90137
+ const { searchResults, csvValidationIssue, ignoredHeadersMsg } = yield matchSchemas({
89983
90138
  userSchema,
89984
90139
  officialSchema: validateAgainstSchema
89985
90140
  });
@@ -90015,6 +90170,7 @@ ${latestSubscriptionCallbackError.current.stack}
90015
90170
  }
90016
90171
  });
90017
90172
  return {
90173
+ ignoredHeadersMsg,
90018
90174
  csvValidationIssue,
90019
90175
  matchedHeaders,
90020
90176
  userSchema,
@@ -90031,15 +90187,31 @@ ${latestSubscriptionCallbackError.current.stack}
90031
90187
  };
90032
90188
  let csvValidationIssue = false;
90033
90189
  const fuse = new Fuse(userSchema.fields, options);
90190
+ const matchedAltPaths = [];
90034
90191
  officialSchema.fields.forEach((h2) => {
90035
90192
  let hasMatch = false;
90036
90193
  let result = fuse.search(h2.path) || [];
90194
+ const hadNormalPathMatch = userSchema.fields.some(
90195
+ (uh2) => norm(uh2.path) === norm(h2.path)
90196
+ );
90037
90197
  userSchema.fields.forEach((uh2, i2) => {
90038
- const pathMatch = uh2.path.toLowerCase().replace(/ /g, "") === h2.path.toLowerCase().replace(/ /g, "");
90039
- const displayNameMatch = h2.displayName && uh2.path.toLowerCase().replace(/ /g, "") === getTextFromEl(h2.displayName).toLowerCase().replace(/ /g, "");
90040
- const hasAlternatePathMatch = h2.alternatePathMatch && (lodashExports.isArray(h2.alternatePathMatch) ? h2.alternatePathMatch.some((alternatePathMatch) => {
90041
- return uh2.path.toLowerCase().replace(/ /g, "") === alternatePathMatch.toLowerCase().replace(/ /g, "");
90042
- }) : uh2.path.toLowerCase().replace(/ /g, "") === h2.alternatePathMatch.toLowerCase().replace(/ /g, ""));
90198
+ const pathMatch = norm(uh2.path) === norm(h2.path);
90199
+ const displayNameMatch = h2.displayName && norm(uh2.path) === norm(getTextFromEl(h2.displayName));
90200
+ const hasAlternatePathMatch = !hadNormalPathMatch && h2.alternatePathMatch && (lodashExports.isArray(h2.alternatePathMatch) ? h2.alternatePathMatch : [h2.alternatePathMatch]).find((alternatePathMatch) => {
90201
+ let altPath = alternatePathMatch;
90202
+ if (lodashExports.isPlainObject(alternatePathMatch)) {
90203
+ altPath = alternatePathMatch.path;
90204
+ }
90205
+ return norm(uh2.path) === norm(altPath);
90206
+ });
90207
+ if (hasAlternatePathMatch) {
90208
+ matchedAltPaths.push(
90209
+ hasAlternatePathMatch.path || hasAlternatePathMatch
90210
+ );
90211
+ if (hasAlternatePathMatch.format) {
90212
+ h2.format = hasAlternatePathMatch.format;
90213
+ }
90214
+ }
90043
90215
  if (pathMatch || displayNameMatch || hasAlternatePathMatch) {
90044
90216
  result = result.filter(({ path: path2 }) => path2 === uh2.path);
90045
90217
  result.unshift({
@@ -90059,6 +90231,16 @@ ${latestSubscriptionCallbackError.current.stack}
90059
90231
  csvValidationIssue = "It looks like some of the headers in your uploaded file(s) do not match the expected headers. Please look over and correct any issues with the mappings below.";
90060
90232
  }
90061
90233
  });
90234
+ const ignoredUserSchemaFields = [];
90235
+ userSchema.fields.forEach((uh2) => {
90236
+ if (!officialSchema.fields.find(
90237
+ (h2) => norm(h2.path) === norm(uh2.path) || norm(h2.displayName) === norm(uh2.path) || matchedAltPaths.includes(uh2.path)
90238
+ )) {
90239
+ if (userSchema.userData.some((e2) => e2[uh2.path])) {
90240
+ ignoredUserSchemaFields.push(uh2);
90241
+ }
90242
+ }
90243
+ });
90062
90244
  if (officialSchema.coerceUserSchema) {
90063
90245
  officialSchema.coerceUserSchema({ userSchema, officialSchema });
90064
90246
  }
@@ -90116,9 +90298,14 @@ ${latestSubscriptionCallbackError.current.stack}
90116
90298
  };
90117
90299
  }
90118
90300
  }
90301
+ let ignoredHeadersMsg;
90302
+ if (ignoredUserSchemaFields.length) {
90303
+ ignoredHeadersMsg = `It looks like the following headers in your file didn't map to any of the accepted headers: ${ignoredUserSchemaFields.map((f2) => f2.displayName || f2.path).join(", ")}`;
90304
+ }
90119
90305
  return {
90120
90306
  searchResults: officialSchema.fields,
90121
- csvValidationIssue
90307
+ csvValidationIssue,
90308
+ ignoredHeadersMsg
90122
90309
  };
90123
90310
  });
90124
90311
  }
@@ -90137,6 +90324,10 @@ ${latestSubscriptionCallbackError.current.stack}
90137
90324
  });
90138
90325
  }
90139
90326
  __name(resolveValidateAgainstSchema, "resolveValidateAgainstSchema");
90327
+ function norm(h2) {
90328
+ return lodashExports.snakeCase(h2).toLowerCase().replace(/ /g, "");
90329
+ }
90330
+ __name(norm, "norm");
90140
90331
  const getInitialSteps = /* @__PURE__ */ __name((csvValidationIssue) => [
90141
90332
  { text: "Review Headers", active: csvValidationIssue },
90142
90333
  { text: "Review Data", active: !csvValidationIssue }
@@ -90184,6 +90375,7 @@ ${latestSubscriptionCallbackError.current.stack}
90184
90375
  doAllFilesHaveSameHeaders,
90185
90376
  destroyForms,
90186
90377
  csvValidationIssue,
90378
+ ignoredHeadersMsg,
90187
90379
  searchResults,
90188
90380
  matchedHeaders,
90189
90381
  userSchema,
@@ -90295,6 +90487,7 @@ ${latestSubscriptionCallbackError.current.stack}
90295
90487
  destroyForms,
90296
90488
  setFilesWIssues,
90297
90489
  csvValidationIssue,
90490
+ ignoredHeadersMsg,
90298
90491
  searchResults,
90299
90492
  matchedHeaders,
90300
90493
  userSchema,
@@ -90330,6 +90523,7 @@ ${latestSubscriptionCallbackError.current.stack}
90330
90523
  reduxFormEntitiesArray,
90331
90524
  // onMultiFileUploadSubmit,
90332
90525
  csvValidationIssue,
90526
+ ignoredHeadersMsg,
90333
90527
  searchResults,
90334
90528
  matchedHeaders,
90335
90529
  userSchema,
@@ -90372,6 +90566,7 @@ ${latestSubscriptionCallbackError.current.stack}
90372
90566
  searchResults,
90373
90567
  onUploadWizardFinish,
90374
90568
  csvValidationIssue,
90569
+ ignoredHeadersMsg,
90375
90570
  matchedHeaders,
90376
90571
  //fromRedux:
90377
90572
  changeForm,
@@ -90401,6 +90596,7 @@ ${latestSubscriptionCallbackError.current.stack}
90401
90596
  searchResults,
90402
90597
  onUploadWizardFinish,
90403
90598
  csvValidationIssue,
90599
+ ignoredHeadersMsg,
90404
90600
  matchedHeaders,
90405
90601
  //fromRedux:
90406
90602
  handleSubmit: handleSubmit2,
@@ -90438,6 +90634,7 @@ ${latestSubscriptionCallbackError.current.stack}
90438
90634
  __spreadValues({}, {
90439
90635
  onMultiFileUploadSubmit,
90440
90636
  csvValidationIssue,
90637
+ ignoredHeadersMsg,
90441
90638
  searchResults,
90442
90639
  matchedHeaders,
90443
90640
  userSchema,
@@ -98606,7 +98803,7 @@ ${latestSubscriptionCallbackError.current.stack}
98606
98803
  }, "isZipFile");
98607
98804
  const getExt = /* @__PURE__ */ __name((file) => {
98608
98805
  var _a2;
98609
- return (_a2 = file == null ? void 0 : file.name) == null ? void 0 : _a2.split(".").pop();
98806
+ return (_a2 = (file == null ? void 0 : file.name) || (file == null ? void 0 : file.originalname)) == null ? void 0 : _a2.split(".").pop();
98610
98807
  }, "getExt");
98611
98808
  const isExcelFile = /* @__PURE__ */ __name((file) => getExt(file) === "xlsx", "isExcelFile");
98612
98809
  const isCsvFile = /* @__PURE__ */ __name((file) => getExt(file) === "csv", "isCsvFile");
@@ -98694,7 +98891,9 @@ ${latestSubscriptionCallbackError.current.stack}
98694
98891
  const opts2 = __spreadProps(__spreadValues(__spreadValues({}, defaultCsvParserOptions), setupCsvParserOptions(parserOptions)), {
98695
98892
  complete: (results) => {
98696
98893
  var _a2;
98697
- if (results && ((_a2 = results.data) == null ? void 0 : _a2.length) && results.errors && results.errors.length === 1 && results.errors[0].code === `UndetectableDelimiter`) {
98894
+ if (results && ((_a2 = results.data) == null ? void 0 : _a2.length) && results.errors && (results.errors.length === 1 && results.errors[0].code === `UndetectableDelimiter` || results.errors.every(
98895
+ (e2) => e2.code === `TooFewFields` || e2.code === `TooManyFields`
98896
+ ))) {
98698
98897
  return resolve(results);
98699
98898
  } else if (results && results.errors && results.errors.length) {
98700
98899
  return reject("Error in csv: " + JSON.stringify(results.errors));
@@ -100244,7 +100443,7 @@ ${latestSubscriptionCallbackError.current.stack}
100244
100443
  let ValidateAgainstSchema = _ValidateAgainstSchema;
100245
100444
  const emptyPromise = Promise.resolve.bind(Promise);
100246
100445
  function UploaderInner({
100247
- accept: _accept,
100446
+ accept: __accept,
100248
100447
  contentOverride: maybeContentOverride,
100249
100448
  innerIcon,
100250
100449
  innerText,
@@ -100274,20 +100473,37 @@ ${latestSubscriptionCallbackError.current.stack}
100274
100473
  dropzoneProps = {},
100275
100474
  overflowList,
100276
100475
  autoUnzip,
100277
- disabled,
100476
+ disabled: _disabled,
100278
100477
  noBuildCsvOption,
100279
100478
  initializeForm,
100280
100479
  showFilesCount,
100281
100480
  threeDotMenuItems,
100282
100481
  onPreviewClick
100283
100482
  }) {
100284
- var _a2, _b2, _c2, _d2, _e, _f;
100483
+ var _a2, _b2, _c2, _d2;
100484
+ let dropzoneDisabled = _disabled;
100485
+ let _accept = __accept;
100285
100486
  const validateAgainstSchemaStore = reactExports.useRef(new ValidateAgainstSchema());
100286
- const callout = _callout || ((_c2 = (_b2 = (_a2 = lodashExports.isArray(_accept) ? _accept : [_accept]).find) == null ? void 0 : _b2.call(_a2, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _c2.callout);
100287
- const validateAgainstSchemaToUse = _validateAgainstSchema || ((_f = (_e = (_d2 = lodashExports.isArray(_accept) ? _accept : [_accept]).find) == null ? void 0 : _e.call(
100288
- _d2,
100289
- (a2) => a2 == null ? void 0 : a2.validateAgainstSchema
100290
- )) == null ? void 0 : _f.validateAgainstSchema);
100487
+ const [resolvedAccept, setResolvedAccept] = reactExports.useState();
100488
+ if (resolvedAccept) {
100489
+ _accept = resolvedAccept;
100490
+ }
100491
+ const isAcceptPromise = (__accept == null ? void 0 : __accept.then) || (Array.isArray(__accept) ? __accept.some((a2) => a2 == null ? void 0 : a2.then) : false);
100492
+ const acceptLoading = !resolvedAccept && isAcceptPromise && `Accept Loading...`;
100493
+ if (isAcceptPromise && !resolvedAccept) {
100494
+ Promise.allSettled(Array.isArray(__accept) ? __accept : [__accept]).then(
100495
+ (results) => {
100496
+ const resolved = lodashExports.flatMap(results, (r2) => r2.value);
100497
+ setResolvedAccept(resolved);
100498
+ }
100499
+ );
100500
+ _accept = [];
100501
+ }
100502
+ if (acceptLoading)
100503
+ dropzoneDisabled = true;
100504
+ const accept = !_accept ? void 0 : isAcceptPromise && !resolvedAccept ? [] : lodashExports.isPlainObject(_accept) ? [_accept] : lodashExports.isArray(_accept) ? _accept : _accept.split(",").map((a2) => ({ type: a2 }));
100505
+ const callout = _callout || ((_b2 = (_a2 = accept == null ? void 0 : accept.find) == null ? void 0 : _a2.call(accept, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _b2.callout);
100506
+ const validateAgainstSchemaToUse = _validateAgainstSchema || ((_d2 = (_c2 = accept == null ? void 0 : accept.find) == null ? void 0 : _c2.call(accept, (a2) => a2 == null ? void 0 : a2.validateAgainstSchema)) == null ? void 0 : _d2.validateAgainstSchema);
100291
100507
  reactExports.useEffect(() => {
100292
100508
  validateAgainstSchemaStore.current.setValidateAgainstSchema(
100293
100509
  validateAgainstSchemaToUse
@@ -100297,7 +100513,6 @@ ${latestSubscriptionCallbackError.current.stack}
100297
100513
  if (validateAgainstSchemaToUse) {
100298
100514
  validateAgainstSchema = validateAgainstSchemaStore.current;
100299
100515
  }
100300
- const accept = !_accept ? void 0 : lodashExports.isPlainObject(_accept) ? [_accept] : lodashExports.isArray(_accept) ? _accept : _accept.split(",").map((a2) => ({ type: a2 }));
100301
100516
  if ((validateAgainstSchema || autoUnzip) && accept && !accept.some((a2) => a2.type === "zip")) {
100302
100517
  accept == null ? void 0 : accept.unshift({
100303
100518
  type: "zip",
@@ -100562,14 +100777,14 @@ ${latestSubscriptionCallbackError.current.stack}
100562
100777
  className: "tg-uploader-inner",
100563
100778
  style: { width: "100%", height: "fit-content", minWidth: 0 }
100564
100779
  },
100565
- simpleAccept && /* @__PURE__ */ React$2.createElement(
100780
+ (simpleAccept || acceptLoading) && /* @__PURE__ */ React$2.createElement(
100566
100781
  "div",
100567
100782
  {
100568
100783
  className: TEXT_MUTED,
100569
100784
  style: { fontSize: 11, marginBottom: 5 }
100570
100785
  },
100571
100786
  advancedAccept ? /* @__PURE__ */ React$2.createElement("div", { style: {} }, "Accepts  ", /* @__PURE__ */ React$2.createElement("span", { style: {} }, advancedAccept.map((a2, i2) => {
100572
- const disabled2 = !(a2.description || a2.exampleFile || a2.exampleFiles);
100787
+ const disabled = !(a2.description || a2.exampleFile || a2.exampleFiles);
100573
100788
  const PopOrTooltip = a2.exampleFiles ? Popover : Tooltip;
100574
100789
  const hasDownload = a2.exampleFile || a2.exampleFiles;
100575
100790
  const CustomTag = !hasDownload ? "span" : "a";
@@ -100578,7 +100793,7 @@ ${latestSubscriptionCallbackError.current.stack}
100578
100793
  {
100579
100794
  key: i2,
100580
100795
  interactionKind: "hover",
100581
- disabled: disabled2,
100796
+ disabled,
100582
100797
  modifiers: popoverOverflowModifiers,
100583
100798
  content: a2.exampleFiles ? /* @__PURE__ */ React$2.createElement(Menu, null, a2.exampleFiles.map(
100584
100799
  ({ description: description2, subtext, exampleFile, icon }, i22) => {
@@ -100656,12 +100871,15 @@ ${latestSubscriptionCallbackError.current.stack}
100656
100871
  )
100657
100872
  )
100658
100873
  );
100659
- }))) : /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, "Accepts ", simpleAccept)
100874
+ }))) : acceptLoading ? (
100875
+ // make the dots below "load"
100876
+ /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, "Accept Loading", /* @__PURE__ */ React$2.createElement(LoadingDots, null))
100877
+ ) : /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, "Accepts ", simpleAccept)
100660
100878
  ),
100661
100879
  /* @__PURE__ */ React$2.createElement(
100662
100880
  Dropzone$1,
100663
100881
  __spreadValues(__spreadValues({
100664
- disabled,
100882
+ disabled: dropzoneDisabled,
100665
100883
  onClick: (evt) => evt.preventDefault(),
100666
100884
  multiple: fileLimit !== 1,
100667
100885
  accept: simpleAccept ? simpleAccept.split(", ").map((a2) => a2.startsWith(".") ? a2 : "." + a2).join(", ") : void 0
@@ -100744,7 +100962,13 @@ ${latestSubscriptionCallbackError.current.stack}
100744
100962
  if (isCsvOrExcelFile(file)) {
100745
100963
  let parsedF;
100746
100964
  try {
100747
- parsedF = yield parseCsvOrExcelFile(file);
100965
+ parsedF = yield parseCsvOrExcelFile(file, {
100966
+ csvParserOptions: lodashExports.isFunction(
100967
+ validateAgainstSchema.csvParserOptions
100968
+ ) ? validateAgainstSchema.csvParserOptions({
100969
+ validateAgainstSchema
100970
+ }) : validateAgainstSchema.csvParserOptions
100971
+ });
100748
100972
  } catch (error) {
100749
100973
  console.error("error:", error);
100750
100974
  window.toastr && window.toastr.error(
@@ -100756,7 +100980,8 @@ ${latestSubscriptionCallbackError.current.stack}
100756
100980
  csvValidationIssue: _csvValidationIssue,
100757
100981
  matchedHeaders,
100758
100982
  userSchema,
100759
- searchResults
100983
+ searchResults,
100984
+ ignoredHeadersMsg
100760
100985
  } = yield tryToMatchSchemas({
100761
100986
  incomingData: parsedF.data,
100762
100987
  validateAgainstSchema
@@ -100799,6 +101024,7 @@ ${latestSubscriptionCallbackError.current.stack}
100799
101024
  filesWIssues.push({
100800
101025
  file,
100801
101026
  csvValidationIssue,
101027
+ ignoredHeadersMsg,
100802
101028
  matchedHeaders,
100803
101029
  userSchema,
100804
101030
  searchResults
@@ -100807,6 +101033,7 @@ ${latestSubscriptionCallbackError.current.stack}
100807
101033
  filesWOIssues.push({
100808
101034
  file,
100809
101035
  csvValidationIssue,
101036
+ ignoredHeadersMsg,
100810
101037
  matchedHeaders,
100811
101038
  userSchema,
100812
101039
  searchResults
@@ -100906,7 +101133,8 @@ ${latestSubscriptionCallbackError.current.stack}
100906
101133
  "tg-dropzone-reject": isDragReject,
100907
101134
  // tnr: the acceptClassName/rejectClassName doesn't work with file extensions (only mimetypes are supported when dragging). Thus we'll just always turn the drop area blue when dragging and let the filtering occur on drop. See https://github.com/react-dropzone/react-dropzone/issues/888#issuecomment-773938074
100908
101135
  "tg-dropzone-accept": isDragAccept,
100909
- "tg-dropzone-disabled": disabled
101136
+ "tg-dropzone-disabled": dropzoneDisabled,
101137
+ "bp3-disabled": dropzoneDisabled
100910
101138
  })
100911
101139
  }),
100912
101140
  /* @__PURE__ */ React$2.createElement("input", __spreadValues({}, getInputProps())),
@@ -112774,7 +113002,7 @@ ${latestSubscriptionCallbackError.current.stack}
112774
113002
  let allWarnings = [];
112775
113003
  let makeToast = /* @__PURE__ */ __name(() => {
112776
113004
  if (typeof window !== "undefined" && window.toastr && allWarnings.length) {
112777
- window.toastr.warning(allWarnings.join("\n"));
113005
+ window.toastr.warning(lodashExports.uniq(allWarnings).join("\n"));
112778
113006
  }
112779
113007
  allWarnings = [];
112780
113008
  }, "makeToast");
@@ -121675,6 +121903,8 @@ ${latestSubscriptionCallbackError.current.stack}
121675
121903
  }
121676
121904
  __name(convertAmbiguousStringToRegex, "convertAmbiguousStringToRegex");
121677
121905
  function getComplementSequenceString(sequence2, isRna2) {
121906
+ if (typeof sequence2 !== "string")
121907
+ return "";
121678
121908
  let complementSeqString = "";
121679
121909
  const complementMap = lodashExports.merge(
121680
121910
  DNAComplementMap,
@@ -149916,6 +150146,7 @@ ${seq.sequence}
149916
150146
  {
149917
150147
  className: "veRowViewAxis veAxis",
149918
150148
  height: annotationHeight,
150149
+ width,
149919
150150
  style: __spreadValues({ marginTop: marginTop2, overflow: "visible", display: "block" }, style2)
149920
150151
  },
149921
150152
  tickMarkSVG,
@@ -152940,10 +153171,10 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
152940
153171
  height: height2
152941
153172
  } = annotationVisibility2;
152942
153173
  const { sequence: sequence2 = "", cutsites = [] } = row;
152943
- const reverseSequence = getComplementSequenceString(
153174
+ const reverseSequence = showReverseSequence ? getComplementSequenceString(
152944
153175
  alignmentData && alignmentData.sequence || sequence2,
152945
153176
  isRna2
152946
- );
153177
+ ) : "";
152947
153178
  const getGaps = reactExports.useMemo(() => {
152948
153179
  if (alignmentData) {
152949
153180
  const gapMap = getGapMap$1(alignmentData.sequence);
@@ -154037,7 +154268,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
154037
154268
  }
154038
154269
  __name(showFileDialog, "showFileDialog");
154039
154270
  const name = "@teselagen/ove";
154040
- const version = "0.4.0";
154271
+ const version = "0.4.1";
154041
154272
  const main = "./src/index.js";
154042
154273
  const exports$1 = {
154043
154274
  ".": {
@@ -155039,8 +155270,10 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155039
155270
  const readOnlyDisabledTooltip = "Sorry this function is not allowed in Read-Only Mode";
155040
155271
  const bpEditingDisabledTooltip = "Sequence Editing Disabled";
155041
155272
  const noSelection = /* @__PURE__ */ __name(({ selectionLayer: selectionLayer2 = {} }) => !(selectionLayer2.start > -1 && selectionLayer2.end > -1) && "Selection Required", "noSelection");
155042
- const triggerClipboardCommand = /* @__PURE__ */ __name((type) => {
155043
- const wrapper2 = document.querySelector(".veVectorInteractionWrapper");
155273
+ const triggerClipboardCommand = /* @__PURE__ */ __name((type, props) => {
155274
+ const wrapper2 = document.querySelector(
155275
+ `#${props.editorName} .veVectorInteractionWrapper`
155276
+ );
155044
155277
  if (!wrapper2) {
155045
155278
  return window.toastr.info(`Cannot trigger a ${type} in the current view`);
155046
155279
  }
@@ -155071,8 +155304,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155071
155304
  cut: {
155072
155305
  isDisabled: (props) => props.disableBpEditing && bpEditingDisabledTooltip || props.readOnly && readOnlyDisabledTooltip || props.sequenceLength === 0,
155073
155306
  isHidden: (props) => props.readOnly || props.disableBpEditing,
155074
- handler: () => {
155075
- triggerClipboardCommand("cut");
155307
+ handler: (props) => {
155308
+ triggerClipboardCommand("cut", props);
155076
155309
  },
155077
155310
  hotkey: "mod+x"
155078
155311
  },
@@ -155090,13 +155323,13 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155090
155323
  },
155091
155324
  copy: {
155092
155325
  isDisabled: (props) => props.sequenceLength === 0,
155093
- handler: () => triggerClipboardCommand("copy"),
155326
+ handler: (props) => triggerClipboardCommand("copy", props),
155094
155327
  hotkey: "mod+c"
155095
155328
  },
155096
155329
  paste: {
155097
155330
  isDisabled: (props) => props.readOnly && readOnlyDisabledTooltip,
155098
155331
  isHidden: (props) => props.readOnly || props.disableBpEditing,
155099
- handler: () => triggerClipboardCommand("paste"),
155332
+ handler: (props) => triggerClipboardCommand("paste", props),
155100
155333
  hotkey: "mod+v"
155101
155334
  },
155102
155335
  undo: {
@@ -157728,7 +157961,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
157728
157961
  ...getEditDeleteHandlers("Feature", annotation),
157729
157962
  ...this.getSelectionMenuOptions(annotation),
157730
157963
  ...readOnly2 ? [] : [
157731
- ...parts2 && [
157964
+ ...parts2 ? [
157732
157965
  "--",
157733
157966
  {
157734
157967
  text: "Make a Part from Feature",
@@ -157757,7 +157990,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
157757
157990
  });
157758
157991
  })
157759
157992
  }
157760
- ],
157993
+ ] : [],
157761
157994
  {
157762
157995
  text: "Merge With Another Feature",
157763
157996
  onClick: () => {
@@ -159939,6 +160172,11 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
159939
160172
  updateLabelsForInViewFeatures();
159940
160173
  }
159941
160174
  };
160175
+ const tickSpacingToUse = tickSpacing || (isLinViewZoomed ? massageTickSpacing(Math.ceil(120 / this.charWidth)) : massageTickSpacing(
160176
+ Math.floor(
160177
+ this.getMaxLength() / (sequenceData2.isProtein ? 9 : 10) * Math.max(1, Math.log10(1 / this.charWidth))
160178
+ )
160179
+ ));
159942
160180
  return /* @__PURE__ */ React$2.createElement(
159943
160181
  ReactDraggable,
159944
160182
  {
@@ -160040,9 +160278,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160040
160278
  bpsPerRow,
160041
160279
  fullSequence: sequenceData2.sequence,
160042
160280
  emptyText: getEmptyText({ sequenceData: sequenceData2, caretPosition: caretPosition2 }),
160043
- tickSpacing: tickSpacing || (isLinViewZoomed ? massageTickSpacing(Math.ceil(120 / this.charWidth)) : Math.floor(
160044
- this.getMaxLength() / (sequenceData2.isProtein ? 9 : 10)
160045
- )),
160281
+ tickSpacing: tickSpacingToUse,
160046
160282
  annotationVisibility: __spreadValues(__spreadValues(__spreadValues({}, rest.annotationVisibility), (!isLinViewZoomed || this.charWidth < 5) && {
160047
160283
  translations: false,
160048
160284
  primaryProteinSequence: false,
@@ -160327,7 +160563,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160327
160563
  display: "flex",
160328
160564
  flexDirection: "column",
160329
160565
  overflowX: "visible"
160330
- // overflowY: "hidden"
160331
160566
  },
160332
160567
  onClick: this.handleMinimapClick
160333
160568
  },
@@ -160341,9 +160576,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160341
160576
  }
160342
160577
  },
160343
160578
  style: {
160344
- // maxHeight: 350,
160345
160579
  overflowY: minimapTracksPartialHeight > 190 ? "auto" : "hidden",
160346
- // overflowY: "auto",
160347
160580
  overflowX: "hidden",
160348
160581
  position: "relative"
160349
160582
  },
@@ -160374,7 +160607,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160374
160607
  {
160375
160608
  style: {
160376
160609
  marginTop: -3
160377
- // paddingLeft: nameDivWidth
160378
160610
  },
160379
160611
  ref
160380
160612
  },
@@ -160390,15 +160622,15 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
160390
160622
  /* @__PURE__ */ React$2.createElement(
160391
160623
  Axis$2,
160392
160624
  __spreadValues({}, {
160393
- row: { start: 0, end: seqLength },
160625
+ row: { start: 0, end: seqLength - 1 },
160394
160626
  tickSpacing: massageTickSpacing(Math.floor(seqLength / 10)),
160395
160627
  bpsPerRow: seqLength,
160396
160628
  charWidth: charWidth2,
160397
160629
  annotationHeight: 15,
160398
160630
  sequenceLength: seqLength,
160399
160631
  style: {
160400
- // paddingLeft: nameDivWidth,
160401
- height: 17
160632
+ height: 17,
160633
+ width: "100%"
160402
160634
  }
160403
160635
  })
160404
160636
  )