@voyant-travel/operations-react 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"availability-skeletons.d.ts","sourceRoot":"","sources":["../../../src/availability/components/availability-skeletons.tsx"],"names":[],"mappings":"AAYA,wBAAgB,wBAAwB,4CAsEvC;AAED,wBAAgB,wBAAwB,4CAUvC;AAED,wBAAgB,8BAA8B,4CAmE7C;AAED,wBAAgB,mCAAmC,4CAqDlD;AAED,wBAAgB,8BAA8B,4CA6D7C"}
1
+ {"version":3,"file":"availability-skeletons.d.ts","sourceRoot":"","sources":["../../../src/availability/components/availability-skeletons.tsx"],"names":[],"mappings":"AAaA,wBAAgB,wBAAwB,4CAwEvC;AAED,wBAAgB,wBAAwB,4CAUvC;AAED,wBAAgB,8BAA8B,4CAmE7C;AAED,wBAAgB,mCAAmC,4CAqDlD;AAED,wBAAgB,8BAA8B,4CA6D7C"}
@@ -2,10 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Card, CardContent, CardHeader } from "@voyant-travel/ui/components/card";
3
3
  import { Skeleton } from "@voyant-travel/ui/components/skeleton";
4
4
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
5
- import { useAvailabilityUiMessagesOrDefault } from "../i18n/index.js";
5
+ const AVAILABILITY_HEADER_WIDTHS = ["w-12", "w-16", "w-14", "w-20", "w-16"];
6
6
  export function AvailabilityBodySkeleton() {
7
- const messages = useAvailabilityUiMessagesOrDefault().page.skeleton;
8
- return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Skeleton, { className: "h-9 w-full max-w-sm" }), _jsx(Skeleton, { className: "h-9 w-44" })] }), _jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: Array.from({ length: 4 }).map((_, i) => (_jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-2", children: _jsx(Skeleton, { className: "h-3.5 w-28" }) }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-20" }), _jsx(Skeleton, { className: "h-3 w-40" })] })] }, i))) }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-52" }) }), _jsx(CardContent, { className: "space-y-2", children: Array.from({ length: 3 }).map((_, i) => (_jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-4 w-32" })] }, i))) })] }), _jsxs("div", { className: "flex items-center gap-1 border-b", children: [_jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-24" }), _jsx(Skeleton, { className: "h-9 w-32" })] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: messages.date }), _jsx(TableHead, { children: messages.product }), _jsx(TableHead, { children: messages.status }), _jsx(TableHead, { children: messages.remaining }), _jsx(TableHead, { children: messages.capacity })] }) }), _jsx(SkeletonTableRows, { rows: 6, columns: 5, columnWidths: ["w-24", "w-40", "w-16", "w-16", "w-16"] })] }) })] }));
7
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Skeleton, { className: "h-9 w-full max-w-sm" }), _jsx(Skeleton, { className: "h-9 w-44" })] }), _jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: Array.from({ length: 4 }).map((_, i) => (_jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-2", children: _jsx(Skeleton, { className: "h-3.5 w-28" }) }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-20" }), _jsx(Skeleton, { className: "h-3 w-40" })] })] }, i))) }), _jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-52" }) }), _jsx(CardContent, { className: "space-y-2", children: Array.from({ length: 3 }).map((_, i) => (_jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-4 w-32" })] }, i))) })] }), _jsxs("div", { className: "flex items-center gap-1 border-b", children: [_jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-24" }), _jsx(Skeleton, { className: "h-9 w-32" })] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: AVAILABILITY_HEADER_WIDTHS.map((width, column) => (_jsx(TableHead
8
+ // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder -- owner: availability-react; existing suppression is intentional pending typed cleanup.
9
+ , { children: _jsx(Skeleton, { className: `h-3.5 ${width}` }) }, column))) }) }), _jsx(SkeletonTableRows, { rows: 6, columns: 5, columnWidths: ["w-24", "w-40", "w-16", "w-16", "w-16"] })] }) })] }));
9
10
  }
10
11
  export function AvailabilityPageSkeleton() {
11
12
  return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-40" }), _jsx(Skeleton, { className: "h-4 w-96" })] }), _jsx(AvailabilityBodySkeleton, {})] }));
@@ -1 +1 @@
1
- {"version":3,"file":"resources-page-skeleton.d.ts","sourceRoot":"","sources":["../../../src/resources/admin/resources-page-skeleton.tsx"],"names":[],"mappings":"AAsBA,0EAA0E;AAC1E,wBAAgB,qBAAqB,4CA6EpC;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,4CAcpC"}
1
+ {"version":3,"file":"resources-page-skeleton.d.ts","sourceRoot":"","sources":["../../../src/resources/admin/resources-page-skeleton.tsx"],"names":[],"mappings":"AAqBA,0EAA0E;AAC1E,wBAAgB,qBAAqB,4CA4EpC;AAED,6FAA6F;AAC7F,wBAAgB,qBAAqB,4CAcpC"}
@@ -1,20 +1,18 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useOperatorAdminMessages } from "@voyant-travel/admin";
4
3
  import { Card, CardContent, CardHeader } from "@voyant-travel/ui/components/card";
5
4
  import { Skeleton } from "@voyant-travel/ui/components/skeleton";
6
5
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
7
6
  const TABLE_COLUMNS = [
8
- { id: "name", width: "w-40" },
9
- { id: "kind", width: "w-20" },
10
- { id: "supplier", width: "w-32" },
11
- { id: "capacity", width: "w-16" },
12
- { id: "status", width: "w-16" },
7
+ { id: "name", headerWidth: "w-16", width: "w-40" },
8
+ { id: "kind", headerWidth: "w-12", width: "w-20" },
9
+ { id: "supplier", headerWidth: "w-16", width: "w-32" },
10
+ { id: "capacity", headerWidth: "w-16", width: "w-16" },
11
+ { id: "status", headerWidth: "w-14", width: "w-16" },
13
12
  ];
14
13
  /** Body-only placeholder used inside the live page while queries load. */
15
14
  export function ResourcesBodySkeleton() {
16
- const t = useOperatorAdminMessages().resources;
17
- return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: Array.from({ length: 4 }, (_, index) => `kpi-${index}`).map((key) => (_jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-2", children: _jsx(Skeleton, { className: "h-3.5 w-28" }) }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-20" }), _jsx(Skeleton, { className: "h-3 w-40" })] })] }, key))) }), _jsx("div", { className: "grid gap-4 lg:grid-cols-2", children: ["attention-a", "attention-b"].map((cardKey) => (_jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-52" }) }), _jsx(CardContent, { className: "space-y-2", children: Array.from({ length: 3 }, (_, index) => `${cardKey}-row-${index}`).map((rowKey) => (_jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-4 w-24" })] }, rowKey))) })] }, cardKey))) }), _jsxs("div", { className: "flex items-center gap-1 border-b", children: [_jsx(Skeleton, { className: "h-9 w-24" }), _jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-24" })] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t.nameLabel }), _jsx(TableHead, { children: t.kindLabel }), _jsx(TableHead, { children: t.supplierLabel }), _jsx(TableHead, { children: t.capacityLabel }), _jsx(TableHead, { children: t.statusLabel })] }) }), _jsx(TableBody, { children: Array.from({ length: 6 }, (_, index) => `row-${index}`).map((rowKey) => (_jsx(TableRow, { children: TABLE_COLUMNS.map((column) => (_jsx(TableCell, { children: _jsx(Skeleton, { className: `h-4 ${column.width}` }) }, `${rowKey}-${column.id}`))) }, rowKey))) })] }) })] }));
15
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: Array.from({ length: 4 }, (_, index) => `kpi-${index}`).map((key) => (_jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-2", children: _jsx(Skeleton, { className: "h-3.5 w-28" }) }), _jsxs(CardContent, { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-20" }), _jsx(Skeleton, { className: "h-3 w-40" })] })] }, key))) }), _jsx("div", { className: "grid gap-4 lg:grid-cols-2", children: ["attention-a", "attention-b"].map((cardKey) => (_jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-52" }) }), _jsx(CardContent, { className: "space-y-2", children: Array.from({ length: 3 }, (_, index) => `${cardKey}-row-${index}`).map((rowKey) => (_jsxs("div", { className: "flex items-center justify-between rounded-md border px-3 py-2", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-4 w-24" })] }, rowKey))) })] }, cardKey))) }), _jsxs("div", { className: "flex items-center gap-1 border-b", children: [_jsx(Skeleton, { className: "h-9 w-24" }), _jsx(Skeleton, { className: "h-9 w-20" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-28" }), _jsx(Skeleton, { className: "h-9 w-24" })] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: TABLE_COLUMNS.map((column) => (_jsx(TableHead, { children: _jsx(Skeleton, { className: `h-3.5 ${column.headerWidth}` }) }, column.id))) }) }), _jsx(TableBody, { children: Array.from({ length: 6 }, (_, index) => `row-${index}`).map((rowKey) => (_jsx(TableRow, { children: TABLE_COLUMNS.map((column) => (_jsx(TableCell, { children: _jsx(Skeleton, { className: `h-4 ${column.width}` }) }, `${rowKey}-${column.id}`))) }, rowKey))) })] }) })] }));
18
16
  }
19
17
  /** Route-level placeholder for the resources dashboard — title block + filter row + body. */
20
18
  export function ResourcesPageSkeleton() {
@@ -1 +1 @@
1
- {"version":3,"file":"resource-detail-skeletons.d.ts","sourceRoot":"","sources":["../../../src/resources/components/resource-detail-skeletons.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,wBAAgB,sBAAsB,4CAErC;AAED,wBAAgB,0BAA0B,4CAEzC;AAED,wBAAgB,gCAAgC,4CAI/C;AAED,wBAAgB,gCAAgC,4CAI/C"}
1
+ {"version":3,"file":"resource-detail-skeletons.d.ts","sourceRoot":"","sources":["../../../src/resources/components/resource-detail-skeletons.tsx"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH,wBAAgB,sBAAsB,4CAErC;AAED,wBAAgB,0BAA0B,4CAEzC;AAED,wBAAgB,gCAAgC,4CAI/C;AAED,wBAAgB,gCAAgC,4CAI/C"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { ResourceDetailSkeleton as BaseResourceDetailSkeleton } from "./resource-detail-shared.js";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Card, CardContent, CardHeader } from "@voyant-travel/ui/components/card";
4
+ import { Skeleton } from "@voyant-travel/ui/components/skeleton";
4
5
  /**
5
6
  * Pending skeletons for the four resources detail pages.
6
7
  *
@@ -22,3 +23,10 @@ export function ResourceAssignmentDetailSkeleton() {
22
23
  export function ResourceAllocationDetailSkeleton() {
23
24
  return (_jsx(BaseResourceDetailSkeleton, { actionCount: 3, detailRows: 7, showNotes: false, stackedCards: 0 }));
24
25
  }
26
+ function BaseResourceDetailSkeleton({ actionCount, detailRows, showNotes = true, stackedCards = 2, }) {
27
+ return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { className: "flex items-center gap-4", children: [_jsx(Skeleton, { className: "size-9 rounded-md" }), _jsxs("div", { className: "flex flex-1 flex-col gap-2", children: [_jsx(Skeleton, { className: "h-7 w-56" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Skeleton, { className: "h-5 w-16 rounded-full" }), _jsx(Skeleton, { className: "h-5 w-20 rounded-full" })] })] }), Array.from({ length: actionCount }).map((_, index) => (_jsx(Skeleton
28
+ // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder -- owner: resources-react; existing suppression is intentional pending typed cleanup.
29
+ , { className: "h-9 w-28" }, index)))] }), _jsxs("div", { className: "grid gap-6 md:grid-cols-2", children: [_jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-36" }) }), _jsx(CardContent, { className: "flex flex-col gap-3", children: Array.from({ length: detailRows }).map((_, index) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton, { className: "h-3.5 w-28" }), _jsx(Skeleton, { className: "h-3.5 w-40" })] }, index))) })] }), showNotes ? (_jsxs(Card, { children: [_jsx(CardHeader, { children: _jsx(Skeleton, { className: "h-5 w-16" }) }), _jsxs(CardContent, { className: "flex flex-col gap-2", children: [_jsx(Skeleton, { className: "h-3.5 w-full" }), _jsx(Skeleton, { className: "h-3.5 w-3/4" }), _jsx(Skeleton, { className: "h-3.5 w-2/3" })] })] })) : null] }), Array.from({ length: stackedCards }).map((_, cardIndex) => (_jsxs(Card
30
+ // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder -- owner: resources-react; existing suppression is intentional pending typed cleanup.
31
+ , { children: [_jsxs(CardHeader, { className: "flex flex-row items-center gap-2", children: [_jsx(Skeleton, { className: "size-4" }), _jsx(Skeleton, { className: "h-5 w-36" })] }), _jsx(CardContent, { className: "flex flex-col gap-3", children: Array.from({ length: 2 }).map((_, rowIndex) => (_jsxs("div", { className: "flex flex-col gap-2 rounded-md border p-3", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-3 w-64 max-w-full" })] }, rowIndex))) })] }, cardIndex)))] }));
32
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/operations-react",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -247,11 +247,11 @@
247
247
  "react-hook-form": "^7.72.1",
248
248
  "sonner": "^2.0.7",
249
249
  "zod": "^4.0.0",
250
- "@voyant-travel/admin": "^0.111.2",
251
- "@voyant-travel/bookings-react": "^0.120.1",
250
+ "@voyant-travel/admin": "^0.111.3",
252
251
  "@voyant-travel/operations": "^0.1.0",
253
- "@voyant-travel/inventory-react": "^0.2.1",
254
- "@voyant-travel/ui": "^0.106.2"
252
+ "@voyant-travel/inventory-react": "^0.2.2",
253
+ "@voyant-travel/ui": "^0.106.2",
254
+ "@voyant-travel/bookings-react": "^0.120.3"
255
255
  },
256
256
  "peerDependenciesMeta": {
257
257
  "@tanstack/react-table": {
@@ -296,11 +296,11 @@
296
296
  "typescript": "^6.0.2",
297
297
  "vitest": "^4.1.2",
298
298
  "zod": "^4.3.6",
299
- "@voyant-travel/admin": "^0.111.2",
300
- "@voyant-travel/bookings-react": "^0.120.1",
299
+ "@voyant-travel/admin": "^0.111.3",
301
300
  "@voyant-travel/i18n": "^0.106.1",
302
301
  "@voyant-travel/operations": "^0.1.0",
303
- "@voyant-travel/inventory-react": "^0.2.1",
302
+ "@voyant-travel/bookings-react": "^0.120.3",
303
+ "@voyant-travel/inventory-react": "^0.2.2",
304
304
  "@voyant-travel/react": "^0.104.1",
305
305
  "@voyant-travel/ui": "^0.106.2",
306
306
  "@voyant-travel/voyant-typescript-config": "^0.1.0"