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/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
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 { ref as
|
|
14
|
-
import { r as
|
|
15
|
-
import { B as
|
|
16
|
-
import { p as
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
async function
|
|
20
|
-
var
|
|
21
|
-
|
|
1
|
+
var ja = Object.defineProperty, Ja = Object.defineProperties;
|
|
2
|
+
var Ka = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var jt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ga = Object.prototype.hasOwnProperty, Xa = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Jt = (m, x, g) => x in m ? ja(m, x, { enumerable: !0, configurable: !0, writable: !0, value: g }) : m[x] = g, W = (m, x) => {
|
|
6
|
+
for (var g in x || (x = {}))
|
|
7
|
+
Ga.call(x, g) && Jt(m, g, x[g]);
|
|
8
|
+
if (jt)
|
|
9
|
+
for (var g of jt(x))
|
|
10
|
+
Xa.call(x, g) && Jt(m, g, x[g]);
|
|
11
|
+
return m;
|
|
12
|
+
}, ke = (m, x) => Ja(m, Ka(x));
|
|
13
|
+
import { ref as S, shallowRef as bt, defineComponent as ue, onBeforeUnmount as Le, openBlock as d, createElementBlock as v, createElementVNode as i, createCommentVNode as h, createTextVNode as L, toDisplayString as $, Fragment as O, unref as R, withModifiers as Ct, renderList as Q, computed as E, normalizeClass as ee, reactive as Za, withDirectives as X, vModelRadio as ze, vModelSelect as ct, vModelCheckbox as rt, withKeys as Ya, normalizeStyle as Ke, onMounted as yt, nextTick as Ce, watch as _, createBlock as se, Teleport as qa, renderSlot as le, createVNode as Kt } from "vue";
|
|
14
|
+
import { r as kt, l as Yt, d as qt, f as Qt, a as Qa, k as gt, j as ye, e as es, b as pt, V as ts, P as as, D as Gt, g as ss, s as is, c as ns, h as ls, i as os, m as us, n as ds } from "./chunks/index-Dg4LsUaW.js";
|
|
15
|
+
import { B as Bn, C as _n, o as zn, p as Ln, E as On, F as Hn, q as Nn, G as Vn, K as Wn, O as Un, t as jn, W as Jn, u as Kn, v as Gn, w as Xn, x as Zn, y as Yn, z as qn, A as Qn, H as el, I as tl, J as al, L as sl, M as il, N as nl, Q as ll, R as ol, S as ul, T as dl, U as vl, X as ml, Y as fl, Z as cl, _ as rl, $ as gl, a0 as pl, a1 as bl, a2 as kl, S as Cl, a3 as yl, a4 as Sl, a5 as xl, a6 as hl, a7 as Fl, a8 as wl, a9 as Il, aa as Tl, ab as El, ac as $l, ad as Pl, ae as Rl, af as Ml, ag as Dl, ah as Al, ai as Bl, aj as _l, ak as zl, al as Ll, am as Ol, an as Hl, ao as Nl, ap as Vl, aq as Wl, ar as Ul, as as jl, at as Jl, au as Kl, av as Gl, aw as Xl, ax as Zl, ay as Yl } from "./chunks/index-Dg4LsUaW.js";
|
|
16
|
+
import { p as ea, a as oe, j as Se, b as vs, S as ms, i as fs, R as cs, l as rs, r as Xt, s as gs, c as ps, d as bs, e as ks, T as Cs, f as ys, g as Ss, k as xs, h as hs } from "./chunks/toolbar-builtins-CeOlAWgM.js";
|
|
17
|
+
function Fs() {
|
|
18
|
+
const m = S(!1), x = S(null), g = bt(null), n = S(null), C = bt(null);
|
|
19
|
+
async function M(y, f) {
|
|
20
|
+
var l;
|
|
21
|
+
m.value = !0, x.value = null, g.value && kt(g.value), g.value = null, C.value = null, n.value = { stage: "read", ratio: 0 };
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
let
|
|
30
|
-
|
|
23
|
+
const u = await Yt(y, (B, H) => {
|
|
24
|
+
n.value = { stage: "read", ratio: H ? B / H : void 0 };
|
|
25
|
+
}), p = qt(u);
|
|
26
|
+
if (p === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
|
|
27
|
+
if (p === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
|
|
28
|
+
if (p === "empty") throw new Error("文件为空。");
|
|
29
|
+
let D = await ea(u, (B) => {
|
|
30
|
+
n.value = B;
|
|
31
31
|
});
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
x.value =
|
|
32
|
+
f && (D = (l = f(D)) != null ? l : D), Qt(D), C.value = u.slice(0), g.value = D;
|
|
33
|
+
} catch (u) {
|
|
34
|
+
x.value = u != null && u.message && /预览器|损坏|加密|为空|ZIP/.test(u.message) ? u.message : Qa(u), console.error("[ooxml-preview] 解析失败:", u);
|
|
35
35
|
} finally {
|
|
36
|
-
|
|
36
|
+
m.value = !1, n.value = null;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
var
|
|
41
|
-
|
|
39
|
+
function c(y, f) {
|
|
40
|
+
var l;
|
|
41
|
+
g.value && kt(g.value), C.value = null, x.value = null, n.value = null, g.value = f && (l = f(y)) != null ? l : y;
|
|
42
42
|
}
|
|
43
|
-
return { loading:
|
|
43
|
+
return { loading: m, error: x, workbook: g, load: M, loadModel: c, progress: n, sourceBuffer: C };
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const ws = { class: "toolbar" }, Is = ["title"], Ts = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "modified",
|
|
48
48
|
title: "已修改(未保存)"
|
|
49
|
-
},
|
|
49
|
+
}, Es = {
|
|
50
50
|
key: 1,
|
|
51
51
|
class: "tpl"
|
|
52
|
-
},
|
|
52
|
+
}, $s = { class: "meta" }, Ps = { title: "模型数据体积估算(确定性;非真实 JS 堆,实际堆约 1.5~3x)" }, Rs = { title: "JS 堆增量(performance.memory;仅 Chromium、整页口径、被安全分桶粗化)" }, Ms = { class: "export-wrap" }, Ds = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "menu"
|
|
55
|
-
},
|
|
55
|
+
}, As = { class: "zoom" }, Bs = ["value"], _s = ["value"], zs = ["value"], Ls = /* @__PURE__ */ ue({
|
|
56
56
|
__name: "ViewerToolbar",
|
|
57
57
|
props: {
|
|
58
58
|
fileName: {},
|
|
@@ -65,164 +65,164 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
65
65
|
heapBytes: {}
|
|
66
66
|
},
|
|
67
67
|
emits: ["update:zoom", "export-image", "export-pdf", "export-pdf-vector", "export-xlsx", "export-csv", "export-json", "print", "open-settings"],
|
|
68
|
-
setup(
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
function
|
|
81
|
-
var
|
|
82
|
-
(
|
|
83
|
-
}
|
|
84
|
-
return typeof document != "undefined" && document.addEventListener("click",
|
|
85
|
-
typeof document != "undefined" && document.removeEventListener("click",
|
|
86
|
-
}), (
|
|
87
|
-
|
|
68
|
+
setup(m, { emit: x }) {
|
|
69
|
+
const g = x, n = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
70
|
+
function C(l) {
|
|
71
|
+
g("update:zoom", Math.min(3, Math.max(0.3, l)));
|
|
72
|
+
}
|
|
73
|
+
const M = S(!1);
|
|
74
|
+
function c() {
|
|
75
|
+
M.value = !M.value;
|
|
76
|
+
}
|
|
77
|
+
function y(l) {
|
|
78
|
+
M.value = !1, g(l === "export-image" ? "export-image" : l === "export-pdf" ? "export-pdf" : l === "export-pdf-vector" ? "export-pdf-vector" : l === "export-xlsx" ? "export-xlsx" : l === "export-csv" ? "export-csv" : l === "export-json" ? "export-json" : l === "print" ? "print" : "open-settings");
|
|
79
|
+
}
|
|
80
|
+
function f(l) {
|
|
81
|
+
var u;
|
|
82
|
+
(u = l.target) != null && u.closest(".export-wrap") || (M.value = !1);
|
|
83
|
+
}
|
|
84
|
+
return typeof document != "undefined" && document.addEventListener("click", f), Le(() => {
|
|
85
|
+
typeof document != "undefined" && document.removeEventListener("click", f);
|
|
86
|
+
}), (l, u) => (d(), v("div", ws, [
|
|
87
|
+
i("span", {
|
|
88
88
|
class: "file",
|
|
89
|
-
title: (
|
|
89
|
+
title: (m.modified ? "* 已修改(未保存) · " : "") + (m.fileName || "未命名工作簿") + (m.templateName ? " · 模板: " + m.templateName : "")
|
|
90
90
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
], 8,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
], 64)) :
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
], 64)) :
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
91
|
+
m.modified ? (d(), v("span", Ts, "*")) : h("", !0),
|
|
92
|
+
L($(m.fileName || "未命名工作簿"), 1),
|
|
93
|
+
m.templateName ? (d(), v("span", Es, " · 模板: " + $(m.templateName), 1)) : h("", !0)
|
|
94
|
+
], 8, Is),
|
|
95
|
+
i("span", $s, [
|
|
96
|
+
L($(m.sheetCount) + " 个工作表", 1),
|
|
97
|
+
m.fileSize != null ? (d(), v(O, { key: 0 }, [
|
|
98
|
+
L(" · 源文件 " + $(R(gt)(m.fileSize)), 1)
|
|
99
|
+
], 64)) : h("", !0),
|
|
100
|
+
m.dataBytes != null ? (d(), v(O, { key: 1 }, [
|
|
101
|
+
u[11] || (u[11] = L(" · ", -1)),
|
|
102
|
+
i("span", Ps, "数据约 " + $(R(gt)(m.dataBytes)), 1)
|
|
103
|
+
], 64)) : h("", !0),
|
|
104
|
+
m.heapBytes != null ? (d(), v(O, { key: 2 }, [
|
|
105
|
+
u[13] || (u[13] = L(" · ", -1)),
|
|
106
|
+
i("span", Rs, [
|
|
107
|
+
L("堆约 " + $(R(gt)(m.heapBytes)), 1),
|
|
108
|
+
u[12] || (u[12] = i("span", { class: "rough" }, "粗略", -1))
|
|
109
109
|
])
|
|
110
|
-
], 64)) :
|
|
110
|
+
], 64)) : h("", !0)
|
|
111
111
|
]),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
u[17] || (u[17] = i("div", { class: "spacer" }, null, -1)),
|
|
113
|
+
i("div", Ms, [
|
|
114
|
+
i("button", {
|
|
115
115
|
class: "export-btn",
|
|
116
|
-
onClick:
|
|
116
|
+
onClick: Ct(c, ["stop"]),
|
|
117
117
|
title: "导出 / 打印"
|
|
118
|
-
}, [...
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
}, [...u[14] || (u[14] = [
|
|
119
|
+
L(" 导出 ", -1),
|
|
120
|
+
i("span", { class: "caret" }, "▾", -1)
|
|
121
121
|
])]),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
onClick:
|
|
122
|
+
M.value ? (d(), v("div", Ds, [
|
|
123
|
+
i("button", {
|
|
124
|
+
onClick: u[0] || (u[0] = (p) => y("export-xlsx"))
|
|
125
125
|
}, "导出为 Excel (.xlsx)"),
|
|
126
|
-
|
|
127
|
-
onClick:
|
|
126
|
+
i("button", {
|
|
127
|
+
onClick: u[1] || (u[1] = (p) => y("export-csv"))
|
|
128
128
|
}, "导出为 CSV (.csv)"),
|
|
129
|
-
|
|
130
|
-
onClick:
|
|
129
|
+
i("button", {
|
|
130
|
+
onClick: u[2] || (u[2] = (p) => y("export-json"))
|
|
131
131
|
}, "导出为 JSON (.json)"),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
onClick:
|
|
132
|
+
u[15] || (u[15] = i("div", { class: "sep" }, null, -1)),
|
|
133
|
+
i("button", {
|
|
134
|
+
onClick: u[3] || (u[3] = (p) => y("export-image"))
|
|
135
135
|
}, "导出为图片 (PNG)"),
|
|
136
|
-
|
|
137
|
-
onClick:
|
|
136
|
+
i("button", {
|
|
137
|
+
onClick: u[4] || (u[4] = (p) => y("export-pdf"))
|
|
138
138
|
}, "导出为 PDF (位图)"),
|
|
139
|
-
|
|
140
|
-
onClick:
|
|
139
|
+
i("button", {
|
|
140
|
+
onClick: u[5] || (u[5] = (p) => y("export-pdf-vector"))
|
|
141
141
|
}, "导出为 PDF (矢量·文字可选)"),
|
|
142
|
-
|
|
143
|
-
onClick:
|
|
142
|
+
i("button", {
|
|
143
|
+
onClick: u[6] || (u[6] = (p) => y("print"))
|
|
144
144
|
}, "打印…"),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
onClick:
|
|
145
|
+
u[16] || (u[16] = i("div", { class: "sep" }, null, -1)),
|
|
146
|
+
i("button", {
|
|
147
|
+
onClick: u[7] || (u[7] = (p) => y("open-settings"))
|
|
148
148
|
}, "导出设置…")
|
|
149
|
-
])) :
|
|
149
|
+
])) : h("", !0)
|
|
150
150
|
]),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
onClick:
|
|
151
|
+
i("div", As, [
|
|
152
|
+
i("button", {
|
|
153
|
+
onClick: u[8] || (u[8] = (p) => C(m.zoom - 0.1)),
|
|
154
154
|
title: "缩小"
|
|
155
155
|
}, "−"),
|
|
156
|
-
|
|
157
|
-
value:
|
|
158
|
-
onChange:
|
|
156
|
+
i("select", {
|
|
157
|
+
value: m.zoom,
|
|
158
|
+
onChange: u[9] || (u[9] = (p) => C(parseFloat(p.target.value)))
|
|
159
159
|
}, [
|
|
160
|
-
(
|
|
161
|
-
key:
|
|
162
|
-
value:
|
|
163
|
-
},
|
|
164
|
-
|
|
160
|
+
(d(), v(O, null, Q(n, (p) => i("option", {
|
|
161
|
+
key: p,
|
|
162
|
+
value: p
|
|
163
|
+
}, $(Math.round(p * 100)) + "%", 9, _s)), 64)),
|
|
164
|
+
n.includes(m.zoom) ? h("", !0) : (d(), v("option", {
|
|
165
165
|
key: 0,
|
|
166
|
-
value:
|
|
167
|
-
},
|
|
168
|
-
], 40,
|
|
169
|
-
|
|
170
|
-
onClick:
|
|
166
|
+
value: m.zoom
|
|
167
|
+
}, $(Math.round(m.zoom * 100)) + "%", 9, zs))
|
|
168
|
+
], 40, Bs),
|
|
169
|
+
i("button", {
|
|
170
|
+
onClick: u[10] || (u[10] = (p) => C(m.zoom + 0.1)),
|
|
171
171
|
title: "放大"
|
|
172
172
|
}, "+")
|
|
173
173
|
])
|
|
174
174
|
]));
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
177
|
-
const
|
|
178
|
-
for (const [
|
|
179
|
-
|
|
180
|
-
return
|
|
181
|
-
},
|
|
176
|
+
}), de = (m, x) => {
|
|
177
|
+
const g = m.__vccOpts || m;
|
|
178
|
+
for (const [n, C] of x)
|
|
179
|
+
g[n] = C;
|
|
180
|
+
return g;
|
|
181
|
+
}, Os = /* @__PURE__ */ de(Ls, [["__scopeId", "data-v-55f10e63"]]), Hs = { class: "sheet-tabs" }, Ns = ["onClick", "title"], Vs = /* @__PURE__ */ ue({
|
|
182
182
|
__name: "SheetTabs",
|
|
183
183
|
props: {
|
|
184
184
|
workbook: {},
|
|
185
185
|
active: {}
|
|
186
186
|
},
|
|
187
187
|
emits: ["select"],
|
|
188
|
-
setup(
|
|
189
|
-
const
|
|
190
|
-
return (
|
|
191
|
-
(
|
|
192
|
-
key:
|
|
193
|
-
class:
|
|
194
|
-
onClick: (
|
|
195
|
-
title:
|
|
196
|
-
},
|
|
188
|
+
setup(m, { emit: x }) {
|
|
189
|
+
const g = m, n = x, C = E(() => g.workbook.sheets.filter((M) => M.state === "visible"));
|
|
190
|
+
return (M, c) => (d(), v("div", Hs, [
|
|
191
|
+
(d(!0), v(O, null, Q(C.value, (y) => (d(), v("button", {
|
|
192
|
+
key: y.index,
|
|
193
|
+
class: ee(["tab", { active: y.index === m.active }]),
|
|
194
|
+
onClick: (f) => n("select", y.index),
|
|
195
|
+
title: y.name
|
|
196
|
+
}, $(y.name), 11, Ns))), 128))
|
|
197
197
|
]));
|
|
198
198
|
}
|
|
199
|
-
}),
|
|
199
|
+
}), Ws = /* @__PURE__ */ de(Vs, [["__scopeId", "data-v-431b6f9c"]]), Us = {
|
|
200
200
|
class: "dlg",
|
|
201
201
|
role: "dialog",
|
|
202
202
|
"aria-label": "导出设置"
|
|
203
|
-
},
|
|
203
|
+
}, js = { class: "dlg-head" }, Js = { class: "dlg-body" }, Ks = { class: "field" }, Gs = { class: "opts" }, Xs = ["disabled"], Zs = {
|
|
204
204
|
key: 0,
|
|
205
205
|
class: "hint"
|
|
206
|
-
},
|
|
206
|
+
}, Ys = {
|
|
207
207
|
key: 1,
|
|
208
208
|
class: "hint"
|
|
209
|
-
},
|
|
209
|
+
}, qs = { class: "field" }, Qs = { class: "field" }, ei = { class: "opts inline" }, ti = { class: "field" }, ai = { class: "opts" }, si = { class: "field" }, ii = { class: "opts inline" }, ni = { class: "dlg-foot" }, li = /* @__PURE__ */ ue({
|
|
210
210
|
__name: "ExportDialog",
|
|
211
211
|
props: {
|
|
212
212
|
selection: {},
|
|
213
213
|
sheetCount: {}
|
|
214
214
|
},
|
|
215
215
|
emits: ["close", "export"],
|
|
216
|
-
setup(
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
return !!
|
|
220
|
-
}),
|
|
221
|
-
const
|
|
222
|
-
return
|
|
223
|
-
}),
|
|
216
|
+
setup(m, { emit: x }) {
|
|
217
|
+
const g = m, n = x, C = E(() => {
|
|
218
|
+
const f = g.selection;
|
|
219
|
+
return !!f && !(f.top === f.bottom && f.left === f.right);
|
|
220
|
+
}), M = E(() => {
|
|
221
|
+
const f = g.selection;
|
|
222
|
+
return f ? `${ye(f.left)}${f.top + 1}:${ye(f.right)}${f.bottom + 1}` : "";
|
|
223
|
+
}), c = Za({
|
|
224
224
|
action: "png",
|
|
225
|
-
scope:
|
|
225
|
+
scope: C.value ? "selection" : "sheet",
|
|
226
226
|
scale: 2,
|
|
227
227
|
includeHeaders: !1,
|
|
228
228
|
gridlines: !0,
|
|
@@ -231,647 +231,444 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
231
231
|
fitToWidth: !0,
|
|
232
232
|
pdfVector: !1
|
|
233
233
|
});
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function y(f) {
|
|
235
|
+
n("export", ke(W({}, c), { action: f }));
|
|
236
236
|
}
|
|
237
|
-
return (
|
|
237
|
+
return (f, l) => (d(), v("div", {
|
|
238
238
|
class: "dlg-mask",
|
|
239
|
-
onClick:
|
|
239
|
+
onClick: l[16] || (l[16] = Ct((u) => n("close"), ["self"]))
|
|
240
240
|
}, [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
i("div", Us, [
|
|
242
|
+
i("div", js, [
|
|
243
|
+
l[17] || (l[17] = i("span", null, "导出 / 打印设置", -1)),
|
|
244
|
+
i("button", {
|
|
245
245
|
class: "x",
|
|
246
|
-
onClick:
|
|
246
|
+
onClick: l[0] || (l[0] = (u) => n("close")),
|
|
247
247
|
title: "关闭"
|
|
248
248
|
}, "×")
|
|
249
249
|
]),
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
class:
|
|
250
|
+
i("div", Js, [
|
|
251
|
+
i("div", Ks, [
|
|
252
|
+
l[20] || (l[20] = i("label", { class: "lbl" }, "范围", -1)),
|
|
253
|
+
i("div", Gs, [
|
|
254
|
+
i("label", {
|
|
255
|
+
class: ee({ disabled: !C.value })
|
|
256
256
|
}, [
|
|
257
|
-
|
|
257
|
+
X(i("input", {
|
|
258
258
|
type: "radio",
|
|
259
259
|
value: "selection",
|
|
260
|
-
"onUpdate:modelValue":
|
|
261
|
-
disabled: !
|
|
262
|
-
}, null, 8,
|
|
263
|
-
[
|
|
260
|
+
"onUpdate:modelValue": l[1] || (l[1] = (u) => c.scope = u),
|
|
261
|
+
disabled: !C.value
|
|
262
|
+
}, null, 8, Xs), [
|
|
263
|
+
[ze, c.scope]
|
|
264
264
|
]),
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
l[18] || (l[18] = L(" 当前选区 ", -1)),
|
|
266
|
+
C.value ? (d(), v("span", Zs, $(M.value), 1)) : (d(), v("span", Ys, "(未选多格)"))
|
|
267
267
|
], 2),
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
i("label", null, [
|
|
269
|
+
X(i("input", {
|
|
270
270
|
type: "radio",
|
|
271
271
|
value: "sheet",
|
|
272
|
-
"onUpdate:modelValue":
|
|
272
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => c.scope = u)
|
|
273
273
|
}, null, 512), [
|
|
274
|
-
[
|
|
274
|
+
[ze, c.scope]
|
|
275
275
|
]),
|
|
276
|
-
|
|
276
|
+
l[19] || (l[19] = L(" 当前工作表", -1))
|
|
277
277
|
]),
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
i("label", null, [
|
|
279
|
+
X(i("input", {
|
|
280
280
|
type: "radio",
|
|
281
281
|
value: "all",
|
|
282
|
-
"onUpdate:modelValue":
|
|
282
|
+
"onUpdate:modelValue": l[3] || (l[3] = (u) => c.scope = u)
|
|
283
283
|
}, null, 512), [
|
|
284
|
-
[
|
|
284
|
+
[ze, c.scope]
|
|
285
285
|
]),
|
|
286
|
-
|
|
286
|
+
L(" 全部工作表 (" + $(m.sheetCount) + ")", 1)
|
|
287
287
|
])
|
|
288
288
|
])
|
|
289
289
|
]),
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"onUpdate:modelValue":
|
|
294
|
-
}, [...
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
290
|
+
i("div", qs, [
|
|
291
|
+
l[22] || (l[22] = i("label", { class: "lbl" }, "清晰度", -1)),
|
|
292
|
+
X(i("select", {
|
|
293
|
+
"onUpdate:modelValue": l[4] || (l[4] = (u) => c.scale = u)
|
|
294
|
+
}, [...l[21] || (l[21] = [
|
|
295
|
+
i("option", { value: 1 }, "标准 (1×)", -1),
|
|
296
|
+
i("option", { value: 2 }, "高清 (2×)", -1),
|
|
297
|
+
i("option", { value: 3 }, "超清 (3×)", -1)
|
|
298
298
|
])], 512), [
|
|
299
299
|
[
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
ct,
|
|
301
|
+
c.scale,
|
|
302
302
|
void 0,
|
|
303
303
|
{ number: !0 }
|
|
304
304
|
]
|
|
305
305
|
])
|
|
306
306
|
]),
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
307
|
+
i("div", Qs, [
|
|
308
|
+
l[25] || (l[25] = i("label", { class: "lbl" }, "内容", -1)),
|
|
309
|
+
i("div", ei, [
|
|
310
|
+
i("label", null, [
|
|
311
|
+
X(i("input", {
|
|
312
312
|
type: "checkbox",
|
|
313
|
-
"onUpdate:modelValue":
|
|
313
|
+
"onUpdate:modelValue": l[5] || (l[5] = (u) => c.includeHeaders = u)
|
|
314
314
|
}, null, 512), [
|
|
315
|
-
[
|
|
315
|
+
[rt, c.includeHeaders]
|
|
316
316
|
]),
|
|
317
|
-
|
|
317
|
+
l[23] || (l[23] = L(" 含行列号", -1))
|
|
318
318
|
]),
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
i("label", null, [
|
|
320
|
+
X(i("input", {
|
|
321
321
|
type: "checkbox",
|
|
322
|
-
"onUpdate:modelValue":
|
|
322
|
+
"onUpdate:modelValue": l[6] || (l[6] = (u) => c.gridlines = u)
|
|
323
323
|
}, null, 512), [
|
|
324
|
-
[
|
|
324
|
+
[rt, c.gridlines]
|
|
325
325
|
]),
|
|
326
|
-
|
|
326
|
+
l[24] || (l[24] = L(" 网格线", -1))
|
|
327
327
|
])
|
|
328
328
|
])
|
|
329
329
|
]),
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
330
|
+
i("div", ti, [
|
|
331
|
+
l[30] || (l[30] = i("label", { class: "lbl" }, "PDF 类型", -1)),
|
|
332
|
+
i("div", ai, [
|
|
333
|
+
i("label", null, [
|
|
334
|
+
X(i("input", {
|
|
335
335
|
type: "radio",
|
|
336
336
|
value: !1,
|
|
337
|
-
"onUpdate:modelValue":
|
|
337
|
+
"onUpdate:modelValue": l[7] || (l[7] = (u) => c.pdfVector = u)
|
|
338
338
|
}, null, 512), [
|
|
339
|
-
[
|
|
339
|
+
[ze, c.pdfVector]
|
|
340
340
|
]),
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
l[26] || (l[26] = L(" 位图 ", -1)),
|
|
342
|
+
l[27] || (l[27] = i("span", { class: "hint" }, "(完整还原观感)", -1))
|
|
343
343
|
]),
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
i("label", null, [
|
|
345
|
+
X(i("input", {
|
|
346
346
|
type: "radio",
|
|
347
347
|
value: !0,
|
|
348
|
-
"onUpdate:modelValue":
|
|
348
|
+
"onUpdate:modelValue": l[8] || (l[8] = (u) => c.pdfVector = u)
|
|
349
349
|
}, null, 512), [
|
|
350
|
-
[
|
|
350
|
+
[ze, c.pdfVector]
|
|
351
351
|
]),
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
l[28] || (l[28] = L(" 矢量 ", -1)),
|
|
353
|
+
l[29] || (l[29] = i("span", { class: "hint" }, "(文字可选可搜·清晰·文件小;中文需注册字体,否则该格转图)", -1))
|
|
354
354
|
])
|
|
355
355
|
])
|
|
356
356
|
]),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
357
|
+
i("div", si, [
|
|
358
|
+
l[34] || (l[34] = i("label", { class: "lbl" }, [
|
|
359
|
+
L("纸张 "),
|
|
360
|
+
i("span", { class: "hint" }, "(PDF/打印)")
|
|
361
361
|
], -1)),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"onUpdate:modelValue":
|
|
365
|
-
}, [...
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
362
|
+
i("div", ii, [
|
|
363
|
+
X(i("select", {
|
|
364
|
+
"onUpdate:modelValue": l[9] || (l[9] = (u) => c.format = u)
|
|
365
|
+
}, [...l[31] || (l[31] = [
|
|
366
|
+
i("option", { value: "auto" }, "自动(跟随表)", -1),
|
|
367
|
+
i("option", { value: "a4" }, "A4", -1),
|
|
368
|
+
i("option", { value: "a3" }, "A3", -1),
|
|
369
|
+
i("option", { value: "letter" }, "Letter", -1)
|
|
370
370
|
])], 512), [
|
|
371
|
-
[
|
|
371
|
+
[ct, c.format]
|
|
372
372
|
]),
|
|
373
|
-
|
|
374
|
-
"onUpdate:modelValue":
|
|
375
|
-
}, [...
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
X(i("select", {
|
|
374
|
+
"onUpdate:modelValue": l[10] || (l[10] = (u) => c.orientation = u)
|
|
375
|
+
}, [...l[32] || (l[32] = [
|
|
376
|
+
i("option", { value: "auto" }, "方向: 自动", -1),
|
|
377
|
+
i("option", { value: "portrait" }, "纵向", -1),
|
|
378
|
+
i("option", { value: "landscape" }, "横向", -1)
|
|
379
379
|
])], 512), [
|
|
380
|
-
[
|
|
380
|
+
[ct, c.orientation]
|
|
381
381
|
]),
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
i("label", null, [
|
|
383
|
+
X(i("input", {
|
|
384
384
|
type: "checkbox",
|
|
385
|
-
"onUpdate:modelValue":
|
|
385
|
+
"onUpdate:modelValue": l[11] || (l[11] = (u) => c.fitToWidth = u)
|
|
386
386
|
}, null, 512), [
|
|
387
|
-
[
|
|
387
|
+
[rt, c.fitToWidth]
|
|
388
388
|
]),
|
|
389
|
-
|
|
389
|
+
l[33] || (l[33] = L(" 适应页宽", -1))
|
|
390
390
|
])
|
|
391
391
|
])
|
|
392
392
|
])
|
|
393
393
|
]),
|
|
394
|
-
|
|
395
|
-
|
|
394
|
+
i("div", ni, [
|
|
395
|
+
i("button", {
|
|
396
396
|
class: "ghost",
|
|
397
|
-
onClick:
|
|
397
|
+
onClick: l[12] || (l[12] = (u) => n("close"))
|
|
398
398
|
}, "取消"),
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
onClick:
|
|
399
|
+
l[35] || (l[35] = i("div", { class: "grow" }, null, -1)),
|
|
400
|
+
i("button", {
|
|
401
|
+
onClick: l[13] || (l[13] = (u) => y("png"))
|
|
402
402
|
}, "导出 PNG"),
|
|
403
|
-
|
|
404
|
-
onClick:
|
|
403
|
+
i("button", {
|
|
404
|
+
onClick: l[14] || (l[14] = (u) => y("pdf"))
|
|
405
405
|
}, "导出 PDF"),
|
|
406
|
-
|
|
406
|
+
i("button", {
|
|
407
407
|
class: "primary",
|
|
408
|
-
onClick:
|
|
408
|
+
onClick: l[15] || (l[15] = (u) => y("print"))
|
|
409
409
|
}, "打印…")
|
|
410
410
|
])
|
|
411
411
|
])
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
|
-
}),
|
|
415
|
-
key: 0,
|
|
416
|
-
class: "row replace-row"
|
|
417
|
-
}, bn = ["value"], kn = ["disabled"], Cn = ["disabled"], yn = /* @__PURE__ */ se({
|
|
418
|
-
__name: "FindBar",
|
|
419
|
-
props: {
|
|
420
|
-
query: {},
|
|
421
|
-
matchCount: {},
|
|
422
|
-
current: {},
|
|
423
|
-
matchCase: { type: Boolean },
|
|
424
|
-
wholeCell: { type: Boolean },
|
|
425
|
-
editable: { type: Boolean },
|
|
426
|
-
replace: {}
|
|
427
|
-
},
|
|
428
|
-
emits: ["update:query", "update:matchCase", "update:wholeCell", "update:replace", "next", "prev", "replace-one", "replace-all", "close"],
|
|
429
|
-
setup(v, { expose: x, emit: p }) {
|
|
430
|
-
const l = p, b = y(null);
|
|
431
|
-
Ke(() => {
|
|
432
|
-
var m;
|
|
433
|
-
return (m = b.value) == null ? void 0 : m.focus();
|
|
434
|
-
});
|
|
435
|
-
function E(m) {
|
|
436
|
-
var r;
|
|
437
|
-
(m.ctrlKey || m.metaKey) && (m.key === "f" || m.key === "F") ? (m.preventDefault(), (r = b.value) == null || r.select()) : m.key === "Enter" ? (m.preventDefault(), m.shiftKey ? l("prev") : l("next")) : m.key === "Escape" && (m.preventDefault(), l("close"));
|
|
438
|
-
}
|
|
439
|
-
function f(m) {
|
|
440
|
-
m.key === "Enter" ? (m.preventDefault(), l("replace-one")) : m.key === "Escape" && (m.preventDefault(), l("close"));
|
|
441
|
-
}
|
|
442
|
-
return x({ focus: () => {
|
|
443
|
-
var m;
|
|
444
|
-
return (m = b.value) == null ? void 0 : m.focus();
|
|
445
|
-
} }), (m, r) => (u(), c("div", {
|
|
446
|
-
class: "find-bar",
|
|
447
|
-
onKeydown: r[9] || (r[9] = Ue(() => {
|
|
448
|
-
}, ["stop"]))
|
|
449
|
-
}, [
|
|
450
|
-
n("div", rn, [
|
|
451
|
-
n("input", {
|
|
452
|
-
ref_key: "inputEl",
|
|
453
|
-
ref: b,
|
|
454
|
-
class: "q",
|
|
455
|
-
type: "text",
|
|
456
|
-
placeholder: "查找…",
|
|
457
|
-
value: v.query,
|
|
458
|
-
onInput: r[0] || (r[0] = (o) => l("update:query", o.target.value)),
|
|
459
|
-
onKeydown: E
|
|
460
|
-
}, null, 40, mn),
|
|
461
|
-
n("span", {
|
|
462
|
-
class: U(["count", { none: v.query && v.matchCount === 0 }])
|
|
463
|
-
}, M(v.matchCount ? `${v.current + 1}/${v.matchCount}` : v.query ? "无结果" : ""), 3),
|
|
464
|
-
n("button", {
|
|
465
|
-
class: U(["opt", { on: v.matchCase }]),
|
|
466
|
-
title: "区分大小写",
|
|
467
|
-
onClick: r[1] || (r[1] = (o) => l("update:matchCase", !v.matchCase))
|
|
468
|
-
}, "Aa", 2),
|
|
469
|
-
n("button", {
|
|
470
|
-
class: U(["opt", { on: v.wholeCell }]),
|
|
471
|
-
title: "全字匹配(整格相等)",
|
|
472
|
-
onClick: r[2] || (r[2] = (o) => l("update:wholeCell", !v.wholeCell))
|
|
473
|
-
}, "▢", 2),
|
|
474
|
-
n("button", {
|
|
475
|
-
class: "nav",
|
|
476
|
-
title: "上一个 (Shift+Enter)",
|
|
477
|
-
disabled: !v.matchCount,
|
|
478
|
-
onClick: r[3] || (r[3] = (o) => l("prev"))
|
|
479
|
-
}, "▲", 8, fn),
|
|
480
|
-
n("button", {
|
|
481
|
-
class: "nav",
|
|
482
|
-
title: "下一个 (Enter)",
|
|
483
|
-
disabled: !v.matchCount,
|
|
484
|
-
onClick: r[4] || (r[4] = (o) => l("next"))
|
|
485
|
-
}, "▼", 8, pn),
|
|
486
|
-
n("button", {
|
|
487
|
-
class: "close",
|
|
488
|
-
title: "关闭 (Esc)",
|
|
489
|
-
onClick: r[5] || (r[5] = (o) => l("close"))
|
|
490
|
-
}, "×")
|
|
491
|
-
]),
|
|
492
|
-
v.editable ? (u(), c("div", gn, [
|
|
493
|
-
n("input", {
|
|
494
|
-
class: "q",
|
|
495
|
-
type: "text",
|
|
496
|
-
placeholder: "替换为…",
|
|
497
|
-
value: v.replace,
|
|
498
|
-
onInput: r[6] || (r[6] = (o) => l("update:replace", o.target.value)),
|
|
499
|
-
onKeydown: f
|
|
500
|
-
}, null, 40, bn),
|
|
501
|
-
n("button", {
|
|
502
|
-
class: "rep",
|
|
503
|
-
title: "替换当前并查找下一个",
|
|
504
|
-
disabled: !v.matchCount,
|
|
505
|
-
onClick: r[7] || (r[7] = (o) => l("replace-one"))
|
|
506
|
-
}, "替换", 8, kn),
|
|
507
|
-
n("button", {
|
|
508
|
-
class: "rep",
|
|
509
|
-
title: "全部替换",
|
|
510
|
-
disabled: !v.matchCount,
|
|
511
|
-
onClick: r[8] || (r[8] = (o) => l("replace-all"))
|
|
512
|
-
}, "全部替换", 8, Cn)
|
|
513
|
-
])) : w("", !0)
|
|
514
|
-
], 32));
|
|
515
|
-
}
|
|
516
|
-
}), Sn = /* @__PURE__ */ ae(yn, [["__scopeId", "data-v-7c933ccd"]]), xn = { class: "sort" }, hn = { class: "all" }, wn = ["checked"], Fn = { class: "list" }, $n = ["checked", "onChange"], En = ["title"], In = {
|
|
517
|
-
key: 0,
|
|
518
|
-
class: "empty"
|
|
519
|
-
}, Tn = { class: "foot" }, Pn = /* @__PURE__ */ se({
|
|
520
|
-
__name: "FilterPopup",
|
|
521
|
-
props: {
|
|
522
|
-
values: {},
|
|
523
|
-
selected: {},
|
|
524
|
-
x: {},
|
|
525
|
-
y: {},
|
|
526
|
-
sortDir: {}
|
|
527
|
-
},
|
|
528
|
-
emits: ["apply", "clear", "close", "sort"],
|
|
529
|
-
setup(v, { emit: x }) {
|
|
530
|
-
const p = v, l = x, b = y(""), E = ss(new Set(p.selected.length ? p.selected : p.values)), f = R(() => {
|
|
531
|
-
const I = b.value.trim().toLowerCase();
|
|
532
|
-
return I ? p.values.filter((T) => T.toLowerCase().includes(I)) : p.values;
|
|
533
|
-
}), m = R(() => f.value.length > 0 && f.value.every((I) => E.has(I)));
|
|
534
|
-
function r(I) {
|
|
535
|
-
E.has(I) ? E.delete(I) : E.add(I);
|
|
536
|
-
}
|
|
537
|
-
function o() {
|
|
538
|
-
const I = !m.value;
|
|
539
|
-
for (const T of f.value) I ? E.add(T) : E.delete(T);
|
|
540
|
-
}
|
|
541
|
-
function d() {
|
|
542
|
-
l("apply", [...E]);
|
|
543
|
-
}
|
|
544
|
-
const k = y(null);
|
|
545
|
-
function z(I) {
|
|
546
|
-
k.value && !k.value.contains(I.target) && l("close");
|
|
547
|
-
}
|
|
548
|
-
return Ke(() => setTimeout(() => document.addEventListener("mousedown", z), 0)), we(() => document.removeEventListener("mousedown", z)), (I, T) => (u(), c("div", {
|
|
549
|
-
class: "filter-pop",
|
|
550
|
-
ref_key: "rootEl",
|
|
551
|
-
ref: k,
|
|
552
|
-
style: We({ left: v.x + "px", top: v.y + "px" }),
|
|
553
|
-
onKeydown: T[5] || (T[5] = Ue(() => {
|
|
554
|
-
}, ["stop"]))
|
|
555
|
-
}, [
|
|
556
|
-
n("div", xn, [
|
|
557
|
-
n("button", {
|
|
558
|
-
class: U({ on: v.sortDir === "asc" }),
|
|
559
|
-
onClick: T[0] || (T[0] = (B) => l("sort", "asc")),
|
|
560
|
-
title: "升序"
|
|
561
|
-
}, "↑ 升序", 2),
|
|
562
|
-
n("button", {
|
|
563
|
-
class: U({ on: v.sortDir === "desc" }),
|
|
564
|
-
onClick: T[1] || (T[1] = (B) => l("sort", "desc")),
|
|
565
|
-
title: "降序"
|
|
566
|
-
}, "↓ 降序", 2)
|
|
567
|
-
]),
|
|
568
|
-
G(n("input", {
|
|
569
|
-
class: "search",
|
|
570
|
-
type: "text",
|
|
571
|
-
placeholder: "搜索…",
|
|
572
|
-
"onUpdate:modelValue": T[2] || (T[2] = (B) => b.value = B)
|
|
573
|
-
}, null, 512), [
|
|
574
|
-
[Qs, b.value]
|
|
575
|
-
]),
|
|
576
|
-
n("label", hn, [
|
|
577
|
-
n("input", {
|
|
578
|
-
type: "checkbox",
|
|
579
|
-
checked: m.value,
|
|
580
|
-
onChange: o
|
|
581
|
-
}, null, 40, wn),
|
|
582
|
-
T[6] || (T[6] = O(" (全选) ", -1))
|
|
583
|
-
]),
|
|
584
|
-
n("div", Fn, [
|
|
585
|
-
(u(!0), c(V, null, Y(f.value, (B) => (u(), c("label", {
|
|
586
|
-
key: B,
|
|
587
|
-
class: "row"
|
|
588
|
-
}, [
|
|
589
|
-
n("input", {
|
|
590
|
-
type: "checkbox",
|
|
591
|
-
checked: E.has(B),
|
|
592
|
-
onChange: (_) => r(B)
|
|
593
|
-
}, null, 40, $n),
|
|
594
|
-
n("span", {
|
|
595
|
-
class: "val",
|
|
596
|
-
title: B
|
|
597
|
-
}, M(B), 9, En)
|
|
598
|
-
]))), 128)),
|
|
599
|
-
f.value.length ? w("", !0) : (u(), c("div", In, "无匹配值"))
|
|
600
|
-
]),
|
|
601
|
-
n("div", Tn, [
|
|
602
|
-
n("button", {
|
|
603
|
-
class: "link",
|
|
604
|
-
onClick: T[3] || (T[3] = (B) => l("clear"))
|
|
605
|
-
}, "清除筛选"),
|
|
606
|
-
T[7] || (T[7] = n("div", { class: "grow" }, null, -1)),
|
|
607
|
-
n("button", {
|
|
608
|
-
onClick: T[4] || (T[4] = (B) => l("close"))
|
|
609
|
-
}, "取消"),
|
|
610
|
-
n("button", {
|
|
611
|
-
class: "primary",
|
|
612
|
-
onClick: d
|
|
613
|
-
}, "确定")
|
|
614
|
-
])
|
|
615
|
-
], 36));
|
|
616
|
-
}
|
|
617
|
-
}), Rn = /* @__PURE__ */ ae(Pn, [["__scopeId", "data-v-4b0bc283"]]), Mn = { class: "tb-menu" }, An = {
|
|
414
|
+
}), oi = /* @__PURE__ */ de(li, [["__scopeId", "data-v-544df24f"]]), ui = { class: "tb-menu" }, di = {
|
|
618
415
|
key: 0,
|
|
619
416
|
class: "sep"
|
|
620
|
-
},
|
|
417
|
+
}, vi = ["placeholder", "value", "onKeydown"], mi = ["disabled", "onClick", "onMouseenter", "onMouseleave"], fi = ["innerHTML"], ci = {
|
|
621
418
|
key: 2,
|
|
622
419
|
class: "ic-e"
|
|
623
|
-
},
|
|
420
|
+
}, ri = {
|
|
624
421
|
key: 3,
|
|
625
422
|
class: "lb"
|
|
626
|
-
},
|
|
423
|
+
}, gi = /* @__PURE__ */ ue({
|
|
627
424
|
__name: "ToolbarMenu",
|
|
628
425
|
props: {
|
|
629
426
|
items: {}
|
|
630
427
|
},
|
|
631
428
|
emits: ["pick"],
|
|
632
|
-
setup(
|
|
633
|
-
const
|
|
634
|
-
let
|
|
635
|
-
function
|
|
636
|
-
var
|
|
637
|
-
|
|
638
|
-
}
|
|
639
|
-
function
|
|
640
|
-
var
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
return
|
|
644
|
-
var
|
|
645
|
-
(
|
|
646
|
-
}), (
|
|
647
|
-
(
|
|
648
|
-
key:
|
|
429
|
+
setup(m, { emit: x }) {
|
|
430
|
+
const g = x;
|
|
431
|
+
let n = null;
|
|
432
|
+
function C(c) {
|
|
433
|
+
var y;
|
|
434
|
+
c.disabled || (n = c, (y = c.onHover) == null || y.call(c));
|
|
435
|
+
}
|
|
436
|
+
function M(c) {
|
|
437
|
+
var y;
|
|
438
|
+
n === c && (n = null), (y = c.onHoverEnd) == null || y.call(c);
|
|
439
|
+
}
|
|
440
|
+
return Le(() => {
|
|
441
|
+
var c;
|
|
442
|
+
(c = n == null ? void 0 : n.onHoverEnd) == null || c.call(n), n = null;
|
|
443
|
+
}), (c, y) => (d(), v("div", ui, [
|
|
444
|
+
(d(!0), v(O, null, Q(m.items, (f) => (d(), v(O, {
|
|
445
|
+
key: f.id
|
|
649
446
|
}, [
|
|
650
|
-
|
|
447
|
+
f.type === "separator" ? (d(), v("div", di)) : f.input ? (d(), v("input", {
|
|
651
448
|
key: 1,
|
|
652
449
|
class: "mi-input",
|
|
653
|
-
placeholder:
|
|
654
|
-
value:
|
|
655
|
-
onKeydown:
|
|
656
|
-
|
|
450
|
+
placeholder: f.input.placeholder,
|
|
451
|
+
value: f.input.value,
|
|
452
|
+
onKeydown: Ya((l) => {
|
|
453
|
+
f.input.onCommit(l.target.value), g("pick", f);
|
|
657
454
|
}, ["enter"]),
|
|
658
|
-
onClick:
|
|
455
|
+
onClick: y[0] || (y[0] = Ct(() => {
|
|
659
456
|
}, ["stop"]))
|
|
660
|
-
}, null, 40,
|
|
457
|
+
}, null, 40, vi)) : (d(), v("button", {
|
|
661
458
|
key: 2,
|
|
662
|
-
class:
|
|
663
|
-
disabled:
|
|
664
|
-
onClick: (
|
|
665
|
-
onMouseenter: (
|
|
666
|
-
onMouseleave: (
|
|
459
|
+
class: ee(["mi", { active: f.active }]),
|
|
460
|
+
disabled: f.disabled,
|
|
461
|
+
onClick: (l) => g("pick", f),
|
|
462
|
+
onMouseenter: (l) => C(f),
|
|
463
|
+
onMouseleave: (l) => M(f)
|
|
667
464
|
}, [
|
|
668
|
-
|
|
465
|
+
f.swatch ? (d(), v("span", {
|
|
669
466
|
key: 0,
|
|
670
467
|
class: "sw",
|
|
671
|
-
style:
|
|
672
|
-
}, null, 4)) :
|
|
468
|
+
style: Ke({ background: f.swatch })
|
|
469
|
+
}, null, 4)) : f.iconSvg ? (d(), v("span", {
|
|
673
470
|
key: 1,
|
|
674
471
|
class: "ic",
|
|
675
|
-
innerHTML:
|
|
676
|
-
}, null, 8,
|
|
677
|
-
|
|
678
|
-
], 42,
|
|
472
|
+
innerHTML: R(oe)(f.iconSvg)
|
|
473
|
+
}, null, 8, fi)) : f.icon ? (d(), v("span", ci, $(f.icon), 1)) : h("", !0),
|
|
474
|
+
f.label ? (d(), v("span", ri, $(f.label), 1)) : h("", !0)
|
|
475
|
+
], 42, mi))
|
|
679
476
|
], 64))), 128))
|
|
680
477
|
]));
|
|
681
478
|
}
|
|
682
|
-
}),
|
|
479
|
+
}), Ge = /* @__PURE__ */ de(gi, [["__scopeId", "data-v-35d480c3"]]), pi = {
|
|
683
480
|
key: 0,
|
|
684
481
|
class: "divider"
|
|
685
|
-
},
|
|
482
|
+
}, bi = {
|
|
686
483
|
key: 1,
|
|
687
484
|
class: "tool"
|
|
688
|
-
},
|
|
485
|
+
}, ki = ["innerHTML"], Ci = {
|
|
689
486
|
key: 1,
|
|
690
487
|
class: "ic-e"
|
|
691
|
-
},
|
|
488
|
+
}, yi = {
|
|
692
489
|
key: 2,
|
|
693
490
|
class: "lb"
|
|
694
|
-
},
|
|
491
|
+
}, Si = ["innerHTML"], xi = {
|
|
695
492
|
key: 0,
|
|
696
493
|
class: "divider"
|
|
697
|
-
},
|
|
494
|
+
}, hi = {
|
|
698
495
|
key: 1,
|
|
699
496
|
class: "dd"
|
|
700
|
-
},
|
|
497
|
+
}, Fi = ["disabled", "title", "onClick"], wi = ["innerHTML"], Ii = {
|
|
701
498
|
key: 1,
|
|
702
499
|
class: "ic-e"
|
|
703
|
-
},
|
|
500
|
+
}, Ti = {
|
|
704
501
|
key: 2,
|
|
705
502
|
class: "lb"
|
|
706
|
-
},
|
|
503
|
+
}, Ei = ["innerHTML"], $i = {
|
|
707
504
|
key: 0,
|
|
708
505
|
class: "dd more"
|
|
709
|
-
},
|
|
506
|
+
}, Pi = ["innerHTML"], Ri = 46, Zt = 4, Mi = /* @__PURE__ */ ue({
|
|
710
507
|
__name: "ActionToolbar",
|
|
711
508
|
props: {
|
|
712
509
|
items: {}
|
|
713
510
|
},
|
|
714
|
-
setup(
|
|
715
|
-
const x =
|
|
716
|
-
function
|
|
717
|
-
var
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
}
|
|
721
|
-
const
|
|
722
|
-
const
|
|
723
|
-
if (!
|
|
724
|
-
let
|
|
725
|
-
for (let
|
|
726
|
-
if (
|
|
511
|
+
setup(m) {
|
|
512
|
+
const x = m, g = S(null), n = S(null), C = S([]), M = S(0), c = S(null);
|
|
513
|
+
function y() {
|
|
514
|
+
var A, F;
|
|
515
|
+
const r = n.value;
|
|
516
|
+
r && (C.value = Array.from(r.children).map((ve) => ve.offsetWidth), M.value = (F = (A = g.value) == null ? void 0 : A.clientWidth) != null ? F : 0);
|
|
517
|
+
}
|
|
518
|
+
const f = E(() => {
|
|
519
|
+
const r = M.value, A = C.value;
|
|
520
|
+
if (!r || A.length !== x.items.length) return x.items.length;
|
|
521
|
+
let F = 0, ve = !0;
|
|
522
|
+
for (let U = 0; U < x.items.length; U++)
|
|
523
|
+
if (F += A[U] + Zt, F > r) {
|
|
727
524
|
ve = !1;
|
|
728
525
|
break;
|
|
729
526
|
}
|
|
730
527
|
if (ve) return x.items.length;
|
|
731
|
-
let
|
|
732
|
-
for (let
|
|
733
|
-
|
|
734
|
-
return Math.max(0,
|
|
735
|
-
}),
|
|
736
|
-
function
|
|
737
|
-
|
|
738
|
-
}
|
|
739
|
-
function
|
|
740
|
-
var
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
function
|
|
744
|
-
var
|
|
745
|
-
|
|
746
|
-
}
|
|
747
|
-
function
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
function
|
|
751
|
-
return
|
|
752
|
-
}
|
|
753
|
-
let
|
|
754
|
-
function ie(
|
|
755
|
-
|
|
756
|
-
}
|
|
757
|
-
return
|
|
758
|
-
|
|
759
|
-
var
|
|
760
|
-
return
|
|
761
|
-
}),
|
|
762
|
-
}),
|
|
763
|
-
|
|
764
|
-
}),
|
|
765
|
-
() => x.items.map((
|
|
766
|
-
var
|
|
767
|
-
return
|
|
528
|
+
let Oe = Ri, xe = 0;
|
|
529
|
+
for (let U = 0; U < x.items.length && (Oe += A[U] + Zt, !(Oe > r)); U++)
|
|
530
|
+
xe++;
|
|
531
|
+
return Math.max(0, xe);
|
|
532
|
+
}), l = E(() => x.items.slice(0, f.value)), u = E(() => x.items.slice(f.value)), p = Se.more;
|
|
533
|
+
function D(r) {
|
|
534
|
+
c.value = c.value === r ? null : r;
|
|
535
|
+
}
|
|
536
|
+
function B(r) {
|
|
537
|
+
var A;
|
|
538
|
+
r.disabled || (A = r.onClick) == null || A.call(r);
|
|
539
|
+
}
|
|
540
|
+
function H(r) {
|
|
541
|
+
var A;
|
|
542
|
+
r.disabled || ((A = r.items) != null && A.length ? D(r.id) : (B(r), c.value = null));
|
|
543
|
+
}
|
|
544
|
+
function z(r) {
|
|
545
|
+
B(r), r.keepOpen || (c.value = null);
|
|
546
|
+
}
|
|
547
|
+
function K(r) {
|
|
548
|
+
return r.iconSvg ? oe(r.iconSvg) : null;
|
|
549
|
+
}
|
|
550
|
+
let T = null;
|
|
551
|
+
function ie(r) {
|
|
552
|
+
g.value && !g.value.contains(r.target) && (c.value = null);
|
|
553
|
+
}
|
|
554
|
+
return yt(() => {
|
|
555
|
+
Ce(y), T = new ResizeObserver(() => {
|
|
556
|
+
var r, A;
|
|
557
|
+
return M.value = (A = (r = g.value) == null ? void 0 : r.clientWidth) != null ? A : 0;
|
|
558
|
+
}), g.value && T.observe(g.value), document.addEventListener("mousedown", ie);
|
|
559
|
+
}), Le(() => {
|
|
560
|
+
T == null || T.disconnect(), document.removeEventListener("mousedown", ie);
|
|
561
|
+
}), _(
|
|
562
|
+
() => x.items.map((r) => {
|
|
563
|
+
var A;
|
|
564
|
+
return r.id + ((A = r.label) != null ? A : "");
|
|
768
565
|
}).join("|"),
|
|
769
|
-
() =>
|
|
770
|
-
), (
|
|
566
|
+
() => Ce(y)
|
|
567
|
+
), (r, A) => (d(), v("div", {
|
|
771
568
|
class: "action-toolbar",
|
|
772
569
|
ref_key: "containerEl",
|
|
773
|
-
ref:
|
|
570
|
+
ref: g
|
|
774
571
|
}, [
|
|
775
|
-
|
|
572
|
+
i("div", {
|
|
776
573
|
class: "measure",
|
|
777
574
|
ref_key: "measureEl",
|
|
778
|
-
ref:
|
|
575
|
+
ref: n,
|
|
779
576
|
"aria-hidden": "true"
|
|
780
577
|
}, [
|
|
781
|
-
(
|
|
782
|
-
key: "m" +
|
|
578
|
+
(d(!0), v(O, null, Q(m.items, (F) => (d(), v(O, {
|
|
579
|
+
key: "m" + F.id
|
|
783
580
|
}, [
|
|
784
|
-
|
|
785
|
-
|
|
581
|
+
F.type === "separator" ? (d(), v("span", pi)) : (d(), v("button", bi, [
|
|
582
|
+
K(F) ? (d(), v("span", {
|
|
786
583
|
key: 0,
|
|
787
584
|
class: "ic",
|
|
788
|
-
innerHTML:
|
|
789
|
-
}, null, 8,
|
|
790
|
-
|
|
791
|
-
|
|
585
|
+
innerHTML: K(F)
|
|
586
|
+
}, null, 8, ki)) : F.icon ? (d(), v("span", Ci, $(F.icon), 1)) : h("", !0),
|
|
587
|
+
F.label ? (d(), v("span", yi, $(F.label), 1)) : h("", !0),
|
|
588
|
+
F.items ? (d(), v("span", {
|
|
792
589
|
key: 3,
|
|
793
590
|
class: "caret",
|
|
794
|
-
innerHTML:
|
|
795
|
-
}, null, 8,
|
|
591
|
+
innerHTML: R(oe)(R(Se).caret)
|
|
592
|
+
}, null, 8, Si)) : h("", !0)
|
|
796
593
|
]))
|
|
797
594
|
], 64))), 128))
|
|
798
595
|
], 512),
|
|
799
|
-
(
|
|
800
|
-
key:
|
|
596
|
+
(d(!0), v(O, null, Q(l.value, (F) => (d(), v(O, {
|
|
597
|
+
key: F.id
|
|
801
598
|
}, [
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
class:
|
|
805
|
-
disabled:
|
|
806
|
-
title:
|
|
807
|
-
onClick: (ve) =>
|
|
599
|
+
F.type === "separator" ? (d(), v("span", xi)) : (d(), v("div", hi, [
|
|
600
|
+
i("button", {
|
|
601
|
+
class: ee(["tool", { active: F.active, open: c.value === F.id }]),
|
|
602
|
+
disabled: F.disabled,
|
|
603
|
+
title: F.title || F.label || F.id,
|
|
604
|
+
onClick: (ve) => H(F)
|
|
808
605
|
}, [
|
|
809
|
-
|
|
606
|
+
K(F) ? (d(), v("span", {
|
|
810
607
|
key: 0,
|
|
811
608
|
class: "ic",
|
|
812
|
-
innerHTML:
|
|
813
|
-
}, null, 8,
|
|
814
|
-
|
|
815
|
-
|
|
609
|
+
innerHTML: K(F)
|
|
610
|
+
}, null, 8, wi)) : F.icon ? (d(), v("span", Ii, $(F.icon), 1)) : h("", !0),
|
|
611
|
+
F.label ? (d(), v("span", Ti, $(F.label), 1)) : h("", !0),
|
|
612
|
+
F.items ? (d(), v("span", {
|
|
816
613
|
key: 3,
|
|
817
614
|
class: "caret",
|
|
818
|
-
innerHTML:
|
|
819
|
-
}, null, 8,
|
|
820
|
-
], 10,
|
|
821
|
-
|
|
615
|
+
innerHTML: R(oe)(R(Se).caret)
|
|
616
|
+
}, null, 8, Ei)) : h("", !0)
|
|
617
|
+
], 10, Fi),
|
|
618
|
+
F.items && c.value === F.id ? (d(), se(Ge, {
|
|
822
619
|
key: 0,
|
|
823
|
-
items:
|
|
824
|
-
onPick:
|
|
825
|
-
}, null, 8, ["items"])) :
|
|
620
|
+
items: F.items,
|
|
621
|
+
onPick: z
|
|
622
|
+
}, null, 8, ["items"])) : h("", !0)
|
|
826
623
|
]))
|
|
827
624
|
], 64))), 128)),
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
class:
|
|
625
|
+
u.value.length ? (d(), v("div", $i, [
|
|
626
|
+
i("button", {
|
|
627
|
+
class: ee(["tool", { open: c.value === "__more" }]),
|
|
831
628
|
title: "更多",
|
|
832
|
-
onClick:
|
|
629
|
+
onClick: A[0] || (A[0] = (F) => D("__more"))
|
|
833
630
|
}, [
|
|
834
|
-
|
|
631
|
+
i("span", {
|
|
835
632
|
class: "ic",
|
|
836
|
-
innerHTML:
|
|
837
|
-
}, null, 8,
|
|
633
|
+
innerHTML: R(oe)(R(p))
|
|
634
|
+
}, null, 8, Pi)
|
|
838
635
|
], 2),
|
|
839
|
-
|
|
636
|
+
c.value === "__more" ? (d(), se(Ge, {
|
|
840
637
|
key: 0,
|
|
841
|
-
items:
|
|
842
|
-
onPick:
|
|
843
|
-
}, null, 8, ["items"])) :
|
|
844
|
-
])) :
|
|
638
|
+
items: u.value,
|
|
639
|
+
onPick: z
|
|
640
|
+
}, null, 8, ["items"])) : h("", !0)
|
|
641
|
+
])) : h("", !0)
|
|
845
642
|
], 512));
|
|
846
643
|
}
|
|
847
|
-
}),
|
|
644
|
+
}), Di = /* @__PURE__ */ de(Mi, [["__scopeId", "data-v-d4df1c57"]]), Ai = {
|
|
848
645
|
class: "ribbon-tabs",
|
|
849
646
|
role: "tablist"
|
|
850
|
-
},
|
|
647
|
+
}, Bi = ["aria-selected", "onClick"], _i = ["innerHTML"], zi = { class: "ribbon-panel" }, Li = {
|
|
851
648
|
key: 0,
|
|
852
649
|
class: "rb-sep"
|
|
853
|
-
},
|
|
650
|
+
}, Oi = { class: "rb-group" }, Hi = { class: "rb-group-body" }, Ni = {
|
|
854
651
|
key: 0,
|
|
855
652
|
class: "rb-dd"
|
|
856
|
-
},
|
|
653
|
+
}, Vi = ["disabled", "title", "onClick"], Wi = ["innerHTML"], Ui = { class: "lb" }, ji = {
|
|
857
654
|
key: 0,
|
|
858
655
|
class: "caret-inline"
|
|
859
|
-
},
|
|
656
|
+
}, Ji = {
|
|
860
657
|
key: 1,
|
|
861
658
|
class: "rb-smalls"
|
|
862
|
-
},
|
|
659
|
+
}, Ki = {
|
|
863
660
|
key: 0,
|
|
864
661
|
class: "rb-vsep"
|
|
865
|
-
},
|
|
662
|
+
}, Gi = {
|
|
866
663
|
key: 1,
|
|
867
664
|
class: "rb-dd"
|
|
868
|
-
},
|
|
665
|
+
}, Xi = ["disabled", "title", "onClick"], Zi = ["innerHTML"], Yi = {
|
|
869
666
|
key: 1,
|
|
870
667
|
class: "lb-sm"
|
|
871
|
-
},
|
|
668
|
+
}, qi = ["innerHTML"], Qi = {
|
|
872
669
|
key: 0,
|
|
873
670
|
class: "rb-group-name"
|
|
874
|
-
},
|
|
671
|
+
}, en = /* @__PURE__ */ ue({
|
|
875
672
|
__name: "RibbonBar",
|
|
876
673
|
props: {
|
|
877
674
|
sections: {},
|
|
@@ -880,138 +677,138 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
880
677
|
showSettings: { type: Boolean }
|
|
881
678
|
},
|
|
882
679
|
emits: ["update:activeSectionId", "open-settings"],
|
|
883
|
-
setup(
|
|
884
|
-
const
|
|
885
|
-
function
|
|
886
|
-
return
|
|
680
|
+
setup(m, { emit: x }) {
|
|
681
|
+
const g = m, n = x, C = S(null), M = S(null), c = E(() => g.groups.map((p) => ({ id: p.id, name: p.name, segs: vs(p.items) })));
|
|
682
|
+
function y(p) {
|
|
683
|
+
return p.iconSvg ? oe(p.iconSvg) : null;
|
|
887
684
|
}
|
|
888
|
-
function
|
|
889
|
-
var
|
|
890
|
-
|
|
685
|
+
function f(p) {
|
|
686
|
+
var D, B;
|
|
687
|
+
p.disabled || ((D = p.items) != null && D.length ? C.value = C.value === p.id ? null : p.id : ((B = p.onClick) == null || B.call(p), C.value = null));
|
|
891
688
|
}
|
|
892
|
-
function
|
|
893
|
-
var
|
|
894
|
-
(
|
|
689
|
+
function l(p) {
|
|
690
|
+
var D;
|
|
691
|
+
(D = p.onClick) == null || D.call(p), p.keepOpen || (C.value = null);
|
|
895
692
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
693
|
+
function u(p) {
|
|
694
|
+
M.value && !M.value.contains(p.target) && (C.value = null);
|
|
898
695
|
}
|
|
899
|
-
return
|
|
696
|
+
return yt(() => document.addEventListener("mousedown", u)), Le(() => document.removeEventListener("mousedown", u)), (p, D) => (d(), v("div", {
|
|
900
697
|
class: "ribbon",
|
|
901
698
|
ref_key: "rootEl",
|
|
902
|
-
ref:
|
|
699
|
+
ref: M
|
|
903
700
|
}, [
|
|
904
|
-
|
|
905
|
-
(
|
|
906
|
-
key:
|
|
907
|
-
class:
|
|
701
|
+
i("div", Ai, [
|
|
702
|
+
(d(!0), v(O, null, Q(m.sections, (B) => (d(), v("button", {
|
|
703
|
+
key: B.id,
|
|
704
|
+
class: ee(["ribbon-tab", { active: B.id === m.activeSectionId }]),
|
|
908
705
|
role: "tab",
|
|
909
|
-
"aria-selected":
|
|
910
|
-
onClick: (
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
|
|
706
|
+
"aria-selected": B.id === m.activeSectionId,
|
|
707
|
+
onClick: (H) => n("update:activeSectionId", B.id)
|
|
708
|
+
}, $(B.name), 11, Bi))), 128)),
|
|
709
|
+
D[2] || (D[2] = i("span", { class: "ribbon-tabs-spacer" }, null, -1)),
|
|
710
|
+
m.showSettings ? (d(), v("button", {
|
|
914
711
|
key: 0,
|
|
915
712
|
class: "ribbon-gear",
|
|
916
713
|
title: "设置(工具板块 / 常规 / 视图)",
|
|
917
|
-
onClick:
|
|
714
|
+
onClick: D[0] || (D[0] = (B) => n("open-settings"))
|
|
918
715
|
}, [
|
|
919
|
-
|
|
716
|
+
i("span", {
|
|
920
717
|
class: "ic",
|
|
921
|
-
innerHTML:
|
|
922
|
-
}, null, 8,
|
|
923
|
-
|
|
924
|
-
])) :
|
|
718
|
+
innerHTML: R(oe)(R(Se).settings)
|
|
719
|
+
}, null, 8, _i),
|
|
720
|
+
D[1] || (D[1] = i("span", { class: "lbl" }, "设置", -1))
|
|
721
|
+
])) : h("", !0)
|
|
925
722
|
]),
|
|
926
|
-
|
|
927
|
-
(
|
|
928
|
-
key:
|
|
723
|
+
i("div", zi, [
|
|
724
|
+
(d(!0), v(O, null, Q(c.value, (B, H) => (d(), v(O, {
|
|
725
|
+
key: B.id
|
|
929
726
|
}, [
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
(
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
class:
|
|
937
|
-
disabled:
|
|
938
|
-
title:
|
|
939
|
-
onClick: (
|
|
727
|
+
H > 0 ? (d(), v("div", Li)) : h("", !0),
|
|
728
|
+
i("div", Oi, [
|
|
729
|
+
i("div", Hi, [
|
|
730
|
+
(d(!0), v(O, null, Q(B.segs, (z, K) => (d(), v(O, { key: K }, [
|
|
731
|
+
z.kind === "large" ? (d(), v("div", Ni, [
|
|
732
|
+
i("button", {
|
|
733
|
+
class: ee(["rb-btn rb-large", { active: z.item.active, open: C.value === z.item.id }]),
|
|
734
|
+
disabled: z.item.disabled,
|
|
735
|
+
title: z.item.title || z.item.label,
|
|
736
|
+
onClick: (T) => f(z.item)
|
|
940
737
|
}, [
|
|
941
|
-
|
|
738
|
+
y(z.item) ? (d(), v("span", {
|
|
942
739
|
key: 0,
|
|
943
740
|
class: "ic-lg",
|
|
944
|
-
innerHTML:
|
|
945
|
-
}, null, 8,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
741
|
+
innerHTML: y(z.item)
|
|
742
|
+
}, null, 8, Wi)) : h("", !0),
|
|
743
|
+
i("span", Ui, [
|
|
744
|
+
L($(z.item.label), 1),
|
|
745
|
+
z.item.items ? (d(), v("span", ji, "▾")) : h("", !0)
|
|
949
746
|
])
|
|
950
|
-
], 10,
|
|
951
|
-
|
|
747
|
+
], 10, Vi),
|
|
748
|
+
z.item.items && C.value === z.item.id ? (d(), se(Ge, {
|
|
952
749
|
key: 0,
|
|
953
|
-
items:
|
|
954
|
-
onPick:
|
|
955
|
-
}, null, 8, ["items"])) :
|
|
956
|
-
])) : (
|
|
957
|
-
(
|
|
750
|
+
items: z.item.items,
|
|
751
|
+
onPick: l
|
|
752
|
+
}, null, 8, ["items"])) : h("", !0)
|
|
753
|
+
])) : (d(), v("div", Ji, [
|
|
754
|
+
(d(!0), v(O, null, Q(z.rows, (T, ie) => (d(), v("div", {
|
|
958
755
|
key: ie,
|
|
959
756
|
class: "rb-row"
|
|
960
757
|
}, [
|
|
961
|
-
(
|
|
962
|
-
key:
|
|
758
|
+
(d(!0), v(O, null, Q(T, (r) => (d(), v(O, {
|
|
759
|
+
key: r.id
|
|
963
760
|
}, [
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
class:
|
|
967
|
-
disabled:
|
|
968
|
-
title:
|
|
969
|
-
onClick: (
|
|
761
|
+
r.type === "separator" ? (d(), v("span", Ki)) : (d(), v("div", Gi, [
|
|
762
|
+
i("button", {
|
|
763
|
+
class: ee(["rb-btn rb-small", { active: r.active, open: C.value === r.id, combo: !!r.items && !!r.label }]),
|
|
764
|
+
disabled: r.disabled,
|
|
765
|
+
title: r.title || r.label || r.id,
|
|
766
|
+
onClick: (A) => f(r)
|
|
970
767
|
}, [
|
|
971
|
-
|
|
768
|
+
y(r) ? (d(), v("span", {
|
|
972
769
|
key: 0,
|
|
973
770
|
class: "ic-sm",
|
|
974
|
-
innerHTML:
|
|
975
|
-
}, null, 8,
|
|
976
|
-
(
|
|
977
|
-
|
|
771
|
+
innerHTML: y(r)
|
|
772
|
+
}, null, 8, Zi)) : h("", !0),
|
|
773
|
+
(r.items || r.showLabel) && r.label ? (d(), v("span", Yi, $(r.label), 1)) : h("", !0),
|
|
774
|
+
r.items ? (d(), v("span", {
|
|
978
775
|
key: 2,
|
|
979
776
|
class: "caret",
|
|
980
|
-
innerHTML:
|
|
981
|
-
}, null, 8,
|
|
982
|
-
], 10,
|
|
983
|
-
|
|
777
|
+
innerHTML: R(oe)(R(Se).caret)
|
|
778
|
+
}, null, 8, qi)) : h("", !0)
|
|
779
|
+
], 10, Xi),
|
|
780
|
+
r.items && C.value === r.id ? (d(), se(Ge, {
|
|
984
781
|
key: 0,
|
|
985
|
-
items:
|
|
986
|
-
onPick:
|
|
987
|
-
}, null, 8, ["items"])) :
|
|
782
|
+
items: r.items,
|
|
783
|
+
onPick: l
|
|
784
|
+
}, null, 8, ["items"])) : h("", !0)
|
|
988
785
|
]))
|
|
989
786
|
], 64))), 128))
|
|
990
787
|
]))), 128))
|
|
991
788
|
]))
|
|
992
789
|
], 64))), 128))
|
|
993
790
|
]),
|
|
994
|
-
|
|
791
|
+
B.name ? (d(), v("div", Qi, $(B.name), 1)) : h("", !0)
|
|
995
792
|
])
|
|
996
793
|
], 64))), 128))
|
|
997
794
|
])
|
|
998
795
|
], 512));
|
|
999
796
|
}
|
|
1000
|
-
}),
|
|
797
|
+
}), tn = /* @__PURE__ */ de(en, [["__scopeId", "data-v-669e85fe"]]), an = {
|
|
1001
798
|
key: 0,
|
|
1002
799
|
class: "export-progress-overlay",
|
|
1003
800
|
role: "dialog",
|
|
1004
801
|
"aria-modal": "true",
|
|
1005
802
|
"aria-live": "polite"
|
|
1006
|
-
},
|
|
803
|
+
}, sn = { class: "card" }, nn = { class: "title" }, ln = { class: "row" }, on = { class: "pct" }, un = /* @__PURE__ */ ue({
|
|
1007
804
|
__name: "ExportProgressOverlay",
|
|
1008
805
|
props: {
|
|
1009
806
|
state: {},
|
|
1010
807
|
busy: { type: Boolean }
|
|
1011
808
|
},
|
|
1012
809
|
emits: ["cancel"],
|
|
1013
|
-
setup(
|
|
1014
|
-
const
|
|
810
|
+
setup(m, { emit: x }) {
|
|
811
|
+
const g = x, n = {
|
|
1015
812
|
render: "渲染中",
|
|
1016
813
|
compose: "合成中",
|
|
1017
814
|
paginate: "分页中",
|
|
@@ -1019,53 +816,53 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1019
816
|
zip: "zip 压缩",
|
|
1020
817
|
convert: "批量转换"
|
|
1021
818
|
};
|
|
1022
|
-
return (
|
|
1023
|
-
var
|
|
1024
|
-
return
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
class:
|
|
819
|
+
return (C, M) => {
|
|
820
|
+
var c, y, f, l, u, p, D;
|
|
821
|
+
return d(), se(qa, { to: "body" }, [
|
|
822
|
+
m.busy ? (d(), v("div", an, [
|
|
823
|
+
i("div", sn, [
|
|
824
|
+
i("div", nn, $(((c = m.state) == null ? void 0 : c.label) || n[(f = (y = m.state) == null ? void 0 : y.stage) != null ? f : ""] || "处理中…"), 1),
|
|
825
|
+
i("div", {
|
|
826
|
+
class: ee(["bar", { indeterminate: ((l = m.state) == null ? void 0 : l.ratio) == null }])
|
|
1030
827
|
}, [
|
|
1031
|
-
((
|
|
828
|
+
((u = m.state) == null ? void 0 : u.ratio) != null ? (d(), v("div", {
|
|
1032
829
|
key: 0,
|
|
1033
830
|
class: "fill",
|
|
1034
|
-
style:
|
|
1035
|
-
}, null, 4)) :
|
|
831
|
+
style: Ke({ width: Math.round(((p = m.state.ratio) != null ? p : 0) * 100) + "%" })
|
|
832
|
+
}, null, 4)) : h("", !0)
|
|
1036
833
|
], 2),
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
834
|
+
i("div", ln, [
|
|
835
|
+
i("span", on, $(((D = m.state) == null ? void 0 : D.ratio) != null ? Math.round(m.state.ratio * 100) + "%" : "正在处理…"), 1),
|
|
836
|
+
i("button", {
|
|
1040
837
|
class: "cancel",
|
|
1041
|
-
onClick:
|
|
838
|
+
onClick: M[0] || (M[0] = (B) => g("cancel")),
|
|
1042
839
|
title: "按 Esc 也可取消"
|
|
1043
840
|
}, "取消")
|
|
1044
841
|
])
|
|
1045
842
|
])
|
|
1046
|
-
])) :
|
|
843
|
+
])) : h("", !0)
|
|
1047
844
|
]);
|
|
1048
845
|
};
|
|
1049
846
|
}
|
|
1050
|
-
}),
|
|
847
|
+
}), dn = /* @__PURE__ */ de(un, [["__scopeId", "data-v-629027ad"]]), vn = {
|
|
1051
848
|
key: 2,
|
|
1052
849
|
class: "formula-bar"
|
|
1053
|
-
},
|
|
1054
|
-
key:
|
|
850
|
+
}, mn = { class: "addr" }, fn = ["value", "title"], cn = ["title"], rn = { class: "ov-slot" }, gn = {
|
|
851
|
+
key: 1,
|
|
1055
852
|
class: "state"
|
|
1056
|
-
},
|
|
853
|
+
}, pn = { class: "loader" }, bn = { class: "loader-label" }, kn = { key: 0 }, Cn = { class: "loader-track" }, yn = {
|
|
1057
854
|
key: 1,
|
|
1058
855
|
class: "loader-fill indeterminate"
|
|
1059
|
-
},
|
|
1060
|
-
key:
|
|
856
|
+
}, Sn = {
|
|
857
|
+
key: 2,
|
|
1061
858
|
class: "state error"
|
|
1062
|
-
},
|
|
1063
|
-
key:
|
|
859
|
+
}, xn = {
|
|
860
|
+
key: 3,
|
|
1064
861
|
class: "state hint"
|
|
1065
|
-
},
|
|
862
|
+
}, hn = {
|
|
1066
863
|
key: 3,
|
|
1067
864
|
class: "status-bar"
|
|
1068
|
-
},
|
|
865
|
+
}, Fn = { class: "sel" }, wn = { key: 1 }, In = /* @__PURE__ */ ue({
|
|
1069
866
|
__name: "ExcelViewer",
|
|
1070
867
|
props: {
|
|
1071
868
|
src: {},
|
|
@@ -1101,420 +898,419 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1101
898
|
contextMenu: { type: [Boolean, Function], default: void 0 }
|
|
1102
899
|
},
|
|
1103
900
|
emits: ["rendered", "error", "progress", "cell-click", "cell-dblclick", "selection-change", "sheet-change", "hyperlink-click", "cell-change", "edit-start", "edit-commit", "dim-change", "dirty-change", "image-change", "struct-change", "permission-denied", "before-context-menu", "context-menu", "update:editable", "update:cellImageFit"],
|
|
1104
|
-
setup(
|
|
1105
|
-
const
|
|
901
|
+
setup(m, { expose: x, emit: g }) {
|
|
902
|
+
const n = m, C = E(() => {
|
|
1106
903
|
var e;
|
|
1107
|
-
return (e =
|
|
1108
|
-
}),
|
|
1109
|
-
() => Object.assign({}, ...
|
|
1110
|
-
),
|
|
1111
|
-
function
|
|
1112
|
-
let
|
|
1113
|
-
const
|
|
1114
|
-
const
|
|
1115
|
-
|
|
904
|
+
return (e = n.plugins) != null ? e : [];
|
|
905
|
+
}), M = E(
|
|
906
|
+
() => Object.assign({}, ...C.value.map((e) => e.theme || {}), n.theme || {})
|
|
907
|
+
), c = E(() => !!n.cellStyle || C.value.some((e) => e.cellStyle));
|
|
908
|
+
function y(e, a, s) {
|
|
909
|
+
let o;
|
|
910
|
+
const w = (I) => {
|
|
911
|
+
const b = I == null ? void 0 : I(e, a, s);
|
|
912
|
+
b && (o = W(W({}, o || {}), b));
|
|
1116
913
|
};
|
|
1117
|
-
for (const
|
|
1118
|
-
return
|
|
1119
|
-
}
|
|
1120
|
-
function
|
|
1121
|
-
var
|
|
1122
|
-
let
|
|
1123
|
-
for (const
|
|
1124
|
-
return
|
|
1125
|
-
}
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1128
|
-
|
|
914
|
+
for (const I of C.value) w(I.cellStyle);
|
|
915
|
+
return w(n.cellStyle), o;
|
|
916
|
+
}
|
|
917
|
+
function f(e) {
|
|
918
|
+
var s, o;
|
|
919
|
+
let a = e;
|
|
920
|
+
for (const w of C.value) w.transformModel && (a = (s = w.transformModel(a)) != null ? s : a);
|
|
921
|
+
return n.transformModel && (a = (o = n.transformModel(a)) != null ? o : a), a;
|
|
922
|
+
}
|
|
923
|
+
const l = S(null);
|
|
924
|
+
_(() => n.editable, () => {
|
|
925
|
+
l.value = null;
|
|
1129
926
|
});
|
|
1130
|
-
const
|
|
1131
|
-
|
|
1132
|
-
|
|
927
|
+
const u = S(null);
|
|
928
|
+
_(() => n.cellImageFit, () => {
|
|
929
|
+
u.value = null;
|
|
1133
930
|
});
|
|
1134
|
-
const
|
|
931
|
+
const p = E(() => {
|
|
1135
932
|
var e;
|
|
1136
933
|
return {
|
|
1137
|
-
editable: (e =
|
|
1138
|
-
pivotTable:
|
|
1139
|
-
conditionalFormat:
|
|
1140
|
-
cellReadOnly:
|
|
1141
|
-
readOnlyRanges:
|
|
1142
|
-
editableTargets:
|
|
1143
|
-
strictDimensions:
|
|
1144
|
-
recalc:
|
|
1145
|
-
formulaEngine:
|
|
1146
|
-
pasteBehavior:
|
|
1147
|
-
readOnlyPrompt:
|
|
934
|
+
editable: (e = l.value) != null ? e : n.editable,
|
|
935
|
+
pivotTable: n.pivotTable,
|
|
936
|
+
conditionalFormat: n.conditionalFormat,
|
|
937
|
+
cellReadOnly: n.cellReadOnly,
|
|
938
|
+
readOnlyRanges: n.readOnlyRanges,
|
|
939
|
+
editableTargets: n.editableTargets,
|
|
940
|
+
strictDimensions: n.strictDimensions,
|
|
941
|
+
recalc: n.recalc,
|
|
942
|
+
formulaEngine: n.formulaEngine,
|
|
943
|
+
pasteBehavior: n.pasteBehavior,
|
|
944
|
+
readOnlyPrompt: n.readOnlyPrompt
|
|
1148
945
|
};
|
|
1149
946
|
});
|
|
1150
|
-
function
|
|
1151
|
-
var
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1154
|
-
for (const
|
|
1155
|
-
const
|
|
1156
|
-
if (
|
|
947
|
+
function D(e, a) {
|
|
948
|
+
var o, w;
|
|
949
|
+
const s = (o = n.editor) == null ? void 0 : o.call(n, e, a);
|
|
950
|
+
if (s) return s;
|
|
951
|
+
for (const I of C.value) {
|
|
952
|
+
const b = (w = I.editor) == null ? void 0 : w.call(I, e, a);
|
|
953
|
+
if (b) return b;
|
|
1157
954
|
}
|
|
1158
955
|
}
|
|
1159
|
-
const
|
|
1160
|
-
var e,
|
|
1161
|
-
return (
|
|
1162
|
-
}),
|
|
1163
|
-
let
|
|
1164
|
-
|
|
1165
|
-
var
|
|
1166
|
-
e && (
|
|
956
|
+
const B = E(() => !!n.editor || C.value.some((e) => e.editor)), H = g, { loading: z, error: K, workbook: T, load: ie, loadModel: r, progress: A, sourceBuffer: F } = Fs(), ve = E(() => {
|
|
957
|
+
var e, a;
|
|
958
|
+
return (a = (e = F.value) == null ? void 0 : e.byteLength) != null ? a : null;
|
|
959
|
+
}), Oe = E(() => T.value ? es(T.value) : null), xe = S(null);
|
|
960
|
+
let U = pt();
|
|
961
|
+
_(z, (e) => {
|
|
962
|
+
var a;
|
|
963
|
+
e && (U = (a = pt()) != null ? a : U);
|
|
1167
964
|
});
|
|
1168
|
-
function
|
|
1169
|
-
return e ?
|
|
1170
|
-
}
|
|
1171
|
-
const
|
|
1172
|
-
var e,
|
|
1173
|
-
return (
|
|
1174
|
-
}),
|
|
1175
|
-
var e,
|
|
1176
|
-
return (
|
|
965
|
+
function ta(e) {
|
|
966
|
+
return e ? us(e) ? e : ds(e, n.jsonOptions) : null;
|
|
967
|
+
}
|
|
968
|
+
const Xe = S(null), St = S(null), xt = E(() => {
|
|
969
|
+
var e, a;
|
|
970
|
+
return (a = (e = Xe.value) != null ? e : n.templateFile) != null ? a : null;
|
|
971
|
+
}), ht = E(() => {
|
|
972
|
+
var e, a;
|
|
973
|
+
return (a = (e = St.value) != null ? e : n.templateName) != null ? a : "";
|
|
1177
974
|
});
|
|
1178
|
-
function
|
|
1179
|
-
|
|
975
|
+
function Ft(e, a) {
|
|
976
|
+
Xe.value = e, St.value = a;
|
|
1180
977
|
}
|
|
1181
|
-
function
|
|
1182
|
-
|
|
978
|
+
function wt() {
|
|
979
|
+
Ft(null, null);
|
|
1183
980
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
981
|
+
const It = S(null);
|
|
982
|
+
function aa() {
|
|
1186
983
|
var e;
|
|
1187
|
-
(e =
|
|
984
|
+
(e = It.value) == null || e.click();
|
|
1188
985
|
}
|
|
1189
|
-
function
|
|
1190
|
-
var
|
|
1191
|
-
const
|
|
1192
|
-
|
|
986
|
+
function sa(e) {
|
|
987
|
+
var s;
|
|
988
|
+
const a = (s = e.target.files) == null ? void 0 : s[0];
|
|
989
|
+
a && (Ft(a, a.name), e.target.value = "");
|
|
1193
990
|
}
|
|
1194
|
-
const
|
|
1195
|
-
var e,
|
|
1196
|
-
return
|
|
991
|
+
const ia = E(() => {
|
|
992
|
+
var e, a;
|
|
993
|
+
return n.fileName ? n.fileName : n.workbook ? "JSON 数据" : ((a = (e = T.value) == null ? void 0 : e.sheets[0]) == null ? void 0 : a.name) || "";
|
|
1197
994
|
});
|
|
1198
|
-
async function
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1201
|
-
if (
|
|
1202
|
-
if (
|
|
1203
|
-
const
|
|
1204
|
-
return
|
|
1205
|
-
}
|
|
1206
|
-
async function
|
|
1207
|
-
const e =
|
|
1208
|
-
if (
|
|
1209
|
-
e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(
|
|
995
|
+
async function na(e) {
|
|
996
|
+
const a = await Yt(e), s = qt(a);
|
|
997
|
+
if (s === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
|
|
998
|
+
if (s === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
|
|
999
|
+
if (s === "empty") throw new Error("模板文件为空");
|
|
1000
|
+
const o = await ea(a);
|
|
1001
|
+
return Qt(o), o;
|
|
1002
|
+
}
|
|
1003
|
+
async function Tt() {
|
|
1004
|
+
const e = xt.value, a = ta(n.workbook);
|
|
1005
|
+
if (n.src) {
|
|
1006
|
+
e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await ie(n.src, f);
|
|
1210
1007
|
return;
|
|
1211
1008
|
}
|
|
1212
|
-
if (
|
|
1009
|
+
if (a && e) {
|
|
1213
1010
|
try {
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1216
|
-
} catch (
|
|
1217
|
-
console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:",
|
|
1011
|
+
const s = await na(e), o = ps(a, s);
|
|
1012
|
+
r(o, f);
|
|
1013
|
+
} catch (s) {
|
|
1014
|
+
console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", s), r(a, f);
|
|
1218
1015
|
}
|
|
1219
1016
|
return;
|
|
1220
1017
|
}
|
|
1221
|
-
if (
|
|
1222
|
-
|
|
1018
|
+
if (a) {
|
|
1019
|
+
r(a, f);
|
|
1223
1020
|
return;
|
|
1224
1021
|
}
|
|
1225
|
-
e && await ie(e,
|
|
1022
|
+
e && await ie(e, f);
|
|
1226
1023
|
}
|
|
1227
|
-
const
|
|
1228
|
-
const e =
|
|
1024
|
+
const Et = E(() => {
|
|
1025
|
+
const e = A.value;
|
|
1229
1026
|
return e ? e.stage === "read" ? "读取文件…" : e.stage === "parse" ? "解析中…" : "构建表格…" : "";
|
|
1230
|
-
}),
|
|
1231
|
-
const e = L.value;
|
|
1232
|
-
return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
|
|
1233
|
-
}), Q = y(0), At = y(0), q = y(1), rs = y(null), Ee = y(null), tt = y(null), ce = y(null), st = y(null), at = y(null), nt = y(null), lt = y(null), Ie = ht(null), ms = y({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = R(() => {
|
|
1234
|
-
var s, a;
|
|
1027
|
+
}), he = E(() => {
|
|
1235
1028
|
const e = A.value;
|
|
1236
|
-
return e &&
|
|
1237
|
-
}),
|
|
1029
|
+
return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
|
|
1030
|
+
}), Z = S(0), $t = S(0), j = S(1), la = S(null), Fe = S(null), Ze = S(null), re = S(null), Ye = S(null), qe = S(null), Qe = S(null), et = S(null), we = bt(null), oa = S({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = E(() => {
|
|
1031
|
+
var a, s;
|
|
1032
|
+
const e = T.value;
|
|
1033
|
+
return e && (s = (a = e.sheets[Z.value]) != null ? a : e.sheets[0]) != null ? s : null;
|
|
1034
|
+
}), me = S(0), Pt = S(!1), tt = S(null), at = S(null);
|
|
1238
1035
|
let t = null;
|
|
1239
|
-
function
|
|
1036
|
+
function He() {
|
|
1240
1037
|
t == null || t.render();
|
|
1241
1038
|
}
|
|
1242
|
-
function
|
|
1039
|
+
function ua() {
|
|
1243
1040
|
t == null || t.measure();
|
|
1244
1041
|
}
|
|
1245
|
-
function
|
|
1246
|
-
const e = ge.value,
|
|
1247
|
-
!e || !
|
|
1248
|
-
theme:
|
|
1249
|
-
cellStyle:
|
|
1250
|
-
cellImageFit:
|
|
1251
|
-
readOnlyCellStyle:
|
|
1042
|
+
function st() {
|
|
1043
|
+
const e = ge.value, a = T.value;
|
|
1044
|
+
!e || !a || !t || (t.rebuild(e, a, j.value, {
|
|
1045
|
+
theme: M.value,
|
|
1046
|
+
cellStyle: c.value ? y : void 0,
|
|
1047
|
+
cellImageFit: n.cellImageFit,
|
|
1048
|
+
readOnlyCellStyle: n.readOnlyCellStyle
|
|
1252
1049
|
// Phase C 2026-06-08
|
|
1253
|
-
}), t.setSourceBuffer(
|
|
1050
|
+
}), t.setSourceBuffer(F.value));
|
|
1254
1051
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const e =
|
|
1257
|
-
e && (
|
|
1052
|
+
function da() {
|
|
1053
|
+
const e = re.value;
|
|
1054
|
+
e && (fe.value = null, t == null || t.setScroll(e.scrollLeft, e.scrollTop));
|
|
1258
1055
|
}
|
|
1259
|
-
let
|
|
1260
|
-
|
|
1261
|
-
|
|
1056
|
+
let Ie = null;
|
|
1057
|
+
yt(() => {
|
|
1058
|
+
Ut(), Ze.value && Fe.value && re.value && tt.value && at.value && Ye.value && qe.value && Qe.value && et.value && (t = new ts(
|
|
1262
1059
|
{
|
|
1263
|
-
canvas:
|
|
1264
|
-
renderArea:
|
|
1265
|
-
scroller:
|
|
1266
|
-
spacer:
|
|
1267
|
-
overlays: { main:
|
|
1268
|
-
editorSlot:
|
|
1060
|
+
canvas: Ze.value,
|
|
1061
|
+
renderArea: Fe.value,
|
|
1062
|
+
scroller: re.value,
|
|
1063
|
+
spacer: tt.value,
|
|
1064
|
+
overlays: { main: Ye.value, frow: qe.value, fcol: Qe.value, corner: et.value },
|
|
1065
|
+
editorSlot: at.value
|
|
1269
1066
|
},
|
|
1270
1067
|
{
|
|
1271
|
-
onRenderer: (e) =>
|
|
1272
|
-
onRenderTick: () =>
|
|
1273
|
-
onSelectionChange: () =>
|
|
1274
|
-
onCellClick: (e,
|
|
1275
|
-
onCellDblClick: (e,
|
|
1276
|
-
onHyperlink: (e,
|
|
1277
|
-
|
|
1068
|
+
onRenderer: (e) => we.value = e,
|
|
1069
|
+
onRenderTick: () => me.value++,
|
|
1070
|
+
onSelectionChange: () => te.value++,
|
|
1071
|
+
onCellClick: (e, a, s) => be("cell-click", { row: e, col: a, text: s }),
|
|
1072
|
+
onCellDblClick: (e, a, s) => be("cell-dblclick", { row: e, col: a, text: s }),
|
|
1073
|
+
onHyperlink: (e, a) => {
|
|
1074
|
+
be("hyperlink-click", { url: e, cell: a }), n.openLinks && window.open(e, "_blank", "noopener");
|
|
1278
1075
|
},
|
|
1279
|
-
onTooltip: (e) =>
|
|
1280
|
-
onFindChange: () =>
|
|
1281
|
-
onFilterChange: () =>
|
|
1076
|
+
onTooltip: (e) => fe.value = e,
|
|
1077
|
+
onFindChange: () => dt.value++,
|
|
1078
|
+
onFilterChange: () => Lt.value++,
|
|
1282
1079
|
onActiveSheetChange: (e) => {
|
|
1283
|
-
|
|
1080
|
+
Z.value = e, $t.value++;
|
|
1284
1081
|
},
|
|
1285
1082
|
// core 新增表(透视新建工作表)→ 顶版本号让 SheetTabs 重读(workbook 是 shallowRef,push 不自动通知)
|
|
1286
|
-
|
|
1083
|
+
onZoomChange: (e) => {
|
|
1084
|
+
j.value = e;
|
|
1085
|
+
},
|
|
1086
|
+
// 触屏 pinch/双击改缩放 → 同步工具栏 %(watch 会去重不再回 setZoom)
|
|
1087
|
+
onEditEvent: (e, a) => be(e, a),
|
|
1287
1088
|
onContextMenuBefore: (e) => {
|
|
1288
|
-
for (const
|
|
1289
|
-
if (
|
|
1290
|
-
const
|
|
1291
|
-
Array.isArray(
|
|
1089
|
+
for (const a of C.value)
|
|
1090
|
+
if (a.contextMenu) {
|
|
1091
|
+
const s = a.contextMenu(e.ctx, e.items);
|
|
1092
|
+
Array.isArray(s) && e.items.splice(0, e.items.length, ...s);
|
|
1292
1093
|
}
|
|
1293
|
-
|
|
1094
|
+
n.contextMenu === !1 && e.preventDefault(), H("before-context-menu", e);
|
|
1294
1095
|
},
|
|
1295
|
-
onContextMenuShow: (e) =>
|
|
1096
|
+
onContextMenuShow: (e) => H("context-menu", e)
|
|
1296
1097
|
}
|
|
1297
|
-
),
|
|
1298
|
-
|
|
1299
|
-
}),
|
|
1300
|
-
}),
|
|
1301
|
-
|
|
1302
|
-
}),
|
|
1303
|
-
|
|
1304
|
-
}),
|
|
1098
|
+
), oa.value = t.view, t.fileName = n.fileName, t.setEditConfig(p.value), t.setEditorResolver(B.value ? D : void 0), t.setLightboxEnabled(n.imageLightbox !== !1), t.setContextMenuTransform(typeof n.contextMenu == "function" ? n.contextMenu : null)), ft.value && (ce = new as(ft.value)), Tt(), Ie = new ResizeObserver(() => {
|
|
1099
|
+
ua(), He();
|
|
1100
|
+
}), Fe.value && Ie.observe(Fe.value);
|
|
1101
|
+
}), Le(() => {
|
|
1102
|
+
Ie == null || Ie.disconnect(), t == null || t.dispose(), Wt.dispose(), ce == null || ce.dispose(), Je.forEach((e) => e()), T.value && kt(T.value);
|
|
1103
|
+
}), _([() => n.src, () => n.workbook, () => n.templateFile, Xe], () => {
|
|
1104
|
+
Tt();
|
|
1105
|
+
}), _(() => n.fileName, (e) => {
|
|
1305
1106
|
t && (t.fileName = e);
|
|
1306
|
-
}),
|
|
1107
|
+
}), _(p, (e) => t == null ? void 0 : t.setEditConfig(e)), _(() => n.contextMenu, (e) => t == null ? void 0 : t.setContextMenuTransform(typeof e == "function" ? e : null)), _([() => n.editor, C], () => t == null ? void 0 : t.setEditorResolver(B.value ? D : void 0)), _(() => n.cellImageFit, (e) => {
|
|
1307
1108
|
e && (t == null || t.setCellImageFit(e));
|
|
1308
|
-
}),
|
|
1309
|
-
() => [
|
|
1109
|
+
}), _(() => n.imageLightbox, (e) => t == null ? void 0 : t.setLightboxEnabled(e !== !1)), _(
|
|
1110
|
+
() => [M.value, n.cellStyle, n.plugins],
|
|
1310
1111
|
() => {
|
|
1311
|
-
|
|
1112
|
+
we.value && st();
|
|
1312
1113
|
},
|
|
1313
1114
|
{ deep: !0 }
|
|
1314
|
-
),
|
|
1115
|
+
), _(() => n.plugins, () => Ut(), { deep: !1 }), _(T, async (e) => {
|
|
1315
1116
|
if (!e) return;
|
|
1316
|
-
t == null || t.clearFilterState(),
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1319
|
-
}),
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1322
|
-
}),
|
|
1323
|
-
e &&
|
|
1324
|
-
}),
|
|
1325
|
-
e &&
|
|
1326
|
-
}),
|
|
1327
|
-
var
|
|
1328
|
-
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1117
|
+
t == null || t.clearFilterState(), Z.value = e.activeSheet, await Ce(), st();
|
|
1118
|
+
const a = pt();
|
|
1119
|
+
xe.value = a != null && U != null ? Math.max(0, a - U) : null, H("rendered", e);
|
|
1120
|
+
}), _(Z, (e) => {
|
|
1121
|
+
const a = T.value;
|
|
1122
|
+
a != null && a.sheets[e] && be("sheet-change", { index: e, name: a.sheets[e].name });
|
|
1123
|
+
}), _(K, (e) => {
|
|
1124
|
+
e && H("error", e);
|
|
1125
|
+
}), _(A, (e) => {
|
|
1126
|
+
e && H("progress", e);
|
|
1127
|
+
}), _(Z, async (e, a) => {
|
|
1128
|
+
var s;
|
|
1129
|
+
a != null && (t == null || t.resetFilter((s = T.value) == null ? void 0 : s.sheets[a])), await Ce(), st();
|
|
1130
|
+
}), _(j, (e) => {
|
|
1131
|
+
t && Math.abs(t.getZoom() - e) < 1e-6 || t == null || t.setZoom(e);
|
|
1132
|
+
});
|
|
1133
|
+
const te = S(0), fe = S(null), J = E(() => {
|
|
1331
1134
|
var e;
|
|
1332
|
-
return
|
|
1333
|
-
}),
|
|
1334
|
-
|
|
1135
|
+
return te.value, we.value, (e = t == null ? void 0 : t.getSelection()) != null ? e : null;
|
|
1136
|
+
}), it = E(() => {
|
|
1137
|
+
te.value;
|
|
1335
1138
|
const e = t == null ? void 0 : t.getActiveCell();
|
|
1336
|
-
return e ?
|
|
1337
|
-
}),
|
|
1139
|
+
return e ? ye(e.col) + (e.row + 1) : "";
|
|
1140
|
+
}), Rt = E(() => {
|
|
1338
1141
|
const e = J.value;
|
|
1339
|
-
return !e || e.top === e.bottom && e.left === e.right ? "" : `${
|
|
1340
|
-
}),
|
|
1341
|
-
var
|
|
1342
|
-
|
|
1343
|
-
const e =
|
|
1344
|
-
return !e || !
|
|
1345
|
-
}),
|
|
1142
|
+
return !e || e.top === e.bottom && e.left === e.right ? "" : `${ye(e.left)}${e.top + 1}:${ye(e.right)}${e.bottom + 1}`;
|
|
1143
|
+
}), Mt = E(() => {
|
|
1144
|
+
var s;
|
|
1145
|
+
te.value;
|
|
1146
|
+
const e = we.value, a = t == null ? void 0 : t.getActiveCell();
|
|
1147
|
+
return !e || !a ? "" : (s = e.cellFormula(a.row, a.col)) != null ? s : e.cellText(a.row, a.col);
|
|
1148
|
+
}), va = E(() => {
|
|
1346
1149
|
var e;
|
|
1347
|
-
return
|
|
1348
|
-
}),
|
|
1349
|
-
function
|
|
1350
|
-
const e =
|
|
1150
|
+
return te.value, (e = t == null ? void 0 : t.isFormulaBarVisible()) != null ? e : !0;
|
|
1151
|
+
}), ae = S(""), Te = S(!1), Dt = S(null);
|
|
1152
|
+
function nt() {
|
|
1153
|
+
const e = Dt.value;
|
|
1351
1154
|
e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
|
|
1352
1155
|
}
|
|
1353
|
-
function
|
|
1354
|
-
|
|
1156
|
+
function ma(e) {
|
|
1157
|
+
ae.value = e.target.value, nt();
|
|
1355
1158
|
}
|
|
1356
|
-
const
|
|
1159
|
+
const fa = E(() => (te.value, me.value, !!(t != null && t.canEditActiveCell()))), Ne = E(() => {
|
|
1357
1160
|
var e;
|
|
1358
|
-
return
|
|
1161
|
+
return te.value, me.value, (e = t == null ? void 0 : t.getCellEditString()) != null ? e : "";
|
|
1359
1162
|
});
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
}, { immediate: !0 }),
|
|
1363
|
-
function
|
|
1364
|
-
|
|
1163
|
+
_(Ne, (e) => {
|
|
1164
|
+
Te.value || (ae.value = e);
|
|
1165
|
+
}, { immediate: !0 }), _(ae, () => Ce(nt));
|
|
1166
|
+
function ca() {
|
|
1167
|
+
Te.value = !0, ae.value = Ne.value, Ce(nt);
|
|
1365
1168
|
}
|
|
1366
|
-
function
|
|
1367
|
-
var
|
|
1368
|
-
t == null || t.commitActiveCellValue(
|
|
1169
|
+
function At(e) {
|
|
1170
|
+
var a;
|
|
1171
|
+
t == null || t.commitActiveCellValue(ae.value, e), Te.value = !1, ae.value = Ne.value, e === "down" && ((a = re.value) == null || a.focus());
|
|
1369
1172
|
}
|
|
1370
|
-
function
|
|
1173
|
+
function ra() {
|
|
1371
1174
|
var e;
|
|
1372
|
-
|
|
1175
|
+
Te.value = !1, ae.value = Ne.value, (e = re.value) == null || e.focus();
|
|
1373
1176
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1177
|
+
function ga() {
|
|
1178
|
+
Te.value && At();
|
|
1376
1179
|
}
|
|
1377
|
-
function
|
|
1378
|
-
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(),
|
|
1180
|
+
function pa(e) {
|
|
1181
|
+
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), At("down")) : e.key === "Escape" && (e.preventDefault(), ra());
|
|
1379
1182
|
}
|
|
1380
|
-
const
|
|
1183
|
+
const G = E(() => {
|
|
1381
1184
|
var e;
|
|
1382
|
-
return
|
|
1185
|
+
return te.value, (e = t == null ? void 0 : t.getSelectionStats()) != null ? e : null;
|
|
1383
1186
|
});
|
|
1384
|
-
function
|
|
1187
|
+
function Ve(e) {
|
|
1385
1188
|
return isFinite(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
|
|
1386
1189
|
}
|
|
1387
|
-
function
|
|
1190
|
+
function ba(e) {
|
|
1388
1191
|
t == null || t.onMouseDown(e);
|
|
1389
1192
|
}
|
|
1390
|
-
function
|
|
1193
|
+
function ka(e) {
|
|
1391
1194
|
t == null || t.onContextMenu(e);
|
|
1392
1195
|
}
|
|
1393
|
-
function
|
|
1196
|
+
function Ca(e) {
|
|
1394
1197
|
t == null || t.onMouseMove(e);
|
|
1395
1198
|
}
|
|
1396
|
-
function
|
|
1199
|
+
function ya(e) {
|
|
1397
1200
|
t == null || t.onMouseUp(e);
|
|
1398
1201
|
}
|
|
1399
|
-
function
|
|
1202
|
+
function Sa() {
|
|
1400
1203
|
t == null || t.onMouseLeave();
|
|
1401
1204
|
}
|
|
1402
|
-
function
|
|
1205
|
+
function xa(e) {
|
|
1403
1206
|
t == null || t.onDblClick(e);
|
|
1404
1207
|
}
|
|
1405
|
-
function
|
|
1208
|
+
function ha(e) {
|
|
1406
1209
|
t == null || t.onKeyDown(e);
|
|
1407
1210
|
}
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
e &&
|
|
1211
|
+
_(J, (e) => {
|
|
1212
|
+
const a = t == null ? void 0 : t.getActiveCell();
|
|
1213
|
+
e && a && be("selection-change", { range: e, active: a });
|
|
1411
1214
|
});
|
|
1412
|
-
function
|
|
1413
|
-
var a;
|
|
1414
|
-
return (a = t == null ? void 0 : t.rectOf(e, s)) != null ? a : null;
|
|
1415
|
-
}
|
|
1416
|
-
function rt(e) {
|
|
1215
|
+
function lt(e, a) {
|
|
1417
1216
|
var s;
|
|
1418
|
-
return (s = t == null ? void 0 : t.
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1217
|
+
return (s = t == null ? void 0 : t.rectOf(e, a)) != null ? s : null;
|
|
1218
|
+
}
|
|
1219
|
+
function ot(e) {
|
|
1220
|
+
var a;
|
|
1221
|
+
return (a = t == null ? void 0 : t.rectOfRange(e)) != null ? a : null;
|
|
1222
|
+
}
|
|
1223
|
+
const Ee = S(null), We = S(!1);
|
|
1224
|
+
let $e = null;
|
|
1225
|
+
function Bt() {
|
|
1226
|
+
$e == null || $e.abort();
|
|
1227
|
+
}
|
|
1228
|
+
function Y(e, a) {
|
|
1229
|
+
if (n.exportProgress === !1) return a(e);
|
|
1230
|
+
const s = new AbortController();
|
|
1231
|
+
$e = s, e != null && e.signal && (e.signal.aborted ? s.abort() : e.signal.addEventListener("abort", () => s.abort(), { once: !0 })), We.value = !0, Ee.value = null;
|
|
1232
|
+
const o = (I) => {
|
|
1233
|
+
var b;
|
|
1234
|
+
Ee.value = I, (b = e == null ? void 0 : e.onProgress) == null || b.call(e, I);
|
|
1235
|
+
}, w = ke(W({}, e != null ? e : {}), { onProgress: o, signal: s.signal });
|
|
1236
|
+
return a(w).finally(() => {
|
|
1237
|
+
We.value = !1, Ee.value = null, $e = null;
|
|
1435
1238
|
});
|
|
1436
1239
|
}
|
|
1437
|
-
const
|
|
1438
|
-
async function
|
|
1240
|
+
const Fa = (e) => Y(e, (a) => t.exportImage(a)), Pe = (e) => Y(e, (a) => t.downloadImage(a)), wa = (e) => Y(e, (a) => t.exportPdf(a)), Re = (e) => Y(e, (a) => t.downloadPdf(a)), Me = (e) => Y(e, (a) => t.print(a)), Ia = (e) => Y(e, (a) => t.downloadXlsx(a)), Ta = () => t == null ? void 0 : t.downloadCsv(), Ea = () => t == null ? void 0 : t.downloadJson(), $a = (e) => t ? t.openPrintPreview(e) : Promise.resolve(!1);
|
|
1241
|
+
async function _t() {
|
|
1439
1242
|
try {
|
|
1440
|
-
await
|
|
1243
|
+
await Re();
|
|
1441
1244
|
} catch (e) {
|
|
1442
|
-
|
|
1245
|
+
ut(e);
|
|
1443
1246
|
}
|
|
1444
1247
|
}
|
|
1445
|
-
async function
|
|
1248
|
+
async function zt() {
|
|
1446
1249
|
try {
|
|
1447
|
-
await
|
|
1250
|
+
await Re({ vector: !0 });
|
|
1448
1251
|
} catch (e) {
|
|
1449
|
-
|
|
1252
|
+
ut(e);
|
|
1450
1253
|
}
|
|
1451
1254
|
}
|
|
1452
|
-
function
|
|
1453
|
-
const
|
|
1454
|
-
console.error("[ooxml-excel-editor] 导出失败:", e),
|
|
1255
|
+
function ut(e) {
|
|
1256
|
+
const a = (e == null ? void 0 : e.message) || String(e);
|
|
1257
|
+
console.error("[ooxml-excel-editor] 导出失败:", e), H("error", a), typeof window != "undefined" && window.alert && window.alert(a);
|
|
1455
1258
|
}
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
});
|
|
1460
|
-
function Wt() {
|
|
1461
|
-
ze.value = !0;
|
|
1259
|
+
const dt = S(0), Pa = E(() => (dt.value, !!(t != null && t.isFindDialogOpen())));
|
|
1260
|
+
function Ra() {
|
|
1261
|
+
t == null || t.openFindReplaceDialog("find");
|
|
1462
1262
|
}
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1465
|
-
ze.value = !1, t == null || t.clearFind(), (e = ce.value) == null || e.focus();
|
|
1263
|
+
function Ma() {
|
|
1264
|
+
t != null && t.isFindDialogOpen() ? t.closeFindReplaceDialog() : t == null || t.openFindReplaceDialog("find");
|
|
1466
1265
|
}
|
|
1467
|
-
function
|
|
1468
|
-
(e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(),
|
|
1266
|
+
function Da(e) {
|
|
1267
|
+
(e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), Ra());
|
|
1469
1268
|
}
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1472
|
-
return pt.value, (e = t == null ? void 0 : t.getFilterPopup()) != null ? e : null;
|
|
1473
|
-
});
|
|
1474
|
-
function Ls() {
|
|
1269
|
+
const Lt = S(0);
|
|
1270
|
+
function Aa() {
|
|
1475
1271
|
t == null || t.toggleAutoFilter();
|
|
1476
1272
|
}
|
|
1477
|
-
function
|
|
1478
|
-
const e = ge.value,
|
|
1479
|
-
if (!e || !
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1273
|
+
function Ba() {
|
|
1274
|
+
const e = ge.value, a = we.value;
|
|
1275
|
+
if (!e || !a) return;
|
|
1276
|
+
const s = e.freeze;
|
|
1277
|
+
if (s.frozenRows || s.frozenCols)
|
|
1482
1278
|
e.freeze = { frozenRows: 0, frozenCols: 0 };
|
|
1483
1279
|
else {
|
|
1484
|
-
const
|
|
1485
|
-
e.freeze = { frozenRows:
|
|
1280
|
+
const o = t == null ? void 0 : t.getActiveCell();
|
|
1281
|
+
e.freeze = { frozenRows: o ? o.row : 1, frozenCols: o ? o.col : 0 };
|
|
1486
1282
|
}
|
|
1487
|
-
|
|
1488
|
-
}
|
|
1489
|
-
const
|
|
1490
|
-
async function
|
|
1491
|
-
var
|
|
1492
|
-
|
|
1493
|
-
const
|
|
1494
|
-
target:
|
|
1495
|
-
range:
|
|
1283
|
+
a.rebuildMetrics(), t == null || t.refreshContentSize(), He();
|
|
1284
|
+
}
|
|
1285
|
+
const De = S(!1);
|
|
1286
|
+
async function _a(e) {
|
|
1287
|
+
var I;
|
|
1288
|
+
De.value = !1;
|
|
1289
|
+
const a = e.scope === "all" ? "all" : "active", s = e.scope === "selection" && (I = J.value) != null ? I : void 0, o = {
|
|
1290
|
+
target: a,
|
|
1291
|
+
range: s,
|
|
1496
1292
|
scale: e.scale,
|
|
1497
1293
|
includeHeaders: e.includeHeaders,
|
|
1498
1294
|
gridlines: e.gridlines
|
|
1499
|
-
},
|
|
1295
|
+
}, w = ke(W(W({}, e.format !== "auto" ? { format: e.format } : {}), e.orientation !== "auto" ? { orientation: e.orientation } : {}), {
|
|
1500
1296
|
fitToWidth: e.fitToWidth
|
|
1501
1297
|
});
|
|
1502
1298
|
try {
|
|
1503
|
-
e.action === "png" ? await
|
|
1504
|
-
} catch (
|
|
1505
|
-
|
|
1299
|
+
e.action === "png" ? await Pe(o) : e.action === "pdf" ? await Re(ke(W(W({}, o), w), { vector: e.pdfVector })) : await Me(W(W({}, o), w));
|
|
1300
|
+
} catch (b) {
|
|
1301
|
+
ut(b);
|
|
1506
1302
|
}
|
|
1507
1303
|
}
|
|
1508
|
-
function
|
|
1304
|
+
function za(e) {
|
|
1509
1305
|
t == null || t.setSelectionRange(e);
|
|
1510
1306
|
}
|
|
1511
|
-
const
|
|
1512
|
-
load: (e) => ie(e,
|
|
1513
|
-
getWorkbook: () =>
|
|
1514
|
-
getActiveSheet: () =>
|
|
1307
|
+
const Ae = {
|
|
1308
|
+
load: (e) => ie(e, f),
|
|
1309
|
+
getWorkbook: () => T.value,
|
|
1310
|
+
getActiveSheet: () => Z.value,
|
|
1515
1311
|
setActiveSheet: (e) => {
|
|
1516
|
-
var
|
|
1517
|
-
(
|
|
1312
|
+
var a;
|
|
1313
|
+
(a = T.value) != null && a.sheets[e] && (Z.value = e);
|
|
1518
1314
|
},
|
|
1519
1315
|
getSelection: () => J.value,
|
|
1520
1316
|
getSelectionRanges: () => {
|
|
@@ -1525,31 +1321,31 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1525
1321
|
var e;
|
|
1526
1322
|
return (e = t == null ? void 0 : t.hasMultiSelection()) != null ? e : !1;
|
|
1527
1323
|
},
|
|
1528
|
-
setSelection:
|
|
1529
|
-
scrollToCell: (e,
|
|
1530
|
-
var
|
|
1531
|
-
return (
|
|
1324
|
+
setSelection: za,
|
|
1325
|
+
scrollToCell: (e, a, s) => {
|
|
1326
|
+
var o;
|
|
1327
|
+
return (o = t == null ? void 0 : t.scrollToCell(e, a, s)) != null ? o : !1;
|
|
1532
1328
|
},
|
|
1533
|
-
rectOf:
|
|
1534
|
-
rectOfRange:
|
|
1535
|
-
redraw: () =>
|
|
1536
|
-
isCellEditable: (e,
|
|
1537
|
-
var
|
|
1538
|
-
return (
|
|
1329
|
+
rectOf: lt,
|
|
1330
|
+
rectOfRange: ot,
|
|
1331
|
+
redraw: () => He(),
|
|
1332
|
+
isCellEditable: (e, a) => {
|
|
1333
|
+
var s;
|
|
1334
|
+
return (s = t == null ? void 0 : t.isCellEditable(e, a)) != null ? s : !1;
|
|
1539
1335
|
},
|
|
1540
1336
|
setEditableTargets: (e) => t == null ? void 0 : t.setEditableTargets(e),
|
|
1541
1337
|
getEditableTargets: () => t == null ? void 0 : t.getEditableTargets(),
|
|
1542
1338
|
sortActiveColumn: (e) => {
|
|
1543
|
-
var
|
|
1544
|
-
return (
|
|
1339
|
+
var a;
|
|
1340
|
+
return (a = t == null ? void 0 : t.sortActiveColumn(e)) != null ? a : !1;
|
|
1545
1341
|
},
|
|
1546
1342
|
createPivotTable: (e) => {
|
|
1547
|
-
var
|
|
1548
|
-
return (
|
|
1343
|
+
var a;
|
|
1344
|
+
return (a = t == null ? void 0 : t.createPivotTable(e)) != null ? a : !1;
|
|
1549
1345
|
},
|
|
1550
1346
|
createPivotTableFromSelection: (e) => {
|
|
1551
|
-
var
|
|
1552
|
-
return (
|
|
1347
|
+
var a;
|
|
1348
|
+
return (a = t == null ? void 0 : t.createPivotTableFromSelection(e)) != null ? a : !1;
|
|
1553
1349
|
},
|
|
1554
1350
|
openPivotTableDialog: () => {
|
|
1555
1351
|
var e;
|
|
@@ -1560,28 +1356,28 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1560
1356
|
return (e = t == null ? void 0 : t.getConditionalRules()) != null ? e : [];
|
|
1561
1357
|
},
|
|
1562
1358
|
addConditionalRule: (e) => {
|
|
1563
|
-
var s;
|
|
1564
|
-
return (s = t == null ? void 0 : t.addConditionalRule(e)) != null ? s : !1;
|
|
1565
|
-
},
|
|
1566
|
-
updateConditionalRule: (e, s) => {
|
|
1567
1359
|
var a;
|
|
1568
|
-
return (a = t == null ? void 0 : t.
|
|
1360
|
+
return (a = t == null ? void 0 : t.addConditionalRule(e)) != null ? a : !1;
|
|
1569
1361
|
},
|
|
1570
|
-
|
|
1362
|
+
updateConditionalRule: (e, a) => {
|
|
1571
1363
|
var s;
|
|
1572
|
-
return (s = t == null ? void 0 : t.
|
|
1364
|
+
return (s = t == null ? void 0 : t.updateConditionalRule(e, a)) != null ? s : !1;
|
|
1365
|
+
},
|
|
1366
|
+
removeConditionalRule: (e) => {
|
|
1367
|
+
var a;
|
|
1368
|
+
return (a = t == null ? void 0 : t.removeConditionalRule(e)) != null ? a : !1;
|
|
1573
1369
|
},
|
|
1574
1370
|
setConditionalRules: (e) => {
|
|
1575
|
-
var
|
|
1576
|
-
return (
|
|
1371
|
+
var a;
|
|
1372
|
+
return (a = t == null ? void 0 : t.setConditionalRules(e)) != null ? a : !1;
|
|
1577
1373
|
},
|
|
1578
1374
|
openConditionalFormatDialog: () => {
|
|
1579
1375
|
var e;
|
|
1580
1376
|
return (e = t == null ? void 0 : t.openConditionalFormatDialog()) != null ? e : !1;
|
|
1581
1377
|
},
|
|
1582
1378
|
setSelectionNumberFormat: (e) => {
|
|
1583
|
-
var
|
|
1584
|
-
return (
|
|
1379
|
+
var a;
|
|
1380
|
+
return (a = t == null ? void 0 : t.setSelectionNumberFormat(e)) != null ? a : !1;
|
|
1585
1381
|
},
|
|
1586
1382
|
openNumberFormatDialog: () => {
|
|
1587
1383
|
var e;
|
|
@@ -1597,96 +1393,96 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1597
1393
|
return (e = t == null ? void 0 : t.getSelectionAlignState()) != null ? e : {};
|
|
1598
1394
|
},
|
|
1599
1395
|
toggleSelectionFont: (e) => {
|
|
1600
|
-
var
|
|
1601
|
-
return (
|
|
1396
|
+
var a;
|
|
1397
|
+
return (a = t == null ? void 0 : t.toggleSelectionFont(e)) != null ? a : !1;
|
|
1602
1398
|
},
|
|
1603
1399
|
setSelectionUnderline: (e) => {
|
|
1604
|
-
var
|
|
1605
|
-
return (
|
|
1400
|
+
var a;
|
|
1401
|
+
return (a = t == null ? void 0 : t.setSelectionUnderline(e)) != null ? a : !1;
|
|
1606
1402
|
},
|
|
1607
1403
|
setSelectionFontName: (e) => {
|
|
1608
|
-
var
|
|
1609
|
-
return (
|
|
1404
|
+
var a;
|
|
1405
|
+
return (a = t == null ? void 0 : t.setSelectionFontName(e)) != null ? a : !1;
|
|
1610
1406
|
},
|
|
1611
1407
|
setSelectionFontSize: (e) => {
|
|
1612
|
-
var
|
|
1613
|
-
return (
|
|
1408
|
+
var a;
|
|
1409
|
+
return (a = t == null ? void 0 : t.setSelectionFontSize(e)) != null ? a : !1;
|
|
1614
1410
|
},
|
|
1615
1411
|
adjustSelectionFontSize: (e) => {
|
|
1616
|
-
var
|
|
1617
|
-
return (
|
|
1412
|
+
var a;
|
|
1413
|
+
return (a = t == null ? void 0 : t.adjustSelectionFontSize(e)) != null ? a : !1;
|
|
1618
1414
|
},
|
|
1619
1415
|
setSelectionHAlign: (e) => {
|
|
1620
|
-
var
|
|
1621
|
-
return (
|
|
1416
|
+
var a;
|
|
1417
|
+
return (a = t == null ? void 0 : t.setSelectionHAlign(e)) != null ? a : !1;
|
|
1622
1418
|
},
|
|
1623
1419
|
setSelectionVAlign: (e) => {
|
|
1624
|
-
var s;
|
|
1625
|
-
return (s = t == null ? void 0 : t.setSelectionVAlign(e)) != null ? s : !1;
|
|
1626
|
-
},
|
|
1627
|
-
setSelectionBorders: (e, s) => {
|
|
1628
1420
|
var a;
|
|
1629
|
-
return (a = t == null ? void 0 : t.
|
|
1421
|
+
return (a = t == null ? void 0 : t.setSelectionVAlign(e)) != null ? a : !1;
|
|
1422
|
+
},
|
|
1423
|
+
setSelectionBorders: (e, a) => {
|
|
1424
|
+
var s;
|
|
1425
|
+
return (s = t == null ? void 0 : t.setSelectionBorders(e, a)) != null ? s : !1;
|
|
1630
1426
|
},
|
|
1631
1427
|
mergeCenterSelection: () => {
|
|
1632
1428
|
var e;
|
|
1633
1429
|
return (e = t == null ? void 0 : t.mergeCenterSelection()) != null ? e : !1;
|
|
1634
1430
|
},
|
|
1635
1431
|
clearSelectionCells: (e) => {
|
|
1636
|
-
var
|
|
1637
|
-
return (
|
|
1432
|
+
var a;
|
|
1433
|
+
return (a = t == null ? void 0 : t.clearSelectionCells(e)) != null ? a : !1;
|
|
1638
1434
|
},
|
|
1639
1435
|
freezePanes: (e) => {
|
|
1640
|
-
var
|
|
1641
|
-
return (
|
|
1436
|
+
var a;
|
|
1437
|
+
return (a = t == null ? void 0 : t.freezePanes(e)) != null ? a : !1;
|
|
1642
1438
|
},
|
|
1643
1439
|
getFreezeState: () => {
|
|
1644
1440
|
var e;
|
|
1645
1441
|
return (e = t == null ? void 0 : t.getFreezeState()) != null ? e : { frozenRows: 0, frozenCols: 0 };
|
|
1646
1442
|
},
|
|
1647
1443
|
sortByKeys: (e) => {
|
|
1648
|
-
var
|
|
1649
|
-
return (
|
|
1444
|
+
var a;
|
|
1445
|
+
return (a = t == null ? void 0 : t.sortByKeys(e)) != null ? a : !1;
|
|
1650
1446
|
},
|
|
1651
1447
|
openSortDialog: () => {
|
|
1652
1448
|
var e;
|
|
1653
1449
|
return (e = t == null ? void 0 : t.openSortDialog()) != null ? e : !1;
|
|
1654
1450
|
},
|
|
1655
1451
|
setSelectionRowsHidden: (e) => {
|
|
1656
|
-
var
|
|
1657
|
-
return (
|
|
1452
|
+
var a;
|
|
1453
|
+
return (a = t == null ? void 0 : t.setSelectionRowsHidden(e)) != null ? a : !1;
|
|
1658
1454
|
},
|
|
1659
1455
|
setSelectionColsHidden: (e) => {
|
|
1660
|
-
var
|
|
1661
|
-
return (
|
|
1456
|
+
var a;
|
|
1457
|
+
return (a = t == null ? void 0 : t.setSelectionColsHidden(e)) != null ? a : !1;
|
|
1662
1458
|
},
|
|
1663
1459
|
autoFitSelection: (e) => {
|
|
1664
|
-
var
|
|
1665
|
-
return (
|
|
1460
|
+
var a;
|
|
1461
|
+
return (a = t == null ? void 0 : t.autoFitSelection(e)) != null ? a : !1;
|
|
1666
1462
|
},
|
|
1667
1463
|
adjustSelectionIndent: (e) => {
|
|
1668
|
-
var
|
|
1669
|
-
return (
|
|
1464
|
+
var a;
|
|
1465
|
+
return (a = t == null ? void 0 : t.adjustSelectionIndent(e)) != null ? a : !1;
|
|
1670
1466
|
},
|
|
1671
1467
|
adjustSelectionDecimals: (e) => {
|
|
1672
|
-
var
|
|
1673
|
-
return (
|
|
1468
|
+
var a;
|
|
1469
|
+
return (a = t == null ? void 0 : t.adjustSelectionDecimals(e)) != null ? a : !1;
|
|
1674
1470
|
},
|
|
1675
1471
|
applySelectionStyle: (e) => {
|
|
1676
|
-
var
|
|
1677
|
-
return (
|
|
1472
|
+
var a;
|
|
1473
|
+
return (a = t == null ? void 0 : t.applySelectionStyle(e)) != null ? a : !1;
|
|
1678
1474
|
},
|
|
1679
1475
|
applyTableStyle: (e) => {
|
|
1680
|
-
var s;
|
|
1681
|
-
return (s = t == null ? void 0 : t.applyTableStyle(e)) != null ? s : !1;
|
|
1682
|
-
},
|
|
1683
|
-
fillSelection: (e, s) => {
|
|
1684
1476
|
var a;
|
|
1685
|
-
return (a = t == null ? void 0 : t.
|
|
1477
|
+
return (a = t == null ? void 0 : t.applyTableStyle(e)) != null ? a : !1;
|
|
1686
1478
|
},
|
|
1687
|
-
|
|
1479
|
+
fillSelection: (e, a) => {
|
|
1688
1480
|
var s;
|
|
1689
|
-
return (s = t == null ? void 0 : t.
|
|
1481
|
+
return (s = t == null ? void 0 : t.fillSelection(e, a)) != null ? s : !1;
|
|
1482
|
+
},
|
|
1483
|
+
fillSeries: (e) => {
|
|
1484
|
+
var a;
|
|
1485
|
+
return (a = t == null ? void 0 : t.fillSeries(e)) != null ? a : !1;
|
|
1690
1486
|
},
|
|
1691
1487
|
openFillSeriesDialog: () => {
|
|
1692
1488
|
var e;
|
|
@@ -1697,16 +1493,16 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1697
1493
|
return (e = t == null ? void 0 : t.flashFill()) != null ? e : !1;
|
|
1698
1494
|
},
|
|
1699
1495
|
convertSelection: (e) => {
|
|
1700
|
-
var
|
|
1701
|
-
return (
|
|
1496
|
+
var a;
|
|
1497
|
+
return (a = t == null ? void 0 : t.convertSelection(e)) != null ? a : !1;
|
|
1702
1498
|
},
|
|
1703
1499
|
autoSumSelection: (e) => {
|
|
1704
|
-
var
|
|
1705
|
-
return (
|
|
1500
|
+
var a;
|
|
1501
|
+
return (a = t == null ? void 0 : t.autoSumSelection(e)) != null ? a : !1;
|
|
1706
1502
|
},
|
|
1707
1503
|
openInsertFunctionDialog: (e) => {
|
|
1708
|
-
var
|
|
1709
|
-
return (
|
|
1504
|
+
var a;
|
|
1505
|
+
return (a = t == null ? void 0 : t.openInsertFunctionDialog(e)) != null ? a : !1;
|
|
1710
1506
|
},
|
|
1711
1507
|
recalcAll: () => {
|
|
1712
1508
|
var e;
|
|
@@ -1725,9 +1521,23 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1725
1521
|
var e;
|
|
1726
1522
|
return (e = t == null ? void 0 : t.reapplyFilters()) != null ? e : !1;
|
|
1727
1523
|
},
|
|
1728
|
-
|
|
1524
|
+
toggleAutoFilter: () => t == null ? void 0 : t.toggleAutoFilter(),
|
|
1525
|
+
hasFilters: () => {
|
|
1526
|
+
var e;
|
|
1527
|
+
return (e = t == null ? void 0 : t.hasFilters()) != null ? e : !1;
|
|
1528
|
+
},
|
|
1529
|
+
clearAllFilters: () => t == null ? void 0 : t.clearAllFilters(),
|
|
1530
|
+
openFilterConditionDialog: (e) => t == null ? void 0 : t.openFilterConditionDialog(e),
|
|
1531
|
+
applyFilterCondition: (e, a) => {
|
|
1729
1532
|
var s;
|
|
1730
|
-
return (s = t == null ? void 0 : t.
|
|
1533
|
+
return (s = t == null ? void 0 : t.applyFilterCondition(e, a)) != null ? s : !1;
|
|
1534
|
+
},
|
|
1535
|
+
openFindReplaceDialog: (e) => t == null ? void 0 : t.openFindReplaceDialog(e),
|
|
1536
|
+
closeFindReplaceDialog: () => t == null ? void 0 : t.closeFindReplaceDialog(),
|
|
1537
|
+
isFindDialogOpen: () => !!(t != null && t.isFindDialogOpen()),
|
|
1538
|
+
openDataValidationDialog: (e) => {
|
|
1539
|
+
var a;
|
|
1540
|
+
return (a = t == null ? void 0 : t.openDataValidationDialog(e)) != null ? a : !1;
|
|
1731
1541
|
},
|
|
1732
1542
|
openRemoveDuplicatesDialog: () => {
|
|
1733
1543
|
var e;
|
|
@@ -1750,8 +1560,8 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1750
1560
|
return (e = t == null ? void 0 : t.deleteActiveComment()) != null ? e : !1;
|
|
1751
1561
|
},
|
|
1752
1562
|
gotoComment: (e) => {
|
|
1753
|
-
var
|
|
1754
|
-
return (
|
|
1563
|
+
var a;
|
|
1564
|
+
return (a = t == null ? void 0 : t.gotoComment(e)) != null ? a : !1;
|
|
1755
1565
|
},
|
|
1756
1566
|
toggleShowAllComments: () => {
|
|
1757
1567
|
var e;
|
|
@@ -1835,20 +1645,20 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1835
1645
|
return (e = t == null ? void 0 : t.getPageSetup()) != null ? e : {};
|
|
1836
1646
|
},
|
|
1837
1647
|
setPageSetup: (e) => {
|
|
1838
|
-
var s;
|
|
1839
|
-
return (s = t == null ? void 0 : t.setPageSetup(e)) != null ? s : !1;
|
|
1840
|
-
},
|
|
1841
|
-
setPageBreaks: (e, s) => {
|
|
1842
1648
|
var a;
|
|
1843
|
-
return (a = t == null ? void 0 : t.
|
|
1649
|
+
return (a = t == null ? void 0 : t.setPageSetup(e)) != null ? a : !1;
|
|
1650
|
+
},
|
|
1651
|
+
setPageBreaks: (e, a) => {
|
|
1652
|
+
var s;
|
|
1653
|
+
return (s = t == null ? void 0 : t.setPageBreaks(e, a)) != null ? s : !1;
|
|
1844
1654
|
},
|
|
1845
1655
|
setPrintAreaFromSelection: () => {
|
|
1846
1656
|
var e;
|
|
1847
1657
|
return (e = t == null ? void 0 : t.setPrintAreaFromSelection()) != null ? e : !1;
|
|
1848
1658
|
},
|
|
1849
1659
|
togglePageBreakAt: (e) => {
|
|
1850
|
-
var
|
|
1851
|
-
return (
|
|
1660
|
+
var a;
|
|
1661
|
+
return (a = t == null ? void 0 : t.togglePageBreakAt(e)) != null ? a : !1;
|
|
1852
1662
|
},
|
|
1853
1663
|
clearPageBreaks: () => {
|
|
1854
1664
|
var e;
|
|
@@ -1861,53 +1671,53 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1861
1671
|
getBackground: () => t == null ? void 0 : t.getBackground(),
|
|
1862
1672
|
getWatermark: () => t == null ? void 0 : t.getWatermark(),
|
|
1863
1673
|
setBackground: (e) => {
|
|
1864
|
-
var
|
|
1865
|
-
return (
|
|
1674
|
+
var a;
|
|
1675
|
+
return (a = t == null ? void 0 : t.setBackground(e)) != null ? a : !1;
|
|
1866
1676
|
},
|
|
1867
1677
|
setWatermark: (e) => {
|
|
1868
|
-
var
|
|
1869
|
-
return (
|
|
1678
|
+
var a;
|
|
1679
|
+
return (a = t == null ? void 0 : t.setWatermark(e)) != null ? a : !1;
|
|
1870
1680
|
},
|
|
1871
1681
|
openBackgroundDialog: () => {
|
|
1872
1682
|
var e;
|
|
1873
1683
|
return (e = t == null ? void 0 : t.openBackgroundDialog()) != null ? e : !1;
|
|
1874
1684
|
},
|
|
1875
1685
|
startFormatPainter: (e) => {
|
|
1876
|
-
var
|
|
1877
|
-
return (
|
|
1686
|
+
var a;
|
|
1687
|
+
return (a = t == null ? void 0 : t.startFormatPainter(e)) != null ? a : !1;
|
|
1878
1688
|
},
|
|
1879
1689
|
isFormatPainterArmed: () => {
|
|
1880
1690
|
var e;
|
|
1881
1691
|
return (e = t == null ? void 0 : t.isFormatPainterArmed()) != null ? e : !1;
|
|
1882
1692
|
},
|
|
1883
1693
|
cancelFormatPainter: () => t == null ? void 0 : t.cancelFormatPainter(),
|
|
1884
|
-
getCellComment: (e,
|
|
1885
|
-
var
|
|
1886
|
-
return (
|
|
1694
|
+
getCellComment: (e, a) => {
|
|
1695
|
+
var s;
|
|
1696
|
+
return (s = t == null ? void 0 : t.getCellComment(e, a)) != null ? s : "";
|
|
1887
1697
|
},
|
|
1888
|
-
setCellComment: (e,
|
|
1889
|
-
var
|
|
1890
|
-
return (
|
|
1698
|
+
setCellComment: (e, a, s) => {
|
|
1699
|
+
var o;
|
|
1700
|
+
return (o = t == null ? void 0 : t.setCellComment(e, a, s)) != null ? o : !1;
|
|
1891
1701
|
},
|
|
1892
|
-
openCommentEditor: (e,
|
|
1893
|
-
var
|
|
1894
|
-
return (
|
|
1895
|
-
},
|
|
1896
|
-
editCell: (e, s, a) => {
|
|
1897
|
-
var i;
|
|
1898
|
-
return (i = t == null ? void 0 : t.editCell(e, s, a)) != null ? i : !1;
|
|
1702
|
+
openCommentEditor: (e, a) => {
|
|
1703
|
+
var s;
|
|
1704
|
+
return (s = t == null ? void 0 : t.openCommentEditor(e, a)) != null ? s : !1;
|
|
1899
1705
|
},
|
|
1900
|
-
|
|
1901
|
-
var
|
|
1902
|
-
return (
|
|
1706
|
+
editCell: (e, a, s) => {
|
|
1707
|
+
var o;
|
|
1708
|
+
return (o = t == null ? void 0 : t.editCell(e, a, s)) != null ? o : !1;
|
|
1903
1709
|
},
|
|
1904
|
-
|
|
1710
|
+
editRange: (e, a) => {
|
|
1905
1711
|
var s;
|
|
1906
|
-
return (s = t == null ? void 0 : t.
|
|
1712
|
+
return (s = t == null ? void 0 : t.editRange(e, a)) != null ? s : !1;
|
|
1907
1713
|
},
|
|
1908
|
-
|
|
1714
|
+
clearRange: (e) => {
|
|
1909
1715
|
var a;
|
|
1910
|
-
return (a = t == null ? void 0 : t.
|
|
1716
|
+
return (a = t == null ? void 0 : t.clearRange(e)) != null ? a : !1;
|
|
1717
|
+
},
|
|
1718
|
+
setStyle: (e, a) => {
|
|
1719
|
+
var s;
|
|
1720
|
+
return (s = t == null ? void 0 : t.setStyle(e, a)) != null ? s : !1;
|
|
1911
1721
|
},
|
|
1912
1722
|
getActiveFillColor: () => {
|
|
1913
1723
|
var e;
|
|
@@ -1918,12 +1728,12 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1918
1728
|
return (e = t == null ? void 0 : t.getActiveFontColor()) != null ? e : "#000000";
|
|
1919
1729
|
},
|
|
1920
1730
|
setSelectionFill: (e) => {
|
|
1921
|
-
var
|
|
1922
|
-
return (
|
|
1731
|
+
var a;
|
|
1732
|
+
return (a = t == null ? void 0 : t.setSelectionFill(e)) != null ? a : !1;
|
|
1923
1733
|
},
|
|
1924
1734
|
setSelectionFontColor: (e) => {
|
|
1925
|
-
var
|
|
1926
|
-
return (
|
|
1735
|
+
var a;
|
|
1736
|
+
return (a = t == null ? void 0 : t.setSelectionFontColor(e)) != null ? a : !1;
|
|
1927
1737
|
},
|
|
1928
1738
|
getSelectionWrapState: () => {
|
|
1929
1739
|
var e;
|
|
@@ -1934,86 +1744,86 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
1934
1744
|
return (e = t == null ? void 0 : t.toggleWrapTextOnSelection()) != null ? e : !1;
|
|
1935
1745
|
},
|
|
1936
1746
|
mergeCells: (e) => {
|
|
1937
|
-
var
|
|
1938
|
-
return (
|
|
1747
|
+
var a;
|
|
1748
|
+
return (a = t == null ? void 0 : t.mergeCells(e)) != null ? a : !1;
|
|
1939
1749
|
},
|
|
1940
1750
|
unmergeCells: (e) => {
|
|
1941
|
-
var s;
|
|
1942
|
-
return (s = t == null ? void 0 : t.unmergeCells(e)) != null ? s : !1;
|
|
1943
|
-
},
|
|
1944
|
-
pasteText: (e, s) => {
|
|
1945
1751
|
var a;
|
|
1946
|
-
return (a = t == null ? void 0 : t.
|
|
1752
|
+
return (a = t == null ? void 0 : t.unmergeCells(e)) != null ? a : !1;
|
|
1753
|
+
},
|
|
1754
|
+
pasteText: (e, a) => {
|
|
1755
|
+
var s;
|
|
1756
|
+
return (s = t == null ? void 0 : t.pasteText(e, a)) != null ? s : !1;
|
|
1947
1757
|
},
|
|
1948
|
-
pasteRichHtml: (e,
|
|
1949
|
-
var
|
|
1950
|
-
return (
|
|
1758
|
+
pasteRichHtml: (e, a, s) => {
|
|
1759
|
+
var o;
|
|
1760
|
+
return (o = t == null ? void 0 : t.pasteRichHtml(e, a, s)) != null ? o : !1;
|
|
1951
1761
|
},
|
|
1952
1762
|
getPasteBehavior: () => {
|
|
1953
1763
|
var e;
|
|
1954
|
-
return (e = t == null ? void 0 : t.getPasteBehavior()) != null ? e :
|
|
1764
|
+
return (e = t == null ? void 0 : t.getPasteBehavior()) != null ? e : Gt;
|
|
1955
1765
|
},
|
|
1956
1766
|
setPasteBehavior: (e) => t == null ? void 0 : t.setPasteBehavior(e),
|
|
1957
1767
|
openPasteConfigDialog: () => {
|
|
1958
1768
|
var e;
|
|
1959
1769
|
return (e = t == null ? void 0 : t.openPasteConfigDialog()) != null ? e : !1;
|
|
1960
1770
|
},
|
|
1961
|
-
pasteImageBlob: (e,
|
|
1962
|
-
var
|
|
1963
|
-
return (
|
|
1771
|
+
pasteImageBlob: (e, a) => {
|
|
1772
|
+
var s;
|
|
1773
|
+
return (s = t == null ? void 0 : t.pasteImageBlob(e, a)) != null ? s : Promise.resolve(!1);
|
|
1964
1774
|
},
|
|
1965
1775
|
getImageInsertMode: () => {
|
|
1966
1776
|
var e;
|
|
1967
1777
|
return (e = t == null ? void 0 : t.getImageInsertMode()) != null ? e : "float";
|
|
1968
1778
|
},
|
|
1969
1779
|
setImageInsertMode: (e) => t == null ? void 0 : t.setImageInsertMode(e),
|
|
1970
|
-
insertImageBlob: (e,
|
|
1971
|
-
var
|
|
1972
|
-
return (
|
|
1780
|
+
insertImageBlob: (e, a, s) => {
|
|
1781
|
+
var o;
|
|
1782
|
+
return (o = t == null ? void 0 : t.insertImageBlob(e, a, s)) != null ? o : Promise.resolve(!1);
|
|
1973
1783
|
},
|
|
1974
|
-
openImagePicker: (e,
|
|
1975
|
-
var
|
|
1976
|
-
return (
|
|
1784
|
+
openImagePicker: (e, a) => {
|
|
1785
|
+
var s;
|
|
1786
|
+
return (s = t == null ? void 0 : t.openImagePicker(e, a)) != null ? s : !1;
|
|
1977
1787
|
},
|
|
1978
1788
|
getImages: () => {
|
|
1979
1789
|
var e;
|
|
1980
1790
|
return (e = t == null ? void 0 : t.getImages()) != null ? e : [];
|
|
1981
1791
|
},
|
|
1982
1792
|
addImage: (e) => {
|
|
1983
|
-
var
|
|
1984
|
-
return (
|
|
1793
|
+
var a;
|
|
1794
|
+
return (a = t == null ? void 0 : t.addImage(e)) != null ? a : -1;
|
|
1985
1795
|
},
|
|
1986
1796
|
removeImage: (e) => {
|
|
1987
|
-
var
|
|
1988
|
-
return (
|
|
1797
|
+
var a;
|
|
1798
|
+
return (a = t == null ? void 0 : t.removeImage(e)) != null ? a : !1;
|
|
1989
1799
|
},
|
|
1990
|
-
moveImage: (e,
|
|
1991
|
-
var
|
|
1992
|
-
return (
|
|
1800
|
+
moveImage: (e, a, s) => {
|
|
1801
|
+
var o;
|
|
1802
|
+
return (o = t == null ? void 0 : t.moveImage(e, a, s)) != null ? o : !1;
|
|
1993
1803
|
},
|
|
1994
|
-
resizeImage: (e,
|
|
1995
|
-
var
|
|
1996
|
-
return (
|
|
1804
|
+
resizeImage: (e, a, s) => {
|
|
1805
|
+
var o;
|
|
1806
|
+
return (o = t == null ? void 0 : t.resizeImage(e, a, s)) != null ? o : !1;
|
|
1997
1807
|
},
|
|
1998
1808
|
resetImageSize: (e) => {
|
|
1999
|
-
var s;
|
|
2000
|
-
return (s = t == null ? void 0 : t.resetImageSize(e)) != null ? s : Promise.resolve(!1);
|
|
2001
|
-
},
|
|
2002
|
-
setImageRotation: (e, s) => {
|
|
2003
1809
|
var a;
|
|
2004
|
-
return (a = t == null ? void 0 : t.
|
|
1810
|
+
return (a = t == null ? void 0 : t.resetImageSize(e)) != null ? a : Promise.resolve(!1);
|
|
2005
1811
|
},
|
|
2006
|
-
|
|
2007
|
-
var
|
|
2008
|
-
return (
|
|
1812
|
+
setImageRotation: (e, a) => {
|
|
1813
|
+
var s;
|
|
1814
|
+
return (s = t == null ? void 0 : t.setImageRotation(e, a)) != null ? s : !1;
|
|
2009
1815
|
},
|
|
2010
|
-
|
|
2011
|
-
var
|
|
2012
|
-
return (
|
|
1816
|
+
rotateImage: (e, a) => {
|
|
1817
|
+
var s;
|
|
1818
|
+
return (s = t == null ? void 0 : t.rotateImage(e, a)) != null ? s : !1;
|
|
2013
1819
|
},
|
|
2014
|
-
|
|
1820
|
+
setImageCrop: (e, a) => {
|
|
2015
1821
|
var s;
|
|
2016
|
-
return (s = t == null ? void 0 : t.
|
|
1822
|
+
return (s = t == null ? void 0 : t.setImageCrop(e, a)) != null ? s : !1;
|
|
1823
|
+
},
|
|
1824
|
+
enterImageCrop: (e) => {
|
|
1825
|
+
var a;
|
|
1826
|
+
return (a = t == null ? void 0 : t.enterImageCrop(e)) != null ? a : !1;
|
|
2017
1827
|
},
|
|
2018
1828
|
exitImageCrop: () => t == null ? void 0 : t.exitImageCrop(),
|
|
2019
1829
|
getCellEditString: () => {
|
|
@@ -2024,61 +1834,61 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
2024
1834
|
var e;
|
|
2025
1835
|
return (e = t == null ? void 0 : t.canEditActiveCell()) != null ? e : !1;
|
|
2026
1836
|
},
|
|
2027
|
-
commitActiveCellValue: (e,
|
|
2028
|
-
var
|
|
2029
|
-
return (
|
|
1837
|
+
commitActiveCellValue: (e, a) => {
|
|
1838
|
+
var s;
|
|
1839
|
+
return (s = t == null ? void 0 : t.commitActiveCellValue(e, a)) != null ? s : !1;
|
|
2030
1840
|
},
|
|
2031
1841
|
getCellImages: () => {
|
|
2032
1842
|
var e;
|
|
2033
1843
|
return (e = t == null ? void 0 : t.getCellImages()) != null ? e : [];
|
|
2034
1844
|
},
|
|
2035
|
-
getCellImageAt: (e,
|
|
2036
|
-
var
|
|
2037
|
-
return (
|
|
1845
|
+
getCellImageAt: (e, a) => {
|
|
1846
|
+
var s;
|
|
1847
|
+
return (s = t == null ? void 0 : t.getCellImageAt(e, a)) != null ? s : null;
|
|
2038
1848
|
},
|
|
2039
|
-
openImageLightbox: (e,
|
|
1849
|
+
openImageLightbox: (e, a, s) => t == null ? void 0 : t.openImageLightbox(e, a, s),
|
|
2040
1850
|
setCellImageFit: (e) => t == null ? void 0 : t.setCellImageFit(e),
|
|
2041
|
-
convertImageToCell: (e,
|
|
2042
|
-
var
|
|
2043
|
-
return (
|
|
1851
|
+
convertImageToCell: (e, a, s) => {
|
|
1852
|
+
var o;
|
|
1853
|
+
return (o = t == null ? void 0 : t.convertImageToCell(e, a, s)) != null ? o : !1;
|
|
2044
1854
|
},
|
|
2045
1855
|
convertImageToCellAuto: (e) => {
|
|
2046
|
-
var
|
|
2047
|
-
return (
|
|
1856
|
+
var a;
|
|
1857
|
+
return (a = t == null ? void 0 : t.convertImageToCellAuto(e)) != null ? a : !1;
|
|
2048
1858
|
},
|
|
2049
1859
|
convertAllImagesToCells: (e) => {
|
|
2050
|
-
var
|
|
2051
|
-
return (
|
|
1860
|
+
var a;
|
|
1861
|
+
return (a = t == null ? void 0 : t.convertAllImagesToCells(e)) != null ? a : 0;
|
|
2052
1862
|
},
|
|
2053
|
-
convertImagesInRangeToCell: (e) =>
|
|
2054
|
-
var
|
|
2055
|
-
return (
|
|
1863
|
+
convertImagesInRangeToCell: (e) => Y({}, async (a) => {
|
|
1864
|
+
var s, o;
|
|
1865
|
+
return (s = a.onProgress) == null || s.call(a, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (o = t == null ? void 0 : t.convertImagesInRangeToCell(e)) != null ? o : 0;
|
|
2056
1866
|
}),
|
|
2057
|
-
convertCellImagesInRangeToFloat: (e,
|
|
2058
|
-
var
|
|
2059
|
-
return (
|
|
1867
|
+
convertCellImagesInRangeToFloat: (e, a) => Y({}, async (s) => {
|
|
1868
|
+
var o, w;
|
|
1869
|
+
return (o = s.onProgress) == null || o.call(s, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (w = t == null ? void 0 : t.convertCellImagesInRangeToFloat(e, a)) != null ? w : 0;
|
|
2060
1870
|
}),
|
|
2061
|
-
openContextMenu: (e,
|
|
1871
|
+
openContextMenu: (e, a, s) => t == null ? void 0 : t.openContextMenu(e, a, s),
|
|
2062
1872
|
closeContextMenu: () => t == null ? void 0 : t.closeContextMenu(),
|
|
2063
|
-
convertCellImageToFloat: (e,
|
|
2064
|
-
var
|
|
2065
|
-
return (
|
|
1873
|
+
convertCellImageToFloat: (e, a, s) => {
|
|
1874
|
+
var o;
|
|
1875
|
+
return (o = t == null ? void 0 : t.convertCellImageToFloat(e, a, s)) != null ? o : !1;
|
|
2066
1876
|
},
|
|
2067
|
-
insertRows: (e,
|
|
2068
|
-
var
|
|
2069
|
-
return (
|
|
1877
|
+
insertRows: (e, a) => {
|
|
1878
|
+
var s;
|
|
1879
|
+
return (s = t == null ? void 0 : t.insertRows(e, a)) != null ? s : !1;
|
|
2070
1880
|
},
|
|
2071
|
-
deleteRows: (e,
|
|
2072
|
-
var
|
|
2073
|
-
return (
|
|
1881
|
+
deleteRows: (e, a) => {
|
|
1882
|
+
var s;
|
|
1883
|
+
return (s = t == null ? void 0 : t.deleteRows(e, a)) != null ? s : !1;
|
|
2074
1884
|
},
|
|
2075
|
-
insertCols: (e,
|
|
2076
|
-
var
|
|
2077
|
-
return (
|
|
1885
|
+
insertCols: (e, a) => {
|
|
1886
|
+
var s;
|
|
1887
|
+
return (s = t == null ? void 0 : t.insertCols(e, a)) != null ? s : !1;
|
|
2078
1888
|
},
|
|
2079
|
-
deleteCols: (e,
|
|
2080
|
-
var
|
|
2081
|
-
return (
|
|
1889
|
+
deleteCols: (e, a) => {
|
|
1890
|
+
var s;
|
|
1891
|
+
return (s = t == null ? void 0 : t.deleteCols(e, a)) != null ? s : !1;
|
|
2082
1892
|
},
|
|
2083
1893
|
undo: () => t == null ? void 0 : t.undo(),
|
|
2084
1894
|
redo: () => t == null ? void 0 : t.redo(),
|
|
@@ -2094,46 +1904,46 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
2094
1904
|
var e;
|
|
2095
1905
|
return (e = t == null ? void 0 : t.getEditingCell()) != null ? e : null;
|
|
2096
1906
|
},
|
|
2097
|
-
getCellSnapshot: (e,
|
|
2098
|
-
var
|
|
2099
|
-
return (
|
|
1907
|
+
getCellSnapshot: (e, a) => {
|
|
1908
|
+
var s;
|
|
1909
|
+
return (s = t == null ? void 0 : t.getCellSnapshot(e, a)) != null ? s : null;
|
|
2100
1910
|
},
|
|
2101
|
-
inspectCell: (e,
|
|
2102
|
-
var
|
|
2103
|
-
return (
|
|
1911
|
+
inspectCell: (e, a) => {
|
|
1912
|
+
var s;
|
|
1913
|
+
return (s = t == null ? void 0 : t.inspectCell(e, a)) != null ? s : null;
|
|
2104
1914
|
},
|
|
2105
|
-
beginEdit: (e,
|
|
2106
|
-
var
|
|
2107
|
-
return (
|
|
1915
|
+
beginEdit: (e, a) => {
|
|
1916
|
+
var s;
|
|
1917
|
+
return (s = t == null ? void 0 : t.beginEdit(e, a)) != null ? s : !1;
|
|
2108
1918
|
},
|
|
2109
1919
|
cancelEdit: () => t == null ? void 0 : t.cancelEdit(),
|
|
2110
1920
|
isEditing: () => {
|
|
2111
1921
|
var e;
|
|
2112
1922
|
return (e = t == null ? void 0 : t.isEditing()) != null ? e : !1;
|
|
2113
1923
|
},
|
|
2114
|
-
setColumnWidth: (e,
|
|
2115
|
-
var
|
|
2116
|
-
return (
|
|
1924
|
+
setColumnWidth: (e, a) => {
|
|
1925
|
+
var s;
|
|
1926
|
+
return (s = t == null ? void 0 : t.setColumnWidth(e, a)) != null ? s : 0;
|
|
2117
1927
|
},
|
|
2118
|
-
setRowHeight: (e,
|
|
2119
|
-
var
|
|
2120
|
-
return (
|
|
1928
|
+
setRowHeight: (e, a) => {
|
|
1929
|
+
var s;
|
|
1930
|
+
return (s = t == null ? void 0 : t.setRowHeight(e, a)) != null ? s : 0;
|
|
2121
1931
|
},
|
|
2122
1932
|
autoFitColumns: (e) => {
|
|
2123
|
-
var
|
|
2124
|
-
return (
|
|
1933
|
+
var a;
|
|
1934
|
+
return (a = t == null ? void 0 : t.autoFitColumns(e)) != null ? a : 0;
|
|
2125
1935
|
},
|
|
2126
1936
|
autoFitRows: (e) => {
|
|
2127
|
-
var
|
|
2128
|
-
return (
|
|
1937
|
+
var a;
|
|
1938
|
+
return (a = t == null ? void 0 : t.autoFitRows(e)) != null ? a : 0;
|
|
2129
1939
|
},
|
|
2130
1940
|
resetColumnWidth: (e) => {
|
|
2131
|
-
var
|
|
2132
|
-
return (
|
|
1941
|
+
var a;
|
|
1942
|
+
return (a = t == null ? void 0 : t.resetColumnWidth(e)) != null ? a : 0;
|
|
2133
1943
|
},
|
|
2134
1944
|
resetRowHeight: (e) => {
|
|
2135
|
-
var
|
|
2136
|
-
return (
|
|
1945
|
+
var a;
|
|
1946
|
+
return (a = t == null ? void 0 : t.resetRowHeight(e)) != null ? a : 0;
|
|
2137
1947
|
},
|
|
2138
1948
|
isRecalcReady: () => {
|
|
2139
1949
|
var e;
|
|
@@ -2151,297 +1961,297 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
2151
1961
|
var e;
|
|
2152
1962
|
return (e = t == null ? void 0 : t.resetToOriginal()) != null ? e : !1;
|
|
2153
1963
|
},
|
|
2154
|
-
exportImage:
|
|
2155
|
-
downloadImage:
|
|
2156
|
-
exportPdf:
|
|
2157
|
-
downloadPdf:
|
|
2158
|
-
print:
|
|
2159
|
-
openPrintPreview:
|
|
2160
|
-
exportXlsx: (e) =>
|
|
2161
|
-
downloadXlsx: (e) =>
|
|
1964
|
+
exportImage: Fa,
|
|
1965
|
+
downloadImage: Pe,
|
|
1966
|
+
exportPdf: wa,
|
|
1967
|
+
downloadPdf: Re,
|
|
1968
|
+
print: Me,
|
|
1969
|
+
openPrintPreview: $a,
|
|
1970
|
+
exportXlsx: (e) => Y(e, (a) => t.exportXlsx(a)),
|
|
1971
|
+
downloadXlsx: (e) => Y(e, (a) => t.downloadXlsx(a)),
|
|
2162
1972
|
exportJson: (e) => {
|
|
2163
|
-
var
|
|
2164
|
-
return (
|
|
1973
|
+
var a;
|
|
1974
|
+
return (a = t == null ? void 0 : t.exportJson(e)) != null ? a : "{}";
|
|
2165
1975
|
},
|
|
2166
1976
|
downloadJson: (e) => t == null ? void 0 : t.downloadJson(e),
|
|
2167
1977
|
exportCsv: (e) => {
|
|
2168
|
-
var
|
|
2169
|
-
return (
|
|
1978
|
+
var a;
|
|
1979
|
+
return (a = t == null ? void 0 : t.exportCsv(e)) != null ? a : "";
|
|
2170
1980
|
},
|
|
2171
1981
|
downloadCsv: (e) => t == null ? void 0 : t.downloadCsv(e),
|
|
2172
1982
|
// ---- 数据读取(委托独立函数,自动绑 date1904 + 默认当前表) ----
|
|
2173
|
-
getCellValue: (e,
|
|
2174
|
-
const
|
|
2175
|
-
return
|
|
2176
|
-
},
|
|
2177
|
-
getCellText: (e,
|
|
2178
|
-
var
|
|
2179
|
-
const
|
|
2180
|
-
return
|
|
2181
|
-
},
|
|
2182
|
-
getSheetData: (e,
|
|
2183
|
-
const
|
|
2184
|
-
return
|
|
2185
|
-
},
|
|
2186
|
-
getSheetJSON: (e,
|
|
2187
|
-
const
|
|
2188
|
-
return
|
|
2189
|
-
},
|
|
2190
|
-
getRangeData: (e,
|
|
2191
|
-
const
|
|
2192
|
-
return
|
|
1983
|
+
getCellValue: (e, a, s) => {
|
|
1984
|
+
const o = Be(s);
|
|
1985
|
+
return o ? os(o, e, a) : null;
|
|
1986
|
+
},
|
|
1987
|
+
getCellText: (e, a, s) => {
|
|
1988
|
+
var w, I;
|
|
1989
|
+
const o = Be(s);
|
|
1990
|
+
return o ? ls(o, e, a, (I = (w = T.value) == null ? void 0 : w.date1904) != null ? I : !1) : "";
|
|
1991
|
+
},
|
|
1992
|
+
getSheetData: (e, a) => {
|
|
1993
|
+
const s = Be(a);
|
|
1994
|
+
return s ? ns(s, vt(e)) : [];
|
|
1995
|
+
},
|
|
1996
|
+
getSheetJSON: (e, a) => {
|
|
1997
|
+
const s = Be(a);
|
|
1998
|
+
return s ? is(s, vt(e)) : [];
|
|
1999
|
+
},
|
|
2000
|
+
getRangeData: (e, a, s) => {
|
|
2001
|
+
const o = Be(s);
|
|
2002
|
+
return o ? ss(o, e, vt(a)) : [];
|
|
2193
2003
|
}
|
|
2194
2004
|
};
|
|
2195
|
-
function
|
|
2196
|
-
var
|
|
2197
|
-
const
|
|
2198
|
-
return
|
|
2005
|
+
function Be(e) {
|
|
2006
|
+
var s;
|
|
2007
|
+
const a = T.value;
|
|
2008
|
+
return a && (s = a.sheets[e != null ? e : Z.value]) != null ? s : null;
|
|
2199
2009
|
}
|
|
2200
|
-
function
|
|
2201
|
-
var
|
|
2202
|
-
return
|
|
2010
|
+
function vt(e) {
|
|
2011
|
+
var a, s;
|
|
2012
|
+
return ke(W({}, e), { date1904: (s = (a = T.value) == null ? void 0 : a.date1904) != null ? s : !1 });
|
|
2203
2013
|
}
|
|
2204
|
-
x(
|
|
2205
|
-
const
|
|
2206
|
-
function
|
|
2207
|
-
return
|
|
2014
|
+
x(Ae);
|
|
2015
|
+
const N = (e) => Se[e];
|
|
2016
|
+
function P(e) {
|
|
2017
|
+
return W({ kind: "builtin" }, e);
|
|
2208
2018
|
}
|
|
2209
|
-
function
|
|
2210
|
-
var
|
|
2211
|
-
const
|
|
2212
|
-
if (
|
|
2019
|
+
function La(e) {
|
|
2020
|
+
var s, o, w, I, b;
|
|
2021
|
+
const a = xs(e, { controller: t != null ? t : null, editable: !!n.editable, hasSelection: !!J.value });
|
|
2022
|
+
if (a) return a;
|
|
2213
2023
|
switch (e) {
|
|
2214
2024
|
case "find":
|
|
2215
|
-
return
|
|
2025
|
+
return P({
|
|
2216
2026
|
id: e,
|
|
2217
|
-
iconSvg:
|
|
2027
|
+
iconSvg: N("find"),
|
|
2218
2028
|
label: "查找",
|
|
2219
|
-
title: "
|
|
2220
|
-
active:
|
|
2221
|
-
onClick: () =>
|
|
2029
|
+
title: "查找和替换 (Ctrl+F)",
|
|
2030
|
+
active: Pa.value,
|
|
2031
|
+
onClick: () => Ma()
|
|
2222
2032
|
});
|
|
2223
2033
|
case "filter":
|
|
2224
|
-
return
|
|
2034
|
+
return P({
|
|
2225
2035
|
id: e,
|
|
2226
|
-
iconSvg:
|
|
2036
|
+
iconSvg: N("filter"),
|
|
2227
2037
|
label: "筛选",
|
|
2228
2038
|
title: "切换自动筛选",
|
|
2229
|
-
active: !!((
|
|
2230
|
-
onClick:
|
|
2039
|
+
active: !!((s = ge.value) != null && s.autoFilterRange),
|
|
2040
|
+
onClick: Aa
|
|
2231
2041
|
});
|
|
2232
2042
|
case "clear-filter":
|
|
2233
|
-
return
|
|
2043
|
+
return P({
|
|
2234
2044
|
id: e,
|
|
2235
|
-
iconSvg:
|
|
2045
|
+
iconSvg: N("clear-filter"),
|
|
2236
2046
|
label: "清除筛选",
|
|
2237
2047
|
title: "清除当前表全部筛选",
|
|
2238
2048
|
disabled: !(t != null && t.hasFilters()),
|
|
2239
2049
|
onClick: () => t == null ? void 0 : t.clearAllFilters()
|
|
2240
2050
|
});
|
|
2241
2051
|
case "sort": {
|
|
2242
|
-
const
|
|
2243
|
-
return
|
|
2052
|
+
const k = t == null ? void 0 : t.getSortState(), V = t == null ? void 0 : t.getActiveCell(), q = !V || !ge.value;
|
|
2053
|
+
return P({
|
|
2244
2054
|
id: e,
|
|
2245
|
-
iconSvg:
|
|
2055
|
+
iconSvg: N("sort"),
|
|
2246
2056
|
label: "排序",
|
|
2247
|
-
title:
|
|
2248
|
-
active: !!(
|
|
2249
|
-
disabled:
|
|
2057
|
+
title: V ? `按 ${ye(V.col)} 列排序` : "选中一个单元格后按该列排序",
|
|
2058
|
+
active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir),
|
|
2059
|
+
disabled: q,
|
|
2250
2060
|
items: [
|
|
2251
|
-
|
|
2061
|
+
P({
|
|
2252
2062
|
id: "sort-asc",
|
|
2253
2063
|
label: "升序 (A → Z / 小 → 大)",
|
|
2254
|
-
active: !!(
|
|
2255
|
-
disabled:
|
|
2064
|
+
active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "asc"),
|
|
2065
|
+
disabled: q,
|
|
2256
2066
|
onClick: () => t == null ? void 0 : t.sortActiveColumn("asc")
|
|
2257
2067
|
}),
|
|
2258
|
-
|
|
2068
|
+
P({
|
|
2259
2069
|
id: "sort-desc",
|
|
2260
2070
|
label: "降序 (Z → A / 大 → 小)",
|
|
2261
|
-
active: !!(
|
|
2262
|
-
disabled:
|
|
2071
|
+
active: !!(V && (k == null ? void 0 : k.col) === V.col && k.dir === "desc"),
|
|
2072
|
+
disabled: q,
|
|
2263
2073
|
onClick: () => t == null ? void 0 : t.sortActiveColumn("desc")
|
|
2264
2074
|
}),
|
|
2265
|
-
|
|
2266
|
-
|
|
2075
|
+
P({ id: "sort-custom-sep", type: "separator" }),
|
|
2076
|
+
P({ id: "sort-custom", label: "自定义排序…", title: "多关键字排序", onClick: () => t == null ? void 0 : t.openSortDialog() })
|
|
2267
2077
|
]
|
|
2268
2078
|
});
|
|
2269
2079
|
}
|
|
2270
2080
|
case "copy":
|
|
2271
|
-
return
|
|
2081
|
+
return P({
|
|
2272
2082
|
id: e,
|
|
2273
|
-
iconSvg:
|
|
2083
|
+
iconSvg: N("copy"),
|
|
2274
2084
|
label: "复制",
|
|
2275
2085
|
title: "复制选区 (Ctrl+C)",
|
|
2276
2086
|
disabled: !J.value,
|
|
2277
2087
|
onClick: () => void (t == null ? void 0 : t.copySelection())
|
|
2278
2088
|
});
|
|
2279
2089
|
case "pivot-table":
|
|
2280
|
-
return
|
|
2090
|
+
return n.pivotTable ? P({
|
|
2281
2091
|
id: e,
|
|
2282
|
-
iconSvg:
|
|
2092
|
+
iconSvg: N("pivot-table"),
|
|
2283
2093
|
label: "透视表",
|
|
2284
2094
|
title: "选择字段并基于当前选区创建静态透视汇总表",
|
|
2285
|
-
disabled: !J.value || !
|
|
2095
|
+
disabled: !J.value || !n.editable,
|
|
2286
2096
|
onClick: () => t == null ? void 0 : t.openPivotTableDialog()
|
|
2287
2097
|
}) : null;
|
|
2288
2098
|
case "conditional-format":
|
|
2289
|
-
return
|
|
2099
|
+
return n.conditionalFormat ? P({
|
|
2290
2100
|
id: e,
|
|
2291
|
-
iconSvg:
|
|
2101
|
+
iconSvg: N("conditional-format"),
|
|
2292
2102
|
label: "条件格式",
|
|
2293
2103
|
title: "管理条件格式规则(新建/编辑/删除;新建套到当前选区)",
|
|
2294
|
-
disabled: !
|
|
2104
|
+
disabled: !n.editable,
|
|
2295
2105
|
onClick: () => t == null ? void 0 : t.openConditionalFormatDialog()
|
|
2296
2106
|
}) : null;
|
|
2297
2107
|
case "number-format":
|
|
2298
|
-
return
|
|
2108
|
+
return P({
|
|
2299
2109
|
id: e,
|
|
2300
|
-
iconSvg:
|
|
2110
|
+
iconSvg: N("number-format"),
|
|
2301
2111
|
label: "数字格式",
|
|
2302
2112
|
title: "设置单元格数字格式(数值/货币/百分比/日期/自定义)",
|
|
2303
|
-
disabled: !J.value || !
|
|
2113
|
+
disabled: !J.value || !n.editable,
|
|
2304
2114
|
onClick: () => t == null ? void 0 : t.openNumberFormatDialog()
|
|
2305
2115
|
});
|
|
2306
2116
|
case "format-painter":
|
|
2307
|
-
return
|
|
2117
|
+
return P({
|
|
2308
2118
|
id: e,
|
|
2309
|
-
iconSvg:
|
|
2119
|
+
iconSvg: N("format-painter"),
|
|
2310
2120
|
label: "格式刷",
|
|
2311
2121
|
title: "格式刷:先选源格点此采样,再点/拖目标刷上格式(Esc 取消)",
|
|
2312
2122
|
active: !!(t != null && t.isFormatPainterArmed()),
|
|
2313
|
-
disabled: !J.value || !
|
|
2123
|
+
disabled: !J.value || !n.editable,
|
|
2314
2124
|
onClick: () => t != null && t.isFormatPainterArmed() ? t == null ? void 0 : t.cancelFormatPainter() : t == null ? void 0 : t.startFormatPainter()
|
|
2315
2125
|
});
|
|
2316
2126
|
case "wrap-text": {
|
|
2317
|
-
const
|
|
2318
|
-
return
|
|
2127
|
+
const k = (o = t == null ? void 0 : t.getSelectionWrapState()) != null ? o : "none";
|
|
2128
|
+
return P({
|
|
2319
2129
|
id: e,
|
|
2320
|
-
iconSvg:
|
|
2130
|
+
iconSvg: N("wrap-text"),
|
|
2321
2131
|
label: "自动换行",
|
|
2322
2132
|
title: "自动换行(选区,WPS 风格 toggle)",
|
|
2323
|
-
active:
|
|
2324
|
-
disabled: !J.value || !
|
|
2133
|
+
active: k === "all",
|
|
2134
|
+
disabled: !J.value || !n.editable,
|
|
2325
2135
|
onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection())
|
|
2326
2136
|
});
|
|
2327
2137
|
}
|
|
2328
2138
|
case "template": {
|
|
2329
|
-
const
|
|
2330
|
-
return
|
|
2139
|
+
const k = !!xt.value, V = ht.value, q = !!n.src && !n.workbook;
|
|
2140
|
+
return P({
|
|
2331
2141
|
id: e,
|
|
2332
|
-
iconSvg:
|
|
2142
|
+
iconSvg: N("template"),
|
|
2333
2143
|
label: "模板",
|
|
2334
|
-
title:
|
|
2335
|
-
active:
|
|
2336
|
-
disabled:
|
|
2144
|
+
title: q ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : k ? `模板已加载:${V || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式(边框 / 字体 / 列宽 / 合并 等);模板的文字内容会被丢弃",
|
|
2145
|
+
active: k,
|
|
2146
|
+
disabled: q,
|
|
2337
2147
|
items: [
|
|
2338
|
-
|
|
2148
|
+
P({
|
|
2339
2149
|
id: "tpl-default",
|
|
2340
|
-
label: (
|
|
2150
|
+
label: (k ? "" : "✓ ") + "默认渲染",
|
|
2341
2151
|
title: "不套模板,数据按默认样式渲染",
|
|
2342
|
-
disabled: !
|
|
2343
|
-
onClick:
|
|
2152
|
+
disabled: !k,
|
|
2153
|
+
onClick: wt
|
|
2344
2154
|
}),
|
|
2345
|
-
|
|
2346
|
-
|
|
2155
|
+
P({ id: "tpl-sep", type: "separator" }),
|
|
2156
|
+
P({
|
|
2347
2157
|
id: "tpl-import",
|
|
2348
2158
|
label: "导入 .xlsx 模板…",
|
|
2349
2159
|
title: "选一份 .xlsx,把它的 styling(边框/字体/列宽/合并/freeze) 套到当前 JSON 数据上;模板的文字内容会被丢弃",
|
|
2350
|
-
onClick:
|
|
2160
|
+
onClick: aa
|
|
2351
2161
|
}),
|
|
2352
|
-
|
|
2162
|
+
P({
|
|
2353
2163
|
id: "tpl-clear",
|
|
2354
2164
|
label: "清除模板",
|
|
2355
2165
|
title: "切回默认样式渲染",
|
|
2356
|
-
disabled: !
|
|
2357
|
-
onClick:
|
|
2166
|
+
disabled: !k,
|
|
2167
|
+
onClick: wt
|
|
2358
2168
|
})
|
|
2359
2169
|
]
|
|
2360
2170
|
});
|
|
2361
2171
|
}
|
|
2362
2172
|
case "image-tools": {
|
|
2363
|
-
const
|
|
2364
|
-
return
|
|
2173
|
+
const k = J.value, V = t == null ? void 0 : t.getActiveCell(), q = ((I = (w = ge.value) == null ? void 0 : w.images.length) != null ? I : 0) > 0;
|
|
2174
|
+
return P({
|
|
2365
2175
|
id: e,
|
|
2366
|
-
iconSvg:
|
|
2176
|
+
iconSvg: N("image-tools"),
|
|
2367
2177
|
label: "图片工具",
|
|
2368
2178
|
title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
|
|
2369
|
-
disabled: !
|
|
2179
|
+
disabled: !n.editable,
|
|
2370
2180
|
items: [
|
|
2371
|
-
|
|
2181
|
+
P({
|
|
2372
2182
|
id: "img-sel-to-cell",
|
|
2373
2183
|
label: "选区:浮动 → 嵌入",
|
|
2374
2184
|
title: '把选区里"中心格在选区内"的浮动图,就近嵌入',
|
|
2375
|
-
disabled: !
|
|
2376
|
-
onClick: () =>
|
|
2185
|
+
disabled: !k || !q,
|
|
2186
|
+
onClick: () => k && (t == null ? void 0 : t.convertImagesInRangeToCell(k))
|
|
2377
2187
|
}),
|
|
2378
|
-
|
|
2188
|
+
P({
|
|
2379
2189
|
id: "img-sel-to-float",
|
|
2380
2190
|
label: "选区:嵌入 → 浮动",
|
|
2381
2191
|
title: "把选区内所有 DISPIMG 格拎成浮动图",
|
|
2382
|
-
disabled: !
|
|
2383
|
-
onClick: () =>
|
|
2192
|
+
disabled: !k,
|
|
2193
|
+
onClick: () => k && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(k))
|
|
2384
2194
|
}),
|
|
2385
|
-
|
|
2386
|
-
|
|
2195
|
+
P({ id: "img-sep", type: "separator" }),
|
|
2196
|
+
P({
|
|
2387
2197
|
id: "img-all-to-cell",
|
|
2388
2198
|
label: "整表:浮动 → 嵌入",
|
|
2389
2199
|
title: "全表浮动图按几何就近嵌入各自单元格",
|
|
2390
|
-
disabled: !
|
|
2200
|
+
disabled: !q,
|
|
2391
2201
|
onClick: () => t == null ? void 0 : t.convertAllImagesToCells()
|
|
2392
2202
|
}),
|
|
2393
|
-
|
|
2203
|
+
P({
|
|
2394
2204
|
id: "img-col-to-cell",
|
|
2395
2205
|
label: "整列:浮动 → 嵌入(活动列)",
|
|
2396
2206
|
title: "把中心落在活动列的浮动图就近嵌入",
|
|
2397
|
-
disabled: !
|
|
2398
|
-
onClick: () =>
|
|
2207
|
+
disabled: !q || !V,
|
|
2208
|
+
onClick: () => V && (t == null ? void 0 : t.convertAllImagesToCells(V.col))
|
|
2399
2209
|
})
|
|
2400
2210
|
]
|
|
2401
2211
|
});
|
|
2402
2212
|
}
|
|
2403
2213
|
case "freeze": {
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2214
|
+
const k = (b = ge.value) == null ? void 0 : b.freeze;
|
|
2215
|
+
return P({
|
|
2406
2216
|
id: e,
|
|
2407
|
-
iconSvg:
|
|
2217
|
+
iconSvg: N("freeze"),
|
|
2408
2218
|
label: "冻结",
|
|
2409
2219
|
title: "冻结/取消冻结(在活动单元格)",
|
|
2410
|
-
active: !!(
|
|
2411
|
-
onClick:
|
|
2220
|
+
active: !!(k && (k.frozenRows || k.frozenCols)),
|
|
2221
|
+
onClick: Ba
|
|
2412
2222
|
});
|
|
2413
2223
|
}
|
|
2414
2224
|
case "export":
|
|
2415
|
-
return
|
|
2225
|
+
return P({
|
|
2416
2226
|
id: e,
|
|
2417
|
-
iconSvg:
|
|
2227
|
+
iconSvg: N("export"),
|
|
2418
2228
|
label: "导出",
|
|
2419
2229
|
title: "导出 / 打印",
|
|
2420
2230
|
items: [
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2231
|
+
P({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void Pe() }),
|
|
2232
|
+
P({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: _t }),
|
|
2233
|
+
P({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: zt }),
|
|
2234
|
+
P({ id: "export-print", label: "打印…", onClick: () => void Me() }),
|
|
2235
|
+
P({ id: "export-sep", type: "separator" }),
|
|
2236
|
+
P({ id: "export-settings", label: "导出设置…", onClick: () => De.value = !0 })
|
|
2427
2237
|
]
|
|
2428
2238
|
});
|
|
2429
2239
|
case "zoom":
|
|
2430
|
-
return
|
|
2240
|
+
return P({
|
|
2431
2241
|
id: e,
|
|
2432
|
-
iconSvg:
|
|
2433
|
-
label: Math.round(
|
|
2242
|
+
iconSvg: N("zoom"),
|
|
2243
|
+
label: Math.round(j.value * 100) + "%",
|
|
2434
2244
|
title: "缩放",
|
|
2435
2245
|
items: [50, 75, 100, 125, 150, 200].map(
|
|
2436
|
-
(
|
|
2246
|
+
(k) => P({ id: "zoom-" + k, label: k + "%", active: Math.round(j.value * 100) === k, onClick: () => j.value = k / 100 })
|
|
2437
2247
|
)
|
|
2438
2248
|
});
|
|
2439
2249
|
default:
|
|
2440
2250
|
return null;
|
|
2441
2251
|
}
|
|
2442
2252
|
}
|
|
2443
|
-
function
|
|
2444
|
-
var
|
|
2253
|
+
function mt(e, a) {
|
|
2254
|
+
var s, o, w;
|
|
2445
2255
|
return {
|
|
2446
2256
|
id: e.id,
|
|
2447
2257
|
type: e.type,
|
|
@@ -2449,497 +2259,429 @@ const Ia = { class: "toolbar" }, Ta = ["title"], Pa = {
|
|
|
2449
2259
|
icon: e.icon,
|
|
2450
2260
|
label: e.label,
|
|
2451
2261
|
title: e.title,
|
|
2452
|
-
active: !!((
|
|
2453
|
-
disabled: !!((
|
|
2454
|
-
onClick: e.onClick ? () => e.onClick(
|
|
2455
|
-
items: (
|
|
2456
|
-
kind:
|
|
2262
|
+
active: !!((s = e.active) != null && s.call(e, Ae)),
|
|
2263
|
+
disabled: !!((o = e.disabled) != null && o.call(e, Ae)),
|
|
2264
|
+
onClick: e.onClick ? () => e.onClick(Ae) : void 0,
|
|
2265
|
+
items: (w = e.items) == null ? void 0 : w.map((I) => mt(I, a)),
|
|
2266
|
+
kind: a
|
|
2457
2267
|
};
|
|
2458
2268
|
}
|
|
2459
|
-
function
|
|
2460
|
-
var
|
|
2461
|
-
const
|
|
2462
|
-
for (const
|
|
2463
|
-
if (
|
|
2464
|
-
|
|
2465
|
-
else if (
|
|
2466
|
-
|
|
2467
|
-
else if (
|
|
2468
|
-
|
|
2269
|
+
function Oa(e, a) {
|
|
2270
|
+
var o, w, I;
|
|
2271
|
+
const s = [];
|
|
2272
|
+
for (const b of e)
|
|
2273
|
+
if (bs(b))
|
|
2274
|
+
s.push({ id: "br-" + s.length, type: "rowbreak", kind: "builtin" });
|
|
2275
|
+
else if (ks(b))
|
|
2276
|
+
s.push({ id: "sep-" + s.length, type: "separator", kind: "builtin" });
|
|
2277
|
+
else if (a[b])
|
|
2278
|
+
s.push(mt(a[b], "custom"));
|
|
2469
2279
|
else {
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2280
|
+
const k = La(b);
|
|
2281
|
+
k && (k.size = (I = (w = k.size) != null ? w : (o = Cs[b]) == null ? void 0 : o.size) != null ? I : "small", s.push(k));
|
|
2472
2282
|
}
|
|
2473
|
-
return
|
|
2283
|
+
return s;
|
|
2474
2284
|
}
|
|
2475
|
-
const
|
|
2476
|
-
() =>
|
|
2477
|
-
ribbon:
|
|
2478
|
-
toolbar:
|
|
2479
|
-
userState:
|
|
2285
|
+
const Ot = E(() => fs(n.ribbon, n.toolbar)), _e = E(() => n.ribbonPersistKey === null ? null : n.ribbonPersistKey || cs), Ue = S(_e.value ? rs(_e.value) : null), pe = E(
|
|
2286
|
+
() => Xt({
|
|
2287
|
+
ribbon: n.ribbon,
|
|
2288
|
+
toolbar: n.toolbar,
|
|
2289
|
+
userState: Ot.value && _e.value ? Ue.value : null
|
|
2480
2290
|
})
|
|
2481
|
-
),
|
|
2482
|
-
|
|
2483
|
-
|
|
2291
|
+
), ne = S("");
|
|
2292
|
+
_(
|
|
2293
|
+
pe,
|
|
2484
2294
|
(e) => {
|
|
2485
|
-
e.sections && (e.sections.some((
|
|
2295
|
+
e.sections && (e.sections.some((a) => a.id === ne.value) || (ne.value = e.activeSectionId));
|
|
2486
2296
|
},
|
|
2487
2297
|
{ immediate: !0 }
|
|
2488
2298
|
);
|
|
2489
|
-
const
|
|
2490
|
-
var
|
|
2491
|
-
|
|
2492
|
-
const e =
|
|
2299
|
+
const Ht = E(() => {
|
|
2300
|
+
var w, I;
|
|
2301
|
+
me.value, te.value, dt.value, Lt.value;
|
|
2302
|
+
const e = pe.value;
|
|
2493
2303
|
if (!e.sections) return [];
|
|
2494
|
-
const
|
|
2495
|
-
for (const
|
|
2496
|
-
return
|
|
2497
|
-
}),
|
|
2498
|
-
function
|
|
2499
|
-
const
|
|
2500
|
-
|
|
2501
|
-
}
|
|
2502
|
-
function
|
|
2503
|
-
var
|
|
2504
|
-
const e =
|
|
2505
|
-
|
|
2506
|
-
sections: (
|
|
2507
|
-
activeSectionId:
|
|
2508
|
-
catalog:
|
|
2509
|
-
zoom:
|
|
2510
|
-
editable: (
|
|
2511
|
-
cellImageFit: (
|
|
2512
|
-
pasteBehavior: (
|
|
2513
|
-
onRibbonChange: (
|
|
2514
|
-
|
|
2304
|
+
const a = (w = e.sections.find((b) => b.id === ne.value)) != null ? w : e.sections[0], s = gs(a).map((b) => ({ id: b.id, name: b.name, items: Oa(b.tools, e.customItems) })), o = [];
|
|
2305
|
+
for (const b of C.value) for (const k of (I = b.toolbar) != null ? I : []) o.push(mt(k, "plugin"));
|
|
2306
|
+
return o.length && (s.length ? s[s.length - 1].items.push(...o) : s.push({ id: "plugins", name: "", items: o })), s;
|
|
2307
|
+
}), Nt = E(() => Ht.value.flatMap((e) => e.items)), Vt = Nt, Ha = E(() => !!pe.value.sections && Nt.value.length > 0), Na = E(() => Ot.value), Wt = new ms();
|
|
2308
|
+
function Va(e, a) {
|
|
2309
|
+
const s = _e.value;
|
|
2310
|
+
Ue.value = { v: 1, sections: e, activeSectionId: a }, s && hs(s, Ue.value);
|
|
2311
|
+
}
|
|
2312
|
+
function Wa() {
|
|
2313
|
+
var a, s, o, w, I;
|
|
2314
|
+
const e = pe.value;
|
|
2315
|
+
Wt.show({
|
|
2316
|
+
sections: (a = e.sections) != null ? a : [],
|
|
2317
|
+
activeSectionId: ne.value,
|
|
2318
|
+
catalog: ys,
|
|
2319
|
+
zoom: j.value,
|
|
2320
|
+
editable: (s = l.value) != null ? s : !!n.editable,
|
|
2321
|
+
cellImageFit: (w = (o = u.value) != null ? o : n.cellImageFit) != null ? w : "fill",
|
|
2322
|
+
pasteBehavior: (I = t == null ? void 0 : t.getPasteBehavior()) != null ? I : Gt,
|
|
2323
|
+
onRibbonChange: (b, k) => {
|
|
2324
|
+
Va(b, k), ne.value = k;
|
|
2515
2325
|
},
|
|
2516
|
-
onRuntimeChange: (
|
|
2517
|
-
|
|
2326
|
+
onRuntimeChange: (b) => {
|
|
2327
|
+
b.zoom != null && (j.value = b.zoom), b.editable != null && (l.value = b.editable, H("update:editable", b.editable)), b.cellImageFit != null && (u.value = b.cellImageFit, t == null || t.setCellImageFit(b.cellImageFit), H("update:cellImageFit", b.cellImageFit)), b.pasteBehavior != null && (t == null || t.setPasteBehavior(b.pasteBehavior));
|
|
2518
2328
|
},
|
|
2519
2329
|
onReset: () => {
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2522
|
-
const
|
|
2523
|
-
|
|
2330
|
+
const b = _e.value;
|
|
2331
|
+
b && Ss(b), Ue.value = null;
|
|
2332
|
+
const k = Xt({ ribbon: n.ribbon, toolbar: n.toolbar, userState: null });
|
|
2333
|
+
ne.value = k.activeSectionId;
|
|
2524
2334
|
}
|
|
2525
2335
|
});
|
|
2526
2336
|
}
|
|
2527
|
-
const
|
|
2528
|
-
let
|
|
2529
|
-
function
|
|
2530
|
-
var
|
|
2531
|
-
e === "dirty-change" && (
|
|
2337
|
+
const je = /* @__PURE__ */ new Map();
|
|
2338
|
+
let Je = [];
|
|
2339
|
+
function be(e, a) {
|
|
2340
|
+
var s;
|
|
2341
|
+
e === "dirty-change" && (Pt.value = !!(a != null && a.dirty)), H(e, a), (s = je.get(e)) == null || s.forEach((o) => o(a));
|
|
2532
2342
|
}
|
|
2533
|
-
function
|
|
2534
|
-
var
|
|
2535
|
-
|
|
2536
|
-
const e = (
|
|
2537
|
-
let
|
|
2538
|
-
|
|
2539
|
-
},
|
|
2540
|
-
for (const
|
|
2541
|
-
if (
|
|
2542
|
-
for (const [
|
|
2543
|
-
const
|
|
2544
|
-
typeof
|
|
2343
|
+
function Ut() {
|
|
2344
|
+
var s;
|
|
2345
|
+
Je.forEach((o) => o()), Je = [], je.clear();
|
|
2346
|
+
const e = (o, w) => {
|
|
2347
|
+
let I = je.get(o);
|
|
2348
|
+
I || je.set(o, I = /* @__PURE__ */ new Set()), I.add(w);
|
|
2349
|
+
}, a = { viewer: Ae, on: e, redraw: () => He() };
|
|
2350
|
+
for (const o of C.value) {
|
|
2351
|
+
if (o.events)
|
|
2352
|
+
for (const [I, b] of Object.entries(o.events)) b && e(I, b);
|
|
2353
|
+
const w = (s = o.setup) == null ? void 0 : s.call(o, a);
|
|
2354
|
+
typeof w == "function" && Je.push(w);
|
|
2545
2355
|
}
|
|
2546
2356
|
}
|
|
2547
|
-
const
|
|
2548
|
-
let
|
|
2549
|
-
function
|
|
2550
|
-
const e = { rectOf:
|
|
2551
|
-
|
|
2357
|
+
const ft = S(null);
|
|
2358
|
+
let ce = null;
|
|
2359
|
+
function Ua() {
|
|
2360
|
+
const e = { rectOf: lt, rectOfRange: ot, tick: me.value, workbook: T.value };
|
|
2361
|
+
ce == null || ce.render(C.value, e);
|
|
2552
2362
|
}
|
|
2553
|
-
return
|
|
2363
|
+
return _([me, C], Ua, { flush: "post" }), (e, a) => (d(), v("div", {
|
|
2554
2364
|
class: "excel-viewer",
|
|
2555
2365
|
ref_key: "rootEl",
|
|
2556
|
-
ref:
|
|
2557
|
-
onKeydown:
|
|
2366
|
+
ref: la,
|
|
2367
|
+
onKeydown: Da
|
|
2558
2368
|
}, [
|
|
2559
|
-
|
|
2369
|
+
R(T) ? le(e.$slots, "header", {
|
|
2560
2370
|
key: 0,
|
|
2561
|
-
workbook:
|
|
2562
|
-
zoom:
|
|
2563
|
-
setZoom: (
|
|
2564
|
-
downloadImage:
|
|
2565
|
-
downloadPdf:
|
|
2566
|
-
print:
|
|
2371
|
+
workbook: R(T),
|
|
2372
|
+
zoom: j.value,
|
|
2373
|
+
setZoom: (s) => j.value = s,
|
|
2374
|
+
downloadImage: Pe,
|
|
2375
|
+
downloadPdf: Re,
|
|
2376
|
+
print: Me
|
|
2567
2377
|
}, () => [
|
|
2568
|
-
|
|
2569
|
-
"file-name":
|
|
2570
|
-
modified:
|
|
2571
|
-
"template-name":
|
|
2572
|
-
"sheet-count":
|
|
2378
|
+
Kt(Os, {
|
|
2379
|
+
"file-name": ia.value,
|
|
2380
|
+
modified: Pt.value,
|
|
2381
|
+
"template-name": ht.value,
|
|
2382
|
+
"sheet-count": R(T).sheets.filter((s) => s.state === "visible").length,
|
|
2573
2383
|
"file-size": ve.value,
|
|
2574
|
-
"data-bytes":
|
|
2575
|
-
"heap-bytes":
|
|
2576
|
-
zoom:
|
|
2577
|
-
"onUpdate:zoom":
|
|
2578
|
-
onExportImage:
|
|
2579
|
-
onExportPdf:
|
|
2580
|
-
onExportPdfVector:
|
|
2581
|
-
onExportXlsx:
|
|
2582
|
-
onExportCsv:
|
|
2583
|
-
onExportJson:
|
|
2584
|
-
onPrint:
|
|
2585
|
-
onOpenSettings:
|
|
2384
|
+
"data-bytes": Oe.value,
|
|
2385
|
+
"heap-bytes": xe.value,
|
|
2386
|
+
zoom: j.value,
|
|
2387
|
+
"onUpdate:zoom": a[0] || (a[0] = (s) => j.value = s),
|
|
2388
|
+
onExportImage: a[1] || (a[1] = (s) => Pe()),
|
|
2389
|
+
onExportPdf: _t,
|
|
2390
|
+
onExportPdfVector: zt,
|
|
2391
|
+
onExportXlsx: a[2] || (a[2] = (s) => Ia()),
|
|
2392
|
+
onExportCsv: a[3] || (a[3] = (s) => Ta()),
|
|
2393
|
+
onExportJson: a[4] || (a[4] = (s) => Ea()),
|
|
2394
|
+
onPrint: a[5] || (a[5] = (s) => Me()),
|
|
2395
|
+
onOpenSettings: a[6] || (a[6] = (s) => De.value = !0)
|
|
2586
2396
|
}, null, 8, ["file-name", "modified", "template-name", "sheet-count", "file-size", "data-bytes", "heap-bytes", "zoom"])
|
|
2587
|
-
], !0) :
|
|
2588
|
-
|
|
2397
|
+
], !0) : h("", !0),
|
|
2398
|
+
R(T) && Ha.value ? le(e.$slots, "toolbar", {
|
|
2589
2399
|
key: 1,
|
|
2590
|
-
items:
|
|
2400
|
+
items: R(Vt)
|
|
2591
2401
|
}, () => [
|
|
2592
|
-
|
|
2402
|
+
pe.value.singleSection ? (d(), se(Di, {
|
|
2593
2403
|
key: 1,
|
|
2594
|
-
items:
|
|
2595
|
-
}, null, 8, ["items"])) : (
|
|
2404
|
+
items: R(Vt)
|
|
2405
|
+
}, null, 8, ["items"])) : (d(), se(tn, {
|
|
2596
2406
|
key: 0,
|
|
2597
|
-
sections:
|
|
2598
|
-
"active-section-id":
|
|
2599
|
-
groups:
|
|
2600
|
-
"show-settings":
|
|
2601
|
-
"onUpdate:activeSectionId":
|
|
2602
|
-
onOpenSettings:
|
|
2407
|
+
sections: pe.value.sections,
|
|
2408
|
+
"active-section-id": ne.value,
|
|
2409
|
+
groups: Ht.value,
|
|
2410
|
+
"show-settings": Na.value,
|
|
2411
|
+
"onUpdate:activeSectionId": a[7] || (a[7] = (s) => ne.value = s),
|
|
2412
|
+
onOpenSettings: Wa
|
|
2603
2413
|
}, null, 8, ["sections", "active-section-id", "groups", "show-settings"]))
|
|
2604
|
-
], !0) :
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2414
|
+
], !0) : h("", !0),
|
|
2415
|
+
R(T) && va.value ? (d(), v("div", vn, [
|
|
2416
|
+
i("span", mn, $(it.value || "—"), 1),
|
|
2417
|
+
a[10] || (a[10] = i("span", { class: "fx" }, "fx", -1)),
|
|
2418
|
+
fa.value ? (d(), v("textarea", {
|
|
2609
2419
|
key: 0,
|
|
2610
2420
|
ref_key: "fbEl",
|
|
2611
|
-
ref:
|
|
2421
|
+
ref: Dt,
|
|
2612
2422
|
class: "content content-input",
|
|
2613
|
-
value:
|
|
2614
|
-
title:
|
|
2423
|
+
value: ae.value,
|
|
2424
|
+
title: ae.value,
|
|
2615
2425
|
rows: "1",
|
|
2616
2426
|
spellcheck: "false",
|
|
2617
|
-
onFocus:
|
|
2618
|
-
onInput:
|
|
2619
|
-
onKeydown:
|
|
2620
|
-
onBlur:
|
|
2621
|
-
}, null, 40,
|
|
2427
|
+
onFocus: ca,
|
|
2428
|
+
onInput: ma,
|
|
2429
|
+
onKeydown: pa,
|
|
2430
|
+
onBlur: ga
|
|
2431
|
+
}, null, 40, fn)) : (d(), v("span", {
|
|
2622
2432
|
key: 1,
|
|
2623
2433
|
class: "content",
|
|
2624
|
-
title:
|
|
2625
|
-
},
|
|
2626
|
-
])) :
|
|
2627
|
-
|
|
2434
|
+
title: Mt.value
|
|
2435
|
+
}, $(Mt.value), 9, cn))
|
|
2436
|
+
])) : h("", !0),
|
|
2437
|
+
i("div", {
|
|
2628
2438
|
class: "render-area",
|
|
2629
2439
|
ref_key: "renderAreaEl",
|
|
2630
|
-
ref:
|
|
2440
|
+
ref: Fe
|
|
2631
2441
|
}, [
|
|
2632
|
-
|
|
2442
|
+
i("canvas", {
|
|
2633
2443
|
ref_key: "canvasEl",
|
|
2634
|
-
ref:
|
|
2444
|
+
ref: Ze,
|
|
2635
2445
|
class: "grid-canvas"
|
|
2636
2446
|
}, null, 512),
|
|
2637
|
-
|
|
2447
|
+
i("div", {
|
|
2638
2448
|
class: "ov",
|
|
2639
2449
|
ref_key: "ovMain",
|
|
2640
|
-
ref:
|
|
2450
|
+
ref: Ye
|
|
2641
2451
|
}, null, 512),
|
|
2642
|
-
|
|
2452
|
+
i("div", {
|
|
2643
2453
|
class: "ov",
|
|
2644
2454
|
ref_key: "ovFCol",
|
|
2645
|
-
ref:
|
|
2455
|
+
ref: Qe
|
|
2646
2456
|
}, null, 512),
|
|
2647
|
-
|
|
2457
|
+
i("div", {
|
|
2648
2458
|
class: "ov",
|
|
2649
2459
|
ref_key: "ovFRow",
|
|
2650
|
-
ref:
|
|
2460
|
+
ref: qe
|
|
2651
2461
|
}, null, 512),
|
|
2652
|
-
|
|
2462
|
+
i("div", {
|
|
2653
2463
|
class: "ov",
|
|
2654
2464
|
ref_key: "ovCorner",
|
|
2655
|
-
ref:
|
|
2465
|
+
ref: et
|
|
2656
2466
|
}, null, 512),
|
|
2657
|
-
|
|
2467
|
+
i("div", {
|
|
2658
2468
|
class: "scroller",
|
|
2659
2469
|
ref_key: "scrollerEl",
|
|
2660
|
-
ref:
|
|
2470
|
+
ref: re,
|
|
2661
2471
|
tabindex: "0",
|
|
2662
|
-
onScroll:
|
|
2663
|
-
onMousedown:
|
|
2664
|
-
onMousemove:
|
|
2665
|
-
onMouseup:
|
|
2666
|
-
onMouseleave:
|
|
2667
|
-
onDblclick:
|
|
2668
|
-
onKeydown:
|
|
2669
|
-
onContextmenu:
|
|
2472
|
+
onScroll: da,
|
|
2473
|
+
onMousedown: ba,
|
|
2474
|
+
onMousemove: Ca,
|
|
2475
|
+
onMouseup: ya,
|
|
2476
|
+
onMouseleave: Sa,
|
|
2477
|
+
onDblclick: xa,
|
|
2478
|
+
onKeydown: ha,
|
|
2479
|
+
onContextmenu: ka
|
|
2670
2480
|
}, [
|
|
2671
|
-
|
|
2481
|
+
i("div", {
|
|
2672
2482
|
class: "spacer",
|
|
2673
2483
|
ref_key: "spacerEl",
|
|
2674
|
-
ref:
|
|
2484
|
+
ref: tt
|
|
2675
2485
|
}, null, 512)
|
|
2676
2486
|
], 544),
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
"match-case": be.value.matchCase,
|
|
2683
|
-
"whole-cell": be.value.wholeCell,
|
|
2684
|
-
editable: !!l.editable,
|
|
2685
|
-
replace: be.value.replace,
|
|
2686
|
-
"onUpdate:query": s[8] || (s[8] = (a) => {
|
|
2687
|
-
var i;
|
|
2688
|
-
return (i = h(t)) == null ? void 0 : i.setFindQuery(a);
|
|
2689
|
-
}),
|
|
2690
|
-
"onUpdate:matchCase": s[9] || (s[9] = (a) => {
|
|
2691
|
-
var i;
|
|
2692
|
-
return (i = h(t)) == null ? void 0 : i.setFindMatchCase(a);
|
|
2693
|
-
}),
|
|
2694
|
-
"onUpdate:wholeCell": s[10] || (s[10] = (a) => {
|
|
2695
|
-
var i;
|
|
2696
|
-
return (i = h(t)) == null ? void 0 : i.setFindWholeCell(a);
|
|
2697
|
-
}),
|
|
2698
|
-
"onUpdate:replace": s[11] || (s[11] = (a) => {
|
|
2699
|
-
var i;
|
|
2700
|
-
return (i = h(t)) == null ? void 0 : i.setFindReplace(a);
|
|
2701
|
-
}),
|
|
2702
|
-
onNext: s[12] || (s[12] = (a) => {
|
|
2703
|
-
var i;
|
|
2704
|
-
return (i = h(t)) == null ? void 0 : i.findNext();
|
|
2705
|
-
}),
|
|
2706
|
-
onPrev: s[13] || (s[13] = (a) => {
|
|
2707
|
-
var i;
|
|
2708
|
-
return (i = h(t)) == null ? void 0 : i.findPrev();
|
|
2709
|
-
}),
|
|
2710
|
-
onReplaceOne: s[14] || (s[14] = (a) => {
|
|
2711
|
-
var i;
|
|
2712
|
-
return (i = h(t)) == null ? void 0 : i.replaceCurrent();
|
|
2713
|
-
}),
|
|
2714
|
-
onReplaceAll: s[15] || (s[15] = (a) => {
|
|
2715
|
-
var i;
|
|
2716
|
-
return (i = h(t)) == null ? void 0 : i.replaceAll();
|
|
2717
|
-
}),
|
|
2718
|
-
onClose: Ut
|
|
2719
|
-
}, null, 8, ["query", "match-count", "current", "match-case", "whole-cell", "editable", "replace"])) : w("", !0),
|
|
2720
|
-
fe.value ? (u(), Z(Rn, {
|
|
2721
|
-
key: 1,
|
|
2722
|
-
values: fe.value.values,
|
|
2723
|
-
selected: fe.value.selected,
|
|
2724
|
-
x: fe.value.x,
|
|
2725
|
-
y: fe.value.y,
|
|
2726
|
-
"sort-dir": fe.value.sortDir,
|
|
2727
|
-
onApply: s[16] || (s[16] = (a) => {
|
|
2728
|
-
var i;
|
|
2729
|
-
return (i = h(t)) == null ? void 0 : i.applyFilterSelection(a);
|
|
2730
|
-
}),
|
|
2731
|
-
onClear: s[17] || (s[17] = (a) => {
|
|
2732
|
-
var i;
|
|
2733
|
-
return (i = h(t)) == null ? void 0 : i.clearFilterColumn();
|
|
2734
|
-
}),
|
|
2735
|
-
onClose: s[18] || (s[18] = (a) => {
|
|
2736
|
-
var i;
|
|
2737
|
-
return (i = h(t)) == null ? void 0 : i.closeFilterPopup();
|
|
2738
|
-
}),
|
|
2739
|
-
onSort: s[19] || (s[19] = (a) => {
|
|
2740
|
-
var F, $, C;
|
|
2741
|
-
const i = (F = fe.value) == null ? void 0 : F.col;
|
|
2742
|
-
($ = h(t)) == null || $.closeFilterPopup(), i != null && ((C = h(t)) == null || C.sortColumn(i, a));
|
|
2743
|
-
})
|
|
2744
|
-
}, null, 8, ["values", "selected", "x", "y", "sort-dir"])) : w("", !0),
|
|
2745
|
-
n("div", Ll, [
|
|
2746
|
-
ue(e.$slots, "overlay", {
|
|
2747
|
-
rectOf: ct,
|
|
2748
|
-
rectOfRange: rt,
|
|
2749
|
-
tick: re.value
|
|
2487
|
+
i("div", rn, [
|
|
2488
|
+
le(e.$slots, "overlay", {
|
|
2489
|
+
rectOf: lt,
|
|
2490
|
+
rectOfRange: ot,
|
|
2491
|
+
tick: me.value
|
|
2750
2492
|
}, void 0, !0),
|
|
2751
|
-
|
|
2493
|
+
i("div", {
|
|
2752
2494
|
ref_key: "pluginOvEl",
|
|
2753
|
-
ref:
|
|
2495
|
+
ref: ft
|
|
2754
2496
|
}, null, 512)
|
|
2755
2497
|
]),
|
|
2756
|
-
|
|
2498
|
+
i("div", {
|
|
2757
2499
|
class: "editor-slot",
|
|
2758
2500
|
ref_key: "editorSlotEl",
|
|
2759
|
-
ref:
|
|
2501
|
+
ref: at
|
|
2760
2502
|
}, null, 512),
|
|
2761
|
-
|
|
2762
|
-
key:
|
|
2763
|
-
class:
|
|
2764
|
-
style:
|
|
2765
|
-
},
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
progress:
|
|
2769
|
-
label:
|
|
2770
|
-
pct:
|
|
2503
|
+
fe.value ? (d(), v("div", {
|
|
2504
|
+
key: 0,
|
|
2505
|
+
class: ee(["cell-tooltip", fe.value.kind]),
|
|
2506
|
+
style: Ke({ left: fe.value.x + "px", top: fe.value.y + "px" })
|
|
2507
|
+
}, $(fe.value.text), 7)) : h("", !0),
|
|
2508
|
+
R(z) ? (d(), v("div", gn, [
|
|
2509
|
+
le(e.$slots, "loading", {
|
|
2510
|
+
progress: R(A),
|
|
2511
|
+
label: Et.value,
|
|
2512
|
+
pct: he.value
|
|
2771
2513
|
}, () => [
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2514
|
+
i("div", pn, [
|
|
2515
|
+
i("div", bn, [
|
|
2516
|
+
L($(Et.value), 1),
|
|
2517
|
+
he.value != null ? (d(), v("span", kn, $(he.value) + "%", 1)) : h("", !0)
|
|
2776
2518
|
]),
|
|
2777
|
-
|
|
2778
|
-
|
|
2519
|
+
i("div", Cn, [
|
|
2520
|
+
he.value != null ? (d(), v("div", {
|
|
2779
2521
|
key: 0,
|
|
2780
2522
|
class: "loader-fill",
|
|
2781
|
-
style:
|
|
2782
|
-
}, null, 4)) : (
|
|
2523
|
+
style: Ke({ width: he.value + "%" })
|
|
2524
|
+
}, null, 4)) : (d(), v("div", yn))
|
|
2783
2525
|
])
|
|
2784
2526
|
])
|
|
2785
2527
|
], !0)
|
|
2786
|
-
])) :
|
|
2787
|
-
|
|
2788
|
-
|
|
2528
|
+
])) : R(K) ? (d(), v("div", Sn, [
|
|
2529
|
+
le(e.$slots, "error", { error: R(K) }, () => [
|
|
2530
|
+
L("解析失败:" + $(R(K)), 1)
|
|
2789
2531
|
], !0)
|
|
2790
|
-
])) :
|
|
2791
|
-
|
|
2792
|
-
|
|
2532
|
+
])) : R(T) ? h("", !0) : (d(), v("div", xn, [
|
|
2533
|
+
le(e.$slots, "empty", {}, () => [
|
|
2534
|
+
a[11] || (a[11] = L("拖入或选择一个 .xlsx 文件", -1))
|
|
2793
2535
|
], !0)
|
|
2794
2536
|
]))
|
|
2795
2537
|
], 512),
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
stats:
|
|
2799
|
-
range:
|
|
2538
|
+
R(T) ? (d(), v("div", hn, [
|
|
2539
|
+
le(e.$slots, "statusbar", {
|
|
2540
|
+
stats: G.value,
|
|
2541
|
+
range: Rt.value || it.value
|
|
2800
2542
|
}, () => [
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
], 64)) :
|
|
2543
|
+
i("span", Fn, $(Rt.value || it.value), 1),
|
|
2544
|
+
a[12] || (a[12] = i("div", { class: "grow" }, null, -1)),
|
|
2545
|
+
G.value && G.value.numCount > 0 ? (d(), v(O, { key: 0 }, [
|
|
2546
|
+
i("span", null, "计数 " + $(G.value.count), 1),
|
|
2547
|
+
i("span", null, "求和 " + $(Ve(G.value.sum)), 1),
|
|
2548
|
+
i("span", null, "平均 " + $(Ve(G.value.avg)), 1),
|
|
2549
|
+
i("span", null, "最大 " + $(Ve(G.value.max)), 1),
|
|
2550
|
+
i("span", null, "最小 " + $(Ve(G.value.min)), 1)
|
|
2551
|
+
], 64)) : G.value && G.value.count > 0 ? (d(), v("span", wn, "计数 " + $(G.value.count), 1)) : h("", !0)
|
|
2810
2552
|
], !0)
|
|
2811
|
-
])) :
|
|
2812
|
-
|
|
2813
|
-
key:
|
|
2814
|
-
workbook:
|
|
2815
|
-
active:
|
|
2816
|
-
onSelect:
|
|
2817
|
-
}, null, 8, ["workbook", "active"])) :
|
|
2818
|
-
|
|
2553
|
+
])) : h("", !0),
|
|
2554
|
+
R(T) ? (d(), se(Ws, {
|
|
2555
|
+
key: $t.value,
|
|
2556
|
+
workbook: R(T),
|
|
2557
|
+
active: Z.value,
|
|
2558
|
+
onSelect: a[8] || (a[8] = (s) => Z.value = s)
|
|
2559
|
+
}, null, 8, ["workbook", "active"])) : h("", !0),
|
|
2560
|
+
De.value && R(T) ? (d(), se(oi, {
|
|
2819
2561
|
key: 5,
|
|
2820
2562
|
selection: J.value,
|
|
2821
|
-
"sheet-count":
|
|
2822
|
-
onClose:
|
|
2823
|
-
onExport:
|
|
2824
|
-
}, null, 8, ["selection", "sheet-count"])) :
|
|
2825
|
-
|
|
2563
|
+
"sheet-count": R(T).sheets.filter((s) => s.state === "visible").length,
|
|
2564
|
+
onClose: a[9] || (a[9] = (s) => De.value = !1),
|
|
2565
|
+
onExport: _a
|
|
2566
|
+
}, null, 8, ["selection", "sheet-count"])) : h("", !0),
|
|
2567
|
+
i("input", {
|
|
2826
2568
|
ref_key: "templateInputEl",
|
|
2827
|
-
ref:
|
|
2569
|
+
ref: It,
|
|
2828
2570
|
type: "file",
|
|
2829
2571
|
accept: ".xlsx,.xlsm",
|
|
2830
2572
|
hidden: "",
|
|
2831
|
-
onChange:
|
|
2573
|
+
onChange: sa
|
|
2832
2574
|
}, null, 544),
|
|
2833
|
-
|
|
2575
|
+
m.exportProgress !== !1 ? le(e.$slots, "export-progress", {
|
|
2834
2576
|
key: 6,
|
|
2835
|
-
state:
|
|
2836
|
-
busy:
|
|
2837
|
-
cancel:
|
|
2577
|
+
state: Ee.value,
|
|
2578
|
+
busy: We.value,
|
|
2579
|
+
cancel: Bt
|
|
2838
2580
|
}, () => [
|
|
2839
|
-
|
|
2840
|
-
state:
|
|
2841
|
-
busy:
|
|
2842
|
-
onCancel:
|
|
2581
|
+
Kt(dn, {
|
|
2582
|
+
state: Ee.value,
|
|
2583
|
+
busy: We.value,
|
|
2584
|
+
onCancel: Bt
|
|
2843
2585
|
}, null, 8, ["state", "busy"])
|
|
2844
|
-
], !0) :
|
|
2586
|
+
], !0) : h("", !0)
|
|
2845
2587
|
], 544));
|
|
2846
2588
|
}
|
|
2847
|
-
}),
|
|
2848
|
-
install(
|
|
2849
|
-
|
|
2589
|
+
}), Tn = /* @__PURE__ */ de(In, [["__scopeId", "data-v-fb0591c2"]]), Mn = {
|
|
2590
|
+
install(m) {
|
|
2591
|
+
m.component("ExcelViewer", Tn);
|
|
2850
2592
|
}
|
|
2851
2593
|
};
|
|
2852
2594
|
export {
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2595
|
+
Bn as BuiltinFormulaEngine,
|
|
2596
|
+
_n as CanvasRenderer,
|
|
2597
|
+
zn as CellEditorHost,
|
|
2598
|
+
Gt as DEFAULT_PASTE_BEHAVIOR,
|
|
2599
|
+
Ln as DEFAULT_THEME,
|
|
2600
|
+
On as EditController,
|
|
2601
|
+
Tn as ExcelViewer,
|
|
2602
|
+
Hn as FUNCTION_CATEGORIES,
|
|
2603
|
+
Nn as FUNCTION_NAMES,
|
|
2604
|
+
Vn as GridMetrics,
|
|
2605
|
+
Wn as KEYBOARD_SHORTCUTS,
|
|
2606
|
+
Un as OverlayManager,
|
|
2607
|
+
jn as PASTE_PRESET_VALUES_ONLY,
|
|
2608
|
+
as as PluginOverlayHost,
|
|
2609
|
+
ts as ViewerController,
|
|
2610
|
+
Jn as WorkbookExporter,
|
|
2611
|
+
Kn as addImage,
|
|
2612
|
+
Gn as applyFlashProgram,
|
|
2613
|
+
Xn as applyStyleOverride,
|
|
2614
|
+
Zn as buildCellSnapshot,
|
|
2615
|
+
Yn as builtinFormulaEngineFactory,
|
|
2616
|
+
qn as canvasToBlob,
|
|
2617
|
+
Qn as canvasToDataURL,
|
|
2618
|
+
el as captureStructure,
|
|
2619
|
+
tl as cellContentForEngine,
|
|
2620
|
+
al as cellDisplayText,
|
|
2621
|
+
sl as cellKey,
|
|
2622
|
+
il as clearCell,
|
|
2623
|
+
nl as cloneCell,
|
|
2624
|
+
ll as cloneImageAnchor,
|
|
2625
|
+
ol as cloneWorkbook,
|
|
2626
|
+
ye as colIndexToLetters,
|
|
2627
|
+
Mn as default,
|
|
2628
|
+
ul as defaultFormulaEngineFactory,
|
|
2629
|
+
dl as definePlugin,
|
|
2630
|
+
vl as deleteCols,
|
|
2631
|
+
ml as deleteIntersectsMerge,
|
|
2632
|
+
fl as deleteRows,
|
|
2633
|
+
qt as detectFormat,
|
|
2634
|
+
cl as downloadBlob,
|
|
2635
|
+
es as estimateWorkbookBytes,
|
|
2636
|
+
Qt as finalizeImages,
|
|
2637
|
+
gt as formatBytes,
|
|
2638
|
+
rl as formatValue,
|
|
2639
|
+
Qa as friendlyError,
|
|
2640
|
+
gl as functionMeta,
|
|
2641
|
+
pl as getCell,
|
|
2642
|
+
bl as getCellStyle,
|
|
2643
|
+
ls as getCellText,
|
|
2644
|
+
os as getCellValue,
|
|
2645
|
+
ss as getRangeData,
|
|
2646
|
+
ns as getSheetData,
|
|
2647
|
+
kl as getWorkbookJSON,
|
|
2648
|
+
Cl as hyperFormulaEngineFactory,
|
|
2649
|
+
yl as inferFlashFill,
|
|
2650
|
+
Sl as insertCols,
|
|
2651
|
+
xl as insertRows,
|
|
2652
|
+
hl as internStyle,
|
|
2653
|
+
Fl as isDimCommand,
|
|
2654
|
+
wl as isImageCommand,
|
|
2655
|
+
Il as isStructCommand,
|
|
2656
|
+
us as isWorkbookModel,
|
|
2657
|
+
ds as jsonToWorkbook,
|
|
2658
|
+
Yt as loadArrayBuffer,
|
|
2659
|
+
Tl as makeDefaultStyle,
|
|
2660
|
+
El as mergeStyleOverride,
|
|
2661
|
+
$l as mergeTheme,
|
|
2662
|
+
Pl as openWorkbook,
|
|
2663
|
+
Rl as parseSignature,
|
|
2664
|
+
Ml as parseWorkbook,
|
|
2665
|
+
pt as readHeapUsed,
|
|
2666
|
+
Dl as removeImage,
|
|
2667
|
+
Al as resolveEditable,
|
|
2668
|
+
Bl as resolvePasteBehavior,
|
|
2669
|
+
_l as restoreCell,
|
|
2670
|
+
zl as restoreDimension,
|
|
2671
|
+
Ll as restoreStructure,
|
|
2672
|
+
Ol as restoreWorkbookInto,
|
|
2673
|
+
kt as revokeImages,
|
|
2674
|
+
Hl as rewriteWorkbookFormulas,
|
|
2675
|
+
Nl as setCellValue,
|
|
2676
|
+
Vl as setColumnWidth,
|
|
2677
|
+
Wl as setImageRect,
|
|
2678
|
+
Ul as setRangeValues,
|
|
2679
|
+
jl as setRowHeight,
|
|
2680
|
+
is as sheetToJSON,
|
|
2681
|
+
Jl as shiftFormulaRefs,
|
|
2682
|
+
Kl as synthesizeFlashFill,
|
|
2683
|
+
Gl as toCsv,
|
|
2684
|
+
Xl as toWorkbookJson,
|
|
2685
|
+
Zl as workbookToXlsxBlob,
|
|
2686
|
+
Yl as workbookToXlsxBytes
|
|
2945
2687
|
};
|