@voyant-travel/distribution-react 0.113.0 → 0.115.0

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.
@@ -104,7 +104,7 @@ export function ChannelSyncPage({ baseUrl, fetcher, className } = {}) {
104
104
  const isActive = statusFilter === tile.key;
105
105
  const value = counts[tile.key] ?? 0;
106
106
  const tileMessages = messages.statusTiles[tile.key];
107
- return (_jsxs("button", { type: "button", onClick: () => setStatusFilter(isActive ? "all" : tile.key), className: cn("group rounded-lg border bg-card p-4 text-left transition-all", "hover:border-foreground/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", isActive && "border-primary ring-2 ring-primary/30"), "aria-pressed": isActive, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: tileMessages.label }), tile.key === "failed" && value > 0 ? (_jsx(AlertTriangle, { className: "h-3.5 w-3.5 text-destructive" })) : null] }), _jsx("div", { className: "mt-1 text-3xl font-semibold tabular-nums", children: value }), _jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: tileMessages.description })] }, tile.key));
107
+ return (_jsxs("button", { type: "button", onClick: () => setStatusFilter(isActive ? "all" : tile.key), className: cn("group rounded-md border bg-card p-4 text-left transition-all", "hover:border-foreground/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", isActive && "border-primary ring-2 ring-primary/30"), "aria-pressed": isActive, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: tileMessages.label }), tile.key === "failed" && value > 0 ? (_jsx(AlertTriangle, { className: "h-3.5 w-3.5 text-destructive" })) : null] }), _jsx("div", { className: "mt-1 text-3xl font-semibold tabular-nums", children: value }), _jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: tileMessages.description })] }, tile.key));
108
108
  }) }), _jsxs("div", { className: "flex flex-col gap-3 md:flex-row md:items-end", children: [_jsxs("div", { className: "flex flex-1 flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "cs-booking", className: "text-xs", children: messages.filters.booking }), _jsx(AsyncCombobox, { value: bookingId, onChange: (value) => {
109
109
  setBookingId(value);
110
110
  if (!value)
@@ -32,7 +32,7 @@ export function ChannelsPage({ className, pageSize = PAGE_SIZE } = {}) {
32
32
  return (_jsxs("div", { "data-slot": "channels-page", className: cn("flex flex-col gap-6 p-6", className), children: [_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-lg font-semibold tracking-tight", children: page.title }), _jsx("p", { className: "text-sm text-muted-foreground", children: page.description })] }), _jsxs(Button, { size: "sm", onClick: () => {
33
33
  setEditing(undefined);
34
34
  setSheetOpen(true);
35
- }, children: [_jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), page.addChannel] })] }), isPending ? (_jsx(ChannelsListSkeleton, {})) : (_jsx("div", { className: "rounded-lg border bg-card text-card-foreground shadow-sm", children: channels.length === 0 ? (_jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: page.empty })) : (_jsx("div", { className: "flex flex-col divide-y", children: channels.map((channel) => (_jsxs("div", { className: "flex items-center justify-between px-6 py-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium", children: channel.name }), _jsx(Badge, { variant: "outline", className: "text-xs", children: messages.common.channelKindLabels[channel.kind] }), channel.status !== "active" ? (_jsx(Badge, { variant: "secondary", className: "text-xs", children: messages.common.channelStatusLabels[channel.status] })) : null] }), _jsxs("div", { className: "flex flex-wrap gap-3 text-xs text-muted-foreground", children: [channel.website ? _jsx("span", { children: channel.website }) : null, channel.contactName ? _jsx("span", { children: channel.contactName }) : null, channel.contactEmail ? _jsx("span", { children: channel.contactEmail }) : null] })] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted-foreground", children: _jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { onClick: () => {
35
+ }, children: [_jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), page.addChannel] })] }), isPending ? (_jsx(ChannelsListSkeleton, {})) : (_jsx("div", { className: "rounded-md border bg-card text-card-foreground shadow-sm", children: channels.length === 0 ? (_jsx("p", { className: "py-12 text-center text-sm text-muted-foreground", children: page.empty })) : (_jsx("div", { className: "flex flex-col divide-y", children: channels.map((channel) => (_jsxs("div", { className: "flex items-center justify-between px-6 py-3", children: [_jsxs("div", { className: "space-y-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium", children: channel.name }), _jsx(Badge, { variant: "outline", className: "text-xs", children: messages.common.channelKindLabels[channel.kind] }), channel.status !== "active" ? (_jsx(Badge, { variant: "secondary", className: "text-xs", children: messages.common.channelStatusLabels[channel.status] })) : null] }), _jsxs("div", { className: "flex flex-wrap gap-3 text-xs text-muted-foreground", children: [channel.website ? _jsx("span", { children: channel.website }) : null, channel.contactName ? _jsx("span", { children: channel.contactName }) : null, channel.contactEmail ? _jsx("span", { children: channel.contactEmail }) : null] })] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted-foreground", children: _jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { onClick: () => {
36
36
  setEditing(channel);
37
37
  setSheetOpen(true);
38
38
  }, children: [_jsx(Pencil, { className: "h-4 w-4" }), page.edit] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: remove.isPending, onClick: () => {
@@ -105,7 +105,7 @@ function ChannelSheet({ open, onOpenChange, channel, onSuccess, }) {
105
105
  }
106
106
  function ChannelsListSkeleton() {
107
107
  const rows = ["first", "second", "third", "fourth", "fifth"];
108
- return (_jsx("div", { className: "rounded-lg border bg-card text-card-foreground shadow-sm", children: rows.map((row) => (_jsxs("div", { className: "flex items-center justify-between border-b px-6 py-3 last:border-b-0", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "h-4 w-44 rounded bg-muted" }), _jsx("div", { className: "h-3 w-64 rounded bg-muted" })] }), _jsx("div", { className: "h-8 w-8 rounded bg-muted" })] }, row))) }));
108
+ return (_jsx("div", { className: "rounded-md border bg-card text-card-foreground shadow-sm", children: rows.map((row) => (_jsxs("div", { className: "flex items-center justify-between border-b px-6 py-3 last:border-b-0", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "h-4 w-44 rounded bg-muted" }), _jsx("div", { className: "h-3 w-64 rounded bg-muted" })] }), _jsx("div", { className: "h-8 w-8 rounded bg-muted" })] }, row))) }));
109
109
  }
110
110
  function validateChannelForm(values, page) {
111
111
  const errors = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/distribution-react",
3
- "version": "0.113.0",
3
+ "version": "0.115.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -187,12 +187,12 @@
187
187
  "react-dom": "^19.0.0",
188
188
  "zod": "^4.0.0",
189
189
  "react-hook-form": "^7.60.0",
190
- "@voyant-travel/admin": "^0.112.0",
191
- "@voyant-travel/distribution": "^0.113.0",
192
- "@voyant-travel/ui": "^0.106.2",
193
- "@voyant-travel/bookings-react": "^0.123.0",
194
- "@voyant-travel/inventory-react": "^0.5.0",
195
- "@voyant-travel/relationships-react": "^0.123.0"
190
+ "@voyant-travel/admin": "^0.114.0",
191
+ "@voyant-travel/distribution": "^0.115.0",
192
+ "@voyant-travel/ui": "^0.108.0",
193
+ "@voyant-travel/bookings-react": "^0.125.0",
194
+ "@voyant-travel/inventory-react": "^0.7.0",
195
+ "@voyant-travel/relationships-react": "^0.125.0"
196
196
  },
197
197
  "peerDependenciesMeta": {
198
198
  "@tanstack/react-table": {
@@ -218,7 +218,7 @@
218
218
  }
219
219
  },
220
220
  "dependencies": {
221
- "@voyant-travel/i18n": "^0.106.1",
221
+ "@voyant-travel/i18n": "^0.107.0",
222
222
  "@voyant-travel/react": "^0.104.1"
223
223
  },
224
224
  "devDependencies": {
@@ -233,15 +233,15 @@
233
233
  "vitest": "^4.1.2",
234
234
  "zod": "^4.3.6",
235
235
  "react-hook-form": "^7.60.0",
236
- "@voyant-travel/admin": "^0.112.0",
237
- "@voyant-travel/distribution": "^0.113.0",
238
- "@voyant-travel/i18n": "^0.106.1",
236
+ "@voyant-travel/admin": "^0.114.0",
237
+ "@voyant-travel/distribution": "^0.115.0",
238
+ "@voyant-travel/i18n": "^0.107.0",
239
239
  "@voyant-travel/react": "^0.104.1",
240
- "@voyant-travel/ui": "^0.106.2",
240
+ "@voyant-travel/ui": "^0.108.0",
241
241
  "@voyant-travel/voyant-typescript-config": "^0.1.0",
242
- "@voyant-travel/bookings-react": "^0.123.0",
243
- "@voyant-travel/inventory-react": "^0.5.0",
244
- "@voyant-travel/relationships-react": "^0.123.0"
242
+ "@voyant-travel/bookings-react": "^0.125.0",
243
+ "@voyant-travel/inventory-react": "^0.7.0",
244
+ "@voyant-travel/relationships-react": "^0.125.0"
245
245
  },
246
246
  "files": [
247
247
  "dist",