platform-calendar-seatmap 2.1.6 → 2.1.7
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/components/actionsHandler/ActionsHandler.d.ts +1 -0
- package/dist/components/app/App.d.ts +1 -0
- package/dist/components/background/Background.d.ts +0 -2
- package/dist/components/elementSelector/ElementSelector.d.ts +1 -0
- package/dist/components/elementSelector/dropdown/Dropdown.d.ts +1 -0
- package/dist/components/elementSelector/dropdown/sections/arcSection/ArcSection.d.ts +8 -0
- package/dist/components/elementWrapper/ElementWrapper.d.ts +1 -0
- package/dist/components/elements/arcSection/ArcSection.d.ts +7 -0
- package/dist/components/scene3d/Scene3D.d.ts +1 -1
- package/dist/components/scene3d/builders/ArcSection3D.d.ts +3 -0
- package/dist/components/seatTooltip/SeatTooltip.d.ts +1 -12
- package/dist/components/seatTooltip/SeatTooltipPortal.d.ts +11 -0
- package/dist/components/ticketLegend/TicketLegend.d.ts +3 -0
- package/dist/components/zoomControls/ZoomControls.d.ts +3 -0
- package/dist/helpers/constants/commons.d.ts +0 -1
- package/dist/helpers/constants/seatColors.d.ts +0 -1
- package/dist/helpers/functions/seatMap.d.ts +35 -4
- package/dist/helpers/functions/seatStatus.d.ts +1 -1
- package/dist/hooks/useKeyboardSeatNavigation.d.ts +2 -2
- package/dist/hooks/useScaleTracker.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/store/reducers/main/actionCreators.d.ts +6 -2
- package/dist/store/reducers/main/actionTypes.d.ts +5 -1
- package/dist/store/reducers/main/selectors.d.ts +5 -1
- package/dist/store/reducers/main/types.d.ts +31 -3
- package/dist/store/reducers/rootReducer.d.ts +2 -2
- package/dist/store/reducers/seatMap/selectors.d.ts +63 -10
- package/package.json +3 -3
- package/dist/components/previewMode/PreviewMode.d.ts +0 -24
|
@@ -2,8 +2,6 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
type T_Props = {
|
|
3
3
|
children: (ref: React.MutableRefObject<HTMLDivElement>) => ReactNode;
|
|
4
4
|
backgroundColor?: string;
|
|
5
|
-
/** Hide the dot pattern (e.g. in templates section preview) */
|
|
6
|
-
hideDots?: boolean;
|
|
7
5
|
};
|
|
8
6
|
declare const Background: FC<T_Props>;
|
|
9
7
|
export { Background };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { T_SceneTransform } from 'helpers/types/commons';
|
|
3
|
+
type T_Props = {
|
|
4
|
+
sceneTransform: T_SceneTransform;
|
|
5
|
+
wrapperRef?: React.MutableRefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
declare const ArcSectionSettings: FC<T_Props>;
|
|
8
|
+
export { ArcSectionSettings };
|
|
@@ -14,6 +14,7 @@ type T_Props = {
|
|
|
14
14
|
onDelete?: () => void;
|
|
15
15
|
onDuplicate?: () => void;
|
|
16
16
|
onRotate?: (angle: number) => void;
|
|
17
|
+
onDragEnd?: (position: T_Element['position']) => void;
|
|
17
18
|
};
|
|
18
19
|
declare const ElementWrapper: FC<PropsWithChildren<T_Props>>;
|
|
19
20
|
export { ElementWrapper };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ENHANCED SEAT TOOLTIP
|
|
3
3
|
* Shows comprehensive seat information: row, seat number, price, ticket name, accessible badge, notes
|
|
4
|
+
* Uses a single global portal tooltip for smooth animated transitions between seats.
|
|
4
5
|
*/
|
|
5
|
-
import { FC, ReactNode } from 'react';
|
|
6
6
|
import { T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
7
7
|
export interface T_SeatTooltipData {
|
|
8
8
|
seat: T_Seat;
|
|
@@ -19,14 +19,3 @@ export interface T_SeatTooltipData {
|
|
|
19
19
|
/** When true, rows are irrelevant — don't show row info in the tooltip */
|
|
20
20
|
flatNumbering?: boolean;
|
|
21
21
|
}
|
|
22
|
-
type T_Props = {
|
|
23
|
-
data: T_SeatTooltipData;
|
|
24
|
-
children: ReactNode;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Enhanced Seat Tooltip Component
|
|
29
|
-
* Displays rich seat information on hover
|
|
30
|
-
*/
|
|
31
|
-
declare const SeatTooltip: FC<T_Props>;
|
|
32
|
-
export { SeatTooltip };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { T_SeatTooltipData } from './SeatTooltip';
|
|
3
|
+
type T_TooltipAPI = {
|
|
4
|
+
show: (data: T_SeatTooltipData, anchorEl: HTMLElement) => void;
|
|
5
|
+
hide: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSeatTooltip: () => T_TooltipAPI;
|
|
8
|
+
export declare const SeatTooltipProvider: FC<{
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export {};
|
|
@@ -33,4 +33,3 @@ export declare const SEAT_SELECTION_COLOR = "#3B82F6";
|
|
|
33
33
|
export declare const SEAT_SELECTION_GLOW = "rgba(59, 130, 246, 0.4)";
|
|
34
34
|
export declare const VIEW_SELECTION_COLOR = "#10B981";
|
|
35
35
|
export declare const VIEW_SELECTION_GLOW = "rgba(16, 185, 129, 0.4)";
|
|
36
|
-
export declare const SEAT_SIZE = 22;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T_Seat, T_SeatMap } from 'platform-calendar-helpers';
|
|
1
|
+
import { T_Seat, T_SeatMap, T_Element_ArcSection } from 'platform-calendar-helpers';
|
|
2
2
|
import { T_SelectedSeats } from 'store/reducers/elementSelector/types';
|
|
3
3
|
declare const removeFakeElementsFromSeatMap: (_seatMap: T_SeatMap) => {
|
|
4
4
|
elements: {
|
|
@@ -8,19 +8,50 @@ declare const removeFakeElementsFromSeatMap: (_seatMap: T_SeatMap) => {
|
|
|
8
8
|
tables: import("platform-calendar-helpers").T_Element_Table[];
|
|
9
9
|
text: import("platform-calendar-helpers").T_Element_Text[];
|
|
10
10
|
aisles: any;
|
|
11
|
+
arcSection: any;
|
|
11
12
|
};
|
|
12
13
|
id: number;
|
|
13
14
|
name: string;
|
|
14
15
|
backgroundColor?: string;
|
|
16
|
+
seatSize?: number;
|
|
15
17
|
};
|
|
16
18
|
declare const addFakeElementsToSeatMap: (_seatMap: T_SeatMap) => T_SeatMap;
|
|
19
|
+
/**
|
|
20
|
+
* Computes the bounding box (top, left, width, height) for an arc section in scene coordinates.
|
|
21
|
+
* Arc sections use centerPoint as their geometric center; this converts to top-left + dimensions
|
|
22
|
+
* to match how calculateZoomToFit expects element bounds.
|
|
23
|
+
*/
|
|
24
|
+
declare const getArcSectionBoundingBox: (arc: T_Element_ArcSection, seatSize?: number) => {
|
|
25
|
+
top: number;
|
|
26
|
+
left: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
17
30
|
/**
|
|
18
31
|
* Sold seats are not mutated. Sold status is determined by the soldSeats list (UI/selectors).
|
|
19
32
|
* We do NOT set seat.locked for sold seats — being sold is separate from being locked.
|
|
20
33
|
* (Previously this set locked:true on sold seats, which then got copied on paste/duplicate.)
|
|
21
34
|
*/
|
|
22
35
|
declare const disableSoldSeats: (seatMap: T_SeatMap, _soldSeats: T_Seat[]) => T_SeatMap;
|
|
23
|
-
|
|
36
|
+
type T_GetElementInitialPositionParams = {
|
|
37
|
+
sceneCoords: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
/** When provided, places element at viewport center instead of fixed offset */
|
|
42
|
+
wrapperRef?: {
|
|
43
|
+
current: HTMLDivElement | null;
|
|
44
|
+
};
|
|
45
|
+
scale?: number;
|
|
46
|
+
/** Current seatmap elements — when provided, new element is placed in empty space */
|
|
47
|
+
elements?: T_SeatMap['elements'];
|
|
48
|
+
/** The element being created and its type — used to estimate size for empty-space search */
|
|
49
|
+
newElement?: {
|
|
50
|
+
element: any;
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
declare const getElementInitialPosition: (params: T_GetElementInitialPositionParams | {
|
|
24
55
|
x: number;
|
|
25
56
|
y: number;
|
|
26
57
|
}) => {
|
|
@@ -34,5 +65,5 @@ declare const getElementInitialPosition: (sceneCoords: {
|
|
|
34
65
|
* @param soldSeats - Array of sold seats from Redux state
|
|
35
66
|
* @returns true if the element has sold seats, false otherwise
|
|
36
67
|
*/
|
|
37
|
-
declare const hasSoldSeats: (elementId: string | number, elementType: "tables" | "seatingGroup", soldSeats: T_SelectedSeats[keyof T_SelectedSeats][]) => boolean;
|
|
38
|
-
export { removeFakeElementsFromSeatMap, addFakeElementsToSeatMap, getElementInitialPosition, disableSoldSeats, hasSoldSeats };
|
|
68
|
+
declare const hasSoldSeats: (elementId: string | number, elementType: "tables" | "seatingGroup" | "arcSection", soldSeats: T_SelectedSeats[keyof T_SelectedSeats][]) => boolean;
|
|
69
|
+
export { removeFakeElementsFromSeatMap, addFakeElementsToSeatMap, getElementInitialPosition, getArcSectionBoundingBox, disableSoldSeats, hasSoldSeats };
|
|
@@ -22,7 +22,7 @@ export declare const getSeatStatus: (seat: T_Seat, soldSeatIds: Set<string | num
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const getSeatColor: (seat: T_Seat, seatColors: T_SeatColors, soldSeatIds: Set<string | number>, ticketIds?: {
|
|
24
24
|
[key: string | number]: boolean;
|
|
25
|
-
}, ticketColors?: Record<string, string
|
|
25
|
+
}, ticketColors?: Record<string, string>, highlightedTicketIds?: string[]) => string;
|
|
26
26
|
/**
|
|
27
27
|
* Gets seat colors with fallback to defaults if missing.
|
|
28
28
|
* Locked seats now use ticket color (no dedicated lock color), but we keep locked in the type for backward compat.
|
|
@@ -7,14 +7,14 @@ export declare const useKeyboardSeatNavigation: (enabled?: boolean) => {
|
|
|
7
7
|
focusedSeat: {
|
|
8
8
|
seatId: T_Seat["id"];
|
|
9
9
|
elementId: string;
|
|
10
|
-
elementType: "seatingGroup" | "tables";
|
|
10
|
+
elementType: "seatingGroup" | "tables" | "arcSection";
|
|
11
11
|
rowIndex: number;
|
|
12
12
|
colIndex: number;
|
|
13
13
|
};
|
|
14
14
|
setFocusedSeat: import("react").Dispatch<import("react").SetStateAction<{
|
|
15
15
|
seatId: T_Seat["id"];
|
|
16
16
|
elementId: string;
|
|
17
|
-
elementType: "seatingGroup" | "tables";
|
|
17
|
+
elementType: "seatingGroup" | "tables" | "arcSection";
|
|
18
18
|
rowIndex: number;
|
|
19
19
|
colIndex: number;
|
|
20
20
|
}>>;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns the current scale from Redux.
|
|
3
|
+
* Zoom is controlled via ZoomControls (+/- buttons) only; mouse wheel zoom is disabled.
|
|
4
|
+
*/
|
|
5
|
+
declare const useScaleTracker: (_wrapperRef: React.MutableRefObject<HTMLDivElement>) => number;
|
|
2
6
|
export { useScaleTracker };
|