@agile-team/mach-report 2.11.2 → 2.12.0
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/README.md +14 -5
- package/THIRD_PARTY_NOTICES.md +270 -0
- package/dist/{ExcelBindingWizard-LWX6G1A2.js → ExcelBindingWizard-CeAf4QSE.js} +2 -2
- package/dist/{ExcelBindingWizard-a4kslPHF.cjs → ExcelBindingWizard-y0mT-AHR.cjs} +1 -1
- package/dist/{RuleEditor-C2QsOHOs.cjs → RuleEditor-ChRzNQuF.cjs} +1 -1
- package/dist/{RuleEditor-D9wQHrkf.js → RuleEditor-DzAmW5YH.js} +1 -1
- package/dist/analytics.d.cts +28 -0
- package/dist/analytics.d.ts +28 -0
- package/dist/assets-C2U-e-Sz.cjs +4 -0
- package/dist/assets-Q0wUwNrV.js +217 -0
- package/dist/code-options-BKXXY7NI.js +18 -0
- package/dist/code-options-BUTChiZZ.cjs +1 -0
- package/dist/codes.cjs +9 -0
- package/dist/codes.d.cts +223 -0
- package/dist/codes.d.ts +223 -0
- package/dist/codes.js +26917 -0
- package/dist/designer.cjs +2 -2
- package/dist/designer.d.cts +267 -0
- package/dist/designer.d.ts +267 -0
- package/dist/designer.js +2737 -1941
- package/dist/grid-strokes-Cr7DwUux.cjs +1 -0
- package/dist/grid-strokes-DyyG1q_o.js +53 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +80 -1
- package/dist/index.d.ts +80 -1
- package/dist/index.js +404 -374
- package/dist/pdf.cjs +76 -59
- package/dist/pdf.d.cts +51 -0
- package/dist/pdf.d.ts +51 -0
- package/dist/pdf.js +32128 -32048
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/{list-cell-ClFra1zS.js → record-bindings-D-5jQlTj.js} +67 -44
- package/dist/{region-binding-workflow-DhQvu1co.cjs → region-binding-workflow-BzfbxRiR.cjs} +1 -1
- package/dist/{region-binding-workflow-CXDmt9Bs.js → region-binding-workflow-CcUq8W2Q.js} +1 -1
- package/dist/server/node.d.cts +52 -1
- package/dist/server/node.d.ts +52 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +239 -210
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +95 -3
- package/dist/server.d.ts +95 -3
- package/dist/server.js +456 -433
- package/dist/style.css +1 -1
- package/dist/{template-registry-WNXdkiET.js → template-registry-BjE1VS6g.js} +221 -157
- package/dist/template-registry-D3SjENi6.cjs +1 -0
- package/dist/template-review-BfCC8Ng9.cjs +2 -0
- package/dist/{template-review-BdcXSYbx.js → template-review-BzpcI-tR.js} +772 -666
- package/dist/validate-BJ5HIWY8.cjs +1 -0
- package/dist/validate-DbgEM1Hh.js +163 -0
- package/dist/vue/async.d.cts +121 -2
- package/dist/vue/async.d.ts +121 -2
- package/dist/vue/index.d.cts +114 -6
- package/dist/vue/index.d.ts +114 -6
- package/dist/{workbook-session-BKOTwcoq.js → workbook-session-BPb3TMnT.js} +1 -1
- package/dist/{workbook-session-CLYLhZWu.cjs → workbook-session-DNa2RHNG.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +52 -1
- package/dist/worker.d.ts +52 -1
- package/dist/worker.js +2 -2
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.d.cts +40 -0
- package/dist/xlsx.d.ts +40 -0
- package/dist/xlsx.js +3 -3
- package/package.json +16 -3
- package/dist/assets-Bu6UohJx.cjs +0 -1
- package/dist/assets-DegqDNqY.js +0 -160
- package/dist/list-cell-BuYn4tGF.cjs +0 -1
- package/dist/template-registry-ukBGlm8N.cjs +0 -1
- package/dist/template-review-BXp2oyqg.cjs +0 -1
- package/dist/textwrap-CWHyzkBH.cjs +0 -4
- package/dist/textwrap-DE1kgcJB.js +0 -110
- package/dist/validate-7s0yn6ii.js +0 -148
- package/dist/validate-DsRiNw8h.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { D as Z, a as ye } from "./defaults-DXhiM1ZD.js";
|
|
2
|
-
import { b as
|
|
3
|
-
import { e as
|
|
4
|
-
import { a as H, r as
|
|
5
|
-
import { C as
|
|
6
|
-
import { i as ee, a as
|
|
7
|
-
import { R as
|
|
8
|
-
import { a as
|
|
9
|
-
import { v as
|
|
10
|
-
import { d as
|
|
11
|
-
import { h as oe, w as
|
|
12
|
-
import { c as
|
|
13
|
-
import { R as
|
|
14
|
-
import { P as
|
|
2
|
+
import { b as Ln, c as Dn, d as Fn, L as On, S as zn } from "./defaults-DXhiM1ZD.js";
|
|
3
|
+
import { R as _n, e as Bn, f as Wn, p as jn, b as Gn, t as Un, d as Vn } from "./record-bindings-D-5jQlTj.js";
|
|
4
|
+
import { a as H, r as _, b as Q, c as W, d as Me, m as ie, e as xe, p as O, f as Ee, P as J } from "./style-CQ1PK8ZB.js";
|
|
5
|
+
import { C as Yn, M as Jn, g as Kn, h as Xn } from "./style-CQ1PK8ZB.js";
|
|
6
|
+
import { i as ee, a as Te } from "./render-plan-Ck6koX9L.js";
|
|
7
|
+
import { R as Qn } from "./render-plan-Ck6koX9L.js";
|
|
8
|
+
import { a as tr, v as nr, b as rr, c as ir } from "./validate-DbgEM1Hh.js";
|
|
9
|
+
import { v as We } from "./dataset-H5pFuQGU.js";
|
|
10
|
+
import { d as ar } from "./dataset-H5pFuQGU.js";
|
|
11
|
+
import { h as oe, r as ae, w as Se } from "./assets-Q0wUwNrV.js";
|
|
12
|
+
import { O as lr, c as cr, a as dr, b as mr, m as hr } from "./assets-Q0wUwNrV.js";
|
|
13
|
+
import { R as je, p as Ge } from "./template-review-BzpcI-tR.js";
|
|
14
|
+
import { D as ur, P as fr, a as pr, b as wr, c as vr, d as br, e as yr, f as Mr, g as xr, h as Er, i as Tr, j as Sr, k as Cr, l as Rr, m as Pr, n as Ar, o as kr, q as Ir, r as Nr, s as $r, t as Lr, u as Dr, v as Fr, w as Or, x as zr, y as Hr, z as _r } from "./template-review-BzpcI-tR.js";
|
|
15
15
|
import { r as Ce } from "./grid-geometry-BNptEcMm.js";
|
|
16
|
-
import { r as Re
|
|
17
|
-
import { O as Dr } from "./assets-DegqDNqY.js";
|
|
16
|
+
import { r as Re } from "./grid-strokes-DyyG1q_o.js";
|
|
18
17
|
import { r as G, n as Pe, O as Ue } from "./capabilities-CK_7hizc.js";
|
|
19
|
-
import { i as
|
|
18
|
+
import { i as Wr } from "./capabilities-CK_7hizc.js";
|
|
20
19
|
import { o as Ve } from "./progress-7OSZbFok.js";
|
|
21
20
|
import { c as qe } from "./page-window-index-CIuT4BAv.js";
|
|
22
|
-
import { p as I } from "./template-registry-
|
|
23
|
-
import {
|
|
24
|
-
import { R as
|
|
25
|
-
import { T as
|
|
26
|
-
const
|
|
21
|
+
import { v as Ye, R as Je, p as I } from "./template-registry-BjE1VS6g.js";
|
|
22
|
+
import { a as Gr, c as Ur, d as Vr, s as qr, b as Yr } from "./template-registry-BjE1VS6g.js";
|
|
23
|
+
import { R as Kr, a as Xr, f as Zr, i as Qr, b as ei, c as ti, p as ni, r as ri, v as ii, d as oi } from "./param-validation-BlHHXs6u.js";
|
|
24
|
+
import { T as si, c as li, v as ci } from "./tree-CqcQ99NM.js";
|
|
25
|
+
const Ke = {
|
|
27
26
|
root: "mr-root",
|
|
28
27
|
page: "mr-page",
|
|
29
28
|
comp: "mr-comp",
|
|
@@ -41,9 +40,9 @@ const Ye = {
|
|
|
41
40
|
unknown: "mr-unknown"
|
|
42
41
|
};
|
|
43
42
|
function E(e, t) {
|
|
44
|
-
return t?.classNames?.[e] ??
|
|
43
|
+
return t?.classNames?.[e] ?? Ke[e];
|
|
45
44
|
}
|
|
46
|
-
class
|
|
45
|
+
class Xe {
|
|
47
46
|
constructor() {
|
|
48
47
|
this.props = [];
|
|
49
48
|
}
|
|
@@ -65,18 +64,18 @@ class Ke {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
function y(e, t = "unset") {
|
|
68
|
-
return new
|
|
67
|
+
return new Xe().add("all", t).add("display", e).add("box-sizing", "border-box");
|
|
69
68
|
}
|
|
70
69
|
function Ae(e, t, n) {
|
|
71
70
|
e.add("color", t.color).add("font-family", t.fontFamily).add("font-weight", t.bold != null ? t.bold ? "700" : "400" : void 0).add("font-style", t.italic != null ? t.italic ? "italic" : "normal" : void 0).add("text-decoration", t.underline != null ? t.underline ? "underline" : "none" : void 0).add("letter-spacing", t.letterSpacing != null ? `${t.letterSpacing}pt` : void 0).add("line-height", String(Q(t))).add("text-align", t.align);
|
|
72
|
-
const r =
|
|
71
|
+
const r = _(t, n);
|
|
73
72
|
e.add("font-size", `${H(r.fontSizePx, 2)}px`);
|
|
74
73
|
}
|
|
75
|
-
function
|
|
74
|
+
function Ze(e, t, n) {
|
|
76
75
|
const r = t.style ?? {};
|
|
77
76
|
Ae(e, r, n), e.add("background-color", r.backgroundColor).add("opacity", r.opacity != null ? String(r.opacity) : void 0).add("transform", r.rotateDeg ? `rotate(${r.rotateDeg}deg)` : void 0);
|
|
78
77
|
}
|
|
79
|
-
function
|
|
78
|
+
function Qe(e, t, n, r, i, o) {
|
|
80
79
|
const s = e.cell, a = o.createElement("td");
|
|
81
80
|
a.className = E("cell", i), a.dataset.mrRowIndex = String(e.ri), a.dataset.mrColumnIndex = String(e.ci), a.setAttribute("role", t.table?.role === "header" ? "columnheader" : "cell"), s.colSpan && (a.colSpan = s.colSpan), s.rowSpan && (a.rowSpan = s.rowSpan);
|
|
82
81
|
const l = xe(t.style, s.style), c = y("block").add("position", "absolute").mm("left", e.xMm, r).mm("top", e.yMm, r).mm("width", e.widthMm, r).mm("height", e.heightMm, r).add("background-color", l.backgroundColor).add("vertical-align", l.verticalAlign ?? "middle");
|
|
@@ -86,7 +85,7 @@ function Je(e, t, n, r, i, o) {
|
|
|
86
85
|
for (const m of s.children ?? []) d.appendChild(ke(m, r, i, o));
|
|
87
86
|
return a.appendChild(d), a;
|
|
88
87
|
}
|
|
89
|
-
function
|
|
88
|
+
function et(e, t, n, r) {
|
|
90
89
|
return Re(e, t).map((i) => {
|
|
91
90
|
const o = `${H(i.widthPt * n / 72, 2)}px solid ${i.color}`, s = r.createElement("div");
|
|
92
91
|
s.className = "mr-grid-edge", s.setAttribute("aria-hidden", "true");
|
|
@@ -94,7 +93,7 @@ function Ze(e, t, n, r) {
|
|
|
94
93
|
return y("block").add("position", "absolute").add("pointer-events", "none").mm("left", a ? i.from : i.pos, n).mm("top", a ? i.pos : i.from, n).mm("width", a ? i.to - i.from : 0, n).mm("height", a ? 0 : i.to - i.from, n).add(a ? "border-top" : "border-left", o).applyTo(s), s;
|
|
95
94
|
});
|
|
96
95
|
}
|
|
97
|
-
function
|
|
96
|
+
function tt(e, t, n, r, i) {
|
|
98
97
|
const o = i.createElement("table");
|
|
99
98
|
o.className = E("grid", r), o.setAttribute("role", "table"), y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(o);
|
|
100
99
|
const s = Ce(e, t.widthMm, t.heightMm), a = i.createElement("tbody");
|
|
@@ -104,11 +103,11 @@ function Qe(e, t, n, r, i) {
|
|
|
104
103
|
return d.className = E("row", r), d.setAttribute("role", "row"), y("contents").applyTo(d), a.appendChild(d), d;
|
|
105
104
|
});
|
|
106
105
|
for (const d of s.cells)
|
|
107
|
-
l[d.ri].appendChild(
|
|
106
|
+
l[d.ri].appendChild(Qe(d, t, e.paddingMm ?? 0.5, n, r, i));
|
|
108
107
|
const c = i.createElement("div");
|
|
109
|
-
return y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(c), c.append(o, ...
|
|
108
|
+
return y("block").add("position", "relative").add("width", "100%").add("height", "100%").applyTo(c), c.append(o, ...et(s, t, n, i)), c;
|
|
110
109
|
}
|
|
111
|
-
function
|
|
110
|
+
function nt(e, t, n, r) {
|
|
112
111
|
const i = r.createElement("div");
|
|
113
112
|
i.className = E("paragraph", n), y("block").add("text-align", e.align).add("line-height", e.lineHeight != null ? String(e.lineHeight) : void 0).mm("margin-top", e.spaceBeforeMm ?? 0, t).mm("margin-bottom", e.spaceAfterMm ?? 0, t).mm("text-indent", e.indentMm ?? 0, t).applyTo(i);
|
|
114
113
|
for (const o of e.segments || []) {
|
|
@@ -117,17 +116,17 @@ function et(e, t, n, r) {
|
|
|
117
116
|
const a = y("inline");
|
|
118
117
|
if (o.style) {
|
|
119
118
|
const l = o.style;
|
|
120
|
-
a.add("color", l.color).add("font-family", l.fontFamily).add("font-weight", l.bold != null ? l.bold ? "700" : "400" : void 0).add("font-style", l.italic != null ? l.italic ? "italic" : "normal" : void 0).add("text-decoration", l.underline != null ? l.underline ? "underline" : "none" : void 0), (l.fontSize != null || l.fontSizePx != null) && a.add("font-size", `${H(
|
|
119
|
+
a.add("color", l.color).add("font-family", l.fontFamily).add("font-weight", l.bold != null ? l.bold ? "700" : "400" : void 0).add("font-style", l.italic != null ? l.italic ? "italic" : "normal" : void 0).add("text-decoration", l.underline != null ? l.underline ? "underline" : "none" : void 0), (l.fontSize != null || l.fontSizePx != null) && a.add("font-size", `${H(_(l, t).fontSizePx, 2)}px`);
|
|
121
120
|
}
|
|
122
121
|
a.applyTo(s), i.appendChild(s);
|
|
123
122
|
}
|
|
124
123
|
return i;
|
|
125
124
|
}
|
|
126
|
-
function
|
|
127
|
-
if (
|
|
125
|
+
function rt(e, t, n, r) {
|
|
126
|
+
if (Te(e)) {
|
|
128
127
|
const i = r.createElement("div");
|
|
129
128
|
i.className = E("rich", n), y("block").applyTo(i);
|
|
130
|
-
for (const o of e.richParagraphs) i.appendChild(
|
|
129
|
+
for (const o of e.richParagraphs) i.appendChild(nt(o, t, n, r));
|
|
131
130
|
return i;
|
|
132
131
|
}
|
|
133
132
|
if (Array.isArray(e.lines) && e.lines.length > 0) {
|
|
@@ -141,68 +140,68 @@ function tt(e, t, n, r) {
|
|
|
141
140
|
}
|
|
142
141
|
return e.text ?? "";
|
|
143
142
|
}
|
|
144
|
-
function
|
|
143
|
+
function it(e, t, n, r) {
|
|
145
144
|
const i = r.createElement("div");
|
|
146
145
|
i.className = E("text", n);
|
|
147
146
|
const o = e.style || {};
|
|
148
|
-
return y("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", o.verticalAlign === "middle" ? "center" : o.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(i), i.append(
|
|
147
|
+
return y("flex").add("width", "100%").add("height", "100%").add("flex-direction", "column").add("justify-content", o.verticalAlign === "middle" ? "center" : o.verticalAlign === "bottom" ? "flex-end" : "flex-start").add("overflow-wrap", "anywhere").add("overflow", "hidden").applyTo(i), i.append(rt(e, t, n, r)), i;
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function ot(e, t, n) {
|
|
151
150
|
const r = n.createElement("img");
|
|
152
151
|
return r.className = E("image", t), r.src = e.imageData, y("block").add("width", "100%").add("height", "100%").add("object-fit", "contain").applyTo(r), r.alt = e.kind, r;
|
|
153
152
|
}
|
|
154
|
-
function
|
|
153
|
+
function ue(e, t, n, r) {
|
|
155
154
|
const i = r.createElement("div");
|
|
156
155
|
i.className = E("shape", n);
|
|
157
|
-
const o = e.style || {}, s =
|
|
156
|
+
const o = e.style || {}, s = W(o), a = Me(o), l = `${H(s.widthPt * t / 72, 2)}px solid ${s.color}`, c = y("block");
|
|
158
157
|
return e.grid ? c.add("position", "relative") : e.kind === "rect" ? (a.top && c.add("border-top", l), a.right && c.add("border-right", l), a.bottom && c.add("border-bottom", l), a.left && c.add("border-left", l)) : e.kind === "ellipse" ? (a.inner && c.add("border", l).add("border-radius", "50%"), o.backgroundColor && c.add("background-color", o.backgroundColor)) : e.kind === "line" && c.add("height", "0").add("border-top", l), c.add("box-sizing", "border-box").add("width", "100%").add("height", "100%"), c.applyTo(i), i;
|
|
159
158
|
}
|
|
160
|
-
function
|
|
159
|
+
function at(e, t, n) {
|
|
161
160
|
const r = n.createElementNS("http://www.w3.org/2000/svg", "svg"), i = ie(e.widthMm, t), o = ie(e.heightMm, t);
|
|
162
161
|
r.setAttribute("width", String(Math.max(1, i))), r.setAttribute("height", String(Math.max(1, o))), r.setAttribute("aria-hidden", "true"), r.style.overflow = "visible", r.style.display = "block";
|
|
163
162
|
const s = n.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
164
163
|
s.setAttribute("x1", "0"), s.setAttribute("x2", String(i)), s.setAttribute("y1", e.lineDirection === "up" ? String(o) : "0"), s.setAttribute("y2", e.lineDirection === "up" ? "0" : String(o));
|
|
165
|
-
const a =
|
|
164
|
+
const a = W({ ...e.style, borderColor: e.style?.lineColor ?? e.style?.borderColor });
|
|
166
165
|
return s.setAttribute("stroke", a.color), s.setAttribute("stroke-width", String(a.widthPt * t / 72)), r.appendChild(s), r;
|
|
167
166
|
}
|
|
168
167
|
function ke(e, t, n, r) {
|
|
169
168
|
const i = r.createElement("div");
|
|
170
169
|
i.className = `${E("comp", n)} mr-kind-${e.kind}`;
|
|
171
170
|
const o = y("block").add("position", "absolute").mm("left", e.leftMm, t).mm("top", e.topMm, t).mm("width", e.widthMm, t).mm("height", e.heightMm, t).add("box-sizing", "border-box");
|
|
172
|
-
if (
|
|
173
|
-
return i.appendChild(
|
|
171
|
+
if (Ze(o, e, t), o.applyTo(i), ee(e))
|
|
172
|
+
return i.appendChild(ot(e, n, r)), i;
|
|
174
173
|
if (e.kind === "text")
|
|
175
|
-
return i.appendChild(
|
|
174
|
+
return i.appendChild(it(e, t, n, r)), i;
|
|
176
175
|
if (e.grid) {
|
|
177
|
-
const a =
|
|
178
|
-
return a.appendChild(
|
|
176
|
+
const a = ue(e, t, n, r);
|
|
177
|
+
return a.appendChild(tt(e.grid, e, t, n, r)), i.appendChild(a), i;
|
|
179
178
|
}
|
|
180
179
|
if (e.kind === "line" && e.lineDirection)
|
|
181
|
-
return i.appendChild(
|
|
180
|
+
return i.appendChild(at(e, t, r)), i;
|
|
182
181
|
if (e.kind === "line" || e.kind === "rect" || e.kind === "ellipse")
|
|
183
|
-
return i.appendChild(
|
|
182
|
+
return i.appendChild(ue(e, t, n, r)), i;
|
|
184
183
|
const s = r.createElement("div");
|
|
185
184
|
return s.className = E("unknown", n), y("block").applyTo(s), s.textContent = e.fallbackText ?? `[${e.kind}]`, s.dataset.mrUnsupported = e.kind, s.setAttribute("role", "note"), i.appendChild(s), i;
|
|
186
185
|
}
|
|
187
|
-
function
|
|
186
|
+
function st(e, t, n, r) {
|
|
188
187
|
const i = r.createElement("div");
|
|
189
|
-
return i.className = E("page", n), y("block", "initial").add("position", "relative").add("font-family", Z).add("font-size", `${H(
|
|
188
|
+
return i.className = E("page", n), y("block", "initial").add("position", "relative").add("font-family", Z).add("font-size", `${H(_(void 0, t).fontSizePx, 2)}px`).add("line-height", String(Q(void 0))).add("white-space", "pre-wrap").add("direction", "ltr").mm("width", e.pageWidthMm, t).mm("height", e.pageHeightMm, t).add("background-color", "#fff").add("color", ye).add("overflow", "hidden").add("box-sizing", "border-box").applyTo(i), e.components.forEach((o, s) => {
|
|
190
189
|
const a = ke(o, t, n, r);
|
|
191
190
|
a.dataset.mrComponentIndex = String(s), i.appendChild(a);
|
|
192
191
|
}), i;
|
|
193
192
|
}
|
|
194
|
-
function
|
|
193
|
+
function gn(e, t, n = {}) {
|
|
195
194
|
const r = n.dpi ?? 96;
|
|
196
195
|
G(e, "dom", n);
|
|
197
196
|
const i = t.createElement("div");
|
|
198
197
|
return i.className = E("root", n), y("block").applyTo(i), i.dataset.schemaVersion = e.schemaVersion, e.pages.forEach((o) => {
|
|
199
|
-
i.appendChild(
|
|
198
|
+
i.appendChild(st(o, r, n, t));
|
|
200
199
|
}), i;
|
|
201
200
|
}
|
|
202
201
|
function R(e) {
|
|
203
202
|
if (e?.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
204
203
|
}
|
|
205
|
-
const
|
|
204
|
+
const lt = (e, t) => (R(t), /^data:image\/(?:png|jpe?g|webp|gif|svg\+xml)[;,]/i.test(e) ? new Promise((n, r) => {
|
|
206
205
|
const i = new Image(), o = () => {
|
|
207
206
|
i.onload = null, i.onerror = null, t?.removeEventListener("abort", s);
|
|
208
207
|
}, s = () => {
|
|
@@ -214,25 +213,25 @@ const at = (e, t) => (R(t), /^data:image\/(?:png|jpe?g|webp|gif|svg\+xml)[;,]/i.
|
|
|
214
213
|
o(), r(new Error("Image could not be decoded for Canvas output."));
|
|
215
214
|
}, t?.addEventListener("abort", s, { once: !0 }), i.src = e;
|
|
216
215
|
}) : Promise.reject(new TypeError("Canvas imageData must be an image data URL; provide imageLoader for other sources.")));
|
|
217
|
-
function
|
|
216
|
+
function ct(e, t, n) {
|
|
218
217
|
return R(n), n ? new Promise((r, i) => {
|
|
219
218
|
const o = () => i(n.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
220
219
|
n.addEventListener("abort", o, { once: !0 }), Promise.resolve().then(() => e(t, n)).then(r, i).finally(() => n.removeEventListener("abort", o));
|
|
221
220
|
}) : e(t);
|
|
222
221
|
}
|
|
223
|
-
async function
|
|
222
|
+
async function dt(e, t, n) {
|
|
224
223
|
const r = /* @__PURE__ */ new Map();
|
|
225
224
|
for (const i of e.components)
|
|
226
|
-
!ee(i) || r.has(i.imageData) || r.set(i.imageData, await
|
|
225
|
+
!ee(i) || r.has(i.imageData) || r.set(i.imageData, await ct(t, i.imageData, n));
|
|
227
226
|
return R(n), r;
|
|
228
227
|
}
|
|
229
|
-
function
|
|
228
|
+
function mt(e, t, n, r, i, o) {
|
|
230
229
|
const s = t, a = s.naturalWidth ?? s.width ?? i, l = s.naturalHeight ?? s.height ?? o;
|
|
231
230
|
if (a <= 0 || l <= 0) throw new RangeError("Decoded Canvas image dimensions must be positive.");
|
|
232
231
|
const c = Math.min(i / a, o / l), d = a * c, m = l * c;
|
|
233
232
|
e.drawImage(t, n + (i - d) / 2, r + (o - m) / 2, d, m);
|
|
234
233
|
}
|
|
235
|
-
function
|
|
234
|
+
function ht(e) {
|
|
236
235
|
return qe(e.pageHeightsPx, e.gapPx).window(e.viewportHeightPx, e.scrollTopPx, e.overscan);
|
|
237
236
|
}
|
|
238
237
|
const se = 96 / 25.4;
|
|
@@ -250,7 +249,7 @@ function Ie(e, t, n, r = 64e6) {
|
|
|
250
249
|
if (!Number.isSafeInteger(o) || !Number.isSafeInteger(s) || o * s > r) throw new RangeError("Canvas page exceeds maxCanvasPixels; reduce resolution or split the report.");
|
|
251
250
|
return { width: o, height: s };
|
|
252
251
|
}
|
|
253
|
-
function
|
|
252
|
+
function Ne(e, t, n, r) {
|
|
254
253
|
const i = document.createElement("canvas"), { widthPx: o, heightPx: s } = le(e, n), a = Ie(e, t, n, r);
|
|
255
254
|
i.width = a.width, i.height = a.height, i.style.width = `${o}px`, i.style.height = `${s}px`;
|
|
256
255
|
const l = i.getContext("2d");
|
|
@@ -258,19 +257,19 @@ function $e(e, t, n, r) {
|
|
|
258
257
|
throw new Error("当前环境不支持 Canvas 2D(测试需真浏览器,见 e2e/canvas.spec.ts)");
|
|
259
258
|
return l.scale(t, t), l.fillStyle = "#ffffff", l.fillRect(0, 0, o, s), { canvas: i, ctx: l };
|
|
260
259
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
260
|
+
function un(e, t = 96) {
|
|
261
|
+
return _(e, t).fontSizePx;
|
|
263
262
|
}
|
|
264
|
-
function
|
|
263
|
+
function $e(e, t, n, r, i, o, s, a = "top") {
|
|
265
264
|
e.font = `${t.italic ? "italic " : ""}${t.bold ? "bold " : ""}${t.fontSizePx}px ${s}`, "letterSpacing" in e && (e.letterSpacing = "0px"), e.fillStyle = t.color, e.textBaseline = "alphabetic";
|
|
266
265
|
const l = t.fontSizePx * t.lineHeight, c = t.text === "" ? [""] : t.text.split(`
|
|
267
266
|
`), d = c.length * l;
|
|
268
267
|
let m = r;
|
|
269
|
-
a === "middle" ? m = r + (o - d) / 2 : a === "bottom" && (m = r + o - d), c.forEach((h,
|
|
270
|
-
|
|
268
|
+
a === "middle" ? m = r + (o - d) / 2 : a === "bottom" && (m = r + o - d), c.forEach((h, g) => {
|
|
269
|
+
gt(e, h, t, n, m + g * l + t.fontSizePx * 0.8, i);
|
|
271
270
|
}), e.textAlign = "left";
|
|
272
271
|
}
|
|
273
|
-
function
|
|
272
|
+
function gt(e, t, n, r, i, o) {
|
|
274
273
|
const s = Array.from(t), a = n.letterSpacingPx ?? 0;
|
|
275
274
|
if (!a) {
|
|
276
275
|
e.textAlign = n.align === "center" ? "center" : n.align === "right" ? "right" : "left";
|
|
@@ -285,53 +284,53 @@ function mt(e, t, n, r, i, o) {
|
|
|
285
284
|
e.fillText(m, c + e.measureText(d).width + h * a, i), d += m;
|
|
286
285
|
});
|
|
287
286
|
}
|
|
288
|
-
function
|
|
287
|
+
function ut(e, t, n, r, i, o, s) {
|
|
289
288
|
for (const a of Re(t, n))
|
|
290
289
|
e.strokeStyle = a.color, e.lineWidth = O(a.widthPt, s), e.beginPath(), a.kind === "v" ? (e.moveTo(r + a.pos * o, i + a.from * o), e.lineTo(r + a.pos * o, i + a.to * o)) : (e.moveTo(r + a.from * o, i + a.pos * o), e.lineTo(r + a.to * o, i + a.pos * o)), e.stroke();
|
|
291
290
|
}
|
|
292
|
-
function
|
|
291
|
+
function ft(e, t, n, r, i, o) {
|
|
293
292
|
e.beginPath(), t.top && (e.moveTo(n, r), e.lineTo(n + i, r)), t.right && (e.moveTo(n + i, r), e.lineTo(n + i, r + o)), t.bottom && (e.moveTo(n + i, r + o), e.lineTo(n, r + o)), t.left && (e.moveTo(n, r + o), e.lineTo(n, r)), e.stroke();
|
|
294
293
|
}
|
|
295
|
-
function
|
|
294
|
+
function pt(e, t, n, r, i, o, s, a, l, c, d) {
|
|
296
295
|
const m = Ce(t, o / a, s / a);
|
|
297
|
-
for (const
|
|
298
|
-
const f =
|
|
299
|
-
f && (e.fillStyle = f, e.fillRect(r +
|
|
296
|
+
for (const g of m.cells) {
|
|
297
|
+
const f = g.cell.style?.backgroundColor ?? n.style?.backgroundColor;
|
|
298
|
+
f && (e.fillStyle = f, e.fillRect(r + g.xMm * a, i + g.yMm * a, g.widthMm * a, g.heightMm * a));
|
|
300
299
|
}
|
|
301
|
-
|
|
300
|
+
ut(e, m, n, r, i, a, l);
|
|
302
301
|
const h = t.paddingMm ?? 0.5;
|
|
303
|
-
for (const
|
|
304
|
-
const f =
|
|
302
|
+
for (const g of m.cells) {
|
|
303
|
+
const f = g.cell.text ?? "";
|
|
305
304
|
if (!f) continue;
|
|
306
|
-
const
|
|
305
|
+
const v = xe(n.style, g.cell.style), N = _(v, l), C = g.cell.indentMm ?? 0, T = Math.max(0, g.widthMm - 2 * h - C), A = Se(f, T, { fontSizePt: N.fontSizePt, bold: v.bold, italic: v.italic, fontFamily: v.fontFamily ?? c, letterSpacingPt: v.letterSpacing }, d).join(`
|
|
307
306
|
`);
|
|
308
|
-
|
|
307
|
+
$e(
|
|
309
308
|
e,
|
|
310
309
|
{
|
|
311
310
|
text: A,
|
|
312
|
-
fontSizePx:
|
|
313
|
-
bold:
|
|
314
|
-
italic:
|
|
315
|
-
color: Ee(
|
|
316
|
-
align:
|
|
317
|
-
lineHeight: Q(
|
|
318
|
-
letterSpacingPx: O(
|
|
311
|
+
fontSizePx: N.fontSizePx,
|
|
312
|
+
bold: v.bold ?? !1,
|
|
313
|
+
italic: v.italic,
|
|
314
|
+
color: Ee(v, ye),
|
|
315
|
+
align: v.align ?? "left",
|
|
316
|
+
lineHeight: Q(v),
|
|
317
|
+
letterSpacingPx: O(v.letterSpacing ?? 0, l)
|
|
319
318
|
},
|
|
320
|
-
r + (
|
|
321
|
-
i + (
|
|
322
|
-
|
|
323
|
-
Math.max(0,
|
|
324
|
-
|
|
325
|
-
|
|
319
|
+
r + (g.xMm + h + C) * a,
|
|
320
|
+
i + (g.yMm + h) * a,
|
|
321
|
+
T * a,
|
|
322
|
+
Math.max(0, g.heightMm - 2 * h) * a,
|
|
323
|
+
v.fontFamily ?? c,
|
|
324
|
+
v.verticalAlign ?? "middle"
|
|
326
325
|
);
|
|
327
326
|
}
|
|
328
327
|
}
|
|
329
|
-
function
|
|
330
|
-
const c = t.style ?? {}, d =
|
|
328
|
+
function wt(e, t, n, r, i, o, s, a, l) {
|
|
329
|
+
const c = t.style ?? {}, d = _(c, s), m = Te(t) ? t.richParagraphs.map((h) => h.segments.map((g) => g.text ?? g.field ?? "").join("")).join(`
|
|
331
330
|
`) : t.lines?.length ? t.lines.join(`
|
|
332
|
-
`) :
|
|
331
|
+
`) : Se(t.text ?? "", t.widthMm, { fontSizePt: d.fontSizePt, bold: c.bold, italic: c.italic, fontFamily: c.fontFamily ?? a, letterSpacingPt: c.letterSpacing }, l).join(`
|
|
333
332
|
`);
|
|
334
|
-
|
|
333
|
+
$e(e, {
|
|
335
334
|
text: m,
|
|
336
335
|
fontSizePx: d.fontSizePx,
|
|
337
336
|
bold: c.bold ?? !1,
|
|
@@ -346,32 +345,32 @@ function ce(e, t, n, r, i, o, s) {
|
|
|
346
345
|
const a = t.leftMm * n, l = t.topMm * n, c = t.widthMm * n, d = t.heightMm * n, m = t.style ?? {};
|
|
347
346
|
if (ee(t)) {
|
|
348
347
|
const h = s?.get(t.imageData);
|
|
349
|
-
h ?
|
|
348
|
+
h ? mt(e, h, a, l, c, d) : fe(e, t, a, l, c, d);
|
|
350
349
|
return;
|
|
351
350
|
}
|
|
352
351
|
if (t.grid) {
|
|
353
|
-
|
|
352
|
+
pt(e, t.grid, t, a, l, c, d, n, r, i, o);
|
|
354
353
|
return;
|
|
355
354
|
}
|
|
356
355
|
switch (t.kind) {
|
|
357
356
|
case "text": {
|
|
358
|
-
|
|
357
|
+
wt(e, t, a, l, c, d, r, i, o);
|
|
359
358
|
break;
|
|
360
359
|
}
|
|
361
360
|
case "rect": {
|
|
362
|
-
const h =
|
|
363
|
-
m.backgroundColor && (e.fillStyle = m.backgroundColor, e.fillRect(a, l, c, d)),
|
|
361
|
+
const h = W(m), g = Me(m);
|
|
362
|
+
m.backgroundColor && (e.fillStyle = m.backgroundColor, e.fillRect(a, l, c, d)), g.inner && (e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), ft(e, g, a, l, c, d));
|
|
364
363
|
break;
|
|
365
364
|
}
|
|
366
365
|
case "line": {
|
|
367
|
-
const h =
|
|
366
|
+
const h = W({ ...m, borderColor: m.lineColor ?? m.borderColor });
|
|
368
367
|
e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), e.beginPath();
|
|
369
|
-
const
|
|
370
|
-
e.moveTo(a,
|
|
368
|
+
const g = t.lineDirection === "up" ? l + d : t.lineDirection === "down" ? l : l + d / 2, f = t.lineDirection === "up" ? l : t.lineDirection === "down" ? l + d : l + d / 2;
|
|
369
|
+
e.moveTo(a, g), e.lineTo(a + c, f), e.stroke();
|
|
371
370
|
break;
|
|
372
371
|
}
|
|
373
372
|
case "ellipse": {
|
|
374
|
-
const h =
|
|
373
|
+
const h = W(m);
|
|
375
374
|
e.strokeStyle = h.color, e.lineWidth = O(h.widthPt, r), m.backgroundColor && (e.fillStyle = m.backgroundColor, e.beginPath(), e.ellipse(a + c / 2, l + d / 2, c / 2, d / 2, 0, 0, Math.PI * 2), e.fill()), e.beginPath(), e.ellipse(a + c / 2, l + d / 2, c / 2, d / 2, 0, 0, Math.PI * 2), e.stroke();
|
|
376
375
|
break;
|
|
377
376
|
}
|
|
@@ -383,7 +382,7 @@ function ce(e, t, n, r, i, o, s) {
|
|
|
383
382
|
function fe(e, t, n, r, i, o) {
|
|
384
383
|
e.save(), e.strokeStyle = "#94a3b8", e.strokeRect(n, r, i, o), e.fillStyle = "#64748b", e.font = "12px sans-serif", e.fillText(t.fallbackText ?? `[${t.kind}]`, n + 3, r + 14), e.restore();
|
|
385
384
|
}
|
|
386
|
-
async function
|
|
385
|
+
async function fn(e, t = {}) {
|
|
387
386
|
if (typeof document > "u")
|
|
388
387
|
throw new Error("renderPlanToImages 需要浏览器环境(SSR/Node 请在客户端钩子中调用)");
|
|
389
388
|
const { format: n = "png", quality: r = 0.92, ...i } = t;
|
|
@@ -397,7 +396,7 @@ async function un(e, t = {}) {
|
|
|
397
396
|
R(t.signal);
|
|
398
397
|
const m = await Le(e.pages[d], d, i, s);
|
|
399
398
|
try {
|
|
400
|
-
l.push(await
|
|
399
|
+
l.push(await vt(m, a, r, t.signal));
|
|
401
400
|
} finally {
|
|
402
401
|
m.width = 0, m.height = 0;
|
|
403
402
|
}
|
|
@@ -405,7 +404,7 @@ async function un(e, t = {}) {
|
|
|
405
404
|
}
|
|
406
405
|
return R(t.signal), { blobs: l, diagnostics: s };
|
|
407
406
|
}
|
|
408
|
-
function
|
|
407
|
+
function vt(e, t, n, r) {
|
|
409
408
|
return R(r), new Promise((i, o) => {
|
|
410
409
|
const s = () => o(r?.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
411
410
|
r?.addEventListener("abort", s, { once: !0 });
|
|
@@ -418,23 +417,23 @@ function pt(e, t, n, r) {
|
|
|
418
417
|
}
|
|
419
418
|
});
|
|
420
419
|
}
|
|
421
|
-
function
|
|
420
|
+
function pn(e, t = {}) {
|
|
422
421
|
if (R(t.signal), typeof document > "u")
|
|
423
422
|
throw new Error("renderPlanToCanvas 需要浏览器环境(SSR 请在客户端钩子中调用)");
|
|
424
|
-
const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = Math.max(0, t.start ?? 0), l = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1), c = [], d = G(e, "canvas", t), m =
|
|
423
|
+
const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = Math.max(0, t.start ?? 0), l = Math.min(e.pages.length - 1, t.end ?? e.pages.length - 1), c = [], d = G(e, "canvas", t), m = bt(e, a, l);
|
|
425
424
|
for (const h of m)
|
|
426
425
|
Pe(h, t), d.push(h);
|
|
427
426
|
if (t.fidelity === "strict" && m.length) throw new Ue(d);
|
|
428
427
|
for (let h = a; h <= l; h++) {
|
|
429
428
|
R(t.signal);
|
|
430
|
-
const
|
|
431
|
-
for (const
|
|
432
|
-
ce(
|
|
429
|
+
const g = e.pages[h], { canvas: f, ctx: v } = Ne(g, n, r, t.maxCanvasPixels);
|
|
430
|
+
for (const N of g.components)
|
|
431
|
+
ce(v, N, i, r, o, s);
|
|
433
432
|
c.push(f);
|
|
434
433
|
}
|
|
435
434
|
return { canvases: c, diagnostics: d };
|
|
436
435
|
}
|
|
437
|
-
function
|
|
436
|
+
function bt(e, t, n) {
|
|
438
437
|
return n < t ? [] : e.pages.slice(t, n + 1).flatMap((r, i) => r.components.flatMap((o, s) => ee(o) ? [{
|
|
439
438
|
code: "async-image-required",
|
|
440
439
|
severity: "warning",
|
|
@@ -446,7 +445,7 @@ function wt(e, t, n) {
|
|
|
446
445
|
message: "Use renderPlanToCanvasAsync or renderPlanToImages to decode and include images."
|
|
447
446
|
}] : []));
|
|
448
447
|
}
|
|
449
|
-
async function
|
|
448
|
+
async function wn(e, t = {}) {
|
|
450
449
|
if (typeof document > "u") throw new Error("renderPlanToCanvasAsync 需要浏览器环境(Node 请使用 PDF 或 XLSX 输出)");
|
|
451
450
|
R(t.signal);
|
|
452
451
|
const n = await ae(e, { ...t, format: "canvas" });
|
|
@@ -459,13 +458,13 @@ async function fn(e, t = {}) {
|
|
|
459
458
|
async function Le(e, t, n, r) {
|
|
460
459
|
const i = n.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), o = n.dpi ?? 96, s = n.fontFamily ?? Z, a = await De(e, t, n, r);
|
|
461
460
|
R(n.signal);
|
|
462
|
-
const { canvas: l, ctx: c } =
|
|
461
|
+
const { canvas: l, ctx: c } = Ne(e, i, o, n.maxCanvasPixels);
|
|
463
462
|
for (const d of e.components) ce(c, d, o / 25.4, o, s, n.measurer ?? oe, a);
|
|
464
463
|
return l;
|
|
465
464
|
}
|
|
466
465
|
async function De(e, t, n, r) {
|
|
467
|
-
const i = n.imageLoader ??
|
|
468
|
-
return
|
|
466
|
+
const i = n.imageLoader ?? lt;
|
|
467
|
+
return dt(e, async (o, s) => {
|
|
469
468
|
try {
|
|
470
469
|
return await i(o, s);
|
|
471
470
|
} catch (a) {
|
|
@@ -475,63 +474,63 @@ async function De(e, t, n, r) {
|
|
|
475
474
|
}
|
|
476
475
|
}, n.signal);
|
|
477
476
|
}
|
|
478
|
-
function
|
|
479
|
-
const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = t.overscan ?? 1, l = t.gapPx ?? 18, c = t.pagesPerFrame ?? 1, d = e.pages.map((
|
|
480
|
-
let
|
|
477
|
+
function vn(e, t = {}) {
|
|
478
|
+
const n = t.dpr ?? (typeof devicePixelRatio == "number" ? devicePixelRatio : 1), r = t.dpi ?? 96, i = r / 96 * se, o = t.fontFamily ?? Z, s = t.measurer ?? oe, a = t.overscan ?? 1, l = t.gapPx ?? 18, c = t.pagesPerFrame ?? 1, d = e.pages.map((u) => u.pageHeightMm * i), m = Math.max(1, ...e.pages.map((u) => u.pageWidthMm * i)), h = { start: 0, end: -1 };
|
|
479
|
+
let g = null, f = null, v = null, N = null, C = [], T = 0, A = [], U = 0, B = new AbortController();
|
|
481
480
|
const me = [];
|
|
482
481
|
function ze() {
|
|
483
|
-
const
|
|
484
|
-
|
|
482
|
+
const u = g;
|
|
483
|
+
u.innerHTML = "", f = document.createElement("div"), f.style.cssText = `width:${m}px;margin:0 auto;`, v = document.createElement("div"), N = document.createElement("div"), f.appendChild(v), C = [];
|
|
485
484
|
const M = Math.min(e.pages.length, 3 + a * 2);
|
|
486
485
|
for (let D = 0; D < M; D++) {
|
|
487
|
-
const
|
|
488
|
-
|
|
486
|
+
const b = document.createElement("div");
|
|
487
|
+
b.style.cssText = `margin:0 auto ${l}px;box-shadow:0 2px 8px rgba(0,0,0,.35);background:#fff;`, f.appendChild(b), C.push(b);
|
|
489
488
|
}
|
|
490
|
-
f.appendChild(
|
|
489
|
+
f.appendChild(N), u.appendChild(f);
|
|
491
490
|
}
|
|
492
|
-
async function He(
|
|
493
|
-
const D = U,
|
|
494
|
-
me.push(...
|
|
495
|
-
const
|
|
496
|
-
if (D !== U || !
|
|
497
|
-
const { widthPx: ne, heightPx: re } = le(
|
|
498
|
-
let
|
|
499
|
-
(
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
const F =
|
|
491
|
+
async function He(u, M) {
|
|
492
|
+
const D = U, b = await ae(e, { ...t, signal: B.signal, format: "canvas", start: M, end: M });
|
|
493
|
+
me.push(...b.diagnostics);
|
|
494
|
+
const S = b.plan.pages[M], Y = await De(S, M, { ...t, signal: B.signal }, me);
|
|
495
|
+
if (D !== U || !g) return;
|
|
496
|
+
const { widthPx: ne, heightPx: re } = le(S, r);
|
|
497
|
+
let $ = u.firstElementChild;
|
|
498
|
+
(!$ || $.tagName !== "CANVAS") && ($ = document.createElement("canvas"), u.innerHTML = "", u.appendChild($));
|
|
499
|
+
const ge = Ie(S, n, r, t.maxCanvasPixels);
|
|
500
|
+
$.width = ge.width, $.height = ge.height, $.style.width = `${ne}px`, $.style.height = `${re}px`;
|
|
501
|
+
const F = $.getContext("2d");
|
|
503
502
|
if (F) {
|
|
504
503
|
F.setTransform(1, 0, 0, 1, 0, 0), F.scale(n, n), F.fillStyle = "#ffffff", F.fillRect(0, 0, ne, re);
|
|
505
|
-
for (const
|
|
506
|
-
ce(F,
|
|
507
|
-
|
|
504
|
+
for (const Be of S.components)
|
|
505
|
+
ce(F, Be, i, r, o, s, Y);
|
|
506
|
+
$.dataset.canvasPage = String(M), u.style.height = `${re}px`, u.style.width = `${ne}px`;
|
|
508
507
|
}
|
|
509
508
|
}
|
|
510
|
-
function
|
|
511
|
-
U++, h.start =
|
|
512
|
-
const M = e.pages.length - 1 -
|
|
513
|
-
|
|
514
|
-
const D =
|
|
515
|
-
C.forEach((
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
const Y =
|
|
519
|
-
|
|
509
|
+
function _e(u) {
|
|
510
|
+
U++, h.start = u.start, h.end = u.end, v.style.height = `${u.start * l + d.slice(0, u.start).reduce((b, S) => b + S, 0)}px`;
|
|
511
|
+
const M = e.pages.length - 1 - u.end;
|
|
512
|
+
N.style.height = `${M * l + d.slice(u.end + 1).reduce((b, S) => b + S, 0)}px`;
|
|
513
|
+
const D = u.end - u.start + 1;
|
|
514
|
+
C.forEach((b, S) => {
|
|
515
|
+
if (S < D) {
|
|
516
|
+
b.style.display = "";
|
|
517
|
+
const Y = u.start + S;
|
|
518
|
+
b.style.height = `${d[Y] ?? 0}px`;
|
|
520
519
|
} else
|
|
521
|
-
|
|
520
|
+
b.style.display = "none";
|
|
522
521
|
}), A = [];
|
|
523
|
-
for (let
|
|
524
|
-
const
|
|
525
|
-
if (!
|
|
526
|
-
|
|
522
|
+
for (let b = u.start; b <= u.end; b++) {
|
|
523
|
+
const S = C[b - u.start];
|
|
524
|
+
if (!S) continue;
|
|
525
|
+
S.firstElementChild?.dataset?.canvasPage !== String(b) && A.push(b);
|
|
527
526
|
}
|
|
528
527
|
te();
|
|
529
528
|
}
|
|
530
529
|
function te() {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
let
|
|
534
|
-
for (; A.length > 0 &&
|
|
530
|
+
T || A.length === 0 || (T = requestAnimationFrame(() => {
|
|
531
|
+
T = 0;
|
|
532
|
+
let u = Math.max(1, c);
|
|
533
|
+
for (; A.length > 0 && u-- > 0; ) {
|
|
535
534
|
const M = A.shift(), D = C[M - h.start];
|
|
536
535
|
D && He(D, M).catch(() => {
|
|
537
536
|
});
|
|
@@ -540,49 +539,53 @@ function pn(e, t = {}) {
|
|
|
540
539
|
}));
|
|
541
540
|
}
|
|
542
541
|
function V() {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
const
|
|
542
|
+
T || (T = requestAnimationFrame(() => {
|
|
543
|
+
T = 0;
|
|
544
|
+
const u = g, M = ht({
|
|
546
545
|
pageHeightsPx: d,
|
|
547
|
-
viewportHeightPx:
|
|
548
|
-
scrollTopPx:
|
|
546
|
+
viewportHeightPx: u.clientHeight,
|
|
547
|
+
scrollTopPx: u.scrollTop,
|
|
549
548
|
overscan: a,
|
|
550
549
|
gapPx: l
|
|
551
550
|
});
|
|
552
|
-
M.start !== h.start || M.end !== h.end ?
|
|
551
|
+
M.start !== h.start || M.end !== h.end ? _e(M) : te();
|
|
553
552
|
}));
|
|
554
553
|
}
|
|
555
554
|
let q = null;
|
|
556
555
|
return {
|
|
557
|
-
attach(
|
|
556
|
+
attach(u) {
|
|
558
557
|
if (typeof document > "u")
|
|
559
558
|
throw new Error("createCanvasPager 需要浏览器环境(SSR 请在客户端钩子中调用 attach)");
|
|
560
|
-
R(t.signal),
|
|
559
|
+
R(t.signal), B = new AbortController(), t.signal?.addEventListener("abort", he, { once: !0 }), G(e, "canvas", t), g = u, ze(), u.addEventListener("scroll", V, { passive: !0 }), typeof ResizeObserver < "u" && (q = new ResizeObserver(() => V()), q.observe(u)), V();
|
|
561
560
|
},
|
|
562
561
|
destroy() {
|
|
563
|
-
U++,
|
|
562
|
+
U++, B.abort(), t.signal?.removeEventListener("abort", he), T && cancelAnimationFrame(T), T = 0, q?.disconnect(), q = null, g?.removeEventListener("scroll", V), A = [], f?.remove(), g = null;
|
|
564
563
|
},
|
|
565
564
|
window() {
|
|
566
565
|
return { ...h };
|
|
567
566
|
}
|
|
568
567
|
};
|
|
569
568
|
function he() {
|
|
570
|
-
|
|
569
|
+
B.abort(t.signal?.reason);
|
|
571
570
|
}
|
|
572
571
|
}
|
|
573
572
|
function Fe(e, t, n) {
|
|
574
573
|
let r, i;
|
|
575
574
|
if (typeof e == "string") {
|
|
576
|
-
const o =
|
|
577
|
-
if (!o) throw new Error(`未知纸张预设 "${e}"(可用:${Object.keys(
|
|
575
|
+
const o = J[e];
|
|
576
|
+
if (!o) throw new Error(`未知纸张预设 "${e}"(可用:${Object.keys(J).join("/")})`);
|
|
578
577
|
r = o.widthMm, i = o.heightMm;
|
|
579
578
|
} else typeof e == "number" ? (r = e, i = t ?? 297) : (r = e.widthMm, i = e.heightMm);
|
|
580
579
|
return n ? { widthMm: i, heightMm: r } : { widthMm: r, heightMm: i };
|
|
581
580
|
}
|
|
582
|
-
class
|
|
581
|
+
class yt {
|
|
583
582
|
constructor() {
|
|
584
583
|
this.pages = [], this.pending = null, this.templateParams = void 0;
|
|
585
584
|
}
|
|
585
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
586
|
+
repeat(t) {
|
|
587
|
+
return this.templateRepeat = t, this;
|
|
588
|
+
}
|
|
586
589
|
/**
|
|
587
590
|
* 声明报表参数(链式,可放在 .page() 前后任意位置):
|
|
588
591
|
* 渲染组件据此自动生成查询面板(也可由 paramDefs prop 提供,prop 优先)。
|
|
@@ -613,7 +616,7 @@ class bt {
|
|
|
613
616
|
typeof n == "number" ? n : void 0,
|
|
614
617
|
o.landscape
|
|
615
618
|
), l = o.margins ?? {};
|
|
616
|
-
return this.pending = new
|
|
619
|
+
return this.pending = new Mt(this, {
|
|
617
620
|
widthMm: s,
|
|
618
621
|
heightMm: a,
|
|
619
622
|
marginTopMm: l.marginTopMm ?? 10,
|
|
@@ -628,10 +631,14 @@ class bt {
|
|
|
628
631
|
build() {
|
|
629
632
|
if (this.collect(), this.pages.length === 0)
|
|
630
633
|
throw new Error("模板至少需要一页:先调用 .page() 添加内容");
|
|
631
|
-
return
|
|
634
|
+
return {
|
|
635
|
+
...this.templateParams ? { params: this.templateParams } : {},
|
|
636
|
+
...this.templateRepeat ? { repeat: this.templateRepeat } : {},
|
|
637
|
+
pages: this.pages
|
|
638
|
+
};
|
|
632
639
|
}
|
|
633
640
|
}
|
|
634
|
-
class
|
|
641
|
+
class Mt {
|
|
635
642
|
constructor(t, n) {
|
|
636
643
|
this.parent = t, this.page = n, this.components = [];
|
|
637
644
|
}
|
|
@@ -700,11 +707,11 @@ class vt {
|
|
|
700
707
|
return this.done().build();
|
|
701
708
|
}
|
|
702
709
|
}
|
|
703
|
-
function
|
|
704
|
-
return new
|
|
710
|
+
function bn() {
|
|
711
|
+
return new yt();
|
|
705
712
|
}
|
|
706
|
-
function
|
|
707
|
-
return
|
|
713
|
+
function yn(e, t = {}) {
|
|
714
|
+
return We([], e), e.fields.map((n) => ({
|
|
708
715
|
field: n.field,
|
|
709
716
|
header: `${n.label ?? n.field}${n.unit ? ` (${n.unit})` : ""}`,
|
|
710
717
|
semanticRole: n.semanticRole ?? (n.type === "number" || n.type === "decimal" ? "measure" : n.type === "date" ? "date" : n.enum ? "dimension" : "text"),
|
|
@@ -715,11 +722,11 @@ function P(e, t, n = !1) {
|
|
|
715
722
|
if (!Number.isFinite(e) || (n ? e < 0 : e <= 0))
|
|
716
723
|
throw new Error(`${t} 必须是有限${n ? "非负" : "正"}数`);
|
|
717
724
|
}
|
|
718
|
-
function
|
|
725
|
+
function K(e, t, n) {
|
|
719
726
|
if (e !== void 0 && !["left", "center", "right", "justify", ...n ? ["auto"] : []].includes(e))
|
|
720
727
|
throw new Error(`${t} 必须是 left/center/right/justify${n ? "/auto" : ""}`);
|
|
721
728
|
}
|
|
722
|
-
function
|
|
729
|
+
function xt(e) {
|
|
723
730
|
const t = e.layout ?? "page";
|
|
724
731
|
if (t !== "page" && t !== "wide")
|
|
725
732
|
throw new Error("layout 必须是 page 或 wide");
|
|
@@ -730,16 +737,16 @@ function yt(e) {
|
|
|
730
737
|
const n = e.columnWidthMm ?? 30;
|
|
731
738
|
return P(n, "columnWidthMm"), { layout: t, columnWidthMm: n };
|
|
732
739
|
}
|
|
733
|
-
function
|
|
740
|
+
function Et(e) {
|
|
734
741
|
const t = e.paper === void 0 ? "a4" : e.paper;
|
|
735
742
|
if (typeof t != "string" && (typeof t != "object" || t === null) || e.landscape !== void 0 && typeof e.landscape != "boolean")
|
|
736
743
|
throw new Error("paper 必须是纸张预设名或 { widthMm, heightMm } 对象,landscape 必须是布尔值");
|
|
737
|
-
if (typeof t == "string" && !Object.prototype.hasOwnProperty.call(
|
|
738
|
-
throw new Error(`未知纸张预设 "${t}"(可用:${Object.keys(
|
|
744
|
+
if (typeof t == "string" && !Object.prototype.hasOwnProperty.call(J, t))
|
|
745
|
+
throw new Error(`未知纸张预设 "${t}"(可用:${Object.keys(J).join("/")})`);
|
|
739
746
|
const n = Fe(t, void 0, e.landscape), r = n.widthMm, i = n.heightMm;
|
|
740
747
|
return P(r, "纸张 widthMm"), P(i, "纸张 heightMm"), { widthMm: r, heightMm: i };
|
|
741
748
|
}
|
|
742
|
-
function
|
|
749
|
+
function Tt(e) {
|
|
743
750
|
if (e.margins !== void 0 && (!e.margins || typeof e.margins != "object" || Array.isArray(e.margins)))
|
|
744
751
|
throw new Error("margins 必须是页边距对象");
|
|
745
752
|
const t = e.margins ?? {}, n = {
|
|
@@ -751,7 +758,7 @@ function xt(e) {
|
|
|
751
758
|
for (const [r, i] of Object.entries(n)) P(i, r, !0);
|
|
752
759
|
return n;
|
|
753
760
|
}
|
|
754
|
-
function
|
|
761
|
+
function St(e, t) {
|
|
755
762
|
const n = e.dataset === void 0 ? "detail" : e.dataset;
|
|
756
763
|
if (typeof n != "string" || !n.trim())
|
|
757
764
|
throw new Error("dataset 必须是非空字符串");
|
|
@@ -764,28 +771,28 @@ function Et(e, t) {
|
|
|
764
771
|
throw new Error("标题高度与间距占满页面,必须为表格保留可用高度");
|
|
765
772
|
return { dataset: n, titleHeightMm: r, hasTitle: o, titleSpaceMm: s };
|
|
766
773
|
}
|
|
767
|
-
function
|
|
774
|
+
function Ct(e) {
|
|
768
775
|
if (e.listOptions !== void 0 && (!e.listOptions || typeof e.listOptions != "object" || Array.isArray(e.listOptions)))
|
|
769
776
|
throw new Error("listOptions 必须是列表配置对象");
|
|
770
777
|
const t = e.listOptions ?? {};
|
|
771
|
-
|
|
778
|
+
K(t.align, "listOptions.align", !0), K(t.headerAlign, "listOptions.headerAlign", !1);
|
|
772
779
|
for (const n of ["fontSizePt", "rowHeightMm", "paddingMm"]) {
|
|
773
780
|
const r = t[n];
|
|
774
781
|
r !== void 0 && P(r, `listOptions.${n}`, n === "paddingMm");
|
|
775
782
|
}
|
|
776
783
|
return t;
|
|
777
784
|
}
|
|
778
|
-
function
|
|
785
|
+
function Rt(e) {
|
|
779
786
|
let t = 0, n = 0;
|
|
780
787
|
for (const [r, i] of e.entries()) {
|
|
781
788
|
if (!i || typeof i.header != "string" || typeof i.field != "string" || !i.field.trim())
|
|
782
789
|
throw new Error(`columns[${r}] 需要字符串 header 与非空 field`);
|
|
783
|
-
|
|
790
|
+
K(i.align, `columns[${r}].align`, !0), K(i.headerAlign, `columns[${r}].headerAlign`, !1), i.flex !== void 0 && P(i.flex, `columns[${r}].flex`), i.widthMm !== void 0 ? (P(i.widthMm, `columns[${r}].widthMm`), t += i.widthMm) : n = Math.max(n, i.flex ?? 1);
|
|
784
791
|
}
|
|
785
792
|
return { fixedWidthMm: t, maxFlex: n };
|
|
786
793
|
}
|
|
787
|
-
function
|
|
788
|
-
const { fixedWidthMm: i, maxFlex: o } =
|
|
794
|
+
function Pt(e, t, n, r) {
|
|
795
|
+
const { fixedWidthMm: i, maxFlex: o } = Rt(e.columns);
|
|
789
796
|
if (t === "page" && i > r)
|
|
790
797
|
throw new Error(`固定列宽 ${i}mm 超出页面可用宽度 ${r}mm`);
|
|
791
798
|
const s = r - i;
|
|
@@ -793,24 +800,24 @@ function Ct(e, t, n, r) {
|
|
|
793
800
|
throw new Error("固定列占满页面可用宽度,自动列需要正的剩余宽度");
|
|
794
801
|
const a = o > 0 ? e.columns.reduce((c, d) => c + (d.widthMm === void 0 ? (d.flex ?? 1) / o : 0), 0) : 0;
|
|
795
802
|
return { columns: e.columns.map(({ widthMm: c, flex: d, ...m }, h) => {
|
|
796
|
-
const
|
|
797
|
-
return P(
|
|
803
|
+
const g = c ?? (t === "wide" ? n * (d ?? 1) : s * ((d ?? 1) / o) / a);
|
|
804
|
+
return P(g, `columns[${h}] 分配后的 widthMm`), { ...m, widthMm: g };
|
|
798
805
|
}), fixedWidthMm: i, maxFlex: o };
|
|
799
806
|
}
|
|
800
|
-
function
|
|
807
|
+
function Mn(e) {
|
|
801
808
|
if (!e || typeof e != "object")
|
|
802
809
|
throw new Error("标准明细模板需要 options 对象");
|
|
803
810
|
if (!Array.isArray(e.columns) || e.columns.length === 0)
|
|
804
811
|
throw new Error("columns 至少需要一列");
|
|
805
|
-
const { layout: t, columnWidthMm: n } =
|
|
812
|
+
const { layout: t, columnWidthMm: n } = xt(e), r = Et(e);
|
|
806
813
|
let i = r.widthMm;
|
|
807
|
-
const o = r.heightMm, s =
|
|
814
|
+
const o = r.heightMm, s = Tt(e);
|
|
808
815
|
let a = i - s.marginLeftMm - s.marginRightMm;
|
|
809
816
|
const l = o - s.marginTopMm - s.marginBottomMm;
|
|
810
817
|
if (t === "page" && a <= 0 || l <= 0)
|
|
811
818
|
throw new Error("页边距占满纸张,必须保留正的可用宽度和高度");
|
|
812
|
-
const { dataset: c, titleHeightMm: d, hasTitle: m, titleSpaceMm: h } =
|
|
813
|
-
t === "wide" && (a = f.reduce((
|
|
819
|
+
const { dataset: c, titleHeightMm: d, hasTitle: m, titleSpaceMm: h } = St(e, l), g = Ct(e), { columns: f, fixedWidthMm: v, maxFlex: N } = Pt(e, t, n, a);
|
|
820
|
+
t === "wide" && (a = f.reduce((T, A) => T + A.widthMm, 0), P(a, "宽表总列宽"), i = a + s.marginLeftMm + s.marginRightMm, P(i, "宽表总宽度"));
|
|
814
821
|
const C = { widthMm: i, heightMm: o, ...s, components: [], ...t === "wide" ? { layout: t } : {} };
|
|
815
822
|
return m && C.components.push({
|
|
816
823
|
kind: "text",
|
|
@@ -823,7 +830,7 @@ function vn(e) {
|
|
|
823
830
|
}), C.components.push({
|
|
824
831
|
align: "auto",
|
|
825
832
|
headerAlign: "center",
|
|
826
|
-
...
|
|
833
|
+
...g,
|
|
827
834
|
kind: "list",
|
|
828
835
|
...t === "wide" ? { layout: t } : {},
|
|
829
836
|
...m ? { title: e.title } : {},
|
|
@@ -831,10 +838,29 @@ function vn(e) {
|
|
|
831
838
|
columns: f,
|
|
832
839
|
leftMm: s.marginLeftMm,
|
|
833
840
|
topMm: s.marginTopMm + h,
|
|
834
|
-
widthMm: t === "wide" ||
|
|
841
|
+
widthMm: t === "wide" || N > 0 ? a : v
|
|
835
842
|
}), e.params === void 0 ? { pages: [C] } : { params: e.params, pages: [C] };
|
|
836
843
|
}
|
|
837
|
-
function
|
|
844
|
+
function xn(e) {
|
|
845
|
+
if (e.components !== void 0 && e.pages !== void 0) throw new TypeError("标签 components 与 pages 只能选择一种");
|
|
846
|
+
const { dataset: t, rowKey: n, copies: r, params: i } = e, o = e.pages ?? [{ components: e.components ?? [] }], s = {
|
|
847
|
+
repeat: { dataset: t, ...n === void 0 ? {} : { rowKey: n }, ...r === void 0 ? {} : { copies: r } },
|
|
848
|
+
...i === void 0 ? {} : { params: i },
|
|
849
|
+
pages: o.map((l) => ({
|
|
850
|
+
widthMm: l.widthMm ?? e.widthMm ?? 80,
|
|
851
|
+
heightMm: l.heightMm ?? e.heightMm ?? 55,
|
|
852
|
+
marginTopMm: 0,
|
|
853
|
+
marginRightMm: 0,
|
|
854
|
+
marginBottomMm: 0,
|
|
855
|
+
marginLeftMm: 0,
|
|
856
|
+
components: l.components,
|
|
857
|
+
...l.meta === void 0 ? {} : { meta: l.meta }
|
|
858
|
+
}))
|
|
859
|
+
}, a = Ye(s);
|
|
860
|
+
if (!a.ok) throw new Je(a.errors);
|
|
861
|
+
return JSON.parse(JSON.stringify(s));
|
|
862
|
+
}
|
|
863
|
+
function En(e) {
|
|
838
864
|
return e;
|
|
839
865
|
}
|
|
840
866
|
class L extends Error {
|
|
@@ -855,7 +881,7 @@ function pe(e) {
|
|
|
855
881
|
if (!Number.isSafeInteger(t) || t < 0 || t >= Number.MAX_SAFE_INTEGER) throw new L("history", "修订号无效或已达上限");
|
|
856
882
|
return String(t + 1);
|
|
857
883
|
}
|
|
858
|
-
function
|
|
884
|
+
function Tn(e, t = {}) {
|
|
859
885
|
const n = async (s, a) => {
|
|
860
886
|
x(a);
|
|
861
887
|
const l = await e.read(s, a);
|
|
@@ -870,8 +896,8 @@ function Mn(e, t = {}) {
|
|
|
870
896
|
}, o = async (s, a, l, c) => {
|
|
871
897
|
if (t.beforePublish) {
|
|
872
898
|
x(l.signal);
|
|
873
|
-
const
|
|
874
|
-
if (!
|
|
899
|
+
const g = await t.beforePublish({ document: I(a), previous: s.published ? I(s.published) : void 0, signal: l.signal });
|
|
900
|
+
if (!g || g.ok !== !0) throw new L("review", g?.issues?.find((f) => f.severity === "error")?.message ?? "模板发布检查未通过");
|
|
875
901
|
x(l.signal);
|
|
876
902
|
}
|
|
877
903
|
const d = pe(s), m = I({ ...a, revision: d }), h = { revision: d, document: m, publishedAt: (t.now?.() ?? /* @__PURE__ */ new Date()).toISOString() };
|
|
@@ -920,7 +946,7 @@ function Mn(e, t = {}) {
|
|
|
920
946
|
}
|
|
921
947
|
};
|
|
922
948
|
}
|
|
923
|
-
function
|
|
949
|
+
function Sn() {
|
|
924
950
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
925
951
|
return {
|
|
926
952
|
read: async (n, r) => {
|
|
@@ -948,7 +974,7 @@ function xn() {
|
|
|
948
974
|
}
|
|
949
975
|
};
|
|
950
976
|
}
|
|
951
|
-
function
|
|
977
|
+
function At(e, t) {
|
|
952
978
|
const n = e.publishedRevision ?? e.published?.revision;
|
|
953
979
|
for (const r of [e.draftRevision, n]) if (r !== void 0 && (typeof r != "string" || !r.trim())) throw new TypeError("模板生命周期修订应为非空字符串");
|
|
954
980
|
if (e.draftRevision !== void 0 && e.draftRevision !== t.revision) throw new TypeError("可编辑文档应与草稿修订一致");
|
|
@@ -956,20 +982,20 @@ function Rt(e, t) {
|
|
|
956
982
|
if (!e.published && n !== void 0 && n !== t.revision) throw new TypeError("发布修订需要对应的独立文档");
|
|
957
983
|
return { ...e.draftRevision === void 0 ? {} : { draftRevision: e.draftRevision }, ...n === void 0 ? {} : { publishedRevision: n } };
|
|
958
984
|
}
|
|
959
|
-
function
|
|
985
|
+
function Cn(e, t) {
|
|
960
986
|
const n = I(e);
|
|
961
987
|
if (t.id === n.id) throw new Error("复制模板应使用新的 ID");
|
|
962
988
|
const { revision: r, ...i } = n;
|
|
963
989
|
return I({ ...i, id: t.id, name: t.name });
|
|
964
990
|
}
|
|
965
|
-
function
|
|
991
|
+
function Rn(e) {
|
|
966
992
|
if (!Array.isArray(e) || e.length > 1e3) throw new RangeError("本地模板目录最多 1000 项");
|
|
967
993
|
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = [];
|
|
968
994
|
for (const i of e) {
|
|
969
995
|
const o = I(i.document);
|
|
970
996
|
if (t.has(o.id)) throw new Error(`模板 ID 重复:${o.id}`);
|
|
971
997
|
if (i.category !== void 0 && (typeof i.category != "string" || i.category.length > 128) || i.tags !== void 0 && (!Array.isArray(i.tags) || i.tags.length > 20 || i.tags.some((c) => typeof c != "string" || c.length > 128))) throw new TypeError("模板分类和标签无效");
|
|
972
|
-
const s =
|
|
998
|
+
const s = At(i, o), { template: a, ...l } = o;
|
|
973
999
|
t.set(o.id, o), i.published ? n.set(o.id, I(i.published)) : s.publishedRevision && n.set(o.id, I(o)), r.push({ ...l, ...s, ...i.category ? { category: i.category } : {}, ...i.tags ? { tags: [...i.tags] } : {} });
|
|
974
1000
|
}
|
|
975
1001
|
return r.sort((i, o) => i.id < o.id ? -1 : 1), {
|
|
@@ -993,15 +1019,15 @@ function we(e) {
|
|
|
993
1019
|
const t = new Error("模板目录操作已取消");
|
|
994
1020
|
throw t.name = "AbortError", t;
|
|
995
1021
|
}
|
|
996
|
-
function
|
|
1022
|
+
function Pn(e) {
|
|
997
1023
|
return e.map((t) => t.map((n) => /[\t\r\n"]/.test(n) ? `"${n.replace(/"/g, '""')}"` : n).join(" ")).join(`\r
|
|
998
1024
|
`);
|
|
999
1025
|
}
|
|
1000
|
-
function
|
|
1026
|
+
function kt(e, t) {
|
|
1001
1027
|
const n = e[e.length - 1];
|
|
1002
1028
|
e.length > 1 && n?.length === 1 && n[0] === "" && /[\r\n]$/.test(t) && e.pop();
|
|
1003
1029
|
}
|
|
1004
|
-
function
|
|
1030
|
+
function An(e, t = 1e4) {
|
|
1005
1031
|
if (e.length > 4 * 1024 * 1024) throw new Error("Clipboard text limit exceeded");
|
|
1006
1032
|
const n = [[]];
|
|
1007
1033
|
let r = "", i = !1, o = !1, s = 0;
|
|
@@ -1041,9 +1067,9 @@ function Cn(e, t = 1e4) {
|
|
|
1041
1067
|
r += c;
|
|
1042
1068
|
}
|
|
1043
1069
|
if (i) throw new Error("Unclosed clipboard quote");
|
|
1044
|
-
return a(),
|
|
1070
|
+
return a(), kt(n, e), n;
|
|
1045
1071
|
}
|
|
1046
|
-
class
|
|
1072
|
+
class It extends Error {
|
|
1047
1073
|
constructor(t, n, r) {
|
|
1048
1074
|
const i = typeof n.label == "string" ? n.label : "单元格", o = {
|
|
1049
1075
|
definition: `${i}的编辑器配置无效`,
|
|
@@ -1060,46 +1086,46 @@ class At extends Error {
|
|
|
1060
1086
|
}
|
|
1061
1087
|
}
|
|
1062
1088
|
function p(e, t, n) {
|
|
1063
|
-
throw new
|
|
1089
|
+
throw new It(t, e, n);
|
|
1064
1090
|
}
|
|
1065
1091
|
function Oe(e) {
|
|
1066
1092
|
if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e) || e.startsWith("0000-")) return !1;
|
|
1067
1093
|
const t = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
|
|
1068
1094
|
return Number.isFinite(t.getTime()) && t.toISOString().slice(0, 10) === e;
|
|
1069
1095
|
}
|
|
1070
|
-
function
|
|
1096
|
+
function Nt(e) {
|
|
1071
1097
|
const [t = "", n = "0"] = String(e).toLowerCase().split("e");
|
|
1072
1098
|
return Math.max(0, (t.split(".")[1]?.length ?? 0) - Number(n));
|
|
1073
1099
|
}
|
|
1074
|
-
function It(e, t) {
|
|
1075
|
-
e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max), e.precision !== void 0 && kt(t) > e.precision && p(e, "precision", e.precision);
|
|
1076
|
-
}
|
|
1077
1100
|
function $t(e, t) {
|
|
1101
|
+
e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max), e.precision !== void 0 && Nt(t) > e.precision && p(e, "precision", e.precision);
|
|
1102
|
+
}
|
|
1103
|
+
function Lt(e, t) {
|
|
1078
1104
|
Oe(t) || p(e, "date"), e.min !== void 0 && t < e.min && p(e, "min", e.min), e.max !== void 0 && t > e.max && p(e, "max", e.max);
|
|
1079
1105
|
}
|
|
1080
|
-
function
|
|
1106
|
+
function Dt(e) {
|
|
1081
1107
|
[e.min, e.max].some((t) => t !== void 0 && !Number.isFinite(t)) && p(e, "definition"), e.min !== void 0 && e.max !== void 0 && e.min > e.max && p(e, "definition"), e.precision !== void 0 && (!Number.isInteger(e.precision) || e.precision < 0 || e.precision > 15) && p(e, "definition");
|
|
1082
1108
|
}
|
|
1083
|
-
function
|
|
1109
|
+
function Ft(e) {
|
|
1084
1110
|
[e.min, e.max].some((t) => t !== void 0 && !Oe(t)) && p(e, "definition"), e.min !== void 0 && e.max !== void 0 && e.min > e.max && p(e, "definition");
|
|
1085
1111
|
}
|
|
1086
|
-
function
|
|
1112
|
+
function Ot(e, t) {
|
|
1087
1113
|
(!Array.isArray(t.options) || !t.options.length) && p(t, "definition");
|
|
1088
1114
|
const n = e.valueType === "text" ? "string" : e.valueType, r = /* @__PURE__ */ new Set();
|
|
1089
1115
|
for (const i of t.options)
|
|
1090
1116
|
(!i || typeof i.value !== n || typeof i.value == "number" && !Number.isFinite(i.value)) && p(t, "definition"), i.label !== void 0 && typeof i.label != "string" && p(t, "definition"), r.has(i.value) && p(t, "definition"), r.add(i.value);
|
|
1091
1117
|
}
|
|
1092
|
-
function
|
|
1118
|
+
function zt(e) {
|
|
1093
1119
|
e.required !== void 0 && typeof e.required != "boolean" && p(e, "definition"), [e.label, e.hint, e.unit].some((t) => t !== void 0 && typeof t != "string") && p(e, "definition"), e.type === "boolean" && [e.trueLabel, e.falseLabel].some((t) => t !== void 0 && typeof t != "string") && p(e, "definition");
|
|
1094
1120
|
}
|
|
1095
|
-
function
|
|
1096
|
-
(!t || typeof t != "object" || Array.isArray(t) || !["text", "number", "boolean", "enum", "date"].includes(t.type)) && p(t ?? { type: "text" }, "definition"),
|
|
1121
|
+
function Ht(e, t) {
|
|
1122
|
+
(!t || typeof t != "object" || Array.isArray(t) || !["text", "number", "boolean", "enum", "date"].includes(t.type)) && p(t ?? { type: "text" }, "definition"), zt(t), (t.type === "number" || t.type === "boolean") && e.valueType !== t.type && p(t, "type"), (t.type === "text" || t.type === "date") && e.valueType !== "text" && p(t, "type"), t.type === "number" && Dt(t), t.type === "text" && t.maxLength !== void 0 && (!Number.isInteger(t.maxLength) || t.maxLength < 0) && p(t, "definition"), t.type === "date" && Ft(t), t.type === "enum" && Ot(e, t);
|
|
1097
1123
|
}
|
|
1098
|
-
function
|
|
1099
|
-
if (!e.editable) throw new
|
|
1100
|
-
n &&
|
|
1124
|
+
function kn(e, t, n) {
|
|
1125
|
+
if (!e.editable) throw new je("readonly");
|
|
1126
|
+
n && Ht(e, n);
|
|
1101
1127
|
const r = Ge(e, t);
|
|
1102
|
-
return n ? (n.required && typeof r == "string" && !r.trim() && p(n, "required"), r === null || r === "" ? (n.required && p(n, "required"), r) : (n.type === "number" &&
|
|
1128
|
+
return n ? (n.required && typeof r == "string" && !r.trim() && p(n, "required"), r === null || r === "" ? (n.required && p(n, "required"), r) : (n.type === "number" && $t(n, r), n.type === "date" && Lt(n, r), n.type === "text" && n.maxLength !== void 0 && [...String(r)].length > n.maxLength && p(n, "length", n.maxLength), n.type === "enum" && !n.options.some((i) => Object.is(i.value, r)) && p(n, "choice"), r)) : r;
|
|
1103
1129
|
}
|
|
1104
1130
|
class w extends Error {
|
|
1105
1131
|
constructor(t) {
|
|
@@ -1111,7 +1137,7 @@ function z(e) {
|
|
|
1111
1137
|
const t = new Error("Calculation cancelled");
|
|
1112
1138
|
throw t.name = "AbortError", t;
|
|
1113
1139
|
}
|
|
1114
|
-
async function
|
|
1140
|
+
async function X(e, t = 1) {
|
|
1115
1141
|
const n = Math.floor(e.scanned / 2048);
|
|
1116
1142
|
if (e.scanned += t, e.scanned > e.maxScanned) throw new w("limit");
|
|
1117
1143
|
z(e.signal), Math.floor(e.scanned / 2048) > n && (await e.yieldToHost(), z(e.signal));
|
|
@@ -1119,7 +1145,7 @@ async function J(e, t = 1) {
|
|
|
1119
1145
|
function de(e) {
|
|
1120
1146
|
return e.table?.role === "header" ? -Math.max(1, e.grid?.cells.length ?? 1) : e.table?.rowIndex ?? 0;
|
|
1121
1147
|
}
|
|
1122
|
-
function
|
|
1148
|
+
function ve(e, t, n) {
|
|
1123
1149
|
if (![t.pageIndex, t.componentIndex, t.rowIndex, t.columnIndex].every((a) => Number.isSafeInteger(a) && a >= 0)) throw new w("selection");
|
|
1124
1150
|
const r = e.pages[t.pageIndex]?.components[t.componentIndex];
|
|
1125
1151
|
if (!r?.grid || t.rowIndex >= r.grid.cells.length) throw new w("selection");
|
|
@@ -1133,46 +1159,46 @@ function be(e, t, n) {
|
|
|
1133
1159
|
}
|
|
1134
1160
|
return { grid: `${t.pageIndex}:${t.componentIndex}`, row: t.rowIndex, column: t.columnIndex };
|
|
1135
1161
|
}
|
|
1136
|
-
function
|
|
1137
|
-
const r =
|
|
1162
|
+
function _t(e, t, n) {
|
|
1163
|
+
const r = ve(e, t.anchor, t.anchor), i = ve(e, t.focus, t.anchor);
|
|
1138
1164
|
if (r.grid !== i.grid) throw new w("selection");
|
|
1139
1165
|
const o = (Math.abs(r.row - i.row) + 1) * (Math.abs(r.column - i.column) + 1);
|
|
1140
1166
|
if (!Number.isSafeInteger(o) || o > n) throw new w("limit");
|
|
1141
1167
|
return { grid: r.grid, rowStart: Math.min(r.row, i.row), rowEnd: Math.max(r.row, i.row), columnStart: Math.min(r.column, i.column), columnEnd: Math.max(r.column, i.column), origin: e.pages[t.anchor.pageIndex].components[t.anchor.componentIndex].table };
|
|
1142
1168
|
}
|
|
1143
|
-
function
|
|
1169
|
+
function Bt(e) {
|
|
1144
1170
|
if (!e) return !1;
|
|
1145
1171
|
const t = e.replace(/"[^"]*"|\\.|\[(?![hms]+\])[^\]]*\]/gi, "");
|
|
1146
1172
|
return /[ymdhs]/i.test(t);
|
|
1147
1173
|
}
|
|
1148
1174
|
function Wt(e) {
|
|
1149
|
-
if (e.valueType === "text" || e.valueType === "boolean" ||
|
|
1175
|
+
if (e.valueType === "text" || e.valueType === "boolean" || Bt(e.numberFormat)) return null;
|
|
1150
1176
|
const t = e.value;
|
|
1151
1177
|
if (typeof t != "number" || !Number.isFinite(t)) return null;
|
|
1152
1178
|
if (Number.isInteger(t) && !Number.isSafeInteger(t)) throw new w("precision");
|
|
1153
1179
|
return t;
|
|
1154
1180
|
}
|
|
1155
|
-
function
|
|
1181
|
+
function jt(e, t, n) {
|
|
1156
1182
|
if (e.seen.has(n)) return;
|
|
1157
1183
|
e.seen.add(n), e.selected++;
|
|
1158
1184
|
const r = t ? Wt(t) : null;
|
|
1159
1185
|
r === null ? e.excluded++ : e.values.push(r);
|
|
1160
1186
|
}
|
|
1161
|
-
function
|
|
1187
|
+
function Gt(e, t, n, r) {
|
|
1162
1188
|
return r.origin ? e.table?.id === r.origin.id : `${t}:${n}` === r.grid;
|
|
1163
1189
|
}
|
|
1164
|
-
function
|
|
1190
|
+
function Ut(e, t, n) {
|
|
1165
1191
|
return n.origin ? n.origin.columnKeys.indexOf(e.table.columnKeys[t] ?? "") : t;
|
|
1166
1192
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const i = r.origin ? de(e) + t : t, o =
|
|
1193
|
+
function Vt(e, t, n, r) {
|
|
1194
|
+
const i = r.origin ? de(e) + t : t, o = Ut(e, n, r);
|
|
1169
1195
|
return i < r.rowStart || i > r.rowEnd || o < r.columnStart || o > r.columnEnd ? null : `${r.grid}:${i}:${o}`;
|
|
1170
1196
|
}
|
|
1171
|
-
function
|
|
1197
|
+
function qt(e, t) {
|
|
1172
1198
|
const n = t.origin ? de(e) : 0, r = Math.max(0, t.rowStart - n), i = Math.min(e.grid.cells.length, t.rowEnd - n + 1);
|
|
1173
1199
|
return i > r ? i : 0;
|
|
1174
1200
|
}
|
|
1175
|
-
async function
|
|
1201
|
+
async function Yt(e, t, n, r, i) {
|
|
1176
1202
|
const o = e.grid;
|
|
1177
1203
|
if (t > r.maxScanned) throw new w("limit");
|
|
1178
1204
|
const s = o.colWidthsMm?.length ?? o.cells.reduce((l, c) => Math.max(l, c.length), 1);
|
|
@@ -1182,44 +1208,44 @@ async function Vt(e, t, n, r, i) {
|
|
|
1182
1208
|
l > 0 && l % 2048 === 0 && (await r.yieldToHost(), z(r.signal));
|
|
1183
1209
|
let c = 0;
|
|
1184
1210
|
for (const d of o.cells[l]) {
|
|
1185
|
-
for (await
|
|
1211
|
+
for (await X(r); c < s && (a.get(c) ?? 0) > l; ) c++;
|
|
1186
1212
|
if (c >= s) break;
|
|
1187
1213
|
const m = Math.max(1, Math.min(d?.colSpan ?? 1, s - c)), h = Math.min(o.cells.length, l + Math.max(1, d?.rowSpan ?? 1));
|
|
1188
|
-
m > 1 && await
|
|
1214
|
+
m > 1 && await X(r, m - 1);
|
|
1189
1215
|
for (let f = c; f < c + m; f++) a.set(f, h);
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1216
|
+
const g = Vt(e, l, c, n);
|
|
1217
|
+
g && jt(i, d, g), c += m;
|
|
1192
1218
|
}
|
|
1193
1219
|
}
|
|
1194
1220
|
}
|
|
1195
|
-
async function
|
|
1221
|
+
async function Jt(e, t, n) {
|
|
1196
1222
|
const r = { values: [], seen: /* @__PURE__ */ new Set(), excluded: 0, selected: 0 };
|
|
1197
1223
|
for (let i = 0; i < e.pages.length; i++) {
|
|
1198
|
-
await
|
|
1224
|
+
await X(n);
|
|
1199
1225
|
const o = e.pages[i];
|
|
1200
1226
|
for (let s = 0; s < o.components.length; s++) {
|
|
1201
|
-
await
|
|
1227
|
+
await X(n);
|
|
1202
1228
|
const a = o.components[s];
|
|
1203
|
-
if (!a.grid || !
|
|
1204
|
-
const l =
|
|
1205
|
-
l && await
|
|
1229
|
+
if (!a.grid || !Gt(a, i, s, t) || a.table && a.table.role !== "body") continue;
|
|
1230
|
+
const l = qt(a, t);
|
|
1231
|
+
l && await Yt(a, l, t, n, r);
|
|
1206
1232
|
}
|
|
1207
1233
|
}
|
|
1208
1234
|
return r;
|
|
1209
1235
|
}
|
|
1210
|
-
function
|
|
1236
|
+
function j(e) {
|
|
1211
1237
|
if (!Number.isFinite(e)) throw new w("overflow");
|
|
1212
1238
|
return e;
|
|
1213
1239
|
}
|
|
1214
|
-
function
|
|
1240
|
+
function Kt(e) {
|
|
1215
1241
|
let t = 0, n = 0;
|
|
1216
1242
|
for (const r of e) {
|
|
1217
|
-
const i = r - n, o =
|
|
1243
|
+
const i = r - n, o = j(t + i);
|
|
1218
1244
|
n = o - t - i, t = o;
|
|
1219
1245
|
}
|
|
1220
1246
|
return t;
|
|
1221
1247
|
}
|
|
1222
|
-
async function
|
|
1248
|
+
async function be(e, t) {
|
|
1223
1249
|
let n = [...e], r = new Array(e.length);
|
|
1224
1250
|
for (let o = 1; o < e.length; o *= 2) {
|
|
1225
1251
|
for (let s = 0; s < e.length; s += o * 2) {
|
|
@@ -1231,16 +1257,16 @@ async function ve(e, t) {
|
|
|
1231
1257
|
[n, r] = [r, n];
|
|
1232
1258
|
}
|
|
1233
1259
|
const i = Math.floor(n.length / 2);
|
|
1234
|
-
return n.length % 2 ? n[i] :
|
|
1260
|
+
return n.length % 2 ? n[i] : j(n[i - 1] / 2 + n[i] / 2);
|
|
1235
1261
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const t =
|
|
1262
|
+
function Xt(e) {
|
|
1263
|
+
const t = Kt(e);
|
|
1238
1264
|
let n = 1 / 0, r = -1 / 0;
|
|
1239
1265
|
for (const i of e)
|
|
1240
1266
|
n = Math.min(n, i), r = Math.max(r, i);
|
|
1241
1267
|
return { SUM: t, AVERAGE: t / e.length, AVG: t / e.length, MIN: n, MAX: r, COUNT: e.length };
|
|
1242
1268
|
}
|
|
1243
|
-
function
|
|
1269
|
+
function Zt(e, t) {
|
|
1244
1270
|
if (typeof e != "string" || e.length > 256) throw new w("expression");
|
|
1245
1271
|
const n = e.toUpperCase().match(/(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?|[A-Z_]+|[()+\-*/]|\S/g) ?? [];
|
|
1246
1272
|
if (!n.length || n.length > 64) throw new w("expression");
|
|
@@ -1254,8 +1280,8 @@ function Xt(e, t) {
|
|
|
1254
1280
|
if (n[r++] !== ")") throw new w("expression");
|
|
1255
1281
|
return c;
|
|
1256
1282
|
}
|
|
1257
|
-
if (l && /^(?:SUM|AVERAGE|AVG|MIN|MAX|COUNT|MEDIAN)$/.test(l) && Object.prototype.hasOwnProperty.call(t, l)) return
|
|
1258
|
-
if (l && /^(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?$/.test(l)) return
|
|
1283
|
+
if (l && /^(?:SUM|AVERAGE|AVG|MIN|MAX|COUNT|MEDIAN)$/.test(l) && Object.prototype.hasOwnProperty.call(t, l)) return j(t[l]);
|
|
1284
|
+
if (l && /^(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?$/.test(l)) return j(Number(l));
|
|
1259
1285
|
throw new w("expression");
|
|
1260
1286
|
}
|
|
1261
1287
|
function o(a, l) {
|
|
@@ -1266,7 +1292,7 @@ function Xt(e, t) {
|
|
|
1266
1292
|
r++;
|
|
1267
1293
|
const h = o(m + 1, l + 1);
|
|
1268
1294
|
if (d === "/" && h === 0) throw new w("division");
|
|
1269
|
-
c =
|
|
1295
|
+
c = j(d === "+" ? c + h : d === "-" ? c - h : d === "*" ? c * h : c / h);
|
|
1270
1296
|
}
|
|
1271
1297
|
return c;
|
|
1272
1298
|
}
|
|
@@ -1274,154 +1300,158 @@ function Xt(e, t) {
|
|
|
1274
1300
|
if (r !== n.length) throw new w("expression");
|
|
1275
1301
|
return s;
|
|
1276
1302
|
}
|
|
1277
|
-
function
|
|
1303
|
+
function Qt(e) {
|
|
1278
1304
|
const t = e.maxCells ?? 1e5, n = e.maxScannedCells ?? 2e5, r = e.precision ?? 2;
|
|
1279
1305
|
if (![t, n].every((i) => Number.isSafeInteger(i) && i >= 1 && i <= 2e6)) throw new w("limit");
|
|
1280
1306
|
if (!Number.isInteger(r) || r < 0 || r > 12) throw new w("precision");
|
|
1281
1307
|
return { maxCells: t, maxScanned: n, precision: r };
|
|
1282
1308
|
}
|
|
1283
|
-
async function
|
|
1284
|
-
const r =
|
|
1309
|
+
async function In(e, t, n = {}) {
|
|
1310
|
+
const r = Qt(n), i = { scanned: 0, maxScanned: r.maxScanned, signal: n.signal, yieldToHost: n.yieldToHost ?? (() => new Promise((l) => setTimeout(l, 0))) };
|
|
1285
1311
|
z(i.signal);
|
|
1286
|
-
const o = await
|
|
1312
|
+
const o = await Jt(e, _t(e, t, r.maxCells), i), s = n.operation ?? "sum";
|
|
1287
1313
|
if (!["sum", "average", "min", "max", "count", "median", "expression"].includes(s)) throw new w("expression");
|
|
1288
1314
|
let a = null;
|
|
1289
1315
|
if (s === "count") a = o.values.length;
|
|
1290
1316
|
else if (o.values.length)
|
|
1291
|
-
if (s === "median") a = await
|
|
1317
|
+
if (s === "median") a = await be(o.values, i);
|
|
1292
1318
|
else {
|
|
1293
|
-
const l =
|
|
1294
|
-
s === "expression" ? (/\bMEDIAN\b/i.test(n.expression ?? "") && (l.MEDIAN = await
|
|
1319
|
+
const l = Xt(o.values);
|
|
1320
|
+
s === "expression" ? (/\bMEDIAN\b/i.test(n.expression ?? "") && (l.MEDIAN = await be(o.values, i)), a = Zt(n.expression ?? "", l)) : a = l[s.toUpperCase()];
|
|
1295
1321
|
}
|
|
1296
1322
|
if (z(i.signal), a !== null && Number.isInteger(a) && !Number.isSafeInteger(a)) throw new w("precision");
|
|
1297
1323
|
return { value: a, formatted: a === null ? "—" : a.toFixed(r.precision), numericCells: o.values.length, excludedCells: o.excluded, selectedCells: o.selected, precision: r.precision };
|
|
1298
1324
|
}
|
|
1299
1325
|
export {
|
|
1300
|
-
|
|
1301
|
-
|
|
1326
|
+
Yn as CSS_DPI,
|
|
1327
|
+
Ln as DEFAULT_BORDER_PT,
|
|
1302
1328
|
Z as DEFAULT_FONT_FAMILY,
|
|
1303
|
-
|
|
1304
|
-
|
|
1329
|
+
Dn as DEFAULT_FONT_PT,
|
|
1330
|
+
ur as DEFAULT_LABEL_PAGE_LIMIT,
|
|
1331
|
+
Fn as DEFAULT_STROKE_COLOR,
|
|
1305
1332
|
ye as DEFAULT_TEXT_COLOR,
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1333
|
+
On as LINE_HEIGHT,
|
|
1334
|
+
Jn as MM_PER_INCH,
|
|
1335
|
+
lr as OutputAssetError,
|
|
1309
1336
|
Ue as OutputFidelityError,
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1337
|
+
J as PAPER_SIZES,
|
|
1338
|
+
Mt as PageBuilder,
|
|
1339
|
+
fr as PaginateCellLimitError,
|
|
1340
|
+
pr as PaginatePageLimitError,
|
|
1341
|
+
Qn as RENDER_PLAN_SCHEMA_VERSION,
|
|
1342
|
+
Gr as REPORT_TEMPLATE_DOCUMENT_VERSION,
|
|
1343
|
+
_n as ReportBindingError,
|
|
1316
1344
|
w as ReportCalculationError,
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1345
|
+
je as ReportCellEditError,
|
|
1346
|
+
It as ReportCellFieldError,
|
|
1347
|
+
Kr as ReportParamValidationError,
|
|
1348
|
+
wr as ReportSourceError,
|
|
1349
|
+
Je as ReportTemplateError,
|
|
1322
1350
|
L as ReportTemplateStoreError,
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1351
|
+
zn as SCHEMA_VERSION_MACH,
|
|
1352
|
+
yt as TemplateBuilder,
|
|
1353
|
+
si as TreeRowLimitError,
|
|
1354
|
+
vr as applyReportCellEdit,
|
|
1355
|
+
br as applyReportCellEditBatch,
|
|
1356
|
+
yr as applyReportEditResult,
|
|
1357
|
+
tr as assertRenderPlan,
|
|
1358
|
+
Xr as assertReportParams,
|
|
1359
|
+
In as calculateReportSelection,
|
|
1360
|
+
cr as charWidthEm,
|
|
1333
1361
|
E as classOf,
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1362
|
+
Cn as cloneReportTemplate,
|
|
1363
|
+
yn as columnsFromContract,
|
|
1364
|
+
ht as computePageWindow,
|
|
1365
|
+
Mr as countTemplatePages,
|
|
1366
|
+
dr as createCanvasMeasurer,
|
|
1367
|
+
vn as createCanvasPager,
|
|
1368
|
+
mr as createHeuristicMeasurer,
|
|
1369
|
+
xn as createLabelTemplate,
|
|
1370
|
+
Rn as createLocalTemplateCatalog,
|
|
1371
|
+
Sn as createMemoryTemplateStore,
|
|
1372
|
+
En as createProviderReport,
|
|
1373
|
+
xr as createReportCellEdit,
|
|
1374
|
+
Er as createReportCellEditBatch,
|
|
1375
|
+
Tr as createReportCellResolver,
|
|
1376
|
+
Sr as createReportEditSession,
|
|
1377
|
+
Cr as createReportSource,
|
|
1378
|
+
Mn as createTableTemplate,
|
|
1379
|
+
bn as createTemplate,
|
|
1380
|
+
Tn as createTemplateManager,
|
|
1381
|
+
Ur as createTemplateRegistry,
|
|
1382
|
+
li as createTreeTable,
|
|
1383
|
+
ar as datasetJsonSchema,
|
|
1384
|
+
Rr as defineReport,
|
|
1385
|
+
Vr as defineReportTemplate,
|
|
1386
|
+
Pr as diffReportTemplates,
|
|
1387
|
+
Ar as estimateListLayoutCells,
|
|
1388
|
+
Bn as evalStyleRule,
|
|
1389
|
+
Zt as evaluateReportAggregateExpression,
|
|
1390
|
+
kr as formatReportCellEdit,
|
|
1391
|
+
Pn as formatReportClipboard,
|
|
1392
|
+
Zr as formatReportDateRange,
|
|
1393
|
+
Wn as formatValue,
|
|
1394
|
+
Ir as getReportCellContext,
|
|
1395
|
+
Nr as getReportEditSession,
|
|
1367
1396
|
oe as heuristicMeasurer,
|
|
1368
|
-
|
|
1397
|
+
Wr as inspectOutputCapabilities,
|
|
1369
1398
|
ee as isImageBackedComponent,
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1399
|
+
Qr as isReportDate,
|
|
1400
|
+
ei as isReportMonth,
|
|
1401
|
+
ti as isReportYear,
|
|
1402
|
+
Te as isRichText,
|
|
1374
1403
|
le as measurePageSizePx,
|
|
1375
|
-
|
|
1404
|
+
hr as measureTextMm,
|
|
1376
1405
|
xe as mergeComponentStyles,
|
|
1377
1406
|
ie as mmToPx,
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1407
|
+
Kn as mmToPxFactor,
|
|
1408
|
+
$r as paginateTemplate,
|
|
1409
|
+
Lr as paginateTemplatePages,
|
|
1410
|
+
jn as parseDateLocal,
|
|
1411
|
+
kn as parseReportCellFieldInput,
|
|
1383
1412
|
Ge as parseReportCellInput,
|
|
1384
|
-
|
|
1385
|
-
|
|
1413
|
+
An as parseReportClipboard,
|
|
1414
|
+
ni as parseReportDateRange,
|
|
1386
1415
|
I as parseReportTemplate,
|
|
1387
|
-
|
|
1388
|
-
|
|
1416
|
+
un as planFontSizePx,
|
|
1417
|
+
Dr as projectListColumns,
|
|
1389
1418
|
O as ptToPx,
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1419
|
+
Xn as pxToMm,
|
|
1420
|
+
Fr as registerReportEditSession,
|
|
1421
|
+
Or as relocateReportCellEdits,
|
|
1393
1422
|
ke as renderComponent,
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1423
|
+
st as renderPage,
|
|
1424
|
+
gn as renderPlan,
|
|
1425
|
+
pn as renderPlanToCanvas,
|
|
1426
|
+
wn as renderPlanToCanvasAsync,
|
|
1427
|
+
fn as renderPlanToImages,
|
|
1428
|
+
zr as reportCellEditKey,
|
|
1400
1429
|
G as reportOutputDiagnostics,
|
|
1401
|
-
|
|
1430
|
+
ri as reportParamsJsonSchema,
|
|
1402
1431
|
Me as resolveBoxBorders,
|
|
1403
|
-
|
|
1432
|
+
Gn as resolveComponentBinding,
|
|
1433
|
+
_ as resolveFontSize,
|
|
1404
1434
|
Ce as resolveGridLayout,
|
|
1405
1435
|
Q as resolveLineHeight,
|
|
1406
1436
|
Fe as resolvePaper,
|
|
1407
1437
|
ae as resolvePlanAssets,
|
|
1408
|
-
|
|
1438
|
+
W as resolveStroke,
|
|
1409
1439
|
Ee as resolveTextColor,
|
|
1410
|
-
|
|
1440
|
+
Hr as reviewReportTemplate,
|
|
1411
1441
|
H as round,
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1442
|
+
qr as serializeReportTemplate,
|
|
1443
|
+
_r as summarizeReportCellEdits,
|
|
1444
|
+
Un as toExcelNumberFormat,
|
|
1445
|
+
Vn as toNumber,
|
|
1446
|
+
nr as validateComponent,
|
|
1447
|
+
We as validateDatasetRows,
|
|
1448
|
+
rr as validatePage,
|
|
1449
|
+
ir as validateRenderPlan,
|
|
1450
|
+
Ht as validateReportCellFieldDefinition,
|
|
1451
|
+
ii as validateReportParamDefinitions,
|
|
1452
|
+
oi as validateReportParams,
|
|
1453
|
+
Ye as validateReportTemplate,
|
|
1454
|
+
Yr as validateReportTemplateDocument,
|
|
1455
|
+
ci as validateTreeOptions,
|
|
1456
|
+
Se as wrapText
|
|
1427
1457
|
};
|