@flowselections/scan-module 1.0.42 → 1.0.44
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/dist-lib/components/ScanModulePage.d.ts.map +1 -1
- package/dist-lib/components/ScanModulePage.js +128 -14
- package/dist-lib/components/fs-ui/DataTable.d.ts +24 -0
- package/dist-lib/components/fs-ui/DataTable.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/DataTable.js +26 -0
- package/dist-lib/components/fs-ui/EmptyState.d.ts +9 -0
- package/dist-lib/components/fs-ui/EmptyState.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/EmptyState.js +5 -0
- package/dist-lib/components/fs-ui/FilterChips.d.ts +15 -0
- package/dist-lib/components/fs-ui/FilterChips.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/FilterChips.js +10 -0
- package/dist-lib/components/fs-ui/FiltersSheet.d.ts +21 -0
- package/dist-lib/components/fs-ui/FiltersSheet.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/FiltersSheet.js +14 -0
- package/dist-lib/components/fs-ui/HoverTip.d.ts +15 -0
- package/dist-lib/components/fs-ui/HoverTip.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/HoverTip.js +24 -0
- package/dist-lib/components/fs-ui/KpiRow.d.ts +6 -0
- package/dist-lib/components/fs-ui/KpiRow.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/KpiRow.js +5 -0
- package/dist-lib/components/fs-ui/KpiTile.d.ts +21 -0
- package/dist-lib/components/fs-ui/KpiTile.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/KpiTile.js +40 -0
- package/dist-lib/components/fs-ui/MobilePrimaryAction.d.ts +7 -0
- package/dist-lib/components/fs-ui/MobilePrimaryAction.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/MobilePrimaryAction.js +6 -0
- package/dist-lib/components/fs-ui/NoticeBar.d.ts +6 -0
- package/dist-lib/components/fs-ui/NoticeBar.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/NoticeBar.js +12 -0
- package/dist-lib/components/fs-ui/PageHeader.d.ts +9 -0
- package/dist-lib/components/fs-ui/PageHeader.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/PageHeader.js +6 -0
- package/dist-lib/components/fs-ui/Pagination.d.ts +8 -0
- package/dist-lib/components/fs-ui/Pagination.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/Pagination.js +7 -0
- package/dist-lib/components/fs-ui/PillTabs.d.ts +15 -0
- package/dist-lib/components/fs-ui/PillTabs.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/PillTabs.js +24 -0
- package/dist-lib/components/fs-ui/RowMenu.d.ts +13 -0
- package/dist-lib/components/fs-ui/RowMenu.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/RowMenu.js +8 -0
- package/dist-lib/components/fs-ui/SearchInput.d.ts +7 -0
- package/dist-lib/components/fs-ui/SearchInput.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/SearchInput.js +26 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.d.ts +8 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.js +30 -0
- package/dist-lib/components/fs-ui/StatusIcon.d.ts +9 -0
- package/dist-lib/components/fs-ui/StatusIcon.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/StatusIcon.js +10 -0
- package/dist-lib/components/fs-ui/TableSkeleton.d.ts +6 -0
- package/dist-lib/components/fs-ui/TableSkeleton.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/TableSkeleton.js +6 -0
- package/dist-lib/components/fs-ui/Toolbar.d.ts +7 -0
- package/dist-lib/components/fs-ui/Toolbar.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/Toolbar.js +5 -0
- package/dist-lib/components/fs-ui/UpdatedAt.d.ts +6 -0
- package/dist-lib/components/fs-ui/UpdatedAt.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/UpdatedAt.js +8 -0
- package/dist-lib/components/scanners/ApparaatPoort.js +2 -2
- package/dist-lib/components/scanners/ApparatenBeheer.d.ts.map +1 -1
- package/dist-lib/components/scanners/ApparatenBeheer.js +5 -3
- package/dist-lib/components/scanners/EindcontroleScanner.js +1 -1
- package/dist-lib/components/scanners/KarHistorie.d.ts +3 -1
- package/dist-lib/components/scanners/KarHistorie.d.ts.map +1 -1
- package/dist-lib/components/scanners/KarHistorie.js +122 -44
- package/dist-lib/components/scanners/KarIndelingScanner.js +2 -2
- package/dist-lib/components/scanners/KarScannerPage.js +1 -1
- package/dist-lib/components/scanners/ScanMonitoring.d.ts +4 -1
- package/dist-lib/components/scanners/ScanMonitoring.d.ts.map +1 -1
- package/dist-lib/components/scanners/ScanMonitoring.js +8 -11
- package/dist-lib/components/settings/ScanToestellenSettingsCard.d.ts +2 -0
- package/dist-lib/components/settings/ScanToestellenSettingsCard.d.ts.map +1 -0
- package/dist-lib/components/settings/ScanToestellenSettingsCard.js +12 -0
- package/dist-lib/index.js +2 -2
- package/dist-lib/integrations/supabase/types.d.ts +2007 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/labels.d.ts +11 -0
- package/dist-lib/lib/labels.d.ts.map +1 -0
- package/dist-lib/lib/labels.js +58 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScanModulePage.d.ts","sourceRoot":"","sources":["../../src/components/ScanModulePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScanModulePage.d.ts","sourceRoot":"","sources":["../../src/components/ScanModulePage.tsx"],"names":[],"mappings":"AA4mBA,wBAAgB,cAAc,gCAwR7B"}
|
|
@@ -5,16 +5,32 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
// Overzicht van alle scanners + aanmaken van nieuwe scanners.
|
|
6
6
|
// Elke scanner heeft een eigen openbare link: /scanner/<slug>
|
|
7
7
|
// ============================================================================
|
|
8
|
-
import { createContext, useContext, useEffect, useState } from "react";
|
|
9
|
-
import {
|
|
8
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Label, Switch, Textarea, toast, } from "@flowselections/core";
|
|
10
10
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@flowselections/core";
|
|
11
|
-
import { Check, Copy, ExternalLink, Loader2,
|
|
11
|
+
import { Check, Copy, ExternalLink, Loader2, Plus, Printer, ScanLine, RefreshCw, ShoppingCart, } from "lucide-react";
|
|
12
12
|
import { useScanners, slugify, } from "../hooks/useScanners.js";
|
|
13
13
|
import { usePrinters } from "../hooks/usePrinters.js";
|
|
14
|
-
import { ApparatenBeheer
|
|
14
|
+
import { ApparatenBeheer } from "./scanners/ApparatenBeheer.js";
|
|
15
15
|
import { SCANNER_TYPES, STANDAARD_SCANNER_TYPE, scannerType, normaliseerScannerType, } from "../lib/scannerTypes.js";
|
|
16
16
|
import { KarHistorie } from "./scanners/KarHistorie.js";
|
|
17
17
|
import { ScanMonitoring } from "./scanners/ScanMonitoring.js";
|
|
18
|
+
import { PageHeader } from "./fs-ui/PageHeader.js";
|
|
19
|
+
import { NoticeBar } from "./fs-ui/NoticeBar.js";
|
|
20
|
+
import { PillTabs } from "./fs-ui/PillTabs.js";
|
|
21
|
+
import { Toolbar } from "./fs-ui/Toolbar.js";
|
|
22
|
+
import { SearchInput } from "./fs-ui/SearchInput.js";
|
|
23
|
+
import { FilterChips } from "./fs-ui/FilterChips.js";
|
|
24
|
+
import { FiltersButton, FiltersSheet, SidePanel } from "./fs-ui/FiltersSheet.js";
|
|
25
|
+
import { DataTable, Cell } from "./fs-ui/DataTable.js";
|
|
26
|
+
import { StatusIcon } from "./fs-ui/StatusIcon.js";
|
|
27
|
+
import { RowMenu } from "./fs-ui/RowMenu.js";
|
|
28
|
+
import { TableSkeleton } from "./fs-ui/TableSkeleton.js";
|
|
29
|
+
import { EmptyState } from "./fs-ui/EmptyState.js";
|
|
30
|
+
import { HoverTip } from "./fs-ui/HoverTip.js";
|
|
31
|
+
import { MobilePrimaryAction } from "./fs-ui/MobilePrimaryAction.js";
|
|
32
|
+
import { ShortcutHelp, useShortcuts } from "./fs-ui/ShortcutHelp.js";
|
|
33
|
+
import { scannerSoortLabel } from "../lib/labels.js";
|
|
18
34
|
import { haalShellHost } from "../lib/shellHost.functions.js";
|
|
19
35
|
const GEEN_PRINTER = "geen";
|
|
20
36
|
// De publieke basis-URL komt van central-auth (GET /api/shell-host): één bron
|
|
@@ -50,9 +66,8 @@ function BasisUrlMelding({ status, compact }) {
|
|
|
50
66
|
}
|
|
51
67
|
return null;
|
|
52
68
|
}
|
|
53
|
-
function
|
|
69
|
+
function useKopieer(url) {
|
|
54
70
|
const [gekopieerd, setGekopieerd] = useState(false);
|
|
55
|
-
const { url, status } = useScannerUrl(scanner.slug);
|
|
56
71
|
const kopieer = async () => {
|
|
57
72
|
if (!url)
|
|
58
73
|
return;
|
|
@@ -63,12 +78,32 @@ function ScannerKaart({ scanner, onVerwijder, onBewerk, }) {
|
|
|
63
78
|
setTimeout(() => setGekopieerd(false), 2000);
|
|
64
79
|
}
|
|
65
80
|
catch {
|
|
66
|
-
toast.error("Kopiëren
|
|
81
|
+
toast.error("Kopiëren lukt niet. Selecteer de link en kopieer hem zelf.");
|
|
67
82
|
}
|
|
68
83
|
};
|
|
84
|
+
return { gekopieerd, kopieer };
|
|
85
|
+
}
|
|
86
|
+
/** Linkcel in de tabel: kopieerknop met de link in een infoballon. */
|
|
87
|
+
function LinkCel({ scanner }) {
|
|
88
|
+
const { url } = useScannerUrl(scanner.slug);
|
|
89
|
+
const { gekopieerd, kopieer } = useKopieer(url);
|
|
90
|
+
return (_jsxs("div", { className: "flex min-w-0 items-center gap-1", children: [_jsxs(Button, { variant: "outline", size: "sm", disabled: !url, onClick: (e) => {
|
|
91
|
+
e.stopPropagation();
|
|
92
|
+
void kopieer();
|
|
93
|
+
}, children: [gekopieerd ? _jsx(Check, { className: "mr-2 h-4 w-4" }) : _jsx(Copy, { className: "mr-2 h-4 w-4" }), gekopieerd ? "Gekopieerd" : "Link kopiëren"] }), _jsx(HoverTip, { label: "Openen", content: "Openen gebruikt de omgeving waar je nu in zit. De gekopieerde link is de deelbare link voor medewerkers.", children: _jsx("a", { href: `/scanner/${scanner.slug}`, target: "_blank", rel: "noreferrer", "aria-label": `${scanner.naam} openen`, onClick: (e) => e.stopPropagation(), className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground", children: _jsx(ExternalLink, { className: "h-4 w-4" }) }) })] }));
|
|
94
|
+
}
|
|
95
|
+
/** Mobiele kaart: werkvloermaat (tikvlakken 56 px). */
|
|
96
|
+
function ScannerKaart({ scanner, onOpen, menu, }) {
|
|
97
|
+
const { url } = useScannerUrl(scanner.slug);
|
|
98
|
+
const { gekopieerd, kopieer } = useKopieer(url);
|
|
69
99
|
const soort = scannerType(scanner.type);
|
|
70
100
|
const SoortIcoon = soort.icon;
|
|
71
|
-
return (_jsxs(
|
|
101
|
+
return (_jsxs("li", { className: "space-y-3 p-4", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsxs("button", { type: "button", onClick: onOpen, className: "flex min-h-14 min-w-0 flex-1 items-center gap-3 text-left", children: [_jsx("span", { className: "grid h-12 w-12 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary", children: _jsx(SoortIcoon, { className: "h-6 w-6" }) }), _jsxs("span", { className: "min-w-0", children: [_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-lg font-semibold", children: scanner.naam }), _jsx(StatusIcon, { tone: scanner.actief ? "klaar" : "open", label: scanner.actief ? "Actief" : "Uit" })] }), _jsx("span", { className: "block truncate text-base text-muted-foreground", children: scannerSoortLabel(scanner.type) })] })] }), _jsx(RowMenu, { label: scanner.naam, items: menu, large: true })] }), _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsx(Button, { variant: "outline", className: "h-14 text-lg", asChild: true, children: _jsxs("a", { href: `/scanner/${scanner.slug}`, target: "_blank", rel: "noreferrer", children: [_jsx(ExternalLink, { className: "mr-2 h-5 w-5" }), " Openen"] }) }), _jsxs(Button, { className: "h-14 text-lg", disabled: !url, onClick: () => void kopieer(), children: [gekopieerd ? _jsx(Check, { className: "mr-2 h-5 w-5" }) : _jsx(Copy, { className: "mr-2 h-5 w-5" }), gekopieerd ? "Gekopieerd" : "Link"] })] })] }));
|
|
102
|
+
}
|
|
103
|
+
/** Zijpaneel met link en toestellen van één scanner. */
|
|
104
|
+
function ScannerPaneel({ scanner, onClose }) {
|
|
105
|
+
const { url, status } = useScannerUrl(scanner?.slug ?? "");
|
|
106
|
+
return (_jsx(SidePanel, { open: !!scanner, onOpenChange: (o) => !o && onClose(), title: scanner?.naam ?? "Scanner", children: scanner && (_jsxs(_Fragment, { children: [scanner.omschrijving ? _jsx("p", { className: "text-sm text-muted-foreground", children: scanner.omschrijving }) : null, url ? (_jsx(Input, { readOnly: true, value: url, onFocus: (e) => e.currentTarget.select(), className: "h-10 text-sm", "aria-label": "Scannerlink" })) : (_jsx(BasisUrlMelding, { status: status })), _jsx(ApparatenBeheer, { scannerId: scanner.id, scannerUrl: url ?? null })] })) }));
|
|
72
107
|
}
|
|
73
108
|
function NieuweScannerDialog({ open, onOpenChange, onMaak, bezig, }) {
|
|
74
109
|
const [naam, setNaam] = useState("");
|
|
@@ -144,10 +179,26 @@ function BewerkScannerDialog({ scanner, onOpenChange, onOpslaan, }) {
|
|
|
144
179
|
};
|
|
145
180
|
return (_jsx(Dialog, { open: !!scanner, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "sm:max-w-md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Scanner wijzigen" }), _jsx(DialogDescription, { children: "Pas naam, omschrijving en instellingen aan. De link blijft hetzelfde." })] }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "bewerk-naam", children: "Naam" }), _jsx(Input, { id: "bewerk-naam", value: naam, onChange: (e) => setNaam(e.target.value), className: "h-11" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "bewerk-omschrijving", children: "Omschrijving" }), _jsx(Textarea, { id: "bewerk-omschrijving", value: omschrijving, onChange: (e) => setOmschrijving(e.target.value) })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { children: "Soort scanner" }), _jsxs(Select, { value: type, onValueChange: setType, children: [_jsx(SelectTrigger, { className: "h-11", children: _jsx(SelectValue, { placeholder: "Kies een soort" }) }), _jsx(SelectContent, { children: SCANNER_TYPES.map((t) => (_jsx(SelectItem, { value: t.id, children: t.label }, t.id))) })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: scannerType(type).omschrijving })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { children: "Printer" }), _jsxs(Select, { value: printerId, onValueChange: setPrinterId, children: [_jsx(SelectTrigger, { className: "h-11", children: _jsx(SelectValue, { placeholder: printersLaden ? "Printers laden…" : "Kies een printer" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: GEEN_PRINTER, children: "Geen printer" }), printers.map((p) => (_jsxs(SelectItem, { value: p.id, children: [p.naam, p.locatie ? ` — ${p.locatie}` : ""] }, p.id)))] })] })] }), _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 rounded-xl border p-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx(Label, { htmlFor: "bewerk-actief", children: "Scanner actief" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Uit betekent: link werkt niet meer." })] }), _jsx(Switch, { id: "bewerk-actief", checked: actief, onCheckedChange: setActief })] }), _jsxs("div", { className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-3 rounded-xl border p-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx(Label, { htmlFor: "bewerk-medewerker", children: "Naam medewerker verplicht" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Elke kar en scan wordt op naam vastgelegd." })] }), _jsx(Switch, { id: "bewerk-medewerker", checked: vereistMedewerker, onCheckedChange: setVereistMedewerker })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "bewerk-pincode", children: "Pincode (optioneel)" }), _jsx(Input, { id: "bewerk-pincode", value: pincode, onChange: (e) => setPincode(e.target.value), placeholder: "Leeg = geen pincode", className: "h-11" })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "bewerk-werkplek", children: "Werkplek (voor printen)" }), _jsx(Input, { id: "bewerk-werkplek", value: werkplek, onChange: (e) => setWerkplek(e.target.value), placeholder: "Bijv. Hal 2", className: "h-11" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "De werkplek moet exact gelijk zijn aan de locatie- of systeemnaam van de printer in Layouts & printers." })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "bewerk-max", children: "Max. producten per kar (optioneel)" }), _jsx(Input, { id: "bewerk-max", type: "number", min: 1, value: maxProducten, onChange: (e) => setMaxProducten(e.target.value), placeholder: "Leeg = onbeperkt", className: "h-11" })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Annuleren" }), _jsxs(Button, { onClick: () => void opslaan(), disabled: bezig || !naam.trim(), children: [bezig ? _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : null, "Opslaan"] })] })] }) }));
|
|
146
181
|
}
|
|
182
|
+
const SCANNER_COLS = [300, 160, 170, 110, 210, 56];
|
|
147
183
|
export function ScanModulePage() {
|
|
148
|
-
const { scanners, laden, bezig, maakScanner, wijzigScanner, verwijderScanner } = useScanners();
|
|
184
|
+
const { scanners, laden, bezig, laad, maakScanner, wijzigScanner, verwijderScanner } = useScanners();
|
|
149
185
|
const [dialoogOpen, setDialoogOpen] = useState(false);
|
|
150
186
|
const [bewerkScanner, setBewerkScanner] = useState(null);
|
|
187
|
+
const [paneel, setPaneel] = useState(null);
|
|
188
|
+
const [tab, setTab] = useState("scanners");
|
|
189
|
+
const [zoek, setZoek] = useState("");
|
|
190
|
+
const [soort, setSoort] = useState("alle");
|
|
191
|
+
const [actief, setActief] = useState("alle");
|
|
192
|
+
const [filtersOpen, setFiltersOpen] = useState(false);
|
|
193
|
+
const [hulpOpen, setHulpOpen] = useState(false);
|
|
194
|
+
const [focus, setFocus] = useState(-1);
|
|
195
|
+
const [bijgewerkt, setBijgewerkt] = useState(null);
|
|
196
|
+
const [karTotaal, setKarTotaal] = useState(null);
|
|
197
|
+
const zoekRef = useRef(null);
|
|
198
|
+
useEffect(() => {
|
|
199
|
+
if (!laden)
|
|
200
|
+
setBijgewerkt(new Date());
|
|
201
|
+
}, [laden, scanners]);
|
|
151
202
|
const maak = async (invoer) => {
|
|
152
203
|
const resultaat = await maakScanner(invoer);
|
|
153
204
|
if (resultaat)
|
|
@@ -159,24 +210,87 @@ export function ScanModulePage() {
|
|
|
159
210
|
};
|
|
160
211
|
const [basisStatus, setBasisStatus] = useState({ staat: "laden" });
|
|
161
212
|
useEffect(() => {
|
|
162
|
-
let
|
|
213
|
+
let actiefFlag = true;
|
|
163
214
|
void haalShellHost()
|
|
164
215
|
.then((resultaat) => {
|
|
165
|
-
if (!
|
|
216
|
+
if (!actiefFlag)
|
|
166
217
|
return;
|
|
167
218
|
setBasisStatus(resultaat.ok
|
|
168
219
|
? { staat: "ok", basis: resultaat.host }
|
|
169
220
|
: { staat: "fout", reden: resultaat.reden });
|
|
170
221
|
})
|
|
171
222
|
.catch(() => {
|
|
172
|
-
if (
|
|
223
|
+
if (actiefFlag)
|
|
173
224
|
setBasisStatus({ staat: "fout", reden: "onbereikbaar" });
|
|
174
225
|
});
|
|
175
226
|
return () => {
|
|
176
|
-
|
|
227
|
+
actiefFlag = false;
|
|
177
228
|
};
|
|
178
229
|
}, []);
|
|
179
|
-
|
|
230
|
+
const lijst = useMemo(() => {
|
|
231
|
+
const z = zoek.trim().toLowerCase();
|
|
232
|
+
return scanners.filter((s) => (soort === "alle" || normaliseerScannerType(s.type) === soort) &&
|
|
233
|
+
(actief === "alle" || (actief === "actief") === s.actief) &&
|
|
234
|
+
(!z || [s.naam, s.omschrijving, s.werkplek, s.slug].some((v) => (v ?? "").toLowerCase().includes(z))));
|
|
235
|
+
}, [scanners, zoek, soort, actief]);
|
|
236
|
+
const menuVoor = useCallback((s) => [
|
|
237
|
+
{ label: "Toestellen en link", onSelect: () => setPaneel(s) },
|
|
238
|
+
{ label: "Wijzigen", onSelect: () => setBewerkScanner(s) },
|
|
239
|
+
{ label: "Verwijderen", destructive: true, onSelect: () => void verwijderScanner(s.id) },
|
|
240
|
+
], [verwijderScanner]);
|
|
241
|
+
const shortcuts = useMemo(() => tab === "scanners"
|
|
242
|
+
? {
|
|
243
|
+
n: () => setDialoogOpen(true),
|
|
244
|
+
"/": () => zoekRef.current?.focus(),
|
|
245
|
+
j: () => setFocus((f) => Math.min(lijst.length - 1, f + 1)),
|
|
246
|
+
k: () => setFocus((f) => Math.max(0, f - 1)),
|
|
247
|
+
Enter: () => (lijst[focus] ? setBewerkScanner(lijst[focus]) : undefined),
|
|
248
|
+
Escape: () => (zoek ? setZoek("") : setFocus(-1)),
|
|
249
|
+
"?": () => setHulpOpen(true),
|
|
250
|
+
}
|
|
251
|
+
: { n: () => setDialoogOpen(true), "?": () => setHulpOpen(true) }, [tab, lijst, focus, zoek]);
|
|
252
|
+
useShortcuts(shortcuts, !dialoogOpen && !bewerkScanner && !paneel && !filtersOpen);
|
|
253
|
+
const chips = [
|
|
254
|
+
...(soort !== "alle" ? [{ key: "soort", label: scannerSoortLabel(soort), onClear: () => setSoort("alle") }] : []),
|
|
255
|
+
...(actief !== "alle" ? [{ key: "actief", label: actief === "actief" ? "Actief" : "Uit", onClear: () => setActief("alle") }] : []),
|
|
256
|
+
];
|
|
257
|
+
const wisAlles = () => {
|
|
258
|
+
setSoort("alle");
|
|
259
|
+
setActief("alle");
|
|
260
|
+
};
|
|
261
|
+
const columns = [
|
|
262
|
+
{
|
|
263
|
+
key: "scanner",
|
|
264
|
+
header: "Scanner",
|
|
265
|
+
width: SCANNER_COLS[0],
|
|
266
|
+
cell: (s) => {
|
|
267
|
+
const Icoon = scannerType(s.type).icon;
|
|
268
|
+
return (_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx(Icoon, { className: "h-4 w-4 shrink-0 text-primary", "aria-hidden": true }), _jsx(Cell, { main: _jsx("span", { className: "font-semibold", children: s.naam }), sub: s.omschrijving ?? undefined })] }));
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
{ key: "soort", header: "Soort", width: SCANNER_COLS[1], cell: (s) => _jsx(Cell, { main: scannerSoortLabel(s.type) }) },
|
|
272
|
+
{ key: "werkplek", header: "Werkplek", width: SCANNER_COLS[2], cell: (s) => _jsx(Cell, { main: s.werkplek || "—", sub: s.pincode ? "Met pincode" : undefined }) },
|
|
273
|
+
{
|
|
274
|
+
key: "status",
|
|
275
|
+
header: "Status",
|
|
276
|
+
width: SCANNER_COLS[3],
|
|
277
|
+
cell: (s) => _jsx(StatusIcon, { tone: s.actief ? "klaar" : "open", label: s.actief ? "Actief" : "Uit", showLabel: true }),
|
|
278
|
+
},
|
|
279
|
+
{ key: "link", header: "Link", width: SCANNER_COLS[4], cell: (s) => _jsx(LinkCel, { scanner: s }) },
|
|
280
|
+
{ key: "menu", header: "", width: SCANNER_COLS[5], cell: (s) => _jsx(RowMenu, { label: s.naam, items: menuVoor(s) }) },
|
|
281
|
+
];
|
|
282
|
+
const meldingen = basisStatus.staat === "fout" ? [FOUT_TEKST[basisStatus.reden]] : [];
|
|
283
|
+
return (_jsx(BasisUrlContext.Provider, { value: basisStatus, children: _jsxs("main", { className: "flex w-full min-w-0 flex-col gap-4 overflow-x-clip p-4 pb-[calc(7rem+env(safe-area-inset-bottom))] sm:p-6 sm:pb-24", children: [_jsx(PageHeader, { title: "Scanners", updatedAt: bijgewerkt, updatedInfo: "Elke scanner heeft een eigen openbare link. Deel die met de juiste medewerker. Cijfers gaan over de afgelopen 24 uur.", actions: _jsxs(_Fragment, { children: [_jsxs(Button, { variant: "outline", size: "sm", onClick: () => void laad(), "aria-label": "Vernieuwen", className: "h-10 w-10 p-0 sm:h-9 sm:w-auto sm:px-3", children: [_jsx(RefreshCw, { className: "h-4 w-4 sm:mr-2" }), " ", _jsx("span", { className: "hidden sm:inline", children: "Vernieuwen" })] }), _jsxs(Button, { size: "sm", className: "hidden sm:inline-flex", onClick: () => setDialoogOpen(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuwe scanner", _jsx("kbd", { "aria-hidden": true, className: "ml-2 hidden rounded border border-primary-foreground/30 bg-primary-foreground/15 px-1.5 font-mono text-[10px] leading-4 text-primary-foreground sm:inline-block", children: "N" })] })] }) }), _jsx(NoticeBar, { items: meldingen }), _jsx(ScanMonitoring, {}), _jsx(PillTabs, { label: "Onderdelen", value: tab, onChange: setTab, tabs: [
|
|
284
|
+
{ id: "scanners", label: "Scanners", icon: ScanLine, count: laden ? null : scanners.length },
|
|
285
|
+
{ id: "karren", label: "Karren", icon: ShoppingCart, count: karTotaal },
|
|
286
|
+
] }), tab === "scanners" ? (_jsxs(_Fragment, { children: [_jsxs(Toolbar, { children: [_jsx(SearchInput, { ref: zoekRef, value: zoek, onChange: setZoek, placeholder: "Zoek op naam, werkplek of omschrijving" }), _jsx(FiltersButton, { count: chips.length, onClick: () => setFiltersOpen(true) }), _jsx(FilterChips, { chips: chips, onClearAll: wisAlles })] }), _jsx("div", { className: "w-full min-w-0 overflow-clip rounded-xl border border-border bg-card shadow-sm", children: laden ? (_jsx(TableSkeleton, { widths: SCANNER_COLS, rows: 3 })) : lijst.length === 0 ? (_jsx(EmptyState, { icon: _jsx(ScanLine, { className: "h-6 w-6" }), title: scanners.length === 0 ? "Nog geen scanners" : "Geen scanners gevonden", text: scanners.length === 0 ? "Maak je eerste scanner aan en deel de link met je medewerker." : "Pas je zoekopdracht of filters aan.", action: scanners.length === 0 ? (_jsxs(Button, { size: "sm", onClick: () => setDialoogOpen(true), children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), " Nieuwe scanner"] })) : (_jsx(Button, { variant: "outline", size: "sm", onClick: () => { setZoek(""); wisAlles(); }, children: "Alles wissen" })) })) : (_jsxs(_Fragment, { children: [_jsx(DataTable, { columns: columns, rows: lijst, rowKey: (s) => s.id, focusedIndex: focus, selectedKey: paneel?.id ?? bewerkScanner?.id ?? null, onOpen: (s) => setBewerkScanner(s) }), _jsx("ul", { className: "divide-y divide-border md:hidden", children: lijst.map((s) => (_jsx(ScannerKaart, { scanner: s, onOpen: () => setPaneel(s), menu: menuVoor(s) }, s.id))) })] })) }), !laden && lijst.length > 0 && (_jsx("p", { className: "text-sm text-muted-foreground tabular-nums", children: lijst.length === scanners.length ? `${lijst.length} scanners` : `${lijst.length} van ${scanners.length} scanners` }))] })) : (_jsx(KarHistorie, { onLoaded: (n, at) => { setKarTotaal(n); setBijgewerkt(at); } })), _jsxs(MobilePrimaryAction, { onClick: () => setDialoogOpen(true), children: [_jsx(Plus, { className: "mr-2 h-5 w-5" }), " Nieuwe scanner"] }), _jsxs(FiltersSheet, { open: filtersOpen, onOpenChange: setFiltersOpen, onClearAll: wisAlles, children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Soort scanner" }), _jsxs(Select, { value: soort, onValueChange: setSoort, children: [_jsx(SelectTrigger, { className: "h-10", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "alle", children: "Alle soorten" }), SCANNER_TYPES.map((t) => _jsx(SelectItem, { value: t.id, children: scannerSoortLabel(t.id) }, t.id))] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Status" }), _jsxs(Select, { value: actief, onValueChange: (v) => setActief(v), children: [_jsx(SelectTrigger, { className: "h-10", children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "alle", children: "Actief en uit" }), _jsx(SelectItem, { value: "actief", children: "Actief" }), _jsx(SelectItem, { value: "uit", children: "Uit" })] })] })] })] }), _jsx(ScannerPaneel, { scanner: paneel, onClose: () => setPaneel(null) }), _jsx(ShortcutHelp, { open: hulpOpen, onOpenChange: setHulpOpen, shortcuts: [
|
|
287
|
+
[["/"], "Zoeken"],
|
|
288
|
+
[["N"], "Nieuwe scanner"],
|
|
289
|
+
[["J", "K"], "Volgende / vorige rij"],
|
|
290
|
+
[["Enter"], "Geselecteerde rij openen"],
|
|
291
|
+
[["Esc"], "Zoeken wissen / sluiten"],
|
|
292
|
+
[["?"], "Dit overzicht"],
|
|
293
|
+
] }), _jsx(NieuweScannerDialog, { open: dialoogOpen, onOpenChange: setDialoogOpen, onMaak: maak, bezig: bezig }), _jsx(BewerkScannerDialog, { scanner: bewerkScanner, onOpenChange: (v) => {
|
|
180
294
|
if (!v)
|
|
181
295
|
setBewerkScanner(null);
|
|
182
296
|
}, onOpslaan: bewaar })] }) }));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { HoverTip } from "./HoverTip.js";
|
|
3
|
+
export interface Column<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
header: string;
|
|
6
|
+
width: number;
|
|
7
|
+
cell: (row: T) => ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/** Tabel uit Verkooporders: eigen <table>, table-fixed, kop 40 px, rij 60 px. */
|
|
10
|
+
export declare function DataTable<T>({ columns, rows, rowKey, focusedIndex, selectedKey, onOpen, }: {
|
|
11
|
+
columns: Column<T>[];
|
|
12
|
+
rows: T[];
|
|
13
|
+
rowKey: (r: T) => string;
|
|
14
|
+
focusedIndex?: number;
|
|
15
|
+
selectedKey?: string | null;
|
|
16
|
+
onOpen?: (r: T) => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
/** Cel met hooguit twee regels; te lange tekst afgekapt met infoballon. */
|
|
19
|
+
export declare function Cell({ main, sub }: {
|
|
20
|
+
main: ReactNode;
|
|
21
|
+
sub?: ReactNode;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
export { HoverTip };
|
|
24
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;CAC7B;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,WAAW,EACX,MAAM,GACP,EAAE;IACD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CACzB,+BAiCA;AAoBD,2EAA2E;AAC3E,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,SAAS,CAAA;CAAE,+BAOvE;AAaD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { HoverTip } from "./HoverTip.js";
|
|
4
|
+
/** Tabel uit Verkooporders: eigen <table>, table-fixed, kop 40 px, rij 60 px. */
|
|
5
|
+
export function DataTable({ columns, rows, rowKey, focusedIndex, selectedKey, onOpen, }) {
|
|
6
|
+
return (_jsx("div", { className: "hidden max-h-[calc(100dvh-7rem)] overflow-auto md:block xl:max-h-none xl:overflow-visible", children: _jsxs("table", { className: "w-full min-w-[900px] table-fixed caption-bottom text-sm [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-10 [&_thead_th]:h-10 [&_thead_th]:bg-card [&_thead_th]:px-4 [&_thead_th]:text-left [&_thead_th]:align-middle [&_thead_th]:text-[11px] [&_thead_th]:font-semibold [&_thead_th]:uppercase [&_thead_th]:tracking-wide [&_thead_th]:text-muted-foreground", children: [_jsx("colgroup", { children: columns.map((c) => (_jsx("col", { style: { width: `${c.width}px` } }, c.key))) }), _jsx("thead", { className: "border-b border-border", children: _jsx("tr", { children: columns.map((c) => (_jsx("th", { scope: "col", children: c.header }, c.key))) }) }), _jsx("tbody", { children: rows.map((r, i) => (_jsx(Row, { focused: i === focusedIndex, selected: selectedKey === rowKey(r), onOpen: onOpen ? () => onOpen(r) : undefined, children: columns.map((c, ci) => (_jsxs("td", { className: "relative px-4 py-0 align-middle", children: [ci === 0 && (selectedKey === rowKey(r) || i === focusedIndex) && (_jsx("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 w-[3px] " + (selectedKey === rowKey(r) ? "bg-primary" : "bg-primary/40") })), c.cell(r)] }, c.key))) }, rowKey(r)))) })] }) }));
|
|
7
|
+
}
|
|
8
|
+
function Row({ children, focused, selected, onOpen }) {
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (focused)
|
|
12
|
+
ref.current?.scrollIntoView({ block: "nearest" });
|
|
13
|
+
}, [focused]);
|
|
14
|
+
return (_jsx("tr", { ref: ref, "data-state": selected ? "selected" : undefined, style: { height: 60 }, onClick: onOpen, className: "group border-b border-border transition-colors last:border-0 hover:bg-muted/50 " + (onOpen ? "cursor-pointer " : "") + (focused ? "bg-muted/60" : ""), children: children }));
|
|
15
|
+
}
|
|
16
|
+
/** Cel met hooguit twee regels; te lange tekst afgekapt met infoballon. */
|
|
17
|
+
export function Cell({ main, sub }) {
|
|
18
|
+
return (_jsxs("div", { className: "min-w-0", children: [_jsx(Clip, { className: "text-sm text-foreground", children: main }), sub != null && sub !== "" && _jsx(Clip, { className: "text-xs text-muted-foreground", children: sub })] }));
|
|
19
|
+
}
|
|
20
|
+
function Clip({ children, className }) {
|
|
21
|
+
if (typeof children === "string" && children.length > 28) {
|
|
22
|
+
return (_jsx("div", { className: "truncate " + className, title: children, children: children }));
|
|
23
|
+
}
|
|
24
|
+
return _jsx("div", { className: "truncate " + className, children: children });
|
|
25
|
+
}
|
|
26
|
+
export { HoverTip };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Lege toestand: groot zacht icoon, korte zin, één actie. */
|
|
3
|
+
export declare function EmptyState({ icon, title, text, action, }: {
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,8DAA8D;AAC9D,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,+BAaA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Lege toestand: groot zacht icoon, korte zin, één actie. */
|
|
3
|
+
export function EmptyState({ icon, title, text, action, }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-4 py-14 text-center", children: [_jsx("span", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-muted text-muted-foreground", "aria-hidden": true, children: icon }), _jsxs("div", { children: [_jsx("div", { className: "text-sm font-semibold text-foreground", children: title }), text && _jsx("div", { className: "mt-1 max-w-sm text-sm text-muted-foreground", children: text })] }), action] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function FilterChip({ label, onClear, icon }: {
|
|
3
|
+
label: string;
|
|
4
|
+
onClear: () => void;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function FilterChips({ chips, onClearAll }: {
|
|
8
|
+
chips: {
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
onClear: () => void;
|
|
12
|
+
}[];
|
|
13
|
+
onClearAll: () => void;
|
|
14
|
+
}): import("react").JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=FilterChips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/FilterChips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,+BAa5G;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAAE,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,sCAY1I"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
export function FilterChip({ label, onClear, icon }) {
|
|
4
|
+
return (_jsxs("button", { type: "button", onClick: onClear, "aria-label": `Filter ${label} wissen`, className: "inline-flex h-8 items-center gap-1.5 rounded-full border border-border bg-muted px-3 text-xs font-medium text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [icon, label, _jsx(X, { className: "h-3.5 w-3.5", "aria-hidden": true })] }));
|
|
5
|
+
}
|
|
6
|
+
export function FilterChips({ chips, onClearAll }) {
|
|
7
|
+
if (chips.length === 0)
|
|
8
|
+
return null;
|
|
9
|
+
return (_jsxs(_Fragment, { children: [chips.map((c) => (_jsx(FilterChip, { label: c.label, onClear: c.onClear }, c.key))), _jsx("button", { type: "button", onClick: onClearAll, className: "h-8 px-2 text-xs font-medium text-muted-foreground hover:text-foreground", children: "Alles wissen" })] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Knop "Filters" met teller (mobiel alleen icoon). */
|
|
3
|
+
export declare function FiltersButton({ count, onClick }: {
|
|
4
|
+
count: number;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
/** Zijpaneel rechts (core heeft geen Sheet-export; Dialog als paneel). */
|
|
8
|
+
export declare function SidePanel({ open, onOpenChange, title, children, footer, }: {
|
|
9
|
+
open: boolean;
|
|
10
|
+
onOpenChange: (o: boolean) => void;
|
|
11
|
+
title: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function FiltersSheet(props: {
|
|
16
|
+
open: boolean;
|
|
17
|
+
onOpenChange: (o: boolean) => void;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
onClearAll: () => void;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=FiltersSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FiltersSheet.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/FiltersSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+BAYvF;AAED,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,+BAYA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,+BAgBA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Dialog, DialogContent, DialogHeader, DialogTitle } from "@flowselections/core";
|
|
3
|
+
import { SlidersHorizontal } from "lucide-react";
|
|
4
|
+
/** Knop "Filters" met teller (mobiel alleen icoon). */
|
|
5
|
+
export function FiltersButton({ count, onClick }) {
|
|
6
|
+
return (_jsxs(Button, { variant: "outline", size: "sm", onClick: onClick, "aria-label": "Filters", className: "relative h-10 px-3 sm:h-9", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4 sm:mr-2" }), _jsx("span", { className: "hidden sm:inline", children: "Filters" }), count > 0 && (_jsx("span", { className: "ml-2 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1.5 text-[11px] font-semibold text-primary-foreground", children: count }))] }));
|
|
7
|
+
}
|
|
8
|
+
/** Zijpaneel rechts (core heeft geen Sheet-export; Dialog als paneel). */
|
|
9
|
+
export function SidePanel({ open, onOpenChange, title, children, footer, }) {
|
|
10
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "left-auto right-0 top-0 flex h-[100dvh] max-h-[100dvh] w-full max-w-md translate-x-0 translate-y-0 flex-col gap-4 overflow-y-auto rounded-none p-6 sm:rounded-l-lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: title }) }), _jsx("div", { className: "flex-1 space-y-4", children: children }), footer ? _jsx("div", { className: "flex justify-end gap-2", children: footer }) : null] }) }));
|
|
11
|
+
}
|
|
12
|
+
export function FiltersSheet(props) {
|
|
13
|
+
return (_jsx(SidePanel, { open: props.open, onOpenChange: props.onOpenChange, title: "Filters", footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", size: "sm", onClick: props.onClearAll, children: "Alles wissen" }), _jsx(Button, { size: "sm", onClick: () => props.onOpenChange(false), children: "Klaar" })] }), children: props.children }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip op basis van Popover (core heeft geen Tooltip-export): opent bij
|
|
4
|
+
* aanwijzen én bij toetsenbordfocus, sluit met Esc of bij verlaten. De
|
|
5
|
+
* trigger is een knop met een toegankelijke naam.
|
|
6
|
+
*/
|
|
7
|
+
export declare function HoverTip({ content, label, children, side, align, className, }: {
|
|
8
|
+
align?: "start" | "center" | "end";
|
|
9
|
+
content: ReactNode;
|
|
10
|
+
label: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
13
|
+
className?: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=HoverTip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HoverTip.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/HoverTip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAY,EACZ,KAAgB,EAChB,SAAc,GACf,EAAE;IACD,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BA4CA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@flowselections/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tooltip op basis van Popover (core heeft geen Tooltip-export): opent bij
|
|
6
|
+
* aanwijzen én bij toetsenbordfocus, sluit met Esc of bij verlaten. De
|
|
7
|
+
* trigger is een knop met een toegankelijke naam.
|
|
8
|
+
*/
|
|
9
|
+
export function HoverTip({ content, label, children, side = "top", align = "center", className = "", }) {
|
|
10
|
+
const [open, setOpen] = useState(false);
|
|
11
|
+
const timer = useRef(null);
|
|
12
|
+
const show = () => {
|
|
13
|
+
if (timer.current)
|
|
14
|
+
clearTimeout(timer.current);
|
|
15
|
+
setOpen(true);
|
|
16
|
+
};
|
|
17
|
+
const hide = () => {
|
|
18
|
+
if (timer.current)
|
|
19
|
+
clearTimeout(timer.current);
|
|
20
|
+
timer.current = setTimeout(() => setOpen(false), 80);
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { type: "button", "aria-label": label, onPointerEnter: show, onPointerLeave: hide, onFocus: show, onBlur: hide, onClick: (e) => e.stopPropagation(), className: "inline-flex shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring " +
|
|
23
|
+
className, children: children }), _jsx(PopoverContent, { side: side, align: align, avoidCollisions: true, collisionPadding: 8, onOpenAutoFocus: (e) => e.preventDefault(), onCloseAutoFocus: (e) => e.preventDefault(), onPointerEnter: show, onPointerLeave: hide, onClick: (e) => e.stopPropagation(), className: "w-auto min-w-[14rem] max-w-[20rem] rounded-lg p-3 text-xs leading-snug shadow-lg motion-reduce:animate-none", children: content })] }));
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiRow.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/KpiRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,iFAAiF;AACjF,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAM3D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** 4 tegels; onder 640 px veegbaar met de eerste tegel binnen de 16 px marge. */
|
|
3
|
+
export function KpiRow({ children }) {
|
|
4
|
+
return (_jsx("div", { className: "-mx-4 flex snap-x snap-mandatory gap-3 overflow-x-auto scroll-px-4 px-4 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&>*]:w-[78%] [&>*]:shrink-0 [&>*]:snap-start sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:[&>*]:w-auto lg:grid-cols-4", children: children }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface KpiTrend {
|
|
3
|
+
/** Procentuele wijziging t.o.v. de vorige periode (null = geen vergelijking). */
|
|
4
|
+
pct: number | null;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Hoger is beter (omzet) of slechter (actie nodig). */
|
|
7
|
+
goodWhenUp?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** KPI-tegel: icoon, label, groot getal, subregel en optionele trend. Alleen weergave. */
|
|
10
|
+
export declare function KpiTile({ title, value, sub, icon, tone, loading, onClick, active, trend, }: {
|
|
11
|
+
title: string;
|
|
12
|
+
value: ReactNode;
|
|
13
|
+
sub?: ReactNode;
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
tone?: "default" | "warning";
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
trend?: KpiTrend | null;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=KpiTile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KpiTile.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/KpiTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,QAAQ;IACvB,iFAAiF;IACjF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAoCD,0FAA0F;AAC1F,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,GAAG,EACH,IAAI,EACJ,IAAgB,EAChB,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,GACN,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB,+BA4DA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Card, Skeleton } from "@flowselections/core";
|
|
3
|
+
import { ChevronRight, Minus, TrendingDown, TrendingUp } from "lucide-react";
|
|
4
|
+
function Trend({ trend }) {
|
|
5
|
+
if (trend.pct == null)
|
|
6
|
+
return null;
|
|
7
|
+
const flat = Math.abs(trend.pct) < 0.5;
|
|
8
|
+
const up = trend.pct > 0;
|
|
9
|
+
const good = flat ? null : up === (trend.goodWhenUp ?? true);
|
|
10
|
+
const Icon = flat ? Minus : up ? TrendingUp : TrendingDown;
|
|
11
|
+
const tone = good == null ? "text-muted-foreground" : good ? "text-primary" : "text-destructive";
|
|
12
|
+
return (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1 whitespace-nowrap text-xs font-medium tabular-nums " + tone, title: trend.label, children: [_jsx(Icon, { className: "h-3.5 w-3.5", "aria-hidden": true }), flat ? "0%" : `${up ? "+" : ""}${Math.round(trend.pct)}%`, _jsx("span", { className: "truncate font-normal text-muted-foreground", children: trend.label })] }));
|
|
13
|
+
}
|
|
14
|
+
/** Klein trendlijntje van vorige naar huidige periode (alleen weergave). */
|
|
15
|
+
function Spark({ trend }) {
|
|
16
|
+
if (trend.pct == null)
|
|
17
|
+
return null;
|
|
18
|
+
const up = trend.pct > 0.5;
|
|
19
|
+
const down = trend.pct < -0.5;
|
|
20
|
+
const good = up || down ? up === (trend.goodWhenUp ?? true) : null;
|
|
21
|
+
const tone = good == null ? "text-muted-foreground" : good ? "text-primary" : "text-destructive";
|
|
22
|
+
const y0 = up ? 26 : down ? 6 : 16;
|
|
23
|
+
const y1 = up ? 6 : down ? 26 : 16;
|
|
24
|
+
const mid = (y0 + y1) / 2;
|
|
25
|
+
const d = `M2 ${y0} C 14 ${y0}, 18 ${mid + (up ? 4 : down ? -4 : 0)}, 28 ${mid} S 44 ${mid - (up ? 6 : down ? -6 : 0)}, 50 ${(mid + y1) / 2} S 58 ${y1}, 62 ${y1}`;
|
|
26
|
+
return (_jsx("svg", { viewBox: "0 0 64 32", className: "hidden h-8 w-16 shrink-0 self-end sm:block " + tone, "aria-hidden": true, children: _jsx("path", { d: d, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
27
|
+
}
|
|
28
|
+
/** KPI-tegel: icoon, label, groot getal, subregel en optionele trend. Alleen weergave. */
|
|
29
|
+
export function KpiTile({ title, value, sub, icon, tone = "default", loading, onClick, active, trend, }) {
|
|
30
|
+
const body = (_jsxs("div", { className: "flex items-center gap-3 sm:gap-4", children: [icon && (_jsx("span", { className: "inline-flex h-10 w-10 sm:h-12 sm:w-12 shrink-0 items-center justify-center rounded-xl [&_svg]:h-5 [&_svg]:w-5 sm:[&_svg]:h-6 sm:[&_svg]:w-6 " +
|
|
31
|
+
(tone === "warning" ? "bg-warning-soft text-warning-soft-foreground" : "bg-primary/10 text-primary"), "aria-hidden": true, children: icon })), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }), _jsx("div", { className: "mt-0.5 text-2xl font-semibold leading-tight tabular-nums text-foreground", children: loading ? _jsx(Skeleton, { className: "h-7 w-24" }) : value }), _jsx("div", { className: "mt-1 flex min-h-4 flex-col gap-0.5 text-xs text-muted-foreground", children: loading ? _jsx(Skeleton, { className: "h-3 w-32" }) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "truncate", children: sub }), trend && _jsx(Trend, { trend: trend })] })) })] }), !loading && trend && _jsx(Spark, { trend: trend }), onClick && tone === "warning" && _jsx(ChevronRight, { className: "h-5 w-5 shrink-0 text-muted-foreground", "aria-hidden": true })] }));
|
|
32
|
+
return (_jsx(Card, { className: "h-full p-4 sm:p-5 transition-shadow " +
|
|
33
|
+
(onClick ? "hover:border-ring/50 hover:shadow-md " : "") +
|
|
34
|
+
(active ? "ring-2 ring-ring" : ""), children: onClick ? (_jsx("div", { role: "button", tabIndex: 0, onClick: onClick, onKeyDown: (e) => {
|
|
35
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
onClick();
|
|
38
|
+
}
|
|
39
|
+
}, className: "block w-full cursor-pointer rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: body })) : (body) }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Vaste schermbrede knop onderin, alleen onder 640 px. */
|
|
3
|
+
export declare function MobilePrimaryAction({ onClick, children }: {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=MobilePrimaryAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MobilePrimaryAction.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/MobilePrimaryAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,2DAA2D;AAC3D,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAQtG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "@flowselections/core";
|
|
3
|
+
/** Vaste schermbrede knop onderin, alleen onder 640 px. */
|
|
4
|
+
export function MobilePrimaryAction({ onClick, children }) {
|
|
5
|
+
return (_jsx("div", { className: "fixed inset-x-0 bottom-0 z-30 border-t border-border bg-card p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] sm:hidden", children: _jsx(Button, { className: "h-14 w-full text-lg", onClick: onClick, children: children }) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** Eén inklapbare balk voor alle meldingen; hooguit 2 zichtbaar, rest "+ n meldingen". */
|
|
3
|
+
export declare function NoticeBar({ items }: {
|
|
4
|
+
items: ReactNode[];
|
|
5
|
+
}): import("react").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=NoticeBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoticeBar.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/NoticeBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,sCA4B1D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { ChevronDown, Info } from "lucide-react";
|
|
4
|
+
/** Eén inklapbare balk voor alle meldingen; hooguit 2 zichtbaar, rest "+ n meldingen". */
|
|
5
|
+
export function NoticeBar({ items }) {
|
|
6
|
+
const [open, setOpen] = useState(false);
|
|
7
|
+
if (items.length === 0)
|
|
8
|
+
return null;
|
|
9
|
+
const zichtbaar = open ? items : items.slice(0, 2);
|
|
10
|
+
const rest = items.length - zichtbaar.length;
|
|
11
|
+
return (_jsxs("div", { className: "shrink-0 rounded-lg border border-border bg-warning-soft text-sm text-warning-soft-foreground", children: [_jsx("ul", { className: "space-y-1 px-3 py-2", children: zichtbaar.map((it, i) => (_jsxs("li", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Info, { className: "h-4 w-4 shrink-0", "aria-hidden": true }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: it })] }, i))) }), (rest > 0 || open) && items.length > 2 && (_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen((o) => !o), className: "flex w-full items-center gap-2 rounded-b-lg border-t border-border/60 px-3 py-1.5 text-left text-xs font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [open ? "Minder tonen" : `+ ${rest} ${rest === 1 ? "melding" : "meldingen"}`, _jsx(ChevronDown, { className: "ml-auto h-4 w-4 transition-transform " + (open ? "rotate-180" : ""), "aria-hidden": true })] }))] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Paginakop zoals Verkooporders: h1 + "Bijgewerkt hh:mm", rechts knoppen. */
|
|
3
|
+
export declare function PageHeader({ title, updatedAt, updatedInfo, actions, }: {
|
|
4
|
+
title: string;
|
|
5
|
+
updatedAt?: Date | null;
|
|
6
|
+
updatedInfo?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,+BAYA"}
|