@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.es.js CHANGED
@@ -11341,10 +11341,10 @@ function m$1(n2, r2) {
11341
11341
  tn[n2] || (tn[n2] = r2);
11342
11342
  }
11343
11343
  __name(m$1, "m$1");
11344
- function _$2() {
11344
+ function _$1() {
11345
11345
  return U;
11346
11346
  }
11347
- __name(_$2, "_$2");
11347
+ __name(_$1, "_$1");
11348
11348
  function j$1(n2, r2) {
11349
11349
  r2 && (b$1("Patches"), n2.u = [], n2.s = [], n2.v = r2);
11350
11350
  }
@@ -11438,12 +11438,12 @@ function E(n2) {
11438
11438
  __name(E, "E");
11439
11439
  function N(n2, r2, t2) {
11440
11440
  var e2 = s(r2) ? b$1("MapSet").F(r2, t2) : v$1(r2) ? b$1("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
11441
- 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 }, i = e3, o2 = en;
11441
+ 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 }, i = e3, o2 = en;
11442
11442
  t3 && (i = [e3], o2 = on$1);
11443
11443
  var u2 = Proxy.revocable(i, o2), a2 = u2.revoke, f2 = u2.proxy;
11444
11444
  return e3.k = f2, e3.j = a2, f2;
11445
11445
  }(r2, t2) : b$1("ES5").J(r2, t2);
11446
- return (t2 ? t2.A : _$2()).p.push(e2), e2;
11446
+ return (t2 ? t2.A : _$1()).p.push(e2), e2;
11447
11447
  }
11448
11448
  __name(N, "N");
11449
11449
  function R(e2) {
@@ -17720,7 +17720,6 @@ lodash.exports;
17720
17720
  }).call(commonjsGlobal);
17721
17721
  })(lodash, lodash.exports);
17722
17722
  var lodashExports = lodash.exports;
17723
- const _$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports);
17724
17723
  function _extends$q() {
17725
17724
  _extends$q = Object.assign ? Object.assign.bind() : function(target) {
17726
17725
  for (var i = 1; i < arguments.length; i++) {
@@ -55601,6 +55600,15 @@ const openColumn = __spreadProps(__spreadValues({}, viewColumn), {
55601
55600
  }
55602
55601
  });
55603
55602
  const dataTableEnhancer = compose(
55603
+ // maybe we need this in some cases?
55604
+ // tgFormValues("reduxFormEntities"),
55605
+ // withProps(props => {
55606
+ // const entities = props.reduxFormEntities || props.entities;
55607
+ // return {
55608
+ // _origEntities: props.entities,
55609
+ // entities
55610
+ // };
55611
+ // }),
55604
55612
  //connect to withTableParams here in the dataTable component so that, in the case that the table is not manually connected,
55605
55613
  withTableParams({
55606
55614
  isLocalCall: true
@@ -56459,13 +56467,14 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56459
56467
  }, "formatAndValidateEntities"));
56460
56468
  __publicField(this, "formatAndValidateTableInitial", /* @__PURE__ */ __name(() => {
56461
56469
  const {
56462
- _origEntities: entities,
56470
+ _origEntities,
56471
+ entities,
56463
56472
  initialEntities,
56464
56473
  change: change2,
56465
56474
  reduxFormCellValidation
56466
56475
  } = this.props;
56467
56476
  const { newEnts, validationErrors } = this.formatAndValidateEntities(
56468
- initialEntities || entities
56477
+ initialEntities || entities || _origEntities
56469
56478
  );
56470
56479
  change2("reduxFormEntities", newEnts);
56471
56480
  const toKeep = {};
@@ -56583,16 +56592,33 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56583
56592
  } else if (e2.clipboardData && e2.clipboardData.getData) {
56584
56593
  toPaste = e2.clipboardData.getData("text/plain");
56585
56594
  }
56586
- if (toPaste.includes(",")) {
56587
- try {
56588
- const { data, errors } = papaparse.parse(toPaste, {
56589
- header: false
56595
+ const jsonToPaste = e2.clipboardData.getData("application/json");
56596
+ try {
56597
+ const pastedJson = [];
56598
+ JSON.parse(jsonToPaste).forEach((row) => {
56599
+ const newRow = [];
56600
+ Object.values(row).forEach((cell) => {
56601
+ const cellVal = JSON.parse(cell);
56602
+ newRow.push(cellVal);
56590
56603
  });
56591
- if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
56592
- pasteData = data;
56604
+ pastedJson.push(newRow);
56605
+ });
56606
+ pasteData = pastedJson;
56607
+ if (pasteData[0] && pasteData[0][0] && pasteData[0][0].__isHeaderCell) {
56608
+ pasteData = pasteData.slice(1);
56609
+ }
56610
+ } catch (e22) {
56611
+ if (toPaste.includes(",")) {
56612
+ try {
56613
+ const { data, errors } = papaparse.parse(toPaste, {
56614
+ header: false
56615
+ });
56616
+ if ((data == null ? void 0 : data.length) && !(errors == null ? void 0 : errors.length)) {
56617
+ pasteData = data;
56618
+ }
56619
+ } catch (error) {
56620
+ console.error(`error p982qhgpf9qh`, error);
56593
56621
  }
56594
- } catch (error) {
56595
- console.error(`error p982qhgpf9qh`, error);
56596
56622
  }
56597
56623
  }
56598
56624
  pasteData = pasteData.length ? pasteData : defaultParsePaste(toPaste);
@@ -56611,7 +56637,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56611
56637
  entity,
56612
56638
  path: path2,
56613
56639
  schema: schema2,
56614
- newVal: newVal2
56640
+ newVal: formatPasteData({ newVal: newVal2, path: path2, schema: schema2 })
56615
56641
  });
56616
56642
  if (error) {
56617
56643
  newCellValidate[cellId] = error;
@@ -56642,8 +56668,8 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56642
56668
  const indexToPath = lodashExports.invert(pathToIndex);
56643
56669
  const startCellIndex = pathToIndex[primaryCellPath];
56644
56670
  pasteData.forEach((row, i) => {
56645
- row.forEach((cell, j) => {
56646
- if (cell) {
56671
+ row.forEach((newVal2, j) => {
56672
+ if (newVal2) {
56647
56673
  const cellIndexToChange = startCellIndex + j;
56648
56674
  const entity = entitiesToManipulate[i];
56649
56675
  if (entity) {
@@ -56654,7 +56680,11 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56654
56680
  entity,
56655
56681
  path: path2,
56656
56682
  schema: schema2,
56657
- newVal: cell
56683
+ newVal: formatPasteData({
56684
+ newVal: newVal2,
56685
+ path: path2,
56686
+ schema: schema2
56687
+ })
56658
56688
  });
56659
56689
  const cellId = `${getIdOrCodeOrIndex(entity)}:${path2}`;
56660
56690
  if (!newSelectedCells[cellId]) {
@@ -56764,17 +56794,11 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56764
56794
  __publicField(this, "getCellCopyText", /* @__PURE__ */ __name((cellWrapper) => {
56765
56795
  const text2 = cellWrapper && cellWrapper.getAttribute("data-copy-text");
56766
56796
  const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
56767
- const toRet = text2 || cellWrapper.textContent || "";
56768
- return [toRet, jsonText];
56797
+ const textContent = text2 || cellWrapper.textContent || "";
56798
+ return [textContent, jsonText];
56769
56799
  }, "getCellCopyText"));
56770
- __publicField(this, "handleCopyRow", /* @__PURE__ */ __name((rowEl) => {
56771
- const text2 = this.getRowCopyText(rowEl);
56772
- if (!text2)
56773
- return window.toastr.warning("No text to copy");
56774
- this.handleCopyHelper(text2, void 0, "Row Copied");
56775
- }, "handleCopyRow"));
56776
56800
  __publicField(this, "handleCopyColumn", /* @__PURE__ */ __name((e2, cellWrapper, selectedRecords) => {
56777
- const cellType = cellWrapper.getAttribute("data-test");
56801
+ const specificColumn = cellWrapper.getAttribute("data-test");
56778
56802
  let rowElsToCopy = getAllRows(e2);
56779
56803
  if (!rowElsToCopy)
56780
56804
  return;
@@ -56791,14 +56815,24 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56791
56815
  }
56792
56816
  if (!rowElsToCopy)
56793
56817
  return;
56794
- const textToCopy = lodashExports.map(
56795
- rowElsToCopy,
56796
- (rowEl) => this.getRowCopyText(rowEl, { cellType })
56797
- ).filter((text2) => text2).join("\n");
56818
+ this.handleCopyRows(rowElsToCopy, {
56819
+ specificColumn,
56820
+ onFinishMsg: "Column Copied"
56821
+ });
56822
+ }, "handleCopyColumn"));
56823
+ __publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
56824
+ let textToCopy = [];
56825
+ const jsonToCopy = [];
56826
+ lodashExports.forEach(rowElsToCopy, (rowEl) => {
56827
+ const [t2, j] = this.getRowCopyText(rowEl, { specificColumn });
56828
+ textToCopy.push(t2);
56829
+ jsonToCopy.push(j);
56830
+ });
56831
+ textToCopy = textToCopy.filter((text2) => text2).join("\n");
56798
56832
  if (!textToCopy)
56799
56833
  return window.toastr.warning("No text to copy");
56800
- this.handleCopyHelper(textToCopy, void 0, "Column copied");
56801
- }, "handleCopyColumn"));
56834
+ this.handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
56835
+ }, "handleCopyRows"));
56802
56836
  __publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn4) => {
56803
56837
  const { change: change2, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
56804
56838
  const [nextState, patches, inversePatches] = cn(ents, fn4);
@@ -56817,34 +56851,35 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56817
56851
  }
56818
56852
  }));
56819
56853
  }, "updateEntitiesHelper"));
56820
- __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { cellType } = {}) => {
56854
+ __publicField(this, "getRowCopyText", /* @__PURE__ */ __name((rowEl, { specificColumn } = {}) => {
56821
56855
  if (!rowEl)
56822
56856
  return;
56823
- return lodashExports.flatMap(rowEl.children, (cellEl) => {
56857
+ const textContent = [];
56858
+ const jsonText = [];
56859
+ lodashExports.forEach(rowEl.children, (cellEl) => {
56824
56860
  const cellChild = cellEl.querySelector(`[data-copy-text]`);
56825
56861
  if (!cellChild) {
56826
- if (cellType)
56862
+ if (specificColumn)
56827
56863
  return [];
56828
56864
  return;
56829
56865
  }
56830
- if (cellType && cellChild.getAttribute("data-test") !== cellType) {
56866
+ if (specificColumn && cellChild.getAttribute("data-test") !== specificColumn) {
56831
56867
  return [];
56832
56868
  }
56833
- return this.getCellCopyText(cellChild);
56834
- }).join(" ");
56869
+ const [t2, j] = this.getCellCopyText(cellChild);
56870
+ textContent.push(t2);
56871
+ jsonText.push(j);
56872
+ });
56873
+ return [lodashExports.flatMap(textContent).join(" "), jsonText];
56835
56874
  }, "getRowCopyText"));
56836
- __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, objToCopy, message) => {
56837
- const copyHandler = /* @__PURE__ */ __name((e2) => {
56838
- e2.preventDefault();
56839
- e2.clipboardData.setData("application/json", JSON.stringify(objToCopy));
56840
- e2.clipboardData.setData("text/plain", stringToCopy);
56841
- }, "copyHandler");
56842
- document.addEventListener("copy", copyHandler);
56875
+ __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, jsonToCopy, message) => {
56843
56876
  !window.Cypress && copyToClipboard$1(stringToCopy, {
56877
+ onCopy: (clipboardData) => {
56878
+ clipboardData.setData("application/json", JSON.stringify(jsonToCopy));
56879
+ },
56844
56880
  // keep this so that pasting into spreadsheets works.
56845
56881
  format: "text/plain"
56846
56882
  });
56847
- document.removeEventListener("copy", copyHandler);
56848
56883
  window.toastr.success(message);
56849
56884
  }, "handleCopyHelper"));
56850
56885
  __publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
@@ -56852,10 +56887,9 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56852
56887
  const allRowEls = getAllRows(e2);
56853
56888
  if (!allRowEls)
56854
56889
  return;
56855
- const textToCopy = lodashExports.map(allRowEls, (rowEl) => this.getRowCopyText(rowEl)).filter((text2) => text2).join("\n");
56856
- if (!textToCopy)
56857
- return window.toastr.warning("No text to copy");
56858
- this.handleCopyHelper(textToCopy, void 0, "Table copied");
56890
+ this.handleCopyRows(allRowEls, {
56891
+ onFinishMsg: "Table Copied"
56892
+ });
56859
56893
  } catch (error) {
56860
56894
  console.error(`error:`, error);
56861
56895
  window.toastr.error("Error copying rows.");
@@ -56895,6 +56929,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56895
56929
  return;
56896
56930
  const allRows = getAllRows(e2);
56897
56931
  let fullCellText = "";
56932
+ const fullJson = [];
56898
56933
  lodashExports.times(selectionGrid.length, (i) => {
56899
56934
  const row = selectionGrid[i];
56900
56935
  if (fullCellText) {
@@ -56903,20 +56938,24 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56903
56938
  if (!row) {
56904
56939
  return;
56905
56940
  } else {
56906
- const rowCopyText = this.getRowCopyText(allRows[i + 1]).split(" ");
56941
+ const jsonRow = [];
56942
+ let [rowCopyText, json] = this.getRowCopyText(allRows[i + 1]);
56943
+ rowCopyText = rowCopyText.split(" ");
56907
56944
  lodashExports.times(row.length, (i2) => {
56908
56945
  const cell = row[i2];
56909
56946
  if (cell) {
56910
56947
  fullCellText += rowCopyText[i2];
56948
+ jsonRow.push(json[i2]);
56911
56949
  }
56912
56950
  if (i2 !== row.length - 1 && i2 >= firstCellIndex)
56913
56951
  fullCellText += " ";
56914
56952
  });
56953
+ fullJson.push(jsonRow);
56915
56954
  }
56916
56955
  });
56917
56956
  if (!fullCellText)
56918
56957
  return window.toastr.warning("No text to copy");
56919
- this.handleCopyHelper(fullCellText, void 0, "Selected cells copied");
56958
+ this.handleCopyHelper(fullCellText, fullJson, "Selected cells copied");
56920
56959
  }, "handleCopySelectedCells"));
56921
56960
  __publicField(this, "handleCopySelectedRows", /* @__PURE__ */ __name((selectedRecords, e2) => {
56922
56961
  const { entities = [] } = computePresets(this.props);
@@ -56933,10 +56972,9 @@ const _DataTable = class _DataTable extends React__default$1.Component {
56933
56972
  if (!allRowEls)
56934
56973
  return;
56935
56974
  const rowEls = rowNumbersToCopy.map((i) => allRowEls[i]);
56936
- const textToCopy = lodashExports.map(rowEls, (rowEl) => this.getRowCopyText(rowEl)).filter((text2) => text2).join("\n");
56937
- if (!textToCopy)
56938
- return window.toastr.warning("No text to copy");
56939
- this.handleCopyHelper(textToCopy, void 0, "Selected rows copied");
56975
+ this.handleCopyRows(rowEls, {
56976
+ onFinishMsg: "Selected rows copied"
56977
+ });
56940
56978
  } catch (error) {
56941
56979
  console.error(`error:`, error);
56942
56980
  window.toastr.error("Error copying rows.");
@@ -57671,6 +57709,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
57671
57709
  }
57672
57710
  const oldFunc = tableColumn.Cell;
57673
57711
  tableColumn.Cell = (...args) => {
57712
+ var _a2;
57674
57713
  const [row] = args;
57675
57714
  const rowId = getIdOrCodeOrIndex(row.original, row.index);
57676
57715
  const cellId = `${rowId}:${row.column.path}`;
@@ -57681,6 +57720,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
57681
57720
  const dataTest = {
57682
57721
  "data-test": "tgCell_" + column.path
57683
57722
  };
57723
+ const fullValue = (_a2 = row.original) == null ? void 0 : _a2[row.column.path];
57684
57724
  if (isCellEditable && isBool) {
57685
57725
  val2 = /* @__PURE__ */ React__default$1.createElement(
57686
57726
  Checkbox,
@@ -57703,6 +57743,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
57703
57743
  GenericSelectComp,
57704
57744
  __spreadProps(__spreadValues({
57705
57745
  rowId,
57746
+ fullValue,
57706
57747
  initialValue: text2
57707
57748
  }, dataTest), {
57708
57749
  finishEdit: (newVal2, doNotStopEditing) => {
@@ -57770,6 +57811,13 @@ const _DataTable = class _DataTable extends React__default$1.Component {
57770
57811
  }, dataTest), {
57771
57812
  className: "tg-cell-wrapper",
57772
57813
  "data-copy-text": text2,
57814
+ "data-copy-json": JSON.stringify(
57815
+ //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
57816
+ column.type === "genericSelect" ? {
57817
+ __strVal: fullValue,
57818
+ __genSelCol: column.path
57819
+ } : { __strVal: text2 }
57820
+ ),
57773
57821
  title: title || void 0
57774
57822
  }),
57775
57823
  val2
@@ -58116,8 +58164,13 @@ const _DataTable = class _DataTable extends React__default$1.Component {
58116
58164
  {
58117
58165
  key: "copyCell",
58118
58166
  onClick: () => {
58167
+ const specificColumn = cellWrapper.getAttribute("data-test");
58168
+ this.handleCopyRows([cellWrapper.closest(".rt-tr")], {
58169
+ specificColumn,
58170
+ onFinishMsg: "Cell copied"
58171
+ });
58119
58172
  const [text2, jsonText] = this.getCellCopyText(cellWrapper);
58120
- this.handleCopyHelper(text2, jsonText, "Cell copied");
58173
+ this.handleCopyHelper(text2, jsonText);
58121
58174
  },
58122
58175
  text: "Cell"
58123
58176
  }
@@ -58159,7 +58212,7 @@ const _DataTable = class _DataTable extends React__default$1.Component {
58159
58212
  {
58160
58213
  key: "copySelectedRows",
58161
58214
  onClick: () => {
58162
- this.handleCopyRow(row);
58215
+ this.handleCopyRows([row]);
58163
58216
  },
58164
58217
  text: "Row"
58165
58218
  }
@@ -58405,6 +58458,10 @@ const _DataTable = class _DataTable extends React__default$1.Component {
58405
58458
  "data-test": columnTitleTextified,
58406
58459
  "data-path": path2,
58407
58460
  "data-copy-text": columnTitleTextified,
58461
+ "data-copy-json": JSON.stringify({
58462
+ __strVal: columnTitleTextified,
58463
+ __isHeaderCell: true
58464
+ }),
58408
58465
  className: classNames("tg-react-table-column-header", {
58409
58466
  "sort-active": sortUp || sortDown
58410
58467
  })
@@ -59421,6 +59478,20 @@ function isEntityClean(e2) {
59421
59478
  return isClean;
59422
59479
  }
59423
59480
  __name(isEntityClean, "isEntityClean");
59481
+ const formatPasteData = /* @__PURE__ */ __name(({ schema: schema2, newVal: newVal2, path: path2 }) => {
59482
+ const pathToField = getFieldPathToField(schema2);
59483
+ const column = pathToField[path2];
59484
+ if (column.type === "genericSelect") {
59485
+ if ((newVal2 == null ? void 0 : newVal2.__genSelCol) === path2) {
59486
+ newVal2 = newVal2.__strVal;
59487
+ } else {
59488
+ newVal2 = void 0;
59489
+ }
59490
+ } else {
59491
+ newVal2 = Object.hasOwn(newVal2, "__strVal") ? newVal2.__strVal : newVal2;
59492
+ }
59493
+ return newVal2;
59494
+ }, "formatPasteData");
59424
59495
  const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component2) => (props) => {
59425
59496
  const r2 = useRef();
59426
59497
  const memoedHotkeys = useMemo$1(
@@ -104231,7 +104302,7 @@ function gffToJson(string2) {
104231
104302
  if (!features2[feature.seq_id])
104232
104303
  features2[feature.seq_id] = [];
104233
104304
  const attributes = feature.attributes || {};
104234
- const name2 = _$1.get(attributes, "ID[0]");
104305
+ const name2 = lodashExports.get(attributes, "ID[0]");
104235
104306
  features2[feature.seq_id].push({
104236
104307
  name: name2,
104237
104308
  start: feature.start,
@@ -121076,8 +121147,8 @@ function Caret$2(props) {
121076
121147
  }
121077
121148
  __name(Caret$2, "Caret$2");
121078
121149
  const isEq = /* @__PURE__ */ __name((o1, o2) => {
121079
- const isEq2 = _$1.isEqualWith(o1, o2, function(val1, val2) {
121080
- if (_$1.isFunction(val1) && _$1.isFunction(val2)) {
121150
+ const isEq2 = lodashExports.isEqualWith(o1, o2, function(val1, val2) {
121151
+ if (lodashExports.isFunction(val1) && lodashExports.isFunction(val2)) {
121081
121152
  return val1 === val2 || val1.toString() === val2.toString();
121082
121153
  }
121083
121154
  });
@@ -125885,7 +125956,7 @@ function showFileDialog({ multiple = false, onSelect }) {
125885
125956
  }
125886
125957
  __name(showFileDialog, "showFileDialog");
125887
125958
  const name = "@teselagen/ove";
125888
- const version = "0.3.51";
125959
+ const version = "0.3.52";
125889
125960
  const main = "./src/index.js";
125890
125961
  const exports$1 = {
125891
125962
  ".": {
@@ -148891,16 +148962,14 @@ function Ladder({
148891
148962
  onClick: () => __async(this, null, function* () {
148892
148963
  try {
148893
148964
  const canvas = yield import("./html2canvas.esm-65f48ee4.mjs");
148894
- canvas.default(document.querySelector(".ve-digest-container")).then(
148895
- (canvas2) => {
148896
- canvas2.toBlob(
148897
- (blob) => navigator.clipboard.write([
148898
- new window.ClipboardItem({ "image/png": blob })
148899
- ])
148900
- );
148901
- window.toastr.success("Image copied to clipboard!");
148902
- }
148903
- );
148965
+ canvas.default(document.querySelector(".ve-digest-container")).then((canvas2) => {
148966
+ canvas2.toBlob(
148967
+ (blob) => navigator.clipboard.write([
148968
+ new window.ClipboardItem({ "image/png": blob })
148969
+ ])
148970
+ );
148971
+ window.toastr.success("Image copied to clipboard!");
148972
+ });
148904
148973
  } catch (e2) {
148905
148974
  window.toastr.error(
148906
148975
  "Error copying the image, try just taking a screenshot instead ;)"