@voyantjs/distribution-react 0.109.6 → 0.109.8

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.
@@ -0,0 +1,15 @@
1
+ import type { useDistributionUiMessagesOrDefault } from "../i18n/index.js";
2
+ import { type ReconcilerResult } from "./channel-sync-page-utils.js";
3
+ export declare function ReconcileMenu({ onRun, isRunning, lastResult, messages, }: {
4
+ onRun: (flow: "bookings" | "availability" | "content") => void;
5
+ isRunning: boolean;
6
+ lastResult: ReconcilerResult | null;
7
+ messages: ReturnType<typeof useDistributionUiMessagesOrDefault>["channelSync"];
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function AutoRefreshIndicator({ isFetching, dataUpdatedAt, intervalMs, messages, }: {
10
+ isFetching: boolean;
11
+ dataUpdatedAt: number;
12
+ intervalMs: number;
13
+ messages: ReturnType<typeof useDistributionUiMessagesOrDefault>["channelSync"];
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=channel-sync-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-sync-controls.d.ts","sourceRoot":"","sources":["../../src/components/channel-sync-controls.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAA;AAErC,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,KAAK,IAAI,CAAA;IAC9D,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACnC,QAAQ,EAAE,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,aAAa,CAAC,CAAA;CAC/E,2CA8CA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,UAAU,EACV,aAAa,EACb,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,aAAa,CAAC,CAAA;CAC/E,2CA0CA"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@voyantjs/ui/components";
3
+ import { ChevronDown, Loader2, RotateCw } from "lucide-react";
4
+ import { useEffect, useState } from "react";
5
+ import { formatShortDuration, formatTemplate, } from "./channel-sync-page-utils.js";
6
+ export function ReconcileMenu({ onRun, isRunning, lastResult, messages, }) {
7
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsxs(Button, { variant: "outline", size: "sm", disabled: isRunning, children: [isRunning ? (_jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" })) : (_jsx(RotateCw, { className: "mr-1.5 h-3.5 w-3.5" })), messages.reconcile.trigger, _jsx(ChevronDown, { className: "ml-1.5 h-3.5 w-3.5" })] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: messages.reconcile.menuLabel }), _jsxs(DropdownMenuItem, { onClick: () => onRun("bookings"), children: [messages.reconcile.bookings, _jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: messages.reconcile.priority })] }), _jsx(DropdownMenuItem, { onClick: () => onRun("availability"), children: messages.reconcile.availability }), _jsx(DropdownMenuItem, { onClick: () => onRun("content"), children: messages.reconcile.content })] }), lastResult ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsx("div", { className: "px-2 py-1.5 text-xs text-muted-foreground", children: formatTemplate(messages.reconcile.lastRun, {
8
+ scanned: lastResult.scanned,
9
+ triggered: lastResult.triggered,
10
+ }) })] })) : null] })] }));
11
+ }
12
+ export function AutoRefreshIndicator({ isFetching, dataUpdatedAt, intervalMs, messages, }) {
13
+ // Tick every second so the "Updated Xs ago" stays current.
14
+ const [, setNow] = useState(Date.now());
15
+ useEffect(() => {
16
+ const id = window.setInterval(() => setNow(Date.now()), 1000);
17
+ return () => window.clearInterval(id);
18
+ }, []);
19
+ if (!dataUpdatedAt) {
20
+ return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground md:flex", children: [_jsx(Loader2, { className: "h-3 w-3 animate-spin" }), messages.refresh.loading] }));
21
+ }
22
+ const seconds = Math.max(0, Math.round((Date.now() - dataUpdatedAt) / 1000));
23
+ const intervalSec = Math.round(intervalMs / 1000);
24
+ return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground md:flex", title: formatTemplate(messages.refresh.title, { seconds: intervalSec }), children: [isFetching ? (_jsx(Loader2, { className: "h-3 w-3 animate-spin" })) : (_jsxs("span", { className: "relative flex h-2 w-2", children: [_jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60" }), _jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-emerald-500" })] })), _jsx("span", { className: "tabular-nums", children: isFetching
25
+ ? messages.refresh.refreshing
26
+ : formatTemplate(messages.refresh.updatedAgo, {
27
+ duration: formatShortDuration(seconds),
28
+ }) })] }));
29
+ }
@@ -0,0 +1,12 @@
1
+ import type { useDistributionUiMessagesOrDefault } from "../i18n/index.js";
2
+ import type { VoyantFetcher } from "../index.js";
3
+ export declare function DeliveriesDrawer({ bookingId, client, onClose, messages, }: {
4
+ bookingId: string | null;
5
+ client: {
6
+ baseUrl: string;
7
+ fetcher: VoyantFetcher;
8
+ };
9
+ onClose: () => void;
10
+ messages: ReturnType<typeof useDistributionUiMessagesOrDefault>["channelSync"];
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=channel-sync-deliveries-drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-sync-deliveries-drawer.d.ts","sourceRoot":"","sources":["../../src/components/channel-sync-deliveries-drawer.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAQhD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,aAAa,CAAA;KAAE,CAAA;IACnD,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC,aAAa,CAAC,CAAA;CAC/E,2CAsFA"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { Badge, Card, CardContent, CardDescription, CardHeader, Empty, EmptyDescription, EmptyHeader, EmptyTitle, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, } from "@voyantjs/ui/components";
4
+ import { Loader2 } from "lucide-react";
5
+ import { fetchJson, formatRelative, formatTemplate, } from "./channel-sync-page-utils.js";
6
+ export function DeliveriesDrawer({ bookingId, client, onClose, messages, }) {
7
+ const isOpen = bookingId !== null;
8
+ const query = useQuery({
9
+ enabled: isOpen,
10
+ queryKey: ["channel-push-deliveries", bookingId],
11
+ queryFn: () => {
12
+ const params = new URLSearchParams({ bookingId: bookingId ?? "", limit: "200" });
13
+ return fetchJson(`/v1/admin/distribution/channel-push/deliveries?${params}`, client);
14
+ },
15
+ });
16
+ const rows = query.data?.data ?? [];
17
+ return (_jsx(Sheet, { open: isOpen, onOpenChange: (open) => (open ? null : onClose()), children: _jsxs(SheetContent, { side: "right", size: "xl", children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: formatTemplate(messages.drawer.title, { bookingId: bookingId ?? "" }) }) }), _jsx(SheetBody, { className: "flex flex-col gap-3", children: query.isPending ? (_jsx("div", { className: "flex items-center justify-center p-12", children: _jsx(Loader2, { className: "h-5 w-5 animate-spin text-muted-foreground" }) })) : rows.length === 0 ? (_jsx(Empty, { children: _jsxs(EmptyHeader, { children: [_jsx(EmptyTitle, { children: messages.drawer.emptyTitle }), _jsx(EmptyDescription, { children: messages.drawer.emptyDescription })] }) })) : (rows.map((row) => (_jsxs(Card, { className: "text-xs", children: [_jsxs(CardHeader, { className: "pb-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: row.status === "succeeded" ? "default" : "destructive", children: row.status }), _jsx("span", { className: "font-mono", children: row.sourceEvent }), _jsx("span", { className: "text-muted-foreground", children: formatTemplate(messages.drawer.attempt, { number: row.attemptNumber }) })] }), _jsx("span", { className: "text-muted-foreground", children: row.durationMs != null ? `${row.durationMs}ms` : "" })] }), _jsxs(CardDescription, { className: "font-mono", children: [row.requestMethod, " ", row.targetUrl] })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsxs("div", { className: "flex flex-wrap gap-2", children: [row.responseStatus != null ? (_jsx(Badge, { variant: "outline", children: formatTemplate(messages.drawer.httpStatus, { status: row.responseStatus }) })) : null, row.errorClass ? _jsx(Badge, { variant: "destructive", children: row.errorClass }) : null, _jsx("span", { className: "text-muted-foreground", children: formatRelative(row.createdAt) })] }), row.errorMessage ? (_jsx("pre", { className: "overflow-x-auto whitespace-pre-wrap rounded bg-destructive/10 p-2 text-destructive", children: row.errorMessage })) : null, row.responseBodyExcerpt ? (_jsx("pre", { className: "overflow-x-auto rounded bg-muted p-2", children: row.responseBodyExcerpt })) : null] })] }, row.id)))) })] }) }));
18
+ }
@@ -0,0 +1,99 @@
1
+ import type { VoyantFetcher } from "../index.js";
2
+ export type PushStatus = "pending" | "ok" | "failed" | "compensated";
3
+ export interface ChannelBookingLinkRow {
4
+ link: {
5
+ id: string;
6
+ channelId: string;
7
+ bookingId: string;
8
+ bookingItemId: string | null;
9
+ sourceKind: string | null;
10
+ sourceConnectionId: string | null;
11
+ pushStatus: PushStatus | string;
12
+ pushAttempts: number;
13
+ lastPushAt: string | null;
14
+ lastError: string | null;
15
+ externalBookingId: string | null;
16
+ externalReference: string | null;
17
+ externalStatus: string | null;
18
+ createdAt: string;
19
+ };
20
+ channelName: string;
21
+ channelKind: string;
22
+ }
23
+ export interface LinksResponse {
24
+ data: ChannelBookingLinkRow[];
25
+ counts: Record<string, number>;
26
+ }
27
+ export interface DeliveryRow {
28
+ id: string;
29
+ sourceModule: string;
30
+ sourceEvent: string;
31
+ sourceEntityId: string | null;
32
+ targetUrl: string;
33
+ targetKind: string | null;
34
+ targetRef: string | null;
35
+ requestMethod: string;
36
+ responseStatus: number | null;
37
+ responseBodyExcerpt: string | null;
38
+ attemptNumber: number;
39
+ status: string;
40
+ errorClass: string | null;
41
+ errorMessage: string | null;
42
+ durationMs: number | null;
43
+ createdAt: string;
44
+ }
45
+ export interface DeliveriesResponse {
46
+ data: DeliveryRow[];
47
+ }
48
+ export interface ThrottlingRow {
49
+ channelId: string | null;
50
+ count: number;
51
+ }
52
+ export interface ThrottlingResponse {
53
+ data: ThrottlingRow[];
54
+ sinceMs: number;
55
+ }
56
+ export interface ReconcilerResult {
57
+ scanned: number;
58
+ triggered: number;
59
+ }
60
+ export interface BookingRecord {
61
+ id: string;
62
+ bookingNumber: string;
63
+ status: string;
64
+ }
65
+ export interface BookingsResponse {
66
+ data: BookingRecord[];
67
+ }
68
+ export interface ChannelRecord {
69
+ id: string;
70
+ name: string;
71
+ kind: string;
72
+ status: string;
73
+ }
74
+ export interface ChannelsResponse {
75
+ data: ChannelRecord[];
76
+ }
77
+ export interface ChannelSyncPageProps {
78
+ baseUrl?: string;
79
+ fetcher?: VoyantFetcher;
80
+ className?: string;
81
+ }
82
+ export declare function fetchJson<T>(path: string, options: {
83
+ baseUrl: string;
84
+ fetcher: VoyantFetcher;
85
+ }, init?: RequestInit): Promise<T>;
86
+ export declare const STATUS_VARIANTS: Record<string, "default" | "secondary" | "destructive" | "outline">;
87
+ export declare const STATUS_TILES: ReadonlyArray<{
88
+ key: PushStatus;
89
+ tone: "default" | "secondary" | "destructive" | "outline";
90
+ }>;
91
+ export declare const LINKS_REFETCH_MS = 15000;
92
+ export declare const THROTTLING_REFETCH_MS = 60000;
93
+ export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
94
+ export declare function joinUrl(baseUrl: string, path: string): string;
95
+ export declare function formatChannelKind(kind: string): string;
96
+ export declare function formatShortDuration(seconds: number): string;
97
+ export declare function formatRelative(iso: string): string;
98
+ export declare function formatTemplate(template: string, values: Record<string, string | number>): string;
99
+ //# sourceMappingURL=channel-sync-page-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-sync-page-utils.d.ts","sourceRoot":"","sources":["../../src/components/channel-sync-page-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,GAAG,QAAQ,GAAG,aAAa,CAAA;AAEpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;QAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;QACjC,UAAU,EAAE,UAAU,GAAG,MA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C1D,CAKA,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAS,CAAA;AACtC,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAWjE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM3D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWlD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAKhG"}
@@ -0,0 +1,85 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+ // Fetch helpers
3
+ export async function fetchJson(path, options, init) {
4
+ const res = await options.fetcher(joinUrl(options.baseUrl, path), {
5
+ ...init,
6
+ headers: {
7
+ "Content-Type": "application/json",
8
+ ...init?.headers,
9
+ },
10
+ });
11
+ const text = await res.text();
12
+ const body = text
13
+ ? JSON.parse(text)
14
+ : {};
15
+ if (!res.ok) {
16
+ throw new Error(body.error ?? `Request failed: ${res.status}`);
17
+ }
18
+ return body;
19
+ }
20
+ export const STATUS_VARIANTS = {
21
+ pending: "secondary",
22
+ ok: "default",
23
+ failed: "destructive",
24
+ compensated: "outline",
25
+ };
26
+ export const STATUS_TILES = [
27
+ { key: "pending", tone: "secondary" },
28
+ { key: "ok", tone: "default" },
29
+ { key: "failed", tone: "destructive" },
30
+ { key: "compensated", tone: "outline" },
31
+ ];
32
+ export const LINKS_REFETCH_MS = 15_000;
33
+ export const THROTTLING_REFETCH_MS = 60_000;
34
+ export function useDebouncedValue(value, delayMs) {
35
+ const [debounced, setDebounced] = useState(value);
36
+ const timeoutRef = useRef(null);
37
+ useEffect(() => {
38
+ if (timeoutRef.current)
39
+ clearTimeout(timeoutRef.current);
40
+ timeoutRef.current = setTimeout(() => setDebounced(value), delayMs);
41
+ return () => {
42
+ if (timeoutRef.current)
43
+ clearTimeout(timeoutRef.current);
44
+ };
45
+ }, [value, delayMs]);
46
+ return debounced;
47
+ }
48
+ export function joinUrl(baseUrl, path) {
49
+ const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
50
+ const trimmedPath = path.startsWith("/") ? path : `/${path}`;
51
+ return `${trimmedBase}${trimmedPath}`;
52
+ }
53
+ export function formatChannelKind(kind) {
54
+ return kind.replace(/_/g, " ").replace(/\b\w/g, (m) => m.toUpperCase());
55
+ }
56
+ export function formatShortDuration(seconds) {
57
+ if (seconds < 60)
58
+ return `${seconds}s`;
59
+ const min = Math.round(seconds / 60);
60
+ if (min < 60)
61
+ return `${min}m`;
62
+ const hours = Math.round(min / 60);
63
+ return `${hours}h`;
64
+ }
65
+ export function formatRelative(iso) {
66
+ const date = new Date(iso);
67
+ const diffMs = Date.now() - date.getTime();
68
+ const sec = Math.round(diffMs / 1000);
69
+ if (sec < 60)
70
+ return `${sec}s ago`;
71
+ const min = Math.round(sec / 60);
72
+ if (min < 60)
73
+ return `${min}m ago`;
74
+ const hours = Math.round(min / 60);
75
+ if (hours < 24)
76
+ return `${hours}h ago`;
77
+ const days = Math.round(hours / 24);
78
+ return `${days}d ago`;
79
+ }
80
+ export function formatTemplate(template, values) {
81
+ return template.replace(/\{(\w+)\}/g, (_, key) => {
82
+ const value = values[key];
83
+ return value === undefined ? "" : String(value);
84
+ });
85
+ }
@@ -1,8 +1,4 @@
1
- import { type VoyantFetcher } from "../index.js";
2
- export interface ChannelSyncPageProps {
3
- baseUrl?: string;
4
- fetcher?: VoyantFetcher;
5
- className?: string;
6
- }
1
+ import { type ChannelSyncPageProps } from "./channel-sync-page-utils.js";
2
+ export type { ChannelSyncPageProps } from "./channel-sync-page-utils.js";
7
3
  export declare function ChannelSyncPage({ baseUrl, fetcher, className }?: ChannelSyncPageProps): import("react/jsx-runtime").JSX.Element;
8
4
  //# sourceMappingURL=channel-sync-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"channel-sync-page.d.ts","sourceRoot":"","sources":["../../src/components/channel-sync-page.tsx"],"names":[],"mappings":"AAuCA,OAAO,EAAgD,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AA2F9F,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgDD,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAE,oBAAyB,2CA8WzF"}
1
+ {"version":3,"file":"channel-sync-page.d.ts","sourceRoot":"","sources":["../../src/components/channel-sync-page.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAIL,KAAK,oBAAoB,EAe1B,MAAM,8BAA8B,CAAA;AAErC,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAIxE,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAE,oBAAyB,2CA8WzF"}
@@ -1,46 +1,17 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
4
- import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Label, Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, } from "@voyantjs/ui/components";
4
+ import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Label, } from "@voyantjs/ui/components";
5
5
  import { AsyncCombobox } from "@voyantjs/ui/components/async-combobox";
6
6
  import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "@voyantjs/ui/components/empty";
7
7
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyantjs/ui/components/table";
8
- import { AlertTriangle, ChevronDown, Loader2, RotateCw, X } from "lucide-react";
9
- import { useEffect, useRef, useState } from "react";
8
+ import { AlertTriangle, Loader2, X } from "lucide-react";
9
+ import { useState } from "react";
10
10
  import { useDistributionUiMessagesOrDefault } from "../i18n/index.js";
11
11
  import { defaultFetcher, useVoyantDistributionContext } from "../index.js";
12
- // Fetch helpers
13
- async function fetchJson(path, options, init) {
14
- const res = await options.fetcher(joinUrl(options.baseUrl, path), {
15
- ...init,
16
- headers: {
17
- "Content-Type": "application/json",
18
- ...init?.headers,
19
- },
20
- });
21
- const text = await res.text();
22
- const body = text
23
- ? JSON.parse(text)
24
- : {};
25
- if (!res.ok) {
26
- throw new Error(body.error ?? `Request failed: ${res.status}`);
27
- }
28
- return body;
29
- }
30
- const STATUS_VARIANTS = {
31
- pending: "secondary",
32
- ok: "default",
33
- failed: "destructive",
34
- compensated: "outline",
35
- };
36
- const STATUS_TILES = [
37
- { key: "pending", tone: "secondary" },
38
- { key: "ok", tone: "default" },
39
- { key: "failed", tone: "destructive" },
40
- { key: "compensated", tone: "outline" },
41
- ];
42
- const LINKS_REFETCH_MS = 15_000;
43
- const THROTTLING_REFETCH_MS = 60_000;
12
+ import { AutoRefreshIndicator, ReconcileMenu } from "./channel-sync-controls.js";
13
+ import { DeliveriesDrawer } from "./channel-sync-deliveries-drawer.js";
14
+ import { fetchJson, formatChannelKind, formatRelative, formatTemplate, LINKS_REFETCH_MS, STATUS_TILES, STATUS_VARIANTS, THROTTLING_REFETCH_MS, useDebouncedValue, } from "./channel-sync-page-utils.js";
44
15
  // Page
45
16
  export function ChannelSyncPage({ baseUrl, fetcher, className } = {}) {
46
17
  const distributionMessages = useDistributionUiMessagesOrDefault();
@@ -166,92 +137,3 @@ export function ChannelSyncPage({ baseUrl, fetcher, className } = {}) {
166
137
  retryMutation.variables === row.link.bookingId ? (_jsx(Loader2, { className: "mr-1 h-3 w-3 animate-spin" })) : null, messages.table.retry] })] }) })] }, row.link.id));
167
138
  }) })] })) })] }), _jsx(DeliveriesDrawer, { bookingId: drilldownBookingId, client: client, onClose: () => setDrilldownBookingId(null), messages: messages })] }));
168
139
  }
169
- function ReconcileMenu({ onRun, isRunning, lastResult, messages, }) {
170
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { render: _jsxs(Button, { variant: "outline", size: "sm", disabled: isRunning, children: [isRunning ? (_jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" })) : (_jsx(RotateCw, { className: "mr-1.5 h-3.5 w-3.5" })), messages.reconcile.trigger, _jsx(ChevronDown, { className: "ml-1.5 h-3.5 w-3.5" })] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: messages.reconcile.menuLabel }), _jsxs(DropdownMenuItem, { onClick: () => onRun("bookings"), children: [messages.reconcile.bookings, _jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: messages.reconcile.priority })] }), _jsx(DropdownMenuItem, { onClick: () => onRun("availability"), children: messages.reconcile.availability }), _jsx(DropdownMenuItem, { onClick: () => onRun("content"), children: messages.reconcile.content })] }), lastResult ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsx("div", { className: "px-2 py-1.5 text-xs text-muted-foreground", children: formatTemplate(messages.reconcile.lastRun, {
171
- scanned: lastResult.scanned,
172
- triggered: lastResult.triggered,
173
- }) })] })) : null] })] }));
174
- }
175
- function AutoRefreshIndicator({ isFetching, dataUpdatedAt, intervalMs, messages, }) {
176
- // Tick every second so the "Updated Xs ago" stays current.
177
- const [, setNow] = useState(Date.now());
178
- useEffect(() => {
179
- const id = window.setInterval(() => setNow(Date.now()), 1000);
180
- return () => window.clearInterval(id);
181
- }, []);
182
- if (!dataUpdatedAt) {
183
- return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground md:flex", children: [_jsx(Loader2, { className: "h-3 w-3 animate-spin" }), messages.refresh.loading] }));
184
- }
185
- const seconds = Math.max(0, Math.round((Date.now() - dataUpdatedAt) / 1000));
186
- const intervalSec = Math.round(intervalMs / 1000);
187
- return (_jsxs("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground md:flex", title: formatTemplate(messages.refresh.title, { seconds: intervalSec }), children: [isFetching ? (_jsx(Loader2, { className: "h-3 w-3 animate-spin" })) : (_jsxs("span", { className: "relative flex h-2 w-2", children: [_jsx("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60" }), _jsx("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-emerald-500" })] })), _jsx("span", { className: "tabular-nums", children: isFetching
188
- ? messages.refresh.refreshing
189
- : formatTemplate(messages.refresh.updatedAgo, {
190
- duration: formatShortDuration(seconds),
191
- }) })] }));
192
- }
193
- function useDebouncedValue(value, delayMs) {
194
- const [debounced, setDebounced] = useState(value);
195
- const timeoutRef = useRef(null);
196
- useEffect(() => {
197
- if (timeoutRef.current)
198
- clearTimeout(timeoutRef.current);
199
- timeoutRef.current = setTimeout(() => setDebounced(value), delayMs);
200
- return () => {
201
- if (timeoutRef.current)
202
- clearTimeout(timeoutRef.current);
203
- };
204
- }, [value, delayMs]);
205
- return debounced;
206
- }
207
- function DeliveriesDrawer({ bookingId, client, onClose, messages, }) {
208
- const isOpen = bookingId !== null;
209
- const query = useQuery({
210
- enabled: isOpen,
211
- queryKey: ["channel-push-deliveries", bookingId],
212
- queryFn: () => {
213
- const params = new URLSearchParams({ bookingId: bookingId ?? "", limit: "200" });
214
- return fetchJson(`/v1/admin/distribution/channel-push/deliveries?${params}`, client);
215
- },
216
- });
217
- const rows = query.data?.data ?? [];
218
- return (_jsx(Sheet, { open: isOpen, onOpenChange: (open) => (open ? null : onClose()), children: _jsxs(SheetContent, { side: "right", size: "xl", children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: formatTemplate(messages.drawer.title, { bookingId: bookingId ?? "" }) }) }), _jsx(SheetBody, { className: "flex flex-col gap-3", children: query.isPending ? (_jsx("div", { className: "flex items-center justify-center p-12", children: _jsx(Loader2, { className: "h-5 w-5 animate-spin text-muted-foreground" }) })) : rows.length === 0 ? (_jsx(Empty, { children: _jsxs(EmptyHeader, { children: [_jsx(EmptyTitle, { children: messages.drawer.emptyTitle }), _jsx(EmptyDescription, { children: messages.drawer.emptyDescription })] }) })) : (rows.map((row) => (_jsxs(Card, { className: "text-xs", children: [_jsxs(CardHeader, { className: "pb-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: row.status === "succeeded" ? "default" : "destructive", children: row.status }), _jsx("span", { className: "font-mono", children: row.sourceEvent }), _jsx("span", { className: "text-muted-foreground", children: formatTemplate(messages.drawer.attempt, { number: row.attemptNumber }) })] }), _jsx("span", { className: "text-muted-foreground", children: row.durationMs != null ? `${row.durationMs}ms` : "" })] }), _jsxs(CardDescription, { className: "font-mono", children: [row.requestMethod, " ", row.targetUrl] })] }), _jsxs(CardContent, { className: "space-y-2", children: [_jsxs("div", { className: "flex flex-wrap gap-2", children: [row.responseStatus != null ? (_jsx(Badge, { variant: "outline", children: formatTemplate(messages.drawer.httpStatus, { status: row.responseStatus }) })) : null, row.errorClass ? _jsx(Badge, { variant: "destructive", children: row.errorClass }) : null, _jsx("span", { className: "text-muted-foreground", children: formatRelative(row.createdAt) })] }), row.errorMessage ? (_jsx("pre", { className: "overflow-x-auto whitespace-pre-wrap rounded bg-destructive/10 p-2 text-destructive", children: row.errorMessage })) : null, row.responseBodyExcerpt ? (_jsx("pre", { className: "overflow-x-auto rounded bg-muted p-2", children: row.responseBodyExcerpt })) : null] })] }, row.id)))) })] }) }));
219
- }
220
- function joinUrl(baseUrl, path) {
221
- const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
222
- const trimmedPath = path.startsWith("/") ? path : `/${path}`;
223
- return `${trimmedBase}${trimmedPath}`;
224
- }
225
- function formatChannelKind(kind) {
226
- return kind.replace(/_/g, " ").replace(/\b\w/g, (m) => m.toUpperCase());
227
- }
228
- function formatShortDuration(seconds) {
229
- if (seconds < 60)
230
- return `${seconds}s`;
231
- const min = Math.round(seconds / 60);
232
- if (min < 60)
233
- return `${min}m`;
234
- const hours = Math.round(min / 60);
235
- return `${hours}h`;
236
- }
237
- function formatRelative(iso) {
238
- const date = new Date(iso);
239
- const diffMs = Date.now() - date.getTime();
240
- const sec = Math.round(diffMs / 1000);
241
- if (sec < 60)
242
- return `${sec}s ago`;
243
- const min = Math.round(sec / 60);
244
- if (min < 60)
245
- return `${min}m ago`;
246
- const hours = Math.round(min / 60);
247
- if (hours < 24)
248
- return `${hours}h ago`;
249
- const days = Math.round(hours / 24);
250
- return `${days}d ago`;
251
- }
252
- function formatTemplate(template, values) {
253
- return template.replace(/\{(\w+)\}/g, (_, key) => {
254
- const value = values[key];
255
- return value === undefined ? "" : String(value);
256
- });
257
- }
@@ -1 +1 @@
1
- {"version":3,"file":"distribution-page.d.ts","sourceRoot":"","sources":["../../src/components/distribution-page.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AAyBjC,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,cAAc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;CACxF;AAID,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,aAAoB,EACpB,cAAqB,EACrB,oBAA2B,EAC3B,aAAoB,EACpB,iBAAwB,EACxB,kBAAyB,EACzB,eAAsB,EACtB,gBAAuB,EACvB,sBAA6B,EAC7B,eAAsB,EACtB,mBAA0B,EAC1B,oBAA2B,EAC3B,aAAoB,EACpB,cAAqB,EACrB,oBAA2B,EAC3B,aAAoB,EACpB,iBAAwB,EACxB,kBAAyB,EACzB,aAAa,EACb,WAAW,GACZ,GAAE,qBAA0B,2CA6V5B"}
1
+ {"version":3,"file":"distribution-page.d.ts","sourceRoot":"","sources":["../../src/components/distribution-page.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,wBAAwB,EACxB,UAAU,EACV,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AAyBjC,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,oBAAoB,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAA;IACzD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,iBAAiB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,kBAAkB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;IACrD,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAA;IACnC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAA;IAC7C,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACvD,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,wBAAwB,KAAK,IAAI,CAAA;IACzE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAA;IAC3D,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAChE,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACnE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAA;IACxE,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAA;CACxF;AAID,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,aAAoB,EACpB,cAAqB,EACrB,oBAA2B,EAC3B,aAAoB,EACpB,iBAAwB,EACxB,kBAAyB,EACzB,eAAsB,EACtB,gBAAuB,EACvB,sBAA6B,EAC7B,eAAsB,EACtB,mBAA0B,EAC1B,oBAA2B,EAC3B,aAAoB,EACpB,cAAqB,EACrB,oBAA2B,EAC3B,aAAoB,EACpB,iBAAwB,EACxB,kBAAyB,EACzB,aAAa,EACb,WAAW,GACZ,GAAE,qBAA0B,2CA6V5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"distribution-shared.d.ts","sourceRoot":"","sources":["../../src/components/distribution-shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA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,EAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,EACpC,OAAM,kBAA8C,KACnD,SAAS,CAAC,kBAAkB,CAAC,EA4D/B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,YAAY,kBAAkB,EAAE,EAChC,UAAU,aAAa,EAAE,EACzB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,EAC1C,OAAM,kBAA8C,KACnD,SAAS,CAAC,wBAAwB,CAAC,EA4DrC,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,UAAU,UAAU,EAAE,EACtB,UAAU,aAAa,EAAE,EACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,EACnC,OAAM,kBAA8C,KACnD,SAAS,CAAC,wBAAwB,CAAC,EAmDrC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,UAAU,UAAU,EAAE,EACtB,UAAU,aAAa,EAAE,EACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,EACvC,OAAM,kBAA8C,KACnD,SAAS,CAAC,qBAAqB,CAAC,EA6DlC,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,UAAU,UAAU,EAAE,EACtB,QAAQ,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,EACxC,OAAM,kBAA8C,KACnD,SAAS,CAAC,sBAAsB,CAAC,EAwDnC,CAAA"}
1
+ {"version":3,"file":"distribution-shared.d.ts","sourceRoot":"","sources":["../../src/components/distribution-shared.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAKtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAykBK,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/distribution-react",
3
- "version": "0.109.6",
3
+ "version": "0.109.8",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -76,7 +76,7 @@
76
76
  "react-dom": "^19.0.0",
77
77
  "zod": "^4.0.0",
78
78
  "@voyantjs/admin": "^0.111.0",
79
- "@voyantjs/distribution": "^0.109.6",
79
+ "@voyantjs/distribution": "^0.109.8",
80
80
  "@voyantjs/ui": "^0.106.1"
81
81
  },
82
82
  "peerDependenciesMeta": {
@@ -106,7 +106,7 @@
106
106
  "vitest": "^4.1.2",
107
107
  "zod": "^4.3.6",
108
108
  "@voyantjs/admin": "^0.111.0",
109
- "@voyantjs/distribution": "^0.109.6",
109
+ "@voyantjs/distribution": "^0.109.8",
110
110
  "@voyantjs/i18n": "^0.106.0",
111
111
  "@voyantjs/react": "^0.104.1",
112
112
  "@voyantjs/ui": "^0.106.1",