@flowselections/pick-schermen-kwekers 1.0.4 → 1.0.6

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.
@@ -212,22 +212,22 @@ export function renderLayoutHtml(resolved, data, locale = "nl-NL") {
212
212
  const body = resolved.elements
213
213
  .map((el) => renderElement(el, resolved, data, locale))
214
214
  .join("\n");
215
- return `<!DOCTYPE html>
216
- <html lang="nl"><head><meta charset="utf-8" />
217
- <title>${esc(layout.naam)}</title>
218
- <style>
219
- @page { size: ${w}mm ${h}mm; margin: 0; }
220
- * { box-sizing: border-box; }
221
- html, body { margin: 0; padding: 0; }
222
- body { font-family: ${baseFont}; font-size: ${baseSize}pt; color: #000; }
223
- .page { position: relative; width: ${w}mm; height: ${h}mm; overflow: hidden; }
224
- .content { position: absolute; left: ${ml}mm; top: ${mt}mm; right: ${mr}mm; bottom: ${mb}mm; }
225
- .el { position: absolute; white-space: pre-wrap; }
226
- .lbl { font-weight: 600; }
227
- .lay-table { width: 100%; border-collapse: collapse; font-size: inherit; }
228
- .lay-table th, .lay-table td { padding: 1mm 1.5mm; border-bottom: 0.2mm solid #999; vertical-align: top; }
229
- .barcode { font-family: "Libre Barcode 39", monospace; font-size: 30pt; letter-spacing: 4px; line-height: 1; }
230
- .barcode-text { font-size: 8pt; letter-spacing: 2px; }
231
- </style></head>
215
+ return `<!DOCTYPE html>
216
+ <html lang="nl"><head><meta charset="utf-8" />
217
+ <title>${esc(layout.naam)}</title>
218
+ <style>
219
+ @page { size: ${w}mm ${h}mm; margin: 0; }
220
+ * { box-sizing: border-box; }
221
+ html, body { margin: 0; padding: 0; }
222
+ body { font-family: ${baseFont}; font-size: ${baseSize}pt; color: #000; }
223
+ .page { position: relative; width: ${w}mm; height: ${h}mm; overflow: hidden; }
224
+ .content { position: absolute; left: ${ml}mm; top: ${mt}mm; right: ${mr}mm; bottom: ${mb}mm; }
225
+ .el { position: absolute; white-space: pre-wrap; }
226
+ .lbl { font-weight: 600; }
227
+ .lay-table { width: 100%; border-collapse: collapse; font-size: inherit; }
228
+ .lay-table th, .lay-table td { padding: 1mm 1.5mm; border-bottom: 0.2mm solid #999; vertical-align: top; }
229
+ .barcode { font-family: "Libre Barcode 39", monospace; font-size: 30pt; letter-spacing: 4px; line-height: 1; }
230
+ .barcode-text { font-size: 8pt; letter-spacing: 2px; }
231
+ </style></head>
232
232
  <body><div class="page"><div class="content">${body}</div></div></body></html>`;
233
233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/pick-schermen-kwekers",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "flowselections": {
5
5
  "moduleId": "pick-schermen",
6
6
  "pages": [
@@ -63,7 +63,7 @@
63
63
  "@cloudflare/vite-plugin": "^1.25.5",
64
64
  "@eslint/js": "^9.32.0",
65
65
  "@flowselections/core": "1.0.16",
66
- "@lovable.dev/vite-tanstack-config": "2.9.0",
66
+ "@lovable.dev/vite-tanstack-config": "2.9.1",
67
67
  "@rsbuild/core": "^1.0.0",
68
68
  "@tailwindcss/vite": "^4.2.1",
69
69
  "@tanstack/react-query": "^5.83.0",
@@ -1,2 +0,0 @@
1
- export declare function TemplateModulePage(): import("react").JSX.Element;
2
- //# sourceMappingURL=TemplateModulePage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplateModulePage.d.ts","sourceRoot":"","sources":["../../src/components/TemplateModulePage.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,kBAAkB,gCAmFjC"}
@@ -1,44 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- // ============================================================================
3
- // src/components/TemplateModulePage.tsx — EXAMPLE PAGE COMPONENT
4
- // ============================================================================
5
- // Pagina-componenten horen in src/components/, NIET alleen in src/routes/.
6
- // src/routes/ wordt NIET naar npm gepubliceerd (zie tsconfig.build.json exclude).
7
- //
8
- // GEEN <Header /> hier — die zit in _authenticated.tsx via staticData.title
9
- // ============================================================================
10
- import { useState, useEffect } from "react";
11
- import { useAuth, supabase, Button, Card, CardContent, CardHeader, CardTitle, toast, } from "@flowselections/core";
12
- import { TemplateModuleLogo } from './TemplateModuleLogo';
13
- export function TemplateModulePage() {
14
- // Auth is guaranteed — this user is already logged in
15
- const { user, isAdmin } = useAuth();
16
- // Example state — replace with your own
17
- const [items, setItems] = useState([]);
18
- const [loading, setLoading] = useState(true);
19
- useEffect(() => {
20
- loadData();
21
- }, []);
22
- const loadData = async () => {
23
- setLoading(true);
24
- try {
25
- // Example query — replace "products" with your table
26
- const { data, error } = await supabase
27
- .from("products")
28
- .select("*")
29
- .limit(10);
30
- if (error)
31
- throw error;
32
- // ✅ Altijd Array.isArray bewaken op server-function data
33
- // const safeItems = Array.isArray(data?.items) ? data.items : [];
34
- setItems(Array.isArray(data) ? data : []);
35
- }
36
- catch {
37
- toast.error("Fout bij het laden van gegevens");
38
- }
39
- finally {
40
- setLoading(false);
41
- }
42
- };
43
- return (_jsxs("main", { className: "p-6 space-y-6", children: [isAdmin && (_jsxs("div", { className: "text-sm text-muted-foreground", children: ["Ingelogd als admin: ", user?.email] })), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Overzicht" }) }), _jsxs(CardContent, { children: [loading ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Laden..." })) : items.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: "Geen gegevens gevonden." })) : (_jsxs("p", { className: "text-sm", children: [items.length, " items geladen."] })), _jsx(Button, { onClick: loadData, className: "mt-4", disabled: loading, children: "Vernieuwen" })] })] }), _jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [_jsx(TemplateModuleLogo, { className: "w-6 h-6 text-primary" }), _jsx("span", { children: "SVG-component (voorkeur voor vector-logo's)" })] })] }));
44
- }