@flowselections/layout-maker 1.7.1 → 1.7.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.
Files changed (95) hide show
  1. package/README.md +69 -54
  2. package/dist-lib/components/AfdrukKnop.d.ts +1 -1
  3. package/dist-lib/components/AfdrukKnop.js +2 -2
  4. package/dist-lib/components/AiLayoutImportDialog.js +4 -4
  5. package/dist-lib/components/BlokOntwerperPage.js +5 -5
  6. package/dist-lib/components/ComputersLijst.js +2 -2
  7. package/dist-lib/components/DocumentSettingsPanel.d.ts +2 -2
  8. package/dist-lib/components/DocumentSettingsPanel.js +3 -3
  9. package/dist-lib/components/FormaatOrientatieBar.d.ts +1 -1
  10. package/dist-lib/components/FormaatOrientatieBar.js +2 -2
  11. package/dist-lib/components/LayoutsPage.js +4 -4
  12. package/dist-lib/components/LogoBibliotheekDialog.d.ts +1 -1
  13. package/dist-lib/components/LogoBibliotheekDialog.js +2 -2
  14. package/dist-lib/components/LogosPage.d.ts +1 -1
  15. package/dist-lib/components/LogosPage.js +2 -2
  16. package/dist-lib/components/NetwerkPrintersDialog.js +2 -2
  17. package/dist-lib/components/PakbonBuilderPage.js +8 -8
  18. package/dist-lib/components/PakbonPreview.d.ts +1 -1
  19. package/dist-lib/components/PakbonPreview.js +3 -3
  20. package/dist-lib/components/PakbonSectiesPanel.d.ts +1 -1
  21. package/dist-lib/components/PakbonSectiesPanel.js +4 -4
  22. package/dist-lib/components/PrintQueuePage.d.ts.map +1 -1
  23. package/dist-lib/components/PrintQueuePage.js +7 -6
  24. package/dist-lib/components/PrinterSetupWizard.js +6 -6
  25. package/dist-lib/components/PrintersPage.js +7 -7
  26. package/dist-lib/components/ProductiebonBlokkenPanel.d.ts +1 -1
  27. package/dist-lib/components/ProductiebonBlokkenPanel.js +1 -1
  28. package/dist-lib/components/ProductiebonBuilderPage.js +6 -6
  29. package/dist-lib/components/ProductiebonPreview.d.ts +1 -1
  30. package/dist-lib/components/ProductiebonPreview.js +2 -2
  31. package/dist-lib/components/WerkplekConfiguratiePage.js +7 -7
  32. package/dist-lib/index.d.ts +62 -47
  33. package/dist-lib/index.d.ts.map +1 -1
  34. package/dist-lib/index.js +47 -48
  35. package/dist-lib/integrations/supabase/auth-attacher.js +1 -1
  36. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1302 -749
  37. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  38. package/dist-lib/integrations/supabase/client.d.ts +1 -1
  39. package/dist-lib/integrations/supabase/client.js +1 -1
  40. package/dist-lib/integrations/supabase/client.server.d.ts +1302 -749
  41. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  42. package/dist-lib/integrations/supabase/client.server.js +1 -1
  43. package/dist-lib/integrations/supabase/types.d.ts +685 -127
  44. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  45. package/dist-lib/lib/aiLayout.functions.d.ts +1385 -832
  46. package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/aiLayout.functions.js +2 -2
  48. package/dist-lib/lib/aiLayout.server.d.ts +1 -1
  49. package/dist-lib/lib/aiLayout.server.js +9 -9
  50. package/dist-lib/lib/browserPrint.d.ts +1 -1
  51. package/dist-lib/lib/browserPrint.js +8 -8
  52. package/dist-lib/lib/directPrint.d.ts +1 -1
  53. package/dist-lib/lib/directPrint.js +4 -4
  54. package/dist-lib/lib/documentPdf.d.ts +1 -1
  55. package/dist-lib/lib/documentProfiles.d.ts +1 -1
  56. package/dist-lib/lib/formaatPrinters.js +1 -1
  57. package/dist-lib/lib/htmlNaarPdf.server.js +1 -1
  58. package/dist-lib/lib/layoutPreview.d.ts +1 -1
  59. package/dist-lib/lib/layoutPreview.js +8 -8
  60. package/dist-lib/lib/logoLibrary.js +1 -1
  61. package/dist-lib/lib/orderData.server.d.ts +2 -1
  62. package/dist-lib/lib/orderData.server.d.ts.map +1 -1
  63. package/dist-lib/lib/orderData.server.js +7 -8
  64. package/dist-lib/lib/pakbonBuilder.d.ts +1 -1
  65. package/dist-lib/lib/pakbonHtml.d.ts +1 -1
  66. package/dist-lib/lib/pakbonHtml.js +52 -52
  67. package/dist-lib/lib/printApi.d.ts +1 -1
  68. package/dist-lib/lib/printApi.js +3 -3
  69. package/dist-lib/lib/printQueue.server.d.ts +12 -3
  70. package/dist-lib/lib/printQueue.server.d.ts.map +1 -1
  71. package/dist-lib/lib/printQueue.server.js +66 -48
  72. package/dist-lib/lib/printService.functions.d.ts +5539 -24425
  73. package/dist-lib/lib/printService.functions.d.ts.map +1 -1
  74. package/dist-lib/lib/printService.functions.js +5 -31
  75. package/dist-lib/lib/printService.server.js +1 -1
  76. package/dist-lib/lib/productiebonBuilder.d.ts +1 -1
  77. package/dist-lib/lib/productiebonHtml.js +17 -17
  78. package/dist-lib/lib/profielHtml.js +20 -20
  79. package/dist-lib/lib/queueTick.d.ts +11 -3
  80. package/dist-lib/lib/queueTick.d.ts.map +1 -1
  81. package/dist-lib/lib/queueTick.js +68 -21
  82. package/dist-lib/lib/queueTickClient.d.ts +8 -0
  83. package/dist-lib/lib/queueTickClient.d.ts.map +1 -0
  84. package/dist-lib/lib/queueTickClient.js +37 -0
  85. package/dist-lib/lib/runnerRegistry.server.d.ts +3 -2
  86. package/dist-lib/lib/runnerRegistry.server.d.ts.map +1 -1
  87. package/dist-lib/lib/runnerRegistry.server.js +6 -8
  88. package/dist-lib/lib/supabaseAdmin.server.d.ts +5 -5
  89. package/dist-lib/lib/supabaseAdmin.server.js +43 -43
  90. package/dist-lib/lib/supabaseClient.d.ts +1 -1
  91. package/dist-lib/lib/testpagina.js +3 -3
  92. package/dist-lib/lib/useDocumentData.d.ts +1 -1
  93. package/dist-lib/lib/useDocumentData.js +1 -1
  94. package/dist-lib/lib/useNetwerkPrinters.js +1 -1
  95. package/package.json +9 -4
package/README.md CHANGED
@@ -1,54 +1,69 @@
1
- # Layout maker (pakbonnen, verzendbrieven, ectra)
2
-
3
- blank project start
4
-
5
- This project was built with [Lovable](https://lovable.dev).
6
-
7
- ## Build with Lovable
8
-
9
- Continue developing this project in the [Lovable editor](https://lovable.dev/projects/4735fccb-b385-4b48-b4f8-ef135f63f4f7).
10
-
11
- - **Ship faster**: describe what you want to build and Lovable handles the code.
12
- - **Stay in sync**: every change made in Lovable is committed straight to this repository.
13
- - **Full ownership**: this code is yours. Push to `main` on GitHub and your changes sync back into Lovable, ready for your next prompt.
14
-
15
- ## Development
16
-
17
- Prefer working locally? You need Node.js and npm — [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
18
-
19
- ```sh
20
- git clone <this-repository-url>
21
- cd <repository-name>
22
- npm i
23
- npm run dev
24
- ```
25
-
26
- ## Installeren in een andere shell
27
-
28
- 1. Draai `sql/print-schema.sql` één keer in de Supabase-database van die shell
29
- (SQL editor). Het script is idempotent en zet tabellen, rechten, RLS,
30
- functies en de geplande taken klaar. Zorg dat de extensies `pg_cron` en
31
- `pg_net` aan staan.
32
- 2. Zet in de omgeving van de shell:
33
- - `SUPABASE_URL` en `SERVICE_ROLE_KEY` — nodig voor achtergrondprinten
34
- - `CENTRAL_AUTH_URL` en `CENTRAL_AUTH_SECRET` — nodig voor de printdienst
35
- 3. Zorg dat de shell het tick-eindpunt host. De setup-CLI doet dit automatisch
36
- op basis van `flowselections.serverRoutes` in `package.json`. Handmatig
37
- opgezette shells maken zelf dit bestand aan:
38
-
39
- ```ts
40
- // src/routes/api/public/print/queue-tick.ts
41
- import { createFileRoute } from "@tanstack/react-router";
42
- import { behandelQueueTick } from "@flowselections/layout-maker";
43
-
44
- export const Route = createFileRoute("/api/public/print/queue-tick")({
45
- server: { handlers: { POST: async ({ request }) => behandelQueueTick(request) } },
46
- });
47
- ```
48
-
49
- 4. Klaar. Zodra de module in de shell draait meldt hij zichzelf aan als
50
- verwerker van de printwachtrij. Een nieuwe printopdracht wordt meteen
51
- opgepakt; daarnaast verwerkt de geplande taak `print-queue-tick` elke minuut
52
- de wachtende opdrachten. Reageert een shell een uur lang niet, dan wordt hij
53
- automatisch op inactief gezet. De taak `print-queue-cleanup` ruimt dagelijks
54
- oude opdrachten en bestanden op.
1
+ # Layout maker (pakbonnen, verzendbrieven, ectra)
2
+
3
+ blank project start
4
+
5
+ This project was built with [Lovable](https://lovable.dev).
6
+
7
+ ## Build with Lovable
8
+
9
+ Continue developing this project in the [Lovable editor](https://lovable.dev/projects/4735fccb-b385-4b48-b4f8-ef135f63f4f7).
10
+
11
+ - **Ship faster**: describe what you want to build and Lovable handles the code.
12
+ - **Stay in sync**: every change made in Lovable is committed straight to this repository.
13
+ - **Full ownership**: this code is yours. Push to `main` on GitHub and your changes sync back into Lovable, ready for your next prompt.
14
+
15
+ ## Development
16
+
17
+ Prefer working locally? You need Node.js and npm — [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
18
+
19
+ ```sh
20
+ git clone <this-repository-url>
21
+ cd <repository-name>
22
+ npm i
23
+ npm run dev
24
+ ```
25
+
26
+ ## Installeren in een andere shell
27
+
28
+ 1. Draai `sql/print-schema.sql` één keer in de Supabase-database van die shell
29
+ (SQL editor). Het script is idempotent en zet tabellen, rechten, RLS,
30
+ functies en de geplande taken klaar. Zorg dat de extensies `pg_cron` en
31
+ `pg_net` aan staan.
32
+ 2. Zet in de omgeving van de shell:
33
+ - `SUPABASE_URL` en `SERVICE_ROLE_KEY` — nodig voor achtergrondprinten
34
+ - `CENTRAL_AUTH_URL` en `CENTRAL_AUTH_SECRET` — nodig voor de printdienst
35
+ 3. Zorg dat de shell het tick-eindpunt host. De setup-CLI doet dit automatisch
36
+ op basis van `flowselections.serverRoutes` in `package.json`. Handmatig
37
+ opgezette shells maken zelf dit bestand aan:
38
+
39
+ ```ts
40
+ // src/routes/api/public/print/queue-tick.ts
41
+ import { createFileRoute } from "@tanstack/react-router";
42
+ import { behandelQueueTick } from "@flowselections/layout-maker/print";
43
+
44
+ export const Route = createFileRoute("/api/public/print/queue-tick")({
45
+ server: {
46
+ handlers: {
47
+ POST: async ({ request }) => {
48
+ // De shell levert de databaseverbinding; de module maakt er nooit zelf een.
49
+ const { supabaseAdmin } = await import(
50
+ "../../../../integrations/supabase/client.server"
51
+ );
52
+ return behandelQueueTick(request, supabaseAdmin);
53
+ },
54
+ },
55
+ },
56
+ });
57
+ ```
58
+
59
+ Het eindpunt accepteert drie toegangsbewijzen: een runner-sleutel uit
60
+ `print_queue_runners.tick_sleutel`, `SUPABASE_PUBLISHABLE_KEY` (de cron) of
61
+ het sessietoken van een ingelogde gebruiker (de knop in de Printwachtrij).
62
+
63
+
64
+ 4. Klaar. Zodra de module in de shell draait meldt hij zichzelf aan als
65
+ verwerker van de printwachtrij. Een nieuwe printopdracht wordt meteen
66
+ opgepakt; daarnaast verwerkt de geplande taak `print-queue-tick` elke minuut
67
+ de wachtende opdrachten. Reageert een shell een uur lang niet, dan wordt hij
68
+ automatisch op inactief gezet. De taak `print-queue-cleanup` ruimt dagelijks
69
+ oude opdrachten en bestanden op.
@@ -1,4 +1,4 @@
1
- import { type Orientatie } from "../lib/browserPrint";
1
+ import { type Orientatie } from "../lib/browserPrint.js";
2
2
  export interface AfdrukKnopProps {
3
3
  documenttype: string;
4
4
  formaatCode: string | null;
@@ -7,8 +7,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { useState } from "react";
8
8
  import { Button, toast } from "@flowselections/core";
9
9
  import { Loader2, Printer } from "lucide-react";
10
- import { drukAf } from "../lib/browserPrint";
11
- import { printDirect } from "../lib/directPrint";
10
+ import { drukAf } from "../lib/browserPrint.js";
11
+ import { printDirect } from "../lib/directPrint.js";
12
12
  export function AfdrukKnop({ documenttype, formaatCode, orientatie, getHtml, css, documentnaam, label = "Afdrukken", layoutId, kopieen, }) {
13
13
  const [bezig, setBezig] = useState(false);
14
14
  const afdrukken = async () => {
@@ -3,10 +3,10 @@ import { useState } from "react";
3
3
  import { useNavigate } from "@tanstack/react-router";
4
4
  import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, toast, } from "@flowselections/core";
5
5
  import { Sparkles, Upload } from "lucide-react";
6
- import { analyseerDocumentLayout } from "../lib/aiLayout.functions";
7
- import { supabase } from "../lib/supabaseClient";
8
- import { useLogos } from "../lib/logoLibrary";
9
- import { documentProfiel, standaardConfig } from "../lib/documentProfiles";
6
+ import { analyseerDocumentLayout } from "../lib/aiLayout.functions.js";
7
+ import { supabase } from "../lib/supabaseClient.js";
8
+ import { useLogos } from "../lib/logoLibrary.js";
9
+ import { documentProfiel, standaardConfig } from "../lib/documentProfiles.js";
10
10
  export function AiLayoutImportDialog({ open, onOpenChange, onKlaar, }) {
11
11
  const navigate = useNavigate();
12
12
  const { logos } = useLogos();
@@ -3,11 +3,11 @@ import { useEffect, useMemo, useState } from "react";
3
3
  import { Link } from "@tanstack/react-router";
4
4
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, toast, } from "@flowselections/core";
5
5
  import { ArrowLeft, Plus, Save } from "lucide-react";
6
- import { PakbonSectieEditor, PakbonBlokKaderEditor } from "./PakbonSectiesPanel";
7
- import { PakbonSectiePreview } from "./PakbonPreview";
8
- import { SECTIE_REGISTER, leesPakbonConfig, nieuweSectie, sectieDef, } from "../lib/pakbonBuilder";
9
- import { updateLayout, useLayoutDetail } from "../lib/useDocumentData";
10
- import { useLayoutIdParam } from "../lib/useLayoutIdParam";
6
+ import { PakbonSectieEditor, PakbonBlokKaderEditor } from "./PakbonSectiesPanel.js";
7
+ import { PakbonSectiePreview } from "./PakbonPreview.js";
8
+ import { SECTIE_REGISTER, leesPakbonConfig, nieuweSectie, sectieDef, } from "../lib/pakbonBuilder.js";
9
+ import { updateLayout, useLayoutDetail } from "../lib/useDocumentData.js";
10
+ import { useLayoutIdParam } from "../lib/useLayoutIdParam.js";
11
11
  /** Ontwerp elk pakbon-blok afzonderlijk, los van de volledige pagina. */
12
12
  export function BlokOntwerperPage({ layoutId: layoutIdProp } = {}) {
13
13
  const layoutId = useLayoutIdParam(layoutIdProp);
@@ -6,8 +6,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  import { useCallback, useEffect, useState } from "react";
7
7
  import { Button, Card, CardContent, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@flowselections/core";
8
8
  import { Loader2, Monitor, Plus, RefreshCw } from "lucide-react";
9
- import { netwerkComputers, netwerkPrinters } from "../lib/printService.functions";
10
- import { PrintProgrammaUitleg, WerktHetNiet } from "./PrintProgrammaUitleg";
9
+ import { netwerkComputers, netwerkPrinters } from "../lib/printService.functions.js";
10
+ import { PrintProgrammaUitleg, WerktHetNiet } from "./PrintProgrammaUitleg.js";
11
11
  export function useComputers() {
12
12
  const [computers, setComputers] = useState([]);
13
13
  const [loading, setLoading] = useState(true);
@@ -1,5 +1,5 @@
1
- import { type DocumentConfig } from "../lib/documentProfiles";
2
- import type { LayoutModel } from "../lib/documentTypes";
1
+ import { type DocumentConfig } from "../lib/documentProfiles.js";
2
+ import type { LayoutModel } from "../lib/documentTypes.js";
3
3
  /**
4
4
  * Documentspecifieke instellingen. Wat hier verschijnt komt volledig uit het
5
5
  * profiel van het documenttype — nieuwe documentsoorten werken automatisch.
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { Badge, Button, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Switch, toast, } from "@flowselections/core";
4
4
  import { Save } from "lucide-react";
5
- import { configWaarde, documentProfiel, standaardConfig, } from "../lib/documentProfiles";
6
- import { updateLayout, usePrinters } from "../lib/useDocumentData";
7
- import { useFormaatPrinters, zetFormaatPrinter } from "../lib/formaatPrinters";
5
+ import { configWaarde, documentProfiel, standaardConfig, } from "../lib/documentProfiles.js";
6
+ import { updateLayout, usePrinters } from "../lib/useDocumentData.js";
7
+ import { useFormaatPrinters, zetFormaatPrinter } from "../lib/formaatPrinters.js";
8
8
  /**
9
9
  * Documentspecifieke instellingen. Wat hier verschijnt komt volledig uit het
10
10
  * profiel van het documenttype — nieuwe documentsoorten werken automatisch.
@@ -1,4 +1,4 @@
1
- import { type LayoutModel } from "../lib/documentTypes";
1
+ import { type LayoutModel } from "../lib/documentTypes.js";
2
2
  /**
3
3
  * Formaat- en oriëntatiekeuze die in elke ontwerp-editor beschikbaar is.
4
4
  * Wijzigingen worden direct opgeslagen en lokaal doorgegeven aan de preview.
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { Button, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, toast, } from "@flowselections/core";
4
4
  import { RectangleHorizontal, RectangleVertical } from "lucide-react";
5
- import { PAPIERFORMATEN } from "../lib/documentTypes";
6
- import { updateLayout } from "../lib/useDocumentData";
5
+ import { PAPIERFORMATEN } from "../lib/documentTypes.js";
6
+ import { updateLayout } from "../lib/useDocumentData.js";
7
7
  /**
8
8
  * Formaat- en oriëntatiekeuze die in elke ontwerp-editor beschikbaar is.
9
9
  * Wijzigingen worden direct opgeslagen en lokaal doorgegeven aan de preview.
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from "react";
3
- import { useAutoRefresh } from "../lib/useAutoRefresh";
3
+ import { useAutoRefresh } from "../lib/useAutoRefresh.js";
4
4
  import { useNavigate } from "@tanstack/react-router";
5
5
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Textarea, toast, } from "@flowselections/core";
6
6
  import { Copy, FileText, Images, Pencil, Plus, Search, Settings2, Trash2 } from "lucide-react";
7
- import { dupliceerLayout, maakLayout, updateLayout, useLayouts, verwijderLayout, } from "../lib/useDocumentData";
8
- import { DOCUMENT_TYPES, PAPIERFORMATEN, documentTypeLabel } from "../lib/documentTypes";
9
- import { DOCUMENT_PROFIELEN, documentProfiel, primaireProfielen, standaardConfig, } from "../lib/documentProfiles";
7
+ import { dupliceerLayout, maakLayout, updateLayout, useLayouts, verwijderLayout, } from "../lib/useDocumentData.js";
8
+ import { DOCUMENT_TYPES, PAPIERFORMATEN, documentTypeLabel } from "../lib/documentTypes.js";
9
+ import { DOCUMENT_PROFIELEN, documentProfiel, primaireProfielen, standaardConfig, } from "../lib/documentProfiles.js";
10
10
  function klantOntwerpLayout(l) {
11
11
  if (l.documenttype !== "sticker")
12
12
  return false;
@@ -1,4 +1,4 @@
1
- import { type LogoModel } from "../lib/logoLibrary";
1
+ import { type LogoModel } from "../lib/logoLibrary.js";
2
2
  export declare function LogoBibliotheekDialog({ open, onOpenChange, onKies, }: {
3
3
  open: boolean;
4
4
  onOpenChange: (v: boolean) => void;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from "react";
3
3
  import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
4
- import { LOGO_CATEGORIEEN, logoCategorieLabel, useLogos } from "../lib/logoLibrary";
5
- import { LogoThumbnail } from "./LogosPage";
4
+ import { LOGO_CATEGORIEEN, logoCategorieLabel, useLogos } from "../lib/logoLibrary.js";
5
+ import { LogoThumbnail } from "./LogosPage.js";
6
6
  export function LogoBibliotheekDialog({ open, onOpenChange, onKies, }) {
7
7
  const { logos, loading } = useLogos();
8
8
  const [zoek, setZoek] = useState("");
@@ -1,4 +1,4 @@
1
- import { type LogoModel } from "../lib/logoLibrary";
1
+ import { type LogoModel } from "../lib/logoLibrary.js";
2
2
  export declare function LogoThumbnail({ logo, className }: {
3
3
  logo: LogoModel;
4
4
  className?: string;
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from "react";
3
3
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Textarea, toast, } from "@flowselections/core";
4
4
  import { Download, ImagePlus, Pencil, RefreshCw, Trash2, Upload } from "lucide-react";
5
- import { useAutoRefresh } from "../lib/useAutoRefresh";
6
- import { LOGO_CATEGORIEEN, TOEGESTANE_LOGO_TYPES, downloadLogo, formatteerBytes, logoCategorieLabel, maakLogo, useLogos, vervangLogoBestand, verwijderLogo, werkLogoBij, } from "../lib/logoLibrary";
5
+ import { useAutoRefresh } from "../lib/useAutoRefresh.js";
6
+ import { LOGO_CATEGORIEEN, TOEGESTANE_LOGO_TYPES, downloadLogo, formatteerBytes, logoCategorieLabel, maakLogo, useLogos, vervangLogoBestand, verwijderLogo, werkLogoBij, } from "../lib/logoLibrary.js";
7
7
  export function LogoThumbnail({ logo, className = "" }) {
8
8
  return (_jsx("div", { className: `flex h-12 w-16 items-center justify-center overflow-hidden rounded border bg-[repeating-conic-gradient(#e5e7eb_0%_25%,#fff_0%_50%)] bg-[length:10px_10px] ${className}`, children: logo.viewUrl ? (_jsx("img", { src: logo.viewUrl, alt: logo.naam, className: "max-h-full max-w-full object-contain" })) : (_jsx(ImagePlus, { className: "h-4 w-4 text-muted-foreground" })) }));
9
9
  }
@@ -6,8 +6,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  import { useCallback, useEffect, useState } from "react";
7
7
  import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, toast, } from "@flowselections/core";
8
8
  import { Loader2, Printer, RefreshCw } from "lucide-react";
9
- import { supabase } from "../lib/supabaseClient";
10
- import { netwerkPrinters } from "../lib/printService.functions";
9
+ import { supabase } from "../lib/supabaseClient.js";
10
+ import { netwerkPrinters } from "../lib/printService.functions.js";
11
11
  export function NetwerkPrintersDialog({ open, onOpenChange, huidigePrinterId, huidigePrinterNaam, onKlaar, }) {
12
12
  const [bezig, setBezig] = useState(false);
13
13
  const [fout, setFout] = useState(null);
@@ -3,14 +3,14 @@ import { useEffect, useMemo, useState } from "react";
3
3
  import { Link } from "@tanstack/react-router";
4
4
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, toast, } from "@flowselections/core";
5
5
  import { ArrowLeft, Loader2, Printer, Save } from "lucide-react";
6
- import { PakbonSectiesPanel } from "./PakbonSectiesPanel";
7
- import { PakbonPreview } from "./PakbonPreview";
8
- import { FormaatOrientatieBar } from "./FormaatOrientatieBar";
9
- import { leesPakbonConfig } from "../lib/pakbonBuilder";
10
- import { printPakbon, voorbeeldPakbonOrder } from "../lib/pakbonHtml";
11
- import { haalPrintLogos } from "../lib/logoLibrary";
12
- import { updateLayout, useLayoutDetail } from "../lib/useDocumentData";
13
- import { useLayoutIdParam } from "../lib/useLayoutIdParam";
6
+ import { PakbonSectiesPanel } from "./PakbonSectiesPanel.js";
7
+ import { PakbonPreview } from "./PakbonPreview.js";
8
+ import { FormaatOrientatieBar } from "./FormaatOrientatieBar.js";
9
+ import { leesPakbonConfig } from "../lib/pakbonBuilder.js";
10
+ import { printPakbon, voorbeeldPakbonOrder } from "../lib/pakbonHtml.js";
11
+ import { haalPrintLogos } from "../lib/logoLibrary.js";
12
+ import { updateLayout, useLayoutDetail } from "../lib/useDocumentData.js";
13
+ import { useLayoutIdParam } from "../lib/useLayoutIdParam.js";
14
14
  /** Sectiegebaseerde pakbon-builder met live voorbeeld op echte ordergegevens. */
15
15
  export function PakbonBuilderPage({ layoutId: layoutIdProp } = {}) {
16
16
  const layoutId = useLayoutIdParam(layoutIdProp);
@@ -1,4 +1,4 @@
1
- import { type PakbonConfig, type PakbonSectie } from "../lib/pakbonBuilder";
1
+ import { type PakbonConfig, type PakbonSectie } from "../lib/pakbonBuilder.js";
2
2
  export declare function PakbonPreview({ config, breedteMm, hoogteMm, }: {
3
3
  config: PakbonConfig;
4
4
  breedteMm?: number;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { PaginaDocument } from "./PaginaDocument";
4
- import { useLogos } from "../lib/logoLibrary";
5
- import { DEMO_ORDER, conditieContext, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karBundelTekst, fustVerzamellijst, pickMethode, productVeldBreedtes, sectieOnderdrukt, kolomLabel, laagBundelTekst, sectieZichtbaar, sorteerProducten, totalen, vulVeldcodes, } from "../lib/pakbonBuilder";
3
+ import { PaginaDocument } from "./PaginaDocument.js";
4
+ import { useLogos } from "../lib/logoLibrary.js";
5
+ import { DEMO_ORDER, conditieContext, groepeerIdentiekeKarren, groepeerIdentiekeLagen, karBundelTekst, fustVerzamellijst, pickMethode, productVeldBreedtes, sectieOnderdrukt, kolomLabel, laagBundelTekst, sectieZichtbaar, sorteerProducten, totalen, vulVeldcodes, } from "../lib/pakbonBuilder.js";
6
6
  export function PakbonPreview({ config, breedteMm = 210, hoogteMm = 297, }) {
7
7
  const order = DEMO_ORDER;
8
8
  const ctx = conditieContext(order);
@@ -1,4 +1,4 @@
1
- import { type PakbonConfig, type PakbonSectie } from "../lib/pakbonBuilder";
1
+ import { type PakbonConfig, type PakbonSectie } from "../lib/pakbonBuilder.js";
2
2
  /** Beheer van de secties waaruit de pakbon is opgebouwd. */
3
3
  export declare function PakbonSectiesPanel({ config, onChange, }: {
4
4
  config: PakbonConfig;
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { Badge, Button, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Switch, } from "@flowselections/core";
4
4
  import { ChevronDown, ChevronUp, ImagePlus, Plus, Trash2 } from "lucide-react";
5
- import { useLogos } from "../lib/logoLibrary";
6
- import { LogoBibliotheekDialog } from "./LogoBibliotheekDialog";
7
- import { LogoThumbnail } from "./LogosPage";
8
- import { BESCHIKBARE_KOLOMMEN, CONDITIE_VELDEN, SECTIE_REGISTER, nieuweKolom, nieuweSectie, pickMethode, sectieDef, sectieOnderdrukt, } from "../lib/pakbonBuilder";
5
+ import { useLogos } from "../lib/logoLibrary.js";
6
+ import { LogoBibliotheekDialog } from "./LogoBibliotheekDialog.js";
7
+ import { LogoThumbnail } from "./LogosPage.js";
8
+ import { BESCHIKBARE_KOLOMMEN, CONDITIE_VELDEN, SECTIE_REGISTER, nieuweKolom, nieuweSectie, pickMethode, sectieDef, sectieOnderdrukt, } from "../lib/pakbonBuilder.js";
9
9
  /** Beheer van de secties waaruit de pakbon is opgebouwd. */
10
10
  export function PakbonSectiesPanel({ config, onChange, }) {
11
11
  const alleSecties = Array.isArray(config?.secties) ? config.secties : [];
@@ -1 +1 @@
1
- {"version":3,"file":"PrintQueuePage.d.ts","sourceRoot":"","sources":["../../src/components/PrintQueuePage.tsx"],"names":[],"mappings":"AAsCA,wBAAgB,cAAc,gCAuN7B"}
1
+ {"version":3,"file":"PrintQueuePage.d.ts","sourceRoot":"","sources":["../../src/components/PrintQueuePage.tsx"],"names":[],"mappings":"AAuCA,wBAAgB,cAAc,gCAoN7B"}
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useRef, useState } from "react";
3
3
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, toast, } from "@flowselections/core";
4
4
  import { RotateCcw, Search, XCircle } from "lucide-react";
5
- import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh";
6
- import { maakPrintJob, updateJobStatus, useLayouts, usePrinters, usePrintJobs } from "../lib/useDocumentData";
7
- import { printStatus, wachtrijTick } from "../lib/printService.functions";
8
- import { documentTypeLabel } from "../lib/documentTypes";
5
+ import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh.js";
6
+ import { maakPrintJob, updateJobStatus, useLayouts, usePrinters, usePrintJobs } from "../lib/useDocumentData.js";
7
+ import { printStatus } from "../lib/printService.functions.js";
8
+ import { vraagWachtrijRonde } from "../lib/queueTickClient.js";
9
+ import { documentTypeLabel } from "../lib/documentTypes.js";
9
10
  const STATUS_VARIANT = {
10
11
  wachtend: "outline",
11
12
  bezig: "secondary",
@@ -44,8 +45,8 @@ export function PrintQueuePage() {
44
45
  // achtergrondtaak nog niet is langsgekomen in een verse installatie.
45
46
  if (jobsRef.current.some((j) => j.status === "wachtend")) {
46
47
  try {
47
- const res = (await wachtrijTick({ data: undefined }));
48
- setTickFout(res?.ok === false ? res.fout ?? "Verwerken mislukt" : null);
48
+ const res = await vraagWachtrijRonde();
49
+ setTickFout(res.ok ? null : res.fout ?? "Verwerken mislukt");
49
50
  }
50
51
  catch (e) {
51
52
  setTickFout(e instanceof Error ? e.message : "Achtergrondprinten werkt nu niet.");
@@ -6,11 +6,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  import { useCallback, useEffect, useMemo, useState } from "react";
7
7
  import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Label, toast, } from "@flowselections/core";
8
8
  import { Check, CheckCircle2, FileText, Loader2, Printer, RefreshCw, Search, Tag, } from "lucide-react";
9
- import { supabase } from "../lib/supabaseClient";
10
- import { drukAf } from "../lib/browserPrint";
11
- import { printDirect } from "../lib/directPrint";
12
- import { netwerkPrinters } from "../lib/printService.functions";
13
- import { PrintProgrammaUitleg, WerktHetNiet } from "./PrintProgrammaUitleg";
9
+ import { supabase } from "../lib/supabaseClient.js";
10
+ import { drukAf } from "../lib/browserPrint.js";
11
+ import { printDirect } from "../lib/directPrint.js";
12
+ import { netwerkPrinters } from "../lib/printService.functions.js";
13
+ import { PrintProgrammaUitleg, WerktHetNiet } from "./PrintProgrammaUitleg.js";
14
14
  const STAPPEN = ["Printer kiezen", "Naam en locatie", "Klaar"];
15
15
  function instellingenVoor(gebruik) {
16
16
  return gebruik === "etiket"
@@ -145,7 +145,7 @@ export function PrinterSetupWizard({ open, onOpenChange, onKlaar, computerFilter
145
145
  const [testStatus, setTestStatus] = useState("leeg");
146
146
  const testpagina = async () => {
147
147
  setTestStatus("bezig");
148
- const html = `<div style="padding:20mm;font-size:14pt"><h1 style="font-size:20pt">Testpagina</h1>
148
+ const html = `<div style="padding:20mm;font-size:14pt"><h1 style="font-size:20pt">Testpagina</h1>
149
149
  <p>Deze pagina hoort uit: <strong>${naam}</strong></p></div>`;
150
150
  const opdracht = {
151
151
  documenttype: "pakbon",
@@ -7,13 +7,13 @@ import { useMemo, useState } from "react";
7
7
  import { Button, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
8
8
  import { Link } from "@tanstack/react-router";
9
9
  import { CheckCircle2, FileText, ListChecks, Monitor, Plus, Printer, Search } from "lucide-react";
10
- import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh";
11
- import { useLayouts, usePrinters } from "../lib/useDocumentData";
12
- import { useNetwerkPrinters } from "../lib/useNetwerkPrinters";
13
- import { PrinterSetupWizard } from "./PrinterSetupWizard";
14
- import { ComputersLijst, useComputers } from "./ComputersLijst";
15
- import { PrinterStatsKaarten } from "./PrinterStatsKaarten";
16
- import { WerkplekkenTabel } from "./WerkplekkenTabel";
10
+ import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh.js";
11
+ import { useLayouts, usePrinters } from "../lib/useDocumentData.js";
12
+ import { useNetwerkPrinters } from "../lib/useNetwerkPrinters.js";
13
+ import { PrinterSetupWizard } from "./PrinterSetupWizard.js";
14
+ import { ComputersLijst, useComputers } from "./ComputersLijst.js";
15
+ import { PrinterStatsKaarten } from "./PrinterStatsKaarten.js";
16
+ import { WerkplekkenTabel } from "./WerkplekkenTabel.js";
17
17
  export function PrintersPage() {
18
18
  const { printers, koppelingen, reload } = usePrinters();
19
19
  const { layouts } = useLayouts();
@@ -1,4 +1,4 @@
1
- import { type ProductiebonConfig } from "../lib/productiebonBuilder";
1
+ import { type ProductiebonConfig } from "../lib/productiebonBuilder.js";
2
2
  /** Beheer van de blokken waaruit de productiebon is opgebouwd. */
3
3
  export declare function ProductiebonBlokkenPanel({ config, onChange, }: {
4
4
  config: ProductiebonConfig;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState } from "react";
3
3
  import { Badge, Button, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, Switch, } from "@flowselections/core";
4
4
  import { ChevronDown, ChevronUp, Plus, Trash2 } from "lucide-react";
5
- import { LETTERTYPEN, MATERIAAL_KOLOMMEN, PB_BLOK_REGISTER, PB_CONDITIE_VELDEN, PRODUCTINFO_VELDEN, SAMENSTELLING_KOLOMMEN, nieuwBlok, pbNieuweKolom, nieuwVeld, pbBlokDef, } from "../lib/productiebonBuilder";
5
+ import { LETTERTYPEN, MATERIAAL_KOLOMMEN, PB_BLOK_REGISTER, PB_CONDITIE_VELDEN, PRODUCTINFO_VELDEN, SAMENSTELLING_KOLOMMEN, nieuwBlok, pbNieuweKolom, nieuwVeld, pbBlokDef, } from "../lib/productiebonBuilder.js";
6
6
  /** Beheer van de blokken waaruit de productiebon is opgebouwd. */
7
7
  export function ProductiebonBlokkenPanel({ config, onChange, }) {
8
8
  const blokken = Array.isArray(config?.blokken) ? config.blokken : [];
@@ -3,12 +3,12 @@ import { useEffect, useMemo, useState } from "react";
3
3
  import { Link } from "@tanstack/react-router";
4
4
  import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, toast, } from "@flowselections/core";
5
5
  import { ArrowLeft, Save } from "lucide-react";
6
- import { ProductiebonBlokkenPanel } from "./ProductiebonBlokkenPanel";
7
- import { ProductiebonPreview } from "./ProductiebonPreview";
8
- import { FormaatOrientatieBar } from "./FormaatOrientatieBar";
9
- import { leesProductiebonConfig } from "../lib/productiebonBuilder";
10
- import { updateLayout, useLayoutDetail } from "../lib/useDocumentData";
11
- import { useLayoutIdParam } from "../lib/useLayoutIdParam";
6
+ import { ProductiebonBlokkenPanel } from "./ProductiebonBlokkenPanel.js";
7
+ import { ProductiebonPreview } from "./ProductiebonPreview.js";
8
+ import { FormaatOrientatieBar } from "./FormaatOrientatieBar.js";
9
+ import { leesProductiebonConfig } from "../lib/productiebonBuilder.js";
10
+ import { updateLayout, useLayoutDetail } from "../lib/useDocumentData.js";
11
+ import { useLayoutIdParam } from "../lib/useLayoutIdParam.js";
12
12
  /** Eigen editor voor de productiebon: modulaire blokken met live voorbeeld. */
13
13
  export function ProductiebonBuilderPage({ layoutId: layoutIdProp } = {}) {
14
14
  const layoutId = useLayoutIdParam(layoutIdProp);
@@ -1,4 +1,4 @@
1
- import { type ProductiebonBlok, type ProductiebonConfig } from "../lib/productiebonBuilder";
1
+ import { type ProductiebonBlok, type ProductiebonConfig } from "../lib/productiebonBuilder.js";
2
2
  /** Live voorbeeld van de volledige productiebon, verdeeld over pagina's. */
3
3
  export declare function ProductiebonPreview({ config, breedteMm, hoogteMm, }: {
4
4
  config: ProductiebonConfig;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { PaginaDocument } from "./PaginaDocument";
3
- import { BELADING_LABELS, DEMO_PRODUCTIEBON, EXTRA_LABELS, FUST_LABELS, ONDERDEEL_LABELS, QR_LABELS, pbBlokZichtbaar, pbConditieContext, splitsLijst, vulPbVeldcodes, } from "../lib/productiebonBuilder";
2
+ import { PaginaDocument } from "./PaginaDocument.js";
3
+ import { BELADING_LABELS, DEMO_PRODUCTIEBON, EXTRA_LABELS, FUST_LABELS, ONDERDEEL_LABELS, QR_LABELS, pbBlokZichtbaar, pbConditieContext, splitsLijst, vulPbVeldcodes, } from "../lib/productiebonBuilder.js";
4
4
  const data = DEMO_PRODUCTIEBON;
5
5
  /** Live voorbeeld van de volledige productiebon, verdeeld over pagina's. */
6
6
  export function ProductiebonPreview({ config, breedteMm = 210, hoogteMm = 297, }) {
@@ -7,13 +7,13 @@ import { useMemo, useState } from "react";
7
7
  import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Checkbox, Input, toast, } from "@flowselections/core";
8
8
  import { Link, useParams } from "@tanstack/react-router";
9
9
  import { ChevronRight, Monitor, Plus, Printer, Search } from "lucide-react";
10
- import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh";
11
- import { toggleKoppeling, useLayouts, usePrinters, verwijderPrinter } from "../lib/useDocumentData";
12
- import { useNetwerkPrinters } from "../lib/useNetwerkPrinters";
13
- import { drukTestpaginaAf } from "../lib/testpagina";
14
- import { useComputers } from "./ComputersLijst";
15
- import { PrinterKaart } from "./PrinterKaart";
16
- import { PrinterSetupWizard } from "./PrinterSetupWizard";
10
+ import { bijgewerktTekst, useAutoRefresh } from "../lib/useAutoRefresh.js";
11
+ import { toggleKoppeling, useLayouts, usePrinters, verwijderPrinter } from "../lib/useDocumentData.js";
12
+ import { useNetwerkPrinters } from "../lib/useNetwerkPrinters.js";
13
+ import { drukTestpaginaAf } from "../lib/testpagina.js";
14
+ import { useComputers } from "./ComputersLijst.js";
15
+ import { PrinterKaart } from "./PrinterKaart.js";
16
+ import { PrinterSetupWizard } from "./PrinterSetupWizard.js";
17
17
  export function WerkplekConfiguratiePage() {
18
18
  const params = useParams({ strict: false });
19
19
  const computerId = params.computerId ?? "";