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