@inappstory/slide-api 0.1.28 → 0.1.29
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 +2416 -1847
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +53 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +2416 -1847
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -54,7 +54,14 @@ type ProductCart = {
|
|
|
54
54
|
priceCurrency: string;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
type AnimationDescriptor = {
|
|
58
|
+
cb: () => void;
|
|
59
|
+
timerId?: number;
|
|
60
|
+
timeout: number;
|
|
61
|
+
needResume?: boolean;
|
|
62
|
+
};
|
|
57
63
|
interface IAnimation {
|
|
64
|
+
animations: AnimationDescriptor[];
|
|
58
65
|
init(slide: HTMLElement, animate?: boolean): void;
|
|
59
66
|
start(slide: HTMLElement, animate?: boolean): void | ((isStop: boolean) => () => void);
|
|
60
67
|
stop(slide: HTMLElement, animate?: boolean): void;
|
|
@@ -70,6 +77,51 @@ declare const enum TIMELINE_ACTION {
|
|
|
70
77
|
BEFORE_START = "before_start"
|
|
71
78
|
}
|
|
72
79
|
|
|
80
|
+
type WidgetTimerOptions = WidgetOptionsBase;
|
|
81
|
+
|
|
82
|
+
declare class WidgetTimer extends WidgetBase<WidgetTimerOptions> {
|
|
83
|
+
static DEFAULTS: WidgetTimerOptions;
|
|
84
|
+
static widgetClassName: string;
|
|
85
|
+
private model;
|
|
86
|
+
private endTimeMs;
|
|
87
|
+
private timerRenderer;
|
|
88
|
+
private timerGroup;
|
|
89
|
+
private timerInit;
|
|
90
|
+
private rafId;
|
|
91
|
+
private effects;
|
|
92
|
+
private abortController;
|
|
93
|
+
constructor(element: HTMLElement, options: Partial<WidgetTimerOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
94
|
+
isDone(): boolean;
|
|
95
|
+
private fillEffects;
|
|
96
|
+
private mountTimerGroup;
|
|
97
|
+
private createTimerModel;
|
|
98
|
+
private setTimerEndTime;
|
|
99
|
+
onStart(): void;
|
|
100
|
+
onStop(): void;
|
|
101
|
+
onPause(): void;
|
|
102
|
+
onResume(): void;
|
|
103
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
104
|
+
private reset;
|
|
105
|
+
private update;
|
|
106
|
+
private complete;
|
|
107
|
+
private getCurrentTime;
|
|
108
|
+
private updateEffects;
|
|
109
|
+
private resetEffects;
|
|
110
|
+
private hideElement;
|
|
111
|
+
private showElement;
|
|
112
|
+
private doCompletitionAction;
|
|
113
|
+
private getMaxCardAnimationsDelay;
|
|
114
|
+
private waitCardAnimationsEnd;
|
|
115
|
+
static api: {
|
|
116
|
+
widgetClassName: string;
|
|
117
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
118
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
119
|
+
onStart: (element: HTMLElement) => void;
|
|
120
|
+
onStop: (element: HTMLElement) => void;
|
|
121
|
+
click: (element: HTMLElement) => boolean;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
73
125
|
type WidgetBarcodeOptions = WidgetOptionsBase;
|
|
74
126
|
|
|
75
127
|
declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
@@ -956,6 +1008,7 @@ interface ILayoutApi {
|
|
|
956
1008
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
957
1009
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
958
1010
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1011
|
+
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
959
1012
|
get VideoPlayer(): typeof Player | undefined;
|
|
960
1013
|
}
|
|
961
1014
|
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,14 @@ type ProductCart = {
|
|
|
54
54
|
priceCurrency: string;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
type AnimationDescriptor = {
|
|
58
|
+
cb: () => void;
|
|
59
|
+
timerId?: number;
|
|
60
|
+
timeout: number;
|
|
61
|
+
needResume?: boolean;
|
|
62
|
+
};
|
|
57
63
|
interface IAnimation {
|
|
64
|
+
animations: AnimationDescriptor[];
|
|
58
65
|
init(slide: HTMLElement, animate?: boolean): void;
|
|
59
66
|
start(slide: HTMLElement, animate?: boolean): void | ((isStop: boolean) => () => void);
|
|
60
67
|
stop(slide: HTMLElement, animate?: boolean): void;
|
|
@@ -70,6 +77,51 @@ declare const enum TIMELINE_ACTION {
|
|
|
70
77
|
BEFORE_START = "before_start"
|
|
71
78
|
}
|
|
72
79
|
|
|
80
|
+
type WidgetTimerOptions = WidgetOptionsBase;
|
|
81
|
+
|
|
82
|
+
declare class WidgetTimer extends WidgetBase<WidgetTimerOptions> {
|
|
83
|
+
static DEFAULTS: WidgetTimerOptions;
|
|
84
|
+
static widgetClassName: string;
|
|
85
|
+
private model;
|
|
86
|
+
private endTimeMs;
|
|
87
|
+
private timerRenderer;
|
|
88
|
+
private timerGroup;
|
|
89
|
+
private timerInit;
|
|
90
|
+
private rafId;
|
|
91
|
+
private effects;
|
|
92
|
+
private abortController;
|
|
93
|
+
constructor(element: HTMLElement, options: Partial<WidgetTimerOptions>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps);
|
|
94
|
+
isDone(): boolean;
|
|
95
|
+
private fillEffects;
|
|
96
|
+
private mountTimerGroup;
|
|
97
|
+
private createTimerModel;
|
|
98
|
+
private setTimerEndTime;
|
|
99
|
+
onStart(): void;
|
|
100
|
+
onStop(): void;
|
|
101
|
+
onPause(): void;
|
|
102
|
+
onResume(): void;
|
|
103
|
+
onRefreshUserData(localData: Record<string, any>): void;
|
|
104
|
+
private reset;
|
|
105
|
+
private update;
|
|
106
|
+
private complete;
|
|
107
|
+
private getCurrentTime;
|
|
108
|
+
private updateEffects;
|
|
109
|
+
private resetEffects;
|
|
110
|
+
private hideElement;
|
|
111
|
+
private showElement;
|
|
112
|
+
private doCompletitionAction;
|
|
113
|
+
private getMaxCardAnimationsDelay;
|
|
114
|
+
private waitCardAnimationsEnd;
|
|
115
|
+
static api: {
|
|
116
|
+
widgetClassName: string;
|
|
117
|
+
onRefreshUserData: typeof WidgetBase.onRefreshUserData;
|
|
118
|
+
init: (element: HTMLElement, localData: Record<string, any>, widgetCallbacks: WidgetCallbacks, widgetDeps: WidgetDeps) => void;
|
|
119
|
+
onStart: (element: HTMLElement) => void;
|
|
120
|
+
onStop: (element: HTMLElement) => void;
|
|
121
|
+
click: (element: HTMLElement) => boolean;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
73
125
|
type WidgetBarcodeOptions = WidgetOptionsBase;
|
|
74
126
|
|
|
75
127
|
declare class WidgetBarcode extends WidgetBase<WidgetBarcodeOptions> {
|
|
@@ -956,6 +1008,7 @@ interface ILayoutApi {
|
|
|
956
1008
|
get widgetVoteApi(): typeof WidgetVote.api | undefined;
|
|
957
1009
|
get widgetProductsApi(): typeof WidgetProducts.api | undefined;
|
|
958
1010
|
get widgetTooltipApi(): typeof WidgetTooltip.api | undefined;
|
|
1011
|
+
get widgetTimerApi(): typeof WidgetTimer.api | undefined;
|
|
959
1012
|
get VideoPlayer(): typeof Player | undefined;
|
|
960
1013
|
}
|
|
961
1014
|
|