@fileverse-dev/dsheet 4.1.20-subsheetLink-1 → 4.1.20-subsheetLink-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.
@@ -50853,10 +50853,10 @@ const Z7 = ({
50853
50853
  }, S.readAsText(b);
50854
50854
  });
50855
50855
  }, CZ = async (e, t, l, n) => {
50856
- const { handleExportToXLSX: i } = await import("./xlsx-export-impl-D4njWqtm.js");
50856
+ const { handleExportToXLSX: i } = await import("./xlsx-export-impl-SsgHuceI.js");
50857
50857
  return i(e, t, l, n);
50858
50858
  }, vZ = async (e, t, l, n) => {
50859
- const { handleExportToODS: i } = await import("./xlsx-export-impl-D4njWqtm.js");
50859
+ const { handleExportToODS: i } = await import("./xlsx-export-impl-SsgHuceI.js");
50860
50860
  return i(e, t, l, n);
50861
50861
  }, Nd = (e) => {
50862
50862
  Th({
@@ -50947,7 +50947,7 @@ const Z7 = ({
50947
50947
  }) => {
50948
50948
  const [s, r] = Xe(!1), u = We(
50949
50949
  async (h, m, b) => {
50950
- const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-DnLseev5.js");
50950
+ const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-BSHH5KeA.js");
50951
50951
  return Z(
50952
50952
  {
50953
50953
  sheetEditorRef: e,
@@ -50978,7 +50978,7 @@ const Z7 = ({
50978
50978
  ), d = We(
50979
50979
  async (h, m, b) => {
50980
50980
  var y;
50981
- const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-DnLseev5.js"), g = h == null ? void 0 : h.target, S = ((y = g == null ? void 0 : g.files) == null ? void 0 : y[0]) || m;
50981
+ const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-BSHH5KeA.js"), g = h == null ? void 0 : h.target, S = ((y = g == null ? void 0 : g.files) == null ? void 0 : y[0]) || m;
50982
50982
  if (!S) return;
50983
50983
  const f = await Z(S);
50984
50984
  return I(
@@ -53347,40 +53347,40 @@ const YM = ({
53347
53347
  const u = vM(e);
53348
53348
  let d = !1;
53349
53349
  return (async () => {
53350
- var b;
53351
- const h = await import("./template-data-list-BYOIK_Nd.js");
53350
+ var b, Z;
53351
+ const h = await import("./template-data-list-apgmwRAT.js");
53352
53352
  if (d || !l.current) return;
53353
- const m = h.TEMPLATES_DATA[u];
53353
+ const m = ((b = h.getTemplateData) == null ? void 0 : b.call(h, u)) ?? h.TEMPLATES_DATA[u];
53354
53354
  if (m) {
53355
- const Z = (b = c.current) == null ? void 0 : b.getSettings().generateSheetId(), I = l.current.getArray(n), g = Array.from(I);
53356
- m[0].order = g.length, m[0].id || (m[0].id = Z);
53357
- const S = [...g, ...m];
53355
+ const I = (Z = c.current) == null ? void 0 : Z.getSettings().generateSheetId(), g = l.current.getArray(n), S = Array.from(g);
53356
+ m[0].order = S.length, m[0].id || (m[0].id = I);
53357
+ const f = [...S, ...m];
53358
53358
  l.current.transact(() => {
53359
- S.forEach((y) => {
53360
- if (y instanceof Te.Map) return;
53361
- const p = qg(y);
53362
- I.push([p()]);
53359
+ f.forEach((p) => {
53360
+ if (p instanceof Te.Map) return;
53361
+ const G = qg(p);
53362
+ g.push([G()]);
53363
53363
  });
53364
53364
  });
53365
- const f = ti(I);
53366
- i.current = f, r(f), o == null || o((y) => y + 1), setTimeout(() => {
53367
- var y;
53368
- (y = c.current) == null || y.activateSheet({
53369
- index: f.length - 1
53365
+ const y = ti(g);
53366
+ i.current = y, r(y), o == null || o((p) => p + 1), setTimeout(() => {
53367
+ var p;
53368
+ (p = c.current) == null || p.activateSheet({
53369
+ index: y.length - 1
53370
53370
  });
53371
- }, 100), s((y) => {
53372
- var p, G, W;
53373
- if ((p = m[0]) != null && p.dataBlockCalcFunction) {
53374
- const V = ((G = m[0]) == null ? void 0 : G.id) ?? Z;
53375
- return V ? {
53376
- ...y,
53377
- [V]: {
53378
- ...(y == null ? void 0 : y[V]) || {},
53379
- ...(W = m[0]) == null ? void 0 : W.dataBlockCalcFunction
53371
+ }, 100), s((p) => {
53372
+ var G, W, V;
53373
+ if ((G = m[0]) != null && G.dataBlockCalcFunction) {
53374
+ const L = ((W = m[0]) == null ? void 0 : W.id) ?? I;
53375
+ return L ? {
53376
+ ...p,
53377
+ [L]: {
53378
+ ...(p == null ? void 0 : p[L]) || {},
53379
+ ...(V = m[0]) == null ? void 0 : V.dataBlockCalcFunction
53380
53380
  }
53381
- } : y;
53381
+ } : p;
53382
53382
  }
53383
- return y;
53383
+ return p;
53384
53384
  });
53385
53385
  }
53386
53386
  t == null || t(null);
@@ -56666,7 +56666,7 @@ async function Iz(e, t) {
56666
56666
  const { convertOdsFileToXlsxFile: b } = await import("./ods-to-xlsx-DeJAYBkD.js");
56667
56667
  h = await b(e);
56668
56668
  }
56669
- const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-DnLseev5.js");
56669
+ const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-BSHH5KeA.js");
56670
56670
  await m(
56671
56671
  {
56672
56672
  sheetEditorRef: c,
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-Dj8ENMMA.js";
1
+ import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as g, x, z as R, A, B as f, D as I, E as L, F as T, G as w, H as y, I as v, J as D, K as M, L as b, M as k, N as z, O, P } from "./index-BEzTziZU.js";
2
2
  import { cy as G, cz as K, cA as U, cG as X, bs as _, e as j, f as B, l as H, a as J, dj as N, dk as q, bb as Y, dl as Z, dm as Q, dr as W, ds as $, du as ee, I as ae, dJ as se, eg as oe, b4 as te } from "./executeStringFunction-BVMdxpT1.js";
3
3
  import { FLVURL as le } from "@fileverse-dev/formulajs";
4
4
  import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
@@ -1,4 +1,4 @@
1
- const l = [
1
+ const o = [
2
2
  {
3
3
  name: "Gantt Chart",
4
4
  color: "#2E7D32",
@@ -53422,7 +53422,7 @@ const l = [
53422
53422
  }
53423
53423
  ]
53424
53424
  }
53425
- ], e = [
53425
+ ], E = [
53426
53426
  {
53427
53427
  name: "Expense Claim",
53428
53428
  color: "#0E7C7B",
@@ -56827,7 +56827,7 @@ const l = [
56827
56827
  }
56828
56828
  ]
56829
56829
  }
56830
- ], r = [
56830
+ ], t = [
56831
56831
  {
56832
56832
  name: "Event Marketing",
56833
56833
  config: {
@@ -115327,7 +115327,7 @@ const l = [
115327
115327
  }
115328
115328
  ]
115329
115329
  }
115330
- ], c = [
115330
+ ], y = [
115331
115331
  {
115332
115332
  name: "Invoice",
115333
115333
  status: 1,
@@ -117580,12 +117580,20 @@ const l = [
117580
117580
  }
117581
117581
  ]
117582
117582
  }
117583
- ], o = {
117584
- invoice: c,
117585
- "gantt-chart": l,
117586
- "expense-tracker": e,
117587
- "event-marketing": r
117583
+ ], s = {
117584
+ invoice: y,
117585
+ "gantt-chart": o,
117586
+ "expense-tracker": E,
117587
+ "event-marketing": t
117588
+ }, n = (c) => {
117589
+ const l = s[c];
117590
+ if (!l) return;
117591
+ let e = JSON.stringify(l);
117592
+ for (const r of l)
117593
+ !r || !r.id || (e = e.split(JSON.stringify(r.id)).join(JSON.stringify(crypto.randomUUID())));
117594
+ return JSON.parse(e);
117588
117595
  };
117589
117596
  export {
117590
- o as TEMPLATES_DATA
117597
+ s as TEMPLATES_DATA,
117598
+ n as getTemplateData
117591
117599
  };
@@ -1,10 +1,10 @@
1
1
  import * as BZ from "yjs";
2
- import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-Dj8ENMMA.js";
2
+ import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-BEzTziZU.js";
3
3
  import { g as sl } from "./executeStringFunction-BVMdxpT1.js";
4
4
  import { Workbook as al } from "exceljs";
5
5
  import Kl from "luckyexcel";
6
- import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-B7n51qW3.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-gGzAt5fj.js";
6
+ import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-JS0aA6w0.js";
7
+ import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-CDmtDVRT.js";
8
8
  import { toast as fZ } from "@fileverse/ui";
9
9
  var Zl = { exports: {} };
10
10
  (function(m) {
@@ -1,5 +1,5 @@
1
1
  import { i as w } from "./executeStringFunction-BVMdxpT1.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-B7n51qW3.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-JS0aA6w0.js";
3
3
  function g(o) {
4
4
  return o.startsWith("_xlnm.");
5
5
  }
@@ -1,9 +1,9 @@
1
1
  import { utils as S, write as nt } from "xlsx-js-style";
2
2
  import { Workbook as pt } from "exceljs";
3
3
  import { toast as rt } from "@fileverse/ui";
4
- import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-B7n51qW3.js";
4
+ import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-JS0aA6w0.js";
5
5
  import { b as gt } from "./executeStringFunction-BVMdxpT1.js";
6
- import { e as bt } from "./index-Dj8ENMMA.js";
6
+ import { e as bt } from "./index-BEzTziZU.js";
7
7
  const xt = {
8
8
  1: "thin",
9
9
  2: "hair",
@@ -854,7 +854,7 @@ const Z = (t) => {
854
854
  O
855
855
  );
856
856
  });
857
- const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-gGzAt5fj.js");
857
+ const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-CDmtDVRT.js");
858
858
  ct(
859
859
  B,
860
860
  (k = (C = (s = t.current).getWorkbookContext) == null ? void 0 : C.call(s)) == null ? void 0 : k.definedNames,
@@ -1,5 +1,5 @@
1
1
  import { g as Rt, c as yt } from "./executeStringFunction-BVMdxpT1.js";
2
- import { c as wt } from "./index-Dj8ENMMA.js";
2
+ import { c as wt } from "./index-BEzTziZU.js";
3
3
  function jt(J, nt) {
4
4
  const g = J.getImages();
5
5
  if (!g.length) return [];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "4.1.20-subsheetLink-1",
5
+ "version": "4.1.20-subsheetLink-2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-dsheets.git"
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "dependencies": {
65
- "@fileverse-dev/dsheets-templates": "0.0.34",
65
+ "@fileverse-dev/dsheets-templates": "0.0.35",
66
66
  "@fileverse-dev/formulajs": "4.4.55",
67
67
  "@fileverse/crypto": "^0.0.22",
68
68
  "@fileverse/ens": "^0.0.4",