@inappstory/react-sdk 0.4.3 → 0.5.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/LICENSE +21 -21
- package/README.md +18 -18
- package/dist/index.js +27 -31
- package/dist/types/appearance-manager/appearanceCommon.d.ts +29 -29
- package/dist/types/appearance-manager/gameReader.d.ts +31 -31
- package/dist/types/appearance-manager/goodsWidget.d.ts +45 -45
- package/dist/types/appearance-manager/index.d.ts +5 -5
- package/dist/types/appearance-manager/sharePanel.d.ts +43 -43
- package/dist/types/appearance-manager/storiesList.d.ts +156 -156
- package/dist/types/appearance-manager/storyReader.ts +73 -73
- package/dist/types/global.d.ts +10 -10
- package/dist/types/ias-container/IasContainer.d.ts +10 -10
- package/dist/types/ias-container/appearanceOptionsProps.d.ts +13 -13
- package/dist/types/ias-container/index.d.ts +1 -1
- package/dist/types/ias-container/publicEvents.d.ts +86 -86
- package/dist/types/ias-container/storyManagerEventsProps.d.ts +31 -31
- package/dist/types/index.d.ts +5 -5
- package/dist/types/share-page/sharePage.d.ts +9 -9
- package/dist/types/story-list/FavoriteStoryList.d.ts +11 -11
- package/dist/types/story-list/StoryList.d.ts +24 -24
- package/dist/types/story-list/UGCStoryList.d.ts +21 -21
- package/dist/types/story-list/favoriteCardCompositeViewModel.ts +5 -5
- package/dist/types/story-list/favoriteStoryCardViewModel.d.ts +3 -3
- package/dist/types/story-list/index.d.ts +8 -8
- package/dist/types/story-list/navigationViewModel.d.ts +12 -12
- package/dist/types/story-list/storyCardViewModel.d.ts +32 -32
- package/dist/types/story-list/storyListApi.d.ts +2 -2
- package/dist/types/story-list/storyListLoadStatus.ts +11 -11
- package/dist/types/storyManager.d.ts +41 -41
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface NavigationViewModel {
|
|
2
|
-
defaultStyles: Record<string, string>;
|
|
3
|
-
reachStart: boolean;
|
|
4
|
-
reachEnd: boolean;
|
|
5
|
-
onPrev(): void;
|
|
6
|
-
onNext(): void;
|
|
7
|
-
slider: {
|
|
8
|
-
currentPosition: number;
|
|
9
|
-
direction: "horizontal" | "vertical";
|
|
10
|
-
viewport: DOMRect;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
1
|
+
export interface NavigationViewModel {
|
|
2
|
+
defaultStyles: Record<string, string>;
|
|
3
|
+
reachStart: boolean;
|
|
4
|
+
reachEnd: boolean;
|
|
5
|
+
onPrev(): void;
|
|
6
|
+
onNext(): void;
|
|
7
|
+
slider: {
|
|
8
|
+
currentPosition: number;
|
|
9
|
+
direction: "horizontal" | "vertical";
|
|
10
|
+
viewport: DOMRect;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { StoriesListCardOptions } from "../appearance-manager";
|
|
2
|
-
|
|
3
|
-
export interface StoryCardViewModel {
|
|
4
|
-
id: number;
|
|
5
|
-
title: string;
|
|
6
|
-
titleColor: string;
|
|
7
|
-
magazineName: string;
|
|
8
|
-
backgroundColor: string;
|
|
9
|
-
background: {
|
|
10
|
-
color: string;
|
|
11
|
-
gradient: boolean;
|
|
12
|
-
};
|
|
13
|
-
favorite: boolean;
|
|
14
|
-
like: number;
|
|
15
|
-
deeplink: string | null;
|
|
16
|
-
hideInReader: boolean | null;
|
|
17
|
-
gameInstance?: { id?: string };
|
|
18
|
-
hasAudio: boolean | null;
|
|
19
|
-
isFavoriteCard: boolean;
|
|
20
|
-
isUgcCard: boolean;
|
|
21
|
-
isOpened: boolean;
|
|
22
|
-
videoCoverSrc: string | null;
|
|
23
|
-
|
|
24
|
-
get options(): StoriesListCardOptions;
|
|
25
|
-
get isTitleCardInner(): boolean;
|
|
26
|
-
get isTitleCardOutsideTop(): boolean;
|
|
27
|
-
get isTitleCardOutsideBottom(): boolean;
|
|
28
|
-
get aspectRatio(): number;
|
|
29
|
-
|
|
30
|
-
getImageSrc(): string | undefined;
|
|
31
|
-
onClick(index?: number): void;
|
|
32
|
-
}
|
|
1
|
+
import { StoriesListCardOptions } from "../appearance-manager";
|
|
2
|
+
|
|
3
|
+
export interface StoryCardViewModel {
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
titleColor: string;
|
|
7
|
+
magazineName: string;
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
background: {
|
|
10
|
+
color: string;
|
|
11
|
+
gradient: boolean;
|
|
12
|
+
};
|
|
13
|
+
favorite: boolean;
|
|
14
|
+
like: number;
|
|
15
|
+
deeplink: string | null;
|
|
16
|
+
hideInReader: boolean | null;
|
|
17
|
+
gameInstance?: { id?: string };
|
|
18
|
+
hasAudio: boolean | null;
|
|
19
|
+
isFavoriteCard: boolean;
|
|
20
|
+
isUgcCard: boolean;
|
|
21
|
+
isOpened: boolean;
|
|
22
|
+
videoCoverSrc: string | null;
|
|
23
|
+
|
|
24
|
+
get options(): StoriesListCardOptions;
|
|
25
|
+
get isTitleCardInner(): boolean;
|
|
26
|
+
get isTitleCardOutsideTop(): boolean;
|
|
27
|
+
get isTitleCardOutsideBottom(): boolean;
|
|
28
|
+
get aspectRatio(): number;
|
|
29
|
+
|
|
30
|
+
getImageSrc(): string | undefined;
|
|
31
|
+
onClick(index?: number): void;
|
|
32
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export interface StoryListApi {
|
|
2
|
-
reload(): void
|
|
1
|
+
export interface StoryListApi {
|
|
2
|
+
reload(): void
|
|
3
3
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface StoryListLoadStatus {
|
|
2
|
-
feed: string | number,
|
|
3
|
-
filter: Record<string, any> | null,
|
|
4
|
-
defaultListLength: number,
|
|
5
|
-
favoriteListLength: number,
|
|
6
|
-
success: boolean,
|
|
7
|
-
error: {
|
|
8
|
-
name: string,
|
|
9
|
-
networkStatus: number,
|
|
10
|
-
networkMessage: string
|
|
11
|
-
} | null
|
|
1
|
+
export interface StoryListLoadStatus {
|
|
2
|
+
feed: string | number,
|
|
3
|
+
filter: Record<string, any> | null,
|
|
4
|
+
defaultListLength: number,
|
|
5
|
+
favoriteListLength: number,
|
|
6
|
+
success: boolean,
|
|
7
|
+
error: {
|
|
8
|
+
name: string,
|
|
9
|
+
networkStatus: number,
|
|
10
|
+
networkMessage: string
|
|
11
|
+
} | null
|
|
12
12
|
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { SharePage, SharePageOptions } from "./share-page";
|
|
2
|
-
|
|
3
|
-
export type StoryManagerConfig = {
|
|
4
|
-
apiKey: string;
|
|
5
|
-
userId?: string | number;
|
|
6
|
-
tags?: Array<string>;
|
|
7
|
-
placeholders?: Record<string, string>;
|
|
8
|
-
imagePlaceholders?: Record<string, string>;
|
|
9
|
-
lang?: string;
|
|
10
|
-
disableDeviceId?: boolean;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type UgcEditorConfig = {
|
|
14
|
-
sessionId: string;
|
|
15
|
-
apiKey: string;
|
|
16
|
-
editor: Record<any, any>;
|
|
17
|
-
sdkVersion: string;
|
|
18
|
-
appPackageId?: string;
|
|
19
|
-
deviceId: string;
|
|
20
|
-
userId?: string;
|
|
21
|
-
lang: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
interface StoryManager {
|
|
25
|
-
get sdkVersionName(): string;
|
|
26
|
-
get sdkVersionCode(): number;
|
|
27
|
-
set storyLinkClickHandler(callback: Function);
|
|
28
|
-
showOnboardingStories(options?: { feed?: string; customTags?: Array<string>; limit?: number }): Promise<boolean>;
|
|
29
|
-
showSharePage(storyId: number, options?: SharePageOptions): SharePage;
|
|
30
|
-
showStory(id: number | string): Promise<boolean>;
|
|
31
|
-
openGame(gameInstanceId: string, gameOptions?: { demoMode?: boolean }): Promise<void>;
|
|
32
|
-
closeGame(): Promise<boolean>;
|
|
33
|
-
closeStoryReader(): Promise<boolean | undefined>;
|
|
34
|
-
closeGoodsWidget(): void
|
|
35
|
-
getUgcEditorConfig(): Promise<UgcEditorConfig>
|
|
36
|
-
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
37
|
-
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
38
|
-
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export declare const storyManager: StoryManager;
|
|
1
|
+
import { SharePage, SharePageOptions } from "./share-page";
|
|
2
|
+
|
|
3
|
+
export type StoryManagerConfig = {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
userId?: string | number;
|
|
6
|
+
tags?: Array<string>;
|
|
7
|
+
placeholders?: Record<string, string>;
|
|
8
|
+
imagePlaceholders?: Record<string, string>;
|
|
9
|
+
lang?: string;
|
|
10
|
+
disableDeviceId?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type UgcEditorConfig = {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
apiKey: string;
|
|
16
|
+
editor: Record<any, any>;
|
|
17
|
+
sdkVersion: string;
|
|
18
|
+
appPackageId?: string;
|
|
19
|
+
deviceId: string;
|
|
20
|
+
userId?: string;
|
|
21
|
+
lang: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
interface StoryManager {
|
|
25
|
+
get sdkVersionName(): string;
|
|
26
|
+
get sdkVersionCode(): number;
|
|
27
|
+
set storyLinkClickHandler(callback: Function);
|
|
28
|
+
showOnboardingStories(options?: { feed?: string; customTags?: Array<string>; limit?: number }): Promise<boolean>;
|
|
29
|
+
showSharePage(storyId: number, options?: SharePageOptions): SharePage;
|
|
30
|
+
showStory(id: number | string): Promise<boolean>;
|
|
31
|
+
openGame(gameInstanceId: string, gameOptions?: { demoMode?: boolean }): Promise<void>;
|
|
32
|
+
closeGame(): Promise<boolean>;
|
|
33
|
+
closeStoryReader(): Promise<boolean | undefined>;
|
|
34
|
+
closeGoodsWidget(): void
|
|
35
|
+
getUgcEditorConfig(): Promise<UgcEditorConfig>
|
|
36
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
37
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
38
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare const storyManager: StoryManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inappstory/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "React SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
39
|
"parse-css-sides": "^3.0.1",
|
|
40
40
|
"react-input-mask": "^2.0.4",
|
|
41
|
-
"uuid": "^
|
|
41
|
+
"uuid": "^10.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=17.0.2",
|