@teselagen/ove 0.3.52 → 0.3.53

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
@@ -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
@@ -45028,16 +45027,25 @@ ${latestSubscriptionCallbackError.current.stack}
45028
45027
  var _cof = /* @__PURE__ */ __name(function(it) {
45029
45028
  return toString$4.call(it).slice(8, -1);
45030
45029
  }, "_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
- };
45030
+ var _iobject;
45031
+ var hasRequired_iobject;
45032
+ function require_iobject() {
45033
+ if (hasRequired_iobject)
45034
+ return _iobject;
45035
+ hasRequired_iobject = 1;
45036
+ var cof2 = _cof;
45037
+ _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
45038
+ return cof2(it) == "String" ? it.split("") : Object(it);
45039
+ };
45040
+ return _iobject;
45041
+ }
45042
+ __name(require_iobject, "require_iobject");
45035
45043
  var _defined = /* @__PURE__ */ __name(function(it) {
45036
45044
  if (it == void 0)
45037
45045
  throw TypeError("Can't call method on " + it);
45038
45046
  return it;
45039
45047
  }, "_defined");
45040
- var IObject = _iobject;
45048
+ var IObject = require_iobject();
45041
45049
  var defined$2 = _defined;
45042
45050
  var _toIobject = /* @__PURE__ */ __name(function(it) {
45043
45051
  return IObject(defined$2(it));
@@ -45134,7 +45142,15 @@ ${latestSubscriptionCallbackError.current.stack}
45134
45142
  var _objectGops = {};
45135
45143
  _objectGops.f = Object.getOwnPropertySymbols;
45136
45144
  var _objectPie = {};
45137
- _objectPie.f = {}.propertyIsEnumerable;
45145
+ var hasRequired_objectPie;
45146
+ function require_objectPie() {
45147
+ if (hasRequired_objectPie)
45148
+ return _objectPie;
45149
+ hasRequired_objectPie = 1;
45150
+ _objectPie.f = {}.propertyIsEnumerable;
45151
+ return _objectPie;
45152
+ }
45153
+ __name(require_objectPie, "require_objectPie");
45138
45154
  var defined$1 = _defined;
45139
45155
  var _toObject = /* @__PURE__ */ __name(function(it) {
45140
45156
  return Object(defined$1(it));
@@ -45148,9 +45164,9 @@ ${latestSubscriptionCallbackError.current.stack}
45148
45164
  var DESCRIPTORS2 = require_descriptors();
45149
45165
  var getKeys2 = _objectKeys;
45150
45166
  var gOPS2 = _objectGops;
45151
- var pIE2 = _objectPie;
45167
+ var pIE2 = require_objectPie();
45152
45168
  var toObject2 = _toObject;
45153
- var IObject2 = _iobject;
45169
+ var IObject2 = require_iobject();
45154
45170
  var $assign = Object.assign;
45155
45171
  _objectAssign = !$assign || _fails(function() {
45156
45172
  var A2 = {};
@@ -45785,7 +45801,7 @@ ${latestSubscriptionCallbackError.current.stack}
45785
45801
  }, "_wksDefine");
45786
45802
  var getKeys = _objectKeys;
45787
45803
  var gOPS$1 = _objectGops;
45788
- var pIE$1 = _objectPie;
45804
+ var pIE$1 = require_objectPie();
45789
45805
  var _enumKeys = /* @__PURE__ */ __name(function(it) {
45790
45806
  var result = getKeys(it);
45791
45807
  var getSymbols2 = gOPS$1.f;
@@ -45826,7 +45842,7 @@ ${latestSubscriptionCallbackError.current.stack}
45826
45842
  return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
45827
45843
  }, "getOwnPropertyNames");
45828
45844
  var _objectGopd = {};
45829
- var pIE = _objectPie;
45845
+ var pIE = require_objectPie();
45830
45846
  var createDesc$1 = _propertyDesc;
45831
45847
  var toIObject$1 = _toIobject;
45832
45848
  var toPrimitive$1 = _toPrimitive$1;
@@ -46006,7 +46022,7 @@ ${latestSubscriptionCallbackError.current.stack}
46006
46022
  $GOPD.f = $getOwnPropertyDescriptor;
46007
46023
  $DP.f = $defineProperty;
46008
46024
  _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
46009
- _objectPie.f = $propertyIsEnumerable;
46025
+ require_objectPie().f = $propertyIsEnumerable;
46010
46026
  $GOPS.f = $getOwnPropertySymbols;
46011
46027
  if (DESCRIPTORS && !_library) {
46012
46028
  redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
@@ -85482,6 +85498,15 @@ ${latestSubscriptionCallbackError.current.stack}
85482
85498
  }
85483
85499
  });
85484
85500
  const dataTableEnhancer = compose(
85501
+ // maybe we need this in some cases?
85502
+ // tgFormValues("reduxFormEntities"),
85503
+ // withProps(props => {
85504
+ // const entities = props.reduxFormEntities || props.entities;
85505
+ // return {
85506
+ // _origEntities: props.entities,
85507
+ // entities
85508
+ // };
85509
+ // }),
85485
85510
  //connect to withTableParams here in the dataTable component so that, in the case that the table is not manually connected,
85486
85511
  withTableParams({
85487
85512
  isLocalCall: true
@@ -86340,13 +86365,14 @@ ${latestSubscriptionCallbackError.current.stack}
86340
86365
  }, "formatAndValidateEntities"));
86341
86366
  __publicField(this, "formatAndValidateTableInitial", /* @__PURE__ */ __name(() => {
86342
86367
  const {
86343
- _origEntities: entities,
86368
+ _origEntities,
86369
+ entities,
86344
86370
  initialEntities,
86345
86371
  change: change2,
86346
86372
  reduxFormCellValidation
86347
86373
  } = this.props;
86348
86374
  const { newEnts, validationErrors } = this.formatAndValidateEntities(
86349
- initialEntities || entities
86375
+ initialEntities || entities || _origEntities
86350
86376
  );
86351
86377
  change2("reduxFormEntities", newEnts);
86352
86378
  const toKeep = {};
@@ -86464,16 +86490,33 @@ ${latestSubscriptionCallbackError.current.stack}
86464
86490
  } else if (e2.clipboardData && e2.clipboardData.getData) {
86465
86491
  toPaste = e2.clipboardData.getData("text/plain");
86466
86492
  }
86467
- if (toPaste.includes(",")) {
86468
- try {
86469
- const { data, errors } = papaparse.parse(toPaste, {
86470
- header: false
86493
+ const jsonToPaste = e2.clipboardData.getData("application/json");
86494
+ try {
86495
+ const pastedJson = [];
86496
+ JSON.parse(jsonToPaste).forEach((row) => {
86497
+ const newRow = [];
86498
+ Object.values(row).forEach((cell) => {
86499
+ const cellVal = JSON.parse(cell);
86500
+ newRow.push(cellVal);
86471
86501
  });
86472
- if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
86473
- pasteData = data;
86502
+ pastedJson.push(newRow);
86503
+ });
86504
+ pasteData = pastedJson;
86505
+ if (pasteData[0] && pasteData[0][0] && pasteData[0][0].__isHeaderCell) {
86506
+ pasteData = pasteData.slice(1);
86507
+ }
86508
+ } catch (e22) {
86509
+ if (toPaste.includes(",")) {
86510
+ try {
86511
+ const { data, errors } = papaparse.parse(toPaste, {
86512
+ header: false
86513
+ });
86514
+ if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
86515
+ pasteData = data;
86516
+ }
86517
+ } catch (error) {
86518
+ console.error(`error p982qhgpf9qh`, error);
86474
86519
  }
86475
- } catch (error) {
86476
- console.error(`error p982qhgpf9qh`, error);
86477
86520
  }
86478
86521
  }
86479
86522
  pasteData = pasteData.length ? pasteData : defaultParsePaste(toPaste);
@@ -86492,7 +86535,7 @@ ${latestSubscriptionCallbackError.current.stack}
86492
86535
  entity,
86493
86536
  path: path2,
86494
86537
  schema: schema2,
86495
- newVal: newVal2
86538
+ newVal: formatPasteData({ newVal: newVal2, path: path2, schema: schema2 })
86496
86539
  });
86497
86540
  if (error) {
86498
86541
  newCellValidate[cellId] = error;
@@ -86523,8 +86566,8 @@ ${latestSubscriptionCallbackError.current.stack}
86523
86566
  const indexToPath = lodashExports.invert(pathToIndex);
86524
86567
  const startCellIndex = pathToIndex[primaryCellPath];
86525
86568
  pasteData.forEach((row, i2) => {
86526
- row.forEach((cell, j2) => {
86527
- if (cell) {
86569
+ row.forEach((newVal2, j2) => {
86570
+ if (newVal2) {
86528
86571
  const cellIndexToChange = startCellIndex + j2;
86529
86572
  const entity = entitiesToManipulate[i2];
86530
86573
  if (entity) {
@@ -86535,7 +86578,11 @@ ${latestSubscriptionCallbackError.current.stack}
86535
86578
  entity,
86536
86579
  path: path2,
86537
86580
  schema: schema2,
86538
- newVal: cell
86581
+ newVal: formatPasteData({
86582
+ newVal: newVal2,
86583
+ path: path2,
86584
+ schema: schema2
86585
+ })
86539
86586
  });
86540
86587
  const cellId = `${getIdOrCodeOrIndex(entity)}:${path2}`;
86541
86588
  if (!newSelectedCells[cellId]) {
@@ -86645,17 +86692,11 @@ ${latestSubscriptionCallbackError.current.stack}
86645
86692
  __publicField(this, "getCellCopyText", /* @__PURE__ */ __name((cellWrapper) => {
86646
86693
  const text2 = cellWrapper && cellWrapper.getAttribute("data-copy-text");
86647
86694
  const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
86648
- const toRet = text2 || cellWrapper.textContent || "";
86649
- return [toRet, jsonText];
86695
+ const textContent = text2 || cellWrapper.textContent || "";
86696
+ return [textContent, jsonText];
86650
86697
  }, "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
86698
  __publicField(this, "handleCopyColumn", /* @__PURE__ */ __name((e2, cellWrapper, selectedRecords) => {
86658
- const cellType = cellWrapper.getAttribute("data-test");
86699
+ const specificColumn = cellWrapper.getAttribute("data-test");
86659
86700
  let rowElsToCopy = getAllRows(e2);
86660
86701
  if (!rowElsToCopy)
86661
86702
  return;
@@ -86672,14 +86713,24 @@ ${latestSubscriptionCallbackError.current.stack}
86672
86713
  }
86673
86714
  if (!rowElsToCopy)
86674
86715
  return;
86675
- const textToCopy = lodashExports.map(
86676
- rowElsToCopy,
86677
- (rowEl) => this.getRowCopyText(rowEl, { cellType })
86678
- ).filter((text2) => text2).join("\n");
86716
+ this.handleCopyRows(rowElsToCopy, {
86717
+ specificColumn,
86718
+ onFinishMsg: "Column Copied"
86719
+ });
86720
+ }, "handleCopyColumn"));
86721
+ __publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
86722
+ let textToCopy = [];
86723
+ const jsonToCopy = [];
86724
+ lodashExports.forEach(rowElsToCopy, (rowEl) => {
86725
+ const [t2, j2] = this.getRowCopyText(rowEl, { specificColumn });
86726
+ textToCopy.push(t2);
86727
+ jsonToCopy.push(j2);
86728
+ });
86729
+ textToCopy = textToCopy.filter((text2) => text2).join("\n");
86679
86730
  if (!textToCopy)
86680
86731
  return window.toastr.warning("No text to copy");
86681
- this.handleCopyHelper(textToCopy, void 0, "Column copied");
86682
- }, "handleCopyColumn"));
86732
+ this.handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
86733
+ }, "handleCopyRows"));
86683
86734
  __publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn2) => {
86684
86735
  const { change: change2, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
86685
86736
  const [nextState, patches, inversePatches] = cn(ents, fn2);
@@ -86698,34 +86749,35 @@ ${latestSubscriptionCallbackError.current.stack}
86698
86749
  }
86699
86750
  }));
86700
86751
  }, "updateEntitiesHelper"));
86701
- __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { cellType } = {}) => {
86752
+ __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { specificColumn } = {}) => {
86702
86753
  if (!rowEl)
86703
86754
  return;
86704
- return lodashExports.flatMap(rowEl.children, (cellEl) => {
86755
+ const textContent = [];
86756
+ const jsonText = [];
86757
+ lodashExports.forEach(rowEl.children, (cellEl) => {
86705
86758
  const cellChild = cellEl.querySelector(`[data-copy-text]`);
86706
86759
  if (!cellChild) {
86707
- if (cellType)
86760
+ if (specificColumn)
86708
86761
  return [];
86709
86762
  return;
86710
86763
  }
86711
- if (cellType && cellChild.getAttribute("data-test") !== cellType) {
86764
+ if (specificColumn && cellChild.getAttribute("data-test") !== specificColumn) {
86712
86765
  return [];
86713
86766
  }
86714
- return this.getCellCopyText(cellChild);
86715
- }).join(" ");
86767
+ const [t2, j2] = this.getCellCopyText(cellChild);
86768
+ textContent.push(t2);
86769
+ jsonText.push(j2);
86770
+ });
86771
+ return [lodashExports.flatMap(textContent).join(" "), jsonText];
86716
86772
  }, "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);
86773
+ __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, jsonToCopy, message) => {
86724
86774
  !window.Cypress && copyToClipboard$1(stringToCopy, {
86775
+ onCopy: (clipboardData) => {
86776
+ clipboardData.setData("application/json", JSON.stringify(jsonToCopy));
86777
+ },
86725
86778
  // keep this so that pasting into spreadsheets works.
86726
86779
  format: "text/plain"
86727
86780
  });
86728
- document.removeEventListener("copy", copyHandler);
86729
86781
  window.toastr.success(message);
86730
86782
  }, "handleCopyHelper"));
86731
86783
  __publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
@@ -86733,10 +86785,9 @@ ${latestSubscriptionCallbackError.current.stack}
86733
86785
  const allRowEls = getAllRows(e2);
86734
86786
  if (!allRowEls)
86735
86787
  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");
86788
+ this.handleCopyRows(allRowEls, {
86789
+ onFinishMsg: "Table Copied"
86790
+ });
86740
86791
  } catch (error) {
86741
86792
  console.error(`error:`, error);
86742
86793
  window.toastr.error("Error copying rows.");
@@ -86776,6 +86827,7 @@ ${latestSubscriptionCallbackError.current.stack}
86776
86827
  return;
86777
86828
  const allRows = getAllRows(e2);
86778
86829
  let fullCellText = "";
86830
+ const fullJson = [];
86779
86831
  lodashExports.times(selectionGrid.length, (i2) => {
86780
86832
  const row = selectionGrid[i2];
86781
86833
  if (fullCellText) {
@@ -86784,20 +86836,24 @@ ${latestSubscriptionCallbackError.current.stack}
86784
86836
  if (!row) {
86785
86837
  return;
86786
86838
  } else {
86787
- const rowCopyText = this.getRowCopyText(allRows[i2 + 1]).split(" ");
86839
+ const jsonRow = [];
86840
+ let [rowCopyText, json] = this.getRowCopyText(allRows[i2 + 1]);
86841
+ rowCopyText = rowCopyText.split(" ");
86788
86842
  lodashExports.times(row.length, (i22) => {
86789
86843
  const cell = row[i22];
86790
86844
  if (cell) {
86791
86845
  fullCellText += rowCopyText[i22];
86846
+ jsonRow.push(json[i22]);
86792
86847
  }
86793
86848
  if (i22 !== row.length - 1 && i22 >= firstCellIndex)
86794
86849
  fullCellText += " ";
86795
86850
  });
86851
+ fullJson.push(jsonRow);
86796
86852
  }
86797
86853
  });
86798
86854
  if (!fullCellText)
86799
86855
  return window.toastr.warning("No text to copy");
86800
- this.handleCopyHelper(fullCellText, void 0, "Selected cells copied");
86856
+ this.handleCopyHelper(fullCellText, fullJson, "Selected cells copied");
86801
86857
  }, "handleCopySelectedCells"));
86802
86858
  __publicField(this, "handleCopySelectedRows", /* @__PURE__ */ __name((selectedRecords, e2) => {
86803
86859
  const { entities = [] } = computePresets(this.props);
@@ -86814,10 +86870,9 @@ ${latestSubscriptionCallbackError.current.stack}
86814
86870
  if (!allRowEls)
86815
86871
  return;
86816
86872
  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");
86873
+ this.handleCopyRows(rowEls, {
86874
+ onFinishMsg: "Selected rows copied"
86875
+ });
86821
86876
  } catch (error) {
86822
86877
  console.error(`error:`, error);
86823
86878
  window.toastr.error("Error copying rows.");
@@ -87552,6 +87607,7 @@ ${latestSubscriptionCallbackError.current.stack}
87552
87607
  }
87553
87608
  const oldFunc = tableColumn.Cell;
87554
87609
  tableColumn.Cell = (...args) => {
87610
+ var _a2;
87555
87611
  const [row] = args;
87556
87612
  const rowId = getIdOrCodeOrIndex(row.original, row.index);
87557
87613
  const cellId = `${rowId}:${row.column.path}`;
@@ -87562,6 +87618,7 @@ ${latestSubscriptionCallbackError.current.stack}
87562
87618
  const dataTest = {
87563
87619
  "data-test": "tgCell_" + column.path
87564
87620
  };
87621
+ const fullValue = (_a2 = row.original) == null ? void 0 : _a2[row.column.path];
87565
87622
  if (isCellEditable && isBool) {
87566
87623
  val2 = /* @__PURE__ */ React$2.createElement(
87567
87624
  Checkbox,
@@ -87584,6 +87641,7 @@ ${latestSubscriptionCallbackError.current.stack}
87584
87641
  GenericSelectComp,
87585
87642
  __spreadProps(__spreadValues({
87586
87643
  rowId,
87644
+ fullValue,
87587
87645
  initialValue: text2
87588
87646
  }, dataTest), {
87589
87647
  finishEdit: (newVal2, doNotStopEditing) => {
@@ -87651,6 +87709,13 @@ ${latestSubscriptionCallbackError.current.stack}
87651
87709
  }, dataTest), {
87652
87710
  className: "tg-cell-wrapper",
87653
87711
  "data-copy-text": text2,
87712
+ "data-copy-json": JSON.stringify(
87713
+ //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
87714
+ column.type === "genericSelect" ? {
87715
+ __strVal: fullValue,
87716
+ __genSelCol: column.path
87717
+ } : { __strVal: text2 }
87718
+ ),
87654
87719
  title: title || void 0
87655
87720
  }),
87656
87721
  val2
@@ -87997,8 +88062,13 @@ ${latestSubscriptionCallbackError.current.stack}
87997
88062
  {
87998
88063
  key: "copyCell",
87999
88064
  onClick: () => {
88065
+ const specificColumn = cellWrapper.getAttribute("data-test");
88066
+ this.handleCopyRows([cellWrapper.closest(".rt-tr")], {
88067
+ specificColumn,
88068
+ onFinishMsg: "Cell copied"
88069
+ });
88000
88070
  const [text2, jsonText] = this.getCellCopyText(cellWrapper);
88001
- this.handleCopyHelper(text2, jsonText, "Cell copied");
88071
+ this.handleCopyHelper(text2, jsonText);
88002
88072
  },
88003
88073
  text: "Cell"
88004
88074
  }
@@ -88040,7 +88110,7 @@ ${latestSubscriptionCallbackError.current.stack}
88040
88110
  {
88041
88111
  key: "copySelectedRows",
88042
88112
  onClick: () => {
88043
- this.handleCopyRow(row);
88113
+ this.handleCopyRows([row]);
88044
88114
  },
88045
88115
  text: "Row"
88046
88116
  }
@@ -88286,6 +88356,10 @@ ${latestSubscriptionCallbackError.current.stack}
88286
88356
  "data-test": columnTitleTextified,
88287
88357
  "data-path": path2,
88288
88358
  "data-copy-text": columnTitleTextified,
88359
+ "data-copy-json": JSON.stringify({
88360
+ __strVal: columnTitleTextified,
88361
+ __isHeaderCell: true
88362
+ }),
88289
88363
  className: classNames$1("tg-react-table-column-header", {
88290
88364
  "sort-active": sortUp || sortDown
88291
88365
  })
@@ -89302,6 +89376,20 @@ ${latestSubscriptionCallbackError.current.stack}
89302
89376
  return isClean;
89303
89377
  }
89304
89378
  __name(isEntityClean, "isEntityClean");
89379
+ const formatPasteData = /* @__PURE__ */ __name(({ schema: schema2, newVal: newVal2, path: path2 }) => {
89380
+ const pathToField = getFieldPathToField(schema2);
89381
+ const column = pathToField[path2];
89382
+ if (column.type === "genericSelect") {
89383
+ if ((newVal2 == null ? void 0 : newVal2.__genSelCol) === path2) {
89384
+ newVal2 = newVal2.__strVal;
89385
+ } else {
89386
+ newVal2 = void 0;
89387
+ }
89388
+ } else {
89389
+ newVal2 = Object.hasOwn(newVal2, "__strVal") ? newVal2.__strVal : newVal2;
89390
+ }
89391
+ return newVal2;
89392
+ }, "formatPasteData");
89305
89393
  const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component) => (props) => {
89306
89394
  const r2 = reactExports.useRef();
89307
89395
  const memoedHotkeys = reactExports.useMemo(
@@ -134100,7 +134188,7 @@ ${seq.sequence}
134100
134188
  if (!features2[feature.seq_id])
134101
134189
  features2[feature.seq_id] = [];
134102
134190
  const attributes = feature.attributes || {};
134103
- const name2 = _$1.get(attributes, "ID[0]");
134191
+ const name2 = lodashExports.get(attributes, "ID[0]");
134104
134192
  features2[feature.seq_id].push({
134105
134193
  name: name2,
134106
134194
  start: feature.start,
@@ -150351,8 +150439,8 @@ ${seq.sequence}
150351
150439
  }
150352
150440
  __name(Caret$2, "Caret$2");
150353
150441
  const isEq = /* @__PURE__ */ __name((o1, o2) => {
150354
- const isEq2 = _$1.isEqualWith(o1, o2, function(val1, val2) {
150355
- if (_$1.isFunction(val1) && _$1.isFunction(val2)) {
150442
+ const isEq2 = lodashExports.isEqualWith(o1, o2, function(val1, val2) {
150443
+ if (lodashExports.isFunction(val1) && lodashExports.isFunction(val2)) {
150356
150444
  return val1 === val2 || val1.toString() === val2.toString();
150357
150445
  }
150358
150446
  });
@@ -155139,7 +155227,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155139
155227
  }
155140
155228
  __name(showFileDialog, "showFileDialog");
155141
155229
  const name = "@teselagen/ove";
155142
- const version = "0.3.51";
155230
+ const version = "0.3.52";
155143
155231
  const main = "./src/index.js";
155144
155232
  const exports$1 = {
155145
155233
  ".": {
@@ -176027,16 +176115,14 @@ ${seqDataToCopy}\r
176027
176115
  onClick: () => __async(this, null, function* () {
176028
176116
  try {
176029
176117
  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
- );
176118
+ canvas.default(document.querySelector(".ve-digest-container")).then((canvas2) => {
176119
+ canvas2.toBlob(
176120
+ (blob) => navigator.clipboard.write([
176121
+ new window.ClipboardItem({ "image/png": blob })
176122
+ ])
176123
+ );
176124
+ window.toastr.success("Image copied to clipboard!");
176125
+ });
176040
176126
  } catch (e2) {
176041
176127
  window.toastr.error(
176042
176128
  "Error copying the image, try just taking a screenshot instead ;)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.52",
3
+ "version": "0.3.53",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -15,10 +15,10 @@
15
15
  "dependencies": {
16
16
  "@teselagen/sequence-utils": "0.3.12",
17
17
  "@teselagen/range-utils": "0.3.7",
18
- "@teselagen/ui": "0.3.41",
18
+ "@teselagen/ui": "0.3.42",
19
19
  "@teselagen/file-utils": "0.3.9",
20
20
  "@teselagen/bounce-loader": "0.3.11",
21
- "@teselagen/bio-parsers": "0.4.5",
21
+ "@teselagen/bio-parsers": "0.4.6",
22
22
  "@blueprintjs/core": "3.52.0",
23
23
  "@blueprintjs/datetime": "3.23.19",
24
24
  "@blueprintjs/icons": "3.33.0",
@@ -125,16 +125,16 @@ export default function Ladder({
125
125
  onClick={async () => {
126
126
  try {
127
127
  const canvas = await import("html2canvas");
128
- canvas.default(document.querySelector(".ve-digest-container")).then(
129
- canvas => {
128
+ canvas
129
+ .default(document.querySelector(".ve-digest-container"))
130
+ .then(canvas => {
130
131
  canvas.toBlob(blob =>
131
132
  navigator.clipboard.write([
132
133
  new window.ClipboardItem({ "image/png": blob })
133
134
  ])
134
135
  );
135
136
  window.toastr.success("Image copied to clipboard!");
136
- }
137
- );
137
+ });
138
138
  } catch (e) {
139
139
  window.toastr.error(
140
140
  "Error copying the image, try just taking a screenshot instead ;)"
@@ -1,6 +1,6 @@
1
1
  import { pick } from "lodash";
2
2
  import { shouldUpdate } from "recompose";
3
- import _ from "lodash";
3
+ import { isEqualWith, isFunction } from "lodash";
4
4
 
5
5
  // import deepEqual from "deep-equal";
6
6
 
@@ -22,8 +22,8 @@ const onlyUpdateForKeys = propKeys => {
22
22
  export default onlyUpdateForKeys;
23
23
 
24
24
  const isEq = (o1, o2) => {
25
- const isEq = _.isEqualWith(o1, o2, function (val1, val2) {
26
- if (_.isFunction(val1) && _.isFunction(val2)) {
25
+ const isEq = isEqualWith(o1, o2, function (val1, val2) {
26
+ if (isFunction(val1) && isFunction(val2)) {
27
27
  return val1 === val2 || val1.toString() === val2.toString();
28
28
  }
29
29
  });
@@ -1,9 +1,9 @@
1
1
  import { shouldUpdate } from "recompose";
2
- import _ from "lodash";
2
+ import { isEqualWith, isFunction } from "lodash";
3
3
 
4
4
  const isEq = (o1, o2) => {
5
- const isEq = _.isEqualWith(o1, o2, function (val1, val2) {
6
- if (_.isFunction(val1) && _.isFunction(val2)) {
5
+ const isEq = isEqualWith(o1, o2, function (val1, val2) {
6
+ if (isFunction(val1) && isFunction(val2)) {
7
7
  return val1 === val2 || val1.toString() === val2.toString();
8
8
  }
9
9
  });