@inappstory/slide-api 0.0.18 → 0.0.20
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 +84 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -43
- package/dist/index.d.ts +59 -43
- package/dist/index.js +84 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -58,7 +58,7 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
58
58
|
* @param options
|
|
59
59
|
*/
|
|
60
60
|
constructor(element: HTMLElement, options: Partial<WidgetRangeSliderOptions>);
|
|
61
|
-
|
|
61
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
62
62
|
private _statEventInputSave;
|
|
63
63
|
click(): boolean;
|
|
64
64
|
private completeWidget;
|
|
@@ -83,6 +83,7 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
83
83
|
static api: {
|
|
84
84
|
widgetClassName: string;
|
|
85
85
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
86
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
86
87
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
87
88
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
88
89
|
click: (element: HTMLElement) => boolean;
|
|
@@ -126,7 +127,7 @@ declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
|
126
127
|
* @param options
|
|
127
128
|
*/
|
|
128
129
|
constructor(element: HTMLElement, options: Partial<WidgetPollOptions>);
|
|
129
|
-
|
|
130
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
130
131
|
private _statEventPollAnswer;
|
|
131
132
|
private _statEventInputSave;
|
|
132
133
|
_selectVariant(index: number, filled?: boolean): void;
|
|
@@ -141,6 +142,7 @@ declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
|
141
142
|
static api: {
|
|
142
143
|
widgetClassName: string;
|
|
143
144
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
145
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
144
146
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
145
147
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
146
148
|
select: (element: HTMLElement) => boolean;
|
|
@@ -161,12 +163,12 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
161
163
|
private questionCount;
|
|
162
164
|
private selectedAnswer;
|
|
163
165
|
private label;
|
|
164
|
-
private variants;
|
|
165
|
-
private variantsTexts;
|
|
166
|
+
private readonly variants;
|
|
167
|
+
private readonly variantsTexts;
|
|
166
168
|
private selectedVariant;
|
|
167
169
|
private voteAllocation;
|
|
168
|
-
private hideClientTotalResult;
|
|
169
|
-
private multipleChoice;
|
|
170
|
+
private readonly hideClientTotalResult;
|
|
171
|
+
private readonly multipleChoice;
|
|
170
172
|
/**
|
|
171
173
|
* @throws Error
|
|
172
174
|
* @param element
|
|
@@ -174,7 +176,7 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
174
176
|
*/
|
|
175
177
|
constructor(element: HTMLElement, options: Partial<WidgetVoteOptions>);
|
|
176
178
|
private _initFromLocalData;
|
|
177
|
-
|
|
179
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
178
180
|
private _clearSelectedVariants;
|
|
179
181
|
private _statEventVoteVariant;
|
|
180
182
|
// user click on (un)checked (radio btn) variant
|
|
@@ -196,6 +198,7 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
196
198
|
static api: {
|
|
197
199
|
widgetClassName: string;
|
|
198
200
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
201
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
199
202
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
200
203
|
fallbackInitOnMultiSlide: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
201
204
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
@@ -248,21 +251,21 @@ type WidgetBarcodeOptions = WidgetOptionsBase;
|
|
|
248
251
|
declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
249
252
|
static DEFAULTS: WidgetBarcodeOptions;
|
|
250
253
|
static widgetClassName: string;
|
|
251
|
-
private captionView;
|
|
252
|
-
private svgView;
|
|
254
|
+
private readonly captionView;
|
|
255
|
+
private readonly svgView;
|
|
253
256
|
private clipboardTarget;
|
|
254
|
-
private codeType;
|
|
255
|
-
private formatterType;
|
|
256
|
-
private copiedText;
|
|
257
|
-
private isPromotionalCode;
|
|
257
|
+
private readonly codeType;
|
|
258
|
+
private readonly formatterType;
|
|
259
|
+
private readonly copiedText;
|
|
260
|
+
private readonly isPromotionalCode;
|
|
258
261
|
private state;
|
|
259
|
-
private msgNetworkError;
|
|
260
|
-
private msgServiceError;
|
|
261
|
-
private msgNoMoreCodes;
|
|
262
|
-
private msgTryAgain;
|
|
263
|
-
private msgBarcodeRenderError;
|
|
262
|
+
private readonly msgNetworkError;
|
|
263
|
+
private readonly msgServiceError;
|
|
264
|
+
private readonly msgNoMoreCodes;
|
|
265
|
+
private readonly msgTryAgain;
|
|
266
|
+
private readonly msgBarcodeRenderError;
|
|
264
267
|
constructor(element: HTMLElement, options: Partial<WidgetBarcodeOptions>);
|
|
265
|
-
|
|
268
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
266
269
|
private isTransparentElement;
|
|
267
270
|
private renderCodeView;
|
|
268
271
|
private formatCaptionText;
|
|
@@ -279,6 +282,7 @@ declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
|
279
282
|
static api: {
|
|
280
283
|
widgetClassName: string;
|
|
281
284
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
285
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
282
286
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
283
287
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
284
288
|
click: (element: HTMLElement) => boolean;
|
|
@@ -288,19 +292,19 @@ type WidgetCopyOptions = WidgetOptionsBase;
|
|
|
288
292
|
declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
289
293
|
static DEFAULTS: WidgetCopyOptions;
|
|
290
294
|
static widgetClassName: string;
|
|
291
|
-
private button;
|
|
295
|
+
private readonly button;
|
|
292
296
|
private clipboardTarget;
|
|
293
|
-
private isPromotionalCode;
|
|
297
|
+
private readonly isPromotionalCode;
|
|
294
298
|
private state;
|
|
295
|
-
private msgNetworkError;
|
|
296
|
-
private msgServiceError;
|
|
297
|
-
private msgNoMoreCodes;
|
|
298
|
-
private msgTryAgain;
|
|
299
|
-
private geometry;
|
|
300
|
-
private resultLayer;
|
|
301
|
-
private resultLayerGeometry;
|
|
299
|
+
private readonly msgNetworkError;
|
|
300
|
+
private readonly msgServiceError;
|
|
301
|
+
private readonly msgNoMoreCodes;
|
|
302
|
+
private readonly msgTryAgain;
|
|
303
|
+
private readonly geometry;
|
|
304
|
+
private readonly resultLayer;
|
|
305
|
+
private readonly resultLayerGeometry;
|
|
302
306
|
constructor(element: HTMLElement, options: Partial<WidgetCopyOptions>);
|
|
303
|
-
|
|
307
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
304
308
|
private isTransparentElement;
|
|
305
309
|
private changeText;
|
|
306
310
|
private fetchPromoCode;
|
|
@@ -314,6 +318,7 @@ declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
|
314
318
|
static api: {
|
|
315
319
|
widgetClassName: string;
|
|
316
320
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
321
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
317
322
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
318
323
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
319
324
|
click: (element: HTMLElement) => boolean;
|
|
@@ -339,7 +344,7 @@ declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
|
339
344
|
* @param options
|
|
340
345
|
*/
|
|
341
346
|
constructor(element: HTMLElement, options: Partial<WidgetDataInputOptions>);
|
|
342
|
-
|
|
347
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
343
348
|
private _statEventFocusIn;
|
|
344
349
|
private _statEventInputSave;
|
|
345
350
|
isDone(): boolean;
|
|
@@ -349,6 +354,7 @@ declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
|
349
354
|
static api: {
|
|
350
355
|
widgetClassName: string;
|
|
351
356
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
357
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
352
358
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
353
359
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
354
360
|
click: (element: HTMLElement) => boolean;
|
|
@@ -378,7 +384,7 @@ declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions>
|
|
|
378
384
|
private thirdGroup2;
|
|
379
385
|
private thirdGroupCaption;
|
|
380
386
|
constructor(element: HTMLElement, options: Partial<WidgetDateCountdownOptions>);
|
|
381
|
-
|
|
387
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
382
388
|
private pause;
|
|
383
389
|
private resume;
|
|
384
390
|
private initTimer;
|
|
@@ -387,6 +393,7 @@ declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions>
|
|
|
387
393
|
static api: {
|
|
388
394
|
widgetClassName: string;
|
|
389
395
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
396
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
390
397
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
391
398
|
initWidget: (nodeList: Iterable<HTMLElement>, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
392
399
|
onPause: (element: HTMLElement) => void;
|
|
@@ -412,7 +419,7 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
412
419
|
private selectedVariant;
|
|
413
420
|
private layers;
|
|
414
421
|
constructor(element: HTMLElement, options: Partial<WidgetPollLayersOptions>);
|
|
415
|
-
|
|
422
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
416
423
|
private _statEventPollVariant;
|
|
417
424
|
private _selectVariant;
|
|
418
425
|
selectVariant(variant: HTMLElement): boolean;
|
|
@@ -422,6 +429,7 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
422
429
|
static api: {
|
|
423
430
|
widgetClassName: string;
|
|
424
431
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
432
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
425
433
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
426
434
|
initWidget: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
427
435
|
select: (element: HTMLElement) => boolean;
|
|
@@ -434,12 +442,12 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
434
442
|
private selectedAnswer;
|
|
435
443
|
protected label: HTMLElement | null;
|
|
436
444
|
protected variants: Array<HTMLElement>;
|
|
437
|
-
private isWidget;
|
|
438
|
-
private slideCount;
|
|
439
|
-
private nonFinalSlide;
|
|
440
|
-
private finalSlide;
|
|
445
|
+
private readonly isWidget;
|
|
446
|
+
private readonly slideCount;
|
|
447
|
+
private readonly nonFinalSlide;
|
|
448
|
+
private readonly finalSlide;
|
|
441
449
|
constructor(element: HTMLElement, options: Partial<WidgetQuestOptions>);
|
|
442
|
-
|
|
450
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
443
451
|
private setCardSessionValue;
|
|
444
452
|
private getCardSessionValue;
|
|
445
453
|
private init;
|
|
@@ -457,6 +465,7 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
457
465
|
static api: {
|
|
458
466
|
widgetClassName: string;
|
|
459
467
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
468
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
460
469
|
init: (element: HTMLElement, localData?: Record<string, any>) => Promise<boolean>;
|
|
461
470
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => Promise<boolean>;
|
|
462
471
|
select: (element: HTMLElement) => boolean;
|
|
@@ -478,7 +487,7 @@ declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
|
478
487
|
private questionCount;
|
|
479
488
|
private selectedAnswer;
|
|
480
489
|
constructor(element: HTMLElement, options: Partial<WidgetQuizOptions>);
|
|
481
|
-
|
|
490
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
482
491
|
private _selectAnswer;
|
|
483
492
|
private _clearAnswerSelection;
|
|
484
493
|
selectAnswer(answer: HTMLElement): boolean;
|
|
@@ -487,6 +496,7 @@ declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
|
487
496
|
static api: {
|
|
488
497
|
widgetClassName: string;
|
|
489
498
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
499
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
490
500
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
491
501
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
492
502
|
select: (element: HTMLElement) => boolean;
|
|
@@ -512,7 +522,7 @@ declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
|
512
522
|
* @param options
|
|
513
523
|
*/
|
|
514
524
|
constructor(element: HTMLElement, options: Partial<WidgetQuizGroupedOptions>);
|
|
515
|
-
|
|
525
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
516
526
|
private _selectAnswer;
|
|
517
527
|
private _clearAnswerSelection;
|
|
518
528
|
private _updateScore;
|
|
@@ -522,6 +532,7 @@ declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
|
522
532
|
static api: {
|
|
523
533
|
widgetClassName: string;
|
|
524
534
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
535
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
525
536
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
526
537
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
527
538
|
select: (element: HTMLElement) => boolean;
|
|
@@ -545,7 +556,7 @@ declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
|
545
556
|
private answerSelectDuration;
|
|
546
557
|
private elementRect;
|
|
547
558
|
constructor(element: HTMLElement, options: Partial<WidgetRateOptions>);
|
|
548
|
-
|
|
559
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
549
560
|
private _statEventRateUsAnswer;
|
|
550
561
|
private _selectStar;
|
|
551
562
|
private _clearSelectedStar;
|
|
@@ -557,6 +568,7 @@ declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
|
557
568
|
static api: {
|
|
558
569
|
widgetClassName: string;
|
|
559
570
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
571
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
560
572
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
561
573
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
562
574
|
select: (element: HTMLElement) => boolean;
|
|
@@ -576,7 +588,7 @@ declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
|
576
588
|
private withLayer;
|
|
577
589
|
private btnDisabled;
|
|
578
590
|
constructor(element: HTMLElement, options: Partial<WidgetShareOptions>);
|
|
579
|
-
|
|
591
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
580
592
|
private _statEventShare;
|
|
581
593
|
private share;
|
|
582
594
|
_complete(isSuccess: boolean): void;
|
|
@@ -584,6 +596,7 @@ declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
|
584
596
|
static api: {
|
|
585
597
|
widgetClassName: string;
|
|
586
598
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
599
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
587
600
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
588
601
|
initWidget: (nodeList: Iterable<HTMLElement>, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
589
602
|
click: (element: HTMLElement) => void;
|
|
@@ -608,7 +621,7 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
608
621
|
private timeLeftDefault;
|
|
609
622
|
private timeline;
|
|
610
623
|
constructor(element: HTMLElement, options: Partial<WidgetTestOptions>);
|
|
611
|
-
|
|
624
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
612
625
|
private _statEventVoteAnswer;
|
|
613
626
|
private _selectAnswer;
|
|
614
627
|
selectAnswer(answer: HTMLElement): boolean;
|
|
@@ -621,6 +634,7 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
621
634
|
static api: {
|
|
622
635
|
widgetClassName: string;
|
|
623
636
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
637
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
624
638
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
625
639
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
626
640
|
select: (element: HTMLElement) => boolean;
|
|
@@ -736,7 +750,7 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
|
|
|
736
750
|
protected firstOpenTime: number;
|
|
737
751
|
protected id: string;
|
|
738
752
|
constructor(element: HTMLElement, options: Partial<WidgetOptions>, elementIdGetter?: (element: HTMLElement) => string, slideGetter?: (element: HTMLElement) => HTMLElement);
|
|
739
|
-
|
|
753
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
740
754
|
static widgetCacheKey: string;
|
|
741
755
|
static widgetClassName: string;
|
|
742
756
|
static getInstance<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(element: HTMLElement): Widget | undefined;
|
|
@@ -759,7 +773,9 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
|
|
|
759
773
|
startDisabledTimeline(): void;
|
|
760
774
|
protected _showLayout(layers: Array<HTMLElement>, selectIndex: number, withStatEvent?: boolean): void;
|
|
761
775
|
protected _statEventLayoutShow(layoutIndex: number): void;
|
|
776
|
+
/** @deprecated */
|
|
762
777
|
static refreshUserData<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(nodes: NodeListOf<HTMLElement>, localData?: Record<string, any>): void;
|
|
778
|
+
static onRefreshUserData<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(element: HTMLElement, localData?: Record<string, any>): void;
|
|
763
779
|
protected getPromotionalCodeFetchPath(promotionalCodeId: string): string;
|
|
764
780
|
}
|
|
765
781
|
interface SDKInterface {
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
58
58
|
* @param options
|
|
59
59
|
*/
|
|
60
60
|
constructor(element: HTMLElement, options: Partial<WidgetRangeSliderOptions>);
|
|
61
|
-
|
|
61
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
62
62
|
private _statEventInputSave;
|
|
63
63
|
click(): boolean;
|
|
64
64
|
private completeWidget;
|
|
@@ -83,6 +83,7 @@ declare class WidgetRangeSlider extends WidgetBase<WidgetRangeSliderOptions> {
|
|
|
83
83
|
static api: {
|
|
84
84
|
widgetClassName: string;
|
|
85
85
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
86
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
86
87
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
87
88
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
88
89
|
click: (element: HTMLElement) => boolean;
|
|
@@ -126,7 +127,7 @@ declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
|
126
127
|
* @param options
|
|
127
128
|
*/
|
|
128
129
|
constructor(element: HTMLElement, options: Partial<WidgetPollOptions>);
|
|
129
|
-
|
|
130
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
130
131
|
private _statEventPollAnswer;
|
|
131
132
|
private _statEventInputSave;
|
|
132
133
|
_selectVariant(index: number, filled?: boolean): void;
|
|
@@ -141,6 +142,7 @@ declare class WidgetPoll extends WidgetBase<WidgetPollOptions> {
|
|
|
141
142
|
static api: {
|
|
142
143
|
widgetClassName: string;
|
|
143
144
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
145
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
144
146
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
145
147
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
146
148
|
select: (element: HTMLElement) => boolean;
|
|
@@ -161,12 +163,12 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
161
163
|
private questionCount;
|
|
162
164
|
private selectedAnswer;
|
|
163
165
|
private label;
|
|
164
|
-
private variants;
|
|
165
|
-
private variantsTexts;
|
|
166
|
+
private readonly variants;
|
|
167
|
+
private readonly variantsTexts;
|
|
166
168
|
private selectedVariant;
|
|
167
169
|
private voteAllocation;
|
|
168
|
-
private hideClientTotalResult;
|
|
169
|
-
private multipleChoice;
|
|
170
|
+
private readonly hideClientTotalResult;
|
|
171
|
+
private readonly multipleChoice;
|
|
170
172
|
/**
|
|
171
173
|
* @throws Error
|
|
172
174
|
* @param element
|
|
@@ -174,7 +176,7 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
174
176
|
*/
|
|
175
177
|
constructor(element: HTMLElement, options: Partial<WidgetVoteOptions>);
|
|
176
178
|
private _initFromLocalData;
|
|
177
|
-
|
|
179
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
178
180
|
private _clearSelectedVariants;
|
|
179
181
|
private _statEventVoteVariant;
|
|
180
182
|
// user click on (un)checked (radio btn) variant
|
|
@@ -196,6 +198,7 @@ declare class WidgetVote extends WidgetBase<WidgetVoteOptions> {
|
|
|
196
198
|
static api: {
|
|
197
199
|
widgetClassName: string;
|
|
198
200
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
201
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
199
202
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
200
203
|
fallbackInitOnMultiSlide: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
201
204
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
@@ -248,21 +251,21 @@ type WidgetBarcodeOptions = WidgetOptionsBase;
|
|
|
248
251
|
declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
249
252
|
static DEFAULTS: WidgetBarcodeOptions;
|
|
250
253
|
static widgetClassName: string;
|
|
251
|
-
private captionView;
|
|
252
|
-
private svgView;
|
|
254
|
+
private readonly captionView;
|
|
255
|
+
private readonly svgView;
|
|
253
256
|
private clipboardTarget;
|
|
254
|
-
private codeType;
|
|
255
|
-
private formatterType;
|
|
256
|
-
private copiedText;
|
|
257
|
-
private isPromotionalCode;
|
|
257
|
+
private readonly codeType;
|
|
258
|
+
private readonly formatterType;
|
|
259
|
+
private readonly copiedText;
|
|
260
|
+
private readonly isPromotionalCode;
|
|
258
261
|
private state;
|
|
259
|
-
private msgNetworkError;
|
|
260
|
-
private msgServiceError;
|
|
261
|
-
private msgNoMoreCodes;
|
|
262
|
-
private msgTryAgain;
|
|
263
|
-
private msgBarcodeRenderError;
|
|
262
|
+
private readonly msgNetworkError;
|
|
263
|
+
private readonly msgServiceError;
|
|
264
|
+
private readonly msgNoMoreCodes;
|
|
265
|
+
private readonly msgTryAgain;
|
|
266
|
+
private readonly msgBarcodeRenderError;
|
|
264
267
|
constructor(element: HTMLElement, options: Partial<WidgetBarcodeOptions>);
|
|
265
|
-
|
|
268
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
266
269
|
private isTransparentElement;
|
|
267
270
|
private renderCodeView;
|
|
268
271
|
private formatCaptionText;
|
|
@@ -279,6 +282,7 @@ declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
|
279
282
|
static api: {
|
|
280
283
|
widgetClassName: string;
|
|
281
284
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
285
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
282
286
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
283
287
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
284
288
|
click: (element: HTMLElement) => boolean;
|
|
@@ -288,19 +292,19 @@ type WidgetCopyOptions = WidgetOptionsBase;
|
|
|
288
292
|
declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
289
293
|
static DEFAULTS: WidgetCopyOptions;
|
|
290
294
|
static widgetClassName: string;
|
|
291
|
-
private button;
|
|
295
|
+
private readonly button;
|
|
292
296
|
private clipboardTarget;
|
|
293
|
-
private isPromotionalCode;
|
|
297
|
+
private readonly isPromotionalCode;
|
|
294
298
|
private state;
|
|
295
|
-
private msgNetworkError;
|
|
296
|
-
private msgServiceError;
|
|
297
|
-
private msgNoMoreCodes;
|
|
298
|
-
private msgTryAgain;
|
|
299
|
-
private geometry;
|
|
300
|
-
private resultLayer;
|
|
301
|
-
private resultLayerGeometry;
|
|
299
|
+
private readonly msgNetworkError;
|
|
300
|
+
private readonly msgServiceError;
|
|
301
|
+
private readonly msgNoMoreCodes;
|
|
302
|
+
private readonly msgTryAgain;
|
|
303
|
+
private readonly geometry;
|
|
304
|
+
private readonly resultLayer;
|
|
305
|
+
private readonly resultLayerGeometry;
|
|
302
306
|
constructor(element: HTMLElement, options: Partial<WidgetCopyOptions>);
|
|
303
|
-
|
|
307
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
304
308
|
private isTransparentElement;
|
|
305
309
|
private changeText;
|
|
306
310
|
private fetchPromoCode;
|
|
@@ -314,6 +318,7 @@ declare class WidgetCopy extends WidgetBase<WidgetCopyOptions> {
|
|
|
314
318
|
static api: {
|
|
315
319
|
widgetClassName: string;
|
|
316
320
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
321
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
317
322
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
318
323
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
319
324
|
click: (element: HTMLElement) => boolean;
|
|
@@ -339,7 +344,7 @@ declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
|
339
344
|
* @param options
|
|
340
345
|
*/
|
|
341
346
|
constructor(element: HTMLElement, options: Partial<WidgetDataInputOptions>);
|
|
342
|
-
|
|
347
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
343
348
|
private _statEventFocusIn;
|
|
344
349
|
private _statEventInputSave;
|
|
345
350
|
isDone(): boolean;
|
|
@@ -349,6 +354,7 @@ declare class WidgetDataInput extends WidgetBase<WidgetDataInputOptions> {
|
|
|
349
354
|
static api: {
|
|
350
355
|
widgetClassName: string;
|
|
351
356
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
357
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
352
358
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
353
359
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
354
360
|
click: (element: HTMLElement) => boolean;
|
|
@@ -378,7 +384,7 @@ declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions>
|
|
|
378
384
|
private thirdGroup2;
|
|
379
385
|
private thirdGroupCaption;
|
|
380
386
|
constructor(element: HTMLElement, options: Partial<WidgetDateCountdownOptions>);
|
|
381
|
-
|
|
387
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
382
388
|
private pause;
|
|
383
389
|
private resume;
|
|
384
390
|
private initTimer;
|
|
@@ -387,6 +393,7 @@ declare class WidgetDateCountdown extends WidgetBase<WidgetDateCountdownOptions>
|
|
|
387
393
|
static api: {
|
|
388
394
|
widgetClassName: string;
|
|
389
395
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
396
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
390
397
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
391
398
|
initWidget: (nodeList: Iterable<HTMLElement>, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
392
399
|
onPause: (element: HTMLElement) => void;
|
|
@@ -412,7 +419,7 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
412
419
|
private selectedVariant;
|
|
413
420
|
private layers;
|
|
414
421
|
constructor(element: HTMLElement, options: Partial<WidgetPollLayersOptions>);
|
|
415
|
-
|
|
422
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
416
423
|
private _statEventPollVariant;
|
|
417
424
|
private _selectVariant;
|
|
418
425
|
selectVariant(variant: HTMLElement): boolean;
|
|
@@ -422,6 +429,7 @@ declare class WidgetPollLayers extends WidgetBase<WidgetPollLayersOptions> {
|
|
|
422
429
|
static api: {
|
|
423
430
|
widgetClassName: string;
|
|
424
431
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
432
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
425
433
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
426
434
|
initWidget: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
427
435
|
select: (element: HTMLElement) => boolean;
|
|
@@ -434,12 +442,12 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
434
442
|
private selectedAnswer;
|
|
435
443
|
protected label: HTMLElement | null;
|
|
436
444
|
protected variants: Array<HTMLElement>;
|
|
437
|
-
private isWidget;
|
|
438
|
-
private slideCount;
|
|
439
|
-
private nonFinalSlide;
|
|
440
|
-
private finalSlide;
|
|
445
|
+
private readonly isWidget;
|
|
446
|
+
private readonly slideCount;
|
|
447
|
+
private readonly nonFinalSlide;
|
|
448
|
+
private readonly finalSlide;
|
|
441
449
|
constructor(element: HTMLElement, options: Partial<WidgetQuestOptions>);
|
|
442
|
-
|
|
450
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
443
451
|
private setCardSessionValue;
|
|
444
452
|
private getCardSessionValue;
|
|
445
453
|
private init;
|
|
@@ -457,6 +465,7 @@ declare class WidgetQuest extends WidgetBase<WidgetQuestOptions> {
|
|
|
457
465
|
static api: {
|
|
458
466
|
widgetClassName: string;
|
|
459
467
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
468
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
460
469
|
init: (element: HTMLElement, localData?: Record<string, any>) => Promise<boolean>;
|
|
461
470
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => Promise<boolean>;
|
|
462
471
|
select: (element: HTMLElement) => boolean;
|
|
@@ -478,7 +487,7 @@ declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
|
478
487
|
private questionCount;
|
|
479
488
|
private selectedAnswer;
|
|
480
489
|
constructor(element: HTMLElement, options: Partial<WidgetQuizOptions>);
|
|
481
|
-
|
|
490
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
482
491
|
private _selectAnswer;
|
|
483
492
|
private _clearAnswerSelection;
|
|
484
493
|
selectAnswer(answer: HTMLElement): boolean;
|
|
@@ -487,6 +496,7 @@ declare class WidgetQuiz extends WidgetBase<WidgetQuizOptions> {
|
|
|
487
496
|
static api: {
|
|
488
497
|
widgetClassName: string;
|
|
489
498
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
499
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
490
500
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
491
501
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
492
502
|
select: (element: HTMLElement) => boolean;
|
|
@@ -512,7 +522,7 @@ declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
|
512
522
|
* @param options
|
|
513
523
|
*/
|
|
514
524
|
constructor(element: HTMLElement, options: Partial<WidgetQuizGroupedOptions>);
|
|
515
|
-
|
|
525
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
516
526
|
private _selectAnswer;
|
|
517
527
|
private _clearAnswerSelection;
|
|
518
528
|
private _updateScore;
|
|
@@ -522,6 +532,7 @@ declare class WidgetQuizGrouped extends WidgetBase<WidgetQuizGroupedOptions> {
|
|
|
522
532
|
static api: {
|
|
523
533
|
widgetClassName: string;
|
|
524
534
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
535
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
525
536
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
526
537
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
527
538
|
select: (element: HTMLElement) => boolean;
|
|
@@ -545,7 +556,7 @@ declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
|
545
556
|
private answerSelectDuration;
|
|
546
557
|
private elementRect;
|
|
547
558
|
constructor(element: HTMLElement, options: Partial<WidgetRateOptions>);
|
|
548
|
-
|
|
559
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
549
560
|
private _statEventRateUsAnswer;
|
|
550
561
|
private _selectStar;
|
|
551
562
|
private _clearSelectedStar;
|
|
@@ -557,6 +568,7 @@ declare class WidgetRate extends WidgetBase<WidgetRateOptions> {
|
|
|
557
568
|
static api: {
|
|
558
569
|
widgetClassName: string;
|
|
559
570
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
571
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
560
572
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
561
573
|
initWidget: (nodeList: Iterable<HTMLElement>, localData?: Record<string, any>) => void;
|
|
562
574
|
select: (element: HTMLElement) => boolean;
|
|
@@ -576,7 +588,7 @@ declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
|
576
588
|
private withLayer;
|
|
577
589
|
private btnDisabled;
|
|
578
590
|
constructor(element: HTMLElement, options: Partial<WidgetShareOptions>);
|
|
579
|
-
|
|
591
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
580
592
|
private _statEventShare;
|
|
581
593
|
private share;
|
|
582
594
|
_complete(isSuccess: boolean): void;
|
|
@@ -584,6 +596,7 @@ declare class WidgetShare extends WidgetBase<WidgetShareOptions> {
|
|
|
584
596
|
static api: {
|
|
585
597
|
widgetClassName: string;
|
|
586
598
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
599
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
587
600
|
init: (element: HTMLElement, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
588
601
|
initWidget: (nodeList: Iterable<HTMLElement>, layers: Array<HTMLElement>, localData?: Record<string, any>) => void;
|
|
589
602
|
click: (element: HTMLElement) => void;
|
|
@@ -608,7 +621,7 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
608
621
|
private timeLeftDefault;
|
|
609
622
|
private timeline;
|
|
610
623
|
constructor(element: HTMLElement, options: Partial<WidgetTestOptions>);
|
|
611
|
-
|
|
624
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
612
625
|
private _statEventVoteAnswer;
|
|
613
626
|
private _selectAnswer;
|
|
614
627
|
selectAnswer(answer: HTMLElement): boolean;
|
|
@@ -621,6 +634,7 @@ declare class WidgetTest extends WidgetBase<WidgetTestOptions> {
|
|
|
621
634
|
static api: {
|
|
622
635
|
widgetClassName: string;
|
|
623
636
|
refreshUserData: typeof WidgetBase.refreshUserData;
|
|
637
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
624
638
|
init: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
625
639
|
initWidget: (element: HTMLElement, localData?: Record<string, any>) => void;
|
|
626
640
|
select: (element: HTMLElement) => boolean;
|
|
@@ -736,7 +750,7 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
|
|
|
736
750
|
protected firstOpenTime: number;
|
|
737
751
|
protected id: string;
|
|
738
752
|
constructor(element: HTMLElement, options: Partial<WidgetOptions>, elementIdGetter?: (element: HTMLElement) => string, slideGetter?: (element: HTMLElement) => HTMLElement);
|
|
739
|
-
|
|
753
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
740
754
|
static widgetCacheKey: string;
|
|
741
755
|
static widgetClassName: string;
|
|
742
756
|
static getInstance<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(element: HTMLElement): Widget | undefined;
|
|
@@ -759,7 +773,9 @@ declare class WidgetBase<WidgetOptions extends WidgetOptionsBase> {
|
|
|
759
773
|
startDisabledTimeline(): void;
|
|
760
774
|
protected _showLayout(layers: Array<HTMLElement>, selectIndex: number, withStatEvent?: boolean): void;
|
|
761
775
|
protected _statEventLayoutShow(layoutIndex: number): void;
|
|
776
|
+
/** @deprecated */
|
|
762
777
|
static refreshUserData<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(nodes: NodeListOf<HTMLElement>, localData?: Record<string, any>): void;
|
|
778
|
+
static onRefreshUserData<Widget extends WidgetBase<WidgetOptions>, WidgetOptions extends WidgetOptionsBase>(element: HTMLElement, localData?: Record<string, any>): void;
|
|
763
779
|
protected getPromotionalCodeFetchPath(promotionalCodeId: string): string;
|
|
764
780
|
}
|
|
765
781
|
interface SDKInterface {
|