@alisaitteke/seatmap-canvas 2.7.0 → 2.7.5
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/README.md +120 -96
- package/dist/cjs/seatmap.canvas.js +2 -2
- package/dist/cjs/seatmap.canvas.js.map +1 -1
- package/dist/dependencies.txt +1 -223
- package/dist/esm/seatmap.canvas.js +2 -2
- package/dist/esm/seatmap.canvas.js.map +1 -1
- package/dist/seatmap.canvas.css +155 -0
- package/dist/types.d.ts +700 -9
- package/package.json +48 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,703 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
declare class SeatStyle {
|
|
2
|
+
shape: 'auto' | 'circle' | 'rect' | 'path' | 'svg';
|
|
3
|
+
radius: number;
|
|
4
|
+
size: number | null;
|
|
5
|
+
corner_radius: number;
|
|
6
|
+
path: string | null;
|
|
7
|
+
path_box: string;
|
|
8
|
+
color: string;
|
|
9
|
+
not_salable: string;
|
|
10
|
+
selected: string;
|
|
11
|
+
hover: string;
|
|
12
|
+
focus: string;
|
|
13
|
+
focus_out: string;
|
|
14
|
+
check_color: string;
|
|
15
|
+
check_icon: string;
|
|
16
|
+
check_icon_color: string;
|
|
17
|
+
svg: string | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class BLockStyle {
|
|
21
|
+
fill: string;
|
|
22
|
+
stroke: string;
|
|
23
|
+
border_width: number;
|
|
24
|
+
title_color: string;
|
|
25
|
+
title_font_size: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class LegendStyle {
|
|
29
|
+
radius: number;
|
|
30
|
+
padding: number;
|
|
31
|
+
font_size: number;
|
|
32
|
+
font_color: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class LabelStyle {
|
|
36
|
+
color: string;
|
|
37
|
+
bg: string;
|
|
38
|
+
font_size: number;
|
|
39
|
+
radius: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class TooltipStyle {
|
|
43
|
+
border_width: number;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
color: string;
|
|
47
|
+
bg: string;
|
|
48
|
+
border_color: string;
|
|
49
|
+
border_radius: number;
|
|
50
|
+
padding: number;
|
|
51
|
+
font_size: string;
|
|
52
|
+
font_weight: string;
|
|
53
|
+
line_height: number;
|
|
54
|
+
shadow: string;
|
|
55
|
+
text_align: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare enum ParserEnum {
|
|
59
|
+
SEATMAP = "seatmap",
|
|
60
|
+
PRETIX = "pretix"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class StyleConfig {
|
|
64
|
+
seat: SeatStyle;
|
|
65
|
+
block: BLockStyle;
|
|
66
|
+
legend: LegendStyle;
|
|
67
|
+
label: LabelStyle;
|
|
68
|
+
tooltip: TooltipStyle;
|
|
69
|
+
}
|
|
70
|
+
declare class DefaultsModel {
|
|
71
|
+
min_zoom: number;
|
|
72
|
+
max_zoom: number;
|
|
73
|
+
animation_speed: number;
|
|
74
|
+
resizable: boolean;
|
|
75
|
+
container: any;
|
|
76
|
+
zoom_focus_circle_radius: number;
|
|
77
|
+
click_enable_sold_seats: boolean;
|
|
78
|
+
zoom_out_button: string;
|
|
79
|
+
legend: boolean;
|
|
80
|
+
canvas_stageout_control: boolean;
|
|
81
|
+
background_image: string | null;
|
|
82
|
+
background_opacity: number;
|
|
83
|
+
background_fit: 'cover' | 'contain' | 'fill' | 'none';
|
|
84
|
+
background_x: number | null;
|
|
85
|
+
background_y: number | null;
|
|
86
|
+
background_width: number | null;
|
|
87
|
+
background_height: number | null;
|
|
88
|
+
style: StyleConfig;
|
|
89
|
+
json_model: ParserEnum;
|
|
90
|
+
lang: {
|
|
91
|
+
selectable: string;
|
|
92
|
+
non_selectable: string;
|
|
93
|
+
your_selection: string;
|
|
94
|
+
};
|
|
95
|
+
constructor(config: any);
|
|
96
|
+
getAll(): this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class ModelBase {
|
|
100
|
+
child_index: number | null;
|
|
101
|
+
item_type: string | null;
|
|
102
|
+
constructor();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare class Seats extends SvgBase {
|
|
106
|
+
parent: Block;
|
|
107
|
+
item: BlockModel;
|
|
108
|
+
constructor(parent: Block, item: BlockModel);
|
|
109
|
+
update(): Promise<this>;
|
|
110
|
+
getSeat(id: any): SeatItem;
|
|
111
|
+
getSeats(): Array<SeatItem>;
|
|
112
|
+
getSeatsCount(): number;
|
|
113
|
+
getSeatByIndex(index: number): SeatItem;
|
|
114
|
+
resetSeatsColors(animation?: boolean): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class SeatItemCircle extends SvgBase {
|
|
118
|
+
parent: SeatItem;
|
|
119
|
+
constructor(parent: SeatItem);
|
|
120
|
+
update(): this;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare class SeatItemRect extends SvgBase {
|
|
124
|
+
parent: SeatItem;
|
|
125
|
+
private rectElement;
|
|
126
|
+
private hitArea;
|
|
127
|
+
constructor(parent: SeatItem);
|
|
128
|
+
domGenerate(to: any, index?: number): this;
|
|
129
|
+
private getSize;
|
|
130
|
+
update(): this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare class SeatItemPath extends SvgBase {
|
|
134
|
+
parent: SeatItem;
|
|
135
|
+
private pathElement;
|
|
136
|
+
private hitArea;
|
|
137
|
+
constructor(parent: SeatItem);
|
|
138
|
+
domGenerate(to: any, index?: number): this;
|
|
139
|
+
private getSize;
|
|
140
|
+
private parseViewBox;
|
|
141
|
+
private getScale;
|
|
142
|
+
update(): this;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare class CoordinateModel {
|
|
146
|
+
private x;
|
|
147
|
+
private y;
|
|
148
|
+
constructor(item?: any);
|
|
149
|
+
toArray(): number[];
|
|
150
|
+
toJson(): {};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare class SeatItemTitle extends SvgBase {
|
|
154
|
+
parent: SeatItem;
|
|
155
|
+
constructor(parent: SeatItem);
|
|
156
|
+
update(): this;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
declare enum ZoomLevel {
|
|
160
|
+
VENUE = "VENUE",
|
|
161
|
+
BLOCK = "BLOCK",
|
|
162
|
+
SEAT = "SEAT"
|
|
163
|
+
}
|
|
164
|
+
declare enum SeatAction {
|
|
165
|
+
HOVER = "hover",
|
|
166
|
+
FOCUS = "focus",
|
|
167
|
+
LEAVE = "leave",
|
|
168
|
+
SELECT = "select",
|
|
169
|
+
NORMAL = "normal"
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class SeatItemCheck extends SvgBase {
|
|
173
|
+
parent: SeatItem;
|
|
174
|
+
constructor(parent: SeatItem);
|
|
175
|
+
update(): this;
|
|
176
|
+
afterGenerate(): void;
|
|
177
|
+
show(): this;
|
|
178
|
+
hide(): this;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare class SeatItemCustomSvg extends SvgBase {
|
|
182
|
+
parent: SeatItem;
|
|
183
|
+
customSvg: any;
|
|
184
|
+
constructor(parent: SeatItem, customSvg: any);
|
|
185
|
+
update(): this;
|
|
186
|
+
domGenerate(to: any, index?: number): this;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare class SeatItemCustomSvgCheck extends SvgBase {
|
|
190
|
+
parent: SeatItem;
|
|
191
|
+
constructor(parent: SeatItem);
|
|
192
|
+
update(): this;
|
|
193
|
+
afterGenerate(): void;
|
|
194
|
+
show(): this;
|
|
195
|
+
hide(): this;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
declare class SeatItem extends SvgBase {
|
|
199
|
+
parent: Seats;
|
|
200
|
+
item: SeatModel;
|
|
201
|
+
circle: SeatItemCircle | SeatItemRect | SeatItemPath | SeatItemCustomSvg;
|
|
202
|
+
seatCustomSvg: SeatItemCustomSvg | null;
|
|
203
|
+
title: SeatItemTitle;
|
|
204
|
+
coordinates: CoordinateModel;
|
|
205
|
+
check: SeatItemCheck | SeatItemCustomSvgCheck;
|
|
206
|
+
constructor(parent: Seats, item: SeatModel, seatCustomSvg: any);
|
|
207
|
+
setColor(color: string, animation?: boolean): this;
|
|
208
|
+
updateColor(color?: string | null): this;
|
|
209
|
+
select(color?: string | null): this;
|
|
210
|
+
unSelect(): this;
|
|
211
|
+
isSelected(): Boolean;
|
|
212
|
+
isSalable(): Boolean;
|
|
213
|
+
hover(): void;
|
|
214
|
+
blur(): void;
|
|
215
|
+
getColor(action?: SeatAction | null): string;
|
|
216
|
+
update(): this;
|
|
217
|
+
private getShapeType;
|
|
218
|
+
afterGenerate(): void;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare class SeatModel extends ModelBase {
|
|
222
|
+
id: any;
|
|
223
|
+
x: number;
|
|
224
|
+
y: number;
|
|
225
|
+
title?: string;
|
|
226
|
+
selected: boolean;
|
|
227
|
+
color: string;
|
|
228
|
+
block: BlockModel;
|
|
229
|
+
salable: boolean;
|
|
230
|
+
note?: string;
|
|
231
|
+
tags: Array<string>;
|
|
232
|
+
tag_index: any;
|
|
233
|
+
custom_data?: any;
|
|
234
|
+
svg: SeatItem | null;
|
|
235
|
+
icon?: string | null;
|
|
236
|
+
constructor(item: any);
|
|
237
|
+
selectedToggle(): boolean;
|
|
238
|
+
addTag(tag: string): void;
|
|
239
|
+
removeTags(tag: string): void;
|
|
240
|
+
toJson(): {
|
|
241
|
+
id: any;
|
|
242
|
+
x: number;
|
|
243
|
+
y: number;
|
|
244
|
+
salable: boolean;
|
|
245
|
+
note: string | undefined;
|
|
246
|
+
color: string;
|
|
247
|
+
block: {
|
|
248
|
+
id: string;
|
|
249
|
+
title: String;
|
|
250
|
+
x: number;
|
|
251
|
+
y: number;
|
|
252
|
+
color: string;
|
|
253
|
+
width: number;
|
|
254
|
+
height: number;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
declare class LabelModel extends ModelBase {
|
|
260
|
+
x: number;
|
|
261
|
+
y: number;
|
|
262
|
+
title: string;
|
|
263
|
+
block: BlockModel;
|
|
264
|
+
constructor(item: any);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare class BlockModel extends ModelBase {
|
|
268
|
+
id: string;
|
|
269
|
+
seats: Array<SeatModel>;
|
|
270
|
+
labels: Array<LabelModel>;
|
|
271
|
+
title: String;
|
|
272
|
+
bounds: any;
|
|
273
|
+
width: number;
|
|
274
|
+
height: number;
|
|
275
|
+
x: number;
|
|
276
|
+
y: number;
|
|
277
|
+
color: string;
|
|
278
|
+
border_color: string;
|
|
279
|
+
bbox: any;
|
|
280
|
+
zoom_bbox: any;
|
|
281
|
+
rotate: number;
|
|
282
|
+
gap: number;
|
|
283
|
+
background_image?: string | null;
|
|
284
|
+
background_opacity?: number;
|
|
285
|
+
background_fit?: 'cover' | 'contain' | 'fill' | 'none';
|
|
286
|
+
background_x?: number | null;
|
|
287
|
+
background_y?: number | null;
|
|
288
|
+
background_width?: number | null;
|
|
289
|
+
background_height?: number | null;
|
|
290
|
+
constructor(item: any);
|
|
291
|
+
toJson(): {
|
|
292
|
+
id: string;
|
|
293
|
+
title: String;
|
|
294
|
+
x: number;
|
|
295
|
+
y: number;
|
|
296
|
+
color: string;
|
|
297
|
+
width: number;
|
|
298
|
+
height: number;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface PretixModel {
|
|
303
|
+
name: string;
|
|
304
|
+
categories: PretixCategory[];
|
|
305
|
+
zones: PretixZone[];
|
|
306
|
+
size: PretixSize;
|
|
307
|
+
}
|
|
308
|
+
interface PretixCategory {
|
|
309
|
+
name: string;
|
|
310
|
+
color: string;
|
|
311
|
+
}
|
|
312
|
+
interface PretixZone {
|
|
313
|
+
name: string;
|
|
314
|
+
position: PretixPosition;
|
|
315
|
+
rows: PretixRow[];
|
|
316
|
+
areas: PretixArea[];
|
|
317
|
+
uuid: string;
|
|
318
|
+
zone_id: string;
|
|
319
|
+
}
|
|
320
|
+
interface PretixPosition {
|
|
321
|
+
x: number;
|
|
322
|
+
y: number;
|
|
323
|
+
}
|
|
324
|
+
interface PretixRow {
|
|
325
|
+
position: PretixPosition2;
|
|
326
|
+
row_number: string;
|
|
327
|
+
row_number_position: string;
|
|
328
|
+
seats: PretixSeat[];
|
|
329
|
+
uuid: string;
|
|
330
|
+
}
|
|
331
|
+
interface PretixPosition2 {
|
|
332
|
+
x: number;
|
|
333
|
+
y: number;
|
|
334
|
+
}
|
|
335
|
+
interface PretixSeat {
|
|
336
|
+
seat_number: string;
|
|
337
|
+
seat_guid: string;
|
|
338
|
+
uuid: string;
|
|
339
|
+
position: PretixPosition3;
|
|
340
|
+
category: string;
|
|
341
|
+
}
|
|
342
|
+
interface PretixPosition3 {
|
|
343
|
+
x: number;
|
|
344
|
+
y: number;
|
|
345
|
+
}
|
|
346
|
+
interface PretixArea {
|
|
347
|
+
shape: string;
|
|
348
|
+
color: string;
|
|
349
|
+
border_color: string;
|
|
350
|
+
rotation: number;
|
|
351
|
+
uuid: string;
|
|
352
|
+
position: PretixPosition4;
|
|
353
|
+
text: PretixText;
|
|
354
|
+
rectangle: PretixRectangle;
|
|
355
|
+
}
|
|
356
|
+
interface PretixPosition4 {
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
}
|
|
360
|
+
interface PretixText {
|
|
361
|
+
position: PretixPosition5;
|
|
362
|
+
color: string;
|
|
363
|
+
text: string;
|
|
364
|
+
}
|
|
365
|
+
interface PretixPosition5 {
|
|
366
|
+
x: number;
|
|
367
|
+
y: number;
|
|
368
|
+
}
|
|
369
|
+
interface PretixRectangle {
|
|
370
|
+
width: number;
|
|
371
|
+
height: number;
|
|
372
|
+
}
|
|
373
|
+
interface PretixSize {
|
|
374
|
+
width: number;
|
|
375
|
+
height: number;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
interface BlockQuery {
|
|
379
|
+
id?: number | string;
|
|
380
|
+
}
|
|
381
|
+
declare class DataModel {
|
|
382
|
+
private _self;
|
|
383
|
+
blocks: Array<BlockModel>;
|
|
384
|
+
private eventManager;
|
|
385
|
+
addEventListener: any;
|
|
386
|
+
constructor(_self: SeatMapCanvas);
|
|
387
|
+
addBlock(block_data: any): this;
|
|
388
|
+
addBulkBlock(block_data: BlockModel[] | PretixModel): this;
|
|
389
|
+
replaceData(block_data: BlockModel[] | PretixModel): this;
|
|
390
|
+
getBlock(id: string | number): BlockModel | null;
|
|
391
|
+
getBlocks(blockId?: string): Array<BlockModel>;
|
|
392
|
+
removeBlock(id: string | number): this;
|
|
393
|
+
getSeat(seatId: string | number, blockId: string | number): SeatModel | null;
|
|
394
|
+
getSelectedSeats(blockId?: string): Array<SeatModel>;
|
|
395
|
+
filterBlock(query: BlockQuery): Array<BlockModel>;
|
|
396
|
+
toJson(): {
|
|
397
|
+
blocks: BlockModel[];
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare class ZoomManager {
|
|
402
|
+
private _self;
|
|
403
|
+
zoomTypes: any;
|
|
404
|
+
scale: any;
|
|
405
|
+
private zoomLevels;
|
|
406
|
+
activeBlocks: Array<any>;
|
|
407
|
+
minZoom: number | null;
|
|
408
|
+
zoomLevel: ZoomLevel;
|
|
409
|
+
private lastPointer;
|
|
410
|
+
constructor(_self: SeatMapCanvas);
|
|
411
|
+
init(): void;
|
|
412
|
+
zoomInit(): void;
|
|
413
|
+
zoomEnd(_self: this): any;
|
|
414
|
+
animatedZoomEnd(_self: this): any;
|
|
415
|
+
animatedFastZoomEnd(_self: this): any;
|
|
416
|
+
zoomHand(_self: this): any;
|
|
417
|
+
zoomHandAnimated(_self: this): any;
|
|
418
|
+
zoomHandFastAnimated(_self: this): any;
|
|
419
|
+
calculateZoomLevel(k: number): void;
|
|
420
|
+
canvasScopeHandler(): void;
|
|
421
|
+
calculateZoomLevels(blocks?: Array<BlockModel>): this;
|
|
422
|
+
calculateActiveBlocks(blocks?: Array<BlockModel>): Array<BlockModel>;
|
|
423
|
+
zoomToSelection(animation?: boolean): void;
|
|
424
|
+
zoomToBlock(id: string | number, animation?: boolean, fastAnimated?: boolean): void;
|
|
425
|
+
zoomToVenue(animation?: boolean, fastAnimated?: boolean): void;
|
|
426
|
+
zoomEnable(): this;
|
|
427
|
+
zoomDisable(): this;
|
|
428
|
+
getZoomLevelValues(level: ZoomLevel): any;
|
|
429
|
+
getActiveZoom(): any;
|
|
430
|
+
private dispatchZoomEvent;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
interface EventObject {
|
|
434
|
+
type: string;
|
|
435
|
+
fn: any;
|
|
436
|
+
}
|
|
437
|
+
declare class EventManager {
|
|
438
|
+
private _self;
|
|
439
|
+
events: Array<EventObject>;
|
|
440
|
+
constructor(_self: SeatMapCanvas);
|
|
441
|
+
addEventListener(type: string | any, fn: any): this;
|
|
442
|
+
dispatch(type: string, data: any): this;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare class WindowManager {
|
|
446
|
+
parent: SeatMapCanvas;
|
|
447
|
+
width: number | null;
|
|
448
|
+
height: number | null;
|
|
449
|
+
stage: any;
|
|
450
|
+
constructor(parent: SeatMapCanvas);
|
|
451
|
+
resizeHandler(): this;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
interface GlobalModel {
|
|
455
|
+
config: DefaultsModel;
|
|
456
|
+
eventManager: EventManager;
|
|
457
|
+
windowManager: WindowManager;
|
|
458
|
+
data: DataModel;
|
|
459
|
+
root: SeatMapCanvas;
|
|
460
|
+
zoomManager: ZoomManager;
|
|
461
|
+
svg: Svg;
|
|
462
|
+
multi_select: boolean;
|
|
463
|
+
best_available: boolean;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
declare class SvgBase {
|
|
467
|
+
parent: any;
|
|
468
|
+
node: any | null;
|
|
469
|
+
domClass: string | null;
|
|
470
|
+
domTag: string | null;
|
|
471
|
+
eventCode: string | null;
|
|
472
|
+
autoGenerate: boolean;
|
|
473
|
+
tags: Array<string>;
|
|
474
|
+
child_items: Array<any> | any;
|
|
475
|
+
dom_attrs: Array<any>;
|
|
476
|
+
dom_classes: Array<any>;
|
|
477
|
+
child_index: number | null;
|
|
478
|
+
domText: string | null;
|
|
479
|
+
global: GlobalModel;
|
|
480
|
+
constructor(parent: any);
|
|
481
|
+
generateThisDom(): this;
|
|
482
|
+
domGenerate(to: any, index?: number): this;
|
|
483
|
+
attr(name: string, value: string | number): this;
|
|
484
|
+
text(value: string): this;
|
|
485
|
+
addChild(item: any, attrs?: any, replace?: boolean): Promise<this>;
|
|
486
|
+
classed(className: string, value?: boolean): this;
|
|
487
|
+
clear(): this;
|
|
488
|
+
updateChilds(): Promise<this>;
|
|
489
|
+
updateEvents(recursive?: boolean): this;
|
|
490
|
+
addEventListener(eventType: string, cb: any): this;
|
|
491
|
+
addTag(tag: string): this;
|
|
492
|
+
hasTag(tag: string): boolean;
|
|
493
|
+
getChilds(type?: string | null): Array<any>;
|
|
494
|
+
getChildCount(): number;
|
|
495
|
+
beforeGenerate(): void;
|
|
496
|
+
afterGenerate(): void;
|
|
497
|
+
addToParent(): this;
|
|
498
|
+
addTo(container: any): this;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
declare class BlockTitle extends SvgBase {
|
|
502
|
+
parent: BlockInfo;
|
|
503
|
+
constructor(parent: BlockInfo);
|
|
504
|
+
update(): this;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
declare class BlockInfo extends SvgBase {
|
|
508
|
+
parent: Block;
|
|
509
|
+
item: BlockModel;
|
|
510
|
+
title: BlockTitle;
|
|
511
|
+
constructor(parent: Block, item: BlockModel);
|
|
512
|
+
update(): this;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
declare class BlockMask extends SvgBase {
|
|
516
|
+
parent: Block;
|
|
517
|
+
item: BlockModel;
|
|
518
|
+
blockLevelMask: BoundItem;
|
|
519
|
+
seatLevelMask: BoundItem;
|
|
520
|
+
constructor(parent: Block, item: BlockModel);
|
|
521
|
+
update(): this;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare class BoundItem extends SvgBase {
|
|
525
|
+
parent: BlockBounds | BlockMask;
|
|
526
|
+
item: BlockModel;
|
|
527
|
+
constructor(parent: BlockBounds | BlockMask, item: BlockModel);
|
|
528
|
+
show(): void;
|
|
529
|
+
hide(): void;
|
|
530
|
+
update(): this;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare class BlockBounds extends SvgBase {
|
|
534
|
+
parent: Block;
|
|
535
|
+
item: BlockModel;
|
|
536
|
+
bound1: BoundItem;
|
|
537
|
+
bound2: BoundItem;
|
|
538
|
+
constructor(parent: Block, item: BlockModel);
|
|
539
|
+
update(): this;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
declare class LabelItemCircle extends SvgBase {
|
|
543
|
+
parent: LabelItem;
|
|
544
|
+
constructor(parent: LabelItem);
|
|
545
|
+
update(): this;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare class LabelItem extends SvgBase {
|
|
549
|
+
parent: Labels;
|
|
550
|
+
item: LabelModel;
|
|
551
|
+
circle: LabelItemCircle;
|
|
552
|
+
coordinates: CoordinateModel;
|
|
553
|
+
constructor(parent: Labels, item: LabelModel);
|
|
554
|
+
update(): this;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
declare class Labels extends SvgBase {
|
|
558
|
+
parent: Block;
|
|
559
|
+
item: BlockModel;
|
|
560
|
+
constructor(parent: Block, item: BlockModel);
|
|
561
|
+
update(): this;
|
|
562
|
+
getLabels(): Array<LabelItem>;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
declare class BlockBackground extends SvgBase {
|
|
566
|
+
parent: Block;
|
|
567
|
+
item: BlockModel;
|
|
568
|
+
private imageElement;
|
|
569
|
+
private clipPath;
|
|
570
|
+
private clipPathId;
|
|
571
|
+
constructor(parent: Block, item: BlockModel);
|
|
572
|
+
update(): this;
|
|
573
|
+
domGenerate(to: any, index?: number): this;
|
|
574
|
+
private getPreserveAspectRatio;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
declare class Block extends SvgBase {
|
|
578
|
+
parent: Blocks;
|
|
579
|
+
item: BlockModel;
|
|
580
|
+
seats: Seats;
|
|
581
|
+
labels: Labels;
|
|
582
|
+
info: BlockInfo;
|
|
583
|
+
mask: BlockMask;
|
|
584
|
+
bounds: BlockBounds;
|
|
585
|
+
background: BlockBackground;
|
|
586
|
+
center_position: any;
|
|
587
|
+
top_position: any;
|
|
588
|
+
constructor(parent: Blocks, item: BlockModel);
|
|
589
|
+
update(): this;
|
|
590
|
+
infosToTop(): void;
|
|
591
|
+
infosToCenter(): void;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
declare class Blocks extends SvgBase {
|
|
595
|
+
parent: Stage;
|
|
596
|
+
seats: Array<SeatItem>;
|
|
597
|
+
constructor(parent: Stage);
|
|
598
|
+
update(): this;
|
|
599
|
+
getBlock(id: any): Block | null;
|
|
600
|
+
getBlocks(): Array<Block>;
|
|
601
|
+
center(): void;
|
|
602
|
+
scalePolygon(polygon: [number, number][], scale: number, center: [number, number]): [number, number][];
|
|
603
|
+
expandPolygon(polygon: [number, number][], distance: number, center: [number, number]): [number, number][];
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
declare class Circle extends SvgBase {
|
|
607
|
+
parent: BlocksSearchCircle;
|
|
608
|
+
constructor(parent: BlocksSearchCircle);
|
|
609
|
+
update(): this;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
declare class BlocksSearchCircle extends SvgBase {
|
|
613
|
+
parent: Stage;
|
|
614
|
+
circle: Circle;
|
|
615
|
+
is_enable: boolean;
|
|
616
|
+
constructor(parent: Stage);
|
|
617
|
+
update(): this;
|
|
618
|
+
enable(): this;
|
|
619
|
+
disable(): this;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
declare class StageBackground extends SvgBase {
|
|
623
|
+
parent: Stage;
|
|
624
|
+
private imageElement;
|
|
625
|
+
constructor(parent: Stage);
|
|
626
|
+
update(): this;
|
|
627
|
+
domGenerate(to: any, index?: number): this;
|
|
628
|
+
private getPreserveAspectRatio;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
declare class Stage extends SvgBase {
|
|
632
|
+
parent: Svg;
|
|
633
|
+
blocks: Blocks;
|
|
634
|
+
searchCircle: BlocksSearchCircle;
|
|
635
|
+
background: StageBackground;
|
|
636
|
+
constructor(parent: Svg);
|
|
637
|
+
update(): void;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
declare class ZoomOutBg extends SvgBase {
|
|
641
|
+
parent: Svg;
|
|
642
|
+
constructor(parent: Svg);
|
|
643
|
+
update(): void;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
declare class Legend extends SvgBase {
|
|
647
|
+
parent: Svg;
|
|
648
|
+
constructor(parent: Svg);
|
|
649
|
+
update(): void;
|
|
650
|
+
afterGenerate(): void;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
declare class TooltipRect extends SvgBase {
|
|
654
|
+
parent: Tooltip;
|
|
655
|
+
constructor(parent: Tooltip);
|
|
656
|
+
update(): this;
|
|
657
|
+
afterGenerate(): void;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
declare class TooltipTitle extends SvgBase {
|
|
661
|
+
parent: Tooltip;
|
|
662
|
+
title: Array<string>;
|
|
663
|
+
constructor(parent: Tooltip);
|
|
664
|
+
update(): this;
|
|
665
|
+
afterGenerate(): void;
|
|
666
|
+
generateTitle(): void;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
declare class Tooltip extends SvgBase {
|
|
670
|
+
parent: Svg;
|
|
671
|
+
rect: TooltipRect;
|
|
672
|
+
title: TooltipTitle;
|
|
673
|
+
activeSeat: SeatItem | null;
|
|
674
|
+
constructor(parent: Svg);
|
|
675
|
+
setTitle(title: Array<string>): this;
|
|
676
|
+
update(): this;
|
|
677
|
+
afterGenerate(): void;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
declare class Svg extends SvgBase {
|
|
681
|
+
parent: SeatMapCanvas;
|
|
682
|
+
stage: Stage;
|
|
683
|
+
zoomOutBg: ZoomOutBg;
|
|
684
|
+
legend: Legend;
|
|
685
|
+
tooltip: Tooltip;
|
|
686
|
+
constructor(parent: SeatMapCanvas);
|
|
687
|
+
update(): void;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
declare class SeatMapDevTools {
|
|
691
|
+
private context;
|
|
692
|
+
constructor(context: SeatMapCanvas);
|
|
693
|
+
log(...messages: any[]): this;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
declare abstract class ParserBase {
|
|
697
|
+
code: string;
|
|
698
|
+
constructor();
|
|
699
|
+
parse(jsonModel: PretixModel): BlockModel[];
|
|
700
|
+
}
|
|
10
701
|
|
|
11
702
|
declare class SeatMapCanvas {
|
|
12
703
|
container_selector: any;
|