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