@fileverse-dev/dsheet 4.1.11-opaque-sheets.0 → 4.1.11-opaque-sheets.1

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.
@@ -3,3 +3,4 @@ import { MutableRefObject } from 'react';
3
3
  import * as Y from 'yjs';
4
4
  export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
5
5
  export declare const handleExportToODS: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
6
+ export declare const exportToXLSXBytes: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string) => Promise<Uint8Array>;
@@ -7,3 +7,4 @@ import * as Y from 'yjs';
7
7
  */
8
8
  export declare const handleExportToXLSX: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
9
9
  export declare const handleExportToODS: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string, getDocumentTitle?: (dsheetId: string) => Promise<string>) => Promise<void>;
10
+ export declare const exportToXLSXBytes: (workbookRef: MutableRefObject<WorkbookInstance | null>, ydocRef: MutableRefObject<Y.Doc | null>, dsheetId: string) => Promise<Uint8Array>;
@@ -50615,11 +50615,14 @@ const NN = ({
50615
50615
  }, g.readAsText(b);
50616
50616
  });
50617
50617
  }, VZ = async (e, t, l, n) => {
50618
- const { handleExportToXLSX: i } = await import("./xlsx-export-impl-CWo6sDun.js");
50618
+ const { handleExportToXLSX: i } = await import("./xlsx-export-impl-8zAzJjX8.js");
50619
50619
  return i(e, t, l, n);
50620
50620
  }, SZ = async (e, t, l, n) => {
50621
- const { handleExportToODS: i } = await import("./xlsx-export-impl-CWo6sDun.js");
50621
+ const { handleExportToODS: i } = await import("./xlsx-export-impl-8zAzJjX8.js");
50622
50622
  return i(e, t, l, n);
50623
+ }, JO = async (e, t, l) => {
50624
+ const { exportToXLSXBytes: n } = await import("./xlsx-export-impl-8zAzJjX8.js");
50625
+ return n(e, t, l);
50623
50626
  }, Jd = (e) => {
50624
50627
  Fh({
50625
50628
  title: "Export failed",
@@ -50709,7 +50712,7 @@ const NN = ({
50709
50712
  }) => {
50710
50713
  const [s, r] = We(!1), u = ge(
50711
50714
  async (h, m, b) => {
50712
- const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-Cc2hixgV.js");
50715
+ const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-DrVyccBB.js");
50713
50716
  return Z(
50714
50717
  {
50715
50718
  sheetEditorRef: e,
@@ -50740,7 +50743,7 @@ const NN = ({
50740
50743
  ), d = ge(
50741
50744
  async (h, m, b) => {
50742
50745
  var y;
50743
- const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-Cc2hixgV.js"), G = h == null ? void 0 : h.target, g = ((y = G == null ? void 0 : G.files) == null ? void 0 : y[0]) || m;
50746
+ const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-DrVyccBB.js"), G = h == null ? void 0 : h.target, g = ((y = G == null ? void 0 : G.files) == null ? void 0 : y[0]) || m;
50744
50747
  if (!g) return;
50745
50748
  const f = await Z(g);
50746
50749
  return I(
@@ -56251,7 +56254,7 @@ function zg(e) {
56251
56254
  });
56252
56255
  });
56253
56256
  }
56254
- async function JO(e) {
56257
+ async function TO(e) {
56255
56258
  const t = new Km(
56256
56259
  Og(e.ownerAuth, e.roomKey, e.dsheetId, !0)
56257
56260
  );
@@ -56278,7 +56281,7 @@ async function JO(e) {
56278
56281
  t.disconnect();
56279
56282
  }
56280
56283
  }
56281
- async function TO(e) {
56284
+ async function NO(e) {
56282
56285
  const t = new Km(
56283
56286
  Og(
56284
56287
  e.ownerAuth,
@@ -56299,7 +56302,7 @@ async function TO(e) {
56299
56302
  t.disconnect();
56300
56303
  }
56301
56304
  }
56302
- const NO = (e, t) => dl.encryptData(Wl(e), t), UO = (e, t) => dl.decryptData(Wl(e), t), iO = [
56305
+ const UO = (e, t) => dl.encryptData(Wl(e), t), KO = (e, t) => dl.decryptData(Wl(e), t), iO = [
56303
56306
  {
56304
56307
  title: "Invoice",
56305
56308
  description: "Invoice",
@@ -56354,7 +56357,7 @@ const NO = (e, t) => dl.encryptData(Wl(e), t), UO = (e, t) => dl.decryptData(Wl(
56354
56357
  }
56355
56358
  }
56356
56359
  });
56357
- async function KO(e, t) {
56360
+ async function MO(e, t) {
56358
56361
  if (!t.dsheetId || t.dsheetId.trim().length === 0)
56359
56362
  throw new Error("importSpreadsheetFile requires a dsheetId");
56360
56363
  const l = t.dsheetId, n = new Fe.Doc(), i = { current: null }, o = { current: n }, c = sO(), s = { current: QZ(e.name) }, r = [], u = (d) => {
@@ -56382,7 +56385,7 @@ async function KO(e, t) {
56382
56385
  const { convertOdsFileToXlsxFile: b } = await import("./ods-to-xlsx-DeJAYBkD.js");
56383
56386
  h = await b(e);
56384
56387
  }
56385
- const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-Cc2hixgV.js");
56388
+ const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-DrVyccBB.js");
56386
56389
  await m(
56387
56390
  {
56388
56391
  sheetEditorRef: c,
@@ -56417,22 +56420,23 @@ async function KO(e, t) {
56417
56420
  }
56418
56421
  }
56419
56422
  export {
56420
- xZ as A,
56421
- SZ as B,
56423
+ YZ as A,
56424
+ xZ as B,
56422
56425
  ps as C,
56423
- VZ as D,
56424
- hm as E,
56425
- KO as F,
56426
- Qs as G,
56427
- om as H,
56428
- nf as I,
56429
- A8 as J,
56430
- Ys as K,
56431
- dy as L,
56432
- TO as M,
56433
- Mh as N,
56434
- a1 as O,
56435
- KN as P,
56426
+ SZ as D,
56427
+ VZ as E,
56428
+ hm as F,
56429
+ MO as G,
56430
+ Qs as H,
56431
+ om as I,
56432
+ nf as J,
56433
+ A8 as K,
56434
+ Ys as L,
56435
+ dy as M,
56436
+ NO as N,
56437
+ Mh as O,
56438
+ a1 as P,
56439
+ KN as Q,
56436
56440
  nO as S,
56437
56441
  iO as T,
56438
56442
  xO as a,
@@ -56449,16 +56453,16 @@ export {
56449
56453
  ha as l,
56450
56454
  UG as m,
56451
56455
  ma as n,
56452
- UO as o,
56456
+ KO as o,
56453
56457
  TX as p,
56454
- NO as q,
56458
+ UO as q,
56455
56459
  JN as r,
56456
56460
  TN as s,
56457
56461
  JO as t,
56458
- xs as u,
56459
- ay as v,
56460
- lh as w,
56461
- ws as x,
56462
+ TO as u,
56463
+ xs as v,
56464
+ ay as w,
56465
+ lh as x,
56462
56466
  ei as y,
56463
- YZ as z
56467
+ ws as z
56464
56468
  };
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from './editor/constants/share
23
23
  export { TEMPLATES } from '@fileverse-dev/dsheets-templates/template-metadata-list';
24
24
  export { handleCSVUpload } from './editor/utils/csv-import';
25
25
  export { importSpreadsheetFile, type ImportSpreadsheetFileOptions, type ImportSpreadsheetFileResult, type SpreadsheetImportFileType, } from './editor/utils/spreadsheet-import';
26
- export { handleExportToXLSX, handleExportToODS } from './editor/utils/xlsx-export';
26
+ export { handleExportToXLSX, handleExportToODS, exportToXLSXBytes, } from './editor/utils/xlsx-export';
27
27
  export { handleExportToCSV } from './editor/utils/csv-export';
28
28
  export { handleExportToJSON } from './editor/utils/json-export';
29
29
  export { useXLSXImport } from './editor/hooks/use-xlsx-import';
package/dist/index.es.js CHANGED
@@ -1,65 +1,66 @@
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 as f, B as A, 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-BGNu8pYa.js";
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 q, di as J, dj as N, bb as Y, dk as Z, dl as Q, dq as W, dr as $, dt as ee, I as ae, dI as se, ef as oe, b4 as te } from "./executeStringFunction-DMMvpc-I.js";
3
- import { FLVURL as le } from "@fileverse-dev/formulajs";
4
- import { E as de, S as Se } from "./constants-8Ij49Lxv.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 x, x as g, z as R, A as f, B as A, D as I, E as L, F as T, G as y, H as w, I as v, J as D, K as M, L as b, M as k, N as X, O as z, P as O, Q as P } from "./index-D_ANcqGv.js";
2
+ import { cy as B, cz as G, cA as K, cG as U, bs as _, e as j, f as H, l as q, a as J, di as N, dj as Q, bb as Y, dk as Z, dl as W, dq as $, dr as ee, dt as ae, I as se, dI as oe, ef as te, b4 as re } from "./executeStringFunction-DMMvpc-I.js";
3
+ import { FLVURL as ne } from "@fileverse-dev/formulajs";
4
+ import { E as Se, S as ce } from "./constants-8Ij49Lxv.js";
5
5
  export {
6
6
  s as CommentAction,
7
7
  o as CommentCellUI,
8
8
  t as CommentsContent,
9
9
  r as DSheetEditor,
10
10
  l as DSheetSkeleton,
11
- de as ERROR_MESSAGES_FLAG,
12
- le as FLVURL,
11
+ Se as ERROR_MESSAGES_FLAG,
12
+ ne as FLVURL,
13
13
  n as FortuneCore,
14
- Se as SERVICES_API_KEY,
14
+ ce as SERVICES_API_KEY,
15
15
  d as SupportedChain,
16
16
  S as TEMPLATES,
17
17
  c as api,
18
- G as clearColumnsCellsFormat,
18
+ B as clearColumnsCellsFormat,
19
19
  i as clearFilter,
20
- K as clearRowsCellsFormat,
21
- U as clearSelectedCellFormat,
20
+ G as clearRowsCellsFormat,
21
+ K as clearSelectedCellFormat,
22
22
  m as createFilter,
23
23
  h as decryptForRoomKey,
24
- X as deleteRowCol,
24
+ U as deleteRowCol,
25
25
  _ as deleteSelectedCellText,
26
26
  p as describeMatchedShortcut,
27
27
  C as encryptForRoomKey,
28
28
  j as executeStringFunction,
29
- u as fetchSessionState,
30
- B as formulaResponseUiSync,
31
- H as getFlowdata,
32
- E as getRemoveDuplicatesErrorMessage,
33
- F as getRemoveDuplicatesPreview,
34
- q as getSheetIndex,
29
+ u as exportToXLSXBytes,
30
+ E as fetchSessionState,
31
+ H as formulaResponseUiSync,
32
+ q as getFlowdata,
33
+ F as getRemoveDuplicatesErrorMessage,
34
+ x as getRemoveDuplicatesPreview,
35
+ J as getSheetIndex,
35
36
  g as handleCSVUpload,
36
- x as handleCopy,
37
- R as handleExportToCSV,
38
- f as handleExportToJSON,
39
- A as handleExportToODS,
40
- I as handleExportToXLSX,
41
- J as handleFreeze,
42
- N as handleHorizontalAlign,
37
+ R as handleCopy,
38
+ f as handleExportToCSV,
39
+ A as handleExportToJSON,
40
+ I as handleExportToODS,
41
+ L as handleExportToXLSX,
42
+ N as handleFreeze,
43
+ Q as handleHorizontalAlign,
43
44
  Y as handleLink,
44
45
  Z as handleMerge,
45
- L as handlePasteByClick,
46
- Q as handleSort,
47
- W as handleTextSize,
48
- $ as handleVerticalAlign,
49
- T as importSpreadsheetFile,
50
- ee as insertRowCol,
46
+ T as handlePasteByClick,
47
+ W as handleSort,
48
+ $ as handleTextSize,
49
+ ee as handleVerticalAlign,
50
+ y as importSpreadsheetFile,
51
+ ae as insertRowCol,
51
52
  w as isBrowserZoomShortcut,
52
- y as isFormulaListShortcut,
53
- v as isOpenShortcutsModalShortcut,
54
- ae as jfrefreshgrid,
55
- se as loadLocale,
56
- D as remapCommentAnchors,
57
- M as removeActiveImage,
58
- b as removeDuplicates,
59
- k as seedSession,
53
+ v as isFormulaListShortcut,
54
+ D as isOpenShortcutsModalShortcut,
55
+ se as jfrefreshgrid,
56
+ oe as loadLocale,
57
+ M as remapCommentAnchors,
58
+ b as removeActiveImage,
59
+ k as removeDuplicates,
60
+ X as seedSession,
60
61
  z as showImgChooser,
61
- oe as toolbarItemClickHandler,
62
- te as updateFormat,
62
+ te as toolbarItemClickHandler,
63
+ re as updateFormat,
63
64
  O as useEnsStatus,
64
65
  P as useXLSXImport
65
66
  };
@@ -1,10 +1,10 @@
1
1
  import * as BZ from "yjs";
2
- import { i as Yl, a as ul, s as eZ, r as hl, y as Il, b as pl, m as Rl } from "./index-BGNu8pYa.js";
2
+ import { i as Yl, a as ul, s as eZ, r as hl, y as Il, b as pl, m as Rl } from "./index-D_ANcqGv.js";
3
3
  import { g as sl } from "./executeStringFunction-DMMvpc-I.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-Cmjeuif8.js";
7
- import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-DA7ImkCl.js";
6
+ import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-Cvwb6d_f.js";
7
+ import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-Dw4cBrSz.js";
8
8
  import { toast as fZ } from "@fileverse/ui";
9
9
  var Zl = { exports: {} };
10
10
  (function(c) {
@@ -1,5 +1,5 @@
1
1
  import { i as w } from "./executeStringFunction-DMMvpc-I.js";
2
- import { J as x } from "./xlsx-hyperlink-inline-Cmjeuif8.js";
2
+ import { J as x } from "./xlsx-hyperlink-inline-Cvwb6d_f.js";
3
3
  function g(o) {
4
4
  return o.startsWith("_xlnm.");
5
5
  }