@nex125/seatmap-viewer 0.1.22 → 0.1.23

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,76 @@
1
+ import { type ReactNode } from "react";
2
+ import type { SeatStatus, Venue } from "@nex125/seatmap-core";
3
+ import type { TooltipData } from "@nex125/seatmap-react";
4
+ import type { SeatmapViewerClassNames, SeatmapViewerStyles } from "./styleContract.js";
5
+ export interface SeatmapCartSeat {
6
+ seatId: string;
7
+ seatLabel: string;
8
+ rowLabel: string | null;
9
+ sectionId: string | null;
10
+ sectionLabel: string | null;
11
+ categoryId: string;
12
+ categoryName: string;
13
+ unitPrice: number;
14
+ baseUnitPrice: number;
15
+ serviceFee: number;
16
+ }
17
+ export interface SeatmapCartPayload {
18
+ venueId: string;
19
+ venueName: string;
20
+ seats: SeatmapCartSeat[];
21
+ totalSelectedSeats: number;
22
+ totalCost: number;
23
+ }
24
+ export interface SeatmapCartEvent {
25
+ type: "cart-proceed-clicked";
26
+ payload: SeatmapCartPayload;
27
+ }
28
+ export interface SeatmapViewerProps {
29
+ venue: Venue;
30
+ onSeatClick?: (seatId: string, sectionId: string) => void;
31
+ onSeatHover?: (seatId: string | null, sectionId: string | null) => void;
32
+ onSelectionChange?: (seatIds: string[]) => void;
33
+ onStatusUpdate?: (seatId: string, status: SeatStatus) => void;
34
+ renderTooltip?: (data: TooltipData) => ReactNode;
35
+ showLabels?: boolean;
36
+ className?: string;
37
+ onCartEvent?: (event: SeatmapCartEvent) => void;
38
+ locale?: string;
39
+ currency?: string;
40
+ maxSelectedSeats?: number;
41
+ styles?: SeatmapViewerStyles;
42
+ classNames?: SeatmapViewerClassNames;
43
+ messages?: Partial<SeatmapViewerMessages>;
44
+ }
45
+ export interface SeatmapViewerMessages {
46
+ uncategorizedCategoryName: string;
47
+ sectionFallbackLabel: string;
48
+ tableLabel: (tableLabel: string) => string;
49
+ tooltipSeatLabel: (rowLabel: string, seatLabel: string) => string;
50
+ tooltipStatusAvailable: string;
51
+ tooltipPriceLabel: (price: string) => string;
52
+ tooltipPriceUnavailable: string;
53
+ legendAriaLabel: string;
54
+ legendStatusesTitle: string;
55
+ legendPricesTitle: string;
56
+ cartChipLabel: (selectedCount: number) => string;
57
+ cartAriaLabel: string;
58
+ cartHeaderTitle: string;
59
+ cartCloseLabel: string;
60
+ cartEmptyState: string;
61
+ cartGroupMeta: (count: number, unitPrice: string) => string;
62
+ cartGroupFee: (basePrice: string, serviceFee: string, serviceFeePercent: string | null) => string;
63
+ cartRemoveOneAriaLabel: (categoryName: string) => string;
64
+ cartAddOneAriaLabel: (categoryName: string) => string;
65
+ cartRemoveSeatTitle: string;
66
+ cartRemoveSeatAriaLabel: (seatLabel: string) => string;
67
+ cartServiceFeeSummary: (serviceFeeTotal: string) => string;
68
+ cartSummary: (count: number, totalCost: string) => string;
69
+ cartProceedButton: string;
70
+ }
71
+ export declare const defaultSeatmapViewerMessages: SeatmapViewerMessages;
72
+ export type SeatmapViewerContentProps = Omit<SeatmapViewerProps, "className"> & {
73
+ showLabels: boolean;
74
+ };
75
+ export declare function SeatmapViewerContent({ venue, onSeatClick, onSeatHover, onSelectionChange, renderTooltip, showLabels, onCartEvent, locale, currency, maxSelectedSeats, styles, classNames, messages: messagesOverride, }: SeatmapViewerContentProps): import("react").JSX.Element;
76
+ export declare function SeatmapViewer({ venue, onSeatClick, onSeatHover, onSelectionChange, renderTooltip, showLabels, className, onCartEvent, locale, currency, maxSelectedSeats, styles, classNames, messages, }: SeatmapViewerProps): import("react").JSX.Element;