@printstack/print-studio 0.1.0 → 0.1.1
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 +7 -0
- package/assets/{render.worker-Cfbk18NW.js → render.worker-Ch4qWx3S.js} +2 -2
- package/{cloneDeep-C5UZRjbH.js → cloneDeep-PCw2ErRl.js} +1 -0
- package/components/print-s-logo/print-s-logo.vue.d.ts +1 -1
- package/core.js +2 -2
- 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/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 +7 -0
- package/designer/mount-print-preview.d.ts +5 -0
- package/designer/print-designer.vue.d.ts +2 -2
- package/designer/print-preview.vue.d.ts +4 -0
- package/designer.js +2 -2
- package/{document-model-DC9sn2WV.js → document-model-GhFP9OGp.js} +1 -1
- package/host-CuGR8rD6.js +123 -0
- package/index.js +5 -5
- package/locales/runtime.d.ts +1 -0
- package/locales/translations/zh-CN/app.json.d.ts +1 -0
- package/{mount-print-designer-BzHLGlv-.js → mount-print-designer-BLgVZOnm.js} +3 -2
- package/mount-print-preview-D7M-1AqH.js +65 -0
- package/package.json +1 -1
- package/presets-D3WhkbZK.js +13 -0
- package/{registries-BOU8RLim.js → registries-dZq8MewR.js} +31 -15
- package/runtime/browser-output.d.ts +2 -0
- package/runtime.js +4 -4
- package/{saas-B3fJOgHX.js → saas-B1H161e1.js} +1 -1
- package/saas.js +1 -1
- package/{studio-C_rqbJ9q.js → studio-BFQYHZsg.js} +53 -51
- package/studio-types.d.ts +2 -1
- package/vue.js +274 -273
- package/presets-Cwp20ef6.js +0 -133
package/vue.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as re,
|
|
3
|
-
import { G as
|
|
4
|
-
import { A as
|
|
5
|
-
import { A as
|
|
1
|
+
import { $ as e, B as t, C as n, E as r, F as i, H as a, I as o, L as s, M as c, N as l, P as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, j as C, l as w, m as T, o as E, p as D, s as O, u as k, v as A, w as j, x as ee, y as te, z as ne } from "./registries-dZq8MewR.js";
|
|
2
|
+
import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./host-CuGR8rD6.js";
|
|
3
|
+
import { G as ue, H as de, M as fe, V as pe, at as me, nt as he, ot as ge, p as _e } from "./document-model-GhFP9OGp.js";
|
|
4
|
+
import { A as ve, B as ye, C as be, D as xe, E as Se, F as Ce, G as we, H as Te, I as Ee, K as De, L as Oe, M as ke, N as Ae, O as je, P as Me, R as Ne, S as Pe, T as Fe, W as Ie, _ as Le, a as Re, b as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, m as qe, n as Je, o as Ye, p as Xe, s as Ze, t as Qe, u as $e, v as et, w as tt } from "./studio-BFQYHZsg.js";
|
|
5
|
+
import { A as nt, B as M, C as rt, D as it, E as at, F as ot, O as st, P as ct, R as lt, S as ut, T as dt, _ as ft, a as pt, b as mt, c as ht, d as gt, f as _t, g as vt, h as yt, i as bt, k as xt, l as St, m as Ct, n as wt, o as Tt, p as Et, r as Dt, s as Ot, t as kt, u as At, v as jt, w as Mt, x as Nt, y as Pt } from "./cloneDeep-PCw2ErRl.js";
|
|
6
|
+
import { t as Ft } from "./presets-D3WhkbZK.js";
|
|
6
7
|
import { t as It } from "./types-Vh_6jhVV.js";
|
|
7
8
|
import { Comment as Lt, ErrorCodes as Rt, Fragment as N, Teleport as zt, Text as Bt, Transition as Vt, cloneVNode as Ht, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as Ut, createTextVNode as Wt, createVNode as z, defineComponent as B, getCurrentInstance as Gt, getCurrentScope as Kt, guardReactiveProps as qt, h as Jt, handleError as Yt, hasInjectionContext as Xt, inject as Zt, isRef as Qt, isVNode as $t, markRaw as en, mergeModels as tn, mergeProps as V, nextTick as nn, normalizeClass as rn, normalizeProps as an, normalizeStyle as on, onBeforeUnmount as sn, onMounted as cn, onScopeDispose as ln, onUnmounted as un, onUpdated as dn, openBlock as H, provide as fn, reactive as pn, readonly as mn, ref as U, render as hn, renderList as gn, renderSlot as _n, resolveComponent as vn, resolveDirective as yn, resolveDynamicComponent as bn, shallowReactive as xn, shallowRef as Sn, toDisplayString as W, toRaw as Cn, toRefs as wn, toValue as Tn, unref as G, useId as En, useModel as Dn, useSlots as On, vShow as kn, watch as K, watchEffect as An, watchPostEffect as jn, withCtx as q, withDirectives as Mn, withModifiers as Nn } from "vue";
|
|
8
9
|
import { AddIcon as Pn, AdjustmentIcon as Fn, ArrowDownIcon as In, ArrowRightIcon as Ln, ArrowUpIcon as Rn, BarcodeIcon as zn, BrowseIcon as Bn, BrowseOffIcon as Vn, CalendarIcon as Hn, CenterFocusStrongIcon as Un, CheckCircleFilledIcon as Wn, CheckIcon as Gn, CheckRectangleIcon as Kn, ChevronDownIcon as qn, ChevronLeftDoubleIcon as Jn, ChevronLeftIcon as Yn, ChevronRightDoubleIcon as Xn, ChevronRightIcon as Zn, ChevronUpIcon as Qn, CircleIcon as $n, ClearIcon as er, CloseCircleFilledIcon as tr, CloseIcon as nr, CopyIcon as rr, CursorIcon as ir, CutIcon as ar, DataBaseIcon as or, DeleteIcon as sr, DownloadIcon as cr, EditIcon as lr, EllipsisIcon as ur, ErrorCircleFilledIcon as dr, FileIcon as fr, FlipToBackIcon as pr, FlipToFrontIcon as mr, FolderIcon as hr, FolderOpenIcon as gr, FormatHorizontalAlignBottomIcon as _r, FormatHorizontalAlignCenterIcon as vr, FormatHorizontalAlignTopIcon as yr, FormatVerticalAlignCenterIcon as br, FormatVerticalAlignLeftIcon as xr, FormatVerticalAlignRightIcon as Sr, FullscreenExitIcon as Cr, FullscreenIcon as wr, GridViewIcon as Tr, HelpCircleIcon as Er, ImageIcon as Dr, InfoCircleFilledIcon as Or, KeyIcon as kr, LayersIcon as Ar, LinkIcon as jr, LinkUnlinkIcon as Mr, LockOffIcon as Nr, LockOnIcon as Pr, MergeCellsIcon as Fr, MinusIcon as Ir, MoreIcon as Lr, Move1Icon as Rr, MoveIcon as zr, PageFirstIcon as Br, PageLastIcon as Vr, PaletteIcon as Hr, PasteIcon as Ur, PrintIcon as Wr, QrcodeIcon as Gr, RectangleIcon as Kr, RefreshIcon as qr, RemoveIcon as Jr, RollbackIcon as Yr, RollfrontIcon as Xr, RotateIcon as Zr, RoundIcon as Qr, RulerIcon as $r, SlashIcon as ei, SwapIcon as ti, TableIcon as ni, TableSplitIcon as ri, TemplateIcon as ii, TextIcon as ai, TimeIcon as oi, UploadIcon as si, ViewColumnIcon as ci, ViewListIcon as li, ZoomInIcon as ui, ZoomOutIcon as di } from "tdesign-icons-vue-next";
|
|
@@ -49,16 +50,16 @@ function yi(e, t, n, r, i, a, o) {
|
|
|
49
50
|
}
|
|
50
51
|
function bi(e, t, n, r) {
|
|
51
52
|
if (Object.is(e, t)) return !0;
|
|
52
|
-
let i =
|
|
53
|
-
if (i === "[object Arguments]" && (i =
|
|
53
|
+
let i = it(e), a = it(t);
|
|
54
|
+
if (i === "[object Arguments]" && (i = jt), a === "[object Arguments]" && (a = jt), i !== a) return !1;
|
|
54
55
|
switch (i) {
|
|
55
|
-
case
|
|
56
|
-
case
|
|
57
|
-
case
|
|
58
|
-
case
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
56
|
+
case Nt: return e.toString() === t.toString();
|
|
57
|
+
case ft: return _i(e.valueOf(), t.valueOf());
|
|
58
|
+
case Tt:
|
|
59
|
+
case ht:
|
|
60
|
+
case ut: return Object.is(e.valueOf(), t.valueOf());
|
|
61
|
+
case Pt: return e.source === t.source && e.flags === t.flags;
|
|
62
|
+
case _t: return e === t;
|
|
62
63
|
}
|
|
63
64
|
n ??= /* @__PURE__ */ new Map();
|
|
64
65
|
let o = n.get(e), s = n.get(t);
|
|
@@ -66,11 +67,11 @@ function bi(e, t, n, r) {
|
|
|
66
67
|
n.set(e, t), n.set(t, e);
|
|
67
68
|
try {
|
|
68
69
|
switch (i) {
|
|
69
|
-
case
|
|
70
|
+
case vt:
|
|
70
71
|
if (e.size !== t.size) return !1;
|
|
71
72
|
for (let [i, a] of e.entries()) if (!t.has(i) || !yi(a, t.get(i), i, e, t, n, r)) return !1;
|
|
72
73
|
return !0;
|
|
73
|
-
case
|
|
74
|
+
case mt: {
|
|
74
75
|
if (e.size !== t.size) return !1;
|
|
75
76
|
let i = Array.from(e.values()), a = Array.from(t.values());
|
|
76
77
|
for (let o = 0; o < i.length; o++) {
|
|
@@ -80,27 +81,27 @@ function bi(e, t, n, r) {
|
|
|
80
81
|
}
|
|
81
82
|
return !0;
|
|
82
83
|
}
|
|
83
|
-
case Ot:
|
|
84
|
-
case ft:
|
|
85
|
-
case ot:
|
|
86
|
-
case it:
|
|
87
|
-
case Nt:
|
|
88
|
-
case mt:
|
|
89
|
-
case bt:
|
|
90
84
|
case Dt:
|
|
91
|
-
case
|
|
92
|
-
case
|
|
93
|
-
case
|
|
94
|
-
case
|
|
95
|
-
|
|
85
|
+
case dt:
|
|
86
|
+
case at:
|
|
87
|
+
case rt:
|
|
88
|
+
case Mt:
|
|
89
|
+
case pt:
|
|
90
|
+
case yt:
|
|
91
|
+
case Et:
|
|
92
|
+
case Ct:
|
|
93
|
+
case bt:
|
|
94
|
+
case At:
|
|
95
|
+
case gt:
|
|
96
|
+
if (xt(e) !== xt(t) || e.length !== t.length) return !1;
|
|
96
97
|
for (let i = 0; i < e.length; i++) if (!yi(e[i], t[i], i, e, t, n, r)) return !1;
|
|
97
98
|
return !0;
|
|
98
|
-
case
|
|
99
|
-
case
|
|
100
|
-
case
|
|
101
|
-
case
|
|
99
|
+
case wt: return e.byteLength === t.byteLength && bi(new Uint8Array(e), new Uint8Array(t), n, r);
|
|
100
|
+
case Ot: return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : bi(new Uint8Array(e), new Uint8Array(t), n, r);
|
|
101
|
+
case St: return e.name === t.name && e.message === t.message;
|
|
102
|
+
case jt: {
|
|
102
103
|
if (!(bi(e.constructor, t.constructor, n, r) || hi(e) && hi(t))) return !1;
|
|
103
|
-
let i = [...Object.keys(e), ...
|
|
104
|
+
let i = [...Object.keys(e), ...st(e)], a = [...Object.keys(t), ...st(t)];
|
|
104
105
|
if (i.length !== a.length) return !1;
|
|
105
106
|
for (let a = 0; a < i.length; a++) {
|
|
106
107
|
let o = i[a], s = e[o];
|
|
@@ -121,17 +122,17 @@ function xi(e, t) {
|
|
|
121
122
|
return vi(e, t, mi);
|
|
122
123
|
}
|
|
123
124
|
// src/components/error-fallback/browser.ts
|
|
124
|
-
function Si(
|
|
125
|
-
let
|
|
126
|
-
if (!
|
|
127
|
-
function r
|
|
128
|
-
"error" in
|
|
125
|
+
function Si(t, n = {}) {
|
|
126
|
+
let r = n.target ?? globalThis.window;
|
|
127
|
+
if (!r) return function() {};
|
|
128
|
+
function i(r) {
|
|
129
|
+
"error" in r ? ((n.suppressDefault || e(r.error)) && r.preventDefault(), t.capture(r.error, { source: "browser.error" })) : n.captureResources && t.capture(r, { source: "browser.resource" });
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
(
|
|
131
|
+
function a(r) {
|
|
132
|
+
(n.suppressDefault || e(r.reason)) && r.preventDefault(), t.capture(r.reason, { source: "browser.rejection" });
|
|
132
133
|
}
|
|
133
|
-
return
|
|
134
|
-
|
|
134
|
+
return r.addEventListener("error", i, !0), r.addEventListener("unhandledrejection", a), function() {
|
|
135
|
+
r.removeEventListener("error", i, !0), r.removeEventListener("unhandledrejection", a);
|
|
135
136
|
};
|
|
136
137
|
}
|
|
137
138
|
// src/components/error-fallback/vue.ts
|
|
@@ -443,7 +444,7 @@ function Ji(e) {
|
|
|
443
444
|
function Yi(e) {
|
|
444
445
|
let t = e.store();
|
|
445
446
|
function n(e) {
|
|
446
|
-
return e ??
|
|
447
|
+
return e ?? ct(t.document.data);
|
|
447
448
|
}
|
|
448
449
|
function r(e, n) {
|
|
449
450
|
e.length > 0 && (t.ui.toast(M("designer.documentActions.bindingWarningsMessage", {
|
|
@@ -460,7 +461,7 @@ function Yi(e) {
|
|
|
460
461
|
return;
|
|
461
462
|
}
|
|
462
463
|
let e = t.document.getDocument(), n = JSON.stringify(e, null, 2);
|
|
463
|
-
|
|
464
|
+
xe(`${e.name || M("designer.documentActions.defaultFilename")}.json`, n), t.ui.toast(M("designer.documentActions.documentSavedMessage"), "success");
|
|
464
465
|
}
|
|
465
466
|
async function a() {
|
|
466
467
|
let e = await Ji(".json,application/json");
|
|
@@ -469,7 +470,7 @@ function Yi(e) {
|
|
|
469
470
|
try {
|
|
470
471
|
n = await qi(e, "text");
|
|
471
472
|
} catch (t) {
|
|
472
|
-
throw new
|
|
473
|
+
throw new nt(M("designer.documentActions.fileReadFailed", { fileName: e.name }), {
|
|
473
474
|
cause: t,
|
|
474
475
|
code: "file.read-failed"
|
|
475
476
|
});
|
|
@@ -493,7 +494,7 @@ function Yi(e) {
|
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
496
|
async function c(e) {
|
|
496
|
-
await s("html", () => t.rendering.html(t.document.data, n(e)), (e, t) =>
|
|
497
|
+
await s("html", () => t.rendering.html(t.document.data, n(e)), (e, t) => xe(t, e.html, "text/html"));
|
|
497
498
|
}
|
|
498
499
|
function l() {
|
|
499
500
|
t.rendering.cancel();
|
|
@@ -505,7 +506,7 @@ function Yi(e) {
|
|
|
505
506
|
t.rendering.resume();
|
|
506
507
|
}
|
|
507
508
|
async function f(e) {
|
|
508
|
-
await s("pdf", () => t.rendering.pdf(t.document.data, n(e)), (e, t) =>
|
|
509
|
+
await s("pdf", () => t.rendering.pdf(t.document.data, n(e)), (e, t) => Se(t, e.blob));
|
|
509
510
|
}
|
|
510
511
|
async function p(i) {
|
|
511
512
|
let { html: a, warnings: o } = await t.rendering.html(t.document.data, n(i));
|
|
@@ -532,7 +533,7 @@ function Yi(e) {
|
|
|
532
533
|
};
|
|
533
534
|
}
|
|
534
535
|
// src/designer/tools.ts
|
|
535
|
-
function Xi(e =
|
|
536
|
+
function Xi(e = ue) {
|
|
536
537
|
return [
|
|
537
538
|
{
|
|
538
539
|
icon: "select",
|
|
@@ -638,7 +639,7 @@ function ta(e) {
|
|
|
638
639
|
function na(e) {
|
|
639
640
|
let t = Ie(e, !0), n = () => e.store(), r = () => Yi(e), i = () => !n().selection.isEmpty;
|
|
640
641
|
function a(e) {
|
|
641
|
-
let t =
|
|
642
|
+
let t = et(n()).getScrollElement();
|
|
642
643
|
if (!t) return;
|
|
643
644
|
let r = [...t.querySelectorAll("[data-element-id]")].filter((t) => e.includes(t.dataset.elementId ?? ""));
|
|
644
645
|
if (!r.length) return;
|
|
@@ -865,7 +866,7 @@ function na(e) {
|
|
|
865
866
|
icon: "zoom",
|
|
866
867
|
id: "view.zoomIn",
|
|
867
868
|
order: 1,
|
|
868
|
-
run: (e) => e.store().view.setZoom(
|
|
869
|
+
run: (e) => e.store().view.setZoom(he(e.store().view.zoom * 1.25, .05, 8)),
|
|
869
870
|
shortcut: "Ctrl+=",
|
|
870
871
|
get title() {
|
|
871
872
|
return M("designer.builtins.zoomInTitle");
|
|
@@ -876,7 +877,7 @@ function na(e) {
|
|
|
876
877
|
icon: "zoom-out",
|
|
877
878
|
id: "view.zoomOut",
|
|
878
879
|
order: 2,
|
|
879
|
-
run: (e) => e.store().view.setZoom(
|
|
880
|
+
run: (e) => e.store().view.setZoom(he(e.store().view.zoom / 1.25, .05, 8)),
|
|
880
881
|
shortcut: "Ctrl+-",
|
|
881
882
|
get title() {
|
|
882
883
|
return M("designer.builtins.zoomOutTitle");
|
|
@@ -887,7 +888,7 @@ function na(e) {
|
|
|
887
888
|
icon: "fit",
|
|
888
889
|
id: "view.zoomFit",
|
|
889
890
|
order: 3,
|
|
890
|
-
run: () =>
|
|
891
|
+
run: () => et(n()).getStageController()?.fitToViewport(),
|
|
891
892
|
shortcut: "Ctrl+0",
|
|
892
893
|
get title() {
|
|
893
894
|
return M("designer.builtins.fitToWindowTitle");
|
|
@@ -898,7 +899,7 @@ function na(e) {
|
|
|
898
899
|
icon: "zoom",
|
|
899
900
|
id: "view.zoomActual",
|
|
900
901
|
order: 4,
|
|
901
|
-
run: () =>
|
|
902
|
+
run: () => et(n()).getStageController()?.zoomReset(),
|
|
902
903
|
shortcut: "Ctrl+1",
|
|
903
904
|
get title() {
|
|
904
905
|
return M("designer.builtins.actualSizeTitle");
|
|
@@ -914,7 +915,7 @@ function na(e) {
|
|
|
914
915
|
order: 5,
|
|
915
916
|
run: (e, ...t) => {
|
|
916
917
|
let r = t[0], i = r ? e.store().page.get(r) : e.store().page.active;
|
|
917
|
-
i &&
|
|
918
|
+
i && et(n()).getStageController()?.centerPages(i);
|
|
918
919
|
},
|
|
919
920
|
get title() {
|
|
920
921
|
return M("designer.builtins.locatePageTitle");
|
|
@@ -1039,7 +1040,7 @@ function na(e) {
|
|
|
1039
1040
|
return M("designer.builtins.clearGuidesTitle");
|
|
1040
1041
|
}
|
|
1041
1042
|
},
|
|
1042
|
-
...
|
|
1043
|
+
...Ve.map((e) => ({
|
|
1043
1044
|
checked: () => n().view.canvasBackgroundPreset === e.id,
|
|
1044
1045
|
get help() {
|
|
1045
1046
|
return M("designer.builtins.canvasBackgroundHelp");
|
|
@@ -1705,7 +1706,7 @@ function na(e) {
|
|
|
1705
1706
|
return;
|
|
1706
1707
|
}
|
|
1707
1708
|
if (!(n instanceof KeyboardEvent)) return;
|
|
1708
|
-
let r =
|
|
1709
|
+
let r = me(n.shiftKey ? 5 : 1, e.store().view.zoom), i = n.key.toLowerCase(), { x: a = 0, y: o = 0 } = {
|
|
1709
1710
|
arrowdown: {
|
|
1710
1711
|
x: 0,
|
|
1711
1712
|
y: r
|
|
@@ -1810,7 +1811,7 @@ var aa = {
|
|
|
1810
1811
|
pxPerMm: {}
|
|
1811
1812
|
},
|
|
1812
1813
|
setup(e) {
|
|
1813
|
-
let t = e,
|
|
1814
|
+
let t = e, n = U(null), i = U(!1), a = P(() => Math.max(8, t.node.width * t.pxPerMm)), o = P(() => Math.max(8, t.node.height * t.pxPerMm)), s = P(() => ({
|
|
1814
1815
|
background: String(t.node.props.background ?? "transparent"),
|
|
1815
1816
|
displayValue: t.node.props.displayValue !== !1,
|
|
1816
1817
|
fontSize: Number(t.node.props.fontSize ?? 9),
|
|
@@ -1822,9 +1823,9 @@ var aa = {
|
|
|
1822
1823
|
return !e || e === "transparent" ? "transparent" : e;
|
|
1823
1824
|
});
|
|
1824
1825
|
function l() {
|
|
1825
|
-
let e =
|
|
1826
|
+
let e = n.value;
|
|
1826
1827
|
if (!e) return;
|
|
1827
|
-
let c = Math.max(2, Math.round((window.devicePixelRatio || 1) * 1.5)), l =
|
|
1828
|
+
let c = Math.max(2, Math.round((window.devicePixelRatio || 1) * 1.5)), l = r(String(t.node.props.value ?? ""), s.value, a.value, o.value, c);
|
|
1828
1829
|
l ? (i.value = !1, e.width = l.width, e.height = l.height, e.getContext("2d")?.drawImage(l, 0, 0)) : i.value = !0;
|
|
1829
1830
|
}
|
|
1830
1831
|
return An(() => {
|
|
@@ -1834,7 +1835,7 @@ var aa = {
|
|
|
1834
1835
|
style: on({ background: c.value })
|
|
1835
1836
|
}, [R("canvas", {
|
|
1836
1837
|
ref_key: "canvasRef",
|
|
1837
|
-
ref:
|
|
1838
|
+
ref: n,
|
|
1838
1839
|
class: "max-h-full max-w-full",
|
|
1839
1840
|
style: on({
|
|
1840
1841
|
width: `${a.value}px`,
|
|
@@ -1890,8 +1891,8 @@ var aa = {
|
|
|
1890
1891
|
selected: { type: Boolean }
|
|
1891
1892
|
},
|
|
1892
1893
|
setup(e) {
|
|
1893
|
-
let
|
|
1894
|
-
...
|
|
1894
|
+
let t = e, r = P(() => Math.max(.1, Number(t.node.props.strokeWidth) || .3) * t.pxPerMm), i = P(() => j(t.node, t.pxPerMm, "px")), a = P(() => n(String(t.node.props.color ?? "#333333"), t.node.props.dash, r.value, "px")), o = P(() => ({
|
|
1895
|
+
...n("var(--color-accent)", "solid", Math.max(r.value, 1.5), "px"),
|
|
1895
1896
|
opacity: "0.55",
|
|
1896
1897
|
pointerEvents: "none"
|
|
1897
1898
|
})), s = P(() => {
|
|
@@ -2010,17 +2011,17 @@ function xa(e) {
|
|
|
2010
2011
|
}
|
|
2011
2012
|
function Sa(e, t) {
|
|
2012
2013
|
let n = e, r;
|
|
2013
|
-
for (let e of
|
|
2014
|
+
for (let e of a(t)) if (!(r?.type === "array" && /^\d+$/.test(e))) {
|
|
2014
2015
|
if (r = n.find((t) => t.name === e), !r) return;
|
|
2015
2016
|
n = r.children ?? [];
|
|
2016
2017
|
}
|
|
2017
2018
|
return r;
|
|
2018
2019
|
}
|
|
2019
2020
|
function Ca(e, t) {
|
|
2020
|
-
let [n, ...r] =
|
|
2021
|
+
let [n, ...r] = a(t);
|
|
2021
2022
|
if (n !== e.key) return;
|
|
2022
|
-
let
|
|
2023
|
-
return r.length === 0 ?
|
|
2023
|
+
let i = xa(e);
|
|
2024
|
+
return r.length === 0 ? i : i && /^\d+$/.test(r[0]) ? Sa(i.children ?? [], r.slice(1).join(".")) : Sa(e.schema, r.join("."));
|
|
2024
2025
|
}
|
|
2025
2026
|
function wa(e, t) {
|
|
2026
2027
|
let n = Ca(e, t);
|
|
@@ -2054,7 +2055,7 @@ function ka(e) {
|
|
|
2054
2055
|
}
|
|
2055
2056
|
function Aa(e) {
|
|
2056
2057
|
let t = [], n = 0;
|
|
2057
|
-
for (let r of e.matchAll(
|
|
2058
|
+
for (let r of e.matchAll(c)) {
|
|
2058
2059
|
let i = r.index ?? 0;
|
|
2059
2060
|
i > n && t.push({
|
|
2060
2061
|
kind: "text",
|
|
@@ -2217,7 +2218,7 @@ function za(e) {
|
|
|
2217
2218
|
return ja(n, t.dataSource.list, e());
|
|
2218
2219
|
}
|
|
2219
2220
|
function r(e) {
|
|
2220
|
-
|
|
2221
|
+
lt.global.locale.value;
|
|
2221
2222
|
let t = n(e.path), r = e.formatter ? Ma.get(e.formatter) : void 0, i = [t?.label ?? e.path];
|
|
2222
2223
|
return e.formatter && i.push(r?.label() ?? e.formatter), {
|
|
2223
2224
|
invalid: !t || !(!e.formatter || Na(e.formatter, t.type)),
|
|
@@ -24009,7 +24010,7 @@ function mM(e) {
|
|
|
24009
24010
|
}
|
|
24010
24011
|
// src/components/popup-layer/use-popup-layer.ts
|
|
24011
24012
|
function hM(e = {}, t = "popupProps", n) {
|
|
24012
|
-
let r = Zt(
|
|
24013
|
+
let r = Zt(se, null), i = Zt(ce, void 0), a = U(!!Tn(e).defaultVisible), o = P(() => Tn(n) ?? Tn(e).visible ?? Tn(e).modelValue ?? a.value), s = r ? ie(o, () => ({ zIndex: Tn(e).zIndex }), r) : void 0, c = P(() => {
|
|
24013
24014
|
let n = {
|
|
24014
24015
|
...i ? { attach: () => i() ?? document.body } : {},
|
|
24015
24016
|
...Tn(e),
|
|
@@ -24748,10 +24749,10 @@ var gN = B({
|
|
|
24748
24749
|
type: Object
|
|
24749
24750
|
} },
|
|
24750
24751
|
setup(e) {
|
|
24751
|
-
let t = Zt(
|
|
24752
|
+
let t = Zt(oe, void 0), n = P(() => qM(e.item.type)), r = P(() => t ? a(t, e.item.field) : void 0), i = P(() => {
|
|
24752
24753
|
if (t) return t.fieldStates[e.item.field];
|
|
24753
24754
|
});
|
|
24754
|
-
fn(
|
|
24755
|
+
fn(re, {
|
|
24755
24756
|
errors: P(() => i.value?.errorMessages ?? []),
|
|
24756
24757
|
status: P(() => uN(e.item.status, i.value)),
|
|
24757
24758
|
touched: P(() => i.value?.touched ?? !1),
|
|
@@ -25032,7 +25033,7 @@ var xN = B({
|
|
|
25032
25033
|
function x(e, t) {
|
|
25033
25034
|
t == null ? i.delete(e) : i.set(e, t);
|
|
25034
25035
|
}
|
|
25035
|
-
return fn(
|
|
25036
|
+
return fn(oe, pn({
|
|
25036
25037
|
adapter: en(o),
|
|
25037
25038
|
collectFieldRef: x,
|
|
25038
25039
|
disabled: d,
|
|
@@ -25745,7 +25746,7 @@ var tP = { class: "base-dialog__heading" }, nP = ["aria-label", "title"], rP = /
|
|
|
25745
25746
|
"update:visible"
|
|
25746
25747
|
],
|
|
25747
25748
|
setup(e, { emit: t }) {
|
|
25748
|
-
let n = e, r = t, i = U(), a = Zt(
|
|
25749
|
+
let n = e, r = t, i = U(), a = Zt(ce, void 0), o = U(!1), { isTop: s, zIndex: c } = ie(() => o.value, () => ({ zIndex: n.zIndex })), l = P(() => {
|
|
25749
25750
|
let e = n.height;
|
|
25750
25751
|
return { height: typeof e == "number" ? `${e}px` : e ?? "auto" };
|
|
25751
25752
|
}), u = P(() => p(n.confirmBtn, M("components.baseDialog.confirmButton"), Gn)), d = P(() => p(n.cancelBtn, M("components.baseDialog.cancelButton"), nr)), f = null;
|
|
@@ -26325,33 +26326,33 @@ function OP(e, t) {
|
|
|
26325
26326
|
return !t || e == null ? !1 : t === "array" ? !Array.isArray(e) : t === "date" ? typeof e != "string" && typeof e != "number" : Array.isArray(e) ? !0 : typeof e !== t;
|
|
26326
26327
|
}
|
|
26327
26328
|
// src/designer/components/binding/use-binding-preview.ts
|
|
26328
|
-
function kP(
|
|
26329
|
+
function kP(e) {
|
|
26329
26330
|
let n = P(() => {
|
|
26330
|
-
let n = Object.fromEntries(
|
|
26331
|
+
let n = Object.fromEntries(e.getSources().map((e) => [e.key, e.sampleData])), r = i(n), a = e.getRelativeTo();
|
|
26331
26332
|
if (a) {
|
|
26332
|
-
let
|
|
26333
|
-
if (!Array.isArray(
|
|
26334
|
-
|
|
26333
|
+
let e = t(r, a);
|
|
26334
|
+
if (!Array.isArray(e) || !e.length) return;
|
|
26335
|
+
r = u(r, {
|
|
26335
26336
|
collectionPath: a,
|
|
26336
26337
|
index: 0,
|
|
26337
|
-
item:
|
|
26338
|
+
item: e[0]
|
|
26338
26339
|
});
|
|
26339
26340
|
}
|
|
26340
|
-
return
|
|
26341
|
-
}),
|
|
26342
|
-
if (!
|
|
26343
|
-
let
|
|
26341
|
+
return t(r, e.selectedPath.value);
|
|
26342
|
+
}), r = P(() => {
|
|
26343
|
+
if (!e.selectedField.value) return null;
|
|
26344
|
+
let t = e.expression.value.slice(e.selectedPath.value.length);
|
|
26344
26345
|
return EP(n.value, {
|
|
26345
|
-
expectedType:
|
|
26346
|
-
format:
|
|
26346
|
+
expectedType: e.selectedField.value.type,
|
|
26347
|
+
format: t && !e.unsupportedFormat.value ? (e) => m(`{{ value${t} }}`, i({ value: e }), new l()) : void 0
|
|
26347
26348
|
});
|
|
26348
26349
|
});
|
|
26349
26350
|
return {
|
|
26350
26351
|
previewMessageKey: P(() => {
|
|
26351
|
-
let e =
|
|
26352
|
+
let e = r.value;
|
|
26352
26353
|
return !e || e.kind === "text" ? null : e.kind === "array" ? e.count === 0 ? "designer.samplePreview.emptyArray" : "designer.samplePreview.array" : `designer.samplePreview.${e.kind}`;
|
|
26353
26354
|
}),
|
|
26354
|
-
previewValue:
|
|
26355
|
+
previewValue: r,
|
|
26355
26356
|
sampleValue: n
|
|
26356
26357
|
};
|
|
26357
26358
|
}
|
|
@@ -26721,7 +26722,7 @@ var dF = {
|
|
|
26721
26722
|
type: "booleanField"
|
|
26722
26723
|
};
|
|
26723
26724
|
},
|
|
26724
|
-
color(e, t, n, r =
|
|
26725
|
+
color(e, t, n, r = ue) {
|
|
26725
26726
|
let i = r.get(n.type)?.createProps() ?? {}, a = te({
|
|
26726
26727
|
...n,
|
|
26727
26728
|
props: i
|
|
@@ -26800,7 +26801,7 @@ function fF(e, t) {
|
|
|
26800
26801
|
lF.get(e) === t && (n ? lF.set(e, n) : lF.delete(e));
|
|
26801
26802
|
};
|
|
26802
26803
|
}
|
|
26803
|
-
function pF(e, t, n, r =
|
|
26804
|
+
function pF(e, t, n, r = ue, i = {}) {
|
|
26804
26805
|
let a = lF.get(e.type);
|
|
26805
26806
|
if (!a) throw Error(`Unregistered inspector control: ${e.type}`);
|
|
26806
26807
|
let o = a(e, t, n, r), s = i.nodes ?? [], c = s.length > 1 && s.some((t) => t.locked || e.disabledIf?.(t.props)) || (e.disabledIf?.(n.props) ?? (o.props && "disabled" in o.props ? o.props.disabled : e.controlProps?.disabled));
|
|
@@ -27020,10 +27021,10 @@ function _F(e, t, n = {}) {
|
|
|
27020
27021
|
type: "number",
|
|
27021
27022
|
value: {
|
|
27022
27023
|
get(t) {
|
|
27023
|
-
return
|
|
27024
|
+
return pe(t, e);
|
|
27024
27025
|
},
|
|
27025
27026
|
set(t, n) {
|
|
27026
|
-
return
|
|
27027
|
+
return de(t, e, n);
|
|
27027
27028
|
}
|
|
27028
27029
|
},
|
|
27029
27030
|
...n
|
|
@@ -27097,7 +27098,7 @@ var EF = { class: "flex w-full shrink-0 flex-col bg-panel pb-2" }, DF = { class:
|
|
|
27097
27098
|
type: "input"
|
|
27098
27099
|
}]), o = P(() => {
|
|
27099
27100
|
let e = r.selection.primary;
|
|
27100
|
-
return e ?
|
|
27101
|
+
return e ? fe(r.document.data, e, n) : null;
|
|
27101
27102
|
}), s = mM(() => o.value?.type), c = P(() => o.value ? A(h(s.value?.inspectorSections ?? [], r.document.data, o.value, n), o.value) : []), l = P(() => TF(s.value)), u = P(() => r.repeatGroup.selected ? r.repeatGroup.selected : o.value ? r.repeatGroup.findByElement(o.value.id) ?? null : null);
|
|
27102
27103
|
function d(e) {
|
|
27103
27104
|
return Math.round(e * 100) / 100;
|
|
@@ -28160,7 +28161,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28160
28161
|
try {
|
|
28161
28162
|
await navigator.clipboard.writeText(s.value || c.value);
|
|
28162
28163
|
} catch (e) {
|
|
28163
|
-
throw new
|
|
28164
|
+
throw new nt(M("designer.fieldColor.copyFailedMessage"), {
|
|
28164
28165
|
cause: e,
|
|
28165
28166
|
code: "color.copy-failed"
|
|
28166
28167
|
});
|
|
@@ -28261,25 +28262,25 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28261
28262
|
modelValue: {},
|
|
28262
28263
|
node: {}
|
|
28263
28264
|
},
|
|
28264
|
-
setup(
|
|
28265
|
-
let n =
|
|
28266
|
-
let
|
|
28267
|
-
if (!
|
|
28268
|
-
let n =
|
|
28265
|
+
setup(e) {
|
|
28266
|
+
let n = e, r = vz().store(), a = P(() => n.bindings?.rows), o = P(() => Array.isArray(n.columns) ? n.columns : []), s = P(() => {
|
|
28267
|
+
let e = a.value;
|
|
28268
|
+
if (!e) return null;
|
|
28269
|
+
let n = ct(r.document.data), o = i(n), s = t(o, e);
|
|
28269
28270
|
return Array.isArray(s) ? s.slice(0, BI) : null;
|
|
28270
28271
|
}), c = P(() => {
|
|
28271
|
-
let
|
|
28272
|
-
if (!
|
|
28273
|
-
let n =
|
|
28272
|
+
let e = a.value;
|
|
28273
|
+
if (!e) return 0;
|
|
28274
|
+
let n = ct(r.document.data), o = t(i(n), e);
|
|
28274
28275
|
return Array.isArray(o) ? o.length : 0;
|
|
28275
28276
|
});
|
|
28276
|
-
function
|
|
28277
|
-
if (!
|
|
28278
|
-
let o =
|
|
28277
|
+
function l(e, n, r) {
|
|
28278
|
+
if (!r) return "";
|
|
28279
|
+
let o = u(i({}), {
|
|
28279
28280
|
collectionPath: a.value ?? "",
|
|
28280
28281
|
index: n,
|
|
28281
|
-
item:
|
|
28282
|
-
}), s =
|
|
28282
|
+
item: e
|
|
28283
|
+
}), s = t(o, r);
|
|
28283
28284
|
return s == null ? "" : String(s);
|
|
28284
28285
|
}
|
|
28285
28286
|
return (e, t) => (H(), L("div", FI, [a.value ? !s.value || s.value.length === 0 ? (H(), F(HN, {
|
|
@@ -28295,8 +28296,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28295
28296
|
}, [(H(!0), L(N, null, gn(o.value, (n, r) => (H(), L("span", {
|
|
28296
28297
|
key: r,
|
|
28297
28298
|
class: "field-data-preview__cell",
|
|
28298
|
-
title:
|
|
28299
|
-
}, W(
|
|
28299
|
+
title: l(e, t, n.bind)
|
|
28300
|
+
}, W(l(e, t, n.bind)), 9, zI))), 128))]))), 128))]), z(HN, { text: G(M)("designer.fieldDataPreview.rowsLabel", {
|
|
28300
28301
|
previewCount: s.value.length,
|
|
28301
28302
|
rowCount: c.value
|
|
28302
28303
|
}) }, null, 8, ["text"])], 64)) : (H(), F(HN, {
|
|
@@ -28350,7 +28351,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28350
28351
|
try {
|
|
28351
28352
|
a = await qi(i, "dataUrl");
|
|
28352
28353
|
} catch (e) {
|
|
28353
|
-
throw new
|
|
28354
|
+
throw new nt(M("designer.pageView.imageReadFailed", { fileName: i.name }), {
|
|
28354
28355
|
cause: e,
|
|
28355
28356
|
code: "image.read-failed"
|
|
28356
28357
|
});
|
|
@@ -28403,7 +28404,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28403
28404
|
}),
|
|
28404
28405
|
emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
|
|
28405
28406
|
setup(e, { emit: t }) {
|
|
28406
|
-
let n = t, r = Dn(e, "modelValue"), i =
|
|
28407
|
+
let n = t, r = Dn(e, "modelValue"), i = ae(), a = P(() => [
|
|
28407
28408
|
{
|
|
28408
28409
|
label: M("designer.fieldBorders.modeAllOption"),
|
|
28409
28410
|
value: "all"
|
|
@@ -28424,7 +28425,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28424
28425
|
label: M("designer.fieldBorders.modeNoneOption"),
|
|
28425
28426
|
value: "none"
|
|
28426
28427
|
}
|
|
28427
|
-
]),
|
|
28428
|
+
]), o = P(() => [
|
|
28428
28429
|
{
|
|
28429
28430
|
label: M("designer.fieldBorders.solidOption"),
|
|
28430
28431
|
value: "solid"
|
|
@@ -28437,8 +28438,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28437
28438
|
label: M("designer.fieldBorders.dottedOption"),
|
|
28438
28439
|
value: "dotted"
|
|
28439
28440
|
}
|
|
28440
|
-
]), c = D(), l = P(() =>
|
|
28441
|
-
if (!
|
|
28441
|
+
]), c = D(), l = P(() => s(r.value) ? r.value : { ...c }), u = P(() => {
|
|
28442
|
+
if (!s(r.value)) return {
|
|
28442
28443
|
inner: { ...c },
|
|
28443
28444
|
mode: "all",
|
|
28444
28445
|
outer: { ...c }
|
|
@@ -28497,7 +28498,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28497
28498
|
}
|
|
28498
28499
|
});
|
|
28499
28500
|
}
|
|
28500
|
-
return (t,
|
|
28501
|
+
return (t, s) => {
|
|
28501
28502
|
let g = hC, _ = MT, v = fA;
|
|
28502
28503
|
return e.sideMode ? (H(), L("div", qI, [
|
|
28503
28504
|
z(fP, {
|
|
@@ -28509,8 +28510,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28509
28510
|
"model-value": l.value.color,
|
|
28510
28511
|
"reset-value": G(c).color,
|
|
28511
28512
|
"allow-none": "",
|
|
28512
|
-
"onUpdate:modelValue":
|
|
28513
|
-
onCommit:
|
|
28513
|
+
"onUpdate:modelValue": s[0] ||= (e) => p({ color: String(e) }),
|
|
28514
|
+
onCommit: s[1] ||= (e) => n("commit")
|
|
28514
28515
|
}, null, 8, ["model-value", "reset-value"])]),
|
|
28515
28516
|
_: 1
|
|
28516
28517
|
}, 8, ["label"]),
|
|
@@ -28526,8 +28527,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28526
28527
|
max: 3,
|
|
28527
28528
|
step: .05,
|
|
28528
28529
|
suffix: G(M)("elements.tableElement.distanceUnit"),
|
|
28529
|
-
"onUpdate:modelValue":
|
|
28530
|
-
onBlur:
|
|
28530
|
+
"onUpdate:modelValue": s[2] ||= (e) => p({ width: Number(e) || .2 }),
|
|
28531
|
+
onBlur: s[3] ||= (e) => n("commit")
|
|
28531
28532
|
}, null, 8, ["model-value", "suffix"])]),
|
|
28532
28533
|
_: 1
|
|
28533
28534
|
}, 8, ["label"]),
|
|
@@ -28538,9 +28539,9 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28538
28539
|
}, {
|
|
28539
28540
|
default: q(() => [z(_, {
|
|
28540
28541
|
"model-value": l.value.style,
|
|
28541
|
-
options:
|
|
28542
|
-
"onUpdate:modelValue":
|
|
28543
|
-
onChange:
|
|
28542
|
+
options: o.value,
|
|
28543
|
+
"onUpdate:modelValue": s[4] ||= (e) => p({ style: String(e) }),
|
|
28544
|
+
onChange: s[5] ||= (e) => n("commit")
|
|
28544
28545
|
}, null, 8, ["model-value", "options"])]),
|
|
28545
28546
|
_: 1
|
|
28546
28547
|
}, 8, ["label"])
|
|
@@ -28555,7 +28556,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28555
28556
|
default: q(() => [z(v, {
|
|
28556
28557
|
"aria-label": G(M)("designer.elementWorkspace.inheritBorders"),
|
|
28557
28558
|
"model-value": !r.value,
|
|
28558
|
-
"onUpdate:modelValue":
|
|
28559
|
+
"onUpdate:modelValue": s[6] ||= (e) => f(e ? void 0 : u.value)
|
|
28559
28560
|
}, null, 8, ["aria-label", "model-value"])]),
|
|
28560
28561
|
_: 1
|
|
28561
28562
|
}, 8, ["label"])) : I("", !0), !e.inheritable || r.value ? (H(), L(N, { key: 1 }, [
|
|
@@ -28567,8 +28568,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28567
28568
|
default: q(() => [z(_, {
|
|
28568
28569
|
"model-value": u.value.mode,
|
|
28569
28570
|
options: a.value,
|
|
28570
|
-
"onUpdate:modelValue":
|
|
28571
|
-
onChange:
|
|
28571
|
+
"onUpdate:modelValue": s[7] ||= (e) => m({ mode: String(e) }),
|
|
28572
|
+
onChange: s[8] ||= (e) => n("commit")
|
|
28572
28573
|
}, null, 8, ["model-value", "options"])]),
|
|
28573
28574
|
_: 1
|
|
28574
28575
|
}, 8, ["label", "label-width"]),
|
|
@@ -28585,11 +28586,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28585
28586
|
default: q(() => [z(PI, {
|
|
28586
28587
|
"model-value": u.value.outer.color,
|
|
28587
28588
|
"reset-value": G(c).color,
|
|
28588
|
-
"onUpdate:modelValue":
|
|
28589
|
+
"onUpdate:modelValue": s[9] ||= (e) => m({ outer: {
|
|
28589
28590
|
...u.value.outer,
|
|
28590
28591
|
color: String(e)
|
|
28591
28592
|
} }),
|
|
28592
|
-
onCommit:
|
|
28593
|
+
onCommit: s[10] ||= (e) => n("commit")
|
|
28593
28594
|
}, null, 8, ["model-value", "reset-value"])]),
|
|
28594
28595
|
_: 1
|
|
28595
28596
|
}, 8, ["label"]),
|
|
@@ -28605,11 +28606,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28605
28606
|
max: 3,
|
|
28606
28607
|
step: .05,
|
|
28607
28608
|
suffix: G(M)("elements.tableElement.distanceUnit"),
|
|
28608
|
-
"onUpdate:modelValue":
|
|
28609
|
+
"onUpdate:modelValue": s[11] ||= (e) => m({ outer: {
|
|
28609
28610
|
...u.value.outer,
|
|
28610
28611
|
width: Number(e) || .2
|
|
28611
28612
|
} }),
|
|
28612
|
-
onBlur:
|
|
28613
|
+
onBlur: s[12] ||= (e) => n("commit")
|
|
28613
28614
|
}, null, 8, ["model-value", "suffix"])]),
|
|
28614
28615
|
_: 1
|
|
28615
28616
|
}, 8, ["label"]),
|
|
@@ -28620,12 +28621,12 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28620
28621
|
}, {
|
|
28621
28622
|
default: q(() => [z(_, {
|
|
28622
28623
|
"model-value": u.value.outer.style,
|
|
28623
|
-
options:
|
|
28624
|
-
"onUpdate:modelValue":
|
|
28624
|
+
options: o.value,
|
|
28625
|
+
"onUpdate:modelValue": s[13] ||= (e) => m({ outer: {
|
|
28625
28626
|
...u.value.outer,
|
|
28626
28627
|
style: String(e)
|
|
28627
28628
|
} }),
|
|
28628
|
-
onChange:
|
|
28629
|
+
onChange: s[14] ||= (e) => n("commit")
|
|
28629
28630
|
}, null, 8, ["model-value", "options"])]),
|
|
28630
28631
|
_: 1
|
|
28631
28632
|
}, 8, ["label"])
|
|
@@ -28646,11 +28647,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28646
28647
|
"model-value": u.value.inner.color,
|
|
28647
28648
|
"reset-value": G(c).color,
|
|
28648
28649
|
"allow-none": "",
|
|
28649
|
-
"onUpdate:modelValue":
|
|
28650
|
+
"onUpdate:modelValue": s[15] ||= (e) => m({ inner: {
|
|
28650
28651
|
...u.value.inner,
|
|
28651
28652
|
color: String(e)
|
|
28652
28653
|
} }),
|
|
28653
|
-
onCommit:
|
|
28654
|
+
onCommit: s[16] ||= (e) => n("commit")
|
|
28654
28655
|
}, null, 8, ["model-value", "reset-value"])]),
|
|
28655
28656
|
_: 1
|
|
28656
28657
|
}, 8, ["label"]),
|
|
@@ -28666,11 +28667,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28666
28667
|
max: 3,
|
|
28667
28668
|
step: .05,
|
|
28668
28669
|
suffix: G(M)("elements.tableElement.distanceUnit"),
|
|
28669
|
-
"onUpdate:modelValue":
|
|
28670
|
+
"onUpdate:modelValue": s[17] ||= (e) => m({ inner: {
|
|
28670
28671
|
...u.value.inner,
|
|
28671
28672
|
width: Number(e) || .2
|
|
28672
28673
|
} }),
|
|
28673
|
-
onBlur:
|
|
28674
|
+
onBlur: s[18] ||= (e) => n("commit")
|
|
28674
28675
|
}, null, 8, ["model-value", "suffix"])]),
|
|
28675
28676
|
_: 1
|
|
28676
28677
|
}, 8, ["label"]),
|
|
@@ -28681,12 +28682,12 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28681
28682
|
}, {
|
|
28682
28683
|
default: q(() => [z(_, {
|
|
28683
28684
|
"model-value": u.value.inner.style,
|
|
28684
|
-
options:
|
|
28685
|
-
"onUpdate:modelValue":
|
|
28685
|
+
options: o.value,
|
|
28686
|
+
"onUpdate:modelValue": s[19] ||= (e) => m({ inner: {
|
|
28686
28687
|
...u.value.inner,
|
|
28687
28688
|
style: String(e)
|
|
28688
28689
|
} }),
|
|
28689
|
-
onChange:
|
|
28690
|
+
onChange: s[20] ||= (e) => n("commit")
|
|
28690
28691
|
}, null, 8, ["model-value", "options"])]),
|
|
28691
28692
|
_: 1
|
|
28692
28693
|
}, 8, ["label"])
|
|
@@ -28709,7 +28710,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28709
28710
|
"reset-value": u.value.outer.color,
|
|
28710
28711
|
"allow-none": "",
|
|
28711
28712
|
"onUpdate:modelValue": (t) => h(e.key, { color: String(t) }),
|
|
28712
|
-
onCommit:
|
|
28713
|
+
onCommit: s[21] ||= (e) => n("commit")
|
|
28713
28714
|
}, null, 8, [
|
|
28714
28715
|
"model-value",
|
|
28715
28716
|
"reset-value",
|
|
@@ -28730,7 +28731,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28730
28731
|
step: .05,
|
|
28731
28732
|
suffix: G(M)("elements.tableElement.distanceUnit"),
|
|
28732
28733
|
"onUpdate:modelValue": (t) => h(e.key, { width: Number(t) || .2 }),
|
|
28733
|
-
onBlur:
|
|
28734
|
+
onBlur: s[22] ||= (e) => n("commit")
|
|
28734
28735
|
}, null, 8, [
|
|
28735
28736
|
"model-value",
|
|
28736
28737
|
"suffix",
|
|
@@ -28745,9 +28746,9 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
|
|
|
28745
28746
|
}, {
|
|
28746
28747
|
default: q(() => [z(_, {
|
|
28747
28748
|
"model-value": u.value[e.key]?.style ?? u.value.outer.style,
|
|
28748
|
-
options:
|
|
28749
|
+
options: o.value,
|
|
28749
28750
|
"onUpdate:modelValue": (t) => h(e.key, { style: String(t) }),
|
|
28750
|
-
onChange:
|
|
28751
|
+
onChange: s[23] ||= (e) => n("commit")
|
|
28751
28752
|
}, null, 8, [
|
|
28752
28753
|
"model-value",
|
|
28753
28754
|
"options",
|
|
@@ -28916,7 +28917,7 @@ function iL(e, t, n, r) {
|
|
|
28916
28917
|
let o = t[r];
|
|
28917
28918
|
return r === n ? o = u : r === i && (o = a - u), {
|
|
28918
28919
|
...e,
|
|
28919
|
-
width:
|
|
28920
|
+
width: ge(o, 2),
|
|
28920
28921
|
widthMode: "fixed"
|
|
28921
28922
|
};
|
|
28922
28923
|
});
|
|
@@ -29419,7 +29420,7 @@ var pL = {
|
|
|
29419
29420
|
}), K(() => a.value, v.syncFromValue), K(() => [
|
|
29420
29421
|
s.dataSource.list,
|
|
29421
29422
|
r.relativeTo,
|
|
29422
|
-
|
|
29423
|
+
lt.global.locale.value
|
|
29423
29424
|
], () => {
|
|
29424
29425
|
v.refreshChips();
|
|
29425
29426
|
}, { deep: !0 }), cn(() => {
|
|
@@ -29816,7 +29817,7 @@ var pL = {
|
|
|
29816
29817
|
function FL(e) {
|
|
29817
29818
|
let { pointerId: t, startPoint: n, target: r } = e, i = e.threshold ?? 0, a = !1, o = !1, s = e.tag ?? "unknown", c = e.startClient ?? n, l = r, u;
|
|
29818
29819
|
for (; l && !u;) u = PL.get(l), l = l.parentElement;
|
|
29819
|
-
let d = u?.events ??
|
|
29820
|
+
let d = u?.events ?? De();
|
|
29820
29821
|
try {
|
|
29821
29822
|
r.setPointerCapture?.(t);
|
|
29822
29823
|
} catch {}
|
|
@@ -30000,7 +30001,7 @@ function RL(e, t) {
|
|
|
30000
30001
|
}
|
|
30001
30002
|
}), o = l("summary"), s = P(() => r.value.length);
|
|
30002
30003
|
function c() {
|
|
30003
|
-
let t = S(
|
|
30004
|
+
let t = S(kt(e()));
|
|
30004
30005
|
return t.rows = (t.rows ?? []).map((e) => Array.from({ length: t.columns.length }, (t, n) => typeof e[n] == "string" ? e[n] : "")), t;
|
|
30005
30006
|
}
|
|
30006
30007
|
function l(e) {
|
|
@@ -30012,12 +30013,12 @@ function RL(e, t) {
|
|
|
30012
30013
|
});
|
|
30013
30014
|
}
|
|
30014
30015
|
function u(e) {
|
|
30015
|
-
n.value =
|
|
30016
|
+
n.value = kt(e);
|
|
30016
30017
|
}
|
|
30017
30018
|
function d() {
|
|
30018
30019
|
t({
|
|
30019
30020
|
...e(),
|
|
30020
|
-
...
|
|
30021
|
+
...kt(n.value)
|
|
30021
30022
|
});
|
|
30022
30023
|
}
|
|
30023
30024
|
return K(e, () => {
|
|
@@ -30384,7 +30385,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30384
30385
|
},
|
|
30385
30386
|
emits: ["commit", "update:propsObject"],
|
|
30386
30387
|
setup(e, { emit: t }) {
|
|
30387
|
-
let n = e, r = t, i = vz().store(), a =
|
|
30388
|
+
let n = e, r = t, i = vz().store(), a = ae(), { onVisibleChange: o, popupProps: s } = hM({}, "popup"), { columns: c, commit: l, draft: u, replace: d, summary: f } = RL(() => n.propsObject, j), { addColumn: p, dragColumnIndex: m, dragOverColumnIndex: h, onColumnDragEnd: g, onColumnDragOver: _, onColumnDragStart: v, onColumnDrop: y, removeColumn: b } = QL({
|
|
30388
30389
|
createColumn(e) {
|
|
30389
30390
|
return {
|
|
30390
30391
|
align: "left",
|
|
@@ -30508,22 +30509,22 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30508
30509
|
let n = t === null ? void 0 : c.value[t];
|
|
30509
30510
|
n && (n.bind = e, l());
|
|
30510
30511
|
}
|
|
30511
|
-
function
|
|
30512
|
+
function oe(e) {
|
|
30512
30513
|
let t = String(e);
|
|
30513
30514
|
return f.value.columns[t] || (f.value.columns[t] = {
|
|
30514
30515
|
text: "",
|
|
30515
30516
|
type: "none"
|
|
30516
30517
|
}), f.value.columns[t];
|
|
30517
30518
|
}
|
|
30518
|
-
function
|
|
30519
|
-
let n =
|
|
30519
|
+
function se(e, t) {
|
|
30520
|
+
let n = oe(e);
|
|
30520
30521
|
n.type = t === "sum" || t === "text" ? t : "none", n.type === "text" && n.text === void 0 && (n.text = ""), l();
|
|
30521
30522
|
}
|
|
30522
|
-
function
|
|
30523
|
-
|
|
30523
|
+
function ce(e, t) {
|
|
30524
|
+
oe(e).text = t;
|
|
30524
30525
|
}
|
|
30525
30526
|
return (t, n) => {
|
|
30526
|
-
let u = sy, d = jS, b = MT, j = hC,
|
|
30527
|
+
let u = sy, d = jS, b = MT, j = hC, ae = fA;
|
|
30527
30528
|
return H(), L("div", $L, [e.tableMode === "columns" ? (H(), L(N, { key: 0 }, [
|
|
30528
30529
|
!x.value && !e.embedded ? (H(), F(HN, {
|
|
30529
30530
|
key: 0,
|
|
@@ -30731,7 +30732,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30731
30732
|
_: 2
|
|
30732
30733
|
}, 1032, ["label"]),
|
|
30733
30734
|
z(fP, { label: G(M)("designer.fieldTable.boldTitle") }, {
|
|
30734
|
-
default: q(() => [z(
|
|
30735
|
+
default: q(() => [z(ae, {
|
|
30735
30736
|
"model-value": t.bold === !0,
|
|
30736
30737
|
"onUpdate:modelValue": (e) => {
|
|
30737
30738
|
t.bold = e === !0, G(l)();
|
|
@@ -30759,7 +30760,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30759
30760
|
_: 2
|
|
30760
30761
|
}, 1032, ["label"]),
|
|
30761
30762
|
z(fP, { label: G(M)("designer.fieldTable.wrapTitle") }, {
|
|
30762
|
-
default: q(() => [z(
|
|
30763
|
+
default: q(() => [z(ae, {
|
|
30763
30764
|
"model-value": t.wrap !== !1,
|
|
30764
30765
|
"onUpdate:modelValue": (e) => {
|
|
30765
30766
|
t.wrap = e === !0, G(l)();
|
|
@@ -30840,7 +30841,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30840
30841
|
label: G(M)("designer.fieldTable.mergeSameTitle"),
|
|
30841
30842
|
help: G(M)("designer.fieldTable.mergeSameHelp")
|
|
30842
30843
|
}, {
|
|
30843
|
-
default: q(() => [z(
|
|
30844
|
+
default: q(() => [z(ae, {
|
|
30844
30845
|
"model-value": t.mergeSame === !0,
|
|
30845
30846
|
"onUpdate:modelValue": (e) => {
|
|
30846
30847
|
t.mergeSame = e === !0, G(l)();
|
|
@@ -30931,7 +30932,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30931
30932
|
options: k.value,
|
|
30932
30933
|
onPopupVisibleChange: G(o),
|
|
30933
30934
|
"onUpdate:modelValue": (e) => {
|
|
30934
|
-
|
|
30935
|
+
se(t, String(e));
|
|
30935
30936
|
}
|
|
30936
30937
|
}, null, 8, [
|
|
30937
30938
|
"model-value",
|
|
@@ -30949,7 +30950,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30949
30950
|
default: q(() => [z(SL, {
|
|
30950
30951
|
"model-value": G(f).columns[String(t)]?.text ?? "",
|
|
30951
30952
|
"onUpdate:modelValue": (e) => {
|
|
30952
|
-
|
|
30953
|
+
ce(t, String(e));
|
|
30953
30954
|
},
|
|
30954
30955
|
onCommit: G(l)
|
|
30955
30956
|
}, null, 8, [
|
|
@@ -30961,7 +30962,7 @@ var $L = { class: "field-table" }, eR = [
|
|
|
30961
30962
|
}, 1032, ["label"])) : I("", !0)]),
|
|
30962
30963
|
z(NL, {
|
|
30963
30964
|
"model-value": G(f).columns[String(t)]?.style,
|
|
30964
|
-
"onUpdate:modelValue": (e) =>
|
|
30965
|
+
"onUpdate:modelValue": (e) => oe(t).style = e,
|
|
30965
30966
|
onCommit: G(l)
|
|
30966
30967
|
}, null, 8, [
|
|
30967
30968
|
"model-value",
|
|
@@ -31031,11 +31032,11 @@ function fR(e) {
|
|
|
31031
31032
|
});
|
|
31032
31033
|
}
|
|
31033
31034
|
// src/designer/components/fields/use-table-headers.ts
|
|
31034
|
-
function pR(
|
|
31035
|
-
let { selection: n, table:
|
|
31035
|
+
function pR(e) {
|
|
31036
|
+
let { selection: n, table: r } = e, a = U(!1), s = P(() => eL(r.value)), c = P(() => !!r.value.headerRows?.length), l = P(() => {
|
|
31036
31037
|
let e = n.value;
|
|
31037
|
-
return !!(e && (e.colspan > 1 || e.rowspan > 1) && !(
|
|
31038
|
-
}), u = P(() => (
|
|
31038
|
+
return !!(e && (e.colspan > 1 || e.rowspan > 1) && !(r.value.headerMerges ?? []).some((t) => e.row === t.row && e.col === t.col && e.rowspan === t.rowspan && e.colspan === t.colspan));
|
|
31039
|
+
}), u = P(() => (r.value.headerMerges ?? []).some(d));
|
|
31039
31040
|
function d(e) {
|
|
31040
31041
|
let t = n.value;
|
|
31041
31042
|
return !!(t && e.row >= t.row && e.row < t.row + t.rowspan && e.col >= t.col && e.col < t.col + t.colspan);
|
|
@@ -31043,49 +31044,49 @@ function pR(t) {
|
|
|
31043
31044
|
function f(n, l, u) {
|
|
31044
31045
|
let d = String(u);
|
|
31045
31046
|
if ((s.value[n]?.[l] ?? "") === d) return;
|
|
31046
|
-
if (
|
|
31047
|
-
let
|
|
31048
|
-
|
|
31047
|
+
if (a.value = !0, c.value) {
|
|
31048
|
+
let t = s.value.map((e) => [...e]);
|
|
31049
|
+
t[n][l] = d, e.write({ headerRows: t });
|
|
31049
31050
|
return;
|
|
31050
31051
|
}
|
|
31051
|
-
let f =
|
|
31052
|
-
if (
|
|
31053
|
-
let
|
|
31054
|
-
if (!
|
|
31055
|
-
let
|
|
31056
|
-
Array.isArray(
|
|
31052
|
+
let f = r.value.columns.map((n, r) => {
|
|
31053
|
+
if (r !== l) return n;
|
|
31054
|
+
let a = n.bind, s = e.getRowsBinding();
|
|
31055
|
+
if (!a && s) {
|
|
31056
|
+
let r = t(i(e.getInput()), s);
|
|
31057
|
+
Array.isArray(r) && r.length > 0 && (a = o(n.title, r[0]) || void 0);
|
|
31057
31058
|
}
|
|
31058
31059
|
return {
|
|
31059
31060
|
...n,
|
|
31060
|
-
bind:
|
|
31061
|
+
bind: a,
|
|
31061
31062
|
title: d
|
|
31062
31063
|
};
|
|
31063
31064
|
});
|
|
31064
|
-
|
|
31065
|
+
e.write({ columns: f });
|
|
31065
31066
|
}
|
|
31066
31067
|
function p() {
|
|
31067
|
-
|
|
31068
|
+
a.value && (a.value = !1, e.commit());
|
|
31068
31069
|
}
|
|
31069
31070
|
function m() {
|
|
31070
|
-
n.value && l.value && (
|
|
31071
|
+
n.value && l.value && (e.write({ headerMerges: [...(r.value.headerMerges ?? []).filter((e) => !d(e)), { ...n.value }] }), e.commit());
|
|
31071
31072
|
}
|
|
31072
31073
|
function h() {
|
|
31073
|
-
|
|
31074
|
+
e.write({ headerMerges: (r.value.headerMerges ?? []).filter((e) => !d(e)) }), e.commit();
|
|
31074
31075
|
}
|
|
31075
31076
|
function g() {
|
|
31076
|
-
|
|
31077
|
+
e.write({ headerRows: [...s.value, r.value.columns.map(() => "")] }), e.commit();
|
|
31077
31078
|
}
|
|
31078
31079
|
function _() {
|
|
31079
|
-
let
|
|
31080
|
-
if (
|
|
31081
|
-
let
|
|
31082
|
-
|
|
31083
|
-
headerMerges:
|
|
31084
|
-
...
|
|
31085
|
-
row:
|
|
31086
|
-
} :
|
|
31087
|
-
headerRows: s.value.filter((
|
|
31088
|
-
}),
|
|
31080
|
+
let t = n.value?.row;
|
|
31081
|
+
if (t === void 0 || s.value.length <= 1) return;
|
|
31082
|
+
let i = r.value.headerMerges ?? [];
|
|
31083
|
+
i.some((e) => t >= e.row && t < e.row + e.rowspan) ? e.onBlocked() : (e.write({
|
|
31084
|
+
headerMerges: i.map((e) => e.row > t ? {
|
|
31085
|
+
...e,
|
|
31086
|
+
row: e.row - 1
|
|
31087
|
+
} : e),
|
|
31088
|
+
headerRows: s.value.filter((e, n) => n !== t)
|
|
31089
|
+
}), e.commit(), e.clearSelection());
|
|
31089
31090
|
}
|
|
31090
31091
|
return {
|
|
31091
31092
|
addRow: g,
|
|
@@ -31137,19 +31138,19 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31137
31138
|
}),
|
|
31138
31139
|
emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
|
|
31139
31140
|
setup(e, { emit: t }) {
|
|
31140
|
-
let n = e,
|
|
31141
|
+
let n = e, r = Dn(e, "modelValue"), a = t, o = vz(), s = o.store(), c = U(0), u = U(!1), d = P(() => S(r.value)), f = P(() => eL(d.value)), p = P(() => k(d.value.columns.map((e) => ({
|
|
31141
31142
|
...e,
|
|
31142
31143
|
mergeSame: !1
|
|
31143
31144
|
})), f.value, d.value.headerMerges)), m = P(() => b(d.value, n.node?.width ?? 120)), h = P(() => m.value.reduce((e, t) => e + t, 0) || 1), g = P(() => Math.max(280, ...m.value.map((e) => 80 * h.value / e))), _ = P(() => {
|
|
31144
31145
|
let e = d.value;
|
|
31145
31146
|
if (n.node && n.bindings?.rows) {
|
|
31146
|
-
let t = new
|
|
31147
|
+
let t = new l(), a = i(ct(s.document.data));
|
|
31147
31148
|
a.elements = o.elements;
|
|
31148
|
-
let
|
|
31149
|
+
let c = ne({
|
|
31149
31150
|
...n.node,
|
|
31150
|
-
props:
|
|
31151
|
+
props: r.value
|
|
31151
31152
|
}, a, t);
|
|
31152
|
-
e = S(
|
|
31153
|
+
e = S(c.props);
|
|
31153
31154
|
}
|
|
31154
31155
|
return w({
|
|
31155
31156
|
...e,
|
|
@@ -31163,7 +31164,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31163
31164
|
elementWidthMm: n.node?.width ?? 120,
|
|
31164
31165
|
rows: e.rows.slice(0, 3)
|
|
31165
31166
|
}).rows;
|
|
31166
|
-
}), v = P(() => Math.min(
|
|
31167
|
+
}), v = P(() => Math.min(c.value, Math.max(0, d.value.columns.length - 1))), { begin: y, clear: x, contains: C, focus: T, select: E, selection: D } = fR({
|
|
31167
31168
|
columnCount: P(() => d.value.columns.length),
|
|
31168
31169
|
merges: P(() => d.value.headerMerges ?? []),
|
|
31169
31170
|
onColumnSelect: me,
|
|
@@ -31171,7 +31172,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31171
31172
|
}), { addRow: O, canMerge: A, canSplit: j, commitText: ee, mergeSelection: te, removeRow: re, setText: ie, splitSelection: ae } = pR({
|
|
31172
31173
|
clearSelection: x,
|
|
31173
31174
|
commit: ve,
|
|
31174
|
-
getInput: () =>
|
|
31175
|
+
getInput: () => ct(s.document.data),
|
|
31175
31176
|
getRowsBinding: () => n.bindings?.rows,
|
|
31176
31177
|
onBlocked: pe,
|
|
31177
31178
|
selection: D,
|
|
@@ -31200,16 +31201,16 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31200
31201
|
function fe(e) {
|
|
31201
31202
|
if (n.widthOnly) {
|
|
31202
31203
|
let t = e.columns;
|
|
31203
|
-
t && (
|
|
31204
|
-
...
|
|
31204
|
+
t && (r.value = {
|
|
31205
|
+
...r.value,
|
|
31205
31206
|
columns: d.value.columns.map((e, n) => ({
|
|
31206
31207
|
...e,
|
|
31207
31208
|
width: t[n]?.width ?? e.width,
|
|
31208
31209
|
widthMode: t[n]?.widthMode ?? e.widthMode
|
|
31209
31210
|
}))
|
|
31210
31211
|
});
|
|
31211
|
-
} else
|
|
31212
|
-
...
|
|
31212
|
+
} else r.value = {
|
|
31213
|
+
...r.value,
|
|
31213
31214
|
...e
|
|
31214
31215
|
};
|
|
31215
31216
|
}
|
|
@@ -31217,16 +31218,16 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31217
31218
|
s.ui.toast(M("designer.tableStructure.mergeProtected"));
|
|
31218
31219
|
}
|
|
31219
31220
|
function me(e) {
|
|
31220
|
-
|
|
31221
|
+
c.value = e;
|
|
31221
31222
|
}
|
|
31222
31223
|
function he() {
|
|
31223
|
-
oe() && (
|
|
31224
|
+
oe() && (c.value = d.value.columns.length - 1);
|
|
31224
31225
|
}
|
|
31225
31226
|
function ge() {
|
|
31226
31227
|
ue(v.value);
|
|
31227
31228
|
}
|
|
31228
31229
|
function _e(e, t) {
|
|
31229
|
-
ce(e, t) && (
|
|
31230
|
+
ce(e, t) && (c.value = t);
|
|
31230
31231
|
}
|
|
31231
31232
|
function ve() {
|
|
31232
31233
|
a("commit");
|
|
@@ -31241,27 +31242,27 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31241
31242
|
};
|
|
31242
31243
|
}
|
|
31243
31244
|
function xe(e) {
|
|
31244
|
-
|
|
31245
|
+
c.value = e, x();
|
|
31245
31246
|
}
|
|
31246
31247
|
return QN("column", (e) => {
|
|
31247
|
-
|
|
31248
|
+
c.value = e ?? 0;
|
|
31248
31249
|
}), (t, n) => {
|
|
31249
|
-
let
|
|
31250
|
+
let i = sy;
|
|
31250
31251
|
return H(), L("div", mR, [
|
|
31251
31252
|
z(JN, { title: G(M)("designer.tableStructure.headerSection") }, {
|
|
31252
31253
|
default: q(() => [R("div", hR, [
|
|
31253
31254
|
e.widthOnly ? I("", !0) : (H(), L("div", gR, [z(fP, { label: G(M)("elements.tableElement.showHeaderLabel") }, {
|
|
31254
31255
|
default: q(() => [z(jI, {
|
|
31255
31256
|
"model-value": d.value.headerVisible !== !1,
|
|
31256
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
31257
|
-
...
|
|
31257
|
+
"onUpdate:modelValue": n[0] ||= (e) => r.value = {
|
|
31258
|
+
...r.value,
|
|
31258
31259
|
headerVisible: e
|
|
31259
31260
|
},
|
|
31260
31261
|
onCommit: ve
|
|
31261
31262
|
}, null, 8, ["model-value"])]),
|
|
31262
31263
|
_: 1
|
|
31263
31264
|
}, 8, ["label"])])),
|
|
31264
|
-
e.widthOnly ? I("", !0) : (H(), L("div", _R, [z(
|
|
31265
|
+
e.widthOnly ? I("", !0) : (H(), L("div", _R, [z(i, {
|
|
31265
31266
|
variant: "outline",
|
|
31266
31267
|
size: "small",
|
|
31267
31268
|
title: G(M)("designer.tableStructure.addColumn"),
|
|
@@ -31274,7 +31275,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31274
31275
|
default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.addColumn")), 1)]),
|
|
31275
31276
|
_: 1
|
|
31276
31277
|
}, 8, ["title"]), d.value.headerVisible === !1 ? I("", !0) : (H(), L(N, { key: 0 }, [
|
|
31277
|
-
z(
|
|
31278
|
+
z(i, {
|
|
31278
31279
|
variant: "outline",
|
|
31279
31280
|
size: "small",
|
|
31280
31281
|
onClick: G(O)
|
|
@@ -31286,7 +31287,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31286
31287
|
default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.addHeaderRow")), 1)]),
|
|
31287
31288
|
_: 1
|
|
31288
31289
|
}, 8, ["onClick"]),
|
|
31289
|
-
z(
|
|
31290
|
+
z(i, {
|
|
31290
31291
|
variant: "outline",
|
|
31291
31292
|
size: "small",
|
|
31292
31293
|
disabled: !G(D) || f.value.length <= 1,
|
|
@@ -31299,7 +31300,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31299
31300
|
default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.removeHeaderRow")), 1)]),
|
|
31300
31301
|
_: 1
|
|
31301
31302
|
}, 8, ["disabled", "onClick"]),
|
|
31302
|
-
z(
|
|
31303
|
+
z(i, {
|
|
31303
31304
|
variant: "outline",
|
|
31304
31305
|
size: "small",
|
|
31305
31306
|
disabled: !G(A),
|
|
@@ -31312,7 +31313,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31312
31313
|
default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.mergeSelection")), 1)]),
|
|
31313
31314
|
_: 1
|
|
31314
31315
|
}, 8, ["disabled", "onClick"]),
|
|
31315
|
-
z(
|
|
31316
|
+
z(i, {
|
|
31316
31317
|
variant: "outline",
|
|
31317
31318
|
size: "small",
|
|
31318
31319
|
disabled: !G(j),
|
|
@@ -31416,7 +31417,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31416
31417
|
}, {
|
|
31417
31418
|
default: q(() => [R("div", OR, [R("div", kR, [
|
|
31418
31419
|
R("span", null, W(G(M)("designer.tableStructure.columnSettings", { number: v.value + 1 })), 1),
|
|
31419
|
-
e.widthOnly ? I("", !0) : (H(), F(
|
|
31420
|
+
e.widthOnly ? I("", !0) : (H(), F(i, {
|
|
31420
31421
|
key: 0,
|
|
31421
31422
|
variant: "text",
|
|
31422
31423
|
shape: "square",
|
|
@@ -31435,7 +31436,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31435
31436
|
"aria-label",
|
|
31436
31437
|
"aria-expanded"
|
|
31437
31438
|
])),
|
|
31438
|
-
e.widthOnly ? I("", !0) : (H(), F(
|
|
31439
|
+
e.widthOnly ? I("", !0) : (H(), F(i, {
|
|
31439
31440
|
key: 1,
|
|
31440
31441
|
variant: "text",
|
|
31441
31442
|
shape: "square",
|
|
@@ -31454,7 +31455,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31454
31455
|
"aria-label",
|
|
31455
31456
|
"disabled"
|
|
31456
31457
|
])),
|
|
31457
|
-
e.widthOnly ? I("", !0) : (H(), F(
|
|
31458
|
+
e.widthOnly ? I("", !0) : (H(), F(i, {
|
|
31458
31459
|
key: 2,
|
|
31459
31460
|
variant: "text",
|
|
31460
31461
|
shape: "square",
|
|
@@ -31473,7 +31474,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31473
31474
|
"aria-label",
|
|
31474
31475
|
"disabled"
|
|
31475
31476
|
])),
|
|
31476
|
-
e.widthOnly ? I("", !0) : (H(), F(
|
|
31477
|
+
e.widthOnly ? I("", !0) : (H(), F(i, {
|
|
31477
31478
|
key: 3,
|
|
31478
31479
|
variant: "text",
|
|
31479
31480
|
theme: "danger",
|
|
@@ -31490,7 +31491,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31490
31491
|
}, 8, ["title", "aria-label"]))
|
|
31491
31492
|
]), d.value.columns.length ? (H(), F(uR, {
|
|
31492
31493
|
key: 0,
|
|
31493
|
-
"props-object":
|
|
31494
|
+
"props-object": r.value,
|
|
31494
31495
|
bindings: e.bindings,
|
|
31495
31496
|
"table-mode": "columns",
|
|
31496
31497
|
"column-index": v.value,
|
|
@@ -31510,9 +31511,9 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31510
31511
|
}, 8, ["title"])) : I("", !0),
|
|
31511
31512
|
e.widthOnly ? I("", !0) : (H(), F(AL, {
|
|
31512
31513
|
key: 1,
|
|
31513
|
-
"props-object":
|
|
31514
|
+
"props-object": r.value,
|
|
31514
31515
|
bindings: e.bindings,
|
|
31515
|
-
"onUpdate:propsObject": n[7] ||= (e) =>
|
|
31516
|
+
"onUpdate:propsObject": n[7] ||= (e) => r.value = e,
|
|
31516
31517
|
onCommit: ve
|
|
31517
31518
|
}, null, 8, ["props-object", "bindings"]))
|
|
31518
31519
|
]);
|
|
@@ -31532,7 +31533,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
|
|
|
31532
31533
|
}),
|
|
31533
31534
|
emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
|
|
31534
31535
|
setup(e, { emit: t }) {
|
|
31535
|
-
let n = e, r = Dn(e, "modelValue"), i = t, a = vz(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node :
|
|
31536
|
+
let n = e, r = Dn(e, "modelValue"), i = t, a = vz(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node : fe(a.store().document.data, {
|
|
31536
31537
|
...n.node,
|
|
31537
31538
|
props: r.value
|
|
31538
31539
|
}, a.elements)), s = P({
|
|
@@ -31637,7 +31638,7 @@ var FR = {
|
|
|
31637
31638
|
}, IR = {
|
|
31638
31639
|
name: "builtin:template-library",
|
|
31639
31640
|
setup(e) {
|
|
31640
|
-
let t = e.templateLibrary.register(
|
|
31641
|
+
let t = e.templateLibrary.register(Xe()), n = e.commands.registerScoped([
|
|
31641
31642
|
{
|
|
31642
31643
|
dividerBefore: !0,
|
|
31643
31644
|
group: "file",
|
|
@@ -31683,13 +31684,13 @@ var FR = {
|
|
|
31683
31684
|
try {
|
|
31684
31685
|
o = JSON.parse(a);
|
|
31685
31686
|
} catch (e) {
|
|
31686
|
-
throw new
|
|
31687
|
+
throw new nt(M("designer.documentStore.invalidDocumentMessage"), {
|
|
31687
31688
|
cause: e,
|
|
31688
31689
|
code: "document.invalid"
|
|
31689
31690
|
});
|
|
31690
31691
|
}
|
|
31691
|
-
let { document: s, skippedTypes: c } =
|
|
31692
|
-
if (c.length) throw new
|
|
31692
|
+
let { document: s, skippedTypes: c } = _e(o, e.elements);
|
|
31693
|
+
if (c.length) throw new nt(M("designer.documentStore.skippedElementTypesMessage", { elementTypes: c.join(", ") }), { code: "document.unsupported-elements" });
|
|
31693
31694
|
await r.create(s);
|
|
31694
31695
|
},
|
|
31695
31696
|
get title() {
|
|
@@ -31759,7 +31760,7 @@ function zR(e, t, n, r) {
|
|
|
31759
31760
|
return i;
|
|
31760
31761
|
}
|
|
31761
31762
|
function BR(e, t) {
|
|
31762
|
-
let n = Ne(e.props), r =
|
|
31763
|
+
let n = Ne(e.props), r = Ce(t, n.closed), i = LR(e, {
|
|
31763
31764
|
x: r.x + r.width / 2,
|
|
31764
31765
|
y: r.y + r.height / 2
|
|
31765
31766
|
}), a = r.width / n.viewWidth * e.width, o = r.height / n.viewHeight * e.height;
|
|
@@ -31905,7 +31906,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
31905
31906
|
onPointercancel: r[1] ||= (e) => d(!1),
|
|
31906
31907
|
onLostpointercapture: r[2] ||= (e) => d(!1)
|
|
31907
31908
|
}, [R("title", null, W(G(Ae)("editHelp")), 1), R("g", { transform: `scale(${i.value})` }, [R("path", {
|
|
31908
|
-
d: G(
|
|
31909
|
+
d: G(Ee)(a.value, e.node.props.closed === !0),
|
|
31909
31910
|
fill: "none",
|
|
31910
31911
|
stroke: "#287dff",
|
|
31911
31912
|
"stroke-width": 1 / i.value
|
|
@@ -31976,7 +31977,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
31976
31977
|
setup(e) {
|
|
31977
31978
|
let t = e, n = U(), r = U([]), i = U(), a = U(), o = U(), s = U(!1), c = P(() => t.context.canvas.pxPerMm), l = P(() => t.context.canvas.panning), u = P(() => {
|
|
31978
31979
|
let e = [...r.value];
|
|
31979
|
-
return i.value && a.value === void 0 && !s.value && e.push(Me(i.value)),
|
|
31980
|
+
return i.value && a.value === void 0 && !s.value && e.push(Me(i.value)), Ee(e, s.value);
|
|
31980
31981
|
}), d = `pen.${t.pageId}`, f;
|
|
31981
31982
|
eP([
|
|
31982
31983
|
{
|
|
@@ -32020,7 +32021,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
32020
32021
|
g(), r.value = [], i.value = void 0, s.value = !1;
|
|
32021
32022
|
}
|
|
32022
32023
|
function v(e = !1) {
|
|
32023
|
-
r.value.length < 2 || t.context.canvas.add(
|
|
32024
|
+
r.value.length < 2 || t.context.canvas.add(Ke, Ce(r.value, e), t.pageId), _();
|
|
32024
32025
|
}
|
|
32025
32026
|
function y() {
|
|
32026
32027
|
g(), r.value.pop(), s.value = !1, r.value.length === 0 && _();
|
|
@@ -32162,7 +32163,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
32162
32163
|
__name: "pen-overlay",
|
|
32163
32164
|
props: { context: {} },
|
|
32164
32165
|
setup(e) {
|
|
32165
|
-
let t = e, n = U(), r = Sn([]), i = P(() => t.context.canvas.activeTool ===
|
|
32166
|
+
let t = e, n = U(), r = Sn([]), i = P(() => t.context.canvas.activeTool === ve), a = P(() => {
|
|
32166
32167
|
let e = t.context.canvas;
|
|
32167
32168
|
if (e.activeTool !== "select" || e.previewing || e.panning) return;
|
|
32168
32169
|
let n = e.selection, r = n.length === 1 ? n[0] : void 0;
|
|
@@ -32227,7 +32228,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
32227
32228
|
pxPerMm: {}
|
|
32228
32229
|
},
|
|
32229
32230
|
setup(e) {
|
|
32230
|
-
let t = e, n = P(() => Ne(t.node.props)), r = P(() =>
|
|
32231
|
+
let t = e, n = P(() => Ne(t.node.props)), r = P(() => Ee(n.value.anchors, n.value.closed));
|
|
32231
32232
|
return (t, i) => (H(), L("svg", {
|
|
32232
32233
|
width: "100%",
|
|
32233
32234
|
height: "100%",
|
|
@@ -32259,7 +32260,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
|
|
|
32259
32260
|
setup(e) {
|
|
32260
32261
|
e.locales.register(ke);
|
|
32261
32262
|
let t = e.canvas.registerElement({
|
|
32262
|
-
...
|
|
32263
|
+
...Ge(),
|
|
32263
32264
|
previewComponent: en(sz)
|
|
32264
32265
|
}, { replace: !0 });
|
|
32265
32266
|
return e.slots.add("designer.shell.after", "pen.overlay", {
|
|
@@ -32297,12 +32298,12 @@ function uz() {
|
|
|
32297
32298
|
};
|
|
32298
32299
|
}
|
|
32299
32300
|
function s() {
|
|
32300
|
-
let r = [...e], i =
|
|
32301
|
+
let r = [...e], i = kt(t), a = kt(n);
|
|
32301
32302
|
return (e) => {
|
|
32302
32303
|
let t = e.store();
|
|
32303
32304
|
for (let t of r) t(e);
|
|
32304
32305
|
t.ui.closeContextMenu();
|
|
32305
|
-
let n =
|
|
32306
|
+
let n = kt(i);
|
|
32306
32307
|
if (n.dialog) {
|
|
32307
32308
|
let e = n.dialog, r = e.pageId === "$active" ? t.scope.active.id : e.pageId;
|
|
32308
32309
|
t.ui.openDialog(e.name, r, e.groupId, e.guideId, {
|
|
@@ -32335,7 +32336,7 @@ function dz(e, t) {
|
|
|
32335
32336
|
name: "field1",
|
|
32336
32337
|
type: "string"
|
|
32337
32338
|
}]
|
|
32338
|
-
}, o = "", s = 0, c, l = t?.createProps().fontSize, u = (t) =>
|
|
32339
|
+
}, o = "", s = 0, c, l = t?.createProps().fontSize, u = (t) => He(e.id, t), d = (e) => ({
|
|
32339
32340
|
selector: "[data-menu-label]",
|
|
32340
32341
|
text: M(`designer.types.${e}`)
|
|
32341
32342
|
}), f = (e) => ({ selector: `[data-command="${e}"]` }), p = (e = "") => ({ selector: `$dialog ${e}`.trim() });
|
|
@@ -32402,7 +32403,7 @@ function dz(e, t) {
|
|
|
32402
32403
|
text: t
|
|
32403
32404
|
}, M("designer.tutorialPlayback.optionHint", { setting: t })), i = {
|
|
32404
32405
|
...i,
|
|
32405
|
-
target: `element:${
|
|
32406
|
+
target: `element:${qe}`
|
|
32406
32407
|
}, r.updateUi({
|
|
32407
32408
|
select: void 0,
|
|
32408
32409
|
values: i
|
|
@@ -32470,35 +32471,35 @@ function dz(e, t) {
|
|
|
32470
32471
|
"table",
|
|
32471
32472
|
{
|
|
32472
32473
|
...t,
|
|
32473
|
-
id:
|
|
32474
|
+
id: qe,
|
|
32474
32475
|
name: u("detailsName")
|
|
32475
32476
|
},
|
|
32476
32477
|
e.store().scope.active.id
|
|
32477
32478
|
],
|
|
32478
32479
|
command: "element.add",
|
|
32479
32480
|
drawing: t,
|
|
32480
|
-
elementId:
|
|
32481
|
+
elementId: qe
|
|
32481
32482
|
}), r.remember((e) => {
|
|
32482
32483
|
let n = e.store();
|
|
32483
32484
|
n.element.add("table", {
|
|
32484
32485
|
...t,
|
|
32485
|
-
id:
|
|
32486
|
+
id: qe,
|
|
32486
32487
|
name: u("detailsName")
|
|
32487
|
-
}, n.scope.active.id), n.selection.set([
|
|
32488
|
-
}), T({ selector: `[data-element-id="${
|
|
32488
|
+
}, n.scope.active.id), n.selection.set([qe]);
|
|
32489
|
+
}), T({ selector: `[data-element-id="${qe}"]` }, M("designer.tutorialPlayback.elementMenuHint")), g(f("element.openSettings")), r.updateUi({
|
|
32489
32490
|
dialog: { name: "element" },
|
|
32490
32491
|
tab: void 0
|
|
32491
32492
|
}), x(M("elements.tableElement.dataTab")), g(p("[data-inspector-key=\"rows\"] .inspector-field__binding button"), M("designer.tutorialPlayback.tableDataTabHint")), r.updateUi({ binding: {
|
|
32492
32493
|
field: "rows",
|
|
32493
|
-
nodeId:
|
|
32494
|
+
nodeId: qe,
|
|
32494
32495
|
path: ""
|
|
32495
32496
|
} }), g({ selector: "$dialog button[title=\"bill.items\"]" }, M("designer.tutorialPlayback.collectionHint")), r.updateUi({ binding: {
|
|
32496
32497
|
field: "rows",
|
|
32497
|
-
nodeId:
|
|
32498
|
+
nodeId: qe,
|
|
32498
32499
|
path: "bill.items"
|
|
32499
|
-
} }), g(p("#replace")), r.remember((e) => e.store().element.update(
|
|
32500
|
+
} }), g(p("#replace")), r.remember((e) => e.store().element.update(qe, { bindings: { rows: "bill.items" } })), r.updateUi({ binding: void 0 }), x(M("elements.tableElement.columnsTab"));
|
|
32500
32501
|
let n = [];
|
|
32501
|
-
|
|
32502
|
+
Le.forEach((e, t) => {
|
|
32502
32503
|
n.push({
|
|
32503
32504
|
target: {
|
|
32504
32505
|
...p(`[data-header-row="0"][data-header-col="${t}"]`),
|
|
@@ -32512,16 +32513,16 @@ function dz(e, t) {
|
|
|
32512
32513
|
},
|
|
32513
32514
|
value: e.bind
|
|
32514
32515
|
});
|
|
32515
|
-
}), h("input", p(".table-structure"), M("designer.tutorialPlayback.columnsTitle"), M("designer.tutorialPlayback.columnsHint"), { inputs: n }),
|
|
32516
|
+
}), h("input", p(".table-structure"), M("designer.tutorialPlayback.columnsTitle"), M("designer.tutorialPlayback.columnsHint"), { inputs: n }), Le.forEach((e, t) => {
|
|
32516
32517
|
O(t, {
|
|
32517
32518
|
bind: e.bind,
|
|
32518
32519
|
title: u(e.key)
|
|
32519
32520
|
});
|
|
32520
|
-
}), r.updateUi({ column:
|
|
32521
|
+
}), r.updateUi({ column: Le.length - 1 }), w();
|
|
32521
32522
|
}
|
|
32522
32523
|
function O(e, t) {
|
|
32523
32524
|
r.remember((n) => {
|
|
32524
|
-
let r = n.store(), i = r.element.find(
|
|
32525
|
+
let r = n.store(), i = r.element.find(qe)?.node;
|
|
32525
32526
|
if (!i) return;
|
|
32526
32527
|
let a = i.props.columns.map((n, r) => r === e ? {
|
|
32527
32528
|
...n,
|
|
@@ -32533,7 +32534,7 @@ function dz(e, t) {
|
|
|
32533
32534
|
function k(e, t = !1, n = !1) {
|
|
32534
32535
|
r.updateUi({
|
|
32535
32536
|
dataSource: {
|
|
32536
|
-
draft:
|
|
32537
|
+
draft: kt(a),
|
|
32537
32538
|
replacement: t,
|
|
32538
32539
|
sampleJson: o,
|
|
32539
32540
|
saved: n,
|
|
@@ -32597,12 +32598,12 @@ function dz(e, t) {
|
|
|
32597
32598
|
}, null, 2), M("designer.dataSourceDialog.sampleDataLabel"), void 0, M("designer.tutorialPlayback.sampleInputPurpose")), o = n.at(-1)?.value ?? "", k("sample"), g({
|
|
32598
32599
|
selector: "$dialog button",
|
|
32599
32600
|
text: M("designer.dataSourceDialog.generateSchemaButton")
|
|
32600
|
-
}, M("designer.tutorialPlayback.inferSchemaHint")), k("sample", !0), g(p(".t-dialog__footer .t-button--theme-primary")), a.schema =
|
|
32601
|
-
let j =
|
|
32601
|
+
}, M("designer.tutorialPlayback.inferSchemaHint")), k("sample", !0), g(p(".t-dialog__footer .t-button--theme-primary")), a.schema = ot(JSON.parse(o)), k("schema"), g(p("#save"));
|
|
32602
|
+
let j = kt({
|
|
32602
32603
|
...a,
|
|
32603
32604
|
sampleData: JSON.parse(o)
|
|
32604
32605
|
});
|
|
32605
|
-
return r.remember((e) => e.store().dataSource.upsert(
|
|
32606
|
+
return r.remember((e) => e.store().dataSource.upsert(kt(j))), k("schema", !1, !0), g(p("#close")), r.closeUi(), i = {}, E("tutorial-number", { y: 33 }, M("designer.tutorial.documentNumber", {
|
|
32606
32607
|
date: "{{ bill.date }}",
|
|
32607
32608
|
number: "{{ bill.number }}"
|
|
32608
32609
|
})), D(), E("tutorial-total", { y: 77 }, M("designer.tutorial.documentTotal", { amount: "{{ bill.total | currency }}" })), E("tutorial-signature", { y: 88 }, u("signature")), m(), h("command", { selector: "[data-element-id=\"tutorial-total\"]" }, M("designer.tutorialPlayback.selectTitle"), M("designer.tutorialPlayback.followSelectHint"), {
|
|
@@ -32614,7 +32615,7 @@ function dz(e, t) {
|
|
|
32614
32615
|
}), y("name", M("designer.tutorial.documentSummary"), "designer.followBlock.nameLabel"), S(p("[data-sform-field=\"target\"] .t-select"), u("detailsName")), y("gap", 5, "designer.followBlock.gapLabel"), g(p("#confirm")), r.remember((e) => {
|
|
32615
32616
|
let t = e.store();
|
|
32616
32617
|
t.followBlock.create(t.page.list[0].id, ["tutorial-total", "tutorial-signature"], {
|
|
32617
|
-
id:
|
|
32618
|
+
id: qe,
|
|
32618
32619
|
kind: "element"
|
|
32619
32620
|
}, 5, M("designer.tutorial.documentSummary"));
|
|
32620
32621
|
}), r.closeUi(), i = {}, m(), g(d("page")), r.updateUi({ menu: M("designer.types.page") }), g(f("page.add")), r.updateUi({
|
|
@@ -32643,7 +32644,7 @@ var fz = {
|
|
|
32643
32644
|
id: "tutorial.start",
|
|
32644
32645
|
run: (t, n) => {
|
|
32645
32646
|
if (typeof n == "string") {
|
|
32646
|
-
let t =
|
|
32647
|
+
let t = Ue.find((e) => e.id === n);
|
|
32647
32648
|
t && e.store().tutorial.start(n, () => dz(t, e.elements.get("text")));
|
|
32648
32649
|
}
|
|
32649
32650
|
},
|
|
@@ -32695,7 +32696,7 @@ var fz = {
|
|
|
32695
32696
|
setup: (e) => na(e)
|
|
32696
32697
|
};
|
|
32697
32698
|
function mz(e, t = (t) => e.plugins.use(t)) {
|
|
32698
|
-
e.plugins.has(
|
|
32699
|
+
e.plugins.has(be.name) || (e.plugins.trustHostPlugin(be), t(be)), Te(e);
|
|
32699
32700
|
for (let n of [
|
|
32700
32701
|
pz,
|
|
32701
32702
|
fz,
|
|
@@ -32711,14 +32712,14 @@ function mz(e, t = (t) => e.plugins.use(t)) {
|
|
|
32711
32712
|
var hz = null;
|
|
32712
32713
|
function gz() {
|
|
32713
32714
|
if (hz) return hz;
|
|
32714
|
-
let e =
|
|
32715
|
-
commands: new
|
|
32716
|
-
elements:
|
|
32717
|
-
errors:
|
|
32715
|
+
let e = De(), t = new ye(), n = {
|
|
32716
|
+
commands: new we(() => n, e),
|
|
32717
|
+
elements: ue,
|
|
32718
|
+
errors: tt(),
|
|
32718
32719
|
events: e,
|
|
32719
32720
|
extensions: t,
|
|
32720
32721
|
getSelection: () => {
|
|
32721
|
-
let e =
|
|
32722
|
+
let e = Be(), t = e.selection.nodes;
|
|
32722
32723
|
return {
|
|
32723
32724
|
bounds: e.selection.bounds,
|
|
32724
32725
|
ids: [...e.selection.ids],
|
|
@@ -32728,9 +32729,9 @@ function gz() {
|
|
|
32728
32729
|
},
|
|
32729
32730
|
parsers: g,
|
|
32730
32731
|
plugins: new Fe(() => n),
|
|
32731
|
-
preferences: new
|
|
32732
|
-
store: () =>
|
|
32733
|
-
templateLibrary: new
|
|
32732
|
+
preferences: new ze(),
|
|
32733
|
+
store: () => Be(),
|
|
32734
|
+
templateLibrary: new $e(),
|
|
32734
32735
|
get use() {
|
|
32735
32736
|
return n.plugins.use.bind(n.plugins);
|
|
32736
32737
|
},
|
|
@@ -32741,15 +32742,15 @@ function gz() {
|
|
|
32741
32742
|
return hz = n, n;
|
|
32742
32743
|
}
|
|
32743
32744
|
function _z(e, t = {}) {
|
|
32744
|
-
let n =
|
|
32745
|
-
return hz = n, n.store().config.configure(t), e.provide(
|
|
32745
|
+
let n = Ze(t);
|
|
32746
|
+
return hz = n, n.store().config.configure(t), e.provide(Ye, n), e.provide(se, n.zIndex), Ci(e, n.errors), Si(n.errors), mz(n), n;
|
|
32746
32747
|
}
|
|
32747
32748
|
function vz() {
|
|
32748
|
-
return Zt(
|
|
32749
|
+
return Zt(Ye, null) ?? gz();
|
|
32749
32750
|
}
|
|
32750
32751
|
// src/designer/facade/use-print-studio.ts
|
|
32751
32752
|
function yz(e = {}) {
|
|
32752
|
-
let t = Xt() ? Zt(
|
|
32753
|
+
let t = Xt() ? Zt(Ye, null) : null, n = e.context ?? t, r = n ? Je(n, e) : Qe(e);
|
|
32753
32754
|
return Kt() && ln(r.dispose), r;
|
|
32754
32755
|
}
|
|
32755
32756
|
// src/designer/frame/print-designer-frame.vue
|
|
@@ -32777,15 +32778,15 @@ var bz = /* @__PURE__ */ B({
|
|
|
32777
32778
|
"ready"
|
|
32778
32779
|
],
|
|
32779
32780
|
setup(e, { expose: t, emit: n }) {
|
|
32780
|
-
let r = e, i = n, a = U(), o = (r.studio ?
|
|
32781
|
-
createDocument: () =>
|
|
32781
|
+
let r = e, i = n, a = U(), o = (r.studio ? We(r.studio) : r.context) ?? Ze({
|
|
32782
|
+
createDocument: () => Ft(r.presets),
|
|
32782
32783
|
elements: r.elements,
|
|
32783
32784
|
initialDocument: r.initialDocument,
|
|
32784
32785
|
onSave: r.onSave ? h : void 0,
|
|
32785
32786
|
parsers: r.parsers,
|
|
32786
32787
|
rendering: r.rendering,
|
|
32787
32788
|
storage: r.storage ?? !1
|
|
32788
|
-
}), s, c = !1, l = r.studio ?
|
|
32789
|
+
}), s, c = !1, l = r.studio ? Re(r.studio, d) : void 0, u = xn({
|
|
32789
32790
|
context: o,
|
|
32790
32791
|
"onDirty-change": (e) => i("dirty-change", e),
|
|
32791
32792
|
onDispose: d,
|
|
@@ -32834,7 +32835,7 @@ var bz = /* @__PURE__ */ B({
|
|
|
32834
32835
|
u.ui = e;
|
|
32835
32836
|
}), cn(() => {
|
|
32836
32837
|
if (a.value && !c) try {
|
|
32837
|
-
s =
|
|
32838
|
+
s = le(a.value, u);
|
|
32838
32839
|
} catch (e) {
|
|
32839
32840
|
_(e), d();
|
|
32840
32841
|
}
|
|
@@ -32845,4 +32846,4 @@ var bz = /* @__PURE__ */ B({
|
|
|
32845
32846
|
}, null, 512));
|
|
32846
32847
|
}
|
|
32847
32848
|
});
|
|
32848
|
-
export { bz as PrintDesigner,
|
|
32849
|
+
export { bz as PrintDesigner, Ze as createEditorContext, It as definePlugin, _z as installDesigner, yz as usePrintStudio };
|