platform-calendar-seatmap 2.1.7 → 2.1.8
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/elementSelector/FullscreenPreviewControls.d.ts +3 -0
- package/dist/components/elementSelector/HistoryControls.d.ts +3 -0
- package/dist/components/elementSelector/icons/ElementSelectorIcons.d.ts +26 -0
- package/dist/components/elements/table/round/Round.d.ts +2 -2
- package/dist/components/elements/table/square/Square.d.ts +2 -2
- package/dist/components/seat/Seat.d.ts +13 -13
- package/dist/hooks/useElementVisibility.d.ts +11 -0
- package/dist/hooks/useRowVirtualization.d.ts +23 -0
- package/dist/index.js +1 -1
- package/dist/store/reducers/rootReducer.d.ts +2 -2
- package/dist/store/reducers/seatMap/selectors.d.ts +25 -1
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Arc section: outer arc (7 dots) + inner arc (5 dots) */
|
|
3
|
+
export declare const ArcSectionIcon: FC<{
|
|
4
|
+
size?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
/** Seating group: equal rows and columns of dots, no borders */
|
|
8
|
+
export declare const SeatingGroupIcon: FC<{
|
|
9
|
+
size?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/** Standing area: simple square outline */
|
|
13
|
+
export declare const StandingAreaIcon: FC<{
|
|
14
|
+
size?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** Table: central circle with 4 smaller circles around it */
|
|
18
|
+
export declare const TableIcon: FC<{
|
|
19
|
+
size?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Text: capital T */
|
|
23
|
+
export declare const TextIcon: FC<{
|
|
24
|
+
size?: number;
|
|
25
|
+
className?: string;
|
|
26
|
+
}>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { T_Element_Table, T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { selectSelectedSeatsObj } from 'store/reducers/seatMap/selectors';
|
|
4
3
|
import { selectTicketByIds } from 'store/reducers/main/selectors';
|
|
5
4
|
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
6
5
|
import { T_TableNumberingConfig } from 'helpers/constants/numberingStyles';
|
|
7
6
|
type T_Props = {
|
|
8
7
|
table: T_Element_Table;
|
|
9
|
-
|
|
8
|
+
selectedSeatIds: Record<string, any>;
|
|
10
9
|
ticketIds: ReturnType<typeof selectTicketByIds>['ticketIds'];
|
|
11
10
|
ticketsByIds?: {
|
|
12
11
|
[key: number]: T_Ticket;
|
|
@@ -19,6 +18,7 @@ type T_Props = {
|
|
|
19
18
|
ticketColors?: Record<string, string>;
|
|
20
19
|
numberingConfig: T_TableNumberingConfig;
|
|
21
20
|
iconType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
21
|
+
highlightedTicketIds?: string[];
|
|
22
22
|
};
|
|
23
23
|
declare const Round: FC<T_Props>;
|
|
24
24
|
export { Round };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { T_Element_Table, T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { selectSelectedSeatsObj } from 'store/reducers/seatMap/selectors';
|
|
4
3
|
import { selectTicketByIds } from 'store/reducers/main/selectors';
|
|
5
4
|
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
6
5
|
import { T_TableNumberingConfig } from 'helpers/constants/numberingStyles';
|
|
7
6
|
type T_Props = {
|
|
8
7
|
table: T_Element_Table;
|
|
9
|
-
|
|
8
|
+
selectedSeatIds: Record<string, any>;
|
|
10
9
|
ticketIds: ReturnType<typeof selectTicketByIds>['ticketIds'];
|
|
11
10
|
ticketsByIds?: {
|
|
12
11
|
[key: number]: T_Ticket;
|
|
@@ -19,6 +18,7 @@ type T_Props = {
|
|
|
19
18
|
ticketColors?: Record<string, string>;
|
|
20
19
|
numberingConfig: T_TableNumberingConfig;
|
|
21
20
|
iconType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
21
|
+
highlightedTicketIds?: string[];
|
|
22
22
|
};
|
|
23
23
|
declare const Square: FC<T_Props>;
|
|
24
24
|
export { Square };
|
|
@@ -8,38 +8,38 @@ type T_Props = {
|
|
|
8
8
|
seatColors: T_SeatColors;
|
|
9
9
|
soldSeatIds: Set<string | number>;
|
|
10
10
|
iconType?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
11
|
+
/** Absolute top position (primitive instead of object for memo stability) */
|
|
12
|
+
posTop?: number;
|
|
13
|
+
/** Absolute left position (primitive instead of object for memo stability) */
|
|
14
|
+
posLeft?: number;
|
|
15
|
+
/** @deprecated Use posTop/posLeft primitives instead. Kept for backward compat. */
|
|
11
16
|
absolutePosition?: {
|
|
12
17
|
top?: number;
|
|
13
18
|
left?: number;
|
|
14
19
|
};
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
/** Row index for data attribute (primitive instead of dataAttributes object for memo stability) */
|
|
21
|
+
seatRow?: number;
|
|
22
|
+
/** Column index for data attribute (primitive instead of dataAttributes object for memo stability) */
|
|
23
|
+
seatCol?: number;
|
|
24
|
+
/** @deprecated Use seatRow/seatCol primitives instead. Kept for backward compat. */
|
|
19
25
|
dataAttributes?: Record<string, string | number | undefined>;
|
|
20
26
|
ticketIds: ReturnType<typeof selectTicketByIds>['ticketIds'];
|
|
21
|
-
/** Ticket lookup by ID for enhanced tooltip */
|
|
22
27
|
ticketsByIds?: {
|
|
23
28
|
[key: number]: T_Ticket;
|
|
24
29
|
};
|
|
25
30
|
isViewOnly: boolean;
|
|
26
31
|
select: (seat: T_Seat) => void;
|
|
27
|
-
/** Show seat number inside the seat */
|
|
28
32
|
showNumber?: boolean;
|
|
29
|
-
/** Custom seat number to display (defaults to extracting from label or using index) */
|
|
30
33
|
seatNumber?: string | number;
|
|
31
|
-
/** Row label for enhanced tooltip */
|
|
32
34
|
rowLabel?: string;
|
|
33
|
-
/** Section/element name for enhanced tooltip */
|
|
34
35
|
sectionName?: string;
|
|
35
|
-
/** Currency symbol for price display in tooltip */
|
|
36
36
|
currencySymbol?: string;
|
|
37
|
-
/** Per-ticket color overrides from seatmap settings */
|
|
38
37
|
ticketColors?: Record<string, string>;
|
|
39
|
-
/** Computed display label (e.g. after hidden-seat renumbering). Falls back to seat.label. */
|
|
40
38
|
displayLabel?: string;
|
|
41
|
-
/** Whether flat numbering is active (no rows). Passed to tooltip to avoid showing row info. */
|
|
42
39
|
flatNumbering?: boolean;
|
|
40
|
+
highlightedTicketIds?: string[];
|
|
41
|
+
/** Explicit pixel size - when provided, overrides CSS var(--seat-size) for arc sections and other absolute-positioned seats */
|
|
42
|
+
size?: number;
|
|
43
43
|
};
|
|
44
44
|
declare const Seat: FC<T_Props>;
|
|
45
45
|
export { Seat };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns `true` when the referenced element is within (or close to) the
|
|
4
|
+
* visible viewport. Uses IntersectionObserver with a generous root margin
|
|
5
|
+
* so seats are mounted slightly before they scroll into view, avoiding
|
|
6
|
+
* visible pop-in.
|
|
7
|
+
*
|
|
8
|
+
* For elements with few seats (below `seatThreshold`) the hook always
|
|
9
|
+
* returns `true` — the overhead of observing is not worth it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useElementVisibility(ref: RefObject<HTMLElement | null>, seatCount: number, seatThreshold?: number): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a Set of row indices that should be rendered based on viewport visibility.
|
|
4
|
+
* Returns `null` when virtualization is not active (small seat count), meaning
|
|
5
|
+
* all rows should be rendered.
|
|
6
|
+
*
|
|
7
|
+
* For elements with an absolute-positioned layout (like ArcSection), provide
|
|
8
|
+
* `rowPositions` — an array of {top, height} per row in local element coordinates.
|
|
9
|
+
*
|
|
10
|
+
* For elements with a flexbox layout (like SeatingGroup), provide `rowHeight`
|
|
11
|
+
* and `rowGap` — the hook will calculate row positions automatically.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useRowVirtualization(containerRef: RefObject<HTMLElement | null>, totalRows: number, totalSeatCount: number, layout: {
|
|
14
|
+
type: 'flex';
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
rowGap: number;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'absolute';
|
|
19
|
+
rowPositions: Array<{
|
|
20
|
+
top: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}>;
|
|
23
|
+
}): Set<number> | null;
|