brick-pdf 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brick-pdf.js +662 -603
- package/dist/brick-pdf.umd.cjs +4 -4
- package/dist/fonts/notoSansJp.d.ts +11 -0
- package/package.json +1 -1
package/dist/brick-pdf.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { defineComponent as _, openBlock as s, createElementBlock as d, normalizeStyle as
|
|
2
|
-
import { useMagicKeys as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
1
|
+
import { defineComponent as _, openBlock as s, createElementBlock as d, normalizeStyle as N, toDisplayString as w, renderSlot as Z, normalizeClass as ee, createElementVNode as m, Fragment as C, renderList as P, reactive as ze, provide as D, inject as L, toRaw as J, ref as E, computed as I, createTextVNode as ie, createCommentVNode as $, createBlock as M, resolveDynamicComponent as te, withCtx as j, onMounted as me, onBeforeUnmount as ye, unref as k, resolveComponent as Te, withDirectives as K, vModelSelect as se, createVNode as B, vModelText as De, watch as Le } from "vue";
|
|
2
|
+
import { useMagicKeys as Me, whenever as ae } from "@vueuse/core";
|
|
3
|
+
import ce from "sortablejs";
|
|
4
|
+
function ne() {
|
|
5
5
|
return {
|
|
6
6
|
pageSize: "A4",
|
|
7
7
|
pageOrientation: "portrait",
|
|
8
8
|
pageMargins: [40, 60, 40, 60],
|
|
9
9
|
defaultStyle: {
|
|
10
|
+
font: "NotoSansJP",
|
|
10
11
|
fontSize: 12
|
|
11
12
|
},
|
|
12
13
|
styles: {},
|
|
13
14
|
content: []
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
|
|
17
|
+
const Y = /* @__PURE__ */ new Map();
|
|
18
|
+
function z(e) {
|
|
19
|
+
Y.set(e.type, e);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
21
|
+
function U(e) {
|
|
22
|
+
return Y.get(e);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
return Array.from(
|
|
24
|
+
function Be() {
|
|
25
|
+
return Array.from(Y.values());
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
27
|
+
function rr(e) {
|
|
28
|
+
return Y.delete(e);
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function Oe() {
|
|
30
31
|
return { text: "New Text" };
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function Ae() {
|
|
33
34
|
return { fontSize: 12 };
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function Ve(e) {
|
|
36
37
|
const t = { text: e.props.text }, n = e.style;
|
|
37
38
|
return n.fontSize && (t.fontSize = n.fontSize), n.bold && (t.bold = n.bold), n.italics && (t.italics = n.italics), n.color && (t.color = n.color), n.alignment && (t.alignment = n.alignment), n.margin && (t.margin = n.margin), n.font && (t.font = n.font), n.lineHeight && (t.lineHeight = n.lineHeight), n.characterSpacing && (t.characterSpacing = n.characterSpacing), n.decoration && (t.decoration = n.decoration), n.decorationStyle && (t.decorationStyle = n.decorationStyle), n.decorationColor && (t.decorationColor = n.decorationColor), n.background && (t.background = n.background), n.link && (t.link = n.link), n.opacity !== void 0 && (t.opacity = n.opacity), t;
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
+
const He = /* @__PURE__ */ _({
|
|
40
41
|
__name: "TextRenderer",
|
|
41
42
|
props: {
|
|
42
43
|
node: {}
|
|
@@ -44,7 +45,7 @@ const Be = /* @__PURE__ */ _({
|
|
|
44
45
|
setup(e) {
|
|
45
46
|
return (t, n) => (s(), d("div", {
|
|
46
47
|
class: "brick-el-text",
|
|
47
|
-
style:
|
|
48
|
+
style: N({
|
|
48
49
|
fontSize: (e.node.style.fontSize ?? 12) + "px",
|
|
49
50
|
fontWeight: e.node.style.bold ? "bold" : "normal",
|
|
50
51
|
fontStyle: e.node.style.italics ? "italic" : "normal",
|
|
@@ -59,26 +60,26 @@ const Be = /* @__PURE__ */ _({
|
|
|
59
60
|
}
|
|
60
61
|
}), x = (e, t) => {
|
|
61
62
|
const n = e.__vccOpts || e;
|
|
62
|
-
for (const [
|
|
63
|
-
n[
|
|
63
|
+
for (const [l, a] of t)
|
|
64
|
+
n[l] = a;
|
|
64
65
|
return n;
|
|
65
|
-
},
|
|
66
|
+
}, Fe = /* @__PURE__ */ x(He, [["__scopeId", "data-v-a7cd1565"]]), Je = { class: "brick-text-editor" }, Ue = /* @__PURE__ */ _({
|
|
66
67
|
__name: "TextPropertyEditor",
|
|
67
68
|
props: {
|
|
68
69
|
node: {}
|
|
69
70
|
},
|
|
70
71
|
setup(e) {
|
|
71
|
-
return (t, n) => (s(), d("div",
|
|
72
|
+
return (t, n) => (s(), d("div", Je));
|
|
72
73
|
}
|
|
73
|
-
}),
|
|
74
|
+
}), We = {
|
|
74
75
|
type: "text",
|
|
75
76
|
label: "Text",
|
|
76
77
|
icon: "T",
|
|
77
78
|
isContainer: !1,
|
|
78
|
-
defaultProps:
|
|
79
|
-
defaultStyle:
|
|
80
|
-
rendererComponent:
|
|
81
|
-
propertyEditorComponent:
|
|
79
|
+
defaultProps: Oe,
|
|
80
|
+
defaultStyle: Ae,
|
|
81
|
+
rendererComponent: Fe,
|
|
82
|
+
propertyEditorComponent: Ue,
|
|
82
83
|
propertyFields: [
|
|
83
84
|
{ key: "props.text", label: "Text Content", section: "content", type: "textarea", defaultValue: "New Text" },
|
|
84
85
|
{ key: "style.fontSize", label: "Font Size", section: "style", type: "number", min: 6, max: 72, step: 1, defaultValue: 12 },
|
|
@@ -103,21 +104,21 @@ const Be = /* @__PURE__ */ _({
|
|
|
103
104
|
{ key: "style.link", label: "Link URL", section: "advanced", type: "text" },
|
|
104
105
|
{ key: "style.opacity", label: "Opacity", section: "advanced", type: "slider", min: 0, max: 1, step: 0.1, defaultValue: 1 }
|
|
105
106
|
],
|
|
106
|
-
toPdfmake:
|
|
107
|
+
toPdfmake: Ve
|
|
107
108
|
};
|
|
108
|
-
function
|
|
109
|
+
function je() {
|
|
109
110
|
return {};
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function Ye() {
|
|
112
113
|
return {};
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function qe(e, t) {
|
|
115
116
|
const n = {
|
|
116
117
|
stack: t(e.children)
|
|
117
118
|
};
|
|
118
119
|
return e.style.margin && (n.margin = e.style.margin), e.style.fillColor && (n.fillColor = e.style.fillColor), n;
|
|
119
120
|
}
|
|
120
|
-
const
|
|
121
|
+
const Ge = /* @__PURE__ */ _({
|
|
121
122
|
__name: "StackRenderer",
|
|
122
123
|
props: {
|
|
123
124
|
node: {},
|
|
@@ -126,49 +127,49 @@ const Je = /* @__PURE__ */ _({
|
|
|
126
127
|
setup(e) {
|
|
127
128
|
return (t, n) => (s(), d("div", {
|
|
128
129
|
class: "brick-el-stack",
|
|
129
|
-
style:
|
|
130
|
+
style: N({ backgroundColor: e.node.style.fillColor })
|
|
130
131
|
}, [
|
|
131
|
-
|
|
132
|
+
Z(t.$slots, "default", {}, void 0, !0)
|
|
132
133
|
], 4));
|
|
133
134
|
}
|
|
134
|
-
}),
|
|
135
|
+
}), Xe = /* @__PURE__ */ x(Ge, [["__scopeId", "data-v-c59e7405"]]), Ke = { class: "brick-stack-editor" }, Qe = /* @__PURE__ */ _({
|
|
135
136
|
__name: "StackPropertyEditor",
|
|
136
137
|
props: {
|
|
137
138
|
node: {}
|
|
138
139
|
},
|
|
139
140
|
setup(e) {
|
|
140
|
-
return (t, n) => (s(), d("div",
|
|
141
|
+
return (t, n) => (s(), d("div", Ke));
|
|
141
142
|
}
|
|
142
|
-
}),
|
|
143
|
+
}), Ze = {
|
|
143
144
|
type: "stack",
|
|
144
145
|
label: "Stack",
|
|
145
146
|
icon: "☰",
|
|
146
147
|
isContainer: !0,
|
|
147
148
|
acceptsChildTypes: null,
|
|
148
|
-
defaultProps:
|
|
149
|
-
defaultStyle:
|
|
150
|
-
rendererComponent:
|
|
151
|
-
propertyEditorComponent:
|
|
149
|
+
defaultProps: je,
|
|
150
|
+
defaultStyle: Ye,
|
|
151
|
+
rendererComponent: Xe,
|
|
152
|
+
propertyEditorComponent: Qe,
|
|
152
153
|
propertyFields: [
|
|
153
154
|
{ key: "style.fillColor", label: "Fill Color", section: "style", type: "color" },
|
|
154
155
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
155
156
|
],
|
|
156
|
-
toPdfmake:
|
|
157
|
+
toPdfmake: qe
|
|
157
158
|
};
|
|
158
|
-
function
|
|
159
|
+
function et() {
|
|
159
160
|
return { columnGap: 10 };
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
+
function tt() {
|
|
162
163
|
return {};
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
+
function nt(e, t) {
|
|
165
166
|
const n = {
|
|
166
167
|
columns: t(e.children),
|
|
167
168
|
columnGap: e.props.columnGap ?? 10
|
|
168
169
|
};
|
|
169
170
|
return e.style.margin && (n.margin = e.style.margin), n;
|
|
170
171
|
}
|
|
171
|
-
const
|
|
172
|
+
const ot = /* @__PURE__ */ _({
|
|
172
173
|
__name: "ColumnsRenderer",
|
|
173
174
|
props: {
|
|
174
175
|
node: {},
|
|
@@ -177,36 +178,36 @@ const Ze = /* @__PURE__ */ _({
|
|
|
177
178
|
setup(e) {
|
|
178
179
|
return (t, n) => (s(), d("div", {
|
|
179
180
|
class: "brick-el-columns",
|
|
180
|
-
style:
|
|
181
|
+
style: N({ "--column-gap": (e.node.props.columnGap ?? 10) + "px" })
|
|
181
182
|
}, [
|
|
182
|
-
|
|
183
|
+
Z(t.$slots, "default", {}, void 0, !0)
|
|
183
184
|
], 4));
|
|
184
185
|
}
|
|
185
|
-
}),
|
|
186
|
+
}), rt = /* @__PURE__ */ x(ot, [["__scopeId", "data-v-217dd721"]]), lt = { class: "brick-columns-editor" }, it = /* @__PURE__ */ _({
|
|
186
187
|
__name: "ColumnsPropertyEditor",
|
|
187
188
|
props: {
|
|
188
189
|
node: {}
|
|
189
190
|
},
|
|
190
191
|
setup(e) {
|
|
191
|
-
return (t, n) => (s(), d("div",
|
|
192
|
+
return (t, n) => (s(), d("div", lt));
|
|
192
193
|
}
|
|
193
|
-
}),
|
|
194
|
+
}), st = {
|
|
194
195
|
type: "columns",
|
|
195
196
|
label: "Columns",
|
|
196
197
|
icon: "▥",
|
|
197
198
|
isContainer: !0,
|
|
198
199
|
acceptsChildTypes: null,
|
|
199
|
-
defaultProps:
|
|
200
|
-
defaultStyle:
|
|
201
|
-
rendererComponent:
|
|
202
|
-
propertyEditorComponent:
|
|
200
|
+
defaultProps: et,
|
|
201
|
+
defaultStyle: tt,
|
|
202
|
+
rendererComponent: rt,
|
|
203
|
+
propertyEditorComponent: it,
|
|
203
204
|
propertyFields: [
|
|
204
205
|
{ key: "props.columnGap", label: "Column Gap", section: "layout", type: "number", min: 0, max: 50, step: 1, defaultValue: 10 },
|
|
205
206
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
206
207
|
],
|
|
207
|
-
toPdfmake:
|
|
208
|
+
toPdfmake: nt
|
|
208
209
|
};
|
|
209
|
-
function
|
|
210
|
+
function at() {
|
|
210
211
|
return {
|
|
211
212
|
headerRows: 1,
|
|
212
213
|
widths: ["*", "*"],
|
|
@@ -217,52 +218,52 @@ function rt() {
|
|
|
217
218
|
layout: "lightHorizontalLines"
|
|
218
219
|
};
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
+
function ct() {
|
|
221
222
|
return { fontSize: 12 };
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
+
function dt(e) {
|
|
224
225
|
const t = e.props.body, n = {
|
|
225
226
|
table: {
|
|
226
227
|
headerRows: e.props.headerRows,
|
|
227
228
|
widths: e.props.widths,
|
|
228
229
|
body: t.map(
|
|
229
|
-
(
|
|
230
|
+
(a) => a.map((o) => ({ text: o }))
|
|
230
231
|
)
|
|
231
232
|
}
|
|
232
|
-
},
|
|
233
|
-
return
|
|
233
|
+
}, l = e.props.layout;
|
|
234
|
+
return l && l !== "none" && (n.layout = l), e.style.fontSize && (n.fontSize = e.style.fontSize), e.style.color && (n.color = e.style.color), e.style.margin && (n.margin = e.style.margin), n;
|
|
234
235
|
}
|
|
235
|
-
const
|
|
236
|
+
const ut = /* @__PURE__ */ _({
|
|
236
237
|
__name: "TableRenderer",
|
|
237
238
|
props: {
|
|
238
239
|
node: {}
|
|
239
240
|
},
|
|
240
241
|
setup(e) {
|
|
241
242
|
return (t, n) => (s(), d("div", {
|
|
242
|
-
class:
|
|
243
|
-
style:
|
|
243
|
+
class: ee(["brick-el-table", "brick-el-table--" + (e.node.props.layout ?? "lightHorizontalLines")]),
|
|
244
|
+
style: N({ fontSize: (e.node.style.fontSize ?? 12) + "px", color: e.node.style.color })
|
|
244
245
|
}, [
|
|
245
246
|
m("table", null, [
|
|
246
247
|
m("thead", null, [
|
|
247
|
-
(s(!0), d(C, null,
|
|
248
|
-
key: "h" +
|
|
248
|
+
(s(!0), d(C, null, P(e.node.props.body.slice(0, e.node.props.headerRows), (l, a) => (s(), d("tr", {
|
|
249
|
+
key: "h" + a
|
|
249
250
|
}, [
|
|
250
|
-
(s(!0), d(C, null,
|
|
251
|
+
(s(!0), d(C, null, P(l, (o, u) => (s(), d("th", { key: u }, w(o), 1))), 128))
|
|
251
252
|
]))), 128))
|
|
252
253
|
]),
|
|
253
254
|
m("tbody", null, [
|
|
254
|
-
(s(!0), d(C, null,
|
|
255
|
-
key: "b" +
|
|
255
|
+
(s(!0), d(C, null, P(e.node.props.body.slice(e.node.props.headerRows), (l, a) => (s(), d("tr", {
|
|
256
|
+
key: "b" + a
|
|
256
257
|
}, [
|
|
257
|
-
(s(!0), d(C, null,
|
|
258
|
+
(s(!0), d(C, null, P(l, (o, u) => (s(), d("td", { key: u }, w(o), 1))), 128))
|
|
258
259
|
]))), 128))
|
|
259
260
|
])
|
|
260
261
|
])
|
|
261
262
|
], 6));
|
|
262
263
|
}
|
|
263
|
-
}),
|
|
264
|
-
function
|
|
265
|
-
const t =
|
|
264
|
+
}), pt = /* @__PURE__ */ x(ut, [["__scopeId", "data-v-b863b05d"]]), ge = /* @__PURE__ */ Symbol("brick-pdf-document-store");
|
|
265
|
+
function de(e) {
|
|
266
|
+
const t = ne();
|
|
266
267
|
return {
|
|
267
268
|
pageSize: e.pageSize ?? t.pageSize,
|
|
268
269
|
pageOrientation: e.pageOrientation ?? t.pageOrientation,
|
|
@@ -272,180 +273,180 @@ function ae(e) {
|
|
|
272
273
|
content: e.content ?? t.content
|
|
273
274
|
};
|
|
274
275
|
}
|
|
275
|
-
function
|
|
276
|
+
function Q(e) {
|
|
276
277
|
e.props = e.props ?? {}, e.style = e.style ?? {}, e.children = e.children ?? [];
|
|
277
|
-
for (const t of e.children)
|
|
278
|
+
for (const t of e.children) Q(t);
|
|
278
279
|
return e;
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
-
const t = e ?
|
|
282
|
-
for (const
|
|
283
|
-
const n =
|
|
284
|
-
function
|
|
285
|
-
const
|
|
286
|
-
for (let y = 0; y <
|
|
287
|
-
const g =
|
|
281
|
+
function ft(e) {
|
|
282
|
+
const t = e ? de(e) : ne();
|
|
283
|
+
for (const c of t.content) Q(c);
|
|
284
|
+
const n = ze(t);
|
|
285
|
+
function l(c, r) {
|
|
286
|
+
const i = r ?? n.content;
|
|
287
|
+
for (let y = 0; y < i.length; y++) {
|
|
288
|
+
const g = i[y];
|
|
288
289
|
if (g) {
|
|
289
|
-
if (g.id ===
|
|
290
|
-
return { node: g, parent:
|
|
290
|
+
if (g.id === c)
|
|
291
|
+
return { node: g, parent: i, index: y };
|
|
291
292
|
if (g.children.length > 0) {
|
|
292
|
-
const f =
|
|
293
|
+
const f = l(c, g.children);
|
|
293
294
|
if (f) return f;
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
297
|
}
|
|
297
298
|
return null;
|
|
298
299
|
}
|
|
299
|
-
function c
|
|
300
|
-
n.content.splice(0, n.content.length, ...
|
|
300
|
+
function a(c) {
|
|
301
|
+
n.content.splice(0, n.content.length, ...c);
|
|
301
302
|
}
|
|
302
303
|
function o() {
|
|
303
|
-
return JSON.parse(JSON.stringify(
|
|
304
|
+
return JSON.parse(JSON.stringify(J(n.content)));
|
|
304
305
|
}
|
|
305
|
-
function u(
|
|
306
|
-
const r =
|
|
307
|
-
for (const
|
|
306
|
+
function u(c) {
|
|
307
|
+
const r = de(c);
|
|
308
|
+
for (const i of r.content) Q(i);
|
|
308
309
|
n.pageSize = r.pageSize, n.pageOrientation = r.pageOrientation, n.pageMargins = r.pageMargins, n.defaultStyle = r.defaultStyle, n.styles = r.styles, n.content.splice(0, n.content.length, ...r.content);
|
|
309
310
|
}
|
|
310
311
|
function p() {
|
|
311
|
-
return JSON.parse(JSON.stringify(
|
|
312
|
+
return JSON.parse(JSON.stringify(J(n)));
|
|
312
313
|
}
|
|
313
|
-
return { document: n, findNodeById:
|
|
314
|
+
return { document: n, findNodeById: l, replaceContent: a, snapshotContent: o, loadDocument: u, exportDocument: p };
|
|
314
315
|
}
|
|
315
|
-
function
|
|
316
|
-
D(
|
|
316
|
+
function mt(e) {
|
|
317
|
+
D(ge, e);
|
|
317
318
|
}
|
|
318
|
-
function
|
|
319
|
-
const e = L(
|
|
319
|
+
function oe() {
|
|
320
|
+
const e = L(ge);
|
|
320
321
|
if (!e)
|
|
321
322
|
throw new Error("useDocumentStore() requires a BrickPdf ancestor component");
|
|
322
323
|
return e;
|
|
323
324
|
}
|
|
324
|
-
const
|
|
325
|
-
function
|
|
326
|
-
const t =
|
|
327
|
-
function
|
|
325
|
+
const be = /* @__PURE__ */ Symbol("brick-pdf-selection");
|
|
326
|
+
function yt(e) {
|
|
327
|
+
const t = E(null), n = I(() => t.value ? e.findNodeById(t.value)?.node ?? null : null);
|
|
328
|
+
function l(o) {
|
|
328
329
|
t.value = o;
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
+
function a() {
|
|
331
332
|
t.value = null;
|
|
332
333
|
}
|
|
333
|
-
return { selectedId: t, selectedNode: n, select:
|
|
334
|
+
return { selectedId: t, selectedNode: n, select: l, deselect: a };
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
D(
|
|
336
|
+
function gt(e) {
|
|
337
|
+
D(be, e);
|
|
337
338
|
}
|
|
338
|
-
function
|
|
339
|
-
const e = L(
|
|
339
|
+
function W() {
|
|
340
|
+
const e = L(be);
|
|
340
341
|
if (!e)
|
|
341
342
|
throw new Error("useSelection() requires a BrickPdf ancestor component");
|
|
342
343
|
return e;
|
|
343
344
|
}
|
|
344
|
-
const
|
|
345
|
-
let
|
|
346
|
-
function
|
|
347
|
-
return `el-${Date.now()}-${++
|
|
345
|
+
const ve = /* @__PURE__ */ Symbol("brick-pdf-element-actions");
|
|
346
|
+
let bt = 0;
|
|
347
|
+
function he() {
|
|
348
|
+
return `el-${Date.now()}-${++bt}`;
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function _e(e) {
|
|
350
351
|
return {
|
|
351
352
|
...e,
|
|
352
|
-
id:
|
|
353
|
+
id: he(),
|
|
353
354
|
props: structuredClone(e.props),
|
|
354
355
|
style: structuredClone(e.style),
|
|
355
|
-
children: e.children.map(
|
|
356
|
+
children: e.children.map(_e)
|
|
356
357
|
};
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
-
function n(
|
|
360
|
-
const y =
|
|
359
|
+
function vt(e, t) {
|
|
360
|
+
function n(c, r, i) {
|
|
361
|
+
const y = U(c);
|
|
361
362
|
if (!y) return null;
|
|
362
363
|
t.record();
|
|
363
364
|
const g = {
|
|
364
|
-
id:
|
|
365
|
-
type:
|
|
365
|
+
id: he(),
|
|
366
|
+
type: c,
|
|
366
367
|
props: y.defaultProps(),
|
|
367
368
|
style: y.defaultStyle(),
|
|
368
369
|
children: []
|
|
369
370
|
}, f = r ? e.findNodeById(r)?.node.children : e.document.content;
|
|
370
371
|
if (!f) return null;
|
|
371
|
-
const b =
|
|
372
|
+
const b = i ?? f.length;
|
|
372
373
|
return f.splice(b, 0, g), g;
|
|
373
374
|
}
|
|
374
|
-
function
|
|
375
|
-
const r = e.findNodeById(
|
|
375
|
+
function l(c) {
|
|
376
|
+
const r = e.findNodeById(c);
|
|
376
377
|
r && (t.record(), r.parent.splice(r.index, 1));
|
|
377
378
|
}
|
|
378
|
-
function c
|
|
379
|
-
const y = e.findNodeById(
|
|
379
|
+
function a(c, r, i) {
|
|
380
|
+
const y = e.findNodeById(c);
|
|
380
381
|
if (!y) return;
|
|
381
382
|
t.record();
|
|
382
383
|
const g = y.parent.splice(y.index, 1)[0];
|
|
383
384
|
if (!g) return;
|
|
384
385
|
const f = r ? e.findNodeById(r)?.node.children : e.document.content;
|
|
385
|
-
f && f.splice(
|
|
386
|
+
f && f.splice(i, 0, g);
|
|
386
387
|
}
|
|
387
|
-
function o(
|
|
388
|
-
const r = e.findNodeById(
|
|
388
|
+
function o(c) {
|
|
389
|
+
const r = e.findNodeById(c);
|
|
389
390
|
if (!r) return null;
|
|
390
391
|
t.record();
|
|
391
|
-
const
|
|
392
|
-
return r.parent.splice(r.index + 1, 0,
|
|
392
|
+
const i = _e(r.node);
|
|
393
|
+
return r.parent.splice(r.index + 1, 0, i), i;
|
|
393
394
|
}
|
|
394
|
-
function u(
|
|
395
|
-
const
|
|
396
|
-
|
|
395
|
+
function u(c, r) {
|
|
396
|
+
const i = e.findNodeById(c);
|
|
397
|
+
i && (t.record(), Object.assign(i.node.props, r));
|
|
397
398
|
}
|
|
398
|
-
function p(
|
|
399
|
-
const
|
|
400
|
-
|
|
399
|
+
function p(c, r) {
|
|
400
|
+
const i = e.findNodeById(c);
|
|
401
|
+
i && (t.record(), Object.assign(i.node.style, r));
|
|
401
402
|
}
|
|
402
|
-
return { addElement: n, removeElement:
|
|
403
|
+
return { addElement: n, removeElement: l, moveElement: a, duplicateElement: o, updateProps: u, updateStyle: p };
|
|
403
404
|
}
|
|
404
|
-
function
|
|
405
|
-
D(
|
|
405
|
+
function ht(e) {
|
|
406
|
+
D(ve, e);
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
-
const e = L(
|
|
408
|
+
function q() {
|
|
409
|
+
const e = L(ve);
|
|
409
410
|
if (!e)
|
|
410
411
|
throw new Error("useElementActions() requires a BrickPdf ancestor component");
|
|
411
412
|
return e;
|
|
412
413
|
}
|
|
413
|
-
const
|
|
414
|
-
function
|
|
415
|
-
const t =
|
|
416
|
-
let
|
|
417
|
-
const
|
|
414
|
+
const ke = /* @__PURE__ */ Symbol("brick-pdf-history"), _t = 50;
|
|
415
|
+
function kt(e) {
|
|
416
|
+
const t = E([]), n = E([]);
|
|
417
|
+
let l = 0;
|
|
418
|
+
const a = I(() => t.value.length > 0), o = I(() => n.value.length > 0);
|
|
418
419
|
function u() {
|
|
419
420
|
const r = Date.now();
|
|
420
|
-
if (r -
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
t.value.push(
|
|
421
|
+
if (r - l < 100) return;
|
|
422
|
+
l = r;
|
|
423
|
+
const i = e.snapshotContent();
|
|
424
|
+
t.value.push(i), t.value.length > _t && t.value.shift(), n.value = [];
|
|
424
425
|
}
|
|
425
426
|
function p() {
|
|
426
427
|
const r = t.value.pop();
|
|
427
428
|
r && (n.value.push(e.snapshotContent()), e.replaceContent(r));
|
|
428
429
|
}
|
|
429
|
-
function
|
|
430
|
+
function c() {
|
|
430
431
|
const r = n.value.pop();
|
|
431
432
|
r && (t.value.push(e.snapshotContent()), e.replaceContent(r));
|
|
432
433
|
}
|
|
433
|
-
return { canUndo:
|
|
434
|
+
return { canUndo: a, canRedo: o, record: u, undo: p, redo: c };
|
|
434
435
|
}
|
|
435
|
-
function
|
|
436
|
-
D(
|
|
436
|
+
function St(e) {
|
|
437
|
+
D(ke, e);
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
-
const e = L(
|
|
439
|
+
function xt() {
|
|
440
|
+
const e = L(ke);
|
|
440
441
|
if (!e)
|
|
441
442
|
throw new Error("useHistory() requires a BrickPdf ancestor component");
|
|
442
443
|
return e;
|
|
443
444
|
}
|
|
444
|
-
const
|
|
445
|
-
function
|
|
446
|
-
const n =
|
|
447
|
-
function
|
|
448
|
-
return
|
|
445
|
+
const Se = /* @__PURE__ */ Symbol("brick-pdf-drag-drop");
|
|
446
|
+
function Ct(e, t) {
|
|
447
|
+
const n = E(!1);
|
|
448
|
+
function l(o) {
|
|
449
|
+
return ce.create(o, {
|
|
449
450
|
group: { name: "brick-elements", pull: "clone", put: !1 },
|
|
450
451
|
sort: !1,
|
|
451
452
|
animation: 150,
|
|
@@ -457,8 +458,8 @@ function _t(e, t) {
|
|
|
457
458
|
}
|
|
458
459
|
});
|
|
459
460
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
461
|
+
function a(o, u) {
|
|
462
|
+
return ce.create(o, {
|
|
462
463
|
group: { name: "brick-elements", put: !0 },
|
|
463
464
|
animation: 150,
|
|
464
465
|
fallbackOnBody: !0,
|
|
@@ -469,139 +470,197 @@ function _t(e, t) {
|
|
|
469
470
|
n.value = !0;
|
|
470
471
|
},
|
|
471
472
|
onAdd(p) {
|
|
472
|
-
const
|
|
473
|
+
const c = p.item, r = c.dataset.elementId, i = c.dataset.elementType, y = (g) => {
|
|
473
474
|
if (!u || !g) return !1;
|
|
474
475
|
const f = e.findNodeById(u);
|
|
475
476
|
if (!f) return !1;
|
|
476
|
-
const b =
|
|
477
|
+
const b = U(f.node.type);
|
|
477
478
|
return !!(b?.acceptsChildTypes && !b.acceptsChildTypes.includes(g));
|
|
478
479
|
};
|
|
479
480
|
if (r) {
|
|
480
|
-
if (
|
|
481
|
+
if (c.parentNode?.removeChild(c), y(i)) return;
|
|
481
482
|
t.moveElement(r, u, p.newIndex ?? 0);
|
|
482
483
|
return;
|
|
483
484
|
}
|
|
484
|
-
|
|
485
|
+
i && (c.parentNode?.removeChild(c), !y(i) && t.addElement(i, u, p.newIndex));
|
|
485
486
|
},
|
|
486
487
|
onEnd(p) {
|
|
487
488
|
if (n.value = !1, p.from === p.to && p.oldIndex !== void 0 && p.newIndex !== void 0 && p.oldIndex !== p.newIndex && p.item.dataset.elementId) {
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
490
|
-
const r =
|
|
491
|
-
r &&
|
|
489
|
+
const c = u ? e.findNodeById(u)?.node.children : e.document.content;
|
|
490
|
+
if (!c) return;
|
|
491
|
+
const r = c.splice(p.oldIndex, 1)[0];
|
|
492
|
+
r && c.splice(p.newIndex, 0, r);
|
|
492
493
|
}
|
|
493
494
|
}
|
|
494
495
|
});
|
|
495
496
|
}
|
|
496
|
-
return { initToolbar:
|
|
497
|
+
return { initToolbar: l, initContainer: a, isDragging: n };
|
|
497
498
|
}
|
|
498
|
-
function
|
|
499
|
-
D(
|
|
499
|
+
function wt(e) {
|
|
500
|
+
D(Se, e);
|
|
500
501
|
}
|
|
501
|
-
function
|
|
502
|
-
const e = L(
|
|
502
|
+
function xe() {
|
|
503
|
+
const e = L(Se);
|
|
503
504
|
if (!e)
|
|
504
505
|
throw new Error("useDragDrop() requires a BrickPdf ancestor component");
|
|
505
506
|
return e;
|
|
506
507
|
}
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
const ue = {
|
|
509
|
+
regular: "https://cdn.jsdelivr.net/npm/@expo-google-fonts/noto-sans-jp/NotoSansJP_400Regular.ttf",
|
|
510
|
+
bold: "https://cdn.jsdelivr.net/npm/@expo-google-fonts/noto-sans-jp/NotoSansJP_700Bold.ttf"
|
|
511
|
+
}, A = {
|
|
512
|
+
regular: "NotoSansJP-Regular.ttf",
|
|
513
|
+
bold: "NotoSansJP-Bold.ttf"
|
|
514
|
+
}, Pt = "NotoSansJP";
|
|
515
|
+
function Et(e) {
|
|
516
|
+
const t = new Uint8Array(e), n = 32768;
|
|
517
|
+
let l = "";
|
|
518
|
+
for (let a = 0; a < t.length; a += n) {
|
|
519
|
+
const o = t.subarray(a, a + n);
|
|
520
|
+
l += String.fromCharCode.apply(null, Array.from(o));
|
|
521
|
+
}
|
|
522
|
+
return btoa(l);
|
|
523
|
+
}
|
|
524
|
+
async function pe(e) {
|
|
525
|
+
const t = await fetch(e);
|
|
526
|
+
if (!t.ok)
|
|
527
|
+
throw new Error(`Failed to load font ${e}: HTTP ${t.status}`);
|
|
528
|
+
const n = await t.arrayBuffer();
|
|
529
|
+
return Et(n);
|
|
530
|
+
}
|
|
531
|
+
let F = null;
|
|
532
|
+
function It() {
|
|
533
|
+
return F || (F = (async () => {
|
|
534
|
+
const [e, t] = await Promise.all([
|
|
535
|
+
pe(ue.regular),
|
|
536
|
+
pe(ue.bold)
|
|
537
|
+
]);
|
|
538
|
+
return {
|
|
539
|
+
vfs: {
|
|
540
|
+
[A.regular]: e,
|
|
541
|
+
[A.bold]: t
|
|
542
|
+
},
|
|
543
|
+
fonts: {
|
|
544
|
+
[Pt]: {
|
|
545
|
+
normal: A.regular,
|
|
546
|
+
bold: A.bold,
|
|
547
|
+
italics: A.regular,
|
|
548
|
+
bolditalics: A.bold
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
})().catch((e) => {
|
|
553
|
+
throw F = null, e;
|
|
554
|
+
}), F);
|
|
555
|
+
}
|
|
556
|
+
const Ce = /* @__PURE__ */ Symbol("brick-pdf-export");
|
|
557
|
+
function $t(e) {
|
|
558
|
+
return e.map(we);
|
|
510
559
|
}
|
|
511
|
-
function
|
|
512
|
-
const t =
|
|
513
|
-
return t ? t.toPdfmake(e,
|
|
560
|
+
function we(e) {
|
|
561
|
+
const t = U(e.type);
|
|
562
|
+
return t ? t.toPdfmake(e, $t) : { text: `[Unknown: ${e.type}]` };
|
|
514
563
|
}
|
|
515
|
-
function
|
|
564
|
+
function Rt(e) {
|
|
516
565
|
function t() {
|
|
517
566
|
const o = e.document;
|
|
518
567
|
return {
|
|
519
568
|
pageSize: o.pageSize,
|
|
520
569
|
pageOrientation: o.pageOrientation,
|
|
521
570
|
pageMargins: o.pageMargins,
|
|
522
|
-
defaultStyle: JSON.parse(JSON.stringify(
|
|
523
|
-
styles: JSON.parse(JSON.stringify(
|
|
524
|
-
content: o.content.map(
|
|
571
|
+
defaultStyle: JSON.parse(JSON.stringify(J(o.defaultStyle))),
|
|
572
|
+
styles: JSON.parse(JSON.stringify(J(o.styles))),
|
|
573
|
+
content: o.content.map(we)
|
|
525
574
|
};
|
|
526
575
|
}
|
|
527
576
|
async function n() {
|
|
528
|
-
const o = await import("pdfmake/build/pdfmake"), u = await import("pdfmake/build/vfs_fonts"), p = o.default || o,
|
|
529
|
-
|
|
577
|
+
const o = await import("pdfmake/build/pdfmake"), u = await import("pdfmake/build/vfs_fonts"), p = o.default || o, c = u.pdfMake;
|
|
578
|
+
c && c.vfs ? p.vfs = c.vfs : u.default && (p.vfs = u.default);
|
|
579
|
+
const r = await It();
|
|
580
|
+
return p.vfs = { ...p.vfs, ...r.vfs }, p.fonts = {
|
|
581
|
+
Roboto: {
|
|
582
|
+
normal: "Roboto-Regular.ttf",
|
|
583
|
+
bold: "Roboto-Medium.ttf",
|
|
584
|
+
italics: "Roboto-Italic.ttf",
|
|
585
|
+
bolditalics: "Roboto-MediumItalic.ttf"
|
|
586
|
+
},
|
|
587
|
+
...r.fonts
|
|
588
|
+
}, p;
|
|
530
589
|
}
|
|
531
|
-
function
|
|
590
|
+
function l(o) {
|
|
532
591
|
const u = t();
|
|
533
592
|
n().then((p) => {
|
|
534
593
|
p.createPdf(u).download(o ?? "document.pdf");
|
|
535
594
|
});
|
|
536
595
|
}
|
|
537
|
-
function
|
|
596
|
+
function a() {
|
|
538
597
|
const o = t();
|
|
539
598
|
n().then((u) => {
|
|
540
599
|
u.createPdf(o).open();
|
|
541
600
|
});
|
|
542
601
|
}
|
|
543
|
-
return { toDocumentDefinition: t, exportPdf:
|
|
602
|
+
return { toDocumentDefinition: t, exportPdf: l, openPdf: a };
|
|
544
603
|
}
|
|
545
|
-
function
|
|
546
|
-
D(
|
|
604
|
+
function Nt(e) {
|
|
605
|
+
D(Ce, e);
|
|
547
606
|
}
|
|
548
|
-
function
|
|
549
|
-
const e = L(
|
|
607
|
+
function zt() {
|
|
608
|
+
const e = L(Ce);
|
|
550
609
|
if (!e)
|
|
551
610
|
throw new Error("usePdfExport() requires a BrickPdf ancestor component");
|
|
552
611
|
return e;
|
|
553
612
|
}
|
|
554
|
-
const
|
|
555
|
-
let
|
|
556
|
-
function
|
|
557
|
-
return `el-${Date.now()}-${++
|
|
613
|
+
const Pe = /* @__PURE__ */ Symbol("brick-pdf-clipboard");
|
|
614
|
+
let Tt = 0;
|
|
615
|
+
function Dt() {
|
|
616
|
+
return `el-${Date.now()}-${++Tt}`;
|
|
558
617
|
}
|
|
559
|
-
function
|
|
618
|
+
function Ee(e) {
|
|
560
619
|
return {
|
|
561
620
|
...e,
|
|
562
|
-
id:
|
|
621
|
+
id: Dt(),
|
|
563
622
|
props: structuredClone(e.props),
|
|
564
623
|
style: structuredClone(e.style),
|
|
565
|
-
children: e.children.map(
|
|
624
|
+
children: e.children.map(Ee)
|
|
566
625
|
};
|
|
567
626
|
}
|
|
568
|
-
function
|
|
569
|
-
const n =
|
|
627
|
+
function Lt(e, t) {
|
|
628
|
+
const n = E(null), l = E(!1), a = E(null), o = E(!1);
|
|
570
629
|
function u(r) {
|
|
571
|
-
const
|
|
572
|
-
|
|
630
|
+
const i = e.findNodeById(r);
|
|
631
|
+
i && (n.value = structuredClone(i.node), l.value = !1, a.value = null, o.value = !0);
|
|
573
632
|
}
|
|
574
633
|
function p(r) {
|
|
575
|
-
const
|
|
576
|
-
|
|
634
|
+
const i = e.findNodeById(r);
|
|
635
|
+
i && (n.value = structuredClone(i.node), l.value = !0, a.value = r, o.value = !0);
|
|
577
636
|
}
|
|
578
|
-
function
|
|
637
|
+
function c(r) {
|
|
579
638
|
if (!n.value) return;
|
|
580
|
-
|
|
581
|
-
const
|
|
582
|
-
y && (y.push(
|
|
639
|
+
l.value && a.value && (t.removeElement(a.value), l.value = !1, a.value = null);
|
|
640
|
+
const i = Ee(n.value), y = r ? e.findNodeById(r)?.node.children : e.document.content;
|
|
641
|
+
y && (y.push(i), l.value && (n.value = null, o.value = !1));
|
|
583
642
|
}
|
|
584
|
-
return { hasClipboard: o, copy: u, cut: p, paste:
|
|
643
|
+
return { hasClipboard: o, copy: u, cut: p, paste: c };
|
|
585
644
|
}
|
|
586
|
-
function
|
|
587
|
-
D(
|
|
645
|
+
function Mt(e) {
|
|
646
|
+
D(Pe, e);
|
|
588
647
|
}
|
|
589
|
-
function
|
|
590
|
-
const e = L(
|
|
648
|
+
function lr() {
|
|
649
|
+
const e = L(Pe);
|
|
591
650
|
if (!e)
|
|
592
651
|
throw new Error("useClipboard() requires a BrickPdf ancestor component");
|
|
593
652
|
return e;
|
|
594
653
|
}
|
|
595
|
-
const
|
|
596
|
-
function
|
|
597
|
-
const t =
|
|
598
|
-
function n(
|
|
654
|
+
const Ie = /* @__PURE__ */ Symbol("brick-pdf-resize");
|
|
655
|
+
function Bt(e) {
|
|
656
|
+
const t = E(!1);
|
|
657
|
+
function n(l, a, o, u) {
|
|
599
658
|
t.value = !0;
|
|
600
|
-
const p = u.clientX,
|
|
659
|
+
const p = u.clientX, c = u.clientY, r = o.width, i = o.height;
|
|
601
660
|
function y(f) {
|
|
602
|
-
const b = f.clientX - p, v = f.clientY -
|
|
603
|
-
let h = r, S =
|
|
604
|
-
|
|
661
|
+
const b = f.clientX - p, v = f.clientY - c;
|
|
662
|
+
let h = r, S = i;
|
|
663
|
+
a.includes("e") && (h = r + b), a.includes("w") && (h = r - b), a.includes("s") && (S = i + v), a.includes("n") && (S = i - v), h = Math.max(20, h), S = Math.max(20, S), e.updateStyle(l, {
|
|
605
664
|
width: Math.round(h),
|
|
606
665
|
height: Math.round(S)
|
|
607
666
|
});
|
|
@@ -613,55 +672,55 @@ function zt(e) {
|
|
|
613
672
|
}
|
|
614
673
|
return { isResizing: t, startResize: n };
|
|
615
674
|
}
|
|
616
|
-
function
|
|
617
|
-
D(
|
|
675
|
+
function Ot(e) {
|
|
676
|
+
D(Ie, e);
|
|
618
677
|
}
|
|
619
|
-
function
|
|
620
|
-
const e = L(
|
|
678
|
+
function ir() {
|
|
679
|
+
const e = L(Ie);
|
|
621
680
|
if (!e)
|
|
622
681
|
throw new Error("useResize() requires a BrickPdf ancestor component");
|
|
623
682
|
return e;
|
|
624
683
|
}
|
|
625
|
-
const
|
|
684
|
+
const At = { class: "brick-table-editor" }, Vt = { class: "brick-table-editor__grid" }, Ht = ["onClick"], Ft = { class: "brick-table-editor__row-header" }, Jt = ["onClick"], Ut = ["value", "onInput"], Wt = /* @__PURE__ */ _({
|
|
626
685
|
__name: "TablePropertyEditor",
|
|
627
686
|
props: {
|
|
628
687
|
node: {}
|
|
629
688
|
},
|
|
630
689
|
setup(e) {
|
|
631
|
-
const t = e, n =
|
|
632
|
-
function
|
|
690
|
+
const t = e, n = q();
|
|
691
|
+
function l() {
|
|
633
692
|
return t.node.props.body ?? [];
|
|
634
693
|
}
|
|
635
|
-
function
|
|
694
|
+
function a() {
|
|
636
695
|
return t.node.props.widths ?? [];
|
|
637
696
|
}
|
|
638
|
-
function o(
|
|
639
|
-
const f =
|
|
640
|
-
f[
|
|
697
|
+
function o(i, y, g) {
|
|
698
|
+
const f = l().map((b) => [...b]);
|
|
699
|
+
f[i][y] = g, n.updateProps(t.node.id, { body: f });
|
|
641
700
|
}
|
|
642
701
|
function u() {
|
|
643
|
-
const
|
|
644
|
-
|
|
702
|
+
const i = l().map((g) => [...g]), y = i[0]?.length ?? 2;
|
|
703
|
+
i.push(Array(y).fill("")), n.updateProps(t.node.id, { body: i });
|
|
645
704
|
}
|
|
646
|
-
function p(
|
|
647
|
-
const y =
|
|
705
|
+
function p(i) {
|
|
706
|
+
const y = l().map((f) => [...f]);
|
|
648
707
|
if (y.length <= 1) return;
|
|
649
|
-
y.splice(
|
|
708
|
+
y.splice(i, 1), t.node.props.headerRows > y.length ? n.updateProps(t.node.id, { body: y, headerRows: y.length }) : n.updateProps(t.node.id, { body: y });
|
|
650
709
|
}
|
|
651
|
-
function
|
|
652
|
-
const
|
|
653
|
-
n.updateProps(t.node.id, { body:
|
|
710
|
+
function c() {
|
|
711
|
+
const i = l().map((g) => [...g, ""]), y = [...a(), "*"];
|
|
712
|
+
n.updateProps(t.node.id, { body: i, widths: y });
|
|
654
713
|
}
|
|
655
|
-
function r(
|
|
656
|
-
const y =
|
|
714
|
+
function r(i) {
|
|
715
|
+
const y = l().map((f) => {
|
|
657
716
|
const b = [...f];
|
|
658
|
-
return b.splice(
|
|
717
|
+
return b.splice(i, 1), b;
|
|
659
718
|
});
|
|
660
719
|
if ((y[0]?.length ?? 0) < 1) return;
|
|
661
|
-
const g = [...
|
|
662
|
-
g.splice(
|
|
720
|
+
const g = [...a()];
|
|
721
|
+
g.splice(i, 1), n.updateProps(t.node.id, { body: y, widths: g });
|
|
663
722
|
}
|
|
664
|
-
return (
|
|
723
|
+
return (i, y) => (s(), d("div", At, [
|
|
665
724
|
m("div", { class: "brick-table-editor__actions" }, [
|
|
666
725
|
m("button", {
|
|
667
726
|
class: "brick-table-editor__btn",
|
|
@@ -669,46 +728,46 @@ const Tt = { class: "brick-table-editor" }, Nt = { class: "brick-table-editor__g
|
|
|
669
728
|
}, "+ Row"),
|
|
670
729
|
m("button", {
|
|
671
730
|
class: "brick-table-editor__btn",
|
|
672
|
-
onClick:
|
|
731
|
+
onClick: c
|
|
673
732
|
}, "+ Column")
|
|
674
733
|
]),
|
|
675
|
-
m("div",
|
|
734
|
+
m("div", Vt, [
|
|
676
735
|
m("table", null, [
|
|
677
736
|
m("thead", null, [
|
|
678
737
|
m("tr", null, [
|
|
679
738
|
y[0] || (y[0] = m("th", { class: "brick-table-editor__corner" }, null, -1)),
|
|
680
|
-
(s(!0), d(C, null,
|
|
739
|
+
(s(!0), d(C, null, P(l()[0] ?? [], (g, f) => (s(), d("th", {
|
|
681
740
|
key: f,
|
|
682
741
|
class: "brick-table-editor__col-header"
|
|
683
742
|
}, [
|
|
684
|
-
|
|
685
|
-
(
|
|
743
|
+
ie(" Col " + w(f + 1) + " ", 1),
|
|
744
|
+
(l()[0]?.length ?? 0) > 1 ? (s(), d("button", {
|
|
686
745
|
key: 0,
|
|
687
746
|
class: "brick-table-editor__remove-btn",
|
|
688
747
|
title: "Remove column",
|
|
689
748
|
onClick: (b) => r(f)
|
|
690
|
-
}, "x", 8,
|
|
749
|
+
}, "x", 8, Ht)) : $("", !0)
|
|
691
750
|
]))), 128))
|
|
692
751
|
])
|
|
693
752
|
]),
|
|
694
753
|
m("tbody", null, [
|
|
695
|
-
(s(!0), d(C, null,
|
|
696
|
-
m("td",
|
|
697
|
-
|
|
698
|
-
|
|
754
|
+
(s(!0), d(C, null, P(l(), (g, f) => (s(), d("tr", { key: f }, [
|
|
755
|
+
m("td", Ft, [
|
|
756
|
+
ie(w(f + 1) + " ", 1),
|
|
757
|
+
l().length > 1 ? (s(), d("button", {
|
|
699
758
|
key: 0,
|
|
700
759
|
class: "brick-table-editor__remove-btn",
|
|
701
760
|
title: "Remove row",
|
|
702
761
|
onClick: (b) => p(f)
|
|
703
|
-
}, "x", 8,
|
|
762
|
+
}, "x", 8, Jt)) : $("", !0)
|
|
704
763
|
]),
|
|
705
|
-
(s(!0), d(C, null,
|
|
764
|
+
(s(!0), d(C, null, P(g, (b, v) => (s(), d("td", { key: v }, [
|
|
706
765
|
m("input", {
|
|
707
766
|
class: "brick-table-editor__cell",
|
|
708
767
|
type: "text",
|
|
709
768
|
value: b,
|
|
710
769
|
onInput: (h) => o(f, v, h.target.value)
|
|
711
|
-
}, null, 40,
|
|
770
|
+
}, null, 40, Ut)
|
|
712
771
|
]))), 128))
|
|
713
772
|
]))), 128))
|
|
714
773
|
])
|
|
@@ -716,15 +775,15 @@ const Tt = { class: "brick-table-editor" }, Nt = { class: "brick-table-editor__g
|
|
|
716
775
|
])
|
|
717
776
|
]));
|
|
718
777
|
}
|
|
719
|
-
}),
|
|
778
|
+
}), jt = /* @__PURE__ */ x(Wt, [["__scopeId", "data-v-4895020c"]]), Yt = {
|
|
720
779
|
type: "table",
|
|
721
780
|
label: "Table",
|
|
722
781
|
icon: "▦",
|
|
723
782
|
isContainer: !1,
|
|
724
|
-
defaultProps:
|
|
725
|
-
defaultStyle:
|
|
726
|
-
rendererComponent:
|
|
727
|
-
propertyEditorComponent:
|
|
783
|
+
defaultProps: at,
|
|
784
|
+
defaultStyle: ct,
|
|
785
|
+
rendererComponent: pt,
|
|
786
|
+
propertyEditorComponent: jt,
|
|
728
787
|
propertyFields: [
|
|
729
788
|
{ key: "props.headerRows", label: "Header Rows", section: "content", type: "number", min: 0, max: 10, step: 1, defaultValue: 1 },
|
|
730
789
|
{ key: "props.layout", label: "Border Style", section: "style", type: "select", options: [
|
|
@@ -738,59 +797,59 @@ const Tt = { class: "brick-table-editor" }, Nt = { class: "brick-table-editor__g
|
|
|
738
797
|
{ key: "style.color", label: "Text Color", section: "style", type: "color", defaultValue: "#000000" },
|
|
739
798
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
740
799
|
],
|
|
741
|
-
toPdfmake:
|
|
800
|
+
toPdfmake: dt
|
|
742
801
|
};
|
|
743
|
-
function
|
|
802
|
+
function qt() {
|
|
744
803
|
return { src: "", width: 200, height: 150, fit: null };
|
|
745
804
|
}
|
|
746
|
-
function
|
|
805
|
+
function Gt() {
|
|
747
806
|
return {};
|
|
748
807
|
}
|
|
749
|
-
function
|
|
808
|
+
function Xt(e) {
|
|
750
809
|
const t = {
|
|
751
810
|
image: e.props.src
|
|
752
811
|
};
|
|
753
812
|
return e.props.width && (t.width = e.props.width), e.props.height && (t.height = e.props.height), e.props.fit && (t.fit = e.props.fit), e.style.margin && (t.margin = e.style.margin), e.style.alignment && (t.alignment = e.style.alignment), e.style.opacity !== void 0 && (t.opacity = e.style.opacity), t;
|
|
754
813
|
}
|
|
755
|
-
const
|
|
814
|
+
const Kt = { class: "brick-el-image" }, Qt = ["src"], Zt = {
|
|
756
815
|
key: 1,
|
|
757
816
|
class: "brick-el-image__placeholder"
|
|
758
|
-
},
|
|
817
|
+
}, en = /* @__PURE__ */ _({
|
|
759
818
|
__name: "ImageRenderer",
|
|
760
819
|
props: {
|
|
761
820
|
node: {}
|
|
762
821
|
},
|
|
763
822
|
setup(e) {
|
|
764
|
-
return (t, n) => (s(), d("div",
|
|
823
|
+
return (t, n) => (s(), d("div", Kt, [
|
|
765
824
|
e.node.props.src ? (s(), d("img", {
|
|
766
825
|
key: 0,
|
|
767
826
|
src: e.node.props.src,
|
|
768
|
-
style:
|
|
827
|
+
style: N({
|
|
769
828
|
width: e.node.props.width + "px",
|
|
770
829
|
height: e.node.props.height + "px",
|
|
771
830
|
objectFit: "contain",
|
|
772
831
|
opacity: e.node.style.opacity
|
|
773
832
|
})
|
|
774
|
-
}, null, 12,
|
|
833
|
+
}, null, 12, Qt)) : (s(), d("div", Zt, " No image selected "))
|
|
775
834
|
]));
|
|
776
835
|
}
|
|
777
|
-
}),
|
|
836
|
+
}), tn = /* @__PURE__ */ x(en, [["__scopeId", "data-v-38184258"]]), nn = { class: "brick-image-editor" }, on = /* @__PURE__ */ _({
|
|
778
837
|
__name: "ImagePropertyEditor",
|
|
779
838
|
props: {
|
|
780
839
|
node: {}
|
|
781
840
|
},
|
|
782
841
|
setup(e) {
|
|
783
|
-
return (t, n) => (s(), d("div",
|
|
842
|
+
return (t, n) => (s(), d("div", nn));
|
|
784
843
|
}
|
|
785
|
-
}),
|
|
844
|
+
}), rn = {
|
|
786
845
|
type: "image",
|
|
787
846
|
label: "Image",
|
|
788
847
|
icon: "🖼",
|
|
789
848
|
isContainer: !1,
|
|
790
|
-
defaultProps:
|
|
791
|
-
defaultStyle:
|
|
792
|
-
rendererComponent:
|
|
793
|
-
propertyEditorComponent:
|
|
849
|
+
defaultProps: qt,
|
|
850
|
+
defaultStyle: Gt,
|
|
851
|
+
rendererComponent: tn,
|
|
852
|
+
propertyEditorComponent: on,
|
|
794
853
|
propertyFields: [
|
|
795
854
|
{ key: "props.src", label: "Image (Base64)", section: "content", type: "file" },
|
|
796
855
|
{ key: "props.width", label: "Width", section: "layout", type: "number", min: 10, max: 1e3, step: 10, defaultValue: 200 },
|
|
@@ -803,19 +862,19 @@ const Wt = { class: "brick-el-image" }, Jt = ["src"], Yt = {
|
|
|
803
862
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] },
|
|
804
863
|
{ key: "style.opacity", label: "Opacity", section: "advanced", type: "slider", min: 0, max: 1, step: 0.1, defaultValue: 1 }
|
|
805
864
|
],
|
|
806
|
-
toPdfmake:
|
|
865
|
+
toPdfmake: Xt
|
|
807
866
|
};
|
|
808
|
-
function
|
|
867
|
+
function ln() {
|
|
809
868
|
return { ordered: !1, items: ["Item 1", "Item 2", "Item 3"] };
|
|
810
869
|
}
|
|
811
|
-
function
|
|
870
|
+
function sn() {
|
|
812
871
|
return { fontSize: 12 };
|
|
813
872
|
}
|
|
814
|
-
function
|
|
815
|
-
const t = e.props.items,
|
|
816
|
-
return e.style.fontSize && (
|
|
873
|
+
function an(e) {
|
|
874
|
+
const t = e.props.items, l = e.props.ordered ? { ol: t } : { ul: t };
|
|
875
|
+
return e.style.fontSize && (l.fontSize = e.style.fontSize), e.style.color && (l.color = e.style.color), e.style.margin && (l.margin = e.style.margin), l;
|
|
817
876
|
}
|
|
818
|
-
const
|
|
877
|
+
const cn = /* @__PURE__ */ _({
|
|
819
878
|
__name: "ListRenderer",
|
|
820
879
|
props: {
|
|
821
880
|
node: {}
|
|
@@ -823,33 +882,33 @@ const tn = /* @__PURE__ */ _({
|
|
|
823
882
|
setup(e) {
|
|
824
883
|
return (t, n) => (s(), d("div", {
|
|
825
884
|
class: "brick-el-list",
|
|
826
|
-
style:
|
|
885
|
+
style: N({ fontSize: (e.node.style.fontSize ?? 12) + "px", color: e.node.style.color })
|
|
827
886
|
}, [
|
|
828
|
-
(s(), M(
|
|
829
|
-
default:
|
|
830
|
-
(s(!0), d(C, null,
|
|
887
|
+
(s(), M(te(e.node.props.ordered ? "ol" : "ul"), null, {
|
|
888
|
+
default: j(() => [
|
|
889
|
+
(s(!0), d(C, null, P(e.node.props.items, (l, a) => (s(), d("li", { key: a }, w(l), 1))), 128))
|
|
831
890
|
]),
|
|
832
891
|
_: 1
|
|
833
892
|
}))
|
|
834
893
|
], 4));
|
|
835
894
|
}
|
|
836
|
-
}),
|
|
895
|
+
}), dn = /* @__PURE__ */ x(cn, [["__scopeId", "data-v-8107f859"]]), un = { class: "brick-list-editor" }, pn = /* @__PURE__ */ _({
|
|
837
896
|
__name: "ListPropertyEditor",
|
|
838
897
|
props: {
|
|
839
898
|
node: {}
|
|
840
899
|
},
|
|
841
900
|
setup(e) {
|
|
842
|
-
return (t, n) => (s(), d("div",
|
|
901
|
+
return (t, n) => (s(), d("div", un));
|
|
843
902
|
}
|
|
844
|
-
}),
|
|
903
|
+
}), fn = {
|
|
845
904
|
type: "list",
|
|
846
905
|
label: "List",
|
|
847
906
|
icon: "☰",
|
|
848
907
|
isContainer: !1,
|
|
849
|
-
defaultProps:
|
|
850
|
-
defaultStyle:
|
|
851
|
-
rendererComponent:
|
|
852
|
-
propertyEditorComponent:
|
|
908
|
+
defaultProps: ln,
|
|
909
|
+
defaultStyle: sn,
|
|
910
|
+
rendererComponent: dn,
|
|
911
|
+
propertyEditorComponent: pn,
|
|
853
912
|
propertyFields: [
|
|
854
913
|
{ key: "props.ordered", label: "Ordered", section: "content", type: "toggle", defaultValue: !1 },
|
|
855
914
|
{ key: "props.items", label: "Items", section: "content", type: "textarea", defaultValue: `Item 1
|
|
@@ -859,22 +918,22 @@ Item 3` },
|
|
|
859
918
|
{ key: "style.color", label: "Color", section: "style", type: "color", defaultValue: "#000000" },
|
|
860
919
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
861
920
|
],
|
|
862
|
-
toPdfmake:
|
|
921
|
+
toPdfmake: an
|
|
863
922
|
};
|
|
864
|
-
function
|
|
923
|
+
function mn() {
|
|
865
924
|
return { data: "https://example.com", fit: 100 };
|
|
866
925
|
}
|
|
867
|
-
function
|
|
926
|
+
function yn() {
|
|
868
927
|
return {};
|
|
869
928
|
}
|
|
870
|
-
function
|
|
929
|
+
function gn(e) {
|
|
871
930
|
const t = {
|
|
872
931
|
qr: e.props.data,
|
|
873
932
|
fit: e.props.fit ?? 100
|
|
874
933
|
};
|
|
875
934
|
return e.style.alignment && (t.alignment = e.style.alignment), e.style.margin && (t.margin = e.style.margin), t;
|
|
876
935
|
}
|
|
877
|
-
const
|
|
936
|
+
const bn = { class: "brick-el-qr__preview" }, vn = /* @__PURE__ */ _({
|
|
878
937
|
__name: "QrRenderer",
|
|
879
938
|
props: {
|
|
880
939
|
node: {}
|
|
@@ -882,31 +941,31 @@ const dn = { class: "brick-el-qr__preview" }, un = /* @__PURE__ */ _({
|
|
|
882
941
|
setup(e) {
|
|
883
942
|
return (t, n) => (s(), d("div", {
|
|
884
943
|
class: "brick-el-qr",
|
|
885
|
-
style:
|
|
944
|
+
style: N({
|
|
886
945
|
width: (e.node.props.fit ?? 100) + "px",
|
|
887
946
|
height: (e.node.props.fit ?? 100) + "px"
|
|
888
947
|
})
|
|
889
948
|
}, [
|
|
890
|
-
m("div",
|
|
949
|
+
m("div", bn, "QR: " + w(e.node.props.data), 1)
|
|
891
950
|
], 4));
|
|
892
951
|
}
|
|
893
|
-
}),
|
|
952
|
+
}), hn = /* @__PURE__ */ x(vn, [["__scopeId", "data-v-f106ba48"]]), _n = { class: "brick-qr-editor" }, kn = /* @__PURE__ */ _({
|
|
894
953
|
__name: "QrPropertyEditor",
|
|
895
954
|
props: {
|
|
896
955
|
node: {}
|
|
897
956
|
},
|
|
898
957
|
setup(e) {
|
|
899
|
-
return (t, n) => (s(), d("div",
|
|
958
|
+
return (t, n) => (s(), d("div", _n));
|
|
900
959
|
}
|
|
901
|
-
}),
|
|
960
|
+
}), Sn = {
|
|
902
961
|
type: "qr",
|
|
903
962
|
label: "QR Code",
|
|
904
963
|
icon: "⊞",
|
|
905
964
|
isContainer: !1,
|
|
906
|
-
defaultProps:
|
|
907
|
-
defaultStyle:
|
|
908
|
-
rendererComponent:
|
|
909
|
-
propertyEditorComponent:
|
|
965
|
+
defaultProps: mn,
|
|
966
|
+
defaultStyle: yn,
|
|
967
|
+
rendererComponent: hn,
|
|
968
|
+
propertyEditorComponent: kn,
|
|
910
969
|
propertyFields: [
|
|
911
970
|
{ key: "props.data", label: "QR Data", section: "content", type: "text", defaultValue: "https://example.com" },
|
|
912
971
|
{ key: "props.fit", label: "Size (px)", section: "layout", type: "number", min: 50, max: 500, step: 10, defaultValue: 100 },
|
|
@@ -917,25 +976,25 @@ const dn = { class: "brick-el-qr__preview" }, un = /* @__PURE__ */ _({
|
|
|
917
976
|
] },
|
|
918
977
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
919
978
|
],
|
|
920
|
-
toPdfmake:
|
|
979
|
+
toPdfmake: gn
|
|
921
980
|
};
|
|
922
|
-
function
|
|
981
|
+
function xn() {
|
|
923
982
|
return {
|
|
924
983
|
svg: '<svg viewBox="0 0 100 100"><rect width="100" height="100" fill="#eee" /><text x="50" y="55" text-anchor="middle" font-size="12">SVG</text></svg>',
|
|
925
984
|
width: 200,
|
|
926
985
|
height: 200
|
|
927
986
|
};
|
|
928
987
|
}
|
|
929
|
-
function
|
|
988
|
+
function Cn() {
|
|
930
989
|
return {};
|
|
931
990
|
}
|
|
932
|
-
function
|
|
991
|
+
function wn(e) {
|
|
933
992
|
const t = {
|
|
934
993
|
svg: e.props.svg
|
|
935
994
|
};
|
|
936
995
|
return e.props.width && (t.width = e.props.width), e.props.height && (t.height = e.props.height), e.style.margin && (t.margin = e.style.margin), e.style.alignment && (t.alignment = e.style.alignment), t;
|
|
937
996
|
}
|
|
938
|
-
const
|
|
997
|
+
const Pn = ["innerHTML"], En = /* @__PURE__ */ _({
|
|
939
998
|
__name: "SvgRenderer",
|
|
940
999
|
props: {
|
|
941
1000
|
node: {}
|
|
@@ -943,30 +1002,30 @@ const hn = ["innerHTML"], _n = /* @__PURE__ */ _({
|
|
|
943
1002
|
setup(e) {
|
|
944
1003
|
return (t, n) => (s(), d("div", {
|
|
945
1004
|
class: "brick-el-svg",
|
|
946
|
-
style:
|
|
1005
|
+
style: N({
|
|
947
1006
|
width: e.node.props.width + "px",
|
|
948
1007
|
height: e.node.props.height + "px"
|
|
949
1008
|
}),
|
|
950
1009
|
innerHTML: e.node.props.svg
|
|
951
|
-
}, null, 12,
|
|
1010
|
+
}, null, 12, Pn));
|
|
952
1011
|
}
|
|
953
|
-
}),
|
|
1012
|
+
}), In = /* @__PURE__ */ x(En, [["__scopeId", "data-v-5e9f3319"]]), $n = { class: "brick-svg-editor" }, Rn = /* @__PURE__ */ _({
|
|
954
1013
|
__name: "SvgPropertyEditor",
|
|
955
1014
|
props: {
|
|
956
1015
|
node: {}
|
|
957
1016
|
},
|
|
958
1017
|
setup(e) {
|
|
959
|
-
return (t, n) => (s(), d("div",
|
|
1018
|
+
return (t, n) => (s(), d("div", $n));
|
|
960
1019
|
}
|
|
961
|
-
}),
|
|
1020
|
+
}), Nn = {
|
|
962
1021
|
type: "svg",
|
|
963
1022
|
label: "SVG",
|
|
964
1023
|
icon: "◇",
|
|
965
1024
|
isContainer: !1,
|
|
966
|
-
defaultProps:
|
|
967
|
-
defaultStyle:
|
|
968
|
-
rendererComponent:
|
|
969
|
-
propertyEditorComponent:
|
|
1025
|
+
defaultProps: xn,
|
|
1026
|
+
defaultStyle: Cn,
|
|
1027
|
+
rendererComponent: In,
|
|
1028
|
+
propertyEditorComponent: Rn,
|
|
970
1029
|
propertyFields: [
|
|
971
1030
|
{ key: "props.svg", label: "SVG Markup", section: "content", type: "textarea" },
|
|
972
1031
|
{ key: "props.width", label: "Width", section: "layout", type: "number", min: 10, max: 1e3, step: 10, defaultValue: 200 },
|
|
@@ -978,101 +1037,101 @@ const hn = ["innerHTML"], _n = /* @__PURE__ */ _({
|
|
|
978
1037
|
] },
|
|
979
1038
|
{ key: "style.margin", label: "Margin", section: "layout", type: "margin", defaultValue: [0, 0, 0, 0] }
|
|
980
1039
|
],
|
|
981
|
-
toPdfmake:
|
|
1040
|
+
toPdfmake: wn
|
|
982
1041
|
};
|
|
983
|
-
function
|
|
1042
|
+
function zn() {
|
|
984
1043
|
return {};
|
|
985
1044
|
}
|
|
986
|
-
function
|
|
1045
|
+
function Tn() {
|
|
987
1046
|
return {};
|
|
988
1047
|
}
|
|
989
|
-
function
|
|
1048
|
+
function Dn(e) {
|
|
990
1049
|
return { text: "", pageBreak: "after" };
|
|
991
1050
|
}
|
|
992
|
-
const
|
|
1051
|
+
const Ln = { class: "brick-el-pagebreak" }, Mn = /* @__PURE__ */ _({
|
|
993
1052
|
__name: "PageBreakRenderer",
|
|
994
1053
|
props: {
|
|
995
1054
|
node: {}
|
|
996
1055
|
},
|
|
997
1056
|
setup(e) {
|
|
998
|
-
return (t, n) => (s(), d("div",
|
|
1057
|
+
return (t, n) => (s(), d("div", Ln, [...n[0] || (n[0] = [
|
|
999
1058
|
m("hr", null, null, -1),
|
|
1000
1059
|
m("span", null, "Page Break", -1),
|
|
1001
1060
|
m("hr", null, null, -1)
|
|
1002
1061
|
])]));
|
|
1003
1062
|
}
|
|
1004
|
-
}),
|
|
1063
|
+
}), Bn = /* @__PURE__ */ x(Mn, [["__scopeId", "data-v-60c05148"]]), On = { class: "brick-pagebreak-editor" }, An = /* @__PURE__ */ _({
|
|
1005
1064
|
__name: "PageBreakPropertyEditor",
|
|
1006
1065
|
props: {
|
|
1007
1066
|
node: {}
|
|
1008
1067
|
},
|
|
1009
1068
|
setup(e) {
|
|
1010
|
-
return (t, n) => (s(), d("div",
|
|
1069
|
+
return (t, n) => (s(), d("div", On, [...n[0] || (n[0] = [
|
|
1011
1070
|
m("p", { style: { color: "#999", "font-size": "12px" } }, "No configurable properties.", -1)
|
|
1012
1071
|
])]));
|
|
1013
1072
|
}
|
|
1014
|
-
}),
|
|
1073
|
+
}), Vn = {
|
|
1015
1074
|
type: "pageBreak",
|
|
1016
1075
|
label: "Page Break",
|
|
1017
1076
|
icon: "⏎",
|
|
1018
1077
|
isContainer: !1,
|
|
1019
|
-
defaultProps:
|
|
1020
|
-
defaultStyle:
|
|
1021
|
-
rendererComponent:
|
|
1022
|
-
propertyEditorComponent:
|
|
1078
|
+
defaultProps: zn,
|
|
1079
|
+
defaultStyle: Tn,
|
|
1080
|
+
rendererComponent: Bn,
|
|
1081
|
+
propertyEditorComponent: An,
|
|
1023
1082
|
propertyFields: [],
|
|
1024
|
-
toPdfmake:
|
|
1083
|
+
toPdfmake: Dn
|
|
1025
1084
|
};
|
|
1026
|
-
let
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1085
|
+
let fe = !1;
|
|
1086
|
+
function Hn() {
|
|
1087
|
+
fe || (fe = !0, z(We), z(Ze), z(st), z(Yt), z(rn), z(fn), z(Sn), z(Nn), z(Vn));
|
|
1029
1088
|
}
|
|
1030
|
-
const
|
|
1089
|
+
const Fn = {
|
|
1031
1090
|
key: 0,
|
|
1032
1091
|
class: "brick-dropzone__empty"
|
|
1033
|
-
},
|
|
1092
|
+
}, Jn = /* @__PURE__ */ _({
|
|
1034
1093
|
__name: "DropZone",
|
|
1035
1094
|
props: {
|
|
1036
1095
|
parentId: {},
|
|
1037
1096
|
layout: {}
|
|
1038
1097
|
},
|
|
1039
1098
|
setup(e) {
|
|
1040
|
-
const t = e, n =
|
|
1041
|
-
let
|
|
1042
|
-
const
|
|
1043
|
-
return
|
|
1044
|
-
n.value && (
|
|
1045
|
-
}),
|
|
1046
|
-
|
|
1099
|
+
const t = e, n = E(null);
|
|
1100
|
+
let l = null;
|
|
1101
|
+
const a = xe(), { isDragging: o } = a;
|
|
1102
|
+
return me(() => {
|
|
1103
|
+
n.value && (l = a.initContainer(n.value, t.parentId));
|
|
1104
|
+
}), ye(() => {
|
|
1105
|
+
l?.destroy();
|
|
1047
1106
|
}), (u, p) => (s(), d("div", {
|
|
1048
1107
|
ref_key: "el",
|
|
1049
1108
|
ref: n,
|
|
1050
|
-
class:
|
|
1109
|
+
class: ee(["brick-dropzone", { "brick-dropzone--horizontal": e.layout === "horizontal", "brick-dropzone--drag-active": k(o) && e.layout === "horizontal" }])
|
|
1051
1110
|
}, [
|
|
1052
|
-
|
|
1053
|
-
u.$slots.default ?
|
|
1111
|
+
Z(u.$slots, "default", {}, void 0, !0),
|
|
1112
|
+
u.$slots.default ? $("", !0) : (s(), d("div", Fn, " Drop elements here "))
|
|
1054
1113
|
], 2));
|
|
1055
1114
|
}
|
|
1056
|
-
}),
|
|
1115
|
+
}), $e = /* @__PURE__ */ x(Jn, [["__scopeId", "data-v-b9596dad"]]), Un = ["data-element-id", "data-element-type"], Wn = {
|
|
1057
1116
|
key: 1,
|
|
1058
1117
|
class: "brick-canvas-element__unknown"
|
|
1059
|
-
},
|
|
1118
|
+
}, jn = /* @__PURE__ */ _({
|
|
1060
1119
|
__name: "CanvasElement",
|
|
1061
1120
|
props: {
|
|
1062
1121
|
node: {},
|
|
1063
1122
|
path: {}
|
|
1064
1123
|
},
|
|
1065
1124
|
setup(e) {
|
|
1066
|
-
const t = e, n =
|
|
1125
|
+
const t = e, n = W(), l = q(), a = E(null), o = I(() => U(t.node.type)), u = I(() => n.selectedId.value === t.node.id), p = I(() => o.value ? o.value.propertyFields.some((f) => f.key === "props.width" || f.key === "style.width") : !1), c = I(() => o.value ? o.value.propertyFields.some((f) => f.key === "props.height" || f.key === "style.height") : !1);
|
|
1067
1126
|
function r(f) {
|
|
1068
1127
|
f.stopPropagation(), n.select(t.node.id);
|
|
1069
1128
|
}
|
|
1070
|
-
function
|
|
1129
|
+
function i(f) {
|
|
1071
1130
|
f.stopPropagation(), f.preventDefault();
|
|
1072
|
-
const b = f.clientX, v =
|
|
1073
|
-
function h(
|
|
1074
|
-
const O =
|
|
1075
|
-
o.value?.propertyFields.some((
|
|
1131
|
+
const b = f.clientX, v = a.value?.offsetWidth ?? 200;
|
|
1132
|
+
function h(R) {
|
|
1133
|
+
const O = R.clientX - b, T = Math.max(20, v + O);
|
|
1134
|
+
o.value?.propertyFields.some((H) => H.key === "props.width") ? l.updateProps(t.node.id, { width: Math.round(T) }) : l.updateStyle(t.node.id, { width: Math.round(T) });
|
|
1076
1135
|
}
|
|
1077
1136
|
function S() {
|
|
1078
1137
|
document.removeEventListener("pointermove", h), document.removeEventListener("pointerup", S), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
@@ -1081,10 +1140,10 @@ const Ln = {
|
|
|
1081
1140
|
}
|
|
1082
1141
|
function y(f) {
|
|
1083
1142
|
f.stopPropagation(), f.preventDefault();
|
|
1084
|
-
const b = f.clientY, v =
|
|
1085
|
-
function h(
|
|
1086
|
-
const O =
|
|
1087
|
-
o.value?.propertyFields.some((
|
|
1143
|
+
const b = f.clientY, v = a.value?.offsetHeight ?? 100;
|
|
1144
|
+
function h(R) {
|
|
1145
|
+
const O = R.clientY - b, T = Math.max(20, v + O);
|
|
1146
|
+
o.value?.propertyFields.some((H) => H.key === "props.height") ? l.updateProps(t.node.id, { height: Math.round(T) }) : l.updateStyle(t.node.id, { height: Math.round(T) });
|
|
1088
1147
|
}
|
|
1089
1148
|
function S() {
|
|
1090
1149
|
document.removeEventListener("pointermove", h), document.removeEventListener("pointerup", S), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
@@ -1093,25 +1152,25 @@ const Ln = {
|
|
|
1093
1152
|
}
|
|
1094
1153
|
function g(f) {
|
|
1095
1154
|
f.stopPropagation(), f.preventDefault();
|
|
1096
|
-
const b = f.clientX, v = f.clientY, h =
|
|
1097
|
-
function
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1155
|
+
const b = f.clientX, v = f.clientY, h = a.value?.offsetWidth ?? 200, S = a.value?.offsetHeight ?? 100;
|
|
1156
|
+
function R(T) {
|
|
1157
|
+
const G = T.clientX - b, H = T.clientY - v, re = Math.max(20, h + G), le = Math.max(20, S + H), Re = o.value?.propertyFields.some((X) => X.key === "props.width"), Ne = o.value?.propertyFields.some((X) => X.key === "props.height");
|
|
1158
|
+
Re ? l.updateProps(t.node.id, { width: Math.round(re) }) : l.updateStyle(t.node.id, { width: Math.round(re) }), Ne ? l.updateProps(t.node.id, { height: Math.round(le) }) : l.updateStyle(t.node.id, { height: Math.round(le) });
|
|
1100
1159
|
}
|
|
1101
1160
|
function O() {
|
|
1102
|
-
document.removeEventListener("pointermove",
|
|
1161
|
+
document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", O), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1103
1162
|
}
|
|
1104
|
-
document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove",
|
|
1163
|
+
document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none", document.addEventListener("pointermove", R), document.addEventListener("pointerup", O);
|
|
1105
1164
|
}
|
|
1106
1165
|
return (f, b) => {
|
|
1107
|
-
const v =
|
|
1166
|
+
const v = Te("CanvasElement", !0);
|
|
1108
1167
|
return s(), d("div", {
|
|
1109
1168
|
ref_key: "elRef",
|
|
1110
|
-
ref:
|
|
1111
|
-
class:
|
|
1169
|
+
ref: a,
|
|
1170
|
+
class: ee(["brick-canvas-element", { "brick-canvas-element--selected": u.value }]),
|
|
1112
1171
|
"data-element-id": e.node.id,
|
|
1113
1172
|
"data-element-type": e.node.type,
|
|
1114
|
-
style:
|
|
1173
|
+
style: N({
|
|
1115
1174
|
width: typeof e.node.style.width == "number" ? e.node.style.width + "px" : e.node.props.width ? e.node.props.width + "px" : e.node.style.width,
|
|
1116
1175
|
height: e.node.style.height ? e.node.style.height + "px" : e.node.props.height ? e.node.props.height + "px" : void 0,
|
|
1117
1176
|
marginTop: e.node.style.margin?.[1] + "px",
|
|
@@ -1122,102 +1181,102 @@ const Ln = {
|
|
|
1122
1181
|
}),
|
|
1123
1182
|
onClick: r
|
|
1124
1183
|
}, [
|
|
1125
|
-
o.value ? (s(), M(
|
|
1184
|
+
o.value ? (s(), M(te(o.value.rendererComponent), {
|
|
1126
1185
|
key: 0,
|
|
1127
1186
|
node: e.node,
|
|
1128
1187
|
path: e.path
|
|
1129
1188
|
}, {
|
|
1130
|
-
default:
|
|
1131
|
-
o.value.isContainer ? (s(), M(
|
|
1189
|
+
default: j(() => [
|
|
1190
|
+
o.value.isContainer ? (s(), M($e, {
|
|
1132
1191
|
key: 0,
|
|
1133
1192
|
"parent-id": e.node.id,
|
|
1134
1193
|
layout: e.node.type === "columns" ? "horizontal" : "vertical"
|
|
1135
1194
|
}, {
|
|
1136
|
-
default:
|
|
1137
|
-
(s(!0), d(C, null,
|
|
1195
|
+
default: j(() => [
|
|
1196
|
+
(s(!0), d(C, null, P(e.node.children, (h, S) => (s(), M(v, {
|
|
1138
1197
|
key: h.id,
|
|
1139
1198
|
node: h,
|
|
1140
1199
|
path: [...e.path, S]
|
|
1141
1200
|
}, null, 8, ["node", "path"]))), 128))
|
|
1142
1201
|
]),
|
|
1143
1202
|
_: 1
|
|
1144
|
-
}, 8, ["parent-id", "layout"])) :
|
|
1203
|
+
}, 8, ["parent-id", "layout"])) : $("", !0)
|
|
1145
1204
|
]),
|
|
1146
1205
|
_: 1
|
|
1147
|
-
}, 8, ["node", "path"])) : (s(), d("div",
|
|
1206
|
+
}, 8, ["node", "path"])) : (s(), d("div", Wn, " Unknown element: " + w(e.node.type), 1)),
|
|
1148
1207
|
u.value ? (s(), d(C, { key: 2 }, [
|
|
1149
1208
|
p.value ? (s(), d("div", {
|
|
1150
1209
|
key: 0,
|
|
1151
1210
|
class: "brick-resize-handle brick-resize-handle--e",
|
|
1152
|
-
onPointerdown:
|
|
1153
|
-
}, null, 32)) :
|
|
1154
|
-
|
|
1211
|
+
onPointerdown: i
|
|
1212
|
+
}, null, 32)) : $("", !0),
|
|
1213
|
+
c.value ? (s(), d("div", {
|
|
1155
1214
|
key: 1,
|
|
1156
1215
|
class: "brick-resize-handle brick-resize-handle--s",
|
|
1157
1216
|
onPointerdown: y
|
|
1158
|
-
}, null, 32)) :
|
|
1159
|
-
p.value &&
|
|
1217
|
+
}, null, 32)) : $("", !0),
|
|
1218
|
+
p.value && c.value ? (s(), d("div", {
|
|
1160
1219
|
key: 2,
|
|
1161
1220
|
class: "brick-resize-handle brick-resize-handle--se",
|
|
1162
1221
|
onPointerdown: g
|
|
1163
|
-
}, null, 32)) :
|
|
1164
|
-
], 64)) :
|
|
1165
|
-
], 14,
|
|
1222
|
+
}, null, 32)) : $("", !0)
|
|
1223
|
+
], 64)) : $("", !0)
|
|
1224
|
+
], 14, Un);
|
|
1166
1225
|
};
|
|
1167
1226
|
}
|
|
1168
|
-
}),
|
|
1227
|
+
}), Yn = /* @__PURE__ */ x(jn, [["__scopeId", "data-v-6b9cadc1"]]), qn = { class: "brick-doc-bar" }, Gn = { class: "brick-doc-bar__field" }, Xn = ["value"], Kn = { class: "brick-doc-bar__field" }, Qn = { class: "brick-doc-bar__field brick-doc-bar__field--margins" }, Zn = { class: "brick-doc-bar__margins" }, eo = ["placeholder", "title", "value", "onInput"], to = { class: "brick-doc-bar__field" }, no = ["value"], oo = /* @__PURE__ */ _({
|
|
1169
1228
|
__name: "DocumentSettings",
|
|
1170
1229
|
setup(e) {
|
|
1171
|
-
const t =
|
|
1230
|
+
const t = oe(), n = [
|
|
1172
1231
|
{ label: "A3", value: "A3" },
|
|
1173
1232
|
{ label: "A4", value: "A4" },
|
|
1174
1233
|
{ label: "A5", value: "A5" },
|
|
1175
1234
|
{ label: "Letter", value: "LETTER" },
|
|
1176
1235
|
{ label: "Legal", value: "LEGAL" }
|
|
1177
1236
|
];
|
|
1178
|
-
function
|
|
1237
|
+
function l(a, o) {
|
|
1179
1238
|
const u = [...t.document.pageMargins];
|
|
1180
|
-
u[
|
|
1239
|
+
u[a] = o, t.document.pageMargins = u;
|
|
1181
1240
|
}
|
|
1182
|
-
return (
|
|
1183
|
-
m("div",
|
|
1241
|
+
return (a, o) => (s(), d("div", qn, [
|
|
1242
|
+
m("div", Gn, [
|
|
1184
1243
|
o[3] || (o[3] = m("label", null, "Size", -1)),
|
|
1185
|
-
|
|
1244
|
+
K(m("select", {
|
|
1186
1245
|
"onUpdate:modelValue": o[0] || (o[0] = (u) => k(t).document.pageSize = u)
|
|
1187
1246
|
}, [
|
|
1188
|
-
(s(), d(C, null,
|
|
1247
|
+
(s(), d(C, null, P(n, (u) => m("option", {
|
|
1189
1248
|
key: u.value,
|
|
1190
1249
|
value: u.value
|
|
1191
|
-
}, w(u.label), 9,
|
|
1250
|
+
}, w(u.label), 9, Xn)), 64))
|
|
1192
1251
|
], 512), [
|
|
1193
|
-
[
|
|
1252
|
+
[se, k(t).document.pageSize]
|
|
1194
1253
|
])
|
|
1195
1254
|
]),
|
|
1196
|
-
m("div",
|
|
1255
|
+
m("div", Kn, [
|
|
1197
1256
|
o[5] || (o[5] = m("label", null, "Orientation", -1)),
|
|
1198
|
-
|
|
1257
|
+
K(m("select", {
|
|
1199
1258
|
"onUpdate:modelValue": o[1] || (o[1] = (u) => k(t).document.pageOrientation = u)
|
|
1200
1259
|
}, [...o[4] || (o[4] = [
|
|
1201
1260
|
m("option", { value: "portrait" }, "Portrait", -1),
|
|
1202
1261
|
m("option", { value: "landscape" }, "Landscape", -1)
|
|
1203
1262
|
])], 512), [
|
|
1204
|
-
[
|
|
1263
|
+
[se, k(t).document.pageOrientation]
|
|
1205
1264
|
])
|
|
1206
1265
|
]),
|
|
1207
|
-
m("div",
|
|
1266
|
+
m("div", Qn, [
|
|
1208
1267
|
o[6] || (o[6] = m("label", null, "Margins", -1)),
|
|
1209
|
-
m("div",
|
|
1210
|
-
(s(), d(C, null,
|
|
1268
|
+
m("div", Zn, [
|
|
1269
|
+
(s(), d(C, null, P(["L", "T", "R", "B"], (u, p) => m("input", {
|
|
1211
1270
|
key: p,
|
|
1212
1271
|
type: "number",
|
|
1213
1272
|
placeholder: u,
|
|
1214
1273
|
title: u,
|
|
1215
1274
|
value: k(t).document.pageMargins[p],
|
|
1216
|
-
onInput: (
|
|
1217
|
-
}, null, 40,
|
|
1275
|
+
onInput: (c) => l(p, Number(c.target.value))
|
|
1276
|
+
}, null, 40, eo)), 64))
|
|
1218
1277
|
])
|
|
1219
1278
|
]),
|
|
1220
|
-
m("div",
|
|
1279
|
+
m("div", to, [
|
|
1221
1280
|
o[7] || (o[7] = m("label", null, "Font Size", -1)),
|
|
1222
1281
|
m("input", {
|
|
1223
1282
|
type: "number",
|
|
@@ -1225,52 +1284,52 @@ const Ln = {
|
|
|
1225
1284
|
min: "6",
|
|
1226
1285
|
max: "72",
|
|
1227
1286
|
onInput: o[2] || (o[2] = (u) => (k(t).document.defaultStyle ??= {}).fontSize = Number(u.target.value))
|
|
1228
|
-
}, null, 40,
|
|
1287
|
+
}, null, 40, no)
|
|
1229
1288
|
])
|
|
1230
1289
|
]));
|
|
1231
1290
|
}
|
|
1232
|
-
}),
|
|
1291
|
+
}), ro = /* @__PURE__ */ x(oo, [["__scopeId", "data-v-39a2b54f"]]), lo = { class: "brick-canvas" }, V = 0.75, io = /* @__PURE__ */ _({
|
|
1233
1292
|
__name: "DesignCanvas",
|
|
1234
1293
|
setup(e) {
|
|
1235
|
-
const t =
|
|
1294
|
+
const t = oe(), n = W(), l = {
|
|
1236
1295
|
A3: [841.89, 1190.55],
|
|
1237
1296
|
A4: [595.28, 841.89],
|
|
1238
1297
|
A5: [419.53, 595.28],
|
|
1239
1298
|
LETTER: [612, 792],
|
|
1240
1299
|
LEGAL: [612, 1008]
|
|
1241
|
-
},
|
|
1242
|
-
const [p,
|
|
1243
|
-
return Math.round(r *
|
|
1244
|
-
}), o =
|
|
1245
|
-
const [p,
|
|
1246
|
-
return Math.round(r *
|
|
1300
|
+
}, a = I(() => {
|
|
1301
|
+
const [p, c] = l[t.document.pageSize] ?? l.A4, r = t.document.pageOrientation === "landscape" ? c : p;
|
|
1302
|
+
return Math.round(r * V);
|
|
1303
|
+
}), o = I(() => {
|
|
1304
|
+
const [p, c] = l[t.document.pageSize] ?? l.A4, r = t.document.pageOrientation === "landscape" ? p : c;
|
|
1305
|
+
return Math.round(r * V);
|
|
1247
1306
|
});
|
|
1248
1307
|
function u(p) {
|
|
1249
1308
|
(p.target === p.currentTarget || p.target.classList.contains("brick-canvas__page")) && n.deselect();
|
|
1250
1309
|
}
|
|
1251
|
-
return (p,
|
|
1252
|
-
B(
|
|
1310
|
+
return (p, c) => (s(), d("div", lo, [
|
|
1311
|
+
B(ro),
|
|
1253
1312
|
m("div", {
|
|
1254
1313
|
class: "brick-canvas__scroll",
|
|
1255
1314
|
onClick: u
|
|
1256
1315
|
}, [
|
|
1257
1316
|
m("div", {
|
|
1258
1317
|
class: "brick-canvas__page",
|
|
1259
|
-
style:
|
|
1260
|
-
width:
|
|
1318
|
+
style: N({
|
|
1319
|
+
width: a.value + "px",
|
|
1261
1320
|
minHeight: o.value + "px",
|
|
1262
|
-
paddingTop: k(t).document.pageMargins[1] *
|
|
1263
|
-
paddingRight: k(t).document.pageMargins[2] *
|
|
1264
|
-
paddingBottom: k(t).document.pageMargins[3] *
|
|
1265
|
-
paddingLeft: k(t).document.pageMargins[0] *
|
|
1321
|
+
paddingTop: k(t).document.pageMargins[1] * V + "px",
|
|
1322
|
+
paddingRight: k(t).document.pageMargins[2] * V + "px",
|
|
1323
|
+
paddingBottom: k(t).document.pageMargins[3] * V + "px",
|
|
1324
|
+
paddingLeft: k(t).document.pageMargins[0] * V + "px"
|
|
1266
1325
|
})
|
|
1267
1326
|
}, [
|
|
1268
|
-
B(
|
|
1269
|
-
default:
|
|
1270
|
-
(s(!0), d(C, null,
|
|
1327
|
+
B($e, { "parent-id": null }, {
|
|
1328
|
+
default: j(() => [
|
|
1329
|
+
(s(!0), d(C, null, P(k(t).document.content, (r, i) => (s(), M(Yn, {
|
|
1271
1330
|
key: r.id,
|
|
1272
1331
|
node: r,
|
|
1273
|
-
path: [
|
|
1332
|
+
path: [i]
|
|
1274
1333
|
}, null, 8, ["node", "path"]))), 128))
|
|
1275
1334
|
]),
|
|
1276
1335
|
_: 1
|
|
@@ -1279,224 +1338,224 @@ const Ln = {
|
|
|
1279
1338
|
])
|
|
1280
1339
|
]));
|
|
1281
1340
|
}
|
|
1282
|
-
}),
|
|
1341
|
+
}), so = /* @__PURE__ */ x(io, [["__scopeId", "data-v-364329ec"]]), ao = ["data-element-type"], co = { class: "brick-element-list__icon" }, uo = { class: "brick-element-list__label" }, po = /* @__PURE__ */ _({
|
|
1283
1342
|
__name: "ToolbarElementList",
|
|
1284
1343
|
setup(e) {
|
|
1285
|
-
const t =
|
|
1344
|
+
const t = E(null);
|
|
1286
1345
|
let n = null;
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1289
|
-
t.value && (n =
|
|
1290
|
-
}),
|
|
1346
|
+
const l = xe(), a = Be();
|
|
1347
|
+
return me(() => {
|
|
1348
|
+
t.value && (n = l.initToolbar(t.value));
|
|
1349
|
+
}), ye(() => {
|
|
1291
1350
|
n?.destroy();
|
|
1292
1351
|
}), (o, u) => (s(), d("div", {
|
|
1293
1352
|
ref_key: "el",
|
|
1294
1353
|
ref: t,
|
|
1295
1354
|
class: "brick-element-list"
|
|
1296
1355
|
}, [
|
|
1297
|
-
(s(!0), d(C, null,
|
|
1356
|
+
(s(!0), d(C, null, P(k(a), (p) => (s(), d("div", {
|
|
1298
1357
|
key: p.type,
|
|
1299
1358
|
class: "brick-element-list__item",
|
|
1300
1359
|
"data-element-type": p.type
|
|
1301
1360
|
}, [
|
|
1302
|
-
m("span",
|
|
1303
|
-
m("span",
|
|
1304
|
-
], 8,
|
|
1361
|
+
m("span", co, w(p.icon), 1),
|
|
1362
|
+
m("span", uo, w(p.label), 1)
|
|
1363
|
+
], 8, ao))), 128))
|
|
1305
1364
|
], 512));
|
|
1306
1365
|
}
|
|
1307
|
-
}),
|
|
1366
|
+
}), fo = /* @__PURE__ */ x(po, [["__scopeId", "data-v-2d0b1dbf"]]), mo = { class: "brick-field" }, yo = { class: "brick-field__label" }, go = ["value"], bo = ["value"], vo = ["value", "min", "max", "step"], ho = ["value"], _o = ["value"], ko = ["value"], So = {
|
|
1308
1367
|
key: 5,
|
|
1309
1368
|
class: "brick-field__toggle"
|
|
1310
|
-
},
|
|
1369
|
+
}, xo = ["checked"], Co = {
|
|
1311
1370
|
key: 6,
|
|
1312
1371
|
class: "brick-field__margin"
|
|
1313
|
-
},
|
|
1372
|
+
}, wo = ["placeholder", "value", "onInput"], Po = {
|
|
1314
1373
|
key: 7,
|
|
1315
1374
|
class: "brick-field__slider"
|
|
1316
|
-
},
|
|
1375
|
+
}, Eo = ["value", "min", "max", "step"], Io = { class: "brick-field__slider-value" }, $o = /* @__PURE__ */ _({
|
|
1317
1376
|
__name: "PropertyField",
|
|
1318
1377
|
props: {
|
|
1319
1378
|
descriptor: {},
|
|
1320
1379
|
node: {}
|
|
1321
1380
|
},
|
|
1322
1381
|
setup(e) {
|
|
1323
|
-
const t = e, n =
|
|
1324
|
-
const
|
|
1382
|
+
const t = e, n = q(), l = I(() => {
|
|
1383
|
+
const c = t.descriptor.key.split("."), r = c[0], i = c[1];
|
|
1325
1384
|
if (r === "props")
|
|
1326
|
-
return t.node.props[
|
|
1385
|
+
return t.node.props[i];
|
|
1327
1386
|
if (r === "style")
|
|
1328
|
-
return t.node.style[
|
|
1329
|
-
}),
|
|
1330
|
-
const
|
|
1331
|
-
return t.descriptor.type === "textarea" && Array.isArray(
|
|
1332
|
-
`) :
|
|
1387
|
+
return t.node.style[i];
|
|
1388
|
+
}), a = I(() => {
|
|
1389
|
+
const c = l.value;
|
|
1390
|
+
return t.descriptor.type === "textarea" && Array.isArray(c) ? c.join(`
|
|
1391
|
+
`) : c;
|
|
1333
1392
|
});
|
|
1334
|
-
function o(
|
|
1335
|
-
const r = t.descriptor.key.split("."),
|
|
1336
|
-
let g =
|
|
1337
|
-
t.descriptor.type === "textarea" && Array.isArray(
|
|
1338
|
-
`)),
|
|
1393
|
+
function o(c) {
|
|
1394
|
+
const r = t.descriptor.key.split("."), i = r[0], y = r[1];
|
|
1395
|
+
let g = c;
|
|
1396
|
+
t.descriptor.type === "textarea" && Array.isArray(l.value) && (g = c.split(`
|
|
1397
|
+
`)), i === "props" ? n.updateProps(t.node.id, { [y]: g }) : i === "style" && n.updateStyle(t.node.id, { [y]: g });
|
|
1339
1398
|
}
|
|
1340
|
-
function u(
|
|
1341
|
-
const y = [...
|
|
1342
|
-
y[
|
|
1399
|
+
function u(c, r) {
|
|
1400
|
+
const y = [...a.value ?? [0, 0, 0, 0]];
|
|
1401
|
+
y[c] = r, o(y);
|
|
1343
1402
|
}
|
|
1344
|
-
function p(
|
|
1345
|
-
const
|
|
1346
|
-
if (!
|
|
1403
|
+
function p(c) {
|
|
1404
|
+
const i = c.target.files?.[0];
|
|
1405
|
+
if (!i) return;
|
|
1347
1406
|
const y = new FileReader();
|
|
1348
1407
|
y.onload = () => {
|
|
1349
1408
|
o(y.result);
|
|
1350
|
-
}, y.readAsDataURL(
|
|
1409
|
+
}, y.readAsDataURL(i);
|
|
1351
1410
|
}
|
|
1352
|
-
return (
|
|
1353
|
-
m("label",
|
|
1411
|
+
return (c, r) => (s(), d("div", mo, [
|
|
1412
|
+
m("label", yo, w(e.descriptor.label), 1),
|
|
1354
1413
|
e.descriptor.type === "text" ? (s(), d("input", {
|
|
1355
1414
|
key: 0,
|
|
1356
1415
|
type: "text",
|
|
1357
1416
|
class: "brick-field__input",
|
|
1358
|
-
value:
|
|
1359
|
-
onInput: r[0] || (r[0] = (
|
|
1360
|
-
}, null, 40,
|
|
1417
|
+
value: a.value,
|
|
1418
|
+
onInput: r[0] || (r[0] = (i) => o(i.target.value))
|
|
1419
|
+
}, null, 40, go)) : e.descriptor.type === "textarea" ? (s(), d("textarea", {
|
|
1361
1420
|
key: 1,
|
|
1362
1421
|
class: "brick-field__textarea",
|
|
1363
|
-
value:
|
|
1422
|
+
value: a.value,
|
|
1364
1423
|
rows: "3",
|
|
1365
|
-
onInput: r[1] || (r[1] = (
|
|
1366
|
-
}, null, 40,
|
|
1424
|
+
onInput: r[1] || (r[1] = (i) => o(i.target.value))
|
|
1425
|
+
}, null, 40, bo)) : e.descriptor.type === "number" ? (s(), d("input", {
|
|
1367
1426
|
key: 2,
|
|
1368
1427
|
type: "number",
|
|
1369
1428
|
class: "brick-field__input",
|
|
1370
|
-
value:
|
|
1429
|
+
value: a.value,
|
|
1371
1430
|
min: e.descriptor.min,
|
|
1372
1431
|
max: e.descriptor.max,
|
|
1373
1432
|
step: e.descriptor.step,
|
|
1374
|
-
onInput: r[2] || (r[2] = (
|
|
1375
|
-
}, null, 40,
|
|
1433
|
+
onInput: r[2] || (r[2] = (i) => o(Number(i.target.value)))
|
|
1434
|
+
}, null, 40, vo)) : e.descriptor.type === "color" ? (s(), d("input", {
|
|
1376
1435
|
key: 3,
|
|
1377
1436
|
type: "color",
|
|
1378
1437
|
class: "brick-field__color",
|
|
1379
|
-
value:
|
|
1380
|
-
onInput: r[3] || (r[3] = (
|
|
1381
|
-
}, null, 40,
|
|
1438
|
+
value: a.value ?? "#000000",
|
|
1439
|
+
onInput: r[3] || (r[3] = (i) => o(i.target.value))
|
|
1440
|
+
}, null, 40, ho)) : e.descriptor.type === "select" ? (s(), d("select", {
|
|
1382
1441
|
key: 4,
|
|
1383
1442
|
class: "brick-field__select",
|
|
1384
|
-
value:
|
|
1385
|
-
onChange: r[4] || (r[4] = (
|
|
1443
|
+
value: a.value,
|
|
1444
|
+
onChange: r[4] || (r[4] = (i) => o(i.target.value || void 0))
|
|
1386
1445
|
}, [
|
|
1387
|
-
(s(!0), d(C, null,
|
|
1388
|
-
key: String(
|
|
1389
|
-
value:
|
|
1390
|
-
}, w(
|
|
1391
|
-
], 40,
|
|
1446
|
+
(s(!0), d(C, null, P(e.descriptor.options, (i) => (s(), d("option", {
|
|
1447
|
+
key: String(i.value),
|
|
1448
|
+
value: i.value
|
|
1449
|
+
}, w(i.label), 9, ko))), 128))
|
|
1450
|
+
], 40, _o)) : e.descriptor.type === "toggle" ? (s(), d("label", So, [
|
|
1392
1451
|
m("input", {
|
|
1393
1452
|
type: "checkbox",
|
|
1394
|
-
checked:
|
|
1395
|
-
onChange: r[5] || (r[5] = (
|
|
1396
|
-
}, null, 40,
|
|
1397
|
-
m("span", null, w(
|
|
1398
|
-
])) : e.descriptor.type === "margin" ? (s(), d("div",
|
|
1399
|
-
(s(), d(C, null,
|
|
1400
|
-
key:
|
|
1453
|
+
checked: a.value,
|
|
1454
|
+
onChange: r[5] || (r[5] = (i) => o(i.target.checked))
|
|
1455
|
+
}, null, 40, xo),
|
|
1456
|
+
m("span", null, w(a.value ? "On" : "Off"), 1)
|
|
1457
|
+
])) : e.descriptor.type === "margin" ? (s(), d("div", Co, [
|
|
1458
|
+
(s(), d(C, null, P(["L", "T", "R", "B"], (i, y) => m("input", {
|
|
1459
|
+
key: i,
|
|
1401
1460
|
type: "number",
|
|
1402
1461
|
class: "brick-field__margin-input",
|
|
1403
|
-
placeholder:
|
|
1404
|
-
value: (
|
|
1462
|
+
placeholder: i,
|
|
1463
|
+
value: (a.value ?? [0, 0, 0, 0])[y],
|
|
1405
1464
|
onInput: (g) => u(y, Number(g.target.value))
|
|
1406
|
-
}, null, 40,
|
|
1407
|
-
])) : e.descriptor.type === "slider" ? (s(), d("div",
|
|
1465
|
+
}, null, 40, wo)), 64))
|
|
1466
|
+
])) : e.descriptor.type === "slider" ? (s(), d("div", Po, [
|
|
1408
1467
|
m("input", {
|
|
1409
1468
|
type: "range",
|
|
1410
|
-
value:
|
|
1469
|
+
value: a.value,
|
|
1411
1470
|
min: e.descriptor.min,
|
|
1412
1471
|
max: e.descriptor.max,
|
|
1413
1472
|
step: e.descriptor.step,
|
|
1414
|
-
onInput: r[6] || (r[6] = (
|
|
1415
|
-
}, null, 40,
|
|
1416
|
-
m("span",
|
|
1473
|
+
onInput: r[6] || (r[6] = (i) => o(Number(i.target.value)))
|
|
1474
|
+
}, null, 40, Eo),
|
|
1475
|
+
m("span", Io, w(a.value), 1)
|
|
1417
1476
|
])) : e.descriptor.type === "file" ? (s(), d("input", {
|
|
1418
1477
|
key: 8,
|
|
1419
1478
|
type: "file",
|
|
1420
1479
|
accept: "image/*",
|
|
1421
1480
|
class: "brick-field__file",
|
|
1422
1481
|
onChange: p
|
|
1423
|
-
}, null, 32)) :
|
|
1482
|
+
}, null, 32)) : $("", !0)
|
|
1424
1483
|
]));
|
|
1425
1484
|
}
|
|
1426
|
-
}),
|
|
1485
|
+
}), Ro = /* @__PURE__ */ x($o, [["__scopeId", "data-v-5a3bec1b"]]), No = {
|
|
1427
1486
|
key: 0,
|
|
1428
1487
|
class: "brick-property-editor"
|
|
1429
|
-
},
|
|
1488
|
+
}, zo = { class: "brick-property-editor__type" }, To = {
|
|
1430
1489
|
key: 0,
|
|
1431
1490
|
class: "brick-property-editor__group"
|
|
1432
|
-
},
|
|
1491
|
+
}, Do = { class: "brick-property-editor__group-title" }, Lo = /* @__PURE__ */ _({
|
|
1433
1492
|
__name: "PropertyEditor",
|
|
1434
1493
|
setup(e) {
|
|
1435
|
-
const t =
|
|
1494
|
+
const t = W(), n = I(() => {
|
|
1436
1495
|
const u = t.selectedNode.value;
|
|
1437
|
-
return u ?
|
|
1438
|
-
}),
|
|
1496
|
+
return u ? U(u.type) : null;
|
|
1497
|
+
}), l = I(() => {
|
|
1439
1498
|
if (!n.value) return {};
|
|
1440
1499
|
const u = {};
|
|
1441
1500
|
for (const p of n.value.propertyFields)
|
|
1442
1501
|
u[p.section] || (u[p.section] = []), u[p.section].push(p);
|
|
1443
1502
|
return u;
|
|
1444
|
-
}),
|
|
1503
|
+
}), a = {
|
|
1445
1504
|
content: "Content",
|
|
1446
1505
|
style: "Style",
|
|
1447
1506
|
layout: "Layout",
|
|
1448
1507
|
advanced: "Advanced"
|
|
1449
1508
|
}, o = ["content", "style", "layout", "advanced"];
|
|
1450
|
-
return (u, p) => k(t).selectedNode.value && n.value ? (s(), d("div",
|
|
1451
|
-
m("div",
|
|
1452
|
-
(s(), d(C, null,
|
|
1453
|
-
|
|
1454
|
-
m("div",
|
|
1455
|
-
(s(!0), d(C, null,
|
|
1509
|
+
return (u, p) => k(t).selectedNode.value && n.value ? (s(), d("div", No, [
|
|
1510
|
+
m("div", zo, w(n.value.icon) + " " + w(n.value.label), 1),
|
|
1511
|
+
(s(), d(C, null, P(o, (c) => (s(), d(C, { key: c }, [
|
|
1512
|
+
l.value[c] ? (s(), d("div", To, [
|
|
1513
|
+
m("div", Do, w(a[c]), 1),
|
|
1514
|
+
(s(!0), d(C, null, P(l.value[c], (r) => (s(), M(Ro, {
|
|
1456
1515
|
key: r.key,
|
|
1457
1516
|
descriptor: r,
|
|
1458
1517
|
node: k(t).selectedNode.value
|
|
1459
1518
|
}, null, 8, ["descriptor", "node"]))), 128))
|
|
1460
|
-
])) :
|
|
1519
|
+
])) : $("", !0)
|
|
1461
1520
|
], 64))), 64)),
|
|
1462
|
-
(s(), M(
|
|
1521
|
+
(s(), M(te(n.value.propertyEditorComponent), {
|
|
1463
1522
|
node: k(t).selectedNode.value
|
|
1464
1523
|
}, null, 8, ["node"]))
|
|
1465
|
-
])) :
|
|
1524
|
+
])) : $("", !0);
|
|
1466
1525
|
}
|
|
1467
|
-
}),
|
|
1526
|
+
}), Mo = /* @__PURE__ */ x(Lo, [["__scopeId", "data-v-4d129dac"]]), Bo = { class: "brick-toolbar" }, Oo = { class: "brick-toolbar__section" }, Ao = {
|
|
1468
1527
|
key: 0,
|
|
1469
1528
|
class: "brick-toolbar__section"
|
|
1470
|
-
},
|
|
1529
|
+
}, Vo = /* @__PURE__ */ _({
|
|
1471
1530
|
__name: "Toolbar",
|
|
1472
1531
|
setup(e) {
|
|
1473
|
-
const t =
|
|
1474
|
-
return (n,
|
|
1475
|
-
m("div",
|
|
1476
|
-
|
|
1477
|
-
B(
|
|
1532
|
+
const t = W();
|
|
1533
|
+
return (n, l) => (s(), d("div", Bo, [
|
|
1534
|
+
m("div", Oo, [
|
|
1535
|
+
l[0] || (l[0] = m("h3", { class: "brick-toolbar__title" }, "Elements", -1)),
|
|
1536
|
+
B(fo)
|
|
1478
1537
|
]),
|
|
1479
|
-
k(t).selectedNode.value ? (s(), d("div",
|
|
1480
|
-
|
|
1481
|
-
B(
|
|
1482
|
-
])) :
|
|
1538
|
+
k(t).selectedNode.value ? (s(), d("div", Ao, [
|
|
1539
|
+
l[1] || (l[1] = m("h3", { class: "brick-toolbar__title" }, "Properties", -1)),
|
|
1540
|
+
B(Mo)
|
|
1541
|
+
])) : $("", !0)
|
|
1483
1542
|
]));
|
|
1484
1543
|
}
|
|
1485
|
-
}),
|
|
1544
|
+
}), Ho = /* @__PURE__ */ x(Vo, [["__scopeId", "data-v-0174c069"]]), Fo = { class: "brick-actionbar" }, Jo = { class: "brick-actionbar__group" }, Uo = { class: "brick-actionbar__group" }, Wo = ["disabled"], jo = ["disabled"], Yo = ["disabled"], qo = { class: "brick-actionbar__group" }, Go = /* @__PURE__ */ _({
|
|
1486
1545
|
__name: "ActionBar",
|
|
1487
1546
|
setup(e) {
|
|
1488
|
-
const t =
|
|
1489
|
-
function
|
|
1490
|
-
const f =
|
|
1491
|
-
f && (
|
|
1547
|
+
const t = xt(), n = zt(), l = W(), a = q(), o = oe(), u = E("document"), p = E(null);
|
|
1548
|
+
function c() {
|
|
1549
|
+
const f = l.selectedId.value;
|
|
1550
|
+
f && (l.deselect(), a.removeElement(f));
|
|
1492
1551
|
}
|
|
1493
1552
|
function r() {
|
|
1494
1553
|
const f = u.value.trim() || "document", b = f.endsWith(".pdf") ? f : f + ".pdf";
|
|
1495
1554
|
n.exportPdf(b);
|
|
1496
1555
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const f = o.exportDocument(), b = JSON.stringify(f, null, 2), v = new Blob([b], { type: "application/json" }), h = URL.createObjectURL(v), S = document.createElement("a"),
|
|
1499
|
-
S.href = h, S.download =
|
|
1556
|
+
function i() {
|
|
1557
|
+
const f = o.exportDocument(), b = JSON.stringify(f, null, 2), v = new Blob([b], { type: "application/json" }), h = URL.createObjectURL(v), S = document.createElement("a"), R = u.value.trim() || "document";
|
|
1558
|
+
S.href = h, S.download = R.endsWith(".json") ? R : R + ".json", S.click(), URL.revokeObjectURL(h);
|
|
1500
1559
|
}
|
|
1501
1560
|
function y() {
|
|
1502
1561
|
p.value?.click();
|
|
@@ -1512,45 +1571,45 @@ const Ln = {
|
|
|
1512
1571
|
alert("Invalid brick-pdf JSON file.");
|
|
1513
1572
|
return;
|
|
1514
1573
|
}
|
|
1515
|
-
|
|
1574
|
+
l.deselect(), o.loadDocument(S);
|
|
1516
1575
|
} catch {
|
|
1517
1576
|
alert("Failed to parse JSON file.");
|
|
1518
1577
|
}
|
|
1519
1578
|
}, h.readAsText(v), b.value = "";
|
|
1520
1579
|
}
|
|
1521
|
-
return (f, b) => (s(), d("div",
|
|
1522
|
-
m("div",
|
|
1523
|
-
|
|
1580
|
+
return (f, b) => (s(), d("div", Fo, [
|
|
1581
|
+
m("div", Jo, [
|
|
1582
|
+
K(m("input", {
|
|
1524
1583
|
"onUpdate:modelValue": b[0] || (b[0] = (v) => u.value = v),
|
|
1525
1584
|
class: "brick-actionbar__name",
|
|
1526
1585
|
type: "text",
|
|
1527
1586
|
placeholder: "Document name",
|
|
1528
1587
|
title: "Document name (used for export filename)"
|
|
1529
1588
|
}, null, 512), [
|
|
1530
|
-
[
|
|
1589
|
+
[De, u.value]
|
|
1531
1590
|
])
|
|
1532
1591
|
]),
|
|
1533
|
-
m("div",
|
|
1592
|
+
m("div", Uo, [
|
|
1534
1593
|
m("button", {
|
|
1535
1594
|
class: "brick-actionbar__btn",
|
|
1536
1595
|
disabled: !k(t).canUndo.value,
|
|
1537
1596
|
title: "Undo",
|
|
1538
1597
|
onClick: b[1] || (b[1] = (v) => k(t).undo())
|
|
1539
|
-
}, " Undo ", 8,
|
|
1598
|
+
}, " Undo ", 8, Wo),
|
|
1540
1599
|
m("button", {
|
|
1541
1600
|
class: "brick-actionbar__btn",
|
|
1542
1601
|
disabled: !k(t).canRedo.value,
|
|
1543
1602
|
title: "Redo",
|
|
1544
1603
|
onClick: b[2] || (b[2] = (v) => k(t).redo())
|
|
1545
|
-
}, " Redo ", 8,
|
|
1604
|
+
}, " Redo ", 8, jo),
|
|
1546
1605
|
m("button", {
|
|
1547
1606
|
class: "brick-actionbar__btn brick-actionbar__btn--danger",
|
|
1548
|
-
disabled: !k(
|
|
1607
|
+
disabled: !k(l).selectedId.value,
|
|
1549
1608
|
title: "Delete selected element",
|
|
1550
|
-
onClick:
|
|
1551
|
-
}, " Delete ", 8,
|
|
1609
|
+
onClick: c
|
|
1610
|
+
}, " Delete ", 8, Yo)
|
|
1552
1611
|
]),
|
|
1553
|
-
m("div",
|
|
1612
|
+
m("div", qo, [
|
|
1554
1613
|
m("button", {
|
|
1555
1614
|
class: "brick-actionbar__btn",
|
|
1556
1615
|
title: "Import JSON",
|
|
@@ -1559,7 +1618,7 @@ const Ln = {
|
|
|
1559
1618
|
m("button", {
|
|
1560
1619
|
class: "brick-actionbar__btn",
|
|
1561
1620
|
title: "Export JSON",
|
|
1562
|
-
onClick:
|
|
1621
|
+
onClick: i
|
|
1563
1622
|
}, " Export JSON "),
|
|
1564
1623
|
m("button", {
|
|
1565
1624
|
class: "brick-actionbar__btn brick-actionbar__btn--primary",
|
|
@@ -1580,77 +1639,77 @@ const Ln = {
|
|
|
1580
1639
|
}, null, 544)
|
|
1581
1640
|
]));
|
|
1582
1641
|
}
|
|
1583
|
-
}),
|
|
1642
|
+
}), Xo = /* @__PURE__ */ x(Go, [["__scopeId", "data-v-be915a0f"]]), Ko = { class: "brick-pdf" }, Qo = { class: "brick-pdf__workspace" }, Zo = /* @__PURE__ */ _({
|
|
1584
1643
|
__name: "BrickPdf",
|
|
1585
1644
|
props: {
|
|
1586
1645
|
modelValue: {}
|
|
1587
1646
|
},
|
|
1588
1647
|
emits: ["update:modelValue"],
|
|
1589
1648
|
setup(e, { emit: t }) {
|
|
1590
|
-
const n = e,
|
|
1591
|
-
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
const o =
|
|
1595
|
-
|
|
1596
|
-
const u =
|
|
1597
|
-
|
|
1598
|
-
const p =
|
|
1599
|
-
|
|
1600
|
-
const
|
|
1601
|
-
|
|
1602
|
-
const r =
|
|
1603
|
-
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
const y =
|
|
1607
|
-
|
|
1608
|
-
const g =
|
|
1609
|
-
return
|
|
1649
|
+
const n = e, l = t;
|
|
1650
|
+
Hn();
|
|
1651
|
+
const a = ft(n.modelValue ?? ne());
|
|
1652
|
+
mt(a);
|
|
1653
|
+
const o = yt(a);
|
|
1654
|
+
gt(o);
|
|
1655
|
+
const u = kt(a);
|
|
1656
|
+
St(u);
|
|
1657
|
+
const p = vt(a, u);
|
|
1658
|
+
ht(p);
|
|
1659
|
+
const c = Ct(a, p);
|
|
1660
|
+
wt(c);
|
|
1661
|
+
const r = Rt(a);
|
|
1662
|
+
Nt(r);
|
|
1663
|
+
const i = Lt(a, p);
|
|
1664
|
+
Mt(i);
|
|
1665
|
+
const y = Bt(p);
|
|
1666
|
+
Ot(y);
|
|
1667
|
+
const g = Me(), f = g.Delete, b = g.Backspace;
|
|
1668
|
+
return ae(f, () => {
|
|
1610
1669
|
if (!o.selectedId.value) return;
|
|
1611
1670
|
const v = document.activeElement;
|
|
1612
1671
|
if (v && (v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.tagName === "SELECT")) return;
|
|
1613
1672
|
const h = o.selectedId.value;
|
|
1614
1673
|
o.deselect(), p.removeElement(h);
|
|
1615
|
-
}),
|
|
1674
|
+
}), ae(b, () => {
|
|
1616
1675
|
if (!o.selectedId.value) return;
|
|
1617
1676
|
const v = document.activeElement;
|
|
1618
1677
|
if (v && (v.tagName === "INPUT" || v.tagName === "TEXTAREA" || v.tagName === "SELECT")) return;
|
|
1619
1678
|
const h = o.selectedId.value;
|
|
1620
1679
|
o.deselect(), p.removeElement(h);
|
|
1621
|
-
}),
|
|
1622
|
-
() =>
|
|
1680
|
+
}), Le(
|
|
1681
|
+
() => a.document,
|
|
1623
1682
|
() => {
|
|
1624
|
-
|
|
1683
|
+
l("update:modelValue", JSON.parse(JSON.stringify(J(a.document))));
|
|
1625
1684
|
},
|
|
1626
1685
|
{ deep: !0 }
|
|
1627
|
-
), (v, h) => (s(), d("div",
|
|
1628
|
-
B(
|
|
1629
|
-
m("div",
|
|
1630
|
-
B(
|
|
1631
|
-
B(
|
|
1686
|
+
), (v, h) => (s(), d("div", Ko, [
|
|
1687
|
+
B(Xo),
|
|
1688
|
+
m("div", Qo, [
|
|
1689
|
+
B(so),
|
|
1690
|
+
B(Ho)
|
|
1632
1691
|
])
|
|
1633
1692
|
]));
|
|
1634
1693
|
}
|
|
1635
|
-
}),
|
|
1694
|
+
}), er = /* @__PURE__ */ x(Zo, [["__scopeId", "data-v-f9b95ad8"]]), sr = {
|
|
1636
1695
|
install(e) {
|
|
1637
|
-
e.component("BrickPdf",
|
|
1696
|
+
e.component("BrickPdf", er);
|
|
1638
1697
|
}
|
|
1639
1698
|
};
|
|
1640
1699
|
export {
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1700
|
+
er as BrickPdf,
|
|
1701
|
+
ne as createDefaultDocument,
|
|
1702
|
+
sr as default,
|
|
1703
|
+
Be as getAllElementDefinitions,
|
|
1704
|
+
U as getElementDefinition,
|
|
1705
|
+
z as registerElement,
|
|
1706
|
+
rr as unregisterElement,
|
|
1707
|
+
lr as useClipboard,
|
|
1708
|
+
oe as useDocumentStore,
|
|
1709
|
+
xe as useDragDrop,
|
|
1710
|
+
q as useElementActions,
|
|
1711
|
+
xt as useHistory,
|
|
1712
|
+
zt as usePdfExport,
|
|
1713
|
+
ir as useResize,
|
|
1714
|
+
W as useSelection
|
|
1656
1715
|
};
|