@fileverse-dev/dsheet 4.1.24 → 4.1.26
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/dist/{executeStringFunction-B3Tw7e1U.js → executeStringFunction-KWYZ3QNg.js} +3853 -3774
- package/dist/formula.js +1 -1
- package/dist/{index-DvpQioe4.js → index-BDSumZYk.js} +35 -35
- package/dist/index.es.js +2 -2
- package/dist/sheet-engine/core/modules/sort-data-verification.d.ts +29 -0
- package/dist/sheet-engine/core/modules/sort-data-verification.test.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-DWkIjd5v.js → use-xlsx-import-impl-DN63dMYx.js} +4 -4
- package/dist/{xlsx-defined-names-776Vg9GT.js → xlsx-defined-names-DoOdrbDR.js} +2 -2
- package/dist/{xlsx-export-impl-C60SB8Ve.js → xlsx-export-impl-l3bwAIHT.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-DaxgypSu.js → xlsx-hyperlink-inline-CJfom4ax.js} +2 -2
- package/package.json +1 -1
package/dist/formula.js
CHANGED
|
@@ -3,7 +3,7 @@ var cW = (e, t, l) => t in e ? sW(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Le = (e, t, l) => cW(e, typeof t != "symbol" ? t + "" : t, l);
|
|
4
4
|
import { jsx as a, jsxs as v, Fragment as Vt } from "react/jsx-runtime";
|
|
5
5
|
import vt, { useRef as Re, useContext as ht, useState as We, useMemo as it, useEffect as Xe, useCallback as Ge, useLayoutEffect as bl, forwardRef as rh, createElement as Od, useSyncExternalStore as rW, useImperativeHandle as aW, createContext as ah, memo as dW } from "react";
|
|
6
|
-
import { g as Xo, a as Me, d as Pt, r as At, h as cc, j as
|
|
6
|
+
import { g as Xo, a as Me, d as Pt, r as At, h as cc, j as Ot, k as Ea, i as sn, l as Qe, m as Or, n as zd, o as op, p as _l, q as Da, s as lo, S as Pa, t as jc, v as uW, u as dh, w as hW, x as Zn, y as sp, z as kn, A as Ht, B as Ni, C as uh, D as Os, E as mW, F as zs, G as bW, H as Wt, I as Kt, J as cp, K as el, L as ui, M as ZW, N as zr, O as Al, P as Rn, Q as Yl, R as jt, T as Cn, U as Y1, V as hh, W as pW, X as Es, Y as ro, Z as hi, _ as x1, $ as Ci, a0 as IW, a1 as rp, a2 as Ds, a3 as Er, a4 as ap, a5 as wn, a6 as yW, a7 as ao, a8 as fW, a9 as Fn, aa as mh, ab as bh, ac as ml, ad as Zl, ae as Vo, af as Qc, ag as gW, ah as cn, ai as Zh, aj as ph, ak as GW, al as dp, am as up, an as hp, ao as mp, ap as bp, aq as qc, ar as Ed, as as Zp, at as pp, au as _c, av as Ip, aw as yp, ax as WW, ay as So, az as fp, aA as gp, aB as Gp, aC as Wp, aD as Xp, aE as Vp, aF as XW, aG as Sp, aH as Yp, aI as xp, aJ as wp, aK as VW, aL as Lp, aM as Rp, aN as Ih, aO as uo, aP as ho, aQ as Cp, aR as yh, aS as vp, aT as Bp, aU as Hp, aV as kp, aW as SW, aX as Dr, aY as YW, aZ as Fp, a_ as Ps, a$ as fn, b0 as rc, b1 as xW, b2 as fh, b3 as no, b4 as qn, b5 as wW, b6 as LW, b7 as fs, b8 as RW, b9 as CW, ba as Aa, bb as gh, bc as vW, bd as BW, be as HW, bf as kW, bg as FW, bh as Pr, bi as _n, bj as xl, bk as tl, bl as mo, bm as Gh, bn as JW, bo as TW, bp as Jp, bq as NW, br as gs, bs as vn, bt as $t, bu as UW, bv as Ar, bw as bo, bx as Wh, by as Pl, bz as jr, bA as mi, bB as Qr, bC as $c, bD as qr, bE as KW, bF as Xh, bG as Vh, bH as Sh, bI as MW, bJ as Ol, bK as OW, bL as Tp, bM as mn, bN as vi, bO as qi, bP as er, bQ as zW, bR as EW, bS as Vl, bT as DW, bU as Gs, bV as PW, bW as Jn, bX as Ui, bY as _r, bZ as ul, b_ as qt, b$ as As, c0 as js, c1 as Np, c2 as Up, c3 as Yi, c4 as $r, c5 as AW, c6 as jW, c7 as QW, c8 as qW, c9 as _W, ca as Bc, cb as $W, cc as e5, cd as t5, ce as l5, cf as tr, cg as Tl, ch as n5, ci as Kp, cj as Mp, ck as i5, cl as o5, cm as Op, cn as _i, co as Dd, cp as s5, cq as zp, cr as Ep, cs as c5, ct as Dp, cu as Yh, cv as Pp, cw as Ap, cx as r5, cy as ea, cz as jp, cA as xh, cB as Qp, cC as qp, cD as _p, cE as $p, cF as eI, cG as wh, cH as ta, cI as tI, cJ as El, cK as Lh, cL as Rh, cM as a5, cN as lI, cO as nI, cP as oi, cQ as Bn, cR as la, cS as d5, cT as iI, cU as si, cV as ci, cW as Hc, cX as u5, cY as h5, cZ as lr, c_ as m5, c$ as oI, d0 as sI, d1 as b5, d2 as nr, d3 as Ch, d4 as cI, d5 as Z5, d6 as vh, d7 as rI, d8 as aI, d9 as dI, da as p5, db as I5, dc as uI, dd as Pd, de as hI, df as mI, dg as y5, dh as f5, di as bI, dj as g5, dk as G5, dl as Ad, dm as na, dn as jd, dp as ZI, dq as $i, dr as W5, ds as X5, dt as pI, du as II, dv as yI, dw as fI, dx as gI, dy as pn, dz as V5, dA as Bh, dB as S5, dC as GI, dD as WI, dE as XI, dF as Hh, dG as VI, dH as Y5, dI as x5, dJ as ir, dK as SI, dL as w5, dM as L5, dN as R5, dO as YI, dP as Qd, dQ as xI, dR as jn, dS as wI, dT as LI, dU as RI, dV as C5, dW as qd, dX as Ws, dY as v5, dZ as CI, d_ as vI, d$ as _d, e0 as B5, e1 as $d, e2 as H5, e3 as or, e4 as kh, e5 as Fh, e6 as Jh, e7 as eu, e8 as BI, e9 as HI, ea as kI, eb as k5, ec as F5, ed as J5, ee as T5, ef as N5, eg as Xs, eh as Vs, ei as eo, ej as FI, ek as U5, el as JI, em as TI, en as tu, eo as NI, ep as UI, eq as K5, er as KI, es as MI, et as OI, eu as zI, ev as EI, ew as DI, c as $n, ex as M5, ey as O5, ez as z5, eA as E5, eB as D5, eC as ja, eD as P5, eE as A5, eF as j5, eG as Q5, eH as q5, eI as _5, eJ as $5, e as Th, f as ia, eK as e3, eL as t3, eM as w1, eN as L1, eO as R1, eP as C1, eQ as l3, eR as n3, eS as v1 } from "./executeStringFunction-KWYZ3QNg.js";
|
|
7
7
|
import * as Ke from "yjs";
|
|
8
8
|
import { b as i3, i as o3, a as s3, m as c3, p as lu, E as PI, C as Qa, c as B1, T as r3, H as a3, d as d3, D as AI } from "./constants-8Ij49Lxv.js";
|
|
9
9
|
import { t as Wl, f as nn, m as u3, s as h3, u as m3, a as b3 } from "./persistence-utils-BXFajzvq.js";
|
|
@@ -266,7 +266,7 @@ class Mh {
|
|
|
266
266
|
n,
|
|
267
267
|
this.sheetCtx.rowHeaderWidth - 1,
|
|
268
268
|
l
|
|
269
|
-
), i.font = cc(this.sheetCtx.defaultFontSize), i.textBaseline = Ys.textBaseline, i.fillStyle =
|
|
269
|
+
), i.font = cc(this.sheetCtx.defaultFontSize), i.textBaseline = Ys.textBaseline, i.fillStyle = Ot.cellText;
|
|
270
270
|
let o, c;
|
|
271
271
|
o = te.sortedIndex(this.sheetCtx.visibledatarow, t), c = te.sortedIndex(
|
|
272
272
|
this.sheetCtx.visibledatarow,
|
|
@@ -293,12 +293,12 @@ class Mh {
|
|
|
293
293
|
i
|
|
294
294
|
)) !== !1) {
|
|
295
295
|
if (((Z = (b = this.sheetCtx.config) == null ? void 0 : b.rowhidden) == null ? void 0 : Z[y]) == null) {
|
|
296
|
-
i.fillStyle =
|
|
296
|
+
i.fillStyle = Ot.headerBg, i.fillRect(
|
|
297
297
|
0,
|
|
298
298
|
r + n + p,
|
|
299
299
|
this.sheetCtx.rowHeaderWidth - 1,
|
|
300
300
|
s - r + 1 + g - p
|
|
301
|
-
), i.fillStyle =
|
|
301
|
+
), i.fillStyle = Ot.headerText, i.save(), i.scale(this.sheetCtx.zoomRatio, this.sheetCtx.zoomRatio);
|
|
302
302
|
const W = Ea(y + 1, i, this.sheetCtx), S = (this.sheetCtx.rowHeaderWidth - W.width) / 2, L = r + (s - r) / 2 + n;
|
|
303
303
|
i.fillText(
|
|
304
304
|
`${y + 1}`,
|
|
@@ -312,7 +312,7 @@ class Mh {
|
|
|
312
312
|
), i.lineTo(
|
|
313
313
|
this.sheetCtx.rowHeaderWidth - 2 + u,
|
|
314
314
|
s + n - 2
|
|
315
|
-
), i.lineWidth = 1, i.strokeStyle =
|
|
315
|
+
), i.lineWidth = 1, i.strokeStyle = Ot.gridLine, i.stroke(), i.closePath(), this.sheetCtx.config.rowhidden && this.sheetCtx.config.rowhidden[y] == null && this.sheetCtx.config.rowhidden[y + 1] != null ? (i.beginPath(), i.moveTo(-1, s + n - 4 + u), i.lineTo(
|
|
316
316
|
this.sheetCtx.rowHeaderWidth - 1,
|
|
317
317
|
s + n - 4 + u
|
|
318
318
|
), i.closePath(), i.stroke()) : (this.sheetCtx.config.rowhidden == null || this.sheetCtx.config.rowhidden[y] == null) && (i.beginPath(), i.moveTo(-1, s + n - 2 + u), i.lineTo(
|
|
@@ -347,7 +347,7 @@ class Mh {
|
|
|
347
347
|
0,
|
|
348
348
|
l,
|
|
349
349
|
this.sheetCtx.columnHeaderHeight - 1
|
|
350
|
-
), i.font = cc(this.sheetCtx.defaultFontSize), i.textBaseline = Ys.textBaseline, i.fillStyle =
|
|
350
|
+
), i.font = cc(this.sheetCtx.defaultFontSize), i.textBaseline = Ys.textBaseline, i.fillStyle = Ot.cellText;
|
|
351
351
|
let o, c;
|
|
352
352
|
o = te.sortedIndex(
|
|
353
353
|
this.sheetCtx.visibledatacolumn,
|
|
@@ -377,12 +377,12 @@ class Mh {
|
|
|
377
377
|
i
|
|
378
378
|
)) !== !1) {
|
|
379
379
|
if (((Z = (b = this.sheetCtx.config) == null ? void 0 : b.colhidden) == null ? void 0 : Z[y]) == null) {
|
|
380
|
-
i.fillStyle =
|
|
380
|
+
i.fillStyle = Ot.headerBg, i.fillRect(
|
|
381
381
|
r + n - 1,
|
|
382
382
|
0,
|
|
383
383
|
s - r,
|
|
384
384
|
this.sheetCtx.columnHeaderHeight - 1
|
|
385
|
-
), i.fillStyle =
|
|
385
|
+
), i.fillStyle = Ot.headerText, i.save(), i.scale(this.sheetCtx.zoomRatio, this.sheetCtx.zoomRatio);
|
|
386
386
|
const g = Ea(p, i, this.sheetCtx), W = Math.round(
|
|
387
387
|
r + (s - r) / 2 + n - g.width / 2
|
|
388
388
|
), S = Math.round(
|
|
@@ -397,10 +397,10 @@ class Mh {
|
|
|
397
397
|
this.sheetCtx.config.colhidden && this.sheetCtx.config.colhidden[y] != null && this.sheetCtx.config.colhidden[y + 1] != null ? (i.beginPath(), i.moveTo(s + n - 4 + u, 0), i.lineTo(
|
|
398
398
|
s + n - 4 + u,
|
|
399
399
|
this.sheetCtx.columnHeaderHeight - 2
|
|
400
|
-
), i.lineWidth = 1, i.strokeStyle =
|
|
400
|
+
), i.lineWidth = 1, i.strokeStyle = Ot.gridLine, i.closePath(), i.stroke()) : (this.sheetCtx.config.colhidden == null || this.sheetCtx.config.colhidden[y] == null) && (i.beginPath(), i.moveTo(s + n - 2 + u, 0), i.lineTo(
|
|
401
401
|
s + n - 2 + u,
|
|
402
402
|
this.sheetCtx.columnHeaderHeight - 2
|
|
403
|
-
), i.lineWidth = 1, i.strokeStyle =
|
|
403
|
+
), i.lineWidth = 1, i.strokeStyle = Ot.gridLine, i.closePath(), i.stroke()), ((G = (I = this.sheetCtx.config) == null ? void 0 : I.colhidden) == null ? void 0 : G[y - 1]) != null && d !== void 0 && (i.beginPath(), i.moveTo(d + n + u, 0), i.lineTo(
|
|
404
404
|
d + n + u,
|
|
405
405
|
this.sheetCtx.columnHeaderHeight - 2
|
|
406
406
|
), i.closePath(), i.stroke()), i.beginPath(), i.moveTo(
|
|
@@ -458,12 +458,12 @@ class Mh {
|
|
|
458
458
|
t + n
|
|
459
459
|
), Z === -1 && (Z = 0), Z += s, I === -1 && (I = this.sheetCtx.visibledatacolumn.length - 1), I += s, I >= this.sheetCtx.visibledatacolumn.length && (I = this.sheetCtx.visibledatacolumn.length - 1);
|
|
460
460
|
const G = this.sheetCtx.visibledatarow[b], V = this.sheetCtx.visibledatacolumn[I];
|
|
461
|
-
h.fillStyle =
|
|
461
|
+
h.fillStyle = Ot.cellBg, h.fillRect(
|
|
462
462
|
o - 1,
|
|
463
463
|
c - 1,
|
|
464
464
|
V - t,
|
|
465
465
|
G - l
|
|
466
|
-
), h.font = cc(this.sheetCtx.defaultFontSize), h.fillStyle =
|
|
466
|
+
), h.font = cc(this.sheetCtx.defaultFontSize), h.fillStyle = Ot.cellText;
|
|
467
467
|
const f = [], y = {}, p = {}, g = 0.5;
|
|
468
468
|
(U = (T = this.sheetCtx.hooks).beforeRenderCellArea) == null || U.call(T, d, h);
|
|
469
469
|
for (let q = m; q <= b; q += 1) {
|
|
@@ -850,7 +850,7 @@ class Mh {
|
|
|
850
850
|
if (!g) return;
|
|
851
851
|
const W = U1();
|
|
852
852
|
let S = _l(g, t, l, "bg");
|
|
853
|
-
!te.isNil(p) && !te.isNil(p.cellColor) && (S = p.cellColor), S ? s.fillStyle = S : s.fillStyle =
|
|
853
|
+
!te.isNil(p) && !te.isNil(p.cellColor) && (S = p.cellColor), S ? s.fillStyle = S : s.fillStyle = Ot.cellBg;
|
|
854
854
|
const L = [
|
|
855
855
|
i + d + W[0],
|
|
856
856
|
n + h + W[1],
|
|
@@ -873,7 +873,7 @@ class Mh {
|
|
|
873
873
|
return;
|
|
874
874
|
if (s.fillRect(L[0], L[1], L[2], L[3]), `${t}_${l}` in m) {
|
|
875
875
|
const H = m[`${t}_${l}`].v;
|
|
876
|
-
s.fillStyle =
|
|
876
|
+
s.fillStyle = Ot.cellText;
|
|
877
877
|
const N = cc(this.sheetCtx.defaultFontSize);
|
|
878
878
|
s.font = N;
|
|
879
879
|
const x = i + 4 + d, F = o + h - 2;
|
|
@@ -899,7 +899,7 @@ class Mh {
|
|
|
899
899
|
), { dataVerification: K } = this.sheetCtx.luckysheetfile[M];
|
|
900
900
|
if (K != null && K[`${t}_${l}`] && (K == null ? void 0 : K[`${t}_${l}`].type) === "dropdown") {
|
|
901
901
|
const H = jc(this.sheetCtx, [l]), x = (((H == null ? void 0 : H[l]) || 70) - 5) * this.sheetCtx.zoomRatio, F = 16 * this.sheetCtx.zoomRatio, C = 8 * this.sheetCtx.zoomRatio, A = c + d - 4 - x, le = n + h + 2.7;
|
|
902
|
-
s.beginPath(), s.fillStyle =
|
|
902
|
+
s.beginPath(), s.fillStyle = Ot.secondaryFill, s.roundRect(A, le, x, F, C), s.fill(), s.closePath();
|
|
903
903
|
const q = 7 * this.sheetCtx.zoomRatio, ee = 4 * this.sheetCtx.zoomRatio, J = A - 2 + x - q - 2 * this.sheetCtx.zoomRatio, D = le + (F - ee) / 2;
|
|
904
904
|
s.beginPath(), s.fillStyle = "rgba(0, 0, 0, 1)", s.moveTo(J, D), s.lineTo(J + q, D), s.lineTo(J + q / 2, D + ee), s.closePath(), s.fill();
|
|
905
905
|
}
|
|
@@ -922,10 +922,10 @@ class Mh {
|
|
|
922
922
|
h,
|
|
923
923
|
r,
|
|
924
924
|
u
|
|
925
|
-
), (!T.colIn || T.colLast) && !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (s.beginPath(), s.moveTo(c + d - 2 + f, n + h), s.lineTo(c + d - 2 + f, o + h), s.lineWidth = 1, s.strokeStyle =
|
|
925
|
+
), (!T.colIn || T.colLast) && !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (s.beginPath(), s.moveTo(c + d - 2 + f, n + h), s.lineTo(c + d - 2 + f, o + h), s.lineWidth = 1, s.strokeStyle = Ot.gridLine, s.stroke(), s.closePath()), !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (s.beginPath(), s.moveTo(
|
|
926
926
|
i + d - 1,
|
|
927
927
|
o + h - 2 + f
|
|
928
|
-
), s.lineTo(c + d - 1, o + h - 2 + f), s.lineWidth = 1, s.strokeStyle =
|
|
928
|
+
), s.lineTo(c + d - 1, o + h - 2 + f), s.lineWidth = 1, s.strokeStyle = Ot.gridLine, s.stroke(), s.closePath()), (P = (k = this.sheetCtx.hooks).afterRenderCell) == null || P.call(
|
|
929
929
|
k,
|
|
930
930
|
g[t][l],
|
|
931
931
|
{
|
|
@@ -957,7 +957,7 @@ class Mh {
|
|
|
957
957
|
}
|
|
958
958
|
const S = c - i - 2, L = o - n - 2, M = 2, K = 2, T = Number(_l(g, t, l, "ht")), U = Number(_l(g, t, l, "vt")), X = lo(t, l, d);
|
|
959
959
|
let R = _l(g, t, l, "bg");
|
|
960
|
-
!te.isNil(X) && !te.isNil(X.cellColor) && (R = X.cellColor), R ? r.fillStyle = R : r.fillStyle =
|
|
960
|
+
!te.isNil(X) && !te.isNil(X.cellColor) && (R = X.cellColor), R ? r.fillStyle = R : r.fillStyle = Ot.cellBg;
|
|
961
961
|
const w = U1(), k = [
|
|
962
962
|
i + h + w[0],
|
|
963
963
|
n + m + w[1],
|
|
@@ -1048,7 +1048,7 @@ class Mh {
|
|
|
1048
1048
|
let O = ae + B - K;
|
|
1049
1049
|
r.textBaseline = "bottom";
|
|
1050
1050
|
let j = O - 13 * this.sheetCtx.zoomRatio;
|
|
1051
|
-
U === 0 ? (O = ae + B / 2, r.textBaseline = "middle", j = O - 6 * this.sheetCtx.zoomRatio) : U === 1 && (O = ae + K, r.textBaseline = "top", j = O + 1 * this.sheetCtx.zoomRatio), oe /= this.sheetCtx.zoomRatio, O /= this.sheetCtx.zoomRatio, j /= this.sheetCtx.zoomRatio, r.lineWidth = 2, r.strokeStyle =
|
|
1051
|
+
U === 0 ? (O = ae + B / 2, r.textBaseline = "middle", j = O - 6 * this.sheetCtx.zoomRatio) : U === 1 && (O = ae + K, r.textBaseline = "top", j = O + 1 * this.sheetCtx.zoomRatio), oe /= this.sheetCtx.zoomRatio, O /= this.sheetCtx.zoomRatio, j /= this.sheetCtx.zoomRatio, r.lineWidth = 2, r.strokeStyle = Ot.cellText, r.beginPath(), r.roundRect(
|
|
1052
1052
|
oe,
|
|
1053
1053
|
j,
|
|
1054
1054
|
12,
|
|
@@ -1060,7 +1060,7 @@ class Mh {
|
|
|
1060
1060
|
12,
|
|
1061
1061
|
12,
|
|
1062
1062
|
2
|
|
1063
|
-
), r.fillStyle =
|
|
1063
|
+
), r.fillStyle = Ot.cellText, r.fill(), r.restore(), r.save(), r.beginPath(), r.strokeStyle = Ot.cellBg, r.lineWidth = 2, r.lineJoin = "round", r.moveTo(oe + 3, j + 6), r.lineTo(oe + 5.5, j + 9), r.lineTo(oe + 9, j + 3.5), r.stroke(), r.closePath(), r.restore()), r.fillStyle = (z = (D = g == null ? void 0 : g[t]) == null ? void 0 : D[l]) != null && z.fc ? _l(g, t, l, "fc") : Ot.cellText, r.fillText(
|
|
1064
1064
|
te.isNil(s) ? "" : s,
|
|
1065
1065
|
oe + 18,
|
|
1066
1066
|
O
|
|
@@ -1148,7 +1148,7 @@ class Mh {
|
|
|
1148
1148
|
ye.textHeightAll / this.sheetCtx.zoomRatio
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
|
-
r.fillStyle = (de = (re = g == null ? void 0 : g[t]) == null ? void 0 : re[l]) != null && de.fc ? _l(g, t, l, "fc") :
|
|
1151
|
+
r.fillStyle = (de = (re = g == null ? void 0 : g[t]) == null ? void 0 : re[l]) != null && de.fc ? _l(g, t, l, "fc") : Ot.cellText, X != null && X.textColor && (r.fillStyle = X.textColor), (((Ie = (he = W == null ? void 0 : W.ct) == null ? void 0 : he.fa) == null ? void 0 : Ie.indexOf("[Red]")) ?? -1) > -1 && dh(W) && (W == null ? void 0 : W.v) < 0 && (r.fillStyle = "#ff0000");
|
|
1152
1152
|
const ne = this.sheetCtx.currentSheetId, ie = wi.getOpacity(ne, t, l);
|
|
1153
1153
|
ie < 0.999 ? (r.save(), r.globalAlpha = ie, N || this.cellTextRender(ye, r, {
|
|
1154
1154
|
pos_x: Q,
|
|
@@ -1160,10 +1160,10 @@ class Mh {
|
|
|
1160
1160
|
cfTextColor: X == null ? void 0 : X.textColor
|
|
1161
1161
|
}), r.restore();
|
|
1162
1162
|
}
|
|
1163
|
-
if (x && !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (r.beginPath(), r.moveTo(c + h - 2 + y, n + m), r.lineTo(c + h - 2 + y, o + m), r.lineWidth = 1, r.strokeStyle =
|
|
1163
|
+
if (x && !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (r.beginPath(), r.moveTo(c + h - 2 + y, n + m), r.lineTo(c + h - 2 + y, o + m), r.lineWidth = 1, r.strokeStyle = Ot.gridLine, r.stroke(), r.closePath()), !this.sheetCtx.luckysheetcurrentisPivotTable && this.sheetCtx.showGridLines && (r.beginPath(), r.moveTo(
|
|
1164
1164
|
i + h - 1,
|
|
1165
1165
|
o + m - 2 + y
|
|
1166
|
-
), r.lineTo(c + h - 1, o + m - 2 + y), r.lineWidth = 1, r.strokeStyle =
|
|
1166
|
+
), r.lineTo(c + h - 1, o + m - 2 + y), r.lineWidth = 1, r.strokeStyle = Ot.gridLine, r.stroke(), r.closePath()), (pe = (_ = this.sheetCtx.hooks).afterRenderCell) == null || pe.call(
|
|
1167
1167
|
_,
|
|
1168
1168
|
(ge = g[t]) == null ? void 0 : ge[l],
|
|
1169
1169
|
{
|
|
@@ -1256,7 +1256,7 @@ class Mh {
|
|
|
1256
1256
|
},
|
|
1257
1257
|
this.sheetCtx
|
|
1258
1258
|
) : void 0, X = lo(t, l, h);
|
|
1259
|
-
o.fillStyle = (P = (k = f == null ? void 0 : f[t]) == null ? void 0 : k[l]) != null && P.fc ? _l(f, t, l, "fc") :
|
|
1259
|
+
o.fillStyle = (P = (k = f == null ? void 0 : f[t]) == null ? void 0 : k[l]) != null && P.fc ? _l(f, t, l, "fc") : Ot.cellText, X != null && X.textColor && (o.fillStyle = X.textColor);
|
|
1260
1260
|
const R = this.sheetCtx.currentSheetId, w = wi.getOpacity(R, t, l);
|
|
1261
1261
|
w < 0.999 ? (o.save(), o.globalAlpha = w, this.cellTextRender(U, o, {
|
|
1262
1262
|
pos_x: M,
|
|
@@ -1393,7 +1393,7 @@ class Mh {
|
|
|
1393
1393
|
n && (n.save(), n.scale(
|
|
1394
1394
|
this.sheetCtx.devicePixelRatio,
|
|
1395
1395
|
this.sheetCtx.devicePixelRatio
|
|
1396
|
-
), n.strokeStyle =
|
|
1396
|
+
), n.strokeStyle = Ot.freezeLine, n.lineWidth = 2, t && (n.beginPath(), n.moveTo(0, t), n.lineTo(this.canvasElement.width, t), n.stroke(), n.closePath()), l && (n.beginPath(), n.moveTo(l, 0), n.lineTo(l, this.canvasElement.height), n.stroke(), n.closePath()), n.restore());
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
function ty(e) {
|
|
@@ -33108,7 +33108,7 @@ const YY = vt.forwardRef(
|
|
|
33108
33108
|
(_ = p == null ? void 0 : p.hooks) != null && _.sheetLengthChange && p.hooks.sheetLengthChange();
|
|
33109
33109
|
}, [p.luckysheetfile.length]), Xe(() => {
|
|
33110
33110
|
const _ = E5(s), pe = document.documentElement;
|
|
33111
|
-
pe.style.setProperty("--grid-cell-bg",
|
|
33111
|
+
pe.style.setProperty("--grid-cell-bg", Ot.cellBg), pe.style.setProperty("--grid-cell-text", Ot.cellText), _ && k((Q) => {
|
|
33112
33112
|
Kt(Q, null, void 0);
|
|
33113
33113
|
});
|
|
33114
33114
|
}, [s, k]), Xe(() => {
|
|
@@ -50927,10 +50927,10 @@ const g7 = ({
|
|
|
50927
50927
|
}, V.readAsText(b);
|
|
50928
50928
|
});
|
|
50929
50929
|
}, vZ = async (e, t, l, n) => {
|
|
50930
|
-
const { handleExportToXLSX: i } = await import("./xlsx-export-impl-
|
|
50930
|
+
const { handleExportToXLSX: i } = await import("./xlsx-export-impl-l3bwAIHT.js");
|
|
50931
50931
|
return i(e, t, l, n);
|
|
50932
50932
|
}, BZ = async (e, t, l, n) => {
|
|
50933
|
-
const { handleExportToODS: i } = await import("./xlsx-export-impl-
|
|
50933
|
+
const { handleExportToODS: i } = await import("./xlsx-export-impl-l3bwAIHT.js");
|
|
50934
50934
|
return i(e, t, l, n);
|
|
50935
50935
|
}, Td = (e) => {
|
|
50936
50936
|
Nh({
|
|
@@ -51021,7 +51021,7 @@ const g7 = ({
|
|
|
51021
51021
|
}) => {
|
|
51022
51022
|
const [s, r] = We(!1), u = Ge(
|
|
51023
51023
|
async (h, m, b) => {
|
|
51024
|
-
const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-
|
|
51024
|
+
const { runXlsxFileUpload: Z } = await import("./use-xlsx-import-impl-DN63dMYx.js");
|
|
51025
51025
|
return Z(
|
|
51026
51026
|
{
|
|
51027
51027
|
sheetEditorRef: e,
|
|
@@ -51052,7 +51052,7 @@ const g7 = ({
|
|
|
51052
51052
|
), d = Ge(
|
|
51053
51053
|
async (h, m, b) => {
|
|
51054
51054
|
var y;
|
|
51055
|
-
const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-
|
|
51055
|
+
const { convertOdsFileToXlsxFile: Z } = await import("./ods-to-xlsx-DeJAYBkD.js"), { runXlsxFileUpload: I } = await import("./use-xlsx-import-impl-DN63dMYx.js"), G = h == null ? void 0 : h.target, V = ((y = G == null ? void 0 : G.files) == null ? void 0 : y[0]) || m;
|
|
51056
51056
|
if (!V) return;
|
|
51057
51057
|
const f = await Z(V);
|
|
51058
51058
|
return I(
|
|
@@ -51534,9 +51534,9 @@ var HK = BK, kK = HK, FK = _m, MZ = $m, OZ = MZ && MZ.isMap, JK = OZ ? FK(OZ) :
|
|
|
51534
51534
|
function MK(e) {
|
|
51535
51535
|
return UK(e) && NK(e) == KK;
|
|
51536
51536
|
}
|
|
51537
|
-
var OK = MK, zK = OK, EK = _m, zZ = $m, EZ = zZ && zZ.isSet, DK = EZ ? EK(EZ) : zK, PK = DK, AK = sG, jK = R7, QK = zG, qK = D7, _K = aU, $K = dU, e8 = hU, t8 = pU, l8 = wU, n8 = yG, i8 = BU, o8 = Ua, s8 = JU, c8 = GK, r8 = LK, a8 = Na, d8 = qm, u8 = TK, h8 = pi, m8 = PK, b8 = t1, Z8 = u1, p8 = 1, I8 = 2, y8 = 4, PG = "[object Arguments]", f8 = "[object Array]", g8 = "[object Boolean]", G8 = "[object Date]", W8 = "[object Error]", AG = "[object Function]", X8 = "[object GeneratorFunction]", V8 = "[object Map]", S8 = "[object Number]", jG = "[object Object]", Y8 = "[object RegExp]", x8 = "[object Set]", w8 = "[object String]", L8 = "[object Symbol]", R8 = "[object WeakMap]", C8 = "[object ArrayBuffer]", v8 = "[object DataView]", B8 = "[object Float32Array]", H8 = "[object Float64Array]", k8 = "[object Int8Array]", F8 = "[object Int16Array]", J8 = "[object Int32Array]", T8 = "[object Uint8Array]", N8 = "[object Uint8ClampedArray]", U8 = "[object Uint16Array]", K8 = "[object Uint32Array]",
|
|
51538
|
-
|
|
51539
|
-
|
|
51537
|
+
var OK = MK, zK = OK, EK = _m, zZ = $m, EZ = zZ && zZ.isSet, DK = EZ ? EK(EZ) : zK, PK = DK, AK = sG, jK = R7, QK = zG, qK = D7, _K = aU, $K = dU, e8 = hU, t8 = pU, l8 = wU, n8 = yG, i8 = BU, o8 = Ua, s8 = JU, c8 = GK, r8 = LK, a8 = Na, d8 = qm, u8 = TK, h8 = pi, m8 = PK, b8 = t1, Z8 = u1, p8 = 1, I8 = 2, y8 = 4, PG = "[object Arguments]", f8 = "[object Array]", g8 = "[object Boolean]", G8 = "[object Date]", W8 = "[object Error]", AG = "[object Function]", X8 = "[object GeneratorFunction]", V8 = "[object Map]", S8 = "[object Number]", jG = "[object Object]", Y8 = "[object RegExp]", x8 = "[object Set]", w8 = "[object String]", L8 = "[object Symbol]", R8 = "[object WeakMap]", C8 = "[object ArrayBuffer]", v8 = "[object DataView]", B8 = "[object Float32Array]", H8 = "[object Float64Array]", k8 = "[object Int8Array]", F8 = "[object Int16Array]", J8 = "[object Int32Array]", T8 = "[object Uint8Array]", N8 = "[object Uint8ClampedArray]", U8 = "[object Uint16Array]", K8 = "[object Uint32Array]", zt = {};
|
|
51538
|
+
zt[PG] = zt[f8] = zt[C8] = zt[v8] = zt[g8] = zt[G8] = zt[B8] = zt[H8] = zt[k8] = zt[F8] = zt[J8] = zt[V8] = zt[S8] = zt[jG] = zt[Y8] = zt[x8] = zt[w8] = zt[L8] = zt[T8] = zt[N8] = zt[U8] = zt[K8] = !0;
|
|
51539
|
+
zt[W8] = zt[AG] = zt[R8] = !1;
|
|
51540
51540
|
function Pc(e, t, l, n, i, o) {
|
|
51541
51541
|
var c, s = t & p8, r = t & I8, u = t & y8;
|
|
51542
51542
|
if (l && (c = i ? l(e, n, i, o) : l(e)), c !== void 0)
|
|
@@ -51555,7 +51555,7 @@ function Pc(e, t, l, n, i, o) {
|
|
|
51555
51555
|
if (c = r || m ? {} : r8(e), !s)
|
|
51556
51556
|
return r ? l8(e, _K(c, e)) : t8(e, qK(c, e));
|
|
51557
51557
|
} else {
|
|
51558
|
-
if (!
|
|
51558
|
+
if (!zt[h])
|
|
51559
51559
|
return i ? e : {};
|
|
51560
51560
|
c = c8(e, h, s);
|
|
51561
51561
|
}
|
|
@@ -56776,7 +56776,7 @@ async function Sz(e, t) {
|
|
|
56776
56776
|
const { convertOdsFileToXlsxFile: b } = await import("./ods-to-xlsx-DeJAYBkD.js");
|
|
56777
56777
|
h = await b(e);
|
|
56778
56778
|
}
|
|
56779
|
-
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-
|
|
56779
|
+
const { runXlsxFileUpload: m } = await import("./use-xlsx-import-impl-DN63dMYx.js");
|
|
56780
56780
|
await m(
|
|
56781
56781
|
{
|
|
56782
56782
|
sheetEditorRef: c,
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 w, G as T, H as v, I as y, J as D, K as M, L as b, M as O, N as k, O as P, P as V } from "./index-
|
|
2
|
-
import { cB as B, cC as K, cD as U, cJ as X, bx as _, e as G, f as H, l as J, a as j, dn as q, dp as N, bb as Y, dq as Z, dr as Q, dv as W, dw as $, dy as ee, I as ae, dO as se, el as oe, b4 as te } from "./executeStringFunction-
|
|
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 w, G as T, H as v, I as y, J as D, K as M, L as b, M as O, N as k, O as P, P as V } from "./index-BDSumZYk.js";
|
|
2
|
+
import { cB as B, cC as K, cD as U, cJ as X, bx as _, e as G, f as H, l as J, a as j, dn as q, dp as N, bb as Y, dq as Z, dr as Q, dv as W, dw as $, dy as ee, I as ae, dO as se, el as oe, b4 as te } from "./executeStringFunction-KWYZ3QNg.js";
|
|
3
3
|
import { FLVURL as le } from "@fileverse-dev/formulajs";
|
|
4
4
|
import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
|
|
5
5
|
export {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type DataVerificationMap = Record<string, any>;
|
|
2
|
+
export type DataVerificationChange = {
|
|
3
|
+
key: string;
|
|
4
|
+
type: 'update' | 'delete';
|
|
5
|
+
value?: any;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Sorting permutes whole rows. Data verification (incl. checkbox `checked`
|
|
9
|
+
* state) is keyed by "r_c", so it has to follow its cell to the new row.
|
|
10
|
+
*
|
|
11
|
+
* `absoluteRowMap` maps old absolute row -> new absolute row for the sorted
|
|
12
|
+
* range. Only columns `stc..edc` are touched.
|
|
13
|
+
*
|
|
14
|
+
* Cost scales with the number of existing rules, not with the size of the
|
|
15
|
+
* sorted range, so sheets without rules return immediately.
|
|
16
|
+
*/
|
|
17
|
+
export declare function permuteDataVerificationByRowMap(source: DataVerificationMap | undefined | null, absoluteRowMap: Record<number, number>, stc: number, edc: number): {
|
|
18
|
+
next: DataVerificationMap;
|
|
19
|
+
changes: DataVerificationChange[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Column span of data verification rules whose row lies in `str..edr`.
|
|
23
|
+
* Used to widen a whole-sheet sort so a column holding only empty cells with
|
|
24
|
+
* rules still moves with its rows.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getDataVerificationColumnSpan(dv: DataVerificationMap | undefined | null, str: number, edr: number): {
|
|
27
|
+
minC: number;
|
|
28
|
+
maxC: number;
|
|
29
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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-
|
|
3
|
-
import { g as sl } from "./executeStringFunction-
|
|
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-BDSumZYk.js";
|
|
3
|
+
import { g as sl } from "./executeStringFunction-KWYZ3QNg.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-
|
|
7
|
-
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-
|
|
6
|
+
import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-CJfom4ax.js";
|
|
7
|
+
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-DoOdrbDR.js";
|
|
8
8
|
import { toast as fZ } from "@fileverse/ui";
|
|
9
9
|
var Zl = { exports: {} };
|
|
10
10
|
(function(m) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as w } from "./executeStringFunction-
|
|
2
|
-
import { J as x } from "./xlsx-hyperlink-inline-
|
|
1
|
+
import { i as w } from "./executeStringFunction-KWYZ3QNg.js";
|
|
2
|
+
import { J as x } from "./xlsx-hyperlink-inline-CJfom4ax.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-
|
|
5
|
-
import { b as gt } from "./executeStringFunction-
|
|
6
|
-
import { e as bt } from "./index-
|
|
4
|
+
import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-CJfom4ax.js";
|
|
5
|
+
import { b as gt } from "./executeStringFunction-KWYZ3QNg.js";
|
|
6
|
+
import { e as bt } from "./index-BDSumZYk.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-
|
|
857
|
+
const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-DoOdrbDR.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
|
-
import { g as Rt, c as yt } from "./executeStringFunction-
|
|
2
|
-
import { c as wt } from "./index-
|
|
1
|
+
import { g as Rt, c as yt } from "./executeStringFunction-KWYZ3QNg.js";
|
|
2
|
+
import { c as wt } from "./index-BDSumZYk.js";
|
|
3
3
|
function jt(J, nt) {
|
|
4
4
|
const g = J.getImages();
|
|
5
5
|
if (!g.length) return [];
|