Renderer Specification
Version:
Classes
Renderer
Base Renderer class that implements the IRenderer interface. Provides core functionality for rendering and interacting with a venue map.
Extended by
Implements
Constructors
new Renderer()
new Renderer(
element
,machine
,settings
):Renderer
Creates a new instance of the Renderer.
Parameters
Parameter | Type | Description |
---|---|---|
element |
HTMLElement |
The DOM element where the renderer will be mounted |
machine |
RendererMachine |
The state machine that controls the renderer behavior |
settings |
IRendererSettings |
Configuration settings for the renderer |
Returns
Methods
addGaToCart()
addGaToCart(
ga
):void
Adds a general admission ticket to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
ga |
ICartGa |
GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom add GA seats control.
You can add desired quantity of GA tickets to the cart.
Example
renderer.addGaToCart({
id: 100500,
key: 'Table 2',
price: 200,
// quantity of GA tickets
count: 3
});
Implementation of
addSeatsToCart()
addSeatsToCart(
seats
):void
Adds seats to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
seats |
ICartSeat [] |
Array of seats to add |
Returns
void
Remarks
This method is optional. In a common scenario the user adds available seats by clicking on them.
Example
renderer.addSeatsToCart([
{
id: 803,
key: 'Section 3;;3;;1',
price: 500
}
]);
Implementation of
clearCart()
clearCart():
void
Clears all items from the cart.
Returns
void
Implementation of
clearSectorHighlight()
clearSectorHighlight():
void
Returns
void
destroy()
destroy():
void
Destroys the renderer instance, cleaning up all resources.
Returns
void
Implementation of
disableSeatsByIds()
disableSeatsByIds(
ids
,options
?):void
Disables seats by their IDs, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
options ? |
{ resetAll : boolean ; } |
Optional configuration object. |
options.resetAll ? |
boolean |
If true (default), all seats not in the ids array will be unlocked. If false , only the seats in the ids array will be affected, and the locked state of other seats will remain unchanged. |
Returns
void
Implementation of
disableSeatsByKeys()
disableSeatsByKeys(
keys
):void
Disables seats by their keys, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Implementation of
disableSectionsByIds()
disableSectionsByIds(
ids
):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
disableSvgSectionsByIds()
disableSvgSectionsByIds(
ids
,options
?):void
Disables SVG sections by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Implementation of
IRenderer
.disableSvgSectionsByIds
disableSvgSectionsByNames()
disableSvgSectionsByNames(
names
,options
?):void
Disables SVG sections by their names.
Parameters
Parameter | Type | Description |
---|---|---|
names |
string [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Implementation of
IRenderer
.disableSvgSectionsByNames
enableSeatsByIds()
enableSeatsByIds(
ids
):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
enableSectionsByIds()
enableSectionsByIds():
void
Returns
void
enableSvgSectionsByIds()
enableSvgSectionsByIds(
ids
):void
Enables SVG sections by their IDs.
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
Implementation of
IRenderer
.enableSvgSectionsByIds
enableSvgSectionsByNames()
enableSvgSectionsByNames(
names
):void
Enables SVG sections by their names.
Parameters
Parameter | Type |
---|---|
names |
string [] |
Returns
void
Implementation of
IRenderer
.enableSvgSectionsByNames
filterSeatsByIds()
filterSeatsByIds(
ids
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
filterSeatsByKeys()
filterSeatsByKeys(
keys
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
filterSvgSectionsByIds()
filterSvgSectionsByIds(
ids
,options
?):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
options ? |
{ resetAll : boolean ; } |
options.resetAll ? |
boolean |
Returns
void
getCart()
getCart():
ICart
Gets the current cart state.
Returns
Returns selected seats and GA ticket count
Remarks
Seatmap.pro doesn’t support any session mechanisms. Cart is always should be stored on the ticketing system side. For the state management reasons, the Renderer has internal selected seat representation.
Example
Example of cart object:
var cart = {
seats: [
{ id: 1389563, key: 'Section 1;;5;;14', price: 100 },
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
Implementation of
getCategoryColor()
getCategoryColor(
category
):undefined
|string
Returns category’s color
Parameters
Parameter | Type | Description |
---|---|---|
category |
number |
Category number |
Returns
undefined
| string
getHeight()
getHeight():
number
Gets the height of the renderer.
Returns
number
The height in pixels
getMarkedSeatsIds()
getMarkedSeatsIds():
number
[]
Gets the IDs of all marked seats.
Returns
number
[]
The IDs of marked seats
Implementation of
getMaxZoom()
getMaxZoom():
number
Gets the maximum allowed zoom level.
Returns
number
Implementation of
getMinZoom()
getMinZoom():
number
Gets the minimum allowed zoom level.
Returns
number
Implementation of
getMode()
getMode():
undefined
|string
Returns
undefined
| string
getPrices()
getPrices():
IColoredPrice
[]
Gets all available prices.
Returns
Array of available prices
Example
Example of return value:
[
{ id: 63, name: '100', color: '#9C27B0' },
{ id: 64, name: '200', color: '#2196F3' }
];
Implementation of
getRowById()
getRowById(
id
):IRowDTO
Parameters
Parameter | Type |
---|---|
id |
number |
Returns
IRowDTO
Row data
getRows()
getRows():
IRowDTO
[]
Returns
IRowDTO
[]
Rows data array
getSeatIds()
getSeatIds(
seats
):number
[]
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
number
[]
getSeats()
getSeats():
ISeatDTO
[]
Gets all seats in the venue.
Returns
ISeatDTO
[]
Seats data array
Implementation of
getSeatSelection()
getSeatSelection():
IExtendedSeat
[]
Returns selected seats
Returns
getSections()
getSections():
ISector
[]
Returns sections info
Returns
ISector
[]
getSectionsWithCoords()
getSectionsWithCoords():
ISectionWithCoords
[]
Returns
getSelectedGa()
getSelectedGa():
undefined
|ISector
Returns
undefined
| ISector
getSvgSectionBySelection()
getSvgSectionBySelection():
ISectorDTO
[]
Gets SVG sections by the current selection.
Returns
ISectorDTO
[]
The selected SVG sections
Implementation of
IRenderer
.getSvgSectionBySelection
getVisibleSeats()
getVisibleSeats():
ISeat
[]
Returns only visible seats with coords relative to canvas
Returns
ISeat
[]
getWidth()
getWidth():
number
Gets the width of the renderer.
Returns
number
The width in pixels
getZoom()
getZoom():
number
Gets the current zoom level.
Returns
number
Implementation of
highlightSector()
highlightSector(
id
):void
Parameters
Parameter | Type |
---|---|
id |
undefined | number |
Returns
void
initCart()
initCart(
cart
):void
Initializes the cart with the provided cart data.
Parameters
Parameter | Type | Description |
---|---|---|
cart |
ICart |
Cart state |
Returns
void
Remarks
In a case of page reload you should initialize the saved state with this method.
Cart initialization is available right after component initialization.
Sales page must save the cart state in the given format to support the page reload feature.
Example
var cart = {
seats: [
{
id: 1389563,
key: 'Section 1;;5;;14',
price: 100
},
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
renderer.initCart(cart);
Implementation of
removeFilter()
removeFilter(
ids
?):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids ? |
number [] |
Array of internal seat IDs |
Returns
void
removeFilterSvgSectionsByIds()
removeFilterSvgSectionsByIds(
ids
?):void
Parameters
Parameter | Type |
---|---|
ids ? |
number [] |
Returns
void
removeGaFromCart()
removeGaFromCart(
removedGa
):void
Removes a general admission ticket from the cart.
Parameters
Parameter | Type | Description |
---|---|---|
removedGa |
IRemovedCartGa |
removed GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom remove GA seats control.
You can remove GA from cart.
Example
renderer.removeGaFromCart({
sectorId: 100500,
price: 200
});
Implementation of
removeSeatsFromCartByIds()
removeSeatsFromCartByIds(
ids
):void
Removes seats from the cart by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Implementation of
IRenderer
.removeSeatsFromCartByIds
removeSeatsFromCartByKeys()
removeSeatsFromCartByKeys(
keys
):void
Removes seats from internal cart.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
resetCategories()
resetCategories():
void
Returns
void
seatKeysToIds()
seatKeysToIds(
keys
):number
[]
Converts seat keys to seat IDs.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
number
[]
Implementation of
seatToExtendedSeat()
seatToExtendedSeat(
seat
):IExtendedSeat
Parameters
Parameter | Type |
---|---|
seat |
ISeat |
Returns
setExternalPrices()
setExternalPrices(
seatsPrices
?):void
Sets external price information for seats.
Parameters
Parameter | Type |
---|---|
seatsPrices ? |
ISeatPriceScheme [] |
Returns
void
Remarks
In case you need to use prices from external resources
you should execute this method.
External prices can be passed as an argument or as
a seatsPrices
property within the settings.
Implementation of
setGaCategory()
setGaCategory(
sectionId
,category
):void
Parameters
Parameter | Type |
---|---|
sectionId |
number |
category |
undefined | number |
Returns
void
setGroupSize()
setGroupSize(
groupSize
):void
Sets the group size for group selection.
Parameters
Parameter | Type | Description |
---|---|---|
groupSize |
number |
The size of the group |
Returns
void
Implementation of
setHeight()
setHeight(
height
):void
Parameters
Parameter | Type |
---|---|
height |
number |
Returns
void
setMode()
setMode(
mode
):boolean
Sets the interaction mode for the renderer.
Parameters
Parameter | Type | Description |
---|---|---|
mode |
string |
The mode to set |
Returns
boolean
Whether the mode was set successfully
setSeatsCategory()
setSeatsCategory(
seats
,category
,color
?):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
category |
number |
color ? |
string |
Returns
void
setSeatSelection()
setSeatSelection(
seats
):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
void
setSectionSelection()
setSectionSelection(
sections
?):void
Parameters
Parameter | Type |
---|---|
sections ? |
number [] | string [] |
Returns
void
setSelectedGa()
setSelectedGa(
ga
?):void
Parameters
Parameter | Type |
---|---|
ga ? |
string | number |
Returns
void
updateSeatLocks()
updateSeatLocks(
filter
):void
Updates the lock status of seats based on the provided filter.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
SeatFilter |
Function should return true for seats to lock |
Returns
void
Example
For example, you can create handler to prevent selection of seats with different special state:
const handleCartChange = (cart, prevCart) => {
if (!cart.seats.length) {
// Unlock all the seats if the cart is empty
renderer.updateSeatLocks(s => false);
} else if (!prevCart || !prevCart.seats.length) {
// Lock seats with different special state
const seat = cart.seats[0];
renderer.updateSeatLocks(
s => (s.special && s.special.s1) !== (seat.special && seat.special.s1)
);
}
};
Implementation of
viewSection()
viewSection(
section
):void
Parameters
Parameter | Type |
---|---|
section |
ISection |
Returns
void
zoomIn()
zoomIn():
void
Increases the zoom level by one step.
Returns
void
Implementation of
zoomOut()
zoomOut():
void
Decreases the zoom level by one step.
Returns
void
Implementation of
zoomToFit()
zoomToFit():
void
Adjusts the zoom level to fit the entire venue in the viewport.
Returns
void
Implementation of
SeatmapAdminRenderer
Admin Renderer class for seatmap administration. Extends the base Renderer with admin-specific functionality.
Extends
Constructors
new SeatmapAdminRenderer()
new SeatmapAdminRenderer(
element
,settings
?):SeatmapAdminRenderer
Creates a new instance of the AdminRenderer.
Initializes the renderer by setting up the base configuration and API client. The API endpoint URL is determined based on the environment setting.
Parameters
Parameter | Type | Description |
---|---|---|
element |
HTMLElement |
The HTML element where the renderer will be mounted |
settings ? |
IAdminRendererSettings |
Optional configuration settings for the renderer |
Returns
Throws
Throws an error if the public key is undefined
Example
// Create with default production settings
const renderer = new AdminRenderer(document.getElementById('container'), {
publicKey: 'your-public-key'
});
// Create with staging environment
const stageRenderer = new AdminRenderer(document.getElementById('container'), {
env: 'stage',
publicKey: 'your-stage-key'
});
// Create with custom base URL
const customRenderer = new AdminRenderer(document.getElementById('container'), {
baseUrl: 'https://your-custom-api.example.com/v1/',
publicKey: 'your-public-key'
});
Overrides
Methods
addGaToCart()
addGaToCart(
ga
):void
Adds a general admission ticket to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
ga |
ICartGa |
GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom add GA seats control.
You can add desired quantity of GA tickets to the cart.
Example
renderer.addGaToCart({
id: 100500,
key: 'Table 2',
price: 200,
// quantity of GA tickets
count: 3
});
Inherited from
addSeatsToCart()
addSeatsToCart(
seats
):void
Adds seats to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
seats |
ICartSeat [] |
Array of seats to add |
Returns
void
Remarks
This method is optional. In a common scenario the user adds available seats by clicking on them.
Example
renderer.addSeatsToCart([
{
id: 803,
key: 'Section 3;;3;;1',
price: 500
}
]);
Inherited from
clearCart()
clearCart():
void
Clears all items from the cart.
Returns
void
Inherited from
clearSectorHighlight()
clearSectorHighlight():
void
Returns
void
Inherited from
destroy()
destroy():
void
Destroys the renderer instance, cleaning up all resources.
Returns
void
Inherited from
disableSeatsByIds()
disableSeatsByIds(
ids
,options
?):void
Disables seats by their IDs, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
options ? |
{ resetAll : boolean ; } |
Optional configuration object. |
options.resetAll ? |
boolean |
If true (default), all seats not in the ids array will be unlocked. If false , only the seats in the ids array will be affected, and the locked state of other seats will remain unchanged. |
Returns
void
Inherited from
disableSeatsByKeys()
disableSeatsByKeys(
keys
):void
Disables seats by their keys, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
disableSectionsByIds()
disableSectionsByIds(
ids
):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
Inherited from
disableSvgSectionsByIds()
disableSvgSectionsByIds(
ids
,options
?):void
Disables SVG sections by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Inherited from
Renderer
.disableSvgSectionsByIds
disableSvgSectionsByNames()
disableSvgSectionsByNames(
names
,options
?):void
Disables SVG sections by their names.
Parameters
Parameter | Type | Description |
---|---|---|
names |
string [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Inherited from
Renderer
.disableSvgSectionsByNames
enableSeatsByIds()
enableSeatsByIds(
ids
):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
enableSectionsByIds()
enableSectionsByIds():
void
Returns
void
Inherited from
enableSvgSectionsByIds()
enableSvgSectionsByIds(
ids
):void
Enables SVG sections by their IDs.
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
Inherited from
Renderer
.enableSvgSectionsByIds
enableSvgSectionsByNames()
enableSvgSectionsByNames(
names
):void
Enables SVG sections by their names.
Parameters
Parameter | Type |
---|---|
names |
string [] |
Returns
void
Inherited from
Renderer
.enableSvgSectionsByNames
filterSeatsByIds()
filterSeatsByIds(
ids
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
filterSeatsByKeys()
filterSeatsByKeys(
keys
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
filterSvgSectionsByIds()
filterSvgSectionsByIds(
ids
,options
?):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
options ? |
{ resetAll : boolean ; } |
options.resetAll ? |
boolean |
Returns
void
Inherited from
Renderer
.filterSvgSectionsByIds
getCart()
getCart():
ICart
Gets the current cart state.
Returns
Returns selected seats and GA ticket count
Remarks
Seatmap.pro doesn’t support any session mechanisms. Cart is always should be stored on the ticketing system side. For the state management reasons, the Renderer has internal selected seat representation.
Example
Example of cart object:
var cart = {
seats: [
{ id: 1389563, key: 'Section 1;;5;;14', price: 100 },
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
Inherited from
getCategoryColor()
getCategoryColor(
category
):undefined
|string
Returns category’s color
Parameters
Parameter | Type | Description |
---|---|---|
category |
number |
Category number |
Returns
undefined
| string
Inherited from
getHeight()
getHeight():
number
Gets the height of the renderer.
Returns
number
The height in pixels
Inherited from
getMarkedSeatsIds()
getMarkedSeatsIds():
number
[]
Gets the IDs of all marked seats.
Returns
number
[]
The IDs of marked seats
Inherited from
getMaxZoom()
getMaxZoom():
number
Gets the maximum allowed zoom level.
Returns
number
Inherited from
getMinZoom()
getMinZoom():
number
Gets the minimum allowed zoom level.
Returns
number
Inherited from
getMode()
getMode():
undefined
|string
Returns
undefined
| string
Inherited from
getPrices()
getPrices():
IColoredPrice
[]
Gets all available prices.
Returns
Array of available prices
Example
Example of return value:
[
{ id: 63, name: '100', color: '#9C27B0' },
{ id: 64, name: '200', color: '#2196F3' }
];
Inherited from
getRowById()
getRowById(
id
):IRowDTO
Parameters
Parameter | Type |
---|---|
id |
number |
Returns
IRowDTO
Row data
Inherited from
getRows()
getRows():
IRowDTO
[]
Returns
IRowDTO
[]
Rows data array
Inherited from
getSeatIds()
getSeatIds(
seats
):number
[]
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
number
[]
Inherited from
getSeats()
getSeats():
ISeatDTO
[]
Gets all seats in the venue.
Returns
ISeatDTO
[]
Seats data array
Inherited from
getSeatSelection()
getSeatSelection():
IExtendedSeat
[]
Returns selected seats
Returns
Inherited from
getSections()
getSections():
ISector
[]
Returns sections info
Returns
ISector
[]
Inherited from
getSectionsWithCoords()
getSectionsWithCoords():
ISectionWithCoords
[]
Returns
Inherited from
Renderer
.getSectionsWithCoords
getSelectedGa()
getSelectedGa():
undefined
|ISector
Returns
undefined
| ISector
Inherited from
getSvgSectionBySelection()
getSvgSectionBySelection():
ISectorDTO
[]
Gets SVG sections by the current selection.
Returns
ISectorDTO
[]
The selected SVG sections
Inherited from
Renderer
.getSvgSectionBySelection
getVisibleSeats()
getVisibleSeats():
ISeat
[]
Returns only visible seats with coords relative to canvas
Returns
ISeat
[]
Inherited from
getWidth()
getWidth():
number
Gets the width of the renderer.
Returns
number
The width in pixels
Inherited from
getZoom()
getZoom():
number
Gets the current zoom level.
Returns
number
Inherited from
highlightSector()
highlightSector(
id
):void
Parameters
Parameter | Type |
---|---|
id |
undefined | number |
Returns
void
Inherited from
initCart()
initCart(
cart
):void
Initializes the cart with the provided cart data.
Parameters
Parameter | Type | Description |
---|---|---|
cart |
ICart |
Cart state |
Returns
void
Remarks
In a case of page reload you should initialize the saved state with this method.
Cart initialization is available right after component initialization.
Sales page must save the cart state in the given format to support the page reload feature.
Example
var cart = {
seats: [
{
id: 1389563,
key: 'Section 1;;5;;14',
price: 100
},
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
renderer.initCart(cart);
Inherited from
loadEvent()
loadEvent(
eventId
):Promise
<void
>
Loads event’s schema
Parameters
Parameter | Type | Description |
---|---|---|
eventId |
string |
Event ID |
Returns
Promise
<void
>
A promise that resolves when the data fetching is completed
Example
var eventId = 'a4a75361-7823-4847-bf22-336843022e80';
renderer.loadEvent(eventId).then(function() {
renderer.initCart(cart);
});
// Or with the onSchemaDataLoaded event
var renderer = new SeatmapAdminRenderer(element, {
publicKey: 'your-public-key',
onSchemaDataLoaded: function() {
console.log('Schema data loaded successfully');
// Perform actions after schema is fully loaded
}
});
renderer.loadEvent(eventId);
loadSchema()
loadSchema(
schemaId
):Promise
<void
>
Loads schema by id
Parameters
Parameter | Type | Description |
---|---|---|
schemaId |
number |
Schema ID |
Returns
Promise
<void
>
A promise that resolves when the data fetching is completed
Example
var schemaId = 100500;
renderer.loadSchema(schemaId).then(function() { ... });
// Or with the onSchemaDataLoaded event
var renderer = new SeatmapAdminRenderer(element, {
publicKey: 'your-public-key',
onSchemaDataLoaded: function() {
console.log('Schema data loaded successfully');
// Perform actions after schema is fully loaded
}
});
renderer.loadSchema(schemaId);
removeFilter()
removeFilter(
ids
?):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids ? |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
removeFilterSvgSectionsByIds()
removeFilterSvgSectionsByIds(
ids
?):void
Parameters
Parameter | Type |
---|---|
ids ? |
number [] |
Returns
void
Inherited from
Renderer
.removeFilterSvgSectionsByIds
removeGaFromCart()
removeGaFromCart(
removedGa
):void
Removes a general admission ticket from the cart.
Parameters
Parameter | Type | Description |
---|---|---|
removedGa |
IRemovedCartGa |
removed GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom remove GA seats control.
You can remove GA from cart.
Example
renderer.removeGaFromCart({
sectorId: 100500,
price: 200
});
Inherited from
removeSeatsFromCartByIds()
removeSeatsFromCartByIds(
ids
):void
Removes seats from the cart by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
Renderer
.removeSeatsFromCartByIds
removeSeatsFromCartByKeys()
removeSeatsFromCartByKeys(
keys
):void
Removes seats from internal cart.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
Renderer
.removeSeatsFromCartByKeys
resetCategories()
resetCategories():
void
Returns
void
Inherited from
seatKeysToIds()
seatKeysToIds(
keys
):number
[]
Converts seat keys to seat IDs.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
number
[]
Inherited from
seatToExtendedSeat()
seatToExtendedSeat(
seat
):IExtendedSeat
Parameters
Parameter | Type |
---|---|
seat |
ISeat |
Returns
Inherited from
setExternalPrices()
setExternalPrices(
seatsPrices
?):void
Sets external price information for seats.
Parameters
Parameter | Type |
---|---|
seatsPrices ? |
ISeatPriceScheme [] |
Returns
void
Remarks
In case you need to use prices from external resources
you should execute this method.
External prices can be passed as an argument or as
a seatsPrices
property within the settings.
Inherited from
setGaCategory()
setGaCategory(
sectionId
,category
):void
Parameters
Parameter | Type |
---|---|
sectionId |
number |
category |
undefined | number |
Returns
void
Inherited from
setGroupSize()
setGroupSize(
groupSize
):void
Sets the group size for group selection.
Parameters
Parameter | Type | Description |
---|---|---|
groupSize |
number |
The size of the group |
Returns
void
Inherited from
setHeight()
setHeight(
height
):void
Parameters
Parameter | Type |
---|---|
height |
number |
Returns
void
Inherited from
setMode()
setMode(
mode
):boolean
Sets the interaction mode for the component and updates visibility of the outline layer.
Parameters
Parameter | Type | Description |
---|---|---|
mode |
string |
The interaction mode to set. When set to ‘pan’, the outline layer is hidden. For any other mode, the outline layer is shown. |
Returns
boolean
A boolean indicating whether the mode change was successful. Returns true if the outline layer exists and the mode was set. Returns false if the outline layer doesn’t exist.
Example
// Set mode to 'pan' - will hide outline layer
component.setMode('pan');
// Set mode to 'select' - will show outline layer
component.setMode('select');
Overrides
setSeatsCategory()
setSeatsCategory(
seats
,category
,color
?):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
category |
number |
color ? |
string |
Returns
void
Inherited from
setSeatSelection()
setSeatSelection(
seats
):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
void
Inherited from
setSectionSelection()
setSectionSelection(
sections
?):void
Parameters
Parameter | Type |
---|---|
sections ? |
number [] | string [] |
Returns
void
Inherited from
setSelectedGa()
setSelectedGa(
ga
?):void
Parameters
Parameter | Type |
---|---|
ga ? |
string | number |
Returns
void
Inherited from
updateSeatLocks()
updateSeatLocks(
filter
):void
Updates the lock status of seats based on the provided filter.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
SeatFilter |
Function should return true for seats to lock |
Returns
void
Example
For example, you can create handler to prevent selection of seats with different special state:
const handleCartChange = (cart, prevCart) => {
if (!cart.seats.length) {
// Unlock all the seats if the cart is empty
renderer.updateSeatLocks(s => false);
} else if (!prevCart || !prevCart.seats.length) {
// Lock seats with different special state
const seat = cart.seats[0];
renderer.updateSeatLocks(
s => (s.special && s.special.s1) !== (seat.special && seat.special.s1)
);
}
};
Inherited from
viewSection()
viewSection(
section
):void
Parameters
Parameter | Type |
---|---|
section |
ISection |
Returns
void
Inherited from
zoomIn()
zoomIn():
void
Increases the zoom level by one step.
Returns
void
Inherited from
zoomOut()
zoomOut():
void
Decreases the zoom level by one step.
Returns
void
Inherited from
zoomToFit()
zoomToFit():
void
Adjusts the zoom level to fit the entire venue in the viewport.
Returns
void
Inherited from
SeatmapBookingRenderer
Booking Renderer class for seatmap booking. Extends the base Renderer with booking-specific functionality.
Extends
Constructors
new SeatmapBookingRenderer()
new SeatmapBookingRenderer(
element
,settings
?,tags
?):SeatmapBookingRenderer
Creates a new instance of the SeatmapBookingRenderer.
Initializes the renderer by setting up the base configuration, API client, and analytics. The API endpoint URL is determined based on the environment setting.
Parameters
Parameter | Type | Description |
---|---|---|
element |
HTMLElement |
DOM element that will be a host element for the Renderer |
settings ? |
IBookingRendererSettings |
Optional configuration settings for the renderer |
tags ? |
any |
Optional tags for analytics tracking |
Returns
Throws
Throws an error if the public key is undefined
Overrides
Methods
addGaToCart()
addGaToCart(
ga
):void
Adds a general admission ticket to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
ga |
ICartGa |
GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom add GA seats control.
You can add desired quantity of GA tickets to the cart.
Example
renderer.addGaToCart({
id: 100500,
key: 'Table 2',
price: 200,
// quantity of GA tickets
count: 3
});
Inherited from
addSeatsToCart()
addSeatsToCart(
seats
):void
Adds seats to the cart.
Parameters
Parameter | Type | Description |
---|---|---|
seats |
ICartSeat [] |
Array of seats to add |
Returns
void
Remarks
This method is optional. In a common scenario the user adds available seats by clicking on them.
Example
renderer.addSeatsToCart([
{
id: 803,
key: 'Section 3;;3;;1',
price: 500
}
]);
Inherited from
clearCart()
clearCart():
void
Clears all items from the cart.
Returns
void
Inherited from
clearSectorHighlight()
clearSectorHighlight():
void
Returns
void
Inherited from
destroy()
destroy():
void
Destroys the renderer instance, cleaning up all resources.
Returns
void
Inherited from
disableSeatsByIds()
disableSeatsByIds(
ids
,options
?):void
Disables seats by their IDs, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
options ? |
{ resetAll : boolean ; } |
Optional configuration object. |
options.resetAll ? |
boolean |
If true (default), all seats not in the ids array will be unlocked. If false , only the seats in the ids array will be affected, and the locked state of other seats will remain unchanged. |
Returns
void
Inherited from
disableSeatsByKeys()
disableSeatsByKeys(
keys
):void
Disables seats by their keys, making them unavailable for selection.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
disableSectionsByIds()
disableSectionsByIds(
ids
):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
Inherited from
disableSvgSectionsByIds()
disableSvgSectionsByIds(
ids
,options
?):void
Disables SVG sections by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Inherited from
Renderer
.disableSvgSectionsByIds
disableSvgSectionsByNames()
disableSvgSectionsByNames(
names
,options
?):void
Disables SVG sections by their names.
Parameters
Parameter | Type | Description |
---|---|---|
names |
string [] |
- |
options ? |
{ resetAll : boolean ; } |
Optional configuration |
options.resetAll ? |
boolean |
Whether to reset all sections before disabling |
Returns
void
Inherited from
Renderer
.disableSvgSectionsByNames
enableSeatsByIds()
enableSeatsByIds(
ids
):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
enableSectionsByIds()
enableSectionsByIds():
void
Returns
void
Inherited from
enableSvgSectionsByIds()
enableSvgSectionsByIds(
ids
):void
Enables SVG sections by their IDs.
Parameters
Parameter | Type |
---|---|
ids |
number [] |
Returns
void
Inherited from
Renderer
.enableSvgSectionsByIds
enableSvgSectionsByNames()
enableSvgSectionsByNames(
names
):void
Enables SVG sections by their names.
Parameters
Parameter | Type |
---|---|
names |
string [] |
Returns
void
Inherited from
Renderer
.enableSvgSectionsByNames
filterSeatsByIds()
filterSeatsByIds(
ids
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
filterSeatsByKeys()
filterSeatsByKeys(
keys
):void
Marks seats as filtered.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
filterSvgSectionsByIds()
filterSvgSectionsByIds(
ids
,options
?):void
Parameters
Parameter | Type |
---|---|
ids |
number [] |
options ? |
{ resetAll : boolean ; } |
options.resetAll ? |
boolean |
Returns
void
Inherited from
Renderer
.filterSvgSectionsByIds
getCart()
getCart():
ICart
Gets the current cart state.
Returns
Returns selected seats and GA ticket count
Remarks
Seatmap.pro doesn’t support any session mechanisms. Cart is always should be stored on the ticketing system side. For the state management reasons, the Renderer has internal selected seat representation.
Example
Example of cart object:
var cart = {
seats: [
{ id: 1389563, key: 'Section 1;;5;;14', price: 100 },
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
Inherited from
getCategoryColor()
getCategoryColor(
category
):undefined
|string
Returns category’s color
Parameters
Parameter | Type | Description |
---|---|---|
category |
number |
Category number |
Returns
undefined
| string
Inherited from
getHeight()
getHeight():
number
Gets the height of the renderer.
Returns
number
The height in pixels
Inherited from
getMarkedSeatsIds()
getMarkedSeatsIds():
number
[]
Gets the IDs of all marked seats.
Returns
number
[]
The IDs of marked seats
Inherited from
getMaxZoom()
getMaxZoom():
number
Gets the maximum allowed zoom level.
Returns
number
Inherited from
getMinZoom()
getMinZoom():
number
Gets the minimum allowed zoom level.
Returns
number
Inherited from
getMode()
getMode():
undefined
|string
Returns
undefined
| string
Inherited from
getPrices()
getPrices():
IColoredPrice
[]
Gets all available prices.
Returns
Array of available prices
Example
Example of return value:
[
{ id: 63, name: '100', color: '#9C27B0' },
{ id: 64, name: '200', color: '#2196F3' }
];
Inherited from
getRowById()
getRowById(
id
):IRowDTO
Parameters
Parameter | Type |
---|---|
id |
number |
Returns
IRowDTO
Row data
Inherited from
getRows()
getRows():
IRowDTO
[]
Returns
IRowDTO
[]
Rows data array
Inherited from
getSeatIds()
getSeatIds(
seats
):number
[]
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
number
[]
Inherited from
getSeats()
getSeats():
ISeatDTO
[]
Gets all seats in the venue.
Returns
ISeatDTO
[]
Seats data array
Inherited from
getSeatSelection()
getSeatSelection():
IExtendedSeat
[]
Returns selected seats
Returns
Inherited from
getSections()
getSections():
ISector
[]
Returns sections info
Returns
ISector
[]
Inherited from
getSectionsWithCoords()
getSectionsWithCoords():
ISectionWithCoords
[]
Returns
Inherited from
Renderer
.getSectionsWithCoords
getSelectedGa()
getSelectedGa():
undefined
|ISector
Returns
undefined
| ISector
Inherited from
getSvgSectionBySelection()
getSvgSectionBySelection():
ISectorDTO
[]
Gets SVG sections by the current selection.
Returns
ISectorDTO
[]
The selected SVG sections
Inherited from
Renderer
.getSvgSectionBySelection
getVisibleSeats()
getVisibleSeats():
ISeat
[]
Returns only visible seats with coords relative to canvas
Returns
ISeat
[]
Inherited from
getWidth()
getWidth():
number
Gets the width of the renderer.
Returns
number
The width in pixels
Inherited from
getZoom()
getZoom():
number
Gets the current zoom level.
Returns
number
Inherited from
highlightSector()
highlightSector(
id
):void
Parameters
Parameter | Type |
---|---|
id |
undefined | number |
Returns
void
Inherited from
initCart()
initCart(
cart
):void
Initializes the cart with the provided cart data.
Parameters
Parameter | Type | Description |
---|---|---|
cart |
ICart |
Cart state |
Returns
void
Remarks
In a case of page reload you should initialize the saved state with this method.
Cart initialization is available right after component initialization.
Sales page must save the cart state in the given format to support the page reload feature.
Example
var cart = {
seats: [
{
id: 1389563,
key: 'Section 1;;5;;14',
price: 100
},
{ key: 'Table 3;;1;;1', price: 500 },
{ key: 'Section 2;;5;;1', price: 200 }
],
ga: [
{
id: 100500,
key: 'Table 2',
price: 200,
count: 1
},
{ key: 'Section 5', price: 100, count: 2 }
]
};
renderer.initCart(cart);
Inherited from
loadEvent()
loadEvent(
eventId
,sectorId
?):Promise
<void
>
Loads event’s schema and prices.
Fetches the schema, prices, and row SVG data for the specified event. Initializes analytics tracking and sets up event handlers for user interactions.
Parameters
Parameter | Type | Description |
---|---|---|
eventId |
string |
Event GUID to load |
sectorId ? |
number |
Optional sector ID to show only a specific sector |
Returns
Promise
<void
>
A promise that resolves when the data fetching is completed
Example
var eventId = 'a4a75361-7823-4847-bf22-336843022e80';
renderer.loadEvent(eventId).then(function() {
renderer.initCart(cart);
});
// Or with the onSchemaDataLoaded event
var renderer = new SeatmapBookingRenderer(element, {
publicKey: 'your-public-key',
onSchemaDataLoaded: function() {
console.log('Schema data loaded successfully');
renderer.initCart(cart);
}
});
renderer.loadEvent(eventId);
removeFilter()
removeFilter(
ids
?):void
Marks disabled seats as available.
Parameters
Parameter | Type | Description |
---|---|---|
ids ? |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
removeFilterSvgSectionsByIds()
removeFilterSvgSectionsByIds(
ids
?):void
Parameters
Parameter | Type |
---|---|
ids ? |
number [] |
Returns
void
Inherited from
Renderer
.removeFilterSvgSectionsByIds
removeGaFromCart()
removeGaFromCart(
removedGa
):void
Removes a general admission ticket from the cart.
Parameters
Parameter | Type | Description |
---|---|---|
removedGa |
IRemovedCartGa |
removed GA cart item |
Returns
void
Remarks
This method can be used when onSectorClick
was fired
and developer wants to handle custom remove GA seats control.
You can remove GA from cart.
Example
renderer.removeGaFromCart({
sectorId: 100500,
price: 200
});
Inherited from
removeSeatsFromCartByIds()
removeSeatsFromCartByIds(
ids
):void
Removes seats from the cart by their IDs.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
number [] |
Array of internal seat IDs |
Returns
void
Inherited from
Renderer
.removeSeatsFromCartByIds
removeSeatsFromCartByKeys()
removeSeatsFromCartByKeys(
keys
):void
Removes seats from internal cart.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
void
Inherited from
Renderer
.removeSeatsFromCartByKeys
resetCategories()
resetCategories():
void
Returns
void
Inherited from
seatKeysToIds()
seatKeysToIds(
keys
):number
[]
Converts seat keys to seat IDs.
Parameters
Parameter | Type | Description |
---|---|---|
keys |
string [] |
Array of composite seat keys |
Returns
number
[]
Inherited from
seatToExtendedSeat()
seatToExtendedSeat(
seat
):IExtendedSeat
Parameters
Parameter | Type |
---|---|
seat |
ISeat |
Returns
Inherited from
setExternalPrices()
setExternalPrices(
seatsPrices
?):void
Sets external price information for seats.
Parameters
Parameter | Type |
---|---|
seatsPrices ? |
ISeatPriceScheme [] |
Returns
void
Remarks
In case you need to use prices from external resources
you should execute this method.
External prices can be passed as an argument or as
a seatsPrices
property within the settings.
Inherited from
setGaCategory()
setGaCategory(
sectionId
,category
):void
Parameters
Parameter | Type |
---|---|
sectionId |
number |
category |
undefined | number |
Returns
void
Inherited from
setGroupSize()
setGroupSize(
groupSize
):void
Sets the group size for group selection.
Parameters
Parameter | Type | Description |
---|---|---|
groupSize |
number |
The size of the group |
Returns
void
Inherited from
setHeight()
setHeight(
height
):void
Parameters
Parameter | Type |
---|---|
height |
number |
Returns
void
Inherited from
setMode()
setMode(
mode
):boolean
Sets the interaction mode for the renderer.
Parameters
Parameter | Type | Description |
---|---|---|
mode |
string |
The mode to set |
Returns
boolean
Whether the mode was set successfully
Inherited from
setSeatsCategory()
setSeatsCategory(
seats
,category
,color
?):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
category |
number |
color ? |
string |
Returns
void
Inherited from
setSeatSelection()
setSeatSelection(
seats
):void
Parameters
Parameter | Type |
---|---|
seats |
number [] | string [] | ISeat [] |
Returns
void
Inherited from
setSectionSelection()
setSectionSelection(
sections
?):void
Parameters
Parameter | Type |
---|---|
sections ? |
number [] | string [] |
Returns
void
Inherited from
setSelectedGa()
setSelectedGa(
ga
?):void
Parameters
Parameter | Type |
---|---|
ga ? |
string | number |
Returns
void
Inherited from
updateSeatLocks()
updateSeatLocks(
filter
):void
Updates the lock status of seats based on the provided filter.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
SeatFilter |
Function should return true for seats to lock |
Returns
void
Example
For example, you can create handler to prevent selection of seats with different special state:
const handleCartChange = (cart, prevCart) => {
if (!cart.seats.length) {
// Unlock all the seats if the cart is empty
renderer.updateSeatLocks(s => false);
} else if (!prevCart || !prevCart.seats.length) {
// Lock seats with different special state
const seat = cart.seats[0];
renderer.updateSeatLocks(
s => (s.special && s.special.s1) !== (seat.special && seat.special.s1)
);
}
};
Inherited from
viewSection()
viewSection(
section
):void
Parameters
Parameter | Type |
---|---|
section |
ISection |
Returns
void
Inherited from
zoomIn()
zoomIn():
void
Increases the zoom level by one step.
Returns
void
Inherited from
zoomOut()
zoomOut():
void
Decreases the zoom level by one step.
Returns
void
Inherited from
zoomToFit()
zoomToFit():
void
Adjusts the zoom level to fit the entire venue in the viewport.
Returns
void
Inherited from
Interfaces
IAdminRendererSettings
Configuration settings for the renderer. Defines various options that control the behavior and appearance of the renderer.
Extends
Properties
Property | Type | Description | Overrides | Inherited from |
---|---|---|---|---|
backgroundLoadStepTime? |
number |
Delay time for loading the next background in milliseconds. | - | IRendererSettings .backgroundLoadStepTime |
baseUrl? |
string |
Custom API base URL that overrides the environment-based URL. | - | - |
debounceDelay? |
number |
Delay in milliseconds for debounced events. | - | IRendererSettings .debounceDelay |
disableZoomToEmptySpace? |
boolean |
If true, disables zoom when clicking on empty space. | - | IRendererSettings .disableZoomToEmptySpace |
env? |
string |
Environment setting that determines which API endpoint to use. Can be ’local’, ‘stage’, or ‘production’ (default). | IRendererSettings .env |
- |
groupSize? |
number |
Number of seats to select as a group. | - | IRendererSettings .groupSize |
height? |
number |
Fixed height for the renderer in pixels. | - | IRendererSettings .height |
hideSeats? |
boolean |
If true, hides all seats from view. | - | IRendererSettings .hideSeats |
initialPadding? |
number |
Initial padding around the venue when first loaded. | - | IRendererSettings .initialPadding |
lockedSeatsFilter? |
(seat : ISeat ) => boolean |
- | - | IRendererSettings .lockedSeatsFilter |
onBeforeSeatDraw? |
(event : IBeforeSeatDrawEvent ) => ISeatStyle |
You can control seats’ styling by returning custom style for each seat | - | IRendererSettings .onBeforeSeatDraw |
onCartChange? |
(cart : ICart , prevCart ?: ICart ) => void |
Fires when the cart was modified. Remarks Cart state is passed as a param to the handler (see ICart). | - | IRendererSettings .onCartChange |
onPan? |
(delta : IPoint , isFinish ?: boolean ) => void |
Fires while panning. | - | IRendererSettings .onPan |
onRedrawEnd? |
() => void |
Fires when component full redrawing ends. | - | IRendererSettings .onRedrawEnd |
onRedrawStart? |
() => void |
Fires when component full redrawing starts. | - | IRendererSettings .onRedrawStart |
onSchemaDataLoaded? |
() => void |
Fires when schema data has been successfully loaded and processed. Remarks This event is triggered after the schema data is fully loaded and all internal processing is complete. It can be used to perform actions that depend on the schema being fully initialized. | - | IRendererSettings .onSchemaDataLoaded |
onSeatDebouncedEnter? |
(seat : IExtendedSeat ) => void |
Same as onSeatMouseEnter but with debounce. Remarks Seat is passed as a param to the handler (see IExtendedSeat). |
- | IRendererSettings .onSeatDebouncedEnter |
onSeatDeselect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
Fires when the user deselects a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat deselection you can return false or Promise resolving to false . |
- | IRendererSettings .onSeatDeselect |
onSeatMouseEnter? |
(seat : IExtendedSeat ) => void |
Rises when the mouse pointer moves above a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). | - | IRendererSettings .onSeatMouseEnter |
onSeatMouseLeave? |
() => void |
Fires when the mouse pointer leaves a seat. | - | IRendererSettings .onSeatMouseLeave |
onSeatsDeselect? |
(seats : ISeat []) => void |
Fires when the user deselects a seat or seats. Remarks Seats are passed as a param to the handler (see ISeat). | - | IRendererSettings .onSeatsDeselect |
onSeatSelect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
Fires when the user marks a seat as selected. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat selection you can return false or Promise resolving to false . |
- | IRendererSettings .onSeatSelect |
onSeatSelectionChange? |
() => void |
Fires after seat selection was updated. | - | IRendererSettings .onSeatSelectionChange |
onSeatsSelect? |
(seats : ISeat []) => void |
Fires when the user marks a seat or seats as selected. Remarks Seats are passed as a param to the handler (see ISeat). | - | IRendererSettings .onSeatsSelect |
onSeatsSelectionChange? |
(seats : ISeat []) => void |
Fires after seats selection was updated. | - | IRendererSettings .onSeatsSelectionChange |
onSectionClick? |
(section : ISection ) => void |
Fires when the user clicks on a section. Remarks Section is passed as a param to the handler (see ISection). | - | IRendererSettings .onSectionClick |
onSectorClick? |
(section : ISection ) => void |
Fires when the user clicks on a section. Deprecated Use onSectionClick instead | - | IRendererSettings .onSectorClick |
onSectorMouseEnter? |
(section : ISection ) => void |
Fires when the mouse pointer moves above a section. Remarks Section is passed as a param to the handler (see ISection). | - | IRendererSettings .onSectorMouseEnter |
onSectorMouseLeave? |
() => void |
Fires when the mouse pointer leaves a section. | - | IRendererSettings .onSectorMouseLeave |
onZoomEnd? |
(newZoom : number , oldZoom ?: number ) => void |
Fires after the zoom animation ended. | - | IRendererSettings .onZoomEnd |
onZoomStart? |
(newZoom : number , oldZoom : number ) => void |
Fires before the zoom animation started. | - | IRendererSettings .onZoomStart |
padding? |
number |
Padding around the venue during normal operation. | - | IRendererSettings .padding |
publicKey? |
string |
Public API key for authentication. | - | - |
seatSelectionMinZoom? |
number |
Minimum zoom level required to enable seat selection. | - | IRendererSettings .seatSelectionMinZoom |
seatsPrices? |
ISeatPriceScheme [] |
External price information for seats. | - | IRendererSettings .seatsPrices |
selectionLimit? |
number |
Maximum number of seats that can be selected. | - | IRendererSettings .selectionLimit |
showOutlineLayerOnAnimation? |
boolean |
If true, shows the outline layer during animations. | - | IRendererSettings .showOutlineLayerOnAnimation |
showRows? |
boolean |
If true, shows row labels. | - | IRendererSettings .showRows |
showUnavailableOutlines? |
boolean |
If true, shows outlines for unavailable seats. | - | IRendererSettings .showUnavailableOutlines |
switchToWebGL? |
boolean |
If true, uses WebGL for rendering instead of Canvas. | - | IRendererSettings .switchToWebGL |
theme? |
IRendererTheme |
Theme settings for the renderer. | - | IRendererSettings .theme |
transformAnimationDuration? |
number |
Duration of transform animations in milliseconds. | - | IRendererSettings .transformAnimationDuration |
zoomAnimationDuration? |
number |
Duration of zoom animations in milliseconds. | - | IRendererSettings .zoomAnimationDuration |
IBaseSeat
Base interface for seat properties.
Extended by
Properties
IBaseSector
Base interface for sector properties.
Extended by
Properties
IBeforeSeatDrawEvent
Interface for the event data passed to the onBeforeSeatDraw callback. Contains information about the seat being drawn and its current state.
Properties
Property | Type | Description |
---|---|---|
context |
Context |
The rendering context. |
seat |
ISeat |
The seat being drawn. |
state |
SeatInteractionState |
The current interaction state of the seat. |
style |
ISeatStyle |
The default style that will be applied to the seat. |
IBookingRendererSettings
Configuration settings for the renderer. Defines various options that control the behavior and appearance of the renderer.
Extends
Properties
Property | Type | Default value | Description | Overrides | Inherited from |
---|---|---|---|---|---|
backgroundLoadStepTime? |
number |
0 |
Sets the delay time for loading the next background. | IRendererSettings .backgroundLoadStepTime |
- |
baseUrl? |
string |
undefined |
Custom API base URL that overrides the environment-based URL. | - | - |
debounceDelay? |
number |
undefined |
Delay in milliseconds for debounced events. | - | IRendererSettings .debounceDelay |
disableZoomToEmptySpace? |
boolean |
false |
If set to true , zoom is disabled when clicking into empty space. |
IRendererSettings .disableZoomToEmptySpace |
- |
env? |
string |
undefined |
Environment setting that determines which API endpoint to use. Can be ’local’, ‘stage’, or ‘production’ (default). | IRendererSettings .env |
- |
groupSize? |
number |
undefined |
Number of seats to select as a group. | - | IRendererSettings .groupSize |
height? |
number |
undefined |
Fixed height for the renderer in pixels. | - | IRendererSettings .height |
hideSeats? |
boolean |
undefined |
If true, hides all seats from view. | - | IRendererSettings .hideSeats |
initialPadding? |
number |
undefined |
Initial padding around the venue when first loaded. | - | IRendererSettings .initialPadding |
lockedSeatsFilter? |
(seat : ISeat ) => boolean |
undefined |
- | - | IRendererSettings .lockedSeatsFilter |
onBeforeSeatDraw? |
(event : IBeforeSeatDrawEvent ) => ISeatStyle |
undefined |
You can control seats’ styling by returning custom style for each seat | - | IRendererSettings .onBeforeSeatDraw |
onCartChange? |
(cart : ICart , prevCart ?: ICart ) => void |
undefined |
Fires when the cart was modified. Remarks Cart state is passed as a param to the handler (see ICart). | - | IRendererSettings .onCartChange |
onPan? |
(delta : IPoint , isFinish ?: boolean ) => void |
undefined |
Fires while panning. | - | IRendererSettings .onPan |
onRedrawEnd? |
() => void |
undefined |
Fires when component full redrawing ends. | - | IRendererSettings .onRedrawEnd |
onRedrawStart? |
() => void |
undefined |
Fires when component full redrawing starts. | - | IRendererSettings .onRedrawStart |
onSchemaDataLoaded? |
() => void |
undefined |
Fires when schema data has been successfully loaded and processed. Remarks This event is triggered after the schema data is fully loaded and all internal processing is complete. It can be used to perform actions that depend on the schema being fully initialized. | - | IRendererSettings .onSchemaDataLoaded |
onSeatDebouncedEnter? |
(seat : IExtendedSeat ) => void |
undefined |
Same as onSeatMouseEnter but with debounce. Remarks Seat is passed as a param to the handler (see IExtendedSeat). |
- | IRendererSettings .onSeatDebouncedEnter |
onSeatDeselect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
undefined |
Fires when the user deselects a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat deselection you can return false or Promise resolving to false . |
- | IRendererSettings .onSeatDeselect |
onSeatMouseEnter? |
(seat : IExtendedSeat ) => void |
undefined |
Rises when the mouse pointer moves above a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). | - | IRendererSettings .onSeatMouseEnter |
onSeatMouseLeave? |
() => void |
undefined |
Fires when the mouse pointer leaves a seat. | - | IRendererSettings .onSeatMouseLeave |
onSeatsDeselect? |
(seats : ISeat []) => void |
undefined |
Fires when the user deselects a seat or seats. Remarks Seats are passed as a param to the handler (see ISeat). | - | IRendererSettings .onSeatsDeselect |
onSeatSelect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
undefined |
Fires when the user marks a seat as selected. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat selection you can return false or Promise resolving to false . |
- | IRendererSettings .onSeatSelect |
onSeatSelectionChange? |
() => void |
undefined |
Fires after seat selection was updated. | - | IRendererSettings .onSeatSelectionChange |
onSeatsSelect? |
(seats : ISeat []) => void |
undefined |
Fires when the user marks a seat or seats as selected. Remarks Seats are passed as a param to the handler (see ISeat). | - | IRendererSettings .onSeatsSelect |
onSeatsSelectionChange? |
(seats : ISeat []) => void |
undefined |
Fires after seats selection was updated. | - | IRendererSettings .onSeatsSelectionChange |
onSectionClick? |
(section : ISection ) => void |
undefined |
Fires when the user clicks on a section. Remarks Section is passed as a param to the handler (see ISection). | - | IRendererSettings .onSectionClick |
onSectorClick? |
(section : ISection ) => void |
undefined |
Fires when the user clicks on a section. Deprecated Use onSectionClick instead | - | IRendererSettings .onSectorClick |
onSectorMouseEnter? |
(section : ISection ) => void |
undefined |
Fires when the mouse pointer moves above a section. Remarks Section is passed as a param to the handler (see ISection). | - | IRendererSettings .onSectorMouseEnter |
onSectorMouseLeave? |
() => void |
undefined |
Fires when the mouse pointer leaves a section. | - | IRendererSettings .onSectorMouseLeave |
onZoomEnd? |
(newZoom : number , oldZoom ?: number ) => void |
undefined |
Fires after the zoom animation ended. | - | IRendererSettings .onZoomEnd |
onZoomStart? |
(newZoom : number , oldZoom : number ) => void |
undefined |
Fires before the zoom animation started. | - | IRendererSettings .onZoomStart |
padding? |
number |
undefined |
Padding around the venue during normal operation. | - | IRendererSettings .padding |
publicKey? |
string |
undefined |
Public API key for authentication. | - | - |
seatSelectionMinZoom? |
number |
undefined |
Minimum zoom level required to enable seat selection. | - | IRendererSettings .seatSelectionMinZoom |
seatsPrices? |
ISeatPriceScheme [] |
undefined |
External price information for seats. | - | IRendererSettings .seatsPrices |
selectionLimit? |
number |
undefined |
Maximum number of seats that can be selected. | - | IRendererSettings .selectionLimit |
showOutlineLayerOnAnimation? |
boolean |
undefined |
If true, shows the outline layer during animations. | - | IRendererSettings .showOutlineLayerOnAnimation |
showRows? |
boolean |
undefined |
If true, shows row labels. | - | IRendererSettings .showRows |
showUnavailableOutlines? |
boolean |
undefined |
If true, shows outlines for unavailable seats. | - | IRendererSettings .showUnavailableOutlines |
switchToWebGL? |
boolean |
false |
If set to true, renderer will switch to WebGL. | IRendererSettings .switchToWebGL |
- |
theme? |
IRendererTheme |
undefined |
Theme settings for the renderer. | - | IRendererSettings .theme |
transformAnimationDuration? |
number |
undefined |
Duration of transform animations in milliseconds. | - | IRendererSettings .transformAnimationDuration |
zoomAnimationDuration? |
number |
undefined |
Duration of zoom animations in milliseconds. | - | IRendererSettings .zoomAnimationDuration |
ICart
Interface representing the shopping cart containing selected seats and GA items.
Properties
Property | Type | Description |
---|---|---|
ga |
ICartGa [] |
Array of general admission items in the cart. |
seats |
ICartSeat [] |
Array of selected seats in the cart. |
ICartGa
Interface representing a general admission (GA) item in the shopping cart.
Properties
ICartSeat
Interface representing a seat in the shopping cart.
Extended by
Properties
Property | Type | Description |
---|---|---|
id? |
number |
The unique identifier of the seat. |
key |
string |
The unique key for the seat, typically combining section, row, and seat information. |
price? |
number |
The price of the seat. |
special? |
ISpecialState |
Special state information for the seat. |
IColoredPrice
Extends
Properties
Property | Type | Inherited from |
---|---|---|
color |
string |
- |
id |
IPriceId |
IPrice .id |
name |
string |
IPrice .name |
IExtendedSeat
Extended interface for a seat with additional coordinate and descriptive information. Extends ICartSeat with position and section details.
Extends
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
ax |
number |
The absolute X coordinate of the seat. | - |
ay |
number |
The absolute Y coordinate of the seat. | - |
id? |
number |
The unique identifier of the seat. | ICartSeat .id |
isAccessible? |
boolean |
Whether the seat is accessible for people with disabilities. | - |
key |
string |
The unique key for the seat, typically combining section, row, and seat information. | ICartSeat .key |
price? |
number |
The price of the seat. | ICartSeat .price |
rowNumber |
number |
The row number of the seat. | - |
seatName |
string |
The name or number of the seat. | - |
sectionId |
number |
The ID of the section containing this seat. | - |
sectionName |
string |
The name of the section containing this seat. | - |
sectorId |
number |
The ID of the sector containing this seat. | - |
special? |
ISpecialState |
Special state information for the seat. | ICartSeat .special |
x |
number |
The X coordinate of the seat. | - |
y |
number |
The Y coordinate of the seat. | - |
IPoint
Properties
Property | Modifier | Type |
---|---|---|
x |
readonly |
number |
y |
readonly |
number |
IPrice
Extended by
Properties
Property | Type |
---|---|
id |
IPriceId |
name |
string |
IRemovedCartGa
Interface representing a removed general admission (GA) item from the cart.
Properties
Property | Type | Description |
---|---|---|
price? |
number |
The price of the removed GA item. |
sectorId |
number |
The ID of the sector for the removed GA item. |
IRenderer
Interface for the base Renderer functionality. Defines the core methods and properties that all renderer implementations must provide.
Properties
Property | Type | Description |
---|---|---|
addGaToCart |
(ga : ICartGa ) => void |
Adds a general admission ticket to the cart. |
addSeatsToCart |
(seats : ICartSeat []) => void |
Adds seats to the cart. |
clearCart |
() => void |
Clears all items from the cart. |
destroy |
() => void |
Destroys the renderer instance, cleaning up all resources. |
disableSeatsByIds |
(seatIds : number []) => void |
Disables seats by their IDs, making them unavailable for selection. |
disableSeatsByKeys |
(keys : string []) => void |
Disables seats by their keys, making them unavailable for selection. |
disableSvgSectionsByIds |
(sectionIds : number [], options ?: object ) => void |
Disables SVG sections by their IDs. |
disableSvgSectionsByNames |
(sectionNames : string [], options ?: object ) => void |
Disables SVG sections by their names. |
enableSvgSectionsByIds |
(sectionIds : number []) => void |
Enables SVG sections by their IDs. |
enableSvgSectionsByNames |
(sectionNames : string []) => void |
Enables SVG sections by their names. |
getCart |
() => ICart |
Gets the current cart state. |
getMarkedSeatsIds |
() => number [] |
Gets the IDs of all marked seats. |
getMaxZoom |
() => number |
Gets the maximum allowed zoom level. |
getMinZoom |
() => number |
Gets the minimum allowed zoom level. |
getPrices |
() => IColoredPrice [] |
Gets all available prices. |
getSeats |
() => ISeatDTO [] |
Gets all seats in the venue. |
getSvgSectionBySelection |
() => ISectorDTO [] |
Gets SVG sections by the current selection. |
getZoom |
() => number |
Gets the current zoom level. |
initCart |
(cart : ICart ) => void |
Initializes the cart with the provided cart data. |
removeGaFromCart |
(removedGa : IRemovedCartGa ) => void |
Removes a general admission ticket from the cart. |
removeSeatsFromCartByIds |
(seatIds : number []) => void |
Removes seats from the cart by their IDs. |
seatKeysToIds |
(keys : string []) => number [] |
Converts seat keys to seat IDs. |
setExternalPrices |
(seatsPrices ?: ISeatPriceScheme []) => void |
Sets external price information for seats. |
setGroupSize |
(groupSize : number ) => void |
Sets the group size for group selection. |
updateSeatLocks |
(filter : SeatFilter ) => void |
Updates the lock status of seats based on the provided filter. |
zoomIn |
() => void |
Increases the zoom level by one step. |
zoomOut |
() => void |
Decreases the zoom level by one step. |
zoomToFit |
() => void |
Adjusts the zoom level to fit the entire venue in the viewport. |
IRendererSeatStyleSettings
Properties
Property | Type |
---|---|
default? |
ISeatStyle |
error? |
ISeatStyle |
filtered? |
ISeatStyle |
hovered? |
ISeatStyle |
loading? |
ISeatStyle |
selected? |
ISeatStyle |
unavailable? |
ISeatStyle |
IRendererSettings
Configuration settings for the renderer. Defines various options that control the behavior and appearance of the renderer.
Extended by
Properties
Property | Type | Description |
---|---|---|
backgroundLoadStepTime? |
number |
Delay time for loading the next background in milliseconds. |
debounceDelay? |
number |
Delay in milliseconds for debounced events. |
disableZoomToEmptySpace? |
boolean |
If true, disables zoom when clicking on empty space. |
env? |
string |
Environment setting that determines which API endpoint to use. Can be ’local’, ‘stage’, or ‘production’ (default). |
groupSize? |
number |
Number of seats to select as a group. |
height? |
number |
Fixed height for the renderer in pixels. |
hideSeats? |
boolean |
If true, hides all seats from view. |
initialPadding? |
number |
Initial padding around the venue when first loaded. |
lockedSeatsFilter? |
(seat : ISeat ) => boolean |
- |
onBeforeSeatDraw? |
(event : IBeforeSeatDrawEvent ) => ISeatStyle |
You can control seats’ styling by returning custom style for each seat |
onCartChange? |
(cart : ICart , prevCart ?: ICart ) => void |
Fires when the cart was modified. Remarks Cart state is passed as a param to the handler (see ICart). |
onPan? |
(delta : IPoint , isFinish ?: boolean ) => void |
Fires while panning. |
onRedrawEnd? |
() => void |
Fires when component full redrawing ends. |
onRedrawStart? |
() => void |
Fires when component full redrawing starts. |
onSchemaDataLoaded? |
() => void |
Fires when schema data has been successfully loaded and processed. Remarks This event is triggered after the schema data is fully loaded and all internal processing is complete. It can be used to perform actions that depend on the schema being fully initialized. |
onSeatDebouncedEnter? |
(seat : IExtendedSeat ) => void |
Same as onSeatMouseEnter but with debounce. Remarks Seat is passed as a param to the handler (see IExtendedSeat). |
onSeatDeselect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
Fires when the user deselects a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat deselection you can return false or Promise resolving to false . |
onSeatMouseEnter? |
(seat : IExtendedSeat ) => void |
Rises when the mouse pointer moves above a seat. Remarks Seat is passed as a param to the handler (see IExtendedSeat). |
onSeatMouseLeave? |
() => void |
Fires when the mouse pointer leaves a seat. |
onSeatsDeselect? |
(seats : ISeat []) => void |
Fires when the user deselects a seat or seats. Remarks Seats are passed as a param to the handler (see ISeat). |
onSeatSelect? |
(seat : IExtendedSeat ) => boolean | void | Promise <boolean | void > |
Fires when the user marks a seat as selected. Remarks Seat is passed as a param to the handler (see IExtendedSeat). To cancel seat selection you can return false or Promise resolving to false . |
onSeatSelectionChange? |
() => void |
Fires after seat selection was updated. |
onSeatsSelect? |
(seats : ISeat []) => void |
Fires when the user marks a seat or seats as selected. Remarks Seats are passed as a param to the handler (see ISeat). |
onSeatsSelectionChange? |
(seats : ISeat []) => void |
Fires after seats selection was updated. |
onSectionClick? |
(section : ISection ) => void |
Fires when the user clicks on a section. Remarks Section is passed as a param to the handler (see ISection). |
onSectorClick? |
(section : ISection ) => void |
Fires when the user clicks on a section. Deprecated Use onSectionClick instead |
onSectorMouseEnter? |
(section : ISection ) => void |
Fires when the mouse pointer moves above a section. Remarks Section is passed as a param to the handler (see ISection). |
onSectorMouseLeave? |
() => void |
Fires when the mouse pointer leaves a section. |
onZoomEnd? |
(newZoom : number , oldZoom ?: number ) => void |
Fires after the zoom animation ended. |
onZoomStart? |
(newZoom : number , oldZoom : number ) => void |
Fires before the zoom animation started. |
padding? |
number |
Padding around the venue during normal operation. |
seatSelectionMinZoom? |
number |
Minimum zoom level required to enable seat selection. |
seatsPrices? |
ISeatPriceScheme [] |
External price information for seats. |
selectionLimit? |
number |
Maximum number of seats that can be selected. |
showOutlineLayerOnAnimation? |
boolean |
If true, shows the outline layer during animations. |
showRows? |
boolean |
If true, shows row labels. |
showUnavailableOutlines? |
boolean |
If true, shows outlines for unavailable seats. |
switchToWebGL? |
boolean |
If true, uses WebGL for rendering instead of Canvas. |
theme? |
IRendererTheme |
Theme settings for the renderer. |
transformAnimationDuration? |
number |
Duration of transform animations in milliseconds. |
zoomAnimationDuration? |
number |
Duration of zoom animations in milliseconds. |
IRendererSvgSectionStylesSetting
Properties
Property | Type |
---|---|
default? |
Pick <ISvgSectionStyle , "sectionName" | "stroke" | "cursor" > |
filtered? |
ISvgSectionStyle |
hovered? |
ISvgSectionStyle |
selected? |
ISvgSectionStyle |
unavailable? |
ISvgSectionStyle |
IRendererTheme
Properties
Property | Type |
---|---|
bgColor? |
string |
colorCategories? |
string [] |
gridStep? |
number |
images? |
object |
priceColors? |
string [][] |
seatStyles? |
IRendererSeatStyleSettings |
svgSectionStyles? |
IRendererSvgSectionStylesSetting |
ISeat
Interface representing a seat in the venue with extended properties. Contains all the base seat properties plus additional properties for rendering and interaction.
Extends
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
filtered? |
boolean |
Whether the seat is filtered out by current filter criteria. | - |
id |
number |
The unique identifier of the seat. | IBaseSeat .id |
isAccessible? |
boolean |
Whether the seat is accessible for people with disabilities. | IBaseSeat .isAccessible |
isMarked? |
boolean |
Whether the seat is marked with a special status. | IBaseSeat .isMarked |
locked? |
boolean |
Whether the seat is locked and cannot be selected. | - |
name |
string |
The name or number of the seat. | IBaseSeat .name |
priceId? |
IPriceId |
The price ID associated with this seat. | - |
rowId |
number |
The ID of the row this seat belongs to. | IBaseSeat .rowId |
sectorId |
number |
The ID of the sector this seat belongs to. | IBaseSeat .sectorId |
special? |
ISpecialState |
Special state information for the seat. | - |
state? |
SeatInteractionState |
The state of the seat. | - |
x |
number |
The X coordinate of the seat within its section. | IBaseSeat .x |
y |
number |
The Y coordinate of the seat within its section. | IBaseSeat .y |
ISeatStyle
Properties
Property | Type |
---|---|
accessible? |
ISeatStyle |
color |
string |
imageId? |
string |
seatName? |
object |
seatName.color |
string |
seatName.font |
string |
shadow? |
object |
shadow.blur |
number |
shadow.color |
string |
shadow.x? |
number |
shadow.y? |
number |
size |
number |
stroke? |
object |
stroke.align |
"center" | "inside" | "outside" |
stroke.color |
string |
stroke.width |
number |
ISection
Interface representing a section in the venue. A section is a logical grouping of seats or a general admission area.
Properties
Property | Type | Description |
---|---|---|
ga |
boolean |
Whether this is a general admission section. |
id? |
number |
The unique ID of the section. |
name |
string |
The name of the section. |
price? |
number |
The price for the section. |
rect |
ISectionRect |
The rectangular bounds of the section. |
special? |
ISpecialState |
Special state information for the section. |
type? |
null | string |
The type of the section. |
ISectionRect
Interface representing the rectangular bounds of a section.
Properties
ISectionWithCoords
Interface representing a section with additional coordinate information. Extends ISection with absolute x and y coordinates.
Properties
Property | Type | Description |
---|---|---|
ga |
boolean |
Whether this is a general admission section. |
id? |
number |
The unique ID of the section. |
name |
string |
The name of the section. |
price? |
number |
The price for the section. |
rect |
ISectionRect |
The rectangular bounds of the section. |
special? |
ISpecialState |
Special state information for the section. |
type? |
null | string |
The type of the section. |
x |
number |
The X coordinate of the section. |
y |
number |
The Y coordinate of the section. |
ISector
Interface representing a sector in the venue with extended properties. Contains all the base sector properties plus additional properties for rendering and interaction.
Extends
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
angle? |
null | number |
The rotation angle of the sector in degrees. | IBaseSector .angle |
disabled? |
boolean |
Whether the sector is disabled and cannot be interacted with. | IBaseSector .disabled |
filtered? |
boolean |
Whether the sector is filtered out by current filter criteria. | IBaseSector .filtered |
guid? |
string |
The globally unique identifier for the sector. | IBaseSector .guid |
id |
number |
The unique identifier of the sector. | IBaseSector .id |
isGa |
boolean |
Whether this is a general admission (GA) sector. | IBaseSector .isGa |
name |
string |
The name of the sector. | IBaseSector .name |
priceId? |
IPriceId |
The price ID associated with this sector. | - |
selected? |
boolean |
Whether the sector is currently selected. | IBaseSector .selected |
special? |
ISpecialState |
Special state information for the sector. | - |
type? |
null | string |
The type of the sector. | IBaseSector .type |
ISpecialPrice
Interface representing a special price option for seats, sections, or sectors. Contains information about a named price point with its identifier.
Properties
Property | Type | Description |
---|---|---|
name |
string |
The name or label of the special price option. |
priceId |
number |
The unique identifier for this price option. |
ISpecialState
Interface representing special state information for seats, sections, or sectors. Contains additional properties that affect rendering or behavior.
Properties
Property | Type | Description |
---|---|---|
category? |
number |
Category identifier for grouping items with similar special states. |
prices? |
ISpecialPrice [] |
Array of special prices associated with this item. |
s1? |
number |
Special state flag 1, used for custom state indicators. |
ISvgSectionStyle
Properties
Property | Type |
---|---|
bgColor? |
string |
cursor? |
string |
sectionName? |
object |
sectionName.color? |
string |
stroke? |
object |
stroke.color? |
string |
stroke.opacity? |
number |
stroke.width? |
string |
Type Aliases
ById<T>
ById<
T
>:object
Type for mapping objects by their ID.
Type Parameters
Type Parameter |
---|
T |
Index Signature
[id
: number
]: T
IPriceId
IPriceId:
number
|string
Type representing a price identifier, which can be either a number or a string. Used to uniquely identify price points in the system.
ISeatPriceScheme
ISeatPriceScheme:
object
Type definition for a seat price scheme, which associates a price with a specific seat.
Type declaration
id?
optional
id:number
Optional unique identifier for the price scheme.
price
price:
number
The price value for the seat.
priceId
priceId:
IPriceId
The price ID reference for the seat.
seatKey
seatKey:
string
The unique key of the seat this price applies to.
Nullable<T>
Nullable<
T
>:T
|null
|undefined
Type Parameters
Type Parameter |
---|
T |
SeatFilter()
SeatFilter: (
seat
) =>boolean
Type definition for a function that filters seats based on custom criteria.
Parameters
Parameter | Type | Description |
---|---|---|
seat |
ISeat |
The seat to evaluate against the filter criteria |
Returns
boolean
A boolean indicating whether the seat passes the filter (true) or not (false)
SeatInteractionState
SeatInteractionState:
"default"
|"hovered"
|"selected"
|"unavailable"
|"loading"
|"error"
Represents the possible interaction states of a seat. Used to determine how a seat should be rendered based on user interaction.
TransformArray
TransformArray: [
number
,number
,number
,number
,number
,number
]
Type representing a transformation matrix as a 6-element array.
Functions
mergeSettings()
mergeSettings<
TSettings
>(defaults
,settings
?):IRendererSettings
&TSettings
Type Parameters
Type Parameter |
---|
TSettings extends IRendererSettings |
Parameters
Parameter | Type |
---|---|
defaults |
IRendererSettings |
settings ? |
TSettings |
Returns
IRendererSettings
& TSettings