@flowselections/layout-maker 1.3.2
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 +24 -0
- package/dist-lib/_core-safelist.d.ts +2 -0
- package/dist-lib/_core-safelist.d.ts.map +1 -0
- package/dist-lib/_core-safelist.js +18 -0
- package/dist-lib/components/AfdrukKnop.d.ts +13 -0
- package/dist-lib/components/AfdrukKnop.d.ts.map +1 -0
- package/dist-lib/components/AfdrukKnop.js +38 -0
- package/dist-lib/components/AiLayoutImportDialog.d.ts +6 -0
- package/dist-lib/components/AiLayoutImportDialog.d.ts.map +1 -0
- package/dist-lib/components/AiLayoutImportDialog.js +133 -0
- package/dist-lib/components/BlokOntwerperPage.d.ts +5 -0
- package/dist-lib/components/BlokOntwerperPage.d.ts.map +1 -0
- package/dist-lib/components/BlokOntwerperPage.js +67 -0
- package/dist-lib/components/DocumentSettingsPanel.d.ts +13 -0
- package/dist-lib/components/DocumentSettingsPanel.d.ts.map +1 -0
- package/dist-lib/components/DocumentSettingsPanel.js +65 -0
- package/dist-lib/components/FormaatOrientatieBar.d.ts +10 -0
- package/dist-lib/components/FormaatOrientatieBar.d.ts.map +1 -0
- package/dist-lib/components/FormaatOrientatieBar.js +51 -0
- package/dist-lib/components/LayoutsPage.d.ts +2 -0
- package/dist-lib/components/LayoutsPage.d.ts.map +1 -0
- package/dist-lib/components/LayoutsPage.js +196 -0
- package/dist-lib/components/LogoBibliotheekDialog.d.ts +7 -0
- package/dist-lib/components/LogoBibliotheekDialog.d.ts.map +1 -0
- package/dist-lib/components/LogoBibliotheekDialog.js +27 -0
- package/dist-lib/components/LogosPage.d.ts +7 -0
- package/dist-lib/components/LogosPage.d.ts.map +1 -0
- package/dist-lib/components/LogosPage.js +131 -0
- package/dist-lib/components/PaginaDocument.d.ts +22 -0
- package/dist-lib/components/PaginaDocument.d.ts.map +1 -0
- package/dist-lib/components/PaginaDocument.js +80 -0
- package/dist-lib/components/PakbonBuilderPage.d.ts +5 -0
- package/dist-lib/components/PakbonBuilderPage.d.ts.map +1 -0
- package/dist-lib/components/PakbonBuilderPage.js +69 -0
- package/dist-lib/components/PakbonPreview.d.ts +13 -0
- package/dist-lib/components/PakbonPreview.d.ts.map +1 -0
- package/dist-lib/components/PakbonPreview.js +423 -0
- package/dist-lib/components/PakbonSectiesPanel.d.ts +18 -0
- package/dist-lib/components/PakbonSectiesPanel.d.ts.map +1 -0
- package/dist-lib/components/PakbonSectiesPanel.js +156 -0
- package/dist-lib/components/PreviewFit.d.ts +9 -0
- package/dist-lib/components/PreviewFit.d.ts.map +1 -0
- package/dist-lib/components/PreviewFit.js +38 -0
- package/dist-lib/components/PrintQueuePage.d.ts +2 -0
- package/dist-lib/components/PrintQueuePage.d.ts.map +1 -0
- package/dist-lib/components/PrintQueuePage.js +59 -0
- package/dist-lib/components/PrinterSetupWizard.d.ts +6 -0
- package/dist-lib/components/PrinterSetupWizard.d.ts.map +1 -0
- package/dist-lib/components/PrinterSetupWizard.js +119 -0
- package/dist-lib/components/PrintersPage.d.ts +2 -0
- package/dist-lib/components/PrintersPage.d.ts.map +1 -0
- package/dist-lib/components/PrintersPage.js +60 -0
- package/dist-lib/components/ProductiebonBlokkenPanel.d.ts +7 -0
- package/dist-lib/components/ProductiebonBlokkenPanel.d.ts.map +1 -0
- package/dist-lib/components/ProductiebonBlokkenPanel.js +85 -0
- package/dist-lib/components/ProductiebonBuilderPage.d.ts +5 -0
- package/dist-lib/components/ProductiebonBuilderPage.d.ts.map +1 -0
- package/dist-lib/components/ProductiebonBuilderPage.js +48 -0
- package/dist-lib/components/ProductiebonPreview.d.ts +12 -0
- package/dist-lib/components/ProductiebonPreview.d.ts.map +1 -0
- package/dist-lib/components/ProductiebonPreview.js +237 -0
- package/dist-lib/components/TemplateModuleLogo.d.ts +6 -0
- package/dist-lib/components/TemplateModuleLogo.d.ts.map +1 -0
- package/dist-lib/components/TemplateModuleLogo.js +4 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.d.ts +2 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.d.ts.map +1 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.js +42 -0
- package/dist-lib/hooks/useMijnModuleData.d.ts +13 -0
- package/dist-lib/hooks/useMijnModuleData.d.ts.map +1 -0
- package/dist-lib/hooks/useMijnModuleData.js +49 -0
- package/dist-lib/index.d.ts +38 -0
- package/dist-lib/index.d.ts.map +1 -0
- package/dist-lib/index.js +56 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +19847 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
- package/dist-lib/integrations/supabase/client.d.ts +2 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.js +3 -0
- package/dist-lib/integrations/supabase/client.server.d.ts +19843 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.server.js +30 -0
- package/dist-lib/integrations/supabase/types.d.ts +20423 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/types.js +78 -0
- package/dist-lib/lib/aiLayout.functions.d.ts +19864 -0
- package/dist-lib/lib/aiLayout.functions.d.ts.map +1 -0
- package/dist-lib/lib/aiLayout.functions.js +28 -0
- package/dist-lib/lib/aiLayout.server.d.ts +14 -0
- package/dist-lib/lib/aiLayout.server.d.ts.map +1 -0
- package/dist-lib/lib/aiLayout.server.js +197 -0
- package/dist-lib/lib/browserPrint.d.ts +38 -0
- package/dist-lib/lib/browserPrint.d.ts.map +1 -0
- package/dist-lib/lib/browserPrint.js +104 -0
- package/dist-lib/lib/documentProfiles.d.ts +50 -0
- package/dist-lib/lib/documentProfiles.d.ts.map +1 -0
- package/dist-lib/lib/documentProfiles.js +458 -0
- package/dist-lib/lib/documentTypes.d.ts +123 -0
- package/dist-lib/lib/documentTypes.d.ts.map +1 -0
- package/dist-lib/lib/documentTypes.js +74 -0
- package/dist-lib/lib/fieldRegistry.d.ts +20 -0
- package/dist-lib/lib/fieldRegistry.d.ts.map +1 -0
- package/dist-lib/lib/fieldRegistry.js +123 -0
- package/dist-lib/lib/formaatPrinters.d.ts +14 -0
- package/dist-lib/lib/formaatPrinters.d.ts.map +1 -0
- package/dist-lib/lib/formaatPrinters.js +39 -0
- package/dist-lib/lib/layoutPreview.d.ts +18 -0
- package/dist-lib/lib/layoutPreview.d.ts.map +1 -0
- package/dist-lib/lib/layoutPreview.js +134 -0
- package/dist-lib/lib/logoLibrary.d.ts +80 -0
- package/dist-lib/lib/logoLibrary.d.ts.map +1 -0
- package/dist-lib/lib/logoLibrary.js +264 -0
- package/dist-lib/lib/pakbonBuilder.d.ts +210 -0
- package/dist-lib/lib/pakbonBuilder.d.ts.map +1 -0
- package/dist-lib/lib/pakbonBuilder.js +910 -0
- package/dist-lib/lib/pakbonHtml.d.ts +48 -0
- package/dist-lib/lib/pakbonHtml.d.ts.map +1 -0
- package/dist-lib/lib/pakbonHtml.js +754 -0
- package/dist-lib/lib/printApi.d.ts +45 -0
- package/dist-lib/lib/printApi.d.ts.map +1 -0
- package/dist-lib/lib/printApi.js +98 -0
- package/dist-lib/lib/productiebonBuilder.d.ts +137 -0
- package/dist-lib/lib/productiebonBuilder.d.ts.map +1 -0
- package/dist-lib/lib/productiebonBuilder.js +661 -0
- package/dist-lib/lib/supabaseClient.d.ts +4 -0
- package/dist-lib/lib/supabaseClient.d.ts.map +1 -0
- package/dist-lib/lib/supabaseClient.js +10 -0
- package/dist-lib/lib/useDocumentData.d.ts +97 -0
- package/dist-lib/lib/useDocumentData.d.ts.map +1 -0
- package/dist-lib/lib/useDocumentData.js +286 -0
- package/dist-lib/lib/useLayoutIdParam.d.ts +7 -0
- package/dist-lib/lib/useLayoutIdParam.d.ts.map +1 -0
- package/dist-lib/lib/useLayoutIdParam.js +10 -0
- package/dist-lib/lib/utils.d.ts +3 -0
- package/dist-lib/lib/utils.d.ts.map +1 -0
- package/dist-lib/lib/utils.js +5 -0
- package/dist-lib/lib/validationSchemas.d.ts +15 -0
- package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
- package/dist-lib/lib/validationSchemas.js +25 -0
- package/dist-lib/styles.css +1 -0
- package/package.json +117 -0
- package/public/logo.png +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DocumentType } from "./documentTypes";
|
|
2
|
+
export interface PrintDocumentInput {
|
|
3
|
+
/** Documentsoort, bijv. "pakbon" of "productiebon". */
|
|
4
|
+
documenttype: DocumentType | string;
|
|
5
|
+
/** Optioneel: specifieke layout. Anders wordt de standaardlayout gebruikt. */
|
|
6
|
+
layoutId?: string;
|
|
7
|
+
/** Optioneel: specifieke printer. Anders wordt er automatisch gekozen. */
|
|
8
|
+
printerId?: string;
|
|
9
|
+
/** Naam zoals die in de wachtrij verschijnt. */
|
|
10
|
+
documentnaam: string;
|
|
11
|
+
kopieen?: number;
|
|
12
|
+
/** Vrije data die bij het afdrukken gebruikt wordt. */
|
|
13
|
+
payload?: Record<string, unknown>;
|
|
14
|
+
isHerprint?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface PrintDocumentResult {
|
|
17
|
+
jobId: string;
|
|
18
|
+
layoutId: string;
|
|
19
|
+
printerId: string | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Zet een document in de printwachtrij. Bedoeld voor gebruik vanuit andere
|
|
23
|
+
* modules binnen dezelfde shell en database.
|
|
24
|
+
*/
|
|
25
|
+
export declare function printDocument(input: PrintDocumentInput): Promise<PrintDocumentResult>;
|
|
26
|
+
/** Alle beschikbare layouts voor een documentsoort (voor keuzelijsten elders). */
|
|
27
|
+
export declare function beschikbareLayouts(documenttype?: string): Promise<{
|
|
28
|
+
id: string;
|
|
29
|
+
naam: string;
|
|
30
|
+
documenttype: string;
|
|
31
|
+
papierformaat: string;
|
|
32
|
+
orientatie: string;
|
|
33
|
+
is_standaard: boolean;
|
|
34
|
+
}[]>;
|
|
35
|
+
/** Alle actieve printers (voor keuzelijsten elders). */
|
|
36
|
+
export declare function beschikbarePrinters(): Promise<{
|
|
37
|
+
id: string;
|
|
38
|
+
naam: string;
|
|
39
|
+
soort: string;
|
|
40
|
+
locatie: string | null;
|
|
41
|
+
papierformaat: string | null;
|
|
42
|
+
online: boolean;
|
|
43
|
+
actief: boolean;
|
|
44
|
+
}[]>;
|
|
45
|
+
//# sourceMappingURL=printApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printApi.d.ts","sourceRoot":"","sources":["../../src/lib/printApi.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,YAAY,EAAE,YAAY,GAAG,MAAM,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAkDD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAyB3F;AAED,kFAAkF;AAClF,wBAAsB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM;QAQtD,MAAM;UACJ,MAAM;kBACE,MAAM;mBACL,MAAM;gBACT,MAAM;kBACJ,OAAO;KAExB;AAED,wDAAwD;AACxD,wBAAsB,mBAAmB;QAOjC,MAAM;UACJ,MAAM;WACL,MAAM;aACJ,MAAM,GAAG,IAAI;mBACP,MAAM,GAAG,IAAI;YACpB,OAAO;YACP,OAAO;KAElB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// src/lib/printApi.ts — publieke print-API voor andere modules
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// Andere modules gebruiken uitsluitend deze functies; zij hoeven de tabellen
|
|
5
|
+
// van deze module niet te kennen.
|
|
6
|
+
import { supabase } from "./supabaseClient";
|
|
7
|
+
const arr = (v) => (Array.isArray(v) ? v : []);
|
|
8
|
+
/** Zoekt de te gebruiken layout: expliciet, anders standaard, anders de nieuwste. */
|
|
9
|
+
async function bepaalLayout(documenttype, layoutId) {
|
|
10
|
+
if (layoutId) {
|
|
11
|
+
const { data } = await supabase
|
|
12
|
+
.from("document_layouts")
|
|
13
|
+
.select("id, papierformaat")
|
|
14
|
+
.eq("id", layoutId)
|
|
15
|
+
.maybeSingle();
|
|
16
|
+
return data ?? null;
|
|
17
|
+
}
|
|
18
|
+
const { data } = await supabase
|
|
19
|
+
.from("document_layouts")
|
|
20
|
+
.select("id, papierformaat, is_standaard, updated_at")
|
|
21
|
+
.eq("documenttype", documenttype)
|
|
22
|
+
.eq("actief", true)
|
|
23
|
+
.order("is_standaard", { ascending: false })
|
|
24
|
+
.order("updated_at", { ascending: false })
|
|
25
|
+
.limit(1);
|
|
26
|
+
return arr(data)[0] ?? null;
|
|
27
|
+
}
|
|
28
|
+
/** Kiest een printer: koppeling op layout, anders koppeling op formaat. */
|
|
29
|
+
async function bepaalPrinter(documenttype, layoutId, papierformaat) {
|
|
30
|
+
const { data: mappings } = await supabase
|
|
31
|
+
.from("printer_mappings")
|
|
32
|
+
.select("printer_id, prioriteit")
|
|
33
|
+
.eq("layout_id", layoutId)
|
|
34
|
+
.order("prioriteit");
|
|
35
|
+
const viaLayout = arr(mappings)[0]?.printer_id;
|
|
36
|
+
if (viaLayout)
|
|
37
|
+
return viaLayout;
|
|
38
|
+
if (papierformaat) {
|
|
39
|
+
const { data } = await supabase
|
|
40
|
+
.from("document_formaat_printers")
|
|
41
|
+
.select("printer_id")
|
|
42
|
+
.eq("documenttype", documenttype)
|
|
43
|
+
.eq("formaat_code", papierformaat)
|
|
44
|
+
.maybeSingle();
|
|
45
|
+
const viaFormaat = data?.printer_id;
|
|
46
|
+
if (viaFormaat)
|
|
47
|
+
return viaFormaat;
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Zet een document in de printwachtrij. Bedoeld voor gebruik vanuit andere
|
|
53
|
+
* modules binnen dezelfde shell en database.
|
|
54
|
+
*/
|
|
55
|
+
export async function printDocument(input) {
|
|
56
|
+
const layout = await bepaalLayout(input.documenttype, input.layoutId);
|
|
57
|
+
if (!layout)
|
|
58
|
+
throw new Error(`Geen layout gevonden voor documenttype "${input.documenttype}"`);
|
|
59
|
+
const printerId = input.printerId ??
|
|
60
|
+
(await bepaalPrinter(input.documenttype, layout.id, layout.papierformaat ?? null));
|
|
61
|
+
const { data, error } = await supabase
|
|
62
|
+
.from("print_jobs")
|
|
63
|
+
.insert({
|
|
64
|
+
layout_id: layout.id,
|
|
65
|
+
printer_id: printerId,
|
|
66
|
+
documenttype: input.documenttype,
|
|
67
|
+
documentnaam: input.documentnaam,
|
|
68
|
+
kopieen: input.kopieen ?? 1,
|
|
69
|
+
payload: input.payload ?? {},
|
|
70
|
+
is_herprint: input.isHerprint ?? false,
|
|
71
|
+
status: "wachtend",
|
|
72
|
+
})
|
|
73
|
+
.select("id")
|
|
74
|
+
.single();
|
|
75
|
+
if (error)
|
|
76
|
+
throw error;
|
|
77
|
+
return { jobId: data.id, layoutId: layout.id, printerId };
|
|
78
|
+
}
|
|
79
|
+
/** Alle beschikbare layouts voor een documentsoort (voor keuzelijsten elders). */
|
|
80
|
+
export async function beschikbareLayouts(documenttype) {
|
|
81
|
+
let q = supabase
|
|
82
|
+
.from("document_layouts")
|
|
83
|
+
.select("id, naam, documenttype, papierformaat, orientatie, is_standaard")
|
|
84
|
+
.eq("actief", true);
|
|
85
|
+
if (documenttype)
|
|
86
|
+
q = q.eq("documenttype", documenttype);
|
|
87
|
+
const { data } = await q.order("naam");
|
|
88
|
+
return arr(data);
|
|
89
|
+
}
|
|
90
|
+
/** Alle actieve printers (voor keuzelijsten elders). */
|
|
91
|
+
export async function beschikbarePrinters() {
|
|
92
|
+
const { data } = await supabase
|
|
93
|
+
.from("printers")
|
|
94
|
+
.select("id, naam, soort, locatie, papierformaat, online, actief")
|
|
95
|
+
.eq("actief", true)
|
|
96
|
+
.order("naam");
|
|
97
|
+
return arr(data);
|
|
98
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { InstellingDef } from "./documentProfiles";
|
|
2
|
+
export type ProductiebonBlokType = "productinfo" | "productfotos" | "samenstelling" | "instructies" | "productiestappen" | "fustinformatie" | "belading" | "visueleopbouw" | "materialen" | "controlepunten" | "extrainfo" | "qrblok" | "tekstblok";
|
|
3
|
+
export interface ProductiebonVeld {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
tonen: boolean;
|
|
7
|
+
kolom: "links" | "rechts" | "volledig";
|
|
8
|
+
grootte: number;
|
|
9
|
+
fontfamilie: string;
|
|
10
|
+
kleur: string;
|
|
11
|
+
uitlijning: "left" | "center" | "right";
|
|
12
|
+
vet: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface ProductiebonKolom {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
breedte: number;
|
|
18
|
+
uitlijning: "left" | "center" | "right";
|
|
19
|
+
fontgrootte?: number;
|
|
20
|
+
fontfamilie?: string;
|
|
21
|
+
kleur?: string;
|
|
22
|
+
vet?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ProductiebonConditie {
|
|
25
|
+
veld: string;
|
|
26
|
+
operator: "=" | "!=" | ">" | "<" | "bevat" | "leeg" | "niet_leeg";
|
|
27
|
+
waarde: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ProductiebonBlok {
|
|
30
|
+
id: string;
|
|
31
|
+
type: ProductiebonBlokType;
|
|
32
|
+
titel: string;
|
|
33
|
+
zichtbaar: boolean;
|
|
34
|
+
opties: Record<string, unknown>;
|
|
35
|
+
velden?: ProductiebonVeld[];
|
|
36
|
+
kolommen?: ProductiebonKolom[];
|
|
37
|
+
condities: ProductiebonConditie[];
|
|
38
|
+
}
|
|
39
|
+
export interface ProductiebonConfig {
|
|
40
|
+
blokken: ProductiebonBlok[];
|
|
41
|
+
}
|
|
42
|
+
export declare const LETTERTYPEN: string[];
|
|
43
|
+
export declare const PRODUCTINFO_VELDEN: {
|
|
44
|
+
key: string;
|
|
45
|
+
label: string;
|
|
46
|
+
}[];
|
|
47
|
+
export declare function nieuwVeld(key: string, aan?: boolean): ProductiebonVeld;
|
|
48
|
+
export declare const SAMENSTELLING_KOLOMMEN: {
|
|
49
|
+
key: string;
|
|
50
|
+
label: string;
|
|
51
|
+
}[];
|
|
52
|
+
export declare const MATERIAAL_KOLOMMEN: {
|
|
53
|
+
key: string;
|
|
54
|
+
label: string;
|
|
55
|
+
}[];
|
|
56
|
+
export declare function pbNieuweKolom(key: string, bibliotheek?: {
|
|
57
|
+
key: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}[]): ProductiebonKolom;
|
|
60
|
+
export interface ProductiebonBlokDef {
|
|
61
|
+
type: ProductiebonBlokType;
|
|
62
|
+
label: string;
|
|
63
|
+
omschrijving: string;
|
|
64
|
+
/** blok werkt met de veldenbibliotheek (positie/grootte/lettertype per veld) */
|
|
65
|
+
velden?: boolean;
|
|
66
|
+
/** blok werkt met een kolommenkiezer */
|
|
67
|
+
kolommen?: "samenstelling" | "materiaal";
|
|
68
|
+
opties: InstellingDef[];
|
|
69
|
+
}
|
|
70
|
+
export declare const PB_BLOK_REGISTER: ProductiebonBlokDef[];
|
|
71
|
+
export declare function pbBlokDef(type: ProductiebonBlokType): ProductiebonBlokDef;
|
|
72
|
+
export declare function nieuwBlok(type: ProductiebonBlokType): ProductiebonBlok;
|
|
73
|
+
export declare function standaardProductiebonConfig(): ProductiebonConfig;
|
|
74
|
+
export declare function leesProductiebonConfig(config: unknown): ProductiebonConfig;
|
|
75
|
+
export interface DemoOnderdeel {
|
|
76
|
+
soort: string;
|
|
77
|
+
artikelnummer: string;
|
|
78
|
+
artikelnaam: string;
|
|
79
|
+
aantal: number;
|
|
80
|
+
eenheid: string;
|
|
81
|
+
locatie: string;
|
|
82
|
+
barcode: string;
|
|
83
|
+
opmerking: string;
|
|
84
|
+
alternatief: string;
|
|
85
|
+
voorraad: string;
|
|
86
|
+
leverancier: string;
|
|
87
|
+
productgroep: string;
|
|
88
|
+
stap: string;
|
|
89
|
+
}
|
|
90
|
+
export declare const DEMO_PRODUCTIEBON: {
|
|
91
|
+
product: {
|
|
92
|
+
artikelnummer: string;
|
|
93
|
+
artikelnaam: string;
|
|
94
|
+
variant: string;
|
|
95
|
+
omschrijving: string;
|
|
96
|
+
potmaat: string;
|
|
97
|
+
hoogte: string;
|
|
98
|
+
kleur: string;
|
|
99
|
+
productgroep: string;
|
|
100
|
+
productiestatus: string;
|
|
101
|
+
productiedatum: string;
|
|
102
|
+
leverdatum: string;
|
|
103
|
+
productieordernummer: string;
|
|
104
|
+
klantnaam: string;
|
|
105
|
+
bestelreferentie: string;
|
|
106
|
+
barcode: string;
|
|
107
|
+
qrcode: string;
|
|
108
|
+
aantal: number;
|
|
109
|
+
};
|
|
110
|
+
onderdelen: DemoOnderdeel[];
|
|
111
|
+
fust: Record<string, string>;
|
|
112
|
+
belading: Record<string, string>;
|
|
113
|
+
lagen: {
|
|
114
|
+
laag: number;
|
|
115
|
+
inhoud: string;
|
|
116
|
+
opmerking: string;
|
|
117
|
+
}[];
|
|
118
|
+
instructies: Record<string, string>;
|
|
119
|
+
extra: Record<string, string>;
|
|
120
|
+
qr: Record<string, string>;
|
|
121
|
+
};
|
|
122
|
+
export type DemoProductiebon = typeof DEMO_PRODUCTIEBON;
|
|
123
|
+
export declare const ONDERDEEL_LABELS: Record<string, string>;
|
|
124
|
+
export declare const FUST_LABELS: Record<string, string>;
|
|
125
|
+
export declare const BELADING_LABELS: Record<string, string>;
|
|
126
|
+
export declare const EXTRA_LABELS: Record<string, string>;
|
|
127
|
+
export declare const QR_LABELS: Record<string, string>;
|
|
128
|
+
export declare const PB_CONDITIE_VELDEN: {
|
|
129
|
+
value: string;
|
|
130
|
+
label: string;
|
|
131
|
+
}[];
|
|
132
|
+
export declare function pbConditieContext(data: DemoProductiebon): Record<string, string>;
|
|
133
|
+
export declare function pbBlokZichtbaar(blok: ProductiebonBlok, ctx: Record<string, string>): boolean;
|
|
134
|
+
/** Vervangt {{groep.veld}} codes door waarden uit de voorbeeldproductiebon. */
|
|
135
|
+
export declare function vulPbVeldcodes(tekst: string, data: DemoProductiebon): string;
|
|
136
|
+
export declare function splitsLijst(waarde: unknown): string[];
|
|
137
|
+
//# sourceMappingURL=productiebonBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productiebonBuilder.d.ts","sourceRoot":"","sources":["../../src/lib/productiebonBuilder.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GACb,cAAc,GACd,eAAe,GACf,aAAa,GACb,kBAAkB,GAClB,gBAAgB,GAChB,UAAU,GACV,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAIhB,MAAM,WAAW,g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