platform-calendar-seatmap 2.1.5 → 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.
Files changed (30) hide show
  1. package/dist/components/actionsHandler/ActionsHandler.d.ts +1 -0
  2. package/dist/components/app/App.d.ts +4 -1
  3. package/dist/components/background/Background.d.ts +0 -2
  4. package/dist/components/elementSelector/ElementSelector.d.ts +1 -0
  5. package/dist/components/elementSelector/dropdown/Dropdown.d.ts +1 -0
  6. package/dist/components/elementSelector/dropdown/sections/arcSection/ArcSection.d.ts +8 -0
  7. package/dist/components/elementWrapper/ElementWrapper.d.ts +1 -0
  8. package/dist/components/elements/arcSection/ArcSection.d.ts +7 -0
  9. package/dist/components/scene3d/Scene3D.d.ts +1 -1
  10. package/dist/components/scene3d/builders/ArcSection3D.d.ts +3 -0
  11. package/dist/components/seatTooltip/SeatTooltip.d.ts +1 -12
  12. package/dist/components/seatTooltip/SeatTooltipPortal.d.ts +11 -0
  13. package/dist/components/ticketLegend/TicketLegend.d.ts +3 -0
  14. package/dist/components/zoomControls/ZoomControls.d.ts +3 -0
  15. package/dist/helpers/constants/commons.d.ts +0 -1
  16. package/dist/helpers/constants/seatColors.d.ts +0 -1
  17. package/dist/helpers/functions/seatMap.d.ts +35 -5
  18. package/dist/helpers/functions/seatStatus.d.ts +1 -1
  19. package/dist/hooks/useKeyboardSeatNavigation.d.ts +2 -2
  20. package/dist/hooks/useScaleTracker.d.ts +5 -1
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.LICENSE.txt +0 -980
  23. package/dist/store/reducers/main/actionCreators.d.ts +6 -2
  24. package/dist/store/reducers/main/actionTypes.d.ts +5 -1
  25. package/dist/store/reducers/main/selectors.d.ts +5 -1
  26. package/dist/store/reducers/main/types.d.ts +31 -3
  27. package/dist/store/reducers/rootReducer.d.ts +2 -2
  28. package/dist/store/reducers/seatMap/selectors.d.ts +63 -10
  29. package/package.json +3 -3
  30. package/dist/components/previewMode/PreviewMode.d.ts +0 -24
@@ -3,6 +3,7 @@ type actions = {
3
3
  save: () => (T_SeatMap & {
4
4
  backgroundColor: string;
5
5
  ticketColors: Record<string, string>;
6
+ seatSize: number;
6
7
  }) | false;
7
8
  cancel: () => void;
8
9
  updateSeatMap: (seatMap: T_SeatMap) => void;
@@ -8,11 +8,14 @@ import { T_Mode } from 'helpers/types/commons';
8
8
  import { T_MainState } from 'store/reducers/main/types';
9
9
  type T_Props = {
10
10
  tickets: T_Ticket[];
11
- seatMap: T_SeatMap | null;
11
+ seatMap: (T_SeatMap & {
12
+ ticketColors?: Record<string, string>;
13
+ }) | null;
12
14
  actionsRef: React.ForwardedRef<actions>;
13
15
  mode?: T_Mode;
14
16
  soldSeats?: T_MainState['soldSeats'];
15
17
  currencySymbol?: string;
18
+ isFullscreen?: boolean;
16
19
  onSave?: () => void;
17
20
  onCancel?: () => void;
18
21
  onFullscreenChange?: (isFullscreen: boolean) => void;
@@ -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 };
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { T_SceneTransform } from 'helpers/types/commons';
3
3
  type T_Props = {
4
4
  sceneTransform: T_SceneTransform;
5
+ wrapperRef?: React.MutableRefObject<HTMLDivElement>;
5
6
  renderMode?: '2d' | '3d';
6
7
  onToggleRenderMode?: () => void;
7
8
  };
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { T_SceneTransform } from 'helpers/types/commons';
3
3
  type T_Props = {
4
4
  sceneTransform: T_SceneTransform;
5
+ wrapperRef?: React.MutableRefObject<HTMLDivElement>;
5
6
  };
6
7
  declare const Dropdown: FC<T_Props>;
7
8
  export { Dropdown };
@@ -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 };
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { T_Element_ArcSection } from 'platform-calendar-helpers';
3
+ type T_Props = {
4
+ arcSection: T_Element_ArcSection;
5
+ };
6
+ declare const ArcSection: FC<T_Props>;
7
+ export { ArcSection };
@@ -1,6 +1,6 @@
1
1
  import { T_SceneTransform } from 'helpers/types/commons';
2
2
  type T_Scene3DRef = {
3
- zoomToFit: () => void;
3
+ zoomToFit: (animate?: boolean) => void;
4
4
  };
5
5
  type T_Props = {
6
6
  wrapperRef: React.MutableRefObject<HTMLDivElement>;
@@ -0,0 +1,3 @@
1
+ import { T_Element_ArcSection } from 'platform-calendar-helpers';
2
+ import { T_BuildContext, T_BuiltObject } from './types';
3
+ export declare const buildArcSection3D: (arcSection: T_Element_ArcSection, ctx: T_BuildContext) => T_BuiltObject;
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const TicketLegend: FC;
3
+ export { TicketLegend };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const ZoomControls: FC;
3
+ export { ZoomControls };
@@ -11,6 +11,5 @@ declare const IS_MOBILE: boolean;
11
11
  declare const MODES: {
12
12
  readonly edit: "edit";
13
13
  readonly view: "view";
14
- readonly preview: "preview";
15
14
  };
16
15
  export { ALPHABET, ALPHABET_VENUE, CURVE_UPDATED_EVENT_NAME, STRETCH_UPDATED_EVENT_NAME, MODES, IS_MOBILE };
@@ -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,20 +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;
15
- ticketColors?: Record<string, string>;
16
+ seatSize?: number;
16
17
  };
17
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
+ };
18
30
  /**
19
31
  * Sold seats are not mutated. Sold status is determined by the soldSeats list (UI/selectors).
20
32
  * We do NOT set seat.locked for sold seats — being sold is separate from being locked.
21
33
  * (Previously this set locked:true on sold seats, which then got copied on paste/duplicate.)
22
34
  */
23
35
  declare const disableSoldSeats: (seatMap: T_SeatMap, _soldSeats: T_Seat[]) => T_SeatMap;
24
- declare const getElementInitialPosition: (sceneCoords: {
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 | {
25
55
  x: number;
26
56
  y: number;
27
57
  }) => {
@@ -35,5 +65,5 @@ declare const getElementInitialPosition: (sceneCoords: {
35
65
  * @param soldSeats - Array of sold seats from Redux state
36
66
  * @returns true if the element has sold seats, false otherwise
37
67
  */
38
- declare const hasSoldSeats: (elementId: string | number, elementType: "tables" | "seatingGroup", soldSeats: T_SelectedSeats[keyof T_SelectedSeats][]) => boolean;
39
- 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>) => 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
- declare const useScaleTracker: (wrapperRef: React.MutableRefObject<HTMLDivElement>) => number;
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 };