ooxml-excel-editor 1.16.0 → 1.16.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.
- package/CHANGELOG.md +56 -0
- package/README.md +3 -3
- package/dist/chunks/{index-B524VYpT.js → index-DKKEwcK8.js} +5608 -4961
- package/dist/chunks/{index-CoOchGdS.js → index-Dg4LsUaW.js} +7398 -6756
- package/dist/chunks/{index.es-4CG-9vV3.js → index.es-BFDtb3m5.js} +1 -1
- package/dist/chunks/{index.es-DXHaUdz8.js → index.es-_lLUy2tE.js} +1 -1
- package/dist/chunks/{jspdf.es.min-0SH7s6ux.js → jspdf.es.min-DOtW0DYo.js} +2 -2
- package/dist/chunks/{jspdf.es.min-BGxE3IHn.js → jspdf.es.min-DcIe7UWW.js} +2 -2
- package/dist/chunks/{toolbar-builtins-DldwAB3X.js → toolbar-builtins-CeOlAWgM.js} +1 -1
- package/dist/components/ExcelViewer.vue.d.ts +8 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/plugin.d.ts +16 -0
- package/dist/core/render/canvas-renderer.d.ts +0 -8
- package/dist/core/viewer/controller.d.ts +74 -24
- package/dist/core/viewer/filter-engine.d.ts +57 -0
- package/dist/core/viewer/filter-popup-host.d.ts +36 -0
- package/dist/core/viewer/find-engine.d.ts +31 -0
- package/dist/core/viewer/find-replace-dialog-host.d.ts +69 -0
- package/dist/core.js +1 -1
- package/dist/index.js +1512 -1770
- package/dist/react/ExcelViewer.d.ts +8 -0
- package/dist/react.js +655 -708
- package/dist/style.css +1 -1
- package/dist/vue2.css +1 -1
- package/dist/vue2.js +1 -1
- package/package.json +1 -1
- package/dist/components/FilterPopup.vue.d.ts +0 -21
- package/dist/components/FindBar.vue.d.ts +0 -35
package/dist/react.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
import { jsx as i, jsxs as m, Fragment as
|
|
14
|
-
import { useState as
|
|
15
|
-
import { p as
|
|
16
|
-
import { r as
|
|
17
|
-
import { B as
|
|
18
|
-
const
|
|
1
|
+
var _n = Object.defineProperty, Vn = Object.defineProperties;
|
|
2
|
+
var Jn = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var rn = Object.getOwnPropertySymbols;
|
|
4
|
+
var Un = Object.prototype.hasOwnProperty, jn = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ln = (v, s, k) => s in v ? _n(v, s, { enumerable: !0, configurable: !0, writable: !0, value: k }) : v[s] = k, _ = (v, s) => {
|
|
6
|
+
for (var k in s || (s = {}))
|
|
7
|
+
Un.call(s, k) && ln(v, k, s[k]);
|
|
8
|
+
if (rn)
|
|
9
|
+
for (var k of rn(s))
|
|
10
|
+
jn.call(s, k) && ln(v, k, s[k]);
|
|
11
|
+
return v;
|
|
12
|
+
}, re = (v, s) => Vn(v, Jn(s));
|
|
13
|
+
import { jsx as i, jsxs as m, Fragment as Ie } from "react/jsx-runtime";
|
|
14
|
+
import { useState as y, useRef as b, useCallback as on, forwardRef as Kn, useMemo as Gn, useEffect as R, useReducer as Xn, useLayoutEffect as an, useImperativeHandle as $n, Fragment as Zn } from "react";
|
|
15
|
+
import { p as Cn, R as Yn, l as qn, S as Qn, i as er, r as sn, s as tr, a as le, b as nr, c as rr, d as lr, e as or, T as ar, f as sr, g as cr, h as ir, j as ur, k as dr } from "./chunks/toolbar-builtins-CeOlAWgM.js";
|
|
16
|
+
import { r as cn, l as bn, d as vn, f as pn, a as gr, e as mr, b as Xe, V as fr, P as Cr, D as $e, g as un, s as dn, c as gn, h as mn, i as fn, j as Re, k as Ze, m as br, n as vr } from "./chunks/index-Dg4LsUaW.js";
|
|
17
|
+
import { B as Er, C as Tr, o as Dr, p as Nr, E as Ar, F as Mr, q as Br, G as Or, K as zr, O as Lr, t as Wr, W as Hr, u as _r, v as Vr, w as Jr, x as Ur, y as jr, z as Kr, A as Gr, H as Xr, I as $r, J as Zr, L as Yr, M as qr, N as Qr, Q as el, R as tl, S as nl, T as rl, U as ll, X as ol, Y as al, Z as sl, _ as cl, $ as il, a0 as ul, a1 as dl, a2 as gl, S as ml, a3 as fl, a4 as Cl, a5 as bl, a6 as vl, a7 as pl, a8 as hl, a9 as Sl, aa as xl, ab as Fl, ac as Il, ad as Rl, ae as kl, af as wl, ag as yl, ah as Pl, ai as El, aj as Tl, ak as Dl, al as Nl, am as Al, an as Ml, ao as Bl, ap as Ol, aq as zl, ar as Ll, as as Wl, at as Hl, au as _l, av as Vl, aw as Jl, ax as Ul, ay as jl } from "./chunks/index-Dg4LsUaW.js";
|
|
18
|
+
const pr = {
|
|
19
19
|
render: "渲染中",
|
|
20
20
|
compose: "合成中",
|
|
21
21
|
paginate: "分页中",
|
|
@@ -23,130 +23,130 @@ const kr = {
|
|
|
23
23
|
zip: "zip 压缩",
|
|
24
24
|
convert: "批量转换"
|
|
25
25
|
};
|
|
26
|
-
function
|
|
27
|
-
state:
|
|
28
|
-
busy:
|
|
29
|
-
onCancel:
|
|
26
|
+
function hr({
|
|
27
|
+
state: v,
|
|
28
|
+
busy: s,
|
|
29
|
+
onCancel: k
|
|
30
30
|
}) {
|
|
31
|
-
var
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
31
|
+
var d;
|
|
32
|
+
if (!s) return null;
|
|
33
|
+
const P = v == null ? void 0 : v.ratio, z = (v == null ? void 0 : v.label) || pr[(d = v == null ? void 0 : v.stage) != null ? d : ""] || "处理中…";
|
|
34
34
|
return /* @__PURE__ */ i("div", { className: "rxl-export-progress", role: "dialog", "aria-modal": "true", "aria-live": "polite", children: /* @__PURE__ */ m("div", { className: "card", children: [
|
|
35
|
-
/* @__PURE__ */ i("div", { className: "title", children:
|
|
36
|
-
/* @__PURE__ */ i("div", { className: "bar" + (
|
|
35
|
+
/* @__PURE__ */ i("div", { className: "title", children: z }),
|
|
36
|
+
/* @__PURE__ */ i("div", { className: "bar" + (P == null ? " indeterminate" : ""), children: P != null ? /* @__PURE__ */ i("div", { className: "fill", style: { width: Math.round(P * 100) + "%" } }) : null }),
|
|
37
37
|
/* @__PURE__ */ m("div", { className: "row", children: [
|
|
38
|
-
/* @__PURE__ */ i("span", { className: "pct", children:
|
|
39
|
-
/* @__PURE__ */ i("button", { className: "cancel", onClick:
|
|
38
|
+
/* @__PURE__ */ i("span", { className: "pct", children: P != null ? Math.round(P * 100) + "%" : "正在处理…" }),
|
|
39
|
+
/* @__PURE__ */ i("button", { className: "cancel", onClick: k, title: "按 Esc 也可取消", children: "取消" })
|
|
40
40
|
] })
|
|
41
41
|
] }) });
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const [
|
|
45
|
-
var
|
|
46
|
-
|
|
43
|
+
function Sr() {
|
|
44
|
+
const [v, s] = y(!1), [k, P] = y(null), [z, d] = y(null), [V, M] = y(null), [oe, L] = y(null), B = b(null), fe = on(async (J, j) => {
|
|
45
|
+
var K;
|
|
46
|
+
s(!0), P(null), B.current && cn(B.current), B.current = null, d(null), L(null), M({ stage: "read", ratio: 0 });
|
|
47
47
|
try {
|
|
48
|
-
const
|
|
48
|
+
const h = await bn(
|
|
49
49
|
J,
|
|
50
|
-
(
|
|
51
|
-
),
|
|
52
|
-
if (
|
|
53
|
-
if (
|
|
54
|
-
if (
|
|
55
|
-
let
|
|
56
|
-
j && (
|
|
57
|
-
} catch (
|
|
58
|
-
const
|
|
59
|
-
|
|
50
|
+
(G, X) => M({ stage: "read", ratio: X ? G / X : void 0 })
|
|
51
|
+
), N = vn(h);
|
|
52
|
+
if (N === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
|
|
53
|
+
if (N === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
|
|
54
|
+
if (N === "empty") throw new Error("文件为空。");
|
|
55
|
+
let x = await Cn(h, (G) => M(G));
|
|
56
|
+
j && (x = (K = j(x)) != null ? K : x), pn(x), L(h.slice(0)), B.current = x, d(x);
|
|
57
|
+
} catch (h) {
|
|
58
|
+
const N = h == null ? void 0 : h.message;
|
|
59
|
+
P(N && /预览器|损坏|加密|为空|ZIP/.test(N) ? N : gr(h)), console.error("[ooxml-preview] 解析失败:", h);
|
|
60
60
|
} finally {
|
|
61
|
-
|
|
61
|
+
s(!1), M(null);
|
|
62
62
|
}
|
|
63
|
-
}, []), Y =
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
63
|
+
}, []), Y = on((J, j) => {
|
|
64
|
+
var h;
|
|
65
|
+
B.current && cn(B.current), L(null), P(null), M(null);
|
|
66
|
+
const K = j && (h = j(J)) != null ? h : J;
|
|
67
|
+
B.current = K, d(K);
|
|
68
68
|
}, []);
|
|
69
|
-
return { loading:
|
|
69
|
+
return { loading: v, error: k, workbook: z, progress: V, load: fe, loadModel: Y, sourceBuffer: oe };
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return isFinite(
|
|
71
|
+
function ke(v) {
|
|
72
|
+
return isFinite(v) ? v.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
var Bt, Ot, zt, Lt, Wt, Ht, _t, Vt, Jt,
|
|
76
|
-
const { loading:
|
|
77
|
-
|
|
74
|
+
const wr = Kn(function(s, k) {
|
|
75
|
+
var Tt, Dt, Nt, At, Mt, Bt, Ot, zt, Lt, Wt, Ht, _t, Vt, Jt, Ut, jt;
|
|
76
|
+
const { loading: P, error: z, workbook: d, progress: V, load: M, loadModel: oe, sourceBuffer: L } = Sr(), B = (Tt = L == null ? void 0 : L.byteLength) != null ? Tt : null, fe = Gn(() => d ? mr(d) : null, [d]), Y = b(Xe());
|
|
77
|
+
R(() => {
|
|
78
78
|
var e;
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
const [J, j] =
|
|
82
|
-
|
|
83
|
-
if (!
|
|
84
|
-
const e =
|
|
79
|
+
P && (Y.current = (e = Xe()) != null ? e : Y.current);
|
|
80
|
+
}, [P]);
|
|
81
|
+
const [J, j] = y(null);
|
|
82
|
+
R(() => {
|
|
83
|
+
if (!d) return;
|
|
84
|
+
const e = Xe();
|
|
85
85
|
j(e != null && Y.current != null ? Math.max(0, e - Y.current) : null);
|
|
86
|
-
}, [
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
},
|
|
86
|
+
}, [d]);
|
|
87
|
+
const K = (e) => e ? br(e) ? e : vr(e, s.jsonOptions) : null, [h, N] = y(0), [x, G] = y(1), [X, Ye] = y(null), [we, qe] = y(null), Qe = (Dt = X != null ? X : s.templateFile) != null ? Dt : null, ae = (Nt = we != null ? we : s.templateName) != null ? Nt : "", et = () => {
|
|
88
|
+
Ye(null), qe(null);
|
|
89
|
+
}, tt = b(null), hn = () => {
|
|
90
90
|
var e;
|
|
91
|
-
return (e =
|
|
92
|
-
},
|
|
91
|
+
return (e = tt.current) == null ? void 0 : e.click();
|
|
92
|
+
}, Sn = (e) => {
|
|
93
93
|
var n;
|
|
94
94
|
const t = (n = e.target.files) == null ? void 0 : n[0];
|
|
95
|
-
t && (
|
|
96
|
-
},
|
|
97
|
-
|
|
95
|
+
t && (Ye(t), qe(t.name), e.target.value = "");
|
|
96
|
+
}, nt = s.fileName || (s.workbook ? "JSON 数据" : ((At = d == null ? void 0 : d.sheets[0]) == null ? void 0 : At.name) || ""), [q, Ce] = y(""), $ = s.ribbonPersistKey === null ? null : s.ribbonPersistKey || Yn, [xn, rt] = y(() => $ ? qn($) : null), be = b(null);
|
|
97
|
+
be.current || (be.current = new Qn()), R(() => () => {
|
|
98
98
|
var e;
|
|
99
|
-
return (e =
|
|
99
|
+
return (e = be.current) == null ? void 0 : e.dispose();
|
|
100
100
|
}, []);
|
|
101
|
-
const [
|
|
102
|
-
|
|
101
|
+
const [se, W] = y(null);
|
|
102
|
+
R(() => {
|
|
103
103
|
if (typeof document == "undefined") return;
|
|
104
104
|
const e = (t) => {
|
|
105
105
|
var n;
|
|
106
|
-
(n = t.target) != null && n.closest("[data-tb-menu]") ||
|
|
106
|
+
(n = t.target) != null && n.closest("[data-tb-menu]") || W(null);
|
|
107
107
|
};
|
|
108
108
|
return document.addEventListener("click", e), () => document.removeEventListener("click", e);
|
|
109
109
|
}, []);
|
|
110
|
-
const [,
|
|
111
|
-
const e =
|
|
110
|
+
const [, H] = Xn((e) => e + 1, 0), [Fn, lt] = y(""), ce = b(!1), ot = b(null), at = () => {
|
|
111
|
+
const e = ot.current;
|
|
112
112
|
e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
R(() => {
|
|
115
|
+
at();
|
|
116
116
|
});
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
const pe = (
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
const e =
|
|
127
|
-
|
|
128
|
-
const l = n.length ? (o,
|
|
129
|
-
let
|
|
130
|
-
for (const
|
|
131
|
-
const
|
|
132
|
-
|
|
117
|
+
const st = b(null), ct = b(null), ie = b(null), it = b(null), ye = b(null), Pe = b(null), Ee = b(null), Te = b(null), r = b(null), De = b(null), Ne = b(null), Ae = b(null), ve = b(null), Me = b(/* @__PURE__ */ new Map()), f = b(s);
|
|
118
|
+
f.current = s;
|
|
119
|
+
const pe = (Mt = s.plugins) != null ? Mt : [], Q = b(pe);
|
|
120
|
+
Q.current = pe;
|
|
121
|
+
const ee = b(d);
|
|
122
|
+
ee.current = d;
|
|
123
|
+
const Be = b(h);
|
|
124
|
+
Be.current = h;
|
|
125
|
+
function In() {
|
|
126
|
+
const e = Q.current, t = Object.assign({}, ...e.map((o) => o.theme || {}), f.current.theme || {}), n = e.map((o) => o.cellStyle).filter(Boolean);
|
|
127
|
+
f.current.cellStyle && n.push(f.current.cellStyle);
|
|
128
|
+
const l = n.length ? (o, u, a) => {
|
|
129
|
+
let c;
|
|
130
|
+
for (const C of n) {
|
|
131
|
+
const S = C(o, u, a);
|
|
132
|
+
S && (c = _(_({}, c || {}), S));
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return c;
|
|
135
135
|
} : void 0;
|
|
136
|
-
return { theme: t, cellStyle: l, cellImageFit:
|
|
136
|
+
return { theme: t, cellStyle: l, cellImageFit: f.current.cellImageFit, readOnlyCellStyle: f.current.readOnlyCellStyle };
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function te(e) {
|
|
139
139
|
var n, l;
|
|
140
140
|
let t = e;
|
|
141
|
-
for (const o of
|
|
142
|
-
return
|
|
141
|
+
for (const o of Q.current) o.transformModel && (t = (n = o.transformModel(t)) != null ? n : t);
|
|
142
|
+
return f.current.transformModel && (t = (l = f.current.transformModel(t)) != null ? l : t), t;
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
144
|
+
const he = b(null), Oe = b(null);
|
|
145
|
+
function ze() {
|
|
146
146
|
var t;
|
|
147
|
-
const e =
|
|
147
|
+
const e = f.current;
|
|
148
148
|
return {
|
|
149
|
-
editable: (t =
|
|
149
|
+
editable: (t = he.current) != null ? t : e.editable,
|
|
150
150
|
pivotTable: e.pivotTable,
|
|
151
151
|
conditionalFormat: e.conditionalFormat,
|
|
152
152
|
cellReadOnly: e.cellReadOnly,
|
|
@@ -159,208 +159,210 @@ const Dr = Yn(function(a, S) {
|
|
|
159
159
|
readOnlyPrompt: e.readOnlyPrompt
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
if (
|
|
162
|
+
function ut() {
|
|
163
|
+
if (f.current.editor || Q.current.some((t) => t.editor))
|
|
164
164
|
return (t, n) => {
|
|
165
|
-
var o,
|
|
166
|
-
const l = (
|
|
165
|
+
var o, u, a;
|
|
166
|
+
const l = (u = (o = f.current).editor) == null ? void 0 : u.call(o, t, n);
|
|
167
167
|
if (l) return l;
|
|
168
|
-
for (const
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
168
|
+
for (const c of Q.current) {
|
|
169
|
+
const C = (a = c.editor) == null ? void 0 : a.call(c, t, n);
|
|
170
|
+
if (C) return C;
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
const
|
|
174
|
+
const ne = (e, t) => {
|
|
175
175
|
var n;
|
|
176
|
-
return (n =
|
|
176
|
+
return (n = Me.current.get(e)) == null ? void 0 : n.forEach((l) => l(t));
|
|
177
177
|
}, Z = (e) => {
|
|
178
178
|
var n, l, o;
|
|
179
179
|
const t = String((n = e == null ? void 0 : e.message) != null ? n : e);
|
|
180
|
-
console.error("[ooxml-excel-editor] 导出失败:", e), (o = (l =
|
|
181
|
-
}, [
|
|
180
|
+
console.error("[ooxml-excel-editor] 导出失败:", e), (o = (l = f.current).onError) == null || o.call(l, t), typeof window != "undefined" && window.alert && window.alert(t);
|
|
181
|
+
}, [dt, Le] = y(null), [gt, mt] = y(!1), We = b(null), ft = () => {
|
|
182
182
|
var e;
|
|
183
|
-
return (e =
|
|
183
|
+
return (e = We.current) == null ? void 0 : e.abort();
|
|
184
184
|
};
|
|
185
|
-
function
|
|
186
|
-
if (
|
|
185
|
+
function F(e, t) {
|
|
186
|
+
if (f.current.exportProgress === !1) return t(e);
|
|
187
187
|
const n = new AbortController();
|
|
188
|
-
|
|
189
|
-
const l = (
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
}, o =
|
|
188
|
+
We.current = n, e != null && e.signal && (e.signal.aborted ? n.abort() : e.signal.addEventListener("abort", () => n.abort(), { once: !0 })), mt(!0), Le(null);
|
|
189
|
+
const l = (u) => {
|
|
190
|
+
var a;
|
|
191
|
+
Le(u), (a = e == null ? void 0 : e.onProgress) == null || a.call(e, u);
|
|
192
|
+
}, o = re(_({}, e != null ? e : {}), { onProgress: l, signal: n.signal });
|
|
193
193
|
return t(o).finally(() => {
|
|
194
|
-
|
|
194
|
+
mt(!1), Le(null), We.current = null;
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
const e =
|
|
197
|
+
function He() {
|
|
198
|
+
const e = ve.current, t = r.current;
|
|
199
199
|
if (!e || !t) return;
|
|
200
200
|
const n = {
|
|
201
201
|
rectOf: (l, o) => t.rectOf(l, o),
|
|
202
202
|
rectOfRange: (l) => t.rectOfRange(l),
|
|
203
203
|
tick: 0,
|
|
204
|
-
workbook:
|
|
204
|
+
workbook: ee.current
|
|
205
205
|
};
|
|
206
|
-
e.render(
|
|
206
|
+
e.render(Q.current, n);
|
|
207
207
|
}
|
|
208
|
-
|
|
209
|
-
const e =
|
|
210
|
-
if (!e || !t || !n || !l || !
|
|
211
|
-
const o = new
|
|
208
|
+
an(() => {
|
|
209
|
+
const e = ct.current, t = st.current, n = ie.current, l = it.current;
|
|
210
|
+
if (!e || !t || !n || !l || !Ae.current || !ye.current || !Pe.current || !Ee.current || !Te.current) return;
|
|
211
|
+
const o = new fr(
|
|
212
212
|
{
|
|
213
213
|
canvas: e,
|
|
214
214
|
renderArea: t,
|
|
215
215
|
scroller: n,
|
|
216
216
|
spacer: l,
|
|
217
|
-
overlays: { main:
|
|
218
|
-
editorSlot:
|
|
217
|
+
overlays: { main: ye.current, frow: Pe.current, fcol: Ee.current, corner: Te.current },
|
|
218
|
+
editorSlot: Ae.current
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
-
onRenderer: () =>
|
|
222
|
-
onRenderTick: () =>
|
|
221
|
+
onRenderer: () => H(),
|
|
222
|
+
onRenderTick: () => He(),
|
|
223
223
|
// 插件 overlay 随每帧重定位(纯 DOM,不触发 React 重渲)
|
|
224
|
-
onSelectionChange: () =>
|
|
225
|
-
onCellClick: (
|
|
226
|
-
var T,
|
|
227
|
-
const
|
|
228
|
-
(
|
|
224
|
+
onSelectionChange: () => H(),
|
|
225
|
+
onCellClick: (a, c, C) => {
|
|
226
|
+
var T, D;
|
|
227
|
+
const S = { row: a, col: c, text: C };
|
|
228
|
+
(D = (T = f.current).onCellClick) == null || D.call(T, S), ne("cell-click", S);
|
|
229
229
|
},
|
|
230
|
-
onCellDblClick: (
|
|
231
|
-
var T,
|
|
232
|
-
const
|
|
233
|
-
(
|
|
230
|
+
onCellDblClick: (a, c, C) => {
|
|
231
|
+
var T, D;
|
|
232
|
+
const S = { row: a, col: c, text: C };
|
|
233
|
+
(D = (T = f.current).onCellDblClick) == null || D.call(T, S), ne("cell-dblclick", S);
|
|
234
234
|
},
|
|
235
|
-
onHyperlink: (
|
|
236
|
-
var
|
|
237
|
-
(
|
|
235
|
+
onHyperlink: (a, c) => {
|
|
236
|
+
var C, S;
|
|
237
|
+
(S = (C = f.current).onHyperlinkClick) == null || S.call(C, { url: a, cell: c }), ne("hyperlink-click", { url: a, cell: c }), f.current.openLinks !== !1 && window.open(a, "_blank", "noopener");
|
|
238
238
|
},
|
|
239
|
-
onTooltip: (
|
|
240
|
-
|
|
239
|
+
onTooltip: (a) => {
|
|
240
|
+
De.current = a, H();
|
|
241
241
|
},
|
|
242
|
-
onFindChange: () =>
|
|
243
|
-
onFilterChange: () =>
|
|
244
|
-
onActiveSheetChange: (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
242
|
+
onFindChange: () => H(),
|
|
243
|
+
onFilterChange: () => H(),
|
|
244
|
+
onActiveSheetChange: (a) => N(a),
|
|
245
|
+
onZoomChange: (a) => G(a),
|
|
246
|
+
// 触屏 pinch/双击 → 同步工具栏 %(effect 去重不再回 setZoom)
|
|
247
|
+
onEditEvent: (a, c) => {
|
|
248
|
+
var C, S, T, D, me, Kt, Gt, Xt, $t, Zt, Yt, qt, Qt, en, tn, nn;
|
|
249
|
+
a === "cell-change" ? (H(), (S = (C = f.current).onCellChange) == null || S.call(C, c)) : a === "edit-start" ? (D = (T = f.current).onEditStart) == null || D.call(T, c) : a === "edit-commit" ? (Kt = (me = f.current).onEditCommit) == null || Kt.call(me, c) : a === "dim-change" ? (Xt = (Gt = f.current).onDimChange) == null || Xt.call(Gt, c) : a === "dirty-change" ? (H(), (Zt = ($t = f.current).onDirtyChange) == null || Zt.call($t, c)) : a === "image-change" ? (qt = (Yt = f.current).onImageChange) == null || qt.call(Yt, c) : a === "struct-change" ? (en = (Qt = f.current).onStructChange) == null || en.call(Qt, c) : a === "permission-denied" && ((nn = (tn = f.current).onPermissionDenied) == null || nn.call(tn, c)), ne(a, c);
|
|
248
250
|
},
|
|
249
|
-
onContextMenuBefore: (
|
|
250
|
-
var
|
|
251
|
-
for (const T of (
|
|
251
|
+
onContextMenuBefore: (a) => {
|
|
252
|
+
var c, C, S;
|
|
253
|
+
for (const T of (c = f.current.plugins) != null ? c : [])
|
|
252
254
|
if (T.contextMenu) {
|
|
253
|
-
const
|
|
254
|
-
Array.isArray(
|
|
255
|
+
const D = T.contextMenu(a.ctx, a.items);
|
|
256
|
+
Array.isArray(D) && a.items.splice(0, a.items.length, ...D);
|
|
255
257
|
}
|
|
256
|
-
(
|
|
258
|
+
(S = (C = f.current).onBeforeContextMenu) == null || S.call(C, a), f.current.contextMenu === !1 && a.preventDefault();
|
|
257
259
|
},
|
|
258
|
-
onContextMenuShow: (
|
|
259
|
-
var
|
|
260
|
-
return (
|
|
260
|
+
onContextMenuShow: (a) => {
|
|
261
|
+
var c, C;
|
|
262
|
+
return (C = (c = f.current).onContextMenuShow) == null ? void 0 : C.call(c, a);
|
|
261
263
|
}
|
|
262
264
|
}
|
|
263
265
|
);
|
|
264
|
-
o.fileName =
|
|
265
|
-
const
|
|
266
|
+
o.fileName = f.current.fileName, o.setEditConfig(ze()), o.setEditorResolver(ut()), o.setContextMenuTransform(typeof f.current.contextMenu == "function" ? f.current.contextMenu : null), o.setLightboxEnabled(f.current.imageLightbox !== !1), r.current = o, Ne.current && (ve.current = new Cr(Ne.current));
|
|
267
|
+
const u = new ResizeObserver(() => {
|
|
266
268
|
o.measure(), o.render();
|
|
267
269
|
});
|
|
268
|
-
return
|
|
269
|
-
var
|
|
270
|
-
|
|
270
|
+
return u.observe(t), () => {
|
|
271
|
+
var a;
|
|
272
|
+
u.disconnect(), o.dispose(), (a = ve.current) == null || a.dispose(), ve.current = null, r.current = null;
|
|
271
273
|
};
|
|
272
|
-
}, []),
|
|
273
|
-
const e =
|
|
274
|
+
}, []), R(() => {
|
|
275
|
+
const e = Qe, t = K(s.workbook);
|
|
274
276
|
async function n(o) {
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
if (
|
|
278
|
-
if (
|
|
279
|
-
const
|
|
280
|
-
return
|
|
277
|
+
const u = await bn(o), a = vn(u);
|
|
278
|
+
if (a === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
|
|
279
|
+
if (a === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
|
|
280
|
+
if (a === "empty") throw new Error("模板文件为空");
|
|
281
|
+
const c = await Cn(u);
|
|
282
|
+
return pn(c), c;
|
|
281
283
|
}
|
|
282
284
|
async function l() {
|
|
283
|
-
if (
|
|
284
|
-
e && console.warn("[ooxml-excel-editor] templateFile 只在 workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await
|
|
285
|
+
if (s.src) {
|
|
286
|
+
e && console.warn("[ooxml-excel-editor] templateFile 只在 workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await M(s.src, te);
|
|
285
287
|
return;
|
|
286
288
|
}
|
|
287
289
|
if (t && e) {
|
|
288
290
|
try {
|
|
289
|
-
const o = await n(e),
|
|
290
|
-
|
|
291
|
+
const o = await n(e), u = rr(t, o);
|
|
292
|
+
oe(u, te);
|
|
291
293
|
} catch (o) {
|
|
292
|
-
console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", o),
|
|
294
|
+
console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", o), oe(t, te);
|
|
293
295
|
}
|
|
294
296
|
return;
|
|
295
297
|
}
|
|
296
298
|
if (t) {
|
|
297
|
-
|
|
299
|
+
oe(t, te);
|
|
298
300
|
return;
|
|
299
301
|
}
|
|
300
|
-
e && await
|
|
302
|
+
e && await M(e, te);
|
|
301
303
|
}
|
|
302
304
|
l();
|
|
303
|
-
}, [
|
|
304
|
-
r.current && (r.current.fileName =
|
|
305
|
-
}, [
|
|
305
|
+
}, [s.src, s.workbook, s.templateFile, X]), R(() => {
|
|
306
|
+
r.current && (r.current.fileName = s.fileName);
|
|
307
|
+
}, [s.fileName]), R(() => {
|
|
306
308
|
var e;
|
|
307
|
-
|
|
308
|
-
}, [
|
|
309
|
+
he.current = null, (e = r.current) == null || e.setEditConfig(ze());
|
|
310
|
+
}, [s.editable, s.cellReadOnly, s.readOnlyRanges, s.editableTargets, s.strictDimensions, s.recalc, s.formulaEngine, s.pasteBehavior, s.readOnlyPrompt]), R(() => {
|
|
309
311
|
var e;
|
|
310
312
|
(e = r.current) == null || e.setContextMenuTransform(
|
|
311
|
-
typeof
|
|
313
|
+
typeof s.contextMenu == "function" ? s.contextMenu : null
|
|
312
314
|
);
|
|
313
|
-
}, [
|
|
315
|
+
}, [s.contextMenu]), R(() => {
|
|
314
316
|
var e;
|
|
315
|
-
(e = r.current) == null || e.setEditorResolver(
|
|
316
|
-
}, [
|
|
317
|
+
(e = r.current) == null || e.setEditorResolver(ut());
|
|
318
|
+
}, [s.editor, s.plugins]), R(() => {
|
|
317
319
|
var e;
|
|
318
|
-
|
|
319
|
-
}, [
|
|
320
|
+
Oe.current = null, s.cellImageFit && ((e = r.current) == null || e.setCellImageFit(s.cellImageFit));
|
|
321
|
+
}, [s.cellImageFit]), R(() => {
|
|
320
322
|
var e;
|
|
321
|
-
(e = r.current) == null || e.setLightboxEnabled(
|
|
322
|
-
}, [
|
|
323
|
+
(e = r.current) == null || e.setLightboxEnabled(s.imageLightbox !== !1);
|
|
324
|
+
}, [s.imageLightbox]), R(() => {
|
|
323
325
|
var e, t;
|
|
324
|
-
|
|
325
|
-
}, [
|
|
326
|
+
d && (N(d.activeSheet), (t = (e = f.current).onRendered) == null || t.call(e, d));
|
|
327
|
+
}, [d]), R(() => {
|
|
326
328
|
var e, t;
|
|
327
|
-
|
|
328
|
-
}, [
|
|
329
|
-
var l, o,
|
|
329
|
+
z && ((t = (e = f.current).onError) == null || t.call(e, z));
|
|
330
|
+
}, [z]), an(() => {
|
|
331
|
+
var l, o, u, a;
|
|
330
332
|
const e = r.current;
|
|
331
|
-
if (!e || !
|
|
332
|
-
const t = (o = (l =
|
|
333
|
+
if (!e || !d) return;
|
|
334
|
+
const t = (o = (l = d.sheets[h]) != null ? l : d.sheets[0]) != null ? o : null;
|
|
333
335
|
if (!t) return;
|
|
334
|
-
e.rebuild(t,
|
|
335
|
-
const n = { index:
|
|
336
|
-
(
|
|
337
|
-
}, [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}, [
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
var o,
|
|
336
|
+
e.rebuild(t, d, x, In()), e.setSourceBuffer(L), He();
|
|
337
|
+
const n = { index: h, name: t.name };
|
|
338
|
+
(a = (u = f.current).onSheetChange) == null || a.call(u, n), ne("sheet-change", n);
|
|
339
|
+
}, [d, h, s.theme, s.cellStyle, s.plugins, L]), R(() => {
|
|
340
|
+
const e = r.current;
|
|
341
|
+
e && Math.abs(e.getZoom() - x) < 1e-6 || e == null || e.setZoom(x);
|
|
342
|
+
}, [x]);
|
|
343
|
+
const Ct = b("");
|
|
344
|
+
R(() => {
|
|
345
|
+
var o, u;
|
|
344
346
|
const e = r.current;
|
|
345
347
|
if (!e) return;
|
|
346
348
|
const t = e.getSelection(), n = e.getActiveCell(), l = t && n ? `${t.top},${t.left},${t.bottom},${t.right}` : "";
|
|
347
|
-
if (l && l !==
|
|
348
|
-
|
|
349
|
-
const
|
|
350
|
-
(
|
|
349
|
+
if (l && l !== Ct.current && n) {
|
|
350
|
+
Ct.current = l;
|
|
351
|
+
const a = { range: t, active: n };
|
|
352
|
+
(u = (o = f.current).onSelectionChange) == null || u.call(o, a), ne("selection-change", a);
|
|
351
353
|
}
|
|
352
354
|
});
|
|
353
|
-
const
|
|
355
|
+
const ue = (e) => {
|
|
354
356
|
var t;
|
|
355
|
-
return (t =
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
return (t = d == null ? void 0 : d.sheets[e != null ? e : h]) != null ? t : null;
|
|
358
|
+
}, bt = (Bt = d == null ? void 0 : d.date1904) != null ? Bt : !1, _e = (e) => re(_({}, e), { date1904: bt });
|
|
359
|
+
$n(
|
|
360
|
+
k,
|
|
359
361
|
() => ({
|
|
360
|
-
load: (e) =>
|
|
361
|
-
getWorkbook: () =>
|
|
362
|
-
getActiveSheet: () =>
|
|
363
|
-
setActiveSheet: (e) => (
|
|
362
|
+
load: (e) => M(e, s.transformModel),
|
|
363
|
+
getWorkbook: () => d,
|
|
364
|
+
getActiveSheet: () => h,
|
|
365
|
+
setActiveSheet: (e) => (d == null ? void 0 : d.sheets[e]) && N(e),
|
|
364
366
|
getSelection: () => {
|
|
365
367
|
var e, t;
|
|
366
368
|
return (t = (e = r.current) == null ? void 0 : e.getSelection()) != null ? t : null;
|
|
@@ -409,6 +411,38 @@ const Dr = Yn(function(a, S) {
|
|
|
409
411
|
var t, n;
|
|
410
412
|
return (n = (t = r.current) == null ? void 0 : t.sortActiveColumn(e)) != null ? n : !1;
|
|
411
413
|
},
|
|
414
|
+
toggleAutoFilter: () => {
|
|
415
|
+
var e;
|
|
416
|
+
return (e = r.current) == null ? void 0 : e.toggleAutoFilter();
|
|
417
|
+
},
|
|
418
|
+
hasFilters: () => {
|
|
419
|
+
var e, t;
|
|
420
|
+
return (t = (e = r.current) == null ? void 0 : e.hasFilters()) != null ? t : !1;
|
|
421
|
+
},
|
|
422
|
+
clearAllFilters: () => {
|
|
423
|
+
var e;
|
|
424
|
+
return (e = r.current) == null ? void 0 : e.clearAllFilters();
|
|
425
|
+
},
|
|
426
|
+
openFilterConditionDialog: (e) => {
|
|
427
|
+
var t;
|
|
428
|
+
return (t = r.current) == null ? void 0 : t.openFilterConditionDialog(e);
|
|
429
|
+
},
|
|
430
|
+
applyFilterCondition: (e, t) => {
|
|
431
|
+
var n, l;
|
|
432
|
+
return (l = (n = r.current) == null ? void 0 : n.applyFilterCondition(e, t)) != null ? l : !1;
|
|
433
|
+
},
|
|
434
|
+
openFindReplaceDialog: (e) => {
|
|
435
|
+
var t;
|
|
436
|
+
return (t = r.current) == null ? void 0 : t.openFindReplaceDialog(e);
|
|
437
|
+
},
|
|
438
|
+
closeFindReplaceDialog: () => {
|
|
439
|
+
var e;
|
|
440
|
+
return (e = r.current) == null ? void 0 : e.closeFindReplaceDialog();
|
|
441
|
+
},
|
|
442
|
+
isFindDialogOpen: () => {
|
|
443
|
+
var e;
|
|
444
|
+
return !!((e = r.current) != null && e.isFindDialogOpen());
|
|
445
|
+
},
|
|
412
446
|
createPivotTable: (e) => {
|
|
413
447
|
var t, n;
|
|
414
448
|
return (n = (t = r.current) == null ? void 0 : t.createPivotTable(e)) != null ? n : !1;
|
|
@@ -535,7 +569,7 @@ const Dr = Yn(function(a, S) {
|
|
|
535
569
|
},
|
|
536
570
|
getPasteBehavior: () => {
|
|
537
571
|
var e, t;
|
|
538
|
-
return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t :
|
|
572
|
+
return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : $e;
|
|
539
573
|
},
|
|
540
574
|
setPasteBehavior: (e) => {
|
|
541
575
|
var t;
|
|
@@ -649,13 +683,13 @@ const Dr = Yn(function(a, S) {
|
|
|
649
683
|
var t, n;
|
|
650
684
|
return (n = (t = r.current) == null ? void 0 : t.convertAllImagesToCells(e)) != null ? n : 0;
|
|
651
685
|
},
|
|
652
|
-
convertImagesInRangeToCell: (e) =>
|
|
686
|
+
convertImagesInRangeToCell: (e) => F({}, async (t) => {
|
|
653
687
|
var n, l, o;
|
|
654
688
|
return (n = t.onProgress) == null || n.call(t, { stage: "convert", label: "选区浮动图批量嵌入…" }), (o = (l = r.current) == null ? void 0 : l.convertImagesInRangeToCell(e)) != null ? o : 0;
|
|
655
689
|
}),
|
|
656
|
-
convertCellImagesInRangeToFloat: (e, t) =>
|
|
657
|
-
var l, o,
|
|
658
|
-
return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (
|
|
690
|
+
convertCellImagesInRangeToFloat: (e, t) => F({}, async (n) => {
|
|
691
|
+
var l, o, u;
|
|
692
|
+
return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (u = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? u : 0;
|
|
659
693
|
}),
|
|
660
694
|
openContextMenu: (e, t, n) => {
|
|
661
695
|
var l;
|
|
@@ -765,14 +799,14 @@ const Dr = Yn(function(a, S) {
|
|
|
765
799
|
var e, t;
|
|
766
800
|
return (t = (e = r.current) == null ? void 0 : e.resetToOriginal()) != null ? t : !1;
|
|
767
801
|
},
|
|
768
|
-
exportImage: (e) =>
|
|
769
|
-
downloadImage: (e) =>
|
|
770
|
-
exportPdf: (e) =>
|
|
771
|
-
downloadPdf: (e) =>
|
|
772
|
-
print: (e) =>
|
|
802
|
+
exportImage: (e) => F(e, (t) => r.current.exportImage(t)),
|
|
803
|
+
downloadImage: (e) => F(e, (t) => r.current.downloadImage(t)),
|
|
804
|
+
exportPdf: (e) => F(e, (t) => r.current.exportPdf(t)),
|
|
805
|
+
downloadPdf: (e) => F(e, (t) => r.current.downloadPdf(t)),
|
|
806
|
+
print: (e) => F(e, (t) => r.current.print(t)),
|
|
773
807
|
openPrintPreview: (e) => r.current ? r.current.openPrintPreview(e) : Promise.resolve(!1),
|
|
774
|
-
exportXlsx: (e) =>
|
|
775
|
-
downloadXlsx: (e) =>
|
|
808
|
+
exportXlsx: (e) => F(e, (t) => r.current.exportXlsx(t)),
|
|
809
|
+
downloadXlsx: (e) => F(e, (t) => r.current.downloadXlsx(t)),
|
|
776
810
|
exportJson: (e) => {
|
|
777
811
|
var t, n;
|
|
778
812
|
return (n = (t = r.current) == null ? void 0 : t.exportJson(e)) != null ? n : "{}";
|
|
@@ -790,42 +824,42 @@ const Dr = Yn(function(a, S) {
|
|
|
790
824
|
return (t = r.current) == null ? void 0 : t.downloadCsv(e);
|
|
791
825
|
},
|
|
792
826
|
getCellValue: (e, t, n) => {
|
|
793
|
-
const l =
|
|
794
|
-
return l ?
|
|
827
|
+
const l = ue(n);
|
|
828
|
+
return l ? fn(l, e, t) : null;
|
|
795
829
|
},
|
|
796
830
|
getCellText: (e, t, n) => {
|
|
797
|
-
const l =
|
|
798
|
-
return l ?
|
|
831
|
+
const l = ue(n);
|
|
832
|
+
return l ? mn(l, e, t, bt) : "";
|
|
799
833
|
},
|
|
800
834
|
getSheetData: (e, t) => {
|
|
801
|
-
const n =
|
|
802
|
-
return n ?
|
|
835
|
+
const n = ue(t);
|
|
836
|
+
return n ? gn(n, _e(e)) : [];
|
|
803
837
|
},
|
|
804
838
|
getSheetJSON: (e, t) => {
|
|
805
|
-
const n =
|
|
806
|
-
return n ?
|
|
839
|
+
const n = ue(t);
|
|
840
|
+
return n ? dn(n, _e(e)) : [];
|
|
807
841
|
},
|
|
808
842
|
getRangeData: (e, t, n) => {
|
|
809
|
-
const l =
|
|
810
|
-
return l ?
|
|
843
|
+
const l = ue(n);
|
|
844
|
+
return l ? un(l, e, _e(t)) : [];
|
|
811
845
|
}
|
|
812
846
|
}),
|
|
813
847
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
814
|
-
[
|
|
848
|
+
[d, h]
|
|
815
849
|
);
|
|
816
|
-
const
|
|
850
|
+
const de = (e) => {
|
|
817
851
|
var t, n;
|
|
818
|
-
return (n = (t =
|
|
819
|
-
},
|
|
852
|
+
return (n = (t = ee.current) == null ? void 0 : t.sheets[e != null ? e : Be.current]) != null ? n : null;
|
|
853
|
+
}, Se = () => {
|
|
820
854
|
var e, t;
|
|
821
|
-
return (t = (e =
|
|
822
|
-
},
|
|
823
|
-
load: (e) =>
|
|
824
|
-
getWorkbook: () =>
|
|
825
|
-
getActiveSheet: () =>
|
|
855
|
+
return (t = (e = ee.current) == null ? void 0 : e.date1904) != null ? t : !1;
|
|
856
|
+
}, xe = b({
|
|
857
|
+
load: (e) => M(e, te),
|
|
858
|
+
getWorkbook: () => ee.current,
|
|
859
|
+
getActiveSheet: () => Be.current,
|
|
826
860
|
setActiveSheet: (e) => {
|
|
827
861
|
var t;
|
|
828
|
-
(t =
|
|
862
|
+
(t = ee.current) != null && t.sheets[e] && N(e);
|
|
829
863
|
},
|
|
830
864
|
getSelection: () => {
|
|
831
865
|
var e, t;
|
|
@@ -1060,6 +1094,38 @@ const Dr = Yn(function(a, S) {
|
|
|
1060
1094
|
var e, t;
|
|
1061
1095
|
return (t = (e = r.current) == null ? void 0 : e.reapplyFilters()) != null ? t : !1;
|
|
1062
1096
|
},
|
|
1097
|
+
toggleAutoFilter: () => {
|
|
1098
|
+
var e;
|
|
1099
|
+
return (e = r.current) == null ? void 0 : e.toggleAutoFilter();
|
|
1100
|
+
},
|
|
1101
|
+
hasFilters: () => {
|
|
1102
|
+
var e, t;
|
|
1103
|
+
return (t = (e = r.current) == null ? void 0 : e.hasFilters()) != null ? t : !1;
|
|
1104
|
+
},
|
|
1105
|
+
clearAllFilters: () => {
|
|
1106
|
+
var e;
|
|
1107
|
+
return (e = r.current) == null ? void 0 : e.clearAllFilters();
|
|
1108
|
+
},
|
|
1109
|
+
openFilterConditionDialog: (e) => {
|
|
1110
|
+
var t;
|
|
1111
|
+
return (t = r.current) == null ? void 0 : t.openFilterConditionDialog(e);
|
|
1112
|
+
},
|
|
1113
|
+
applyFilterCondition: (e, t) => {
|
|
1114
|
+
var n, l;
|
|
1115
|
+
return (l = (n = r.current) == null ? void 0 : n.applyFilterCondition(e, t)) != null ? l : !1;
|
|
1116
|
+
},
|
|
1117
|
+
openFindReplaceDialog: (e) => {
|
|
1118
|
+
var t;
|
|
1119
|
+
return (t = r.current) == null ? void 0 : t.openFindReplaceDialog(e);
|
|
1120
|
+
},
|
|
1121
|
+
closeFindReplaceDialog: () => {
|
|
1122
|
+
var e;
|
|
1123
|
+
return (e = r.current) == null ? void 0 : e.closeFindReplaceDialog();
|
|
1124
|
+
},
|
|
1125
|
+
isFindDialogOpen: () => {
|
|
1126
|
+
var e;
|
|
1127
|
+
return !!((e = r.current) != null && e.isFindDialogOpen());
|
|
1128
|
+
},
|
|
1063
1129
|
openDataValidationDialog: (e) => {
|
|
1064
1130
|
var t, n;
|
|
1065
1131
|
return (n = (t = r.current) == null ? void 0 : t.openDataValidationDialog(e)) != null ? n : !1;
|
|
@@ -1298,7 +1364,7 @@ const Dr = Yn(function(a, S) {
|
|
|
1298
1364
|
},
|
|
1299
1365
|
getPasteBehavior: () => {
|
|
1300
1366
|
var e, t;
|
|
1301
|
-
return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t :
|
|
1367
|
+
return (t = (e = r.current) == null ? void 0 : e.getPasteBehavior()) != null ? t : $e;
|
|
1302
1368
|
},
|
|
1303
1369
|
setPasteBehavior: (e) => {
|
|
1304
1370
|
var t;
|
|
@@ -1412,13 +1478,13 @@ const Dr = Yn(function(a, S) {
|
|
|
1412
1478
|
var t, n;
|
|
1413
1479
|
return (n = (t = r.current) == null ? void 0 : t.convertAllImagesToCells(e)) != null ? n : 0;
|
|
1414
1480
|
},
|
|
1415
|
-
convertImagesInRangeToCell: (e) =>
|
|
1481
|
+
convertImagesInRangeToCell: (e) => F({}, async (t) => {
|
|
1416
1482
|
var n, l, o;
|
|
1417
1483
|
return (n = t.onProgress) == null || n.call(t, { stage: "convert", label: "选区浮动图批量嵌入…" }), (o = (l = r.current) == null ? void 0 : l.convertImagesInRangeToCell(e)) != null ? o : 0;
|
|
1418
1484
|
}),
|
|
1419
|
-
convertCellImagesInRangeToFloat: (e, t) =>
|
|
1420
|
-
var l, o,
|
|
1421
|
-
return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (
|
|
1485
|
+
convertCellImagesInRangeToFloat: (e, t) => F({}, async (n) => {
|
|
1486
|
+
var l, o, u;
|
|
1487
|
+
return (l = n.onProgress) == null || l.call(n, { stage: "convert", label: "选区内嵌图批量浮动化…" }), (u = (o = r.current) == null ? void 0 : o.convertCellImagesInRangeToFloat(e, t)) != null ? u : 0;
|
|
1422
1488
|
}),
|
|
1423
1489
|
openContextMenu: (e, t, n) => {
|
|
1424
1490
|
var l;
|
|
@@ -1528,14 +1594,14 @@ const Dr = Yn(function(a, S) {
|
|
|
1528
1594
|
var e, t;
|
|
1529
1595
|
return (t = (e = r.current) == null ? void 0 : e.resetToOriginal()) != null ? t : !1;
|
|
1530
1596
|
},
|
|
1531
|
-
exportImage: (e) =>
|
|
1532
|
-
downloadImage: (e) =>
|
|
1533
|
-
exportPdf: (e) =>
|
|
1534
|
-
downloadPdf: (e) =>
|
|
1535
|
-
print: (e) =>
|
|
1597
|
+
exportImage: (e) => F(e, (t) => r.current.exportImage(t)),
|
|
1598
|
+
downloadImage: (e) => F(e, (t) => r.current.downloadImage(t)),
|
|
1599
|
+
exportPdf: (e) => F(e, (t) => r.current.exportPdf(t)),
|
|
1600
|
+
downloadPdf: (e) => F(e, (t) => r.current.downloadPdf(t)),
|
|
1601
|
+
print: (e) => F(e, (t) => r.current.print(t)),
|
|
1536
1602
|
openPrintPreview: (e) => r.current ? r.current.openPrintPreview(e) : Promise.resolve(!1),
|
|
1537
|
-
exportXlsx: (e) =>
|
|
1538
|
-
downloadXlsx: (e) =>
|
|
1603
|
+
exportXlsx: (e) => F(e, (t) => r.current.exportXlsx(t)),
|
|
1604
|
+
downloadXlsx: (e) => F(e, (t) => r.current.downloadXlsx(t)),
|
|
1539
1605
|
exportJson: (e) => {
|
|
1540
1606
|
var t, n;
|
|
1541
1607
|
return (n = (t = r.current) == null ? void 0 : t.exportJson(e)) != null ? n : "{}";
|
|
@@ -1553,79 +1619,80 @@ const Dr = Yn(function(a, S) {
|
|
|
1553
1619
|
return (t = r.current) == null ? void 0 : t.downloadCsv(e);
|
|
1554
1620
|
},
|
|
1555
1621
|
getCellValue: (e, t, n) => {
|
|
1556
|
-
const l =
|
|
1557
|
-
return l ?
|
|
1622
|
+
const l = de(n);
|
|
1623
|
+
return l ? fn(l, e, t) : null;
|
|
1558
1624
|
},
|
|
1559
1625
|
getCellText: (e, t, n) => {
|
|
1560
|
-
const l =
|
|
1561
|
-
return l ?
|
|
1626
|
+
const l = de(n);
|
|
1627
|
+
return l ? mn(l, e, t, Se()) : "";
|
|
1562
1628
|
},
|
|
1563
1629
|
getSheetData: (e, t) => {
|
|
1564
|
-
const n =
|
|
1565
|
-
return n ?
|
|
1630
|
+
const n = de(t);
|
|
1631
|
+
return n ? gn(n, re(_({}, e), { date1904: Se() })) : [];
|
|
1566
1632
|
},
|
|
1567
1633
|
getSheetJSON: (e, t) => {
|
|
1568
|
-
const n =
|
|
1569
|
-
return n ?
|
|
1634
|
+
const n = de(t);
|
|
1635
|
+
return n ? dn(n, re(_({}, e), { date1904: Se() })) : [];
|
|
1570
1636
|
},
|
|
1571
1637
|
getRangeData: (e, t, n) => {
|
|
1572
|
-
const l =
|
|
1573
|
-
return l ?
|
|
1638
|
+
const l = de(n);
|
|
1639
|
+
return l ? un(l, e, re(_({}, t), { date1904: Se() })) : [];
|
|
1574
1640
|
}
|
|
1575
1641
|
}).current;
|
|
1576
|
-
|
|
1642
|
+
R(() => {
|
|
1577
1643
|
var l;
|
|
1578
|
-
const e = /* @__PURE__ */ new Map(), t = [], n = (o,
|
|
1579
|
-
let
|
|
1580
|
-
|
|
1644
|
+
const e = /* @__PURE__ */ new Map(), t = [], n = (o, u) => {
|
|
1645
|
+
let a = e.get(o);
|
|
1646
|
+
a || e.set(o, a = /* @__PURE__ */ new Set()), a.add(u);
|
|
1581
1647
|
};
|
|
1582
1648
|
for (const o of pe) {
|
|
1583
1649
|
if (o.events)
|
|
1584
|
-
for (const [
|
|
1585
|
-
const
|
|
1586
|
-
var
|
|
1587
|
-
return (
|
|
1650
|
+
for (const [a, c] of Object.entries(o.events)) c && n(a, c);
|
|
1651
|
+
const u = (l = o.setup) == null ? void 0 : l.call(o, { viewer: xe, on: n, redraw: () => {
|
|
1652
|
+
var a;
|
|
1653
|
+
return (a = r.current) == null ? void 0 : a.render();
|
|
1588
1654
|
} });
|
|
1589
|
-
typeof
|
|
1655
|
+
typeof u == "function" && t.push(u);
|
|
1590
1656
|
}
|
|
1591
|
-
return
|
|
1592
|
-
t.forEach((o) => o()),
|
|
1657
|
+
return Me.current = e, He(), () => {
|
|
1658
|
+
t.forEach((o) => o()), Me.current = /* @__PURE__ */ new Map();
|
|
1593
1659
|
};
|
|
1594
|
-
}, [
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1660
|
+
}, [s.plugins]);
|
|
1661
|
+
const Rn = (e) => {
|
|
1662
|
+
var t;
|
|
1663
|
+
(e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), (t = r.current) == null || t.openFindReplaceDialog("find"));
|
|
1664
|
+
}, kn = () => {
|
|
1665
|
+
const e = r.current;
|
|
1666
|
+
e != null && e.isFindDialogOpen() ? e.closeFindReplaceDialog() : e == null || e.openFindReplaceDialog("find");
|
|
1667
|
+
}, wn = () => {
|
|
1601
1668
|
var t;
|
|
1602
|
-
const e =
|
|
1603
|
-
e && (
|
|
1604
|
-
},
|
|
1669
|
+
const e = ie.current;
|
|
1670
|
+
e && (De.current = null, (t = r.current) == null || t.setScroll(e.scrollLeft, e.scrollTop));
|
|
1671
|
+
}, p = r.current, Ve = (Ot = p == null ? void 0 : p.renderer) != null ? Ot : null, U = (zt = p == null ? void 0 : p.getActiveCell()) != null ? zt : null, w = (Lt = p == null ? void 0 : p.getSelection()) != null ? Lt : null, vt = U ? Re(U.col) + (U.row + 1) : "", pt = Ve && U ? (Wt = Ve.cellFormula(U.row, U.col)) != null ? Wt : Ve.cellText(U.row, U.col) : "", yn = !!(p != null && p.canEditActiveCell()), Pn = (Ht = p == null ? void 0 : p.getCellEditString()) != null ? Ht : "", Je = ce.current ? Fn : Pn, En = () => {
|
|
1605
1672
|
var e;
|
|
1606
|
-
|
|
1607
|
-
},
|
|
1673
|
+
ce.current = !0, lt((e = p == null ? void 0 : p.getCellEditString()) != null ? e : "");
|
|
1674
|
+
}, ht = (e) => {
|
|
1608
1675
|
var t;
|
|
1609
|
-
|
|
1610
|
-
},
|
|
1676
|
+
p == null || p.commitActiveCellValue(Je, e), ce.current = !1, e === "down" && ((t = ie.current) == null || t.focus()), H();
|
|
1677
|
+
}, Tn = () => {
|
|
1611
1678
|
var e;
|
|
1612
|
-
|
|
1613
|
-
},
|
|
1614
|
-
|
|
1615
|
-
},
|
|
1616
|
-
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(),
|
|
1617
|
-
},
|
|
1679
|
+
ce.current = !1, (e = ie.current) == null || e.focus(), H();
|
|
1680
|
+
}, Dn = () => {
|
|
1681
|
+
ce.current && ht();
|
|
1682
|
+
}, Nn = (e) => {
|
|
1683
|
+
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), ht("down")) : e.key === "Escape" && (e.preventDefault(), Tn());
|
|
1684
|
+
}, An = w && !(w.top === w.bottom && w.left === w.right) ? `${Re(w.left)}${w.top + 1}:${Re(w.right)}${w.bottom + 1}` : "", O = (_t = p == null ? void 0 : p.getSelectionStats()) != null ? _t : null, I = (e) => ur[e], g = (e) => _({ kind: "builtin" }, e), A = d == null ? void 0 : d.sheets[h], St = () => {
|
|
1618
1685
|
var e;
|
|
1619
1686
|
return void ((e = r.current) == null ? void 0 : e.downloadPdf().catch(Z));
|
|
1620
|
-
},
|
|
1687
|
+
}, xt = () => {
|
|
1621
1688
|
var e;
|
|
1622
1689
|
return void ((e = r.current) == null ? void 0 : e.downloadPdf({ vector: !0 }).catch(Z));
|
|
1623
|
-
},
|
|
1690
|
+
}, Ft = () => {
|
|
1624
1691
|
var e;
|
|
1625
1692
|
return void ((e = r.current) == null ? void 0 : e.print().catch(Z));
|
|
1626
|
-
},
|
|
1693
|
+
}, Mn = () => {
|
|
1627
1694
|
var l;
|
|
1628
|
-
const e =
|
|
1695
|
+
const e = A, t = r.current;
|
|
1629
1696
|
if (!e || !t) return;
|
|
1630
1697
|
const n = e.freeze;
|
|
1631
1698
|
if (n.frozenRows || n.frozenCols) e.freeze = { frozenRows: 0, frozenCols: 0 };
|
|
@@ -1635,92 +1702,92 @@ const Dr = Yn(function(a, S) {
|
|
|
1635
1702
|
}
|
|
1636
1703
|
(l = t.renderer) == null || l.rebuildMetrics(), t.refreshContentSize(), t.render();
|
|
1637
1704
|
};
|
|
1638
|
-
function
|
|
1639
|
-
var l, o;
|
|
1640
|
-
const t = r.current, n =
|
|
1705
|
+
function Bn(e) {
|
|
1706
|
+
var l, o, u;
|
|
1707
|
+
const t = r.current, n = dr(e, { controller: t, editable: !!s.editable, hasSelection: !!w });
|
|
1641
1708
|
if (n) return n;
|
|
1642
1709
|
switch (e) {
|
|
1643
1710
|
case "find":
|
|
1644
|
-
return g({ id: e, iconSvg:
|
|
1711
|
+
return g({ id: e, iconSvg: I("find"), label: "查找", title: "查找和替换 (Ctrl+F)", active: !!((l = r.current) != null && l.isFindDialogOpen()), onClick: () => kn() });
|
|
1645
1712
|
case "filter":
|
|
1646
|
-
return g({ id: e, iconSvg:
|
|
1713
|
+
return g({ id: e, iconSvg: I("filter"), label: "筛选", title: "切换自动筛选", active: !!(A != null && A.autoFilterRange), onClick: () => t == null ? void 0 : t.toggleAutoFilter() });
|
|
1647
1714
|
case "clear-filter":
|
|
1648
|
-
return g({ id: e, iconSvg:
|
|
1715
|
+
return g({ id: e, iconSvg: I("clear-filter"), label: "清除筛选", title: "清除当前表全部筛选", disabled: !(t != null && t.hasFilters()), onClick: () => t == null ? void 0 : t.clearAllFilters() });
|
|
1649
1716
|
case "sort": {
|
|
1650
|
-
const
|
|
1717
|
+
const a = t == null ? void 0 : t.getSortState(), c = t == null ? void 0 : t.getActiveCell(), C = !c || !A;
|
|
1651
1718
|
return g({
|
|
1652
1719
|
id: e,
|
|
1653
|
-
iconSvg:
|
|
1720
|
+
iconSvg: I("sort"),
|
|
1654
1721
|
label: "排序",
|
|
1655
|
-
title:
|
|
1656
|
-
active: !!(
|
|
1657
|
-
disabled:
|
|
1722
|
+
title: c ? `按 ${Re(c.col)} 列排序` : "选中一个单元格后按该列排序",
|
|
1723
|
+
active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir),
|
|
1724
|
+
disabled: C,
|
|
1658
1725
|
items: [
|
|
1659
|
-
g({ id: "sort-asc", label: "升序 (A → Z / 小 → 大)", active: !!(
|
|
1660
|
-
g({ id: "sort-desc", label: "降序 (Z → A / 大 → 小)", active: !!(
|
|
1726
|
+
g({ id: "sort-asc", label: "升序 (A → Z / 小 → 大)", active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir === "asc"), disabled: C, onClick: () => t == null ? void 0 : t.sortActiveColumn("asc") }),
|
|
1727
|
+
g({ id: "sort-desc", label: "降序 (Z → A / 大 → 小)", active: !!(c && (a == null ? void 0 : a.col) === c.col && a.dir === "desc"), disabled: C, onClick: () => t == null ? void 0 : t.sortActiveColumn("desc") }),
|
|
1661
1728
|
g({ id: "sort-custom-sep", type: "separator" }),
|
|
1662
1729
|
g({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
|
|
1663
1730
|
]
|
|
1664
1731
|
});
|
|
1665
1732
|
}
|
|
1666
1733
|
case "copy":
|
|
1667
|
-
return g({ id: e, iconSvg:
|
|
1734
|
+
return g({ id: e, iconSvg: I("copy"), label: "复制", title: "复制选区 (Ctrl+C)", disabled: !w, onClick: () => void (t == null ? void 0 : t.copySelection()) });
|
|
1668
1735
|
case "pivot-table":
|
|
1669
|
-
return
|
|
1736
|
+
return s.pivotTable ? g({ id: e, iconSvg: I("pivot-table"), label: "透视表", title: "选择字段并基于当前选区创建静态透视汇总表", disabled: !w || !s.editable, onClick: () => t == null ? void 0 : t.openPivotTableDialog() }) : null;
|
|
1670
1737
|
// 功能未开启(默认):不渲染入口
|
|
1671
1738
|
case "conditional-format":
|
|
1672
|
-
return
|
|
1739
|
+
return s.conditionalFormat ? g({ id: e, iconSvg: I("conditional-format"), label: "条件格式", title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)", disabled: !s.editable, onClick: () => t == null ? void 0 : t.openConditionalFormatDialog() }) : null;
|
|
1673
1740
|
// 功能未开启(默认):不渲染入口
|
|
1674
1741
|
case "number-format":
|
|
1675
|
-
return g({ id: e, iconSvg:
|
|
1742
|
+
return g({ id: e, iconSvg: I("number-format"), label: "数字格式", title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)", disabled: !w || !s.editable, onClick: () => t == null ? void 0 : t.openNumberFormatDialog() });
|
|
1676
1743
|
case "format-painter":
|
|
1677
|
-
return g({ id: e, iconSvg:
|
|
1744
|
+
return g({ id: e, iconSvg: I("format-painter"), label: "格式刷", title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)", active: !!(t != null && t.isFormatPainterArmed()), disabled: !w || !s.editable, onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter() });
|
|
1678
1745
|
case "wrap-text": {
|
|
1679
|
-
const
|
|
1680
|
-
return g({ id: e, iconSvg:
|
|
1746
|
+
const a = (o = t == null ? void 0 : t.getSelectionWrapState()) != null ? o : "none";
|
|
1747
|
+
return g({ id: e, iconSvg: I("wrap-text"), label: "自动换行", title: "自动换行(选区,WPS 风格 toggle)", active: a === "all", disabled: !w || !s.editable, onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection()) });
|
|
1681
1748
|
}
|
|
1682
1749
|
case "template": {
|
|
1683
|
-
const
|
|
1750
|
+
const a = !!Qe, c = ae, C = !!s.src && !s.workbook;
|
|
1684
1751
|
return g({
|
|
1685
1752
|
id: e,
|
|
1686
|
-
iconSvg:
|
|
1753
|
+
iconSvg: I("template"),
|
|
1687
1754
|
label: "模板",
|
|
1688
|
-
title:
|
|
1689
|
-
active:
|
|
1690
|
-
disabled:
|
|
1755
|
+
title: C ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : a ? `模板已加载:${c || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式;模板的文字内容会被丢弃",
|
|
1756
|
+
active: a,
|
|
1757
|
+
disabled: C,
|
|
1691
1758
|
items: [
|
|
1692
|
-
g({ id: "tpl-default", label: (
|
|
1759
|
+
g({ id: "tpl-default", label: (a ? "" : "✓ ") + "默认渲染", title: "不套模板,数据按默认样式渲染", disabled: !a, onClick: et }),
|
|
1693
1760
|
g({ id: "tpl-sep", type: "separator" }),
|
|
1694
|
-
g({ id: "tpl-import", label: "导入 .xlsx 模板…", title: "选一份 .xlsx, 把它的 styling 套到当前 JSON 数据上", onClick:
|
|
1695
|
-
g({ id: "tpl-clear", label: "清除模板", title: "切回默认样式渲染", disabled: !
|
|
1761
|
+
g({ id: "tpl-import", label: "导入 .xlsx 模板…", title: "选一份 .xlsx, 把它的 styling 套到当前 JSON 数据上", onClick: hn }),
|
|
1762
|
+
g({ id: "tpl-clear", label: "清除模板", title: "切回默认样式渲染", disabled: !a, onClick: et })
|
|
1696
1763
|
]
|
|
1697
1764
|
});
|
|
1698
1765
|
}
|
|
1699
1766
|
case "image-tools": {
|
|
1700
|
-
const
|
|
1767
|
+
const a = w, c = t == null ? void 0 : t.getActiveCell(), C = ((u = A == null ? void 0 : A.images.length) != null ? u : 0) > 0;
|
|
1701
1768
|
return g({
|
|
1702
1769
|
id: e,
|
|
1703
|
-
iconSvg:
|
|
1770
|
+
iconSvg: I("image-tools"),
|
|
1704
1771
|
label: "图片工具",
|
|
1705
1772
|
title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
|
|
1706
|
-
disabled: !
|
|
1773
|
+
disabled: !s.editable,
|
|
1707
1774
|
items: [
|
|
1708
|
-
g({ id: "img-sel-to-cell", label: "选区:浮动 → 嵌入", title: '把选区里"中心格在选区内"的浮动图就近嵌入', disabled: !
|
|
1709
|
-
g({ id: "img-sel-to-float", label: "选区:嵌入 → 浮动", title: "把选区内所有 DISPIMG 格拎成浮动图", disabled: !
|
|
1775
|
+
g({ id: "img-sel-to-cell", label: "选区:浮动 → 嵌入", title: '把选区里"中心格在选区内"的浮动图就近嵌入', disabled: !a || !C, onClick: () => a && (t == null ? void 0 : t.convertImagesInRangeToCell(a)) }),
|
|
1776
|
+
g({ id: "img-sel-to-float", label: "选区:嵌入 → 浮动", title: "把选区内所有 DISPIMG 格拎成浮动图", disabled: !a, onClick: () => a && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(a)) }),
|
|
1710
1777
|
g({ id: "img-sep", type: "separator" }),
|
|
1711
|
-
g({ id: "img-all-to-cell", label: "整表:浮动 → 嵌入", title: "全表浮动图按几何就近嵌入各自单元格", disabled: !
|
|
1712
|
-
g({ id: "img-col-to-cell", label: "整列:浮动 → 嵌入(活动列)", title: "把中心落在活动列的浮动图就近嵌入", disabled: !
|
|
1778
|
+
g({ id: "img-all-to-cell", label: "整表:浮动 → 嵌入", title: "全表浮动图按几何就近嵌入各自单元格", disabled: !C, onClick: () => t == null ? void 0 : t.convertAllImagesToCells() }),
|
|
1779
|
+
g({ id: "img-col-to-cell", label: "整列:浮动 → 嵌入(活动列)", title: "把中心落在活动列的浮动图就近嵌入", disabled: !C || !c, onClick: () => c && (t == null ? void 0 : t.convertAllImagesToCells(c.col)) })
|
|
1713
1780
|
]
|
|
1714
1781
|
});
|
|
1715
1782
|
}
|
|
1716
1783
|
case "freeze": {
|
|
1717
|
-
const
|
|
1718
|
-
return g({ id: e, iconSvg:
|
|
1784
|
+
const a = A == null ? void 0 : A.freeze;
|
|
1785
|
+
return g({ id: e, iconSvg: I("freeze"), label: "冻结", title: "冻结/取消冻结(在活动单元格)", active: !!(a && (a.frozenRows || a.frozenCols)), onClick: Mn });
|
|
1719
1786
|
}
|
|
1720
1787
|
case "export":
|
|
1721
1788
|
return g({
|
|
1722
1789
|
id: e,
|
|
1723
|
-
iconSvg:
|
|
1790
|
+
iconSvg: I("export"),
|
|
1724
1791
|
label: "导出",
|
|
1725
1792
|
title: "导出 / 打印",
|
|
1726
1793
|
items: [
|
|
@@ -1729,75 +1796,75 @@ const Dr = Yn(function(a, S) {
|
|
|
1729
1796
|
g({ id: "export-json", label: "导出为 JSON (.json)", onClick: () => t == null ? void 0 : t.downloadJson() }),
|
|
1730
1797
|
g({ id: "export-sep", type: "separator" }),
|
|
1731
1798
|
g({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void (t == null ? void 0 : t.downloadImage().catch(Z)) }),
|
|
1732
|
-
g({ id: "export-pdf", label: "导出为 PDF (位图)", onClick:
|
|
1733
|
-
g({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick:
|
|
1734
|
-
g({ id: "export-print", label: "打印…", onClick:
|
|
1799
|
+
g({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: St }),
|
|
1800
|
+
g({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: xt }),
|
|
1801
|
+
g({ id: "export-print", label: "打印…", onClick: Ft })
|
|
1735
1802
|
]
|
|
1736
1803
|
});
|
|
1737
1804
|
case "zoom":
|
|
1738
1805
|
return g({
|
|
1739
1806
|
id: e,
|
|
1740
|
-
iconSvg:
|
|
1741
|
-
label: Math.round(
|
|
1807
|
+
iconSvg: I("zoom"),
|
|
1808
|
+
label: Math.round(x * 100) + "%",
|
|
1742
1809
|
title: "缩放",
|
|
1743
|
-
items: [50, 75, 100, 125, 150, 200].map((
|
|
1810
|
+
items: [50, 75, 100, 125, 150, 200].map((a) => g({ id: "zoom-" + a, label: a + "%", active: Math.round(x * 100) === a, onClick: () => G(a / 100) }))
|
|
1744
1811
|
});
|
|
1745
1812
|
}
|
|
1746
1813
|
return null;
|
|
1747
1814
|
}
|
|
1748
|
-
function
|
|
1815
|
+
function Ue(e, t) {
|
|
1749
1816
|
var l;
|
|
1750
1817
|
const n = { kind: t, id: e.id, type: e.type, icon: e.icon, label: e.label, title: e.title };
|
|
1751
|
-
return e.active && (n.active = !!e.active(
|
|
1818
|
+
return e.active && (n.active = !!e.active(xe)), e.disabled && (n.disabled = !!e.disabled(xe)), e.onClick && (n.onClick = () => {
|
|
1752
1819
|
var o;
|
|
1753
|
-
return (o = e.onClick) == null ? void 0 : o.call(e,
|
|
1754
|
-
}), (l = e.items) != null && l.length && (n.items = e.items.map((o) =>
|
|
1820
|
+
return (o = e.onClick) == null ? void 0 : o.call(e, xe);
|
|
1821
|
+
}), (l = e.items) != null && l.length && (n.items = e.items.map((o) => Ue(o, t))), n;
|
|
1755
1822
|
}
|
|
1756
|
-
const
|
|
1757
|
-
var l, o,
|
|
1823
|
+
const On = (e, t) => {
|
|
1824
|
+
var l, o, u;
|
|
1758
1825
|
const n = [];
|
|
1759
|
-
for (const
|
|
1760
|
-
if (
|
|
1761
|
-
else if (
|
|
1762
|
-
else if (t[
|
|
1826
|
+
for (const a of e)
|
|
1827
|
+
if (lr(a)) n.push({ id: "br-" + n.length, type: "rowbreak", kind: "builtin" });
|
|
1828
|
+
else if (or(a)) n.push({ id: "sep-" + n.length, type: "separator", kind: "builtin" });
|
|
1829
|
+
else if (t[a]) n.push(Ue(t[a], "custom"));
|
|
1763
1830
|
else {
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1831
|
+
const c = Bn(a);
|
|
1832
|
+
c && (c.size = (u = (o = c.size) != null ? o : (l = ar[a]) == null ? void 0 : l.size) != null ? u : "small", n.push(c));
|
|
1766
1833
|
}
|
|
1767
1834
|
return n;
|
|
1768
|
-
},
|
|
1769
|
-
|
|
1770
|
-
E.sections && (E.sections.some((e) => e.id ===
|
|
1771
|
-
}, [E.sections, E.activeSectionId,
|
|
1772
|
-
const
|
|
1835
|
+
}, It = er(s.ribbon, s.toolbar), E = sn({ ribbon: s.ribbon, toolbar: s.toolbar, userState: It && $ ? xn : null });
|
|
1836
|
+
R(() => {
|
|
1837
|
+
E.sections && (E.sections.some((e) => e.id === q) || Ce(E.activeSectionId));
|
|
1838
|
+
}, [E.sections, E.activeSectionId, q]);
|
|
1839
|
+
const Rt = E.sections ? (Vt = E.sections.find((e) => e.id === q)) != null ? Vt : E.sections[0] : null, kt = (() => {
|
|
1773
1840
|
var n;
|
|
1774
|
-
if (!
|
|
1775
|
-
const e =
|
|
1776
|
-
for (const l of pe) for (const o of (n = l.toolbar) != null ? n : []) t.push(
|
|
1841
|
+
if (!Rt) return [];
|
|
1842
|
+
const e = tr(Rt).map((l) => ({ id: l.id, name: l.name, items: On(l.tools, E.customItems) })), t = [];
|
|
1843
|
+
for (const l of pe) for (const o of (n = l.toolbar) != null ? n : []) t.push(Ue(o, "plugin"));
|
|
1777
1844
|
return t.length && (e.length ? e[e.length - 1].items.push(...t) : e.push({ id: "plugins", name: "", items: t })), e;
|
|
1778
|
-
})(),
|
|
1779
|
-
var e, t, n, l, o,
|
|
1780
|
-
(
|
|
1845
|
+
})(), wt = kt.flatMap((e) => e.items), zn = wt, je = !!E.sections && wt.length > 0, Ke = !E.singleSection && !!E.sections, Ln = It, Wn = d ? d.sheets.filter((e) => e.state === "visible").length : 0, yt = [0.5, 0.75, 1, 1.25, 1.5, 2], Fe = (e) => G(Math.min(3, Math.max(0.3, e))), Hn = () => {
|
|
1846
|
+
var e, t, n, l, o, u, a;
|
|
1847
|
+
(a = be.current) == null || a.show({
|
|
1781
1848
|
sections: (e = E.sections) != null ? e : [],
|
|
1782
|
-
activeSectionId:
|
|
1783
|
-
catalog:
|
|
1784
|
-
zoom:
|
|
1785
|
-
editable: (t =
|
|
1786
|
-
cellImageFit: (l = (n =
|
|
1787
|
-
pasteBehavior: (
|
|
1788
|
-
onRibbonChange: (
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
},
|
|
1792
|
-
onRuntimeChange: (
|
|
1793
|
-
var
|
|
1794
|
-
|
|
1849
|
+
activeSectionId: q,
|
|
1850
|
+
catalog: sr,
|
|
1851
|
+
zoom: x,
|
|
1852
|
+
editable: (t = he.current) != null ? t : !!s.editable,
|
|
1853
|
+
cellImageFit: (l = (n = Oe.current) != null ? n : s.cellImageFit) != null ? l : "fill",
|
|
1854
|
+
pasteBehavior: (u = (o = r.current) == null ? void 0 : o.getPasteBehavior()) != null ? u : $e,
|
|
1855
|
+
onRibbonChange: (c, C) => {
|
|
1856
|
+
const S = { v: 1, sections: c, activeSectionId: C };
|
|
1857
|
+
rt(S), $ && ir($, S), Ce(C);
|
|
1858
|
+
},
|
|
1859
|
+
onRuntimeChange: (c) => {
|
|
1860
|
+
var C, S, T, D, me;
|
|
1861
|
+
c.zoom != null && Fe(c.zoom), c.editable != null && (he.current = c.editable, (C = r.current) == null || C.setEditConfig(ze()), (S = s.onEditableChange) == null || S.call(s, c.editable)), c.cellImageFit != null && (Oe.current = c.cellImageFit, (T = r.current) == null || T.setCellImageFit(c.cellImageFit), (D = s.onCellImageFitChange) == null || D.call(s, c.cellImageFit)), c.pasteBehavior != null && ((me = r.current) == null || me.setPasteBehavior(c.pasteBehavior));
|
|
1795
1862
|
},
|
|
1796
1863
|
onReset: () => {
|
|
1797
|
-
$ &&
|
|
1864
|
+
$ && cr($), rt(null), Ce(sn({ ribbon: s.ribbon, toolbar: s.toolbar, userState: null }).activeSectionId);
|
|
1798
1865
|
}
|
|
1799
1866
|
});
|
|
1800
|
-
},
|
|
1867
|
+
}, Ge = ({ items: e, onPick: t, className: n = "rxl-tb-menu" }) => /* @__PURE__ */ i("div", { className: n, "data-tb-menu": "true", children: e.map((l) => l.type === "separator" ? /* @__PURE__ */ i("div", { className: "sep" }, l.id) : l.input ? /* @__PURE__ */ i(
|
|
1801
1868
|
"input",
|
|
1802
1869
|
{
|
|
1803
1870
|
className: "mi-input",
|
|
@@ -1827,15 +1894,15 @@ const Dr = Yn(function(a, S) {
|
|
|
1827
1894
|
return (o = l.onHoverEnd) == null ? void 0 : o.call(l);
|
|
1828
1895
|
},
|
|
1829
1896
|
children: [
|
|
1830
|
-
l.swatch ? /* @__PURE__ */ i("span", { className: "sw", style: { background: l.swatch } }) : l.iconSvg ? /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html:
|
|
1897
|
+
l.swatch ? /* @__PURE__ */ i("span", { className: "sw", style: { background: l.swatch } }) : l.iconSvg ? /* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: le(l.iconSvg) } }) : l.icon ? /* @__PURE__ */ i("span", { className: "ic-e", children: l.icon }) : null,
|
|
1831
1898
|
l.label && /* @__PURE__ */ i("span", { className: "lb", children: l.label })
|
|
1832
1899
|
]
|
|
1833
1900
|
},
|
|
1834
1901
|
l.id
|
|
1835
|
-
)) }),
|
|
1902
|
+
)) }), ge = De.current, Pt = d ? d.sheets.map((e, t) => ({ s: e, i: t })).filter(({ s: e }) => e.state === "visible") : [], Et = (e, t) => {
|
|
1836
1903
|
var o;
|
|
1837
1904
|
if (e.type === "separator") return /* @__PURE__ */ i("span", { className: "rxl-rb-vsep" }, e.id);
|
|
1838
|
-
const n = !!((o = e.items) != null && o.length), l =
|
|
1905
|
+
const n = !!((o = e.items) != null && o.length), l = se === e.id;
|
|
1839
1906
|
return /* @__PURE__ */ m("div", { className: "rxl-at-dd", "data-tb-menu": "true", children: [
|
|
1840
1907
|
/* @__PURE__ */ m(
|
|
1841
1908
|
"button",
|
|
@@ -1843,56 +1910,56 @@ const Dr = Yn(function(a, S) {
|
|
|
1843
1910
|
className: "rxl-rb-btn " + (t ? "rxl-rb-large" : "rxl-rb-small") + (e.active ? " active" : "") + (l ? " open" : "") + (!t && n && e.label ? " combo" : ""),
|
|
1844
1911
|
disabled: !!e.disabled,
|
|
1845
1912
|
title: e.title || e.label || e.id,
|
|
1846
|
-
onClick: (
|
|
1847
|
-
var
|
|
1848
|
-
|
|
1913
|
+
onClick: (u) => {
|
|
1914
|
+
var a;
|
|
1915
|
+
u.stopPropagation(), !e.disabled && (n ? W(l ? null : e.id) : ((a = e.onClick) == null || a.call(e), W(null)));
|
|
1849
1916
|
},
|
|
1850
1917
|
children: [
|
|
1851
|
-
e.iconSvg ? /* @__PURE__ */ i("span", { className: t ? "rxl-rb-ic-lg" : "rxl-rb-ic-sm", dangerouslySetInnerHTML: { __html:
|
|
1918
|
+
e.iconSvg ? /* @__PURE__ */ i("span", { className: t ? "rxl-rb-ic-lg" : "rxl-rb-ic-sm", dangerouslySetInnerHTML: { __html: le(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
|
|
1852
1919
|
t ? /* @__PURE__ */ m("span", { className: "rxl-rb-lb", children: [
|
|
1853
1920
|
e.label,
|
|
1854
1921
|
n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret-inline", children: "▾" })
|
|
1855
1922
|
] }) : (n || e.showLabel) && e.label ? /* @__PURE__ */ i("span", { className: "rxl-rb-lb-sm", children: e.label }) : null,
|
|
1856
|
-
!t && n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret", dangerouslySetInnerHTML: { __html:
|
|
1923
|
+
!t && n && /* @__PURE__ */ i("span", { className: "rxl-rb-caret", dangerouslySetInnerHTML: { __html: le(I("caret")) } })
|
|
1857
1924
|
]
|
|
1858
1925
|
}
|
|
1859
1926
|
),
|
|
1860
|
-
n && l && /* @__PURE__ */ i(
|
|
1861
|
-
var
|
|
1862
|
-
|
|
1927
|
+
n && l && /* @__PURE__ */ i(Ge, { items: e.items, onPick: (u) => {
|
|
1928
|
+
var a;
|
|
1929
|
+
u.keepOpen || W(null), (a = u.onClick) == null || a.call(u);
|
|
1863
1930
|
} })
|
|
1864
1931
|
] }, e.id);
|
|
1865
1932
|
};
|
|
1866
|
-
return /* @__PURE__ */ m("div", { className: "rxl" + (
|
|
1867
|
-
/* @__PURE__ */ i("input", { ref:
|
|
1868
|
-
|
|
1869
|
-
/* @__PURE__ */ m("span", { className: "file", title: ((
|
|
1870
|
-
((
|
|
1871
|
-
|
|
1872
|
-
|
|
1933
|
+
return /* @__PURE__ */ m("div", { className: "rxl" + (s.className ? " " + s.className : ""), style: s.style, onKeyDown: Rn, children: [
|
|
1934
|
+
/* @__PURE__ */ i("input", { ref: tt, type: "file", accept: ".xlsx,.xlsm", hidden: !0, onChange: Sn }),
|
|
1935
|
+
d && /* @__PURE__ */ m("div", { className: "rxl-toolbar", children: [
|
|
1936
|
+
/* @__PURE__ */ m("span", { className: "file", title: ((Jt = r.current) != null && Jt.isDirty() ? "* 已修改(未保存) · " : "") + nt + (ae ? " · 模板: " + ae : ""), children: [
|
|
1937
|
+
((Ut = r.current) == null ? void 0 : Ut.isDirty()) && /* @__PURE__ */ i("span", { className: "modified", title: "已修改(未保存)", children: "*" }),
|
|
1938
|
+
nt || "未命名工作簿",
|
|
1939
|
+
ae && /* @__PURE__ */ m("span", { className: "tpl", children: [
|
|
1873
1940
|
" · 模板: ",
|
|
1874
|
-
|
|
1941
|
+
ae
|
|
1875
1942
|
] })
|
|
1876
1943
|
] }),
|
|
1877
1944
|
/* @__PURE__ */ m("span", { className: "meta", children: [
|
|
1878
|
-
|
|
1945
|
+
Wn,
|
|
1879
1946
|
" 个工作表",
|
|
1880
|
-
|
|
1947
|
+
B != null && /* @__PURE__ */ m(Ie, { children: [
|
|
1881
1948
|
" · 源文件 ",
|
|
1882
|
-
|
|
1949
|
+
Ze(B)
|
|
1883
1950
|
] }),
|
|
1884
|
-
|
|
1951
|
+
fe != null && /* @__PURE__ */ m(Ie, { children: [
|
|
1885
1952
|
" · ",
|
|
1886
1953
|
/* @__PURE__ */ m("span", { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)", children: [
|
|
1887
1954
|
"数据约 ",
|
|
1888
|
-
|
|
1955
|
+
Ze(fe)
|
|
1889
1956
|
] })
|
|
1890
1957
|
] }),
|
|
1891
|
-
J != null && /* @__PURE__ */ m(
|
|
1958
|
+
J != null && /* @__PURE__ */ m(Ie, { children: [
|
|
1892
1959
|
" · ",
|
|
1893
1960
|
/* @__PURE__ */ m("span", { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)", children: [
|
|
1894
1961
|
"堆约 ",
|
|
1895
|
-
|
|
1962
|
+
Ze(J),
|
|
1896
1963
|
/* @__PURE__ */ i("span", { className: "rough", children: "粗略" })
|
|
1897
1964
|
] })
|
|
1898
1965
|
] })
|
|
@@ -1902,9 +1969,9 @@ const Dr = Yn(function(a, S) {
|
|
|
1902
1969
|
/* @__PURE__ */ m(
|
|
1903
1970
|
"button",
|
|
1904
1971
|
{
|
|
1905
|
-
className: "rxl-export-btn" + (
|
|
1972
|
+
className: "rxl-export-btn" + (se === "__header-export" ? " open" : ""),
|
|
1906
1973
|
onClick: (e) => {
|
|
1907
|
-
e.stopPropagation(),
|
|
1974
|
+
e.stopPropagation(), W(se === "__header-export" ? null : "__header-export");
|
|
1908
1975
|
},
|
|
1909
1976
|
title: "导出 / 打印",
|
|
1910
1977
|
children: [
|
|
@@ -1913,8 +1980,8 @@ const Dr = Yn(function(a, S) {
|
|
|
1913
1980
|
]
|
|
1914
1981
|
}
|
|
1915
1982
|
),
|
|
1916
|
-
|
|
1917
|
-
|
|
1983
|
+
se === "__header-export" && /* @__PURE__ */ i(
|
|
1984
|
+
Ge,
|
|
1918
1985
|
{
|
|
1919
1986
|
items: [
|
|
1920
1987
|
g({ id: "h-xlsx", label: "导出为 Excel (.xlsx)", onClick: () => {
|
|
@@ -1934,62 +2001,62 @@ const Dr = Yn(function(a, S) {
|
|
|
1934
2001
|
var e;
|
|
1935
2002
|
return void ((e = r.current) == null ? void 0 : e.downloadImage().catch(Z));
|
|
1936
2003
|
} }),
|
|
1937
|
-
g({ id: "h-pdf", label: "导出为 PDF (位图)", onClick:
|
|
1938
|
-
g({ id: "h-pdf-vec", label: "导出为 PDF (矢量·文字可选)", onClick:
|
|
1939
|
-
g({ id: "h-print", label: "打印…", onClick:
|
|
2004
|
+
g({ id: "h-pdf", label: "导出为 PDF (位图)", onClick: St }),
|
|
2005
|
+
g({ id: "h-pdf-vec", label: "导出为 PDF (矢量·文字可选)", onClick: xt }),
|
|
2006
|
+
g({ id: "h-print", label: "打印…", onClick: Ft })
|
|
1940
2007
|
],
|
|
1941
2008
|
onPick: (e) => {
|
|
1942
2009
|
var t;
|
|
1943
|
-
|
|
2010
|
+
W(null), (t = e.onClick) == null || t.call(e);
|
|
1944
2011
|
},
|
|
1945
2012
|
className: "rxl-tb-menu header-menu"
|
|
1946
2013
|
}
|
|
1947
2014
|
)
|
|
1948
2015
|
] }),
|
|
1949
2016
|
/* @__PURE__ */ m("div", { className: "rxl-zoom", children: [
|
|
1950
|
-
/* @__PURE__ */ i("button", { onClick: () =>
|
|
1951
|
-
/* @__PURE__ */ m("select", { value:
|
|
1952
|
-
|
|
2017
|
+
/* @__PURE__ */ i("button", { onClick: () => Fe(x - 0.1), title: "缩小", children: "−" }),
|
|
2018
|
+
/* @__PURE__ */ m("select", { value: x, onChange: (e) => Fe(parseFloat(e.target.value)), children: [
|
|
2019
|
+
yt.map((e) => /* @__PURE__ */ m("option", { value: e, children: [
|
|
1953
2020
|
Math.round(e * 100),
|
|
1954
2021
|
"%"
|
|
1955
2022
|
] }, e)),
|
|
1956
|
-
!
|
|
1957
|
-
Math.round(
|
|
2023
|
+
!yt.includes(x) && /* @__PURE__ */ m("option", { value: x, children: [
|
|
2024
|
+
Math.round(x * 100),
|
|
1958
2025
|
"%"
|
|
1959
2026
|
] }, "cur")
|
|
1960
2027
|
] }),
|
|
1961
|
-
/* @__PURE__ */ i("button", { onClick: () =>
|
|
2028
|
+
/* @__PURE__ */ i("button", { onClick: () => Fe(x + 0.1), title: "放大", children: "+" })
|
|
1962
2029
|
] })
|
|
1963
2030
|
] }),
|
|
1964
|
-
|
|
2031
|
+
d && je && Ke && /* @__PURE__ */ m("div", { className: "rxl-ribbon-tabs", role: "tablist", children: [
|
|
1965
2032
|
E.sections.map((e) => /* @__PURE__ */ i(
|
|
1966
2033
|
"button",
|
|
1967
2034
|
{
|
|
1968
|
-
className: "rxl-ribbon-tab" + (e.id ===
|
|
2035
|
+
className: "rxl-ribbon-tab" + (e.id === q ? " active" : ""),
|
|
1969
2036
|
role: "tab",
|
|
1970
|
-
"aria-selected": e.id ===
|
|
1971
|
-
onClick: () =>
|
|
2037
|
+
"aria-selected": e.id === q,
|
|
2038
|
+
onClick: () => Ce(e.id),
|
|
1972
2039
|
children: e.name
|
|
1973
2040
|
},
|
|
1974
2041
|
e.id
|
|
1975
2042
|
)),
|
|
1976
2043
|
/* @__PURE__ */ i("span", { style: { flex: "1 1 auto" } }),
|
|
1977
|
-
|
|
1978
|
-
/* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html:
|
|
2044
|
+
Ln && /* @__PURE__ */ m("button", { className: "rxl-ribbon-gear", title: "设置(工具板块 / 常规 / 视图)", onClick: Hn, children: [
|
|
2045
|
+
/* @__PURE__ */ i("span", { className: "ic", dangerouslySetInnerHTML: { __html: le(I("settings")) } }),
|
|
1979
2046
|
/* @__PURE__ */ i("span", { className: "lbl", children: "设置" })
|
|
1980
2047
|
] })
|
|
1981
2048
|
] }),
|
|
1982
|
-
|
|
2049
|
+
d && je && Ke && /* @__PURE__ */ i("div", { className: "rxl-rb-panel", children: kt.map((e, t) => /* @__PURE__ */ m(Zn, { children: [
|
|
1983
2050
|
t > 0 && /* @__PURE__ */ i("div", { className: "rxl-rb-sep" }),
|
|
1984
2051
|
/* @__PURE__ */ m("div", { className: "rxl-rb-group", children: [
|
|
1985
|
-
/* @__PURE__ */ i("div", { className: "rxl-rb-body", children:
|
|
2052
|
+
/* @__PURE__ */ i("div", { className: "rxl-rb-body", children: nr(e.items).map((n, l) => n.kind === "large" ? Et(n.item, !0) : /* @__PURE__ */ i("div", { className: "rxl-rb-smalls", children: n.rows.map((o, u) => /* @__PURE__ */ i("div", { className: "rxl-rb-row", children: o.map((a) => Et(a, !1)) }, u)) }, l)) }),
|
|
1986
2053
|
e.name && /* @__PURE__ */ i("div", { className: "rxl-rb-gname", children: e.name })
|
|
1987
2054
|
] })
|
|
1988
2055
|
] }, e.id)) }),
|
|
1989
|
-
|
|
2056
|
+
d && je && !Ke && /* @__PURE__ */ i("div", { className: "rxl-action-toolbar", children: zn.map((e) => {
|
|
1990
2057
|
var l;
|
|
1991
2058
|
if (e.type === "separator") return /* @__PURE__ */ i("span", { className: "rxl-at-divider" }, e.id);
|
|
1992
|
-
const t = !!((l = e.items) != null && l.length), n =
|
|
2059
|
+
const t = !!((l = e.items) != null && l.length), n = se === e.id;
|
|
1993
2060
|
return /* @__PURE__ */ m("div", { className: "rxl-at-dd", "data-tb-menu": "true", children: [
|
|
1994
2061
|
/* @__PURE__ */ m(
|
|
1995
2062
|
"button",
|
|
@@ -1998,62 +2065,62 @@ const Dr = Yn(function(a, S) {
|
|
|
1998
2065
|
disabled: !!e.disabled,
|
|
1999
2066
|
title: e.title || e.label || e.id,
|
|
2000
2067
|
onClick: (o) => {
|
|
2001
|
-
var
|
|
2002
|
-
o.stopPropagation(), !e.disabled && (t ?
|
|
2068
|
+
var u;
|
|
2069
|
+
o.stopPropagation(), !e.disabled && (t ? W(n ? null : e.id) : ((u = e.onClick) == null || u.call(e), W(null)));
|
|
2003
2070
|
},
|
|
2004
2071
|
children: [
|
|
2005
|
-
e.iconSvg ? /* @__PURE__ */ i("span", { className: "rxl-at-ic", dangerouslySetInnerHTML: { __html:
|
|
2072
|
+
e.iconSvg ? /* @__PURE__ */ i("span", { className: "rxl-at-ic", dangerouslySetInnerHTML: { __html: le(e.iconSvg) } }) : e.icon ? /* @__PURE__ */ i("span", { className: "rxl-at-ic-e", children: e.icon }) : null,
|
|
2006
2073
|
e.label && /* @__PURE__ */ i("span", { className: "rxl-at-lb", children: e.label }),
|
|
2007
|
-
t && /* @__PURE__ */ i("span", { className: "rxl-at-caret", dangerouslySetInnerHTML: { __html:
|
|
2074
|
+
t && /* @__PURE__ */ i("span", { className: "rxl-at-caret", dangerouslySetInnerHTML: { __html: le(I("caret")) } })
|
|
2008
2075
|
]
|
|
2009
2076
|
}
|
|
2010
2077
|
),
|
|
2011
2078
|
t && n && /* @__PURE__ */ i(
|
|
2012
|
-
|
|
2079
|
+
Ge,
|
|
2013
2080
|
{
|
|
2014
2081
|
items: e.items,
|
|
2015
2082
|
onPick: (o) => {
|
|
2016
|
-
var
|
|
2017
|
-
o.keepOpen ||
|
|
2083
|
+
var u;
|
|
2084
|
+
o.keepOpen || W(null), (u = o.onClick) == null || u.call(o);
|
|
2018
2085
|
}
|
|
2019
2086
|
}
|
|
2020
2087
|
)
|
|
2021
2088
|
] }, e.id);
|
|
2022
2089
|
}) }),
|
|
2023
|
-
|
|
2024
|
-
/* @__PURE__ */ i("span", { className: "addr", children:
|
|
2090
|
+
d && ((jt = r.current) == null ? void 0 : jt.isFormulaBarVisible()) !== !1 && /* @__PURE__ */ m("div", { className: "rxl-formula-bar", children: [
|
|
2091
|
+
/* @__PURE__ */ i("span", { className: "addr", children: vt || "—" }),
|
|
2025
2092
|
/* @__PURE__ */ i("span", { className: "fx", children: "fx" }),
|
|
2026
|
-
|
|
2093
|
+
yn ? /* @__PURE__ */ i(
|
|
2027
2094
|
"textarea",
|
|
2028
2095
|
{
|
|
2029
|
-
ref:
|
|
2096
|
+
ref: ot,
|
|
2030
2097
|
className: "content content-input",
|
|
2031
|
-
value:
|
|
2032
|
-
title:
|
|
2098
|
+
value: Je,
|
|
2099
|
+
title: Je,
|
|
2033
2100
|
rows: 1,
|
|
2034
2101
|
spellCheck: !1,
|
|
2035
|
-
onFocus:
|
|
2102
|
+
onFocus: En,
|
|
2036
2103
|
onChange: (e) => {
|
|
2037
|
-
|
|
2104
|
+
lt(e.target.value), at();
|
|
2038
2105
|
},
|
|
2039
|
-
onKeyDown:
|
|
2040
|
-
onBlur:
|
|
2106
|
+
onKeyDown: Nn,
|
|
2107
|
+
onBlur: Dn
|
|
2041
2108
|
}
|
|
2042
|
-
) : /* @__PURE__ */ i("span", { className: "content", title:
|
|
2109
|
+
) : /* @__PURE__ */ i("span", { className: "content", title: pt, children: pt })
|
|
2043
2110
|
] }),
|
|
2044
|
-
/* @__PURE__ */ m("div", { className: "rxl-render-area", ref:
|
|
2045
|
-
/* @__PURE__ */ i("canvas", { ref:
|
|
2046
|
-
/* @__PURE__ */ i("div", { className: "rxl-ov", ref:
|
|
2047
|
-
/* @__PURE__ */ i("div", { className: "rxl-ov", ref:
|
|
2048
|
-
/* @__PURE__ */ i("div", { className: "rxl-ov", ref:
|
|
2049
|
-
/* @__PURE__ */ i("div", { className: "rxl-ov", ref:
|
|
2111
|
+
/* @__PURE__ */ m("div", { className: "rxl-render-area", ref: st, children: [
|
|
2112
|
+
/* @__PURE__ */ i("canvas", { ref: ct, className: "rxl-canvas" }),
|
|
2113
|
+
/* @__PURE__ */ i("div", { className: "rxl-ov", ref: ye }),
|
|
2114
|
+
/* @__PURE__ */ i("div", { className: "rxl-ov", ref: Ee }),
|
|
2115
|
+
/* @__PURE__ */ i("div", { className: "rxl-ov", ref: Pe }),
|
|
2116
|
+
/* @__PURE__ */ i("div", { className: "rxl-ov", ref: Te }),
|
|
2050
2117
|
/* @__PURE__ */ i(
|
|
2051
2118
|
"div",
|
|
2052
2119
|
{
|
|
2053
2120
|
className: "rxl-scroller",
|
|
2054
|
-
ref:
|
|
2121
|
+
ref: ie,
|
|
2055
2122
|
tabIndex: 0,
|
|
2056
|
-
onScroll:
|
|
2123
|
+
onScroll: wn,
|
|
2057
2124
|
onMouseDown: (e) => {
|
|
2058
2125
|
var t;
|
|
2059
2126
|
return (t = r.current) == null ? void 0 : t.onMouseDown(e.nativeEvent);
|
|
@@ -2082,263 +2149,143 @@ const Dr = Yn(function(a, S) {
|
|
|
2082
2149
|
var t;
|
|
2083
2150
|
return (t = r.current) == null ? void 0 : t.onContextMenu(e.nativeEvent);
|
|
2084
2151
|
},
|
|
2085
|
-
children: /* @__PURE__ */ i("div", { className: "rxl-spacer", ref:
|
|
2152
|
+
children: /* @__PURE__ */ i("div", { className: "rxl-spacer", ref: it })
|
|
2086
2153
|
}
|
|
2087
2154
|
),
|
|
2088
|
-
/* @__PURE__ */ i("div", { className: "rxl-ov-slot", children: /* @__PURE__ */ i("div", { ref:
|
|
2089
|
-
/* @__PURE__ */ i("div", { className: "rxl-editor-slot", ref:
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
"input",
|
|
2094
|
-
{
|
|
2095
|
-
autoFocus: !0,
|
|
2096
|
-
placeholder: "查找…",
|
|
2097
|
-
value: q.query,
|
|
2098
|
-
onChange: (e) => {
|
|
2099
|
-
var t;
|
|
2100
|
-
return (t = r.current) == null ? void 0 : t.setFindQuery(e.target.value);
|
|
2101
|
-
},
|
|
2102
|
-
onKeyDown: (e) => {
|
|
2103
|
-
var t, n;
|
|
2104
|
-
e.key === "Enter" ? e.shiftKey ? (t = r.current) == null || t.findPrev() : (n = r.current) == null || n.findNext() : e.key === "Escape" && ke();
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
),
|
|
2108
|
-
/* @__PURE__ */ i("span", { className: "count", children: q.count ? `${q.index + 1}/${q.count}` : "无结果" }),
|
|
2109
|
-
/* @__PURE__ */ i("button", { onClick: () => {
|
|
2110
|
-
var e;
|
|
2111
|
-
return (e = r.current) == null ? void 0 : e.findPrev();
|
|
2112
|
-
}, children: "↑" }),
|
|
2113
|
-
/* @__PURE__ */ i("button", { onClick: () => {
|
|
2114
|
-
var e;
|
|
2115
|
-
return (e = r.current) == null ? void 0 : e.findNext();
|
|
2116
|
-
}, children: "↓" }),
|
|
2117
|
-
/* @__PURE__ */ i("button", { onClick: ke, children: "✕" })
|
|
2118
|
-
] }),
|
|
2119
|
-
a.editable && /* @__PURE__ */ m("div", { className: "rxl-find-row", children: [
|
|
2120
|
-
/* @__PURE__ */ i(
|
|
2121
|
-
"input",
|
|
2122
|
-
{
|
|
2123
|
-
placeholder: "替换为…",
|
|
2124
|
-
value: q.replace,
|
|
2125
|
-
onChange: (e) => {
|
|
2126
|
-
var t;
|
|
2127
|
-
return (t = r.current) == null ? void 0 : t.setFindReplace(e.target.value);
|
|
2128
|
-
},
|
|
2129
|
-
onKeyDown: (e) => {
|
|
2130
|
-
var t;
|
|
2131
|
-
e.key === "Enter" ? (t = r.current) == null || t.replaceCurrent() : e.key === "Escape" && ke();
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
),
|
|
2135
|
-
/* @__PURE__ */ i("button", { className: "rxl-rep", disabled: !q.count, onClick: () => {
|
|
2136
|
-
var e;
|
|
2137
|
-
return (e = r.current) == null ? void 0 : e.replaceCurrent();
|
|
2138
|
-
}, children: "替换" }),
|
|
2139
|
-
/* @__PURE__ */ i("button", { className: "rxl-rep", disabled: !q.count, onClick: () => {
|
|
2140
|
-
var e;
|
|
2141
|
-
return (e = r.current) == null ? void 0 : e.replaceAll();
|
|
2142
|
-
}, children: "全部替换" })
|
|
2143
|
-
] })
|
|
2144
|
-
] }),
|
|
2145
|
-
U && /* @__PURE__ */ i(
|
|
2146
|
-
wr,
|
|
2147
|
-
{
|
|
2148
|
-
values: U.values,
|
|
2149
|
-
selected: U.selected,
|
|
2150
|
-
x: U.x,
|
|
2151
|
-
y: U.y,
|
|
2152
|
-
sortDir: U.sortDir,
|
|
2153
|
-
onApply: (e) => {
|
|
2154
|
-
var t;
|
|
2155
|
-
return (t = r.current) == null ? void 0 : t.applyFilterSelection(e);
|
|
2156
|
-
},
|
|
2157
|
-
onClear: () => {
|
|
2158
|
-
var e;
|
|
2159
|
-
return (e = r.current) == null ? void 0 : e.clearFilterColumn();
|
|
2160
|
-
},
|
|
2161
|
-
onClose: () => {
|
|
2162
|
-
var e;
|
|
2163
|
-
return (e = r.current) == null ? void 0 : e.closeFilterPopup();
|
|
2164
|
-
},
|
|
2165
|
-
onSort: (e) => {
|
|
2166
|
-
var n, l;
|
|
2167
|
-
const t = U.col;
|
|
2168
|
-
(n = r.current) == null || n.closeFilterPopup(), (l = r.current) == null || l.sortColumn(t, e);
|
|
2169
|
-
}
|
|
2170
|
-
},
|
|
2171
|
-
U.col
|
|
2172
|
-
),
|
|
2173
|
-
fe && /* @__PURE__ */ i("div", { className: "rxl-tooltip " + fe.kind, style: { left: fe.x, top: fe.y }, children: fe.text }),
|
|
2174
|
-
F && /* @__PURE__ */ i("div", { className: "rxl-state", children: (A == null ? void 0 : A.stage) === "read" ? "读取文件…" : (A == null ? void 0 : A.stage) === "parse" ? "解析中…" : "构建表格…" }),
|
|
2175
|
-
!F && M && /* @__PURE__ */ m("div", { className: "rxl-state error", children: [
|
|
2155
|
+
/* @__PURE__ */ i("div", { className: "rxl-ov-slot", children: /* @__PURE__ */ i("div", { ref: Ne }) }),
|
|
2156
|
+
/* @__PURE__ */ i("div", { className: "rxl-editor-slot", ref: Ae }),
|
|
2157
|
+
ge && /* @__PURE__ */ i("div", { className: "rxl-tooltip " + ge.kind, style: { left: ge.x, top: ge.y }, children: ge.text }),
|
|
2158
|
+
P && /* @__PURE__ */ i("div", { className: "rxl-state", children: (V == null ? void 0 : V.stage) === "read" ? "读取文件…" : (V == null ? void 0 : V.stage) === "parse" ? "解析中…" : "构建表格…" }),
|
|
2159
|
+
!P && z && /* @__PURE__ */ m("div", { className: "rxl-state error", children: [
|
|
2176
2160
|
"解析失败:",
|
|
2177
|
-
|
|
2161
|
+
z
|
|
2178
2162
|
] }),
|
|
2179
|
-
!
|
|
2163
|
+
!P && !d && /* @__PURE__ */ i("div", { className: "rxl-state", children: "拖入或选择一个 .xlsx 文件" })
|
|
2180
2164
|
] }),
|
|
2181
|
-
|
|
2182
|
-
/* @__PURE__ */ i("span", { style: { color: "#888" }, children:
|
|
2165
|
+
d && /* @__PURE__ */ m("div", { className: "rxl-status-bar", children: [
|
|
2166
|
+
/* @__PURE__ */ i("span", { style: { color: "#888" }, children: An || vt }),
|
|
2183
2167
|
/* @__PURE__ */ i("div", { className: "grow" }),
|
|
2184
|
-
|
|
2168
|
+
O && O.numCount > 0 ? /* @__PURE__ */ m(Ie, { children: [
|
|
2185
2169
|
/* @__PURE__ */ m("span", { children: [
|
|
2186
2170
|
"计数 ",
|
|
2187
|
-
|
|
2171
|
+
O.count
|
|
2188
2172
|
] }),
|
|
2189
2173
|
/* @__PURE__ */ m("span", { children: [
|
|
2190
2174
|
"求和 ",
|
|
2191
|
-
|
|
2175
|
+
ke(O.sum)
|
|
2192
2176
|
] }),
|
|
2193
2177
|
/* @__PURE__ */ m("span", { children: [
|
|
2194
2178
|
"平均 ",
|
|
2195
|
-
|
|
2179
|
+
ke(O.avg)
|
|
2196
2180
|
] }),
|
|
2197
2181
|
/* @__PURE__ */ m("span", { children: [
|
|
2198
2182
|
"最大 ",
|
|
2199
|
-
|
|
2183
|
+
ke(O.max)
|
|
2200
2184
|
] }),
|
|
2201
2185
|
/* @__PURE__ */ m("span", { children: [
|
|
2202
2186
|
"最小 ",
|
|
2203
|
-
|
|
2187
|
+
ke(O.min)
|
|
2204
2188
|
] })
|
|
2205
|
-
] }) :
|
|
2189
|
+
] }) : O && O.count > 0 ? /* @__PURE__ */ m("span", { children: [
|
|
2206
2190
|
"计数 ",
|
|
2207
|
-
|
|
2191
|
+
O.count
|
|
2208
2192
|
] }) : null
|
|
2209
2193
|
] }),
|
|
2210
|
-
|
|
2211
|
-
|
|
2194
|
+
d && Pt.length > 0 && /* @__PURE__ */ i("div", { className: "rxl-tabs", children: Pt.map(({ s: e, i: t }) => /* @__PURE__ */ i("button", { className: t === h ? "active" : "", onClick: () => N(t), children: e.name }, t)) }),
|
|
2195
|
+
s.exportProgress !== !1 && (s.renderExportProgress ? s.renderExportProgress({ state: dt, busy: gt, cancel: ft }) : /* @__PURE__ */ i(hr, { state: dt, busy: gt, onCancel: ft }))
|
|
2212
2196
|
] });
|
|
2213
2197
|
});
|
|
2214
|
-
function wr(f) {
|
|
2215
|
-
const a = f.selected.length ? new Set(f.selected) : new Set(f.values), [S, F] = w(a), M = (u) => {
|
|
2216
|
-
const A = new Set(S);
|
|
2217
|
-
A.has(u) ? A.delete(u) : A.add(u), F(A);
|
|
2218
|
-
};
|
|
2219
|
-
return /* @__PURE__ */ m("div", { className: "rxl-filterpop", style: { left: f.x, top: f.y }, children: [
|
|
2220
|
-
/* @__PURE__ */ m("div", { className: "sort", children: [
|
|
2221
|
-
/* @__PURE__ */ i("button", { className: f.sortDir === "asc" ? "on" : "", onClick: () => f.onSort("asc"), children: "↑ 升序" }),
|
|
2222
|
-
/* @__PURE__ */ i("button", { className: f.sortDir === "desc" ? "on" : "", onClick: () => f.onSort("desc"), children: "↓ 降序" })
|
|
2223
|
-
] }),
|
|
2224
|
-
/* @__PURE__ */ m("div", { className: "list", children: [
|
|
2225
|
-
/* @__PURE__ */ m("label", { children: [
|
|
2226
|
-
/* @__PURE__ */ i(
|
|
2227
|
-
"input",
|
|
2228
|
-
{
|
|
2229
|
-
type: "checkbox",
|
|
2230
|
-
checked: S.size === f.values.length,
|
|
2231
|
-
ref: (u) => {
|
|
2232
|
-
u && (u.indeterminate = S.size > 0 && S.size < f.values.length);
|
|
2233
|
-
},
|
|
2234
|
-
onChange: (u) => F(u.target.checked ? new Set(f.values) : /* @__PURE__ */ new Set())
|
|
2235
|
-
}
|
|
2236
|
-
),
|
|
2237
|
-
"(全选)"
|
|
2238
|
-
] }),
|
|
2239
|
-
f.values.map((u) => /* @__PURE__ */ m("label", { children: [
|
|
2240
|
-
/* @__PURE__ */ i("input", { type: "checkbox", checked: S.has(u), onChange: () => M(u) }),
|
|
2241
|
-
u
|
|
2242
|
-
] }, u))
|
|
2243
|
-
] }),
|
|
2244
|
-
/* @__PURE__ */ m("div", { className: "foot", children: [
|
|
2245
|
-
/* @__PURE__ */ i("button", { onClick: f.onClear, children: "清除" }),
|
|
2246
|
-
/* @__PURE__ */ i("button", { onClick: () => f.onApply([...S]), children: "确定" }),
|
|
2247
|
-
/* @__PURE__ */ i("button", { onClick: f.onClose, children: "取消" })
|
|
2248
|
-
] })
|
|
2249
|
-
] });
|
|
2250
|
-
}
|
|
2251
2198
|
export {
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2199
|
+
Er as BuiltinFormulaEngine,
|
|
2200
|
+
Tr as CanvasRenderer,
|
|
2201
|
+
Dr as CellEditorHost,
|
|
2202
|
+
$e as DEFAULT_PASTE_BEHAVIOR,
|
|
2203
|
+
Nr as DEFAULT_THEME,
|
|
2204
|
+
Ar as EditController,
|
|
2205
|
+
wr as ExcelViewer,
|
|
2206
|
+
Mr as FUNCTION_CATEGORIES,
|
|
2207
|
+
Br as FUNCTION_NAMES,
|
|
2208
|
+
Or as GridMetrics,
|
|
2209
|
+
zr as KEYBOARD_SHORTCUTS,
|
|
2210
|
+
Lr as OverlayManager,
|
|
2211
|
+
Wr as PASTE_PRESET_VALUES_ONLY,
|
|
2212
|
+
Cr as PluginOverlayHost,
|
|
2213
|
+
fr as ViewerController,
|
|
2214
|
+
Hr as WorkbookExporter,
|
|
2215
|
+
_r as addImage,
|
|
2216
|
+
Vr as applyFlashProgram,
|
|
2217
|
+
Jr as applyStyleOverride,
|
|
2218
|
+
Ur as buildCellSnapshot,
|
|
2219
|
+
jr as builtinFormulaEngineFactory,
|
|
2220
|
+
Kr as canvasToBlob,
|
|
2221
|
+
Gr as canvasToDataURL,
|
|
2222
|
+
Xr as captureStructure,
|
|
2223
|
+
$r as cellContentForEngine,
|
|
2224
|
+
Zr as cellDisplayText,
|
|
2225
|
+
Yr as cellKey,
|
|
2226
|
+
qr as clearCell,
|
|
2227
|
+
Qr as cloneCell,
|
|
2228
|
+
el as cloneImageAnchor,
|
|
2229
|
+
tl as cloneWorkbook,
|
|
2230
|
+
Re as colIndexToLetters,
|
|
2231
|
+
nl as defaultFormulaEngineFactory,
|
|
2232
|
+
rl as definePlugin,
|
|
2233
|
+
ll as deleteCols,
|
|
2234
|
+
ol as deleteIntersectsMerge,
|
|
2235
|
+
al as deleteRows,
|
|
2236
|
+
vn as detectFormat,
|
|
2237
|
+
sl as downloadBlob,
|
|
2238
|
+
mr as estimateWorkbookBytes,
|
|
2239
|
+
pn as finalizeImages,
|
|
2240
|
+
Ze as formatBytes,
|
|
2241
|
+
cl as formatValue,
|
|
2242
|
+
gr as friendlyError,
|
|
2243
|
+
il as functionMeta,
|
|
2244
|
+
ul as getCell,
|
|
2245
|
+
dl as getCellStyle,
|
|
2246
|
+
mn as getCellText,
|
|
2247
|
+
fn as getCellValue,
|
|
2248
|
+
un as getRangeData,
|
|
2249
|
+
gn as getSheetData,
|
|
2250
|
+
gl as getWorkbookJSON,
|
|
2251
|
+
ml as hyperFormulaEngineFactory,
|
|
2252
|
+
fl as inferFlashFill,
|
|
2253
|
+
Cl as insertCols,
|
|
2254
|
+
bl as insertRows,
|
|
2255
|
+
vl as internStyle,
|
|
2256
|
+
pl as isDimCommand,
|
|
2257
|
+
hl as isImageCommand,
|
|
2258
|
+
Sl as isStructCommand,
|
|
2259
|
+
br as isWorkbookModel,
|
|
2260
|
+
vr as jsonToWorkbook,
|
|
2261
|
+
bn as loadArrayBuffer,
|
|
2262
|
+
xl as makeDefaultStyle,
|
|
2263
|
+
Fl as mergeStyleOverride,
|
|
2264
|
+
Il as mergeTheme,
|
|
2265
|
+
Rl as openWorkbook,
|
|
2266
|
+
kl as parseSignature,
|
|
2267
|
+
wl as parseWorkbook,
|
|
2268
|
+
Xe as readHeapUsed,
|
|
2269
|
+
yl as removeImage,
|
|
2270
|
+
Pl as resolveEditable,
|
|
2271
|
+
El as resolvePasteBehavior,
|
|
2272
|
+
Tl as restoreCell,
|
|
2273
|
+
Dl as restoreDimension,
|
|
2274
|
+
Nl as restoreStructure,
|
|
2275
|
+
Al as restoreWorkbookInto,
|
|
2276
|
+
cn as revokeImages,
|
|
2277
|
+
Ml as rewriteWorkbookFormulas,
|
|
2278
|
+
Bl as setCellValue,
|
|
2279
|
+
Ol as setColumnWidth,
|
|
2280
|
+
zl as setImageRect,
|
|
2281
|
+
Ll as setRangeValues,
|
|
2282
|
+
Wl as setRowHeight,
|
|
2283
|
+
dn as sheetToJSON,
|
|
2284
|
+
Hl as shiftFormulaRefs,
|
|
2285
|
+
_l as synthesizeFlashFill,
|
|
2286
|
+
Vl as toCsv,
|
|
2287
|
+
Jl as toWorkbookJson,
|
|
2288
|
+
Sr as useExcelDocument,
|
|
2289
|
+
Ul as workbookToXlsxBlob,
|
|
2290
|
+
jl as workbookToXlsxBytes
|
|
2344
2291
|
};
|