@fileverse-dev/dsheet 1.0.77 → 1.0.78

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.
Files changed (2) hide show
  1. package/dist/index.es.js +13 -11
  2. package/package.json +4 -4
package/dist/index.es.js CHANGED
@@ -189606,20 +189606,22 @@ const OMt = async (e, r, t, a) => {
189606
189606
  try {
189607
189607
  const i = r.current.getArray(t), c = Array.from(i), f = e.current.getAllSheets(), s = V3.book_new();
189608
189608
  c.forEach((u, d) => {
189609
- var g;
189610
- const h = ((g = f[d]) == null ? void 0 : g.data) || [];
189609
+ var y;
189610
+ const h = ((y = f[d]) == null ? void 0 : y.data) || [];
189611
189611
  let p = 0, m = 0;
189612
- (u.celldata ?? []).forEach((y) => {
189613
- p = Math.max(p, y.r), m = Math.max(m, y.c);
189612
+ (u.celldata ?? []).forEach((b) => {
189613
+ p = Math.max(p, b.r), m = Math.max(m, b.c);
189614
189614
  });
189615
189615
  const v = V3.aoa_to_sheet(h);
189616
- (u.celldata ?? []).forEach((y) => {
189617
- const b = V3.encode_cell({ r: y.r, c: y.c });
189618
- if (y.v) {
189619
- const x = { ...v[b] || {} };
189620
- y.v.f && (x.f = y.v.f.split("=")[1].trim()), y.v.v !== void 0 && (x.v = y.v.v), y.v.m && (x.w = y.v.m), y.v.ct && (y.v.ct.fa === "#,##0.00" ? x.z = "0.00" : y.v.ct.fa === "General" && (x.z = "General"), y.v.ct.t && (x.t = y.v.ct.t)), v[b] = x;
189616
+ (u.celldata ?? []).forEach((b) => {
189617
+ const w = V3.encode_cell({ r: b.r, c: b.c });
189618
+ if (b.v) {
189619
+ const M = { ...v[w] || {} };
189620
+ b.v.f && (M.f = b.v.f.split("=")[1].trim()), b.v.v !== void 0 && (M.v = b.v.v), b.v.m && (M.w = b.v.m), b.v.ct && (b.v.ct.fa === "#,##0.00" ? M.z = "0.00" : b.v.ct.fa === "General" && (M.z = "General"), b.v.ct.t && (M.t = b.v.ct.t)), v[w] = M;
189621
189621
  }
189622
- }), V3.book_append_sheet(s, v, u.name);
189622
+ });
189623
+ const g = u.name.length > 30 ? u.name.slice(0, 30) : u.name;
189624
+ V3.book_append_sheet(s, v, g);
189623
189625
  }), s.Props = {
189624
189626
  ...s.Props,
189625
189627
  Application: "Microsoft Excel",
@@ -189628,7 +189630,7 @@ const OMt = async (e, r, t, a) => {
189628
189630
  Manager: ""
189629
189631
  };
189630
189632
  let l = await (a == null ? void 0 : a()) || "Sheet";
189631
- console.log(l), l.length > 30 && l.slice(0, 30), kMt(s, `${l}.xlsx`, {
189633
+ l.length > 30 && l.slice(0, 30), kMt(s, `${l}.xlsx`, {
189632
189634
  bookType: "xlsx",
189633
189635
  type: "binary",
189634
189636
  sheetStubs: !1,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "1.0.77",
5
+ "version": "1.0.78",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -34,10 +34,10 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@fileverse-dev/dsheets-templates": "^0.0.17",
37
- "@fileverse-dev/formula-parser": "^0.2.48",
37
+ "@fileverse-dev/formula-parser": "^0.2.49",
38
38
  "@fileverse-dev/formulajs": "^4.4.11-mod-83",
39
- "@fileverse-dev/fortune-core": "^1.0.76",
40
- "@fileverse-dev/fortune-react": "^1.0.76",
39
+ "@fileverse-dev/fortune-core": "^1.0.77",
40
+ "@fileverse-dev/fortune-react": "^1.0.77",
41
41
  "@fileverse/ui": "^4.1.7-patch-18",
42
42
  "classnames": "^2.5.1",
43
43
  "exceljs": "^4.4.0",