@seatmap.pro/renderer 0.0.1

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 ADDED
@@ -0,0 +1,788 @@
1
+ <a name="readmemd"></a>
2
+
3
+ # Seatmap Renderer
4
+
5
+ ## Index
6
+
7
+ ### Classes
8
+
9
+ - [Renderer](#classesrenderermd)
10
+
11
+ ### Interfaces
12
+
13
+ - [ICart](#interfacesicartmd)
14
+ - [ICartGa](#interfacesicartgamd)
15
+ - [ICartSeat](#interfacesicartseatmd)
16
+ - [IColoredPrice](#interfacesicoloredpricemd)
17
+ - [IExtendedSeat](#interfacesicoordcartseatmd)
18
+ - [IExternalSector](#interfacesiexternalsectormd)
19
+ - [IPoint](#interfacesipointmd)
20
+ - [IPrice](#interfacesipricemd)
21
+ - [IRendererSettings](#interfacesirenderersettingsmd)
22
+
23
+ ### Type aliases
24
+
25
+ - [ColorSequenceSettings](#colorsequencesettings)
26
+ - [SeatFilter](#seatfilter)
27
+
28
+ ### Functions
29
+
30
+ - [convertPricesToColored](#const-convertpricestocolored)
31
+ - [convertPricesToColoredById](#const-convertpricestocoloredbyid)
32
+ - [sortPrices](#const-sortprices)
33
+
34
+ ## Type aliases
35
+
36
+ ### ColorSequenceSettings
37
+
38
+ Ƭ **ColorSequenceSettings**: _string[][]_
39
+
40
+ ---
41
+
42
+ ### SeatFilter
43
+
44
+ Ƭ **SeatFilter**: _function_
45
+
46
+ #### Type declaration:
47
+
48
+ ▸ (`seat`: ISeat): _boolean_
49
+
50
+ **Parameters:**
51
+
52
+ | Name | Type |
53
+ | ------ | ----- |
54
+ | `seat` | ISeat |
55
+
56
+ ## Functions
57
+
58
+ ### `Const` convertPricesToColored
59
+
60
+ ▸ **convertPricesToColored**(`prices`: [IPrice](#interfacesipricemd)[], `colorSettings`: [ColorSequenceSettings](#colorsequencesettings)): _[IColoredPrice](#interfacesicoloredpricemd)[]_
61
+
62
+ **Parameters:**
63
+
64
+ | Name | Type |
65
+ | --------------- | ----------------------------------------------- |
66
+ | `prices` | [IPrice](#interfacesipricemd)[] |
67
+ | `colorSettings` | [ColorSequenceSettings](#colorsequencesettings) |
68
+
69
+ **Returns:** _[IColoredPrice](#interfacesicoloredpricemd)[]_
70
+
71
+ ---
72
+
73
+ ### `Const` convertPricesToColoredById
74
+
75
+ ▸ **convertPricesToColoredById**(`prices`: [IPrice](#interfacesipricemd)[], `colorSettings`: [ColorSequenceSettings](#colorsequencesettings)): _ById‹[IColoredPrice](#interfacesicoloredpricemd)›_
76
+
77
+ **Parameters:**
78
+
79
+ | Name | Type |
80
+ | --------------- | ----------------------------------------------- |
81
+ | `prices` | [IPrice](#interfacesipricemd)[] |
82
+ | `colorSettings` | [ColorSequenceSettings](#colorsequencesettings) |
83
+
84
+ **Returns:** _ById‹[IColoredPrice](#interfacesicoloredpricemd)›_
85
+
86
+ ---
87
+
88
+ ### `Const` sortPrices
89
+
90
+ ▸ **sortPrices**<**T**>(`prices`: T[]): _T[]_
91
+
92
+ **Type parameters:**
93
+
94
+ ▪ **T**: _[IPrice](#interfacesipricemd)_
95
+
96
+ **Parameters:**
97
+
98
+ | Name | Type |
99
+ | -------- | ---- |
100
+ | `prices` | T[] |
101
+
102
+ **Returns:** _T[]_
103
+
104
+ # Classes
105
+
106
+ <a name="classesrenderermd"></a>
107
+
108
+ ## Class: Renderer
109
+
110
+ ### Hierarchy
111
+
112
+ - **Renderer**
113
+
114
+ ### Implements
115
+
116
+ - IRenderer
117
+
118
+ ### Index
119
+
120
+ #### Constructors
121
+
122
+ - [constructor](#constructor)
123
+
124
+ #### Methods
125
+
126
+ - [addGaToCart](#addgatocart)
127
+ - [addSeatsToCart](#addseatstocart)
128
+ - [clearCart](#clearcart)
129
+ - [destroy](#destroy)
130
+ - [disableSeatsByIds](#disableseatsbyids)
131
+ - [disableSeatsByKeys](#disableseatsbykeys)
132
+ - [getCart](#getcart)
133
+ - [getMaxZoom](#getmaxzoom)
134
+ - [getMinZoom](#getminzoom)
135
+ - [getPrices](#getprices)
136
+ - [getZoom](#getzoom)
137
+ - [initCart](#initcart)
138
+ - [removeSeatsFromCartByIds](#removeseatsfromcartbyids)
139
+ - [seatToCoordCartSeat](#seattocoordcartseat)
140
+ - [updateSeatLocks](#updateseatlocks)
141
+ - [zoomIn](#zoomin)
142
+ - [zoomOut](#zoomout)
143
+ - [zoomToFit](#zoomtofit)
144
+
145
+ ### Constructors
146
+
147
+ #### constructor
148
+
149
+ \+ **new Renderer**(`element`: HTMLElement, `settings?`: [IRendererSettings](#interfacesirenderersettingsmd)): _[Renderer](#classesrenderermd)_
150
+
151
+ **Parameters:**
152
+
153
+ | Name | Type |
154
+ | ----------- | --------------------------------------------------- |
155
+ | `element` | HTMLElement |
156
+ | `settings?` | [IRendererSettings](#interfacesirenderersettingsmd) |
157
+
158
+ **Returns:** _[Renderer](#classesrenderermd)_
159
+
160
+ ### Methods
161
+
162
+ #### addGaToCart
163
+
164
+ ▸ **addGaToCart**(`ga`: [ICartGa](#interfacesicartgamd)): _void_
165
+
166
+ **Parameters:**
167
+
168
+ | Name | Type |
169
+ | ---- | ------------------------------- |
170
+ | `ga` | [ICartGa](#interfacesicartgamd) |
171
+
172
+ **Returns:** _void_
173
+
174
+ ---
175
+
176
+ #### addSeatsToCart
177
+
178
+ ▸ **addSeatsToCart**(`seats`: [ICartSeat](#interfacesicartseatmd)[]): _void_
179
+
180
+ **Parameters:**
181
+
182
+ | Name | Type |
183
+ | ------- | ------------------------------------- |
184
+ | `seats` | [ICartSeat](#interfacesicartseatmd)[] |
185
+
186
+ **Returns:** _void_
187
+
188
+ ---
189
+
190
+ #### clearCart
191
+
192
+ ▸ **clearCart**(): _void_
193
+
194
+ **Returns:** _void_
195
+
196
+ ---
197
+
198
+ #### destroy
199
+
200
+ ▸ **destroy**(): _void_
201
+
202
+ **Returns:** _void_
203
+
204
+ ---
205
+
206
+ #### disableSeatsByIds
207
+
208
+ ▸ **disableSeatsByIds**(`ids`: number[]): _void_
209
+
210
+ **Parameters:**
211
+
212
+ | Name | Type |
213
+ | ----- | -------- |
214
+ | `ids` | number[] |
215
+
216
+ **Returns:** _void_
217
+
218
+ ---
219
+
220
+ #### disableSeatsByKeys
221
+
222
+ ▸ **disableSeatsByKeys**(`keys`: string[]): _void_
223
+
224
+ **Parameters:**
225
+
226
+ | Name | Type |
227
+ | ------ | -------- |
228
+ | `keys` | string[] |
229
+
230
+ **Returns:** _void_
231
+
232
+ ---
233
+
234
+ #### getCart
235
+
236
+ ▸ **getCart**(): _[ICart](#interfacesicartmd)_
237
+
238
+ **Returns:** _[ICart](#interfacesicartmd)_
239
+
240
+ ---
241
+
242
+ #### getMaxZoom
243
+
244
+ ▸ **getMaxZoom**(): _number_
245
+
246
+ **Returns:** _number_
247
+
248
+ ---
249
+
250
+ #### getMinZoom
251
+
252
+ ▸ **getMinZoom**(): _number_
253
+
254
+ **Returns:** _number_
255
+
256
+ ---
257
+
258
+ #### getPrices
259
+
260
+ ▸ **getPrices**(): _[IColoredPrice](#interfacesicoloredpricemd)[]_
261
+
262
+ **Returns:** _[IColoredPrice](#interfacesicoloredpricemd)[]_
263
+
264
+ ---
265
+
266
+ #### getZoom
267
+
268
+ ▸ **getZoom**(): _number_
269
+
270
+ **Returns:** _number_
271
+
272
+ ---
273
+
274
+ #### initCart
275
+
276
+ ▸ **initCart**(`cart`: [ICart](#interfacesicartmd)): _void_
277
+
278
+ **Parameters:**
279
+
280
+ | Name | Type |
281
+ | ------ | --------------------------- |
282
+ | `cart` | [ICart](#interfacesicartmd) |
283
+
284
+ **Returns:** _void_
285
+
286
+ ---
287
+
288
+ #### removeSeatsFromCartByIds
289
+
290
+ ▸ **removeSeatsFromCartByIds**(`ids`: number[]): _void_
291
+
292
+ **Parameters:**
293
+
294
+ | Name | Type |
295
+ | ----- | -------- |
296
+ | `ids` | number[] |
297
+
298
+ **Returns:** _void_
299
+
300
+ ---
301
+
302
+ #### seatToCoordCartSeat
303
+
304
+ ▸ **seatToCoordCartSeat**(`seat`: ISeat): _[IExtendedSeat](#interfacesicoordcartseatmd)_
305
+
306
+ **Parameters:**
307
+
308
+ | Name | Type |
309
+ | ------ | ----- |
310
+ | `seat` | ISeat |
311
+
312
+ **Returns:** _[IExtendedSeat](#interfacesicoordcartseatmd)_
313
+
314
+ ---
315
+
316
+ #### updateSeatLocks
317
+
318
+ ▸ **updateSeatLocks**(`filter`: [SeatFilter](#seatfilter)): _void_
319
+
320
+ **Parameters:**
321
+
322
+ | Name | Type |
323
+ | -------- | ------------------------- |
324
+ | `filter` | [SeatFilter](#seatfilter) |
325
+
326
+ **Returns:** _void_
327
+
328
+ ---
329
+
330
+ #### zoomIn
331
+
332
+ ▸ **zoomIn**(): _void_
333
+
334
+ **Returns:** _void_
335
+
336
+ ---
337
+
338
+ #### zoomOut
339
+
340
+ ▸ **zoomOut**(): _void_
341
+
342
+ **Returns:** _void_
343
+
344
+ ---
345
+
346
+ #### zoomToFit
347
+
348
+ ▸ **zoomToFit**(): _void_
349
+
350
+ **Returns:** _void_
351
+
352
+ # Interfaces
353
+
354
+ <a name="interfacesicartmd"></a>
355
+
356
+ ## Interface: ICart
357
+
358
+ ### Hierarchy
359
+
360
+ - **ICart**
361
+
362
+ ### Index
363
+
364
+ #### Properties
365
+
366
+ - [ga](#ga)
367
+ - [seats](#seats)
368
+
369
+ ### Properties
370
+
371
+ #### ga
372
+
373
+ • **ga**: _[ICartGa](#interfacesicartgamd)[]_
374
+
375
+ ---
376
+
377
+ #### seats
378
+
379
+ • **seats**: _[ICartSeat](#interfacesicartseatmd)[]_
380
+
381
+ <a name="interfacesicartgamd"></a>
382
+
383
+ ## Interface: ICartGa
384
+
385
+ ### Hierarchy
386
+
387
+ - **ICartGa**
388
+
389
+ ### Index
390
+
391
+ #### Properties
392
+
393
+ - [count](#count)
394
+ - [key](#key)
395
+ - [price](#price)
396
+ - [sectorId](#optional-sectorid)
397
+
398
+ ### Properties
399
+
400
+ #### count
401
+
402
+ • **count**: _number_
403
+
404
+ ---
405
+
406
+ #### key
407
+
408
+ • **key**: _string_
409
+
410
+ ---
411
+
412
+ #### price
413
+
414
+ • **price**: _number_
415
+
416
+ ---
417
+
418
+ #### `Optional` sectorId
419
+
420
+ • **sectorId**? : _undefined | number_
421
+
422
+ <a name="interfacesicartseatmd"></a>
423
+
424
+ ## Interface: ICartSeat
425
+
426
+ ### Hierarchy
427
+
428
+ - **ICartSeat**
429
+
430
+ ↳ [IExtendedSeat](#interfacesicoordcartseatmd)
431
+
432
+ ### Index
433
+
434
+ #### Properties
435
+
436
+ - [id](#optional-id)
437
+ - [key](#key)
438
+ - [price](#optional-price)
439
+
440
+ ### Properties
441
+
442
+ #### `Optional` id
443
+
444
+ • **id**? : _undefined | number_
445
+
446
+ ---
447
+
448
+ #### key
449
+
450
+ • **key**: _string_
451
+
452
+ ---
453
+
454
+ #### `Optional` price
455
+
456
+ • **price**? : _undefined | number_
457
+
458
+ <a name="interfacesicoloredpricemd"></a>
459
+
460
+ ## Interface: IColoredPrice
461
+
462
+ ### Hierarchy
463
+
464
+ - [IPrice](#interfacesipricemd)
465
+
466
+ ↳ **IColoredPrice**
467
+
468
+ ### Index
469
+
470
+ #### Properties
471
+
472
+ - [color](#color)
473
+ - [id](#id)
474
+ - [name](#name)
475
+
476
+ ### Properties
477
+
478
+ #### color
479
+
480
+ • **color**: _string_
481
+
482
+ ---
483
+
484
+ #### id
485
+
486
+ • **id**: _number_
487
+
488
+ _Inherited from [IPrice](#interfacesipricemd).[id](#id)_
489
+
490
+ ---
491
+
492
+ #### name
493
+
494
+ • **name**: _string_
495
+
496
+ _Inherited from [IPrice](#interfacesipricemd).[name](#name)_
497
+
498
+ <a name="interfacesicoordcartseatmd"></a>
499
+
500
+ ## Interface: IExtendedSeat
501
+
502
+ ### Hierarchy
503
+
504
+ - [ICartSeat](#interfacesicartseatmd)
505
+
506
+ ↳ **IExtendedSeat**
507
+
508
+ ### Index
509
+
510
+ #### Properties
511
+
512
+ - [id](#optional-id)
513
+ - [key](#key)
514
+ - [price](#optional-price)
515
+ - [x](#x)
516
+ - [y](#y)
517
+
518
+ ### Properties
519
+
520
+ #### `Optional` id
521
+
522
+ • **id**? : _undefined | number_
523
+
524
+ _Inherited from [ICartSeat](#interfacesicartseatmd).[id](#optional-id)_
525
+
526
+ ---
527
+
528
+ #### key
529
+
530
+ • **key**: _string_
531
+
532
+ _Inherited from [ICartSeat](#interfacesicartseatmd).[key](#key)_
533
+
534
+ ---
535
+
536
+ #### `Optional` price
537
+
538
+ • **price**? : _undefined | number_
539
+
540
+ _Inherited from [ICartSeat](#interfacesicartseatmd).[price](#optional-price)_
541
+
542
+ ---
543
+
544
+ #### x
545
+
546
+ • **x**: _number_
547
+
548
+ ---
549
+
550
+ #### y
551
+
552
+ • **y**: _number_
553
+
554
+ <a name="interfacesiexternalsectormd"></a>
555
+
556
+ ## Interface: IExternalSector
557
+
558
+ ### Hierarchy
559
+
560
+ - **IExternalSector**
561
+
562
+ ### Index
563
+
564
+ #### Properties
565
+
566
+ - [ga](#ga)
567
+ - [id](#optional-id)
568
+ - [name](#name)
569
+ - [price](#optional-price)
570
+ - [rect](#rect)
571
+
572
+ ### Properties
573
+
574
+ #### ga
575
+
576
+ • **ga**: _boolean_
577
+
578
+ ---
579
+
580
+ #### `Optional` id
581
+
582
+ • **id**? : _undefined | number_
583
+
584
+ ---
585
+
586
+ #### name
587
+
588
+ • **name**: _string_
589
+
590
+ ---
591
+
592
+ #### `Optional` price
593
+
594
+ • **price**? : _undefined | number_
595
+
596
+ ---
597
+
598
+ #### rect
599
+
600
+ • **rect**: _ISectorRect_
601
+
602
+ <a name="interfacesipointmd"></a>
603
+
604
+ ## Interface: IPoint
605
+
606
+ ### Hierarchy
607
+
608
+ - **IPoint**
609
+
610
+ ### Index
611
+
612
+ #### Properties
613
+
614
+ - [x](#x)
615
+ - [y](#y)
616
+
617
+ ### Properties
618
+
619
+ #### x
620
+
621
+ • **x**: _number_
622
+
623
+ ---
624
+
625
+ #### y
626
+
627
+ • **y**: _number_
628
+
629
+ <a name="interfacesipricemd"></a>
630
+
631
+ ## Interface: IPrice
632
+
633
+ ### Hierarchy
634
+
635
+ - **IPrice**
636
+
637
+ ↳ [IColoredPrice](#interfacesicoloredpricemd)
638
+
639
+ ### Index
640
+
641
+ #### Properties
642
+
643
+ - [id](#id)
644
+ - [name](#name)
645
+
646
+ ### Properties
647
+
648
+ #### id
649
+
650
+ • **id**: _number_
651
+
652
+ ---
653
+
654
+ #### name
655
+
656
+ • **name**: _string_
657
+
658
+ <a name="interfacesirenderersettingsmd"></a>
659
+
660
+ ## Interface: IRendererSettings
661
+
662
+ ### Hierarchy
663
+
664
+ - **IRendererSettings**
665
+
666
+ ### Index
667
+
668
+ #### Properties
669
+
670
+ - [debounceDelay](#optional-debouncedelay)
671
+ - [onCartChange](#optional-oncartchange)
672
+ - [onPan](#optional-onpan)
673
+ - [onRedrawEnd](#optional-onredrawend)
674
+ - [onRedrawStart](#optional-onredrawstart)
675
+ - [onSeatDebouncedEnter](#optional-onseatdebouncedenter)
676
+ - [onSeatDeselect](#optional-onseatdeselect)
677
+ - [onSeatMouseEnter](#optional-onseatmouseenter)
678
+ - [onSeatMouseLeave](#optional-onseatmouseleave)
679
+ - [onSeatSelect](#optional-onseatselect)
680
+ - [onSectorClick](#optional-onsectorclick)
681
+ - [onSectorMouseEnter](#optional-onsectormouseenter)
682
+ - [onSectorMouseLeave](#optional-onsectormouseleave)
683
+ - [onZoomEnd](#optional-onzoomend)
684
+ - [onZoomStart](#optional-onzoomstart)
685
+ - [selectionLimit](#optional-selectionlimit)
686
+ - [zoomAnimationDuration](#optional-zoomanimationduration)
687
+
688
+ ### Properties
689
+
690
+ #### `Optional` debounceDelay
691
+
692
+ • **debounceDelay**? : _undefined | number_
693
+
694
+ ---
695
+
696
+ #### `Optional` onCartChange
697
+
698
+ • **onCartChange**? : _undefined | function_
699
+
700
+ ---
701
+
702
+ #### `Optional` onPan
703
+
704
+ • **onPan**? : _undefined | function_
705
+
706
+ ---
707
+
708
+ #### `Optional` onRedrawEnd
709
+
710
+ • **onRedrawEnd**? : _undefined | function_
711
+
712
+ ---
713
+
714
+ #### `Optional` onRedrawStart
715
+
716
+ • **onRedrawStart**? : _undefined | function_
717
+
718
+ ---
719
+
720
+ #### `Optional` onSeatDebouncedEnter
721
+
722
+ • **onSeatDebouncedEnter**? : _undefined | function_
723
+
724
+ ---
725
+
726
+ #### `Optional` onSeatDeselect
727
+
728
+ • **onSeatDeselect**? : _undefined | function_
729
+
730
+ ---
731
+
732
+ #### `Optional` onSeatMouseEnter
733
+
734
+ • **onSeatMouseEnter**? : _undefined | function_
735
+
736
+ ---
737
+
738
+ #### `Optional` onSeatMouseLeave
739
+
740
+ • **onSeatMouseLeave**? : _undefined | function_
741
+
742
+ ---
743
+
744
+ #### `Optional` onSeatSelect
745
+
746
+ • **onSeatSelect**? : _undefined | function_
747
+
748
+ ---
749
+
750
+ #### `Optional` onSectorClick
751
+
752
+ • **onSectorClick**? : _undefined | function_
753
+
754
+ ---
755
+
756
+ #### `Optional` onSectorMouseEnter
757
+
758
+ • **onSectorMouseEnter**? : _undefined | function_
759
+
760
+ ---
761
+
762
+ #### `Optional` onSectorMouseLeave
763
+
764
+ • **onSectorMouseLeave**? : _undefined | function_
765
+
766
+ ---
767
+
768
+ #### `Optional` onZoomEnd
769
+
770
+ • **onZoomEnd**? : _undefined | function_
771
+
772
+ ---
773
+
774
+ #### `Optional` onZoomStart
775
+
776
+ • **onZoomStart**? : _undefined | function_
777
+
778
+ ---
779
+
780
+ #### `Optional` selectionLimit
781
+
782
+ • **selectionLimit**? : _undefined | number_
783
+
784
+ ---
785
+
786
+ #### `Optional` zoomAnimationDuration
787
+
788
+ • **zoomAnimationDuration**? : _undefined | number_