platform-calendar-seatmap 2.0.2 → 2.1.3
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/.github/workflows/auto-pr-staging-to-main.yml +34 -0
- package/dist/components/actionsHandler/ActionsHandler.d.ts +1 -0
- package/dist/components/app/App.d.ts +9 -5
- package/dist/components/background/Background.d.ts +2 -0
- package/dist/components/elementSelector/ElementSelector.d.ts +1 -2
- package/dist/components/elementSelector/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/aisles/Aisles.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/objects/Objects.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/seatingGroup/SeatingGroup.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/standingArea/StandingArea.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/tables/Tables.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/text/Text.d.ts +1 -1
- package/dist/components/elements/aisle/Aisle.d.ts +1 -1
- package/dist/components/elements/table/round/Round.d.ts +7 -3
- package/dist/components/elements/table/square/Square.d.ts +7 -3
- package/dist/components/numberingSettings/NumberingSettings.d.ts +3 -2
- package/dist/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/components/scene3d/Scene3D.d.ts +1 -1
- package/dist/components/sceneContainer/SceneContainer.d.ts +1 -1
- package/dist/components/seat/Seat.d.ts +8 -2
- package/dist/components/seatTooltip/SeatTooltip.d.ts +2 -0
- package/dist/components/tableNumberingSettings/TableNumberingSettings.d.ts +16 -0
- package/dist/helpers/constants/commons.d.ts +7 -1
- package/dist/helpers/constants/numberingStyles.d.ts +198 -10
- package/dist/helpers/constants/seatColors.d.ts +1 -0
- package/dist/helpers/functions/export.d.ts +1 -1
- package/dist/helpers/functions/rowLabels.d.ts +2 -2
- package/dist/helpers/functions/seatMap.d.ts +2 -1
- package/dist/helpers/functions/seatStatus.d.ts +16 -6
- package/dist/helpers/functions/statistics.d.ts +1 -1
- package/dist/helpers/types/commons.d.ts +1 -1
- package/dist/hooks/useElementWrapperActionHandlers.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1000 -0
- package/dist/store/reducers/actionHandlers/selectors.d.ts +1 -1
- package/dist/store/reducers/actionHandlers/types.d.ts +1 -1
- package/dist/store/reducers/clipboard/actionCreators.d.ts +1 -1
- package/dist/store/reducers/clipboard/types.d.ts +1 -1
- package/dist/store/reducers/main/actionCreators.d.ts +5 -3
- package/dist/store/reducers/main/actionTypes.d.ts +3 -1
- package/dist/store/reducers/main/selectors.d.ts +5 -3
- package/dist/store/reducers/main/types.d.ts +19 -5
- package/dist/store/reducers/rootReducer.d.ts +1 -1
- package/dist/store/reducers/seatMap/selectors.d.ts +1 -1
- package/dist/store/reducers/seatMap/types.d.ts +2 -2
- package/package.json +2 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Auto PR staging to main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["staging"]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
create-pr:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pull-requests: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v3
|
|
17
|
+
|
|
18
|
+
- name: Create PR if not exists
|
|
19
|
+
env:
|
|
20
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
run: |
|
|
22
|
+
# Check if an open PR from staging -> main already exists
|
|
23
|
+
EXISTING_PR=$(gh pr list --base main --head staging --state open --json number --jq '.[0].number')
|
|
24
|
+
|
|
25
|
+
if [ -z "$EXISTING_PR" ]; then
|
|
26
|
+
echo "No existing PR found. Creating one..."
|
|
27
|
+
gh pr create \
|
|
28
|
+
--base main \
|
|
29
|
+
--head staging \
|
|
30
|
+
--title "Merge staging into main" \
|
|
31
|
+
--body "Automated PR created from staging branch."
|
|
32
|
+
else
|
|
33
|
+
echo "PR #$EXISTING_PR already exists. Skipping."
|
|
34
|
+
fi
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import '@wix/design-system/styles.global.css';
|
|
3
3
|
import { T_SeatMap, T_Ticket } from 'platform-calendar-helpers';
|
|
4
|
-
import
|
|
5
|
-
import { actions } from
|
|
6
|
-
import { T_ActionHandlersState } from
|
|
7
|
-
import { T_Mode } from
|
|
8
|
-
import { T_MainState } from
|
|
4
|
+
import 'assets/styles/global.css';
|
|
5
|
+
import { actions } from 'components/actionsHandler/ActionsHandler';
|
|
6
|
+
import { T_ActionHandlersState } from 'store/reducers/actionHandlers/types';
|
|
7
|
+
import { T_Mode } from 'helpers/types/commons';
|
|
8
|
+
import { T_MainState } from 'store/reducers/main/types';
|
|
9
9
|
type T_Props = {
|
|
10
10
|
tickets: T_Ticket[];
|
|
11
11
|
seatMap: T_SeatMap | null;
|
|
@@ -13,6 +13,10 @@ type T_Props = {
|
|
|
13
13
|
mode?: T_Mode;
|
|
14
14
|
soldSeats?: T_MainState['soldSeats'];
|
|
15
15
|
currencySymbol?: string;
|
|
16
|
+
onSave?: () => void;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
onFullscreenChange?: (isFullscreen: boolean) => void;
|
|
19
|
+
onPreviewChange?: (isPreview: boolean) => void;
|
|
16
20
|
} & Partial<T_ActionHandlersState>;
|
|
17
21
|
declare const App: FC<T_Props>;
|
|
18
22
|
export { App };
|
|
@@ -2,6 +2,8 @@ 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;
|
|
5
7
|
};
|
|
6
8
|
declare const Background: FC<T_Props>;
|
|
7
9
|
export { Background };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { T_SceneTransform } from
|
|
2
|
+
import { T_SceneTransform } from 'helpers/types/commons';
|
|
3
3
|
type T_Props = {
|
|
4
4
|
sceneTransform: T_SceneTransform;
|
|
5
5
|
renderMode?: '2d' | '3d';
|
|
6
6
|
onToggleRenderMode?: () => void;
|
|
7
|
-
onZoomToFit?: () => void;
|
|
8
7
|
};
|
|
9
8
|
declare const ElementSelector: FC<T_Props>;
|
|
10
9
|
export { ElementSelector };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* No seats - purely for layout clarity and visual organization
|
|
5
5
|
*/
|
|
6
6
|
import { FC } from 'react';
|
|
7
|
-
import { T_Element_Aisle } from
|
|
7
|
+
import { T_Element_Aisle } from 'helpers/types/aisle';
|
|
8
8
|
type T_Props = {
|
|
9
9
|
aisle: T_Element_Aisle;
|
|
10
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { T_Element_Table, T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { selectSelectedSeatsObj } from
|
|
4
|
-
import { selectTicketByIds } from
|
|
5
|
-
import { T_SeatColors } from
|
|
3
|
+
import { selectSelectedSeatsObj } from 'store/reducers/seatMap/selectors';
|
|
4
|
+
import { selectTicketByIds } from 'store/reducers/main/selectors';
|
|
5
|
+
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
6
|
+
import { T_TableNumberingConfig } from 'helpers/constants/numberingStyles';
|
|
6
7
|
type T_Props = {
|
|
7
8
|
table: T_Element_Table;
|
|
8
9
|
selectedSeatsObj: ReturnType<typeof selectSelectedSeatsObj>;
|
|
@@ -15,6 +16,9 @@ type T_Props = {
|
|
|
15
16
|
seatColors: T_SeatColors;
|
|
16
17
|
soldSeatIds: Set<string | number>;
|
|
17
18
|
currencySymbol?: string;
|
|
19
|
+
ticketColors?: Record<string, string>;
|
|
20
|
+
numberingConfig: T_TableNumberingConfig;
|
|
21
|
+
iconType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
18
22
|
};
|
|
19
23
|
declare const Round: FC<T_Props>;
|
|
20
24
|
export { Round };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { T_Element_Table, T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { selectSelectedSeatsObj } from
|
|
4
|
-
import { selectTicketByIds } from
|
|
5
|
-
import { T_SeatColors } from
|
|
3
|
+
import { selectSelectedSeatsObj } from 'store/reducers/seatMap/selectors';
|
|
4
|
+
import { selectTicketByIds } from 'store/reducers/main/selectors';
|
|
5
|
+
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
6
|
+
import { T_TableNumberingConfig } from 'helpers/constants/numberingStyles';
|
|
6
7
|
type T_Props = {
|
|
7
8
|
table: T_Element_Table;
|
|
8
9
|
selectedSeatsObj: ReturnType<typeof selectSelectedSeatsObj>;
|
|
@@ -15,6 +16,9 @@ type T_Props = {
|
|
|
15
16
|
seatColors: T_SeatColors;
|
|
16
17
|
soldSeatIds: Set<string | number>;
|
|
17
18
|
currencySymbol?: string;
|
|
19
|
+
ticketColors?: Record<string, string>;
|
|
20
|
+
numberingConfig: T_TableNumberingConfig;
|
|
21
|
+
iconType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
18
22
|
};
|
|
19
23
|
declare const Square: FC<T_Props>;
|
|
20
24
|
export { Square };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NUMBERING SETTINGS COMPONENT
|
|
3
|
-
*
|
|
3
|
+
* Informative panel that shows users how their row and seat labels will look.
|
|
4
|
+
* Provides presets, identifier types, separators, and numbering configuration.
|
|
4
5
|
*/
|
|
5
6
|
import { FC } from 'react';
|
|
6
|
-
import { T_NumberingConfig } from
|
|
7
|
+
import { T_NumberingConfig } from 'helpers/constants/numberingStyles';
|
|
7
8
|
type T_Props = {
|
|
8
9
|
config: Partial<T_NumberingConfig>;
|
|
9
10
|
onChange: (config: Partial<T_NumberingConfig>) => void;
|
|
@@ -12,6 +12,8 @@ interface OnboardingStep {
|
|
|
12
12
|
spotlightPadding?: number;
|
|
13
13
|
/** If true, skip this step if target element doesn't exist */
|
|
14
14
|
skipIfMissing?: boolean;
|
|
15
|
+
/** Icon rendered above the title */
|
|
16
|
+
icon?: React.ReactNode;
|
|
15
17
|
}
|
|
16
18
|
/** Custom event to show onboarding again without page reload (e.g. from "Take the tour again" button) */
|
|
17
19
|
export declare const SHOW_ONBOARDING_EVENT = "seatmap-show-onboarding";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
-
import { selectTicketByIds } from
|
|
4
|
-
import { T_SeatColors } from
|
|
3
|
+
import { selectTicketByIds } from 'store/reducers/main/selectors';
|
|
4
|
+
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
5
5
|
type T_Props = {
|
|
6
6
|
seat: T_Seat;
|
|
7
7
|
selected: boolean;
|
|
@@ -34,6 +34,12 @@ type T_Props = {
|
|
|
34
34
|
sectionName?: string;
|
|
35
35
|
/** Currency symbol for price display in tooltip */
|
|
36
36
|
currencySymbol?: string;
|
|
37
|
+
/** Per-ticket color overrides from seatmap settings */
|
|
38
|
+
ticketColors?: Record<string, string>;
|
|
39
|
+
/** Computed display label (e.g. after hidden-seat renumbering). Falls back to seat.label. */
|
|
40
|
+
displayLabel?: string;
|
|
41
|
+
/** Whether flat numbering is active (no rows). Passed to tooltip to avoid showing row info. */
|
|
42
|
+
flatNumbering?: boolean;
|
|
37
43
|
};
|
|
38
44
|
declare const Seat: FC<T_Props>;
|
|
39
45
|
export { Seat };
|
|
@@ -16,6 +16,8 @@ export interface T_SeatTooltipData {
|
|
|
16
16
|
isLocked?: boolean;
|
|
17
17
|
customNote?: string;
|
|
18
18
|
currencySymbol?: string;
|
|
19
|
+
/** When true, rows are irrelevant — don't show row info in the tooltip */
|
|
20
|
+
flatNumbering?: boolean;
|
|
19
21
|
}
|
|
20
22
|
type T_Props = {
|
|
21
23
|
data: T_SeatTooltipData;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TABLE NUMBERING SETTINGS
|
|
3
|
+
* Simplified numbering panel for table elements.
|
|
4
|
+
* No row concept — only seat identifier type, direction, start number, and prefix.
|
|
5
|
+
* Direction options are shape-aware (clockwise/CCW for round, LTR/RTL for square).
|
|
6
|
+
*/
|
|
7
|
+
import { FC } from 'react';
|
|
8
|
+
import { T_TableNumberingConfig } from 'helpers/constants/numberingStyles';
|
|
9
|
+
type T_Props = {
|
|
10
|
+
config: Partial<T_TableNumberingConfig>;
|
|
11
|
+
/** 0 = round, 1 = square */
|
|
12
|
+
shape: 0 | 1;
|
|
13
|
+
onChange: (config: T_TableNumberingConfig) => void;
|
|
14
|
+
};
|
|
15
|
+
declare const TableNumberingSettings: FC<T_Props>;
|
|
16
|
+
export { TableNumberingSettings };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
declare const ALPHABET: string[];
|
|
2
|
+
/**
|
|
3
|
+
* Venue-safe alphabet excluding letters that resemble numbers.
|
|
4
|
+
* I is excluded (resembles 1), O is excluded (resembles 0).
|
|
5
|
+
* This is the industry standard used by Broadway theatres, opera houses, etc.
|
|
6
|
+
*/
|
|
7
|
+
declare const ALPHABET_VENUE: string[];
|
|
2
8
|
declare const CURVE_UPDATED_EVENT_NAME = "CUSTOM_EVENTS/CURVE_UPDATED_EVENT";
|
|
3
9
|
declare const STRETCH_UPDATED_EVENT_NAME = "CUSTOM_EVENTS/STRETCH_UPDATED_EVENT_NAME";
|
|
4
10
|
declare const IS_MOBILE: boolean;
|
|
@@ -7,4 +13,4 @@ declare const MODES: {
|
|
|
7
13
|
readonly view: "view";
|
|
8
14
|
readonly preview: "preview";
|
|
9
15
|
};
|
|
10
|
-
export { ALPHABET, CURVE_UPDATED_EVENT_NAME, STRETCH_UPDATED_EVENT_NAME, MODES, IS_MOBILE };
|
|
16
|
+
export { ALPHABET, ALPHABET_VENUE, CURVE_UPDATED_EVENT_NAME, STRETCH_UPDATED_EVENT_NAME, MODES, IS_MOBILE };
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ROW/SEAT NUMBERING STYLES
|
|
3
|
-
* Configuration options for how rows and seats are labeled
|
|
3
|
+
* Configuration options for how rows and seats are labeled.
|
|
4
|
+
*
|
|
5
|
+
* Supports alphabetic (A, B, C), numeric (1, 2, 3), and Roman numeral (I, II, III)
|
|
6
|
+
* identifiers for both rows and seats, with configurable separators, presets,
|
|
7
|
+
* and venue-safe letter exclusion (I, O).
|
|
4
8
|
*/
|
|
9
|
+
import { T_Seat } from 'platform-calendar-helpers';
|
|
5
10
|
export type T_NumberingStyle = 'default' | 'compact' | 'full' | 'letter-number';
|
|
11
|
+
export type T_RowIdentifierType = 'alphabetic' | 'numeric' | 'roman';
|
|
12
|
+
export type T_SeatIdentifierType = 'numeric' | 'alphabetic' | 'roman';
|
|
13
|
+
export type T_LabelSeparator = 'none' | 'hyphen' | 'dot' | 'space' | 'full';
|
|
14
|
+
/** Direction options for table seat numbering (shape-aware). */
|
|
15
|
+
export type T_TableSeatDirection = 'clockwise' | 'counter-clockwise' | 'left-to-right' | 'right-to-left' | 'center-out';
|
|
16
|
+
/** Simplified numbering config for table elements (no row concept). */
|
|
17
|
+
export interface T_TableNumberingConfig {
|
|
18
|
+
/** Show numbers on seats */
|
|
19
|
+
showSeatNumbers: boolean;
|
|
20
|
+
/** Seat numbering type (numbers, letters, or roman numerals) */
|
|
21
|
+
seatNumberingType: T_SeatIdentifierType;
|
|
22
|
+
/** Numbering direction (shape-aware) */
|
|
23
|
+
seatNumberingDirection: T_TableSeatDirection;
|
|
24
|
+
/** Starting seat number */
|
|
25
|
+
startSeat: number;
|
|
26
|
+
/** Include seat prefix in labels */
|
|
27
|
+
includeSeatPrefix: boolean;
|
|
28
|
+
/** Custom seat prefix string */
|
|
29
|
+
seatPrefix: string;
|
|
30
|
+
/** Whether to renumber visible seats when some are hidden */
|
|
31
|
+
renumberHiddenSeats: boolean;
|
|
32
|
+
}
|
|
6
33
|
export interface T_NumberingConfig {
|
|
7
34
|
/** Style for row labels */
|
|
8
35
|
rowStyle: T_NumberingStyle;
|
|
@@ -16,40 +43,201 @@ export interface T_NumberingConfig {
|
|
|
16
43
|
startRow: string | number;
|
|
17
44
|
/** Starting seat number */
|
|
18
45
|
startSeat: number;
|
|
19
|
-
/** Row numbering
|
|
20
|
-
rowNumberingType:
|
|
46
|
+
/** Row numbering type (letters, numbers, or roman numerals) */
|
|
47
|
+
rowNumberingType: T_RowIdentifierType;
|
|
48
|
+
/** Seat numbering type (numbers, letters, or roman numerals) */
|
|
49
|
+
seatNumberingType: T_SeatIdentifierType;
|
|
21
50
|
/** Seat numbering direction */
|
|
22
51
|
seatNumberingDirection: 'left-to-right' | 'right-to-left' | 'center-out';
|
|
23
52
|
/** Include row prefix in labels (e.g., "Row A" vs just "A") */
|
|
24
53
|
includeRowPrefix: boolean;
|
|
25
54
|
/** Include seat prefix in labels (e.g., "Seat 1" vs just "1") */
|
|
26
55
|
includeSeatPrefix: boolean;
|
|
56
|
+
/** Separator between row and seat in the combined label */
|
|
57
|
+
separator: T_LabelSeparator;
|
|
58
|
+
/** Letters to exclude from alphabetic row labels (default: ['I','O']) */
|
|
59
|
+
excludeLetters: string[];
|
|
60
|
+
/** Flat numbering mode: ignore rows, label seats 1, 2, 3... globally */
|
|
61
|
+
flatNumbering: boolean;
|
|
62
|
+
/** Custom row prefix string (e.g. "Row ", "Section ") */
|
|
63
|
+
rowPrefix: string;
|
|
64
|
+
/** Custom seat prefix string (e.g. "Seat ", "") */
|
|
65
|
+
seatPrefix: string;
|
|
66
|
+
/** Whether to renumber visible seats when some are hidden */
|
|
67
|
+
renumberHiddenSeats: boolean;
|
|
27
68
|
}
|
|
28
69
|
export declare const DEFAULT_NUMBERING_CONFIG: T_NumberingConfig;
|
|
70
|
+
export declare const DEFAULT_TABLE_NUMBERING_CONFIG: T_TableNumberingConfig;
|
|
71
|
+
/** Direction options shown for round tables. */
|
|
72
|
+
export declare const TABLE_ROUND_DIRECTION_OPTIONS: ({
|
|
73
|
+
id: "clockwise";
|
|
74
|
+
label: string;
|
|
75
|
+
description: string;
|
|
76
|
+
} | {
|
|
77
|
+
id: "counter-clockwise";
|
|
78
|
+
label: string;
|
|
79
|
+
description: string;
|
|
80
|
+
} | {
|
|
81
|
+
id: "center-out";
|
|
82
|
+
label: string;
|
|
83
|
+
description: string;
|
|
84
|
+
})[];
|
|
85
|
+
/** Direction options shown for square/rectangular tables. */
|
|
86
|
+
export declare const TABLE_SQUARE_DIRECTION_OPTIONS: ({
|
|
87
|
+
id: "left-to-right";
|
|
88
|
+
label: string;
|
|
89
|
+
description: string;
|
|
90
|
+
} | {
|
|
91
|
+
id: "right-to-left";
|
|
92
|
+
label: string;
|
|
93
|
+
description: string;
|
|
94
|
+
} | {
|
|
95
|
+
id: "center-out";
|
|
96
|
+
label: string;
|
|
97
|
+
description: string;
|
|
98
|
+
})[];
|
|
29
99
|
export declare const NUMBERING_STYLE_OPTIONS: {
|
|
30
100
|
id: string;
|
|
31
101
|
label: string;
|
|
32
102
|
description: string;
|
|
33
103
|
}[];
|
|
34
|
-
export declare const ROW_NUMBERING_TYPES: {
|
|
35
|
-
id:
|
|
104
|
+
export declare const ROW_NUMBERING_TYPES: ({
|
|
105
|
+
id: "alphabetic";
|
|
36
106
|
label: string;
|
|
37
107
|
example: string;
|
|
38
|
-
}
|
|
108
|
+
} | {
|
|
109
|
+
id: "numeric";
|
|
110
|
+
label: string;
|
|
111
|
+
example: string;
|
|
112
|
+
} | {
|
|
113
|
+
id: "roman";
|
|
114
|
+
label: string;
|
|
115
|
+
example: string;
|
|
116
|
+
})[];
|
|
117
|
+
export declare const SEAT_NUMBERING_TYPES: ({
|
|
118
|
+
id: "numeric";
|
|
119
|
+
label: string;
|
|
120
|
+
example: string;
|
|
121
|
+
} | {
|
|
122
|
+
id: "alphabetic";
|
|
123
|
+
label: string;
|
|
124
|
+
example: string;
|
|
125
|
+
} | {
|
|
126
|
+
id: "roman";
|
|
127
|
+
label: string;
|
|
128
|
+
example: string;
|
|
129
|
+
})[];
|
|
39
130
|
export declare const SEAT_DIRECTION_OPTIONS: {
|
|
40
131
|
id: string;
|
|
41
132
|
label: string;
|
|
42
133
|
description: string;
|
|
43
134
|
}[];
|
|
135
|
+
export declare const SEPARATOR_OPTIONS: ({
|
|
136
|
+
id: "none";
|
|
137
|
+
label: string;
|
|
138
|
+
example: string;
|
|
139
|
+
} | {
|
|
140
|
+
id: "hyphen";
|
|
141
|
+
label: string;
|
|
142
|
+
example: string;
|
|
143
|
+
} | {
|
|
144
|
+
id: "dot";
|
|
145
|
+
label: string;
|
|
146
|
+
example: string;
|
|
147
|
+
} | {
|
|
148
|
+
id: "space";
|
|
149
|
+
label: string;
|
|
150
|
+
example: string;
|
|
151
|
+
} | {
|
|
152
|
+
id: "full";
|
|
153
|
+
label: string;
|
|
154
|
+
example: string;
|
|
155
|
+
})[];
|
|
156
|
+
/**
|
|
157
|
+
* Convert a positive integer to a Roman numeral string.
|
|
158
|
+
* Returns '' for values <= 0 or > 3999.
|
|
159
|
+
*/
|
|
160
|
+
export declare const toRoman: (n: number) => string;
|
|
161
|
+
/**
|
|
162
|
+
* Convert a Roman numeral string back to a number.
|
|
163
|
+
* Returns NaN for invalid input.
|
|
164
|
+
*/
|
|
165
|
+
export declare const fromRoman: (s: string) => number;
|
|
44
166
|
/**
|
|
45
|
-
* Generate row label based on index and config
|
|
167
|
+
* Generate row label based on index and config.
|
|
46
168
|
*/
|
|
47
169
|
export declare const generateRowLabel: (rowIndex: number, config: T_NumberingConfig) => string;
|
|
48
170
|
/**
|
|
49
|
-
* Generate seat
|
|
171
|
+
* Generate seat identifier based on column index and config.
|
|
50
172
|
*/
|
|
51
|
-
export declare const generateSeatNumber: (colIndex: number, totalCols: number, config: T_NumberingConfig) =>
|
|
173
|
+
export declare const generateSeatNumber: (colIndex: number, totalCols: number, config: T_NumberingConfig) => string;
|
|
52
174
|
/**
|
|
53
|
-
* Format seat label based on row and seat
|
|
175
|
+
* Format seat label based on row and seat identifiers.
|
|
54
176
|
*/
|
|
55
177
|
export declare const formatSeatLabel: (rowLabel: string, seatNumber: number | string, config: T_NumberingConfig) => string;
|
|
178
|
+
/**
|
|
179
|
+
* Compute a display label for a seat, optionally renumbering to skip hidden seats.
|
|
180
|
+
*
|
|
181
|
+
* @param rowIndex - The row index in the grid
|
|
182
|
+
* @param colIndex - The column index in the grid
|
|
183
|
+
* @param rowSeats - All seats in the same row
|
|
184
|
+
* @param config - The numbering config
|
|
185
|
+
* @param globalIndex - (flat numbering only) The seat's global index across all rows
|
|
186
|
+
* @param totalSeats - (flat numbering only) Total number of seats across all rows
|
|
187
|
+
* @returns The display label string
|
|
188
|
+
*/
|
|
189
|
+
export declare const getDisplaySeatLabel: (rowIndex: number, colIndex: number, rowSeats: T_Seat[], config: T_NumberingConfig, globalIndex?: number, totalSeats?: number,
|
|
190
|
+
/** (flat numbering only) visible-only global index that skips hidden seats */
|
|
191
|
+
visibleGlobalIndex?: number,
|
|
192
|
+
/** (flat numbering only) total number of visible seats across all rows */
|
|
193
|
+
totalVisibleSeats?: number) => string;
|
|
194
|
+
/**
|
|
195
|
+
* Generate a flat (global) seat label ignoring row structure.
|
|
196
|
+
* Useful for simple venues that just number seats 1, 2, 3...
|
|
197
|
+
*
|
|
198
|
+
* @param globalIndex - The seat's position in visual (left-to-right) order
|
|
199
|
+
* @param totalSeats - Total number of seats (needed for direction mapping)
|
|
200
|
+
* @param config - Numbering configuration
|
|
201
|
+
*/
|
|
202
|
+
export declare const generateFlatSeatLabel: (globalIndex: number, totalSeats: number, config: T_NumberingConfig) => string;
|
|
203
|
+
export type T_IndexingPreset = 'theatre' | 'stadium' | 'classical' | 'simple' | 'full' | 'compact';
|
|
204
|
+
export declare const INDEXING_PRESETS: Record<T_IndexingPreset, Partial<T_NumberingConfig>>;
|
|
205
|
+
/**
|
|
206
|
+
* Detect which preset (if any) the current numbering config matches.
|
|
207
|
+
* Returns the preset id or `undefined` when no preset matches.
|
|
208
|
+
*/
|
|
209
|
+
export declare const detectMatchingPreset: (config: Partial<T_NumberingConfig>) => T_IndexingPreset | undefined;
|
|
210
|
+
export declare const INDEXING_PRESET_OPTIONS: ({
|
|
211
|
+
id: "theatre";
|
|
212
|
+
label: string;
|
|
213
|
+
description: string;
|
|
214
|
+
} | {
|
|
215
|
+
id: "stadium";
|
|
216
|
+
label: string;
|
|
217
|
+
description: string;
|
|
218
|
+
} | {
|
|
219
|
+
id: "classical";
|
|
220
|
+
label: string;
|
|
221
|
+
description: string;
|
|
222
|
+
} | {
|
|
223
|
+
id: "simple";
|
|
224
|
+
label: string;
|
|
225
|
+
description: string;
|
|
226
|
+
} | {
|
|
227
|
+
id: "full";
|
|
228
|
+
label: string;
|
|
229
|
+
description: string;
|
|
230
|
+
} | {
|
|
231
|
+
id: "compact";
|
|
232
|
+
label: string;
|
|
233
|
+
description: string;
|
|
234
|
+
})[];
|
|
235
|
+
/**
|
|
236
|
+
* Generate a seat label for a table element.
|
|
237
|
+
*
|
|
238
|
+
* @param seatIndex - The seat's sequential index (0-based, in natural order:
|
|
239
|
+
* clockwise for round, top→right→bottom→left for square)
|
|
240
|
+
* @param totalSeats - Total number of seats on the table
|
|
241
|
+
* @param config - Table numbering configuration
|
|
242
|
+
*/
|
|
243
|
+
export declare const generateTableSeatNumber: (seatIndex: number, totalSeats: number, config: T_TableNumberingConfig) => string;
|
|
@@ -28,6 +28,7 @@ export declare const ZONE_COLORS: {
|
|
|
28
28
|
box: string;
|
|
29
29
|
accessible: string;
|
|
30
30
|
};
|
|
31
|
+
export declare const TICKET_DEFAULT_PALETTE: string[];
|
|
31
32
|
export declare const SEAT_SELECTION_COLOR = "#3B82F6";
|
|
32
33
|
export declare const SEAT_SELECTION_GLOW = "rgba(59, 130, 246, 0.4)";
|
|
33
34
|
export declare const VIEW_SELECTION_COLOR = "#10B981";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { T_SeatMap, T_Ticket } from 'platform-calendar-helpers';
|
|
6
6
|
import { T_SeatIndex } from './statistics';
|
|
7
|
-
import { T_SelectedSeats } from
|
|
7
|
+
import { T_SelectedSeats } from 'store/reducers/elementSelector/types';
|
|
8
8
|
/** Filters for CSV export (Statistics) */
|
|
9
9
|
export interface T_ExportFilters {
|
|
10
10
|
elementId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Get row letter from row index,
|
|
3
|
-
* Row 0 = A, Row 1 = B, ..., Row
|
|
2
|
+
* Get row letter from row index, using the venue-safe alphabet (excludes I, O).
|
|
3
|
+
* Row 0 = A, Row 1 = B, ..., Row 7 = H, Row 8 = J (skips I), etc.
|
|
4
4
|
* @param rowIndex Zero-based row index
|
|
5
5
|
* @returns Row letter(s) (e.g., "A", "B", "AA")
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T_Seat, T_SeatMap } from 'platform-calendar-helpers';
|
|
2
|
-
import { T_SelectedSeats } from
|
|
2
|
+
import { T_SelectedSeats } from 'store/reducers/elementSelector/types';
|
|
3
3
|
declare const removeFakeElementsFromSeatMap: (_seatMap: T_SeatMap) => {
|
|
4
4
|
elements: {
|
|
5
5
|
objects: import("platform-calendar-helpers").T_Element_Object[];
|
|
@@ -12,6 +12,7 @@ declare const removeFakeElementsFromSeatMap: (_seatMap: T_SeatMap) => {
|
|
|
12
12
|
id: number;
|
|
13
13
|
name: string;
|
|
14
14
|
backgroundColor?: string;
|
|
15
|
+
ticketColors?: Record<string, string>;
|
|
15
16
|
};
|
|
16
17
|
declare const addFakeElementsToSeatMap: (_seatMap: T_SeatMap) => T_SeatMap;
|
|
17
18
|
/**
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { T_Seat } from 'platform-calendar-helpers';
|
|
2
|
-
import { T_SeatColors } from
|
|
3
|
-
export type { T_SeatColors } from
|
|
1
|
+
import { T_Seat, T_Ticket } from 'platform-calendar-helpers';
|
|
2
|
+
import { T_SeatColors } from 'helpers/constants/seatColors';
|
|
3
|
+
export type { T_SeatColors } from 'helpers/constants/seatColors';
|
|
4
|
+
/**
|
|
5
|
+
* Generates a `ticketColors` map for all provided tickets.
|
|
6
|
+
* Assigns colors sequentially from the curated palette for maximum contrast.
|
|
7
|
+
* Beyond 16 tickets, cycles through darkened variants.
|
|
8
|
+
*/
|
|
9
|
+
export declare const generateTicketColors: (tickets: T_Ticket[], existing?: Record<string, string>) => Record<string, string>;
|
|
4
10
|
export type T_SeatStatus = 'available' | 'locked' | 'unassigned' | 'sold';
|
|
5
11
|
/**
|
|
6
12
|
* Determines the status of a seat based on its locked state, whether it's sold, and if it has a ticket assigned
|
|
@@ -9,12 +15,16 @@ export declare const getSeatStatus: (seat: T_Seat, soldSeatIds: Set<string | num
|
|
|
9
15
|
[key: string | number]: boolean;
|
|
10
16
|
}) => T_SeatStatus;
|
|
11
17
|
/**
|
|
12
|
-
* Gets the appropriate color for a seat based on its status
|
|
18
|
+
* Gets the appropriate color for a seat based on its status.
|
|
19
|
+
* When the seat is 'available' and a per-ticket color is defined in ticketColors,
|
|
20
|
+
* that color takes priority over the generic available color.
|
|
21
|
+
* Locked seats use their assigned ticket color (same as available seats), not a dedicated lock color.
|
|
13
22
|
*/
|
|
14
23
|
export declare const getSeatColor: (seat: T_Seat, seatColors: T_SeatColors, soldSeatIds: Set<string | number>, ticketIds?: {
|
|
15
24
|
[key: string | number]: boolean;
|
|
16
|
-
}) => string;
|
|
25
|
+
}, ticketColors?: Record<string, string>) => string;
|
|
17
26
|
/**
|
|
18
|
-
* Gets seat colors with fallback to defaults if missing
|
|
27
|
+
* Gets seat colors with fallback to defaults if missing.
|
|
28
|
+
* Locked seats now use ticket color (no dedicated lock color), but we keep locked in the type for backward compat.
|
|
19
29
|
*/
|
|
20
30
|
export declare const getSeatColorsWithDefaults: (seatColors?: Partial<T_SeatColors> | null) => T_SeatColors;
|