@flowselections/layout-maker 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -132
- package/dist-lib/components/PrinterSetupWizard.js +1 -1
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -1
- package/dist-lib/lib/aiLayout.server.js +9 -9
- package/dist-lib/lib/browserPrint.js +5 -5
- package/dist-lib/lib/layoutPreview.js +7 -7
- package/dist-lib/lib/pakbonHtml.js +50 -50
- package/dist-lib/lib/printService.functions.d.ts.map +1 -1
- package/dist-lib/lib/productiebonHtml.js +15 -15
- package/dist-lib/lib/profielHtml.js +18 -18
- package/dist-lib/lib/supabaseAdmin.server.d.ts +5 -5
- package/dist-lib/lib/supabaseAdmin.server.js +43 -43
- package/dist-lib/lib/testpagina.js +1 -1
- package/package.json +2 -2
|
@@ -79,8 +79,8 @@ function elementHtml(el, ctx) {
|
|
|
79
79
|
case "cirkel":
|
|
80
80
|
return `<div style="${base};border-radius:50%;border:${s.randbreedte || 0.3}mm solid ${s.randkleur ?? "#111827"}"></div>`;
|
|
81
81
|
case "barcode":
|
|
82
|
-
return `<div style="${base};display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:monospace">
|
|
83
|
-
<div style="width:100%;height:70%;background:repeating-linear-gradient(90deg,#111 0 1.2px,#fff 1.2px 3px)"></div>
|
|
82
|
+
return `<div style="${base};display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:monospace">
|
|
83
|
+
<div style="width:100%;height:70%;background:repeating-linear-gradient(90deg,#111 0 1.2px,#fff 1.2px 3px)"></div>
|
|
84
84
|
<div style="font-size:7pt">${esc(inhoud)}</div></div>`;
|
|
85
85
|
case "qrcode":
|
|
86
86
|
return `<div style="${base};background:repeating-conic-gradient(#111 0% 25%, #fff 0% 50%) 0 0/22% 22%"></div>`;
|
|
@@ -125,10 +125,10 @@ export function bouwDocumentHtml(layout, elementen, gegevens) {
|
|
|
125
125
|
const body = zichtbaar.map((e) => elementHtml(e, ctx)).join("");
|
|
126
126
|
const b = layout.orientatie === "landscape" ? layout.hoogte_mm : layout.breedte_mm;
|
|
127
127
|
const h = layout.orientatie === "landscape" ? layout.breedte_mm : layout.hoogte_mm;
|
|
128
|
-
return `<!doctype html><html lang="nl"><head><meta charset="utf-8"><title>${esc(layout.naam)}</title>
|
|
129
|
-
<style>@page{size:${b}mm ${h}mm;margin:0}
|
|
130
|
-
body{margin:0;background:#e5e7eb}
|
|
131
|
-
.pagina{position:relative;width:${b}mm;height:${h}mm;background:#fff;margin:0 auto;overflow:hidden}
|
|
132
|
-
@media print{body{background:#fff}}</style></head>
|
|
128
|
+
return `<!doctype html><html lang="nl"><head><meta charset="utf-8"><title>${esc(layout.naam)}</title>
|
|
129
|
+
<style>@page{size:${b}mm ${h}mm;margin:0}
|
|
130
|
+
body{margin:0;background:#e5e7eb}
|
|
131
|
+
.pagina{position:relative;width:${b}mm;height:${h}mm;background:#fff;margin:0 auto;overflow:hidden}
|
|
132
|
+
@media print{body{background:#fff}}</style></head>
|
|
133
133
|
<body><div class="pagina">${body}</div></body></html>`;
|
|
134
134
|
}
|
|
@@ -640,56 +640,56 @@ export function renderPakbonDocument(config, order, opties = {}) {
|
|
|
640
640
|
const font = opties.lettertype ?? 'Arial, Helvetica, "Segoe UI", sans-serif';
|
|
641
641
|
const grootte = opties.lettergrootte ?? 8.5;
|
|
642
642
|
const body = renderPakbonBody(config, order, opties);
|
|
643
|
-
return `<!doctype html><html lang="nl"><head><meta charset="utf-8" />
|
|
644
|
-
<title>${esc(opties.titel ?? "Pakbon")}</title>
|
|
645
|
-
<style>
|
|
646
|
-
@page { size: ${b}mm ${h}mm; margin: ${marge}mm; }
|
|
647
|
-
* { box-sizing: border-box; }
|
|
648
|
-
html, body { margin: 0; padding: 0; }
|
|
649
|
-
body { font-family: ${font}; font-size: ${grootte}pt; color: #111827; line-height: 1.35; }
|
|
650
|
-
.blok { margin-bottom: 2mm; }
|
|
651
|
-
.sectitel { font-size: 90%; font-weight: 600; text-transform: uppercase; color: #6b7280; margin-bottom: 0.6mm; }
|
|
652
|
-
.vet { font-weight: 600; }
|
|
653
|
-
.kv { display: flex; justify-content: space-between; gap: 3mm; }
|
|
654
|
-
.kv .k { color: #6b7280; }
|
|
655
|
-
.kv .v { font-weight: 500; }
|
|
656
|
-
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6mm; }
|
|
657
|
-
.kader { border: 0.25mm solid #d1d5db; border-radius: 1mm; padding: 1.5mm; }
|
|
658
|
-
table.regels { width: 100%; border-collapse: collapse; }
|
|
659
|
-
table.regels.vast { table-layout: fixed; }
|
|
660
|
-
table.regels.vast td, table.regels.vast th { overflow-wrap: anywhere; }
|
|
661
|
-
table.regels th, table.regels td { padding: 0.7mm 1mm; vertical-align: top; }
|
|
662
|
-
table.regels th { font-size: 90%; text-transform: uppercase; color: #6b7280; font-weight: 600; text-align: left; }
|
|
663
|
-
.rand { border: 0.2mm solid #d1d5db; }
|
|
664
|
-
.onder { border-bottom: 0.2mm solid #d1d5db; }
|
|
665
|
-
table.regels.compact th, table.regels.compact td { padding: 0.3mm 0.8mm; }
|
|
666
|
-
tr.zebra td { background: #f3f4f6; }
|
|
667
|
-
.plijst { margin: 0; padding-left: 4mm; }
|
|
668
|
-
.groep { margin-bottom: 1.5mm; }
|
|
669
|
-
.regelrij { display: flex; gap: 2mm; }
|
|
670
|
-
.tweekolom { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
|
|
671
|
-
.karblok { margin-bottom: 2mm; }
|
|
672
|
-
.karblok.omkaderd { border: 0.25mm solid #d1d5db; border-radius: 1mm; padding: 1.5mm; }
|
|
673
|
-
.karkop { display: flex; justify-content: space-between; align-items: center; padding: 0.8mm 1.5mm; border-radius: 1mm; margin-bottom: 1mm; }
|
|
674
|
-
.bundel { display: inline-block; border: 0.3mm dashed #6b7280; border-radius: 1mm; padding: 0.4mm 1.5mm; margin-bottom: 1mm; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2mm; font-size: 90%; }
|
|
675
|
-
.laag { margin-bottom: 1.5mm; }
|
|
676
|
-
.laagkop { display: flex; justify-content: space-between; font-weight: 500; border-bottom: 0.2mm solid #d1d5db; padding-bottom: 0.4mm; margin-bottom: 0.6mm; }
|
|
677
|
-
.laagkop.compact { border-bottom: none; }
|
|
678
|
-
.meta { display: flex; gap: 3mm; font-size: 88%; font-weight: 400; color: #4b5563; }
|
|
679
|
-
.totalen { display: flex; flex-wrap: wrap; gap: 5mm; border-top: 0.25mm solid #d1d5db; padding-top: 1.2mm; font-weight: 500; }
|
|
680
|
-
.paginavoet { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; }
|
|
681
|
-
.handtekening { margin-top: 3mm; }
|
|
682
|
-
.lijnveld { margin-top: 4mm; border-bottom: 0.25mm solid #6b7280; padding-bottom: 3mm; }
|
|
683
|
-
.lijnveld.hoog { padding-bottom: 10mm; }
|
|
684
|
-
.lijn { border-top: 0.25mm solid #d1d5db; margin: 1.5mm 0; }
|
|
685
|
-
.balk { height: 1mm; background: #374151; margin: 1.5mm 0; }
|
|
686
|
-
.qr { border: 0.25mm dashed #9ca3af; }
|
|
687
|
-
.streepjes { width: 45mm; background: repeating-linear-gradient(to right, #111827 0 2px, transparent 2px 5px); }
|
|
688
|
-
.klein { font-size: 85%; color: #6b7280; }
|
|
689
|
-
.breekvoor { break-before: page; page-break-before: always; }
|
|
690
|
-
.heelhouden { break-inside: avoid; page-break-inside: avoid; }
|
|
691
|
-
img { max-width: 100%; }
|
|
692
|
-
</style></head>
|
|
643
|
+
return `<!doctype html><html lang="nl"><head><meta charset="utf-8" />
|
|
644
|
+
<title>${esc(opties.titel ?? "Pakbon")}</title>
|
|
645
|
+
<style>
|
|
646
|
+
@page { size: ${b}mm ${h}mm; margin: ${marge}mm; }
|
|
647
|
+
* { box-sizing: border-box; }
|
|
648
|
+
html, body { margin: 0; padding: 0; }
|
|
649
|
+
body { font-family: ${font}; font-size: ${grootte}pt; color: #111827; line-height: 1.35; }
|
|
650
|
+
.blok { margin-bottom: 2mm; }
|
|
651
|
+
.sectitel { font-size: 90%; font-weight: 600; text-transform: uppercase; color: #6b7280; margin-bottom: 0.6mm; }
|
|
652
|
+
.vet { font-weight: 600; }
|
|
653
|
+
.kv { display: flex; justify-content: space-between; gap: 3mm; }
|
|
654
|
+
.kv .k { color: #6b7280; }
|
|
655
|
+
.kv .v { font-weight: 500; }
|
|
656
|
+
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6mm; }
|
|
657
|
+
.kader { border: 0.25mm solid #d1d5db; border-radius: 1mm; padding: 1.5mm; }
|
|
658
|
+
table.regels { width: 100%; border-collapse: collapse; }
|
|
659
|
+
table.regels.vast { table-layout: fixed; }
|
|
660
|
+
table.regels.vast td, table.regels.vast th { overflow-wrap: anywhere; }
|
|
661
|
+
table.regels th, table.regels td { padding: 0.7mm 1mm; vertical-align: top; }
|
|
662
|
+
table.regels th { font-size: 90%; text-transform: uppercase; color: #6b7280; font-weight: 600; text-align: left; }
|
|
663
|
+
.rand { border: 0.2mm solid #d1d5db; }
|
|
664
|
+
.onder { border-bottom: 0.2mm solid #d1d5db; }
|
|
665
|
+
table.regels.compact th, table.regels.compact td { padding: 0.3mm 0.8mm; }
|
|
666
|
+
tr.zebra td { background: #f3f4f6; }
|
|
667
|
+
.plijst { margin: 0; padding-left: 4mm; }
|
|
668
|
+
.groep { margin-bottom: 1.5mm; }
|
|
669
|
+
.regelrij { display: flex; gap: 2mm; }
|
|
670
|
+
.tweekolom { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
|
|
671
|
+
.karblok { margin-bottom: 2mm; }
|
|
672
|
+
.karblok.omkaderd { border: 0.25mm solid #d1d5db; border-radius: 1mm; padding: 1.5mm; }
|
|
673
|
+
.karkop { display: flex; justify-content: space-between; align-items: center; padding: 0.8mm 1.5mm; border-radius: 1mm; margin-bottom: 1mm; }
|
|
674
|
+
.bundel { display: inline-block; border: 0.3mm dashed #6b7280; border-radius: 1mm; padding: 0.4mm 1.5mm; margin-bottom: 1mm; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2mm; font-size: 90%; }
|
|
675
|
+
.laag { margin-bottom: 1.5mm; }
|
|
676
|
+
.laagkop { display: flex; justify-content: space-between; font-weight: 500; border-bottom: 0.2mm solid #d1d5db; padding-bottom: 0.4mm; margin-bottom: 0.6mm; }
|
|
677
|
+
.laagkop.compact { border-bottom: none; }
|
|
678
|
+
.meta { display: flex; gap: 3mm; font-size: 88%; font-weight: 400; color: #4b5563; }
|
|
679
|
+
.totalen { display: flex; flex-wrap: wrap; gap: 5mm; border-top: 0.25mm solid #d1d5db; padding-top: 1.2mm; font-weight: 500; }
|
|
680
|
+
.paginavoet { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; }
|
|
681
|
+
.handtekening { margin-top: 3mm; }
|
|
682
|
+
.lijnveld { margin-top: 4mm; border-bottom: 0.25mm solid #6b7280; padding-bottom: 3mm; }
|
|
683
|
+
.lijnveld.hoog { padding-bottom: 10mm; }
|
|
684
|
+
.lijn { border-top: 0.25mm solid #d1d5db; margin: 1.5mm 0; }
|
|
685
|
+
.balk { height: 1mm; background: #374151; margin: 1.5mm 0; }
|
|
686
|
+
.qr { border: 0.25mm dashed #9ca3af; }
|
|
687
|
+
.streepjes { width: 45mm; background: repeating-linear-gradient(to right, #111827 0 2px, transparent 2px 5px); }
|
|
688
|
+
.klein { font-size: 85%; color: #6b7280; }
|
|
689
|
+
.breekvoor { break-before: page; page-break-before: always; }
|
|
690
|
+
.heelhouden { break-inside: avoid; page-break-inside: avoid; }
|
|
691
|
+
img { max-width: 100%; }
|
|
692
|
+
</style></head>
|
|
693
693
|
<body>${body}</body></html>`;
|
|
694
694
|
}
|
|
695
695
|
/** Handig voor testen: het document met de voorbeeldgegevens. */
|