@seatmap.pro/renderer 1.68.2 → 1.68.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +36 -10
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ interface IBaseSeat {
|
|
|
37
37
|
* Whether the seat is marked with a special status.
|
|
38
38
|
*/
|
|
39
39
|
isMarked?: boolean;
|
|
40
|
+
customState?: string;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
43
|
* Base interface for sector properties.
|
|
@@ -845,6 +846,7 @@ declare class Context {
|
|
|
845
846
|
findSeatByKey(key: string): ISeat | undefined;
|
|
846
847
|
getCart(): ICart;
|
|
847
848
|
isSeatInCart(seatId: number): boolean;
|
|
849
|
+
isSeatStateBlocked(seatId: number): boolean;
|
|
848
850
|
isSectionSelected(sectorId: number): boolean;
|
|
849
851
|
addSeatToCart(seatId: number): void;
|
|
850
852
|
removeSeatFromCart(seatId: number): void;
|
|
@@ -1957,15 +1959,26 @@ interface IBeforeSeatDrawEvent {
|
|
|
1957
1959
|
*/
|
|
1958
1960
|
context: Context;
|
|
1959
1961
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
loading?: ISeatStyle;
|
|
1967
|
-
error?: ISeatStyle;
|
|
1962
|
+
type BuiltinSeatStateKey = 'default' | 'unavailable' | 'filtered' | 'hovered' | 'selected' | 'loading' | 'error';
|
|
1963
|
+
interface ISeatStateRenderArgs {
|
|
1964
|
+
seat: ISeat;
|
|
1965
|
+
stateKey: string;
|
|
1966
|
+
style: ICustomSeatStyle;
|
|
1967
|
+
sizePx: number;
|
|
1968
1968
|
}
|
|
1969
|
+
interface ICustomSeatStyle {
|
|
1970
|
+
tint?: string;
|
|
1971
|
+
svg?: string;
|
|
1972
|
+
imageId?: string;
|
|
1973
|
+
className?: string;
|
|
1974
|
+
priority?: number;
|
|
1975
|
+
blockInteraction?: boolean;
|
|
1976
|
+
keepSeatName?: boolean;
|
|
1977
|
+
render?: (args: ISeatStateRenderArgs) => HTMLElement | string;
|
|
1978
|
+
}
|
|
1979
|
+
type SeatStylesMap = Partial<Record<BuiltinSeatStateKey, ISeatStyle>> & {
|
|
1980
|
+
[customKey: string]: ICustomSeatStyle | ISeatStyle | undefined;
|
|
1981
|
+
};
|
|
1969
1982
|
interface IBasicSeatStyle {
|
|
1970
1983
|
size: number;
|
|
1971
1984
|
color: string;
|
|
@@ -2017,7 +2030,7 @@ interface IRendererTheme {
|
|
|
2017
2030
|
images?: {
|
|
2018
2031
|
[id: string]: string;
|
|
2019
2032
|
};
|
|
2020
|
-
seatStyles?:
|
|
2033
|
+
seatStyles?: SeatStylesMap;
|
|
2021
2034
|
svgSectionStyles?: IRendererSvgSectionStylesSetting;
|
|
2022
2035
|
}
|
|
2023
2036
|
|
|
@@ -2555,6 +2568,8 @@ declare class Renderer implements IRenderer {
|
|
|
2555
2568
|
private markerUnsubscribe?;
|
|
2556
2569
|
private dataManager;
|
|
2557
2570
|
private stateManager;
|
|
2571
|
+
private seatStateEngine;
|
|
2572
|
+
private seatStateLayer;
|
|
2558
2573
|
private service;
|
|
2559
2574
|
private zoomToFitScale;
|
|
2560
2575
|
protected isRunning: boolean;
|
|
@@ -2662,6 +2677,8 @@ declare class Renderer implements IRenderer {
|
|
|
2662
2677
|
getSeatIds(seats: ISeat[] | number[] | string[]): number[];
|
|
2663
2678
|
getMarkedSeatsIds(): number[];
|
|
2664
2679
|
setSeatsCategory(seats: ISeat[] | number[] | string[], category: number, color?: string): void;
|
|
2680
|
+
setSeatsState(seats: ISeat[] | number[] | string[], stateKey: string): void;
|
|
2681
|
+
clearSeatsState(seats: ISeat[] | number[] | string[]): void;
|
|
2665
2682
|
setGaCategory(sectionId: number, category: number | undefined): void;
|
|
2666
2683
|
resetCategories(): void;
|
|
2667
2684
|
getCategoryColor(category: number): string | undefined;
|
|
@@ -3044,6 +3061,14 @@ interface IAdminRendererSettings extends IRendererSettings {
|
|
|
3044
3061
|
declare class SeatmapAdminRenderer extends Renderer {
|
|
3045
3062
|
static readonly VERSION: string;
|
|
3046
3063
|
protected apiClient: BookingApiClient;
|
|
3064
|
+
private pointerOverStage;
|
|
3065
|
+
private readonly spacePan;
|
|
3066
|
+
private readonly onStageEnter;
|
|
3067
|
+
private readonly onStageLeave;
|
|
3068
|
+
private readonly onKeyDown;
|
|
3069
|
+
private readonly onKeyUp;
|
|
3070
|
+
private readonly onWindowBlur;
|
|
3071
|
+
private static isEditableTarget;
|
|
3047
3072
|
/**
|
|
3048
3073
|
* Creates a new instance of the AdminRenderer.
|
|
3049
3074
|
*
|
|
@@ -3080,6 +3105,7 @@ declare class SeatmapAdminRenderer extends Renderer {
|
|
|
3080
3105
|
* ```
|
|
3081
3106
|
*/
|
|
3082
3107
|
constructor(element: HTMLElement, settings?: IAdminRendererSettings);
|
|
3108
|
+
destroy(): void;
|
|
3083
3109
|
/**
|
|
3084
3110
|
* Sets the interaction mode for the component and updates visibility of the outline layer.
|
|
3085
3111
|
*
|
|
@@ -3335,4 +3361,4 @@ declare class RotationAnimation {
|
|
|
3335
3361
|
getAnimation(): IRotationAnimation | null;
|
|
3336
3362
|
}
|
|
3337
3363
|
|
|
3338
|
-
export { ApiError, BookingApiClient, type ById, type ColorById, type ColorSequenceSettings, DataManager, type DataManagerEvent, type DataManagerEventCallback, type DeepPartial, type DestEvent, DestEventType, type IAdminRendererSettings, type IBackgroundImageLoadedEvent, type IBaseSeat, type IBaseSector, type IBasicSeatStyle, type IBeforeSeatDrawEvent, type IBookingRendererSettings, type ICart, type ICartGa, type ICartSeat, type IClickSrcEvent, type IColoredPrice, type IConfigurationDTO, type IDeselectDestEvent, type IDragEndSrcEvent, type IDragMoveSrcEvent, type IDragStartSrcEvent, type IEntityStates, type IErrorMessage, type IExtendedSeat, type ILabelStyle, type ILoadProgressEvent, type ILoaderSettings, type ILoaderTheme, type IMarker, type IMarkerSettings, type IMinimapSettings, type IMouseMoveSrcEvent, type IPanDestEvent, type IPanZoomDestEvent, type IPlainSeatsDTO, type IPngBackgroundDTO, type IPoint, type IPrice, type IPriceDTO, type IPriceId, type IPriceListDTO, type IRectSelectDestEvent, type IRemovedCartGa, type IRenderer, type IRendererAnimation, type IRendererMachineContext, type
|
|
3364
|
+
export { ApiError, BookingApiClient, type BuiltinSeatStateKey, type ById, type ColorById, type ColorSequenceSettings, DataManager, type DataManagerEvent, type DataManagerEventCallback, type DeepPartial, type DestEvent, DestEventType, type IAdminRendererSettings, type IBackgroundImageLoadedEvent, type IBaseSeat, type IBaseSector, type IBasicSeatStyle, type IBeforeSeatDrawEvent, type IBookingRendererSettings, type ICart, type ICartGa, type ICartSeat, type IClickSrcEvent, type IColoredPrice, type IConfigurationDTO, type ICustomSeatStyle, type IDeselectDestEvent, type IDragEndSrcEvent, type IDragMoveSrcEvent, type IDragStartSrcEvent, type IEntityStates, type IErrorMessage, type IExtendedSeat, type ILabelStyle, type ILoadProgressEvent, type ILoaderSettings, type ILoaderTheme, type IMarker, type IMarkerSettings, type IMinimapSettings, type IMouseMoveSrcEvent, type IPanDestEvent, type IPanZoomDestEvent, type IPlainSeatsDTO, type IPngBackgroundDTO, type IPoint, type IPrice, type IPriceDTO, type IPriceId, type IPriceListDTO, type IRectSelectDestEvent, type IRemovedCartGa, type IRenderer, type IRendererAnimation, type IRendererMachineContext, type IRendererSettings, type IRendererSvgSectionStylesSetting, type IRendererTheme, type IResolvedMarker, type IRowDTO, type ISVGBackgroundDTO, type ISchemaDTO, type ISeat, type ISeatCartSwitchDestEvent, type ISeatDTO, type ISeatMetadata, type ISeatMouseEnterDestEvent, type ISeatMouseLeaveDestEvent, type ISeatPriceScheme, type ISeatSelectDestEvent, type ISeatStateRenderArgs, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionMetadata, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type IShapeMetadata, type ISpecialPrice, type ISpecialState, type ISvgSectionStyle, type IVenueDTO, type IVisibilitySettings, type IZoomSettings, type InteractionZoomStrategy, type InteractionZoomStrategyType, type LoaderStyle, type LoadingPhase, type MarkerAppearance, type MarkerTarget, type MinimapPosition, type Nullable, Renderer, type RendererMachine, type RendererMachineReducer, type RendererMachineService, RendererSelectMode, RendererTargetType, type RequestMetrics, RotationAnimation, type SeatFilter, type SeatInteractionState, type SeatStylesMap, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, StateManager, type StateManagerEvent, type StateManagerEventCallback, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, mergeSettings, sortPrices };
|