@printstack/print-studio 0.1.0 → 0.1.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/README.md +122 -154
- package/assets/render.worker-DkH7TepL.js +109 -0
- package/{cloneDeep-C5UZRjbH.js → cloneDeep-waBDTGc3.js} +10 -4
- package/components/print-s-logo/print-s-logo.vue.d.ts +1 -1
- package/components/s-form/types.d.ts +1 -1
- package/core/coordinate-space.d.ts +16 -0
- package/core/document-model.d.ts +1 -1
- package/core/element-registry.d.ts +3 -8
- package/core/page-extensions.d.ts +1 -1
- package/core/types.d.ts +8 -0
- package/core.js +2 -2
- package/designer/commands/menu-adapter.d.ts +3 -3
- package/designer/commands/menu-types.d.ts +8 -1
- package/designer/commands/types.d.ts +2 -0
- package/designer/components/dialogs/preview-dialog.vue.d.ts +10 -1
- package/designer/components/dialogs/print-preview-dialog.vue.d.ts +14 -0
- package/designer/components/dialogs/print-preview-source.d.ts +22 -0
- package/designer/components/dialogs/use-document-preview.d.ts +5 -1
- package/designer/components/dialogs/use-preview-renderer.d.ts +2 -0
- package/designer/components/dialogs/use-print-preview.d.ts +33 -0
- package/designer/components/fields/use-table-draft.d.ts +0 -4
- package/designer/components/panels/layer-row-types.d.ts +37 -0
- package/designer/components/panels/layer-row.vue.d.ts +17 -0
- package/designer/components/stage/marquee-overlay.vue.d.ts +8 -0
- package/designer/components/stage/node-style.d.ts +3 -0
- package/designer/components/stage/selection-member.vue.d.ts +14 -0
- package/designer/composables/use-theme.d.ts +3 -0
- package/designer/facade/editing.d.ts +2 -2
- package/designer/facade/entities.d.ts +1156 -22
- package/designer/facade/output.d.ts +2 -2
- package/designer/frame/print-designer-frame.vue.d.ts +2 -2
- package/designer/frame/shared.d.ts +2 -0
- package/designer/frame/view.d.ts +9 -0
- package/designer/interactions/marquee.d.ts +1 -1
- package/designer/interactions/move.d.ts +3 -1
- package/designer/mount-print-designer.d.ts +1 -1
- package/designer/mount-print-preview.d.ts +5 -0
- package/designer/plugins/plugin-manager.d.ts +3 -3
- package/designer/plugins/types.d.ts +1 -1
- package/designer/print-designer.vue.d.ts +2 -2
- package/designer/print-preview.vue.d.ts +4 -0
- package/designer/stores/document-store.d.ts +72 -0
- package/designer/stores/editor-store.d.ts +770 -14
- package/designer/stores/page-store.d.ts +25 -1
- package/designer/stores/template-store.d.ts +52 -4
- package/designer/stores/types.d.ts +1 -0
- package/designer/stores/ui-store.d.ts +232 -3
- package/designer/stores/view-store.d.ts +10 -1
- package/designer.d.ts +1 -1
- package/designer.js +3 -3
- package/{document-model-DC9sn2WV.js → document-model-Cc5RoO4j.js} +160 -179
- package/elements/table/table-style.d.ts +3 -10
- package/host-OAp3gFDx.js +123 -0
- package/index.js +5 -5
- package/locales/runtime.d.ts +8 -2
- package/locales/translations/zh-CN/app.json.d.ts +1 -0
- package/locales/translations/zh-CN/designer.json.d.ts +9 -4
- package/{mount-print-designer-BzHLGlv-.js → mount-print-designer-DnHTrBE9.js} +4 -3
- package/mount-print-preview-Bcb08lJ-.js +66 -0
- package/package.json +1 -1
- package/presets-BunYODhE.js +13 -0
- package/{registries-BOU8RLim.js → registries-sg39PGF1.js} +793 -790
- package/runtime/browser-output.d.ts +2 -0
- package/runtime.js +4 -4
- package/{saas-B3fJOgHX.js → saas-D-q51uTz.js} +1 -1
- package/saas.js +1 -1
- package/{studio-C_rqbJ9q.js → studio-B3B6zI06.js} +830 -754
- package/studio-types.d.ts +3 -2
- package/style.css +1 -1
- package/vue.js +1035 -941
- package/assets/render.worker-Cfbk18NW.js +0 -109
- package/presets-Cwp20ef6.js +0 -133
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
-
import { $ as r, C as i, F as a, G as o, J as s, K as c, M as l, N as u, Q as d, R as f, S as p, T as m, U as h, W as g, X as _, Y as v, Z as y, _ as b, at as x, b as S, et as C, f as ee, it as w, k as T, l as E,
|
|
3
|
-
import { A as
|
|
2
|
+
import { $ as r, C as i, F as a, G as o, J as s, K as c, M as l, N as u, Q as d, R as f, S as p, T as m, U as h, W as g, X as _, Y as v, Z as y, _ as b, at as x, b as S, et as C, f as ee, it as w, k as T, l as E, nt as D, o as O, q as k, r as te, rt as ne, v as re, w as A, x as ie, y as ae } from "./document-model-Cc5RoO4j.js";
|
|
3
|
+
import { A as j, B as M, L as oe, R as se, j as ce } from "./cloneDeep-waBDTGc3.js";
|
|
4
4
|
// src/components/error-fallback/exceptions/SilentException.ts
|
|
5
5
|
var le = Symbol.for("portable-error-handling.SilentException"), ue = class extends Error {
|
|
6
6
|
[le] = !0;
|
|
@@ -111,7 +111,7 @@ async function me(e, t = {}) {
|
|
|
111
111
|
let r = new AbortController(), i = () => r.abort(t.signal?.reason);
|
|
112
112
|
t.signal?.addEventListener("abort", i, { once: !0 });
|
|
113
113
|
let a = setTimeout(() => {
|
|
114
|
-
r.abort(new M(
|
|
114
|
+
r.abort(new j(M("core.frame.loadTimeout"), { code: "render.resource-timeout" }));
|
|
115
115
|
}, n), o = () => {}, s = new Promise((e, t) => {
|
|
116
116
|
o = () => t(r.signal.reason), r.signal.addEventListener("abort", o, { once: !0 });
|
|
117
117
|
});
|
|
@@ -161,8 +161,8 @@ function he(e, t, n) {
|
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
// src/core/follow-layout.ts
|
|
164
|
-
function
|
|
165
|
-
return
|
|
164
|
+
function N(e) {
|
|
165
|
+
return r(e.map((e) => y(e, e.rotation)));
|
|
166
166
|
}
|
|
167
167
|
function ge(e) {
|
|
168
168
|
return ve(e).patches;
|
|
@@ -171,55 +171,55 @@ function _e(e, t, n = []) {
|
|
|
171
171
|
return ve(e, new Set(t), new Set(n)).gaps;
|
|
172
172
|
}
|
|
173
173
|
function ve(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
|
|
174
|
-
let
|
|
174
|
+
let r = [], i = [];
|
|
175
175
|
if (!e.followBlocks?.length) return {
|
|
176
|
-
gaps:
|
|
177
|
-
patches:
|
|
176
|
+
gaps: r,
|
|
177
|
+
patches: i
|
|
178
178
|
};
|
|
179
179
|
f(e);
|
|
180
|
-
for (let
|
|
181
|
-
let
|
|
182
|
-
if (
|
|
183
|
-
let
|
|
184
|
-
function
|
|
185
|
-
return
|
|
186
|
-
let t =
|
|
180
|
+
for (let a of e.pages) {
|
|
181
|
+
let o = (e.followBlocks ?? []).filter((e) => e.pageId === a.id);
|
|
182
|
+
if (o.length === 0) continue;
|
|
183
|
+
let s = new Map(a.elements.map((e) => [e.id, { ...e }])), c = /* @__PURE__ */ new Set();
|
|
184
|
+
function l(e) {
|
|
185
|
+
return N(e.flatMap((e) => {
|
|
186
|
+
let t = s.get(e);
|
|
187
187
|
return t ? [t] : [];
|
|
188
188
|
}));
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
if (
|
|
190
|
+
function u(a) {
|
|
191
|
+
if (c.has(a.id)) return;
|
|
192
192
|
let f = [];
|
|
193
|
-
if (
|
|
194
|
-
else if (
|
|
193
|
+
if (a.target.kind === "element") f = [a.target.id];
|
|
194
|
+
else if (a.target.kind === "repeatGroup") f = e.repeatGroups?.find((e) => e.id === a.target.id)?.elementIds ?? [];
|
|
195
195
|
else {
|
|
196
|
-
let e =
|
|
197
|
-
e && (
|
|
196
|
+
let e = o.find((e) => e.id === a.target.id);
|
|
197
|
+
e && (u(e), f = e.elementIds);
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
let p =
|
|
199
|
+
c.add(a.id);
|
|
200
|
+
let p = l(f), m = l(a.elementIds);
|
|
201
201
|
if (!p || !m) return;
|
|
202
|
-
let h =
|
|
203
|
-
h !==
|
|
202
|
+
let h = a.elementIds.some((e) => n.has(e) || t.has(e)) ? m.y - p.y - p.height : a.gap;
|
|
203
|
+
h !== a.gap && r.push({
|
|
204
204
|
gap: h,
|
|
205
|
-
id:
|
|
205
|
+
id: a.id
|
|
206
206
|
});
|
|
207
207
|
let g = p.y + p.height + h - m.y;
|
|
208
|
-
for (let e of
|
|
209
|
-
let t =
|
|
208
|
+
for (let e of a.elementIds) {
|
|
209
|
+
let t = s.get(e);
|
|
210
210
|
if (!t) continue;
|
|
211
|
-
let n =
|
|
212
|
-
n.y !== t.y && (Object.assign(t, n),
|
|
211
|
+
let n = d(t, 0, g);
|
|
212
|
+
n.y !== t.y && (Object.assign(t, n), i.push({
|
|
213
213
|
id: e,
|
|
214
214
|
patch: n
|
|
215
215
|
}));
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
for (let e of
|
|
218
|
+
for (let e of o) u(e);
|
|
219
219
|
}
|
|
220
220
|
return {
|
|
221
|
-
gaps:
|
|
222
|
-
patches:
|
|
221
|
+
gaps: r,
|
|
222
|
+
patches: i
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
// src/core/render/color.ts
|
|
@@ -269,19 +269,19 @@ function xe(e) {
|
|
|
269
269
|
t.b
|
|
270
270
|
].map((e) => Math.round(e * t.alpha + 255 * (1 - t.alpha)).toString(16).padStart(2, "0")).join("")}` : null;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function P(e) {
|
|
273
273
|
if (typeof e != "string") return !0;
|
|
274
274
|
let t = e.trim().toLowerCase();
|
|
275
275
|
return t === "" || t === "transparent" || t === "none";
|
|
276
276
|
}
|
|
277
277
|
function Se(e) {
|
|
278
|
-
return e === void 0 ||
|
|
278
|
+
return e === void 0 || P(e) ? "#ffffff" : xe(e) ?? e.trim();
|
|
279
279
|
}
|
|
280
280
|
// src/core/render/html.ts
|
|
281
281
|
function Ce(e) {
|
|
282
282
|
return (e == null ? "" : String(e)).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function F(e) {
|
|
285
285
|
let t = [];
|
|
286
286
|
for (let [n, r] of Object.entries(e)) {
|
|
287
287
|
if (r == null || r === "") continue;
|
|
@@ -399,7 +399,7 @@ async function Me(e, t) {
|
|
|
399
399
|
let t = await document.fonts.load(e, Array.from(r).join(""));
|
|
400
400
|
for (let e of t) n.add(Oe(e.family, e));
|
|
401
401
|
} catch (n) {
|
|
402
|
-
throw t?.throwIfAborted(), new M(
|
|
402
|
+
throw t?.throwIfAborted(), new j(M("core.font.loadFailed", { font: e }), {
|
|
403
403
|
cause: n,
|
|
404
404
|
code: "render.font-load-failed"
|
|
405
405
|
});
|
|
@@ -436,7 +436,7 @@ async function Pe(e, t = [], n) {
|
|
|
436
436
|
dispose: o
|
|
437
437
|
};
|
|
438
438
|
} catch (e) {
|
|
439
|
-
throw o(), n?.throwIfAborted(), e instanceof
|
|
439
|
+
throw o(), n?.throwIfAborted(), e instanceof j ? e : new j(M("core.font.loadFailed", { font: Array.from(r).join(", ") }), {
|
|
440
440
|
cause: e,
|
|
441
441
|
code: "render.font-load-failed"
|
|
442
442
|
});
|
|
@@ -453,7 +453,7 @@ function Fe(e) {
|
|
|
453
453
|
function Ie(e, t, n = {}) {
|
|
454
454
|
return new Promise((r, i) => {
|
|
455
455
|
let a = e.contentDocument, o = !1, s = !1, c = setTimeout(() => {
|
|
456
|
-
u(new M(
|
|
456
|
+
u(new j(M("core.frame.loadTimeout")));
|
|
457
457
|
}, n.timeoutMs ?? 6e4), l = setInterval(f, 100);
|
|
458
458
|
function u(t) {
|
|
459
459
|
o || (o = !0, clearTimeout(c), clearInterval(l), e.removeEventListener("load", h), n.signal?.removeEventListener("abort", d), t ? i(t) : r());
|
|
@@ -483,7 +483,7 @@ function Ie(e, t, n = {}) {
|
|
|
483
483
|
m(e);
|
|
484
484
|
}
|
|
485
485
|
})), t.fonts && (t.body.getBoundingClientRect(), await t.fonts.ready, t.fonts.forEach?.((e) => {
|
|
486
|
-
if (e.status === "error") throw new M(
|
|
486
|
+
if (e.status === "error") throw new j(M("core.font.loadFailed", { font: e.family }), { code: "render.font-load-failed" });
|
|
487
487
|
})), u();
|
|
488
488
|
} catch (e) {
|
|
489
489
|
u(e);
|
|
@@ -492,7 +492,7 @@ function Ie(e, t, n = {}) {
|
|
|
492
492
|
}
|
|
493
493
|
function m(e) {
|
|
494
494
|
if (o) return;
|
|
495
|
-
let t =
|
|
495
|
+
let t = M("core.image.loadFailed", { imageUrl: e.currentSrc || e.getAttribute("src") || "" }), r = e.ownerDocument.createElement("div");
|
|
496
496
|
r.className = "print-image__failure", r.style.cssText = e.style.cssText, Object.assign(r.style, {
|
|
497
497
|
alignItems: "center",
|
|
498
498
|
background: "#f3f3f3",
|
|
@@ -505,7 +505,7 @@ function Ie(e, t, n = {}) {
|
|
|
505
505
|
overflow: "hidden",
|
|
506
506
|
overflowWrap: "anywhere",
|
|
507
507
|
textAlign: "center"
|
|
508
|
-
}), r.textContent =
|
|
508
|
+
}), r.textContent = M("core.image.loadFailedHint"), r.title = t, e.replaceWith(r), n.onWarning?.(t);
|
|
509
509
|
}
|
|
510
510
|
function h() {
|
|
511
511
|
p();
|
|
@@ -529,17 +529,17 @@ function Re(e, t) {
|
|
|
529
529
|
loops: [...e.loops, t]
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function I(e) {
|
|
533
533
|
if (typeof e != "object" || !e) return !1;
|
|
534
534
|
let t = Object.getPrototypeOf(e);
|
|
535
|
-
return t === Object.prototype || t === null;
|
|
535
|
+
return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null && Object.prototype.toString.call(e) === "[object Object]";
|
|
536
536
|
}
|
|
537
537
|
function ze(e) {
|
|
538
538
|
let t = [], n = /([^[.\]]+)|\[(\d+)\]/g, r;
|
|
539
539
|
for (; (r = n.exec(e)) !== null;) t.push(r[1] ?? r[2]);
|
|
540
540
|
return t;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function L(e, t) {
|
|
543
543
|
let n = t.trim();
|
|
544
544
|
if (!n) return;
|
|
545
545
|
if (n === "$index") return e.loops[e.loops.length - 1]?.index;
|
|
@@ -548,7 +548,7 @@ function R(e, t) {
|
|
|
548
548
|
let i = r[0], a;
|
|
549
549
|
for (let t = e.loops.length - 1; t >= 0; t--) {
|
|
550
550
|
let n = e.loops[t].item;
|
|
551
|
-
if (
|
|
551
|
+
if (I(n) && i in n) {
|
|
552
552
|
a = n[i];
|
|
553
553
|
break;
|
|
554
554
|
}
|
|
@@ -625,7 +625,7 @@ function qe(e) {
|
|
|
625
625
|
function Je(e, t, n) {
|
|
626
626
|
if (!t.formatter) return e;
|
|
627
627
|
let r = Ve[t.formatter];
|
|
628
|
-
return r ? r(e, t.args) : (n.add(
|
|
628
|
+
return r ? r(e, t.args) : (n.add(M("core.dataContext.unknownFormatter", {
|
|
629
629
|
bindingPath: t.path,
|
|
630
630
|
formatterName: t.formatter
|
|
631
631
|
})), e);
|
|
@@ -634,7 +634,7 @@ var Ye = class {
|
|
|
634
634
|
items = /* @__PURE__ */ new Map();
|
|
635
635
|
sourceStack = [];
|
|
636
636
|
add(e) {
|
|
637
|
-
let t = this.sourceStack[this.sourceStack.length - 1], n = t ?
|
|
637
|
+
let t = this.sourceStack[this.sourceStack.length - 1], n = t ? M("core.dataContext.scopedWarning", {
|
|
638
638
|
message: e,
|
|
639
639
|
source: t
|
|
640
640
|
}) : e;
|
|
@@ -654,10 +654,10 @@ var Ye = class {
|
|
|
654
654
|
};
|
|
655
655
|
function Xe(e) {
|
|
656
656
|
let t = e.name?.trim();
|
|
657
|
-
return t ?
|
|
657
|
+
return t ? M("core.dataContext.namedElementDescription", {
|
|
658
658
|
elementName: t,
|
|
659
659
|
elementType: e.type
|
|
660
|
-
}) :
|
|
660
|
+
}) : M("core.dataContext.unnamedElementDescription", {
|
|
661
661
|
elementId: e.id.slice(0, 8),
|
|
662
662
|
elementType: e.type
|
|
663
663
|
});
|
|
@@ -678,8 +678,8 @@ function Ze(e, t, n, r = () => !0) {
|
|
|
678
678
|
function Qe(e, t, n) {
|
|
679
679
|
let r = qe(e), i = t.deferExpression?.(r.path, e);
|
|
680
680
|
if (i !== void 0) return i;
|
|
681
|
-
let a =
|
|
682
|
-
if (a === void 0) n.add(
|
|
681
|
+
let a = L(t, r.path);
|
|
682
|
+
if (a === void 0) n.add(M("core.dataContext.bindingPathMissing", { bindingPath: r.path }));
|
|
683
683
|
else return Je(a, r, n);
|
|
684
684
|
}
|
|
685
685
|
function $e(e) {
|
|
@@ -691,7 +691,7 @@ function et(e) {
|
|
|
691
691
|
function tt(e, t, n = /* @__PURE__ */ new Set()) {
|
|
692
692
|
if (typeof e == "string") return t(e);
|
|
693
693
|
if (Array.isArray(e)) return e.map((e) => tt(e, t, n));
|
|
694
|
-
if (
|
|
694
|
+
if (I(e)) {
|
|
695
695
|
let r = {};
|
|
696
696
|
for (let [i, a] of Object.entries(e)) r[i] = n.has(i) ? a : tt(a, t, n);
|
|
697
697
|
return r;
|
|
@@ -699,13 +699,13 @@ function tt(e, t, n = /* @__PURE__ */ new Set()) {
|
|
|
699
699
|
return e;
|
|
700
700
|
}
|
|
701
701
|
function nt(e, t) {
|
|
702
|
-
if (!
|
|
702
|
+
if (!I(t)) return "";
|
|
703
703
|
if (e in t) return e;
|
|
704
704
|
let n = e.toLowerCase();
|
|
705
705
|
for (let e of Object.keys(t)) if (e.toLowerCase() === n) return e;
|
|
706
706
|
return "";
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function R(e, t, n, r = "render") {
|
|
709
709
|
try {
|
|
710
710
|
return rt(e, t, n, r);
|
|
711
711
|
} catch (t) {
|
|
@@ -716,7 +716,7 @@ function z(e, t, n, r = "render") {
|
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
function rt(e, t, n, r) {
|
|
719
|
-
let i = it(e, t, n), a =
|
|
719
|
+
let i = it(e, t, n), a = k(t).get(e.type)?.measureSize?.({
|
|
720
720
|
mode: r,
|
|
721
721
|
node: i,
|
|
722
722
|
props: i.props
|
|
@@ -730,14 +730,14 @@ function it(e, t, n) {
|
|
|
730
730
|
return n.scope(Xe(e), () => at(e, t, n));
|
|
731
731
|
}
|
|
732
732
|
function at(e, t, n) {
|
|
733
|
-
let r =
|
|
733
|
+
let r = k(t).get(e.type)?.resolveBindings?.({
|
|
734
734
|
context: t,
|
|
735
735
|
node: e,
|
|
736
736
|
warnings: n
|
|
737
737
|
}), i = r?.props ?? e.props, a = tt(i, (e) => Ze(e, t, n), r?.skipKeys ?? /* @__PURE__ */ new Set());
|
|
738
738
|
return {
|
|
739
739
|
...e,
|
|
740
|
-
props:
|
|
740
|
+
props: I(a) ? a : { ...i }
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
743
|
var ot = new class {
|
|
@@ -760,31 +760,31 @@ var ot = new class {
|
|
|
760
760
|
}
|
|
761
761
|
}(), st = [
|
|
762
762
|
{
|
|
763
|
-
label: () =>
|
|
763
|
+
label: () => M("designer.documentVariables.pageNumber"),
|
|
764
764
|
name: "pageNumber",
|
|
765
765
|
resolve: (e) => e.pageNumber,
|
|
766
766
|
type: "number"
|
|
767
767
|
},
|
|
768
768
|
{
|
|
769
|
-
label: () =>
|
|
769
|
+
label: () => M("designer.documentVariables.pageCount"),
|
|
770
770
|
name: "pageCount",
|
|
771
771
|
resolve: (e) => e.pageCount,
|
|
772
772
|
type: "number"
|
|
773
773
|
},
|
|
774
774
|
{
|
|
775
|
-
label: () =>
|
|
775
|
+
label: () => M("designer.documentVariables.now"),
|
|
776
776
|
name: "now",
|
|
777
777
|
resolve: (e) => e.now,
|
|
778
778
|
type: "date"
|
|
779
779
|
},
|
|
780
780
|
{
|
|
781
|
-
label: () =>
|
|
781
|
+
label: () => M("designer.documentVariables.documentName"),
|
|
782
782
|
name: "documentName",
|
|
783
783
|
resolve: (e) => e.documentName,
|
|
784
784
|
type: "string"
|
|
785
785
|
},
|
|
786
786
|
{
|
|
787
|
-
label: () =>
|
|
787
|
+
label: () => M("designer.documentVariables.pageName"),
|
|
788
788
|
name: "pageName",
|
|
789
789
|
resolve: (e) => e.pageName,
|
|
790
790
|
type: "string"
|
|
@@ -905,15 +905,15 @@ var yt = class {
|
|
|
905
905
|
elements;
|
|
906
906
|
id = "html";
|
|
907
907
|
get label() {
|
|
908
|
-
return
|
|
908
|
+
return M("parser.htmlParser.displayName");
|
|
909
909
|
}
|
|
910
910
|
constructor(e = o) {
|
|
911
911
|
this.elements = e;
|
|
912
912
|
}
|
|
913
913
|
async parse(e, t = {}) {
|
|
914
|
-
if (e.pages.length === 0) throw new M(
|
|
914
|
+
if (e.pages.length === 0) throw new j(M("parser.htmlParser.emptyDocument"), {
|
|
915
915
|
code: "parse.no-pages",
|
|
916
|
-
detail:
|
|
916
|
+
detail: M("parser.htmlParser.emptyDocumentDetail")
|
|
917
917
|
});
|
|
918
918
|
let n = e.pages[0], r = [], i = e.pages.length;
|
|
919
919
|
for (let [n, a] of e.pages.entries()) t.signal?.throwIfAborted(), r.push(await this.renderPage(a, e, n, t)), t.onProgress?.({
|
|
@@ -926,7 +926,7 @@ var yt = class {
|
|
|
926
926
|
stage: "serialize",
|
|
927
927
|
total: 1
|
|
928
928
|
});
|
|
929
|
-
let a = r.join("\n"), o = bt(t.title ?? e.name), s = e.pages.map((e, t) => `@page printPage${t} { size: ${
|
|
929
|
+
let a = r.join("\n"), o = bt(t.title ?? e.name), s = e.pages.map((e, t) => `@page printPage${t} { size: ${z(e.width)}mm ${z(e.height)}mm; margin: 0; }`);
|
|
930
930
|
return [
|
|
931
931
|
"<!doctype html>",
|
|
932
932
|
"<html lang=\"zh-CN\">",
|
|
@@ -935,7 +935,7 @@ var yt = class {
|
|
|
935
935
|
`<title>${o}</title>`,
|
|
936
936
|
"<style>",
|
|
937
937
|
(t.fontCss ?? "").replaceAll("<", "\\3c "),
|
|
938
|
-
`@page { size: ${
|
|
938
|
+
`@page { size: ${z(n.width)}mm ${z(n.height)}mm; margin: 0; }`,
|
|
939
939
|
...s,
|
|
940
940
|
"*, *::before, *::after { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }",
|
|
941
941
|
"html, body { margin: 0; padding: 0; background: #ffffff; }",
|
|
@@ -956,7 +956,7 @@ var yt = class {
|
|
|
956
956
|
renderElement(e, t, n, r) {
|
|
957
957
|
let i = this.elements.get(e.type);
|
|
958
958
|
if (!e.visible) return "";
|
|
959
|
-
if (!i) throw Error(
|
|
959
|
+
if (!i) throw Error(M("core.documentModel.unregisteredElementType", { elementType: e.type }));
|
|
960
960
|
let a = i.toHtml({
|
|
961
961
|
document: r,
|
|
962
962
|
node: e,
|
|
@@ -964,13 +964,13 @@ var yt = class {
|
|
|
964
964
|
props: e.props
|
|
965
965
|
}), o = {
|
|
966
966
|
height: `${Math.ceil(e.height * 1e3) / 1e3}mm`,
|
|
967
|
-
left: `${
|
|
967
|
+
left: `${z(e.x)}mm`,
|
|
968
968
|
position: "absolute",
|
|
969
|
-
top: `${
|
|
970
|
-
width: `${
|
|
969
|
+
top: `${z(e.y)}mm`,
|
|
970
|
+
width: `${z(e.width)}mm`,
|
|
971
971
|
zIndex: String(t + 1)
|
|
972
972
|
};
|
|
973
|
-
return e.rotation && (o.transform = `rotate(${
|
|
973
|
+
return e.rotation && (o.transform = `rotate(${z(e.rotation)}deg)`), e.opacity < 1 && (o.opacity = String(e.opacity)), `<div style="${F(o)}">${a}</div>`;
|
|
974
974
|
}
|
|
975
975
|
async renderPage(e, t, n, r) {
|
|
976
976
|
let i = [];
|
|
@@ -986,13 +986,13 @@ var yt = class {
|
|
|
986
986
|
}
|
|
987
987
|
let a = i.join("\n");
|
|
988
988
|
return [
|
|
989
|
-
`<section class="print-page" style="page:printPage${n};width:${
|
|
989
|
+
`<section class="print-page" style="page:printPage${n};width:${z(e.width)}mm;height:${z(e.height)}mm;background:${Se(e.background)}">`,
|
|
990
990
|
a,
|
|
991
991
|
"</section>"
|
|
992
992
|
].join("\n");
|
|
993
993
|
}
|
|
994
994
|
};
|
|
995
|
-
function
|
|
995
|
+
function z(e) {
|
|
996
996
|
return Math.round(e * 100) / 100;
|
|
997
997
|
}
|
|
998
998
|
function bt(e) {
|
|
@@ -1012,7 +1012,7 @@ function xt(e, t) {
|
|
|
1012
1012
|
t?.addEventListener("abort", o, { once: !0 }), /^https?:\/\//i.test(e) && (i.crossOrigin = "anonymous"), i.onload = () => {
|
|
1013
1013
|
a(), n(i);
|
|
1014
1014
|
}, i.onerror = () => {
|
|
1015
|
-
a(), r(Error(
|
|
1015
|
+
a(), r(Error(M("core.image.loadFailed", { imageUrl: e })));
|
|
1016
1016
|
}, i.src = e;
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
@@ -1056,61 +1056,61 @@ function Et(e) {
|
|
|
1056
1056
|
var Dt = [
|
|
1057
1057
|
{
|
|
1058
1058
|
get label() {
|
|
1059
|
-
return
|
|
1059
|
+
return M("core.textLayout.microsoftYahei");
|
|
1060
1060
|
},
|
|
1061
1061
|
value: "Microsoft YaHei"
|
|
1062
1062
|
},
|
|
1063
1063
|
{
|
|
1064
1064
|
get label() {
|
|
1065
|
-
return
|
|
1065
|
+
return M("core.textLayout.simSun");
|
|
1066
1066
|
},
|
|
1067
1067
|
value: "SimSun"
|
|
1068
1068
|
},
|
|
1069
1069
|
{
|
|
1070
1070
|
get label() {
|
|
1071
|
-
return
|
|
1071
|
+
return M("core.textLayout.simHei");
|
|
1072
1072
|
},
|
|
1073
1073
|
value: "SimHei"
|
|
1074
1074
|
},
|
|
1075
1075
|
{
|
|
1076
1076
|
get label() {
|
|
1077
|
-
return
|
|
1077
|
+
return M("core.textLayout.kaiTi");
|
|
1078
1078
|
},
|
|
1079
1079
|
value: "KaiTi"
|
|
1080
1080
|
},
|
|
1081
1081
|
{
|
|
1082
1082
|
get label() {
|
|
1083
|
-
return
|
|
1083
|
+
return M("core.textLayout.arial");
|
|
1084
1084
|
},
|
|
1085
1085
|
value: "Arial"
|
|
1086
1086
|
},
|
|
1087
1087
|
{
|
|
1088
1088
|
get label() {
|
|
1089
|
-
return
|
|
1089
|
+
return M("core.textLayout.timesNewRoman");
|
|
1090
1090
|
},
|
|
1091
1091
|
value: "Times New Roman"
|
|
1092
1092
|
},
|
|
1093
1093
|
{
|
|
1094
1094
|
get label() {
|
|
1095
|
-
return
|
|
1095
|
+
return M("core.textLayout.courierNew");
|
|
1096
1096
|
},
|
|
1097
1097
|
value: "Courier New"
|
|
1098
1098
|
},
|
|
1099
1099
|
{
|
|
1100
1100
|
get label() {
|
|
1101
|
-
return
|
|
1101
|
+
return M("core.textLayout.sansSerif");
|
|
1102
1102
|
},
|
|
1103
1103
|
value: "sans-serif"
|
|
1104
1104
|
},
|
|
1105
1105
|
{
|
|
1106
1106
|
get label() {
|
|
1107
|
-
return
|
|
1107
|
+
return M("core.textLayout.serif");
|
|
1108
1108
|
},
|
|
1109
1109
|
value: "serif"
|
|
1110
1110
|
},
|
|
1111
1111
|
{
|
|
1112
1112
|
get label() {
|
|
1113
|
-
return
|
|
1113
|
+
return M("core.textLayout.monospace");
|
|
1114
1114
|
},
|
|
1115
1115
|
value: "monospace"
|
|
1116
1116
|
}
|
|
@@ -1201,7 +1201,7 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1201
1201
|
});
|
|
1202
1202
|
}
|
|
1203
1203
|
ellipse(e, t, n, r, i) {
|
|
1204
|
-
let a = !
|
|
1204
|
+
let a = !P(i.fill), o = !P(i.stroke) && (i.strokeWidthMm ?? 0) > 0;
|
|
1205
1205
|
if (!a && !o) return;
|
|
1206
1206
|
this.setDash(i.dashMm ?? []), o && (this.setStrokeColor(i.stroke), this.setStrokeWidth(i.strokeWidthMm)), a && this.setFillColor(i.fill);
|
|
1207
1207
|
let s = Wt(a, o);
|
|
@@ -1211,10 +1211,10 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1211
1211
|
typeof e == "string" && t ? this.pdf.addImage(e, t, n, r, i, a) : this.pdf.addImage(e, n, r, i, a);
|
|
1212
1212
|
}
|
|
1213
1213
|
line(e, t, n, r, i) {
|
|
1214
|
-
|
|
1214
|
+
P(i.color) || i.widthMm <= 0 || (this.setStrokeColor(i.color), this.setStrokeWidth(i.widthMm), this.setDash(i.dashMm ?? []), this.pdf.line(e, t, n, r), this.setDash([]));
|
|
1215
1215
|
}
|
|
1216
1216
|
rect(e, t, n, r, i) {
|
|
1217
|
-
let a = !
|
|
1217
|
+
let a = !P(i.fill), o = !P(i.stroke) && (i.strokeWidthMm ?? 0) > 0;
|
|
1218
1218
|
if (!a && !o) return;
|
|
1219
1219
|
this.setDash(i.dashMm ?? []), o && (this.setStrokeColor(i.stroke), this.setStrokeWidth(i.strokeWidthMm)), a && this.setFillColor(i.fill);
|
|
1220
1220
|
let s = Wt(a, o), c = Math.max(0, i.radiusMm ?? 0);
|
|
@@ -1242,8 +1242,8 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1242
1242
|
this.applyColor(e, !1, !0);
|
|
1243
1243
|
}
|
|
1244
1244
|
text(e) {
|
|
1245
|
-
if (
|
|
1246
|
-
let t = e.paddingMm ?? 0, n = e.x + t, r = e.y + t, i = Math.max(2, e.width - t * 2), a = Math.max(2, e.height - t * 2), o = e.text, s = Math.max(1, e.fontSizePt), c =
|
|
1245
|
+
if (P(e.color) || !e.text) return;
|
|
1246
|
+
let t = e.paddingMm ?? 0, n = e.x + t, r = e.y + t, i = Math.max(2, e.width - t * 2), a = Math.max(2, e.height - t * 2), o = e.text, s = Math.max(1, e.fontSizePt), c = ne(e.letterSpacingPt), l = e.lineHeight > 0 ? e.lineHeight : 1.2, u = i * C;
|
|
1247
1247
|
jt(o) && !Mt(e.fontFamily) && e.fontFamily in At && !this.webFonts.has(e.fontFamily.toLowerCase()) ? this.drawTextNative(e, o, n, r, i, a, s, c, u, l) : this.drawTextRaster(e, o, n, r, i, a, s, c, u, l);
|
|
1248
1248
|
}
|
|
1249
1249
|
applyColor(e, t, n = !1) {
|
|
@@ -1253,8 +1253,8 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1253
1253
|
drawDecorationPdf(e, t, n, r, i, a, o, s) {
|
|
1254
1254
|
let c = e.textDecoration ?? "none";
|
|
1255
1255
|
if (c === "none") return;
|
|
1256
|
-
let l = this.pdf.getTextWidth(t), u = Gt(r, n, l), d = c === "underline" ? i +
|
|
1257
|
-
this.pdf.setLineWidth(
|
|
1256
|
+
let l = this.pdf.getTextWidth(t), u = Gt(r, n, l), d = c === "underline" ? i + D(a * .12) : (o + s) / 2;
|
|
1257
|
+
this.pdf.setLineWidth(D(Math.max(.5, a / 14))), this.pdf.line(u, d, u + l, d);
|
|
1258
1258
|
}
|
|
1259
1259
|
drawTextNative(e, t, n, r, i, a, o, s, c, l) {
|
|
1260
1260
|
let u = Nt({
|
|
@@ -1262,9 +1262,9 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1262
1262
|
fontSize: o,
|
|
1263
1263
|
fontStyle: e.fontStyle,
|
|
1264
1264
|
fontWeight: e.fontWeight
|
|
1265
|
-
},
|
|
1265
|
+
}, ne(o)), d = e.singleLine ? [Lt(t, u, c, s)] : Rt(t, u, c, s), f = At[e.fontFamily] ?? "helvetica", p = this.pdf;
|
|
1266
1266
|
p.setFont(f, this.nativeFontStyle(e)), p.setFontSize(o), this.setTextColor(e.color);
|
|
1267
|
-
let m =
|
|
1267
|
+
let m = D(o * l), h = D(o * .8), g = d.length * m, _ = Ht(e.verticalAlign, r, a, g), v = D(e.letterSpacingPt);
|
|
1268
1268
|
d.forEach((t, r) => {
|
|
1269
1269
|
if (t === "") return;
|
|
1270
1270
|
let a = _ + r * m + h, s = e.align === "justify" ? "left" : e.align, c = Ut(e.align, n, i);
|
|
@@ -1280,15 +1280,15 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1280
1280
|
fontSize: o,
|
|
1281
1281
|
fontStyle: e.fontStyle,
|
|
1282
1282
|
fontWeight: e.fontWeight
|
|
1283
|
-
},
|
|
1283
|
+
}, ne(o)), d = e.singleLine ? [Lt(t, u, c, s)] : Rt(t, u, c, s), f = D(o * l), p = D(o * .8), m = d.length * f, h = n - e.x, g = r - e.y, _ = Ht(e.verticalAlign, g, a, m), v = document.createElement("canvas");
|
|
1284
1284
|
v.width = Math.max(1, Math.round(e.width * zt)), v.height = Math.max(1, Math.round(e.height * zt));
|
|
1285
1285
|
let y = v.getContext("2d");
|
|
1286
1286
|
if (!y) return;
|
|
1287
1287
|
y.scale(zt, zt);
|
|
1288
|
-
let b =
|
|
1288
|
+
let b = D(o), x = String(e.fontWeight || "400");
|
|
1289
1289
|
y.font = `${e.fontStyle === "italic" ? "italic " : ""}${x} ${b}px "${e.fontFamily}"`;
|
|
1290
1290
|
try {
|
|
1291
|
-
y.letterSpacing = `${
|
|
1291
|
+
y.letterSpacing = `${D(e.letterSpacingPt)}px`;
|
|
1292
1292
|
} catch {}
|
|
1293
1293
|
y.fillStyle = e.color, y.textBaseline = "alphabetic", d.forEach((t, n) => {
|
|
1294
1294
|
if (t === "") return;
|
|
@@ -1296,8 +1296,8 @@ var zt = 300 / 25.4, Bt = 96 / 25.4, Vt = class {
|
|
|
1296
1296
|
y.textAlign = e.align === "justify" ? "left" : e.align, y.fillText(t, a, r);
|
|
1297
1297
|
let c = e.textDecoration ?? "none";
|
|
1298
1298
|
if (c !== "none") {
|
|
1299
|
-
let i = It(t, u, s) /
|
|
1300
|
-
y.fillRect(l, d -
|
|
1299
|
+
let i = It(t, u, s) / C, l = Gt(e.align, a, i), d = c === "underline" ? r + D(o * .12) : _ + (n + .5) * f;
|
|
1300
|
+
y.fillRect(l, d - D(Math.max(.5, o / 28)), i, D(Math.max(.5, o / 14)));
|
|
1301
1301
|
}
|
|
1302
1302
|
}), this.pdf.addImage(v, "PNG", e.x, e.y, e.width, e.height);
|
|
1303
1303
|
}
|
|
@@ -1323,7 +1323,7 @@ async function Kt(e, t) {
|
|
|
1323
1323
|
let n = new DOMParser().parseFromString(`<div xmlns="http://www.w3.org/1999/xhtml">${e}</div>`, "application/xhtml+xml");
|
|
1324
1324
|
for (let e of Array.from(n.querySelectorAll("img"))) {
|
|
1325
1325
|
let n = e.getAttribute("src") ?? "", r = await St(n, t);
|
|
1326
|
-
if (!r) throw new M(
|
|
1326
|
+
if (!r) throw new j(M("core.image.loadFailed", { imageUrl: n }), { code: "render.image-load-failed" });
|
|
1327
1327
|
e.setAttribute("src", r);
|
|
1328
1328
|
}
|
|
1329
1329
|
return new XMLSerializer().serializeToString(n.documentElement);
|
|
@@ -1332,15 +1332,15 @@ var qt = class {
|
|
|
1332
1332
|
elements;
|
|
1333
1333
|
id = "pdf";
|
|
1334
1334
|
get label() {
|
|
1335
|
-
return
|
|
1335
|
+
return M("parser.pdfParser.displayName");
|
|
1336
1336
|
}
|
|
1337
1337
|
constructor(e = o) {
|
|
1338
1338
|
this.elements = e;
|
|
1339
1339
|
}
|
|
1340
1340
|
async parse(e, t = {}) {
|
|
1341
|
-
if (e.pages.length === 0) throw new M(
|
|
1341
|
+
if (e.pages.length === 0) throw new j(M("parser.pdfParser.emptyDocument"), {
|
|
1342
1342
|
code: "parse.no-pages",
|
|
1343
|
-
detail:
|
|
1343
|
+
detail: M("parser.pdfParser.emptyDocumentDetail")
|
|
1344
1344
|
});
|
|
1345
1345
|
let n = t.rasterPxPerMm ?? 11.811023622047244;
|
|
1346
1346
|
t.signal?.throwIfAborted();
|
|
@@ -1363,7 +1363,7 @@ var qt = class {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
async drawRotated(e, t, n, r, i, a) {
|
|
1365
1365
|
let o = this.elements.get(t.type);
|
|
1366
|
-
if (!o) throw Error(
|
|
1366
|
+
if (!o) throw Error(M("core.documentModel.unregisteredElementType", { elementType: t.type }));
|
|
1367
1367
|
let s;
|
|
1368
1368
|
try {
|
|
1369
1369
|
s = o.toHtml({
|
|
@@ -1373,7 +1373,7 @@ var qt = class {
|
|
|
1373
1373
|
props: t.props
|
|
1374
1374
|
});
|
|
1375
1375
|
} catch (e) {
|
|
1376
|
-
throw new M(
|
|
1376
|
+
throw new j(M("parser.pdfParser.rotatedElementRasterizationFailed", {
|
|
1377
1377
|
elementId: t.id,
|
|
1378
1378
|
elementType: t.type
|
|
1379
1379
|
}), {
|
|
@@ -1382,7 +1382,7 @@ var qt = class {
|
|
|
1382
1382
|
});
|
|
1383
1383
|
}
|
|
1384
1384
|
s = await Kt(s, a.signal);
|
|
1385
|
-
let c =
|
|
1385
|
+
let c = y({
|
|
1386
1386
|
height: t.height,
|
|
1387
1387
|
width: t.width,
|
|
1388
1388
|
x: t.x,
|
|
@@ -1390,33 +1390,33 @@ var qt = class {
|
|
|
1390
1390
|
}, t.rotation), l = globalThis.document.createElement("canvas");
|
|
1391
1391
|
l.width = Math.max(1, Math.round(c.width * i)), l.height = Math.max(1, Math.round(c.height * i));
|
|
1392
1392
|
let u = l.getContext("2d");
|
|
1393
|
-
if (!u) throw new M(
|
|
1393
|
+
if (!u) throw new j(M("parser.pdfParser.rotatedElementRasterizationFailed", {
|
|
1394
1394
|
elementId: t.id,
|
|
1395
1395
|
elementType: t.type
|
|
1396
1396
|
}), { code: "render.pdf-rotated-element-failed" });
|
|
1397
1397
|
u.scale(i, i);
|
|
1398
|
-
let
|
|
1399
|
-
height: `${
|
|
1400
|
-
left: `${
|
|
1398
|
+
let d = {
|
|
1399
|
+
height: `${B(t.height)}mm`,
|
|
1400
|
+
left: `${B(t.x - c.x)}mm`,
|
|
1401
1401
|
position: "absolute",
|
|
1402
|
-
top: `${
|
|
1403
|
-
transform: `rotate(${
|
|
1404
|
-
width: `${
|
|
1405
|
-
},
|
|
1406
|
-
`<div xmlns="http://www.w3.org/1999/xhtml" style="width:${
|
|
1402
|
+
top: `${B(t.y - c.y)}mm`,
|
|
1403
|
+
transform: `rotate(${B(t.rotation)}deg)`,
|
|
1404
|
+
width: `${B(t.width)}mm`
|
|
1405
|
+
}, f = [
|
|
1406
|
+
`<div xmlns="http://www.w3.org/1999/xhtml" style="width:${B(c.width)}mm;height:${B(c.height)}mm;">`,
|
|
1407
1407
|
`<style>${Ce(a.fontCss ?? "")}</style>`,
|
|
1408
|
-
`<div style="${
|
|
1408
|
+
`<div style="${F(d)}">${s}</div>`,
|
|
1409
1409
|
"</div>"
|
|
1410
|
-
].join(""),
|
|
1411
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${l.width}" height="${l.height}" viewBox="0 0 ${
|
|
1412
|
-
`<foreignObject width="100%" height="100%">${
|
|
1410
|
+
].join(""), p = Math.max(1, B(c.width * Bt)), m = Math.max(1, B(c.height * Bt)), h = [
|
|
1411
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${l.width}" height="${l.height}" viewBox="0 0 ${p} ${m}">`,
|
|
1412
|
+
`<foreignObject width="100%" height="100%">${f}</foreignObject>`,
|
|
1413
1413
|
"</svg>"
|
|
1414
1414
|
].join("");
|
|
1415
1415
|
try {
|
|
1416
|
-
let t = await xt(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(
|
|
1416
|
+
let t = await xt(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(h)}`, a.signal);
|
|
1417
1417
|
u.drawImage(t, 0, 0, c.width, c.height), e.addImage(l, "PNG", c.x, c.y, c.width, c.height);
|
|
1418
1418
|
} catch (e) {
|
|
1419
|
-
throw new M(
|
|
1419
|
+
throw new j(M("parser.pdfParser.rotatedElementRasterizationFailed", {
|
|
1420
1420
|
elementId: t.id,
|
|
1421
1421
|
elementType: t.type
|
|
1422
1422
|
}), {
|
|
@@ -1431,7 +1431,7 @@ var qt = class {
|
|
|
1431
1431
|
for (let [o, s] of n.elements.entries()) {
|
|
1432
1432
|
if (a.signal?.throwIfAborted(), !s.visible) continue;
|
|
1433
1433
|
let c = this.elements.get(s.type);
|
|
1434
|
-
if (!c) v(s, Error(
|
|
1434
|
+
if (!c) v(s, Error(M("core.documentModel.unregisteredElementType", { elementType: s.type })), a.onWarning);
|
|
1435
1435
|
else {
|
|
1436
1436
|
e.saveGraphicsState();
|
|
1437
1437
|
try {
|
|
@@ -1454,13 +1454,13 @@ var qt = class {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
1456
|
};
|
|
1457
|
-
function
|
|
1457
|
+
function B(e) {
|
|
1458
1458
|
return Math.round(e * 100) / 100;
|
|
1459
1459
|
}
|
|
1460
1460
|
// src/core/repeat-layout.ts
|
|
1461
1461
|
function Jt(e, t, n) {
|
|
1462
1462
|
if (t.direction !== "grid") return 1;
|
|
1463
|
-
let r = Math.max(0, t.gapX), i =
|
|
1463
|
+
let r = Math.max(0, t.gapX), i = A(n), a = Math.max(1, Math.trunc(t.columns || 1)), o = Math.floor((i.x + i.width - e.x + r) / (e.width + r));
|
|
1464
1464
|
return Math.max(1, Math.min(a, o));
|
|
1465
1465
|
}
|
|
1466
1466
|
function* Yt(e, t, n, r, i, a = () => n) {
|
|
@@ -1468,7 +1468,7 @@ function* Yt(e, t, n, r, i, a = () => n) {
|
|
|
1468
1468
|
if (t.direction === "page") {
|
|
1469
1469
|
let t = i.draftIndex + +(i.bottomY > e.y);
|
|
1470
1470
|
for (let [n, i] of r.entries()) {
|
|
1471
|
-
let r =
|
|
1471
|
+
let r = A(a(t + n));
|
|
1472
1472
|
yield {
|
|
1473
1473
|
bottomY: Math.max(r.y + r.height, e.y + i.height),
|
|
1474
1474
|
draftIndex: t + n,
|
|
@@ -1480,8 +1480,8 @@ function* Yt(e, t, n, r, i, a = () => n) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
let o = i.draftIndex, s = e.width + Math.max(0, t.gapX), c = Math.max(e.y, i.bottomY), l = 0;
|
|
1482
1482
|
for (; l < r.length;) {
|
|
1483
|
-
let n = a(o), i =
|
|
1484
|
-
c + f > i.y + i.height + 1e-6 && (l > 0 || c > i.y + 1e-6) && (o += 1, n = a(o), i =
|
|
1483
|
+
let n = a(o), i = A(n), u = Jt(e, t, n), d = r.slice(l, l + u), f = Math.max(1, ...d.map((e) => e.height));
|
|
1484
|
+
c + f > i.y + i.height + 1e-6 && (l > 0 || c > i.y + 1e-6) && (o += 1, n = a(o), i = A(n), u = Jt(e, t, n), c = t.positionMode === "flow" ? i.y : e.y, d = r.slice(l, l + u), f = Math.max(1, ...d.map((e) => e.height)));
|
|
1485
1485
|
let p = c + f;
|
|
1486
1486
|
for (let [t, n] of d.entries()) yield {
|
|
1487
1487
|
bottomY: p,
|
|
@@ -1494,36 +1494,36 @@ function* Yt(e, t, n, r, i, a = () => n) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
// src/core/repeat-expand.ts
|
|
1496
1496
|
function* Xt(e) {
|
|
1497
|
-
let { context: t, cursor: n, getPage:
|
|
1498
|
-
if (!Array.isArray(
|
|
1499
|
-
|
|
1500
|
-
collection:
|
|
1501
|
-
groupName:
|
|
1497
|
+
let { context: t, cursor: n, getPage: r, group: i, prototypes: a, warnings: o } = e, s = L(t, i.collection);
|
|
1498
|
+
if (!Array.isArray(s)) {
|
|
1499
|
+
o.add(M("core.documentExpand.repeatCollectionMissing", {
|
|
1500
|
+
collection: i.collection,
|
|
1501
|
+
groupName: i.name
|
|
1502
1502
|
}));
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
|
-
let
|
|
1506
|
-
let
|
|
1507
|
-
collectionPath:
|
|
1505
|
+
let c = s.map((n, r) => {
|
|
1506
|
+
let s = Re(t, {
|
|
1507
|
+
collectionPath: i.collection,
|
|
1508
1508
|
index: r,
|
|
1509
1509
|
item: n
|
|
1510
|
-
}), c =
|
|
1510
|
+
}), c = a.map((e) => R(O(e), s, o));
|
|
1511
1511
|
return {
|
|
1512
|
-
bounds:
|
|
1512
|
+
bounds: N(c) ?? e.bounds,
|
|
1513
1513
|
elements: c
|
|
1514
1514
|
};
|
|
1515
|
-
}),
|
|
1515
|
+
}), l = {
|
|
1516
1516
|
...e.bounds,
|
|
1517
|
-
width:
|
|
1518
|
-
},
|
|
1519
|
-
|
|
1517
|
+
width: c.reduce((e, t) => Math.max(e, t.bounds.width), 1)
|
|
1518
|
+
}, u = r(n.draftIndex), f = Jt(l, i, u), p = Math.max(1, Math.trunc(i.columns || 1));
|
|
1519
|
+
i.direction === "grid" && f < p && o.add(M("core.documentExpand.repeatColumnsAdjusted", {
|
|
1520
1520
|
columnCount: f,
|
|
1521
|
-
groupName:
|
|
1521
|
+
groupName: i.name
|
|
1522
1522
|
}));
|
|
1523
1523
|
let m = 0;
|
|
1524
|
-
for (let e of Yt(
|
|
1525
|
-
let t =
|
|
1526
|
-
for (let n of t) Object.assign(n,
|
|
1524
|
+
for (let e of Yt(l, i, u, c.map((e) => e.bounds), n, r)) {
|
|
1525
|
+
let t = c[m].elements;
|
|
1526
|
+
for (let n of t) Object.assign(n, d(n, e.offsetX, e.offsetY));
|
|
1527
1527
|
yield {
|
|
1528
1528
|
bottomY: e.bottomY,
|
|
1529
1529
|
draftIndex: e.draftIndex,
|
|
@@ -1533,7 +1533,7 @@ function* Xt(e) {
|
|
|
1533
1533
|
}
|
|
1534
1534
|
// src/core/flow-expand.ts
|
|
1535
1535
|
function Zt(e) {
|
|
1536
|
-
let { context: t, document: n, page: r, warnings: i } = e, o = (n.repeatGroups ?? []).filter((e) => e.pageId === r.id), s = (n.followBlocks ?? []).filter((e) => e.pageId === r.id), c = new Set([...o, ...s].flatMap((e) => e.elementIds)), l = new Set(s.filter((e) => e.target.kind === "element").map((e) => e.target.id)), u = r.elements.filter((e) => !c.has(e.id)).map((n) => e.resolveNode?.(n) ??
|
|
1536
|
+
let { context: t, document: n, page: r, warnings: i } = e, o = (n.repeatGroups ?? []).filter((e) => e.pageId === r.id), s = (n.followBlocks ?? []).filter((e) => e.pageId === r.id), c = new Set([...o, ...s].flatMap((e) => e.elementIds)), l = new Set(s.filter((e) => e.target.kind === "element").map((e) => e.target.id)), u = r.elements.filter((e) => !c.has(e.id)).map((n) => e.resolveNode?.(n) ?? R(n, t, i)), d = (e) => l.has(e.id) || !!k(t).get(e.type)?.paginate, f = u.filter((e) => !d(e)), p = Qt(e, o, u.filter(d)), m = [[]], h = {
|
|
1537
1537
|
bottomY: 0,
|
|
1538
1538
|
draftIndex: 0
|
|
1539
1539
|
};
|
|
@@ -1561,12 +1561,12 @@ function Zt(e) {
|
|
|
1561
1561
|
_(e.target, t);
|
|
1562
1562
|
}
|
|
1563
1563
|
let v = new Map(r.elements.map((e, t) => [e.id, t]));
|
|
1564
|
-
return m.map((e, t) => [...(t === 0 ? f : []).map((e) =>
|
|
1564
|
+
return m.map((e, t) => [...(t === 0 ? f : []).map((e) => O(e)), ...e].sort((e, t) => (v.get(e.id) ?? 0) - (v.get(t.id) ?? 0)));
|
|
1565
1565
|
}
|
|
1566
1566
|
function Qt(e, t, n) {
|
|
1567
1567
|
let r = [];
|
|
1568
1568
|
for (let n of t) {
|
|
1569
|
-
let t = e.page.elements.filter((e) => n.elementIds.includes(e.id)), i =
|
|
1569
|
+
let t = e.page.elements.filter((e) => n.elementIds.includes(e.id)), i = N(t);
|
|
1570
1570
|
i && r.push({
|
|
1571
1571
|
expand: (r) => Xt({
|
|
1572
1572
|
bounds: i,
|
|
@@ -1595,19 +1595,19 @@ function Qt(e, t, n) {
|
|
|
1595
1595
|
return r.sort((e, t) => e.y - t.y);
|
|
1596
1596
|
}
|
|
1597
1597
|
function $t(e, t, n) {
|
|
1598
|
-
let { context:
|
|
1599
|
-
if (!
|
|
1600
|
-
let
|
|
1601
|
-
p +
|
|
1602
|
-
let m =
|
|
1603
|
-
let t =
|
|
1604
|
-
Object.assign(t,
|
|
1605
|
-
let n = c(
|
|
1606
|
-
getPage: () =>
|
|
1598
|
+
let { context: r, getPage: i, page: a, warnings: o } = e, s = a.elements.filter((e) => t.elementIds.includes(e.id)).map((t) => e.resolveNode?.(t) ?? R(t, r, o)), l = N(s);
|
|
1599
|
+
if (!l) return;
|
|
1600
|
+
let u = n.draftIndex, f = A(i(u)), p = Math.max(f.y, n.bottomY + t.gap);
|
|
1601
|
+
p + l.height > f.y + f.height + 1e-6 && (u += 1, f = A(i(u)), p = f.y);
|
|
1602
|
+
let m = s.map((e) => {
|
|
1603
|
+
let t = O(e);
|
|
1604
|
+
Object.assign(t, d(t, 0, p - l.y));
|
|
1605
|
+
let n = c(k(r), {
|
|
1606
|
+
getPage: () => i(u),
|
|
1607
1607
|
node: t,
|
|
1608
|
-
page:
|
|
1608
|
+
page: i(u),
|
|
1609
1609
|
props: t.props,
|
|
1610
|
-
warnings:
|
|
1610
|
+
warnings: o
|
|
1611
1611
|
});
|
|
1612
1612
|
return n?.length === 1 && Object.assign(t, {
|
|
1613
1613
|
height: n[0].height,
|
|
@@ -1615,50 +1615,50 @@ function $t(e, t, n) {
|
|
|
1615
1615
|
}), t;
|
|
1616
1616
|
});
|
|
1617
1617
|
return {
|
|
1618
|
-
bottomY: p +
|
|
1619
|
-
draftIndex:
|
|
1618
|
+
bottomY: p + l.height,
|
|
1619
|
+
draftIndex: u,
|
|
1620
1620
|
elements: m
|
|
1621
1621
|
};
|
|
1622
1622
|
}
|
|
1623
1623
|
function* en(e, t, n) {
|
|
1624
|
-
let { getPage:
|
|
1625
|
-
Object.assign(
|
|
1626
|
-
let
|
|
1627
|
-
getPage: (e) =>
|
|
1628
|
-
node:
|
|
1629
|
-
page:
|
|
1630
|
-
props:
|
|
1631
|
-
warnings:
|
|
1624
|
+
let { getPage: r, warnings: i } = e, a = O(t), o = n.draftIndex;
|
|
1625
|
+
Object.assign(a, d(a, 0, Math.max(a.y, n.bottomY) - a.y));
|
|
1626
|
+
let s = c(k(e.context), {
|
|
1627
|
+
getPage: (e) => r(o + e),
|
|
1628
|
+
node: a,
|
|
1629
|
+
page: r(o),
|
|
1630
|
+
props: a.props,
|
|
1631
|
+
warnings: i
|
|
1632
1632
|
});
|
|
1633
|
-
if (!
|
|
1634
|
-
else for (let [e, t] of
|
|
1633
|
+
if (!s?.length) yield tn(a, o, r);
|
|
1634
|
+
else for (let [e, t] of s.entries()) {
|
|
1635
1635
|
if (t.height <= 0) continue;
|
|
1636
|
-
let n =
|
|
1637
|
-
Object.assign(n,
|
|
1636
|
+
let n = O(a);
|
|
1637
|
+
Object.assign(n, d(n, 0, (t.y ?? a.y) - a.y), {
|
|
1638
1638
|
height: t.height,
|
|
1639
1639
|
props: t.props
|
|
1640
1640
|
}), yield {
|
|
1641
1641
|
bottomY: n.y + n.height,
|
|
1642
|
-
draftIndex:
|
|
1642
|
+
draftIndex: o + e,
|
|
1643
1643
|
elements: [n]
|
|
1644
1644
|
};
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
function tn(e, t, n) {
|
|
1648
|
-
let
|
|
1649
|
-
if (!
|
|
1650
|
-
return
|
|
1651
|
-
bottomY:
|
|
1648
|
+
let r = A(n(t)), i = N([e]);
|
|
1649
|
+
if (!i) throw Error(`Missing element bounds: ${e.id}`);
|
|
1650
|
+
return i.y + i.height > r.y + r.height + 1e-6 && (t += 1, r = A(n(t)), Object.assign(e, d(e, 0, r.y - i.y)), i = N([e]) ?? i), {
|
|
1651
|
+
bottomY: i.y + i.height,
|
|
1652
1652
|
draftIndex: t,
|
|
1653
1653
|
elements: [e]
|
|
1654
1654
|
};
|
|
1655
1655
|
}
|
|
1656
1656
|
// src/core/overflow-expand.ts
|
|
1657
1657
|
function nn(e, t, n, r) {
|
|
1658
|
-
let i =
|
|
1658
|
+
let i = k(n), a = [], o = /* @__PURE__ */ new Map(), c = new Set([...e.repeatGroups ?? [], ...e.followBlocks ?? []].filter((e) => e.pageId === t.id).flatMap((e) => e.elementIds)), l = t.elements.map((l) => {
|
|
1659
1659
|
let u = i.get(l.type)?.overflow;
|
|
1660
1660
|
if (!l.visible || !u || c.has(l.id)) return l;
|
|
1661
|
-
let d =
|
|
1661
|
+
let d = R(O(l), n, r);
|
|
1662
1662
|
try {
|
|
1663
1663
|
let i = u({
|
|
1664
1664
|
node: d,
|
|
@@ -1677,19 +1677,19 @@ function nn(e, t, n, r) {
|
|
|
1677
1677
|
elements: l
|
|
1678
1678
|
},
|
|
1679
1679
|
resolveNode(e) {
|
|
1680
|
-
return o.get(e.id) ??
|
|
1680
|
+
return o.get(e.id) ?? R(e, n, r);
|
|
1681
1681
|
}
|
|
1682
1682
|
};
|
|
1683
1683
|
}
|
|
1684
1684
|
function rn(e, t, n, r) {
|
|
1685
1685
|
let i = t.continuation, a = e.templates?.find((e) => e.id === i.templateId);
|
|
1686
|
-
if (!a) throw new M(
|
|
1687
|
-
if (a.owner && a.owner.elementId !== t.node.id) throw new M(
|
|
1686
|
+
if (!a) throw new j(M("core.overflow.invalidLayout"), { code: "overflow.invalid-layout" });
|
|
1687
|
+
if (a.owner && a.owner.elementId !== t.node.id) throw new j(M("core.pageExtensions.internalTemplate"), { code: "template.owner-mismatch" });
|
|
1688
1688
|
u(a);
|
|
1689
1689
|
let o = ie(e, a).page, s = o.elements.find((e) => e.id === i.elementId);
|
|
1690
|
-
if (!s || !s.visible) throw new M(
|
|
1691
|
-
let d =
|
|
1692
|
-
if (!p.visible) throw new M(
|
|
1690
|
+
if (!s || !s.visible) throw new j(M("core.overflow.invalidTarget"), { code: "overflow.invalid-target" });
|
|
1691
|
+
let d = k(n), f = l(e, s, d), p = R(O(f), n, r);
|
|
1692
|
+
if (!p.visible) throw new j(M("core.overflow.invalidTarget"), { code: "overflow.invalid-target" });
|
|
1693
1693
|
let m = i.prepare(p), h = d.get(m.type)?.measureSize?.({
|
|
1694
1694
|
node: m,
|
|
1695
1695
|
props: m.props
|
|
@@ -1710,7 +1710,7 @@ function rn(e, t, n, r) {
|
|
|
1710
1710
|
...o,
|
|
1711
1711
|
background: a.background ?? o.background,
|
|
1712
1712
|
elements: [..._.map((e) => {
|
|
1713
|
-
let t =
|
|
1713
|
+
let t = R(O(e), n, r);
|
|
1714
1714
|
return t.id = E("el"), t;
|
|
1715
1715
|
}), {
|
|
1716
1716
|
...m,
|
|
@@ -1723,7 +1723,7 @@ function rn(e, t, n, r) {
|
|
|
1723
1723
|
guides: [],
|
|
1724
1724
|
id: E("page"),
|
|
1725
1725
|
name: a.name + " · " + (t + 1),
|
|
1726
|
-
templateId:
|
|
1726
|
+
templateId: te
|
|
1727
1727
|
}));
|
|
1728
1728
|
}
|
|
1729
1729
|
// src/core/document-expand.ts
|
|
@@ -1764,7 +1764,7 @@ function an(e, t, n = o) {
|
|
|
1764
1764
|
let l = S({
|
|
1765
1765
|
...e,
|
|
1766
1766
|
pages: c
|
|
1767
|
-
}, (e) =>
|
|
1767
|
+
}, (e) => R(e, a, r), (e) => r.add(e));
|
|
1768
1768
|
return {
|
|
1769
1769
|
document: i.resolve({
|
|
1770
1770
|
name: e.name,
|
|
@@ -1775,8 +1775,8 @@ function an(e, t, n = o) {
|
|
|
1775
1775
|
};
|
|
1776
1776
|
}
|
|
1777
1777
|
function on(e, t, n, r, i, a) {
|
|
1778
|
-
|
|
1779
|
-
let o = t.filter((t) => t.pageId === e.id), s = new Set(o.flatMap((e) => e.elementIds)), c = e.elements.filter((e) => !s.has(e.id)).map(a), l =
|
|
1778
|
+
A(i(0));
|
|
1779
|
+
let o = t.filter((t) => t.pageId === e.id), s = new Set(o.flatMap((e) => e.elementIds)), c = e.elements.filter((e) => !s.has(e.id)).map(a), l = k(n), u = [{ elements: [...c] }], d = {
|
|
1780
1780
|
bottomY: 0,
|
|
1781
1781
|
draftIndex: 0
|
|
1782
1782
|
};
|
|
@@ -1821,7 +1821,7 @@ function sn(e, t, n, r, i) {
|
|
|
1821
1821
|
function cn(e, t, n, r, i, a, o) {
|
|
1822
1822
|
let s = n.elements.filter((e) => t.elementIds.includes(e.id));
|
|
1823
1823
|
if (s.length === 0) return;
|
|
1824
|
-
let c =
|
|
1824
|
+
let c = N(s);
|
|
1825
1825
|
if (!c) return;
|
|
1826
1826
|
let l = Xt({
|
|
1827
1827
|
bounds: c,
|
|
@@ -1863,7 +1863,7 @@ function dn(e, t, n, r, i) {
|
|
|
1863
1863
|
if (!i) return [r];
|
|
1864
1864
|
let a = e.repeatGroups?.find((e) => e.pageId === t.id && e.elementIds.includes(n.id));
|
|
1865
1865
|
if (!a) return [r];
|
|
1866
|
-
let o =
|
|
1866
|
+
let o = L(r, a.collection);
|
|
1867
1867
|
return Array.isArray(o) ? o.map((e, t) => Re(r, {
|
|
1868
1868
|
collectionPath: a.collection,
|
|
1869
1869
|
index: t,
|
|
@@ -1893,7 +1893,7 @@ function fn(e, t, n, r = [], i, a) {
|
|
|
1893
1893
|
return o.length > 0 ? Pe(o, r, i) : void 0;
|
|
1894
1894
|
}
|
|
1895
1895
|
// node_modules/.pnpm/jsbarcode@3.12.3/node_modules/jsbarcode/bin/barcodes/Barcode.js
|
|
1896
|
-
var
|
|
1896
|
+
var V = /* @__PURE__ */ n(((e) => {
|
|
1897
1897
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1898
1898
|
function t(e, t) {
|
|
1899
1899
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
@@ -1913,7 +1913,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
1913
1913
|
return function(t, n, r) {
|
|
1914
1914
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
1915
1915
|
};
|
|
1916
|
-
}(), n = r(
|
|
1916
|
+
}(), n = r(V());
|
|
1917
1917
|
function r(e) {
|
|
1918
1918
|
return e && e.__esModule ? e : { default: e };
|
|
1919
1919
|
}
|
|
@@ -2155,7 +2155,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
2155
2155
|
return function(t, n, r) {
|
|
2156
2156
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
2157
2157
|
};
|
|
2158
|
-
}(), n = i(
|
|
2158
|
+
}(), n = i(V()), r = mn();
|
|
2159
2159
|
function i(e) {
|
|
2160
2160
|
return e && e.__esModule ? e : { default: e };
|
|
2161
2161
|
}
|
|
@@ -2572,7 +2572,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
2572
2572
|
return function(t, n, r) {
|
|
2573
2573
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
2574
2574
|
};
|
|
2575
|
-
}(), n = Sn(), r = a(Cn()), i = a(
|
|
2575
|
+
}(), n = Sn(), r = a(Cn()), i = a(V());
|
|
2576
2576
|
function a(e) {
|
|
2577
2577
|
return e && e.__esModule ? e : { default: e };
|
|
2578
2578
|
}
|
|
@@ -2887,7 +2887,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
2887
2887
|
return function(t, n, r) {
|
|
2888
2888
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
2889
2889
|
};
|
|
2890
|
-
}(), n = Sn(), r = a(Cn()), i = a(
|
|
2890
|
+
}(), n = Sn(), r = a(Cn()), i = a(V());
|
|
2891
2891
|
function a(e) {
|
|
2892
2892
|
return e && e.__esModule ? e : { default: e };
|
|
2893
2893
|
}
|
|
@@ -2947,7 +2947,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
2947
2947
|
return function(t, n, r) {
|
|
2948
2948
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
2949
2949
|
};
|
|
2950
|
-
}(), n = Sn(), r = a(Cn()), i = a(
|
|
2950
|
+
}(), n = Sn(), r = a(Cn()), i = a(V());
|
|
2951
2951
|
function a(e) {
|
|
2952
2952
|
return e && e.__esModule ? e : { default: e };
|
|
2953
2953
|
}
|
|
@@ -3002,7 +3002,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3002
3002
|
};
|
|
3003
3003
|
}();
|
|
3004
3004
|
e.checksum = l;
|
|
3005
|
-
var n = i(Cn()), r = i(
|
|
3005
|
+
var n = i(Cn()), r = i(V());
|
|
3006
3006
|
function i(e) {
|
|
3007
3007
|
return e && e.__esModule ? e : { default: e };
|
|
3008
3008
|
}
|
|
@@ -3110,7 +3110,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3110
3110
|
return function(t, n, r) {
|
|
3111
3111
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3112
3112
|
};
|
|
3113
|
-
}(), n = a(Cn()), r = a(
|
|
3113
|
+
}(), n = a(Cn()), r = a(V()), i = kn();
|
|
3114
3114
|
function a(e) {
|
|
3115
3115
|
return e && e.__esModule ? e : { default: e };
|
|
3116
3116
|
}
|
|
@@ -3267,7 +3267,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3267
3267
|
return function(t, n, r) {
|
|
3268
3268
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3269
3269
|
};
|
|
3270
|
-
}(), n = Mn(), r = i(
|
|
3270
|
+
}(), n = Mn(), r = i(V());
|
|
3271
3271
|
function i(e) {
|
|
3272
3272
|
return e && e.__esModule ? e : { default: e };
|
|
3273
3273
|
}
|
|
@@ -3393,7 +3393,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3393
3393
|
return function(t, n, r) {
|
|
3394
3394
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3395
3395
|
};
|
|
3396
|
-
}(), n = r(
|
|
3396
|
+
}(), n = r(V());
|
|
3397
3397
|
function r(e) {
|
|
3398
3398
|
return e && e.__esModule ? e : { default: e };
|
|
3399
3399
|
}
|
|
@@ -3601,7 +3601,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3601
3601
|
return function(t, n, r) {
|
|
3602
3602
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3603
3603
|
};
|
|
3604
|
-
}(), n = r(
|
|
3604
|
+
}(), n = r(V());
|
|
3605
3605
|
function r(e) {
|
|
3606
3606
|
return e && e.__esModule ? e : { default: e };
|
|
3607
3607
|
}
|
|
@@ -3656,7 +3656,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3656
3656
|
return function(t, n, r) {
|
|
3657
3657
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3658
3658
|
};
|
|
3659
|
-
}(), n = r(
|
|
3659
|
+
}(), n = r(V());
|
|
3660
3660
|
function r(e) {
|
|
3661
3661
|
return e && e.__esModule ? e : { default: e };
|
|
3662
3662
|
}
|
|
@@ -3829,7 +3829,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3829
3829
|
return function(t, n, r) {
|
|
3830
3830
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3831
3831
|
};
|
|
3832
|
-
}(), n = Gn(), r = i(
|
|
3832
|
+
}(), n = Gn(), r = i(V());
|
|
3833
3833
|
function i(e) {
|
|
3834
3834
|
return e && e.__esModule ? e : { default: e };
|
|
3835
3835
|
}
|
|
@@ -3966,7 +3966,7 @@ var H = /* @__PURE__ */ n(((e) => {
|
|
|
3966
3966
|
return function(t, n, r) {
|
|
3967
3967
|
return n && e(t.prototype, n), r && e(t, r), t;
|
|
3968
3968
|
};
|
|
3969
|
-
}(), n = r(
|
|
3969
|
+
}(), n = r(V());
|
|
3970
3970
|
function r(e) {
|
|
3971
3971
|
return e && e.__esModule ? e : { default: e };
|
|
3972
3972
|
}
|
|
@@ -4644,76 +4644,76 @@ var hr = g({
|
|
|
4644
4644
|
binding: { appendable: !0 },
|
|
4645
4645
|
key: "value",
|
|
4646
4646
|
get label() {
|
|
4647
|
-
return
|
|
4647
|
+
return M("elements.barcodeElement.contentLabel");
|
|
4648
4648
|
},
|
|
4649
4649
|
get placeholder() {
|
|
4650
|
-
return
|
|
4650
|
+
return M("elements.barcodeElement.contentPlaceholder");
|
|
4651
4651
|
},
|
|
4652
4652
|
type: "string"
|
|
4653
4653
|
},
|
|
4654
4654
|
{
|
|
4655
4655
|
key: "format",
|
|
4656
4656
|
get label() {
|
|
4657
|
-
return
|
|
4657
|
+
return M("elements.barcodeElement.formatLabel");
|
|
4658
4658
|
},
|
|
4659
4659
|
options: [
|
|
4660
4660
|
{
|
|
4661
4661
|
get label() {
|
|
4662
|
-
return
|
|
4662
|
+
return M("elements.barcodeElement.code128Format");
|
|
4663
4663
|
},
|
|
4664
4664
|
value: "CODE128"
|
|
4665
4665
|
},
|
|
4666
4666
|
{
|
|
4667
4667
|
get label() {
|
|
4668
|
-
return
|
|
4668
|
+
return M("elements.barcodeElement.code39Format");
|
|
4669
4669
|
},
|
|
4670
4670
|
value: "CODE39"
|
|
4671
4671
|
},
|
|
4672
4672
|
{
|
|
4673
4673
|
get label() {
|
|
4674
|
-
return
|
|
4674
|
+
return M("elements.barcodeElement.ean13Format");
|
|
4675
4675
|
},
|
|
4676
4676
|
value: "EAN13"
|
|
4677
4677
|
},
|
|
4678
4678
|
{
|
|
4679
4679
|
get label() {
|
|
4680
|
-
return
|
|
4680
|
+
return M("elements.barcodeElement.ean8Format");
|
|
4681
4681
|
},
|
|
4682
4682
|
value: "EAN8"
|
|
4683
4683
|
},
|
|
4684
4684
|
{
|
|
4685
4685
|
get label() {
|
|
4686
|
-
return
|
|
4686
|
+
return M("elements.barcodeElement.upcFormat");
|
|
4687
4687
|
},
|
|
4688
4688
|
value: "UPC"
|
|
4689
4689
|
},
|
|
4690
4690
|
{
|
|
4691
4691
|
get label() {
|
|
4692
|
-
return
|
|
4692
|
+
return M("elements.barcodeElement.itf14Format");
|
|
4693
4693
|
},
|
|
4694
4694
|
value: "ITF14"
|
|
4695
4695
|
},
|
|
4696
4696
|
{
|
|
4697
4697
|
get label() {
|
|
4698
|
-
return
|
|
4698
|
+
return M("elements.barcodeElement.itfFormat");
|
|
4699
4699
|
},
|
|
4700
4700
|
value: "ITF"
|
|
4701
4701
|
},
|
|
4702
4702
|
{
|
|
4703
4703
|
get label() {
|
|
4704
|
-
return
|
|
4704
|
+
return M("elements.barcodeElement.msiFormat");
|
|
4705
4705
|
},
|
|
4706
4706
|
value: "MSI"
|
|
4707
4707
|
},
|
|
4708
4708
|
{
|
|
4709
4709
|
get label() {
|
|
4710
|
-
return
|
|
4710
|
+
return M("elements.barcodeElement.pharmacodeFormat");
|
|
4711
4711
|
},
|
|
4712
4712
|
value: "pharmacode"
|
|
4713
4713
|
},
|
|
4714
4714
|
{
|
|
4715
4715
|
get label() {
|
|
4716
|
-
return
|
|
4716
|
+
return M("elements.barcodeElement.codabarFormat");
|
|
4717
4717
|
},
|
|
4718
4718
|
value: "codabar"
|
|
4719
4719
|
}
|
|
@@ -4723,7 +4723,7 @@ var hr = g({
|
|
|
4723
4723
|
{
|
|
4724
4724
|
key: "displayValue",
|
|
4725
4725
|
get label() {
|
|
4726
|
-
return
|
|
4726
|
+
return M("elements.barcodeElement.displayValueLabel");
|
|
4727
4727
|
},
|
|
4728
4728
|
type: "boolean"
|
|
4729
4729
|
},
|
|
@@ -4732,7 +4732,7 @@ var hr = g({
|
|
|
4732
4732
|
batchEditable: !0,
|
|
4733
4733
|
key: "fontSize",
|
|
4734
4734
|
get label() {
|
|
4735
|
-
return
|
|
4735
|
+
return M("elements.barcodeElement.valueFontSizeLabel");
|
|
4736
4736
|
},
|
|
4737
4737
|
max: 40,
|
|
4738
4738
|
min: 4,
|
|
@@ -4740,52 +4740,52 @@ var hr = g({
|
|
|
4740
4740
|
step: .5,
|
|
4741
4741
|
type: "number",
|
|
4742
4742
|
get unit() {
|
|
4743
|
-
return
|
|
4743
|
+
return M("elements.barcodeElement.fontSizeUnit");
|
|
4744
4744
|
}
|
|
4745
4745
|
},
|
|
4746
4746
|
{
|
|
4747
4747
|
advanced: !0,
|
|
4748
4748
|
key: "margin",
|
|
4749
4749
|
get label() {
|
|
4750
|
-
return
|
|
4750
|
+
return M("elements.barcodeElement.quietZoneLabel");
|
|
4751
4751
|
},
|
|
4752
4752
|
max: 5,
|
|
4753
4753
|
min: 0,
|
|
4754
4754
|
step: .1,
|
|
4755
4755
|
type: "number",
|
|
4756
4756
|
get unit() {
|
|
4757
|
-
return
|
|
4757
|
+
return M("elements.barcodeElement.distanceUnit");
|
|
4758
4758
|
}
|
|
4759
4759
|
}
|
|
4760
4760
|
],
|
|
4761
4761
|
get title() {
|
|
4762
|
-
return
|
|
4762
|
+
return M("elements.barcodeElement.barcodeSection");
|
|
4763
4763
|
}
|
|
4764
4764
|
}, {
|
|
4765
4765
|
fields: [{
|
|
4766
4766
|
batchEditable: !0,
|
|
4767
4767
|
key: "color",
|
|
4768
4768
|
get label() {
|
|
4769
|
-
return
|
|
4769
|
+
return M("elements.barcodeElement.barColorLabel");
|
|
4770
4770
|
},
|
|
4771
4771
|
type: "color"
|
|
4772
4772
|
}, {
|
|
4773
4773
|
batchEditable: !0,
|
|
4774
4774
|
get help() {
|
|
4775
|
-
return
|
|
4775
|
+
return M("elements.barcodeElement.transparentBackgroundHint");
|
|
4776
4776
|
},
|
|
4777
4777
|
key: "background",
|
|
4778
4778
|
get label() {
|
|
4779
|
-
return
|
|
4779
|
+
return M("elements.barcodeElement.backgroundColorLabel");
|
|
4780
4780
|
},
|
|
4781
4781
|
type: "color"
|
|
4782
4782
|
}],
|
|
4783
4783
|
get title() {
|
|
4784
|
-
return
|
|
4784
|
+
return M("elements.barcodeElement.colorSection");
|
|
4785
4785
|
}
|
|
4786
4786
|
}],
|
|
4787
4787
|
get label() {
|
|
4788
|
-
return
|
|
4788
|
+
return M("elements.barcodeElement.barcodeSection");
|
|
4789
4789
|
},
|
|
4790
4790
|
order: 60,
|
|
4791
4791
|
shortcut: "b",
|
|
@@ -4798,8 +4798,8 @@ var hr = g({
|
|
|
4798
4798
|
lineColor: t.color ?? "#111111",
|
|
4799
4799
|
margin: t.margin ?? .5
|
|
4800
4800
|
});
|
|
4801
|
-
if (!n) return `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:0.2mm dashed #cc3333;color:#cc3333;font-size:8pt">${Ce(
|
|
4802
|
-
let r = n.width / (96 / 25.4), i = n.height / (96 / 25.4), a = Math.min(e.node.width / r, e.node.height / i), o =
|
|
4801
|
+
if (!n) return `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:0.2mm dashed #cc3333;color:#cc3333;font-size:8pt">${Ce(M("elements.barcodeElement.invalidBarcode"))}</div>`;
|
|
4802
|
+
let r = n.width / (96 / 25.4), i = n.height / (96 / 25.4), a = Math.min(e.node.width / r, e.node.height / i), o = w(n.width) * a, s = w(n.height) * a, c = n.svg.replace(/width="[^"]*"/, `width="${o.toFixed(2)}mm"`).replace(/height="[^"]*"/, `height="${s.toFixed(2)}mm"`).replace("<svg", "<svg xmlns=\"http://www.w3.org/2000/svg\"");
|
|
4803
4803
|
return `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;background:${!t.background || t.background === "transparent" ? "transparent" : t.background}">${c}</div>`;
|
|
4804
4804
|
},
|
|
4805
4805
|
toPdf(e) {
|
|
@@ -4832,10 +4832,10 @@ function _r(e) {
|
|
|
4832
4832
|
}
|
|
4833
4833
|
// src/elements/shared/rect-style.ts
|
|
4834
4834
|
function vr(e, t, n) {
|
|
4835
|
-
let r =
|
|
4835
|
+
let r = P(e.stroke) ? 0 : Math.max(0, e.strokeWidth ?? 0), i = Math.max(0, e.radius ?? 0), a = e.dash === "dashed" || e.dash === "dotted" ? e.dash : "solid";
|
|
4836
4836
|
return {
|
|
4837
|
-
background:
|
|
4838
|
-
borderColor:
|
|
4837
|
+
background: P(e.fill) ? "transparent" : e.fill,
|
|
4838
|
+
borderColor: P(e.stroke) ? "transparent" : e.stroke,
|
|
4839
4839
|
borderRadius: `${(i > 0 ? i + r / 2 : 0) * t}${n}`,
|
|
4840
4840
|
borderStyle: a,
|
|
4841
4841
|
borderWidth: `${r * t}${n}`,
|
|
@@ -4850,11 +4850,11 @@ var yr = (e = []) => [{
|
|
|
4850
4850
|
{
|
|
4851
4851
|
batchEditable: !0,
|
|
4852
4852
|
get help() {
|
|
4853
|
-
return
|
|
4853
|
+
return M("elements.shapeProps.noFillHint");
|
|
4854
4854
|
},
|
|
4855
4855
|
key: "fill",
|
|
4856
4856
|
get label() {
|
|
4857
|
-
return
|
|
4857
|
+
return M("elements.shapeProps.fillLabel");
|
|
4858
4858
|
},
|
|
4859
4859
|
type: "color"
|
|
4860
4860
|
},
|
|
@@ -4862,7 +4862,7 @@ var yr = (e = []) => [{
|
|
|
4862
4862
|
batchEditable: !0,
|
|
4863
4863
|
key: "stroke",
|
|
4864
4864
|
get label() {
|
|
4865
|
-
return
|
|
4865
|
+
return M("elements.shapeProps.borderColorLabel");
|
|
4866
4866
|
},
|
|
4867
4867
|
type: "color"
|
|
4868
4868
|
},
|
|
@@ -4870,50 +4870,50 @@ var yr = (e = []) => [{
|
|
|
4870
4870
|
batchEditable: !0,
|
|
4871
4871
|
key: "strokeWidth",
|
|
4872
4872
|
get label() {
|
|
4873
|
-
return
|
|
4873
|
+
return M("elements.shapeProps.borderWidthLabel");
|
|
4874
4874
|
},
|
|
4875
4875
|
max: 10,
|
|
4876
4876
|
min: 0,
|
|
4877
|
-
showIf: (e) => !
|
|
4877
|
+
showIf: (e) => !P(e.stroke),
|
|
4878
4878
|
step: .1,
|
|
4879
4879
|
type: "number",
|
|
4880
4880
|
get unit() {
|
|
4881
|
-
return
|
|
4881
|
+
return M("elements.shapeProps.distanceUnit");
|
|
4882
4882
|
}
|
|
4883
4883
|
},
|
|
4884
4884
|
{
|
|
4885
4885
|
batchEditable: !0,
|
|
4886
4886
|
key: "dash",
|
|
4887
4887
|
get label() {
|
|
4888
|
-
return
|
|
4888
|
+
return M("elements.shapeProps.borderStyleLabel");
|
|
4889
4889
|
},
|
|
4890
4890
|
options: [
|
|
4891
4891
|
{
|
|
4892
4892
|
get label() {
|
|
4893
|
-
return
|
|
4893
|
+
return M("elements.shapeProps.solidOption");
|
|
4894
4894
|
},
|
|
4895
4895
|
value: "solid"
|
|
4896
4896
|
},
|
|
4897
4897
|
{
|
|
4898
4898
|
get label() {
|
|
4899
|
-
return
|
|
4899
|
+
return M("elements.shapeProps.dashedOption");
|
|
4900
4900
|
},
|
|
4901
4901
|
value: "dashed"
|
|
4902
4902
|
},
|
|
4903
4903
|
{
|
|
4904
4904
|
get label() {
|
|
4905
|
-
return
|
|
4905
|
+
return M("elements.shapeProps.dottedOption");
|
|
4906
4906
|
},
|
|
4907
4907
|
value: "dotted"
|
|
4908
4908
|
}
|
|
4909
4909
|
],
|
|
4910
|
-
showIf: (e) => !
|
|
4910
|
+
showIf: (e) => !P(e.stroke),
|
|
4911
4911
|
type: "select"
|
|
4912
4912
|
},
|
|
4913
4913
|
...e
|
|
4914
4914
|
],
|
|
4915
4915
|
get title() {
|
|
4916
|
-
return
|
|
4916
|
+
return M("elements.shapeProps.styleSection");
|
|
4917
4917
|
}
|
|
4918
4918
|
}], br = yr(), xr = g({
|
|
4919
4919
|
createProps: () => ({
|
|
@@ -4929,13 +4929,13 @@ var yr = (e = []) => [{
|
|
|
4929
4929
|
icon: "ellipse",
|
|
4930
4930
|
inspectorSections: br,
|
|
4931
4931
|
get label() {
|
|
4932
|
-
return
|
|
4932
|
+
return M("elements.ellipseElement.displayName");
|
|
4933
4933
|
},
|
|
4934
4934
|
order: 30,
|
|
4935
4935
|
shortcut: "e",
|
|
4936
4936
|
toHtml(e) {
|
|
4937
4937
|
let t = e.props;
|
|
4938
|
-
return `<div style="${
|
|
4938
|
+
return `<div style="${F({
|
|
4939
4939
|
...vr(t, 1, "mm"),
|
|
4940
4940
|
borderRadius: "50%"
|
|
4941
4941
|
})}"></div>`;
|
|
@@ -4973,7 +4973,7 @@ var yr = (e = []) => [{
|
|
|
4973
4973
|
r.onload = function() {
|
|
4974
4974
|
t(String(r.result));
|
|
4975
4975
|
}, r.onerror = function() {
|
|
4976
|
-
n(new M(
|
|
4976
|
+
n(new j(M("designer.pageView.imageReadFailed", { fileName: e.name })));
|
|
4977
4977
|
}, r.readAsDataURL(e);
|
|
4978
4978
|
}), i = await xt(r), a = i.naturalHeight > 0 ? i.naturalWidth / i.naturalHeight : 1, o = Math.min(t.width / 2, (t.height - 4) * a), s = o / (a || 1);
|
|
4979
4979
|
return {
|
|
@@ -4991,30 +4991,30 @@ var yr = (e = []) => [{
|
|
|
4991
4991
|
bindable: !0,
|
|
4992
4992
|
key: "src",
|
|
4993
4993
|
get label() {
|
|
4994
|
-
return
|
|
4994
|
+
return M("elements.imageElement.sourceLabel");
|
|
4995
4995
|
},
|
|
4996
4996
|
type: "image"
|
|
4997
4997
|
}, {
|
|
4998
4998
|
key: "fit",
|
|
4999
4999
|
get label() {
|
|
5000
|
-
return
|
|
5000
|
+
return M("elements.imageElement.fitLabel");
|
|
5001
5001
|
},
|
|
5002
5002
|
options: [
|
|
5003
5003
|
{
|
|
5004
5004
|
get label() {
|
|
5005
|
-
return
|
|
5005
|
+
return M("elements.imageElement.containOption");
|
|
5006
5006
|
},
|
|
5007
5007
|
value: "contain"
|
|
5008
5008
|
},
|
|
5009
5009
|
{
|
|
5010
5010
|
get label() {
|
|
5011
|
-
return
|
|
5011
|
+
return M("elements.imageElement.coverOption");
|
|
5012
5012
|
},
|
|
5013
5013
|
value: "cover"
|
|
5014
5014
|
},
|
|
5015
5015
|
{
|
|
5016
5016
|
get label() {
|
|
5017
|
-
return
|
|
5017
|
+
return M("elements.imageElement.stretchOption");
|
|
5018
5018
|
},
|
|
5019
5019
|
value: "fill"
|
|
5020
5020
|
}
|
|
@@ -5022,11 +5022,11 @@ var yr = (e = []) => [{
|
|
|
5022
5022
|
type: "select"
|
|
5023
5023
|
}],
|
|
5024
5024
|
get title() {
|
|
5025
|
-
return
|
|
5025
|
+
return M("elements.imageElement.imageSection");
|
|
5026
5026
|
}
|
|
5027
5027
|
}],
|
|
5028
5028
|
get label() {
|
|
5029
|
-
return
|
|
5029
|
+
return M("elements.imageElement.imageSection");
|
|
5030
5030
|
},
|
|
5031
5031
|
order: 50,
|
|
5032
5032
|
shortcut: "i",
|
|
@@ -5110,7 +5110,7 @@ var Er = [{
|
|
|
5110
5110
|
batchEditable: !0,
|
|
5111
5111
|
key: "color",
|
|
5112
5112
|
get label() {
|
|
5113
|
-
return
|
|
5113
|
+
return M("elements.lineElement.colorLabel");
|
|
5114
5114
|
},
|
|
5115
5115
|
type: "color"
|
|
5116
5116
|
},
|
|
@@ -5118,38 +5118,38 @@ var Er = [{
|
|
|
5118
5118
|
batchEditable: !0,
|
|
5119
5119
|
key: "strokeWidth",
|
|
5120
5120
|
get label() {
|
|
5121
|
-
return
|
|
5121
|
+
return M("elements.lineElement.strokeWidthLabel");
|
|
5122
5122
|
},
|
|
5123
5123
|
max: 10,
|
|
5124
5124
|
min: .1,
|
|
5125
5125
|
step: .1,
|
|
5126
5126
|
type: "number",
|
|
5127
5127
|
get unit() {
|
|
5128
|
-
return
|
|
5128
|
+
return M("elements.lineElement.distanceUnit");
|
|
5129
5129
|
}
|
|
5130
5130
|
},
|
|
5131
5131
|
{
|
|
5132
5132
|
batchEditable: !0,
|
|
5133
5133
|
key: "dash",
|
|
5134
5134
|
get label() {
|
|
5135
|
-
return
|
|
5135
|
+
return M("elements.lineElement.strokeStyleLabel");
|
|
5136
5136
|
},
|
|
5137
5137
|
options: [
|
|
5138
5138
|
{
|
|
5139
5139
|
get label() {
|
|
5140
|
-
return
|
|
5140
|
+
return M("elements.lineElement.solidOption");
|
|
5141
5141
|
},
|
|
5142
5142
|
value: "solid"
|
|
5143
5143
|
},
|
|
5144
5144
|
{
|
|
5145
5145
|
get label() {
|
|
5146
|
-
return
|
|
5146
|
+
return M("elements.lineElement.dashedOption");
|
|
5147
5147
|
},
|
|
5148
5148
|
value: "dashed"
|
|
5149
5149
|
},
|
|
5150
5150
|
{
|
|
5151
5151
|
get label() {
|
|
5152
|
-
return
|
|
5152
|
+
return M("elements.lineElement.dottedOption");
|
|
5153
5153
|
},
|
|
5154
5154
|
value: "dotted"
|
|
5155
5155
|
}
|
|
@@ -5158,7 +5158,7 @@ var Er = [{
|
|
|
5158
5158
|
}
|
|
5159
5159
|
],
|
|
5160
5160
|
get title() {
|
|
5161
|
-
return
|
|
5161
|
+
return M("elements.lineElement.lineSection");
|
|
5162
5162
|
}
|
|
5163
5163
|
}];
|
|
5164
5164
|
function Dr(e) {
|
|
@@ -5184,7 +5184,7 @@ var Or = g({
|
|
|
5184
5184
|
icon: "line",
|
|
5185
5185
|
inspectorSections: Er,
|
|
5186
5186
|
get label() {
|
|
5187
|
-
return
|
|
5187
|
+
return M("elements.lineElement.lineSection");
|
|
5188
5188
|
},
|
|
5189
5189
|
order: 40,
|
|
5190
5190
|
pointBased: {
|
|
@@ -5198,25 +5198,12 @@ var Or = g({
|
|
|
5198
5198
|
y: e.y + e.height / 2
|
|
5199
5199
|
}, a = (Number(e.props.strokeWidth) || .4) / 2;
|
|
5200
5200
|
return _(t, r, i) <= Math.max(a, .4);
|
|
5201
|
-
},
|
|
5202
|
-
migrateRect(e) {
|
|
5203
|
-
let t = {
|
|
5204
|
-
x: e.x + e.width / 2,
|
|
5205
|
-
y: e.y + e.height / 2
|
|
5206
|
-
}, n = {
|
|
5207
|
-
x: e.x,
|
|
5208
|
-
y: t.y
|
|
5209
|
-
}, r = {
|
|
5210
|
-
x: e.x + e.width,
|
|
5211
|
-
y: t.y
|
|
5212
|
-
};
|
|
5213
|
-
return e.rotation ? [y(n, t, e.rotation), y(r, t, e.rotation)] : [n, r];
|
|
5214
5201
|
}
|
|
5215
5202
|
},
|
|
5216
5203
|
shortcut: "l",
|
|
5217
5204
|
toHtml(e) {
|
|
5218
5205
|
let t = e.props;
|
|
5219
|
-
return `<div style="${
|
|
5206
|
+
return `<div style="${F(wr(e.node, 1, "mm"))}"><div style="${F(Tr(t.color, t.dash, t.strokeWidth, "mm"))}"></div></div>`;
|
|
5220
5207
|
},
|
|
5221
5208
|
toPdf(e) {
|
|
5222
5209
|
let t = e.props, [n, r] = Dr(e.node);
|
|
@@ -5235,7 +5222,7 @@ var Or = g({
|
|
|
5235
5222
|
t.exports = function() {
|
|
5236
5223
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
5237
5224
|
};
|
|
5238
|
-
})),
|
|
5225
|
+
})), H = /* @__PURE__ */ n(((e) => {
|
|
5239
5226
|
var t, n = [
|
|
5240
5227
|
0,
|
|
5241
5228
|
26,
|
|
@@ -5359,7 +5346,7 @@ var Or = g({
|
|
|
5359
5346
|
return this.reservedBit[e * this.size + t];
|
|
5360
5347
|
}, t.exports = n;
|
|
5361
5348
|
})), Nr = /* @__PURE__ */ n(((e) => {
|
|
5362
|
-
var t =
|
|
5349
|
+
var t = H().getSymbolSize;
|
|
5363
5350
|
e.getRowColCoords = function(e) {
|
|
5364
5351
|
if (e === 1) return [];
|
|
5365
5352
|
let n = Math.floor(e / 7) + 2, r = t(e), i = r === 145 ? 26 : Math.ceil((r - 13) / (2 * n - 2)) * 2, a = [r - 7];
|
|
@@ -5371,7 +5358,7 @@ var Or = g({
|
|
|
5371
5358
|
return n;
|
|
5372
5359
|
};
|
|
5373
5360
|
})), Pr = /* @__PURE__ */ n(((e) => {
|
|
5374
|
-
var t =
|
|
5361
|
+
var t = H().getSymbolSize, n = 7;
|
|
5375
5362
|
e.getPositions = function(e) {
|
|
5376
5363
|
let r = t(e);
|
|
5377
5364
|
return [
|
|
@@ -5867,7 +5854,7 @@ var Or = g({
|
|
|
5867
5854
|
}, e.testAlphanumeric = function(e) {
|
|
5868
5855
|
return s.test(e);
|
|
5869
5856
|
};
|
|
5870
|
-
})),
|
|
5857
|
+
})), U = /* @__PURE__ */ n(((e) => {
|
|
5871
5858
|
var t = Br(), n = Vr();
|
|
5872
5859
|
e.NUMERIC = {
|
|
5873
5860
|
id: "Numeric",
|
|
@@ -5932,7 +5919,7 @@ var Or = g({
|
|
|
5932
5919
|
}
|
|
5933
5920
|
};
|
|
5934
5921
|
})), Hr = /* @__PURE__ */ n(((e) => {
|
|
5935
|
-
var t =
|
|
5922
|
+
var t = H(), n = Ir(), r = Ar(), i = U(), a = Br(), o = 7973, s = t.getBCHDigit(o);
|
|
5936
5923
|
function c(t, n, r) {
|
|
5937
5924
|
for (let i = 1; i <= 40; i++) if (n <= e.getCapacity(i, r, t)) return i;
|
|
5938
5925
|
}
|
|
@@ -5979,14 +5966,14 @@ var Or = g({
|
|
|
5979
5966
|
return e << 12 | n;
|
|
5980
5967
|
};
|
|
5981
5968
|
})), Ur = /* @__PURE__ */ n(((e) => {
|
|
5982
|
-
var t =
|
|
5969
|
+
var t = H(), n = 1335, r = 21522, i = t.getBCHDigit(n);
|
|
5983
5970
|
e.getEncodedBits = function(e, a) {
|
|
5984
5971
|
let o = e.bit << 3 | a, s = o << 10;
|
|
5985
5972
|
for (; t.getBCHDigit(s) - i >= 0;) s ^= n << t.getBCHDigit(s) - i;
|
|
5986
5973
|
return (o << 10 | s) ^ r;
|
|
5987
5974
|
};
|
|
5988
5975
|
})), Wr = /* @__PURE__ */ n(((e, t) => {
|
|
5989
|
-
var n =
|
|
5976
|
+
var n = U();
|
|
5990
5977
|
function r(e) {
|
|
5991
5978
|
this.mode = n.NUMERIC, this.data = e.toString();
|
|
5992
5979
|
}
|
|
@@ -6003,7 +5990,7 @@ var Or = g({
|
|
|
6003
5990
|
i > 0 && (n = this.data.substr(t), r = parseInt(n, 10), e.put(r, i * 3 + 1));
|
|
6004
5991
|
}, t.exports = r;
|
|
6005
5992
|
})), Gr = /* @__PURE__ */ n(((e, t) => {
|
|
6006
|
-
var n =
|
|
5993
|
+
var n = U(), r = /* @__PURE__ */ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|
|
6007
5994
|
function i(e) {
|
|
6008
5995
|
this.mode = n.ALPHANUMERIC, this.data = e;
|
|
6009
5996
|
}
|
|
@@ -6022,7 +6009,7 @@ var Or = g({
|
|
|
6022
6009
|
this.data.length % 2 && e.put(r.indexOf(this.data[t]), 6);
|
|
6023
6010
|
}, t.exports = i;
|
|
6024
6011
|
})), Kr = /* @__PURE__ */ n(((e, t) => {
|
|
6025
|
-
var n =
|
|
6012
|
+
var n = U();
|
|
6026
6013
|
function r(e) {
|
|
6027
6014
|
this.mode = n.BYTE, this.data = typeof e == "string" ? new TextEncoder().encode(e) : new Uint8Array(e);
|
|
6028
6015
|
}
|
|
@@ -6036,7 +6023,7 @@ var Or = g({
|
|
|
6036
6023
|
for (let t = 0, n = this.data.length; t < n; t++) e.put(this.data[t], 8);
|
|
6037
6024
|
}, t.exports = r;
|
|
6038
6025
|
})), qr = /* @__PURE__ */ n(((e, t) => {
|
|
6039
|
-
var n =
|
|
6026
|
+
var n = U(), r = H();
|
|
6040
6027
|
function i(e) {
|
|
6041
6028
|
this.mode = n.KANJI, this.data = e;
|
|
6042
6029
|
}
|
|
@@ -6110,7 +6097,7 @@ var Or = g({
|
|
|
6110
6097
|
};
|
|
6111
6098
|
t !== void 0 && (t.exports = n);
|
|
6112
6099
|
})), Yr = /* @__PURE__ */ n(((e) => {
|
|
6113
|
-
var t =
|
|
6100
|
+
var t = U(), n = Wr(), r = Gr(), i = Kr(), a = qr(), o = Vr(), s = H(), c = Jr();
|
|
6114
6101
|
function l(e) {
|
|
6115
6102
|
return unescape(encodeURIComponent(e)).length;
|
|
6116
6103
|
}
|
|
@@ -6238,7 +6225,7 @@ var Or = g({
|
|
|
6238
6225
|
return e.fromArray(d(t, s.isKanjiModeEnabled()));
|
|
6239
6226
|
};
|
|
6240
6227
|
})), Xr = /* @__PURE__ */ n(((e) => {
|
|
6241
|
-
var t =
|
|
6228
|
+
var t = H(), n = Ar(), r = jr(), i = Mr(), a = Nr(), o = Pr(), s = Fr(), c = Ir(), l = zr(), u = Hr(), d = Ur(), f = U(), p = Yr();
|
|
6242
6229
|
function m(e, t) {
|
|
6243
6230
|
let n = e.size, r = o.getPositions(t);
|
|
6244
6231
|
for (let t = 0; t < r.length; t++) {
|
|
@@ -6496,33 +6483,33 @@ function ii(e) {
|
|
|
6496
6483
|
}
|
|
6497
6484
|
}
|
|
6498
6485
|
function ai(e, t) {
|
|
6499
|
-
let n = String(e.props.value ?? ""), r = e.props.level ?? "M", i = Number(e.props.version ?? 0), a =
|
|
6486
|
+
let n = String(e.props.value ?? ""), r = e.props.level ?? "M", i = Number(e.props.version ?? 0), a = M("elements.qrcodeElement.capacityHelp");
|
|
6500
6487
|
if (!Number.isInteger(i) || i < 0 || i > 40) return {
|
|
6501
|
-
error:
|
|
6488
|
+
error: M("elements.qrcodeElement.invalidVersion"),
|
|
6502
6489
|
help: a
|
|
6503
6490
|
};
|
|
6504
|
-
if ($e(n)) return { help:
|
|
6491
|
+
if ($e(n)) return { help: M("elements.qrcodeElement.boundCapacityHelp") };
|
|
6505
6492
|
if (!n) return {
|
|
6506
|
-
error:
|
|
6493
|
+
error: M("elements.qrcodeElement.emptyContent"),
|
|
6507
6494
|
help: a
|
|
6508
6495
|
};
|
|
6509
6496
|
let o = ii(e.props);
|
|
6510
6497
|
if (o === void 0) return {
|
|
6511
|
-
error:
|
|
6498
|
+
error: M("elements.qrcodeElement.capacityExceeded"),
|
|
6512
6499
|
help: a
|
|
6513
6500
|
};
|
|
6514
|
-
let s =
|
|
6501
|
+
let s = M("elements.qrcodeElement.minimumVersionHelp", {
|
|
6515
6502
|
level: r,
|
|
6516
6503
|
version: o
|
|
6517
6504
|
});
|
|
6518
6505
|
if (i > 0 && i < o) return {
|
|
6519
|
-
error:
|
|
6506
|
+
error: M("elements.qrcodeElement.versionTooSmall", { version: o }),
|
|
6520
6507
|
help: s
|
|
6521
6508
|
};
|
|
6522
6509
|
let c = Number(t?.props.version ?? 0);
|
|
6523
6510
|
return t && (t.props.value !== e.props.value || t.props.level !== e.props.level) && c > 0 && c < o && i === o ? {
|
|
6524
6511
|
help: s,
|
|
6525
|
-
info:
|
|
6512
|
+
info: M("elements.qrcodeElement.versionAdjusted", {
|
|
6526
6513
|
previousVersion: c,
|
|
6527
6514
|
version: i
|
|
6528
6515
|
})
|
|
@@ -6560,10 +6547,10 @@ var oi = g({
|
|
|
6560
6547
|
},
|
|
6561
6548
|
key: "value",
|
|
6562
6549
|
get label() {
|
|
6563
|
-
return
|
|
6550
|
+
return M("elements.qrcodeElement.contentLabel");
|
|
6564
6551
|
},
|
|
6565
6552
|
get placeholder() {
|
|
6566
|
-
return
|
|
6553
|
+
return M("elements.qrcodeElement.contentPlaceholder");
|
|
6567
6554
|
},
|
|
6568
6555
|
type: "textarea",
|
|
6569
6556
|
value: {
|
|
@@ -6579,30 +6566,30 @@ var oi = g({
|
|
|
6579
6566
|
advanced: !0,
|
|
6580
6567
|
key: "level",
|
|
6581
6568
|
get label() {
|
|
6582
|
-
return
|
|
6569
|
+
return M("elements.qrcodeElement.correctionLevelLabel");
|
|
6583
6570
|
},
|
|
6584
6571
|
options: [
|
|
6585
6572
|
{
|
|
6586
6573
|
get label() {
|
|
6587
|
-
return
|
|
6574
|
+
return M("elements.qrcodeElement.lowCorrectionOption");
|
|
6588
6575
|
},
|
|
6589
6576
|
value: "L"
|
|
6590
6577
|
},
|
|
6591
6578
|
{
|
|
6592
6579
|
get label() {
|
|
6593
|
-
return
|
|
6580
|
+
return M("elements.qrcodeElement.mediumCorrectionOption");
|
|
6594
6581
|
},
|
|
6595
6582
|
value: "M"
|
|
6596
6583
|
},
|
|
6597
6584
|
{
|
|
6598
6585
|
get label() {
|
|
6599
|
-
return
|
|
6586
|
+
return M("elements.qrcodeElement.quartileCorrectionOption");
|
|
6600
6587
|
},
|
|
6601
6588
|
value: "Q"
|
|
6602
6589
|
},
|
|
6603
6590
|
{
|
|
6604
6591
|
get label() {
|
|
6605
|
-
return
|
|
6592
|
+
return M("elements.qrcodeElement.highCorrectionOption");
|
|
6606
6593
|
},
|
|
6607
6594
|
value: "H"
|
|
6608
6595
|
}
|
|
@@ -6621,37 +6608,37 @@ var oi = g({
|
|
|
6621
6608
|
advanced: !0,
|
|
6622
6609
|
feedback: ai,
|
|
6623
6610
|
get help() {
|
|
6624
|
-
return
|
|
6611
|
+
return M("elements.qrcodeElement.versionHelp");
|
|
6625
6612
|
},
|
|
6626
6613
|
key: "version",
|
|
6627
6614
|
get label() {
|
|
6628
|
-
return
|
|
6615
|
+
return M("elements.qrcodeElement.versionLabel");
|
|
6629
6616
|
},
|
|
6630
6617
|
max: 40,
|
|
6631
6618
|
min: 0,
|
|
6632
6619
|
step: 1,
|
|
6633
6620
|
type: "number",
|
|
6634
6621
|
get unit() {
|
|
6635
|
-
return
|
|
6622
|
+
return M("elements.qrcodeElement.versionUnit");
|
|
6636
6623
|
}
|
|
6637
6624
|
},
|
|
6638
6625
|
{
|
|
6639
6626
|
advanced: !0,
|
|
6640
6627
|
key: "margin",
|
|
6641
6628
|
get label() {
|
|
6642
|
-
return
|
|
6629
|
+
return M("elements.qrcodeElement.quietZoneLabel");
|
|
6643
6630
|
},
|
|
6644
6631
|
max: 6,
|
|
6645
6632
|
min: 0,
|
|
6646
6633
|
step: 1,
|
|
6647
6634
|
type: "number",
|
|
6648
6635
|
get unit() {
|
|
6649
|
-
return
|
|
6636
|
+
return M("elements.qrcodeElement.moduleUnit");
|
|
6650
6637
|
}
|
|
6651
6638
|
}
|
|
6652
6639
|
],
|
|
6653
6640
|
get title() {
|
|
6654
|
-
return
|
|
6641
|
+
return M("elements.qrcodeElement.qrCodeSection");
|
|
6655
6642
|
}
|
|
6656
6643
|
}, {
|
|
6657
6644
|
fields: [
|
|
@@ -6659,11 +6646,11 @@ var oi = g({
|
|
|
6659
6646
|
advanced: !0,
|
|
6660
6647
|
bindable: !0,
|
|
6661
6648
|
get help() {
|
|
6662
|
-
return
|
|
6649
|
+
return M("elements.qrcodeElement.logoHelp");
|
|
6663
6650
|
},
|
|
6664
6651
|
key: "logo",
|
|
6665
6652
|
get label() {
|
|
6666
|
-
return
|
|
6653
|
+
return M("elements.qrcodeElement.logoLabel");
|
|
6667
6654
|
},
|
|
6668
6655
|
type: "image"
|
|
6669
6656
|
},
|
|
@@ -6671,7 +6658,7 @@ var oi = g({
|
|
|
6671
6658
|
advanced: !0,
|
|
6672
6659
|
key: "logoSize",
|
|
6673
6660
|
get label() {
|
|
6674
|
-
return
|
|
6661
|
+
return M("elements.qrcodeElement.logoSizeLabel");
|
|
6675
6662
|
},
|
|
6676
6663
|
max: 30,
|
|
6677
6664
|
min: 10,
|
|
@@ -6683,7 +6670,7 @@ var oi = g({
|
|
|
6683
6670
|
advanced: !0,
|
|
6684
6671
|
key: "borderColor",
|
|
6685
6672
|
get label() {
|
|
6686
|
-
return
|
|
6673
|
+
return M("elements.qrcodeElement.borderColorLabel");
|
|
6687
6674
|
},
|
|
6688
6675
|
type: "color"
|
|
6689
6676
|
},
|
|
@@ -6691,21 +6678,21 @@ var oi = g({
|
|
|
6691
6678
|
advanced: !0,
|
|
6692
6679
|
key: "borderWidth",
|
|
6693
6680
|
get label() {
|
|
6694
|
-
return
|
|
6681
|
+
return M("elements.qrcodeElement.borderWidthLabel");
|
|
6695
6682
|
},
|
|
6696
6683
|
max: 10,
|
|
6697
6684
|
min: 0,
|
|
6698
6685
|
step: .1,
|
|
6699
6686
|
type: "number",
|
|
6700
6687
|
get unit() {
|
|
6701
|
-
return
|
|
6688
|
+
return M("elements.qrcodeElement.borderUnit");
|
|
6702
6689
|
}
|
|
6703
6690
|
},
|
|
6704
6691
|
{
|
|
6705
6692
|
batchEditable: !0,
|
|
6706
6693
|
key: "color",
|
|
6707
6694
|
get label() {
|
|
6708
|
-
return
|
|
6695
|
+
return M("elements.qrcodeElement.dotColorLabel");
|
|
6709
6696
|
},
|
|
6710
6697
|
type: "color"
|
|
6711
6698
|
},
|
|
@@ -6713,17 +6700,17 @@ var oi = g({
|
|
|
6713
6700
|
batchEditable: !0,
|
|
6714
6701
|
key: "background",
|
|
6715
6702
|
get label() {
|
|
6716
|
-
return
|
|
6703
|
+
return M("elements.qrcodeElement.backgroundColorLabel");
|
|
6717
6704
|
},
|
|
6718
6705
|
type: "color"
|
|
6719
6706
|
}
|
|
6720
6707
|
],
|
|
6721
6708
|
get title() {
|
|
6722
|
-
return
|
|
6709
|
+
return M("elements.qrcodeElement.colorSection");
|
|
6723
6710
|
}
|
|
6724
6711
|
}],
|
|
6725
6712
|
get label() {
|
|
6726
|
-
return
|
|
6713
|
+
return M("elements.qrcodeElement.qrCodeSection");
|
|
6727
6714
|
},
|
|
6728
6715
|
order: 70,
|
|
6729
6716
|
shortcut: "q",
|
|
@@ -6736,7 +6723,7 @@ var oi = g({
|
|
|
6736
6723
|
value: t.value ?? "",
|
|
6737
6724
|
version: t.version || void 0
|
|
6738
6725
|
}, n);
|
|
6739
|
-
if (!r) return `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:0.2mm dashed #cc3333;color:#cc3333;font-size:8pt">${Ce(
|
|
6726
|
+
if (!r) return `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:0.2mm dashed #cc3333;color:#cc3333;font-size:8pt">${Ce(M("elements.qrcodeElement.invalidContent"))}</div>`;
|
|
6740
6727
|
let i = t.borderWidth > 0 && t.borderColor !== "transparent" ? `<div style="position:absolute;inset:0;border:${t.borderWidth}mm solid ${t.borderColor};box-sizing:border-box;pointer-events:none"></div>` : "", a = Math.max(10, Math.min(30, t.logoSize ?? 20)), o = (100 - a) / 2, s = t.logo ? `<img src="${Ce(t.logo)}" style="position:absolute;left:${o}%;top:${o}%;width:${a}%;height:${a}%;object-fit:contain;background:${t.background ?? "#ffffff"}" />` : "";
|
|
6741
6728
|
return `<div style="position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center"><img src="${ni(r)}" style="width:100%;height:100%;object-fit:contain;display:block" />${s}${i}</div>`;
|
|
6742
6729
|
},
|
|
@@ -6783,14 +6770,14 @@ var oi = g({
|
|
|
6783
6770
|
}), si = yr([{
|
|
6784
6771
|
key: "radius",
|
|
6785
6772
|
get label() {
|
|
6786
|
-
return
|
|
6773
|
+
return M("elements.rectElement.borderRadiusLabel");
|
|
6787
6774
|
},
|
|
6788
6775
|
max: 50,
|
|
6789
6776
|
min: 0,
|
|
6790
6777
|
step: .5,
|
|
6791
6778
|
type: "number",
|
|
6792
6779
|
get unit() {
|
|
6793
|
-
return
|
|
6780
|
+
return M("elements.rectElement.distanceUnit");
|
|
6794
6781
|
}
|
|
6795
6782
|
}]), ci = g({
|
|
6796
6783
|
createProps: () => ({
|
|
@@ -6807,13 +6794,13 @@ var oi = g({
|
|
|
6807
6794
|
icon: "rect",
|
|
6808
6795
|
inspectorSections: si,
|
|
6809
6796
|
get label() {
|
|
6810
|
-
return
|
|
6797
|
+
return M("elements.rectElement.displayName");
|
|
6811
6798
|
},
|
|
6812
6799
|
order: 20,
|
|
6813
6800
|
shortcut: "r",
|
|
6814
6801
|
toHtml(e) {
|
|
6815
6802
|
let t = e.props;
|
|
6816
|
-
return `<div style="${
|
|
6803
|
+
return `<div style="${F(vr(t, 1, "mm"))}"></div>`;
|
|
6817
6804
|
},
|
|
6818
6805
|
toPdf(e) {
|
|
6819
6806
|
let t = e.props;
|
|
@@ -6855,16 +6842,16 @@ function pi(e, t) {
|
|
|
6855
6842
|
if (!t.includes(".")) return e[t];
|
|
6856
6843
|
let n = e;
|
|
6857
6844
|
for (let e of t.split(".")) {
|
|
6858
|
-
if (!
|
|
6845
|
+
if (!I(n)) return;
|
|
6859
6846
|
n = n[e];
|
|
6860
6847
|
}
|
|
6861
6848
|
return n;
|
|
6862
6849
|
}
|
|
6863
6850
|
function mi(e, t, n) {
|
|
6864
6851
|
if (!t.includes(".")) return { [t]: n };
|
|
6865
|
-
let r = t.split("."), i = r[0], a =
|
|
6852
|
+
let r = t.split("."), i = r[0], a = I(e[i]) ? { ...e[i] } : {}, o = a;
|
|
6866
6853
|
for (let e = 1; e < r.length - 1; e++) {
|
|
6867
|
-
let t = r[e], n =
|
|
6854
|
+
let t = r[e], n = I(o[t]) ? { ...o[t] } : {};
|
|
6868
6855
|
o[t] = n, o = n;
|
|
6869
6856
|
}
|
|
6870
6857
|
return o[r[r.length - 1]] = n, { [i]: a };
|
|
@@ -6964,49 +6951,49 @@ function Ci() {
|
|
|
6964
6951
|
rowsPerPage: 0
|
|
6965
6952
|
};
|
|
6966
6953
|
}
|
|
6967
|
-
function
|
|
6968
|
-
return
|
|
6954
|
+
function W(e, t) {
|
|
6955
|
+
return I(e) ? {
|
|
6969
6956
|
color: typeof e.color == "string" ? e.color : t.color,
|
|
6970
6957
|
style: e.style === "dashed" || e.style === "dotted" ? e.style : "solid",
|
|
6971
6958
|
width: typeof e.width == "number" && e.width > 0 ? e.width : t.width
|
|
6972
6959
|
} : { ...t };
|
|
6973
6960
|
}
|
|
6974
|
-
function wi(e
|
|
6975
|
-
let
|
|
6976
|
-
if (!
|
|
6977
|
-
let
|
|
6961
|
+
function wi(e) {
|
|
6962
|
+
let t = bi();
|
|
6963
|
+
if (!I(e)) return xi();
|
|
6964
|
+
let n = e, r = W(n.outer, t), i = W(n.inner, t);
|
|
6978
6965
|
return {
|
|
6979
|
-
bottom:
|
|
6980
|
-
headerBottom:
|
|
6981
|
-
inner:
|
|
6982
|
-
left:
|
|
6966
|
+
bottom: n.bottom ? W(n.bottom, r) : void 0,
|
|
6967
|
+
headerBottom: n.headerBottom ? W(n.headerBottom, r) : void 0,
|
|
6968
|
+
inner: i,
|
|
6969
|
+
left: n.left ? W(n.left, r) : void 0,
|
|
6983
6970
|
mode: [
|
|
6984
6971
|
"all",
|
|
6985
6972
|
"horizontal",
|
|
6986
6973
|
"none",
|
|
6987
6974
|
"outer",
|
|
6988
6975
|
"vertical"
|
|
6989
|
-
].includes(
|
|
6990
|
-
outer:
|
|
6991
|
-
right:
|
|
6992
|
-
top:
|
|
6976
|
+
].includes(n.mode) ? n.mode : "all",
|
|
6977
|
+
outer: r,
|
|
6978
|
+
right: n.right ? W(n.right, r) : void 0,
|
|
6979
|
+
top: n.top ? W(n.top, r) : void 0
|
|
6993
6980
|
};
|
|
6994
6981
|
}
|
|
6995
6982
|
function Ti(e) {
|
|
6996
|
-
if (!
|
|
6983
|
+
if (!I(e)) return Si();
|
|
6997
6984
|
let t = e, n = {};
|
|
6998
|
-
if (
|
|
6999
|
-
style:
|
|
6985
|
+
if (I(t.columns)) for (let [e, r] of Object.entries(t.columns)) I(r) && (n[e] = {
|
|
6986
|
+
style: I(r.style) ? r.style : void 0,
|
|
7000
6987
|
text: typeof r.text == "string" ? r.text : void 0,
|
|
7001
6988
|
type: r.type === "sum" || r.type === "text" ? r.type : "none"
|
|
7002
6989
|
});
|
|
7003
6990
|
return {
|
|
7004
|
-
borders:
|
|
6991
|
+
borders: I(t.borders) ? wi(t.borders) : void 0,
|
|
7005
6992
|
columns: n,
|
|
7006
6993
|
enabled: t.enabled === !0,
|
|
7007
6994
|
position: t.position === "top" ? "top" : "bottom",
|
|
7008
6995
|
scope: t.scope === "eachPage" ? "eachPage" : "lastPage",
|
|
7009
|
-
style:
|
|
6996
|
+
style: I(t.style) ? t.style : void 0,
|
|
7010
6997
|
values: Array.isArray(t.values) ? t.values.map((e) => String(e)) : void 0
|
|
7011
6998
|
};
|
|
7012
6999
|
}
|
|
@@ -7017,34 +7004,34 @@ function Ei(e, t) {
|
|
|
7017
7004
|
};
|
|
7018
7005
|
}
|
|
7019
7006
|
function Di(e) {
|
|
7020
|
-
if (!
|
|
7007
|
+
if (!I(e)) return Ci();
|
|
7021
7008
|
let t = e, n = t.fixedRows ? 10 : 0;
|
|
7022
7009
|
return typeof t.rowsPerPage == "number" && Number.isFinite(t.rowsPerPage) && t.rowsPerPage >= 1 && (n = Math.trunc(t.rowsPerPage)), {
|
|
7023
7010
|
crossPage: t.crossPage !== !1,
|
|
7024
7011
|
fillEmptyRows: t.fillEmptyRows === !0,
|
|
7025
|
-
fixedRows: t.fixedRows
|
|
7012
|
+
fixedRows: t.fixedRows === !0,
|
|
7026
7013
|
positionMode: t.positionMode === "flow" ? "flow" : "fixed",
|
|
7027
7014
|
repeatHeader: t.repeatHeader !== !1,
|
|
7028
7015
|
rowsPerPage: n
|
|
7029
7016
|
};
|
|
7030
7017
|
}
|
|
7031
7018
|
function Oi(e) {
|
|
7032
|
-
return Array.isArray(e) ? e.flatMap((e) => !
|
|
7019
|
+
return Array.isArray(e) ? e.flatMap((e) => !I(e) || e.type !== "fields" || !Array.isArray(e.columns) ? [] : [{
|
|
7033
7020
|
columns: e.columns.filter((e) => typeof e == "number" && Number.isInteger(e) && e >= 0),
|
|
7034
7021
|
fields: Array.isArray(e.fields) ? e.fields.filter((e) => typeof e == "string") : [],
|
|
7035
7022
|
type: "fields"
|
|
7036
7023
|
}]) : [];
|
|
7037
7024
|
}
|
|
7038
|
-
function
|
|
7025
|
+
function G(e) {
|
|
7039
7026
|
let t = { ...e };
|
|
7040
|
-
(typeof t.boxHeightMm != "number" || !Number.isFinite(t.boxHeightMm) || t.boxHeightMm <= 0) && delete t.boxHeightMm, t.borders = wi(t.borders
|
|
7027
|
+
(typeof t.boxHeightMm != "number" || !Number.isFinite(t.boxHeightMm) || t.boxHeightMm <= 0) && delete t.boxHeightMm, t.borders = wi(t.borders), I(t.headerBorders) && (t.headerBorders = wi(t.headerBorders)), t.background = typeof t.background == "string" ? t.background : "#ffffff", (typeof t.fontFamily != "string" || t.fontFamily === "") && (t.fontFamily = "Microsoft YaHei"), t.color = typeof t.color == "string" && t.color !== "" ? t.color : "#222222", t.fontSize = typeof t.fontSize == "number" && t.fontSize > 0 ? t.fontSize : 9, t.padding = typeof t.padding == "number" && t.padding >= 0 ? t.padding : 1.5, t.heightMode = t.heightMode === "fixed" ? "fixed" : "auto";
|
|
7041
7028
|
let n = t.heightFill;
|
|
7042
|
-
(!
|
|
7043
|
-
let r =
|
|
7029
|
+
(!I(n) || !Number.isInteger(n.bodyRow) || Number(n.bodyRow) < 0 || typeof n.minHeightMm != "number" || !Number.isFinite(n.minHeightMm) || n.minHeightMm <= 0) && delete t.heightFill, t.summary = Ti(t.summary);
|
|
7030
|
+
let r = I(t.overflow) ? t.overflow : {};
|
|
7044
7031
|
return t.overflow = {
|
|
7045
7032
|
elementId: typeof r.elementId == "string" ? r.elementId : "",
|
|
7046
7033
|
enabled: r.enabled === !0,
|
|
7047
|
-
message: typeof r.message == "string" ? r.message :
|
|
7034
|
+
message: typeof r.message == "string" ? r.message : M("elements.tableElement.overflowMessageDefault"),
|
|
7048
7035
|
messageAlign: r.messageAlign === "left" || r.messageAlign === "center" || r.messageAlign === "right" ? r.messageAlign : "",
|
|
7049
7036
|
messageVAlign: r.messageVAlign === "top" || r.messageVAlign === "middle" || r.messageVAlign === "bottom" ? r.messageVAlign : "",
|
|
7050
7037
|
scope: r.scope === "remaining" ? "remaining" : "all",
|
|
@@ -7057,7 +7044,7 @@ function K(e) {
|
|
|
7057
7044
|
width: typeof e.width == "number" && e.width > 0 ? e.width : 1
|
|
7058
7045
|
})), t;
|
|
7059
7046
|
}
|
|
7060
|
-
function
|
|
7047
|
+
function K(e) {
|
|
7061
7048
|
let t = e.borders;
|
|
7062
7049
|
return [
|
|
7063
7050
|
t.inner,
|
|
@@ -7067,51 +7054,51 @@ function q(e) {
|
|
|
7067
7054
|
t.headerBottom,
|
|
7068
7055
|
...Object.values(e.headerBorders ?? {}).filter((e) => typeof e == "object"),
|
|
7069
7056
|
...Object.values(e.summary?.borders ?? {}).filter((e) => typeof e == "object")
|
|
7070
|
-
].reduce((e, t) => !t || t.width <= 0 || !
|
|
7057
|
+
].reduce((e, t) => !t || t.width <= 0 || !q(t.color) ? e : Math.max(e, t.width, 1 / C), 0);
|
|
7071
7058
|
}
|
|
7072
7059
|
function ki(e) {
|
|
7073
|
-
let t = Math.max(2, e.fontSize ?? 9), n = Math.max(0, e.padding ?? 0), r = Math.max(0, e.minRowHeightMm ?? 0), i =
|
|
7060
|
+
let t = Math.max(2, e.fontSize ?? 9), n = Math.max(0, e.padding ?? 0), r = Math.max(0, e.minRowHeightMm ?? 0), i = D(t) * yi + n * 2 + K(e);
|
|
7074
7061
|
return Math.max(r, i);
|
|
7075
7062
|
}
|
|
7076
7063
|
function Ai(e) {
|
|
7077
7064
|
if (e.headerVisible === !1) return 0;
|
|
7078
7065
|
if (e.headerHeightMode === "fixed" && (e.headerHeightMm ?? 0) > 0) return e.headerHeightMm * Math.max(1, e.headerRows?.length ?? 0);
|
|
7079
7066
|
let t = Math.max(2, e.headerFontSize ?? e.fontSize ?? 9), n = Math.max(0, e.headerPaddingMm ?? e.padding ?? 0);
|
|
7080
|
-
return (
|
|
7067
|
+
return (D(t) * yi + n * 2 + K(e)) * Math.max(1, e.headerRows?.length ?? 0);
|
|
7081
7068
|
}
|
|
7082
7069
|
function ji(e) {
|
|
7083
7070
|
let t = [e.summary.style, ...Object.values(e.summary.columns).map((e) => e.style)];
|
|
7084
|
-
return Math.max(ki(e), ...t.map((t) =>
|
|
7071
|
+
return Math.max(ki(e), ...t.map((t) => D(Math.max(2, t?.fontSize ?? e.fontSize)) * yi + Math.max(0, t?.paddingMm ?? e.summary.style?.paddingMm ?? e.padding) * 2 + K(e)));
|
|
7085
7072
|
}
|
|
7086
7073
|
function Mi(e, t) {
|
|
7087
|
-
let n = e.summary?.enabled ? ji(e) : 0, r =
|
|
7074
|
+
let n = e.summary?.enabled ? ji(e) : 0, r = K(e);
|
|
7088
7075
|
return Ai(e) + t * ki(e) + n + r;
|
|
7089
7076
|
}
|
|
7090
7077
|
function Ni(e) {
|
|
7091
7078
|
return e === "dashed" ? [1.6, 1] : e === "dotted" ? [.4, .9] : [];
|
|
7092
7079
|
}
|
|
7093
|
-
function
|
|
7094
|
-
return typeof e == "string" && !
|
|
7080
|
+
function q(e) {
|
|
7081
|
+
return typeof e == "string" && !P(e);
|
|
7095
7082
|
}
|
|
7096
7083
|
// src/elements/table/table-continuation.ts
|
|
7097
|
-
var
|
|
7098
|
-
function
|
|
7099
|
-
let r =
|
|
7084
|
+
var Pi = /* @__PURE__ */ new Set(/* @__PURE__ */ "background,borders,borders.headerBottom,color,fontFamily,fontSize,headerAlign,headerBackground,headerBold,headerBorders,headerColor,headerFontFamily,headerFontSize,headerHeightMm,headerHeightMode,headerPaddingMm,headerVAlign,headerVisible,headerWrap,minRowHeightMm,padding,pagination.fillEmptyRows,pagination.fixedRows,pagination.positionMode,pagination.repeatHeader,pagination.rowsPerPage,stripe,stripeColor,summary.borders,summary.enabled,summary.position,summary.scope,summary.style.align,summary.style.background,summary.style.bold,summary.style.color,summary.style.fontFamily,summary.style.fontSize,summary.style.paddingMm,summary.style.vAlign,summary.style.wrap".split(","));
|
|
7085
|
+
function Fi(e, t, n) {
|
|
7086
|
+
let r = I(e.continuationOverrides) ? { ...e.continuationOverrides } : {}, i = pi(n, t);
|
|
7100
7087
|
return t === "headerBold" && i === void 0 ? delete r[t] : r[t] = i, t === "pagination.fixedRows" && (r["pagination.rowsPerPage"] = pi(n, "pagination.rowsPerPage")), {
|
|
7101
7088
|
...n,
|
|
7102
7089
|
continuationOverrides: r
|
|
7103
7090
|
};
|
|
7104
7091
|
}
|
|
7105
|
-
function
|
|
7106
|
-
let n =
|
|
7092
|
+
function Ii(e, t) {
|
|
7093
|
+
let n = G(e.props), r = G(t.props), i = I(t.props.continuationOverrides) ? t.props.continuationOverrides : {}, a = {
|
|
7107
7094
|
...n,
|
|
7108
7095
|
pagination: Ci()
|
|
7109
7096
|
};
|
|
7110
|
-
for (let [e, t] of Object.entries(i))
|
|
7097
|
+
for (let [e, t] of Object.entries(i)) Pi.has(e) && (a = {
|
|
7111
7098
|
...a,
|
|
7112
7099
|
...mi(a, e, t)
|
|
7113
7100
|
});
|
|
7114
|
-
let o =
|
|
7101
|
+
let o = G(a).pagination;
|
|
7115
7102
|
return {
|
|
7116
7103
|
...t,
|
|
7117
7104
|
bindings: e.bindings ? { ...e.bindings } : void 0,
|
|
@@ -7140,8 +7127,8 @@ function Li(e, t) {
|
|
|
7140
7127
|
}
|
|
7141
7128
|
};
|
|
7142
7129
|
}
|
|
7143
|
-
function
|
|
7144
|
-
let n =
|
|
7130
|
+
function Li(e, t) {
|
|
7131
|
+
let n = G(t.props).overflow;
|
|
7145
7132
|
if (!n.enabled) {
|
|
7146
7133
|
t.props.overflow = {
|
|
7147
7134
|
...n,
|
|
@@ -7151,7 +7138,7 @@ function Ri(e, t) {
|
|
|
7151
7138
|
return;
|
|
7152
7139
|
}
|
|
7153
7140
|
if (e.templates?.some((e) => e.id === n.templateId)) return;
|
|
7154
|
-
let r = ee(
|
|
7141
|
+
let r = ee(M("designer.continuationLayout.defaultName"), {
|
|
7155
7142
|
height: 297,
|
|
7156
7143
|
margins: {
|
|
7157
7144
|
bottom: 20,
|
|
@@ -7160,7 +7147,7 @@ function Ri(e, t) {
|
|
|
7160
7147
|
top: 25
|
|
7161
7148
|
},
|
|
7162
7149
|
width: 210
|
|
7163
|
-
}), i =
|
|
7150
|
+
}), i = O(t);
|
|
7164
7151
|
Object.assign(i, {
|
|
7165
7152
|
height: 252,
|
|
7166
7153
|
id: E("el"),
|
|
@@ -7170,7 +7157,7 @@ function Ri(e, t) {
|
|
|
7170
7157
|
x: 15,
|
|
7171
7158
|
y: 25
|
|
7172
7159
|
});
|
|
7173
|
-
let a =
|
|
7160
|
+
let a = Ii(t, i);
|
|
7174
7161
|
a.bindings = void 0, r.page.elements = [a], r.owner = {
|
|
7175
7162
|
elementId: t.id,
|
|
7176
7163
|
purpose: "overflow"
|
|
@@ -7184,22 +7171,22 @@ function Ri(e, t) {
|
|
|
7184
7171
|
};
|
|
7185
7172
|
}
|
|
7186
7173
|
// src/elements/table/table-html.ts
|
|
7187
|
-
function
|
|
7174
|
+
function Ri(e) {
|
|
7188
7175
|
return String(e ?? "").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
7189
7176
|
}
|
|
7190
|
-
function
|
|
7191
|
-
return !t || t.width <= 0 || !
|
|
7177
|
+
function zi(e, t, n) {
|
|
7178
|
+
return !t || t.width <= 0 || !q(t.color) ? "none" : `${Math.max(.1, t.width) * n}px ${t.style} ${t.color}`;
|
|
7192
7179
|
}
|
|
7193
|
-
function
|
|
7180
|
+
function Bi(e, t, n) {
|
|
7194
7181
|
let r = vi(e, t), i = {
|
|
7195
|
-
borderBottom:
|
|
7196
|
-
borderLeft:
|
|
7197
|
-
borderRight:
|
|
7198
|
-
borderTop:
|
|
7182
|
+
borderBottom: zi("bottom", t.edges.bottom, n),
|
|
7183
|
+
borderLeft: zi("left", t.edges.left, n),
|
|
7184
|
+
borderRight: zi("right", t.edges.right, n),
|
|
7185
|
+
borderTop: zi("top", t.edges.top, n),
|
|
7199
7186
|
boxSizing: "border-box",
|
|
7200
7187
|
color: r.color,
|
|
7201
7188
|
fontFamily: `"${r.fontFamily}", sans-serif`,
|
|
7202
|
-
fontSize: `${
|
|
7189
|
+
fontSize: `${ne(Math.max(2, r.fontSizePt)) * (n / C)}px`,
|
|
7203
7190
|
fontWeight: r.bold ? "700" : "400",
|
|
7204
7191
|
lineHeight: "1.25",
|
|
7205
7192
|
overflow: "hidden",
|
|
@@ -7207,34 +7194,34 @@ function Vi(e, t, n) {
|
|
|
7207
7194
|
textAlign: r.align,
|
|
7208
7195
|
verticalAlign: r.vAlign
|
|
7209
7196
|
};
|
|
7210
|
-
return
|
|
7197
|
+
return q(r.background) && (i.background = r.background), r.wrap ? i.wordBreak = "break-word" : (i.whiteSpace = "nowrap", i.textOverflow = "ellipsis"), i;
|
|
7211
7198
|
}
|
|
7212
|
-
function
|
|
7199
|
+
function Vi(e, t) {
|
|
7213
7200
|
return e === "header" ? "thead" : e === "summary" && !t ? "tfoot" : "tbody";
|
|
7214
7201
|
}
|
|
7215
|
-
function
|
|
7202
|
+
function Hi(e, t, n, r = C) {
|
|
7216
7203
|
let i = n.widthMm > 0 ? n.widthMm : Math.max(.1, t.elementWidthMm), a = `<colgroup>${n.colWidthsMm.map((e) => `<col style="width:${(e / i * 100).toFixed(3)}%" />`).join("")}</colgroup>`, o = [], s = null, c = "";
|
|
7217
7204
|
for (let t of n.rows) {
|
|
7218
|
-
t.kind !== s && (s !== null && o.push(`<${
|
|
7205
|
+
t.kind !== s && (s !== null && o.push(`<${Vi(s, e.summary?.position === "top")}>${c}</${Vi(s, e.summary?.position === "top")}>`), s = t.kind, c = "");
|
|
7219
7206
|
let n = t.cells.map((n) => {
|
|
7220
|
-
let i =
|
|
7221
|
-
return `<${o}${a} style="${
|
|
7207
|
+
let i = Bi(e, n, r), a = (n.colSpan > 1 ? ` colspan="${n.colSpan}"` : "") + (n.rowSpan > 1 ? ` rowspan="${n.rowSpan}"` : ""), o = t.kind === "header" ? "th" : "td";
|
|
7208
|
+
return `<${o}${a} style="${F(i)}">${Ri(n.text)}</${o}>`;
|
|
7222
7209
|
}).join("");
|
|
7223
7210
|
c += `<tr style="height:${(t.heightMm * r).toFixed(3)}px">${n}</tr>`;
|
|
7224
7211
|
}
|
|
7225
|
-
s !== null && o.push(`<${
|
|
7212
|
+
s !== null && o.push(`<${Vi(s, e.summary?.position === "top")}>${c}</${Vi(s, e.summary?.position === "top")}>`);
|
|
7226
7213
|
let l = {
|
|
7227
7214
|
borderCollapse: "collapse",
|
|
7228
7215
|
borderSpacing: "0",
|
|
7229
7216
|
boxSizing: "border-box",
|
|
7230
|
-
height: e.heightMode === "fixed" ? `calc(100% - ${(
|
|
7217
|
+
height: e.heightMode === "fixed" ? `calc(100% - ${(K(e) * r).toFixed(3)}px)` : "auto",
|
|
7231
7218
|
tableLayout: "fixed",
|
|
7232
7219
|
width: "100%"
|
|
7233
7220
|
};
|
|
7234
|
-
return `<div style="width:100%;height:100%;overflow:hidden;${
|
|
7221
|
+
return `<div style="width:100%;height:100%;overflow:hidden;${F({ background: q(e.background) ? e.background : "transparent" })}"><table style="${F(l)}">${a}${o.join("")}</table></div>`;
|
|
7235
7222
|
}
|
|
7236
7223
|
// src/elements/table/table-merges.ts
|
|
7237
|
-
function
|
|
7224
|
+
function Ui(e) {
|
|
7238
7225
|
let t = e.rows ?? [], n = [], r = /* @__PURE__ */ new Set();
|
|
7239
7226
|
function i(i) {
|
|
7240
7227
|
let { col: a, colspan: o, row: s, rowspan: c } = i;
|
|
@@ -7257,7 +7244,7 @@ function Wi(e) {
|
|
|
7257
7244
|
}
|
|
7258
7245
|
}
|
|
7259
7246
|
function a(n, r) {
|
|
7260
|
-
if (e.sourceRows) return
|
|
7247
|
+
if (e.sourceRows) return L(Le({ item: e.sourceRows[n] }), `item.${r}`);
|
|
7261
7248
|
let i = e.columns.findIndex((e) => e.bind === r || e.title === r), a = i >= 0 ? i : Number(r);
|
|
7262
7249
|
return t[n]?.[a];
|
|
7263
7250
|
}
|
|
@@ -7288,7 +7275,7 @@ function Wi(e) {
|
|
|
7288
7275
|
}
|
|
7289
7276
|
return n;
|
|
7290
7277
|
}
|
|
7291
|
-
function
|
|
7278
|
+
function Wi(e, t, n) {
|
|
7292
7279
|
return e.flatMap((e) => {
|
|
7293
7280
|
let r = Math.max(t, e.row), i = Math.min(t + n, e.row + e.rowspan);
|
|
7294
7281
|
return i <= r ? [] : [{
|
|
@@ -7299,24 +7286,24 @@ function Gi(e, t, n) {
|
|
|
7299
7286
|
});
|
|
7300
7287
|
}
|
|
7301
7288
|
// src/elements/table/table-layout.ts
|
|
7302
|
-
function
|
|
7289
|
+
function Gi(e) {
|
|
7303
7290
|
return e.width > 0 ? e.width : 1;
|
|
7304
7291
|
}
|
|
7305
|
-
function
|
|
7292
|
+
function Ki(e, t) {
|
|
7306
7293
|
let n = Array.isArray(e.columns) ? e.columns : [], r = n.map((e) => {
|
|
7307
7294
|
let n = e.width > 0 ? e.width : 1;
|
|
7308
7295
|
return e.widthMode === "fixed" ? n : e.widthMode === "percent" ? t * n / 100 : null;
|
|
7309
|
-
}), i = r.reduce((e, t) => e + (t ?? 0), 0), a =
|
|
7296
|
+
}), i = r.reduce((e, t) => e + (t ?? 0), 0), a = Math.max(0, t - i), o = n.reduce((e, t, n) => e + (r[n] === null ? Gi(t) : 0), 0) || 1;
|
|
7310
7297
|
return n.map((e, t) => {
|
|
7311
|
-
let n = r[t], i = n === null ?
|
|
7298
|
+
let n = r[t], i = n === null ? a * (Gi(e) / o) : n;
|
|
7312
7299
|
return (e.minWidthMm ?? 0) > 0 && (i = Math.max(i, e.minWidthMm)), (e.maxWidthMm ?? 0) > 0 && (i = Math.min(i, e.maxWidthMm)), Math.max(.1, i);
|
|
7313
7300
|
});
|
|
7314
7301
|
}
|
|
7315
7302
|
function J(e, t) {
|
|
7316
7303
|
return `${e}:${t}`;
|
|
7317
7304
|
}
|
|
7318
|
-
function
|
|
7319
|
-
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a =
|
|
7305
|
+
function qi(e, t, n) {
|
|
7306
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = Ui({
|
|
7320
7307
|
columns: e,
|
|
7321
7308
|
merges: n,
|
|
7322
7309
|
rows: t
|
|
@@ -7333,18 +7320,18 @@ function Ji(e, t, n) {
|
|
|
7333
7320
|
spans: r
|
|
7334
7321
|
};
|
|
7335
7322
|
}
|
|
7336
|
-
function
|
|
7323
|
+
function Ji(e, t, n) {
|
|
7337
7324
|
if (e == null || e === "") return t?.nullText ?? n.nullText ?? "";
|
|
7338
7325
|
let r = t?.format;
|
|
7339
7326
|
if (!r || r.type === "none") return String(e);
|
|
7340
7327
|
let i = [];
|
|
7341
7328
|
return r.type === "date" ? i.push(r.pattern || "yyyy-MM-dd") : r.digits !== void 0 && i.push(String(r.digits)), Ue(e, r.type, i);
|
|
7342
7329
|
}
|
|
7343
|
-
function
|
|
7330
|
+
function Yi(e) {
|
|
7344
7331
|
let t = Number(String(e ?? "").replaceAll(",", ""));
|
|
7345
7332
|
return Number.isFinite(t) ? t : 0;
|
|
7346
7333
|
}
|
|
7347
|
-
function
|
|
7334
|
+
function Xi(e, t) {
|
|
7348
7335
|
let n = t?.format;
|
|
7349
7336
|
if (n && (n.type === "currency" || n.type === "number" || n.type === "thousand")) {
|
|
7350
7337
|
let t = [];
|
|
@@ -7352,18 +7339,18 @@ function Zi(e, t) {
|
|
|
7352
7339
|
}
|
|
7353
7340
|
return String(Number(e.toFixed(4)));
|
|
7354
7341
|
}
|
|
7355
|
-
function
|
|
7342
|
+
function Zi(e, t) {
|
|
7356
7343
|
let n = Array.isArray(e.columns) ? e.columns : [], r = e.summary?.columns ?? {}, i = Object.values(r).some((e) => e.type !== "none");
|
|
7357
7344
|
return n.map((e, n) => {
|
|
7358
7345
|
let a = r[String(n)];
|
|
7359
|
-
return a?.type === "sum" ?
|
|
7346
|
+
return a?.type === "sum" ? Xi(t.reduce((e, t) => e + Yi(t[n]), 0), e) : a?.type === "text" ? a.text ?? "" : n === 0 && !i ? M("elements.tableElement.summaryDefaultLabel") : "";
|
|
7360
7347
|
});
|
|
7361
7348
|
}
|
|
7362
|
-
function
|
|
7349
|
+
function Qi(e) {
|
|
7363
7350
|
let t = e.borders?.mode ?? "all";
|
|
7364
7351
|
return t === "all" || t === "horizontal" ? e.borders.inner : null;
|
|
7365
7352
|
}
|
|
7366
|
-
function
|
|
7353
|
+
function $i(e) {
|
|
7367
7354
|
let t = e.borders?.mode ?? "all";
|
|
7368
7355
|
return t === "all" || t === "vertical" ? e.borders.inner : null;
|
|
7369
7356
|
}
|
|
@@ -7371,40 +7358,40 @@ function Y(e) {
|
|
|
7371
7358
|
return e ?? null;
|
|
7372
7359
|
}
|
|
7373
7360
|
function X(e, t) {
|
|
7374
|
-
let n = Array.isArray(e.columns) ? e.columns : [], r = t.rows ?? (Array.isArray(e.rows) ? e.rows : []), i = (t.showHeader ?? e.headerVisible !== !1) && n.length > 0, a = t.showSummary ?? e.summary?.enabled === !0, o = a && e.summary?.position === "top", s = a && !o, c =
|
|
7361
|
+
let n = Array.isArray(e.columns) ? e.columns : [], r = t.rows ?? (Array.isArray(e.rows) ? e.rows : []), i = (t.showHeader ?? e.headerVisible !== !1) && n.length > 0, a = t.showSummary ?? e.summary?.enabled === !0, o = a && e.summary?.position === "top", s = a && !o, c = Ki(e, t.elementWidthMm), l = c.reduce((e, t) => e + t, 0), u = i ? Ai(e) : 0, d = a ? ji(e) : 0, f = ki(e), p = e.headerRows?.length ? e.headerRows : [n.map((e) => e.title)], m = i ? p.length : 0, h = e.heightMode === "auto" ? r.length * f : Math.max(0, t.elementHeightMm - u - d - K(e)), g = r.length > 0 ? h / r.length : h, _ = [], v = [], y = [];
|
|
7375
7362
|
for (let e = 0; e < m; e++) _.push("header"), v.push(u / m), y.push(-1);
|
|
7376
7363
|
o && (_.push("summary"), v.push(d), y.push(-1)), r.forEach((t, n) => {
|
|
7377
7364
|
_.push("body"), v.push(Math.max(.5, g)), y.push(n + (e.rowOffset ?? 0));
|
|
7378
7365
|
}), s && (_.push("summary"), v.push(d), y.push(-1));
|
|
7379
|
-
let b =
|
|
7366
|
+
let b = qi(n.map((e) => ({
|
|
7380
7367
|
...e,
|
|
7381
7368
|
mergeSame: !1
|
|
7382
|
-
})), r,
|
|
7369
|
+
})), r, Ui({
|
|
7383
7370
|
...e,
|
|
7384
7371
|
rows: r
|
|
7385
|
-
})),
|
|
7372
|
+
})), S = qi(n.map((e) => ({
|
|
7386
7373
|
...e,
|
|
7387
7374
|
mergeSame: !1
|
|
7388
|
-
})), p, e.headerMerges),
|
|
7375
|
+
})), p, e.headerMerges), C = a ? e.summary?.values ?? Zi(e, r) : [], ee = _.length, w = n.length, T = _.map((t, i) => {
|
|
7389
7376
|
let a = [];
|
|
7390
|
-
for (let s = 0; s <
|
|
7377
|
+
for (let s = 0; s < w; s++) {
|
|
7391
7378
|
let c = n[s], l = i - m - +!!o, u;
|
|
7392
|
-
t === "body" ? u = b.spans.get(J(l, s)) : t === "header" && (u =
|
|
7379
|
+
t === "body" ? u = b.spans.get(J(l, s)) : t === "header" && (u = S.spans.get(J(i, s)));
|
|
7393
7380
|
let d = u?.rowspan ?? 1, f = u?.colspan ?? 1, h = i + d - 1, g = s + f - 1;
|
|
7394
|
-
if (t === "body" && b.covered.has(J(l, s)) || t === "header" &&
|
|
7381
|
+
if (t === "body" && b.covered.has(J(l, s)) || t === "header" && S.covered.has(J(i, s))) continue;
|
|
7395
7382
|
let v;
|
|
7396
|
-
v = t === "header" ? p[i]?.[s] ?? "" : t === "summary" ?
|
|
7397
|
-
let
|
|
7398
|
-
t === "summary" ?
|
|
7383
|
+
v = t === "header" ? p[i]?.[s] ?? "" : t === "summary" ? C[s] ?? "" : Ji(r[l]?.[s], c, e);
|
|
7384
|
+
let x;
|
|
7385
|
+
t === "summary" ? x = {
|
|
7399
7386
|
...e.summary?.style,
|
|
7400
7387
|
...Object.fromEntries(Object.entries(e.summary?.columns[String(s)]?.style ?? {}).filter(([, e]) => e !== void 0))
|
|
7401
|
-
} : t === "body" && (
|
|
7388
|
+
} : t === "body" && (x = e.cellOverrides?.[J(y[i], s)]), a.push({
|
|
7402
7389
|
col: s,
|
|
7403
7390
|
colSpan: f,
|
|
7404
7391
|
column: c,
|
|
7405
|
-
edges:
|
|
7392
|
+
edges: ta(e, _, i, h, s, g, ee, w),
|
|
7406
7393
|
kind: t,
|
|
7407
|
-
override:
|
|
7394
|
+
override: x,
|
|
7408
7395
|
row: i,
|
|
7409
7396
|
rowSpan: d,
|
|
7410
7397
|
sourceRowIndex: y[i],
|
|
@@ -7417,37 +7404,37 @@ function X(e, t) {
|
|
|
7417
7404
|
kind: t,
|
|
7418
7405
|
sourceRowIndex: y[i]
|
|
7419
7406
|
};
|
|
7420
|
-
}),
|
|
7421
|
-
colWidthsMm: c.map((e) =>
|
|
7422
|
-
heightMm:
|
|
7423
|
-
rows:
|
|
7424
|
-
widthMm:
|
|
7407
|
+
}), E = {
|
|
7408
|
+
colWidthsMm: c.map((e) => x(e, 3)),
|
|
7409
|
+
heightMm: x(v.reduce((e, t) => e + t, 0) + K(e), 3),
|
|
7410
|
+
rows: T,
|
|
7411
|
+
widthMm: x(l, 3)
|
|
7425
7412
|
};
|
|
7426
|
-
|
|
7427
|
-
let
|
|
7428
|
-
if (e.heightMode === "auto" &&
|
|
7429
|
-
let n =
|
|
7430
|
-
n && r > 0 && (n.heightMm += r,
|
|
7413
|
+
ea(e, t, E);
|
|
7414
|
+
let D = e.heightFill;
|
|
7415
|
+
if (e.heightMode === "auto" && D) {
|
|
7416
|
+
let n = E.rows.filter((e) => e.kind === "body")[D.bodyRow], r = D.minHeightMm - E.heightMm;
|
|
7417
|
+
n && r > 0 && (n.heightMm += r, E.heightMm = D.minHeightMm, ea(e, t, E));
|
|
7431
7418
|
}
|
|
7432
|
-
return
|
|
7419
|
+
return E;
|
|
7433
7420
|
}
|
|
7434
|
-
function
|
|
7421
|
+
function ea(e, t, n) {
|
|
7435
7422
|
if (typeof document > "u" || !document.body) return;
|
|
7436
7423
|
let r = document.createElement("div");
|
|
7437
|
-
r.style.cssText = `position:fixed;left:-100000px;top:0;visibility:hidden;width:${t.elementWidthMm *
|
|
7424
|
+
r.style.cssText = `position:fixed;left:-100000px;top:0;visibility:hidden;width:${t.elementWidthMm * C}px;height:${t.elementHeightMm * C}px`, r.innerHTML = Hi(e, t, n), document.body.appendChild(r);
|
|
7438
7425
|
try {
|
|
7439
7426
|
let e = r.querySelector("table");
|
|
7440
7427
|
if (!e) throw Error("Table layout did not produce a table");
|
|
7441
|
-
let t = e.getBoundingClientRect().height /
|
|
7428
|
+
let t = e.getBoundingClientRect().height / C;
|
|
7442
7429
|
if (t <= 0) return;
|
|
7443
7430
|
Array.from(e.rows).forEach((e, t) => {
|
|
7444
|
-
n.rows[t].heightMm = e.getBoundingClientRect().height /
|
|
7431
|
+
n.rows[t].heightMm = e.getBoundingClientRect().height / C;
|
|
7445
7432
|
}), n.heightMm = Math.ceil(t * 1e3) / 1e3;
|
|
7446
7433
|
} finally {
|
|
7447
7434
|
r.remove();
|
|
7448
7435
|
}
|
|
7449
7436
|
}
|
|
7450
|
-
function
|
|
7437
|
+
function ta(e, t, n, r, i, a, o, s) {
|
|
7451
7438
|
let c = t[n], l = c === "header" ? e.headerBorders : void 0, u = c === "summary" ? e.summary.borders : l;
|
|
7452
7439
|
if (u) {
|
|
7453
7440
|
let l = {
|
|
@@ -7455,17 +7442,17 @@ function na(e, t, n, r, i, a, o, s) {
|
|
|
7455
7442
|
borders: u
|
|
7456
7443
|
}, d = n === 0 || t[n - 1] !== c, f = r === o - 1 || t[r + 1] !== c, p = u.outer;
|
|
7457
7444
|
return {
|
|
7458
|
-
bottom: f ? Y(u.bottom ?? p) :
|
|
7459
|
-
left: i === 0 ? Y(u.left ?? p) :
|
|
7460
|
-
right: a === s - 1 ? Y(u.right ?? p) :
|
|
7461
|
-
top: d ? Y(u.top ?? p) :
|
|
7445
|
+
bottom: f ? Y(u.bottom ?? p) : Qi(l),
|
|
7446
|
+
left: i === 0 ? Y(u.left ?? p) : $i(l),
|
|
7447
|
+
right: a === s - 1 ? Y(u.right ?? p) : $i(l),
|
|
7448
|
+
top: d ? Y(u.top ?? p) : Qi(l)
|
|
7462
7449
|
};
|
|
7463
7450
|
}
|
|
7464
7451
|
let d = e.borders, f = d?.outer, p = d?.headerBottom, m = t[r], h;
|
|
7465
|
-
h = n === 0 ? Y(d.top ?? f) : t[n - 1] === "header" && t[n] !== "header" ? Y(p ??
|
|
7452
|
+
h = n === 0 ? Y(d.top ?? f) : t[n - 1] === "header" && t[n] !== "header" ? Y(p ?? Qi(e)) : Qi(e);
|
|
7466
7453
|
let g;
|
|
7467
|
-
g = r === o - 1 ? Y(d.bottom ?? f) : m === "header" && t[r + 1] !== "header" ? Y(p ??
|
|
7468
|
-
let _ = i === 0 ? Y(d.left ?? f) :
|
|
7454
|
+
g = r === o - 1 ? Y(d.bottom ?? f) : m === "header" && t[r + 1] !== "header" ? Y(p ?? Qi(e)) : Qi(e);
|
|
7455
|
+
let _ = i === 0 ? Y(d.left ?? f) : $i(e), v = a === s - 1 ? Y(d.right ?? f) : $i(e), y = t[n - 1], b;
|
|
7469
7456
|
y === "header" ? b = e.headerBorders : y === "summary" && (b = e.summary.borders);
|
|
7470
7457
|
let x = t[r + 1] === "summary" ? e.summary.borders : void 0;
|
|
7471
7458
|
return b && (h = Y(b.bottom ?? b.outer)), x && (g = Y(x.top ?? x.outer)), {
|
|
@@ -7475,10 +7462,10 @@ function na(e, t, n, r, i, a, o, s) {
|
|
|
7475
7462
|
top: h
|
|
7476
7463
|
};
|
|
7477
7464
|
}
|
|
7478
|
-
function
|
|
7465
|
+
function na(e, t) {
|
|
7479
7466
|
return Array.from({ length: Math.max(0, e) }, () => Array.from({ length: t }, () => ""));
|
|
7480
7467
|
}
|
|
7481
|
-
function
|
|
7468
|
+
function ra(e, t, n = t, r, i = 120) {
|
|
7482
7469
|
if (e.heightMode !== "auto" || e.pagination?.crossPage === !1) return null;
|
|
7483
7470
|
let a = Array.isArray(e.rows) ? e.rows : [], o = Array.isArray(e.columns) ? e.columns : [], s = e.summary?.enabled === !0, c = ki(e), l = X(e, {
|
|
7484
7471
|
elementHeightMm: 0,
|
|
@@ -7487,24 +7474,24 @@ function ia(e, t, n = t, r, i = 120) {
|
|
|
7487
7474
|
function p(e, t) {
|
|
7488
7475
|
return u.slice(e, e + t).reduce((e, t) => e + t, 0);
|
|
7489
7476
|
}
|
|
7490
|
-
let m =
|
|
7491
|
-
let h = e.pagination?.fillEmptyRows === !0 && u > t.length ? u - t.length : 0, g = h > 0 ? [...t, ...
|
|
7477
|
+
let m = K(e), h = Math.max(0, Math.trunc(e.pagination?.fixedRows === !0 ? e.pagination.rowsPerPage ?? 0 : 0)), g = function(t, n, r, l, u) {
|
|
7478
|
+
let h = e.pagination?.fillEmptyRows === !0 && u > t.length ? u - t.length : 0, g = h > 0 ? [...t, ...na(h, o.length)] : t, _ = e.headerVisible !== !1 && (n || e.pagination?.repeatHeader !== !1), v = s && (e.summary?.scope === "eachPage" || r), y = _ ? d : 0, b = X({
|
|
7492
7479
|
...e,
|
|
7493
7480
|
headerVisible: _,
|
|
7494
|
-
resolvedMerges:
|
|
7481
|
+
resolvedMerges: Wi(Ui(e), l, g.length),
|
|
7495
7482
|
rowOffset: (e.rowOffset ?? 0) + l,
|
|
7496
7483
|
rows: g,
|
|
7497
7484
|
summary: {
|
|
7498
7485
|
...e.summary,
|
|
7499
7486
|
enabled: v,
|
|
7500
|
-
values: e.summary?.values ??
|
|
7487
|
+
values: e.summary?.values ?? Zi(e, e.summary.scope === "eachPage" ? t : a)
|
|
7501
7488
|
}
|
|
7502
7489
|
}, {
|
|
7503
7490
|
elementHeightMm: 0,
|
|
7504
7491
|
elementWidthMm: i
|
|
7505
7492
|
});
|
|
7506
7493
|
return {
|
|
7507
|
-
heightMm: Math.max(b.heightMm,
|
|
7494
|
+
heightMm: Math.max(b.heightMm, x(y + p(l, t.length) + Math.max(0, g.length - t.length) * c + (v ? f : 0) + m, 3)),
|
|
7508
7495
|
rows: g,
|
|
7509
7496
|
showHeader: _,
|
|
7510
7497
|
showSummary: v,
|
|
@@ -7543,7 +7530,7 @@ function ia(e, t, n = t, r, i = 120) {
|
|
|
7543
7530
|
return _.length === 1 && _[0].rows.length === a.length ? null : _;
|
|
7544
7531
|
}
|
|
7545
7532
|
// src/elements/table/table-overflow.ts
|
|
7546
|
-
function
|
|
7533
|
+
function ia(e, t) {
|
|
7547
7534
|
let n = e.overflow, r = n.scope === "remaining" ? { ...e.cellOverrides } : {}, i = `${t + (e.rowOffset ?? 0)}:0`;
|
|
7548
7535
|
return (n.messageAlign || n.messageVAlign) && (r[i] = {
|
|
7549
7536
|
...r[i],
|
|
@@ -7551,12 +7538,12 @@ function aa(e, t) {
|
|
|
7551
7538
|
vAlign: n.messageVAlign || r[i]?.vAlign
|
|
7552
7539
|
}), r;
|
|
7553
7540
|
}
|
|
7554
|
-
function
|
|
7555
|
-
let r =
|
|
7541
|
+
function aa({ node: e, page: t, warnings: n }) {
|
|
7542
|
+
let r = G(e.props), i = r.overflow;
|
|
7556
7543
|
if (!i.enabled) return null;
|
|
7557
|
-
let a =
|
|
7558
|
-
if (Mi(r, Math.min(r.rows.length, i.threshold)) > o && n.add(
|
|
7559
|
-
let s = i.scope === "remaining" ? i.threshold : 0, c = Ei(r.summary,
|
|
7544
|
+
let a = A(t), o = a.y + a.height - e.y;
|
|
7545
|
+
if (Mi(r, Math.min(r.rows.length, i.threshold)) > o && n.add(M("elements.tableElement.overflowCapacityWarning")), r.rows.length <= i.threshold) return null;
|
|
7546
|
+
let s = i.scope === "remaining" ? i.threshold : 0, c = Ei(r.summary, Zi(r, r.rows)), l = i.scope === "remaining" ? r.rows.slice(0, i.threshold) : [], u = r.boxHeightMm ?? e.height, d = ia(r, l.length), f = {
|
|
7560
7547
|
...r,
|
|
7561
7548
|
cellOverrides: d,
|
|
7562
7549
|
heightFill: {
|
|
@@ -7565,7 +7552,7 @@ function oa({ node: e, page: t, warnings: n }) {
|
|
|
7565
7552
|
},
|
|
7566
7553
|
heightMode: "auto",
|
|
7567
7554
|
mergeRules: [],
|
|
7568
|
-
merges: [...
|
|
7555
|
+
merges: [...Wi(Ui(r), 0, l.length), {
|
|
7569
7556
|
col: 0,
|
|
7570
7557
|
colspan: r.columns.length,
|
|
7571
7558
|
row: l.length,
|
|
@@ -7588,12 +7575,12 @@ function oa({ node: e, page: t, warnings: n }) {
|
|
|
7588
7575
|
elementHeightMm: e.height,
|
|
7589
7576
|
elementWidthMm: e.width
|
|
7590
7577
|
}).heightMm;
|
|
7591
|
-
return p > Math.min(o, u) + .001 && n.add(
|
|
7578
|
+
return p > Math.min(o, u) + .001 && n.add(M("elements.tableElement.overflowCapacityWarning")), {
|
|
7592
7579
|
continuation: {
|
|
7593
7580
|
elementId: i.elementId,
|
|
7594
7581
|
prepare(t) {
|
|
7595
|
-
if (t.type !== e.type) throw new M(
|
|
7596
|
-
let n =
|
|
7582
|
+
if (t.type !== e.type) throw new j(M("core.overflow.invalidTarget"), { code: "overflow.invalid-target" });
|
|
7583
|
+
let n = G(t.props), a = Ui(r), o = r.rows.slice(s).map((e) => [...e]);
|
|
7597
7584
|
for (let e of a) e.row < s && e.row + e.rowspan > s && o.length > 0 && (o[0][e.col] = r.rows[e.row]?.[e.col] ?? "");
|
|
7598
7585
|
return {
|
|
7599
7586
|
...t,
|
|
@@ -7611,7 +7598,7 @@ function oa({ node: e, page: t, warnings: n }) {
|
|
|
7611
7598
|
heightFill: void 0,
|
|
7612
7599
|
heightMode: "auto",
|
|
7613
7600
|
mergeRules: [],
|
|
7614
|
-
merges:
|
|
7601
|
+
merges: Wi(a, s, o.length),
|
|
7615
7602
|
overflow: {
|
|
7616
7603
|
...i,
|
|
7617
7604
|
enabled: !1
|
|
@@ -7641,13 +7628,13 @@ function oa({ node: e, page: t, warnings: n }) {
|
|
|
7641
7628
|
};
|
|
7642
7629
|
}
|
|
7643
7630
|
// src/elements/table/table-pdf-render.ts
|
|
7644
|
-
function
|
|
7631
|
+
function oa(e, t) {
|
|
7645
7632
|
let n = [e];
|
|
7646
7633
|
for (let e of t) n.push(n[n.length - 1] + e);
|
|
7647
7634
|
return n;
|
|
7648
7635
|
}
|
|
7649
|
-
function
|
|
7650
|
-
let n =
|
|
7636
|
+
function sa(e, t) {
|
|
7637
|
+
let n = oa(t.x, e.colWidthsMm), r = oa(t.y, e.rows.map((e) => e.heightMm));
|
|
7651
7638
|
return function(e) {
|
|
7652
7639
|
return {
|
|
7653
7640
|
height: r[e.row + e.rowSpan] - r[e.row],
|
|
@@ -7657,35 +7644,35 @@ function ca(e, t) {
|
|
|
7657
7644
|
};
|
|
7658
7645
|
};
|
|
7659
7646
|
}
|
|
7660
|
-
function
|
|
7647
|
+
function ca(e) {
|
|
7661
7648
|
let t = /* @__PURE__ */ new Set();
|
|
7662
7649
|
return function(n, r, i, a, o, s) {
|
|
7663
|
-
!r || r.width <= 0 || !
|
|
7650
|
+
!r || r.width <= 0 || !q(r.color) || t.has(n) || (t.add(n), e.line(i, a, o, s, {
|
|
7664
7651
|
color: r.color,
|
|
7665
7652
|
dashMm: Ni(r.style),
|
|
7666
7653
|
widthMm: r.width
|
|
7667
7654
|
}));
|
|
7668
7655
|
};
|
|
7669
7656
|
}
|
|
7670
|
-
function
|
|
7657
|
+
function la(e, t, n) {
|
|
7671
7658
|
let r = t.col + t.colSpan, i = t.row + t.rowSpan, a = n.x + n.width, o = n.y + n.height;
|
|
7672
7659
|
e(`h:${t.row}:${t.col}-${r}`, t.edges.top, n.x, n.y, a, n.y), e(`h:${i}:${t.col}-${r}`, t.edges.bottom, n.x, o, a, o), e(`v:${t.col}:${t.row}-${i}`, t.edges.left, n.x, n.y, n.x, o), e(`v:${r}:${t.row}-${i}`, t.edges.right, a, n.y, a, o);
|
|
7673
7660
|
}
|
|
7674
|
-
function
|
|
7661
|
+
function ua(e, t) {
|
|
7675
7662
|
let { draw: n, node: r } = e;
|
|
7676
|
-
|
|
7663
|
+
q(t.background) && n.rect(r.x, r.y, r.width, r.height, { fill: t.background });
|
|
7677
7664
|
let i = X(t, {
|
|
7678
7665
|
elementHeightMm: r.height,
|
|
7679
7666
|
elementWidthMm: r.width
|
|
7680
|
-
}), a =
|
|
7667
|
+
}), a = sa(i, r), o = i.rows.flatMap((e) => e.cells), s = ca(n);
|
|
7681
7668
|
for (let e of o) {
|
|
7682
7669
|
let { background: r } = vi(t, e);
|
|
7683
|
-
if (
|
|
7670
|
+
if (q(r)) {
|
|
7684
7671
|
let t = a(e);
|
|
7685
7672
|
n.rect(t.x, t.y, t.width, t.height, { fill: r });
|
|
7686
7673
|
}
|
|
7687
7674
|
}
|
|
7688
|
-
for (let e of o)
|
|
7675
|
+
for (let e of o) la(s, e, a(e));
|
|
7689
7676
|
for (let e of o) {
|
|
7690
7677
|
if (!e.text) continue;
|
|
7691
7678
|
let r = vi(t, e);
|
|
@@ -7706,7 +7693,7 @@ function da(e, t) {
|
|
|
7706
7693
|
}
|
|
7707
7694
|
}
|
|
7708
7695
|
// src/elements/table/table-preview.ts
|
|
7709
|
-
function
|
|
7696
|
+
function da(e) {
|
|
7710
7697
|
let t = tt(e, et);
|
|
7711
7698
|
return {
|
|
7712
7699
|
...t,
|
|
@@ -7723,43 +7710,43 @@ function fa(e) {
|
|
|
7723
7710
|
sourceRows: void 0,
|
|
7724
7711
|
summary: {
|
|
7725
7712
|
...t.summary,
|
|
7726
|
-
values:
|
|
7713
|
+
values: Zi(t, []).map((e, n) => t.summary.columns[String(n)]?.type === "sum" ? "" : e)
|
|
7727
7714
|
}
|
|
7728
7715
|
};
|
|
7729
7716
|
}
|
|
7730
7717
|
// src/elements/table/table-render.ts
|
|
7731
|
-
function
|
|
7732
|
-
return
|
|
7718
|
+
function fa(e, t, n = C) {
|
|
7719
|
+
return Hi(e, t, X(e, t), n);
|
|
7733
7720
|
}
|
|
7734
7721
|
// src/elements/definitions/table-element.ts
|
|
7735
|
-
function
|
|
7722
|
+
function pa(e, t) {
|
|
7736
7723
|
let n = {
|
|
7737
7724
|
...e.props,
|
|
7738
7725
|
...t
|
|
7739
7726
|
}, r = n.summary;
|
|
7740
|
-
if (
|
|
7727
|
+
if (I(r)) {
|
|
7741
7728
|
let { values: e, ...t } = r;
|
|
7742
7729
|
n.summary = t;
|
|
7743
7730
|
}
|
|
7744
7731
|
return { props: n };
|
|
7745
7732
|
}
|
|
7746
|
-
var
|
|
7733
|
+
var ma = {
|
|
7747
7734
|
get(e) {
|
|
7748
7735
|
return e.props;
|
|
7749
7736
|
},
|
|
7750
7737
|
set(e, t) {
|
|
7751
|
-
if (!
|
|
7752
|
-
return
|
|
7738
|
+
if (!I(t)) throw Error("Table properties must be an object");
|
|
7739
|
+
return pa(e, t);
|
|
7753
7740
|
}
|
|
7754
|
-
},
|
|
7741
|
+
}, ha = {
|
|
7755
7742
|
get(e) {
|
|
7756
7743
|
return e.props;
|
|
7757
7744
|
},
|
|
7758
7745
|
set(e, t) {
|
|
7759
|
-
if (!
|
|
7760
|
-
return
|
|
7746
|
+
if (!I(t)) throw Error("Table properties must be an object");
|
|
7747
|
+
return pa(e, t);
|
|
7761
7748
|
}
|
|
7762
|
-
},
|
|
7749
|
+
}, ga = {
|
|
7763
7750
|
get(e) {
|
|
7764
7751
|
return e.props.headerBold === void 0 ? "inherit" : e.props.headerBold ? "bold" : "normal";
|
|
7765
7752
|
},
|
|
@@ -7771,59 +7758,59 @@ var ha = {
|
|
|
7771
7758
|
} };
|
|
7772
7759
|
}
|
|
7773
7760
|
};
|
|
7774
|
-
function
|
|
7761
|
+
function _a() {
|
|
7775
7762
|
return [
|
|
7776
7763
|
{
|
|
7777
|
-
label:
|
|
7764
|
+
label: M("designer.fieldTable.leftAlignOption"),
|
|
7778
7765
|
value: "left"
|
|
7779
7766
|
},
|
|
7780
7767
|
{
|
|
7781
|
-
label:
|
|
7768
|
+
label: M("designer.fieldTable.centerAlignOption"),
|
|
7782
7769
|
value: "center"
|
|
7783
7770
|
},
|
|
7784
7771
|
{
|
|
7785
|
-
label:
|
|
7772
|
+
label: M("designer.fieldTable.rightAlignOption"),
|
|
7786
7773
|
value: "right"
|
|
7787
7774
|
}
|
|
7788
7775
|
];
|
|
7789
7776
|
}
|
|
7790
|
-
function
|
|
7777
|
+
function va() {
|
|
7791
7778
|
return [
|
|
7792
7779
|
{
|
|
7793
|
-
label:
|
|
7780
|
+
label: M("elements.tableElement.topAlignOption"),
|
|
7794
7781
|
value: "top"
|
|
7795
7782
|
},
|
|
7796
7783
|
{
|
|
7797
|
-
label:
|
|
7784
|
+
label: M("elements.tableElement.middleAlignOption"),
|
|
7798
7785
|
value: "middle"
|
|
7799
7786
|
},
|
|
7800
7787
|
{
|
|
7801
|
-
label:
|
|
7788
|
+
label: M("elements.tableElement.bottomAlignOption"),
|
|
7802
7789
|
value: "bottom"
|
|
7803
7790
|
}
|
|
7804
7791
|
];
|
|
7805
7792
|
}
|
|
7806
|
-
function
|
|
7793
|
+
function ya() {
|
|
7807
7794
|
return [{
|
|
7808
|
-
label:
|
|
7795
|
+
label: M("elements.tableElement.headerFollowColumnOption"),
|
|
7809
7796
|
value: ""
|
|
7810
|
-
}, ...
|
|
7797
|
+
}, ..._a()];
|
|
7811
7798
|
}
|
|
7812
|
-
var
|
|
7799
|
+
var ba = [
|
|
7813
7800
|
{
|
|
7814
7801
|
advanced: !0,
|
|
7815
7802
|
fields: [
|
|
7816
7803
|
{
|
|
7817
7804
|
key: "overflow.enabled",
|
|
7818
7805
|
get label() {
|
|
7819
|
-
return
|
|
7806
|
+
return M("elements.tableElement.overflowEnabled");
|
|
7820
7807
|
},
|
|
7821
7808
|
type: "boolean"
|
|
7822
7809
|
},
|
|
7823
7810
|
{
|
|
7824
7811
|
key: "overflow.threshold",
|
|
7825
7812
|
get label() {
|
|
7826
|
-
return
|
|
7813
|
+
return M("elements.tableElement.overflowThreshold");
|
|
7827
7814
|
},
|
|
7828
7815
|
min: 1,
|
|
7829
7816
|
showIf: (e) => Z(e).overflow.enabled,
|
|
@@ -7833,7 +7820,7 @@ var xa = [
|
|
|
7833
7820
|
{
|
|
7834
7821
|
key: "overflow.message",
|
|
7835
7822
|
get label() {
|
|
7836
|
-
return
|
|
7823
|
+
return M("elements.tableElement.overflowMessage");
|
|
7837
7824
|
},
|
|
7838
7825
|
showIf: (e) => Z(e).overflow.enabled,
|
|
7839
7826
|
type: "string"
|
|
@@ -7841,10 +7828,10 @@ var xa = [
|
|
|
7841
7828
|
{
|
|
7842
7829
|
key: "overflow.messageAlign",
|
|
7843
7830
|
get label() {
|
|
7844
|
-
return
|
|
7831
|
+
return M("elements.tableElement.overflowMessageAlign");
|
|
7845
7832
|
},
|
|
7846
7833
|
get options() {
|
|
7847
|
-
return
|
|
7834
|
+
return ya();
|
|
7848
7835
|
},
|
|
7849
7836
|
showIf: (e) => Z(e).overflow.enabled,
|
|
7850
7837
|
type: "select"
|
|
@@ -7852,13 +7839,13 @@ var xa = [
|
|
|
7852
7839
|
{
|
|
7853
7840
|
key: "overflow.messageVAlign",
|
|
7854
7841
|
get label() {
|
|
7855
|
-
return
|
|
7842
|
+
return M("elements.tableElement.overflowMessageVAlign");
|
|
7856
7843
|
},
|
|
7857
7844
|
get options() {
|
|
7858
7845
|
return [{
|
|
7859
|
-
label:
|
|
7846
|
+
label: M("elements.tableElement.headerFollowColumnOption"),
|
|
7860
7847
|
value: ""
|
|
7861
|
-
}, ...
|
|
7848
|
+
}, ...va()];
|
|
7862
7849
|
},
|
|
7863
7850
|
showIf: (e) => Z(e).overflow.enabled,
|
|
7864
7851
|
type: "select"
|
|
@@ -7866,16 +7853,16 @@ var xa = [
|
|
|
7866
7853
|
{
|
|
7867
7854
|
key: "overflow.scope",
|
|
7868
7855
|
get label() {
|
|
7869
|
-
return
|
|
7856
|
+
return M("elements.tableElement.overflowScope");
|
|
7870
7857
|
},
|
|
7871
7858
|
options: [{
|
|
7872
7859
|
get label() {
|
|
7873
|
-
return
|
|
7860
|
+
return M("elements.tableElement.overflowAll");
|
|
7874
7861
|
},
|
|
7875
7862
|
value: "all"
|
|
7876
7863
|
}, {
|
|
7877
7864
|
get label() {
|
|
7878
|
-
return
|
|
7865
|
+
return M("elements.tableElement.overflowRemaining");
|
|
7879
7866
|
},
|
|
7880
7867
|
value: "remaining"
|
|
7881
7868
|
}],
|
|
@@ -7885,7 +7872,7 @@ var xa = [
|
|
|
7885
7872
|
{
|
|
7886
7873
|
key: "overflow",
|
|
7887
7874
|
get label() {
|
|
7888
|
-
return
|
|
7875
|
+
return M("elements.tableElement.overflowLayout");
|
|
7889
7876
|
},
|
|
7890
7877
|
showIf: (e) => Z(e).overflow.enabled,
|
|
7891
7878
|
type: "tableContinuationLayout"
|
|
@@ -7893,41 +7880,41 @@ var xa = [
|
|
|
7893
7880
|
],
|
|
7894
7881
|
hint(e) {
|
|
7895
7882
|
let t = Z(e.props);
|
|
7896
|
-
if (!t.overflow.enabled) return
|
|
7883
|
+
if (!t.overflow.enabled) return M("elements.tableElement.overflowIntroHint");
|
|
7897
7884
|
let n = [
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7885
|
+
M("elements.tableElement.overflowHomeHint"),
|
|
7886
|
+
M(t.overflow.scope === "remaining" ? "elements.tableElement.overflowRemainingHint" : "elements.tableElement.overflowAllHint", { count: t.overflow.threshold }),
|
|
7887
|
+
M("elements.tableElement.overflowLayoutHint")
|
|
7901
7888
|
];
|
|
7902
|
-
return t.heightMode === "auto" ? t.pagination.crossPage && n.push(
|
|
7889
|
+
return t.heightMode === "auto" ? t.pagination.crossPage && n.push(M("elements.tableElement.overflowPaginationHint")) : n.push(M("elements.tableElement.overflowFixedHeightHint")), n.push(M("elements.tableElement.overflowRecommendedHint")), n.join("\n");
|
|
7903
7890
|
},
|
|
7904
7891
|
get tab() {
|
|
7905
|
-
return
|
|
7892
|
+
return M("elements.tableElement.printTab");
|
|
7906
7893
|
},
|
|
7907
7894
|
get title() {
|
|
7908
|
-
return
|
|
7895
|
+
return M("elements.tableElement.overflowSection");
|
|
7909
7896
|
}
|
|
7910
7897
|
},
|
|
7911
7898
|
{
|
|
7912
7899
|
advanced: !0,
|
|
7913
7900
|
fields: [{
|
|
7914
|
-
help:
|
|
7901
|
+
help: M("elements.tableElement.heightModeHint"),
|
|
7915
7902
|
key: "heightMode",
|
|
7916
7903
|
get label() {
|
|
7917
|
-
return
|
|
7904
|
+
return M("elements.tableElement.heightModeLabel");
|
|
7918
7905
|
},
|
|
7919
7906
|
options: [{
|
|
7920
|
-
label:
|
|
7907
|
+
label: M("elements.tableElement.heightModeAutoOption"),
|
|
7921
7908
|
value: "auto"
|
|
7922
7909
|
}, {
|
|
7923
|
-
label:
|
|
7910
|
+
label: M("elements.tableElement.heightModeFixedOption"),
|
|
7924
7911
|
value: "fixed"
|
|
7925
7912
|
}],
|
|
7926
7913
|
type: "select"
|
|
7927
7914
|
}, {
|
|
7928
7915
|
key: "minRowHeightMm",
|
|
7929
7916
|
get label() {
|
|
7930
|
-
return
|
|
7917
|
+
return M("elements.tableElement.minRowHeightLabel");
|
|
7931
7918
|
},
|
|
7932
7919
|
max: 60,
|
|
7933
7920
|
min: 0,
|
|
@@ -7935,14 +7922,14 @@ var xa = [
|
|
|
7935
7922
|
step: .5,
|
|
7936
7923
|
type: "number",
|
|
7937
7924
|
get unit() {
|
|
7938
|
-
return
|
|
7925
|
+
return M("elements.tableElement.distanceUnit");
|
|
7939
7926
|
}
|
|
7940
7927
|
}],
|
|
7941
7928
|
get tab() {
|
|
7942
|
-
return
|
|
7929
|
+
return M("elements.tableElement.basicTab");
|
|
7943
7930
|
},
|
|
7944
7931
|
get title() {
|
|
7945
|
-
return
|
|
7932
|
+
return M("elements.tableElement.basicSection");
|
|
7946
7933
|
}
|
|
7947
7934
|
},
|
|
7948
7935
|
{
|
|
@@ -7951,26 +7938,26 @@ var xa = [
|
|
|
7951
7938
|
binding: {
|
|
7952
7939
|
..._i("collection"),
|
|
7953
7940
|
formatHint(e) {
|
|
7954
|
-
return
|
|
7941
|
+
return M("designer.inspectorField.rowBindingHint", { bindingPath: e });
|
|
7955
7942
|
}
|
|
7956
7943
|
},
|
|
7957
7944
|
controlProps: { tableMode: "rows" },
|
|
7958
7945
|
get help() {
|
|
7959
|
-
return
|
|
7946
|
+
return M("elements.tableElement.columnsBindingHint");
|
|
7960
7947
|
},
|
|
7961
7948
|
key: "rows",
|
|
7962
7949
|
get label() {
|
|
7963
|
-
return
|
|
7950
|
+
return M("elements.tableElement.rowsLabel");
|
|
7964
7951
|
},
|
|
7965
7952
|
stacked: !0,
|
|
7966
7953
|
type: "table",
|
|
7967
|
-
value:
|
|
7954
|
+
value: ma
|
|
7968
7955
|
}],
|
|
7969
7956
|
get tab() {
|
|
7970
|
-
return
|
|
7957
|
+
return M("elements.tableElement.dataTab");
|
|
7971
7958
|
},
|
|
7972
7959
|
get title() {
|
|
7973
|
-
return
|
|
7960
|
+
return M("elements.tableElement.dataSection");
|
|
7974
7961
|
}
|
|
7975
7962
|
},
|
|
7976
7963
|
{
|
|
@@ -7979,16 +7966,16 @@ var xa = [
|
|
|
7979
7966
|
controlProps: {},
|
|
7980
7967
|
key: "dataPreview",
|
|
7981
7968
|
get label() {
|
|
7982
|
-
return
|
|
7969
|
+
return M("elements.tableElement.dataPreviewLabel");
|
|
7983
7970
|
},
|
|
7984
7971
|
stacked: !0,
|
|
7985
7972
|
type: "tableDataPreview"
|
|
7986
7973
|
}],
|
|
7987
7974
|
get tab() {
|
|
7988
|
-
return
|
|
7975
|
+
return M("elements.tableElement.dataTab");
|
|
7989
7976
|
},
|
|
7990
7977
|
get title() {
|
|
7991
|
-
return
|
|
7978
|
+
return M("elements.tableElement.dataPreviewLabel");
|
|
7992
7979
|
}
|
|
7993
7980
|
},
|
|
7994
7981
|
{
|
|
@@ -7996,16 +7983,16 @@ var xa = [
|
|
|
7996
7983
|
fields: [{
|
|
7997
7984
|
key: "nullText",
|
|
7998
7985
|
get label() {
|
|
7999
|
-
return
|
|
7986
|
+
return M("elements.tableElement.nullTextLabel");
|
|
8000
7987
|
},
|
|
8001
|
-
placeholder:
|
|
7988
|
+
placeholder: M("elements.tableElement.nullTextPlaceholder"),
|
|
8002
7989
|
type: "string"
|
|
8003
7990
|
}],
|
|
8004
7991
|
get tab() {
|
|
8005
|
-
return
|
|
7992
|
+
return M("elements.tableElement.dataTab");
|
|
8006
7993
|
},
|
|
8007
7994
|
get title() {
|
|
8008
|
-
return
|
|
7995
|
+
return M("elements.tableElement.emptyValueSection");
|
|
8009
7996
|
}
|
|
8010
7997
|
},
|
|
8011
7998
|
{
|
|
@@ -8014,30 +8001,30 @@ var xa = [
|
|
|
8014
8001
|
binding: {
|
|
8015
8002
|
..._i("collection", "rows"),
|
|
8016
8003
|
formatHint(e) {
|
|
8017
|
-
return
|
|
8004
|
+
return M("designer.inspectorField.rowBindingHint", { bindingPath: e });
|
|
8018
8005
|
}
|
|
8019
8006
|
},
|
|
8020
8007
|
controlProps: { tableMode: "structure" },
|
|
8021
8008
|
key: "columns",
|
|
8022
8009
|
get label() {
|
|
8023
|
-
return
|
|
8010
|
+
return M("elements.tableElement.columnsLabel");
|
|
8024
8011
|
},
|
|
8025
8012
|
stacked: !0,
|
|
8026
8013
|
type: "table",
|
|
8027
|
-
value:
|
|
8014
|
+
value: ma
|
|
8028
8015
|
}, {
|
|
8029
8016
|
key: "headerVisible",
|
|
8030
8017
|
get label() {
|
|
8031
|
-
return
|
|
8018
|
+
return M("elements.tableElement.showHeaderLabel");
|
|
8032
8019
|
},
|
|
8033
8020
|
showIf: () => !1,
|
|
8034
8021
|
type: "boolean"
|
|
8035
8022
|
}],
|
|
8036
8023
|
get tab() {
|
|
8037
|
-
return
|
|
8024
|
+
return M("elements.tableElement.columnsTab");
|
|
8038
8025
|
},
|
|
8039
8026
|
get title() {
|
|
8040
|
-
return
|
|
8027
|
+
return M("elements.tableElement.columnsLabel");
|
|
8041
8028
|
}
|
|
8042
8029
|
},
|
|
8043
8030
|
{
|
|
@@ -8045,13 +8032,13 @@ var xa = [
|
|
|
8045
8032
|
fields: [{
|
|
8046
8033
|
key: "headerHeightMode",
|
|
8047
8034
|
get label() {
|
|
8048
|
-
return
|
|
8035
|
+
return M("elements.tableElement.headerHeightModeLabel");
|
|
8049
8036
|
},
|
|
8050
8037
|
options: [{
|
|
8051
|
-
label:
|
|
8038
|
+
label: M("elements.tableElement.autoOption"),
|
|
8052
8039
|
value: "auto"
|
|
8053
8040
|
}, {
|
|
8054
|
-
label:
|
|
8041
|
+
label: M("elements.tableElement.fixedOption"),
|
|
8055
8042
|
value: "fixed"
|
|
8056
8043
|
}],
|
|
8057
8044
|
showIf: (e) => e.headerVisible !== !1,
|
|
@@ -8059,7 +8046,7 @@ var xa = [
|
|
|
8059
8046
|
}, {
|
|
8060
8047
|
key: "headerHeightMm",
|
|
8061
8048
|
get label() {
|
|
8062
|
-
return
|
|
8049
|
+
return M("elements.tableElement.headerHeightLabel");
|
|
8063
8050
|
},
|
|
8064
8051
|
max: 60,
|
|
8065
8052
|
min: 1,
|
|
@@ -8067,14 +8054,14 @@ var xa = [
|
|
|
8067
8054
|
step: .5,
|
|
8068
8055
|
type: "number",
|
|
8069
8056
|
get unit() {
|
|
8070
|
-
return
|
|
8057
|
+
return M("elements.tableElement.distanceUnit");
|
|
8071
8058
|
}
|
|
8072
8059
|
}],
|
|
8073
8060
|
get tab() {
|
|
8074
|
-
return
|
|
8061
|
+
return M("elements.tableElement.headerTab");
|
|
8075
8062
|
},
|
|
8076
8063
|
get title() {
|
|
8077
|
-
return
|
|
8064
|
+
return M("elements.tableElement.headerHeightSection");
|
|
8078
8065
|
}
|
|
8079
8066
|
},
|
|
8080
8067
|
{
|
|
@@ -8083,7 +8070,7 @@ var xa = [
|
|
|
8083
8070
|
{
|
|
8084
8071
|
key: "headerBackground",
|
|
8085
8072
|
get label() {
|
|
8086
|
-
return
|
|
8073
|
+
return M("elements.tableElement.headerBackgroundLabel");
|
|
8087
8074
|
},
|
|
8088
8075
|
showIf: (e) => e.headerVisible !== !1,
|
|
8089
8076
|
type: "color"
|
|
@@ -8091,7 +8078,7 @@ var xa = [
|
|
|
8091
8078
|
{
|
|
8092
8079
|
key: "headerFontFamily",
|
|
8093
8080
|
get label() {
|
|
8094
|
-
return
|
|
8081
|
+
return M("elements.tableElement.fontFamilyLabel");
|
|
8095
8082
|
},
|
|
8096
8083
|
options: Dt,
|
|
8097
8084
|
showIf: (e) => e.headerVisible !== !1,
|
|
@@ -8100,7 +8087,7 @@ var xa = [
|
|
|
8100
8087
|
{
|
|
8101
8088
|
key: "headerFontSize",
|
|
8102
8089
|
get label() {
|
|
8103
|
-
return
|
|
8090
|
+
return M("elements.tableElement.fontSizeLabel");
|
|
8104
8091
|
},
|
|
8105
8092
|
max: 60,
|
|
8106
8093
|
min: 4,
|
|
@@ -8108,42 +8095,42 @@ var xa = [
|
|
|
8108
8095
|
step: .5,
|
|
8109
8096
|
type: "number",
|
|
8110
8097
|
get unit() {
|
|
8111
|
-
return
|
|
8098
|
+
return M("elements.tableElement.fontSizeUnit");
|
|
8112
8099
|
}
|
|
8113
8100
|
},
|
|
8114
8101
|
{
|
|
8115
8102
|
key: "headerBold",
|
|
8116
8103
|
get label() {
|
|
8117
|
-
return
|
|
8104
|
+
return M("elements.tableElement.headerBoldLabel");
|
|
8118
8105
|
},
|
|
8119
8106
|
options: [
|
|
8120
8107
|
{
|
|
8121
8108
|
get label() {
|
|
8122
|
-
return
|
|
8109
|
+
return M("elements.tableElement.headerFollowColumnOption");
|
|
8123
8110
|
},
|
|
8124
8111
|
value: "inherit"
|
|
8125
8112
|
},
|
|
8126
8113
|
{
|
|
8127
8114
|
get label() {
|
|
8128
|
-
return
|
|
8115
|
+
return M("elements.tableElement.headerBoldLabel");
|
|
8129
8116
|
},
|
|
8130
8117
|
value: "bold"
|
|
8131
8118
|
},
|
|
8132
8119
|
{
|
|
8133
8120
|
get label() {
|
|
8134
|
-
return
|
|
8121
|
+
return M("elements.tableElement.headerNormalOption");
|
|
8135
8122
|
},
|
|
8136
8123
|
value: "normal"
|
|
8137
8124
|
}
|
|
8138
8125
|
],
|
|
8139
8126
|
showIf: (e) => e.headerVisible !== !1,
|
|
8140
8127
|
type: "select",
|
|
8141
|
-
value:
|
|
8128
|
+
value: ga
|
|
8142
8129
|
},
|
|
8143
8130
|
{
|
|
8144
8131
|
key: "headerColor",
|
|
8145
8132
|
get label() {
|
|
8146
|
-
return
|
|
8133
|
+
return M("elements.tableElement.headerTextColorLabel");
|
|
8147
8134
|
},
|
|
8148
8135
|
showIf: (e) => e.headerVisible !== !1,
|
|
8149
8136
|
type: "color"
|
|
@@ -8151,25 +8138,25 @@ var xa = [
|
|
|
8151
8138
|
{
|
|
8152
8139
|
key: "headerAlign",
|
|
8153
8140
|
get label() {
|
|
8154
|
-
return
|
|
8141
|
+
return M("elements.tableElement.headerAlignLabel");
|
|
8155
8142
|
},
|
|
8156
|
-
options:
|
|
8143
|
+
options: ya(),
|
|
8157
8144
|
showIf: (e) => e.headerVisible !== !1,
|
|
8158
8145
|
type: "select"
|
|
8159
8146
|
},
|
|
8160
8147
|
{
|
|
8161
8148
|
key: "headerVAlign",
|
|
8162
8149
|
get label() {
|
|
8163
|
-
return
|
|
8150
|
+
return M("elements.tableElement.headerVAlignLabel");
|
|
8164
8151
|
},
|
|
8165
|
-
options:
|
|
8152
|
+
options: va(),
|
|
8166
8153
|
showIf: (e) => e.headerVisible !== !1,
|
|
8167
8154
|
type: "select"
|
|
8168
8155
|
},
|
|
8169
8156
|
{
|
|
8170
8157
|
key: "headerPaddingMm",
|
|
8171
8158
|
get label() {
|
|
8172
|
-
return
|
|
8159
|
+
return M("elements.tableElement.headerPaddingLabel");
|
|
8173
8160
|
},
|
|
8174
8161
|
max: 10,
|
|
8175
8162
|
min: 0,
|
|
@@ -8177,13 +8164,13 @@ var xa = [
|
|
|
8177
8164
|
step: .5,
|
|
8178
8165
|
type: "number",
|
|
8179
8166
|
get unit() {
|
|
8180
|
-
return
|
|
8167
|
+
return M("elements.tableElement.distanceUnit");
|
|
8181
8168
|
}
|
|
8182
8169
|
},
|
|
8183
8170
|
{
|
|
8184
8171
|
key: "headerWrap",
|
|
8185
8172
|
get label() {
|
|
8186
|
-
return
|
|
8173
|
+
return M("elements.tableElement.headerWrapLabel");
|
|
8187
8174
|
},
|
|
8188
8175
|
showIf: (e) => e.headerVisible !== !1,
|
|
8189
8176
|
type: "boolean"
|
|
@@ -8192,7 +8179,7 @@ var xa = [
|
|
|
8192
8179
|
controlProps: { inheritable: !0 },
|
|
8193
8180
|
key: "headerBorders",
|
|
8194
8181
|
get label() {
|
|
8195
|
-
return
|
|
8182
|
+
return M("elements.tableElement.headerBordersLabel");
|
|
8196
8183
|
},
|
|
8197
8184
|
showIf: (e) => e.headerVisible !== !1,
|
|
8198
8185
|
stacked: !0,
|
|
@@ -8202,7 +8189,7 @@ var xa = [
|
|
|
8202
8189
|
controlProps: { sideMode: "headerBottom" },
|
|
8203
8190
|
key: "borders.headerBottom",
|
|
8204
8191
|
get label() {
|
|
8205
|
-
return
|
|
8192
|
+
return M("elements.tableElement.headerBottomBorderLabel");
|
|
8206
8193
|
},
|
|
8207
8194
|
showIf: (e) => e.headerVisible !== !1,
|
|
8208
8195
|
stacked: !0,
|
|
@@ -8210,10 +8197,10 @@ var xa = [
|
|
|
8210
8197
|
}
|
|
8211
8198
|
],
|
|
8212
8199
|
get tab() {
|
|
8213
|
-
return
|
|
8200
|
+
return M("elements.tableElement.headerTab");
|
|
8214
8201
|
},
|
|
8215
8202
|
get title() {
|
|
8216
|
-
return
|
|
8203
|
+
return M("elements.tableElement.headerTab");
|
|
8217
8204
|
}
|
|
8218
8205
|
},
|
|
8219
8206
|
{
|
|
@@ -8221,16 +8208,16 @@ var xa = [
|
|
|
8221
8208
|
fields: [{
|
|
8222
8209
|
key: "pagination.repeatHeader",
|
|
8223
8210
|
get label() {
|
|
8224
|
-
return
|
|
8211
|
+
return M("elements.tableElement.repeatHeaderLabel");
|
|
8225
8212
|
},
|
|
8226
8213
|
showIf: (e) => e.headerVisible !== !1 && e.heightMode === "auto" && Q(e).crossPage,
|
|
8227
8214
|
type: "boolean"
|
|
8228
8215
|
}],
|
|
8229
8216
|
get tab() {
|
|
8230
|
-
return
|
|
8217
|
+
return M("elements.tableElement.headerTab");
|
|
8231
8218
|
},
|
|
8232
8219
|
get title() {
|
|
8233
|
-
return
|
|
8220
|
+
return M("elements.tableElement.headerPaginationSection");
|
|
8234
8221
|
}
|
|
8235
8222
|
},
|
|
8236
8223
|
{
|
|
@@ -8238,7 +8225,7 @@ var xa = [
|
|
|
8238
8225
|
batchEditable: !0,
|
|
8239
8226
|
key: "background",
|
|
8240
8227
|
get label() {
|
|
8241
|
-
return
|
|
8228
|
+
return M("elements.tableElement.backgroundLabel");
|
|
8242
8229
|
},
|
|
8243
8230
|
type: "color"
|
|
8244
8231
|
}, {
|
|
@@ -8246,16 +8233,16 @@ var xa = [
|
|
|
8246
8233
|
controlProps: {},
|
|
8247
8234
|
key: "borders",
|
|
8248
8235
|
get label() {
|
|
8249
|
-
return
|
|
8236
|
+
return M("elements.tableElement.bordersLabel");
|
|
8250
8237
|
},
|
|
8251
8238
|
stacked: !0,
|
|
8252
8239
|
type: "tableBorders"
|
|
8253
8240
|
}],
|
|
8254
8241
|
get tab() {
|
|
8255
|
-
return
|
|
8242
|
+
return M("elements.tableElement.basicTab");
|
|
8256
8243
|
},
|
|
8257
8244
|
get title() {
|
|
8258
|
-
return
|
|
8245
|
+
return M("elements.tableElement.appearanceSection");
|
|
8259
8246
|
}
|
|
8260
8247
|
},
|
|
8261
8248
|
{
|
|
@@ -8264,7 +8251,7 @@ var xa = [
|
|
|
8264
8251
|
batchEditable: !0,
|
|
8265
8252
|
key: "fontFamily",
|
|
8266
8253
|
get label() {
|
|
8267
|
-
return
|
|
8254
|
+
return M("elements.tableElement.fontFamilyLabel");
|
|
8268
8255
|
},
|
|
8269
8256
|
options: Dt,
|
|
8270
8257
|
type: "select"
|
|
@@ -8273,30 +8260,30 @@ var xa = [
|
|
|
8273
8260
|
batchEditable: !0,
|
|
8274
8261
|
key: "fontSize",
|
|
8275
8262
|
get label() {
|
|
8276
|
-
return
|
|
8263
|
+
return M("elements.tableElement.fontSizeLabel");
|
|
8277
8264
|
},
|
|
8278
8265
|
max: 60,
|
|
8279
8266
|
min: 4,
|
|
8280
8267
|
step: .5,
|
|
8281
8268
|
type: "number",
|
|
8282
8269
|
get unit() {
|
|
8283
|
-
return
|
|
8270
|
+
return M("elements.tableElement.fontSizeUnit");
|
|
8284
8271
|
}
|
|
8285
8272
|
},
|
|
8286
8273
|
{
|
|
8287
8274
|
batchEditable: !0,
|
|
8288
8275
|
key: "color",
|
|
8289
8276
|
get label() {
|
|
8290
|
-
return
|
|
8277
|
+
return M("elements.tableElement.textColorLabel");
|
|
8291
8278
|
},
|
|
8292
8279
|
type: "color"
|
|
8293
8280
|
}
|
|
8294
8281
|
],
|
|
8295
8282
|
get tab() {
|
|
8296
|
-
return
|
|
8283
|
+
return M("elements.tableElement.basicTab");
|
|
8297
8284
|
},
|
|
8298
8285
|
get title() {
|
|
8299
|
-
return
|
|
8286
|
+
return M("elements.tableElement.textStyleSection");
|
|
8300
8287
|
}
|
|
8301
8288
|
},
|
|
8302
8289
|
{
|
|
@@ -8306,21 +8293,21 @@ var xa = [
|
|
|
8306
8293
|
batchEditable: !0,
|
|
8307
8294
|
key: "padding",
|
|
8308
8295
|
get label() {
|
|
8309
|
-
return
|
|
8296
|
+
return M("elements.tableElement.cellPaddingLabel");
|
|
8310
8297
|
},
|
|
8311
8298
|
max: 10,
|
|
8312
8299
|
min: 0,
|
|
8313
8300
|
step: .5,
|
|
8314
8301
|
type: "number",
|
|
8315
8302
|
get unit() {
|
|
8316
|
-
return
|
|
8303
|
+
return M("elements.tableElement.distanceUnit");
|
|
8317
8304
|
}
|
|
8318
8305
|
}],
|
|
8319
8306
|
get tab() {
|
|
8320
|
-
return
|
|
8307
|
+
return M("elements.tableElement.basicTab");
|
|
8321
8308
|
},
|
|
8322
8309
|
get title() {
|
|
8323
|
-
return
|
|
8310
|
+
return M("elements.tableElement.cellStyleSection");
|
|
8324
8311
|
}
|
|
8325
8312
|
},
|
|
8326
8313
|
{
|
|
@@ -8329,23 +8316,23 @@ var xa = [
|
|
|
8329
8316
|
advanced: !0,
|
|
8330
8317
|
key: "stripe",
|
|
8331
8318
|
get label() {
|
|
8332
|
-
return
|
|
8319
|
+
return M("elements.tableElement.stripedLabel");
|
|
8333
8320
|
},
|
|
8334
8321
|
type: "boolean"
|
|
8335
8322
|
}, {
|
|
8336
8323
|
advanced: !0,
|
|
8337
8324
|
key: "stripeColor",
|
|
8338
8325
|
get label() {
|
|
8339
|
-
return
|
|
8326
|
+
return M("elements.tableElement.stripeColorLabel");
|
|
8340
8327
|
},
|
|
8341
8328
|
showIf: (e) => e.stripe === !0,
|
|
8342
8329
|
type: "color"
|
|
8343
8330
|
}],
|
|
8344
8331
|
get tab() {
|
|
8345
|
-
return
|
|
8332
|
+
return M("elements.tableElement.dataTab");
|
|
8346
8333
|
},
|
|
8347
8334
|
get title() {
|
|
8348
|
-
return
|
|
8335
|
+
return M("elements.tableElement.stripedLabel");
|
|
8349
8336
|
}
|
|
8350
8337
|
},
|
|
8351
8338
|
{
|
|
@@ -8353,27 +8340,27 @@ var xa = [
|
|
|
8353
8340
|
fields: [
|
|
8354
8341
|
{
|
|
8355
8342
|
get help() {
|
|
8356
|
-
return
|
|
8343
|
+
return M("elements.tableElement.crossPageHelp");
|
|
8357
8344
|
},
|
|
8358
8345
|
key: "pagination.crossPage",
|
|
8359
8346
|
get label() {
|
|
8360
|
-
return
|
|
8347
|
+
return M("elements.tableElement.crossPageLabel");
|
|
8361
8348
|
},
|
|
8362
8349
|
type: "boolean"
|
|
8363
8350
|
},
|
|
8364
8351
|
{
|
|
8365
8352
|
key: "pagination.positionMode",
|
|
8366
8353
|
get label() {
|
|
8367
|
-
return
|
|
8354
|
+
return M("elements.tableElement.positionModeLabel");
|
|
8368
8355
|
},
|
|
8369
8356
|
options: [{
|
|
8370
8357
|
get label() {
|
|
8371
|
-
return
|
|
8358
|
+
return M("elements.tableElement.positionFixedOption");
|
|
8372
8359
|
},
|
|
8373
8360
|
value: "fixed"
|
|
8374
8361
|
}, {
|
|
8375
8362
|
get label() {
|
|
8376
|
-
return
|
|
8363
|
+
return M("elements.tableElement.positionFlowOption");
|
|
8377
8364
|
},
|
|
8378
8365
|
value: "flow"
|
|
8379
8366
|
}],
|
|
@@ -8382,11 +8369,11 @@ var xa = [
|
|
|
8382
8369
|
},
|
|
8383
8370
|
{
|
|
8384
8371
|
get help() {
|
|
8385
|
-
return
|
|
8372
|
+
return M("elements.tableElement.fixedRowsHelp");
|
|
8386
8373
|
},
|
|
8387
8374
|
key: "pagination.fixedRows",
|
|
8388
8375
|
get label() {
|
|
8389
|
-
return
|
|
8376
|
+
return M("elements.tableElement.fixedRowsLabel");
|
|
8390
8377
|
},
|
|
8391
8378
|
showIf: (e) => e.heightMode === "auto" && Q(e).crossPage,
|
|
8392
8379
|
type: "boolean",
|
|
@@ -8410,11 +8397,11 @@ var xa = [
|
|
|
8410
8397
|
{
|
|
8411
8398
|
disabledIf: (e) => !Q(e).fixedRows,
|
|
8412
8399
|
get help() {
|
|
8413
|
-
return
|
|
8400
|
+
return M("elements.tableElement.rowsPerPageHint");
|
|
8414
8401
|
},
|
|
8415
8402
|
key: "pagination.rowsPerPage",
|
|
8416
8403
|
get label() {
|
|
8417
|
-
return
|
|
8404
|
+
return M("elements.tableElement.rowsPerPageLabel");
|
|
8418
8405
|
},
|
|
8419
8406
|
max: 500,
|
|
8420
8407
|
min: 1,
|
|
@@ -8439,21 +8426,21 @@ var xa = [
|
|
|
8439
8426
|
},
|
|
8440
8427
|
{
|
|
8441
8428
|
get help() {
|
|
8442
|
-
return
|
|
8429
|
+
return M("elements.tableElement.fillEmptyRowsHelp");
|
|
8443
8430
|
},
|
|
8444
8431
|
key: "pagination.fillEmptyRows",
|
|
8445
8432
|
get label() {
|
|
8446
|
-
return
|
|
8433
|
+
return M("elements.tableElement.fillEmptyRowsLabel");
|
|
8447
8434
|
},
|
|
8448
8435
|
showIf: (e) => e.heightMode === "auto" && Q(e).crossPage && Q(e).fixedRows === !0,
|
|
8449
8436
|
type: "boolean"
|
|
8450
8437
|
}
|
|
8451
8438
|
],
|
|
8452
8439
|
get tab() {
|
|
8453
|
-
return
|
|
8440
|
+
return M("elements.tableElement.printTab");
|
|
8454
8441
|
},
|
|
8455
8442
|
get title() {
|
|
8456
|
-
return
|
|
8443
|
+
return M("elements.tableElement.printTab");
|
|
8457
8444
|
}
|
|
8458
8445
|
},
|
|
8459
8446
|
{
|
|
@@ -8461,7 +8448,7 @@ var xa = [
|
|
|
8461
8448
|
fields: [{
|
|
8462
8449
|
key: "summary.enabled",
|
|
8463
8450
|
get label() {
|
|
8464
|
-
return
|
|
8451
|
+
return M("elements.tableElement.summaryEnabledLabel");
|
|
8465
8452
|
},
|
|
8466
8453
|
type: "boolean"
|
|
8467
8454
|
}, {
|
|
@@ -8471,13 +8458,13 @@ var xa = [
|
|
|
8471
8458
|
showIf: (e) => $(e).enabled,
|
|
8472
8459
|
stacked: !0,
|
|
8473
8460
|
type: "table",
|
|
8474
|
-
value:
|
|
8461
|
+
value: ha
|
|
8475
8462
|
}],
|
|
8476
8463
|
get tab() {
|
|
8477
|
-
return
|
|
8464
|
+
return M("elements.tableElement.summaryTab");
|
|
8478
8465
|
},
|
|
8479
8466
|
get title() {
|
|
8480
|
-
return
|
|
8467
|
+
return M("elements.tableElement.summaryColumnsLabel");
|
|
8481
8468
|
}
|
|
8482
8469
|
},
|
|
8483
8470
|
{
|
|
@@ -8485,13 +8472,13 @@ var xa = [
|
|
|
8485
8472
|
fields: [{
|
|
8486
8473
|
key: "summary.position",
|
|
8487
8474
|
get label() {
|
|
8488
|
-
return
|
|
8475
|
+
return M("elements.tableElement.summaryPositionLabel");
|
|
8489
8476
|
},
|
|
8490
8477
|
options: [{
|
|
8491
|
-
label:
|
|
8478
|
+
label: M("elements.tableElement.summaryTopOption"),
|
|
8492
8479
|
value: "top"
|
|
8493
8480
|
}, {
|
|
8494
|
-
label:
|
|
8481
|
+
label: M("elements.tableElement.summaryBottomOption"),
|
|
8495
8482
|
value: "bottom"
|
|
8496
8483
|
}],
|
|
8497
8484
|
showIf: (e) => $(e).enabled,
|
|
@@ -8499,23 +8486,23 @@ var xa = [
|
|
|
8499
8486
|
}, {
|
|
8500
8487
|
key: "summary.scope",
|
|
8501
8488
|
get label() {
|
|
8502
|
-
return
|
|
8489
|
+
return M("elements.tableElement.summaryScopeLabel");
|
|
8503
8490
|
},
|
|
8504
8491
|
options: [{
|
|
8505
|
-
label:
|
|
8492
|
+
label: M("elements.tableElement.summaryScopeEachPageOption"),
|
|
8506
8493
|
value: "eachPage"
|
|
8507
8494
|
}, {
|
|
8508
|
-
label:
|
|
8495
|
+
label: M("elements.tableElement.summaryScopeLastPageOption"),
|
|
8509
8496
|
value: "lastPage"
|
|
8510
8497
|
}],
|
|
8511
8498
|
showIf: (e) => $(e).enabled,
|
|
8512
8499
|
type: "select"
|
|
8513
8500
|
}],
|
|
8514
8501
|
get tab() {
|
|
8515
|
-
return
|
|
8502
|
+
return M("elements.tableElement.summaryTab");
|
|
8516
8503
|
},
|
|
8517
8504
|
get title() {
|
|
8518
|
-
return
|
|
8505
|
+
return M("elements.tableElement.summaryLayoutSection");
|
|
8519
8506
|
}
|
|
8520
8507
|
},
|
|
8521
8508
|
{
|
|
@@ -8524,7 +8511,7 @@ var xa = [
|
|
|
8524
8511
|
{
|
|
8525
8512
|
key: "summary.style.fontFamily",
|
|
8526
8513
|
get label() {
|
|
8527
|
-
return
|
|
8514
|
+
return M("elements.tableElement.fontFamilyLabel");
|
|
8528
8515
|
},
|
|
8529
8516
|
options: Dt,
|
|
8530
8517
|
showIf: (e) => $(e).enabled,
|
|
@@ -8533,7 +8520,7 @@ var xa = [
|
|
|
8533
8520
|
{
|
|
8534
8521
|
key: "summary.style.fontSize",
|
|
8535
8522
|
get label() {
|
|
8536
|
-
return
|
|
8523
|
+
return M("elements.tableElement.fontSizeLabel");
|
|
8537
8524
|
},
|
|
8538
8525
|
max: 60,
|
|
8539
8526
|
min: 4,
|
|
@@ -8544,10 +8531,10 @@ var xa = [
|
|
|
8544
8531
|
{
|
|
8545
8532
|
key: "summary.style.align",
|
|
8546
8533
|
get label() {
|
|
8547
|
-
return
|
|
8534
|
+
return M("elements.tableElement.headerAlignLabel");
|
|
8548
8535
|
},
|
|
8549
8536
|
get options() {
|
|
8550
|
-
return
|
|
8537
|
+
return _a();
|
|
8551
8538
|
},
|
|
8552
8539
|
showIf: (e) => $(e).enabled,
|
|
8553
8540
|
type: "select"
|
|
@@ -8555,10 +8542,10 @@ var xa = [
|
|
|
8555
8542
|
{
|
|
8556
8543
|
key: "summary.style.vAlign",
|
|
8557
8544
|
get label() {
|
|
8558
|
-
return
|
|
8545
|
+
return M("elements.tableElement.headerVAlignLabel");
|
|
8559
8546
|
},
|
|
8560
8547
|
get options() {
|
|
8561
|
-
return
|
|
8548
|
+
return va();
|
|
8562
8549
|
},
|
|
8563
8550
|
showIf: (e) => $(e).enabled,
|
|
8564
8551
|
type: "select"
|
|
@@ -8566,7 +8553,7 @@ var xa = [
|
|
|
8566
8553
|
{
|
|
8567
8554
|
key: "summary.style.paddingMm",
|
|
8568
8555
|
get label() {
|
|
8569
|
-
return
|
|
8556
|
+
return M("elements.tableElement.headerPaddingLabel");
|
|
8570
8557
|
},
|
|
8571
8558
|
max: 10,
|
|
8572
8559
|
min: 0,
|
|
@@ -8577,7 +8564,7 @@ var xa = [
|
|
|
8577
8564
|
{
|
|
8578
8565
|
key: "summary.style.wrap",
|
|
8579
8566
|
get label() {
|
|
8580
|
-
return
|
|
8567
|
+
return M("elements.tableElement.headerWrapLabel");
|
|
8581
8568
|
},
|
|
8582
8569
|
showIf: (e) => $(e).enabled,
|
|
8583
8570
|
type: "boolean"
|
|
@@ -8585,7 +8572,7 @@ var xa = [
|
|
|
8585
8572
|
{
|
|
8586
8573
|
key: "summary.style.bold",
|
|
8587
8574
|
get label() {
|
|
8588
|
-
return
|
|
8575
|
+
return M("elements.tableElement.summaryBoldLabel");
|
|
8589
8576
|
},
|
|
8590
8577
|
showIf: (e) => $(e).enabled,
|
|
8591
8578
|
type: "boolean"
|
|
@@ -8593,7 +8580,7 @@ var xa = [
|
|
|
8593
8580
|
{
|
|
8594
8581
|
key: "summary.style.color",
|
|
8595
8582
|
get label() {
|
|
8596
|
-
return
|
|
8583
|
+
return M("elements.tableElement.summaryColorLabel");
|
|
8597
8584
|
},
|
|
8598
8585
|
showIf: (e) => $(e).enabled,
|
|
8599
8586
|
type: "color"
|
|
@@ -8601,17 +8588,17 @@ var xa = [
|
|
|
8601
8588
|
{
|
|
8602
8589
|
key: "summary.style.background",
|
|
8603
8590
|
get label() {
|
|
8604
|
-
return
|
|
8591
|
+
return M("elements.tableElement.summaryBackgroundLabel");
|
|
8605
8592
|
},
|
|
8606
8593
|
showIf: (e) => $(e).enabled,
|
|
8607
8594
|
type: "color"
|
|
8608
8595
|
}
|
|
8609
8596
|
],
|
|
8610
8597
|
get tab() {
|
|
8611
|
-
return
|
|
8598
|
+
return M("elements.tableElement.summaryTab");
|
|
8612
8599
|
},
|
|
8613
8600
|
get title() {
|
|
8614
|
-
return
|
|
8601
|
+
return M("elements.tableElement.summaryStyleSection");
|
|
8615
8602
|
}
|
|
8616
8603
|
},
|
|
8617
8604
|
{
|
|
@@ -8625,14 +8612,14 @@ var xa = [
|
|
|
8625
8612
|
type: "tableBorders"
|
|
8626
8613
|
}],
|
|
8627
8614
|
get tab() {
|
|
8628
|
-
return
|
|
8615
|
+
return M("elements.tableElement.summaryTab");
|
|
8629
8616
|
},
|
|
8630
8617
|
get title() {
|
|
8631
|
-
return
|
|
8618
|
+
return M("elements.tableElement.summaryBordersSection");
|
|
8632
8619
|
}
|
|
8633
8620
|
}
|
|
8634
8621
|
];
|
|
8635
|
-
function
|
|
8622
|
+
function xa(e) {
|
|
8636
8623
|
return {
|
|
8637
8624
|
...e,
|
|
8638
8625
|
binding: void 0,
|
|
@@ -8647,14 +8634,14 @@ function Sa(e) {
|
|
|
8647
8634
|
} }, i = r.props ?? t.props;
|
|
8648
8635
|
return {
|
|
8649
8636
|
...r,
|
|
8650
|
-
props:
|
|
8637
|
+
props: Fi(t.props, e.key, i)
|
|
8651
8638
|
};
|
|
8652
8639
|
}
|
|
8653
8640
|
}
|
|
8654
8641
|
};
|
|
8655
8642
|
}
|
|
8656
8643
|
function Z(e) {
|
|
8657
|
-
return
|
|
8644
|
+
return G(e);
|
|
8658
8645
|
}
|
|
8659
8646
|
function Q(e) {
|
|
8660
8647
|
return Z(e).pagination;
|
|
@@ -8662,25 +8649,25 @@ function Q(e) {
|
|
|
8662
8649
|
function $(e) {
|
|
8663
8650
|
return Z(e).summary;
|
|
8664
8651
|
}
|
|
8665
|
-
var
|
|
8652
|
+
var Sa = g({
|
|
8666
8653
|
canResetAutoSize: (e) => e.props.heightMode === "auto",
|
|
8667
|
-
createProps: () =>
|
|
8654
|
+
createProps: () => G({
|
|
8668
8655
|
background: "#ffffff",
|
|
8669
8656
|
color: "#222222",
|
|
8670
8657
|
columns: [
|
|
8671
8658
|
{
|
|
8672
8659
|
align: "left",
|
|
8673
|
-
title:
|
|
8660
|
+
title: M("elements.tableElement.defaultNameColumn"),
|
|
8674
8661
|
width: 2
|
|
8675
8662
|
},
|
|
8676
8663
|
{
|
|
8677
8664
|
align: "center",
|
|
8678
|
-
title:
|
|
8665
|
+
title: M("elements.tableElement.defaultQuantityColumn"),
|
|
8679
8666
|
width: 1
|
|
8680
8667
|
},
|
|
8681
8668
|
{
|
|
8682
8669
|
align: "left",
|
|
8683
|
-
title:
|
|
8670
|
+
title: M("elements.tableElement.defaultNotesColumn"),
|
|
8684
8671
|
width: 1.5
|
|
8685
8672
|
}
|
|
8686
8673
|
],
|
|
@@ -8695,11 +8682,11 @@ var Ca = g({
|
|
|
8695
8682
|
nullText: "",
|
|
8696
8683
|
padding: 1.5,
|
|
8697
8684
|
rows: [[
|
|
8698
|
-
|
|
8685
|
+
M("elements.tableElement.sampleFirstRow"),
|
|
8699
8686
|
"2",
|
|
8700
8687
|
""
|
|
8701
8688
|
], [
|
|
8702
|
-
|
|
8689
|
+
M("elements.tableElement.sampleSecondRow"),
|
|
8703
8690
|
"1",
|
|
8704
8691
|
""
|
|
8705
8692
|
]],
|
|
@@ -8711,7 +8698,7 @@ var Ca = g({
|
|
|
8711
8698
|
width: 120
|
|
8712
8699
|
},
|
|
8713
8700
|
getMinSize({ node: e, props: t }) {
|
|
8714
|
-
let n =
|
|
8701
|
+
let n = da(Z(t)), r = X(n, {
|
|
8715
8702
|
elementHeightMm: e.height,
|
|
8716
8703
|
elementWidthMm: e.width
|
|
8717
8704
|
});
|
|
@@ -8743,14 +8730,14 @@ var Ca = g({
|
|
|
8743
8730
|
"basicTab",
|
|
8744
8731
|
"summaryTab",
|
|
8745
8732
|
"printTab"
|
|
8746
|
-
].map((e) =>
|
|
8747
|
-
return [...
|
|
8733
|
+
].map((e) => M(`elements.tableElement.${e}`));
|
|
8734
|
+
return [...ba].sort((t, n) => e.indexOf(t.tab ?? "") - e.indexOf(n.tab ?? ""));
|
|
8748
8735
|
},
|
|
8749
8736
|
get label() {
|
|
8750
|
-
return
|
|
8737
|
+
return M("elements.tableElement.tableSection");
|
|
8751
8738
|
},
|
|
8752
8739
|
measureSize({ mode: e, node: t, props: n }) {
|
|
8753
|
-
let r = e === "design" || e === "preview", i = r ?
|
|
8740
|
+
let r = e === "design" || e === "preview", i = r ? da(Z(n)) : Z(n);
|
|
8754
8741
|
if (!r && i.heightMode !== "auto") return {};
|
|
8755
8742
|
let a = X(i, {
|
|
8756
8743
|
elementHeightMm: t.height,
|
|
@@ -8758,9 +8745,9 @@ var Ca = g({
|
|
|
8758
8745
|
});
|
|
8759
8746
|
return { height: r ? Math.max(t.height, a.heightMm) : a.heightMm };
|
|
8760
8747
|
},
|
|
8761
|
-
normalizeProps: (e) =>
|
|
8748
|
+
normalizeProps: (e) => G(e),
|
|
8762
8749
|
order: 80,
|
|
8763
|
-
overflow:
|
|
8750
|
+
overflow: aa,
|
|
8764
8751
|
pageExtensions: {
|
|
8765
8752
|
rebind(e, t, n, r) {
|
|
8766
8753
|
e.props.overflow = {
|
|
@@ -8769,7 +8756,7 @@ var Ca = g({
|
|
|
8769
8756
|
templateId: n
|
|
8770
8757
|
};
|
|
8771
8758
|
},
|
|
8772
|
-
reconcile:
|
|
8759
|
+
reconcile: Li,
|
|
8773
8760
|
references(e) {
|
|
8774
8761
|
let t = Z(e.props).overflow;
|
|
8775
8762
|
return t.templateId ? [{
|
|
@@ -8778,13 +8765,13 @@ var Ca = g({
|
|
|
8778
8765
|
templateId: t.templateId
|
|
8779
8766
|
}] : [];
|
|
8780
8767
|
},
|
|
8781
|
-
resolveTarget:
|
|
8768
|
+
resolveTarget: Ii,
|
|
8782
8769
|
targetInspectorFields: () => [
|
|
8783
|
-
...
|
|
8784
|
-
|
|
8770
|
+
...ba.flatMap((e) => e.fields).filter((e) => e.key !== "headerVisible" && Pi.has(e.key)).map(xa),
|
|
8771
|
+
xa({
|
|
8785
8772
|
key: "headerVisible",
|
|
8786
8773
|
get label() {
|
|
8787
|
-
return
|
|
8774
|
+
return M("elements.tableElement.showHeaderLabel");
|
|
8788
8775
|
},
|
|
8789
8776
|
type: "boolean"
|
|
8790
8777
|
}),
|
|
@@ -8792,31 +8779,31 @@ var Ca = g({
|
|
|
8792
8779
|
controlProps: { tableMode: "layout" },
|
|
8793
8780
|
key: "columns",
|
|
8794
8781
|
get label() {
|
|
8795
|
-
return
|
|
8782
|
+
return M("elements.tableElement.columnsLabel");
|
|
8796
8783
|
},
|
|
8797
8784
|
stacked: !0,
|
|
8798
8785
|
type: "table",
|
|
8799
|
-
value:
|
|
8786
|
+
value: ma
|
|
8800
8787
|
}
|
|
8801
8788
|
]
|
|
8802
8789
|
},
|
|
8803
8790
|
paginate({ getPage: e, node: t, page: n, props: r }) {
|
|
8804
|
-
let i = Z(r), a = (r) => r === 0 || i.pagination.positionMode !== "flow" ? t.y :
|
|
8805
|
-
let r =
|
|
8791
|
+
let i = Z(r), a = (r) => r === 0 || i.pagination.positionMode !== "flow" ? t.y : A(e?.(r) ?? n).y, o = i.boxHeightMm ?? t.height, s = (t) => {
|
|
8792
|
+
let r = A(e?.(t) ?? n), i = r.y + r.height - a(t);
|
|
8806
8793
|
return Math.max(0, Math.min(o, i));
|
|
8807
|
-
}, c =
|
|
8794
|
+
}, c = ra(i, s(0), s(1), s, t.width);
|
|
8808
8795
|
if (!c || c.length === 0) return null;
|
|
8809
|
-
let l = Array.isArray(i.rows) ? i.rows : [], u =
|
|
8796
|
+
let l = Array.isArray(i.rows) ? i.rows : [], u = Ui(i);
|
|
8810
8797
|
return c.map((e, t) => {
|
|
8811
8798
|
let n = e.rows.map((e) => [...e]);
|
|
8812
8799
|
for (let t of u) t.row < e.startRow && t.row + t.rowspan > e.startRow && n.length > 0 && (n[0][t.col] = l[t.row]?.[t.col] ?? "");
|
|
8813
|
-
let r = e.showSummary ?
|
|
8800
|
+
let r = e.showSummary ? Zi(i, i.summary.scope === "eachPage" ? e.rows : l) : void 0;
|
|
8814
8801
|
return {
|
|
8815
8802
|
height: e.heightMm,
|
|
8816
8803
|
props: {
|
|
8817
8804
|
...i,
|
|
8818
8805
|
headerVisible: e.showHeader,
|
|
8819
|
-
resolvedMerges:
|
|
8806
|
+
resolvedMerges: Wi(u, e.startRow, e.rows.length),
|
|
8820
8807
|
rowOffset: (i.rowOffset ?? 0) + e.startRow,
|
|
8821
8808
|
rows: n,
|
|
8822
8809
|
sourceRows: void 0,
|
|
@@ -8834,13 +8821,13 @@ var Ca = g({
|
|
|
8834
8821
|
...r,
|
|
8835
8822
|
boxHeightMm: r.boxHeightMm ?? t.height
|
|
8836
8823
|
}, a = t.bindings?.rows;
|
|
8837
|
-
if (!a) return n.add(
|
|
8824
|
+
if (!a) return n.add(M("elements.tableElement.rowsUnboundWarning")), { props: i };
|
|
8838
8825
|
let o = /* @__PURE__ */ new Set([
|
|
8839
8826
|
"mergeRules",
|
|
8840
8827
|
"rows",
|
|
8841
8828
|
"sourceRows"
|
|
8842
|
-
]), s =
|
|
8843
|
-
if (!Array.isArray(s)) return n.add(
|
|
8829
|
+
]), s = L(e, a);
|
|
8830
|
+
if (!Array.isArray(s)) return n.add(M("elements.tableElement.rowsBindingFailed", { bindingPath: a })), {
|
|
8844
8831
|
props: i,
|
|
8845
8832
|
skipKeys: o
|
|
8846
8833
|
};
|
|
@@ -8853,15 +8840,15 @@ var Ca = g({
|
|
|
8853
8840
|
return c.map((e) => {
|
|
8854
8841
|
let o = e.bind || nt(String(e.title ?? ""), t);
|
|
8855
8842
|
if (!o) return "";
|
|
8856
|
-
let s =
|
|
8857
|
-
return s === void 0 ? (n.add(
|
|
8843
|
+
let s = L(i, o);
|
|
8844
|
+
return s === void 0 ? (n.add(M("elements.tableElement.columnBindingFailed", {
|
|
8858
8845
|
bindingPath: a,
|
|
8859
8846
|
columnPath: o,
|
|
8860
8847
|
rowNumber: r + 1
|
|
8861
8848
|
})), "") : s == null ? "" : String(s);
|
|
8862
8849
|
});
|
|
8863
8850
|
});
|
|
8864
|
-
return i.heightMode !== "auto" && !Z(i).overflow.enabled && l.length > 0 && Mi(i, l.length) > t.height + .5 && n.add(
|
|
8851
|
+
return i.heightMode !== "auto" && !Z(i).overflow.enabled && l.length > 0 && Mi(i, l.length) > t.height + .5 && n.add(M("elements.tableElement.fixedHeightWarning")), {
|
|
8865
8852
|
props: {
|
|
8866
8853
|
...i,
|
|
8867
8854
|
rows: l,
|
|
@@ -8871,18 +8858,18 @@ var Ca = g({
|
|
|
8871
8858
|
};
|
|
8872
8859
|
},
|
|
8873
8860
|
resolvePreviewProps({ props: e }) {
|
|
8874
|
-
return { ...
|
|
8861
|
+
return { ...da(Z(e)) };
|
|
8875
8862
|
},
|
|
8876
8863
|
settingsDialog: { layout: "workspace" },
|
|
8877
8864
|
shortcut: "g",
|
|
8878
8865
|
toHtml(e) {
|
|
8879
|
-
return
|
|
8866
|
+
return fa(Z(e.props), {
|
|
8880
8867
|
elementHeightMm: e.node.height,
|
|
8881
8868
|
elementWidthMm: e.node.width
|
|
8882
8869
|
});
|
|
8883
8870
|
},
|
|
8884
8871
|
toPdf(e) {
|
|
8885
|
-
|
|
8872
|
+
ua(e, Z(e.props));
|
|
8886
8873
|
},
|
|
8887
8874
|
type: "table",
|
|
8888
8875
|
worker: {
|
|
@@ -8891,7 +8878,7 @@ var Ca = g({
|
|
|
8891
8878
|
}
|
|
8892
8879
|
});
|
|
8893
8880
|
// src/elements/shared/text-style.ts
|
|
8894
|
-
function
|
|
8881
|
+
function Ca(e, t = 96 / 25.4) {
|
|
8895
8882
|
let n = t / (96 / 25.4), r = "flex-start";
|
|
8896
8883
|
e.verticalAlign === "middle" ? r = "center" : e.verticalAlign === "bottom" && (r = "flex-end");
|
|
8897
8884
|
let i = {
|
|
@@ -8900,7 +8887,7 @@ function wa(e, t = 96 / 25.4) {
|
|
|
8900
8887
|
display: "flex",
|
|
8901
8888
|
flexDirection: "column",
|
|
8902
8889
|
fontFamily: `"${e.fontFamily}", sans-serif`,
|
|
8903
|
-
fontSize: `${
|
|
8890
|
+
fontSize: `${ne(e.fontSize) * n}px`,
|
|
8904
8891
|
fontWeight: String(e.fontWeight || "400"),
|
|
8905
8892
|
height: "100%",
|
|
8906
8893
|
justifyContent: r,
|
|
@@ -8911,16 +8898,16 @@ function wa(e, t = 96 / 25.4) {
|
|
|
8911
8898
|
width: "100%",
|
|
8912
8899
|
wordBreak: "break-word"
|
|
8913
8900
|
};
|
|
8914
|
-
return e.fontStyle === "italic" && (i.fontStyle = "italic"), e.letterSpacing && (i.letterSpacing = `${
|
|
8901
|
+
return e.fontStyle === "italic" && (i.fontStyle = "italic"), e.letterSpacing && (i.letterSpacing = `${ne(e.letterSpacing) * n}px`), e.textDecoration !== "none" && (i.textDecoration = e.textDecoration), e.padding > 0 && (i.padding = `${e.padding * t}px`), P(e.background) || (i.background = e.background), i;
|
|
8915
8902
|
}
|
|
8916
|
-
function
|
|
8917
|
-
let i =
|
|
8903
|
+
function wa(e, t, n, r = 96 / 25.4) {
|
|
8904
|
+
let i = Ca(t, r), a = document.createElement("div");
|
|
8918
8905
|
for (let [e, t] of Object.entries(i)) a.style[e] = t;
|
|
8919
8906
|
a.style.position = "fixed", a.style.left = "-99999px", a.style.top = "0", a.style.visibility = "hidden", a.style.width = `${n}mm`, a.style.height = "auto", a.textContent = e, document.body.appendChild(a);
|
|
8920
8907
|
let o = a.offsetHeight;
|
|
8921
8908
|
return a.remove(), o / r;
|
|
8922
8909
|
}
|
|
8923
|
-
var
|
|
8910
|
+
var Ta = g({
|
|
8924
8911
|
createProps: () => ({
|
|
8925
8912
|
autoHeight: !1,
|
|
8926
8913
|
background: "transparent",
|
|
@@ -8932,7 +8919,7 @@ var Ea = g({
|
|
|
8932
8919
|
letterSpacing: 0,
|
|
8933
8920
|
lineHeight: 1.4,
|
|
8934
8921
|
padding: 0,
|
|
8935
|
-
text:
|
|
8922
|
+
text: M("elements.textElement.defaultContent"),
|
|
8936
8923
|
textAlign: "left",
|
|
8937
8924
|
textDecoration: "none",
|
|
8938
8925
|
verticalAlign: "top"
|
|
@@ -8955,7 +8942,7 @@ var Ea = g({
|
|
|
8955
8942
|
return typeof e.props.text == "string" ? e.props.text : "";
|
|
8956
8943
|
},
|
|
8957
8944
|
style(e, t) {
|
|
8958
|
-
return
|
|
8945
|
+
return Ca(e.props, t);
|
|
8959
8946
|
},
|
|
8960
8947
|
variableText: !0,
|
|
8961
8948
|
write(e, t) {
|
|
@@ -8964,7 +8951,7 @@ var Ea = g({
|
|
|
8964
8951
|
text: t
|
|
8965
8952
|
};
|
|
8966
8953
|
return n.autoHeight ? {
|
|
8967
|
-
height: Math.max(1,
|
|
8954
|
+
height: Math.max(1, wa(t, n, e.width)),
|
|
8968
8955
|
props: {
|
|
8969
8956
|
...e.props,
|
|
8970
8957
|
text: t
|
|
@@ -8981,15 +8968,15 @@ var Ea = g({
|
|
|
8981
8968
|
binding: { appendable: !0 },
|
|
8982
8969
|
key: "text",
|
|
8983
8970
|
get label() {
|
|
8984
|
-
return
|
|
8971
|
+
return M("elements.textElement.contentLabel");
|
|
8985
8972
|
},
|
|
8986
8973
|
get placeholder() {
|
|
8987
|
-
return
|
|
8974
|
+
return M("elements.textElement.contentPlaceholder");
|
|
8988
8975
|
},
|
|
8989
8976
|
type: "textarea"
|
|
8990
8977
|
}],
|
|
8991
8978
|
get title() {
|
|
8992
|
-
return
|
|
8979
|
+
return M("elements.textElement.textSection");
|
|
8993
8980
|
}
|
|
8994
8981
|
},
|
|
8995
8982
|
{
|
|
@@ -8998,7 +8985,7 @@ var Ea = g({
|
|
|
8998
8985
|
batchEditable: !0,
|
|
8999
8986
|
key: "fontFamily",
|
|
9000
8987
|
get label() {
|
|
9001
|
-
return
|
|
8988
|
+
return M("elements.textElement.fontFamilyLabel");
|
|
9002
8989
|
},
|
|
9003
8990
|
options: Dt,
|
|
9004
8991
|
type: "select"
|
|
@@ -9007,56 +8994,56 @@ var Ea = g({
|
|
|
9007
8994
|
batchEditable: !0,
|
|
9008
8995
|
key: "fontSize",
|
|
9009
8996
|
get label() {
|
|
9010
|
-
return
|
|
8997
|
+
return M("elements.textElement.fontSizeLabel");
|
|
9011
8998
|
},
|
|
9012
8999
|
max: 300,
|
|
9013
9000
|
min: 4,
|
|
9014
9001
|
step: .5,
|
|
9015
9002
|
type: "number",
|
|
9016
9003
|
get unit() {
|
|
9017
|
-
return
|
|
9004
|
+
return M("elements.textElement.fontSizeUnit");
|
|
9018
9005
|
}
|
|
9019
9006
|
},
|
|
9020
9007
|
{
|
|
9021
9008
|
batchEditable: !0,
|
|
9022
9009
|
key: "fontWeight",
|
|
9023
9010
|
get label() {
|
|
9024
|
-
return
|
|
9011
|
+
return M("elements.textElement.fontWeightLabel");
|
|
9025
9012
|
},
|
|
9026
9013
|
options: [
|
|
9027
9014
|
{
|
|
9028
9015
|
get label() {
|
|
9029
|
-
return
|
|
9016
|
+
return M("elements.textElement.lightWeightOption");
|
|
9030
9017
|
},
|
|
9031
9018
|
value: "300"
|
|
9032
9019
|
},
|
|
9033
9020
|
{
|
|
9034
9021
|
get label() {
|
|
9035
|
-
return
|
|
9022
|
+
return M("elements.textElement.normalWeightOption");
|
|
9036
9023
|
},
|
|
9037
9024
|
value: "400"
|
|
9038
9025
|
},
|
|
9039
9026
|
{
|
|
9040
9027
|
get label() {
|
|
9041
|
-
return
|
|
9028
|
+
return M("elements.textElement.mediumWeightOption");
|
|
9042
9029
|
},
|
|
9043
9030
|
value: "500"
|
|
9044
9031
|
},
|
|
9045
9032
|
{
|
|
9046
9033
|
get label() {
|
|
9047
|
-
return
|
|
9034
|
+
return M("elements.textElement.semiboldWeightOption");
|
|
9048
9035
|
},
|
|
9049
9036
|
value: "600"
|
|
9050
9037
|
},
|
|
9051
9038
|
{
|
|
9052
9039
|
get label() {
|
|
9053
|
-
return
|
|
9040
|
+
return M("elements.textElement.boldWeightOption");
|
|
9054
9041
|
},
|
|
9055
9042
|
value: "700"
|
|
9056
9043
|
},
|
|
9057
9044
|
{
|
|
9058
9045
|
get label() {
|
|
9059
|
-
return
|
|
9046
|
+
return M("elements.textElement.blackWeightOption");
|
|
9060
9047
|
},
|
|
9061
9048
|
value: "900"
|
|
9062
9049
|
}
|
|
@@ -9067,16 +9054,16 @@ var Ea = g({
|
|
|
9067
9054
|
batchEditable: !0,
|
|
9068
9055
|
key: "fontStyle",
|
|
9069
9056
|
get label() {
|
|
9070
|
-
return
|
|
9057
|
+
return M("elements.textElement.italicLabel");
|
|
9071
9058
|
},
|
|
9072
9059
|
options: [{
|
|
9073
9060
|
get label() {
|
|
9074
|
-
return
|
|
9061
|
+
return M("elements.textElement.normalStyleOption");
|
|
9075
9062
|
},
|
|
9076
9063
|
value: "normal"
|
|
9077
9064
|
}, {
|
|
9078
9065
|
get label() {
|
|
9079
|
-
return
|
|
9066
|
+
return M("elements.textElement.italicLabel");
|
|
9080
9067
|
},
|
|
9081
9068
|
value: "italic"
|
|
9082
9069
|
}],
|
|
@@ -9087,14 +9074,14 @@ var Ea = g({
|
|
|
9087
9074
|
batchEditable: !0,
|
|
9088
9075
|
key: "letterSpacing",
|
|
9089
9076
|
get label() {
|
|
9090
|
-
return
|
|
9077
|
+
return M("elements.textElement.letterSpacingLabel");
|
|
9091
9078
|
},
|
|
9092
9079
|
max: 50,
|
|
9093
9080
|
min: -10,
|
|
9094
9081
|
step: .5,
|
|
9095
9082
|
type: "number",
|
|
9096
9083
|
get unit() {
|
|
9097
|
-
return
|
|
9084
|
+
return M("elements.textElement.fontSizeUnit");
|
|
9098
9085
|
}
|
|
9099
9086
|
},
|
|
9100
9087
|
{
|
|
@@ -9102,7 +9089,7 @@ var Ea = g({
|
|
|
9102
9089
|
batchEditable: !0,
|
|
9103
9090
|
key: "lineHeight",
|
|
9104
9091
|
get label() {
|
|
9105
|
-
return
|
|
9092
|
+
return M("elements.textElement.lineHeightLabel");
|
|
9106
9093
|
},
|
|
9107
9094
|
max: 4,
|
|
9108
9095
|
min: .8,
|
|
@@ -9111,7 +9098,7 @@ var Ea = g({
|
|
|
9111
9098
|
}
|
|
9112
9099
|
],
|
|
9113
9100
|
get title() {
|
|
9114
|
-
return
|
|
9101
|
+
return M("elements.textElement.fontFamilyLabel");
|
|
9115
9102
|
}
|
|
9116
9103
|
},
|
|
9117
9104
|
{
|
|
@@ -9120,30 +9107,30 @@ var Ea = g({
|
|
|
9120
9107
|
batchEditable: !0,
|
|
9121
9108
|
key: "textAlign",
|
|
9122
9109
|
get label() {
|
|
9123
|
-
return
|
|
9110
|
+
return M("elements.textElement.horizontalAlignLabel");
|
|
9124
9111
|
},
|
|
9125
9112
|
options: [
|
|
9126
9113
|
{
|
|
9127
9114
|
get label() {
|
|
9128
|
-
return
|
|
9115
|
+
return M("elements.textElement.leftAlignOption");
|
|
9129
9116
|
},
|
|
9130
9117
|
value: "left"
|
|
9131
9118
|
},
|
|
9132
9119
|
{
|
|
9133
9120
|
get label() {
|
|
9134
|
-
return
|
|
9121
|
+
return M("elements.textElement.centerAlignOption");
|
|
9135
9122
|
},
|
|
9136
9123
|
value: "center"
|
|
9137
9124
|
},
|
|
9138
9125
|
{
|
|
9139
9126
|
get label() {
|
|
9140
|
-
return
|
|
9127
|
+
return M("elements.textElement.rightAlignOption");
|
|
9141
9128
|
},
|
|
9142
9129
|
value: "right"
|
|
9143
9130
|
},
|
|
9144
9131
|
{
|
|
9145
9132
|
get label() {
|
|
9146
|
-
return
|
|
9133
|
+
return M("elements.textElement.justifyAlignOption");
|
|
9147
9134
|
},
|
|
9148
9135
|
value: "justify"
|
|
9149
9136
|
}
|
|
@@ -9154,24 +9141,24 @@ var Ea = g({
|
|
|
9154
9141
|
batchEditable: !0,
|
|
9155
9142
|
key: "verticalAlign",
|
|
9156
9143
|
get label() {
|
|
9157
|
-
return
|
|
9144
|
+
return M("elements.textElement.verticalAlignLabel");
|
|
9158
9145
|
},
|
|
9159
9146
|
options: [
|
|
9160
9147
|
{
|
|
9161
9148
|
get label() {
|
|
9162
|
-
return
|
|
9149
|
+
return M("elements.textElement.topAlignOption");
|
|
9163
9150
|
},
|
|
9164
9151
|
value: "top"
|
|
9165
9152
|
},
|
|
9166
9153
|
{
|
|
9167
9154
|
get label() {
|
|
9168
|
-
return
|
|
9155
|
+
return M("elements.textElement.centerAlignOption");
|
|
9169
9156
|
},
|
|
9170
9157
|
value: "middle"
|
|
9171
9158
|
},
|
|
9172
9159
|
{
|
|
9173
9160
|
get label() {
|
|
9174
|
-
return
|
|
9161
|
+
return M("elements.textElement.bottomAlignOption");
|
|
9175
9162
|
},
|
|
9176
9163
|
value: "bottom"
|
|
9177
9164
|
}
|
|
@@ -9182,18 +9169,18 @@ var Ea = g({
|
|
|
9182
9169
|
batchEditable: !0,
|
|
9183
9170
|
key: "color",
|
|
9184
9171
|
get label() {
|
|
9185
|
-
return
|
|
9172
|
+
return M("elements.textElement.textColorLabel");
|
|
9186
9173
|
},
|
|
9187
9174
|
type: "color"
|
|
9188
9175
|
},
|
|
9189
9176
|
{
|
|
9190
9177
|
batchEditable: !0,
|
|
9191
9178
|
get help() {
|
|
9192
|
-
return
|
|
9179
|
+
return M("elements.textElement.transparentBackgroundHint");
|
|
9193
9180
|
},
|
|
9194
9181
|
key: "background",
|
|
9195
9182
|
get label() {
|
|
9196
|
-
return
|
|
9183
|
+
return M("elements.textElement.backgroundColorLabel");
|
|
9197
9184
|
},
|
|
9198
9185
|
type: "color"
|
|
9199
9186
|
},
|
|
@@ -9202,24 +9189,24 @@ var Ea = g({
|
|
|
9202
9189
|
batchEditable: !0,
|
|
9203
9190
|
key: "textDecoration",
|
|
9204
9191
|
get label() {
|
|
9205
|
-
return
|
|
9192
|
+
return M("elements.textElement.decorationLabel");
|
|
9206
9193
|
},
|
|
9207
9194
|
options: [
|
|
9208
9195
|
{
|
|
9209
9196
|
get label() {
|
|
9210
|
-
return
|
|
9197
|
+
return M("elements.textElement.noDecorationOption");
|
|
9211
9198
|
},
|
|
9212
9199
|
value: "none"
|
|
9213
9200
|
},
|
|
9214
9201
|
{
|
|
9215
9202
|
get label() {
|
|
9216
|
-
return
|
|
9203
|
+
return M("elements.textElement.underlineOption");
|
|
9217
9204
|
},
|
|
9218
9205
|
value: "underline"
|
|
9219
9206
|
},
|
|
9220
9207
|
{
|
|
9221
9208
|
get label() {
|
|
9222
|
-
return
|
|
9209
|
+
return M("elements.textElement.strikethroughOption");
|
|
9223
9210
|
},
|
|
9224
9211
|
value: "line-through"
|
|
9225
9212
|
}
|
|
@@ -9228,7 +9215,7 @@ var Ea = g({
|
|
|
9228
9215
|
}
|
|
9229
9216
|
],
|
|
9230
9217
|
get title() {
|
|
9231
|
-
return
|
|
9218
|
+
return M("elements.textElement.alignmentAndColorSection");
|
|
9232
9219
|
}
|
|
9233
9220
|
},
|
|
9234
9221
|
{
|
|
@@ -9237,47 +9224,47 @@ var Ea = g({
|
|
|
9237
9224
|
batchEditable: !0,
|
|
9238
9225
|
key: "padding",
|
|
9239
9226
|
get label() {
|
|
9240
|
-
return
|
|
9227
|
+
return M("elements.textElement.paddingLabel");
|
|
9241
9228
|
},
|
|
9242
9229
|
max: 50,
|
|
9243
9230
|
min: 0,
|
|
9244
9231
|
step: .5,
|
|
9245
9232
|
type: "number",
|
|
9246
9233
|
get unit() {
|
|
9247
|
-
return
|
|
9234
|
+
return M("elements.textElement.distanceUnit");
|
|
9248
9235
|
}
|
|
9249
9236
|
}, {
|
|
9250
9237
|
get help() {
|
|
9251
|
-
return
|
|
9238
|
+
return M("elements.textElement.autoHeightHint");
|
|
9252
9239
|
},
|
|
9253
9240
|
key: "autoHeight",
|
|
9254
9241
|
get label() {
|
|
9255
|
-
return
|
|
9242
|
+
return M("elements.textElement.autoHeightLabel");
|
|
9256
9243
|
},
|
|
9257
9244
|
type: "boolean"
|
|
9258
9245
|
}],
|
|
9259
9246
|
get title() {
|
|
9260
|
-
return
|
|
9247
|
+
return M("elements.textElement.layoutSection");
|
|
9261
9248
|
}
|
|
9262
9249
|
}
|
|
9263
9250
|
],
|
|
9264
9251
|
get label() {
|
|
9265
|
-
return
|
|
9252
|
+
return M("elements.textElement.textSection");
|
|
9266
9253
|
},
|
|
9267
9254
|
measureSize({ node: e, props: t }) {
|
|
9268
9255
|
let n = t;
|
|
9269
|
-
return n.autoHeight ? { height: Math.max(1,
|
|
9256
|
+
return n.autoHeight ? { height: Math.max(1, wa(n.text ?? "", n, e.width)) } : {};
|
|
9270
9257
|
},
|
|
9271
9258
|
order: 10,
|
|
9272
9259
|
previewExpressionKeys: ["text"],
|
|
9273
9260
|
shortcut: "t",
|
|
9274
9261
|
toHtml(e) {
|
|
9275
9262
|
let t = e.props;
|
|
9276
|
-
return `<div style="${
|
|
9263
|
+
return `<div style="${F(Ca(t))}">${Ce(t.text ?? "")}</div>`;
|
|
9277
9264
|
},
|
|
9278
9265
|
toPdf(e) {
|
|
9279
9266
|
let t = e.props;
|
|
9280
|
-
|
|
9267
|
+
P(t.background) || e.draw.rect(e.node.x, e.node.y, e.node.width, e.node.height, { fill: t.background }), e.draw.text({
|
|
9281
9268
|
align: t.textAlign,
|
|
9282
9269
|
color: t.color,
|
|
9283
9270
|
fontFamily: t.fontFamily,
|
|
@@ -9301,24 +9288,24 @@ var Ea = g({
|
|
|
9301
9288
|
canExpand: (e) => !e.props.autoHeight,
|
|
9302
9289
|
html: !0
|
|
9303
9290
|
}
|
|
9304
|
-
}),
|
|
9305
|
-
|
|
9291
|
+
}), Ea = !1, Da = [
|
|
9292
|
+
Ta,
|
|
9306
9293
|
ci,
|
|
9307
9294
|
xr,
|
|
9308
9295
|
Or,
|
|
9309
9296
|
Sr,
|
|
9310
9297
|
hr,
|
|
9311
9298
|
oi,
|
|
9312
|
-
|
|
9299
|
+
Sa
|
|
9313
9300
|
];
|
|
9314
|
-
function
|
|
9315
|
-
if (!
|
|
9316
|
-
|
|
9317
|
-
for (let e of
|
|
9301
|
+
function Oa() {
|
|
9302
|
+
if (!Ea) {
|
|
9303
|
+
Ea = !0;
|
|
9304
|
+
for (let e of Da) o.register(e);
|
|
9318
9305
|
}
|
|
9319
9306
|
}
|
|
9320
9307
|
// src/parser/types.ts
|
|
9321
|
-
var
|
|
9308
|
+
var ka = class {
|
|
9322
9309
|
parsers = /* @__PURE__ */ new Map();
|
|
9323
9310
|
get(e, t = p) {
|
|
9324
9311
|
return this.parsers.get(e)?.get(t);
|
|
@@ -9330,7 +9317,7 @@ var Aa = class {
|
|
|
9330
9317
|
let t = i(e.version);
|
|
9331
9318
|
if (t !== "1.0.0" && !e.render) throw Error(`Parser version ${t} must provide a complete render implementation`);
|
|
9332
9319
|
let n = this.parsers.get(e.id) ?? /* @__PURE__ */ new Map();
|
|
9333
|
-
if (n.has(t)) throw Error(
|
|
9320
|
+
if (n.has(t)) throw Error(M("parser.types.duplicateParser", { parserId: e.id }));
|
|
9334
9321
|
n.set(t, e), this.parsers.set(e.id, n);
|
|
9335
9322
|
}
|
|
9336
9323
|
unregister(e, t = p) {
|
|
@@ -9339,11 +9326,11 @@ var Aa = class {
|
|
|
9339
9326
|
}
|
|
9340
9327
|
};
|
|
9341
9328
|
// src/parser/registry.ts
|
|
9342
|
-
|
|
9343
|
-
var
|
|
9344
|
-
|
|
9329
|
+
Oa();
|
|
9330
|
+
var Aa = new yt(), ja = new qt(), Ma = new ka();
|
|
9331
|
+
Ma.register(Aa), Ma.register(ja);
|
|
9345
9332
|
// src/parser/worker/worker-capabilities.ts
|
|
9346
|
-
var
|
|
9333
|
+
var Na = new Map(Da.map((e) => [e.type, {
|
|
9347
9334
|
canExpand: e.worker?.canExpand,
|
|
9348
9335
|
definition: e,
|
|
9349
9336
|
html: e.worker?.html,
|
|
@@ -9353,19 +9340,19 @@ var Pa = new Map(Oa.map((e) => [e.type, {
|
|
|
9353
9340
|
resolveBindings: e.resolveBindings,
|
|
9354
9341
|
toHtml: e.toHtml,
|
|
9355
9342
|
worker: e.worker
|
|
9356
|
-
}])),
|
|
9343
|
+
}])), Pa = st.map((e) => ({
|
|
9357
9344
|
definition: e,
|
|
9358
9345
|
resolve: e.resolve
|
|
9359
9346
|
}));
|
|
9360
|
-
function
|
|
9347
|
+
function Fa(e, t, n = o) {
|
|
9361
9348
|
let r = ot.list();
|
|
9362
|
-
if (r.length !==
|
|
9349
|
+
if (r.length !== Pa.length || Pa.some(({ definition: e, resolve: t }, n) => r[n] !== e || e.resolve !== t)) return {
|
|
9363
9350
|
expand: !1,
|
|
9364
9351
|
html: !1
|
|
9365
9352
|
};
|
|
9366
9353
|
let i = !0;
|
|
9367
9354
|
for (let r of b(e)) for (let e of r.elements) {
|
|
9368
|
-
let r = n.get(e.type), a =
|
|
9355
|
+
let r = n.get(e.type), a = Na.get(e.type);
|
|
9369
9356
|
if (!r || !a || r.measureSize !== a.measureSize || r.paginate !== a.paginate || r.overflow !== a.overflow || r.resolveBindings !== a.resolveBindings || r.toHtml !== a.toHtml || r.worker !== a.worker || !r.worker || r.worker.canExpand !== a.canExpand || r.worker.html !== a.html || t && !r.worker.canExpand(e)) return {
|
|
9370
9357
|
expand: !1,
|
|
9371
9358
|
html: !1
|
|
@@ -9378,15 +9365,15 @@ function Ia(e, t, n = o) {
|
|
|
9378
9365
|
};
|
|
9379
9366
|
}
|
|
9380
9367
|
// src/parser/worker/worker-protocol.ts
|
|
9381
|
-
function
|
|
9382
|
-
let t = e.kind === "domain" ? new
|
|
9368
|
+
function Ia(e) {
|
|
9369
|
+
let t = e.kind === "domain" ? new j(e.userMessage ?? e.message, {
|
|
9383
9370
|
code: e.code,
|
|
9384
9371
|
detail: e.message
|
|
9385
9372
|
}) : Error(e.message);
|
|
9386
9373
|
return e.stack && (t.stack = e.stack), t;
|
|
9387
9374
|
}
|
|
9388
9375
|
// src/parser/worker/worker-client.ts
|
|
9389
|
-
var
|
|
9376
|
+
var La = /* @__PURE__ */ e({ RenderWorkerClient: () => Ra }), Ra = class {
|
|
9390
9377
|
factory;
|
|
9391
9378
|
activeId;
|
|
9392
9379
|
nextId = 0;
|
|
@@ -9394,13 +9381,13 @@ var Ra = /* @__PURE__ */ e({ RenderWorkerClient: () => za }), za = class {
|
|
|
9394
9381
|
worker;
|
|
9395
9382
|
constructor(e = () => new Worker(new URL(
|
|
9396
9383
|
/* @vite-ignore */
|
|
9397
|
-
new URL("assets/render.worker-
|
|
9384
|
+
new URL("assets/render.worker-DkH7TepL.js", import.meta.url).href,
|
|
9398
9385
|
"" + import.meta.url
|
|
9399
9386
|
), { type: "module" })) {
|
|
9400
9387
|
this.factory = e;
|
|
9401
9388
|
}
|
|
9402
9389
|
dispose() {
|
|
9403
|
-
this.failAll(new M(
|
|
9390
|
+
this.failAll(new j(M("parser.worker.cancelled"), { code: "render.cancelled" }));
|
|
9404
9391
|
}
|
|
9405
9392
|
execute(e, t, n, r, i) {
|
|
9406
9393
|
return new Promise((a, o) => {
|
|
@@ -9435,7 +9422,7 @@ var Ra = /* @__PURE__ */ e({ RenderWorkerClient: () => za }), za = class {
|
|
|
9435
9422
|
async continueTask(e, t, n) {
|
|
9436
9423
|
try {
|
|
9437
9424
|
await n.execution?.waitIfPaused?.(), this.worker === e && this.pending.get(t.id) === n && (n.timer = setTimeout(() => {
|
|
9438
|
-
this.failAll(new M(
|
|
9425
|
+
this.failAll(new j(M("parser.worker.timeout"), { code: "render.worker-timeout" }));
|
|
9439
9426
|
}, n.timeoutMs), e.postMessage({
|
|
9440
9427
|
id: t.id,
|
|
9441
9428
|
resume: t.checkpoint
|
|
@@ -9450,7 +9437,7 @@ var Ra = /* @__PURE__ */ e({ RenderWorkerClient: () => za }), za = class {
|
|
|
9450
9437
|
if (e.done) return;
|
|
9451
9438
|
let [t, n] = e.value;
|
|
9452
9439
|
this.activeId = t, n.timer = setTimeout(() => {
|
|
9453
|
-
this.failAll(new M(
|
|
9440
|
+
this.failAll(new j(M("parser.worker.timeout"), { code: "render.worker-timeout" }));
|
|
9454
9441
|
}, n.timeoutMs);
|
|
9455
9442
|
try {
|
|
9456
9443
|
this.worker.postMessage(n.request);
|
|
@@ -9469,7 +9456,7 @@ var Ra = /* @__PURE__ */ e({ RenderWorkerClient: () => za }), za = class {
|
|
|
9469
9456
|
try {
|
|
9470
9457
|
e = this.factory();
|
|
9471
9458
|
} catch (e) {
|
|
9472
|
-
throw new M(
|
|
9459
|
+
throw new j(M("parser.worker.failed"), {
|
|
9473
9460
|
cause: e,
|
|
9474
9461
|
code: "render.worker-start-failed"
|
|
9475
9462
|
});
|
|
@@ -9477,23 +9464,23 @@ var Ra = /* @__PURE__ */ e({ RenderWorkerClient: () => za }), za = class {
|
|
|
9477
9464
|
return e.onmessage = (t) => {
|
|
9478
9465
|
if (this.worker !== e) return;
|
|
9479
9466
|
let n = t.data, r = this.pending.get(n.id);
|
|
9480
|
-
r && ("checkpoint" in n ? (clearTimeout(r.timer), n.progress && r.execution?.onProgress?.(n.progress), this.continueTask(e, n, r)) : (clearTimeout(r.timer), r.cleanup(), this.pending.delete(n.id), this.activeId = void 0, n.ok ? r.resolve(n.output) : r.reject(
|
|
9467
|
+
r && ("checkpoint" in n ? (clearTimeout(r.timer), n.progress && r.execution?.onProgress?.(n.progress), this.continueTask(e, n, r)) : (clearTimeout(r.timer), r.cleanup(), this.pending.delete(n.id), this.activeId = void 0, n.ok ? r.resolve(n.output) : r.reject(Ia(n.error)), this.dispatch()));
|
|
9481
9468
|
}, e.onerror = (t) => {
|
|
9482
|
-
this.worker === e && (t.preventDefault(), this.failAll(new M(
|
|
9469
|
+
this.worker === e && (t.preventDefault(), this.failAll(new j(M("parser.worker.failed"), {
|
|
9483
9470
|
code: "render.worker-failed",
|
|
9484
|
-
detail: t.message ||
|
|
9471
|
+
detail: t.message || M("parser.worker.failed")
|
|
9485
9472
|
})));
|
|
9486
9473
|
}, e.onmessageerror = () => {
|
|
9487
|
-
this.worker === e && this.failAll(new M(
|
|
9474
|
+
this.worker === e && this.failAll(new j(M("parser.worker.messageFailed"), { code: "render.worker-message-failed" }));
|
|
9488
9475
|
}, this.worker = e, e;
|
|
9489
9476
|
}
|
|
9490
9477
|
};
|
|
9491
9478
|
// src/parser/render-runtime.ts
|
|
9492
|
-
function
|
|
9493
|
-
return t === (e === "html" ?
|
|
9479
|
+
function za(e, t) {
|
|
9480
|
+
return t === (e === "html" ? Aa : ja) || e === "html" && t instanceof yt && t.parse === yt.prototype.parse || e === "pdf" && t instanceof qt && t.parse === qt.prototype.parse;
|
|
9494
9481
|
}
|
|
9495
|
-
function
|
|
9496
|
-
let t = e.elements ?? o, n = e.parsers ??
|
|
9482
|
+
function Ba(e = {}) {
|
|
9483
|
+
let t = e.elements ?? o, n = e.parsers ?? Ma, r = new Ra(e.createWorker), a = e.snapshot ?? structuredClone, s = /* @__PURE__ */ new Set(), c = 0;
|
|
9497
9484
|
function l(n, r, i, a, o) {
|
|
9498
9485
|
if (!a.worker) return {
|
|
9499
9486
|
backend: "main",
|
|
@@ -9507,7 +9494,7 @@ function Va(e = {}) {
|
|
|
9507
9494
|
backend: "main",
|
|
9508
9495
|
reason: "custom-parser"
|
|
9509
9496
|
};
|
|
9510
|
-
let s =
|
|
9497
|
+
let s = Fa(r, i, t);
|
|
9511
9498
|
return s.expand ? { backend: n === "html" && s.html ? "worker" : "hybrid" } : {
|
|
9512
9499
|
backend: "main",
|
|
9513
9500
|
reason: "element-capability"
|
|
@@ -9523,7 +9510,7 @@ function Va(e = {}) {
|
|
|
9523
9510
|
total: 1
|
|
9524
9511
|
});
|
|
9525
9512
|
let h = e.config?.() ?? gt().rendering, g = i(s.parserVersion), _ = n.get(o, g);
|
|
9526
|
-
if (!_) throw Error(g === "1.0.0" ?
|
|
9513
|
+
if (!_) throw Error(g === "1.0.0" ? M(o === "html" ? "parser.index.htmlParserNotRegistered" : "parser.index.pdfParserNotRegistered") : `Unsupported ${o} parser version: ${g}`);
|
|
9527
9514
|
if (g !== "1.0.0") {
|
|
9528
9515
|
if (!_.render) throw Error(`Parser version ${g} has no render implementation`);
|
|
9529
9516
|
let e = await _.render(s, {
|
|
@@ -9545,7 +9532,7 @@ function Va(e = {}) {
|
|
|
9545
9532
|
};
|
|
9546
9533
|
}
|
|
9547
9534
|
let v = {
|
|
9548
|
-
...l(o, s, u !== void 0, h, g === "1.0.0" &&
|
|
9535
|
+
...l(o, s, u !== void 0, h, g === "1.0.0" && za(o, _)),
|
|
9549
9536
|
durationMs: 0
|
|
9550
9537
|
}, y, b, x = [];
|
|
9551
9538
|
if (v.backend !== "main") {
|
|
@@ -9598,7 +9585,7 @@ function Va(e = {}) {
|
|
|
9598
9585
|
}
|
|
9599
9586
|
function p() {
|
|
9600
9587
|
c += 1;
|
|
9601
|
-
for (let e of s) e.abort(new M(
|
|
9588
|
+
for (let e of s) e.abort(new j(M("parser.worker.cancelled"), { code: "render.cancelled" }));
|
|
9602
9589
|
r.dispose();
|
|
9603
9590
|
}
|
|
9604
9591
|
async function m(n, r, i, a, o) {
|
|
@@ -9639,8 +9626,8 @@ function Va(e = {}) {
|
|
|
9639
9626
|
};
|
|
9640
9627
|
}
|
|
9641
9628
|
// src/runtime/browser-output.ts
|
|
9642
|
-
var
|
|
9643
|
-
function
|
|
9629
|
+
var Va = 6e4;
|
|
9630
|
+
function Ha() {
|
|
9644
9631
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = !1;
|
|
9645
9632
|
function i() {
|
|
9646
9633
|
if (!r) {
|
|
@@ -9651,13 +9638,28 @@ function Ua() {
|
|
|
9651
9638
|
n.clear();
|
|
9652
9639
|
}
|
|
9653
9640
|
}
|
|
9654
|
-
|
|
9641
|
+
function a(t) {
|
|
9642
|
+
if (r) throw t.close(), Error("Print studio has been disposed");
|
|
9643
|
+
let n = {
|
|
9644
|
+
close() {
|
|
9645
|
+
t.close(), e.delete(n);
|
|
9646
|
+
},
|
|
9647
|
+
get element() {
|
|
9648
|
+
return t.element;
|
|
9649
|
+
},
|
|
9650
|
+
get warnings() {
|
|
9651
|
+
return t.warnings;
|
|
9652
|
+
}
|
|
9653
|
+
};
|
|
9654
|
+
return e.add(n), n;
|
|
9655
|
+
}
|
|
9656
|
+
async function o(n, i = {}, a = !1) {
|
|
9655
9657
|
if (r) throw Error("Print studio has been disposed");
|
|
9656
9658
|
i.signal?.throwIfAborted();
|
|
9657
9659
|
let o = new AbortController(), s = () => o.abort(i.signal?.reason);
|
|
9658
9660
|
i.signal?.addEventListener("abort", s, { once: !0 }), t.add(o);
|
|
9659
9661
|
let c = document.createElement("iframe");
|
|
9660
|
-
c.title =
|
|
9662
|
+
c.title = M("core.output.previewTitle"), c.setAttribute("sandbox", "allow-same-origin allow-modals"), c.style.cssText = a ? "position:fixed;width:0;height:0;border:0;visibility:hidden" : "width:100%;height:100%;border:0;background:white";
|
|
9661
9663
|
let l, u = {
|
|
9662
9664
|
close() {
|
|
9663
9665
|
o.abort(), c.remove(), l?.remove(), e.delete(u);
|
|
@@ -9670,7 +9672,7 @@ function Ua() {
|
|
|
9670
9672
|
if (!a && !i.container) {
|
|
9671
9673
|
l = document.createElement("div"), l.style.cssText = "position:fixed;inset:0;z-index:2147483647;background:white;display:flex;flex-direction:column";
|
|
9672
9674
|
let e = document.createElement("button");
|
|
9673
|
-
e.textContent = "×", e.setAttribute("aria-label",
|
|
9675
|
+
e.textContent = "×", e.setAttribute("aria-label", M("core.output.closePreview")), e.onclick = () => u.close(), l.append(e, c), document.body.append(l);
|
|
9674
9676
|
} else (i.container ?? document.body).append(c);
|
|
9675
9677
|
return await Ie(c, n, {
|
|
9676
9678
|
onWarning(e) {
|
|
@@ -9685,32 +9687,33 @@ function Ua() {
|
|
|
9685
9687
|
t.delete(o), i.signal?.removeEventListener("abort", s);
|
|
9686
9688
|
}
|
|
9687
9689
|
}
|
|
9688
|
-
async function
|
|
9689
|
-
let r = await
|
|
9690
|
-
if (!i) throw r.close(), new M(
|
|
9691
|
-
function
|
|
9692
|
-
s && (clearTimeout(s), n.delete(s)), i?.removeEventListener("afterprint",
|
|
9690
|
+
async function s(e, t) {
|
|
9691
|
+
let r = await o(e, t, !0), i = r.element.contentWindow;
|
|
9692
|
+
if (!i) throw r.close(), new j(M("core.output.windowUnavailable"), { code: "print.frame-unavailable" });
|
|
9693
|
+
function a() {
|
|
9694
|
+
s && (clearTimeout(s), n.delete(s)), i?.removeEventListener("afterprint", a), r.close();
|
|
9693
9695
|
}
|
|
9694
|
-
i.addEventListener("afterprint",
|
|
9695
|
-
let s = setTimeout(
|
|
9696
|
+
i.addEventListener("afterprint", a, { once: !0 });
|
|
9697
|
+
let s = setTimeout(a, Va);
|
|
9696
9698
|
n.add(s);
|
|
9697
9699
|
try {
|
|
9698
9700
|
return i.focus(), i.print(), r.warnings;
|
|
9699
9701
|
} catch (e) {
|
|
9700
|
-
throw
|
|
9702
|
+
throw a(), e;
|
|
9701
9703
|
}
|
|
9702
9704
|
}
|
|
9703
9705
|
return {
|
|
9704
9706
|
dispose: i,
|
|
9705
|
-
preview:
|
|
9706
|
-
print:
|
|
9707
|
+
preview: o,
|
|
9708
|
+
print: s,
|
|
9709
|
+
track: a
|
|
9707
9710
|
};
|
|
9708
9711
|
}
|
|
9709
9712
|
// src/runtime/registries.ts
|
|
9710
|
-
function
|
|
9713
|
+
function Ua(e = {}) {
|
|
9711
9714
|
let t = new h();
|
|
9712
|
-
for (let n of [...
|
|
9713
|
-
let n = new
|
|
9715
|
+
for (let n of [...Da, ...e.elements ?? []]) t.unregister(n.type), t.register({ ...n });
|
|
9716
|
+
let n = new ka();
|
|
9714
9717
|
n.register(new yt(t)), n.register(new qt(t));
|
|
9715
9718
|
for (let t of e.parsers ?? []) n.unregister(t.id, t.version), n.register(t);
|
|
9716
9719
|
return {
|
|
@@ -9718,4 +9721,4 @@ function Wa(e = {}) {
|
|
|
9718
9721
|
parsers: n
|
|
9719
9722
|
};
|
|
9720
9723
|
}
|
|
9721
|
-
export { ft as A,
|
|
9724
|
+
export { de as $, ft as A, L as B, Tr as C, vt as D, mr as E, Le as F, P as G, ze as H, nt as I, N as J, _e as K, I as L, Ke as M, Ye as N, gt as O, Re as P, ue as Q, qe as R, ti as S, vr as T, Ie as U, Ze as V, Ce as W, me as X, he as Y, pe as Z, li as _, Ma as a, hi as b, da as c, J as d, Ki as f, gi as g, G as h, La as i, ot as j, lt as k, X as l, Oi as m, Ha as n, Ca as o, bi as p, ge as q, Ba as r, fa as s, Ua as t, qi as u, ui as v, wr as w, mi as x, fi as y, R as z };
|