@inappstory/react-sdk 1.8.0-rc.0 → 1.8.0-rc.2
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 +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/types/ias-container/publicEvents.d.ts +0 -6
- package/dist/types/ias-container/storyManagerEventsProps.d.ts +7 -7
- package/dist/types/storyManager.d.ts +3 -6
- package/package.json +2 -2
- package/plugins/banners/index.esm.mjs +1 -1
- package/plugins/banners/types/bannerPlace.d.ts +43 -9
- package/plugins/banners/types/iasBannerPlace.d.ts +12 -0
|
@@ -3,7 +3,6 @@ export type PublicEvents = {
|
|
|
3
3
|
showStory: ShowStoryEvent;
|
|
4
4
|
closeStory: CloseStoryEvent;
|
|
5
5
|
showSlide: ShowSlideEvent;
|
|
6
|
-
clickOnButton: ClickOnButtonEvent;
|
|
7
6
|
likeStory: LikeStoryEvent;
|
|
8
7
|
dislikeStory: DislikeStoryEvent;
|
|
9
8
|
favoriteStory: FavoriteStoryEvent;
|
|
@@ -56,11 +55,6 @@ export interface ShowSlideEvent extends BaseEvent {
|
|
|
56
55
|
payload: string;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
export interface ClickOnButtonEvent extends BaseEvent {
|
|
60
|
-
index: number;
|
|
61
|
-
url: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
58
|
export interface LikeStoryEvent extends BaseEvent {
|
|
65
59
|
value: boolean;
|
|
66
60
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ClickOnButtonEvent,
|
|
3
2
|
ClickOnStoryEvent,
|
|
4
3
|
CloseStoryEvent,
|
|
5
4
|
DislikeStoryEvent,
|
|
@@ -53,12 +52,6 @@ export interface StoryManagerEventsProps {
|
|
|
53
52
|
*/
|
|
54
53
|
onShowSlide?: (event: ShowSlideEvent) => void;
|
|
55
54
|
|
|
56
|
-
/**
|
|
57
|
-
* Called when a user clicks on an interactive button in the story
|
|
58
|
-
* @param event - Contains URL
|
|
59
|
-
*/
|
|
60
|
-
onClickOnButton?: (event: ClickOnButtonEvent) => void;
|
|
61
|
-
|
|
62
55
|
/**
|
|
63
56
|
* Called when a user likes a story
|
|
64
57
|
* @param event - Contains story ID and like status
|
|
@@ -71,6 +64,13 @@ export interface StoryManagerEventsProps {
|
|
|
71
64
|
*/
|
|
72
65
|
onDislikeStory?: (event: DislikeStoryEvent) => void;
|
|
73
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Called when a user clicks on an interactive button in the story
|
|
69
|
+
* @param event - Contains URL
|
|
70
|
+
* @deprecated Use `onWidgetEvent` instead
|
|
71
|
+
*/
|
|
72
|
+
onClickOnButton?: (event: ClickOnButtonEvent) => void;
|
|
73
|
+
|
|
74
74
|
/**
|
|
75
75
|
* Called when a user favorites a story
|
|
76
76
|
* @param event - Contains story ID and favorite status
|
|
@@ -78,7 +78,6 @@ export type UgcEditorConfig = {
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Handler for story link click events.
|
|
81
|
-
* @deprecated Use `clickOnButton` event instead
|
|
82
81
|
*/
|
|
83
82
|
export type StoryLinkClickHandler = (payload: {
|
|
84
83
|
data: { id: number; index: number; isDeeplink: boolean; url: string };
|
|
@@ -118,8 +117,6 @@ export declare class StoryManager {
|
|
|
118
117
|
* storyManager.storyLinkClickHandler = ({ data, src }) => {
|
|
119
118
|
* console.log("Link clicked:", data.url, "from", src);
|
|
120
119
|
* };
|
|
121
|
-
* @deprecated Use `clickOnButton` event instead
|
|
122
|
-
* @see https://docs.inappstory.com/sdk-guides/reack-sdk/link-handling.html
|
|
123
120
|
*/
|
|
124
121
|
set storyLinkClickHandler(value: StoryLinkClickHandler);
|
|
125
122
|
|
|
@@ -221,7 +218,7 @@ export declare class StoryManager {
|
|
|
221
218
|
* @param listener The event handler
|
|
222
219
|
* @see https://docs.inappstory.com/sdk-guides/react-sdk/events.html
|
|
223
220
|
*/
|
|
224
|
-
on
|
|
221
|
+
on(eventName: string, listener: (...args: any[]) => void): this;
|
|
225
222
|
|
|
226
223
|
/**
|
|
227
224
|
* Subscribes to a one-time SDK event.
|
|
@@ -229,7 +226,7 @@ export declare class StoryManager {
|
|
|
229
226
|
* @param listener The event handler
|
|
230
227
|
* @see https://docs.inappstory.com/sdk-guides/react-sdk/events.html
|
|
231
228
|
*/
|
|
232
|
-
once
|
|
229
|
+
once(eventName: string, listener: (...args: any[]) => void): this;
|
|
233
230
|
|
|
234
231
|
/**
|
|
235
232
|
* Unsubscribes from an SDK event.
|
|
@@ -237,7 +234,7 @@ export declare class StoryManager {
|
|
|
237
234
|
* @param listener The event handler
|
|
238
235
|
* @see https://docs.inappstory.com/sdk-guides/react-sdk/events.html
|
|
239
236
|
*/
|
|
240
|
-
off
|
|
237
|
+
off(eventName: string, listener: (...args: any[]) => void): this;
|
|
241
238
|
|
|
242
239
|
/**
|
|
243
240
|
* Installs a plugin at the class level.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inappstory/react-sdk",
|
|
3
|
-
"version": "1.8.0-rc.
|
|
3
|
+
"version": "1.8.0-rc.2",
|
|
4
4
|
"description": "React SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stories",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"Samsung >= 5"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@inappstory/slide-api": "^0.1.
|
|
61
|
+
"@inappstory/slide-api": "^0.1.22",
|
|
62
62
|
"async-mutex": "^0.5.0",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"classnames": "^2.5.1",
|