@seatsio/seatsio-types 2.0.1 → 2.1.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/dist/index.d.ts +79 -25
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,15 +27,23 @@ export interface CommonConfigOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
divId?: string;
|
|
29
29
|
}
|
|
30
|
+
interface WithEvents {
|
|
31
|
+
event?: string;
|
|
32
|
+
events?: string[];
|
|
33
|
+
}
|
|
34
|
+
interface WithEvent {
|
|
35
|
+
event: string;
|
|
36
|
+
}
|
|
37
|
+
type Session = 'continue' | 'manual' | 'none' | 'start';
|
|
30
38
|
export interface ChartRendererConfigOptions extends DeprecatedConfigProperties, CommonConfigOptions, ChartRendererCallbacks {
|
|
31
39
|
/**
|
|
32
40
|
* Allows to render a multi-floor seating chart with specific floor selected, instead of the default all-floors view.
|
|
33
41
|
*/
|
|
34
42
|
activeFloor?: string;
|
|
35
43
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
* The key of the events for which you want to render the seating chart.
|
|
45
|
+
* Note: Channels functionality is not supported when using an event group with multiple events. Use {@link https://docs.seats.io/docs/api/seasons seasons} for that.
|
|
46
|
+
*/
|
|
39
47
|
events?: string[];
|
|
40
48
|
/**
|
|
41
49
|
* This parameter supports the following values:
|
|
@@ -47,8 +55,8 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
47
55
|
*/
|
|
48
56
|
mode?: ChartRendererMode;
|
|
49
57
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
* Allows to toggle on or off some features of the cursor tooltip, displayed when hovering objects when using pointing devices like a mouse, or when tapping on an object on touch devices.
|
|
59
|
+
*/
|
|
52
60
|
objectTooltip?: ChartRendererObjectTooltip;
|
|
53
61
|
/**
|
|
54
62
|
* Seats supports two types of pricing: simple pricing and multi-level pricing. {@link https://docs.seats.io/docs/renderer/config-pricing See documentation}
|
|
@@ -67,8 +75,8 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
67
75
|
* */
|
|
68
76
|
workspaceKey: string;
|
|
69
77
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
* The key of the event (or the season) for which you want to render the seating chart.
|
|
79
|
+
*/
|
|
72
80
|
event?: string;
|
|
73
81
|
/** Custom data to be passed to certain callbacks. {@link https://docs.seats.io/docs/renderer/config-extraconfig/ See documentation} for information. */
|
|
74
82
|
extraConfig?: ExtraConfig;
|
|
@@ -186,7 +194,7 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
186
194
|
* Start a session to temporarily hold objects upon selection. {@link https://docs.seats.io/docs/renderer/config-session See documentation} for more details.
|
|
187
195
|
* @default 'none'
|
|
188
196
|
*/
|
|
189
|
-
session?:
|
|
197
|
+
session?: Session;
|
|
190
198
|
/**
|
|
191
199
|
* Hold tokens allows the chart renderer to re-select already selected seats after a page refresh. {@link https://docs.seats.io/docs/renderer/config-holdtoken See documentation} for more details.
|
|
192
200
|
*/
|
|
@@ -223,27 +231,27 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
223
231
|
inputDevice?: 'cursor' | 'touch' | 'auto';
|
|
224
232
|
/**
|
|
225
233
|
* This parameter allows you to override the default seats.io spinner that is shown while the floor plan is being loaded. The value can contain (valid) html.
|
|
226
|
-
|
|
234
|
+
*/
|
|
227
235
|
loading?: string;
|
|
228
236
|
/**
|
|
229
237
|
* Sets the color scheme for the user interface. The colors of certain floor plan elements, such as zoomed-in sections, will also be adjusted accordingly.
|
|
230
238
|
*/
|
|
231
239
|
colorScheme?: 'light' | 'dark';
|
|
232
240
|
/**
|
|
233
|
-
|
|
234
|
-
|
|
241
|
+
* Replaces certain colors of the current color scheme. {@link https://docs.seats.io/docs/renderer/colors See documentation}
|
|
242
|
+
*/
|
|
235
243
|
colors?: {
|
|
236
244
|
colorSelected?: string;
|
|
237
245
|
cursorTooltipBackgroundColor?: string;
|
|
238
246
|
colorTitle?: string;
|
|
239
247
|
};
|
|
240
248
|
/**
|
|
241
|
-
|
|
242
|
-
|
|
249
|
+
* Sets the preset of styles to use for the seating chart user interface. {@link https://docs.seats.io/docs/renderer/stylepreset See documentation}
|
|
250
|
+
*/
|
|
243
251
|
stylePreset?: 'balance' | 'bubblegum' | 'flathead' | 'bezels' | 'leaf';
|
|
244
252
|
/**
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
* Sets the intention for certain style properties, allowing to override the current style preset. {@link https://docs.seats.io/docs/renderer/style See documentation}
|
|
254
|
+
*/
|
|
247
255
|
style?: StyleOverride;
|
|
248
256
|
/**
|
|
249
257
|
* Determines how the chart will fit within its parent container. See the {@link https://docs.seats.io/docs/renderer/config-fitto documentation} for more information on this setting.
|
|
@@ -270,8 +278,7 @@ export interface ChartRendererConfigOptions extends DeprecatedConfigProperties,
|
|
|
270
278
|
channels?: string[];
|
|
271
279
|
}
|
|
272
280
|
export type ExtractedEventManagerProps = Pick<ChartRendererConfigOptions, 'colors' | 'colorScheme' | 'extraConfig' | 'fitTo' | 'objectColor' | 'showFullScreenButton' | 'style' | 'stylePreset' | 'tooltipInfo' | 'themePreset' | 'themeColors'>;
|
|
273
|
-
|
|
274
|
-
event: string;
|
|
281
|
+
interface BaseEventManagerConfigOptions extends CommonConfigOptions, ExtractedEventManagerProps, EventManagerCallbacks {
|
|
275
282
|
mode: EventManagerMode;
|
|
276
283
|
/**
|
|
277
284
|
* The secret key of a workspace.
|
|
@@ -322,6 +329,41 @@ export interface EventManagerConfigOptions extends CommonConfigOptions, Extracte
|
|
|
322
329
|
useChannelColors?: boolean;
|
|
323
330
|
};
|
|
324
331
|
}
|
|
332
|
+
interface EventManagerManageObjectStatusesModeConfigOptions extends BaseEventManagerConfigOptions, WithEvents {
|
|
333
|
+
mode: 'manageObjectStatuses';
|
|
334
|
+
session?: Session;
|
|
335
|
+
}
|
|
336
|
+
interface EventManagerManageChannelsModeConfigOptions extends BaseEventManagerConfigOptions, WithEvent {
|
|
337
|
+
mode: 'manageChannels';
|
|
338
|
+
manageChannelsList?: boolean;
|
|
339
|
+
unavailableObjectsSelectable?: boolean;
|
|
340
|
+
}
|
|
341
|
+
interface EventManagerManageCategoriesModeConfigOptions extends BaseEventManagerConfigOptions, WithEvent {
|
|
342
|
+
mode: 'manageCategories';
|
|
343
|
+
unavailableObjectsSelectable?: boolean;
|
|
344
|
+
}
|
|
345
|
+
interface EventManagerFilterSectionsModeConfigOptions extends BaseEventManagerConfigOptions, WithEvent {
|
|
346
|
+
mode: 'filterSections';
|
|
347
|
+
onFilteredSectionChange: (sectionLabels: string[]) => {};
|
|
348
|
+
}
|
|
349
|
+
interface EventManagerSelectModeConfigOptions extends BaseEventManagerConfigOptions, WithEvents {
|
|
350
|
+
mode: 'select';
|
|
351
|
+
maxSelectedObjects?: SelectionLimiter;
|
|
352
|
+
numberOfPlacesToSelect?: number;
|
|
353
|
+
selectedObjects?: (string | SelectedObject | SelectedGA)[];
|
|
354
|
+
selectionBy?: 'places' | 'objects';
|
|
355
|
+
ticketTypes?: TicketTypeJsonWithoutPrice[];
|
|
356
|
+
tooltipContents?: (object: object) => string;
|
|
357
|
+
unavailableObjectsSelectable?: boolean;
|
|
358
|
+
selectableObjects?: string[];
|
|
359
|
+
}
|
|
360
|
+
interface EventManagerStaticModeConfigOptions extends BaseEventManagerConfigOptions, WithEvents {
|
|
361
|
+
mode: 'static';
|
|
362
|
+
onObjectMouseOver?: (object: SelectableObjectProps) => void;
|
|
363
|
+
onObjectMouseOut?: (object: SelectableObjectProps) => void;
|
|
364
|
+
tooltipContents?: (object: object) => string;
|
|
365
|
+
}
|
|
366
|
+
export type EventManagerConfigOptions = EventManagerManageObjectStatusesModeConfigOptions | EventManagerManageChannelsModeConfigOptions | EventManagerManageCategoriesModeConfigOptions | EventManagerSelectModeConfigOptions | EventManagerFilterSectionsModeConfigOptions | EventManagerStaticModeConfigOptions | (BaseEventManagerConfigOptions & WithEvent);
|
|
325
367
|
export interface ChartDesignerConfigOptions {
|
|
326
368
|
canvasColorScheme?: 'auto' | 'light' | 'dark';
|
|
327
369
|
chartKey?: string;
|
|
@@ -415,7 +457,10 @@ export type ChartRendererCallbacks = {
|
|
|
415
457
|
onSelectionValid?: () => void;
|
|
416
458
|
onSessionInitialized?: (holdToken: HoldToken) => void;
|
|
417
459
|
};
|
|
418
|
-
export type EventManagerCallbacks = Pick<ChartRendererCallbacks, '
|
|
460
|
+
export type EventManagerCallbacks = Pick<ChartRendererCallbacks, 'onObjectSelected' | 'onObjectDeselected' | 'onObjectClicked' | 'onFullScreenOpened' | 'onFullScreenClosed'> & {
|
|
461
|
+
onChartRendered?: (chart: EventManager) => void;
|
|
462
|
+
onChartRenderingFailed?: (chart: EventManager) => void;
|
|
463
|
+
onChartRerenderingStarted?: (chart: EventManager) => void;
|
|
419
464
|
onSubmitFailed?: () => void;
|
|
420
465
|
onSubmitSucceeded?: () => void;
|
|
421
466
|
};
|
|
@@ -525,9 +570,9 @@ export interface ChartRendererObjectTooltip {
|
|
|
525
570
|
*/
|
|
526
571
|
stylizedLabel?: boolean;
|
|
527
572
|
/**
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
573
|
+
* If true, a popup will show up when selecting an object on mobile containing the same information as the desktop tooltip, seen on hover. A button must be pressed to confirm the selection. If false, selection is done instantly but no information regarding the object is shown to the user. If unset, it will automatically attempt to show it unless an onObjectClicked parameter is passed in.
|
|
574
|
+
* @default auto
|
|
575
|
+
*/
|
|
531
576
|
confirmSelectionOnMobile?: boolean | 'auto';
|
|
532
577
|
}
|
|
533
578
|
export type Language = 'ar' | 'be' | 'bg' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fa' | 'fi' | 'fr' | 'hr' | 'he' | 'hu' | 'it' | 'ja' | 'ku' | 'li' | 'lv' | 'no' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sr' | 'sv' | 'tr' | 'uk' | 'zh-Hans' | 'zh-Hant';
|
|
@@ -594,12 +639,12 @@ export type DeprecatedConfigProperties = {
|
|
|
594
639
|
*/
|
|
595
640
|
holdOnSelect?: boolean;
|
|
596
641
|
/**
|
|
597
|
-
|
|
598
|
-
|
|
642
|
+
* @deprecated Use `showSectionContents: "always"` instead.
|
|
643
|
+
*/
|
|
599
644
|
alwaysShowSectionContents?: boolean;
|
|
600
645
|
/**
|
|
601
|
-
|
|
602
|
-
|
|
646
|
+
* @deprecated
|
|
647
|
+
*/
|
|
603
648
|
showRowLines?: boolean;
|
|
604
649
|
};
|
|
605
650
|
export type ChartRendererMode = 'normal' | 'print' | 'spotlight' | 'static';
|
|
@@ -662,6 +707,11 @@ interface TicketTypeJson {
|
|
|
662
707
|
label?: string;
|
|
663
708
|
formattedPrice?: PriceType;
|
|
664
709
|
}
|
|
710
|
+
interface TicketTypeJsonWithoutPrice {
|
|
711
|
+
ticketType?: string;
|
|
712
|
+
label?: string;
|
|
713
|
+
description?: string;
|
|
714
|
+
}
|
|
665
715
|
interface Labels {
|
|
666
716
|
own: string;
|
|
667
717
|
displayedLabel: string;
|
|
@@ -788,6 +838,10 @@ export interface SeatingChart {
|
|
|
788
838
|
zoomToSelectedObjects: () => Promise<void>;
|
|
789
839
|
}
|
|
790
840
|
export interface EventManager extends Pick<SeatingChart, 'clearSelection' | 'deselectCategories' | 'deselectObjects' | 'destroy' | 'findObject' | 'listCategories' | 'listSelectedObjects' | 'render' | 'rerender' | 'resetView' | 'selectCategories' | 'selectObjects' | 'zoomToSection' | 'zoomToSelectedObjects'> {
|
|
841
|
+
setHighlightedObjects(strings: string[]): void;
|
|
842
|
+
clearHighlightedObjects(): void;
|
|
843
|
+
setFilteredSection(label: string): void;
|
|
844
|
+
clearFilteredSection(): void;
|
|
791
845
|
}
|
|
792
846
|
export interface Channel {
|
|
793
847
|
name: string;
|