@inappstory/react-sdk 1.9.5 → 1.10.0
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 +11254 -10806
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/types/events.d.ts +7 -2
- package/dist/types/in-app-messaging/inAppMessaging.d.ts +12 -3
- package/package.json +2 -2
- package/plugins/banners/index.esm.mjs +1 -1
package/dist/types/events.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export interface VisibleAreaUpdatedEvent {
|
|
|
134
134
|
stories: Array<{ id: number; title: string; slidesCount: number }>;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
/**
|
|
137
|
+
/** Event: widget event */
|
|
138
138
|
export interface WidgetEvent {
|
|
139
139
|
/** Event name */
|
|
140
140
|
name: string;
|
|
@@ -154,7 +154,7 @@ export interface CloseGameEvent {
|
|
|
154
154
|
id: string;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
/**
|
|
157
|
+
/** Event: game event */
|
|
158
158
|
export interface EventGameEvent {
|
|
159
159
|
/** Event name */
|
|
160
160
|
name: string;
|
|
@@ -162,6 +162,9 @@ export interface EventGameEvent {
|
|
|
162
162
|
payload: Record<string, any>;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/** Event: game error */
|
|
166
|
+
export type ErrorGameEvent = Error
|
|
167
|
+
|
|
165
168
|
/** Event: fired when the "Add to cart" button is pressed */
|
|
166
169
|
export interface ProductCartUpdatedEvent {
|
|
167
170
|
/** Product offer */
|
|
@@ -209,6 +212,8 @@ export interface StoryManagerEvents {
|
|
|
209
212
|
closeGame: CloseGameEvent;
|
|
210
213
|
/** Custom game event */
|
|
211
214
|
eventGame: EventGameEvent;
|
|
215
|
+
/** Game error */
|
|
216
|
+
errorGame: ErrorGameEvent;
|
|
212
217
|
/** Close story reader event */
|
|
213
218
|
closeStoryReader: CloseStoryReaderEvent;
|
|
214
219
|
/** Fired when the "Add to cart" button is pressed */
|
|
@@ -26,7 +26,12 @@ export declare enum IamMessageType {
|
|
|
26
26
|
/**
|
|
27
27
|
* Message takes up the full screen
|
|
28
28
|
*/
|
|
29
|
-
Fullscreen = 3
|
|
29
|
+
Fullscreen = 3,
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Message appears as a toast notification (overlay at top or bottom of screen)
|
|
33
|
+
*/
|
|
34
|
+
Toast = 4
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
/**
|
|
@@ -153,6 +158,8 @@ export interface InAppMessaging {
|
|
|
153
158
|
* @param options - Optional display configuration
|
|
154
159
|
* @param options.showOnlyIfLoaded - If true, only shows messages that were preloaded
|
|
155
160
|
* @param options.signal - Abort signal to cancel the operation
|
|
161
|
+
* @param options.appearance - Appearance options for the message
|
|
162
|
+
* @param options.appearance.zIndex - Custom z-index value for the message container (BottomSheet/Modal)
|
|
156
163
|
* @returns Promise resolving to the displayed message
|
|
157
164
|
* @throws {IamNotFoundByIdError} If no message exists with this ID
|
|
158
165
|
* @throws {IamMessageOpenError} If this message is already open
|
|
@@ -160,7 +167,7 @@ export interface InAppMessaging {
|
|
|
160
167
|
* @throws {IamShowOnlyIfLoadedError} If showOnlyIfLoaded=true but message wasn't preloaded
|
|
161
168
|
* @throws {IamMessageLimitExceededError} If message display limit was reached
|
|
162
169
|
*/
|
|
163
|
-
showMessageById(messageId: number | string, options?: { showOnlyIfLoaded?: boolean; signal?: AbortSignal; }): Promise<IamMessage>;
|
|
170
|
+
showMessageById(messageId: number | string, options?: { showOnlyIfLoaded?: boolean; signal?: AbortSignal; appearance?: { zIndex?: number }; }): Promise<IamMessage>;
|
|
164
171
|
|
|
165
172
|
/**
|
|
166
173
|
* Displays a message associated with an event name
|
|
@@ -169,6 +176,8 @@ export interface InAppMessaging {
|
|
|
169
176
|
* @param options.showOnlyIfLoaded - If true, only shows messages that were preloaded
|
|
170
177
|
* @param options.tags - Filter messages by tags
|
|
171
178
|
* @param options.signal - Abort signal to cancel the operation
|
|
179
|
+
* @param options.appearance - Appearance options for the message
|
|
180
|
+
* @param options.appearance.zIndex - Custom z-index value for the message container (BottomSheet/Modal)
|
|
172
181
|
* @returns Promise resolving to the displayed message
|
|
173
182
|
* @throws {IamNotFoundByEventError} If no message exists for this event
|
|
174
183
|
* @throws {IamFrequencyLimitError} If message frequency limit was exceeded
|
|
@@ -178,7 +187,7 @@ export interface InAppMessaging {
|
|
|
178
187
|
*/
|
|
179
188
|
showMessageByEvent(
|
|
180
189
|
eventName: string,
|
|
181
|
-
options?: { showOnlyIfLoaded?: boolean; tags?: string[]; signal?: AbortSignal; }
|
|
190
|
+
options?: { showOnlyIfLoaded?: boolean; tags?: string[]; signal?: AbortSignal; appearance?: { zIndex?: number }; }
|
|
182
191
|
): Promise<IamMessage>;
|
|
183
192
|
|
|
184
193
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inappstory/react-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
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.36",
|
|
62
62
|
"async-mutex": "^0.5.0",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"classnames": "^2.5.1",
|