@flowselections/floriday-afhandeling-module 1.0.99 → 1.0.100
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/afhandeling/ControlePage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/ControlePage.js +14 -6
- package/dist-lib/components/afhandeling/DagDetailDialog.js +7 -7
- package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/LeveringenPage.js +13 -2
- package/dist-lib/components/afhandeling/PickingPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/PickingPage.js +2 -1
- package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/PlanningAgendaPage.js +3 -1
- package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
- package/dist-lib/components/afhandeling/VervoerdersPage.js +63 -6
- package/dist-lib/components/fs-ui/DataTable.d.ts +23 -0
- package/dist-lib/components/fs-ui/DataTable.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/DataTable.js +14 -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 +12 -0
- package/dist-lib/components/fs-ui/FilterChips.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/FilterChips.js +8 -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/InlineAlert.d.ts +11 -0
- package/dist-lib/components/fs-ui/InlineAlert.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/InlineAlert.js +15 -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 +7 -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 +5 -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 +13 -0
- package/dist-lib/components/fs-ui/SearchInput.d.ts +8 -0
- package/dist-lib/components/fs-ui/SearchInput.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/SearchInput.js +21 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.d.ts +10 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/ShortcutHelp.js +17 -0
- package/dist-lib/components/fs-ui/StatusIcon.d.ts +7 -0
- package/dist-lib/components/fs-ui/StatusIcon.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/StatusIcon.js +9 -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 +9 -0
- package/dist-lib/components/fs-ui/useShortcuts.d.ts +12 -0
- package/dist-lib/components/fs-ui/useShortcuts.d.ts.map +1 -0
- package/dist-lib/components/fs-ui/useShortcuts.js +36 -0
- package/dist-lib/integrations/supabase/types.d.ts +748 -1
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cartControl.functions.js +1 -1
- package/dist-lib/lib/floridayAutoProcess.js +2 -2
- package/dist-lib/lib/floridayLoading.functions.js +5 -5
- package/dist-lib/lib/signupMailText.js +1 -1
- package/package.json +1 -1
|
@@ -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 hoofdactie onderin op mobiel (48 px, veilige rand). */
|
|
3
|
+
export declare function MobilePrimaryAction({ children, hidden }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
hidden?: boolean;
|
|
6
|
+
}): import("react").JSX.Element | null;
|
|
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;AAEvC,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,sCAOlG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** Vaste schermbrede hoofdactie onderin op mobiel (48 px, veilige rand). */
|
|
3
|
+
export function MobilePrimaryAction({ children, hidden }) {
|
|
4
|
+
if (hidden)
|
|
5
|
+
return null;
|
|
6
|
+
return (_jsx("div", { className: "fixed inset-x-0 bottom-0 z-30 border-t border-border bg-background/95 p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))] shadow-lg md:hidden [&>*]:h-12 [&>*]:w-full", children: children }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Paginakop: titel + bijgewerkt-tijd links, acties rechts. Alleen weergave. */
|
|
3
|
+
export declare function PageHeader({ title, description, updatedAt, actions, }: {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
updatedAt?: 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;AAEvC,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,SAAS,EACT,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,+BAWA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Paginakop: titel + bijgewerkt-tijd links, acties rechts. Alleen weergave. */
|
|
3
|
+
export function PageHeader({ title, description, updatedAt, actions, }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "text-xl font-bold leading-tight text-foreground sm:text-2xl", children: title }), updatedAt && _jsx("div", { className: "mt-0.5", children: updatedAt }), description && _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })] }), actions && _jsx("div", { className: "flex flex-wrap items-center gap-2", children: actions })] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface PillTab<T extends string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
count?: number | null;
|
|
7
|
+
}
|
|
8
|
+
/** Tabbladen als pillen met icoon + label + teller. Veegbaar op mobiel. */
|
|
9
|
+
export declare function PillTabs<T extends string>({ tabs, value, onChange, ariaLabel, }: {
|
|
10
|
+
tabs: PillTab<T>[];
|
|
11
|
+
value: T;
|
|
12
|
+
onChange: (v: T) => void;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=PillTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillTabs.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/PillTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,MAAM;IACvC,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,2EAA2E;AAC3E,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE;IACD,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAwCA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Tabbladen als pillen met icoon + label + teller. Veegbaar op mobiel. */
|
|
3
|
+
export function PillTabs({ tabs, value, onChange, ariaLabel, }) {
|
|
4
|
+
return (_jsxs("div", { className: "relative", children: [_jsx("div", { role: "tablist", "aria-label": ariaLabel, className: "-mx-4 flex gap-2 overflow-x-auto px-4 sm:mx-0 sm:flex-wrap sm:px-0", children: tabs.map((t) => {
|
|
5
|
+
const active = t.value === value;
|
|
6
|
+
const empty = t.count === 0;
|
|
7
|
+
return (_jsxs("button", { type: "button", role: "tab", "aria-selected": active, onClick: () => onChange(t.value), className: "inline-flex h-9 shrink-0 items-center gap-2 whitespace-nowrap rounded-lg border px-3 text-sm font-medium transition-colors duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none [&_svg]:h-4 [&_svg]:w-4 " +
|
|
8
|
+
(active
|
|
9
|
+
? "border-primary/40 bg-primary/10 text-primary"
|
|
10
|
+
: "border-border bg-card hover:bg-muted " + (empty ? "text-muted-foreground" : "text-foreground")), children: [t.icon, t.label, t.count != null && (_jsx("span", { className: "inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs tabular-nums " +
|
|
11
|
+
(active ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"), children: t.count }))] }, t.value));
|
|
12
|
+
}) }), _jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 w-6 bg-gradient-to-l from-background sm:hidden", "aria-hidden": true })] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Zoekveld: filtert tijdens typen (250 ms), wis-kruisje, Esc wist, kbd "/" vanaf tablet. */
|
|
2
|
+
export declare const SearchInput: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (v: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
debounceMs?: number;
|
|
7
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/SearchInput.tsx"],"names":[],"mappings":"AAGA,6FAA6F;AAC7F,eAAO,MAAM,WAAW;WAEb,MAAM;cAAY,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBAAgB,MAAM;iBAAe,MAAM;oDA0CzF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
3
|
+
import { Search, X } from "lucide-react";
|
|
4
|
+
/** Zoekveld: filtert tijdens typen (250 ms), wis-kruisje, Esc wist, kbd "/" vanaf tablet. */
|
|
5
|
+
export const SearchInput = forwardRef(function SearchInput({ value, onChange, placeholder = "Zoeken…", debounceMs = 250 }, ref) {
|
|
6
|
+
const [local, setLocal] = useState(value);
|
|
7
|
+
useEffect(() => setLocal(value), [value]);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (local === value)
|
|
10
|
+
return;
|
|
11
|
+
const t = setTimeout(() => onChange(local), debounceMs);
|
|
12
|
+
return () => clearTimeout(t);
|
|
13
|
+
}, [local, value, onChange, debounceMs]);
|
|
14
|
+
return (_jsxs("div", { className: "relative w-full min-w-0 sm:w-72", children: [_jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", "aria-hidden": true }), _jsx("input", { ref: ref, type: "search", value: local, placeholder: placeholder, "aria-label": placeholder, onChange: (e) => setLocal(e.target.value), onKeyDown: (e) => {
|
|
15
|
+
if (e.key === "Escape") {
|
|
16
|
+
setLocal("");
|
|
17
|
+
onChange("");
|
|
18
|
+
e.target.blur();
|
|
19
|
+
}
|
|
20
|
+
}, className: "h-9 w-full rounded-lg border border-input bg-card pl-9 pr-14 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-search-cancel-button]:hidden" }), local ? (_jsx("button", { type: "button", "aria-label": "Zoekopdracht wissen", onClick: () => { setLocal(""); onChange(""); }, className: "absolute right-2 top-1/2 inline-flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: _jsx(X, { className: "h-4 w-4" }) })) : (_jsx("kbd", { className: "pointer-events-none absolute right-2 top-1/2 hidden -translate-y-1/2 rounded-sm border border-border bg-muted px-1.5 text-[11px] text-muted-foreground sm:inline-block", children: "/" }))] }));
|
|
21
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Overzicht van de sneltoetsen (toets ?). */
|
|
2
|
+
export declare function ShortcutHelp({ open, onOpenChange, hasNew }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (o: boolean) => void;
|
|
5
|
+
hasNew?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function Kbd({ children }: {
|
|
8
|
+
children: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ShortcutHelp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortcutHelp.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/ShortcutHelp.tsx"],"names":[],"mappings":"AAWA,8CAA8C;AAC9C,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAa,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,+BAkB1I;AAED,wBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,+BAErD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@flowselections/core";
|
|
3
|
+
const ROWS = [
|
|
4
|
+
["N", "Nieuw"],
|
|
5
|
+
["/", "Zoeken"],
|
|
6
|
+
["J / K", "Volgende / vorige rij"],
|
|
7
|
+
["Enter", "Openen"],
|
|
8
|
+
["Esc", "Sluiten of wissen"],
|
|
9
|
+
["?", "Dit overzicht"],
|
|
10
|
+
];
|
|
11
|
+
/** Overzicht van de sneltoetsen (toets ?). */
|
|
12
|
+
export function ShortcutHelp({ open, onOpenChange, hasNew = true }) {
|
|
13
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: "max-w-sm rounded-lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: "Sneltoetsen" }) }), _jsx("ul", { className: "space-y-2 text-sm", children: ROWS.filter(([k]) => hasNew || k !== "N").map(([k, l]) => (_jsxs("li", { className: "flex items-center justify-between gap-4", children: [_jsx("span", { className: "text-muted-foreground", children: l }), _jsx("kbd", { className: "rounded-sm border border-border bg-muted px-1.5 text-xs", children: k })] }, k))) })] }) }));
|
|
14
|
+
}
|
|
15
|
+
export function Kbd({ children }) {
|
|
16
|
+
return _jsx("kbd", { className: "ml-1 hidden rounded-sm border border-current/30 px-1 text-[11px] opacity-80 sm:inline-block", children: children });
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type StatusTone = "done" | "open" | "busy" | "error";
|
|
2
|
+
/** Klein rond statusicoon met tooltip: groen klaar, grijs open, oker bezig, rood fout. */
|
|
3
|
+
export declare function StatusIcon({ tone, label }: {
|
|
4
|
+
tone: StatusTone;
|
|
5
|
+
label: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=StatusIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIcon.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/StatusIcon.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5D,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,+BAS9E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AlertCircle, Check, Circle, Loader2 } from "lucide-react";
|
|
3
|
+
import { HoverTip } from "./HoverTip.js";
|
|
4
|
+
/** Klein rond statusicoon met tooltip: groen klaar, grijs open, oker bezig, rood fout. */
|
|
5
|
+
export function StatusIcon({ tone, label }) {
|
|
6
|
+
const Icon = tone === "done" ? Check : tone === "busy" ? Loader2 : tone === "error" ? AlertCircle : Circle;
|
|
7
|
+
const color = tone === "done" ? "text-primary" : tone === "busy" ? "text-warning" : tone === "error" ? "text-destructive" : "text-muted-foreground";
|
|
8
|
+
return (_jsx(HoverTip, { label: label, content: label, children: _jsx(Icon, { className: "h-4 w-4 " + color, "aria-hidden": true }) }));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/TableSkeleton.tsx"],"names":[],"mappings":"AAEA,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,EAAE,IAAQ,EAAE,OAAW,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,+BAiB3F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from "@flowselections/core";
|
|
3
|
+
/** Skelet in de vorm van de tabel: koprij 40 px, rijen 60 px. */
|
|
4
|
+
export function TableSkeleton({ rows = 6, columns = 5 }) {
|
|
5
|
+
return (_jsxs("div", { className: "overflow-hidden rounded-xl border border-border bg-card shadow-sm", "aria-busy": "true", "aria-label": "Laden", children: [_jsx("div", { className: "flex h-10 items-center gap-4 border-b border-border px-4", children: Array.from({ length: columns }).map((_, i) => (_jsx(Skeleton, { className: "h-3 flex-1" }, i))) }), Array.from({ length: rows }).map((_, r) => (_jsx("div", { className: "flex h-[60px] items-center gap-4 border-b border-border px-4 last:border-0", children: Array.from({ length: columns }).map((_, c) => (_jsx(Skeleton, { className: "h-4 flex-1 " + (c === 0 ? "max-w-40" : "") }, c))) }, r)))] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Werkbalk: zoeken + filters links, extra acties rechts. */
|
|
3
|
+
export declare function Toolbar({ children, right }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
right?: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,6DAA6D;AAC7D,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,+BAOtF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/** Werkbalk: zoeken + filters links, extra acties rechts. */
|
|
3
|
+
export function Toolbar({ children, right }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-2", children: children }), right && _jsx("div", { className: "flex flex-wrap items-center gap-2", children: right })] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdatedAt.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/UpdatedAt.tsx"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE;IAAE,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,sCAShG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/** "Bijgewerkt hh:mm" in 12 px grijs. */
|
|
3
|
+
export function UpdatedAt({ at, refreshing }) {
|
|
4
|
+
if (!at)
|
|
5
|
+
return null;
|
|
6
|
+
const d = typeof at === "number" ? new Date(at) : at;
|
|
7
|
+
const t = d.toLocaleTimeString("nl-NL", { hour: "2-digit", minute: "2-digit" });
|
|
8
|
+
return (_jsx("span", { className: "text-xs tabular-nums text-muted-foreground", "aria-live": "polite", children: refreshing ? "Bijwerken…" : `Bijgewerkt ${t}` }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ShortcutHandlers {
|
|
2
|
+
onNew?: () => void;
|
|
3
|
+
onSearch?: () => void;
|
|
4
|
+
onNext?: () => void;
|
|
5
|
+
onPrev?: () => void;
|
|
6
|
+
onOpen?: () => void;
|
|
7
|
+
onEscape?: () => void;
|
|
8
|
+
onHelp?: () => void;
|
|
9
|
+
}
|
|
10
|
+
/** N, /, J/K, Enter, Esc, ?; nooit tijdens typen in een invoerveld of met een open dialoog. */
|
|
11
|
+
export declare function useShortcuts(handlers: ShortcutHandlers, enabled?: boolean): void;
|
|
12
|
+
//# sourceMappingURL=useShortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShortcuts.d.ts","sourceRoot":"","sources":["../../../src/components/fs-ui/useShortcuts.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAQD,+FAA+F;AAC/F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,UAAO,QAoBtE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
function isTyping(el) {
|
|
3
|
+
if (!(el instanceof HTMLElement))
|
|
4
|
+
return false;
|
|
5
|
+
const tag = el.tagName;
|
|
6
|
+
return el.isContentEditable || tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT";
|
|
7
|
+
}
|
|
8
|
+
/** N, /, J/K, Enter, Esc, ?; nooit tijdens typen in een invoerveld of met een open dialoog. */
|
|
9
|
+
export function useShortcuts(handlers, enabled = true) {
|
|
10
|
+
const ref = useRef(handlers);
|
|
11
|
+
ref.current = handlers;
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!enabled)
|
|
14
|
+
return;
|
|
15
|
+
const onKey = (e) => {
|
|
16
|
+
if (e.metaKey || e.ctrlKey || e.altKey)
|
|
17
|
+
return;
|
|
18
|
+
if (isTyping(e.target))
|
|
19
|
+
return;
|
|
20
|
+
if (e.key !== "Escape" && document.querySelector('[role="dialog"],[role="alertdialog"]'))
|
|
21
|
+
return;
|
|
22
|
+
const h = ref.current;
|
|
23
|
+
const map = {
|
|
24
|
+
n: h.onNew, N: h.onNew, "/": h.onSearch, j: h.onNext, J: h.onNext, k: h.onPrev, K: h.onPrev,
|
|
25
|
+
Enter: h.onOpen, Escape: h.onEscape, "?": h.onHelp,
|
|
26
|
+
};
|
|
27
|
+
const fn = map[e.key];
|
|
28
|
+
if (fn) {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
fn();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
window.addEventListener("keydown", onKey);
|
|
34
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
35
|
+
}, [enabled]);
|
|
36
|
+
}
|