@cluadwong/form-designer 0.2.0 → 0.3.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 +2 -1
- package/dist/chunks/designer-ui.js +1383 -1302
- package/dist/chunks/renderer-core.js +1105 -1048
- package/dist/components/designer/FormDesigner.vue.d.ts.map +1 -1
- package/dist/components/designer/HelpPanel.vue.d.ts.map +1 -1
- package/dist/components/designer/InspectorPanel.vue.d.ts.map +1 -1
- package/dist/components/designer/PaletteSidebar.vue.d.ts.map +1 -1
- package/dist/components/designer/composables/useSchemaEdits.d.ts +5 -2
- package/dist/components/designer/composables/useSchemaEdits.d.ts.map +1 -1
- package/dist/components/designer/inspectors/FieldPInspector.vue.d.ts +9 -1
- package/dist/components/designer/inspectors/FieldPInspector.vue.d.ts.map +1 -1
- package/dist/components/designer/inspectors/ParamsFields.vue.d.ts +9 -0
- package/dist/components/designer/inspectors/ParamsFields.vue.d.ts.map +1 -0
- package/dist/components/designer/inspectors/TableInspector.vue.d.ts.map +1 -1
- package/dist/components/renderer-v2/FormRenderer.vue.d.ts +3 -3
- package/dist/components/renderer-v2/FormRenderer.vue.d.ts.map +1 -1
- package/dist/components/renderer-v2/GridFormRenderer.vue.d.ts +3 -3
- package/dist/components/renderer-v2/GridFormRenderer.vue.d.ts.map +1 -1
- package/dist/components/renderer-v2/GridSchemaNode.vue.d.ts +3 -3
- package/dist/components/renderer-v2/GridSchemaNode.vue.d.ts.map +1 -1
- package/dist/designer-ui.css +2 -2
- package/dist/designer.js +12 -11
- package/dist/index.js +24 -24
- package/dist/renderer-core.css +1 -1
- package/dist/renderer.js +25 -25
- package/dist/ticket-designer.css +2 -2
- package/dist/types/schema-v2-serialization.d.ts.map +1 -1
- package/dist/types/schema-v2.d.ts +36 -15
- package/dist/types/schema-v2.d.ts.map +1 -1
- package/dist/utils/date-format.d.ts +11 -5
- package/dist/utils/date-format.d.ts.map +1 -1
- package/dist/utils/node-params.d.ts +35 -0
- package/dist/utils/node-params.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as X, ref as G, watch as
|
|
2
|
-
import { L as
|
|
1
|
+
import { defineComponent as X, ref as G, watch as ce, onMounted as tl, onUnmounted as lt, computed as N, openBlock as $, createElementBlock as I, normalizeClass as pe, createVNode as ae, normalizeStyle as Ae, createCommentVNode as q, nextTick as Ye, createElementVNode as l, createTextVNode as be, toDisplayString as E, Fragment as Q, renderList as ge, inject as $l, resolveComponent as Cl, withModifiers as ll, createBlock as oe, unref as x, useModel as al, withDirectives as wl, vModelCheckbox as Il, mergeModels as Xe, createStaticVNode as nl, reactive as xl, provide as kl, withCtx as Tl } from "vue";
|
|
2
|
+
import { L as $e, N as we, G as Fl, b as Ze, a as Ke, P as Qe, _ as ve, c as Dl, p as _e, s as ol, t as Nl, r as Pl, i as De, D as El, d as Jt, e as Al, f as et, g as il, u as Hl, h as Rl, j as Ll, k as Ml, l as Bl, m as Kt, n as Vl, o as Gl, q as zl, v as Ol, w as Wl, x as Ul, y as jl, z as Jl, A as Se, B as qt, C as Kl, E as ql, F as Ne, H as Yl, I as Xl, J as Zl, K as Ql, M as _l, O as ea, Q as ta, R as la, S as aa, T as na, U as oa, V as ia } from "./renderer-core.js";
|
|
3
3
|
const da = /* @__PURE__ */ X({
|
|
4
4
|
__name: "CanvasSurface",
|
|
5
5
|
props: {
|
|
@@ -12,31 +12,31 @@ const da = /* @__PURE__ */ X({
|
|
|
12
12
|
paginate: { type: Boolean, default: !0 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["node-drag-start", "field-change", "drop-node", "drop-palette", "drag-end"],
|
|
15
|
-
setup(e, { emit:
|
|
16
|
-
const t = e, a =
|
|
17
|
-
let
|
|
18
|
-
function
|
|
19
|
-
const c =
|
|
15
|
+
setup(e, { emit: r }) {
|
|
16
|
+
const t = e, a = r, o = G(null);
|
|
17
|
+
let u = null;
|
|
18
|
+
function f() {
|
|
19
|
+
const c = o.value;
|
|
20
20
|
if (!c) return;
|
|
21
|
-
const h = t.selectedNodeId ? c.querySelector(`[${
|
|
21
|
+
const h = t.selectedNodeId ? c.querySelector(`[${we}="${t.selectedNodeId}"]`) : null;
|
|
22
22
|
c.querySelectorAll(".is-design-selected").forEach((m) => {
|
|
23
23
|
m !== h && m.classList.remove("is-design-selected");
|
|
24
24
|
}), h && h.classList.add("is-design-selected");
|
|
25
25
|
}
|
|
26
26
|
function s() {
|
|
27
|
-
const c =
|
|
27
|
+
const c = o.value;
|
|
28
28
|
if (!c) return;
|
|
29
29
|
const h = U.value;
|
|
30
30
|
c.querySelectorAll("[data-node-id]:not(.layout-grid__cell)").forEach((m) => {
|
|
31
31
|
h ? m.setAttribute("draggable", "true") : m.removeAttribute("draggable");
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
function b() {
|
|
35
|
+
u == null || u.disconnect(), Ye(() => {
|
|
36
|
+
f(), s(), o.value && (u == null || u.observe(o.value, { childList: !0, subtree: !0 }));
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
ce(
|
|
40
40
|
() => [
|
|
41
41
|
t.selectedNodeId,
|
|
42
42
|
t.schema,
|
|
@@ -44,23 +44,23 @@ const da = /* @__PURE__ */ X({
|
|
|
44
44
|
t.mode,
|
|
45
45
|
t.readonly
|
|
46
46
|
],
|
|
47
|
-
|
|
47
|
+
b,
|
|
48
48
|
{ deep: !0, immediate: !0 }
|
|
49
|
-
),
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
const v =
|
|
49
|
+
), tl(() => {
|
|
50
|
+
u = new MutationObserver(b), b();
|
|
51
|
+
}), lt(() => u == null ? void 0 : u.disconnect());
|
|
52
|
+
const v = N(() => ({
|
|
53
53
|
"v2-canvas-surface--preview": t.mode !== "design"
|
|
54
|
-
})), p = G(null), g = G(-1),
|
|
55
|
-
const c = p.value, h = g.value, m =
|
|
54
|
+
})), p = G(null), g = G(-1), M = N(() => {
|
|
55
|
+
const c = p.value, h = g.value, m = o.value;
|
|
56
56
|
if (!c || h < 0 || !m) return null;
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
59
|
-
const F = m.getBoundingClientRect(),
|
|
60
|
-
(O) => O instanceof HTMLElement && O.hasAttribute(
|
|
57
|
+
const C = m.querySelector(`[${$e}="${c}"]`);
|
|
58
|
+
if (!C) return null;
|
|
59
|
+
const F = m.getBoundingClientRect(), P = Array.from(C.children).filter(
|
|
60
|
+
(O) => O instanceof HTMLElement && O.hasAttribute(we)
|
|
61
61
|
);
|
|
62
|
-
if (h <
|
|
63
|
-
const O =
|
|
62
|
+
if (h < P.length) {
|
|
63
|
+
const O = P[h].getBoundingClientRect();
|
|
64
64
|
return {
|
|
65
65
|
position: "absolute",
|
|
66
66
|
top: `${O.top - F.top}px`,
|
|
@@ -68,9 +68,9 @@ const da = /* @__PURE__ */ X({
|
|
|
68
68
|
width: `${O.width}px`
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const O =
|
|
71
|
+
const D = P[P.length - 1];
|
|
72
|
+
if (D) {
|
|
73
|
+
const O = D.getBoundingClientRect();
|
|
74
74
|
return {
|
|
75
75
|
position: "absolute",
|
|
76
76
|
top: `${O.bottom - F.top}px`,
|
|
@@ -78,7 +78,7 @@ const da = /* @__PURE__ */ X({
|
|
|
78
78
|
width: `${O.width}px`
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
const z =
|
|
81
|
+
const z = C.getBoundingClientRect();
|
|
82
82
|
return {
|
|
83
83
|
position: "absolute",
|
|
84
84
|
top: `${z.top - F.top}px`,
|
|
@@ -87,95 +87,95 @@ const da = /* @__PURE__ */ X({
|
|
|
87
87
|
};
|
|
88
88
|
}), A = G(/* @__PURE__ */ new Set());
|
|
89
89
|
let H = null;
|
|
90
|
-
const U =
|
|
90
|
+
const U = N(
|
|
91
91
|
() => t.mode === "design"
|
|
92
92
|
);
|
|
93
|
-
function
|
|
93
|
+
function Z(c) {
|
|
94
94
|
H && H !== c && H.classList.remove("v2-drop-target"), c && c !== H && c.classList.add("v2-drop-target"), H = c;
|
|
95
95
|
}
|
|
96
96
|
function j() {
|
|
97
97
|
H && (H.classList.remove("v2-drop-target"), H = null);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function le(c, h) {
|
|
100
100
|
const m = Array.from(c.children).filter(
|
|
101
|
-
(
|
|
101
|
+
(C) => C instanceof HTMLElement && C.hasAttribute(we)
|
|
102
102
|
);
|
|
103
|
-
for (let
|
|
104
|
-
const F = m[
|
|
105
|
-
if (h < F.top + F.height / 2) return
|
|
103
|
+
for (let C = 0; C < m.length; C += 1) {
|
|
104
|
+
const F = m[C].getBoundingClientRect();
|
|
105
|
+
if (h < F.top + F.height / 2) return C;
|
|
106
106
|
}
|
|
107
107
|
return m.length;
|
|
108
108
|
}
|
|
109
109
|
function ee(c) {
|
|
110
|
-
const h =
|
|
111
|
-
var
|
|
112
|
-
let
|
|
113
|
-
for (;
|
|
114
|
-
if (
|
|
115
|
-
|
|
110
|
+
const h = Ze(t.schema), m = [], C = (F) => {
|
|
111
|
+
var D, z;
|
|
112
|
+
let P = F;
|
|
113
|
+
for (; P; ) {
|
|
114
|
+
if (P === c) return !0;
|
|
115
|
+
P = (z = (D = h.get(P)) == null ? void 0 : D.parent) == null ? void 0 : z.id;
|
|
116
116
|
}
|
|
117
117
|
return !1;
|
|
118
118
|
};
|
|
119
119
|
t.schema.pages.forEach((F) => {
|
|
120
|
-
const
|
|
121
|
-
|
|
120
|
+
const P = (D) => {
|
|
121
|
+
D.forEach((z) => {
|
|
122
122
|
z.type === "grid" ? z.rows.forEach(
|
|
123
|
-
(O) => O.cells.forEach((
|
|
124
|
-
|
|
123
|
+
(O) => O.cells.forEach((fe) => {
|
|
124
|
+
C(fe.id) || m.push(fe.id), P(fe.children);
|
|
125
125
|
})
|
|
126
126
|
) : z.type === "table" && z.rowTemplate.forEach((O) => {
|
|
127
|
-
|
|
127
|
+
C(O.id) || m.push(O.id);
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
P(F.children);
|
|
132
132
|
}), A.value = new Set(m), a("node-drag-start", c);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function T(c) {
|
|
135
135
|
var O;
|
|
136
136
|
if (!U.value) return;
|
|
137
137
|
const h = c.target, m = (h == null ? void 0 : h.closest("[data-node-id]")) ?? null;
|
|
138
138
|
if (!m) return;
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
139
|
+
const C = m.closest(".layout-table");
|
|
140
|
+
if (C && C !== m) {
|
|
141
141
|
c.preventDefault();
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
const F = m.getAttribute("data-node-id") ?? "";
|
|
145
145
|
if (!F) return;
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
146
|
+
const P = (O = Ze(t.schema).get(F)) == null ? void 0 : O.node, D = P || void 0;
|
|
147
|
+
if (D && D.type === "p" && t.mode === "design" && D.mode === "field" && !D.prefix && !D.suffix && !c.altKey) {
|
|
148
148
|
c.preventDefault();
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
const z = c.dataTransfer;
|
|
152
|
-
z && (z.setData(
|
|
152
|
+
z && (z.setData(Ke, F), z.setData("text/plain", F), z.effectAllowed = "move", ee(F));
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function J(c) {
|
|
155
155
|
if (!U.value) return;
|
|
156
156
|
const h = c.dataTransfer;
|
|
157
157
|
if (!h) return;
|
|
158
|
-
const m = Array.from(h.types).includes(
|
|
159
|
-
if (!m && !
|
|
158
|
+
const m = Array.from(h.types).includes(Qe), C = Array.from(h.types).includes(Ke);
|
|
159
|
+
if (!m && !C) return;
|
|
160
160
|
if (m) {
|
|
161
161
|
c.preventDefault();
|
|
162
|
-
const
|
|
163
|
-
`[${
|
|
162
|
+
const D = c.target.closest(
|
|
163
|
+
`[${$e}]`
|
|
164
164
|
);
|
|
165
|
-
|
|
165
|
+
Z(D ?? null), p.value = null, g.value = -1;
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
Z(null);
|
|
169
169
|
const F = c.target.closest(
|
|
170
|
-
`[${
|
|
171
|
-
),
|
|
172
|
-
F &&
|
|
170
|
+
`[${$e}]`
|
|
171
|
+
), P = (F == null ? void 0 : F.dataset.layoutId) ?? null;
|
|
172
|
+
F && P && A.value.has(P) ? (c.preventDefault(), p.value = P, g.value = le(F, c.clientY)) : (p.value = null, g.value = -1);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function K(c) {
|
|
175
175
|
const h = c.relatedTarget;
|
|
176
|
-
(!h || !h.closest(`[${
|
|
176
|
+
(!h || !h.closest(`[${$e}]`)) && (j(), p.value = null, g.value = -1);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function _() {
|
|
179
179
|
p.value = null, g.value = -1, A.value = /* @__PURE__ */ new Set(), j();
|
|
180
180
|
}
|
|
181
181
|
function w(c) {
|
|
@@ -183,70 +183,70 @@ const da = /* @__PURE__ */ X({
|
|
|
183
183
|
const h = c.dataTransfer;
|
|
184
184
|
if (!h) return;
|
|
185
185
|
j(), c.preventDefault();
|
|
186
|
-
const m = h.getData(
|
|
186
|
+
const m = h.getData(Qe) ?? "";
|
|
187
187
|
if (m) {
|
|
188
|
-
const
|
|
189
|
-
`[${
|
|
190
|
-
), z = (
|
|
191
|
-
if (
|
|
188
|
+
const D = c.target.closest(
|
|
189
|
+
`[${$e}]`
|
|
190
|
+
), z = (D == null ? void 0 : D.dataset.layoutId) ?? null;
|
|
191
|
+
if (_(), !z) return;
|
|
192
192
|
a("drop-palette", { kind: m, cellId: z });
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
const
|
|
196
|
-
|
|
195
|
+
const C = h.getData(Ke) ?? "", F = p.value, P = g.value;
|
|
196
|
+
_(), !(!C || !F || P < 0) && a("drop-node", { moveId: C, cellId: F, index: P });
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
198
|
+
function S() {
|
|
199
|
+
_(), a("drag-end");
|
|
200
200
|
}
|
|
201
201
|
return (c, h) => ($(), I("div", {
|
|
202
202
|
ref_key: "root",
|
|
203
|
-
ref:
|
|
204
|
-
class:
|
|
205
|
-
onDragover:
|
|
206
|
-
onDragleave:
|
|
203
|
+
ref: o,
|
|
204
|
+
class: pe(["v2-canvas-surface", v.value]),
|
|
205
|
+
onDragover: J,
|
|
206
|
+
onDragleave: K,
|
|
207
207
|
onDrop: w,
|
|
208
|
-
onDragend:
|
|
209
|
-
onDragstart:
|
|
208
|
+
onDragend: S,
|
|
209
|
+
onDragstart: T
|
|
210
210
|
}, [
|
|
211
|
-
|
|
211
|
+
ae(Fl, {
|
|
212
212
|
schema: e.schema,
|
|
213
213
|
mode: e.mode,
|
|
214
214
|
data: e.data,
|
|
215
215
|
readonly: e.readonly,
|
|
216
216
|
bare: e.bare,
|
|
217
217
|
paginate: e.paginate,
|
|
218
|
-
onFieldChange: h[0] || (h[0] = (m,
|
|
218
|
+
onFieldChange: h[0] || (h[0] = (m, C) => a("field-change", m, C))
|
|
219
219
|
}, null, 8, ["schema", "mode", "data", "readonly", "bare", "paginate"]),
|
|
220
|
-
|
|
220
|
+
M.value ? ($(), I("div", {
|
|
221
221
|
key: 0,
|
|
222
222
|
class: "v2-insertion-line",
|
|
223
|
-
style:
|
|
224
|
-
}, null, 4)) :
|
|
223
|
+
style: Ae(M.value)
|
|
224
|
+
}, null, 4)) : q("", !0)
|
|
225
225
|
], 34));
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
228
|
-
function
|
|
229
|
-
return e ? Dl(e,
|
|
227
|
+
}), ra = /* @__PURE__ */ ve(da, [["__scopeId", "data-v-deb3136c"]]), ua = 2, sa = "ticket-schema-v2", va = "ticket-fill-data";
|
|
228
|
+
function tt(e, r = {}) {
|
|
229
|
+
return e ? Dl(e, r) : {};
|
|
230
230
|
}
|
|
231
|
-
function ca(e,
|
|
232
|
-
return
|
|
231
|
+
function ca(e, r = !0) {
|
|
232
|
+
return ol(e, r);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
234
|
+
function Yt(e, r = !0) {
|
|
235
|
+
return r ? JSON.stringify(e, null, ua) : JSON.stringify(e);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return `${e}-${
|
|
237
|
+
function dl(e, r = Date.now()) {
|
|
238
|
+
return `${e}-${r}.json`;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function rl(e, r) {
|
|
241
241
|
if (typeof document > "u" || typeof URL > "u" || typeof URL.createObjectURL != "function")
|
|
242
242
|
return;
|
|
243
|
-
const t = new Blob([
|
|
244
|
-
|
|
243
|
+
const t = new Blob([r], { type: "application/json" }), a = URL.createObjectURL(t), o = document.createElement("a");
|
|
244
|
+
o.href = a, o.download = e, o.click(), URL.revokeObjectURL(a);
|
|
245
245
|
}
|
|
246
246
|
function pa(e) {
|
|
247
|
-
return typeof e == "string" ?
|
|
247
|
+
return typeof e == "string" ? _e(e) : JSON.parse(JSON.stringify(e));
|
|
248
248
|
}
|
|
249
|
-
const fa = { class: "status-bar" },
|
|
249
|
+
const fa = { class: "status-bar" }, ba = { class: "status-group" }, ga = { class: "status-item" }, ma = {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "status-item",
|
|
252
252
|
"data-physical-page-count": "true"
|
|
@@ -263,34 +263,34 @@ const fa = { class: "status-bar" }, ga = { class: "status-group" }, ma = { class
|
|
|
263
263
|
paginateWarningCount: {}
|
|
264
264
|
},
|
|
265
265
|
setup(e) {
|
|
266
|
-
return (
|
|
267
|
-
l("div",
|
|
268
|
-
l("span",
|
|
269
|
-
t[0] || (t[0] =
|
|
270
|
-
l("strong", null,
|
|
266
|
+
return (r, t) => ($(), I("div", fa, [
|
|
267
|
+
l("div", ba, [
|
|
268
|
+
l("span", ga, [
|
|
269
|
+
t[0] || (t[0] = be(" 页数:", -1)),
|
|
270
|
+
l("strong", null, E(e.pageCount), 1)
|
|
271
271
|
]),
|
|
272
|
-
e.physicalPageCount != null && e.physicalPageCount !== e.pageCount ? ($(), I("span",
|
|
273
|
-
t[1] || (t[1] =
|
|
274
|
-
l("strong", null,
|
|
275
|
-
t[2] || (t[2] =
|
|
276
|
-
])) :
|
|
272
|
+
e.physicalPageCount != null && e.physicalPageCount !== e.pageCount ? ($(), I("span", ma, [
|
|
273
|
+
t[1] || (t[1] = be(" 打印:", -1)),
|
|
274
|
+
l("strong", null, E(e.physicalPageCount), 1),
|
|
275
|
+
t[2] || (t[2] = be(" 张 ", -1))
|
|
276
|
+
])) : q("", !0),
|
|
277
277
|
l("span", {
|
|
278
|
-
class:
|
|
278
|
+
class: pe(["status-item", "warning-count", { "has-warning": e.warningCount > 0 }])
|
|
279
279
|
}, [
|
|
280
|
-
t[3] || (t[3] =
|
|
281
|
-
l("strong", null,
|
|
280
|
+
t[3] || (t[3] = be(" 待处理问题:", -1)),
|
|
281
|
+
l("strong", null, E(e.warningCount), 1)
|
|
282
282
|
], 2),
|
|
283
283
|
e.paginateWarningCount ? ($(), I("span", ha, [
|
|
284
|
-
t[4] || (t[4] =
|
|
285
|
-
l("strong", null,
|
|
286
|
-
])) :
|
|
284
|
+
t[4] || (t[4] = be(" 内容超高:", -1)),
|
|
285
|
+
l("strong", null, E(e.paginateWarningCount), 1)
|
|
286
|
+
])) : q("", !0)
|
|
287
287
|
]),
|
|
288
288
|
t[5] || (t[5] = l("div", { class: "status-group status-right" }, [
|
|
289
289
|
l("span", { class: "status-item muted" }, "缩放:100%(阶段 5 完善)")
|
|
290
290
|
], -1))
|
|
291
291
|
]));
|
|
292
292
|
}
|
|
293
|
-
}), Sa = /* @__PURE__ */
|
|
293
|
+
}), Sa = /* @__PURE__ */ ve(ya, [["__scopeId", "data-v-e5a749ea"]]), $a = {
|
|
294
294
|
showNewBlank: !0,
|
|
295
295
|
showSamples: !0,
|
|
296
296
|
showUndoRedo: !0,
|
|
@@ -306,10 +306,10 @@ function Ca(e) {
|
|
|
306
306
|
const wa = { class: "v2-toolbar" }, Ia = {
|
|
307
307
|
key: 0,
|
|
308
308
|
class: "v2-toolbar__group"
|
|
309
|
-
}, xa = ["onClick"],
|
|
309
|
+
}, xa = ["onClick"], ka = {
|
|
310
310
|
key: 1,
|
|
311
311
|
class: "v2-toolbar__group"
|
|
312
|
-
},
|
|
312
|
+
}, Ta = ["disabled"], Fa = ["disabled"], Da = {
|
|
313
313
|
key: 2,
|
|
314
314
|
class: "v2-toolbar__group"
|
|
315
315
|
}, Na = { class: "v2-toolbar__label" }, Pa = {
|
|
@@ -329,144 +329,144 @@ const wa = { class: "v2-toolbar" }, Ia = {
|
|
|
329
329
|
uiConfig: {}
|
|
330
330
|
},
|
|
331
331
|
emits: ["reset-blank", "load-sample", "undo", "redo", "save-template", "load-template", "export-template", "import-template", "import-fill-data", "export-fill-data", "load-fill-data", "save-fill-data", "toggle-preview", "print", "help"],
|
|
332
|
-
setup(e, { emit:
|
|
333
|
-
const t = e, a =
|
|
334
|
-
function
|
|
335
|
-
return Nl(
|
|
332
|
+
setup(e, { emit: r }) {
|
|
333
|
+
const t = e, a = N(() => Ca(t.uiConfig));
|
|
334
|
+
function o(f) {
|
|
335
|
+
return Nl(f, void 0, a.value.locale);
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
return (
|
|
337
|
+
const u = r;
|
|
338
|
+
return (f, s) => ($(), I("header", wa, [
|
|
339
339
|
l("span", {
|
|
340
|
-
class:
|
|
341
|
-
},
|
|
340
|
+
class: pe(["v2-toolbar__dirty", { "v2-toolbar__dirty--on": e.dirty }])
|
|
341
|
+
}, E(e.dirty ? o("toolbar.dirty") : o("toolbar.saved")), 3),
|
|
342
342
|
a.value.showNewBlank || a.value.showSamples ? ($(), I("div", Ia, [
|
|
343
343
|
a.value.showNewBlank ? ($(), I("button", {
|
|
344
344
|
key: 0,
|
|
345
345
|
class: "v2-toolbar__button",
|
|
346
346
|
type: "button",
|
|
347
|
-
onClick: s[0] || (s[0] = (
|
|
348
|
-
},
|
|
349
|
-
a.value.showSamples ? ($(!0), I(
|
|
350
|
-
key:
|
|
347
|
+
onClick: s[0] || (s[0] = (b) => u("reset-blank"))
|
|
348
|
+
}, E(o("toolbar.newBlank")), 1)) : q("", !0),
|
|
349
|
+
a.value.showSamples ? ($(!0), I(Q, { key: 1 }, ge(e.samples, (b) => ($(), I("button", {
|
|
350
|
+
key: b.id,
|
|
351
351
|
class: "v2-toolbar__button",
|
|
352
352
|
type: "button",
|
|
353
|
-
onClick: (v) =>
|
|
354
|
-
},
|
|
355
|
-
])) :
|
|
356
|
-
a.value.showUndoRedo ? ($(), I("div",
|
|
353
|
+
onClick: (v) => u("load-sample", b)
|
|
354
|
+
}, E(o("toolbar.loadSamplePrefix")) + E(b.label), 9, xa))), 128)) : q("", !0)
|
|
355
|
+
])) : q("", !0),
|
|
356
|
+
a.value.showUndoRedo ? ($(), I("div", ka, [
|
|
357
357
|
l("button", {
|
|
358
358
|
class: "v2-toolbar__button",
|
|
359
359
|
type: "button",
|
|
360
360
|
disabled: !e.canUndo,
|
|
361
|
-
onClick: s[1] || (s[1] = (
|
|
362
|
-
},
|
|
361
|
+
onClick: s[1] || (s[1] = (b) => u("undo"))
|
|
362
|
+
}, E(o("toolbar.undo")), 9, Ta),
|
|
363
363
|
l("button", {
|
|
364
364
|
class: "v2-toolbar__button",
|
|
365
365
|
type: "button",
|
|
366
366
|
disabled: !e.canRedo,
|
|
367
|
-
onClick: s[2] || (s[2] = (
|
|
368
|
-
},
|
|
369
|
-
])) :
|
|
367
|
+
onClick: s[2] || (s[2] = (b) => u("redo"))
|
|
368
|
+
}, E(o("toolbar.redo")), 9, Fa)
|
|
369
|
+
])) : q("", !0),
|
|
370
370
|
a.value.showTemplateModule ? ($(), I("div", Da, [
|
|
371
|
-
l("span", Na,
|
|
371
|
+
l("span", Na, E(o("toolbar.module.template")), 1),
|
|
372
372
|
l("button", {
|
|
373
373
|
class: "v2-toolbar__button",
|
|
374
374
|
type: "button",
|
|
375
|
-
onClick: s[3] || (s[3] = (
|
|
376
|
-
},
|
|
375
|
+
onClick: s[3] || (s[3] = (b) => u("save-template"))
|
|
376
|
+
}, E(o("toolbar.saveTemplate")), 1),
|
|
377
377
|
l("button", {
|
|
378
378
|
class: "v2-toolbar__button",
|
|
379
379
|
type: "button",
|
|
380
|
-
onClick: s[4] || (s[4] = (
|
|
381
|
-
},
|
|
380
|
+
onClick: s[4] || (s[4] = (b) => u("load-template"))
|
|
381
|
+
}, E(o("toolbar.loadTemplate")), 1),
|
|
382
382
|
l("button", {
|
|
383
383
|
class: "v2-toolbar__button",
|
|
384
384
|
type: "button",
|
|
385
|
-
onClick: s[5] || (s[5] = (
|
|
386
|
-
},
|
|
385
|
+
onClick: s[5] || (s[5] = (b) => u("export-template"))
|
|
386
|
+
}, E(o("toolbar.exportTemplate")), 1),
|
|
387
387
|
l("button", {
|
|
388
388
|
class: "v2-toolbar__button",
|
|
389
389
|
type: "button",
|
|
390
|
-
onClick: s[6] || (s[6] = (
|
|
391
|
-
},
|
|
392
|
-
])) :
|
|
390
|
+
onClick: s[6] || (s[6] = (b) => u("import-template"))
|
|
391
|
+
}, E(o("toolbar.importTemplate")), 1)
|
|
392
|
+
])) : q("", !0),
|
|
393
393
|
a.value.showFillDataModule ? ($(), I("div", Pa, [
|
|
394
|
-
l("span", Ea,
|
|
394
|
+
l("span", Ea, E(o("toolbar.module.fillData")), 1),
|
|
395
395
|
l("button", {
|
|
396
396
|
class: "v2-toolbar__button",
|
|
397
397
|
type: "button",
|
|
398
|
-
title:
|
|
399
|
-
onClick: s[7] || (s[7] = (
|
|
400
|
-
},
|
|
398
|
+
title: o("toolbar.saveFillDataTip"),
|
|
399
|
+
onClick: s[7] || (s[7] = (b) => u("save-fill-data"))
|
|
400
|
+
}, E(o("toolbar.saveFillData")), 9, Aa),
|
|
401
401
|
l("button", {
|
|
402
402
|
class: "v2-toolbar__button",
|
|
403
403
|
type: "button",
|
|
404
|
-
title:
|
|
405
|
-
onClick: s[8] || (s[8] = (
|
|
406
|
-
},
|
|
404
|
+
title: o("toolbar.loadFillDataTip"),
|
|
405
|
+
onClick: s[8] || (s[8] = (b) => u("load-fill-data"))
|
|
406
|
+
}, E(o("toolbar.loadFillData")), 9, Ha),
|
|
407
407
|
l("button", {
|
|
408
408
|
class: "v2-toolbar__button",
|
|
409
409
|
type: "button",
|
|
410
410
|
"data-export-fill-data": "",
|
|
411
|
-
title:
|
|
412
|
-
onClick: s[9] || (s[9] = (
|
|
413
|
-
},
|
|
411
|
+
title: o("toolbar.exportFillDataTip"),
|
|
412
|
+
onClick: s[9] || (s[9] = (b) => u("export-fill-data"))
|
|
413
|
+
}, E(o("toolbar.exportFillData")), 9, Ra),
|
|
414
414
|
l("button", {
|
|
415
415
|
class: "v2-toolbar__button",
|
|
416
416
|
type: "button",
|
|
417
|
-
title:
|
|
418
|
-
onClick: s[10] || (s[10] = (
|
|
419
|
-
},
|
|
420
|
-
])) :
|
|
417
|
+
title: o("toolbar.importFillDataTip"),
|
|
418
|
+
onClick: s[10] || (s[10] = (b) => u("import-fill-data"))
|
|
419
|
+
}, E(o("toolbar.importFillData")), 9, La)
|
|
420
|
+
])) : q("", !0),
|
|
421
421
|
a.value.showPreviewPrint || a.value.showHelp ? ($(), I("div", Ma, [
|
|
422
422
|
a.value.showPreviewPrint ? ($(), I("button", {
|
|
423
423
|
key: 0,
|
|
424
|
-
class:
|
|
424
|
+
class: pe(["v2-toolbar__button", { "v2-toolbar__button--active": e.previewMode }]),
|
|
425
425
|
type: "button",
|
|
426
426
|
"data-view-mode": "preview",
|
|
427
|
-
title:
|
|
428
|
-
onClick: s[11] || (s[11] = (
|
|
429
|
-
},
|
|
427
|
+
title: o("toolbar.previewTip"),
|
|
428
|
+
onClick: s[11] || (s[11] = (b) => u("toggle-preview"))
|
|
429
|
+
}, E(e.previewMode ? o("toolbar.exitPreview") : o("toolbar.preview")), 11, Ba)) : q("", !0),
|
|
430
430
|
a.value.showPreviewPrint ? ($(), I("button", {
|
|
431
431
|
key: 1,
|
|
432
432
|
class: "v2-toolbar__button",
|
|
433
433
|
type: "button",
|
|
434
|
-
onClick: s[12] || (s[12] = (
|
|
435
|
-
},
|
|
434
|
+
onClick: s[12] || (s[12] = (b) => u("print"))
|
|
435
|
+
}, E(o("toolbar.print")), 1)) : q("", !0),
|
|
436
436
|
a.value.showHelp ? ($(), I("button", {
|
|
437
437
|
key: 2,
|
|
438
438
|
class: "v2-toolbar__button",
|
|
439
439
|
type: "button",
|
|
440
440
|
"data-help-toggle": "",
|
|
441
|
-
title:
|
|
442
|
-
onClick: s[13] || (s[13] = (
|
|
443
|
-
},
|
|
444
|
-
])) :
|
|
441
|
+
title: o("toolbar.helpTip"),
|
|
442
|
+
onClick: s[13] || (s[13] = (b) => u("help"))
|
|
443
|
+
}, E(o("toolbar.help")), 9, Va)) : q("", !0)
|
|
444
|
+
])) : q("", !0)
|
|
445
445
|
]));
|
|
446
446
|
}
|
|
447
|
-
}), za = /* @__PURE__ */
|
|
447
|
+
}), za = /* @__PURE__ */ ve(Ga, [["__scopeId", "data-v-71ae7003"]]), ul = Symbol(
|
|
448
448
|
"TicketDesigner.TreeControl"
|
|
449
449
|
);
|
|
450
|
-
function
|
|
451
|
-
return
|
|
450
|
+
function sl(e, r) {
|
|
451
|
+
return r ? e.id === r ? !0 : e.children.some((t) => sl(t, r)) : !1;
|
|
452
452
|
}
|
|
453
|
-
function Oa(e,
|
|
454
|
-
const a = e.getBoundingClientRect(),
|
|
455
|
-
if (
|
|
456
|
-
const s =
|
|
457
|
-
return s > 0 ?
|
|
453
|
+
function Oa(e, r, t = 4) {
|
|
454
|
+
const a = e.getBoundingClientRect(), o = r.getBoundingClientRect(), u = e.scrollTop, f = a.top + t - o.top;
|
|
455
|
+
if (f > 0) return Math.max(0, u - f);
|
|
456
|
+
const s = o.bottom + t - a.bottom;
|
|
457
|
+
return s > 0 ? u + s : u;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
const a = Oa(e,
|
|
459
|
+
function Xt(e, r, t = 4) {
|
|
460
|
+
const a = Oa(e, r, t);
|
|
461
461
|
return a === e.scrollTop ? !1 : (e.scrollTop = a, !0);
|
|
462
462
|
}
|
|
463
463
|
const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
464
464
|
key: 1,
|
|
465
465
|
class: "v2-tree-dot"
|
|
466
|
-
},
|
|
466
|
+
}, Ja = { class: "v2-tree-label" }, Ka = { class: "v2-tree-type" }, qa = {
|
|
467
467
|
key: 0,
|
|
468
468
|
class: "v2-tree-children"
|
|
469
|
-
},
|
|
469
|
+
}, Ya = /* @__PURE__ */ X({
|
|
470
470
|
name: "NodeTreeItem",
|
|
471
471
|
__name: "NodeTreeItem",
|
|
472
472
|
props: {
|
|
@@ -475,54 +475,54 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
475
475
|
depth: {}
|
|
476
476
|
},
|
|
477
477
|
emits: ["select"],
|
|
478
|
-
setup(e, { emit:
|
|
479
|
-
const t = e, a =
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
}),
|
|
483
|
-
|
|
478
|
+
setup(e, { emit: r }) {
|
|
479
|
+
const t = e, a = r, o = $l(ul, null), u = G(o ? o.target.value : !0);
|
|
480
|
+
o && (ce(o.token, () => {
|
|
481
|
+
u.value = o.target.value;
|
|
482
|
+
}), ce(
|
|
483
|
+
o.focusToken,
|
|
484
484
|
() => {
|
|
485
|
-
|
|
485
|
+
sl(t.node, o.focusId.value) && (u.value = !0);
|
|
486
486
|
},
|
|
487
487
|
{ immediate: !0 }
|
|
488
488
|
));
|
|
489
|
-
function
|
|
489
|
+
function f() {
|
|
490
490
|
a("select", t.node.id);
|
|
491
491
|
}
|
|
492
492
|
function s() {
|
|
493
|
-
|
|
493
|
+
u.value = !u.value;
|
|
494
494
|
}
|
|
495
|
-
return (
|
|
496
|
-
const p =
|
|
495
|
+
return (b, v) => {
|
|
496
|
+
const p = Cl("NodeTreeItem", !0);
|
|
497
497
|
return $(), I("div", Wa, [
|
|
498
498
|
l("div", {
|
|
499
|
-
class:
|
|
500
|
-
style:
|
|
499
|
+
class: pe(["v2-tree-row", { "v2-tree-row--selected": e.node.id === e.selectedId }]),
|
|
500
|
+
style: Ae({ paddingLeft: `${e.depth * 14 + 6}px` }),
|
|
501
501
|
"data-tree-node-id": e.node.id,
|
|
502
|
-
onClick:
|
|
502
|
+
onClick: f
|
|
503
503
|
}, [
|
|
504
504
|
e.node.children.length ? ($(), I("button", {
|
|
505
505
|
key: 0,
|
|
506
506
|
class: "v2-tree-toggle",
|
|
507
507
|
type: "button",
|
|
508
|
-
onClick:
|
|
509
|
-
},
|
|
510
|
-
l("span",
|
|
511
|
-
l("span",
|
|
508
|
+
onClick: ll(s, ["stop"])
|
|
509
|
+
}, E(u.value ? "▾" : "▸"), 1)) : ($(), I("span", ja, "·")),
|
|
510
|
+
l("span", Ja, E(e.node.label), 1),
|
|
511
|
+
l("span", Ka, E(e.node.type), 1)
|
|
512
512
|
], 14, Ua),
|
|
513
|
-
|
|
514
|
-
($(!0), I(
|
|
513
|
+
u.value && e.node.children.length ? ($(), I("div", qa, [
|
|
514
|
+
($(!0), I(Q, null, ge(e.node.children, (g) => ($(), oe(p, {
|
|
515
515
|
key: g.id,
|
|
516
516
|
node: g,
|
|
517
517
|
"selected-id": e.selectedId,
|
|
518
518
|
depth: e.depth + 1,
|
|
519
|
-
onSelect: v[0] || (v[0] = (
|
|
519
|
+
onSelect: v[0] || (v[0] = (M) => a("select", M))
|
|
520
520
|
}, null, 8, ["node", "selected-id", "depth"]))), 128))
|
|
521
|
-
])) :
|
|
521
|
+
])) : q("", !0)
|
|
522
522
|
]);
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
|
-
}), Xa = /* @__PURE__ */
|
|
525
|
+
}), Xa = /* @__PURE__ */ ve(Ya, [["__scopeId", "data-v-10a2a207"]]), Za = ["disabled"], Qa = ["disabled"], _a = ["disabled"], en = ["disabled"], tn = ["disabled"], ln = ["disabled"], an = { class: "v2-sidebar__heading v2-sidebar__heading--tree v2-tree-head" }, nn = ["disabled", "title"], on = { class: "v2-tree__buttons" }, dn = /* @__PURE__ */ X({
|
|
526
526
|
__name: "PaletteSidebar",
|
|
527
527
|
props: {
|
|
528
528
|
editable: { type: Boolean },
|
|
@@ -531,31 +531,31 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
531
531
|
selectedNodeId: {}
|
|
532
532
|
},
|
|
533
533
|
emits: ["add-node", "add-grid", "palette-drag", "select", "remove-selected", "collapse-all", "expand-all"],
|
|
534
|
-
setup(e, { emit:
|
|
535
|
-
const t = e, a = G(null),
|
|
536
|
-
function
|
|
534
|
+
setup(e, { emit: r }) {
|
|
535
|
+
const t = e, a = G(null), o = G(null);
|
|
536
|
+
function u(b) {
|
|
537
537
|
const v = a.value;
|
|
538
538
|
if (!v) return null;
|
|
539
539
|
const p = v.querySelectorAll("[data-tree-node-id]");
|
|
540
540
|
for (const g of Array.from(p))
|
|
541
|
-
if (g.dataset.treeNodeId ===
|
|
541
|
+
if (g.dataset.treeNodeId === b) return g;
|
|
542
542
|
return null;
|
|
543
543
|
}
|
|
544
|
-
function b
|
|
545
|
-
if (!
|
|
546
|
-
const v =
|
|
547
|
-
v && (a.value &&
|
|
544
|
+
function f(b) {
|
|
545
|
+
if (!b) return;
|
|
546
|
+
const v = u(b);
|
|
547
|
+
v && (a.value && Xt(a.value, v), o.value && a.value && Xt(o.value, a.value));
|
|
548
548
|
}
|
|
549
|
-
|
|
549
|
+
ce(
|
|
550
550
|
() => t.selectedNodeId,
|
|
551
|
-
async (
|
|
552
|
-
|
|
551
|
+
async (b) => {
|
|
552
|
+
b && (await Ye(), u(b) || await Ye(), f(b));
|
|
553
553
|
}
|
|
554
554
|
);
|
|
555
|
-
const s =
|
|
556
|
-
return (
|
|
555
|
+
const s = r;
|
|
556
|
+
return (b, v) => ($(), I("aside", {
|
|
557
557
|
ref_key: "sidebarRef",
|
|
558
|
-
ref:
|
|
558
|
+
ref: o,
|
|
559
559
|
class: "v2-sidebar v2-sidebar--left"
|
|
560
560
|
}, [
|
|
561
561
|
v[17] || (v[17] = l("div", { class: "v2-sidebar__group-title" }, "基础组件", -1)),
|
|
@@ -595,25 +595,25 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
595
595
|
onDragstart: v[6] || (v[6] = (p) => s("palette-drag", "html", p)),
|
|
596
596
|
onClick: v[7] || (v[7] = (p) => s("add-node", "html"))
|
|
597
597
|
}, " HTML 模块 ", 40, en),
|
|
598
|
-
v[18] || (v[18] = l("div", { class: "v2-sidebar__group-title" }, "布局组件", -1)),
|
|
599
598
|
l("button", {
|
|
600
599
|
class: "v2-palette-item v2-palette-item--button",
|
|
601
600
|
type: "button",
|
|
602
601
|
draggable: "true",
|
|
603
|
-
"data-palette": "
|
|
602
|
+
"data-palette": "table",
|
|
604
603
|
disabled: !e.editable,
|
|
605
|
-
onDragstart: v[8] || (v[8] = (p) => s("palette-drag", "
|
|
606
|
-
onClick: v[9] || (v[9] = (p) => s("add-
|
|
607
|
-
}, "
|
|
604
|
+
onDragstart: v[8] || (v[8] = (p) => s("palette-drag", "table", p)),
|
|
605
|
+
onClick: v[9] || (v[9] = (p) => s("add-node", "table"))
|
|
606
|
+
}, " 表格 ", 40, tn),
|
|
607
|
+
v[18] || (v[18] = l("div", { class: "v2-sidebar__group-title" }, "布局组件", -1)),
|
|
608
608
|
l("button", {
|
|
609
609
|
class: "v2-palette-item v2-palette-item--button",
|
|
610
610
|
type: "button",
|
|
611
611
|
draggable: "true",
|
|
612
|
-
"data-palette": "
|
|
612
|
+
"data-palette": "grid",
|
|
613
613
|
disabled: !e.editable,
|
|
614
|
-
onDragstart: v[10] || (v[10] = (p) => s("palette-drag", "
|
|
615
|
-
onClick: v[11] || (v[11] = (p) => s("add-
|
|
616
|
-
}, "
|
|
614
|
+
onDragstart: v[10] || (v[10] = (p) => s("palette-drag", "grid", p)),
|
|
615
|
+
onClick: v[11] || (v[11] = (p) => s("add-grid"))
|
|
616
|
+
}, " 网格 ", 40, ln),
|
|
617
617
|
l("div", an, [
|
|
618
618
|
v[16] || (v[16] = l("span", null, "结构", -1)),
|
|
619
619
|
l("button", {
|
|
@@ -629,7 +629,7 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
629
629
|
ref: a,
|
|
630
630
|
class: "v2-tree"
|
|
631
631
|
}, [
|
|
632
|
-
($(!0), I(
|
|
632
|
+
($(!0), I(Q, null, ge(e.nodeTree, (p) => ($(), oe(Xa, {
|
|
633
633
|
key: p.id,
|
|
634
634
|
node: p,
|
|
635
635
|
"selected-id": e.selectedNodeId,
|
|
@@ -651,7 +651,7 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
651
651
|
])
|
|
652
652
|
], 512));
|
|
653
653
|
}
|
|
654
|
-
}),
|
|
654
|
+
}), rn = /* @__PURE__ */ ve(dn, [["__scopeId", "data-v-e580095e"]]), un = {
|
|
655
655
|
page: "页面",
|
|
656
656
|
grid: "网格",
|
|
657
657
|
"grid-cell": "格子",
|
|
@@ -661,10 +661,10 @@ const Wa = { class: "v2-tree-node" }, Ua = ["data-tree-node-id"], ja = {
|
|
|
661
661
|
image: "图片",
|
|
662
662
|
html: "HTML 模块"
|
|
663
663
|
};
|
|
664
|
-
function
|
|
665
|
-
return
|
|
664
|
+
function Pe(e) {
|
|
665
|
+
return un[e] ?? e;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Ee(e) {
|
|
668
668
|
switch (e.type) {
|
|
669
669
|
case "page":
|
|
670
670
|
return "页面";
|
|
@@ -681,173 +681,173 @@ function Ne(e) {
|
|
|
681
681
|
case "html":
|
|
682
682
|
return "HTML 模块";
|
|
683
683
|
default:
|
|
684
|
-
return
|
|
684
|
+
return Pe(e.type);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function at(e) {
|
|
688
688
|
return e.type === "grid" ? sn(e) : e.type === "page" ? {
|
|
689
689
|
id: e.id,
|
|
690
|
-
type:
|
|
691
|
-
label:
|
|
692
|
-
children: e.children.map(
|
|
693
|
-
} : { id: e.id, type:
|
|
690
|
+
type: Pe(e.type),
|
|
691
|
+
label: Ee(e),
|
|
692
|
+
children: e.children.map(at)
|
|
693
|
+
} : { id: e.id, type: Pe(e.type), label: Ee(e), children: [] };
|
|
694
694
|
}
|
|
695
695
|
function sn(e) {
|
|
696
|
-
const
|
|
696
|
+
const r = [];
|
|
697
697
|
return e.rows.forEach((t, a) => {
|
|
698
|
-
t.cells.forEach((
|
|
699
|
-
|
|
698
|
+
t.cells.forEach((o, u) => {
|
|
699
|
+
r.push(vn(o, a, u, t.cells.length, e.rows.length));
|
|
700
700
|
});
|
|
701
|
-
}), { id: e.id, type: "网格", label:
|
|
701
|
+
}), { id: e.id, type: "网格", label: Ee(e), children: r };
|
|
702
702
|
}
|
|
703
|
-
function vn(e,
|
|
704
|
-
const
|
|
703
|
+
function vn(e, r, t, a, o) {
|
|
704
|
+
const u = o > 1 ? `格子 ${r + 1}-${t + 1}` : a > 1 ? `格子 ${t + 1}` : "格子";
|
|
705
705
|
return {
|
|
706
706
|
id: e.id,
|
|
707
707
|
type: "格子",
|
|
708
|
-
label:
|
|
709
|
-
children: e.children.map(
|
|
708
|
+
label: u,
|
|
709
|
+
children: e.children.map(at)
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function cn(e,
|
|
713
|
-
const t = G(null), a = G(null),
|
|
714
|
-
let
|
|
715
|
-
const
|
|
712
|
+
function cn(e, r) {
|
|
713
|
+
const t = G(null), a = G(null), o = G([]), u = G(0);
|
|
714
|
+
let f = null, s = 0;
|
|
715
|
+
const b = N(() => Ze(e.value));
|
|
716
716
|
function v(w) {
|
|
717
717
|
var c, h;
|
|
718
|
-
let
|
|
719
|
-
for (;
|
|
720
|
-
if (
|
|
721
|
-
|
|
718
|
+
let S = ((c = b.value.get(w)) == null ? void 0 : c.parent) ?? null;
|
|
719
|
+
for (; S; ) {
|
|
720
|
+
if (S.type === "table") return !0;
|
|
721
|
+
S = ((h = b.value.get(S.id)) == null ? void 0 : h.parent) ?? null;
|
|
722
722
|
}
|
|
723
723
|
return !1;
|
|
724
724
|
}
|
|
725
725
|
function p(w) {
|
|
726
726
|
var c;
|
|
727
|
-
const
|
|
728
|
-
return !
|
|
727
|
+
const S = (c = b.value.get(w)) == null ? void 0 : c.node;
|
|
728
|
+
return !S || v(w) ? !1 : De(S) || S.type === "grid-cell";
|
|
729
729
|
}
|
|
730
|
-
const g =
|
|
731
|
-
var
|
|
730
|
+
const g = N(() => {
|
|
731
|
+
var S;
|
|
732
732
|
const w = t.value;
|
|
733
|
-
return w && p(w) ? ((
|
|
734
|
-
}),
|
|
735
|
-
() => g.value ?
|
|
736
|
-
), A =
|
|
733
|
+
return w && p(w) ? ((S = b.value.get(w)) == null ? void 0 : S.node) ?? null : null;
|
|
734
|
+
}), M = N(
|
|
735
|
+
() => g.value ? Pe(g.value.type) : "未选择"
|
|
736
|
+
), A = N(
|
|
737
737
|
() => {
|
|
738
738
|
var w;
|
|
739
|
-
return t.value ? ((w =
|
|
739
|
+
return t.value ? ((w = b.value.get(t.value)) == null ? void 0 : w.ownerCell) ?? null : null;
|
|
740
740
|
}
|
|
741
|
-
), H =
|
|
741
|
+
), H = N(
|
|
742
742
|
() => {
|
|
743
743
|
var w;
|
|
744
744
|
return ((w = g.value) == null ? void 0 : w.type) === "grid-cell" ? g.value : null;
|
|
745
745
|
}
|
|
746
|
-
), U =
|
|
746
|
+
), U = N(() => {
|
|
747
747
|
var c, h;
|
|
748
748
|
const w = t.value;
|
|
749
749
|
if (!w) return null;
|
|
750
|
-
let
|
|
751
|
-
for (;
|
|
752
|
-
|
|
753
|
-
return (
|
|
754
|
-
}),
|
|
755
|
-
const w = H.value,
|
|
756
|
-
return !w || !
|
|
757
|
-
}), j =
|
|
758
|
-
var
|
|
750
|
+
let S = ((c = b.value.get(w)) == null ? void 0 : c.parent) ?? null;
|
|
751
|
+
for (; S && S.type !== "grid"; )
|
|
752
|
+
S = ((h = b.value.get(S.id)) == null ? void 0 : h.parent) ?? null;
|
|
753
|
+
return (S == null ? void 0 : S.type) === "grid" ? S : null;
|
|
754
|
+
}), Z = N(() => {
|
|
755
|
+
const w = H.value, S = U.value;
|
|
756
|
+
return !w || !S ? null : Pl(w, S);
|
|
757
|
+
}), j = N(() => {
|
|
758
|
+
var C, F, P;
|
|
759
759
|
const w = t.value;
|
|
760
760
|
if (!w) return null;
|
|
761
|
-
const
|
|
762
|
-
if ((
|
|
763
|
-
const c =
|
|
761
|
+
const S = b.value.get(w);
|
|
762
|
+
if ((S == null ? void 0 : S.node.type) !== "grid-cell" || ((C = S.parent) == null ? void 0 : C.type) !== "grid-row") return null;
|
|
763
|
+
const c = S.parent, h = (F = b.value.get(c.id)) != null && F.node ? (((P = U.value) == null ? void 0 : P.rows) ?? []).findIndex((D) => D.id === c.id) : -1, m = c.cells.findIndex((D) => D.id === w);
|
|
764
764
|
return m < 0 ? null : {
|
|
765
765
|
rowIndex: h,
|
|
766
766
|
columnIndex: m,
|
|
767
767
|
hasNextSibling: m < c.cells.length - 1,
|
|
768
|
-
canSplit: (
|
|
768
|
+
canSplit: (S.node.colspan ?? 1) > 1
|
|
769
769
|
};
|
|
770
|
-
}),
|
|
770
|
+
}), le = N(() => {
|
|
771
771
|
var h, m;
|
|
772
|
-
const w = a.value,
|
|
773
|
-
if ((
|
|
774
|
-
const c = t.value ? (m =
|
|
772
|
+
const w = a.value, S = w ? (h = b.value.get(w)) == null ? void 0 : h.node : void 0;
|
|
773
|
+
if ((S == null ? void 0 : S.type) === "grid-cell" || (S == null ? void 0 : S.type) === "table-cell-template") return S;
|
|
774
|
+
const c = t.value ? (m = b.value.get(t.value)) == null ? void 0 : m.node : void 0;
|
|
775
775
|
return (c == null ? void 0 : c.type) === "grid-cell" || (c == null ? void 0 : c.type) === "table-cell-template" ? c : A.value;
|
|
776
|
-
}), ee =
|
|
777
|
-
function
|
|
778
|
-
t.value = null, a.value = null,
|
|
779
|
-
}
|
|
780
|
-
function
|
|
781
|
-
var F,
|
|
782
|
-
if (!
|
|
783
|
-
const
|
|
784
|
-
a.value = ((F =
|
|
776
|
+
}), ee = N(() => e.value.pages.map((w) => at(w)));
|
|
777
|
+
function T() {
|
|
778
|
+
t.value = null, a.value = null, o.value = [], u.value = 0, f = null, s = 0;
|
|
779
|
+
}
|
|
780
|
+
function J(w) {
|
|
781
|
+
var F, P;
|
|
782
|
+
if (!r.editable()) return;
|
|
783
|
+
const S = w.target;
|
|
784
|
+
a.value = ((F = S.closest(`[${$e}]`)) == null ? void 0 : F.dataset.layoutId) ?? null;
|
|
785
785
|
const c = [];
|
|
786
|
-
let h =
|
|
786
|
+
let h = S.closest(`[${we}]`);
|
|
787
787
|
for (; h; ) {
|
|
788
|
-
const
|
|
789
|
-
|
|
788
|
+
const D = h.dataset.nodeId;
|
|
789
|
+
D && c.push(D), h = ((P = h.parentElement) == null ? void 0 : P.closest(`[${we}]`)) ?? null;
|
|
790
790
|
}
|
|
791
|
-
const m = c.filter((
|
|
792
|
-
if (!
|
|
793
|
-
t.value = null, a.value = null,
|
|
791
|
+
const m = c.filter((D) => p(D)), C = m[0] ?? null;
|
|
792
|
+
if (!C) {
|
|
793
|
+
t.value = null, a.value = null, o.value = [], u.value = 0, f = null, s = 0;
|
|
794
794
|
return;
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
C === f && o.value.join("/") === m.join("/") ? s = (s + 1) % m.length : (f = C, s = 0, o.value = m), u.value = s, t.value = m[s] ?? C;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
799
|
-
var m,
|
|
800
|
-
const
|
|
801
|
-
let h = w.nodeId ? (m =
|
|
798
|
+
function K(w) {
|
|
799
|
+
var m, C, F;
|
|
800
|
+
const S = b.value, c = [];
|
|
801
|
+
let h = w.nodeId ? (m = S.get(w.nodeId)) == null ? void 0 : m.node : void 0;
|
|
802
802
|
for (; h; )
|
|
803
|
-
|
|
803
|
+
De(h) && c.push(h.id), h = ((C = S.get(h.id)) == null ? void 0 : C.parent) ?? void 0;
|
|
804
804
|
if (c.length === 0) {
|
|
805
|
-
const
|
|
806
|
-
if (!
|
|
807
|
-
c.push(
|
|
805
|
+
const P = (F = e.value.pages[0]) == null ? void 0 : F.id;
|
|
806
|
+
if (!P) return;
|
|
807
|
+
c.push(P);
|
|
808
808
|
}
|
|
809
|
-
t.value = c[0], a.value = null,
|
|
809
|
+
t.value = c[0], a.value = null, o.value = c, u.value = 0, s = 0, f = c[0];
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function _(w) {
|
|
812
812
|
var m;
|
|
813
|
-
if (!
|
|
814
|
-
const
|
|
815
|
-
if (!
|
|
813
|
+
if (!r.editable()) return;
|
|
814
|
+
const S = b.value.get(w);
|
|
815
|
+
if (!S || !De(S.node) && S.node.type !== "grid-cell") return;
|
|
816
816
|
t.value = w, a.value = null;
|
|
817
817
|
const c = [];
|
|
818
|
-
let h =
|
|
818
|
+
let h = S.parent;
|
|
819
819
|
for (; h; )
|
|
820
|
-
|
|
821
|
-
|
|
820
|
+
De(h) && c.unshift(h.id), h = ((m = b.value.get(h.id)) == null ? void 0 : m.parent) ?? null;
|
|
821
|
+
o.value = [...c, w], u.value = o.value.length - 1, s = o.value.length - 1, f = w;
|
|
822
822
|
}
|
|
823
823
|
return {
|
|
824
824
|
selectedNodeId: t,
|
|
825
825
|
selectedInsertionSlotId: a,
|
|
826
|
-
selectionPathIds:
|
|
827
|
-
selectionPathIndex:
|
|
828
|
-
nodeIndex:
|
|
826
|
+
selectionPathIds: o,
|
|
827
|
+
selectionPathIndex: u,
|
|
828
|
+
nodeIndex: b,
|
|
829
829
|
selectedNode: g,
|
|
830
|
-
selectedNodeType:
|
|
830
|
+
selectedNodeType: M,
|
|
831
831
|
selectedOwnerCell: A,
|
|
832
832
|
selectedCell: H,
|
|
833
833
|
selectedOwnerGridOfCell: U,
|
|
834
|
-
selectedCellBox:
|
|
834
|
+
selectedCellBox: Z,
|
|
835
835
|
selectedCellContext: j,
|
|
836
|
-
insertionSlot:
|
|
836
|
+
insertionSlot: le,
|
|
837
837
|
nodeTree: ee,
|
|
838
838
|
isInsideTable: v,
|
|
839
839
|
isStyleEditableNodeId: p,
|
|
840
|
-
clearSelection:
|
|
841
|
-
selectNode:
|
|
842
|
-
selectNodeById:
|
|
843
|
-
selectIssue:
|
|
840
|
+
clearSelection: T,
|
|
841
|
+
selectNode: J,
|
|
842
|
+
selectNodeById: _,
|
|
843
|
+
selectIssue: K
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
|
-
const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-control--toggle" },
|
|
846
|
+
const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-control--toggle" }, bn = ["checked"], gn = { class: "v2-control v2-control--inline" }, mn = ["value"], hn = { class: "v2-control v2-control--inline" }, yn = ["value"], Sn = { class: "v2-control v2-control--inline" }, $n = ["value"], Cn = { class: "v2-grid-dimensions" }, wn = { class: "v2-control v2-control--inline" }, In = ["value"], xn = { class: "v2-control v2-control--inline" }, kn = ["value"], Tn = {
|
|
847
847
|
key: 0,
|
|
848
848
|
class: "v2-hint",
|
|
849
849
|
style: { color: "#b45309" }
|
|
850
|
-
}, Fn = { class: "v2-grid-dimensions" }, Dn = { class: "v2-control v2-control--inline" }, Nn = ["value"], Pn = { class: "v2-control v2-control--inline" }, En = ["value"], An = { class: "v2-control v2-control--toggle" }, Hn = ["checked"],
|
|
850
|
+
}, Fn = { class: "v2-grid-dimensions" }, Dn = { class: "v2-control v2-control--inline" }, Nn = ["value"], Pn = { class: "v2-control v2-control--inline" }, En = ["value"], An = { class: "v2-control v2-control--toggle" }, Hn = ["checked"], Zt = /* @__PURE__ */ X({
|
|
851
851
|
__name: "HeaderFooterFields",
|
|
852
852
|
props: {
|
|
853
853
|
label: {},
|
|
@@ -857,52 +857,52 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
857
857
|
margin: {}
|
|
858
858
|
},
|
|
859
859
|
setup(e) {
|
|
860
|
-
const
|
|
861
|
-
() =>
|
|
862
|
-
), a =
|
|
863
|
-
() =>
|
|
864
|
-
),
|
|
865
|
-
() =>
|
|
866
|
-
),
|
|
867
|
-
() =>
|
|
868
|
-
),
|
|
869
|
-
() =>
|
|
870
|
-
), s =
|
|
871
|
-
() =>
|
|
872
|
-
),
|
|
873
|
-
() =>
|
|
874
|
-
), v =
|
|
860
|
+
const r = e, t = N(
|
|
861
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderEnabled : r.api.updatePaperFooterEnabled
|
|
862
|
+
), a = N(
|
|
863
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderContent : r.api.updatePaperFooterContent
|
|
864
|
+
), o = N(
|
|
865
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderHeight : r.api.updatePaperFooterHeight
|
|
866
|
+
), u = N(
|
|
867
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderSeparator : r.api.updatePaperFooterSeparator
|
|
868
|
+
), f = N(
|
|
869
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderFontSize : r.api.updatePaperFooterFontSize
|
|
870
|
+
), s = N(
|
|
871
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderFontWeight : r.api.updatePaperFooterFontWeight
|
|
872
|
+
), b = N(
|
|
873
|
+
() => r.kind === "header" ? r.api.updatePaperHeaderColor : r.api.updatePaperFooterColor
|
|
874
|
+
), v = N(() => {
|
|
875
875
|
var p;
|
|
876
|
-
return ((p =
|
|
876
|
+
return ((p = r.band) == null ? void 0 : p.enabled) === !0;
|
|
877
877
|
});
|
|
878
878
|
return (p, g) => {
|
|
879
|
-
var
|
|
880
|
-
return $(), I(
|
|
881
|
-
l("div", pn,
|
|
879
|
+
var M, A, H, U, Z, j, le, ee, T, J, K, _, w, S, c, h;
|
|
880
|
+
return $(), I(Q, null, [
|
|
881
|
+
l("div", pn, E(e.label), 1),
|
|
882
882
|
l("label", fn, [
|
|
883
883
|
l("input", {
|
|
884
884
|
type: "checkbox",
|
|
885
|
-
checked: ((
|
|
885
|
+
checked: ((M = e.band) == null ? void 0 : M.enabled) === !0,
|
|
886
886
|
onChange: g[0] || (g[0] = //@ts-ignore
|
|
887
887
|
(...m) => t.value && t.value(...m))
|
|
888
|
-
}, null, 40,
|
|
889
|
-
l("span", null, "启用" +
|
|
888
|
+
}, null, 40, bn),
|
|
889
|
+
l("span", null, "启用" + E(e.label), 1)
|
|
890
890
|
]),
|
|
891
|
-
v.value ? ($(), I(
|
|
892
|
-
l("label",
|
|
891
|
+
v.value ? ($(), I(Q, { key: 0 }, [
|
|
892
|
+
l("label", gn, [
|
|
893
893
|
g[9] || (g[9] = l("span", null, "左", -1)),
|
|
894
894
|
l("input", {
|
|
895
895
|
type: "text",
|
|
896
896
|
value: ((H = (A = e.band) == null ? void 0 : A.content) == null ? void 0 : H.left) ?? "",
|
|
897
897
|
placeholder: "变量: {page} {total}",
|
|
898
898
|
onChange: g[1] || (g[1] = (m) => a.value("left", m))
|
|
899
|
-
}, null, 40,
|
|
899
|
+
}, null, 40, mn)
|
|
900
900
|
]),
|
|
901
901
|
l("label", hn, [
|
|
902
902
|
g[10] || (g[10] = l("span", null, "中", -1)),
|
|
903
903
|
l("input", {
|
|
904
904
|
type: "text",
|
|
905
|
-
value: ((
|
|
905
|
+
value: ((Z = (U = e.band) == null ? void 0 : U.content) == null ? void 0 : Z.center) ?? "",
|
|
906
906
|
placeholder: "变量: {page} {total}",
|
|
907
907
|
onChange: g[2] || (g[2] = (m) => a.value("center", m))
|
|
908
908
|
}, null, 40, yn)
|
|
@@ -911,7 +911,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
911
911
|
g[11] || (g[11] = l("span", null, "右", -1)),
|
|
912
912
|
l("input", {
|
|
913
913
|
type: "text",
|
|
914
|
-
value: ((
|
|
914
|
+
value: ((le = (j = e.band) == null ? void 0 : j.content) == null ? void 0 : le.right) ?? "",
|
|
915
915
|
placeholder: "变量: {page} {total}",
|
|
916
916
|
onChange: g[3] || (g[3] = (m) => a.value("right", m))
|
|
917
917
|
}, null, 40, $n)
|
|
@@ -925,7 +925,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
925
925
|
step: "1",
|
|
926
926
|
value: ((ee = e.band) == null ? void 0 : ee.height) ?? x(El),
|
|
927
927
|
onChange: g[4] || (g[4] = //@ts-ignore
|
|
928
|
-
(...m) =>
|
|
928
|
+
(...m) => o.value && o.value(...m))
|
|
929
929
|
}, null, 40, In)
|
|
930
930
|
]),
|
|
931
931
|
l("label", xn, [
|
|
@@ -934,18 +934,18 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
934
934
|
type: "number",
|
|
935
935
|
min: "1",
|
|
936
936
|
step: "1",
|
|
937
|
-
value: ((
|
|
937
|
+
value: ((J = (T = e.band) == null ? void 0 : T.style) == null ? void 0 : J.fontSize) ?? 12,
|
|
938
938
|
onChange: g[5] || (g[5] = //@ts-ignore
|
|
939
|
-
(...m) =>
|
|
940
|
-
}, null, 40,
|
|
939
|
+
(...m) => f.value && f.value(...m))
|
|
940
|
+
}, null, 40, kn)
|
|
941
941
|
])
|
|
942
942
|
]),
|
|
943
|
-
((
|
|
943
|
+
((K = e.band) == null ? void 0 : K.height) != null && e.margin != null && e.band.height > e.margin ? ($(), I("p", Tn, " 高度 " + E(e.band.height) + "mm 超过纸张边距 " + E(e.margin) + "mm:显示时已按边距 收敛(页眉/页脚画在边距内,超出会压到正文、打印被裁切)。 ", 1)) : q("", !0),
|
|
944
944
|
l("div", Fn, [
|
|
945
945
|
l("label", Dn, [
|
|
946
946
|
g[15] || (g[15] = l("span", null, "粗细", -1)),
|
|
947
947
|
l("select", {
|
|
948
|
-
value: ((w = (
|
|
948
|
+
value: ((w = (_ = e.band) == null ? void 0 : _.style) == null ? void 0 : w.fontWeight) ?? "normal",
|
|
949
949
|
onChange: g[6] || (g[6] = //@ts-ignore
|
|
950
950
|
(...m) => s.value && s.value(...m))
|
|
951
951
|
}, [...g[14] || (g[14] = [
|
|
@@ -957,9 +957,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
957
957
|
g[16] || (g[16] = l("span", null, "颜色", -1)),
|
|
958
958
|
l("input", {
|
|
959
959
|
type: "color",
|
|
960
|
-
value: ((c = (
|
|
960
|
+
value: ((c = (S = e.band) == null ? void 0 : S.style) == null ? void 0 : c.color) ?? "#111827",
|
|
961
961
|
onChange: g[7] || (g[7] = //@ts-ignore
|
|
962
|
-
(...m) =>
|
|
962
|
+
(...m) => b.value && b.value(...m))
|
|
963
963
|
}, null, 40, En)
|
|
964
964
|
])
|
|
965
965
|
]),
|
|
@@ -968,17 +968,17 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
968
968
|
type: "checkbox",
|
|
969
969
|
checked: ((h = e.band) == null ? void 0 : h.separator) !== !1,
|
|
970
970
|
onChange: g[8] || (g[8] = //@ts-ignore
|
|
971
|
-
(...m) =>
|
|
971
|
+
(...m) => u.value && u.value(...m))
|
|
972
972
|
}, null, 40, Hn),
|
|
973
973
|
g[17] || (g[17] = l("span", null, "分隔线", -1))
|
|
974
974
|
])
|
|
975
|
-
], 64)) :
|
|
975
|
+
], 64)) : q("", !0)
|
|
976
976
|
], 64);
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
|
-
}), Rn = { class: "v2-control v2-control--inline" }, Ln = ["value"], Mn = { class: "v2-grid-dimensions" }, Bn = { class: "v2-control v2-control--inline" }, Vn = ["value"], Gn = { class: "v2-control v2-control--inline" }, zn = ["value"], On = { class: "v2-control v2-control--inline" }, Wn = ["value"], Un = { class: "v2-control v2-control--inline" }, jn = ["value"],
|
|
979
|
+
}), Rn = { class: "v2-control v2-control--inline" }, Ln = ["value"], Mn = { class: "v2-grid-dimensions" }, Bn = { class: "v2-control v2-control--inline" }, Vn = ["value"], Gn = { class: "v2-control v2-control--inline" }, zn = ["value"], On = { class: "v2-control v2-control--inline" }, Wn = ["value"], Un = { class: "v2-control v2-control--inline" }, jn = ["value"], Jn = { class: "v2-control v2-control--inline" }, Kn = ["value"], qn = { class: "v2-control v2-control--toggle" }, Yn = /* @__PURE__ */ X({
|
|
980
980
|
__name: "PageInspector",
|
|
981
|
-
props: /* @__PURE__ */
|
|
981
|
+
props: /* @__PURE__ */ Xe({
|
|
982
982
|
paperSize: {},
|
|
983
983
|
baseRowHeight: {},
|
|
984
984
|
paperMarginTop: {},
|
|
@@ -994,15 +994,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
994
994
|
}),
|
|
995
995
|
emits: ["update:paginate"],
|
|
996
996
|
setup(e) {
|
|
997
|
-
const
|
|
998
|
-
return (t, a) => ($(), I(
|
|
997
|
+
const r = al(e, "paginate");
|
|
998
|
+
return (t, a) => ($(), I(Q, null, [
|
|
999
999
|
a[15] || (a[15] = l("div", { class: "v2-sidebar__subheading" }, "页面设置", -1)),
|
|
1000
1000
|
l("label", Rn, [
|
|
1001
1001
|
a[8] || (a[8] = l("span", null, "纸张类型", -1)),
|
|
1002
1002
|
l("select", {
|
|
1003
1003
|
value: e.paperSize,
|
|
1004
1004
|
onChange: a[0] || (a[0] = //@ts-ignore
|
|
1005
|
-
(...
|
|
1005
|
+
(...o) => e.api.updatePaperSize && e.api.updatePaperSize(...o))
|
|
1006
1006
|
}, [...a[7] || (a[7] = [
|
|
1007
1007
|
l("option", { value: "A4" }, "A4(纵向)", -1),
|
|
1008
1008
|
l("option", { value: "A3" }, "A3(横向)", -1)
|
|
@@ -1017,7 +1017,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1017
1017
|
max: "99",
|
|
1018
1018
|
step: "1",
|
|
1019
1019
|
value: e.paperMarginTop,
|
|
1020
|
-
onChange: a[1] || (a[1] = (
|
|
1020
|
+
onChange: a[1] || (a[1] = (o) => e.api.updatePaperMarginSide("top", o))
|
|
1021
1021
|
}, null, 40, Vn)
|
|
1022
1022
|
]),
|
|
1023
1023
|
l("label", Gn, [
|
|
@@ -1028,7 +1028,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1028
1028
|
max: "99",
|
|
1029
1029
|
step: "1",
|
|
1030
1030
|
value: e.paperMarginRight,
|
|
1031
|
-
onChange: a[2] || (a[2] = (
|
|
1031
|
+
onChange: a[2] || (a[2] = (o) => e.api.updatePaperMarginSide("right", o))
|
|
1032
1032
|
}, null, 40, zn)
|
|
1033
1033
|
]),
|
|
1034
1034
|
l("label", On, [
|
|
@@ -1039,7 +1039,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1039
1039
|
max: "99",
|
|
1040
1040
|
step: "1",
|
|
1041
1041
|
value: e.paperMarginBottom,
|
|
1042
|
-
onChange: a[3] || (a[3] = (
|
|
1042
|
+
onChange: a[3] || (a[3] = (o) => e.api.updatePaperMarginSide("bottom", o))
|
|
1043
1043
|
}, null, 40, Wn)
|
|
1044
1044
|
]),
|
|
1045
1045
|
l("label", Un, [
|
|
@@ -1050,11 +1050,11 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1050
1050
|
max: "99",
|
|
1051
1051
|
step: "1",
|
|
1052
1052
|
value: e.paperMarginLeft,
|
|
1053
|
-
onChange: a[4] || (a[4] = (
|
|
1053
|
+
onChange: a[4] || (a[4] = (o) => e.api.updatePaperMarginSide("left", o))
|
|
1054
1054
|
}, null, 40, jn)
|
|
1055
1055
|
])
|
|
1056
1056
|
]),
|
|
1057
|
-
l("label",
|
|
1057
|
+
l("label", Jn, [
|
|
1058
1058
|
a[13] || (a[13] = l("span", null, "行高(mm)", -1)),
|
|
1059
1059
|
l("input", {
|
|
1060
1060
|
type: "number",
|
|
@@ -1063,27 +1063,27 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1063
1063
|
step: "1",
|
|
1064
1064
|
value: e.baseRowHeight,
|
|
1065
1065
|
onChange: a[5] || (a[5] = //@ts-ignore
|
|
1066
|
-
(...
|
|
1067
|
-
}, null, 40,
|
|
1066
|
+
(...o) => e.api.updateBaseRowHeight && e.api.updateBaseRowHeight(...o))
|
|
1067
|
+
}, null, 40, Kn)
|
|
1068
1068
|
]),
|
|
1069
|
-
l("label",
|
|
1070
|
-
|
|
1071
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
1069
|
+
l("label", qn, [
|
|
1070
|
+
wl(l("input", {
|
|
1071
|
+
"onUpdate:modelValue": a[6] || (a[6] = (o) => r.value = o),
|
|
1072
1072
|
type: "checkbox",
|
|
1073
1073
|
"data-paginate": "true"
|
|
1074
1074
|
}, null, 512), [
|
|
1075
|
-
[
|
|
1075
|
+
[Il, r.value]
|
|
1076
1076
|
]),
|
|
1077
1077
|
a[14] || (a[14] = l("span", null, "分页显示(仅影响编辑画面,打印始终分页)", -1))
|
|
1078
1078
|
]),
|
|
1079
|
-
|
|
1079
|
+
ae(Zt, {
|
|
1080
1080
|
label: "页眉",
|
|
1081
1081
|
kind: "header",
|
|
1082
1082
|
band: e.header,
|
|
1083
1083
|
margin: e.paperMarginTop,
|
|
1084
1084
|
api: e.api
|
|
1085
1085
|
}, null, 8, ["band", "margin", "api"]),
|
|
1086
|
-
|
|
1086
|
+
ae(Zt, {
|
|
1087
1087
|
label: "页脚",
|
|
1088
1088
|
kind: "footer",
|
|
1089
1089
|
band: e.footer,
|
|
@@ -1092,16 +1092,16 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1092
1092
|
}, null, 8, ["band", "margin", "api"])
|
|
1093
1093
|
], 64));
|
|
1094
1094
|
}
|
|
1095
|
-
}), Xn = { class: "v2-grid-dimensions" }, Zn = { class: "v2-control" }, Qn = ["value"], _n = { class: "v2-control" }, eo = ["value"], to = { class: "v2-grid-dimensions" }, lo = ["value", "onChange"], ao = { class: "v2-control" }, no = ["value"], oo = { class: "v2-grid-dimensions" }, io = { class: "v2-control v2-control--inline" },
|
|
1095
|
+
}), Xn = { class: "v2-grid-dimensions" }, Zn = { class: "v2-control" }, Qn = ["value"], _n = { class: "v2-control" }, eo = ["value"], to = { class: "v2-grid-dimensions" }, lo = ["value", "onChange"], ao = { class: "v2-control" }, no = ["value"], oo = { class: "v2-grid-dimensions" }, io = { class: "v2-control v2-control--inline" }, ro = ["value"], uo = { class: "v2-control v2-control--inline" }, so = ["value"], vo = { class: "v2-control v2-control--inline" }, co = ["value"], po = { class: "v2-control v2-control--inline" }, fo = ["value"], bo = /* @__PURE__ */ X({
|
|
1096
1096
|
__name: "GridInspector",
|
|
1097
1097
|
props: {
|
|
1098
1098
|
node: {},
|
|
1099
1099
|
api: {}
|
|
1100
1100
|
},
|
|
1101
1101
|
setup(e) {
|
|
1102
|
-
return (
|
|
1102
|
+
return (r, t) => {
|
|
1103
1103
|
var a;
|
|
1104
|
-
return $(), I(
|
|
1104
|
+
return $(), I(Q, null, [
|
|
1105
1105
|
l("div", Xn, [
|
|
1106
1106
|
l("label", Zn, [
|
|
1107
1107
|
t[7] || (t[7] = l("span", null, "行数", -1)),
|
|
@@ -1112,7 +1112,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1112
1112
|
value: e.node.rows.length,
|
|
1113
1113
|
"data-dimension": "rows",
|
|
1114
1114
|
onChange: t[0] || (t[0] = //@ts-ignore
|
|
1115
|
-
(...
|
|
1115
|
+
(...o) => e.api.updateGridDimensions && e.api.updateGridDimensions(...o))
|
|
1116
1116
|
}, null, 40, Qn)
|
|
1117
1117
|
]),
|
|
1118
1118
|
l("label", _n, [
|
|
@@ -1124,23 +1124,23 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1124
1124
|
value: ((a = e.node.rows[0]) == null ? void 0 : a.cells.length) ?? 1,
|
|
1125
1125
|
"data-dimension": "columns",
|
|
1126
1126
|
onChange: t[1] || (t[1] = //@ts-ignore
|
|
1127
|
-
(...
|
|
1127
|
+
(...o) => e.api.updateGridDimensions && e.api.updateGridDimensions(...o))
|
|
1128
1128
|
}, null, 40, eo)
|
|
1129
1129
|
])
|
|
1130
1130
|
]),
|
|
1131
1131
|
t[17] || (t[17] = l("div", { class: "v2-sidebar__subheading" }, "列宽(mm / 比例 / 自动)", -1)),
|
|
1132
1132
|
l("div", to, [
|
|
1133
|
-
($(!0), I(
|
|
1134
|
-
var
|
|
1133
|
+
($(!0), I(Q, null, ge(e.node.rows[0].cells, (o, u) => {
|
|
1134
|
+
var f;
|
|
1135
1135
|
return $(), I("label", {
|
|
1136
|
-
key:
|
|
1136
|
+
key: u,
|
|
1137
1137
|
class: "v2-control v2-control--inline"
|
|
1138
1138
|
}, [
|
|
1139
|
-
l("span", null, "第 " +
|
|
1139
|
+
l("span", null, "第 " + E(u + 1) + " 列", 1),
|
|
1140
1140
|
l("input", {
|
|
1141
|
-
value: ((
|
|
1141
|
+
value: ((f = e.node.columns) == null ? void 0 : f[u]) ?? o.width ?? "1fr",
|
|
1142
1142
|
placeholder: "如 30、1fr、auto",
|
|
1143
|
-
onChange: (s) => e.api.updateGridColumnWidth(
|
|
1143
|
+
onChange: (s) => e.api.updateGridColumnWidth(u, s)
|
|
1144
1144
|
}, null, 40, lo)
|
|
1145
1145
|
]);
|
|
1146
1146
|
}), 128))
|
|
@@ -1150,7 +1150,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1150
1150
|
l("select", {
|
|
1151
1151
|
value: e.node.border,
|
|
1152
1152
|
onChange: t[2] || (t[2] = //@ts-ignore
|
|
1153
|
-
(...
|
|
1153
|
+
(...o) => e.api.updateGridBorder && e.api.updateGridBorder(...o))
|
|
1154
1154
|
}, [...t[9] || (t[9] = [
|
|
1155
1155
|
l("option", { value: "all" }, "外框 + 内部", -1),
|
|
1156
1156
|
l("option", { value: "outer" }, "仅外框", -1),
|
|
@@ -1169,10 +1169,10 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1169
1169
|
"data-grid": "gap",
|
|
1170
1170
|
value: e.node.gap ?? "",
|
|
1171
1171
|
onChange: t[3] || (t[3] = //@ts-ignore
|
|
1172
|
-
(...
|
|
1173
|
-
}, null, 40,
|
|
1172
|
+
(...o) => e.api.updateGridGap && e.api.updateGridGap(...o))
|
|
1173
|
+
}, null, 40, ro)
|
|
1174
1174
|
]),
|
|
1175
|
-
l("label",
|
|
1175
|
+
l("label", uo, [
|
|
1176
1176
|
t[12] || (t[12] = l("span", null, "默认内边距(mm)", -1)),
|
|
1177
1177
|
l("input", {
|
|
1178
1178
|
type: "number",
|
|
@@ -1180,7 +1180,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1180
1180
|
step: "1",
|
|
1181
1181
|
"data-cell-default": "padding",
|
|
1182
1182
|
value: e.node.cellPadding ?? "",
|
|
1183
|
-
onChange: t[4] || (t[4] = (
|
|
1183
|
+
onChange: t[4] || (t[4] = (o) => e.api.updateGridCellDefault("cellPadding", o))
|
|
1184
1184
|
}, null, 40, so)
|
|
1185
1185
|
]),
|
|
1186
1186
|
l("label", vo, [
|
|
@@ -1188,7 +1188,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1188
1188
|
l("select", {
|
|
1189
1189
|
"data-cell-default": "align",
|
|
1190
1190
|
value: e.node.cellAlign ?? "",
|
|
1191
|
-
onChange: t[5] || (t[5] = (
|
|
1191
|
+
onChange: t[5] || (t[5] = (o) => e.api.updateGridCellDefault("cellAlign", o))
|
|
1192
1192
|
}, [...t[13] || (t[13] = [
|
|
1193
1193
|
l("option", { value: "" }, "居中(默认)", -1),
|
|
1194
1194
|
l("option", { value: "left" }, "左", -1),
|
|
@@ -1201,7 +1201,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1201
1201
|
l("select", {
|
|
1202
1202
|
"data-cell-default": "valign",
|
|
1203
1203
|
value: e.node.cellVerticalAlign ?? "",
|
|
1204
|
-
onChange: t[6] || (t[6] = (
|
|
1204
|
+
onChange: t[6] || (t[6] = (o) => e.api.updateGridCellDefault("cellVerticalAlign", o))
|
|
1205
1205
|
}, [...t[15] || (t[15] = [
|
|
1206
1206
|
l("option", { value: "" }, "居中(默认)", -1),
|
|
1207
1207
|
l("option", { value: "top" }, "顶部", -1),
|
|
@@ -1213,7 +1213,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1213
1213
|
], 64);
|
|
1214
1214
|
};
|
|
1215
1215
|
}
|
|
1216
|
-
}),
|
|
1216
|
+
}), go = { class: "v2-control v2-control--inline" }, mo = ["checked"], ho = { class: "v2-toolbar v2-toolbar--row" }, yo = ["disabled"], So = ["disabled"], $o = { class: "v2-grid-dimensions" }, Co = { class: "v2-control" }, wo = ["value"], Io = { class: "v2-control" }, xo = ["value"], ko = { class: "v2-control" }, To = ["value"], Fo = { class: "v2-control" }, Do = ["value"], No = /* @__PURE__ */ X({
|
|
1217
1217
|
__name: "CellInspector",
|
|
1218
1218
|
props: {
|
|
1219
1219
|
node: {},
|
|
@@ -1222,18 +1222,18 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1222
1222
|
api: {}
|
|
1223
1223
|
},
|
|
1224
1224
|
setup(e) {
|
|
1225
|
-
return (
|
|
1226
|
-
var a,
|
|
1227
|
-
return $(), I(
|
|
1228
|
-
l("label",
|
|
1225
|
+
return (r, t) => {
|
|
1226
|
+
var a, o;
|
|
1227
|
+
return $(), I(Q, null, [
|
|
1228
|
+
l("label", go, [
|
|
1229
1229
|
t[7] || (t[7] = l("span", null, "内容撑满格子", -1)),
|
|
1230
1230
|
l("input", {
|
|
1231
1231
|
type: "checkbox",
|
|
1232
1232
|
"data-flex": "true",
|
|
1233
1233
|
checked: !!e.node.flex,
|
|
1234
1234
|
onChange: t[0] || (t[0] = //@ts-ignore
|
|
1235
|
-
(...
|
|
1236
|
-
}, null, 40,
|
|
1235
|
+
(...u) => e.api.updateSelectedCellFlex && e.api.updateSelectedCellFlex(...u))
|
|
1236
|
+
}, null, 40, mo)
|
|
1237
1237
|
]),
|
|
1238
1238
|
t[14] || (t[14] = l("div", { class: "v2-sidebar__subheading" }, "合并 / 拆分", -1)),
|
|
1239
1239
|
l("div", ho, [
|
|
@@ -1243,15 +1243,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1243
1243
|
"data-cell-merge": "true",
|
|
1244
1244
|
disabled: !((a = e.cellContext) != null && a.hasNextSibling),
|
|
1245
1245
|
onClick: t[1] || (t[1] = //@ts-ignore
|
|
1246
|
-
(...
|
|
1246
|
+
(...u) => e.api.mergeSelectedCellRight && e.api.mergeSelectedCellRight(...u))
|
|
1247
1247
|
}, " 合并右侧相邻格 ", 8, yo),
|
|
1248
1248
|
l("button", {
|
|
1249
1249
|
class: "v2-toolbar__button",
|
|
1250
1250
|
type: "button",
|
|
1251
1251
|
"data-cell-split": "true",
|
|
1252
|
-
disabled: !((
|
|
1252
|
+
disabled: !((o = e.cellContext) != null && o.canSplit),
|
|
1253
1253
|
onClick: t[2] || (t[2] = //@ts-ignore
|
|
1254
|
-
(...
|
|
1254
|
+
(...u) => e.api.splitSelectedCell && e.api.splitSelectedCell(...u))
|
|
1255
1255
|
}, " 拆分此格 ", 8, So)
|
|
1256
1256
|
]),
|
|
1257
1257
|
l("div", $o, [
|
|
@@ -1264,7 +1264,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1264
1264
|
"data-cell-padding": "true",
|
|
1265
1265
|
value: e.node.padding ?? "",
|
|
1266
1266
|
onChange: t[3] || (t[3] = //@ts-ignore
|
|
1267
|
-
(...
|
|
1267
|
+
(...u) => e.api.updateSelectedCellPadding && e.api.updateSelectedCellPadding(...u))
|
|
1268
1268
|
}, null, 40, wo)
|
|
1269
1269
|
]),
|
|
1270
1270
|
l("label", Io, [
|
|
@@ -1275,28 +1275,28 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1275
1275
|
step: "1",
|
|
1276
1276
|
value: e.node.rowHeight ?? "",
|
|
1277
1277
|
onChange: t[4] || (t[4] = //@ts-ignore
|
|
1278
|
-
(...
|
|
1278
|
+
(...u) => e.api.updateSelectedCellRowHeight && e.api.updateSelectedCellRowHeight(...u))
|
|
1279
1279
|
}, null, 40, xo)
|
|
1280
1280
|
]),
|
|
1281
|
-
l("label",
|
|
1281
|
+
l("label", ko, [
|
|
1282
1282
|
t[11] || (t[11] = l("span", null, "水平对齐", -1)),
|
|
1283
1283
|
l("select", {
|
|
1284
1284
|
value: e.node.align ?? "",
|
|
1285
1285
|
onChange: t[5] || (t[5] = //@ts-ignore
|
|
1286
|
-
(...
|
|
1286
|
+
(...u) => e.api.updateSelectedCellAlign && e.api.updateSelectedCellAlign(...u))
|
|
1287
1287
|
}, [...t[10] || (t[10] = [
|
|
1288
1288
|
l("option", { value: "" }, "默认(居中)", -1),
|
|
1289
1289
|
l("option", { value: "left" }, "左", -1),
|
|
1290
1290
|
l("option", { value: "center" }, "居中", -1),
|
|
1291
1291
|
l("option", { value: "right" }, "右", -1)
|
|
1292
|
-
])], 40,
|
|
1292
|
+
])], 40, To)
|
|
1293
1293
|
]),
|
|
1294
1294
|
l("label", Fo, [
|
|
1295
1295
|
t[13] || (t[13] = l("span", null, "垂直对齐", -1)),
|
|
1296
1296
|
l("select", {
|
|
1297
1297
|
value: e.node.verticalAlign ?? "",
|
|
1298
1298
|
onChange: t[6] || (t[6] = //@ts-ignore
|
|
1299
|
-
(...
|
|
1299
|
+
(...u) => e.api.updateSelectedCellVerticalAlign && e.api.updateSelectedCellVerticalAlign(...u))
|
|
1300
1300
|
}, [...t[12] || (t[12] = [
|
|
1301
1301
|
l("option", { value: "" }, "默认(跟随格子设置)", -1),
|
|
1302
1302
|
l("option", { value: "top" }, "顶部", -1),
|
|
@@ -1308,16 +1308,16 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1308
1308
|
], 64);
|
|
1309
1309
|
};
|
|
1310
1310
|
}
|
|
1311
|
-
}), Po = { class: "v2-style-grid" }, Eo = { class: "v2-control v2-control--inline" }, Ao = ["value"], Ho = { class: "v2-control v2-control--inline" }, Ro = ["value"], Lo = { class: "v2-control v2-control--inline" }, Mo = ["value"], Bo = { class: "v2-control v2-control--inline" }, Vo = ["value"], Go = { class: "v2-grid-dimensions" }, zo = { class: "v2-control" }, Oo = ["value"], Wo = { class: "v2-control" }, Uo = ["value"], jo = { class: "v2-control v2-control--full" },
|
|
1311
|
+
}), Po = { class: "v2-style-grid" }, Eo = { class: "v2-control v2-control--inline" }, Ao = ["value"], Ho = { class: "v2-control v2-control--inline" }, Ro = ["value"], Lo = { class: "v2-control v2-control--inline" }, Mo = ["value"], Bo = { class: "v2-control v2-control--inline" }, Vo = ["value"], Go = { class: "v2-grid-dimensions" }, zo = { class: "v2-control" }, Oo = ["value"], Wo = { class: "v2-control" }, Uo = ["value"], jo = { class: "v2-control v2-control--full" }, Jo = ["value"], vl = /* @__PURE__ */ X({
|
|
1312
1312
|
__name: "TextStyleFields",
|
|
1313
1313
|
props: {
|
|
1314
1314
|
style: {},
|
|
1315
1315
|
api: {}
|
|
1316
1316
|
},
|
|
1317
1317
|
setup(e) {
|
|
1318
|
-
return (
|
|
1319
|
-
var a,
|
|
1320
|
-
return $(), I(
|
|
1318
|
+
return (r, t) => {
|
|
1319
|
+
var a, o, u, f, s, b, v;
|
|
1320
|
+
return $(), I(Q, null, [
|
|
1321
1321
|
t[17] || (t[17] = l("div", { class: "v2-sidebar__subheading" }, "文本样式", -1)),
|
|
1322
1322
|
l("div", Po, [
|
|
1323
1323
|
l("label", Eo, [
|
|
@@ -1337,7 +1337,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1337
1337
|
type: "number",
|
|
1338
1338
|
min: "0",
|
|
1339
1339
|
step: "0.1",
|
|
1340
|
-
value: ((
|
|
1340
|
+
value: ((o = e.style) == null ? void 0 : o.lineHeight) ?? "",
|
|
1341
1341
|
onChange: t[1] || (t[1] = //@ts-ignore
|
|
1342
1342
|
(...p) => e.api.updateSelectedLineHeight && e.api.updateSelectedLineHeight(...p))
|
|
1343
1343
|
}, null, 40, Ro)
|
|
@@ -1345,7 +1345,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1345
1345
|
l("label", Lo, [
|
|
1346
1346
|
t[10] || (t[10] = l("span", null, "粗细", -1)),
|
|
1347
1347
|
l("select", {
|
|
1348
|
-
value: ((
|
|
1348
|
+
value: ((u = e.style) == null ? void 0 : u.fontWeight) ?? "normal",
|
|
1349
1349
|
onChange: t[2] || (t[2] = //@ts-ignore
|
|
1350
1350
|
(...p) => e.api.updateSelectedFontWeight && e.api.updateSelectedFontWeight(...p))
|
|
1351
1351
|
}, [...t[9] || (t[9] = [
|
|
@@ -1357,7 +1357,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1357
1357
|
t[11] || (t[11] = l("span", null, "颜色", -1)),
|
|
1358
1358
|
l("input", {
|
|
1359
1359
|
type: "color",
|
|
1360
|
-
value: ((
|
|
1360
|
+
value: ((f = e.style) == null ? void 0 : f.color) ?? "#111827",
|
|
1361
1361
|
onInput: t[3] || (t[3] = //@ts-ignore
|
|
1362
1362
|
(...p) => e.api.updateSelectedColor && e.api.updateSelectedColor(...p))
|
|
1363
1363
|
}, null, 40, Vo)
|
|
@@ -1379,7 +1379,7 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1379
1379
|
l("label", Wo, [
|
|
1380
1380
|
t[15] || (t[15] = l("span", null, "垂直对齐", -1)),
|
|
1381
1381
|
l("select", {
|
|
1382
|
-
value: ((
|
|
1382
|
+
value: ((b = e.style) == null ? void 0 : b.verticalAlign) ?? "middle",
|
|
1383
1383
|
onChange: t[5] || (t[5] = //@ts-ignore
|
|
1384
1384
|
(...p) => e.api.updateSelectedVerticalAlign && e.api.updateSelectedVerticalAlign(...p))
|
|
1385
1385
|
}, [...t[14] || (t[14] = [
|
|
@@ -1394,21 +1394,21 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1394
1394
|
value: ((v = e.style) == null ? void 0 : v.fontFamily) ?? "",
|
|
1395
1395
|
onInput: t[6] || (t[6] = //@ts-ignore
|
|
1396
1396
|
(...p) => e.api.updateSelectedFontFamily && e.api.updateSelectedFontFamily(...p))
|
|
1397
|
-
}, null, 40,
|
|
1397
|
+
}, null, 40, Jo)
|
|
1398
1398
|
])
|
|
1399
1399
|
])
|
|
1400
1400
|
], 64);
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
|
-
}),
|
|
1403
|
+
}), Ko = { class: "v2-control v2-control--full" }, qo = ["value"], Yo = /* @__PURE__ */ X({
|
|
1404
1404
|
__name: "TextInspector",
|
|
1405
1405
|
props: {
|
|
1406
1406
|
node: {},
|
|
1407
1407
|
api: {}
|
|
1408
1408
|
},
|
|
1409
1409
|
setup(e) {
|
|
1410
|
-
return (
|
|
1411
|
-
l("label",
|
|
1410
|
+
return (r, t) => ($(), I(Q, null, [
|
|
1411
|
+
l("label", Ko, [
|
|
1412
1412
|
t[1] || (t[1] = l("span", null, "文本内容", -1)),
|
|
1413
1413
|
l("textarea", {
|
|
1414
1414
|
class: "v2-textarea",
|
|
@@ -1416,129 +1416,106 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1416
1416
|
value: e.node.text,
|
|
1417
1417
|
onInput: t[0] || (t[0] = //@ts-ignore
|
|
1418
1418
|
(...a) => e.api.updateSelectedText && e.api.updateSelectedText(...a))
|
|
1419
|
-
}, null, 40,
|
|
1419
|
+
}, null, 40, qo)
|
|
1420
1420
|
]),
|
|
1421
|
-
|
|
1422
|
-
style:
|
|
1421
|
+
ae(vl, {
|
|
1422
|
+
style: Ae(e.node.style),
|
|
1423
1423
|
api: e.api
|
|
1424
1424
|
}, null, 8, ["style", "api"])
|
|
1425
1425
|
], 64));
|
|
1426
1426
|
}
|
|
1427
|
-
}), Xo = { class: "v2-control" }, Zo = ["value"], Qo = { class: "v2-grid-dimensions" }, _o = { class: "v2-control" }, ei = ["value"], ti = { class: "v2-control" }, li = ["value"], ai = { class: "v2-control" }, ni = ["
|
|
1428
|
-
key: 0,
|
|
1429
|
-
class: "v2-control v2-control--full"
|
|
1430
|
-
}, ii = ["value"], di = {
|
|
1431
|
-
key: 1,
|
|
1432
|
-
class: "v2-hint"
|
|
1433
|
-
}, ui = { class: "v2-control v2-control--full" }, ri = ["value"], si = { class: "v2-grid-dimensions" }, vi = { class: "v2-control v2-control--full" }, ci = ["value"], pi = { class: "v2-control" }, fi = ["checked"], gi = /* @__PURE__ */ X({
|
|
1427
|
+
}), Xo = { class: "v2-control" }, Zo = ["value"], Qo = { class: "v2-grid-dimensions" }, _o = { class: "v2-control" }, ei = ["value"], ti = { class: "v2-control" }, li = ["value"], ai = { class: "v2-control v2-control--toggle" }, ni = ["checked"], oi = { class: "v2-control v2-control--full" }, ii = ["value"], di = { class: "v2-grid-dimensions" }, ri = { class: "v2-control v2-control--full" }, ui = ["value"], si = { class: "v2-control" }, vi = ["checked"], ci = /* @__PURE__ */ X({
|
|
1434
1428
|
__name: "FieldPInspector",
|
|
1435
1429
|
props: {
|
|
1436
1430
|
node: {},
|
|
1437
1431
|
api: {}
|
|
1438
1432
|
},
|
|
1439
1433
|
setup(e) {
|
|
1440
|
-
return (
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
l("
|
|
1444
|
-
|
|
1434
|
+
return (r, t) => ($(), I(Q, null, [
|
|
1435
|
+
l("label", Xo, [
|
|
1436
|
+
t[7] || (t[7] = l("span", null, "字段名", -1)),
|
|
1437
|
+
l("input", {
|
|
1438
|
+
value: e.node.field,
|
|
1439
|
+
onInput: t[0] || (t[0] = //@ts-ignore
|
|
1440
|
+
(...a) => e.api.updateSelectedField && e.api.updateSelectedField(...a))
|
|
1441
|
+
}, null, 40, Zo)
|
|
1442
|
+
]),
|
|
1443
|
+
l("div", Qo, [
|
|
1444
|
+
l("label", _o, [
|
|
1445
|
+
t[8] || (t[8] = l("span", null, "前标签(可选)", -1)),
|
|
1445
1446
|
l("input", {
|
|
1446
|
-
value: e.node.
|
|
1447
|
-
onInput: t[
|
|
1448
|
-
(...
|
|
1449
|
-
}, null, 40,
|
|
1450
|
-
]),
|
|
1451
|
-
l("div", Qo, [
|
|
1452
|
-
l("label", _o, [
|
|
1453
|
-
t[9] || (t[9] = l("span", null, "前标签(可选)", -1)),
|
|
1454
|
-
l("input", {
|
|
1455
|
-
value: e.node.prefix ?? "",
|
|
1456
|
-
onInput: t[1] || (t[1] = //@ts-ignore
|
|
1457
|
-
(...n) => e.api.updateSelectedPrefix && e.api.updateSelectedPrefix(...n))
|
|
1458
|
-
}, null, 40, ei)
|
|
1459
|
-
]),
|
|
1460
|
-
l("label", ti, [
|
|
1461
|
-
t[10] || (t[10] = l("span", null, "后标签(可选)", -1)),
|
|
1462
|
-
l("input", {
|
|
1463
|
-
value: e.node.suffix ?? "",
|
|
1464
|
-
onInput: t[2] || (t[2] = //@ts-ignore
|
|
1465
|
-
(...n) => e.api.updateSelectedSuffix && e.api.updateSelectedSuffix(...n))
|
|
1466
|
-
}, null, 40, li)
|
|
1467
|
-
])
|
|
1468
|
-
]),
|
|
1469
|
-
l("label", ai, [
|
|
1470
|
-
t[12] || (t[12] = l("span", null, "输入方式", -1)),
|
|
1471
|
-
l("select", {
|
|
1472
|
-
value: e.node.action ?? "text",
|
|
1473
|
-
onChange: t[3] || (t[3] = //@ts-ignore
|
|
1474
|
-
(...n) => e.api.updateSelectedAction && e.api.updateSelectedAction(...n))
|
|
1475
|
-
}, [...t[11] || (t[11] = [
|
|
1476
|
-
l("option", { value: "text" }, "无(纯文本输入)", -1),
|
|
1477
|
-
l("option", { value: "date" }, "日期选择器", -1),
|
|
1478
|
-
l("option", { value: "signature" }, "签名板", -1),
|
|
1479
|
-
l("option", { value: "upload" }, "文件上传", -1)
|
|
1480
|
-
])], 40, ni)
|
|
1447
|
+
value: e.node.prefix ?? "",
|
|
1448
|
+
onInput: t[1] || (t[1] = //@ts-ignore
|
|
1449
|
+
(...a) => e.api.updateSelectedPrefix && e.api.updateSelectedPrefix(...a))
|
|
1450
|
+
}, null, 40, ei)
|
|
1481
1451
|
]),
|
|
1482
|
-
|
|
1483
|
-
t[
|
|
1452
|
+
l("label", ti, [
|
|
1453
|
+
t[9] || (t[9] = l("span", null, "后标签(可选)", -1)),
|
|
1484
1454
|
l("input", {
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1455
|
+
value: e.node.suffix ?? "",
|
|
1456
|
+
onInput: t[2] || (t[2] = //@ts-ignore
|
|
1457
|
+
(...a) => e.api.updateSelectedSuffix && e.api.updateSelectedSuffix(...a))
|
|
1458
|
+
}, null, 40, li)
|
|
1459
|
+
])
|
|
1460
|
+
]),
|
|
1461
|
+
l("label", ai, [
|
|
1462
|
+
l("input", {
|
|
1463
|
+
type: "checkbox",
|
|
1464
|
+
"data-field-interactive": "true",
|
|
1465
|
+
checked: e.node.interactive ?? !1,
|
|
1466
|
+
onChange: t[3] || (t[3] = //@ts-ignore
|
|
1467
|
+
(...a) => e.api.updateSelectedInteractive && e.api.updateSelectedInteractive(...a))
|
|
1468
|
+
}, null, 40, ni),
|
|
1469
|
+
t[10] || (t[10] = l("span", null, "点击触发外部控件", -1))
|
|
1470
|
+
]),
|
|
1471
|
+
ae(vl, {
|
|
1472
|
+
style: Ae(e.node.style),
|
|
1473
|
+
api: e.api
|
|
1474
|
+
}, null, 8, ["style", "api"]),
|
|
1475
|
+
l("label", oi, [
|
|
1476
|
+
t[11] || (t[11] = l("span", null, "默认内容", -1)),
|
|
1477
|
+
l("textarea", {
|
|
1478
|
+
class: "v2-textarea",
|
|
1479
|
+
rows: "3",
|
|
1480
|
+
"data-field-default": "true",
|
|
1481
|
+
value: e.node.default ?? "",
|
|
1482
|
+
onInput: t[4] || (t[4] = //@ts-ignore
|
|
1483
|
+
(...a) => e.api.updateSelectedDefault && e.api.updateSelectedDefault(...a))
|
|
1484
|
+
}, null, 40, ii)
|
|
1485
|
+
]),
|
|
1486
|
+
l("div", di, [
|
|
1487
|
+
l("label", ri, [
|
|
1488
|
+
t[12] || (t[12] = l("span", null, "输入区宽度", -1)),
|
|
1489
|
+
l("input", {
|
|
1490
|
+
"data-field-width": "true",
|
|
1491
|
+
placeholder: "如 30mm、50%,留空不限",
|
|
1492
|
+
value: e.node.width ?? "",
|
|
1504
1493
|
onInput: t[5] || (t[5] = //@ts-ignore
|
|
1505
|
-
(...
|
|
1506
|
-
}, null, 40,
|
|
1494
|
+
(...a) => e.api.updateSelectedWidth && e.api.updateSelectedWidth(...a))
|
|
1495
|
+
}, null, 40, ui)
|
|
1507
1496
|
]),
|
|
1508
|
-
l("
|
|
1509
|
-
l("
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
}, null, 40, ci)
|
|
1518
|
-
]),
|
|
1519
|
-
l("label", pi, [
|
|
1520
|
-
t[16] || (t[16] = l("span", null, "内部边框", -1)),
|
|
1521
|
-
l("input", {
|
|
1522
|
-
type: "checkbox",
|
|
1523
|
-
"data-field-inner-border": "true",
|
|
1524
|
-
checked: e.node.innerBorder ?? !1,
|
|
1525
|
-
onChange: t[7] || (t[7] = //@ts-ignore
|
|
1526
|
-
(...n) => e.api.updateSelectedInnerBorder && e.api.updateSelectedInnerBorder(...n))
|
|
1527
|
-
}, null, 40, fi)
|
|
1528
|
-
])
|
|
1497
|
+
l("label", si, [
|
|
1498
|
+
t[13] || (t[13] = l("span", null, "内部边框", -1)),
|
|
1499
|
+
l("input", {
|
|
1500
|
+
type: "checkbox",
|
|
1501
|
+
"data-field-inner-border": "true",
|
|
1502
|
+
checked: e.node.innerBorder ?? !1,
|
|
1503
|
+
onChange: t[6] || (t[6] = //@ts-ignore
|
|
1504
|
+
(...a) => e.api.updateSelectedInnerBorder && e.api.updateSelectedInnerBorder(...a))
|
|
1505
|
+
}, null, 40, vi)
|
|
1529
1506
|
])
|
|
1530
|
-
]
|
|
1531
|
-
|
|
1507
|
+
])
|
|
1508
|
+
], 64));
|
|
1532
1509
|
}
|
|
1533
|
-
}),
|
|
1510
|
+
}), pi = { class: "v2-control v2-control--full" }, fi = ["value"], bi = { class: "v2-control v2-control--full" }, gi = ["value"], mi = /* @__PURE__ */ X({
|
|
1534
1511
|
__name: "HtmlInspector",
|
|
1535
1512
|
props: {
|
|
1536
1513
|
node: {},
|
|
1537
1514
|
api: {}
|
|
1538
1515
|
},
|
|
1539
1516
|
setup(e) {
|
|
1540
|
-
return (
|
|
1541
|
-
l("label",
|
|
1517
|
+
return (r, t) => ($(), I(Q, null, [
|
|
1518
|
+
l("label", pi, [
|
|
1542
1519
|
t[2] || (t[2] = l("span", null, "HTML 片段(不含脚本)", -1)),
|
|
1543
1520
|
l("textarea", {
|
|
1544
1521
|
class: "v2-textarea",
|
|
@@ -1546,9 +1523,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1546
1523
|
value: e.node.html,
|
|
1547
1524
|
onInput: t[0] || (t[0] = //@ts-ignore
|
|
1548
1525
|
(...a) => e.api.updateSelectedHtml && e.api.updateSelectedHtml(...a))
|
|
1549
|
-
}, null, 40,
|
|
1526
|
+
}, null, 40, fi)
|
|
1550
1527
|
]),
|
|
1551
|
-
l("label",
|
|
1528
|
+
l("label", bi, [
|
|
1552
1529
|
t[3] || (t[3] = l("span", null, "样式代码(仅模块内生效)", -1)),
|
|
1553
1530
|
l("textarea", {
|
|
1554
1531
|
class: "v2-textarea",
|
|
@@ -1556,62 +1533,62 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1556
1533
|
value: e.node.css ?? "",
|
|
1557
1534
|
onInput: t[1] || (t[1] = //@ts-ignore
|
|
1558
1535
|
(...a) => e.api.updateSelectedCss && e.api.updateSelectedCss(...a))
|
|
1559
|
-
}, null, 40,
|
|
1536
|
+
}, null, 40, gi)
|
|
1560
1537
|
]),
|
|
1561
1538
|
t[4] || (t[4] = l("p", { class: "v2-sidebar__hint" }, " 支持 {{ 字段 }} 占位符,展示时自动替换为填写内容;样式仅在模块内部生效,不影响整张表单。 ", -1))
|
|
1562
1539
|
], 64));
|
|
1563
1540
|
}
|
|
1564
|
-
}),
|
|
1541
|
+
}), hi = { class: "v2-grid-dimensions" }, yi = { class: "v2-control v2-control--full" }, Si = ["value"], $i = { class: "v2-control v2-control--full" }, Ci = ["value"], wi = { class: "v2-grid-dimensions" }, Ii = { class: "v2-control" }, xi = ["value"], ki = { class: "v2-control" }, Ti = ["value"], Fi = { class: "v2-control" }, Di = ["value"], Ni = {
|
|
1565
1542
|
key: 0,
|
|
1566
1543
|
class: "v2-sidebar__hint"
|
|
1567
|
-
},
|
|
1544
|
+
}, Pi = /* @__PURE__ */ X({
|
|
1568
1545
|
__name: "ImageInspector",
|
|
1569
1546
|
props: {
|
|
1570
1547
|
node: {},
|
|
1571
1548
|
api: {}
|
|
1572
1549
|
},
|
|
1573
1550
|
setup(e) {
|
|
1574
|
-
return (
|
|
1575
|
-
l("div",
|
|
1576
|
-
l("label",
|
|
1551
|
+
return (r, t) => ($(), I(Q, null, [
|
|
1552
|
+
l("div", hi, [
|
|
1553
|
+
l("label", yi, [
|
|
1577
1554
|
t[5] || (t[5] = l("span", null, "字段名", -1)),
|
|
1578
1555
|
l("input", {
|
|
1579
1556
|
value: e.node.field ?? "",
|
|
1580
1557
|
onInput: t[0] || (t[0] = //@ts-ignore
|
|
1581
1558
|
(...a) => e.api.updateSelectedImageField && e.api.updateSelectedImageField(...a))
|
|
1582
|
-
}, null, 40,
|
|
1559
|
+
}, null, 40, Si)
|
|
1583
1560
|
]),
|
|
1584
|
-
l("label",
|
|
1561
|
+
l("label", $i, [
|
|
1585
1562
|
t[6] || (t[6] = l("span", null, "图片地址", -1)),
|
|
1586
1563
|
l("input", {
|
|
1587
1564
|
value: e.node.src ?? "",
|
|
1588
1565
|
placeholder: "https:// 链接或 Base64",
|
|
1589
1566
|
onInput: t[1] || (t[1] = //@ts-ignore
|
|
1590
1567
|
(...a) => e.api.updateSelectedImageSrc && e.api.updateSelectedImageSrc(...a))
|
|
1591
|
-
}, null, 40,
|
|
1568
|
+
}, null, 40, Ci)
|
|
1592
1569
|
])
|
|
1593
1570
|
]),
|
|
1594
|
-
l("div",
|
|
1595
|
-
l("label",
|
|
1571
|
+
l("div", wi, [
|
|
1572
|
+
l("label", Ii, [
|
|
1596
1573
|
t[7] || (t[7] = l("span", null, "宽(mm)", -1)),
|
|
1597
1574
|
l("input", {
|
|
1598
1575
|
type: "number",
|
|
1599
1576
|
min: "0",
|
|
1600
1577
|
value: e.node.width ?? "",
|
|
1601
1578
|
onChange: t[2] || (t[2] = (a) => e.api.updateSelectedImageSize("width", a))
|
|
1602
|
-
}, null, 40,
|
|
1579
|
+
}, null, 40, xi)
|
|
1603
1580
|
]),
|
|
1604
|
-
l("label",
|
|
1581
|
+
l("label", ki, [
|
|
1605
1582
|
t[8] || (t[8] = l("span", null, "高(mm)", -1)),
|
|
1606
1583
|
l("input", {
|
|
1607
1584
|
type: "number",
|
|
1608
1585
|
min: "0",
|
|
1609
1586
|
value: e.node.height ?? "",
|
|
1610
1587
|
onChange: t[3] || (t[3] = (a) => e.api.updateSelectedImageSize("height", a))
|
|
1611
|
-
}, null, 40,
|
|
1588
|
+
}, null, 40, Ti)
|
|
1612
1589
|
])
|
|
1613
1590
|
]),
|
|
1614
|
-
l("label",
|
|
1591
|
+
l("label", Fi, [
|
|
1615
1592
|
t[10] || (t[10] = l("span", null, "填充方式", -1)),
|
|
1616
1593
|
l("select", {
|
|
1617
1594
|
value: e.node.objectFit ?? "contain",
|
|
@@ -1621,27 +1598,30 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1621
1598
|
l("option", { value: "contain" }, "等比完整显示", -1),
|
|
1622
1599
|
l("option", { value: "cover" }, "裁剪填满", -1),
|
|
1623
1600
|
l("option", { value: "fill" }, "拉伸填满", -1)
|
|
1624
|
-
])], 40,
|
|
1601
|
+
])], 40, Di)
|
|
1625
1602
|
]),
|
|
1626
|
-
!e.node.src && !e.node.field ? ($(), I("p",
|
|
1627
|
-
|
|
1603
|
+
!e.node.src && !e.node.field ? ($(), I("p", Ni, [...t[11] || (t[11] = [
|
|
1604
|
+
be(" 还没配置图片地址:画布上会显示占位框方便编辑,", -1),
|
|
1628
1605
|
l("strong", null, "打印时不占位置", -1),
|
|
1629
|
-
|
|
1630
|
-
])])) :
|
|
1606
|
+
be("。 ", -1)
|
|
1607
|
+
])])) : q("", !0)
|
|
1631
1608
|
], 64));
|
|
1632
1609
|
}
|
|
1633
|
-
}),
|
|
1610
|
+
}), Ei = { class: "v2-grid-dimensions" }, Ai = { class: "v2-control" }, Hi = ["value"], Ri = { class: "v2-control" }, Li = ["value"], Mi = { class: "v2-style-grid" }, Bi = { class: "v2-control v2-control--inline" }, Vi = ["value"], Gi = { class: "v2-control v2-control--inline" }, zi = ["value"], Oi = { class: "v2-grid-dimensions" }, Wi = { class: "v2-control" }, Ui = ["value"], ji = {
|
|
1611
|
+
class: "v2-col-table",
|
|
1612
|
+
"data-table-columns": "true"
|
|
1613
|
+
}, Ji = ["value", "onInput"], Ki = ["value", "onInput"], qi = ["disabled", "title", "onClick"], Yi = /* @__PURE__ */ X({
|
|
1634
1614
|
__name: "TableInspector",
|
|
1635
1615
|
props: {
|
|
1636
1616
|
node: {},
|
|
1637
1617
|
api: {}
|
|
1638
1618
|
},
|
|
1639
1619
|
setup(e) {
|
|
1640
|
-
return (
|
|
1641
|
-
var a,
|
|
1642
|
-
return $(), I(
|
|
1643
|
-
l("div",
|
|
1644
|
-
l("label",
|
|
1620
|
+
return (r, t) => {
|
|
1621
|
+
var a, o, u;
|
|
1622
|
+
return $(), I(Q, null, [
|
|
1623
|
+
l("div", Ei, [
|
|
1624
|
+
l("label", Ai, [
|
|
1645
1625
|
t[6] || (t[6] = l("span", null, "最小行数", -1)),
|
|
1646
1626
|
l("input", {
|
|
1647
1627
|
type: "number",
|
|
@@ -1649,26 +1629,26 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1649
1629
|
step: "1",
|
|
1650
1630
|
value: e.node.minRows,
|
|
1651
1631
|
onChange: t[0] || (t[0] = //@ts-ignore
|
|
1652
|
-
(...
|
|
1653
|
-
}, null, 40,
|
|
1632
|
+
(...f) => e.api.updateTableRows && e.api.updateTableRows(...f))
|
|
1633
|
+
}, null, 40, Hi)
|
|
1654
1634
|
]),
|
|
1655
|
-
l("label",
|
|
1635
|
+
l("label", Ri, [
|
|
1656
1636
|
t[8] || (t[8] = l("span", null, "边框", -1)),
|
|
1657
1637
|
l("select", {
|
|
1658
1638
|
value: e.node.border ?? "all",
|
|
1659
1639
|
onChange: t[1] || (t[1] = //@ts-ignore
|
|
1660
|
-
(...
|
|
1640
|
+
(...f) => e.api.updateTableBorder && e.api.updateTableBorder(...f))
|
|
1661
1641
|
}, [...t[7] || (t[7] = [
|
|
1662
1642
|
l("option", { value: "all" }, "外框 + 内部", -1),
|
|
1663
1643
|
l("option", { value: "outer" }, "仅外框", -1),
|
|
1664
1644
|
l("option", { value: "inner" }, "仅内部", -1),
|
|
1665
1645
|
l("option", { value: "none" }, "无边框", -1)
|
|
1666
|
-
])], 40,
|
|
1646
|
+
])], 40, Li)
|
|
1667
1647
|
])
|
|
1668
1648
|
]),
|
|
1669
1649
|
t[15] || (t[15] = l("div", { class: "v2-sidebar__subheading" }, "表头样式", -1)),
|
|
1670
|
-
l("div",
|
|
1671
|
-
l("label",
|
|
1650
|
+
l("div", Mi, [
|
|
1651
|
+
l("label", Bi, [
|
|
1672
1652
|
t[9] || (t[9] = l("span", null, "字号(px)", -1)),
|
|
1673
1653
|
l("input", {
|
|
1674
1654
|
type: "number",
|
|
@@ -1676,98 +1656,164 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1676
1656
|
step: "1",
|
|
1677
1657
|
value: ((a = e.node.headerStyle) == null ? void 0 : a.fontSize) ?? 16,
|
|
1678
1658
|
onChange: t[2] || (t[2] = //@ts-ignore
|
|
1679
|
-
(...
|
|
1680
|
-
}, null, 40,
|
|
1659
|
+
(...f) => e.api.updateTableHeaderFontSize && e.api.updateTableHeaderFontSize(...f))
|
|
1660
|
+
}, null, 40, Vi)
|
|
1681
1661
|
]),
|
|
1682
|
-
l("label",
|
|
1662
|
+
l("label", Gi, [
|
|
1683
1663
|
t[11] || (t[11] = l("span", null, "粗细", -1)),
|
|
1684
1664
|
l("select", {
|
|
1685
|
-
value: ((
|
|
1665
|
+
value: ((o = e.node.headerStyle) == null ? void 0 : o.fontWeight) ?? "normal",
|
|
1686
1666
|
onChange: t[3] || (t[3] = //@ts-ignore
|
|
1687
|
-
(...
|
|
1667
|
+
(...f) => e.api.updateTableHeaderFontWeight && e.api.updateTableHeaderFontWeight(...f))
|
|
1688
1668
|
}, [...t[10] || (t[10] = [
|
|
1689
1669
|
l("option", { value: "normal" }, "常规", -1),
|
|
1690
1670
|
l("option", { value: "bold" }, "加粗", -1)
|
|
1691
|
-
])], 40,
|
|
1671
|
+
])], 40, zi)
|
|
1692
1672
|
])
|
|
1693
1673
|
]),
|
|
1694
|
-
l("div",
|
|
1695
|
-
l("label",
|
|
1674
|
+
l("div", Oi, [
|
|
1675
|
+
l("label", Wi, [
|
|
1696
1676
|
t[13] || (t[13] = l("span", null, "水平对齐", -1)),
|
|
1697
1677
|
l("select", {
|
|
1698
|
-
value: ((
|
|
1678
|
+
value: ((u = e.node.headerStyle) == null ? void 0 : u.align) ?? "left",
|
|
1699
1679
|
onChange: t[4] || (t[4] = //@ts-ignore
|
|
1700
|
-
(...
|
|
1680
|
+
(...f) => e.api.updateTableHeaderAlign && e.api.updateTableHeaderAlign(...f))
|
|
1701
1681
|
}, [...t[12] || (t[12] = [
|
|
1702
1682
|
l("option", { value: "left" }, "左", -1),
|
|
1703
1683
|
l("option", { value: "center" }, "居中", -1),
|
|
1704
1684
|
l("option", { value: "right" }, "右", -1)
|
|
1705
|
-
])], 40,
|
|
1685
|
+
])], 40, Ui)
|
|
1706
1686
|
])
|
|
1707
1687
|
]),
|
|
1708
1688
|
t[16] || (t[16] = l("div", { class: "v2-sidebar__subheading" }, "列配置", -1)),
|
|
1709
|
-
l("div",
|
|
1689
|
+
l("div", ji, [
|
|
1710
1690
|
t[14] || (t[14] = l("div", { class: "v2-col-table__row v2-col-table__head" }, [
|
|
1711
1691
|
l("span", { class: "v2-col-table__th" }, "标题"),
|
|
1712
1692
|
l("span", { class: "v2-col-table__th" }, "字段"),
|
|
1713
1693
|
l("span", { class: "v2-col-table__th v2-col-table__th--action" })
|
|
1714
1694
|
], -1)),
|
|
1715
|
-
($(!0), I(
|
|
1716
|
-
key:
|
|
1695
|
+
($(!0), I(Q, null, ge(e.node.columns, (f) => ($(), I("div", {
|
|
1696
|
+
key: f.key,
|
|
1717
1697
|
class: "v2-col-table__row"
|
|
1718
1698
|
}, [
|
|
1719
1699
|
l("input", {
|
|
1720
1700
|
class: "v2-col-table__input",
|
|
1721
|
-
value:
|
|
1701
|
+
value: f.title,
|
|
1722
1702
|
placeholder: "列标题",
|
|
1723
|
-
onInput: (s) => e.api.updateTableColumn(
|
|
1724
|
-
}, null, 40,
|
|
1703
|
+
onInput: (s) => e.api.updateTableColumn(f.key, "title", s)
|
|
1704
|
+
}, null, 40, Ji),
|
|
1725
1705
|
l("input", {
|
|
1726
1706
|
class: "v2-col-table__input v2-col-table__input--mono",
|
|
1727
|
-
value:
|
|
1707
|
+
value: f.key,
|
|
1728
1708
|
placeholder: "字段名",
|
|
1729
|
-
onInput: (s) => e.api.renameTableColumnKey(
|
|
1730
|
-
}, null, 40,
|
|
1709
|
+
onInput: (s) => e.api.renameTableColumnKey(f.key, s)
|
|
1710
|
+
}, null, 40, Ki),
|
|
1731
1711
|
l("button", {
|
|
1732
1712
|
class: "v2-inspector__delete v2-inspector__delete--small",
|
|
1733
1713
|
type: "button",
|
|
1734
1714
|
disabled: e.node.columns.length <= 1,
|
|
1735
|
-
title: `删除列 ${
|
|
1736
|
-
onClick: (s) => e.api.removeTableColumn(
|
|
1737
|
-
}, " ✕ ", 8,
|
|
1715
|
+
title: `删除列 ${f.key}`,
|
|
1716
|
+
onClick: (s) => e.api.removeTableColumn(f.key)
|
|
1717
|
+
}, " ✕ ", 8, qi)
|
|
1738
1718
|
]))), 128))
|
|
1739
1719
|
]),
|
|
1740
1720
|
l("button", {
|
|
1741
1721
|
class: "v2-toolbar__button v2-add-col",
|
|
1742
1722
|
type: "button",
|
|
1743
1723
|
onClick: t[5] || (t[5] = //@ts-ignore
|
|
1744
|
-
(...
|
|
1724
|
+
(...f) => e.api.addTableColumn && e.api.addTableColumn(...f))
|
|
1745
1725
|
}, " + 添加列 ")
|
|
1746
1726
|
], 64);
|
|
1747
1727
|
};
|
|
1748
1728
|
}
|
|
1749
|
-
}),
|
|
1729
|
+
}), Xi = {
|
|
1730
|
+
class: "v2-col-table",
|
|
1731
|
+
"data-node-params": "true"
|
|
1732
|
+
}, Zi = ["value", "onChange"], Qi = ["value", "onInput"], _i = ["title", "onClick"], ed = {
|
|
1733
|
+
key: 0,
|
|
1734
|
+
class: "v2-hint v2-hint--warn"
|
|
1735
|
+
}, td = /* @__PURE__ */ X({
|
|
1736
|
+
__name: "ParamsFields",
|
|
1737
|
+
props: {
|
|
1738
|
+
params: {},
|
|
1739
|
+
api: {}
|
|
1740
|
+
},
|
|
1741
|
+
setup(e) {
|
|
1742
|
+
const r = e, t = N(() => Object.keys(r.params ?? {})), a = N(() => t.value.some((o) => !Jt(o)));
|
|
1743
|
+
return (o, u) => ($(), I(Q, null, [
|
|
1744
|
+
u[3] || (u[3] = l("div", {
|
|
1745
|
+
class: "v2-sidebar__subheading",
|
|
1746
|
+
title: '键值对会作为 HTML 属性插到该组件的标签上(如 action="datePicker");内核不解释这些属性,怎么消费由宿主决定。'
|
|
1747
|
+
}, " 额外属性 ", -1)),
|
|
1748
|
+
l("div", Xi, [
|
|
1749
|
+
u[1] || (u[1] = l("div", { class: "v2-col-table__row v2-col-table__head" }, [
|
|
1750
|
+
l("span", { class: "v2-col-table__th" }, "属性名"),
|
|
1751
|
+
l("span", { class: "v2-col-table__th" }, "值"),
|
|
1752
|
+
l("span", { class: "v2-col-table__th v2-col-table__th--action" })
|
|
1753
|
+
], -1)),
|
|
1754
|
+
($(!0), I(Q, null, ge(t.value, (f) => {
|
|
1755
|
+
var s;
|
|
1756
|
+
return $(), I("div", {
|
|
1757
|
+
key: f,
|
|
1758
|
+
class: "v2-col-table__row"
|
|
1759
|
+
}, [
|
|
1760
|
+
l("input", {
|
|
1761
|
+
class: pe(["v2-col-table__input v2-col-table__input--mono", { "v2-col-table__input--invalid": !x(Jt)(f) }]),
|
|
1762
|
+
"data-param-key": "true",
|
|
1763
|
+
placeholder: "如 action",
|
|
1764
|
+
value: f,
|
|
1765
|
+
onChange: (b) => e.api.renameSelectedParam(f, b)
|
|
1766
|
+
}, null, 42, Zi),
|
|
1767
|
+
l("input", {
|
|
1768
|
+
class: "v2-col-table__input",
|
|
1769
|
+
"data-param-value": "true",
|
|
1770
|
+
placeholder: "如 datePicker",
|
|
1771
|
+
value: ((s = e.params) == null ? void 0 : s[f]) ?? "",
|
|
1772
|
+
onInput: (b) => e.api.updateSelectedParamValue(f, b)
|
|
1773
|
+
}, null, 40, Qi),
|
|
1774
|
+
l("button", {
|
|
1775
|
+
class: "v2-inspector__delete v2-inspector__delete--small",
|
|
1776
|
+
type: "button",
|
|
1777
|
+
title: `删除属性 ${f}`,
|
|
1778
|
+
onClick: (b) => e.api.removeSelectedParam(f)
|
|
1779
|
+
}, " ✕ ", 8, _i)
|
|
1780
|
+
]);
|
|
1781
|
+
}), 128))
|
|
1782
|
+
]),
|
|
1783
|
+
l("button", {
|
|
1784
|
+
class: "v2-toolbar__button v2-add-col",
|
|
1785
|
+
type: "button",
|
|
1786
|
+
"data-param-add": "true",
|
|
1787
|
+
onClick: u[0] || (u[0] = //@ts-ignore
|
|
1788
|
+
(...f) => e.api.addSelectedParam && e.api.addSelectedParam(...f))
|
|
1789
|
+
}, " + 添加属性 "),
|
|
1790
|
+
a.value ? ($(), I("p", ed, [...u[2] || (u[2] = [
|
|
1791
|
+
nl(" 红字属性名不会被渲染:内核会丢弃 <code>on*</code>(事件)与 <code>data-*</code>(节点寻址), 以及 <code>class</code> / <code>style</code> / <code>field</code> 等保留名;属性名须全小写, 仅含小写字母、数字、<code>-</code>、<code>_</code>。 ", 15)
|
|
1792
|
+
])])) : q("", !0)
|
|
1793
|
+
], 64));
|
|
1794
|
+
}
|
|
1795
|
+
}), ld = ["onClick"], ad = /* @__PURE__ */ X({
|
|
1750
1796
|
__name: "IssuesPanel",
|
|
1751
1797
|
props: {
|
|
1752
1798
|
issues: {}
|
|
1753
1799
|
},
|
|
1754
1800
|
emits: ["select"],
|
|
1755
|
-
setup(e, { emit:
|
|
1756
|
-
const t =
|
|
1757
|
-
return (a,
|
|
1758
|
-
class:
|
|
1801
|
+
setup(e, { emit: r }) {
|
|
1802
|
+
const t = r;
|
|
1803
|
+
return (a, o) => ($(), I("div", {
|
|
1804
|
+
class: pe(["v2-issues", { "v2-issues--ok": e.issues.length === 0 }])
|
|
1759
1805
|
}, [
|
|
1760
|
-
l("strong", null,
|
|
1761
|
-
($(!0), I(
|
|
1762
|
-
key:
|
|
1806
|
+
l("strong", null, E(e.issues.length === 0 ? "检查通过" : "发现 " + e.issues.length + " 个问题"), 1),
|
|
1807
|
+
($(!0), I(Q, null, ge(e.issues, (u) => ($(), I("div", {
|
|
1808
|
+
key: u.code + "-" + (u.nodeId || "schema"),
|
|
1763
1809
|
class: "v2-issue v2-issue--selectable",
|
|
1764
|
-
onClick: (
|
|
1765
|
-
},
|
|
1810
|
+
onClick: (f) => t("select", u)
|
|
1811
|
+
}, E(u.message), 9, ld))), 128))
|
|
1766
1812
|
], 2));
|
|
1767
1813
|
}
|
|
1768
|
-
}),
|
|
1814
|
+
}), nd = /* @__PURE__ */ ve(ad, [["__scopeId", "data-v-1f696812"]]), od = { class: "v2-sidebar v2-sidebar--right" }, id = { class: "v2-inspector-row" }, dd = { class: "v2-inspector-row v2-inspector-row--head" }, rd = /* @__PURE__ */ X({
|
|
1769
1815
|
__name: "InspectorPanel",
|
|
1770
|
-
props: /* @__PURE__ */
|
|
1816
|
+
props: /* @__PURE__ */ Xe({
|
|
1771
1817
|
node: { default: null },
|
|
1772
1818
|
nodeId: { default: null },
|
|
1773
1819
|
nodeType: {},
|
|
@@ -1787,9 +1833,9 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1787
1833
|
paginate: { type: Boolean, required: !0 },
|
|
1788
1834
|
paginateModifiers: {}
|
|
1789
1835
|
}),
|
|
1790
|
-
emits: /* @__PURE__ */
|
|
1791
|
-
setup(e, { emit:
|
|
1792
|
-
const t = e, a =
|
|
1836
|
+
emits: /* @__PURE__ */ Xe(["selectIssue"], ["update:paginate"]),
|
|
1837
|
+
setup(e, { emit: r }) {
|
|
1838
|
+
const t = e, a = N(() => {
|
|
1793
1839
|
const s = t.node;
|
|
1794
1840
|
return s && s.type === "page" ? {
|
|
1795
1841
|
top: s.margin.top ?? 12,
|
|
@@ -1797,30 +1843,30 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1797
1843
|
bottom: s.margin.bottom ?? 12,
|
|
1798
1844
|
left: s.margin.left ?? 12
|
|
1799
1845
|
} : { top: 12, right: 12, bottom: 12, left: 12 };
|
|
1800
|
-
}),
|
|
1846
|
+
}), o = al(e, "paginate"), u = r, f = N(() => {
|
|
1801
1847
|
const s = t.node;
|
|
1802
1848
|
if (!s) return "未选择";
|
|
1803
1849
|
if (s.type === "grid-cell" && t.cellContext) {
|
|
1804
|
-
const { rowIndex:
|
|
1805
|
-
if (
|
|
1850
|
+
const { rowIndex: b, columnIndex: v } = t.cellContext;
|
|
1851
|
+
if (b >= 0) return `格子 ${b + 1}-${v + 1}`;
|
|
1806
1852
|
}
|
|
1807
|
-
return
|
|
1853
|
+
return Ee(s);
|
|
1808
1854
|
});
|
|
1809
|
-
return (s,
|
|
1810
|
-
var v, p, g,
|
|
1811
|
-
return $(), I("aside",
|
|
1812
|
-
l("div",
|
|
1813
|
-
|
|
1814
|
-
l("strong", null,
|
|
1855
|
+
return (s, b) => {
|
|
1856
|
+
var v, p, g, M, A, H, U, Z;
|
|
1857
|
+
return $(), I("aside", od, [
|
|
1858
|
+
l("div", id, [
|
|
1859
|
+
b[2] || (b[2] = l("span", null, "组件类型", -1)),
|
|
1860
|
+
l("strong", null, E(e.nodeType), 1)
|
|
1815
1861
|
]),
|
|
1816
|
-
l("div",
|
|
1817
|
-
|
|
1818
|
-
l("code", null,
|
|
1862
|
+
l("div", dd, [
|
|
1863
|
+
b[3] || (b[3] = l("span", null, "当前选中", -1)),
|
|
1864
|
+
l("code", null, E(f.value), 1)
|
|
1819
1865
|
]),
|
|
1820
|
-
((v = e.node) == null ? void 0 : v.type) === "page" ? ($(), oe(
|
|
1866
|
+
((v = e.node) == null ? void 0 : v.type) === "page" ? ($(), oe(Yn, {
|
|
1821
1867
|
key: 0,
|
|
1822
|
-
paginate:
|
|
1823
|
-
"onUpdate:paginate":
|
|
1868
|
+
paginate: o.value,
|
|
1869
|
+
"onUpdate:paginate": b[0] || (b[0] = (j) => o.value = j),
|
|
1824
1870
|
"paper-size": e.paperSize,
|
|
1825
1871
|
"base-row-height": e.baseRowHeight,
|
|
1826
1872
|
"paper-margin-top": a.value.top,
|
|
@@ -1830,15 +1876,15 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1830
1876
|
header: e.header,
|
|
1831
1877
|
footer: e.footer,
|
|
1832
1878
|
api: e.api
|
|
1833
|
-
}, null, 8, ["paginate", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "api"])) : ((p = e.node) == null ? void 0 : p.type) === "grid" ? ($(), oe(
|
|
1879
|
+
}, null, 8, ["paginate", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "api"])) : ((p = e.node) == null ? void 0 : p.type) === "grid" ? ($(), oe(bo, {
|
|
1834
1880
|
key: 1,
|
|
1835
1881
|
node: e.node,
|
|
1836
1882
|
api: e.api
|
|
1837
|
-
}, null, 8, ["node", "api"])) : ((g = e.node) == null ? void 0 : g.type) === "text" ? ($(), oe(
|
|
1883
|
+
}, null, 8, ["node", "api"])) : ((g = e.node) == null ? void 0 : g.type) === "text" ? ($(), oe(Yo, {
|
|
1838
1884
|
key: 2,
|
|
1839
1885
|
node: e.node,
|
|
1840
1886
|
api: e.api
|
|
1841
|
-
}, null, 8, ["node", "api"])) : ((
|
|
1887
|
+
}, null, 8, ["node", "api"])) : ((M = e.node) == null ? void 0 : M.type) === "p" ? ($(), oe(ci, {
|
|
1842
1888
|
key: 3,
|
|
1843
1889
|
node: e.node,
|
|
1844
1890
|
api: e.api
|
|
@@ -1848,513 +1894,546 @@ const pn = { class: "v2-sidebar__subheading" }, fn = { class: "v2-control v2-con
|
|
|
1848
1894
|
"cell-context": e.cellContext,
|
|
1849
1895
|
"cell-box": e.cellBox,
|
|
1850
1896
|
api: e.api
|
|
1851
|
-
}, null, 8, ["node", "cell-context", "cell-box", "api"])) : ((H = e.node) == null ? void 0 : H.type) === "html" ? ($(), oe(
|
|
1897
|
+
}, null, 8, ["node", "cell-context", "cell-box", "api"])) : ((H = e.node) == null ? void 0 : H.type) === "html" ? ($(), oe(mi, {
|
|
1852
1898
|
key: 5,
|
|
1853
1899
|
node: e.node,
|
|
1854
1900
|
api: e.api
|
|
1855
|
-
}, null, 8, ["node", "api"])) : ((U = e.node) == null ? void 0 : U.type) === "image" ? ($(), oe(
|
|
1901
|
+
}, null, 8, ["node", "api"])) : ((U = e.node) == null ? void 0 : U.type) === "image" ? ($(), oe(Pi, {
|
|
1856
1902
|
key: 6,
|
|
1857
1903
|
node: e.node,
|
|
1858
1904
|
api: e.api
|
|
1859
|
-
}, null, 8, ["node", "api"])) : ((
|
|
1905
|
+
}, null, 8, ["node", "api"])) : ((Z = e.node) == null ? void 0 : Z.type) === "table" ? ($(), oe(Yi, {
|
|
1860
1906
|
key: 7,
|
|
1861
1907
|
node: e.node,
|
|
1862
1908
|
api: e.api
|
|
1863
|
-
}, null, 8, ["node", "api"])) :
|
|
1864
|
-
|
|
1909
|
+
}, null, 8, ["node", "api"])) : q("", !0),
|
|
1910
|
+
e.node ? ($(), oe(td, {
|
|
1911
|
+
key: 8,
|
|
1912
|
+
params: e.node.params,
|
|
1913
|
+
api: e.api
|
|
1914
|
+
}, null, 8, ["params", "api"])) : q("", !0),
|
|
1915
|
+
ae(nd, {
|
|
1865
1916
|
issues: e.issues,
|
|
1866
|
-
onSelect:
|
|
1917
|
+
onSelect: b[1] || (b[1] = (j) => u("selectIssue", j))
|
|
1867
1918
|
}, null, 8, ["issues"])
|
|
1868
1919
|
]);
|
|
1869
1920
|
};
|
|
1870
1921
|
}
|
|
1871
|
-
}),
|
|
1922
|
+
}), ud = /* @__PURE__ */ ve(rd, [["__scopeId", "data-v-06c2cbdb"]]), sd = {
|
|
1872
1923
|
class: "v2-help__panel",
|
|
1873
1924
|
role: "dialog",
|
|
1874
1925
|
"aria-label": "操作指南"
|
|
1875
|
-
},
|
|
1926
|
+
}, vd = { class: "v2-help__head" }, cd = /* @__PURE__ */ X({
|
|
1876
1927
|
__name: "HelpPanel",
|
|
1877
1928
|
props: {
|
|
1878
1929
|
open: { type: Boolean }
|
|
1879
1930
|
},
|
|
1880
1931
|
emits: ["close"],
|
|
1881
|
-
setup(e, { emit:
|
|
1882
|
-
const t = e, a =
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1932
|
+
setup(e, { emit: r }) {
|
|
1933
|
+
const t = e, a = r;
|
|
1934
|
+
function o(u) {
|
|
1935
|
+
u.key === "Escape" && a("close");
|
|
1885
1936
|
}
|
|
1886
|
-
return
|
|
1937
|
+
return ce(
|
|
1887
1938
|
() => t.open,
|
|
1888
|
-
(
|
|
1889
|
-
|
|
1939
|
+
(u) => {
|
|
1940
|
+
u ? window.addEventListener("keydown", o) : window.removeEventListener("keydown", o);
|
|
1890
1941
|
},
|
|
1891
1942
|
// immediate:兼容「初始即 open」的消费方,否则首挂载时 Esc 监听永远挂不上。
|
|
1892
1943
|
{ immediate: !0 }
|
|
1893
|
-
),
|
|
1944
|
+
), lt(() => window.removeEventListener("keydown", o)), (u, f) => e.open ? ($(), I("div", {
|
|
1894
1945
|
key: 0,
|
|
1895
1946
|
class: "v2-help",
|
|
1896
|
-
onClick:
|
|
1947
|
+
onClick: f[1] || (f[1] = ll((s) => a("close"), ["self"]))
|
|
1897
1948
|
}, [
|
|
1898
|
-
l("div",
|
|
1899
|
-
l("header",
|
|
1900
|
-
|
|
1949
|
+
l("div", sd, [
|
|
1950
|
+
l("header", vd, [
|
|
1951
|
+
f[2] || (f[2] = l("h2", null, "操作指南", -1)),
|
|
1901
1952
|
l("button", {
|
|
1902
1953
|
type: "button",
|
|
1903
1954
|
class: "v2-help__close",
|
|
1904
1955
|
title: "关闭帮助",
|
|
1905
|
-
onClick:
|
|
1956
|
+
onClick: f[0] || (f[0] = (s) => a("close"))
|
|
1906
1957
|
}, " ✕ ")
|
|
1907
1958
|
]),
|
|
1908
|
-
|
|
1959
|
+
f[3] || (f[3] = nl('<div class="v2-help__body" data-v-e521f73b><h3 data-v-e521f73b>这个工具是做什么的</h3><p data-v-e521f73b> 用来<b data-v-e521f73b>设计固定版式的工作票表单</b>:设计好一次「模板」,以后每次作业直接填写、打印不同的票。 </p><ul data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>模板</b>=空的表单版式(有哪些格子、哪些输入框、标题写什么)。 </li><li data-v-e521f73b><b data-v-e521f73b>填写数据</b>=某次作业填进输入框的具体内容(如「工作负责人:张三」)。 </li></ul><h3 data-v-e521f73b>界面五大区域</h3><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>顶部工具栏</th><td data-v-e521f73b>新建、保存、预览、打印、导入导出</td></tr><tr data-v-e521f73b><th data-v-e521f73b>左侧栏</th><td data-v-e521f73b>组件「零件库」+ 整张表的结构树</td></tr><tr data-v-e521f73b><th data-v-e521f73b>中间画布</th><td data-v-e521f73b> 纸张,在这里摆组件、看效果. <strong data-v-e521f73b>按住空格键,拖拽可平移纸张</strong></td></tr><tr data-v-e521f73b><th data-v-e521f73b>右侧属性面板</th><td data-v-e521f73b>选中某个东西后,在这里改它的设置</td></tr><tr data-v-e521f73b><th data-v-e521f73b>底部状态栏</th><td data-v-e521f73b>共几页、有没有问题、会打印几张</td></tr></tbody></table><h3 data-v-e521f73b>两个模式:设计 / 预览</h3><ul data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>设计态</b>(默认):搭模板、改结构、调属性,可随意增删组件、拖动位置。 </li><li data-v-e521f73b><b data-v-e521f73b>预览态</b>:点「预览」进入(再点变「退出预览」),输入框<b data-v-e521f73b>直接打字填写</b>,检查版式。刚进入时输入框是<b data-v-e521f73b>空的</b>,内容靠填写或「导入数据 / 读取数据」载入。 </li></ul><p class="v2-help__tip" data-v-e521f73b> 记不住就记住一句:<b data-v-e521f73b>设计时搭架子,预览时填内容。</b></p><h3 data-v-e521f73b>模板 与 填写数据(一定要分清)</h3><ul data-v-e521f73b><li data-v-e521f73b> 模板 → 工具栏「模板」组的 <b data-v-e521f73b>保存模板 / 读取模板 / 导出文件 / 导入文件</b>。 </li><li data-v-e521f73b> 填写数据 → 工具栏「填充数据」组的 <b data-v-e521f73b>保存数据 / 读取数据 / 导入数据 / 导出数据</b>(这组不限预览态,随时都能点)。 </li></ul><p class="v2-help__tip" data-v-e521f73b><b data-v-e521f73b>导出数据 / 保存数据</b>随时可点:它们扫一遍画布上的输入框,把「字段 → 值」 采集出来(没配输入框时就是空对象)。导出<b data-v-e521f73b>文件</b>与导出<b data-v-e521f73b>数据</b>还会把同一份 JSON 打印到浏览器控制台,方便对接系统时直接复制。 </p><h3 data-v-e521f73b>从零设计一张票(标准流程)</h3><ol data-v-e521f73b><li data-v-e521f73b><b data-v-e521f73b>新建空白</b>:得到一张空纸。</li><li data-v-e521f73b><b data-v-e521f73b>搭大框</b>:从左侧「布局组件」拖一个<b data-v-e521f73b>网格</b>到画布(按行列分成若干<b data-v-e521f73b>格子</b>)。 </li><li data-v-e521f73b><b data-v-e521f73b>放内容</b>:把 文本 / 输入框 / 图片 / 表格 / HTML 模块 拖进某个格子(或点组件按钮放进当前选中的格子)。 </li><li data-v-e521f73b><b data-v-e521f73b>改属性</b>:点画布上的组件,右侧面板修改设置。</li><li data-v-e521f73b><b data-v-e521f73b>保存 / 导出</b>:本机接着改用「保存模板 / 读取模板」;备份或发人用「导出文件 / 导入文件」(.json)。 </li></ol><p data-v-e521f73b>左上角「● 未保存 / 已保存」:改了没保存会提示,关页面前记得保存。</p><h3 data-v-e521f73b>组件说明(左侧零件库)</h3><p data-v-e521f73b>左侧分两组:<b data-v-e521f73b>基础组件</b>(往表里填内容的)和 <b data-v-e521f73b>布局组件</b>(用来排版定位的)。</p><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>文本</th><td data-v-e521f73b>固定不变的文字,不能填。用于标题、栏目标题、说明文字。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>输入框</th><td data-v-e521f73b>可填写的字段。凡作业时要手写的地方。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>图片</th><td data-v-e521f73b>图片占位框。用于盖章区、示意图、签名扫描件。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>HTML 模块</th><td data-v-e521f73b>自由排版的自定义块。不懂 HTML 不用管它。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>表格</th><td data-v-e521f73b>多行多列的表,格子可直接填写。用于设备清单、措施列表等。</td></tr><tr data-v-e521f73b><th data-v-e521f73b>网格</th><td data-v-e521f73b>按行列划分的布局区,把票分成若干区块(布局组件)。</td></tr></tbody></table><p data-v-e521f73b><b data-v-e521f73b>右侧属性面板</b>(选中后显示):页面=纸张/边距/页眉页脚/分页;网格=列数/边框/间距/行数;格子=撑满/内边距/对齐;文本=文字/字号/加粗/对齐;输入框=字段名/前后标签/点击触发/宽度/默认值/内边框;图片=地址/填充方式/尺寸;表格=最小行数/边框/表头/列配置。底部还有<b data-v-e521f73b>额外属性</b>(自定义键值对,会作为 HTML 属性输出,含义由消费系统识别;属性名会被系统忽略时标红提示)。顶部会显示当前选中(如「格子 1-2」)。 </p><h3 data-v-e521f73b>结构树(左侧下半部分)</h3><ul data-v-e521f73b><li data-v-e521f73b>把整张表从大到小列出:页面 → 网格 → 格子 → 组件。</li><li data-v-e521f73b> 点树里的项=选中它(比在画布上找小字方便);反向也成立:点画布上的组件,树里会同步高亮并滚动到 它,折叠着的层级会自动展开。 </li><li data-v-e521f73b> 「删除」删掉选中的组件(页面和格子不能删);「折叠全部 / 展开全部」收起或展开整棵树。 </li></ul><h3 data-v-e521f73b>填写与打印</h3><ul data-v-e521f73b><li data-v-e521f73b>点「预览」→ 在输入框直接打字 → 「保存数据 / 导出数据」留存。</li><li data-v-e521f73b> 「打印」在预览态或设计态都能点,<b data-v-e521f73b>自动按纸张分页</b>,方向由纸张尺寸决定(A4 竖打、A3 横打)。 </li><li data-v-e521f73b> 打出来的<b data-v-e521f73b>只有票面本身</b>:系统菜单、工具栏、页面其他区域都不会跟着打出来。 </li></ul><p data-v-e521f73b> 没配置地址的图片:屏幕显示占位灰框方便选中编辑,<b data-v-e521f73b>打印时不占位置</b>。 </p><p data-v-e521f73b> 输入框默认的下划线(表示「这里可填写」)<b data-v-e521f73b>打印时不显示</b>;只有勾选了「显示内部边框」的字段,逐行实线边框才会打印出来。 </p><h3 data-v-e521f73b>快捷键(设计时可用)</h3><p data-v-e521f73b>在输入框里打字时,快捷键让位给输入,不会触发下面的操作。</p><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>Space 空格键</th><td data-v-e521f73b>按住,拖拽可平移纸张</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + Z</th><td data-v-e521f73b>撤销</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + Shift + Z 或 Ctrl/Cmd + Y</th><td data-v-e521f73b>重做</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + S</th><td data-v-e521f73b>保存模板(本机)</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + C / X / V</th><td data-v-e521f73b>复制 / 剪切 / 粘贴选中的组件</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Ctrl/Cmd + D</th><td data-v-e521f73b>原地复制一份选中的组件</td></tr><tr data-v-e521f73b><th data-v-e521f73b>Delete / Backspace</th><td data-v-e521f73b>删除选中的组件(仅设计态)</td></tr></tbody></table><h3 data-v-e521f73b>常见问题</h3><p data-v-e521f73b><b data-v-e521f73b>拖了组件但放不进去?</b>先点一下网格里的空位选中某个格子,再拖或点组件按钮。组件必须落在格子里。 </p><p data-v-e521f73b><b data-v-e521f73b>预览里能改结构吗?</b>不能。点「退出预览」回设计态再改。</p><p data-v-e521f73b><b data-v-e521f73b>导出的文件是什么?</b>模板和填写数据都是 .json 文本备份,可导入还原、发给同事。 </p><p data-v-e521f73b><b data-v-e521f73b>怎么知道有没有排版问题?</b>看底部状态栏「待处理问题」数量,点右侧面板里的提示可跳到对应位置。 </p><h3 data-v-e521f73b>术语速查</h3><table data-v-e521f73b><tbody data-v-e521f73b><tr data-v-e521f73b><th data-v-e521f73b>模板</th><td data-v-e521f73b>空表单版式(设计一次,反复用)</td></tr><tr data-v-e521f73b><th data-v-e521f73b>填写数据</th><td data-v-e521f73b>某次作业填进表里的具体内容</td></tr><tr data-v-e521f73b><th data-v-e521f73b>网格</th><td data-v-e521f73b>按行列划分的布局容器</td></tr><tr data-v-e521f73b><th data-v-e521f73b>格子</th><td data-v-e521f73b>网格里的小格,组件就放在里面</td></tr><tr data-v-e521f73b><th data-v-e521f73b>输入框 / 文本</th><td data-v-e521f73b>可填写的字段 / 固定不可填的文字</td></tr><tr data-v-e521f73b><th data-v-e521f73b>设计态 / 预览态</th><td data-v-e521f73b>搭模板改结构 / 像最终用户一样填写检查</td></tr><tr data-v-e521f73b><th data-v-e521f73b>分页</th><td data-v-e521f73b>一页放不下时自动分到下一页</td></tr></tbody></table></div>', 1))
|
|
1909
1960
|
])
|
|
1910
|
-
])) :
|
|
1961
|
+
])) : q("", !0);
|
|
1911
1962
|
}
|
|
1912
|
-
}),
|
|
1913
|
-
function
|
|
1914
|
-
const e = Al(),
|
|
1915
|
-
return
|
|
1963
|
+
}), pd = /* @__PURE__ */ ve(cd, [["__scopeId", "data-v-e521f73b"]]), fd = "[ticket-designer] schema 配置 JSON", Qt = "ticket-designer-schema-v2", bd = 100, gd = 800;
|
|
1964
|
+
function cl() {
|
|
1965
|
+
const e = Al(), r = et();
|
|
1966
|
+
return il(e, r);
|
|
1916
1967
|
}
|
|
1917
|
-
function
|
|
1968
|
+
function md(e, r = {}) {
|
|
1918
1969
|
const t = G(
|
|
1919
|
-
e ? JSON.parse(JSON.stringify(e)) :
|
|
1920
|
-
), a = G(!1),
|
|
1921
|
-
let s = "",
|
|
1922
|
-
|
|
1970
|
+
e ? JSON.parse(JSON.stringify(e)) : cl()
|
|
1971
|
+
), a = G(!1), o = G([]), u = G([]), f = G(null);
|
|
1972
|
+
let s = "", b = 0;
|
|
1973
|
+
ce(
|
|
1923
1974
|
t,
|
|
1924
1975
|
() => {
|
|
1925
1976
|
a.value = !0;
|
|
1926
1977
|
},
|
|
1927
1978
|
{ flush: "sync" }
|
|
1928
1979
|
);
|
|
1929
|
-
function v(
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1980
|
+
function v(T, J) {
|
|
1981
|
+
const K = Date.now();
|
|
1982
|
+
J && J === s && K - b < gd ? t.value = T : (o.value.push(t.value), o.value.length > bd && o.value.shift(), u.value = [], t.value = T, s = J ?? ""), b = K;
|
|
1932
1983
|
}
|
|
1933
|
-
function p(
|
|
1934
|
-
|
|
1984
|
+
function p(T) {
|
|
1985
|
+
o.value = [], u.value = [], s = "", t.value = T, a.value = !1;
|
|
1935
1986
|
}
|
|
1936
1987
|
function g() {
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1988
|
+
const T = o.value.pop();
|
|
1989
|
+
T && (u.value.push(t.value), t.value = T, s = "", a.value = !0);
|
|
1939
1990
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1991
|
+
function M() {
|
|
1992
|
+
const T = u.value.pop();
|
|
1993
|
+
T && (o.value.push(t.value), t.value = T, s = "", a.value = !0);
|
|
1943
1994
|
}
|
|
1944
|
-
const A =
|
|
1995
|
+
const A = N(() => o.value.length > 0), H = N(() => u.value.length > 0);
|
|
1945
1996
|
function U() {
|
|
1946
1997
|
try {
|
|
1947
1998
|
localStorage.setItem(
|
|
1948
|
-
|
|
1949
|
-
|
|
1999
|
+
Qt,
|
|
2000
|
+
ol(t.value, !0)
|
|
1950
2001
|
), a.value = !1;
|
|
1951
|
-
} catch (
|
|
2002
|
+
} catch (T) {
|
|
1952
2003
|
alert(
|
|
1953
|
-
`保存失败:${
|
|
2004
|
+
`保存失败:${T instanceof Error ? T.message : String(T)}`
|
|
1954
2005
|
);
|
|
1955
2006
|
}
|
|
1956
2007
|
}
|
|
1957
|
-
function
|
|
1958
|
-
var
|
|
1959
|
-
const
|
|
1960
|
-
if (!
|
|
2008
|
+
function Z() {
|
|
2009
|
+
var J;
|
|
2010
|
+
const T = localStorage.getItem(Qt);
|
|
2011
|
+
if (!T) {
|
|
1961
2012
|
alert("本地没有已保存的模板");
|
|
1962
2013
|
return;
|
|
1963
2014
|
}
|
|
1964
2015
|
try {
|
|
1965
|
-
p(
|
|
1966
|
-
} catch (
|
|
2016
|
+
p(_e(T)), (J = r.onReset) == null || J.call(r);
|
|
2017
|
+
} catch (K) {
|
|
1967
2018
|
alert(
|
|
1968
|
-
`读取失败:${
|
|
2019
|
+
`读取失败:${K instanceof Error ? K.message : String(K)}`
|
|
1969
2020
|
);
|
|
1970
2021
|
}
|
|
1971
2022
|
}
|
|
1972
2023
|
function j() {
|
|
1973
2024
|
try {
|
|
1974
|
-
const
|
|
1975
|
-
console.log(
|
|
1976
|
-
} catch (
|
|
2025
|
+
const T = ca(t.value);
|
|
2026
|
+
console.log(fd, T), rl(dl(sa), T);
|
|
2027
|
+
} catch (T) {
|
|
1977
2028
|
alert(
|
|
1978
|
-
`导出失败:${
|
|
2029
|
+
`导出失败:${T instanceof Error ? T.message : String(T)}`
|
|
1979
2030
|
);
|
|
1980
2031
|
}
|
|
1981
2032
|
}
|
|
1982
|
-
function
|
|
2033
|
+
function le(T) {
|
|
1983
2034
|
var w;
|
|
1984
|
-
const
|
|
1985
|
-
if (!
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
var
|
|
2035
|
+
const J = T.target, K = (w = J.files) == null ? void 0 : w[0];
|
|
2036
|
+
if (!K) return;
|
|
2037
|
+
const _ = new FileReader();
|
|
2038
|
+
_.onload = () => {
|
|
2039
|
+
var S;
|
|
1989
2040
|
try {
|
|
1990
|
-
p(
|
|
2041
|
+
p(_e(String(_.result))), (S = r.onReset) == null || S.call(r);
|
|
1991
2042
|
} catch (c) {
|
|
1992
2043
|
alert(
|
|
1993
2044
|
`导入失败:${c instanceof Error ? c.message : String(c)}`
|
|
1994
2045
|
);
|
|
1995
2046
|
} finally {
|
|
1996
|
-
|
|
2047
|
+
J.value = "";
|
|
1997
2048
|
}
|
|
1998
|
-
},
|
|
1999
|
-
alert("文件读取失败"),
|
|
2000
|
-
},
|
|
2049
|
+
}, _.onerror = () => {
|
|
2050
|
+
alert("文件读取失败"), J.value = "";
|
|
2051
|
+
}, _.readAsText(K);
|
|
2001
2052
|
}
|
|
2002
2053
|
function ee() {
|
|
2003
|
-
var
|
|
2004
|
-
(
|
|
2054
|
+
var T;
|
|
2055
|
+
(T = f.value) == null || T.click();
|
|
2005
2056
|
}
|
|
2006
2057
|
return {
|
|
2007
2058
|
schema: t,
|
|
2008
2059
|
dirty: a,
|
|
2009
2060
|
canUndo: A,
|
|
2010
2061
|
canRedo: H,
|
|
2011
|
-
fileInput:
|
|
2062
|
+
fileInput: f,
|
|
2012
2063
|
commit: v,
|
|
2013
2064
|
resetHistory: p,
|
|
2014
2065
|
undo: g,
|
|
2015
|
-
redo:
|
|
2066
|
+
redo: M,
|
|
2016
2067
|
saveToLocal: U,
|
|
2017
|
-
loadFromLocal:
|
|
2068
|
+
loadFromLocal: Z,
|
|
2018
2069
|
exportFile: j,
|
|
2019
|
-
importFile:
|
|
2070
|
+
importFile: le,
|
|
2020
2071
|
triggerImport: ee
|
|
2021
2072
|
};
|
|
2022
2073
|
}
|
|
2023
|
-
function
|
|
2024
|
-
const
|
|
2025
|
-
if (
|
|
2026
|
-
const t = Number(
|
|
2074
|
+
function qe(e) {
|
|
2075
|
+
const r = e.trim();
|
|
2076
|
+
if (r === "") return;
|
|
2077
|
+
const t = Number(r);
|
|
2027
2078
|
return Number.isFinite(t) ? Math.max(0, t) : void 0;
|
|
2028
2079
|
}
|
|
2029
|
-
function
|
|
2030
|
-
const { schema:
|
|
2080
|
+
function hd(e) {
|
|
2081
|
+
const { schema: r, commit: t } = e.document, {
|
|
2031
2082
|
selectedNodeId: a,
|
|
2032
|
-
selectedNode:
|
|
2033
|
-
selectionPathIds:
|
|
2034
|
-
selectionPathIndex:
|
|
2083
|
+
selectedNode: o,
|
|
2084
|
+
selectionPathIds: u,
|
|
2085
|
+
selectionPathIndex: f,
|
|
2035
2086
|
nodeIndex: s,
|
|
2036
|
-
selectedCellContext:
|
|
2087
|
+
selectedCellContext: b,
|
|
2037
2088
|
selectedOwnerCell: v,
|
|
2038
2089
|
insertionSlot: p
|
|
2039
2090
|
} = e.selection;
|
|
2040
|
-
function g(
|
|
2041
|
-
return
|
|
2091
|
+
function g(n) {
|
|
2092
|
+
return n === "text" ? Xl() : n === "field" ? Zl() : n === "table" ? Ql() : n === "html" ? _l() : n === "grid" ? et() : ea();
|
|
2042
2093
|
}
|
|
2043
|
-
function
|
|
2094
|
+
function M() {
|
|
2044
2095
|
if (!e.editable()) return;
|
|
2045
|
-
const
|
|
2046
|
-
t(
|
|
2096
|
+
const n = et();
|
|
2097
|
+
t(il(r.value, n)), a.value = n.id, u.value = [r.value.pages[0].id, n.id], f.value = 1;
|
|
2047
2098
|
}
|
|
2048
2099
|
function A() {
|
|
2049
|
-
e.editable() && (p.value ? H("grid") :
|
|
2100
|
+
e.editable() && (p.value ? H("grid") : M());
|
|
2050
2101
|
}
|
|
2051
|
-
function H(
|
|
2102
|
+
function H(n) {
|
|
2052
2103
|
if (!e.editable()) return;
|
|
2053
2104
|
const i = p.value;
|
|
2054
2105
|
if (!i) return;
|
|
2055
|
-
const d = g(
|
|
2056
|
-
t(
|
|
2106
|
+
const d = g(n);
|
|
2107
|
+
t(Se(r.value, i.id, d)), a.value = d.id;
|
|
2057
2108
|
}
|
|
2058
2109
|
function U() {
|
|
2059
|
-
var
|
|
2060
|
-
!a.value || ((
|
|
2110
|
+
var n, i;
|
|
2111
|
+
!a.value || ((n = o.value) == null ? void 0 : n.type) === "page" || ((i = o.value) == null ? void 0 : i.type) === "grid-cell" || (t(Yl(r.value, a.value)), e.clearSelection());
|
|
2061
2112
|
}
|
|
2062
|
-
let
|
|
2063
|
-
function
|
|
2064
|
-
const
|
|
2065
|
-
return
|
|
2113
|
+
let Z = null, j = null;
|
|
2114
|
+
function le() {
|
|
2115
|
+
const n = o.value;
|
|
2116
|
+
return n && n.type !== "page" && n.type !== "grid-cell" ? n : null;
|
|
2066
2117
|
}
|
|
2067
|
-
function ee(
|
|
2068
|
-
var
|
|
2069
|
-
const i =
|
|
2118
|
+
function ee(n) {
|
|
2119
|
+
var R;
|
|
2120
|
+
const i = o.value;
|
|
2070
2121
|
if ((i == null ? void 0 : i.type) === "grid-cell") {
|
|
2071
|
-
t(
|
|
2122
|
+
t(Se(r.value, i.id, n)), a.value = n.id;
|
|
2072
2123
|
return;
|
|
2073
2124
|
}
|
|
2074
2125
|
const d = v.value;
|
|
2075
2126
|
if (i && d) {
|
|
2076
|
-
const
|
|
2077
|
-
t(
|
|
2127
|
+
const Y = d.children.findIndex((se) => se.id === a.value), te = Y >= 0 ? Y + 1 : d.children.length, ue = Se(r.value, d.id, n);
|
|
2128
|
+
t(qt(ue, n.id, d.id, te)), a.value = n.id;
|
|
2078
2129
|
return;
|
|
2079
2130
|
}
|
|
2080
|
-
const
|
|
2081
|
-
if (
|
|
2082
|
-
t(
|
|
2131
|
+
const y = p.value;
|
|
2132
|
+
if (y && (y.type === "grid-cell" || y.type === "table-cell-template")) {
|
|
2133
|
+
t(Se(r.value, y.id, n)), a.value = n.id;
|
|
2083
2134
|
return;
|
|
2084
2135
|
}
|
|
2085
2136
|
if (j) {
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
t(
|
|
2137
|
+
const Y = (R = s.value.get(j)) == null ? void 0 : R.node;
|
|
2138
|
+
if (Y && Y.type === "grid-cell") {
|
|
2139
|
+
t(Se(r.value, Y.id, n)), a.value = n.id;
|
|
2089
2140
|
return;
|
|
2090
2141
|
}
|
|
2091
2142
|
}
|
|
2092
2143
|
}
|
|
2093
|
-
function
|
|
2144
|
+
function T() {
|
|
2094
2145
|
var i;
|
|
2095
2146
|
if (!e.editable()) return;
|
|
2096
|
-
const
|
|
2097
|
-
|
|
2147
|
+
const n = le();
|
|
2148
|
+
n && (Z = Ne(n), j = ((i = v.value) == null ? void 0 : i.id) ?? null);
|
|
2098
2149
|
}
|
|
2099
|
-
function
|
|
2150
|
+
function J() {
|
|
2100
2151
|
var i;
|
|
2101
2152
|
if (!e.editable()) return;
|
|
2102
|
-
const
|
|
2103
|
-
|
|
2153
|
+
const n = le();
|
|
2154
|
+
n && (Z = Ne(n), j = ((i = v.value) == null ? void 0 : i.id) ?? null, U());
|
|
2104
2155
|
}
|
|
2105
|
-
function
|
|
2106
|
-
e.editable() &&
|
|
2156
|
+
function K() {
|
|
2157
|
+
e.editable() && Z && ee(Ne(Z));
|
|
2107
2158
|
}
|
|
2108
|
-
function
|
|
2159
|
+
function _() {
|
|
2109
2160
|
if (!e.editable()) return;
|
|
2110
|
-
const
|
|
2111
|
-
|
|
2161
|
+
const n = le();
|
|
2162
|
+
n && ee(Ne(n));
|
|
2112
2163
|
}
|
|
2113
2164
|
function w() {
|
|
2114
|
-
var
|
|
2115
|
-
const
|
|
2116
|
-
if (!
|
|
2117
|
-
const d = (
|
|
2165
|
+
var R;
|
|
2166
|
+
const n = a.value, i = b.value;
|
|
2167
|
+
if (!n || !i || !i.hasNextSibling) return;
|
|
2168
|
+
const d = (R = s.value.get(n)) == null ? void 0 : R.parent;
|
|
2118
2169
|
if (!d) return;
|
|
2119
|
-
const
|
|
2120
|
-
t(
|
|
2170
|
+
const y = d.cells[i.columnIndex + 1].id;
|
|
2171
|
+
t(ql(r.value, n, y), `merge:${n}`), a.value = n;
|
|
2121
2172
|
}
|
|
2122
|
-
function
|
|
2123
|
-
const
|
|
2124
|
-
!
|
|
2173
|
+
function S() {
|
|
2174
|
+
const n = a.value, i = b.value;
|
|
2175
|
+
!n || !i || !i.canSplit || (t(Kl(r.value, n), `split:${n}`), a.value = n);
|
|
2125
2176
|
}
|
|
2126
|
-
function c(
|
|
2127
|
-
a.value =
|
|
2177
|
+
function c(n) {
|
|
2178
|
+
a.value = n;
|
|
2128
2179
|
}
|
|
2129
|
-
function h(
|
|
2130
|
-
const i =
|
|
2131
|
-
i !==
|
|
2180
|
+
function h(n) {
|
|
2181
|
+
const i = qt(r.value, n.moveId, n.cellId, n.index);
|
|
2182
|
+
i !== r.value && (t(i, "move:" + n.moveId), a.value = n.moveId);
|
|
2132
2183
|
}
|
|
2133
|
-
function m(
|
|
2134
|
-
var
|
|
2135
|
-
const i = (
|
|
2184
|
+
function m(n) {
|
|
2185
|
+
var y;
|
|
2186
|
+
const i = (y = s.value.get(n.cellId)) == null ? void 0 : y.node;
|
|
2136
2187
|
if (!i || i.type !== "grid-cell" && i.type !== "table-cell-template") return;
|
|
2137
|
-
const d = g(
|
|
2138
|
-
t(
|
|
2188
|
+
const d = g(n.kind);
|
|
2189
|
+
t(Se(r.value, n.cellId, d)), a.value = d.id;
|
|
2139
2190
|
}
|
|
2140
|
-
function
|
|
2141
|
-
a.value && t(
|
|
2191
|
+
function C(n, i) {
|
|
2192
|
+
a.value && t(Jl(r.value, a.value, n), i);
|
|
2142
2193
|
}
|
|
2143
|
-
function F(
|
|
2144
|
-
const i =
|
|
2145
|
-
|
|
2194
|
+
function F(n) {
|
|
2195
|
+
const i = n.target.value;
|
|
2196
|
+
C(
|
|
2146
2197
|
(d) => d.type === "text" ? { ...d, text: i } : d,
|
|
2147
2198
|
a.value ? `edit:${a.value}` : void 0
|
|
2148
2199
|
);
|
|
2149
2200
|
}
|
|
2150
|
-
function
|
|
2151
|
-
const i =
|
|
2152
|
-
|
|
2201
|
+
function P(n) {
|
|
2202
|
+
const i = n.target.value;
|
|
2203
|
+
C(
|
|
2153
2204
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, field: i } : d,
|
|
2154
2205
|
a.value ? `edit:${a.value}` : void 0
|
|
2155
2206
|
);
|
|
2156
2207
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const i =
|
|
2159
|
-
|
|
2208
|
+
function D(n) {
|
|
2209
|
+
const i = n.target.value;
|
|
2210
|
+
C(
|
|
2160
2211
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, prefix: i || void 0 } : d,
|
|
2161
2212
|
a.value ? `edit:${a.value}` : void 0
|
|
2162
2213
|
);
|
|
2163
2214
|
}
|
|
2164
|
-
function z(
|
|
2165
|
-
const i =
|
|
2166
|
-
|
|
2215
|
+
function z(n) {
|
|
2216
|
+
const i = n.target.value;
|
|
2217
|
+
C(
|
|
2167
2218
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, suffix: i || void 0 } : d,
|
|
2168
2219
|
a.value ? `edit:${a.value}` : void 0
|
|
2169
2220
|
);
|
|
2170
2221
|
}
|
|
2171
|
-
function O(
|
|
2172
|
-
const i =
|
|
2173
|
-
|
|
2222
|
+
function O(n) {
|
|
2223
|
+
const i = n.target.value;
|
|
2224
|
+
C(
|
|
2174
2225
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, width: i.trim() || void 0 } : d,
|
|
2175
2226
|
a.value ? `edit:${a.value}` : void 0
|
|
2176
2227
|
);
|
|
2177
2228
|
}
|
|
2178
|
-
function
|
|
2179
|
-
const i =
|
|
2180
|
-
|
|
2229
|
+
function fe(n) {
|
|
2230
|
+
const i = n.target.value;
|
|
2231
|
+
C(
|
|
2181
2232
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, default: i || void 0 } : d,
|
|
2182
2233
|
a.value ? `edit:${a.value}` : void 0
|
|
2183
2234
|
);
|
|
2184
2235
|
}
|
|
2185
|
-
function
|
|
2186
|
-
const i =
|
|
2187
|
-
|
|
2236
|
+
function He(n) {
|
|
2237
|
+
const i = n.target.checked;
|
|
2238
|
+
C(
|
|
2188
2239
|
(d) => d.type === "p" && d.mode === "field" ? { ...d, innerBorder: i || void 0 } : d,
|
|
2189
2240
|
a.value ? `edit:${a.value}` : void 0
|
|
2190
2241
|
);
|
|
2191
2242
|
}
|
|
2192
|
-
function
|
|
2193
|
-
const i =
|
|
2194
|
-
|
|
2195
|
-
(d) => d.type === "p" && d.mode === "field" ? { ...d,
|
|
2196
|
-
a.value ? `
|
|
2243
|
+
function ne(n) {
|
|
2244
|
+
const i = n.target.checked;
|
|
2245
|
+
C(
|
|
2246
|
+
(d) => d.type === "p" && d.mode === "field" ? { ...d, interactive: i || void 0 } : d,
|
|
2247
|
+
a.value ? `interactive:${a.value}` : void 0
|
|
2197
2248
|
);
|
|
2198
2249
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
};
|
|
2209
|
-
},
|
|
2210
|
-
a.value ? `actionParams:${a.value}` : void 0
|
|
2250
|
+
function me() {
|
|
2251
|
+
const n = o.value;
|
|
2252
|
+
return n && "params" in n ? { ...n.params ?? {} } : {};
|
|
2253
|
+
}
|
|
2254
|
+
function he(n, i) {
|
|
2255
|
+
const d = Object.keys(n).length ? n : void 0;
|
|
2256
|
+
C(
|
|
2257
|
+
(y) => Object.assign({}, y, { params: d }),
|
|
2258
|
+
a.value ? `${i}:${a.value}` : void 0
|
|
2211
2259
|
);
|
|
2212
2260
|
}
|
|
2213
|
-
function
|
|
2261
|
+
function Ie(n) {
|
|
2262
|
+
let i = Object.keys(n).length + 1;
|
|
2263
|
+
for (; `param${i}` in n; ) i += 1;
|
|
2264
|
+
return `param${i}`;
|
|
2265
|
+
}
|
|
2266
|
+
function nt() {
|
|
2267
|
+
const n = me();
|
|
2268
|
+
n[Ie(n)] = "", he(n, "param");
|
|
2269
|
+
}
|
|
2270
|
+
function Re(n, i) {
|
|
2271
|
+
const d = i.target.value.trim();
|
|
2272
|
+
if (d === n) return;
|
|
2273
|
+
const y = me();
|
|
2274
|
+
if (!(n in y)) return;
|
|
2275
|
+
if (!d || d in y) {
|
|
2276
|
+
i.target.value = n;
|
|
2277
|
+
return;
|
|
2278
|
+
}
|
|
2279
|
+
const R = {};
|
|
2280
|
+
for (const [Y, te] of Object.entries(y))
|
|
2281
|
+
Y === n ? R[d] = te : R[Y] = te;
|
|
2282
|
+
he(R, "param");
|
|
2283
|
+
}
|
|
2284
|
+
function Le(n, i) {
|
|
2285
|
+
const d = i.target.value, y = me();
|
|
2286
|
+
n in y && (y[n] = d, he(y, "param"));
|
|
2287
|
+
}
|
|
2288
|
+
function xe(n) {
|
|
2289
|
+
const i = me();
|
|
2290
|
+
n in i && (delete i[n], he(i, "paramdel"));
|
|
2291
|
+
}
|
|
2292
|
+
function Me(n) {
|
|
2214
2293
|
var i;
|
|
2215
|
-
((i =
|
|
2294
|
+
((i = o.value) == null ? void 0 : i.type) === "grid" && t(
|
|
2216
2295
|
jl(
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2296
|
+
r.value,
|
|
2297
|
+
o.value.id,
|
|
2298
|
+
n.target.value
|
|
2220
2299
|
)
|
|
2221
2300
|
);
|
|
2222
2301
|
}
|
|
2223
|
-
function
|
|
2302
|
+
function Be(n) {
|
|
2224
2303
|
var i;
|
|
2225
|
-
((i =
|
|
2304
|
+
((i = o.value) == null ? void 0 : i.type) === "table" && t(
|
|
2226
2305
|
Ul(
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2306
|
+
r.value,
|
|
2307
|
+
o.value.id,
|
|
2308
|
+
n.target.value
|
|
2230
2309
|
)
|
|
2231
2310
|
);
|
|
2232
2311
|
}
|
|
2233
|
-
function
|
|
2234
|
-
var
|
|
2235
|
-
if (((
|
|
2236
|
-
const i =
|
|
2312
|
+
function Ve(n) {
|
|
2313
|
+
var te, ue;
|
|
2314
|
+
if (((te = o.value) == null ? void 0 : te.type) !== "grid") return;
|
|
2315
|
+
const i = n.target, d = Math.floor(Number(i.value));
|
|
2237
2316
|
if (!Number.isInteger(d) || d < 1) return;
|
|
2238
|
-
const
|
|
2239
|
-
t(Wl(
|
|
2317
|
+
const y = d, R = i.dataset.dimension === "rows" ? y : o.value.rows.length, Y = i.dataset.dimension === "columns" ? y : ((ue = o.value.rows[0]) == null ? void 0 : ue.cells.length) ?? 1;
|
|
2318
|
+
t(Wl(r.value, o.value.id, R, Y));
|
|
2240
2319
|
}
|
|
2241
|
-
function
|
|
2320
|
+
function Ge(n) {
|
|
2242
2321
|
var i;
|
|
2243
|
-
((i =
|
|
2322
|
+
((i = o.value) == null ? void 0 : i.type) === "table" && t(
|
|
2244
2323
|
Ol(
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
Number(
|
|
2324
|
+
r.value,
|
|
2325
|
+
o.value.id,
|
|
2326
|
+
Number(n.target.value)
|
|
2248
2327
|
)
|
|
2249
2328
|
);
|
|
2250
2329
|
}
|
|
2251
|
-
function
|
|
2252
|
-
var
|
|
2253
|
-
((
|
|
2330
|
+
function ot() {
|
|
2331
|
+
var n;
|
|
2332
|
+
((n = o.value) == null ? void 0 : n.type) === "table" && t(zl(r.value, o.value.id));
|
|
2254
2333
|
}
|
|
2255
|
-
function
|
|
2334
|
+
function it(n) {
|
|
2256
2335
|
var i;
|
|
2257
|
-
((i =
|
|
2336
|
+
((i = o.value) == null ? void 0 : i.type) === "table" && t(Gl(r.value, o.value.id, n));
|
|
2258
2337
|
}
|
|
2259
|
-
function
|
|
2260
|
-
var
|
|
2261
|
-
if (((
|
|
2338
|
+
function ze(n, i) {
|
|
2339
|
+
var y;
|
|
2340
|
+
if (((y = o.value) == null ? void 0 : y.type) !== "table") return;
|
|
2262
2341
|
const d = i.target.value.trim();
|
|
2263
|
-
!d || d ===
|
|
2342
|
+
!d || d === n || t(Vl(r.value, o.value.id, n, d));
|
|
2264
2343
|
}
|
|
2265
|
-
function
|
|
2266
|
-
var
|
|
2267
|
-
if (((
|
|
2268
|
-
const
|
|
2344
|
+
function Oe(n, i, d) {
|
|
2345
|
+
var Y;
|
|
2346
|
+
if (((Y = o.value) == null ? void 0 : Y.type) !== "table") return;
|
|
2347
|
+
const y = d.target;
|
|
2269
2348
|
if (i === "width") {
|
|
2270
|
-
const
|
|
2271
|
-
if (
|
|
2349
|
+
const te = We(y.value);
|
|
2350
|
+
if (te === "INVALID") return;
|
|
2272
2351
|
t(
|
|
2273
|
-
|
|
2274
|
-
`tblcol:${
|
|
2352
|
+
Kt(r.value, o.value.id, n, { width: te }),
|
|
2353
|
+
`tblcol:${n}:width`
|
|
2275
2354
|
);
|
|
2276
2355
|
return;
|
|
2277
2356
|
}
|
|
2278
|
-
const
|
|
2357
|
+
const R = { [i]: y.value || void 0 };
|
|
2279
2358
|
t(
|
|
2280
|
-
|
|
2281
|
-
`tblcol:${
|
|
2359
|
+
Kt(r.value, o.value.id, n, R),
|
|
2360
|
+
`tblcol:${n}:${i}`
|
|
2282
2361
|
);
|
|
2283
2362
|
}
|
|
2284
|
-
function
|
|
2363
|
+
function Ce(n) {
|
|
2285
2364
|
var i;
|
|
2286
|
-
((i =
|
|
2287
|
-
(d) => d.type === "table" ? { ...d, headerStyle: { ...d.headerStyle, ...
|
|
2365
|
+
((i = o.value) == null ? void 0 : i.type) === "table" && C(
|
|
2366
|
+
(d) => d.type === "table" ? { ...d, headerStyle: { ...d.headerStyle, ...n } } : d,
|
|
2288
2367
|
a.value ? `tablehdr:${a.value}` : void 0
|
|
2289
2368
|
);
|
|
2290
2369
|
}
|
|
2291
|
-
function
|
|
2292
|
-
const i =
|
|
2293
|
-
|
|
2370
|
+
function dt(n) {
|
|
2371
|
+
const i = n.target.value, d = Number(i);
|
|
2372
|
+
Ce({ fontSize: Number.isFinite(d) && d > 0 ? d : void 0 });
|
|
2294
2373
|
}
|
|
2295
|
-
function
|
|
2296
|
-
const i =
|
|
2297
|
-
|
|
2374
|
+
function rt(n) {
|
|
2375
|
+
const i = n.target.value;
|
|
2376
|
+
Ce({
|
|
2298
2377
|
fontWeight: i || void 0
|
|
2299
2378
|
});
|
|
2300
2379
|
}
|
|
2301
|
-
function
|
|
2302
|
-
const i =
|
|
2303
|
-
|
|
2380
|
+
function ut(n) {
|
|
2381
|
+
const i = n.target.value;
|
|
2382
|
+
Ce({
|
|
2304
2383
|
align: i || void 0
|
|
2305
2384
|
});
|
|
2306
2385
|
}
|
|
2307
|
-
function
|
|
2308
|
-
const i =
|
|
2386
|
+
function We(n) {
|
|
2387
|
+
const i = n.trim().toLowerCase();
|
|
2309
2388
|
if (i === "") return "1fr";
|
|
2310
2389
|
if (i === "auto") return "auto";
|
|
2311
2390
|
if (/^\d+(\.\d+)?fr$/.test(i)) return i;
|
|
2312
2391
|
const d = i.match(/^(\d+(?:\.\d+)?)\s*mm$/);
|
|
2313
2392
|
if (d) {
|
|
2314
|
-
const
|
|
2315
|
-
return Number.isFinite(
|
|
2393
|
+
const R = Number(d[1]);
|
|
2394
|
+
return Number.isFinite(R) && R > 0 ? R : "INVALID";
|
|
2316
2395
|
}
|
|
2317
|
-
const
|
|
2318
|
-
return Number.isFinite(
|
|
2396
|
+
const y = Number(i);
|
|
2397
|
+
return Number.isFinite(y) && y > 0 ? y : "INVALID";
|
|
2319
2398
|
}
|
|
2320
|
-
function
|
|
2321
|
-
var
|
|
2322
|
-
if (((
|
|
2323
|
-
const d =
|
|
2399
|
+
function st(n, i) {
|
|
2400
|
+
var y;
|
|
2401
|
+
if (((y = o.value) == null ? void 0 : y.type) !== "grid") return;
|
|
2402
|
+
const d = We(i.target.value);
|
|
2324
2403
|
d !== "INVALID" && t(
|
|
2325
|
-
Bl(
|
|
2326
|
-
`col:${
|
|
2404
|
+
Bl(r.value, o.value.id, n, d),
|
|
2405
|
+
`col:${o.value.id}:${n}`
|
|
2327
2406
|
);
|
|
2328
2407
|
}
|
|
2329
|
-
function
|
|
2330
|
-
var
|
|
2331
|
-
if (((
|
|
2332
|
-
const
|
|
2333
|
-
t(Ml(
|
|
2334
|
-
}
|
|
2335
|
-
function
|
|
2336
|
-
var
|
|
2337
|
-
if (((
|
|
2338
|
-
const i =
|
|
2339
|
-
t(Ll(
|
|
2340
|
-
}
|
|
2341
|
-
function
|
|
2342
|
-
const i =
|
|
2343
|
-
|
|
2344
|
-
(
|
|
2408
|
+
function vt(n, i) {
|
|
2409
|
+
var Y;
|
|
2410
|
+
if (((Y = o.value) == null ? void 0 : Y.type) !== "grid") return;
|
|
2411
|
+
const y = i.target.value, R = n === "cellPadding" ? { cellPadding: qe(y) } : { [n]: y === "" ? void 0 : y };
|
|
2412
|
+
t(Ml(r.value, o.value.id, R), `gridcell:${n}`);
|
|
2413
|
+
}
|
|
2414
|
+
function ct(n) {
|
|
2415
|
+
var y;
|
|
2416
|
+
if (((y = o.value) == null ? void 0 : y.type) !== "grid") return;
|
|
2417
|
+
const i = n.target.value, d = qe(i);
|
|
2418
|
+
t(Ll(r.value, o.value.id, d), "gridgap");
|
|
2419
|
+
}
|
|
2420
|
+
function pt(n) {
|
|
2421
|
+
const i = n.target.value, d = qe(i);
|
|
2422
|
+
C(
|
|
2423
|
+
(y) => y.type === "grid-cell" ? { ...y, padding: d } : y,
|
|
2345
2424
|
a.value ? `cellpad:${a.value}` : void 0
|
|
2346
2425
|
);
|
|
2347
2426
|
}
|
|
2348
|
-
function
|
|
2349
|
-
const i =
|
|
2350
|
-
|
|
2427
|
+
function ft(n) {
|
|
2428
|
+
const i = n.target.value;
|
|
2429
|
+
C(
|
|
2351
2430
|
(d) => d.type === "grid-cell" ? { ...d, align: i || void 0 } : d,
|
|
2352
2431
|
a.value ? `cellalign:${a.value}` : void 0
|
|
2353
2432
|
);
|
|
2354
2433
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const i =
|
|
2357
|
-
|
|
2434
|
+
function bt(n) {
|
|
2435
|
+
const i = n.target.value;
|
|
2436
|
+
C(
|
|
2358
2437
|
(d) => d.type === "grid-cell" ? {
|
|
2359
2438
|
...d,
|
|
2360
2439
|
verticalAlign: i || void 0
|
|
@@ -2362,269 +2441,272 @@ function md(e) {
|
|
|
2362
2441
|
a.value ? `cellvalign:${a.value}` : void 0
|
|
2363
2442
|
);
|
|
2364
2443
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const i =
|
|
2367
|
-
|
|
2444
|
+
function gt(n) {
|
|
2445
|
+
const i = n.target.checked;
|
|
2446
|
+
C(
|
|
2368
2447
|
(d) => d.type === "grid-cell" ? { ...d, flex: i || void 0 } : d,
|
|
2369
2448
|
a.value ? `cellflex:${a.value}` : void 0
|
|
2370
2449
|
);
|
|
2371
2450
|
}
|
|
2372
|
-
function
|
|
2373
|
-
const i =
|
|
2374
|
-
|
|
2375
|
-
(
|
|
2451
|
+
function mt(n) {
|
|
2452
|
+
const i = n.target.value, d = Number(i), y = Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0;
|
|
2453
|
+
C(
|
|
2454
|
+
(R) => R.type === "grid-cell" ? { ...R, rowHeight: y } : R,
|
|
2376
2455
|
a.value ? `cellrowh:${a.value}` : void 0
|
|
2377
2456
|
);
|
|
2378
2457
|
}
|
|
2379
|
-
function
|
|
2380
|
-
|
|
2381
|
-
(i) => i.type === "p" || i.type === "text" ? { ...i, style: { ...i.style, ...
|
|
2458
|
+
function ie(n) {
|
|
2459
|
+
C(
|
|
2460
|
+
(i) => i.type === "p" || i.type === "text" ? { ...i, style: { ...i.style, ...n } } : i,
|
|
2382
2461
|
a.value ? `style:${a.value}` : void 0
|
|
2383
2462
|
);
|
|
2384
2463
|
}
|
|
2385
|
-
function
|
|
2386
|
-
const i =
|
|
2387
|
-
|
|
2464
|
+
function ht(n) {
|
|
2465
|
+
const i = n.target.value, d = Number(i);
|
|
2466
|
+
ie({
|
|
2388
2467
|
fontSize: Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0
|
|
2389
2468
|
});
|
|
2390
2469
|
}
|
|
2391
|
-
function
|
|
2392
|
-
const i = Number(
|
|
2393
|
-
|
|
2470
|
+
function yt(n) {
|
|
2471
|
+
const i = Number(n.target.value);
|
|
2472
|
+
ie({
|
|
2394
2473
|
lineHeight: Number.isFinite(i) && i > 0 ? i : void 0
|
|
2395
2474
|
});
|
|
2396
2475
|
}
|
|
2397
|
-
function
|
|
2398
|
-
const i =
|
|
2399
|
-
|
|
2476
|
+
function St(n) {
|
|
2477
|
+
const i = n.target.value;
|
|
2478
|
+
ie({
|
|
2400
2479
|
fontWeight: i || void 0
|
|
2401
2480
|
});
|
|
2402
2481
|
}
|
|
2403
|
-
function
|
|
2404
|
-
const i =
|
|
2405
|
-
|
|
2482
|
+
function $t(n) {
|
|
2483
|
+
const i = n.target.value;
|
|
2484
|
+
ie({ color: i || void 0 });
|
|
2406
2485
|
}
|
|
2407
|
-
function
|
|
2408
|
-
const i =
|
|
2409
|
-
|
|
2486
|
+
function Ct(n) {
|
|
2487
|
+
const i = n.target.value;
|
|
2488
|
+
ie({ fontFamily: i || void 0 });
|
|
2410
2489
|
}
|
|
2411
|
-
function
|
|
2412
|
-
const i =
|
|
2413
|
-
|
|
2490
|
+
function wt(n) {
|
|
2491
|
+
const i = n.target.value;
|
|
2492
|
+
ie({
|
|
2414
2493
|
align: i || void 0
|
|
2415
2494
|
});
|
|
2416
2495
|
}
|
|
2417
|
-
function
|
|
2418
|
-
const i =
|
|
2419
|
-
|
|
2496
|
+
function It(n) {
|
|
2497
|
+
const i = n.target.value;
|
|
2498
|
+
ie({
|
|
2420
2499
|
verticalAlign: i || void 0
|
|
2421
2500
|
});
|
|
2422
2501
|
}
|
|
2423
|
-
function
|
|
2424
|
-
const i =
|
|
2425
|
-
|
|
2502
|
+
function xt(n) {
|
|
2503
|
+
const i = n.target.value;
|
|
2504
|
+
C(
|
|
2426
2505
|
(d) => d.type === "html" ? { ...d, html: i } : d,
|
|
2427
2506
|
a.value ? `html:${a.value}` : void 0
|
|
2428
2507
|
);
|
|
2429
2508
|
}
|
|
2430
|
-
function
|
|
2431
|
-
const i =
|
|
2432
|
-
|
|
2509
|
+
function kt(n) {
|
|
2510
|
+
const i = n.target.value;
|
|
2511
|
+
C(
|
|
2433
2512
|
(d) => d.type === "html" ? { ...d, css: i || void 0 } : d,
|
|
2434
2513
|
a.value ? `css:${a.value}` : void 0
|
|
2435
2514
|
);
|
|
2436
2515
|
}
|
|
2437
|
-
function
|
|
2438
|
-
const i =
|
|
2439
|
-
|
|
2516
|
+
function Tt(n) {
|
|
2517
|
+
const i = n.target.value;
|
|
2518
|
+
C(
|
|
2440
2519
|
(d) => d.type === "image" ? { ...d, src: i || void 0 } : d,
|
|
2441
2520
|
a.value ? `imgsrc:${a.value}` : void 0
|
|
2442
2521
|
);
|
|
2443
2522
|
}
|
|
2444
|
-
function
|
|
2445
|
-
const i =
|
|
2446
|
-
|
|
2523
|
+
function Ft(n) {
|
|
2524
|
+
const i = n.target.value;
|
|
2525
|
+
C(
|
|
2447
2526
|
(d) => d.type === "image" ? { ...d, field: i || void 0 } : d,
|
|
2448
2527
|
a.value ? `imgfield:${a.value}` : void 0
|
|
2449
2528
|
);
|
|
2450
2529
|
}
|
|
2451
|
-
function
|
|
2530
|
+
function Dt(n, i) {
|
|
2452
2531
|
const d = Number(i.target.value);
|
|
2453
|
-
|
|
2454
|
-
(
|
|
2532
|
+
C(
|
|
2533
|
+
(y) => y.type === "image" ? { ...y, [n]: Number.isFinite(d) && d > 0 ? d : void 0 } : y,
|
|
2455
2534
|
a.value ? `imgsize:${a.value}` : void 0
|
|
2456
2535
|
);
|
|
2457
2536
|
}
|
|
2458
|
-
function
|
|
2459
|
-
const i =
|
|
2460
|
-
|
|
2537
|
+
function Nt(n) {
|
|
2538
|
+
const i = n.target.value;
|
|
2539
|
+
C(
|
|
2461
2540
|
(d) => d.type === "image" ? { ...d, objectFit: i } : d,
|
|
2462
2541
|
a.value ? `imgfit:${a.value}` : void 0
|
|
2463
2542
|
);
|
|
2464
2543
|
}
|
|
2465
|
-
function
|
|
2466
|
-
const i = Number(
|
|
2467
|
-
!Number.isFinite(i) || i < 1 || t(Rl(
|
|
2544
|
+
function Pt(n) {
|
|
2545
|
+
const i = Number(n.target.value);
|
|
2546
|
+
!Number.isFinite(i) || i < 1 || t(Rl(r.value, Math.floor(i)));
|
|
2468
2547
|
}
|
|
2469
|
-
function
|
|
2470
|
-
const i =
|
|
2471
|
-
t(Hl(
|
|
2548
|
+
function Et(n) {
|
|
2549
|
+
const i = n.target.value;
|
|
2550
|
+
t(Hl(r.value, { size: i }));
|
|
2472
2551
|
}
|
|
2473
|
-
const
|
|
2552
|
+
const At = N(
|
|
2474
2553
|
() => {
|
|
2475
|
-
var
|
|
2476
|
-
return ((
|
|
2554
|
+
var n;
|
|
2555
|
+
return ((n = r.value.pages[0]) == null ? void 0 : n.margin.top) ?? 12;
|
|
2477
2556
|
}
|
|
2478
|
-
),
|
|
2557
|
+
), Ht = N(
|
|
2479
2558
|
() => {
|
|
2480
|
-
var
|
|
2481
|
-
return ((
|
|
2559
|
+
var n;
|
|
2560
|
+
return ((n = r.value.pages[0]) == null ? void 0 : n.margin.right) ?? 12;
|
|
2482
2561
|
}
|
|
2483
|
-
),
|
|
2562
|
+
), Rt = N(
|
|
2484
2563
|
() => {
|
|
2485
|
-
var
|
|
2486
|
-
return ((
|
|
2564
|
+
var n;
|
|
2565
|
+
return ((n = r.value.pages[0]) == null ? void 0 : n.margin.bottom) ?? 12;
|
|
2487
2566
|
}
|
|
2488
|
-
),
|
|
2567
|
+
), Lt = N(
|
|
2489
2568
|
() => {
|
|
2490
|
-
var
|
|
2491
|
-
return ((
|
|
2569
|
+
var n;
|
|
2570
|
+
return ((n = r.value.pages[0]) == null ? void 0 : n.margin.left) ?? 12;
|
|
2492
2571
|
}
|
|
2493
2572
|
);
|
|
2494
|
-
function
|
|
2573
|
+
function Mt(n, i) {
|
|
2495
2574
|
const d = Number(i.target.value);
|
|
2496
2575
|
if (!Number.isFinite(d)) return;
|
|
2497
|
-
const
|
|
2576
|
+
const y = Math.max(0, Math.floor(d));
|
|
2498
2577
|
t({
|
|
2499
|
-
...
|
|
2500
|
-
pages:
|
|
2501
|
-
...
|
|
2502
|
-
margin: { ...
|
|
2578
|
+
...r.value,
|
|
2579
|
+
pages: r.value.pages.map((R) => ({
|
|
2580
|
+
...R,
|
|
2581
|
+
margin: { ...R.margin, [n]: y }
|
|
2503
2582
|
}))
|
|
2504
2583
|
});
|
|
2505
2584
|
}
|
|
2506
|
-
function
|
|
2585
|
+
function Ue(n) {
|
|
2507
2586
|
function i() {
|
|
2508
|
-
const
|
|
2509
|
-
return
|
|
2587
|
+
const L = r.value.paper;
|
|
2588
|
+
return n === "header" ? L == null ? void 0 : L.header : L == null ? void 0 : L.footer;
|
|
2510
2589
|
}
|
|
2511
|
-
function d(
|
|
2512
|
-
const W =
|
|
2590
|
+
function d(L) {
|
|
2591
|
+
const W = r.value.paper;
|
|
2513
2592
|
t({
|
|
2514
|
-
...
|
|
2515
|
-
paper:
|
|
2593
|
+
...r.value,
|
|
2594
|
+
paper: n === "header" ? { ...W, header: L } : { ...W, footer: L }
|
|
2516
2595
|
});
|
|
2517
2596
|
}
|
|
2518
|
-
function
|
|
2519
|
-
d({ ...i() ?? {}, ...
|
|
2597
|
+
function y(L) {
|
|
2598
|
+
d({ ...i() ?? {}, ...L });
|
|
2520
2599
|
}
|
|
2521
|
-
function
|
|
2522
|
-
var
|
|
2523
|
-
const
|
|
2524
|
-
|
|
2600
|
+
function R(L, W) {
|
|
2601
|
+
var Fe;
|
|
2602
|
+
const ye = W.target.value, Te = ((Fe = i()) == null ? void 0 : Fe.content) ?? {};
|
|
2603
|
+
y({ content: { ...Te, [L]: ye || void 0 } });
|
|
2525
2604
|
}
|
|
2526
|
-
function
|
|
2527
|
-
|
|
2605
|
+
function Y(L) {
|
|
2606
|
+
y({ enabled: L.target.checked });
|
|
2528
2607
|
}
|
|
2529
|
-
function
|
|
2530
|
-
const W = Number(
|
|
2531
|
-
|
|
2608
|
+
function te(L) {
|
|
2609
|
+
const W = Number(L.target.value);
|
|
2610
|
+
y({ height: Number.isFinite(W) && W > 0 ? W : void 0 });
|
|
2532
2611
|
}
|
|
2533
|
-
function
|
|
2534
|
-
|
|
2612
|
+
function ue(L) {
|
|
2613
|
+
y({ separator: L.target.checked });
|
|
2535
2614
|
}
|
|
2536
|
-
function se(
|
|
2537
|
-
var
|
|
2538
|
-
const W = ((
|
|
2539
|
-
|
|
2615
|
+
function se(L) {
|
|
2616
|
+
var ye;
|
|
2617
|
+
const W = ((ye = i()) == null ? void 0 : ye.style) ?? {};
|
|
2618
|
+
y({ style: { ...W, ...L } });
|
|
2540
2619
|
}
|
|
2541
|
-
function
|
|
2542
|
-
const W = Number(
|
|
2620
|
+
function je(L) {
|
|
2621
|
+
const W = Number(L.target.value);
|
|
2543
2622
|
se({ fontSize: Number.isFinite(W) && W > 0 ? W : void 0 });
|
|
2544
2623
|
}
|
|
2545
|
-
function
|
|
2546
|
-
const W =
|
|
2624
|
+
function ke(L) {
|
|
2625
|
+
const W = L.target.value;
|
|
2547
2626
|
se({ fontWeight: W === "bold" || W === "normal" ? W : void 0 });
|
|
2548
2627
|
}
|
|
2549
|
-
function
|
|
2550
|
-
const W =
|
|
2628
|
+
function Je(L) {
|
|
2629
|
+
const W = L.target.value;
|
|
2551
2630
|
se({ color: W || void 0 });
|
|
2552
2631
|
}
|
|
2553
|
-
return { patch:
|
|
2632
|
+
return { patch: y, content: R, enabled: Y, height: te, separator: ue, style: se, fontSize: je, fontWeight: ke, color: Je };
|
|
2554
2633
|
}
|
|
2555
|
-
const
|
|
2634
|
+
const de = Ue("header"), re = Ue("footer");
|
|
2556
2635
|
return {
|
|
2557
|
-
addRootGrid:
|
|
2636
|
+
addRootGrid: M,
|
|
2558
2637
|
addGrid: A,
|
|
2559
2638
|
addNodeToSelectedCell: H,
|
|
2560
2639
|
removeSelectedNode: U,
|
|
2561
|
-
copySelected:
|
|
2562
|
-
cutSelected:
|
|
2563
|
-
pasteClipboard:
|
|
2564
|
-
duplicateSelected:
|
|
2640
|
+
copySelected: T,
|
|
2641
|
+
cutSelected: J,
|
|
2642
|
+
pasteClipboard: K,
|
|
2643
|
+
duplicateSelected: _,
|
|
2565
2644
|
mergeSelectedCellRight: w,
|
|
2566
|
-
splitSelectedCell:
|
|
2645
|
+
splitSelectedCell: S,
|
|
2567
2646
|
onCanvasNodeDragStart: c,
|
|
2568
2647
|
onDropNode: h,
|
|
2569
2648
|
onDropPalette: m,
|
|
2570
|
-
updateSelectedNode:
|
|
2649
|
+
updateSelectedNode: C,
|
|
2571
2650
|
updateSelectedText: F,
|
|
2572
|
-
updateSelectedField:
|
|
2573
|
-
updateSelectedPrefix:
|
|
2651
|
+
updateSelectedField: P,
|
|
2652
|
+
updateSelectedPrefix: D,
|
|
2574
2653
|
updateSelectedSuffix: z,
|
|
2575
2654
|
updateSelectedWidth: O,
|
|
2576
|
-
updateSelectedDefault:
|
|
2577
|
-
updateSelectedInnerBorder:
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2655
|
+
updateSelectedDefault: fe,
|
|
2656
|
+
updateSelectedInnerBorder: He,
|
|
2657
|
+
updateSelectedInteractive: ne,
|
|
2658
|
+
addSelectedParam: nt,
|
|
2659
|
+
renameSelectedParam: Re,
|
|
2660
|
+
updateSelectedParamValue: Le,
|
|
2661
|
+
removeSelectedParam: xe,
|
|
2662
|
+
updateGridBorder: Me,
|
|
2663
|
+
updateTableBorder: Be,
|
|
2664
|
+
updateGridDimensions: Ve,
|
|
2665
|
+
updateTableRows: Ge,
|
|
2666
|
+
addTableColumn: ot,
|
|
2667
|
+
removeTableColumn: it,
|
|
2668
|
+
renameTableColumnKey: ze,
|
|
2669
|
+
updateTableColumn: Oe,
|
|
2670
|
+
updateTableHeaderFontSize: dt,
|
|
2671
|
+
updateTableHeaderFontWeight: rt,
|
|
2672
|
+
updateTableHeaderAlign: ut,
|
|
2673
|
+
updateGridColumnWidth: st,
|
|
2674
|
+
updateGridCellDefault: vt,
|
|
2675
|
+
updateGridGap: ct,
|
|
2676
|
+
updateSelectedCellPadding: pt,
|
|
2677
|
+
updateSelectedCellAlign: ft,
|
|
2678
|
+
updateSelectedCellVerticalAlign: bt,
|
|
2679
|
+
updateSelectedCellFlex: gt,
|
|
2680
|
+
updateSelectedCellRowHeight: mt,
|
|
2681
|
+
updateSelectedTextStyle: ie,
|
|
2682
|
+
updateSelectedFontSize: ht,
|
|
2683
|
+
updateSelectedLineHeight: yt,
|
|
2684
|
+
updateSelectedFontWeight: St,
|
|
2685
|
+
updateSelectedColor: $t,
|
|
2686
|
+
updateSelectedFontFamily: Ct,
|
|
2687
|
+
updateSelectedAlign: wt,
|
|
2688
|
+
updateSelectedVerticalAlign: It,
|
|
2689
|
+
updateSelectedHtml: xt,
|
|
2690
|
+
updateSelectedCss: kt,
|
|
2691
|
+
updateSelectedImageSrc: Tt,
|
|
2692
|
+
updateSelectedImageField: Ft,
|
|
2693
|
+
updateSelectedImageSize: Dt,
|
|
2694
|
+
updateSelectedImageFit: Nt,
|
|
2695
|
+
updateBaseRowHeight: Pt,
|
|
2696
|
+
updatePaperSize: Et,
|
|
2697
|
+
paperMarginTop: At,
|
|
2698
|
+
paperMarginRight: Ht,
|
|
2699
|
+
paperMarginBottom: Rt,
|
|
2700
|
+
paperMarginLeft: Lt,
|
|
2701
|
+
updatePaperMarginSide: Mt,
|
|
2702
|
+
updatePaperHeader: de.patch,
|
|
2703
|
+
updatePaperHeaderContent: de.content,
|
|
2704
|
+
updatePaperHeaderEnabled: de.enabled,
|
|
2705
|
+
updatePaperHeaderHeight: de.height,
|
|
2706
|
+
updatePaperHeaderSeparator: de.separator,
|
|
2707
|
+
updatePaperHeaderFontSize: de.fontSize,
|
|
2708
|
+
updatePaperHeaderFontWeight: de.fontWeight,
|
|
2709
|
+
updatePaperHeaderColor: de.color,
|
|
2628
2710
|
updatePaperFooter: re.patch,
|
|
2629
2711
|
updatePaperFooterContent: re.content,
|
|
2630
2712
|
updatePaperFooterEnabled: re.enabled,
|
|
@@ -2635,19 +2717,19 @@ function md(e) {
|
|
|
2635
2717
|
updatePaperFooterColor: re.color
|
|
2636
2718
|
};
|
|
2637
2719
|
}
|
|
2638
|
-
const
|
|
2639
|
-
function
|
|
2640
|
-
const
|
|
2720
|
+
const _t = "ticket-designer-fill-data-v2", yd = "[ticket-designer] 表单数据 JSON";
|
|
2721
|
+
function Sd(e) {
|
|
2722
|
+
const r = xl({
|
|
2641
2723
|
value: null
|
|
2642
|
-
}), t =
|
|
2643
|
-
function
|
|
2724
|
+
}), t = N(() => r.value), a = G(null);
|
|
2725
|
+
function o(v) {
|
|
2644
2726
|
var A;
|
|
2645
2727
|
const p = v.target, g = (A = p.files) == null ? void 0 : A[0];
|
|
2646
2728
|
if (!g) return;
|
|
2647
|
-
const
|
|
2648
|
-
|
|
2729
|
+
const M = new FileReader();
|
|
2730
|
+
M.onload = () => {
|
|
2649
2731
|
try {
|
|
2650
|
-
const H = JSON.parse(String(
|
|
2732
|
+
const H = JSON.parse(String(M.result));
|
|
2651
2733
|
e.enterPreview(H);
|
|
2652
2734
|
} catch (H) {
|
|
2653
2735
|
alert(
|
|
@@ -2656,20 +2738,20 @@ function hd(e) {
|
|
|
2656
2738
|
} finally {
|
|
2657
2739
|
p.value = "";
|
|
2658
2740
|
}
|
|
2659
|
-
},
|
|
2741
|
+
}, M.onerror = () => {
|
|
2660
2742
|
alert("数据文件读取失败"), p.value = "";
|
|
2661
|
-
},
|
|
2743
|
+
}, M.readAsText(g);
|
|
2662
2744
|
}
|
|
2663
|
-
function
|
|
2745
|
+
function u() {
|
|
2664
2746
|
var v;
|
|
2665
2747
|
(v = a.value) == null || v.click();
|
|
2666
2748
|
}
|
|
2667
|
-
function
|
|
2749
|
+
function f() {
|
|
2668
2750
|
try {
|
|
2669
|
-
const v =
|
|
2751
|
+
const v = tt(e.canvasEl.value, {
|
|
2670
2752
|
maskHidden: !0
|
|
2671
|
-
}), p =
|
|
2672
|
-
console.log(
|
|
2753
|
+
}), p = Yt(v);
|
|
2754
|
+
console.log(yd, p), rl(dl(va), p);
|
|
2673
2755
|
} catch (v) {
|
|
2674
2756
|
alert(
|
|
2675
2757
|
`导出数据失败:${v instanceof Error ? v.message : String(v)}`
|
|
@@ -2679,11 +2761,11 @@ function hd(e) {
|
|
|
2679
2761
|
function s() {
|
|
2680
2762
|
try {
|
|
2681
2763
|
localStorage.setItem(
|
|
2682
|
-
|
|
2764
|
+
_t,
|
|
2683
2765
|
// 本机「保存数据」:脱敏字段(HIDDEN)从 previewFormData 回源真实值,保存→读取不丢数据
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
baseData:
|
|
2766
|
+
Yt(
|
|
2767
|
+
tt(e.canvasEl.value, {
|
|
2768
|
+
baseData: r.value
|
|
2687
2769
|
})
|
|
2688
2770
|
)
|
|
2689
2771
|
);
|
|
@@ -2693,8 +2775,8 @@ function hd(e) {
|
|
|
2693
2775
|
);
|
|
2694
2776
|
}
|
|
2695
2777
|
}
|
|
2696
|
-
function
|
|
2697
|
-
const v = localStorage.getItem(
|
|
2778
|
+
function b() {
|
|
2779
|
+
const v = localStorage.getItem(_t);
|
|
2698
2780
|
if (!v) {
|
|
2699
2781
|
alert("本地没有已保存的填写数据");
|
|
2700
2782
|
return;
|
|
@@ -2708,347 +2790,346 @@ function hd(e) {
|
|
|
2708
2790
|
}
|
|
2709
2791
|
}
|
|
2710
2792
|
return {
|
|
2711
|
-
previewFormData:
|
|
2793
|
+
previewFormData: r,
|
|
2712
2794
|
previewData: t,
|
|
2713
2795
|
fillDataFileInput: a,
|
|
2714
|
-
importFillDataFile:
|
|
2715
|
-
triggerImportFillData:
|
|
2716
|
-
exportFillDataFile:
|
|
2796
|
+
importFillDataFile: o,
|
|
2797
|
+
triggerImportFillData: u,
|
|
2798
|
+
exportFillDataFile: f,
|
|
2717
2799
|
saveFillDataToLocal: s,
|
|
2718
|
-
loadFillDataFromLocal:
|
|
2800
|
+
loadFillDataFromLocal: b
|
|
2719
2801
|
};
|
|
2720
2802
|
}
|
|
2721
|
-
const
|
|
2803
|
+
const $d = { class: "v2-designer" }, Cd = { class: "v2-designer__body" }, el = "ticket-designer-help-seen-v1", wd = /* @__PURE__ */ X({
|
|
2722
2804
|
__name: "FormDesigner",
|
|
2723
2805
|
props: {
|
|
2724
2806
|
initialSchema: {},
|
|
2725
2807
|
samples: {},
|
|
2726
2808
|
uiConfig: {}
|
|
2727
2809
|
},
|
|
2728
|
-
setup(e, { expose:
|
|
2810
|
+
setup(e, { expose: r }) {
|
|
2729
2811
|
const t = e;
|
|
2730
|
-
|
|
2812
|
+
ce(
|
|
2731
2813
|
() => {
|
|
2732
|
-
var
|
|
2733
|
-
return (
|
|
2814
|
+
var k;
|
|
2815
|
+
return (k = t.uiConfig) == null ? void 0 : k.locale;
|
|
2734
2816
|
},
|
|
2735
|
-
(
|
|
2817
|
+
(k) => ta(k ?? ia),
|
|
2736
2818
|
{ immediate: !0 }
|
|
2737
2819
|
);
|
|
2738
|
-
const a = G("design"),
|
|
2820
|
+
const a = G("design"), o = N(() => a.value !== "design"), u = N(() => !o.value), f = G(!0);
|
|
2739
2821
|
function s() {
|
|
2740
2822
|
try {
|
|
2741
|
-
return localStorage.getItem(
|
|
2823
|
+
return localStorage.getItem(el) !== null;
|
|
2742
2824
|
} catch {
|
|
2743
2825
|
return !1;
|
|
2744
2826
|
}
|
|
2745
2827
|
}
|
|
2746
|
-
function
|
|
2828
|
+
function b() {
|
|
2747
2829
|
v.value = !1;
|
|
2748
2830
|
try {
|
|
2749
|
-
localStorage.setItem(
|
|
2831
|
+
localStorage.setItem(el, "1");
|
|
2750
2832
|
} catch {
|
|
2751
2833
|
}
|
|
2752
2834
|
}
|
|
2753
2835
|
const v = G(!s()), p = G(null);
|
|
2754
2836
|
let g = () => {
|
|
2755
2837
|
};
|
|
2756
|
-
const
|
|
2838
|
+
const M = md(t.initialSchema, {
|
|
2757
2839
|
onReset: () => g()
|
|
2758
2840
|
}), {
|
|
2759
2841
|
schema: A,
|
|
2760
2842
|
dirty: H,
|
|
2761
2843
|
canUndo: U,
|
|
2762
|
-
canRedo:
|
|
2844
|
+
canRedo: Z,
|
|
2763
2845
|
fileInput: j,
|
|
2764
|
-
commit:
|
|
2846
|
+
commit: le,
|
|
2765
2847
|
resetHistory: ee,
|
|
2766
|
-
saveToLocal:
|
|
2767
|
-
loadFromLocal:
|
|
2768
|
-
exportFile:
|
|
2769
|
-
importFile:
|
|
2848
|
+
saveToLocal: T,
|
|
2849
|
+
loadFromLocal: J,
|
|
2850
|
+
exportFile: K,
|
|
2851
|
+
importFile: _,
|
|
2770
2852
|
triggerImport: w
|
|
2771
|
-
} =
|
|
2853
|
+
} = M, S = cn(A, { editable: () => u.value }), {
|
|
2772
2854
|
selectedNodeId: c,
|
|
2773
2855
|
selectedNode: h,
|
|
2774
2856
|
selectedNodeType: m,
|
|
2775
|
-
selectedCellContext:
|
|
2857
|
+
selectedCellContext: C,
|
|
2776
2858
|
selectedCellBox: F,
|
|
2777
|
-
nodeTree:
|
|
2778
|
-
clearSelection:
|
|
2859
|
+
nodeTree: P,
|
|
2860
|
+
clearSelection: D,
|
|
2779
2861
|
selectNode: z,
|
|
2780
2862
|
selectNodeById: O,
|
|
2781
|
-
selectIssue:
|
|
2782
|
-
} =
|
|
2783
|
-
g =
|
|
2784
|
-
const
|
|
2863
|
+
selectIssue: fe
|
|
2864
|
+
} = S;
|
|
2865
|
+
g = D;
|
|
2866
|
+
const He = N(
|
|
2785
2867
|
() => {
|
|
2786
|
-
var
|
|
2787
|
-
return
|
|
2868
|
+
var k, V;
|
|
2869
|
+
return u.value && c.value !== null && ((k = h.value) == null ? void 0 : k.type) !== "page" && ((V = h.value) == null ? void 0 : V.type) !== "grid-cell";
|
|
2788
2870
|
}
|
|
2789
|
-
),
|
|
2871
|
+
), ne = {
|
|
2790
2872
|
token: G(0),
|
|
2791
2873
|
target: G(!0),
|
|
2792
2874
|
focusId: G(null),
|
|
2793
2875
|
focusToken: G(0)
|
|
2794
2876
|
};
|
|
2795
|
-
|
|
2796
|
-
function
|
|
2797
|
-
|
|
2877
|
+
kl(ul, ne);
|
|
2878
|
+
function me() {
|
|
2879
|
+
ne.target.value = !1, ne.focusId.value = null, ne.token.value++;
|
|
2798
2880
|
}
|
|
2799
|
-
function
|
|
2800
|
-
|
|
2881
|
+
function he() {
|
|
2882
|
+
ne.target.value = !0, ne.focusId.value = null, ne.token.value++;
|
|
2801
2883
|
}
|
|
2802
|
-
|
|
2884
|
+
ce(
|
|
2803
2885
|
c,
|
|
2804
|
-
(
|
|
2805
|
-
|
|
2886
|
+
(k) => {
|
|
2887
|
+
ne.focusId.value = k, k && ne.focusToken.value++;
|
|
2806
2888
|
},
|
|
2807
2889
|
{ flush: "sync" }
|
|
2808
2890
|
);
|
|
2809
|
-
const
|
|
2810
|
-
document:
|
|
2811
|
-
selection:
|
|
2812
|
-
editable: () =>
|
|
2813
|
-
clearSelection:
|
|
2891
|
+
const Ie = hd({
|
|
2892
|
+
document: M,
|
|
2893
|
+
selection: S,
|
|
2894
|
+
editable: () => u.value,
|
|
2895
|
+
clearSelection: D
|
|
2814
2896
|
}), {
|
|
2815
|
-
addRootGrid:
|
|
2897
|
+
addRootGrid: nt,
|
|
2816
2898
|
addGrid: Re,
|
|
2817
2899
|
addNodeToSelectedCell: Le,
|
|
2818
|
-
removeSelectedNode:
|
|
2900
|
+
removeSelectedNode: xe,
|
|
2819
2901
|
copySelected: Me,
|
|
2820
2902
|
cutSelected: Be,
|
|
2821
|
-
pasteClipboard:
|
|
2822
|
-
duplicateSelected:
|
|
2823
|
-
mergeSelectedCellRight:
|
|
2824
|
-
splitSelectedCell:
|
|
2825
|
-
onCanvasNodeDragStart:
|
|
2826
|
-
onDropNode:
|
|
2827
|
-
onDropPalette:
|
|
2828
|
-
updateSelectedText:
|
|
2829
|
-
updateSelectedField:
|
|
2903
|
+
pasteClipboard: Ve,
|
|
2904
|
+
duplicateSelected: Ge,
|
|
2905
|
+
mergeSelectedCellRight: ot,
|
|
2906
|
+
splitSelectedCell: it,
|
|
2907
|
+
onCanvasNodeDragStart: ze,
|
|
2908
|
+
onDropNode: Oe,
|
|
2909
|
+
onDropPalette: Ce,
|
|
2910
|
+
updateSelectedText: dt,
|
|
2911
|
+
updateSelectedField: rt,
|
|
2830
2912
|
updateSelectedPrefix: ut,
|
|
2831
|
-
updateSelectedSuffix:
|
|
2913
|
+
updateSelectedSuffix: We,
|
|
2832
2914
|
updateSelectedWidth: st,
|
|
2833
2915
|
updateSelectedDefault: vt,
|
|
2834
|
-
updateSelectedInnerBorder:
|
|
2835
|
-
updateSelectedAction: ct,
|
|
2916
|
+
updateSelectedInnerBorder: ct,
|
|
2836
2917
|
updateGridBorder: pt,
|
|
2837
2918
|
updateTableBorder: ft,
|
|
2838
|
-
updateGridDimensions:
|
|
2839
|
-
updateTableRows:
|
|
2840
|
-
addTableColumn:
|
|
2841
|
-
removeTableColumn:
|
|
2842
|
-
renameTableColumnKey:
|
|
2843
|
-
updateTableColumn:
|
|
2844
|
-
updateGridColumnWidth:
|
|
2845
|
-
updateGridCellDefault:
|
|
2846
|
-
updateGridGap:
|
|
2847
|
-
updateSelectedCellPadding:
|
|
2848
|
-
updateSelectedCellAlign:
|
|
2849
|
-
updateSelectedCellVerticalAlign:
|
|
2919
|
+
updateGridDimensions: bt,
|
|
2920
|
+
updateTableRows: gt,
|
|
2921
|
+
addTableColumn: mt,
|
|
2922
|
+
removeTableColumn: ie,
|
|
2923
|
+
renameTableColumnKey: ht,
|
|
2924
|
+
updateTableColumn: yt,
|
|
2925
|
+
updateGridColumnWidth: St,
|
|
2926
|
+
updateGridCellDefault: $t,
|
|
2927
|
+
updateGridGap: Ct,
|
|
2928
|
+
updateSelectedCellPadding: wt,
|
|
2929
|
+
updateSelectedCellAlign: It,
|
|
2930
|
+
updateSelectedCellVerticalAlign: xt,
|
|
2850
2931
|
updateSelectedCellRowHeight: kt,
|
|
2851
|
-
updateSelectedFontSize:
|
|
2852
|
-
updateSelectedLineHeight:
|
|
2853
|
-
updateSelectedFontWeight:
|
|
2854
|
-
updateSelectedColor:
|
|
2855
|
-
updateSelectedFontFamily:
|
|
2856
|
-
updateSelectedAlign:
|
|
2857
|
-
updateSelectedVerticalAlign:
|
|
2858
|
-
updateSelectedHtml:
|
|
2859
|
-
updateSelectedCss:
|
|
2860
|
-
updateSelectedImageSrc:
|
|
2861
|
-
updateSelectedImageField:
|
|
2862
|
-
updateSelectedImageSize:
|
|
2863
|
-
updateSelectedImageFit:
|
|
2864
|
-
updateBaseRowHeight:
|
|
2865
|
-
updatePaperSize:
|
|
2866
|
-
paperMarginTop:
|
|
2867
|
-
paperMarginRight:
|
|
2868
|
-
paperMarginBottom:
|
|
2869
|
-
paperMarginLeft:
|
|
2870
|
-
updatePaperMarginSide:
|
|
2871
|
-
} =
|
|
2932
|
+
updateSelectedFontSize: Tt,
|
|
2933
|
+
updateSelectedLineHeight: Ft,
|
|
2934
|
+
updateSelectedFontWeight: Dt,
|
|
2935
|
+
updateSelectedColor: Nt,
|
|
2936
|
+
updateSelectedFontFamily: Pt,
|
|
2937
|
+
updateSelectedAlign: Et,
|
|
2938
|
+
updateSelectedVerticalAlign: At,
|
|
2939
|
+
updateSelectedHtml: Ht,
|
|
2940
|
+
updateSelectedCss: Rt,
|
|
2941
|
+
updateSelectedImageSrc: Lt,
|
|
2942
|
+
updateSelectedImageField: Mt,
|
|
2943
|
+
updateSelectedImageSize: Ue,
|
|
2944
|
+
updateSelectedImageFit: de,
|
|
2945
|
+
updateBaseRowHeight: re,
|
|
2946
|
+
updatePaperSize: n,
|
|
2947
|
+
paperMarginTop: i,
|
|
2948
|
+
paperMarginRight: d,
|
|
2949
|
+
paperMarginBottom: y,
|
|
2950
|
+
paperMarginLeft: R,
|
|
2951
|
+
updatePaperMarginSide: Y
|
|
2952
|
+
} = Ie, te = Sd({
|
|
2872
2953
|
canvasEl: p,
|
|
2873
|
-
enterPreview: (
|
|
2954
|
+
enterPreview: (k) => Te(k)
|
|
2874
2955
|
}), {
|
|
2875
|
-
previewFormData:
|
|
2876
|
-
previewData:
|
|
2877
|
-
fillDataFileInput:
|
|
2878
|
-
importFillDataFile:
|
|
2879
|
-
triggerImportFillData:
|
|
2880
|
-
exportFillDataFile:
|
|
2881
|
-
saveFillDataToLocal:
|
|
2882
|
-
loadFillDataFromLocal:
|
|
2883
|
-
} =
|
|
2884
|
-
function
|
|
2885
|
-
|
|
2886
|
-
}
|
|
2887
|
-
function
|
|
2888
|
-
if (a.value ===
|
|
2889
|
-
a.value = "design",
|
|
2956
|
+
previewFormData: ue,
|
|
2957
|
+
previewData: se,
|
|
2958
|
+
fillDataFileInput: je,
|
|
2959
|
+
importFillDataFile: ke,
|
|
2960
|
+
triggerImportFillData: Je,
|
|
2961
|
+
exportFillDataFile: L,
|
|
2962
|
+
saveFillDataToLocal: W,
|
|
2963
|
+
loadFillDataFromLocal: ye
|
|
2964
|
+
} = te;
|
|
2965
|
+
function Te(k) {
|
|
2966
|
+
ue.value = k, a.value = "preview", D();
|
|
2967
|
+
}
|
|
2968
|
+
function Fe(k) {
|
|
2969
|
+
if (a.value === k) {
|
|
2970
|
+
a.value = "design", ue.value = null;
|
|
2890
2971
|
return;
|
|
2891
2972
|
}
|
|
2892
|
-
|
|
2973
|
+
Te({});
|
|
2893
2974
|
}
|
|
2894
|
-
function
|
|
2895
|
-
|
|
2975
|
+
function Bt() {
|
|
2976
|
+
M.undo(), D();
|
|
2896
2977
|
}
|
|
2897
|
-
function
|
|
2898
|
-
|
|
2978
|
+
function Vt() {
|
|
2979
|
+
M.redo(), D();
|
|
2899
2980
|
}
|
|
2900
|
-
function
|
|
2981
|
+
function Gt() {
|
|
2901
2982
|
oa({ root: p.value });
|
|
2902
2983
|
}
|
|
2903
|
-
function
|
|
2904
|
-
ee(
|
|
2984
|
+
function pl(k) {
|
|
2985
|
+
ee(k.loadSchema()), D();
|
|
2905
2986
|
}
|
|
2906
|
-
function
|
|
2907
|
-
ee(
|
|
2987
|
+
function zt() {
|
|
2988
|
+
ee(cl()), D();
|
|
2908
2989
|
}
|
|
2909
|
-
function
|
|
2910
|
-
var
|
|
2911
|
-
|
|
2990
|
+
function fl(k, V) {
|
|
2991
|
+
var B;
|
|
2992
|
+
u.value && ((B = V.dataTransfer) == null || B.setData(Qe, k), V.dataTransfer && (V.dataTransfer.effectAllowed = "copy"));
|
|
2912
2993
|
}
|
|
2913
|
-
const
|
|
2914
|
-
() => aa(A.value, { data:
|
|
2994
|
+
const Ot = N(() => la(A.value)), bl = N(() => Ot.value.length), Wt = N(
|
|
2995
|
+
() => aa(A.value, { data: se.value })
|
|
2915
2996
|
);
|
|
2916
|
-
function gl(
|
|
2917
|
-
const V =
|
|
2997
|
+
function gl(k) {
|
|
2998
|
+
const V = k.target;
|
|
2918
2999
|
if (!V) return !1;
|
|
2919
|
-
const
|
|
2920
|
-
return
|
|
3000
|
+
const B = V.tagName;
|
|
3001
|
+
return B === "INPUT" || B === "TEXTAREA" || B === "SELECT" || V.isContentEditable;
|
|
2921
3002
|
}
|
|
2922
|
-
function
|
|
2923
|
-
if (gl(
|
|
2924
|
-
const V =
|
|
3003
|
+
function Ut(k) {
|
|
3004
|
+
if (gl(k)) return;
|
|
3005
|
+
const V = k.ctrlKey || k.metaKey, B = k.key.toLowerCase();
|
|
2925
3006
|
if (V) {
|
|
2926
|
-
|
|
3007
|
+
B === "z" && !k.shiftKey ? (k.preventDefault(), Bt()) : B === "z" && k.shiftKey || B === "y" ? (k.preventDefault(), Vt()) : B === "s" ? (k.preventDefault(), T()) : B === "c" ? (k.preventDefault(), Me()) : B === "x" ? (k.preventDefault(), Be()) : B === "v" ? (k.preventDefault(), Ve()) : B === "d" && (k.preventDefault(), Ge());
|
|
2927
3008
|
return;
|
|
2928
3009
|
}
|
|
2929
|
-
(
|
|
3010
|
+
(B === "delete" || B === "backspace") && u.value && (k.preventDefault(), xe());
|
|
2930
3011
|
}
|
|
2931
|
-
function
|
|
2932
|
-
H.value && (
|
|
3012
|
+
function jt(k) {
|
|
3013
|
+
H.value && (k.preventDefault(), k.returnValue = "");
|
|
2933
3014
|
}
|
|
2934
|
-
|
|
2935
|
-
A.value.pages.length > 0 && O(A.value.pages[0].id), window.addEventListener("keydown",
|
|
2936
|
-
}),
|
|
2937
|
-
window.removeEventListener("keydown",
|
|
3015
|
+
tl(() => {
|
|
3016
|
+
A.value.pages.length > 0 && O(A.value.pages[0].id), window.addEventListener("keydown", Ut), window.addEventListener("beforeunload", jt);
|
|
3017
|
+
}), lt(() => {
|
|
3018
|
+
window.removeEventListener("keydown", Ut), window.removeEventListener("beforeunload", jt);
|
|
2938
3019
|
});
|
|
2939
3020
|
function ml() {
|
|
2940
3021
|
return JSON.parse(JSON.stringify(A.value));
|
|
2941
3022
|
}
|
|
2942
|
-
function
|
|
2943
|
-
return
|
|
3023
|
+
function hl(k) {
|
|
3024
|
+
return tt(p.value, {
|
|
2944
3025
|
maskHidden: !0,
|
|
2945
|
-
...
|
|
3026
|
+
...k
|
|
2946
3027
|
});
|
|
2947
3028
|
}
|
|
2948
|
-
function
|
|
2949
|
-
ee(pa(
|
|
3029
|
+
function yl(k) {
|
|
3030
|
+
ee(pa(k)), D();
|
|
2950
3031
|
}
|
|
2951
|
-
function
|
|
2952
|
-
|
|
3032
|
+
function Sl() {
|
|
3033
|
+
K();
|
|
2953
3034
|
}
|
|
2954
|
-
return
|
|
3035
|
+
return r({
|
|
2955
3036
|
getSchema: ml,
|
|
2956
|
-
getFormData:
|
|
2957
|
-
setSchema:
|
|
2958
|
-
exportSchemaFile:
|
|
3037
|
+
getFormData: hl,
|
|
3038
|
+
setSchema: yl,
|
|
3039
|
+
exportSchemaFile: Sl,
|
|
2959
3040
|
// 「导出数据」与工具栏同一实现(`useFillData.exportFillDataFile`,含 console 打印)
|
|
2960
|
-
exportFillDataFile:
|
|
2961
|
-
print:
|
|
2962
|
-
resetBlank:
|
|
2963
|
-
}), (
|
|
2964
|
-
|
|
3041
|
+
exportFillDataFile: L,
|
|
3042
|
+
print: Gt,
|
|
3043
|
+
resetBlank: zt
|
|
3044
|
+
}), (k, V) => ($(), I("div", $d, [
|
|
3045
|
+
ae(za, {
|
|
2965
3046
|
samples: e.samples,
|
|
2966
3047
|
dirty: x(H),
|
|
2967
3048
|
"can-undo": x(U),
|
|
2968
|
-
"can-redo": x(
|
|
2969
|
-
"preview-mode":
|
|
3049
|
+
"can-redo": x(Z),
|
|
3050
|
+
"preview-mode": o.value,
|
|
2970
3051
|
"ui-config": e.uiConfig,
|
|
2971
|
-
onResetBlank:
|
|
2972
|
-
onLoadSample:
|
|
2973
|
-
onUndo:
|
|
2974
|
-
onRedo:
|
|
2975
|
-
onSaveTemplate: x(
|
|
2976
|
-
onLoadTemplate: x(
|
|
2977
|
-
onExportTemplate: x(
|
|
3052
|
+
onResetBlank: zt,
|
|
3053
|
+
onLoadSample: pl,
|
|
3054
|
+
onUndo: Bt,
|
|
3055
|
+
onRedo: Vt,
|
|
3056
|
+
onSaveTemplate: x(T),
|
|
3057
|
+
onLoadTemplate: x(J),
|
|
3058
|
+
onExportTemplate: x(K),
|
|
2978
3059
|
onImportTemplate: x(w),
|
|
2979
|
-
onImportFillData: x(
|
|
2980
|
-
onExportFillData: x(
|
|
2981
|
-
onLoadFillData: x(
|
|
2982
|
-
onSaveFillData: x(
|
|
2983
|
-
onTogglePreview: V[0] || (V[0] = (
|
|
2984
|
-
onPrint:
|
|
2985
|
-
onHelp: V[1] || (V[1] = (
|
|
3060
|
+
onImportFillData: x(Je),
|
|
3061
|
+
onExportFillData: x(L),
|
|
3062
|
+
onLoadFillData: x(ye),
|
|
3063
|
+
onSaveFillData: x(W),
|
|
3064
|
+
onTogglePreview: V[0] || (V[0] = (B) => Fe("preview")),
|
|
3065
|
+
onPrint: Gt,
|
|
3066
|
+
onHelp: V[1] || (V[1] = (B) => v.value = !0)
|
|
2986
3067
|
}, null, 8, ["samples", "dirty", "can-undo", "can-redo", "preview-mode", "ui-config", "onSaveTemplate", "onLoadTemplate", "onExportTemplate", "onImportTemplate", "onImportFillData", "onExportFillData", "onLoadFillData", "onSaveFillData"]),
|
|
2987
|
-
l("div",
|
|
2988
|
-
|
|
2989
|
-
editable:
|
|
2990
|
-
"can-remove":
|
|
2991
|
-
"node-tree": x(
|
|
3068
|
+
l("div", Cd, [
|
|
3069
|
+
ae(rn, {
|
|
3070
|
+
editable: u.value,
|
|
3071
|
+
"can-remove": He.value,
|
|
3072
|
+
"node-tree": x(P),
|
|
2992
3073
|
"selected-node-id": x(c),
|
|
2993
3074
|
onAddNode: x(Le),
|
|
2994
3075
|
onAddGrid: x(Re),
|
|
2995
|
-
onPaletteDrag:
|
|
3076
|
+
onPaletteDrag: fl,
|
|
2996
3077
|
onSelect: x(O),
|
|
2997
|
-
onRemoveSelected: x(
|
|
2998
|
-
onCollapseAll:
|
|
2999
|
-
onExpandAll:
|
|
3078
|
+
onRemoveSelected: x(xe),
|
|
3079
|
+
onCollapseAll: me,
|
|
3080
|
+
onExpandAll: he
|
|
3000
3081
|
}, null, 8, ["editable", "can-remove", "node-tree", "selected-node-id", "onAddNode", "onAddGrid", "onSelect", "onRemoveSelected"]),
|
|
3001
3082
|
l("main", {
|
|
3002
3083
|
ref_key: "canvasEl",
|
|
3003
3084
|
ref: p,
|
|
3004
|
-
class:
|
|
3085
|
+
class: pe(["v2-canvas", { "v2-canvas--preview": o.value }]),
|
|
3005
3086
|
onClick: V[2] || (V[2] = //@ts-ignore
|
|
3006
|
-
(...
|
|
3087
|
+
(...B) => x(z) && x(z)(...B))
|
|
3007
3088
|
}, [
|
|
3008
|
-
|
|
3009
|
-
default:
|
|
3010
|
-
|
|
3089
|
+
ae(na, { "fit-on-mount": !1 }, {
|
|
3090
|
+
default: Tl(() => [
|
|
3091
|
+
ae(ra, {
|
|
3011
3092
|
schema: x(A),
|
|
3012
|
-
mode:
|
|
3013
|
-
"selected-node-id":
|
|
3014
|
-
data: x(
|
|
3093
|
+
mode: o.value ? "preview" : "design",
|
|
3094
|
+
"selected-node-id": o.value ? null : x(c),
|
|
3095
|
+
data: x(se),
|
|
3015
3096
|
readonly: !1,
|
|
3016
3097
|
bare: !0,
|
|
3017
|
-
paginate:
|
|
3018
|
-
onNodeDragStart: x(
|
|
3019
|
-
onDropNode: x(
|
|
3020
|
-
onDropPalette: x(
|
|
3098
|
+
paginate: o.value || f.value,
|
|
3099
|
+
onNodeDragStart: x(ze),
|
|
3100
|
+
onDropNode: x(Oe),
|
|
3101
|
+
onDropPalette: x(Ce)
|
|
3021
3102
|
}, null, 8, ["schema", "mode", "selected-node-id", "data", "paginate", "onNodeDragStart", "onDropNode", "onDropPalette"])
|
|
3022
3103
|
]),
|
|
3023
3104
|
_: 1
|
|
3024
3105
|
})
|
|
3025
3106
|
], 2),
|
|
3026
|
-
|
|
3027
|
-
paginate:
|
|
3028
|
-
"onUpdate:paginate": V[3] || (V[3] = (
|
|
3107
|
+
ae(ud, {
|
|
3108
|
+
paginate: f.value,
|
|
3109
|
+
"onUpdate:paginate": V[3] || (V[3] = (B) => f.value = B),
|
|
3029
3110
|
node: x(h),
|
|
3030
3111
|
"node-id": x(c),
|
|
3031
3112
|
"node-type": x(m),
|
|
3032
|
-
"cell-context": x(
|
|
3113
|
+
"cell-context": x(C),
|
|
3033
3114
|
"cell-box": x(F),
|
|
3034
|
-
issues:
|
|
3035
|
-
api: x(
|
|
3115
|
+
issues: Ot.value,
|
|
3116
|
+
api: x(Ie),
|
|
3036
3117
|
"paper-size": x(A).paper.size,
|
|
3037
3118
|
"base-row-height": x(A).baseRowHeight,
|
|
3038
|
-
"paper-margin-top": x(
|
|
3039
|
-
"paper-margin-right": x(
|
|
3040
|
-
"paper-margin-bottom": x(
|
|
3041
|
-
"paper-margin-left": x(
|
|
3119
|
+
"paper-margin-top": x(i),
|
|
3120
|
+
"paper-margin-right": x(d),
|
|
3121
|
+
"paper-margin-bottom": x(y),
|
|
3122
|
+
"paper-margin-left": x(R),
|
|
3042
3123
|
header: x(A).paper.header,
|
|
3043
3124
|
footer: x(A).paper.footer,
|
|
3044
|
-
onSelectIssue: x(
|
|
3125
|
+
onSelectIssue: x(fe)
|
|
3045
3126
|
}, null, 8, ["paginate", "node", "node-id", "node-type", "cell-context", "cell-box", "issues", "api", "paper-size", "base-row-height", "paper-margin-top", "paper-margin-right", "paper-margin-bottom", "paper-margin-left", "header", "footer", "onSelectIssue"])
|
|
3046
3127
|
]),
|
|
3047
|
-
|
|
3128
|
+
ae(Sa, {
|
|
3048
3129
|
"page-count": x(A).pages.length,
|
|
3049
|
-
"warning-count":
|
|
3050
|
-
"physical-page-count":
|
|
3051
|
-
"paginate-warning-count":
|
|
3130
|
+
"warning-count": bl.value,
|
|
3131
|
+
"physical-page-count": Wt.value.pages.length,
|
|
3132
|
+
"paginate-warning-count": Wt.value.warnings.length
|
|
3052
3133
|
}, null, 8, ["page-count", "warning-count", "physical-page-count", "paginate-warning-count"]),
|
|
3053
3134
|
l("input", {
|
|
3054
3135
|
ref_key: "fileInput",
|
|
@@ -3057,36 +3138,36 @@ const yd = { class: "v2-designer" }, Sd = { class: "v2-designer__body" }, Xt = "
|
|
|
3057
3138
|
accept: ".json,application/json",
|
|
3058
3139
|
class: "v2-toolbar__file",
|
|
3059
3140
|
onChange: V[4] || (V[4] = //@ts-ignore
|
|
3060
|
-
(...
|
|
3141
|
+
(...B) => x(_) && x(_)(...B))
|
|
3061
3142
|
}, null, 544),
|
|
3062
3143
|
l("input", {
|
|
3063
3144
|
ref_key: "fillDataFileInput",
|
|
3064
|
-
ref:
|
|
3145
|
+
ref: je,
|
|
3065
3146
|
type: "file",
|
|
3066
3147
|
accept: ".json,application/json",
|
|
3067
3148
|
class: "v2-toolbar__file",
|
|
3068
3149
|
onChange: V[5] || (V[5] = //@ts-ignore
|
|
3069
|
-
(...
|
|
3150
|
+
(...B) => x(ke) && x(ke)(...B))
|
|
3070
3151
|
}, null, 544),
|
|
3071
|
-
|
|
3152
|
+
ae(pd, {
|
|
3072
3153
|
open: v.value,
|
|
3073
|
-
onClose:
|
|
3154
|
+
onClose: b
|
|
3074
3155
|
}, null, 8, ["open"])
|
|
3075
3156
|
]));
|
|
3076
3157
|
}
|
|
3077
|
-
}),
|
|
3158
|
+
}), kd = /* @__PURE__ */ ve(wd, [["__scopeId", "data-v-11f35b10"]]);
|
|
3078
3159
|
export {
|
|
3079
3160
|
va as F,
|
|
3080
|
-
|
|
3161
|
+
ua as J,
|
|
3081
3162
|
sa as S,
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3163
|
+
kd as a,
|
|
3164
|
+
cl as b,
|
|
3165
|
+
tt as c,
|
|
3085
3166
|
$a as d,
|
|
3086
|
-
|
|
3087
|
-
|
|
3167
|
+
rl as e,
|
|
3168
|
+
dl as f,
|
|
3088
3169
|
ca as g,
|
|
3089
3170
|
pa as n,
|
|
3090
3171
|
Ca as r,
|
|
3091
|
-
|
|
3172
|
+
Yt as s
|
|
3092
3173
|
};
|