@seatmap.pro/renderer 0.0.6 → 1.47.0
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/lib/index.d.ts +247 -86
- package/lib/index.js +1 -1
- package/package.json +89 -51
- package/lib/index.d.mts +0 -2198
- package/lib/index.mjs +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -122,7 +122,8 @@ interface IPlainSeatsDTO {
|
|
|
122
122
|
* Contains the core properties of a seat as received from the backend.
|
|
123
123
|
* @hidden
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
interface ISeatDTO extends IBaseSeat {
|
|
126
|
+
}
|
|
126
127
|
/**
|
|
127
128
|
* Interface representing a row in the venue.
|
|
128
129
|
* @hidden
|
|
@@ -139,13 +140,14 @@ interface IRowDTO {
|
|
|
139
140
|
* Contains the core properties of a sector as received from the backend.
|
|
140
141
|
* @hidden
|
|
141
142
|
*/
|
|
142
|
-
|
|
143
|
+
interface ISectorDTO extends IBaseSector {
|
|
144
|
+
}
|
|
143
145
|
/**
|
|
144
146
|
* Interface representing the SVG background data transfer object from the API.
|
|
145
147
|
* @hidden
|
|
146
148
|
*/
|
|
147
149
|
interface ISVGBackgroundDTO {
|
|
148
|
-
svg
|
|
150
|
+
svg?: Nullable<string>;
|
|
149
151
|
viewBox: {
|
|
150
152
|
x: number;
|
|
151
153
|
y: number;
|
|
@@ -154,6 +156,7 @@ interface ISVGBackgroundDTO {
|
|
|
154
156
|
};
|
|
155
157
|
svgLink?: string;
|
|
156
158
|
images?: IPngBackgroundDTO;
|
|
159
|
+
outlineSvg?: Nullable<string>;
|
|
157
160
|
}
|
|
158
161
|
/**
|
|
159
162
|
* Interface representing the configuration data transfer object from the API.
|
|
@@ -253,6 +256,7 @@ interface IPngBackgroundDTO {
|
|
|
253
256
|
interface IBookingApiClientSettings {
|
|
254
257
|
baseUrl: string;
|
|
255
258
|
publicKey: string;
|
|
259
|
+
debug?: boolean;
|
|
256
260
|
}
|
|
257
261
|
/**
|
|
258
262
|
* Metrics for API requests.
|
|
@@ -305,7 +309,7 @@ declare class BookingApiClient {
|
|
|
305
309
|
* Makes request to booking API
|
|
306
310
|
* @param url Relative API endpoint URL, e.g. 'event/prices/?id=XXX'
|
|
307
311
|
*/
|
|
308
|
-
requestPlain<T extends RequestMetrics>(url: string): Promise<
|
|
312
|
+
requestPlain<T extends RequestMetrics>(url: string): Promise<T>;
|
|
309
313
|
private restoreSeats;
|
|
310
314
|
private restoreIds;
|
|
311
315
|
}
|
|
@@ -314,15 +318,10 @@ interface IPoint {
|
|
|
314
318
|
readonly x: number;
|
|
315
319
|
readonly y: number;
|
|
316
320
|
}
|
|
317
|
-
/**
|
|
318
|
-
* @hidden
|
|
319
|
-
*/
|
|
320
|
-
declare const addPoints: (a: IPoint, b: IPoint) => IPoint;
|
|
321
|
-
/**
|
|
322
|
-
* @hidden
|
|
323
|
-
*/
|
|
324
|
-
declare const subPoints: (a: IPoint, b: IPoint) => IPoint;
|
|
325
321
|
|
|
322
|
+
type ById$1<T> = {
|
|
323
|
+
[id: number]: T;
|
|
324
|
+
};
|
|
326
325
|
interface IPrice {
|
|
327
326
|
id: IPriceId;
|
|
328
327
|
name: string;
|
|
@@ -334,6 +333,27 @@ interface IColoredPrice extends IPrice {
|
|
|
334
333
|
* @hidden
|
|
335
334
|
*/
|
|
336
335
|
type ColorSequenceSettings = string[][];
|
|
336
|
+
/**
|
|
337
|
+
* @hidden
|
|
338
|
+
*/
|
|
339
|
+
declare const sortPrices: <T extends IPrice>(prices: T[]) => T[];
|
|
340
|
+
/**
|
|
341
|
+
* @hidden
|
|
342
|
+
*/
|
|
343
|
+
declare const convertPricesToColored: (prices: IPrice[], colorSettings: ColorSequenceSettings) => IColoredPrice[];
|
|
344
|
+
/**
|
|
345
|
+
* @hidden
|
|
346
|
+
*/
|
|
347
|
+
declare const convertPricesToColoredById: (prices: IPrice[], colorSettings: ColorSequenceSettings) => ById$1<IColoredPrice>;
|
|
348
|
+
|
|
349
|
+
interface IVisibilityStatus {
|
|
350
|
+
selectable: boolean;
|
|
351
|
+
visible: boolean;
|
|
352
|
+
}
|
|
353
|
+
interface IVisibilityStatuses {
|
|
354
|
+
outline: IVisibilityStatus;
|
|
355
|
+
seat: IVisibilityStatus;
|
|
356
|
+
}
|
|
337
357
|
|
|
338
358
|
/**
|
|
339
359
|
* @hidden
|
|
@@ -347,7 +367,12 @@ interface IRendererMachineContext {
|
|
|
347
367
|
targetType: RendererTargetType;
|
|
348
368
|
id: number;
|
|
349
369
|
};
|
|
370
|
+
visibility?: IVisibilityStatuses;
|
|
350
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* @hidden
|
|
374
|
+
*/
|
|
375
|
+
type RendererMachineReducer<T> = (ctx: IRendererMachineContext, src: T) => IRendererMachineContext;
|
|
351
376
|
/**
|
|
352
377
|
* @hidden
|
|
353
378
|
*/
|
|
@@ -371,6 +396,78 @@ declare enum RendererSelectMode {
|
|
|
371
396
|
ADD = "add",
|
|
372
397
|
SUBTRACT = "subtract"
|
|
373
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* Source events
|
|
401
|
+
*/
|
|
402
|
+
/**
|
|
403
|
+
* @hidden
|
|
404
|
+
*/
|
|
405
|
+
declare enum SrcEventType {
|
|
406
|
+
DRAG_START = "srcDragStart",
|
|
407
|
+
DRAG_MOVE = "srcDragMove",
|
|
408
|
+
DRAG_END = "srcDragEnd",
|
|
409
|
+
CLICK = "srcClick",
|
|
410
|
+
MOUSE_MOVE = "srcMouseMove"
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @hidden
|
|
414
|
+
*/
|
|
415
|
+
type SrcEvent = IDragStartSrcEvent | IDragMoveSrcEvent | IDragEndSrcEvent | IClickSrcEvent | IMouseMoveSrcEvent;
|
|
416
|
+
/**
|
|
417
|
+
* @hidden
|
|
418
|
+
*/
|
|
419
|
+
interface IDragSrcEvent<T> {
|
|
420
|
+
type: T;
|
|
421
|
+
origin: {
|
|
422
|
+
x: number;
|
|
423
|
+
y: number;
|
|
424
|
+
};
|
|
425
|
+
delta: {
|
|
426
|
+
x: number;
|
|
427
|
+
y: number;
|
|
428
|
+
};
|
|
429
|
+
shiftKey?: boolean;
|
|
430
|
+
altKey?: boolean;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @hidden
|
|
434
|
+
*/
|
|
435
|
+
interface IDragStartSrcEvent extends IDragSrcEvent<SrcEventType.DRAG_START> {
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* @hidden
|
|
439
|
+
*/
|
|
440
|
+
interface IDragMoveSrcEvent extends IDragSrcEvent<SrcEventType.DRAG_MOVE> {
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* @hidden
|
|
444
|
+
*/
|
|
445
|
+
interface IDragEndSrcEvent extends IDragSrcEvent<SrcEventType.DRAG_END> {
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @hidden
|
|
449
|
+
*/
|
|
450
|
+
interface IClickSrcEvent {
|
|
451
|
+
type: SrcEventType.CLICK;
|
|
452
|
+
target: HTMLElement;
|
|
453
|
+
point: {
|
|
454
|
+
x: number;
|
|
455
|
+
y: number;
|
|
456
|
+
};
|
|
457
|
+
section?: ISection;
|
|
458
|
+
seat?: ISeat;
|
|
459
|
+
shiftKey?: boolean;
|
|
460
|
+
altKey?: boolean;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* @hidden
|
|
464
|
+
*/
|
|
465
|
+
interface IMouseMoveSrcEvent {
|
|
466
|
+
type: SrcEventType.MOUSE_MOVE;
|
|
467
|
+
target: HTMLElement;
|
|
468
|
+
section?: ISection;
|
|
469
|
+
seat?: ISeat;
|
|
470
|
+
}
|
|
374
471
|
/**
|
|
375
472
|
* Output events
|
|
376
473
|
*/
|
|
@@ -531,8 +628,9 @@ declare class Context {
|
|
|
531
628
|
scale: number;
|
|
532
629
|
translate: IPoint;
|
|
533
630
|
isEagleView: boolean;
|
|
631
|
+
visibility: IVisibilityStatuses;
|
|
534
632
|
private _seats;
|
|
535
|
-
seatsIndex: KDBush
|
|
633
|
+
seatsIndex: KDBush;
|
|
536
634
|
seatsById: ById<ISeat>;
|
|
537
635
|
seatsByRowId: {
|
|
538
636
|
[rowId: number]: ISeat[];
|
|
@@ -549,7 +647,7 @@ declare class Context {
|
|
|
549
647
|
private _selectedSeatIds;
|
|
550
648
|
private _selectedGaId?;
|
|
551
649
|
underlay: {
|
|
552
|
-
svgString
|
|
650
|
+
svgString?: Nullable<string>;
|
|
553
651
|
viewBox: {
|
|
554
652
|
x: number;
|
|
555
653
|
y: number;
|
|
@@ -557,6 +655,7 @@ declare class Context {
|
|
|
557
655
|
height: number;
|
|
558
656
|
};
|
|
559
657
|
svgUrl?: string;
|
|
658
|
+
outlineSvg?: Nullable<string>;
|
|
560
659
|
pngBackground?: IPngBackgroundDTO;
|
|
561
660
|
};
|
|
562
661
|
hoveredSeat?: ISeat;
|
|
@@ -619,12 +718,19 @@ declare class Context {
|
|
|
619
718
|
getSeatByOffset: (offset: IPoint) => ISeat | undefined;
|
|
620
719
|
}
|
|
621
720
|
|
|
721
|
+
type Nullable<T> = T | null | undefined;
|
|
722
|
+
type DeepPartial<T> = T extends object ? {
|
|
723
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
724
|
+
} : T;
|
|
622
725
|
/**
|
|
623
726
|
* Type for mapping objects by their ID.
|
|
624
727
|
*/
|
|
625
728
|
type ById<T> = {
|
|
626
729
|
[id: number]: T;
|
|
627
730
|
};
|
|
731
|
+
type ColorById<T> = {
|
|
732
|
+
[id: number | string]: T;
|
|
733
|
+
};
|
|
628
734
|
/**
|
|
629
735
|
* Type representing a price identifier, which can be either a number or a string.
|
|
630
736
|
* Used to uniquely identify price points in the system.
|
|
@@ -655,6 +761,10 @@ interface ISeat extends IBaseSeat {
|
|
|
655
761
|
* Special state information for the seat.
|
|
656
762
|
*/
|
|
657
763
|
special?: ISpecialState;
|
|
764
|
+
/**
|
|
765
|
+
* The state of the seat.
|
|
766
|
+
*/
|
|
767
|
+
state?: SeatInteractionState;
|
|
658
768
|
}
|
|
659
769
|
/**
|
|
660
770
|
* Interface representing a sector in the venue with extended properties.
|
|
@@ -853,7 +963,7 @@ interface ICartGa {
|
|
|
853
963
|
/**
|
|
854
964
|
* The price per GA ticket.
|
|
855
965
|
*/
|
|
856
|
-
price
|
|
966
|
+
price?: number;
|
|
857
967
|
}
|
|
858
968
|
/**
|
|
859
969
|
* Interface representing a removed general admission (GA) item from the cart.
|
|
@@ -908,11 +1018,34 @@ type ISeatPriceScheme = {
|
|
|
908
1018
|
*/
|
|
909
1019
|
priceId: IPriceId;
|
|
910
1020
|
};
|
|
1021
|
+
interface IZoomSettings {
|
|
1022
|
+
presets: number[];
|
|
1023
|
+
maxZoomToFitScale: number;
|
|
1024
|
+
minPinchZoom: number;
|
|
1025
|
+
maxPinchZoom: number;
|
|
1026
|
+
}
|
|
1027
|
+
interface IRange {
|
|
1028
|
+
from?: number;
|
|
1029
|
+
to?: number;
|
|
1030
|
+
}
|
|
1031
|
+
interface IVisibleSetting {
|
|
1032
|
+
visible?: IRange;
|
|
1033
|
+
selectable?: IRange;
|
|
1034
|
+
}
|
|
1035
|
+
interface IVisibilitySettings {
|
|
1036
|
+
seats?: IVisibleSetting;
|
|
1037
|
+
outlines?: IVisibleSetting;
|
|
1038
|
+
}
|
|
911
1039
|
/**
|
|
912
1040
|
* Configuration settings for the renderer.
|
|
913
1041
|
* Defines various options that control the behavior and appearance of the renderer.
|
|
914
1042
|
*/
|
|
915
1043
|
interface IRendererSettings {
|
|
1044
|
+
/**
|
|
1045
|
+
* Debug mode for the renderer.
|
|
1046
|
+
* @hidden
|
|
1047
|
+
*/
|
|
1048
|
+
debug?: boolean;
|
|
916
1049
|
/**
|
|
917
1050
|
* Environment setting that determines which API endpoint to use.
|
|
918
1051
|
* Can be 'local', 'stage', or 'production' (default).
|
|
@@ -948,6 +1081,9 @@ interface IRendererSettings {
|
|
|
948
1081
|
padding?: number;
|
|
949
1082
|
/**
|
|
950
1083
|
* Minimum zoom level required to enable seat selection.
|
|
1084
|
+
*
|
|
1085
|
+
* @deprecated
|
|
1086
|
+
* Use visibilitySettings instead
|
|
951
1087
|
*/
|
|
952
1088
|
seatSelectionMinZoom?: number;
|
|
953
1089
|
/**
|
|
@@ -970,6 +1106,14 @@ interface IRendererSettings {
|
|
|
970
1106
|
* If true, disables zoom when clicking on empty space.
|
|
971
1107
|
*/
|
|
972
1108
|
disableZoomToEmptySpace?: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* If true, disables cart changed when clicking on sections.
|
|
1111
|
+
*/
|
|
1112
|
+
disableCartInteractions?: boolean;
|
|
1113
|
+
/**
|
|
1114
|
+
*
|
|
1115
|
+
*/
|
|
1116
|
+
disableOutlinesInHelicopterView?: boolean;
|
|
973
1117
|
/**
|
|
974
1118
|
* If true, hides all seats from view.
|
|
975
1119
|
*/
|
|
@@ -990,6 +1134,14 @@ interface IRendererSettings {
|
|
|
990
1134
|
* If true, uses WebGL for rendering instead of Canvas.
|
|
991
1135
|
*/
|
|
992
1136
|
switchToWebGL?: boolean;
|
|
1137
|
+
/**
|
|
1138
|
+
* Option to configure zoom settings
|
|
1139
|
+
*/
|
|
1140
|
+
zoomSettings?: IZoomSettings;
|
|
1141
|
+
/**
|
|
1142
|
+
* Option to configure visibility settings
|
|
1143
|
+
*/
|
|
1144
|
+
visibilitySettings?: IVisibilitySettings;
|
|
993
1145
|
/**
|
|
994
1146
|
* Rises when the mouse pointer moves above a seat.
|
|
995
1147
|
*
|
|
@@ -1131,7 +1283,7 @@ interface IRendererSettings {
|
|
|
1131
1283
|
* Represents the possible interaction states of a seat.
|
|
1132
1284
|
* Used to determine how a seat should be rendered based on user interaction.
|
|
1133
1285
|
*/
|
|
1134
|
-
type SeatInteractionState = 'default' | 'hovered' | 'selected';
|
|
1286
|
+
type SeatInteractionState = 'default' | 'hovered' | 'selected' | 'unavailable' | 'loading' | 'error';
|
|
1135
1287
|
/**
|
|
1136
1288
|
* Interface for the event data passed to the onBeforeSeatDraw callback.
|
|
1137
1289
|
* Contains information about the seat being drawn and its current state.
|
|
@@ -1160,8 +1312,10 @@ interface IRendererSeatStyleSettings {
|
|
|
1160
1312
|
filtered?: ISeatStyle;
|
|
1161
1313
|
hovered?: ISeatStyle;
|
|
1162
1314
|
selected?: ISeatStyle;
|
|
1315
|
+
loading?: ISeatStyle;
|
|
1316
|
+
error?: ISeatStyle;
|
|
1163
1317
|
}
|
|
1164
|
-
interface
|
|
1318
|
+
interface IBasicSeatStyle {
|
|
1165
1319
|
size: number;
|
|
1166
1320
|
color: string;
|
|
1167
1321
|
seatName?: {
|
|
@@ -1180,7 +1334,9 @@ interface ISeatStyle {
|
|
|
1180
1334
|
x?: number;
|
|
1181
1335
|
y?: number;
|
|
1182
1336
|
};
|
|
1183
|
-
|
|
1337
|
+
}
|
|
1338
|
+
interface ISeatStyle extends IBasicSeatStyle {
|
|
1339
|
+
accessible?: IBasicSeatStyle;
|
|
1184
1340
|
}
|
|
1185
1341
|
interface IRendererSvgSectionStylesSetting {
|
|
1186
1342
|
default?: Pick<ISvgSectionStyle, 'sectionName' | 'stroke' | 'cursor'>;
|
|
@@ -1197,6 +1353,7 @@ interface ISvgSectionStyle {
|
|
|
1197
1353
|
stroke?: {
|
|
1198
1354
|
color?: string;
|
|
1199
1355
|
opacity?: number;
|
|
1356
|
+
width?: string;
|
|
1200
1357
|
};
|
|
1201
1358
|
cursor?: string;
|
|
1202
1359
|
}
|
|
@@ -1229,23 +1386,56 @@ interface IOutlineRect {
|
|
|
1229
1386
|
declare class OutlineLayer {
|
|
1230
1387
|
svgElement: SVGSVGElement;
|
|
1231
1388
|
private outlineShapes;
|
|
1389
|
+
private outlineRect;
|
|
1232
1390
|
private context;
|
|
1391
|
+
private originalSvg;
|
|
1392
|
+
private backgroundSVG;
|
|
1393
|
+
private hasBackgroundOutline;
|
|
1394
|
+
private underlayBindedPathAttr;
|
|
1395
|
+
private calculatedOutlineRects;
|
|
1233
1396
|
constructor(context: Context);
|
|
1234
1397
|
destroy(): void;
|
|
1235
1398
|
setSectionSelection(id: number | undefined): void;
|
|
1236
1399
|
highlightGa(id: number | undefined): void;
|
|
1237
1400
|
clearSectionHighlight(): void;
|
|
1238
1401
|
highlightSection(id: number | undefined): void;
|
|
1402
|
+
clearSectionFocus(): void;
|
|
1403
|
+
focusSection(id: number | undefined): void;
|
|
1404
|
+
private removeClassNameAll;
|
|
1405
|
+
private addClassName;
|
|
1406
|
+
getSectionRect(id: Nullable<number>): Nullable<DOMRect>;
|
|
1407
|
+
getSectionElement(id: number | undefined): Nullable<Element>;
|
|
1239
1408
|
get width(): number;
|
|
1240
1409
|
get height(): number;
|
|
1241
1410
|
updateSize(): void;
|
|
1242
|
-
checkBackgroundOutlines(): boolean;
|
|
1411
|
+
checkBackgroundOutlines(): boolean | undefined;
|
|
1412
|
+
initializeBackgroundOutline(): void;
|
|
1413
|
+
/**
|
|
1414
|
+
*
|
|
1415
|
+
* refactoring plan:
|
|
1416
|
+
* * decompose this method into smaller ones
|
|
1417
|
+
* - prepare SVG background outlines
|
|
1418
|
+
* - GA outlines
|
|
1419
|
+
* - sections outlines
|
|
1420
|
+
* - prepare shapes outlines
|
|
1421
|
+
* - GA only
|
|
1422
|
+
* - prepare auto-generated outlines
|
|
1423
|
+
* - Reserved seats
|
|
1424
|
+
* - Tables
|
|
1425
|
+
* - append outlines to the main svg element
|
|
1426
|
+
*/
|
|
1243
1427
|
setBackgroundAsOutline(): void;
|
|
1428
|
+
private extractSVGBackgroundOutlines;
|
|
1244
1429
|
cleanSvgInlineStyles(stylesToRemove?: string[]): void;
|
|
1245
1430
|
updateOutlines(): void;
|
|
1431
|
+
private appendAutoAndGaOutlines;
|
|
1432
|
+
private createOrGetOutlineShapes;
|
|
1433
|
+
private appendAutoOutlines;
|
|
1434
|
+
private appendGAOutlines;
|
|
1435
|
+
private getOutlineRects;
|
|
1246
1436
|
createOutlineRect(section: ISector): SVGRectElement;
|
|
1247
1437
|
calcOutlineRect(section: ISector): IOutlineRect;
|
|
1248
|
-
handleChangeEagleView(): void;
|
|
1438
|
+
handleChangeEagleView(isEagleView?: boolean): void;
|
|
1249
1439
|
createGaInfo: (gaGroups: SVGGElement[]) => IGaInfo[];
|
|
1250
1440
|
disableSvgSectionById: (id: number) => void;
|
|
1251
1441
|
enableSvgSectionById: (id: number) => void;
|
|
@@ -1255,6 +1445,7 @@ declare class OutlineLayer {
|
|
|
1255
1445
|
updateAnimationStep(scale: number, translate: IPoint): void;
|
|
1256
1446
|
hide(): void;
|
|
1257
1447
|
show(): void;
|
|
1448
|
+
private getContextSvg;
|
|
1258
1449
|
}
|
|
1259
1450
|
|
|
1260
1451
|
/**
|
|
@@ -1430,19 +1621,29 @@ interface IRenderer {
|
|
|
1430
1621
|
*/
|
|
1431
1622
|
getSvgSectionBySelection: () => ISectorDTO[];
|
|
1432
1623
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1624
|
+
/**
|
|
1625
|
+
* @hidden
|
|
1626
|
+
*/
|
|
1627
|
+
interface IRendererAnimation {
|
|
1628
|
+
startTime?: number;
|
|
1629
|
+
duration: number;
|
|
1630
|
+
fromScale: number;
|
|
1631
|
+
toScale: number;
|
|
1632
|
+
fromTranslate?: IPoint;
|
|
1633
|
+
translate?: IPoint;
|
|
1634
|
+
toTranslate: IPoint;
|
|
1635
|
+
relativeTranslate?: IPoint;
|
|
1636
|
+
frame: number;
|
|
1637
|
+
inProgress: boolean;
|
|
1438
1638
|
}
|
|
1639
|
+
|
|
1439
1640
|
/**
|
|
1440
1641
|
* Base Renderer class that implements the IRenderer interface.
|
|
1441
1642
|
* Provides core functionality for rendering and interacting with a venue map.
|
|
1442
1643
|
*/
|
|
1443
1644
|
declare class Renderer implements IRenderer {
|
|
1444
|
-
protected zoomSettings: IZoomSettings;
|
|
1445
1645
|
private hammer;
|
|
1646
|
+
private visibilityManager;
|
|
1446
1647
|
private height;
|
|
1447
1648
|
private width;
|
|
1448
1649
|
private padding;
|
|
@@ -1450,16 +1651,16 @@ declare class Renderer implements IRenderer {
|
|
|
1450
1651
|
private stageLayer;
|
|
1451
1652
|
private selectionLayer;
|
|
1452
1653
|
protected outlineLayer: OutlineLayer;
|
|
1654
|
+
private service;
|
|
1453
1655
|
private zoomToFitScale;
|
|
1454
1656
|
private isTouchMode;
|
|
1455
1657
|
private pinchStartPoint?;
|
|
1456
1658
|
private animation?;
|
|
1457
1659
|
private resizeTimer;
|
|
1458
|
-
private service;
|
|
1459
1660
|
protected isRunning: boolean;
|
|
1460
1661
|
private disableZoomToEmptySpace;
|
|
1461
|
-
private backgroundLoadStepTime;
|
|
1462
1662
|
private switchToWebGL;
|
|
1663
|
+
private originalSectionPrices;
|
|
1463
1664
|
/**
|
|
1464
1665
|
* Creates a new instance of the Renderer.
|
|
1465
1666
|
*
|
|
@@ -1641,7 +1842,7 @@ declare class Renderer implements IRenderer {
|
|
|
1641
1842
|
*
|
|
1642
1843
|
* ```js
|
|
1643
1844
|
* renderer.addGaToCart({
|
|
1644
|
-
*
|
|
1845
|
+
* sectorId: 100500,
|
|
1645
1846
|
* key: 'Table 2',
|
|
1646
1847
|
* price: 200,
|
|
1647
1848
|
* // quantity of GA tickets
|
|
@@ -1788,12 +1989,14 @@ declare class Renderer implements IRenderer {
|
|
|
1788
1989
|
*/
|
|
1789
1990
|
getSeatSelection(): IExtendedSeat[];
|
|
1790
1991
|
setSectionSelection(sections?: number[] | string[]): void;
|
|
1791
|
-
getSvgSectionBySelection():
|
|
1992
|
+
getSvgSectionBySelection(): ISectorDTO[];
|
|
1792
1993
|
disableSvgSectionsByIds(ids: number[], options?: {
|
|
1793
1994
|
resetAll?: boolean;
|
|
1794
1995
|
}): void;
|
|
1795
1996
|
enableSvgSectionsByIds(ids: number[]): void;
|
|
1796
1997
|
private updateBackgroundImage;
|
|
1998
|
+
disableSectionsByIds(ids: number[]): void;
|
|
1999
|
+
enableSectionsByIds(): void;
|
|
1797
2000
|
filterSvgSectionsByIds(ids: number[], options?: {
|
|
1798
2001
|
resetAll?: boolean;
|
|
1799
2002
|
}): void;
|
|
@@ -1861,6 +2064,11 @@ declare class Renderer implements IRenderer {
|
|
|
1861
2064
|
highlightSector(id: number | undefined): void;
|
|
1862
2065
|
private startPanAnimation;
|
|
1863
2066
|
private animationPanStep;
|
|
2067
|
+
zoomToSection(section: string | number, options?: {
|
|
2068
|
+
focus?: boolean;
|
|
2069
|
+
}): void;
|
|
2070
|
+
zoomToDestination(newScale: number, destination: IPoint, duration?: number): void;
|
|
2071
|
+
private getSectionId;
|
|
1864
2072
|
private startAnimation;
|
|
1865
2073
|
private animationStep;
|
|
1866
2074
|
private cachedDraw;
|
|
@@ -1892,6 +2100,7 @@ declare class Renderer implements IRenderer {
|
|
|
1892
2100
|
*/
|
|
1893
2101
|
getMaxZoom(): number;
|
|
1894
2102
|
viewSection(section: ISection): void;
|
|
2103
|
+
private getStageLayer;
|
|
1895
2104
|
}
|
|
1896
2105
|
|
|
1897
2106
|
interface IAdminRendererSettings extends IRendererSettings {
|
|
@@ -1909,19 +2118,6 @@ interface IAdminRendererSettings extends IRendererSettings {
|
|
|
1909
2118
|
*/
|
|
1910
2119
|
env?: string;
|
|
1911
2120
|
}
|
|
1912
|
-
/**
|
|
1913
|
-
* Interface for the Admin Renderer functionality.
|
|
1914
|
-
* Extends the base renderer interface with admin-specific methods.
|
|
1915
|
-
*/
|
|
1916
|
-
interface IAdminRenderer extends IRenderer {
|
|
1917
|
-
/**
|
|
1918
|
-
* Loads an event by its ID.
|
|
1919
|
-
*
|
|
1920
|
-
* @param eventId - The ID of the event to load
|
|
1921
|
-
* @returns A promise that resolves when the event is loaded
|
|
1922
|
-
*/
|
|
1923
|
-
loadEvent: (eventId: string) => Promise<void>;
|
|
1924
|
-
}
|
|
1925
2121
|
/**
|
|
1926
2122
|
* Admin Renderer class for seatmap administration.
|
|
1927
2123
|
* Extends the base Renderer with admin-specific functionality.
|
|
@@ -2048,7 +2244,7 @@ interface IBookingRendererSettings extends IRendererSettings {
|
|
|
2048
2244
|
* Environment setting that determines which API endpoint to use.
|
|
2049
2245
|
* Can be 'local', 'stage', or 'production' (default).
|
|
2050
2246
|
*/
|
|
2051
|
-
env?:
|
|
2247
|
+
env?: 'local' | 'stage' | 'production';
|
|
2052
2248
|
/**
|
|
2053
2249
|
* If set to `true`, zoom is disabled when clicking into empty space.
|
|
2054
2250
|
*
|
|
@@ -2067,49 +2263,13 @@ interface IBookingRendererSettings extends IRendererSettings {
|
|
|
2067
2263
|
* @defaultValue `0`
|
|
2068
2264
|
*/
|
|
2069
2265
|
backgroundLoadStepTime?: number;
|
|
2070
|
-
}
|
|
2071
|
-
/**
|
|
2072
|
-
* Interface for the Booking Renderer functionality.
|
|
2073
|
-
* Extends the base renderer interface with booking-specific methods.
|
|
2074
|
-
*
|
|
2075
|
-
* @hidden
|
|
2076
|
-
*/
|
|
2077
|
-
interface IBookingRenderer extends IRenderer {
|
|
2078
2266
|
/**
|
|
2079
|
-
*
|
|
2267
|
+
* If set to true, renderer will be in debug mode.
|
|
2080
2268
|
*
|
|
2081
|
-
* @
|
|
2082
|
-
* @
|
|
2083
|
-
*/
|
|
2084
|
-
loadEvent: (eventId: string) => Promise<void>;
|
|
2085
|
-
}
|
|
2086
|
-
/**
|
|
2087
|
-
* Interface defining the view box properties for the booking renderer.
|
|
2088
|
-
* Contains information about the current viewport dimensions and transformations.
|
|
2089
|
-
*
|
|
2090
|
-
* @hidden
|
|
2091
|
-
*/
|
|
2092
|
-
interface IViewBox {
|
|
2093
|
-
/**
|
|
2094
|
-
* The width of the view box in pixels.
|
|
2095
|
-
*/
|
|
2096
|
-
readonly width: number;
|
|
2097
|
-
/**
|
|
2098
|
-
* The height of the view box in pixels.
|
|
2099
|
-
*/
|
|
2100
|
-
readonly height: number;
|
|
2101
|
-
/**
|
|
2102
|
-
* The current scale factor of the view.
|
|
2103
|
-
*/
|
|
2104
|
-
readonly scale: number;
|
|
2105
|
-
/**
|
|
2106
|
-
* The X translation of the view in pixels.
|
|
2107
|
-
*/
|
|
2108
|
-
readonly translateX: number;
|
|
2109
|
-
/**
|
|
2110
|
-
* The Y translation of the view in pixels.
|
|
2269
|
+
* @defaultValue `false`
|
|
2270
|
+
* @hidden
|
|
2111
2271
|
*/
|
|
2112
|
-
|
|
2272
|
+
debug?: boolean;
|
|
2113
2273
|
}
|
|
2114
2274
|
/**
|
|
2115
2275
|
* Booking Renderer class for seatmap booking.
|
|
@@ -2193,6 +2353,7 @@ declare class SeatmapBookingRenderer extends Renderer {
|
|
|
2193
2353
|
private leaveSectionOnly;
|
|
2194
2354
|
}
|
|
2195
2355
|
|
|
2196
|
-
declare const
|
|
2356
|
+
declare const defaultZoomSettings: IZoomSettings;
|
|
2357
|
+
declare const mergeSettings: (defaults: IRendererSettings, settings?: Partial<IRendererSettings>) => IRendererSettings & Partial<IRendererSettings>;
|
|
2197
2358
|
|
|
2198
|
-
export { BookingApiClient, type ById, type ColorSequenceSettings, type
|
|
2359
|
+
export { BookingApiClient, type ById, type ColorById, type ColorSequenceSettings, type DeepPartial, type DestEvent, DestEventType, type IAdminRendererSettings, type IBaseSeat, type IBaseSector, type IBasicSeatStyle, type IBeforeSeatDrawEvent, type IBookingRendererSettings, type ICart, type ICartGa, type ICartSeat, type IClickSrcEvent, type IColoredPrice, type IConfigurationDTO, type IDeselectDestEvent, type IDragEndSrcEvent, type IDragMoveSrcEvent, type IDragStartSrcEvent, type IExtendedSeat, type IMouseMoveSrcEvent, type IPanDestEvent, type IPanZoomDestEvent, type IPlainSeatsDTO, type IPngBackgroundDTO, type IPoint, type IPrice, type IPriceDTO, type IPriceId, type IPriceListDTO, type IRectSelectDestEvent, type IRemovedCartGa, type IRenderer, type IRendererAnimation, type IRendererMachineContext, type IRendererSeatStyleSettings, type IRendererSettings, type IRendererSvgSectionStylesSetting, type IRendererTheme, type IRowDTO, type ISVGBackgroundDTO, type ISchemaDTO, type ISeat, type ISeatCartSwitchDestEvent, type ISeatDTO, type ISeatMouseEnterDestEvent, type ISeatMouseLeaveDestEvent, type ISeatPriceScheme, type ISeatSelectDestEvent, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type ISpecialPrice, type ISpecialState, type ISvgSectionStyle, type IVenueDTO, type IVisibilitySettings, type IZoomSettings, type Nullable, Renderer, type RendererMachine, type RendererMachineReducer, type RendererMachineService, RendererSelectMode, RendererTargetType, type SeatFilter, type SeatInteractionState, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, type TransformArray, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, mergeSettings, sortPrices };
|