@inappstory/slide-api 0.1.21 → 0.1.23
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 +549 -139
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -82
- package/dist/index.d.ts +227 -82
- package/dist/index.js +549 -139
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Player
|
|
2
|
-
|
|
1
|
+
import { Player } from '@inappstory/video-player';
|
|
2
|
+
|
|
3
3
|
interface IAnimation {
|
|
4
4
|
start(slide: HTMLElement, animate?: boolean): void | ((isStop: boolean) => () => void);
|
|
5
5
|
stop(slide: HTMLElement, animate?: boolean): void;
|
|
@@ -7,13 +7,16 @@ interface IAnimation {
|
|
|
7
7
|
resume(slide: HTMLElement): void;
|
|
8
8
|
reset(slide: HTMLElement): void;
|
|
9
9
|
}
|
|
10
|
+
|
|
10
11
|
declare const enum TIMELINE_ACTION {
|
|
11
12
|
START = "start",
|
|
12
13
|
PAUSE = "pause",
|
|
13
14
|
STOP = "stop",
|
|
14
15
|
BEFORE_START = "before_start"
|
|
15
16
|
}
|
|
17
|
+
|
|
16
18
|
type WidgetBarcodeOptions = WidgetOptionsBase;
|
|
19
|
+
|
|
17
20
|
declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
18
21
|
static DEFAULTS: WidgetBarcodeOptions;
|
|
19
22
|
static widgetClassName: string;
|
|
@@ -61,7 +64,9 @@ declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
|
61
64
|
click: (element: HTMLElement) => boolean;
|
|
62
65
|
};
|
|
63
66
|
}
|
|
67
|
+
|
|
64
68
|
type WidgetCopyOptions = WidgetOptionsBase;
|
|
69
|
+
|
|
65
70
|
declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
66
71
|
static DEFAULTS: WidgetCopyOptions;
|
|
67
72
|
static widgetClassName: string;
|
|
@@ -104,7 +109,9 @@ declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
|
104
109
|
click: (element: HTMLElement) => boolean;
|
|
105
110
|
};
|
|
106
111
|
}
|
|
112
|
+
|
|
107
113
|
type WidgetDataInputOptions = WidgetOptionsBase;
|
|
114
|
+
|
|
108
115
|
declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
109
116
|
static DEFAULTS: {
|
|
110
117
|
slide: null;
|
|
@@ -148,9 +155,11 @@ declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
|
148
155
|
setUserData: (slideRoot: HTMLElement, id: string, text: string) => void;
|
|
149
156
|
};
|
|
150
157
|
}
|
|
158
|
+
|
|
151
159
|
type WidgetDateCountdownOptions = WidgetOptionsBase & {
|
|
152
160
|
layers: Array<HTMLElement>;
|
|
153
161
|
};
|
|
162
|
+
|
|
154
163
|
declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions> {
|
|
155
164
|
static DEFAULTS: WidgetDateCountdownOptions;
|
|
156
165
|
static widgetClassName: string;
|
|
@@ -193,20 +202,22 @@ declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions>
|
|
|
193
202
|
onResume: (element: HTMLElement) => void;
|
|
194
203
|
};
|
|
195
204
|
}
|
|
205
|
+
|
|
196
206
|
declare class WidgetMultiSlide {
|
|
197
207
|
static api: {
|
|
198
208
|
init: (slides: Array<HTMLElement>, localData: Record<string, any>, widgetDeps: WidgetDeps) => void;
|
|
199
209
|
};
|
|
200
210
|
}
|
|
211
|
+
|
|
201
212
|
type WidgetPollOptions = WidgetOptionsBase;
|
|
202
|
-
type WidgetPollSharedData = Record<string,
|
|
203
|
-
// element_id
|
|
213
|
+
type WidgetPollSharedData = Record<string, // element_id
|
|
204
214
|
{
|
|
205
|
-
0: number;
|
|
206
|
-
1: number;
|
|
215
|
+
0: number;
|
|
216
|
+
1: number;
|
|
207
217
|
}> & {
|
|
208
|
-
ts: number;
|
|
218
|
+
ts: number;
|
|
209
219
|
};
|
|
220
|
+
|
|
210
221
|
declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
211
222
|
static DEFAULTS: {
|
|
212
223
|
slide: null;
|
|
@@ -259,14 +270,19 @@ declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
|
259
270
|
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
260
271
|
onStart: (element: HTMLElement) => void;
|
|
261
272
|
onStop: (element: HTMLElement) => void;
|
|
273
|
+
/**
|
|
274
|
+
* click
|
|
275
|
+
*/
|
|
262
276
|
select: (element: HTMLElement) => boolean;
|
|
263
277
|
slidePollIsDone: (element: HTMLElement) => boolean;
|
|
264
278
|
setUserData: (slideRoot: HTMLElement, id: string, text: string) => void;
|
|
265
279
|
};
|
|
266
280
|
}
|
|
281
|
+
|
|
267
282
|
type WidgetPollLayersOptions = WidgetOptionsBase & {
|
|
268
283
|
layers: Array<HTMLElement>;
|
|
269
284
|
};
|
|
285
|
+
|
|
270
286
|
declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
271
287
|
static DEFAULTS: WidgetPollLayersOptions;
|
|
272
288
|
static widgetClassName: string;
|
|
@@ -293,10 +309,17 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
293
309
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
294
310
|
onStart: (element: HTMLElement) => void;
|
|
295
311
|
onStop: (element: HTMLElement) => void;
|
|
312
|
+
/**
|
|
313
|
+
* click on poll variant
|
|
314
|
+
* @param element
|
|
315
|
+
* @returns {boolean}
|
|
316
|
+
*/
|
|
296
317
|
select: (element: HTMLElement) => boolean;
|
|
297
318
|
};
|
|
298
319
|
}
|
|
320
|
+
|
|
299
321
|
type WidgetProductsOptions = WidgetOptionsBase;
|
|
322
|
+
|
|
300
323
|
type OfferModel = {
|
|
301
324
|
id: number;
|
|
302
325
|
offerId: string;
|
|
@@ -305,7 +328,7 @@ type OfferModel = {
|
|
|
305
328
|
price?: string;
|
|
306
329
|
oldPrice?: string;
|
|
307
330
|
currency?: string;
|
|
308
|
-
availability: number;
|
|
331
|
+
availability: number;
|
|
309
332
|
adult?: boolean;
|
|
310
333
|
coverUrl?: string;
|
|
311
334
|
url?: string;
|
|
@@ -382,7 +405,9 @@ declare class WidgetProducts extends WidgetBase<WidgetProductsOptions> {
|
|
|
382
405
|
onHandleBackpress: (element: HTMLElement) => boolean;
|
|
383
406
|
};
|
|
384
407
|
}
|
|
408
|
+
|
|
385
409
|
type WidgetQuestOptions = WidgetOptionsBase;
|
|
410
|
+
|
|
386
411
|
declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
387
412
|
static DEFAULTS: WidgetQuestOptions;
|
|
388
413
|
static widgetClassName: string;
|
|
@@ -414,8 +439,6 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
414
439
|
private _addNewRouteHistory;
|
|
415
440
|
private _routeMvPtrBack;
|
|
416
441
|
private getLastSlideIndexFromRouteHistory;
|
|
417
|
-
// переделать в handleRouteTrigger
|
|
418
|
-
// не завязываться на click, сделать через коллбэк - default action
|
|
419
442
|
private handleRouteClick;
|
|
420
443
|
static api: {
|
|
421
444
|
widgetClassName: string;
|
|
@@ -434,7 +457,9 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
434
457
|
};
|
|
435
458
|
};
|
|
436
459
|
}
|
|
460
|
+
|
|
437
461
|
type WidgetQuizOptions = WidgetOptionsBase;
|
|
462
|
+
|
|
438
463
|
declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
439
464
|
static DEFAULTS: WidgetQuizOptions;
|
|
440
465
|
static widgetClassName: string;
|
|
@@ -459,11 +484,16 @@ declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
|
459
484
|
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
460
485
|
onStart: (element: HTMLElement) => void;
|
|
461
486
|
onStop: (element: HTMLElement) => void;
|
|
487
|
+
/**
|
|
488
|
+
* click on quiz answer
|
|
489
|
+
*/
|
|
462
490
|
select: (element: HTMLElement) => boolean;
|
|
463
491
|
slideQuizIsDone: (element: HTMLElement) => boolean;
|
|
464
492
|
};
|
|
465
493
|
}
|
|
494
|
+
|
|
466
495
|
type WidgetQuizGroupedOptions = WidgetOptionsBase;
|
|
496
|
+
|
|
467
497
|
declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
468
498
|
static DEFAULTS: {
|
|
469
499
|
slide: null;
|
|
@@ -501,10 +531,14 @@ declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
|
501
531
|
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
502
532
|
onStart: (element: HTMLElement) => void;
|
|
503
533
|
onStop: (element: HTMLElement) => void;
|
|
534
|
+
/**
|
|
535
|
+
* click on quiz answer
|
|
536
|
+
*/
|
|
504
537
|
select: (element: HTMLElement) => boolean;
|
|
505
538
|
slideQuizIsDone: (element: HTMLElement) => boolean;
|
|
506
539
|
};
|
|
507
540
|
}
|
|
541
|
+
|
|
508
542
|
type WidgetRangeSliderOptions = WidgetOptionsBase & {
|
|
509
543
|
rangeClass: string;
|
|
510
544
|
rangeBackgroundClass: string;
|
|
@@ -514,14 +548,14 @@ type WidgetRangeSliderOptions = WidgetOptionsBase & {
|
|
|
514
548
|
fillClass: string;
|
|
515
549
|
handleClass: string;
|
|
516
550
|
};
|
|
517
|
-
type WidgetRangeSliderSharedData = Record<string,
|
|
518
|
-
// element_id
|
|
551
|
+
type WidgetRangeSliderSharedData = Record<string, // element_id
|
|
519
552
|
{
|
|
520
553
|
total_value: number;
|
|
521
554
|
total_user: number;
|
|
522
555
|
}> & {
|
|
523
|
-
ts: number;
|
|
556
|
+
ts: number;
|
|
524
557
|
};
|
|
558
|
+
|
|
525
559
|
declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
526
560
|
static DEFAULTS: WidgetRangeSliderOptions;
|
|
527
561
|
static widgetClassName: string;
|
|
@@ -585,7 +619,6 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
585
619
|
private handleEnd;
|
|
586
620
|
private cap;
|
|
587
621
|
private setPosition;
|
|
588
|
-
// Returns element position relative to the parent
|
|
589
622
|
private getPositionFromNode;
|
|
590
623
|
private getRelativePosition;
|
|
591
624
|
private getPercentageFromValue;
|
|
@@ -603,7 +636,9 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
603
636
|
isClickCapturedBySlider: (element: HTMLElement) => boolean;
|
|
604
637
|
};
|
|
605
638
|
}
|
|
639
|
+
|
|
606
640
|
type WidgetRateOptions = WidgetOptionsBase;
|
|
641
|
+
|
|
607
642
|
declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
608
643
|
static DEFAULTS: WidgetRateOptions;
|
|
609
644
|
static widgetClassName: string;
|
|
@@ -644,9 +679,11 @@ declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
|
644
679
|
setUserData: (slideRoot: HTMLElement, id: string, text: string) => void;
|
|
645
680
|
};
|
|
646
681
|
}
|
|
682
|
+
|
|
647
683
|
type WidgetShareOptions = WidgetOptionsBase & {
|
|
648
684
|
layers: Array<HTMLElement>;
|
|
649
685
|
};
|
|
686
|
+
|
|
650
687
|
declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
651
688
|
static DEFAULTS: WidgetShareOptions;
|
|
652
689
|
static widgetClassName: string;
|
|
@@ -675,7 +712,9 @@ declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
|
675
712
|
complete: (slideRoot: HTMLElement, id: string, isSuccess: boolean) => void;
|
|
676
713
|
};
|
|
677
714
|
}
|
|
715
|
+
|
|
678
716
|
type WidgetTestOptions = WidgetOptionsBase;
|
|
717
|
+
|
|
679
718
|
declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
680
719
|
static DEFAULTS: WidgetTestOptions;
|
|
681
720
|
static widgetClassName: string;
|
|
@@ -706,7 +745,6 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
706
745
|
private _selectAnswer;
|
|
707
746
|
selectAnswer(answer: HTMLElement): boolean;
|
|
708
747
|
private doneWithoutAnswer;
|
|
709
|
-
// complete answer select and save local data + stat event
|
|
710
748
|
private _completeWidget;
|
|
711
749
|
isDone(): boolean;
|
|
712
750
|
slideTestIsDone(): boolean;
|
|
@@ -717,12 +755,17 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
717
755
|
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
718
756
|
onStart: (element: HTMLElement) => void;
|
|
719
757
|
onStop: (element: HTMLElement) => void;
|
|
758
|
+
/**
|
|
759
|
+
* click on quiz answer
|
|
760
|
+
*/
|
|
720
761
|
select: (element: HTMLElement) => boolean;
|
|
721
762
|
slideTestIsDone: (element: HTMLElement) => boolean;
|
|
722
763
|
slideTestWithTimer: (element: HTMLElement) => boolean;
|
|
723
764
|
};
|
|
724
765
|
}
|
|
766
|
+
|
|
725
767
|
type WidgetTooltipOptions = WidgetOptionsBase;
|
|
768
|
+
|
|
726
769
|
declare class WidgetTooltip extends WidgetBase<WidgetTooltipOptions> {
|
|
727
770
|
static DEFAULTS: WidgetTooltipOptions;
|
|
728
771
|
static widgetClassName: string;
|
|
@@ -763,11 +806,13 @@ declare class WidgetTooltip extends WidgetBase<WidgetTooltipOptions> {
|
|
|
763
806
|
tooltipClick: (element: HTMLElement) => boolean;
|
|
764
807
|
};
|
|
765
808
|
}
|
|
809
|
+
|
|
766
810
|
type WidgetVoteOptions = WidgetOptionsBase;
|
|
767
|
-
type WidgetVoteSharedData = Record<string,
|
|
768
|
-
|
|
769
|
-
ts: number;
|
|
811
|
+
type WidgetVoteSharedData = Record<string, // element_id
|
|
812
|
+
Array<number>> & {
|
|
813
|
+
ts: number;
|
|
770
814
|
};
|
|
815
|
+
|
|
771
816
|
declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
772
817
|
static DEFAULTS: WidgetVoteOptions;
|
|
773
818
|
static widgetClassName: string;
|
|
@@ -798,7 +843,6 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
798
843
|
onRefreshUserData(localData: Record<string, any>): void;
|
|
799
844
|
private _clearSelectedVariants;
|
|
800
845
|
private _statEventVoteVariant;
|
|
801
|
-
// user click on (un)checked (radio btn) variant
|
|
802
846
|
private _checkVariant;
|
|
803
847
|
private _getCheckedVariants;
|
|
804
848
|
private _selectVariant;
|
|
@@ -825,6 +869,7 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
825
869
|
slideVoteIsDone: (element: HTMLElement) => boolean;
|
|
826
870
|
};
|
|
827
871
|
}
|
|
872
|
+
|
|
828
873
|
interface ILayoutApi {
|
|
829
874
|
get widgetCopyApi(): typeof WidgetCopy.api | undefined;
|
|
830
875
|
get widgetBarcodeApi(): typeof WidgetBarcode.api | undefined;
|
|
@@ -843,8 +888,9 @@ interface ILayoutApi {
|
|
|
843
888
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
844
889
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
845
890
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
846
|
-
get VideoPlayer(): typeof
|
|
891
|
+
get VideoPlayer(): typeof Player | undefined;
|
|
847
892
|
}
|
|
893
|
+
|
|
848
894
|
declare class LayoutService {
|
|
849
895
|
private _env;
|
|
850
896
|
private _layoutApi;
|
|
@@ -852,10 +898,106 @@ declare class LayoutService {
|
|
|
852
898
|
get env(): Window;
|
|
853
899
|
get layoutApi(): ILayoutApi;
|
|
854
900
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
901
|
+
|
|
902
|
+
declare class Toast {
|
|
903
|
+
constructor(options: {
|
|
904
|
+
content: string;
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
declare global {
|
|
908
|
+
interface Window {
|
|
909
|
+
_narrative_saved_data: Record<number, Record<string, any>>;
|
|
910
|
+
_narrative_slides_duration: Record<number, Record<number, number>>;
|
|
911
|
+
_narrative_range_slider_data: Record<number, WidgetRangeSliderSharedData>;
|
|
912
|
+
_narrative_poll_data: Record<number, WidgetPollSharedData>;
|
|
913
|
+
_narrative_vote_data: Record<number, WidgetVoteSharedData>;
|
|
914
|
+
_showNarrativeNextSlide(duration: number): void;
|
|
915
|
+
_sendStatisticEvent(name: string, data: Record<string, string | number | Array<string | number>>, devPayload?: Record<string, string | number | Array<string | number>>, forceEnableStatisticV2?: boolean): void;
|
|
916
|
+
_getNarrativeLocalData(): Promise<Record<string, any>>;
|
|
917
|
+
_showLayer(index: number): void;
|
|
918
|
+
_narrative_animation?: IAnimation;
|
|
919
|
+
Android?: Partial<{
|
|
920
|
+
storyPaused(currentTime: number | null): void;
|
|
921
|
+
storyResumed(currentTime: number | null): void;
|
|
922
|
+
storyLoaded(data?: string): void;
|
|
923
|
+
storyLoadingFailed(data?: string): void;
|
|
924
|
+
storyStarted(currentTime?: number): void;
|
|
925
|
+
}>;
|
|
926
|
+
webkit?: {
|
|
927
|
+
messageHandlers?: Partial<{
|
|
928
|
+
callbackHandler: {
|
|
929
|
+
postMessage(): void;
|
|
930
|
+
};
|
|
931
|
+
storyClick: {
|
|
932
|
+
postMessage(): void;
|
|
933
|
+
};
|
|
934
|
+
storyPaused: {
|
|
935
|
+
postMessage(data: string): void;
|
|
936
|
+
};
|
|
937
|
+
storyResumed: {
|
|
938
|
+
postMessage(data: string): void;
|
|
939
|
+
};
|
|
940
|
+
storyLoaded: {
|
|
941
|
+
postMessage(data: string): void;
|
|
942
|
+
};
|
|
943
|
+
storyLoadingFailed: {
|
|
944
|
+
postMessage(data: string): void;
|
|
945
|
+
};
|
|
946
|
+
storyStarted: {
|
|
947
|
+
postMessage(data: string): void;
|
|
948
|
+
};
|
|
949
|
+
}>;
|
|
950
|
+
};
|
|
951
|
+
isWeb?: boolean;
|
|
952
|
+
_showNarrativeTextInput(id: string, data: Record<string, any>): void;
|
|
953
|
+
_setNarrativeLocalData(keyValue: Record<string, any>, sendToServer: boolean): void;
|
|
954
|
+
_vibrate(pattern: number): void;
|
|
955
|
+
_sendApiRequest<Response>(url: string, method: string, params: Record<string, any> | null, headers: Record<string, any> | null, data: Record<string, any> | null, profilingKey: string): Promise<Response>;
|
|
956
|
+
sendApiRequestPromise(payload: string, cb: (cb: string | null, respString: string) => void): void;
|
|
957
|
+
_sendApiRequestSupported: boolean;
|
|
958
|
+
_toast: typeof Toast;
|
|
959
|
+
__sdkCanSendShareComplete: boolean;
|
|
960
|
+
__sdkCanFetchLocalFile: boolean;
|
|
961
|
+
__sdkSupportFileAssetsProtocol: boolean;
|
|
962
|
+
__sdkSupportTimelineOnBeforeStart: boolean;
|
|
963
|
+
__sdkSupportCorrectPauseResumeLifecycle: boolean;
|
|
964
|
+
_share(id: string, config: {
|
|
965
|
+
url?: string | null;
|
|
966
|
+
text?: string | null;
|
|
967
|
+
title?: string | null;
|
|
968
|
+
files?: Array<{
|
|
969
|
+
file: File;
|
|
970
|
+
name: string;
|
|
971
|
+
type: string;
|
|
972
|
+
}> | null;
|
|
973
|
+
}): void;
|
|
974
|
+
share_slide_screenshot(shareId: string, hideElementsSelector?: string, shareText?: string): void;
|
|
975
|
+
_showNarrativeSlide(slideIndex: number): void;
|
|
976
|
+
_showNextStoryExists: boolean;
|
|
977
|
+
_storyShowNext(): void;
|
|
978
|
+
_updateTimeline(slideIndex: number, action: TIMELINE_ACTION, currentTime: number, duration: number, showLoader: boolean, showError: boolean): void;
|
|
979
|
+
_sdkDisableVerticalSwipeGesture: () => void;
|
|
980
|
+
_sdkEnableVerticalSwipeGesture: () => void;
|
|
981
|
+
_sdkDisableBackpress: () => void;
|
|
982
|
+
_sdkEnableBackpress: () => void;
|
|
983
|
+
_closeStory: (reason: string) => void;
|
|
984
|
+
_openStory: (id: number, index: number) => void;
|
|
985
|
+
_openGame: (gameInstanceId: string) => void;
|
|
986
|
+
_cardClick: (data: {
|
|
987
|
+
type: "link" | "swipeUpLink" | "swipeUpItems";
|
|
988
|
+
link: {
|
|
989
|
+
type: "url" | "json";
|
|
990
|
+
target: string;
|
|
991
|
+
};
|
|
992
|
+
elementId?: string;
|
|
993
|
+
}) => void;
|
|
994
|
+
_writeToClipboard: (data: {
|
|
995
|
+
type: "text";
|
|
996
|
+
textValue: string;
|
|
997
|
+
}) => void;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
859
1001
|
declare class SlideTimeline {
|
|
860
1002
|
private readonly slideIndex;
|
|
861
1003
|
private readonly slideDuration;
|
|
@@ -899,6 +1041,7 @@ declare class SlideTimeline {
|
|
|
899
1041
|
onSlideDataWaiting(videoCurrentTime: number | null): void;
|
|
900
1042
|
onSlideError(videoCurrentTime: number | null): void;
|
|
901
1043
|
}
|
|
1044
|
+
|
|
902
1045
|
type APIResponse<DTO> = {
|
|
903
1046
|
status: number;
|
|
904
1047
|
data: DTO;
|
|
@@ -982,6 +1125,7 @@ interface SDKApi {
|
|
|
982
1125
|
isSdkSupportTimelineOnBeforeStart(): boolean;
|
|
983
1126
|
isSdkSupportCorrectPauseResumeLifecycle(): boolean;
|
|
984
1127
|
}
|
|
1128
|
+
|
|
985
1129
|
declare const enum CARD_TYPE {
|
|
986
1130
|
STORY = 1,
|
|
987
1131
|
UGC_STORY = 2,
|
|
@@ -989,6 +1133,8 @@ declare const enum CARD_TYPE {
|
|
|
989
1133
|
IN_APP_MESSAGING = 4,
|
|
990
1134
|
BANNER = 5
|
|
991
1135
|
}
|
|
1136
|
+
type GetSdkClientVariables = () => Record<string, any>;
|
|
1137
|
+
|
|
992
1138
|
type WidgetOptionsBase = {
|
|
993
1139
|
slide: HTMLElement | null;
|
|
994
1140
|
activateAfterCreate: boolean;
|
|
@@ -1017,6 +1163,7 @@ interface WidgetsSharedDataMap {
|
|
|
1017
1163
|
poll: WidgetPollSharedData;
|
|
1018
1164
|
vote: WidgetVoteSharedData;
|
|
1019
1165
|
}
|
|
1166
|
+
|
|
1020
1167
|
type OnWidgetComplete = (cardId: number, slideIndex: number) => void;
|
|
1021
1168
|
type OnWidgetRequirePauseUI = (cardId: number, slideIndex: number) => void;
|
|
1022
1169
|
type OnWidgetRequireResumeUI = (cardId: number, slideIndex: number) => void;
|
|
@@ -1029,12 +1176,15 @@ type WidgetDeps = {
|
|
|
1029
1176
|
sdkApi: SDKApi;
|
|
1030
1177
|
slideRoot: HTMLElement;
|
|
1031
1178
|
getLayoutDirection: () => "ltr" | "rtl";
|
|
1179
|
+
getSdkClientVariables: GetSdkClientVariables;
|
|
1032
1180
|
};
|
|
1181
|
+
|
|
1033
1182
|
declare class WidgetsService {
|
|
1034
1183
|
private _env;
|
|
1035
1184
|
constructor(_env: Window);
|
|
1036
1185
|
get env(): Window;
|
|
1037
1186
|
}
|
|
1187
|
+
|
|
1038
1188
|
type StatisticEventBaseFieldsShortForm = {
|
|
1039
1189
|
i: number;
|
|
1040
1190
|
si: number;
|
|
@@ -1116,6 +1266,7 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
|
|
|
1116
1266
|
static onRefreshUserData<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(element: HTMLElement, localData: Record<string, any>): void;
|
|
1117
1267
|
protected getPromotionalCodeFetchPath(promotionalCodeId: string): string;
|
|
1118
1268
|
}
|
|
1269
|
+
|
|
1119
1270
|
interface SDKInterface {
|
|
1120
1271
|
/**
|
|
1121
1272
|
* Return object from widgetsData._narrative_saved_data[cardId] or null
|
|
@@ -1267,12 +1418,15 @@ interface SDKInterface {
|
|
|
1267
1418
|
textValue: string;
|
|
1268
1419
|
}): void;
|
|
1269
1420
|
}
|
|
1421
|
+
|
|
1270
1422
|
type LocalData = Record<string, any>;
|
|
1423
|
+
|
|
1271
1424
|
declare global {
|
|
1272
1425
|
interface Window {
|
|
1273
1426
|
slideTimeline: SlideTimeline;
|
|
1274
1427
|
}
|
|
1275
1428
|
}
|
|
1429
|
+
|
|
1276
1430
|
interface IElement {
|
|
1277
1431
|
init(localData: LocalData): Promise<boolean>;
|
|
1278
1432
|
onPause(): void;
|
|
@@ -1281,10 +1435,10 @@ interface IElement {
|
|
|
1281
1435
|
onStart(): void;
|
|
1282
1436
|
onBeforeUnmount(): Promise<void>;
|
|
1283
1437
|
handleClick(): boolean;
|
|
1284
|
-
// is Layer on pause (by opened WidgetProducts for instance)
|
|
1285
1438
|
isLayerForcePaused: boolean;
|
|
1286
1439
|
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1287
1440
|
}
|
|
1441
|
+
|
|
1288
1442
|
declare class DataInput implements IElement {
|
|
1289
1443
|
private readonly _elementNodeRef;
|
|
1290
1444
|
private readonly _layer;
|
|
@@ -1306,6 +1460,7 @@ declare class DataInput implements IElement {
|
|
|
1306
1460
|
setUserData(id: string, text: string): void;
|
|
1307
1461
|
get isLayerForcePaused(): boolean;
|
|
1308
1462
|
}
|
|
1463
|
+
|
|
1309
1464
|
declare class Poll implements IElement {
|
|
1310
1465
|
private readonly _elementNodeRef;
|
|
1311
1466
|
private readonly _layer;
|
|
@@ -1327,6 +1482,7 @@ declare class Poll implements IElement {
|
|
|
1327
1482
|
setUserData(id: string, text: string): void;
|
|
1328
1483
|
get isLayerForcePaused(): boolean;
|
|
1329
1484
|
}
|
|
1485
|
+
|
|
1330
1486
|
declare class PollLayers implements IElement {
|
|
1331
1487
|
private readonly _elementNodeRef;
|
|
1332
1488
|
private readonly _layer;
|
|
@@ -1348,6 +1504,7 @@ declare class PollLayers implements IElement {
|
|
|
1348
1504
|
handleClick(): boolean;
|
|
1349
1505
|
get isLayerForcePaused(): boolean;
|
|
1350
1506
|
}
|
|
1507
|
+
|
|
1351
1508
|
declare class Products implements IElement {
|
|
1352
1509
|
private readonly _elementNodeRef;
|
|
1353
1510
|
private readonly _layer;
|
|
@@ -1371,6 +1528,7 @@ declare class Products implements IElement {
|
|
|
1371
1528
|
get isClickCapturedByWidget(): boolean;
|
|
1372
1529
|
get isLayerForcePaused(): boolean;
|
|
1373
1530
|
}
|
|
1531
|
+
|
|
1374
1532
|
declare class Quest implements IElement {
|
|
1375
1533
|
private readonly _elementNodeRef;
|
|
1376
1534
|
private readonly _layer;
|
|
@@ -1398,6 +1556,7 @@ declare class Quest implements IElement {
|
|
|
1398
1556
|
};
|
|
1399
1557
|
get isLayerForcePaused(): boolean;
|
|
1400
1558
|
}
|
|
1559
|
+
|
|
1401
1560
|
declare class Quiz implements IElement {
|
|
1402
1561
|
private readonly _elementNodeRef;
|
|
1403
1562
|
private readonly _layer;
|
|
@@ -1406,7 +1565,6 @@ declare class Quiz implements IElement {
|
|
|
1406
1565
|
private readonly _widgetDeps;
|
|
1407
1566
|
private static readonly _className;
|
|
1408
1567
|
static className(): string;
|
|
1409
|
-
// widgetApi in ctor
|
|
1410
1568
|
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _widgetApi: typeof WidgetQuiz.api, _widgetCallbacks: WidgetCallbacks, _widgetDeps: WidgetDeps);
|
|
1411
1569
|
static isTypeOf(element: IElement): element is Quiz;
|
|
1412
1570
|
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
@@ -1420,6 +1578,7 @@ declare class Quiz implements IElement {
|
|
|
1420
1578
|
get slideQuizIsDone(): boolean;
|
|
1421
1579
|
get isLayerForcePaused(): boolean;
|
|
1422
1580
|
}
|
|
1581
|
+
|
|
1423
1582
|
declare class QuizGrouped implements IElement {
|
|
1424
1583
|
private readonly _elementNodeRef;
|
|
1425
1584
|
private readonly _layer;
|
|
@@ -1441,6 +1600,7 @@ declare class QuizGrouped implements IElement {
|
|
|
1441
1600
|
get slideQuizGroupedIsDone(): boolean;
|
|
1442
1601
|
get isLayerForcePaused(): boolean;
|
|
1443
1602
|
}
|
|
1603
|
+
|
|
1444
1604
|
declare class RangeSlider implements IElement {
|
|
1445
1605
|
private readonly _elementNodeRef;
|
|
1446
1606
|
private readonly _layer;
|
|
@@ -1462,6 +1622,7 @@ declare class RangeSlider implements IElement {
|
|
|
1462
1622
|
handleClick(): boolean;
|
|
1463
1623
|
get isLayerForcePaused(): boolean;
|
|
1464
1624
|
}
|
|
1625
|
+
|
|
1465
1626
|
declare class Rate implements IElement {
|
|
1466
1627
|
private readonly _elementNodeRef;
|
|
1467
1628
|
private readonly _layer;
|
|
@@ -1483,6 +1644,7 @@ declare class Rate implements IElement {
|
|
|
1483
1644
|
setUserData(id: string, text: string): void;
|
|
1484
1645
|
get isLayerForcePaused(): boolean;
|
|
1485
1646
|
}
|
|
1647
|
+
|
|
1486
1648
|
declare class Share implements IElement {
|
|
1487
1649
|
private readonly _elementNodeRef;
|
|
1488
1650
|
private readonly _layer;
|
|
@@ -1506,6 +1668,7 @@ declare class Share implements IElement {
|
|
|
1506
1668
|
complete(id: string, isSuccess: boolean): void;
|
|
1507
1669
|
get isLayerForcePaused(): boolean;
|
|
1508
1670
|
}
|
|
1671
|
+
|
|
1509
1672
|
declare class SwipeUp implements IElement {
|
|
1510
1673
|
private readonly _elementNodeRef;
|
|
1511
1674
|
private readonly _layer;
|
|
@@ -1524,6 +1687,7 @@ declare class SwipeUp implements IElement {
|
|
|
1524
1687
|
get elementNodeRef(): HTMLElement;
|
|
1525
1688
|
get isLayerForcePaused(): boolean;
|
|
1526
1689
|
}
|
|
1690
|
+
|
|
1527
1691
|
declare class SwipeUpItems implements IElement {
|
|
1528
1692
|
private readonly _elementNodeRef;
|
|
1529
1693
|
private readonly _layer;
|
|
@@ -1542,6 +1706,7 @@ declare class SwipeUpItems implements IElement {
|
|
|
1542
1706
|
get elementNodeRef(): HTMLElement;
|
|
1543
1707
|
get isLayerForcePaused(): boolean;
|
|
1544
1708
|
}
|
|
1709
|
+
|
|
1545
1710
|
declare class Test implements IElement {
|
|
1546
1711
|
private readonly _elementNodeRef;
|
|
1547
1712
|
private readonly _layer;
|
|
@@ -1564,6 +1729,7 @@ declare class Test implements IElement {
|
|
|
1564
1729
|
get slideTestWithTimer(): boolean;
|
|
1565
1730
|
get isLayerForcePaused(): boolean;
|
|
1566
1731
|
}
|
|
1732
|
+
|
|
1567
1733
|
declare class Video implements IElement {
|
|
1568
1734
|
private readonly _elementNodeRef;
|
|
1569
1735
|
private readonly _layer;
|
|
@@ -1576,7 +1742,7 @@ declare class Video implements IElement {
|
|
|
1576
1742
|
private readonly _vodData;
|
|
1577
1743
|
private _vodPlayerInstance;
|
|
1578
1744
|
private _videoStateAdapter;
|
|
1579
|
-
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _VideoPlayer: typeof
|
|
1745
|
+
constructor(_elementNodeRef: HTMLElement, _layer: Layer, _VideoPlayer: typeof Player | undefined, _sdkApi: SDKApi);
|
|
1580
1746
|
static isTypeOf(element: IElement): element is Video;
|
|
1581
1747
|
mediaElementsLoadingPromises: Array<Promise<HTMLImageElement | HTMLVideoElement>>;
|
|
1582
1748
|
init(localData: LocalData): Promise<boolean>;
|
|
@@ -1608,6 +1774,7 @@ declare class Video implements IElement {
|
|
|
1608
1774
|
enableAudio(): void;
|
|
1609
1775
|
disableAudio(): void;
|
|
1610
1776
|
}
|
|
1777
|
+
|
|
1611
1778
|
declare class Slide {
|
|
1612
1779
|
private readonly _slidesNodesRefs;
|
|
1613
1780
|
private readonly _slideReadyPromise;
|
|
@@ -1619,9 +1786,10 @@ declare class Slide {
|
|
|
1619
1786
|
private readonly _getLayoutDirection;
|
|
1620
1787
|
private readonly _slidePauseUI;
|
|
1621
1788
|
private readonly _slideResumeUI;
|
|
1789
|
+
private readonly _getSdkClientVariables;
|
|
1622
1790
|
private readonly _layers;
|
|
1623
1791
|
private _start;
|
|
1624
|
-
constructor(_slidesNodesRefs: Array<HTMLElement>, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void
|
|
1792
|
+
constructor(_slidesNodesRefs: Array<HTMLElement>, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
|
|
1625
1793
|
private _activeLayer;
|
|
1626
1794
|
get activeLayer(): Layer;
|
|
1627
1795
|
get layers(): Array<Layer>;
|
|
@@ -1639,6 +1807,7 @@ declare class Slide {
|
|
|
1639
1807
|
get slideCount(): number;
|
|
1640
1808
|
get disabledNavigation(): boolean;
|
|
1641
1809
|
}
|
|
1810
|
+
|
|
1642
1811
|
declare const enum ON_SLIDE_STOP_PREPARE_FOR_RESTART {
|
|
1643
1812
|
UNKNOWN = 0,
|
|
1644
1813
|
PREPARE = 1,
|
|
@@ -1656,6 +1825,7 @@ declare class Layer {
|
|
|
1656
1825
|
private readonly _getLayoutDirection;
|
|
1657
1826
|
private readonly _slidePauseUI;
|
|
1658
1827
|
private readonly _slideResumeUI;
|
|
1828
|
+
private readonly _getSdkClientVariables;
|
|
1659
1829
|
private readonly _slideIndex;
|
|
1660
1830
|
private readonly _cardId;
|
|
1661
1831
|
private readonly _cardType;
|
|
@@ -1666,7 +1836,7 @@ declare class Layer {
|
|
|
1666
1836
|
private _elements;
|
|
1667
1837
|
private readonly _timeline;
|
|
1668
1838
|
private readonly _widgetDeps;
|
|
1669
|
-
constructor(_nodeRef: HTMLElement, _slide: Slide, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void
|
|
1839
|
+
constructor(_nodeRef: HTMLElement, _slide: Slide, _slideReadyPromise: Promise<void>, _afterAppResumeQueuePush: (cb: () => void) => void, _afterStartInitQueuePush: (cb: () => void) => void, _showNextSlide: (duration: number) => void, sdkApi: SDKApi, _slideRoot: HTMLElement, _getLayoutDirection: () => "ltr" | "rtl", _slidePauseUI: () => Promise<void>, _slideResumeUI: () => Promise<void>, _getSdkClientVariables: GetSdkClientVariables);
|
|
1670
1840
|
init(localData: LocalData): Array<Promise<boolean>>;
|
|
1671
1841
|
onAfterAllMediaResourcesLoaded(): void;
|
|
1672
1842
|
get nodeRef(): HTMLElement;
|
|
@@ -1718,34 +1888,22 @@ declare class Layer {
|
|
|
1718
1888
|
onBeforeUnmount(): Promise<void>;
|
|
1719
1889
|
get isLayerForcePaused(): boolean;
|
|
1720
1890
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
INITED = 1,
|
|
1724
|
-
START = 2,
|
|
1725
|
-
STARTED = 3,
|
|
1726
|
-
RESUME = 4,
|
|
1727
|
-
RESUMED = 5,
|
|
1728
|
-
APP_PAUSE = 6,
|
|
1729
|
-
APP_PAUSED = 7,
|
|
1730
|
-
USER_PAUSE = 8,
|
|
1731
|
-
USER_PAUSED = 9,
|
|
1732
|
-
FORCE_PAUSED = 10,
|
|
1733
|
-
STOP = 11,
|
|
1734
|
-
STOPPED = 12,
|
|
1735
|
-
DESTROYED = 13
|
|
1736
|
-
}
|
|
1737
|
-
declare class SlideApi {
|
|
1891
|
+
|
|
1892
|
+
declare class SlideApi$1 {
|
|
1738
1893
|
private readonly config;
|
|
1739
1894
|
get layoutDirection(): "ltr" | "rtl";
|
|
1740
1895
|
private static renderedBoxClassName;
|
|
1741
1896
|
private static prerenderBoxClassName;
|
|
1742
|
-
private readonly
|
|
1897
|
+
private readonly _singleCardSlideWrapper;
|
|
1743
1898
|
private readonly _viewport;
|
|
1744
1899
|
private readonly _getViewportWidth;
|
|
1745
1900
|
private readonly _getViewportHeight;
|
|
1746
1901
|
private readonly _overlappingActionBarHeight;
|
|
1747
1902
|
private readonly _separateUserAndAppPause;
|
|
1748
1903
|
readonly sdkApi: SDKApi;
|
|
1904
|
+
private activeCard;
|
|
1905
|
+
private cards;
|
|
1906
|
+
private multiCardsMode;
|
|
1749
1907
|
constructor(config: {
|
|
1750
1908
|
sdkApi: SDKApi;
|
|
1751
1909
|
slideWrapper: HTMLElement;
|
|
@@ -1767,7 +1925,10 @@ declare class SlideApi {
|
|
|
1767
1925
|
getViewportHeight: () => number;
|
|
1768
1926
|
overlappingActionBarHeight?: number;
|
|
1769
1927
|
separateUserAndAppPause: boolean;
|
|
1928
|
+
root: HTMLElement;
|
|
1929
|
+
nonce?: string;
|
|
1770
1930
|
});
|
|
1931
|
+
get state(): number;
|
|
1771
1932
|
destroy(): Promise<void>;
|
|
1772
1933
|
private initListeners;
|
|
1773
1934
|
private destroyListeners;
|
|
@@ -1780,23 +1941,16 @@ declare class SlideApi {
|
|
|
1780
1941
|
result: boolean;
|
|
1781
1942
|
reason?: string;
|
|
1782
1943
|
}>;
|
|
1944
|
+
private cardsSlider;
|
|
1945
|
+
showSlides(cards: Array<string>, cardAppearance: Record<string, any>): Promise<{
|
|
1946
|
+
cardId: number;
|
|
1947
|
+
slideIndex: number;
|
|
1948
|
+
result: boolean;
|
|
1949
|
+
reason?: string;
|
|
1950
|
+
}>;
|
|
1783
1951
|
handleBackpress(): void;
|
|
1784
1952
|
private get layoutService();
|
|
1785
1953
|
private getLocalData;
|
|
1786
|
-
private _fontsInit;
|
|
1787
|
-
private _initAndLoadFonts;
|
|
1788
|
-
// todo nullable
|
|
1789
|
-
private _slide;
|
|
1790
|
-
private _slideInInit;
|
|
1791
|
-
private _state;
|
|
1792
|
-
private _afterStartInitQueue;
|
|
1793
|
-
private _afterAppResumeQueue;
|
|
1794
|
-
get state(): STATE;
|
|
1795
|
-
private _onAllMediaLoaded;
|
|
1796
|
-
private _init;
|
|
1797
|
-
private _slideInRender;
|
|
1798
|
-
private _slideBoxRenderComplete;
|
|
1799
|
-
private _slideConfig;
|
|
1800
1954
|
slideStart(config: {
|
|
1801
1955
|
muted?: boolean;
|
|
1802
1956
|
}): Promise<{
|
|
@@ -1807,7 +1961,6 @@ declare class SlideApi {
|
|
|
1807
1961
|
}): Promise<{
|
|
1808
1962
|
currentTime: number;
|
|
1809
1963
|
}>;
|
|
1810
|
-
private _pauseCbTimer;
|
|
1811
1964
|
slideUserPause(): Promise<void>;
|
|
1812
1965
|
slideUserResume(): Promise<void>;
|
|
1813
1966
|
/**
|
|
@@ -1822,12 +1975,6 @@ declare class SlideApi {
|
|
|
1822
1975
|
prepareForRestart: ON_SLIDE_STOP_PREPARE_FOR_RESTART;
|
|
1823
1976
|
}): Promise<void>;
|
|
1824
1977
|
slideTimerEnd(): void;
|
|
1825
|
-
// for call from SlideApi internals (from widgets)
|
|
1826
|
-
// skip state checking and sdk issues
|
|
1827
|
-
private slidePauseUI;
|
|
1828
|
-
// for call from SlideApi internals (from widgets)
|
|
1829
|
-
// skip state checking and sdk issues
|
|
1830
|
-
private slideResumeUI;
|
|
1831
1978
|
enableAudio(): void;
|
|
1832
1979
|
disableAudio(): void;
|
|
1833
1980
|
get isStopped(): boolean;
|
|
@@ -1837,24 +1984,20 @@ declare class SlideApi {
|
|
|
1837
1984
|
get slide(): Slide;
|
|
1838
1985
|
showLayer(index: number): void;
|
|
1839
1986
|
slideClickHandler(targetElement: HTMLElement | null, navigationDirection: "forward" | "backward"): {
|
|
1840
|
-
// todo rename to continueNavigationClick (or via two flags, continueNavigationForwardClick & continueNavigationBackwardClick)
|
|
1841
1987
|
canClickNext: boolean;
|
|
1842
1988
|
};
|
|
1843
|
-
/**
|
|
1844
|
-
* Handle click or swipeUp on linkable elements (elements with data: linkType & linkTarget)
|
|
1845
|
-
* And click or swipeUp on SwipeUp elements (WidgetProducts, WidgetGoods)
|
|
1846
|
-
*/
|
|
1847
|
-
private _handleLinkAndSwipeUpActivation;
|
|
1848
1989
|
slideSwipeUpHandler(): boolean;
|
|
1849
1990
|
setTextInputResult(id: string, text: string): void;
|
|
1850
1991
|
setShareComplete(id: string, isSuccess: boolean): void;
|
|
1851
1992
|
setWidgetGoodsComplete(elementId: string): void;
|
|
1993
|
+
private _sdkClientVariables;
|
|
1994
|
+
getSdkClientVariables(): ReturnType<GetSdkClientVariables>;
|
|
1995
|
+
setSdkClientVariables(variables: Record<string, any>): void;
|
|
1852
1996
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
declare class SlideApi$0 extends BaseSlideApi {
|
|
1997
|
+
|
|
1998
|
+
declare class SlideApi extends SlideApi$1 {
|
|
1999
|
+
private root;
|
|
2000
|
+
private slideWrapper;
|
|
1858
2001
|
constructor(_sdkInterface: SDKInterface, config: {
|
|
1859
2002
|
root: HTMLElement;
|
|
1860
2003
|
slideRatio: number;
|
|
@@ -1866,9 +2009,11 @@ declare class SlideApi$0 extends BaseSlideApi {
|
|
|
1866
2009
|
viewportHeight: number;
|
|
1867
2010
|
fontSize: number;
|
|
1868
2011
|
}) => void;
|
|
1869
|
-
VODPlayer?: typeof
|
|
2012
|
+
VODPlayer?: typeof Player;
|
|
1870
2013
|
overlappingActionBarHeight?: number;
|
|
1871
2014
|
});
|
|
2015
|
+
destroy(): Promise<void>;
|
|
1872
2016
|
}
|
|
1873
|
-
|
|
1874
|
-
export {
|
|
2017
|
+
|
|
2018
|
+
export { ON_SLIDE_STOP_PREPARE_FOR_RESTART, SlideApi, TIMELINE_ACTION, Widgets };
|
|
2019
|
+
export type { FontDTO, SDKInterface, WidgetPollSharedData, WidgetRangeSliderSharedData, WidgetVoteSharedData, WidgetsSharedDataMap };
|