platform-calendar-seatmap 2.1.7 → 2.1.9
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/app/App.d.ts +6 -0
- 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/scene3d/builders/types.d.ts +2 -0
- package/dist/components/seat/Seat.d.ts +13 -13
- package/dist/helpers/functions/seatStatus.d.ts +2 -1
- package/dist/hooks/useElementVisibility.d.ts +11 -0
- package/dist/hooks/useRowVirtualization.d.ts +23 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +980 -0
- package/dist/store/reducers/actionHandlers/selectors.d.ts +4 -4
- package/dist/store/reducers/clipboard/selectors.d.ts +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 +7 -7
- package/dist/store/reducers/seatMap/selectors.d.ts +25 -1
- package/package.json +2 -2
- package/tsconfig.json +3 -1
|
@@ -16,9 +16,15 @@ type T_Props = {
|
|
|
16
16
|
soldSeats?: T_MainState['soldSeats'];
|
|
17
17
|
currencySymbol?: string;
|
|
18
18
|
isFullscreen?: boolean;
|
|
19
|
+
designOnly?: boolean;
|
|
20
|
+
ticketOnly?: boolean;
|
|
21
|
+
hideTicketSettings?: boolean;
|
|
22
|
+
hideTicketAssignmentColors?: boolean;
|
|
19
23
|
onSave?: () => void;
|
|
20
24
|
onCancel?: () => void;
|
|
21
25
|
onFullscreenChange?: (isFullscreen: boolean) => void;
|
|
26
|
+
isSaving?: boolean;
|
|
27
|
+
isSaved?: boolean;
|
|
22
28
|
onPreviewChange?: (isPreview: boolean) => void;
|
|
23
29
|
} & Partial<T_ActionHandlersState>;
|
|
24
30
|
declare const App: FC<T_Props>;
|
|
@@ -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 };
|
|
@@ -9,6 +9,8 @@ export type T_BuildContext = {
|
|
|
9
9
|
ticketIds?: {
|
|
10
10
|
[key: string | number]: boolean;
|
|
11
11
|
};
|
|
12
|
+
/** When true, only sold seats get special color; available/locked use unassigned */
|
|
13
|
+
hideTicketAssignmentColors?: boolean;
|
|
12
14
|
};
|
|
13
15
|
export type T_BuiltObject = {
|
|
14
16
|
object: THREE.Object3D;
|
|
@@ -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 };
|
|
@@ -19,10 +19,11 @@ export declare const getSeatStatus: (seat: T_Seat, soldSeatIds: Set<string | num
|
|
|
19
19
|
* When the seat is 'available' and a per-ticket color is defined in ticketColors,
|
|
20
20
|
* that color takes priority over the generic available color.
|
|
21
21
|
* Locked seats use their assigned ticket color (same as available seats), not a dedicated lock color.
|
|
22
|
+
* When hideTicketAssignmentColors is true, only sold seats get special coloring; available/locked use unassigned.
|
|
22
23
|
*/
|
|
23
24
|
export declare const getSeatColor: (seat: T_Seat, seatColors: T_SeatColors, soldSeatIds: Set<string | number>, ticketIds?: {
|
|
24
25
|
[key: string | number]: boolean;
|
|
25
|
-
}, ticketColors?: Record<string, string>, highlightedTicketIds?: string[]) => string;
|
|
26
|
+
}, ticketColors?: Record<string, string>, highlightedTicketIds?: string[], hideTicketAssignmentColors?: boolean) => string;
|
|
26
27
|
/**
|
|
27
28
|
* Gets seat colors with fallback to defaults if missing.
|
|
28
29
|
* Locked seats now use ticket color (no dedicated lock color), but we keep locked in the type for backward compat.
|
|
@@ -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;
|