@inappstory/slide-api 0.1.39 → 0.1.41
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 +945 -153
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -31
- package/dist/index.d.ts +91 -31
- package/dist/index.js +945 -153
- 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> {
|
|
@@ -1069,6 +1103,7 @@ interface ILayoutApi {
|
|
|
1069
1103
|
get widgetTestApi(): typeof WidgetTest.api | undefined;
|
|
1070
1104
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
1071
1105
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
1106
|
+
get widgetProductCarouselApi(): typeof WidgetProductCarousel.api | undefined;
|
|
1072
1107
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1073
1108
|
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
1074
1109
|
get widgetReactionsApi(): typeof WidgetReactions.api | undefined;
|
|
@@ -1829,6 +1864,30 @@ declare class Products implements IElement {
|
|
|
1829
1864
|
get isLayerForcePaused(): boolean;
|
|
1830
1865
|
}
|
|
1831
1866
|
|
|
1867
|
+
declare class ProductCarousel implements IElement {
|
|
1868
|
+
private readonly _elementNodeRef;
|
|
1869
|
+
private readonly _layer;
|
|
1870
|
+
private readonly _widgetApi;
|
|
1871
|
+
private readonly _widgetCallbacks;
|
|
1872
|
+
private readonly _widgetDeps;
|
|
1873
|
+
private static readonly _className;
|
|
1874
|
+
static className(): string;
|
|
1875
|
+
static isTypeOf(element: IElement): element is ProductCarousel;
|
|
1876
|
+
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetProductCarousel.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
1877
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1878
|
+
get nodeRef(): HTMLElement;
|
|
1879
|
+
init(localData: LocalData): Promise<boolean>;
|
|
1880
|
+
onPause(): void;
|
|
1881
|
+
onResume(): void;
|
|
1882
|
+
onStart(): void;
|
|
1883
|
+
onStop(): void;
|
|
1884
|
+
onBeforeUnmount(): Promise<void>;
|
|
1885
|
+
handleClick(): boolean;
|
|
1886
|
+
get isClickCapturedByWidget(): boolean;
|
|
1887
|
+
get isLayerForcePaused(): boolean;
|
|
1888
|
+
get elementNodeRef(): HTMLElement;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1832
1891
|
declare class Quest implements IElement {
|
|
1833
1892
|
private readonly _elementNodeRef;
|
|
1834
1893
|
private readonly _layer;
|
|
@@ -2178,6 +2237,7 @@ declare class Layer {
|
|
|
2178
2237
|
get swipeUpElement(): SwipeUp | null;
|
|
2179
2238
|
get swipeUpItemsElement(): SwipeUpItems | null;
|
|
2180
2239
|
get productsElement(): Products | null;
|
|
2240
|
+
get productCarouselElement(): ProductCarousel | null;
|
|
2181
2241
|
isClickCapturedBySlider(): boolean;
|
|
2182
2242
|
private _animationPauseCb;
|
|
2183
2243
|
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> {
|
|
@@ -1069,6 +1103,7 @@ interface ILayoutApi {
|
|
|
1069
1103
|
get widgetTestApi(): typeof WidgetTest.api | undefined;
|
|
1070
1104
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
1071
1105
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
1106
|
+
get widgetProductCarouselApi(): typeof WidgetProductCarousel.api | undefined;
|
|
1072
1107
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1073
1108
|
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
1074
1109
|
get widgetReactionsApi(): typeof WidgetReactions.api | undefined;
|
|
@@ -1829,6 +1864,30 @@ declare class Products implements IElement {
|
|
|
1829
1864
|
get isLayerForcePaused(): boolean;
|
|
1830
1865
|
}
|
|
1831
1866
|
|
|
1867
|
+
declare class ProductCarousel implements IElement {
|
|
1868
|
+
private readonly _elementNodeRef;
|
|
1869
|
+
private readonly _layer;
|
|
1870
|
+
private readonly _widgetApi;
|
|
1871
|
+
private readonly _widgetCallbacks;
|
|
1872
|
+
private readonly _widgetDeps;
|
|
1873
|
+
private static readonly _className;
|
|
1874
|
+
static className(): string;
|
|
1875
|
+
static isTypeOf(element: IElement): element is ProductCarousel;
|
|
1876
|
+
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetProductCarousel.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
1877
|
+
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1878
|
+
get nodeRef(): HTMLElement;
|
|
1879
|
+
init(localData: LocalData): Promise<boolean>;
|
|
1880
|
+
onPause(): void;
|
|
1881
|
+
onResume(): void;
|
|
1882
|
+
onStart(): void;
|
|
1883
|
+
onStop(): void;
|
|
1884
|
+
onBeforeUnmount(): Promise<void>;
|
|
1885
|
+
handleClick(): boolean;
|
|
1886
|
+
get isClickCapturedByWidget(): boolean;
|
|
1887
|
+
get isLayerForcePaused(): boolean;
|
|
1888
|
+
get elementNodeRef(): HTMLElement;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1832
1891
|
declare class Quest implements IElement {
|
|
1833
1892
|
private readonly _elementNodeRef;
|
|
1834
1893
|
private readonly _layer;
|
|
@@ -2178,6 +2237,7 @@ declare class Layer {
|
|
|
2178
2237
|
get swipeUpElement(): SwipeUp | null;
|
|
2179
2238
|
get swipeUpItemsElement(): SwipeUpItems | null;
|
|
2180
2239
|
get productsElement(): Products | null;
|
|
2240
|
+
get productCarouselElement(): ProductCarousel | null;
|
|
2181
2241
|
isClickCapturedBySlider(): boolean;
|
|
2182
2242
|
private _animationPauseCb;
|
|
2183
2243
|
private _animationResumeCb;
|