@inappstory/slide-api 0.1.40 → 0.1.42
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.cjs +4259 -2109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -32
- package/dist/index.d.ts +156 -32
- package/dist/index.js +4259 -2109
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -434,29 +434,6 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
434
434
|
|
|
435
435
|
type WidgetProductsOptions = WidgetOptionsBase;
|
|
436
436
|
|
|
437
|
-
type OfferDto = {
|
|
438
|
-
id: number;
|
|
439
|
-
offerId: string;
|
|
440
|
-
groupId?: string;
|
|
441
|
-
name?: string;
|
|
442
|
-
description?: string;
|
|
443
|
-
price?: string;
|
|
444
|
-
oldPrice?: string;
|
|
445
|
-
size?: string;
|
|
446
|
-
color?: string;
|
|
447
|
-
currency?: string;
|
|
448
|
-
availability: number;
|
|
449
|
-
adult?: boolean;
|
|
450
|
-
coverUrl?: string;
|
|
451
|
-
url?: string;
|
|
452
|
-
images?: {
|
|
453
|
-
url: string;
|
|
454
|
-
width: number;
|
|
455
|
-
height: number;
|
|
456
|
-
}[];
|
|
457
|
-
subOffersApi?: Omit<OfferDto, "subOffersApi">[];
|
|
458
|
-
};
|
|
459
|
-
|
|
460
437
|
/**
|
|
461
438
|
* adult: null
|
|
462
439
|
* availability: 1
|
|
@@ -493,19 +470,12 @@ declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
|
493
470
|
private _statEventWidgetClick;
|
|
494
471
|
private _statEventWidgetOpen;
|
|
495
472
|
private _statEventWidgetCardClick;
|
|
496
|
-
private getOrFetchProducts;
|
|
497
|
-
fetchProducts(): Promise<{
|
|
498
|
-
message: string;
|
|
499
|
-
models: Array<OfferDto>;
|
|
500
|
-
}>;
|
|
501
|
-
private cacheOffersMediaResources;
|
|
502
|
-
private revokeOffersMediaResources;
|
|
503
473
|
private initSwipeGestureDetector;
|
|
504
474
|
private productsView;
|
|
505
475
|
private isOpen;
|
|
506
476
|
private isLoading;
|
|
507
477
|
get isForcePaused(): boolean;
|
|
508
|
-
private
|
|
478
|
+
private readonly repository;
|
|
509
479
|
openProductsView(): Promise<void>;
|
|
510
480
|
closeProductsView(): void;
|
|
511
481
|
private createCardView;
|
|
@@ -533,6 +503,70 @@ declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
|
533
503
|
};
|
|
534
504
|
}
|
|
535
505
|
|
|
506
|
+
type WidgetProductCarouselOptions = WidgetOptionsBase;
|
|
507
|
+
|
|
508
|
+
declare class WidgetProductCarousel extends WidgetBase<WidgetProductCarouselOptions> {
|
|
509
|
+
static DEFAULTS: WidgetProductCarouselOptions;
|
|
510
|
+
static widgetClassName: string;
|
|
511
|
+
private readonly captionView;
|
|
512
|
+
private offerIds;
|
|
513
|
+
private readonly msgNetworkError;
|
|
514
|
+
private readonly msgServiceError;
|
|
515
|
+
private readonly isScreenSupportsTouch;
|
|
516
|
+
private isLoading;
|
|
517
|
+
private readonly repository;
|
|
518
|
+
private canClick;
|
|
519
|
+
private isBottomSheetOpened;
|
|
520
|
+
private isClickCapturedByScroll;
|
|
521
|
+
private $carousel;
|
|
522
|
+
private $track;
|
|
523
|
+
private isTouchListenersInit;
|
|
524
|
+
constructor(element: HTMLElement, options: Partial<WidgetProductCarouselOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
525
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
526
|
+
onStart(): void;
|
|
527
|
+
onStop(): void;
|
|
528
|
+
getIsClickCapturedByWidget(): boolean;
|
|
529
|
+
get isForcePaused(): boolean;
|
|
530
|
+
/** Offset compensation for an elongated viewport */
|
|
531
|
+
private ajustGeometryMargin;
|
|
532
|
+
private isTransparentElement;
|
|
533
|
+
private renderCarousel;
|
|
534
|
+
private initTouchListeners;
|
|
535
|
+
private handleMouseDown;
|
|
536
|
+
private handleMouseUp;
|
|
537
|
+
private createCarousel;
|
|
538
|
+
private renderInlineCarousel;
|
|
539
|
+
private renderCarouselControls;
|
|
540
|
+
private navigatePrev;
|
|
541
|
+
private navigateNext;
|
|
542
|
+
private setScrollLeft;
|
|
543
|
+
private getScrollLeft;
|
|
544
|
+
private getScrollViewportWidth;
|
|
545
|
+
private renderCard;
|
|
546
|
+
private showProductDetails;
|
|
547
|
+
private renderCardImage;
|
|
548
|
+
private renderCardContent;
|
|
549
|
+
private renderCardTitle;
|
|
550
|
+
private renderCardPrices;
|
|
551
|
+
private renderPurchaseButton;
|
|
552
|
+
private withTimeout;
|
|
553
|
+
private addToCart;
|
|
554
|
+
private getBottomSheetParams;
|
|
555
|
+
private statEventWidgetCardClick;
|
|
556
|
+
private isCartSupported;
|
|
557
|
+
private disableHostUIInteraction;
|
|
558
|
+
private enableHostUIInteraction;
|
|
559
|
+
static api: {
|
|
560
|
+
widgetClassName: string;
|
|
561
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
562
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
563
|
+
onStart: (element: HTMLElement) => void;
|
|
564
|
+
onStop: (element: HTMLElement) => void;
|
|
565
|
+
isClickCapturedByWidget: (element: HTMLElement) => boolean;
|
|
566
|
+
isForcePaused: (element: HTMLElement) => boolean;
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
|
|
536
570
|
type WidgetQuestOptions = WidgetOptionsBase;
|
|
537
571
|
|
|
538
572
|
declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
@@ -1052,6 +1086,45 @@ declare class WidgetReactions extends WidgetBase<WidgetReactionsOptions> {
|
|
|
1052
1086
|
};
|
|
1053
1087
|
}
|
|
1054
1088
|
|
|
1089
|
+
type WidgetScratchCardOptions = WidgetOptionsBase;
|
|
1090
|
+
|
|
1091
|
+
declare class WidgetScratchCard extends WidgetBase<WidgetScratchCardOptions> {
|
|
1092
|
+
static DEFAULTS: WidgetScratchCardOptions;
|
|
1093
|
+
static widgetClassName: string;
|
|
1094
|
+
private scratchContainer;
|
|
1095
|
+
private scratchLayer;
|
|
1096
|
+
private localDataKeys;
|
|
1097
|
+
private readonly model;
|
|
1098
|
+
private _isClickCaptured;
|
|
1099
|
+
constructor(element: HTMLElement, options: Partial<WidgetScratchCardOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
1100
|
+
get isClickCaptured(): boolean;
|
|
1101
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
1102
|
+
isDone(): boolean;
|
|
1103
|
+
onStart(): void;
|
|
1104
|
+
onStop(): void;
|
|
1105
|
+
private init;
|
|
1106
|
+
private calcBrushSize;
|
|
1107
|
+
private handleResize;
|
|
1108
|
+
private mountScratchContainer;
|
|
1109
|
+
private renderScratchLayer;
|
|
1110
|
+
private getImage;
|
|
1111
|
+
private hideGeometry;
|
|
1112
|
+
private completeWidget;
|
|
1113
|
+
private disablePointerEventsOnGeometry;
|
|
1114
|
+
private sendStatEvent;
|
|
1115
|
+
private saveToLocalData;
|
|
1116
|
+
private handleMouseUp;
|
|
1117
|
+
private handleMouseDown;
|
|
1118
|
+
static api: {
|
|
1119
|
+
widgetClassName: string;
|
|
1120
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
1121
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
1122
|
+
onStart: (element: HTMLElement) => void;
|
|
1123
|
+
onStop: (element: HTMLElement) => void;
|
|
1124
|
+
isClickCaptured: (element: HTMLElement) => boolean;
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1055
1128
|
interface ILayoutApi {
|
|
1056
1129
|
get widgetCopyApi(): typeof WidgetCopy.api | undefined;
|
|
1057
1130
|
get widgetBarcodeApi(): typeof WidgetBarcode.api | undefined;
|
|
@@ -1069,9 +1142,11 @@ interface ILayoutApi {
|
|
|
1069
1142
|
get widgetTestApi(): typeof WidgetTest.api | undefined;
|
|
1070
1143
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
1071
1144
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
1145
|
+
get widgetProductCarouselApi(): typeof WidgetProductCarousel.api | undefined;
|
|
1072
1146
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1073
1147
|
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
1074
1148
|
get widgetReactionsApi(): typeof WidgetReactions.api | undefined;
|
|
1149
|
+
get widgetScratchCardApi(): typeof WidgetScratchCard.api | undefined;
|
|
1075
1150
|
get VideoPlayer(): typeof Player | undefined;
|
|
1076
1151
|
}
|
|
1077
1152
|
|
|
@@ -1441,7 +1516,8 @@ declare const enum Widgets {
|
|
|
1441
1516
|
DateCountdown = "dateCountdown",
|
|
1442
1517
|
Quest = "quest",
|
|
1443
1518
|
Timer = "timer",
|
|
1444
|
-
Reactions = "reactions"
|
|
1519
|
+
Reactions = "reactions",
|
|
1520
|
+
ScratchCard = "scratchCard"
|
|
1445
1521
|
}
|
|
1446
1522
|
interface WidgetsSharedDataMap {
|
|
1447
1523
|
rangeSlider: WidgetRangeSliderSharedData;
|
|
@@ -1829,6 +1905,30 @@ declare class Products implements IElement {
|
|
|
1829
1905
|
get isLayerForcePaused(): boolean;
|
|
1830
1906
|
}
|
|
1831
1907
|
|
|
1908
|
+
declare class ProductCarousel implements IElement {
|
|
1909
|
+
private readonly _elementNodeRef;
|
|
1910
|
+
private readonly _layer;
|
|
1911
|
+
private readonly _widgetApi;
|
|
1912
|
+
private readonly _widgetCallbacks;
|
|
1913
|
+
private readonly _widgetDeps;
|
|
1914
|
+
private static readonly _className;
|
|
1915
|
+
static className(): string;
|
|
1916
|
+
static isTypeOf(element: IElement): element is ProductCarousel;
|
|
1917
|
+
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetProductCarousel.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
1918
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1919
|
+
get nodeRef(): HTMLElement;
|
|
1920
|
+
init(localData: LocalData): Promise<boolean>;
|
|
1921
|
+
onPause(): void;
|
|
1922
|
+
onResume(): void;
|
|
1923
|
+
onStart(): void;
|
|
1924
|
+
onStop(): void;
|
|
1925
|
+
onBeforeUnmount(): Promise<void>;
|
|
1926
|
+
handleClick(): boolean;
|
|
1927
|
+
get isClickCapturedByWidget(): boolean;
|
|
1928
|
+
get isLayerForcePaused(): boolean;
|
|
1929
|
+
get elementNodeRef(): HTMLElement;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1832
1932
|
declare class Quest implements IElement {
|
|
1833
1933
|
private readonly _elementNodeRef;
|
|
1834
1934
|
private readonly _layer;
|
|
@@ -2119,6 +2219,28 @@ declare class Slide {
|
|
|
2119
2219
|
get disabledNavigation(): boolean;
|
|
2120
2220
|
}
|
|
2121
2221
|
|
|
2222
|
+
declare class ScratchCard implements IElement {
|
|
2223
|
+
private readonly _elementNodeRef;
|
|
2224
|
+
private readonly _widgetApi;
|
|
2225
|
+
private readonly _widgetCallbacks;
|
|
2226
|
+
private readonly _widgetDeps;
|
|
2227
|
+
private static readonly _className;
|
|
2228
|
+
static className(): string;
|
|
2229
|
+
static isTypeOf(element: IElement): element is ScratchCard;
|
|
2230
|
+
constructor(_elementNodeRef: HTMLElement, _widgetApi: typeof WidgetScratchCard.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
2231
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
2232
|
+
get nodeRef(): HTMLElement;
|
|
2233
|
+
init(localData: LocalData): Promise<boolean>;
|
|
2234
|
+
onPause(): void;
|
|
2235
|
+
onResume(): void;
|
|
2236
|
+
onStart(): void;
|
|
2237
|
+
onStop(): void;
|
|
2238
|
+
onBeforeUnmount(): Promise<void>;
|
|
2239
|
+
handleClick(): boolean;
|
|
2240
|
+
get isLayerForcePaused(): boolean;
|
|
2241
|
+
get isClickCaptured(): boolean;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2122
2244
|
declare const enum ON_SLIDE_STOP_PREPARE_FOR_RESTART {
|
|
2123
2245
|
UNKNOWN = 0,
|
|
2124
2246
|
PREPARE = 1,
|
|
@@ -2166,6 +2288,7 @@ declare class Layer {
|
|
|
2166
2288
|
get disabledNavigation(): boolean;
|
|
2167
2289
|
get videoElement(): Video | null;
|
|
2168
2290
|
get rangeSliderElement(): RangeSlider | null;
|
|
2291
|
+
get scratchCardElements(): ScratchCard[];
|
|
2169
2292
|
get quizElement(): Quiz | null;
|
|
2170
2293
|
get quizGroupedElement(): QuizGrouped | null;
|
|
2171
2294
|
get questElement(): Quest | null;
|
|
@@ -2178,6 +2301,7 @@ declare class Layer {
|
|
|
2178
2301
|
get swipeUpElement(): SwipeUp | null;
|
|
2179
2302
|
get swipeUpItemsElement(): SwipeUpItems | null;
|
|
2180
2303
|
get productsElement(): Products | null;
|
|
2304
|
+
get productCarouselElement(): ProductCarousel | null;
|
|
2181
2305
|
isClickCapturedBySlider(): boolean;
|
|
2182
2306
|
private _animationPauseCb;
|
|
2183
2307
|
private _animationResumeCb;
|
package/dist/index.d.ts
CHANGED
|
@@ -434,29 +434,6 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
434
434
|
|
|
435
435
|
type WidgetProductsOptions = WidgetOptionsBase;
|
|
436
436
|
|
|
437
|
-
type OfferDto = {
|
|
438
|
-
id: number;
|
|
439
|
-
offerId: string;
|
|
440
|
-
groupId?: string;
|
|
441
|
-
name?: string;
|
|
442
|
-
description?: string;
|
|
443
|
-
price?: string;
|
|
444
|
-
oldPrice?: string;
|
|
445
|
-
size?: string;
|
|
446
|
-
color?: string;
|
|
447
|
-
currency?: string;
|
|
448
|
-
availability: number;
|
|
449
|
-
adult?: boolean;
|
|
450
|
-
coverUrl?: string;
|
|
451
|
-
url?: string;
|
|
452
|
-
images?: {
|
|
453
|
-
url: string;
|
|
454
|
-
width: number;
|
|
455
|
-
height: number;
|
|
456
|
-
}[];
|
|
457
|
-
subOffersApi?: Omit<OfferDto, "subOffersApi">[];
|
|
458
|
-
};
|
|
459
|
-
|
|
460
437
|
/**
|
|
461
438
|
* adult: null
|
|
462
439
|
* availability: 1
|
|
@@ -493,19 +470,12 @@ declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
|
493
470
|
private _statEventWidgetClick;
|
|
494
471
|
private _statEventWidgetOpen;
|
|
495
472
|
private _statEventWidgetCardClick;
|
|
496
|
-
private getOrFetchProducts;
|
|
497
|
-
fetchProducts(): Promise<{
|
|
498
|
-
message: string;
|
|
499
|
-
models: Array<OfferDto>;
|
|
500
|
-
}>;
|
|
501
|
-
private cacheOffersMediaResources;
|
|
502
|
-
private revokeOffersMediaResources;
|
|
503
473
|
private initSwipeGestureDetector;
|
|
504
474
|
private productsView;
|
|
505
475
|
private isOpen;
|
|
506
476
|
private isLoading;
|
|
507
477
|
get isForcePaused(): boolean;
|
|
508
|
-
private
|
|
478
|
+
private readonly repository;
|
|
509
479
|
openProductsView(): Promise<void>;
|
|
510
480
|
closeProductsView(): void;
|
|
511
481
|
private createCardView;
|
|
@@ -533,6 +503,70 @@ declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
|
533
503
|
};
|
|
534
504
|
}
|
|
535
505
|
|
|
506
|
+
type WidgetProductCarouselOptions = WidgetOptionsBase;
|
|
507
|
+
|
|
508
|
+
declare class WidgetProductCarousel extends WidgetBase<WidgetProductCarouselOptions> {
|
|
509
|
+
static DEFAULTS: WidgetProductCarouselOptions;
|
|
510
|
+
static widgetClassName: string;
|
|
511
|
+
private readonly captionView;
|
|
512
|
+
private offerIds;
|
|
513
|
+
private readonly msgNetworkError;
|
|
514
|
+
private readonly msgServiceError;
|
|
515
|
+
private readonly isScreenSupportsTouch;
|
|
516
|
+
private isLoading;
|
|
517
|
+
private readonly repository;
|
|
518
|
+
private canClick;
|
|
519
|
+
private isBottomSheetOpened;
|
|
520
|
+
private isClickCapturedByScroll;
|
|
521
|
+
private $carousel;
|
|
522
|
+
private $track;
|
|
523
|
+
private isTouchListenersInit;
|
|
524
|
+
constructor(element: HTMLElement, options: Partial<WidgetProductCarouselOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
525
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
526
|
+
onStart(): void;
|
|
527
|
+
onStop(): void;
|
|
528
|
+
getIsClickCapturedByWidget(): boolean;
|
|
529
|
+
get isForcePaused(): boolean;
|
|
530
|
+
/** Offset compensation for an elongated viewport */
|
|
531
|
+
private ajustGeometryMargin;
|
|
532
|
+
private isTransparentElement;
|
|
533
|
+
private renderCarousel;
|
|
534
|
+
private initTouchListeners;
|
|
535
|
+
private handleMouseDown;
|
|
536
|
+
private handleMouseUp;
|
|
537
|
+
private createCarousel;
|
|
538
|
+
private renderInlineCarousel;
|
|
539
|
+
private renderCarouselControls;
|
|
540
|
+
private navigatePrev;
|
|
541
|
+
private navigateNext;
|
|
542
|
+
private setScrollLeft;
|
|
543
|
+
private getScrollLeft;
|
|
544
|
+
private getScrollViewportWidth;
|
|
545
|
+
private renderCard;
|
|
546
|
+
private showProductDetails;
|
|
547
|
+
private renderCardImage;
|
|
548
|
+
private renderCardContent;
|
|
549
|
+
private renderCardTitle;
|
|
550
|
+
private renderCardPrices;
|
|
551
|
+
private renderPurchaseButton;
|
|
552
|
+
private withTimeout;
|
|
553
|
+
private addToCart;
|
|
554
|
+
private getBottomSheetParams;
|
|
555
|
+
private statEventWidgetCardClick;
|
|
556
|
+
private isCartSupported;
|
|
557
|
+
private disableHostUIInteraction;
|
|
558
|
+
private enableHostUIInteraction;
|
|
559
|
+
static api: {
|
|
560
|
+
widgetClassName: string;
|
|
561
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
562
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
563
|
+
onStart: (element: HTMLElement) => void;
|
|
564
|
+
onStop: (element: HTMLElement) => void;
|
|
565
|
+
isClickCapturedByWidget: (element: HTMLElement) => boolean;
|
|
566
|
+
isForcePaused: (element: HTMLElement) => boolean;
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
|
|
536
570
|
type WidgetQuestOptions = WidgetOptionsBase;
|
|
537
571
|
|
|
538
572
|
declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
@@ -1052,6 +1086,45 @@ declare class WidgetReactions extends WidgetBase<WidgetReactionsOptions> {
|
|
|
1052
1086
|
};
|
|
1053
1087
|
}
|
|
1054
1088
|
|
|
1089
|
+
type WidgetScratchCardOptions = WidgetOptionsBase;
|
|
1090
|
+
|
|
1091
|
+
declare class WidgetScratchCard extends WidgetBase<WidgetScratchCardOptions> {
|
|
1092
|
+
static DEFAULTS: WidgetScratchCardOptions;
|
|
1093
|
+
static widgetClassName: string;
|
|
1094
|
+
private scratchContainer;
|
|
1095
|
+
private scratchLayer;
|
|
1096
|
+
private localDataKeys;
|
|
1097
|
+
private readonly model;
|
|
1098
|
+
private _isClickCaptured;
|
|
1099
|
+
constructor(element: HTMLElement, options: Partial<WidgetScratchCardOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
1100
|
+
get isClickCaptured(): boolean;
|
|
1101
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
1102
|
+
isDone(): boolean;
|
|
1103
|
+
onStart(): void;
|
|
1104
|
+
onStop(): void;
|
|
1105
|
+
private init;
|
|
1106
|
+
private calcBrushSize;
|
|
1107
|
+
private handleResize;
|
|
1108
|
+
private mountScratchContainer;
|
|
1109
|
+
private renderScratchLayer;
|
|
1110
|
+
private getImage;
|
|
1111
|
+
private hideGeometry;
|
|
1112
|
+
private completeWidget;
|
|
1113
|
+
private disablePointerEventsOnGeometry;
|
|
1114
|
+
private sendStatEvent;
|
|
1115
|
+
private saveToLocalData;
|
|
1116
|
+
private handleMouseUp;
|
|
1117
|
+
private handleMouseDown;
|
|
1118
|
+
static api: {
|
|
1119
|
+
widgetClassName: string;
|
|
1120
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
1121
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
1122
|
+
onStart: (element: HTMLElement) => void;
|
|
1123
|
+
onStop: (element: HTMLElement) => void;
|
|
1124
|
+
isClickCaptured: (element: HTMLElement) => boolean;
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1055
1128
|
interface ILayoutApi {
|
|
1056
1129
|
get widgetCopyApi(): typeof WidgetCopy.api | undefined;
|
|
1057
1130
|
get widgetBarcodeApi(): typeof WidgetBarcode.api | undefined;
|
|
@@ -1069,9 +1142,11 @@ interface ILayoutApi {
|
|
|
1069
1142
|
get widgetTestApi(): typeof WidgetTest.api | undefined;
|
|
1070
1143
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
1071
1144
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
1145
|
+
get widgetProductCarouselApi(): typeof WidgetProductCarousel.api | undefined;
|
|
1072
1146
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1073
1147
|
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
1074
1148
|
get widgetReactionsApi(): typeof WidgetReactions.api | undefined;
|
|
1149
|
+
get widgetScratchCardApi(): typeof WidgetScratchCard.api | undefined;
|
|
1075
1150
|
get VideoPlayer(): typeof Player | undefined;
|
|
1076
1151
|
}
|
|
1077
1152
|
|
|
@@ -1441,7 +1516,8 @@ declare const enum Widgets {
|
|
|
1441
1516
|
DateCountdown = "dateCountdown",
|
|
1442
1517
|
Quest = "quest",
|
|
1443
1518
|
Timer = "timer",
|
|
1444
|
-
Reactions = "reactions"
|
|
1519
|
+
Reactions = "reactions",
|
|
1520
|
+
ScratchCard = "scratchCard"
|
|
1445
1521
|
}
|
|
1446
1522
|
interface WidgetsSharedDataMap {
|
|
1447
1523
|
rangeSlider: WidgetRangeSliderSharedData;
|
|
@@ -1829,6 +1905,30 @@ declare class Products implements IElement {
|
|
|
1829
1905
|
get isLayerForcePaused(): boolean;
|
|
1830
1906
|
}
|
|
1831
1907
|
|
|
1908
|
+
declare class ProductCarousel implements IElement {
|
|
1909
|
+
private readonly _elementNodeRef;
|
|
1910
|
+
private readonly _layer;
|
|
1911
|
+
private readonly _widgetApi;
|
|
1912
|
+
private readonly _widgetCallbacks;
|
|
1913
|
+
private readonly _widgetDeps;
|
|
1914
|
+
private static readonly _className;
|
|
1915
|
+
static className(): string;
|
|
1916
|
+
static isTypeOf(element: IElement): element is ProductCarousel;
|
|
1917
|
+
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetProductCarousel.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
1918
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1919
|
+
get nodeRef(): HTMLElement;
|
|
1920
|
+
init(localData: LocalData): Promise<boolean>;
|
|
1921
|
+
onPause(): void;
|
|
1922
|
+
onResume(): void;
|
|
1923
|
+
onStart(): void;
|
|
1924
|
+
onStop(): void;
|
|
1925
|
+
onBeforeUnmount(): Promise<void>;
|
|
1926
|
+
handleClick(): boolean;
|
|
1927
|
+
get isClickCapturedByWidget(): boolean;
|
|
1928
|
+
get isLayerForcePaused(): boolean;
|
|
1929
|
+
get elementNodeRef(): HTMLElement;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1832
1932
|
declare class Quest implements IElement {
|
|
1833
1933
|
private readonly _elementNodeRef;
|
|
1834
1934
|
private readonly _layer;
|
|
@@ -2119,6 +2219,28 @@ declare class Slide {
|
|
|
2119
2219
|
get disabledNavigation(): boolean;
|
|
2120
2220
|
}
|
|
2121
2221
|
|
|
2222
|
+
declare class ScratchCard implements IElement {
|
|
2223
|
+
private readonly _elementNodeRef;
|
|
2224
|
+
private readonly _widgetApi;
|
|
2225
|
+
private readonly _widgetCallbacks;
|
|
2226
|
+
private readonly _widgetDeps;
|
|
2227
|
+
private static readonly _className;
|
|
2228
|
+
static className(): string;
|
|
2229
|
+
static isTypeOf(element: IElement): element is ScratchCard;
|
|
2230
|
+
constructor(_elementNodeRef: HTMLElement, _widgetApi: typeof WidgetScratchCard.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
2231
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
2232
|
+
get nodeRef(): HTMLElement;
|
|
2233
|
+
init(localData: LocalData): Promise<boolean>;
|
|
2234
|
+
onPause(): void;
|
|
2235
|
+
onResume(): void;
|
|
2236
|
+
onStart(): void;
|
|
2237
|
+
onStop(): void;
|
|
2238
|
+
onBeforeUnmount(): Promise<void>;
|
|
2239
|
+
handleClick(): boolean;
|
|
2240
|
+
get isLayerForcePaused(): boolean;
|
|
2241
|
+
get isClickCaptured(): boolean;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2122
2244
|
declare const enum ON_SLIDE_STOP_PREPARE_FOR_RESTART {
|
|
2123
2245
|
UNKNOWN = 0,
|
|
2124
2246
|
PREPARE = 1,
|
|
@@ -2166,6 +2288,7 @@ declare class Layer {
|
|
|
2166
2288
|
get disabledNavigation(): boolean;
|
|
2167
2289
|
get videoElement(): Video | null;
|
|
2168
2290
|
get rangeSliderElement(): RangeSlider | null;
|
|
2291
|
+
get scratchCardElements(): ScratchCard[];
|
|
2169
2292
|
get quizElement(): Quiz | null;
|
|
2170
2293
|
get quizGroupedElement(): QuizGrouped | null;
|
|
2171
2294
|
get questElement(): Quest | null;
|
|
@@ -2178,6 +2301,7 @@ declare class Layer {
|
|
|
2178
2301
|
get swipeUpElement(): SwipeUp | null;
|
|
2179
2302
|
get swipeUpItemsElement(): SwipeUpItems | null;
|
|
2180
2303
|
get productsElement(): Products | null;
|
|
2304
|
+
get productCarouselElement(): ProductCarousel | null;
|
|
2181
2305
|
isClickCapturedBySlider(): boolean;
|
|
2182
2306
|
private _animationPauseCb;
|
|
2183
2307
|
private _animationResumeCb;
|