@teselagen/ove 0.3.52 → 0.3.54

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
@@ -27119,10 +27119,10 @@ var __async = (__this, __arguments, generator) => {
27119
27119
  /* istanbul ignore next */
27120
27120
  Object.getOwnPropertyNames
27121
27121
  );
27122
- function toPrimitive$2(value) {
27122
+ function toPrimitive$3(value) {
27123
27123
  return value === null ? null : typeof value === "object" ? "" + value : value;
27124
27124
  }
27125
- __name(toPrimitive$2, "toPrimitive$2");
27125
+ __name(toPrimitive$3, "toPrimitive$3");
27126
27126
  function hasProp(target, prop2) {
27127
27127
  return objectPrototype$2.hasOwnProperty.call(target, prop2);
27128
27128
  }
@@ -28019,7 +28019,7 @@ var __async = (__this, __arguments, generator) => {
28019
28019
  return this.name_ + "[" + this.value_ + "]";
28020
28020
  }, "toString");
28021
28021
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
28022
- return toPrimitive$2(this.get());
28022
+ return toPrimitive$3(this.get());
28023
28023
  }, "valueOf");
28024
28024
  _proto[_Symbol$toPrimitive] = function() {
28025
28025
  return this.valueOf();
@@ -28204,7 +28204,7 @@ var __async = (__this, __arguments, generator) => {
28204
28204
  return this.name_ + "[" + this.derivation.toString() + "]";
28205
28205
  }, "toString");
28206
28206
  _proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
28207
- return toPrimitive$2(this.get());
28207
+ return toPrimitive$3(this.get());
28208
28208
  }, "valueOf");
28209
28209
  _proto[_Symbol$toPrimitive$1] = function() {
28210
28210
  return this.valueOf();
@@ -38031,10 +38031,10 @@ ${latestSubscriptionCallbackError.current.stack}
38031
38031
  tn[n2] || (tn[n2] = r2);
38032
38032
  }
38033
38033
  __name(m, "m");
38034
- function _$2() {
38034
+ function _$1() {
38035
38035
  return U$1;
38036
38036
  }
38037
- __name(_$2, "_$2");
38037
+ __name(_$1, "_$1");
38038
38038
  function j$1(n2, r2) {
38039
38039
  r2 && (b("Patches"), n2.u = [], n2.s = [], n2.v = r2);
38040
38040
  }
@@ -38128,12 +38128,12 @@ ${latestSubscriptionCallbackError.current.stack}
38128
38128
  __name(E$1, "E$1");
38129
38129
  function N(n2, r2, t2) {
38130
38130
  var e2 = s(r2) ? b("MapSet").F(r2, t2) : v(r2) ? b("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
38131
- var t3 = Array.isArray(n3), e3 = { i: t3 ? 1 : 0, A: r3 ? r3.A : _$2(), P: false, I: false, R: {}, l: r3, t: n3, k: null, o: null, j: null, C: false }, i2 = e3, o2 = en;
38131
+ var t3 = Array.isArray(n3), e3 = { i: t3 ? 1 : 0, A: r3 ? r3.A : _$1(), P: false, I: false, R: {}, l: r3, t: n3, k: null, o: null, j: null, C: false }, i2 = e3, o2 = en;
38132
38132
  t3 && (i2 = [e3], o2 = on$1);
38133
38133
  var u2 = Proxy.revocable(i2, o2), a2 = u2.revoke, f2 = u2.proxy;
38134
38134
  return e3.k = f2, e3.j = a2, f2;
38135
38135
  }(r2, t2) : b("ES5").J(r2, t2);
38136
- return (t2 ? t2.A : _$2()).p.push(e2), e2;
38136
+ return (t2 ? t2.A : _$1()).p.push(e2), e2;
38137
38137
  }
38138
38138
  __name(N, "N");
38139
38139
  function R(e2) {
@@ -44410,7 +44410,6 @@ ${latestSubscriptionCallbackError.current.stack}
44410
44410
  }).call(commonjsGlobal);
44411
44411
  })(lodash, lodash.exports);
44412
44412
  var lodashExports = lodash.exports;
44413
- const _$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports);
44414
44413
  var lib$9 = {};
44415
44414
  Object.defineProperty(lib$9, "__esModule", {
44416
44415
  value: true
@@ -44863,20 +44862,11 @@ ${latestSubscriptionCallbackError.current.stack}
44863
44862
  return true;
44864
44863
  }
44865
44864
  }, "_fails");
44866
- var _descriptors;
44867
- var hasRequired_descriptors;
44868
- function require_descriptors() {
44869
- if (hasRequired_descriptors)
44870
- return _descriptors;
44871
- hasRequired_descriptors = 1;
44872
- _descriptors = !_fails(function() {
44873
- return Object.defineProperty({}, "a", { get: function() {
44874
- return 7;
44875
- } }).a != 7;
44876
- });
44877
- return _descriptors;
44878
- }
44879
- __name(require_descriptors, "require_descriptors");
44865
+ var _descriptors = !_fails(function() {
44866
+ return Object.defineProperty({}, "a", { get: function() {
44867
+ return 7;
44868
+ } }).a != 7;
44869
+ });
44880
44870
  var _domCreate;
44881
44871
  var hasRequired_domCreate;
44882
44872
  function require_domCreate() {
@@ -44892,20 +44882,11 @@ ${latestSubscriptionCallbackError.current.stack}
44892
44882
  return _domCreate;
44893
44883
  }
44894
44884
  __name(require_domCreate, "require_domCreate");
44895
- var _ie8DomDefine;
44896
- var hasRequired_ie8DomDefine;
44897
- function require_ie8DomDefine() {
44898
- if (hasRequired_ie8DomDefine)
44899
- return _ie8DomDefine;
44900
- hasRequired_ie8DomDefine = 1;
44901
- _ie8DomDefine = !require_descriptors() && !_fails(function() {
44902
- return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
44903
- return 7;
44904
- } }).a != 7;
44905
- });
44906
- return _ie8DomDefine;
44907
- }
44908
- __name(require_ie8DomDefine, "require_ie8DomDefine");
44885
+ var _ie8DomDefine = !_descriptors && !_fails(function() {
44886
+ return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
44887
+ return 7;
44888
+ } }).a != 7;
44889
+ });
44909
44890
  var isObject$6 = _isObject;
44910
44891
  var _toPrimitive$1 = /* @__PURE__ */ __name(function(it, S2) {
44911
44892
  if (!isObject$6(it))
@@ -44919,33 +44900,25 @@ ${latestSubscriptionCallbackError.current.stack}
44919
44900
  return val2;
44920
44901
  throw TypeError("Can't convert object to primitive value");
44921
44902
  }, "_toPrimitive$1");
44922
- var hasRequired_objectDp;
44923
- function require_objectDp() {
44924
- if (hasRequired_objectDp)
44925
- return _objectDp;
44926
- hasRequired_objectDp = 1;
44927
- var anObject2 = _anObject;
44928
- var IE8_DOM_DEFINE2 = require_ie8DomDefine();
44929
- var toPrimitive2 = _toPrimitive$1;
44930
- var dP2 = Object.defineProperty;
44931
- _objectDp.f = require_descriptors() ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
44932
- anObject2(O2);
44933
- P2 = toPrimitive2(P2, true);
44934
- anObject2(Attributes);
44935
- if (IE8_DOM_DEFINE2)
44936
- try {
44937
- return dP2(O2, P2, Attributes);
44938
- } catch (e2) {
44939
- }
44940
- if ("get" in Attributes || "set" in Attributes)
44941
- throw TypeError("Accessors not supported!");
44942
- if ("value" in Attributes)
44943
- O2[P2] = Attributes.value;
44944
- return O2;
44945
- }, "defineProperty");
44946
- return _objectDp;
44947
- }
44948
- __name(require_objectDp, "require_objectDp");
44903
+ var anObject$5 = _anObject;
44904
+ var IE8_DOM_DEFINE$1 = _ie8DomDefine;
44905
+ var toPrimitive$2 = _toPrimitive$1;
44906
+ var dP$3 = Object.defineProperty;
44907
+ _objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
44908
+ anObject$5(O2);
44909
+ P2 = toPrimitive$2(P2, true);
44910
+ anObject$5(Attributes);
44911
+ if (IE8_DOM_DEFINE$1)
44912
+ try {
44913
+ return dP$3(O2, P2, Attributes);
44914
+ } catch (e2) {
44915
+ }
44916
+ if ("get" in Attributes || "set" in Attributes)
44917
+ throw TypeError("Accessors not supported!");
44918
+ if ("value" in Attributes)
44919
+ O2[P2] = Attributes.value;
44920
+ return O2;
44921
+ }, "defineProperty");
44949
44922
  var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
44950
44923
  return {
44951
44924
  enumerable: !(bitmap & 1),
@@ -44954,9 +44927,9 @@ ${latestSubscriptionCallbackError.current.stack}
44954
44927
  value
44955
44928
  };
44956
44929
  }, "_propertyDesc");
44957
- var dP$2 = require_objectDp();
44930
+ var dP$2 = _objectDp;
44958
44931
  var createDesc$3 = _propertyDesc;
44959
- var _hide = require_descriptors() ? function(object2, key2, value) {
44932
+ var _hide = _descriptors ? function(object2, key2, value) {
44960
44933
  return dP$2.f(object2, key2, createDesc$3(1, value));
44961
44934
  } : function(object2, key2, value) {
44962
44935
  object2[key2] = value;
@@ -45028,16 +45001,25 @@ ${latestSubscriptionCallbackError.current.stack}
45028
45001
  var _cof = /* @__PURE__ */ __name(function(it) {
45029
45002
  return toString$4.call(it).slice(8, -1);
45030
45003
  }, "_cof");
45031
- var cof$2 = _cof;
45032
- var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
45033
- return cof$2(it) == "String" ? it.split("") : Object(it);
45034
- };
45004
+ var _iobject;
45005
+ var hasRequired_iobject;
45006
+ function require_iobject() {
45007
+ if (hasRequired_iobject)
45008
+ return _iobject;
45009
+ hasRequired_iobject = 1;
45010
+ var cof2 = _cof;
45011
+ _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
45012
+ return cof2(it) == "String" ? it.split("") : Object(it);
45013
+ };
45014
+ return _iobject;
45015
+ }
45016
+ __name(require_iobject, "require_iobject");
45035
45017
  var _defined = /* @__PURE__ */ __name(function(it) {
45036
45018
  if (it == void 0)
45037
45019
  throw TypeError("Can't call method on " + it);
45038
45020
  return it;
45039
45021
  }, "_defined");
45040
- var IObject = _iobject;
45022
+ var IObject = require_iobject();
45041
45023
  var defined$2 = _defined;
45042
45024
  var _toIobject = /* @__PURE__ */ __name(function(it) {
45043
45025
  return IObject(defined$2(it));
@@ -45134,7 +45116,15 @@ ${latestSubscriptionCallbackError.current.stack}
45134
45116
  var _objectGops = {};
45135
45117
  _objectGops.f = Object.getOwnPropertySymbols;
45136
45118
  var _objectPie = {};
45137
- _objectPie.f = {}.propertyIsEnumerable;
45119
+ var hasRequired_objectPie;
45120
+ function require_objectPie() {
45121
+ if (hasRequired_objectPie)
45122
+ return _objectPie;
45123
+ hasRequired_objectPie = 1;
45124
+ _objectPie.f = {}.propertyIsEnumerable;
45125
+ return _objectPie;
45126
+ }
45127
+ __name(require_objectPie, "require_objectPie");
45138
45128
  var defined$1 = _defined;
45139
45129
  var _toObject = /* @__PURE__ */ __name(function(it) {
45140
45130
  return Object(defined$1(it));
@@ -45145,12 +45135,12 @@ ${latestSubscriptionCallbackError.current.stack}
45145
45135
  if (hasRequired_objectAssign)
45146
45136
  return _objectAssign;
45147
45137
  hasRequired_objectAssign = 1;
45148
- var DESCRIPTORS2 = require_descriptors();
45138
+ var DESCRIPTORS2 = _descriptors;
45149
45139
  var getKeys2 = _objectKeys;
45150
45140
  var gOPS2 = _objectGops;
45151
- var pIE2 = _objectPie;
45141
+ var pIE2 = require_objectPie();
45152
45142
  var toObject2 = _toObject;
45153
- var IObject2 = _iobject;
45143
+ var IObject2 = require_iobject();
45154
45144
  var $assign = Object.assign;
45155
45145
  _objectAssign = !$assign || _fails(function() {
45156
45146
  var A2 = {};
@@ -45211,10 +45201,10 @@ ${latestSubscriptionCallbackError.current.stack}
45211
45201
  }, "_iterStep");
45212
45202
  var _iterators = {};
45213
45203
  var _redefine = _hide;
45214
- var dP$1 = require_objectDp();
45204
+ var dP$1 = _objectDp;
45215
45205
  var anObject$4 = _anObject;
45216
45206
  var getKeys$1 = _objectKeys;
45217
- var _objectDps = require_descriptors() ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
45207
+ var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
45218
45208
  anObject$4(O2);
45219
45209
  var keys2 = getKeys$1(Properties2);
45220
45210
  var length = keys2.length;
@@ -45281,7 +45271,7 @@ ${latestSubscriptionCallbackError.current.stack}
45281
45271
  };
45282
45272
  $exports.store = store$2;
45283
45273
  var _wksExports = _wks.exports;
45284
- var def = require_objectDp().f;
45274
+ var def = _objectDp.f;
45285
45275
  var has$b = _has;
45286
45276
  var TAG$1 = _wksExports("toStringTag");
45287
45277
  var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
@@ -45554,7 +45544,7 @@ ${latestSubscriptionCallbackError.current.stack}
45554
45544
  var _isArrayIter = /* @__PURE__ */ __name(function(it) {
45555
45545
  return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
45556
45546
  }, "_isArrayIter");
45557
- var $defineProperty$1 = require_objectDp();
45547
+ var $defineProperty$1 = _objectDp;
45558
45548
  var createDesc$2 = _propertyDesc;
45559
45549
  var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
45560
45550
  if (index2 in object2)
@@ -45683,7 +45673,7 @@ ${latestSubscriptionCallbackError.current.stack}
45683
45673
  }
45684
45674
  }, "_default$8");
45685
45675
  var $export$3 = _export;
45686
- $export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty: require_objectDp().f });
45676
+ $export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
45687
45677
  var $Object$1 = _coreExports.Object;
45688
45678
  var defineProperty$6 = /* @__PURE__ */ __name(function defineProperty2(it, key2, desc) {
45689
45679
  return $Object$1.defineProperty(it, key2, desc);
@@ -45724,7 +45714,7 @@ ${latestSubscriptionCallbackError.current.stack}
45724
45714
  var META$1 = _uid("meta");
45725
45715
  var isObject$5 = _isObject;
45726
45716
  var has$9 = _has;
45727
- var setDesc = require_objectDp().f;
45717
+ var setDesc = _objectDp.f;
45728
45718
  var id$1 = 0;
45729
45719
  var isExtensible = Object.isExtensible || function() {
45730
45720
  return true;
@@ -45777,7 +45767,7 @@ ${latestSubscriptionCallbackError.current.stack}
45777
45767
  var _metaExports = _meta.exports;
45778
45768
  var core = _coreExports;
45779
45769
  var wksExt$1 = _wksExt;
45780
- var defineProperty$4 = require_objectDp().f;
45770
+ var defineProperty$4 = _objectDp.f;
45781
45771
  var _wksDefine = /* @__PURE__ */ __name(function(name2) {
45782
45772
  var $Symbol2 = core.Symbol || (core.Symbol = {});
45783
45773
  if (name2.charAt(0) != "_" && !(name2 in $Symbol2))
@@ -45785,7 +45775,7 @@ ${latestSubscriptionCallbackError.current.stack}
45785
45775
  }, "_wksDefine");
45786
45776
  var getKeys = _objectKeys;
45787
45777
  var gOPS$1 = _objectGops;
45788
- var pIE$1 = _objectPie;
45778
+ var pIE$1 = require_objectPie();
45789
45779
  var _enumKeys = /* @__PURE__ */ __name(function(it) {
45790
45780
  var result = getKeys(it);
45791
45781
  var getSymbols2 = gOPS$1.f;
@@ -45826,14 +45816,14 @@ ${latestSubscriptionCallbackError.current.stack}
45826
45816
  return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
45827
45817
  }, "getOwnPropertyNames");
45828
45818
  var _objectGopd = {};
45829
- var pIE = _objectPie;
45819
+ var pIE = require_objectPie();
45830
45820
  var createDesc$1 = _propertyDesc;
45831
45821
  var toIObject$1 = _toIobject;
45832
45822
  var toPrimitive$1 = _toPrimitive$1;
45833
45823
  var has$8 = _has;
45834
- var IE8_DOM_DEFINE = require_ie8DomDefine();
45824
+ var IE8_DOM_DEFINE = _ie8DomDefine;
45835
45825
  var gOPD$2 = Object.getOwnPropertyDescriptor;
45836
- _objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
45826
+ _objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
45837
45827
  O2 = toIObject$1(O2);
45838
45828
  P2 = toPrimitive$1(P2, true);
45839
45829
  if (IE8_DOM_DEFINE)
@@ -45846,7 +45836,7 @@ ${latestSubscriptionCallbackError.current.stack}
45846
45836
  }, "getOwnPropertyDescriptor");
45847
45837
  var global$1 = _globalExports;
45848
45838
  var has$7 = _has;
45849
- var DESCRIPTORS = require_descriptors();
45839
+ var DESCRIPTORS = _descriptors;
45850
45840
  var $export$2 = _export;
45851
45841
  var redefine = _redefine;
45852
45842
  var META = _metaExports.KEY;
@@ -45869,7 +45859,7 @@ ${latestSubscriptionCallbackError.current.stack}
45869
45859
  var gOPNExt = _objectGopnExt;
45870
45860
  var $GOPD = _objectGopd;
45871
45861
  var $GOPS = _objectGops;
45872
- var $DP = require_objectDp();
45862
+ var $DP = _objectDp;
45873
45863
  var $keys$1 = _objectKeys;
45874
45864
  var gOPD$1 = $GOPD.f;
45875
45865
  var dP = $DP.f;
@@ -46006,7 +45996,7 @@ ${latestSubscriptionCallbackError.current.stack}
46006
45996
  $GOPD.f = $getOwnPropertyDescriptor;
46007
45997
  $DP.f = $defineProperty;
46008
45998
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
46009
- _objectPie.f = $propertyIsEnumerable;
45999
+ require_objectPie().f = $propertyIsEnumerable;
46010
46000
  $GOPS.f = $getOwnPropertySymbols;
46011
46001
  if (DESCRIPTORS && !_library) {
46012
46002
  redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
@@ -85482,6 +85472,15 @@ ${latestSubscriptionCallbackError.current.stack}
85482
85472
  }
85483
85473
  });
85484
85474
  const dataTableEnhancer = compose(
85475
+ // maybe we need this in some cases?
85476
+ // tgFormValues("reduxFormEntities"),
85477
+ // withProps(props => {
85478
+ // const entities = props.reduxFormEntities || props.entities;
85479
+ // return {
85480
+ // _origEntities: props.entities,
85481
+ // entities
85482
+ // };
85483
+ // }),
85485
85484
  //connect to withTableParams here in the dataTable component so that, in the case that the table is not manually connected,
85486
85485
  withTableParams({
85487
85486
  isLocalCall: true
@@ -86340,13 +86339,14 @@ ${latestSubscriptionCallbackError.current.stack}
86340
86339
  }, "formatAndValidateEntities"));
86341
86340
  __publicField(this, "formatAndValidateTableInitial", /* @__PURE__ */ __name(() => {
86342
86341
  const {
86343
- _origEntities: entities,
86342
+ _origEntities,
86343
+ entities,
86344
86344
  initialEntities,
86345
86345
  change: change2,
86346
86346
  reduxFormCellValidation
86347
86347
  } = this.props;
86348
86348
  const { newEnts, validationErrors } = this.formatAndValidateEntities(
86349
- initialEntities || entities
86349
+ initialEntities || entities || _origEntities
86350
86350
  );
86351
86351
  change2("reduxFormEntities", newEnts);
86352
86352
  const toKeep = {};
@@ -86464,16 +86464,33 @@ ${latestSubscriptionCallbackError.current.stack}
86464
86464
  } else if (e2.clipboardData && e2.clipboardData.getData) {
86465
86465
  toPaste = e2.clipboardData.getData("text/plain");
86466
86466
  }
86467
- if (toPaste.includes(",")) {
86468
- try {
86469
- const { data, errors } = papaparse.parse(toPaste, {
86470
- header: false
86467
+ const jsonToPaste = e2.clipboardData.getData("application/json");
86468
+ try {
86469
+ const pastedJson = [];
86470
+ JSON.parse(jsonToPaste).forEach((row) => {
86471
+ const newRow = [];
86472
+ Object.values(row).forEach((cell) => {
86473
+ const cellVal = JSON.parse(cell);
86474
+ newRow.push(cellVal);
86471
86475
  });
86472
- if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
86473
- pasteData = data;
86476
+ pastedJson.push(newRow);
86477
+ });
86478
+ pasteData = pastedJson;
86479
+ if (pasteData[0] && pasteData[0][0] && pasteData[0][0].__isHeaderCell) {
86480
+ pasteData = pasteData.slice(1);
86481
+ }
86482
+ } catch (e22) {
86483
+ if (toPaste.includes(",")) {
86484
+ try {
86485
+ const { data, errors } = papaparse.parse(toPaste, {
86486
+ header: false
86487
+ });
86488
+ if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
86489
+ pasteData = data;
86490
+ }
86491
+ } catch (error) {
86492
+ console.error(`error p982qhgpf9qh`, error);
86474
86493
  }
86475
- } catch (error) {
86476
- console.error(`error p982qhgpf9qh`, error);
86477
86494
  }
86478
86495
  }
86479
86496
  pasteData = pasteData.length ? pasteData : defaultParsePaste(toPaste);
@@ -86492,7 +86509,7 @@ ${latestSubscriptionCallbackError.current.stack}
86492
86509
  entity,
86493
86510
  path: path2,
86494
86511
  schema: schema2,
86495
- newVal: newVal2
86512
+ newVal: formatPasteData({ newVal: newVal2, path: path2, schema: schema2 })
86496
86513
  });
86497
86514
  if (error) {
86498
86515
  newCellValidate[cellId] = error;
@@ -86523,8 +86540,8 @@ ${latestSubscriptionCallbackError.current.stack}
86523
86540
  const indexToPath = lodashExports.invert(pathToIndex);
86524
86541
  const startCellIndex = pathToIndex[primaryCellPath];
86525
86542
  pasteData.forEach((row, i2) => {
86526
- row.forEach((cell, j2) => {
86527
- if (cell) {
86543
+ row.forEach((newVal2, j2) => {
86544
+ if (newVal2) {
86528
86545
  const cellIndexToChange = startCellIndex + j2;
86529
86546
  const entity = entitiesToManipulate[i2];
86530
86547
  if (entity) {
@@ -86535,7 +86552,11 @@ ${latestSubscriptionCallbackError.current.stack}
86535
86552
  entity,
86536
86553
  path: path2,
86537
86554
  schema: schema2,
86538
- newVal: cell
86555
+ newVal: formatPasteData({
86556
+ newVal: newVal2,
86557
+ path: path2,
86558
+ schema: schema2
86559
+ })
86539
86560
  });
86540
86561
  const cellId = `${getIdOrCodeOrIndex(entity)}:${path2}`;
86541
86562
  if (!newSelectedCells[cellId]) {
@@ -86645,17 +86666,11 @@ ${latestSubscriptionCallbackError.current.stack}
86645
86666
  __publicField(this, "getCellCopyText", /* @__PURE__ */ __name((cellWrapper) => {
86646
86667
  const text2 = cellWrapper && cellWrapper.getAttribute("data-copy-text");
86647
86668
  const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
86648
- const toRet = text2 || cellWrapper.textContent || "";
86649
- return [toRet, jsonText];
86669
+ const textContent = text2 || cellWrapper.textContent || "";
86670
+ return [textContent, jsonText];
86650
86671
  }, "getCellCopyText"));
86651
- __publicField(this, "handleCopyRow", /* @__PURE__ */ __name((rowEl) => {
86652
- const text2 = this.getRowCopyText(rowEl);
86653
- if (!text2)
86654
- return window.toastr.warning("No text to copy");
86655
- this.handleCopyHelper(text2, void 0, "Row Copied");
86656
- }, "handleCopyRow"));
86657
86672
  __publicField(this, "handleCopyColumn", /* @__PURE__ */ __name((e2, cellWrapper, selectedRecords) => {
86658
- const cellType = cellWrapper.getAttribute("data-test");
86673
+ const specificColumn = cellWrapper.getAttribute("data-test");
86659
86674
  let rowElsToCopy = getAllRows(e2);
86660
86675
  if (!rowElsToCopy)
86661
86676
  return;
@@ -86672,14 +86687,24 @@ ${latestSubscriptionCallbackError.current.stack}
86672
86687
  }
86673
86688
  if (!rowElsToCopy)
86674
86689
  return;
86675
- const textToCopy = lodashExports.map(
86676
- rowElsToCopy,
86677
- (rowEl) => this.getRowCopyText(rowEl, { cellType })
86678
- ).filter((text2) => text2).join("\n");
86690
+ this.handleCopyRows(rowElsToCopy, {
86691
+ specificColumn,
86692
+ onFinishMsg: "Column Copied"
86693
+ });
86694
+ }, "handleCopyColumn"));
86695
+ __publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
86696
+ let textToCopy = [];
86697
+ const jsonToCopy = [];
86698
+ lodashExports.forEach(rowElsToCopy, (rowEl) => {
86699
+ const [t2, j2] = this.getRowCopyText(rowEl, { specificColumn });
86700
+ textToCopy.push(t2);
86701
+ jsonToCopy.push(j2);
86702
+ });
86703
+ textToCopy = textToCopy.filter((text2) => text2).join("\n");
86679
86704
  if (!textToCopy)
86680
86705
  return window.toastr.warning("No text to copy");
86681
- this.handleCopyHelper(textToCopy, void 0, "Column copied");
86682
- }, "handleCopyColumn"));
86706
+ this.handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
86707
+ }, "handleCopyRows"));
86683
86708
  __publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn2) => {
86684
86709
  const { change: change2, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
86685
86710
  const [nextState, patches, inversePatches] = cn(ents, fn2);
@@ -86698,34 +86723,35 @@ ${latestSubscriptionCallbackError.current.stack}
86698
86723
  }
86699
86724
  }));
86700
86725
  }, "updateEntitiesHelper"));
86701
- __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { cellType } = {}) => {
86726
+ __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { specificColumn } = {}) => {
86702
86727
  if (!rowEl)
86703
86728
  return;
86704
- return lodashExports.flatMap(rowEl.children, (cellEl) => {
86729
+ const textContent = [];
86730
+ const jsonText = [];
86731
+ lodashExports.forEach(rowEl.children, (cellEl) => {
86705
86732
  const cellChild = cellEl.querySelector(`[data-copy-text]`);
86706
86733
  if (!cellChild) {
86707
- if (cellType)
86734
+ if (specificColumn)
86708
86735
  return [];
86709
86736
  return;
86710
86737
  }
86711
- if (cellType && cellChild.getAttribute("data-test") !== cellType) {
86738
+ if (specificColumn && cellChild.getAttribute("data-test") !== specificColumn) {
86712
86739
  return [];
86713
86740
  }
86714
- return this.getCellCopyText(cellChild);
86715
- }).join(" ");
86741
+ const [t2, j2] = this.getCellCopyText(cellChild);
86742
+ textContent.push(t2);
86743
+ jsonText.push(j2);
86744
+ });
86745
+ return [lodashExports.flatMap(textContent).join(" "), jsonText];
86716
86746
  }, "getRowCopyText"));
86717
- __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, objToCopy, message) => {
86718
- const copyHandler = /* @__PURE__ */ __name((e2) => {
86719
- e2.preventDefault();
86720
- e2.clipboardData.setData("application/json", JSON.stringify(objToCopy));
86721
- e2.clipboardData.setData("text/plain", stringToCopy);
86722
- }, "copyHandler");
86723
- document.addEventListener("copy", copyHandler);
86747
+ __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, jsonToCopy, message) => {
86724
86748
  !window.Cypress && copyToClipboard$1(stringToCopy, {
86749
+ onCopy: (clipboardData) => {
86750
+ clipboardData.setData("application/json", JSON.stringify(jsonToCopy));
86751
+ },
86725
86752
  // keep this so that pasting into spreadsheets works.
86726
86753
  format: "text/plain"
86727
86754
  });
86728
- document.removeEventListener("copy", copyHandler);
86729
86755
  window.toastr.success(message);
86730
86756
  }, "handleCopyHelper"));
86731
86757
  __publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
@@ -86733,10 +86759,9 @@ ${latestSubscriptionCallbackError.current.stack}
86733
86759
  const allRowEls = getAllRows(e2);
86734
86760
  if (!allRowEls)
86735
86761
  return;
86736
- const textToCopy = lodashExports.map(allRowEls, (rowEl) => this.getRowCopyText(rowEl)).filter((text2) => text2).join("\n");
86737
- if (!textToCopy)
86738
- return window.toastr.warning("No text to copy");
86739
- this.handleCopyHelper(textToCopy, void 0, "Table copied");
86762
+ this.handleCopyRows(allRowEls, {
86763
+ onFinishMsg: "Table Copied"
86764
+ });
86740
86765
  } catch (error) {
86741
86766
  console.error(`error:`, error);
86742
86767
  window.toastr.error("Error copying rows.");
@@ -86776,6 +86801,7 @@ ${latestSubscriptionCallbackError.current.stack}
86776
86801
  return;
86777
86802
  const allRows = getAllRows(e2);
86778
86803
  let fullCellText = "";
86804
+ const fullJson = [];
86779
86805
  lodashExports.times(selectionGrid.length, (i2) => {
86780
86806
  const row = selectionGrid[i2];
86781
86807
  if (fullCellText) {
@@ -86784,20 +86810,24 @@ ${latestSubscriptionCallbackError.current.stack}
86784
86810
  if (!row) {
86785
86811
  return;
86786
86812
  } else {
86787
- const rowCopyText = this.getRowCopyText(allRows[i2 + 1]).split(" ");
86813
+ const jsonRow = [];
86814
+ let [rowCopyText, json] = this.getRowCopyText(allRows[i2 + 1]);
86815
+ rowCopyText = rowCopyText.split(" ");
86788
86816
  lodashExports.times(row.length, (i22) => {
86789
86817
  const cell = row[i22];
86790
86818
  if (cell) {
86791
86819
  fullCellText += rowCopyText[i22];
86820
+ jsonRow.push(json[i22]);
86792
86821
  }
86793
86822
  if (i22 !== row.length - 1 && i22 >= firstCellIndex)
86794
86823
  fullCellText += " ";
86795
86824
  });
86825
+ fullJson.push(jsonRow);
86796
86826
  }
86797
86827
  });
86798
86828
  if (!fullCellText)
86799
86829
  return window.toastr.warning("No text to copy");
86800
- this.handleCopyHelper(fullCellText, void 0, "Selected cells copied");
86830
+ this.handleCopyHelper(fullCellText, fullJson, "Selected cells copied");
86801
86831
  }, "handleCopySelectedCells"));
86802
86832
  __publicField(this, "handleCopySelectedRows", /* @__PURE__ */ __name((selectedRecords, e2) => {
86803
86833
  const { entities = [] } = computePresets(this.props);
@@ -86814,10 +86844,9 @@ ${latestSubscriptionCallbackError.current.stack}
86814
86844
  if (!allRowEls)
86815
86845
  return;
86816
86846
  const rowEls = rowNumbersToCopy.map((i2) => allRowEls[i2]);
86817
- const textToCopy = lodashExports.map(rowEls, (rowEl) => this.getRowCopyText(rowEl)).filter((text2) => text2).join("\n");
86818
- if (!textToCopy)
86819
- return window.toastr.warning("No text to copy");
86820
- this.handleCopyHelper(textToCopy, void 0, "Selected rows copied");
86847
+ this.handleCopyRows(rowEls, {
86848
+ onFinishMsg: "Selected rows copied"
86849
+ });
86821
86850
  } catch (error) {
86822
86851
  console.error(`error:`, error);
86823
86852
  window.toastr.error("Error copying rows.");
@@ -87552,6 +87581,7 @@ ${latestSubscriptionCallbackError.current.stack}
87552
87581
  }
87553
87582
  const oldFunc = tableColumn.Cell;
87554
87583
  tableColumn.Cell = (...args) => {
87584
+ var _a2;
87555
87585
  const [row] = args;
87556
87586
  const rowId = getIdOrCodeOrIndex(row.original, row.index);
87557
87587
  const cellId = `${rowId}:${row.column.path}`;
@@ -87562,6 +87592,7 @@ ${latestSubscriptionCallbackError.current.stack}
87562
87592
  const dataTest = {
87563
87593
  "data-test": "tgCell_" + column.path
87564
87594
  };
87595
+ const fullValue = (_a2 = row.original) == null ? void 0 : _a2[row.column.path];
87565
87596
  if (isCellEditable && isBool) {
87566
87597
  val2 = /* @__PURE__ */ React$2.createElement(
87567
87598
  Checkbox,
@@ -87584,6 +87615,7 @@ ${latestSubscriptionCallbackError.current.stack}
87584
87615
  GenericSelectComp,
87585
87616
  __spreadProps(__spreadValues({
87586
87617
  rowId,
87618
+ fullValue,
87587
87619
  initialValue: text2
87588
87620
  }, dataTest), {
87589
87621
  finishEdit: (newVal2, doNotStopEditing) => {
@@ -87651,6 +87683,13 @@ ${latestSubscriptionCallbackError.current.stack}
87651
87683
  }, dataTest), {
87652
87684
  className: "tg-cell-wrapper",
87653
87685
  "data-copy-text": text2,
87686
+ "data-copy-json": JSON.stringify(
87687
+ //tnw: eventually we'll parse these back out and use either the fullValue (for the generic selects) or the regular text vals for everything else
87688
+ column.type === "genericSelect" ? {
87689
+ __strVal: fullValue,
87690
+ __genSelCol: column.path
87691
+ } : { __strVal: text2 }
87692
+ ),
87654
87693
  title: title || void 0
87655
87694
  }),
87656
87695
  val2
@@ -87997,8 +88036,13 @@ ${latestSubscriptionCallbackError.current.stack}
87997
88036
  {
87998
88037
  key: "copyCell",
87999
88038
  onClick: () => {
88039
+ const specificColumn = cellWrapper.getAttribute("data-test");
88040
+ this.handleCopyRows([cellWrapper.closest(".rt-tr")], {
88041
+ specificColumn,
88042
+ onFinishMsg: "Cell copied"
88043
+ });
88000
88044
  const [text2, jsonText] = this.getCellCopyText(cellWrapper);
88001
- this.handleCopyHelper(text2, jsonText, "Cell copied");
88045
+ this.handleCopyHelper(text2, jsonText);
88002
88046
  },
88003
88047
  text: "Cell"
88004
88048
  }
@@ -88040,7 +88084,7 @@ ${latestSubscriptionCallbackError.current.stack}
88040
88084
  {
88041
88085
  key: "copySelectedRows",
88042
88086
  onClick: () => {
88043
- this.handleCopyRow(row);
88087
+ this.handleCopyRows([row]);
88044
88088
  },
88045
88089
  text: "Row"
88046
88090
  }
@@ -88286,6 +88330,10 @@ ${latestSubscriptionCallbackError.current.stack}
88286
88330
  "data-test": columnTitleTextified,
88287
88331
  "data-path": path2,
88288
88332
  "data-copy-text": columnTitleTextified,
88333
+ "data-copy-json": JSON.stringify({
88334
+ __strVal: columnTitleTextified,
88335
+ __isHeaderCell: true
88336
+ }),
88289
88337
  className: classNames$1("tg-react-table-column-header", {
88290
88338
  "sort-active": sortUp || sortDown
88291
88339
  })
@@ -89302,6 +89350,20 @@ ${latestSubscriptionCallbackError.current.stack}
89302
89350
  return isClean;
89303
89351
  }
89304
89352
  __name(isEntityClean, "isEntityClean");
89353
+ const formatPasteData = /* @__PURE__ */ __name(({ schema: schema2, newVal: newVal2, path: path2 }) => {
89354
+ const pathToField = getFieldPathToField(schema2);
89355
+ const column = pathToField[path2];
89356
+ if (column.type === "genericSelect") {
89357
+ if ((newVal2 == null ? void 0 : newVal2.__genSelCol) === path2) {
89358
+ newVal2 = newVal2.__strVal;
89359
+ } else {
89360
+ newVal2 = void 0;
89361
+ }
89362
+ } else {
89363
+ newVal2 = Object.hasOwn(newVal2, "__strVal") ? newVal2.__strVal : newVal2;
89364
+ }
89365
+ return newVal2;
89366
+ }, "formatPasteData");
89305
89367
  const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component) => (props) => {
89306
89368
  const r2 = reactExports.useRef();
89307
89369
  const memoedHotkeys = reactExports.useMemo(
@@ -114781,10 +114843,9 @@ ${latestSubscriptionCallbackError.current.stack}
114781
114843
  let existingSequenceData = tidyUpSequenceData(_existingSequenceData, __spreadValues({
114782
114844
  doNotRemoveInvalidChars: true
114783
114845
  }, options));
114784
- const sequenceDataToInsert = tidyUpSequenceData(
114785
- _sequenceDataToInsert,
114786
- options
114787
- );
114846
+ const sequenceDataToInsert = tidyUpSequenceData(_sequenceDataToInsert, __spreadValues({
114847
+ topLevelSeqData: existingSequenceData
114848
+ }, options));
114788
114849
  const newSequenceData = lodashExports.cloneDeep(existingSequenceData);
114789
114850
  const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
114790
114851
  let caretPosition2 = caretPositionOrRange;
@@ -134100,7 +134161,7 @@ ${seq.sequence}
134100
134161
  if (!features2[feature.seq_id])
134101
134162
  features2[feature.seq_id] = [];
134102
134163
  const attributes = feature.attributes || {};
134103
- const name2 = _$1.get(attributes, "ID[0]");
134164
+ const name2 = lodashExports.get(attributes, "ID[0]");
134104
134165
  features2[feature.seq_id].push({
134105
134166
  name: name2,
134106
134167
  start: feature.start,
@@ -150351,8 +150412,8 @@ ${seq.sequence}
150351
150412
  }
150352
150413
  __name(Caret$2, "Caret$2");
150353
150414
  const isEq = /* @__PURE__ */ __name((o1, o2) => {
150354
- const isEq2 = _$1.isEqualWith(o1, o2, function(val1, val2) {
150355
- if (_$1.isFunction(val1) && _$1.isFunction(val2)) {
150415
+ const isEq2 = lodashExports.isEqualWith(o1, o2, function(val1, val2) {
150416
+ if (lodashExports.isFunction(val1) && lodashExports.isFunction(val2)) {
150356
150417
  return val1 === val2 || val1.toString() === val2.toString();
150357
150418
  }
150358
150419
  });
@@ -155139,7 +155200,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155139
155200
  }
155140
155201
  __name(showFileDialog, "showFileDialog");
155141
155202
  const name = "@teselagen/ove";
155142
- const version = "0.3.51";
155203
+ const version = "0.3.53";
155143
155204
  const main = "./src/index.js";
155144
155205
  const exports$1 = {
155145
155206
  ".": {
@@ -158226,6 +158287,9 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
158226
158287
  sequence: clipboardData.getData("text/plain") || e2.target.value
158227
158288
  };
158228
158289
  }
158290
+ if (sequenceData2.isProtein && !seqDataToInsert.proteinSequence) {
158291
+ seqDataToInsert.proteinSequence = seqDataToInsert.sequence;
158292
+ }
158229
158293
  seqDataToInsert = tidyUpSequenceData(seqDataToInsert, {
158230
158294
  topLevelSeqData: sequenceData2,
158231
158295
  provideNewIdsForAnnotations: true,
@@ -176027,16 +176091,14 @@ ${seqDataToCopy}\r
176027
176091
  onClick: () => __async(this, null, function* () {
176028
176092
  try {
176029
176093
  const canvas = yield Promise.resolve().then(() => html2canvas_esm);
176030
- canvas.default(document.querySelector(".ve-digest-container")).then(
176031
- (canvas2) => {
176032
- canvas2.toBlob(
176033
- (blob) => navigator.clipboard.write([
176034
- new window.ClipboardItem({ "image/png": blob })
176035
- ])
176036
- );
176037
- window.toastr.success("Image copied to clipboard!");
176038
- }
176039
- );
176094
+ canvas.default(document.querySelector(".ve-digest-container")).then((canvas2) => {
176095
+ canvas2.toBlob(
176096
+ (blob) => navigator.clipboard.write([
176097
+ new window.ClipboardItem({ "image/png": blob })
176098
+ ])
176099
+ );
176100
+ window.toastr.success("Image copied to clipboard!");
176101
+ });
176040
176102
  } catch (e2) {
176041
176103
  window.toastr.error(
176042
176104
  "Error copying the image, try just taking a screenshot instead ;)"