print-canvas-designer 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/COMMERCIAL_LICENSE.md +47 -0
  2. package/LICENSE +37 -0
  3. package/README.md +147 -0
  4. package/THIRD_PARTY_NOTICES.md +20 -0
  5. package/dist/components/PrintDesigner.vue.d.ts +49 -0
  6. package/dist/components/PrintPreview.vue.d.ts +8 -0
  7. package/dist/editor/canvas/CanvasBarcodeElement.vue.d.ts +8 -0
  8. package/dist/editor/canvas/CanvasElement.vue.d.ts +10 -0
  9. package/dist/editor/canvas/CanvasPage.vue.d.ts +7 -0
  10. package/dist/editor/canvas/CanvasQrElement.vue.d.ts +6 -0
  11. package/dist/editor/canvas/CanvasTextElement.vue.d.ts +8 -0
  12. package/dist/editor/canvas/MoveableLayer.vue.d.ts +6 -0
  13. package/dist/editor/canvas/PrintCanvas.vue.d.ts +10 -0
  14. package/dist/editor/canvas/events.d.ts +9 -0
  15. package/dist/editor/core/defaults.d.ts +12 -0
  16. package/dist/editor/core/geometry.d.ts +7 -0
  17. package/dist/editor/core/history.d.ts +13 -0
  18. package/dist/editor/core/pluginOptions.d.ts +3 -0
  19. package/dist/editor/core/schema.d.ts +162 -0
  20. package/dist/editor/core/text.d.ts +17 -0
  21. package/dist/editor/core/units.d.ts +9 -0
  22. package/dist/editor/panels/ComponentShelf.vue.d.ts +2 -0
  23. package/dist/editor/panels/DesignerToolbar.vue.d.ts +2 -0
  24. package/dist/editor/panels/InspectorPanel.vue.d.ts +2 -0
  25. package/dist/editor/properties/AppearanceSection.vue.d.ts +6 -0
  26. package/dist/editor/properties/BaseSection.vue.d.ts +8 -0
  27. package/dist/editor/properties/CodeSection.vue.d.ts +6 -0
  28. package/dist/editor/properties/ComponentPropertySection.vue.d.ts +6 -0
  29. package/dist/editor/properties/GeometrySection.vue.d.ts +6 -0
  30. package/dist/editor/properties/TextSection.vue.d.ts +6 -0
  31. package/dist/editor/registry/components.d.ts +2 -0
  32. package/dist/editor/render/PrintElementContent.vue.d.ts +12 -0
  33. package/dist/editor/render/styles.d.ts +63 -0
  34. package/dist/editor/store/usePrintDesigner.d.ts +186 -0
  35. package/dist/editor/ui/BaseButton.vue.d.ts +21 -0
  36. package/dist/editor/ui/BaseColor.vue.d.ts +12 -0
  37. package/dist/editor/ui/BaseIconButton.vue.d.ts +8 -0
  38. package/dist/editor/ui/BaseIconGroup.vue.d.ts +14 -0
  39. package/dist/editor/ui/BaseInput.vue.d.ts +13 -0
  40. package/dist/editor/ui/BaseNumberInput.vue.d.ts +15 -0
  41. package/dist/editor/ui/BaseSegmented.vue.d.ts +14 -0
  42. package/dist/editor/ui/BaseSelect.vue.d.ts +14 -0
  43. package/dist/editor/ui/PropertyRow.vue.d.ts +20 -0
  44. package/dist/editor/ui/PropertySection.vue.d.ts +20 -0
  45. package/dist/favicon.ico +0 -0
  46. package/dist/favicon.svg +12 -0
  47. package/dist/html2canvas.esm-C4Mnoizn.cjs +22 -0
  48. package/dist/html2canvas.esm-dgT_1dIT.js +4871 -0
  49. package/dist/index-BEReyC5k.cjs +364 -0
  50. package/dist/index-DGkMLEeJ.js +18125 -0
  51. package/dist/index.cjs +1 -0
  52. package/dist/index.d.ts +13 -0
  53. package/dist/index.es-DGu5dqeR.js +6693 -0
  54. package/dist/index.es-Di9HyGPO.cjs +18 -0
  55. package/dist/index.mjs +21 -0
  56. package/dist/jspdf.es.min-BOsuRURv.js +10006 -0
  57. package/dist/jspdf.es.min-Cc_0fodg.cjs +217 -0
  58. package/dist/og-image.svg +56 -0
  59. package/dist/plugin.d.ts +9 -0
  60. package/dist/print-C0Dx8UZT.cjs +1 -0
  61. package/dist/print-CBevAO3L.js +705 -0
  62. package/dist/purify.es-BUDLCglq.cjs +3 -0
  63. package/dist/purify.es-CiEWEeUM.js +605 -0
  64. package/dist/robots.txt +4 -0
  65. package/dist/sitemap.xml +13 -0
  66. package/dist/style.css +1 -0
  67. package/package.json +57 -0
@@ -0,0 +1,705 @@
1
+ import { g as w } from "./index-DGkMLEeJ.js";
2
+ function C(v, j) {
3
+ for (var h = 0; h < j.length; h++) {
4
+ const d = j[h];
5
+ if (typeof d != "string" && !Array.isArray(d)) {
6
+ for (const n in d)
7
+ if (n !== "default" && !(n in v)) {
8
+ const o = Object.getOwnPropertyDescriptor(d, n);
9
+ o && Object.defineProperty(v, n, o.get ? o : {
10
+ enumerable: !0,
11
+ get: () => d[n]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var O = { exports: {} }, P;
19
+ function T() {
20
+ return P || (P = 1, (function(v, j) {
21
+ (function(d, n) {
22
+ v.exports = n();
23
+ })(window, function() {
24
+ return (
25
+ /******/
26
+ (function(h) {
27
+ var d = {};
28
+ function n(o) {
29
+ if (d[o])
30
+ return d[o].exports;
31
+ var a = d[o] = {
32
+ /******/
33
+ i: o,
34
+ /******/
35
+ l: !1,
36
+ /******/
37
+ exports: {}
38
+ /******/
39
+ };
40
+ return h[o].call(a.exports, a, a.exports, n), a.l = !0, a.exports;
41
+ }
42
+ return n.m = h, n.c = d, n.d = function(o, a, s) {
43
+ n.o(o, a) || Object.defineProperty(o, a, { enumerable: !0, get: s });
44
+ }, n.r = function(o) {
45
+ typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(o, "__esModule", { value: !0 });
46
+ }, n.t = function(o, a) {
47
+ if (a & 1 && (o = n(o)), a & 8 || a & 4 && typeof o == "object" && o && o.__esModule) return o;
48
+ var s = /* @__PURE__ */ Object.create(null);
49
+ if (n.r(s), Object.defineProperty(s, "default", { enumerable: !0, value: o }), a & 2 && typeof o != "string") for (var b in o) n.d(s, b, (function(i) {
50
+ return o[i];
51
+ }).bind(null, b));
52
+ return s;
53
+ }, n.n = function(o) {
54
+ var a = o && o.__esModule ? (
55
+ /******/
56
+ function() {
57
+ return o.default;
58
+ }
59
+ ) : (
60
+ /******/
61
+ function() {
62
+ return o;
63
+ }
64
+ );
65
+ return n.d(a, "a", a), a;
66
+ }, n.o = function(o, a) {
67
+ return Object.prototype.hasOwnProperty.call(o, a);
68
+ }, n.p = "", n(n.s = 0);
69
+ })({
70
+ /***/
71
+ "./src/index.js": (
72
+ /*!**********************!*\
73
+ !*** ./src/index.js ***!
74
+ \**********************/
75
+ /*! exports provided: default */
76
+ /***/
77
+ (function(h, d, n) {
78
+ n.r(d), n(
79
+ /*! ./sass/index.scss */
80
+ "./src/sass/index.scss"
81
+ );
82
+ var o = n(
83
+ /*! ./js/init */
84
+ "./src/js/init.js"
85
+ ), a = o.default.init;
86
+ typeof window < "u" && (window.printJS = a), d.default = a;
87
+ })
88
+ ),
89
+ /***/
90
+ "./src/js/browser.js": (
91
+ /*!***************************!*\
92
+ !*** ./src/js/browser.js ***!
93
+ \***************************/
94
+ /*! exports provided: default */
95
+ /***/
96
+ (function(h, d, n) {
97
+ n.r(d);
98
+ var o = {
99
+ // Firefox 1.0+
100
+ isFirefox: function() {
101
+ return typeof InstallTrigger < "u";
102
+ },
103
+ // Internet Explorer 6-11
104
+ isIE: function() {
105
+ return navigator.userAgent.indexOf("MSIE") !== -1 || !!document.documentMode;
106
+ },
107
+ // Edge 20+
108
+ isEdge: function() {
109
+ return !o.isIE() && !!window.StyleMedia;
110
+ },
111
+ // Chrome 1+
112
+ isChrome: function() {
113
+ var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window;
114
+ return !!s.chrome;
115
+ },
116
+ // At least Safari 3+: "[object HTMLElementConstructor]"
117
+ isSafari: function() {
118
+ return Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0 || navigator.userAgent.toLowerCase().indexOf("safari") !== -1;
119
+ },
120
+ // IOS Chrome
121
+ isIOSChrome: function() {
122
+ return navigator.userAgent.toLowerCase().indexOf("crios") !== -1;
123
+ }
124
+ };
125
+ d.default = o;
126
+ })
127
+ ),
128
+ /***/
129
+ "./src/js/functions.js": (
130
+ /*!*****************************!*\
131
+ !*** ./src/js/functions.js ***!
132
+ \*****************************/
133
+ /*! exports provided: addWrapper, capitalizePrint, collectStyles, addHeader, cleanUp, isRawHTML */
134
+ /***/
135
+ (function(h, d, n) {
136
+ n.r(d), n.d(d, "addWrapper", function() {
137
+ return b;
138
+ }), n.d(d, "capitalizePrint", function() {
139
+ return i;
140
+ }), n.d(d, "collectStyles", function() {
141
+ return l;
142
+ }), n.d(d, "addHeader", function() {
143
+ return e;
144
+ }), n.d(d, "cleanUp", function() {
145
+ return u;
146
+ }), n.d(d, "isRawHTML", function() {
147
+ return y;
148
+ });
149
+ var o = n(
150
+ /*! ./modal */
151
+ "./src/js/modal.js"
152
+ ), a = n(
153
+ /*! ./browser */
154
+ "./src/js/browser.js"
155
+ );
156
+ function s(t) {
157
+ "@babel/helpers - typeof";
158
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? s = function(c) {
159
+ return typeof c;
160
+ } : s = function(c) {
161
+ return c && typeof Symbol == "function" && c.constructor === Symbol && c !== Symbol.prototype ? "symbol" : typeof c;
162
+ }, s(t);
163
+ }
164
+ function b(t, f) {
165
+ var c = "font-family:" + f.font + " !important; font-size: " + f.font_size + " !important; width:100%;";
166
+ return '<div style="' + c + '">' + t + "</div>";
167
+ }
168
+ function i(t) {
169
+ return t.charAt(0).toUpperCase() + t.slice(1);
170
+ }
171
+ function l(t, f) {
172
+ for (var c = document.defaultView || window, E = "", p = c.getComputedStyle(t, ""), m = 0; m < p.length; m++)
173
+ (f.targetStyles.indexOf("*") !== -1 || f.targetStyle.indexOf(p[m]) !== -1 || r(f.targetStyles, p[m])) && p.getPropertyValue(p[m]) && (E += p[m] + ":" + p.getPropertyValue(p[m]) + ";");
174
+ return E += "max-width: " + f.maxWidth + "px !important; font-size: " + f.font_size + " !important;", E;
175
+ }
176
+ function r(t, f) {
177
+ for (var c = 0; c < t.length; c++)
178
+ if (s(f) === "object" && f.indexOf(t[c]) !== -1) return !0;
179
+ return !1;
180
+ }
181
+ function e(t, f) {
182
+ var c = document.createElement("div");
183
+ if (y(f.header))
184
+ c.innerHTML = f.header;
185
+ else {
186
+ var E = document.createElement("h1"), p = document.createTextNode(f.header);
187
+ E.appendChild(p), E.setAttribute("style", f.headerStyle), c.appendChild(E);
188
+ }
189
+ t.insertBefore(c, t.childNodes[0]);
190
+ }
191
+ function u(t) {
192
+ t.showModal && o.default.close(), t.onLoadingEnd && t.onLoadingEnd(), (t.showModal || t.onLoadingStart) && window.URL.revokeObjectURL(t.printable);
193
+ var f = "mouseover";
194
+ (a.default.isChrome() || a.default.isFirefox()) && (f = "focus");
195
+ var c = function E() {
196
+ window.removeEventListener(f, E), t.onPrintDialogClose();
197
+ var p = document.getElementById(t.frameId);
198
+ p && p.remove();
199
+ };
200
+ window.addEventListener(f, c);
201
+ }
202
+ function y(t) {
203
+ var f = new RegExp("<([A-Za-z][A-Za-z0-9]*)\\b[^>]*>(.*?)</\\1>");
204
+ return f.test(t);
205
+ }
206
+ })
207
+ ),
208
+ /***/
209
+ "./src/js/html.js": (
210
+ /*!************************!*\
211
+ !*** ./src/js/html.js ***!
212
+ \************************/
213
+ /*! exports provided: default */
214
+ /***/
215
+ (function(h, d, n) {
216
+ n.r(d);
217
+ var o = n(
218
+ /*! ./functions */
219
+ "./src/js/functions.js"
220
+ ), a = n(
221
+ /*! ./print */
222
+ "./src/js/print.js"
223
+ );
224
+ function s(l) {
225
+ "@babel/helpers - typeof";
226
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? s = function(e) {
227
+ return typeof e;
228
+ } : s = function(e) {
229
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
230
+ }, s(l);
231
+ }
232
+ d.default = {
233
+ print: function(r, e) {
234
+ var u = i(r.printable) ? r.printable : document.getElementById(r.printable);
235
+ if (!u) {
236
+ window.console.error("Invalid HTML element id: " + r.printable);
237
+ return;
238
+ }
239
+ r.printableElement = b(u, r), r.header && Object(o.addHeader)(r.printableElement, r), a.default.send(r, e);
240
+ }
241
+ };
242
+ function b(l, r) {
243
+ for (var e = l.cloneNode(), u = Array.prototype.slice.call(l.childNodes), y = 0; y < u.length; y++)
244
+ if (r.ignoreElements.indexOf(u[y].id) === -1) {
245
+ var t = b(u[y], r);
246
+ e.appendChild(t);
247
+ }
248
+ switch (r.scanStyles && l.nodeType === 1 && e.setAttribute("style", Object(o.collectStyles)(l, r)), l.tagName) {
249
+ case "SELECT":
250
+ e.value = l.value;
251
+ break;
252
+ case "CANVAS":
253
+ e.getContext("2d").drawImage(l, 0, 0);
254
+ break;
255
+ }
256
+ return e;
257
+ }
258
+ function i(l) {
259
+ return s(l) === "object" && l && (l instanceof HTMLElement || l.nodeType === 1);
260
+ }
261
+ })
262
+ ),
263
+ /***/
264
+ "./src/js/image.js": (
265
+ /*!*************************!*\
266
+ !*** ./src/js/image.js ***!
267
+ \*************************/
268
+ /*! exports provided: default */
269
+ /***/
270
+ (function(h, d, n) {
271
+ n.r(d);
272
+ var o = n(
273
+ /*! ./functions */
274
+ "./src/js/functions.js"
275
+ ), a = n(
276
+ /*! ./print */
277
+ "./src/js/print.js"
278
+ ), s = n(
279
+ /*! ./browser */
280
+ "./src/js/browser.js"
281
+ );
282
+ d.default = {
283
+ print: function(i, l) {
284
+ i.printable.constructor !== Array && (i.printable = [i.printable]), i.printableElement = document.createElement("div"), i.printable.forEach(function(r) {
285
+ var e = document.createElement("img");
286
+ if (e.setAttribute("style", i.imageStyle), e.src = r, s.default.isFirefox()) {
287
+ var u = e.src;
288
+ e.src = u;
289
+ }
290
+ var y = document.createElement("div");
291
+ y.appendChild(e), i.printableElement.appendChild(y);
292
+ }), i.header && Object(o.addHeader)(i.printableElement, i), a.default.send(i, l);
293
+ }
294
+ };
295
+ })
296
+ ),
297
+ /***/
298
+ "./src/js/init.js": (
299
+ /*!************************!*\
300
+ !*** ./src/js/init.js ***!
301
+ \************************/
302
+ /*! exports provided: default */
303
+ /***/
304
+ (function(h, d, n) {
305
+ n.r(d);
306
+ var o = n(
307
+ /*! ./browser */
308
+ "./src/js/browser.js"
309
+ ), a = n(
310
+ /*! ./modal */
311
+ "./src/js/modal.js"
312
+ ), s = n(
313
+ /*! ./pdf */
314
+ "./src/js/pdf.js"
315
+ ), b = n(
316
+ /*! ./html */
317
+ "./src/js/html.js"
318
+ ), i = n(
319
+ /*! ./raw-html */
320
+ "./src/js/raw-html.js"
321
+ ), l = n(
322
+ /*! ./image */
323
+ "./src/js/image.js"
324
+ ), r = n(
325
+ /*! ./json */
326
+ "./src/js/json.js"
327
+ );
328
+ function e(y) {
329
+ "@babel/helpers - typeof";
330
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? e = function(f) {
331
+ return typeof f;
332
+ } : e = function(f) {
333
+ return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f;
334
+ }, e(y);
335
+ }
336
+ var u = ["pdf", "html", "image", "json", "raw-html"];
337
+ d.default = {
338
+ init: function() {
339
+ var t = {
340
+ printable: null,
341
+ fallbackPrintable: null,
342
+ type: "pdf",
343
+ header: null,
344
+ headerStyle: "font-weight: 300;",
345
+ maxWidth: 800,
346
+ properties: null,
347
+ gridHeaderStyle: "font-weight: bold; padding: 5px; border: 1px solid #dddddd;",
348
+ gridStyle: "border: 1px solid lightgray; margin-bottom: -1px;",
349
+ showModal: !1,
350
+ onError: function(S) {
351
+ throw S;
352
+ },
353
+ onLoadingStart: null,
354
+ onLoadingEnd: null,
355
+ onPrintDialogClose: function() {
356
+ },
357
+ onIncompatibleBrowser: function() {
358
+ },
359
+ modalMessage: "Retrieving Document...",
360
+ frameId: "printJS",
361
+ printableElement: null,
362
+ documentTitle: "Document",
363
+ targetStyle: ["clear", "display", "width", "min-width", "height", "min-height", "max-height"],
364
+ targetStyles: ["border", "box", "break", "text-decoration"],
365
+ ignoreElements: [],
366
+ repeatTableHeader: !0,
367
+ css: null,
368
+ style: null,
369
+ scanStyles: !0,
370
+ base64: !1,
371
+ // Deprecated
372
+ onPdfOpen: null,
373
+ font: "TimesNewRoman",
374
+ font_size: "12pt",
375
+ honorMarginPadding: !0,
376
+ honorColor: !1,
377
+ imageStyle: "max-width: 100%;"
378
+ }, f = arguments[0];
379
+ if (f === void 0)
380
+ throw new Error("printJS expects at least 1 attribute.");
381
+ switch (e(f)) {
382
+ case "string":
383
+ t.printable = encodeURI(f), t.fallbackPrintable = t.printable, t.type = arguments[1] || t.type;
384
+ break;
385
+ case "object":
386
+ t.printable = f.printable, t.fallbackPrintable = typeof f.fallbackPrintable < "u" ? f.fallbackPrintable : t.printable, t.fallbackPrintable = t.base64 ? "data:application/pdf;base64,".concat(t.fallbackPrintable) : t.fallbackPrintable;
387
+ for (var c in t)
388
+ c === "printable" || c === "fallbackPrintable" || (t[c] = typeof f[c] < "u" ? f[c] : t[c]);
389
+ break;
390
+ default:
391
+ throw new Error('Unexpected argument type! Expected "string" or "object", got ' + e(f));
392
+ }
393
+ if (!t.printable) throw new Error("Missing printable information.");
394
+ if (!t.type || typeof t.type != "string" || u.indexOf(t.type.toLowerCase()) === -1)
395
+ throw new Error("Invalid print type. Available types are: pdf, html, image and json.");
396
+ t.showModal && a.default.show(t), t.onLoadingStart && t.onLoadingStart();
397
+ var E = document.getElementById(t.frameId);
398
+ E && E.parentNode.removeChild(E);
399
+ var p = document.createElement("iframe");
400
+ switch (o.default.isFirefox() ? p.setAttribute("style", "width: 1px; height: 100px; position: fixed; left: 0; top: 0; opacity: 0; border-width: 0; margin: 0; padding: 0") : p.setAttribute("style", "visibility: hidden; height: 0; width: 0; position: absolute; border: 0"), p.setAttribute("id", t.frameId), t.type !== "pdf" && (p.srcdoc = "<html><head><title>" + t.documentTitle + "</title>", t.css && (Array.isArray(t.css) || (t.css = [t.css]), t.css.forEach(function(g) {
401
+ p.srcdoc += '<link rel="stylesheet" href="' + g + '">';
402
+ })), p.srcdoc += "</head><body></body></html>"), t.type) {
403
+ case "pdf":
404
+ if (o.default.isIE())
405
+ try {
406
+ console.info("Print.js doesn't support PDF printing in Internet Explorer.");
407
+ var m = window.open(t.fallbackPrintable, "_blank");
408
+ m.focus(), t.onIncompatibleBrowser();
409
+ } catch (g) {
410
+ t.onError(g);
411
+ } finally {
412
+ t.showModal && a.default.close(), t.onLoadingEnd && t.onLoadingEnd();
413
+ }
414
+ else
415
+ s.default.print(t, p);
416
+ break;
417
+ case "image":
418
+ l.default.print(t, p);
419
+ break;
420
+ case "html":
421
+ b.default.print(t, p);
422
+ break;
423
+ case "raw-html":
424
+ i.default.print(t, p);
425
+ break;
426
+ case "json":
427
+ r.default.print(t, p);
428
+ break;
429
+ }
430
+ }
431
+ };
432
+ })
433
+ ),
434
+ /***/
435
+ "./src/js/json.js": (
436
+ /*!************************!*\
437
+ !*** ./src/js/json.js ***!
438
+ \************************/
439
+ /*! exports provided: default */
440
+ /***/
441
+ (function(h, d, n) {
442
+ n.r(d);
443
+ var o = n(
444
+ /*! ./functions */
445
+ "./src/js/functions.js"
446
+ ), a = n(
447
+ /*! ./print */
448
+ "./src/js/print.js"
449
+ );
450
+ function s(i) {
451
+ "@babel/helpers - typeof";
452
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? s = function(r) {
453
+ return typeof r;
454
+ } : s = function(r) {
455
+ return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
456
+ }, s(i);
457
+ }
458
+ d.default = {
459
+ print: function(l, r) {
460
+ if (s(l.printable) !== "object")
461
+ throw new Error("Invalid javascript data object (JSON).");
462
+ if (typeof l.repeatTableHeader != "boolean")
463
+ throw new Error("Invalid value for repeatTableHeader attribute (JSON).");
464
+ if (!l.properties || !Array.isArray(l.properties))
465
+ throw new Error("Invalid properties array for your JSON data.");
466
+ l.properties = l.properties.map(function(e) {
467
+ return {
468
+ field: s(e) === "object" ? e.field : e,
469
+ displayName: s(e) === "object" ? e.displayName : e,
470
+ columnSize: s(e) === "object" && e.columnSize ? e.columnSize + ";" : 100 / l.properties.length + "%;"
471
+ };
472
+ }), l.printableElement = document.createElement("div"), l.header && Object(o.addHeader)(l.printableElement, l), l.printableElement.innerHTML += b(l), a.default.send(l, r);
473
+ }
474
+ };
475
+ function b(i) {
476
+ var l = i.printable, r = i.properties, e = '<table style="border-collapse: collapse; width: 100%;">';
477
+ i.repeatTableHeader && (e += "<thead>"), e += "<tr>";
478
+ for (var u = 0; u < r.length; u++)
479
+ e += '<th style="width:' + r[u].columnSize + ";" + i.gridHeaderStyle + '">' + Object(o.capitalizePrint)(r[u].displayName) + "</th>";
480
+ e += "</tr>", i.repeatTableHeader && (e += "</thead>"), e += "<tbody>";
481
+ for (var y = 0; y < l.length; y++) {
482
+ e += "<tr>";
483
+ for (var t = 0; t < r.length; t++) {
484
+ var f = l[y], c = r[t].field.split(".");
485
+ if (c.length > 1)
486
+ for (var E = 0; E < c.length; E++)
487
+ f = f[c[E]];
488
+ else
489
+ f = f[r[t].field];
490
+ e += '<td style="width:' + r[t].columnSize + i.gridStyle + '">' + f + "</td>";
491
+ }
492
+ e += "</tr>";
493
+ }
494
+ return e += "</tbody></table>", e;
495
+ }
496
+ })
497
+ ),
498
+ /***/
499
+ "./src/js/modal.js": (
500
+ /*!*************************!*\
501
+ !*** ./src/js/modal.js ***!
502
+ \*************************/
503
+ /*! exports provided: default */
504
+ /***/
505
+ (function(h, d, n) {
506
+ n.r(d);
507
+ var o = {
508
+ show: function(s) {
509
+ var b = "font-family:sans-serif; display:table; text-align:center; font-weight:300; font-size:30px; left:0; top:0;position:fixed; z-index: 9990;color: #0460B5; width: 100%; height: 100%; background-color:rgba(255,255,255,.9);transition: opacity .3s ease;", i = document.createElement("div");
510
+ i.setAttribute("style", b), i.setAttribute("id", "printJS-Modal");
511
+ var l = document.createElement("div");
512
+ l.setAttribute("style", "display:table-cell; vertical-align:middle; padding-bottom:100px;");
513
+ var r = document.createElement("div");
514
+ r.setAttribute("class", "printClose"), r.setAttribute("id", "printClose"), l.appendChild(r);
515
+ var e = document.createElement("span");
516
+ e.setAttribute("class", "printSpinner"), l.appendChild(e);
517
+ var u = document.createTextNode(s.modalMessage);
518
+ l.appendChild(u), i.appendChild(l), document.getElementsByTagName("body")[0].appendChild(i), document.getElementById("printClose").addEventListener("click", function() {
519
+ o.close();
520
+ });
521
+ },
522
+ close: function() {
523
+ var s = document.getElementById("printJS-Modal");
524
+ s && s.parentNode.removeChild(s);
525
+ }
526
+ };
527
+ d.default = o;
528
+ })
529
+ ),
530
+ /***/
531
+ "./src/js/pdf.js": (
532
+ /*!***********************!*\
533
+ !*** ./src/js/pdf.js ***!
534
+ \***********************/
535
+ /*! exports provided: default */
536
+ /***/
537
+ (function(h, d, n) {
538
+ n.r(d);
539
+ var o = n(
540
+ /*! ./print */
541
+ "./src/js/print.js"
542
+ ), a = n(
543
+ /*! ./functions */
544
+ "./src/js/functions.js"
545
+ );
546
+ d.default = {
547
+ print: function(i, l) {
548
+ if (i.base64) {
549
+ var r = Uint8Array.from(atob(i.printable), function(u) {
550
+ return u.charCodeAt(0);
551
+ });
552
+ s(i, l, r);
553
+ return;
554
+ }
555
+ i.printable = /^(blob|http|\/\/)/i.test(i.printable) ? i.printable : window.location.origin + (i.printable.charAt(0) !== "/" ? "/" + i.printable : i.printable);
556
+ var e = new window.XMLHttpRequest();
557
+ e.responseType = "arraybuffer", e.addEventListener("error", function() {
558
+ Object(a.cleanUp)(i), i.onError(e.statusText, e);
559
+ }), e.addEventListener("load", function() {
560
+ if ([200, 201].indexOf(e.status) === -1) {
561
+ Object(a.cleanUp)(i), i.onError(e.statusText, e);
562
+ return;
563
+ }
564
+ s(i, l, e.response);
565
+ }), e.open("GET", i.printable, !0), e.send();
566
+ }
567
+ };
568
+ function s(b, i, l) {
569
+ var r = new window.Blob([l], {
570
+ type: "application/pdf"
571
+ });
572
+ r = window.URL.createObjectURL(r), i.setAttribute("src", r), o.default.send(b, i);
573
+ }
574
+ })
575
+ ),
576
+ /***/
577
+ "./src/js/print.js": (
578
+ /*!*************************!*\
579
+ !*** ./src/js/print.js ***!
580
+ \*************************/
581
+ /*! exports provided: default */
582
+ /***/
583
+ (function(h, d, n) {
584
+ n.r(d);
585
+ var o = n(
586
+ /*! ./browser */
587
+ "./src/js/browser.js"
588
+ ), a = n(
589
+ /*! ./functions */
590
+ "./src/js/functions.js"
591
+ ), s = {
592
+ send: function(e, u) {
593
+ document.getElementsByTagName("body")[0].appendChild(u);
594
+ var y = document.getElementById(e.frameId);
595
+ y.onload = function() {
596
+ if (e.type === "pdf") {
597
+ o.default.isFirefox() ? setTimeout(function() {
598
+ return b(y, e);
599
+ }, 1e3) : b(y, e);
600
+ return;
601
+ }
602
+ var t = y.contentWindow || y.contentDocument;
603
+ if (t.document && (t = t.document), t.body.appendChild(e.printableElement), e.type !== "pdf" && e.style) {
604
+ var f = document.createElement("style");
605
+ f.innerHTML = e.style, t.head.appendChild(f);
606
+ }
607
+ var c = t.getElementsByTagName("img");
608
+ c.length > 0 ? i(Array.from(c)).then(function() {
609
+ return b(y, e);
610
+ }) : b(y, e);
611
+ };
612
+ }
613
+ };
614
+ function b(r, e) {
615
+ try {
616
+ if (r.focus(), o.default.isEdge() || o.default.isIE())
617
+ try {
618
+ r.contentWindow.document.execCommand("print", !1, null);
619
+ } catch {
620
+ r.contentWindow.print();
621
+ }
622
+ else
623
+ r.contentWindow.print();
624
+ } catch (u) {
625
+ e.onError(u);
626
+ } finally {
627
+ o.default.isFirefox() && (r.style.visibility = "hidden", r.style.left = "-1px"), Object(a.cleanUp)(e);
628
+ }
629
+ }
630
+ function i(r) {
631
+ var e = r.map(function(u) {
632
+ if (u.src && u.src !== window.location.href)
633
+ return l(u);
634
+ });
635
+ return Promise.all(e);
636
+ }
637
+ function l(r) {
638
+ return new Promise(function(e) {
639
+ var u = function y() {
640
+ !r || typeof r.naturalWidth > "u" || r.naturalWidth === 0 || !r.complete ? setTimeout(y, 500) : e();
641
+ };
642
+ u();
643
+ });
644
+ }
645
+ d.default = s;
646
+ })
647
+ ),
648
+ /***/
649
+ "./src/js/raw-html.js": (
650
+ /*!****************************!*\
651
+ !*** ./src/js/raw-html.js ***!
652
+ \****************************/
653
+ /*! exports provided: default */
654
+ /***/
655
+ (function(h, d, n) {
656
+ n.r(d);
657
+ var o = n(
658
+ /*! ./print */
659
+ "./src/js/print.js"
660
+ );
661
+ d.default = {
662
+ print: function(s, b) {
663
+ s.printableElement = document.createElement("div"), s.printableElement.setAttribute("style", "width:100%"), s.printableElement.innerHTML = s.printable, o.default.send(s, b);
664
+ }
665
+ };
666
+ })
667
+ ),
668
+ /***/
669
+ "./src/sass/index.scss": (
670
+ /*!*****************************!*\
671
+ !*** ./src/sass/index.scss ***!
672
+ \*****************************/
673
+ /*! no static exports found */
674
+ /***/
675
+ (function(h, d, n) {
676
+ })
677
+ ),
678
+ /***/
679
+ 0: (
680
+ /*!****************************!*\
681
+ !*** multi ./src/index.js ***!
682
+ \****************************/
683
+ /*! no static exports found */
684
+ /***/
685
+ (function(h, d, n) {
686
+ h.exports = n(
687
+ /*! ./src/index.js */
688
+ "./src/index.js"
689
+ );
690
+ })
691
+ )
692
+ /******/
693
+ }).default
694
+ );
695
+ });
696
+ })(O)), O.exports;
697
+ }
698
+ var M = T();
699
+ const A = /* @__PURE__ */ w(M), L = /* @__PURE__ */ C({
700
+ __proto__: null,
701
+ default: A
702
+ }, [M]);
703
+ export {
704
+ L as p
705
+ };