@inappstory/react-sdk 1.16.6 → 1.16.8
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.esm.mjs +54 -22
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/types/events.d.ts +2 -0
- package/dist/types/in-app-messaging/inAppMessaging.d.ts +14 -0
- package/package.json +1 -1
- package/plugins/banners/index.esm.mjs +1 -1
- package/plugins/banners/index.umd.js +1 -1
- package/plugins/banners/types/events.d.ts +26 -0
|
@@ -1,27 +1,53 @@
|
|
|
1
|
+
/** Event: banner entered the viewport and started playback */
|
|
1
2
|
export interface ShowBannerEvent {
|
|
3
|
+
/** Unique banner identifier */
|
|
2
4
|
id: string;
|
|
5
|
+
/** Banner place where the banner is shown */
|
|
3
6
|
bannerPlace: string;
|
|
7
|
+
/** Slide payload (e.g., JSON data from the active slide) */
|
|
4
8
|
payload?: string;
|
|
9
|
+
/** Custom attributes from the banner payload */
|
|
10
|
+
extraFields?: Record<string, string>;
|
|
5
11
|
}
|
|
6
12
|
|
|
13
|
+
/** Event: banner entered the viewport but failed to start */
|
|
7
14
|
export interface ShowBannerFailedEvent {
|
|
15
|
+
/** Unique banner identifier */
|
|
8
16
|
id: string;
|
|
17
|
+
/** Banner place where the banner failed to show */
|
|
9
18
|
bannerPlace: string;
|
|
19
|
+
/** Error that occurred while starting the banner */
|
|
10
20
|
error: Error;
|
|
21
|
+
/** Slide payload (e.g., JSON data from the active slide) */
|
|
11
22
|
payload?: string;
|
|
23
|
+
/** Custom attributes from the banner payload */
|
|
24
|
+
extraFields?: Record<string, string>;
|
|
12
25
|
}
|
|
13
26
|
|
|
27
|
+
/** Event: a widget inside the banner fired an event */
|
|
14
28
|
export interface BannerWidgetEvent {
|
|
29
|
+
/** Unique banner identifier */
|
|
15
30
|
id: string;
|
|
31
|
+
/** Banner place where the widget event occurred */
|
|
16
32
|
bannerPlace: string;
|
|
33
|
+
/** Name/type of the widget event */
|
|
17
34
|
widgetEventName: string;
|
|
35
|
+
/** Data associated with the widget event */
|
|
18
36
|
widgetData: Record<string, any>;
|
|
37
|
+
/** Slide payload (e.g., JSON data from the active slide) */
|
|
19
38
|
payload?: string;
|
|
39
|
+
/** Custom attributes from the banner payload */
|
|
40
|
+
extraFields?: Record<string, string>;
|
|
20
41
|
}
|
|
21
42
|
|
|
43
|
+
/** Event: autoplay timer tick during banner carousel playback */
|
|
22
44
|
export interface AutoplayTimerTickEvent {
|
|
45
|
+
/** Index of the active banner in the carousel */
|
|
23
46
|
bannerIndex: number;
|
|
47
|
+
/** Elapsed time on the current slide, in milliseconds */
|
|
24
48
|
currentTime: number;
|
|
49
|
+
/** Total duration of the current slide, in milliseconds */
|
|
25
50
|
totalTime: number;
|
|
51
|
+
/** Playback progress on the current slide, from 0 to 100 */
|
|
26
52
|
percents: number;
|
|
27
53
|
}
|