@inappstory/react-sdk 0.0.5 → 0.1.0-rc.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.js +4 -4
- package/dist/types/appearance-manager/storiesList.d.ts +1 -2
- package/dist/types/index.d.ts +6 -2
- package/dist/types/story-list/FavoriteStoryList.d.ts +18 -0
- package/dist/types/story-list/StoryList.d.ts +3 -1
- package/dist/types/story-list/UGCStoryList.d.ts +1 -1
- package/dist/types/story-list/favoriteCardCompositeViewModel.ts +5 -0
- package/dist/types/story-list/favoriteStoryCardViewModel.d.ts +4 -0
- package/dist/types/story-list/index.d.ts +10 -0
- package/dist/types/story-list/storyCardViewModel.d.ts +3 -4
- package/dist/types/story-list/storyListViewModel.d.ts +10 -16
- package/package.json +1 -1
|
@@ -7,8 +7,7 @@ export type StoriesListOptions = Partial<{
|
|
|
7
7
|
card: StoriesListCardOptions;
|
|
8
8
|
favoriteCard: StoriesListFavoriteCardOptions;
|
|
9
9
|
layout: Partial<{
|
|
10
|
-
height: number;
|
|
11
|
-
storiesListInnerHeight: number | null;
|
|
10
|
+
height: number | string;
|
|
12
11
|
backgroundColor: string;
|
|
13
12
|
sliderAlign: StoriesListSliderAlign;
|
|
14
13
|
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from "./appearance-manager";
|
|
2
2
|
export { StoryManager } from "./story-manager/StoryManager";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { StoryList } from "./story-list/StoryList";
|
|
4
|
+
export { UGCStoryList } from "./story-list/UGCStoryList";
|
|
5
|
+
export { FavoriteStoryList } from "./story-list/FavoriteStoryList"
|
|
5
6
|
export { StoryListViewModel } from "./story-list/storyListViewModel";
|
|
7
|
+
export { FavoriteStoryCardViewModel } from "./story-list/favoriteStoryCardViewModel";
|
|
8
|
+
export { NavigationViewModel } from "./story-list/navigationViewModel";
|
|
9
|
+
export { StoryCardViewModel } from "./story-list/storyCardViewModel";
|
|
6
10
|
export { StoryListLoadStatus } from "./story-list/storyListLoadStatus";
|
|
7
11
|
export { StoryManagerConfig } from "./story-manager/StoryManager.h";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppearanceManager, StoryManager } from "..";
|
|
2
|
+
import { NavigationViewModel } from "./navigationViewModel";
|
|
3
|
+
import { StoryCardViewModel } from "./storyCardViewModel";
|
|
4
|
+
import { StoryListLoadStatus } from "./storyListLoadStatus";
|
|
5
|
+
import { StoryListViewModel } from "./storyListViewModel.d";
|
|
6
|
+
|
|
7
|
+
interface FavoriteStoryListProps {
|
|
8
|
+
storyManager: StoryManager;
|
|
9
|
+
appearanceManager: AppearanceManager;
|
|
10
|
+
storyCardView?: (storyCard: StoryCardViewModel) => JSX.Element;
|
|
11
|
+
navigationView?: (navigation: any) => JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export declare const FavoriteStoryList: ({
|
|
14
|
+
storyManager,
|
|
15
|
+
appearanceManager,
|
|
16
|
+
storyCardView,
|
|
17
|
+
navigationView
|
|
18
|
+
}: FavoriteStoryListProps) => JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { NavigationViewModel } from "./navigationViewModel";
|
|
|
3
3
|
import { StoryCardViewModel } from "./storyCardViewModel";
|
|
4
4
|
import { StoryListLoadStatus } from "./storyListLoadStatus";
|
|
5
5
|
import { StoryListViewModel } from "./storyListViewModel.d";
|
|
6
|
+
import { FavoriteCardCompositeViewModel } from "./favoriteCardCompositeViewModel"
|
|
6
7
|
|
|
7
8
|
interface StoryListProps {
|
|
8
9
|
storyManager: StoryManager;
|
|
@@ -16,5 +17,6 @@ interface StoryListProps {
|
|
|
16
17
|
viewModelExporter?: (storyListViewModel: StoryListViewModel) => void;
|
|
17
18
|
storyCardView?: (storyCard: StoryCardViewModel) => JSX.Element
|
|
18
19
|
navigationView?: (navigation: NavigationViewModel) => JSX.Element
|
|
20
|
+
favoriteCardView?: (favoriteCardCompositeViewModel: FavoriteCardCompositeViewModel) => JSX.Element
|
|
19
21
|
}
|
|
20
|
-
export declare const
|
|
22
|
+
export declare const StoryList: (props: StoryListProps) => JSX.Element;
|
|
@@ -17,4 +17,4 @@ interface UGCStoryListProps {
|
|
|
17
17
|
storyCardView?: (storyCard: StoryCardViewModel) => JSX.Element
|
|
18
18
|
navigationView?: (navigation: NavigationViewModel) => JSX.Element
|
|
19
19
|
}
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const UGCStoryList: (props: UGCStoryListProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './favoriteCardCompositeViewModel';
|
|
2
|
+
export * from './favoriteStoryCardViewModel';
|
|
3
|
+
export * from './FavoriteStoryList';
|
|
4
|
+
export * from './navigationViewModel';
|
|
5
|
+
export * from './storyCardViewModel';
|
|
6
|
+
export * from './StoryList';
|
|
7
|
+
export * from './storyListLoadStatus';
|
|
8
|
+
export * from './storyListViewModel';
|
|
9
|
+
export * from './UGCStoryList';
|
|
10
|
+
export * from './viewModel';
|
|
@@ -17,8 +17,8 @@ export declare class StoryCardViewModel extends ViewModel {
|
|
|
17
17
|
hideInReader: boolean | null;
|
|
18
18
|
gameInstance?: { id?: string };
|
|
19
19
|
hasAudio: Nullable<boolean>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
isFavoriteCard: boolean;
|
|
21
|
+
isUgcCard: boolean;
|
|
22
22
|
isOpened: boolean;
|
|
23
23
|
videoCoverSrc: Nullable<string>;
|
|
24
24
|
|
|
@@ -28,7 +28,6 @@ export declare class StoryCardViewModel extends ViewModel {
|
|
|
28
28
|
get isTitleCardOutsideBottom(): boolean;
|
|
29
29
|
get aspectRatio(): number;
|
|
30
30
|
|
|
31
|
-
getFavoriteImage(): { src?: string; color: string };
|
|
32
31
|
getImageSrc(): string | undefined;
|
|
33
|
-
onClick(): void;
|
|
32
|
+
onClick(index?: number): void;
|
|
34
33
|
}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import { StoriesListOptions } from "../appearance-manager/storiesList";
|
|
2
2
|
import { ViewModel } from "./viewModel";
|
|
3
|
+
import { StoryCardViewModel } from "./storyCardViewModel"
|
|
4
|
+
import { FavoriteStoryCardViewModel } from "./favoriteStoryCardViewModel";
|
|
5
|
+
import { FavoriteCardCompositeViewModel } from ".";
|
|
3
6
|
|
|
4
7
|
export declare class StoryListViewModel extends ViewModel {
|
|
5
|
-
|
|
6
|
-
get
|
|
8
|
+
get defaultStories(): StoryCardViewModel[];
|
|
9
|
+
get favoriteStories(): FavoriteStoryCardViewModel[];
|
|
10
|
+
get favoriteCard(): FavoriteCardCompositeViewModel;
|
|
11
|
+
get ugcCard(): StoryCardViewModel;
|
|
7
12
|
set modeDesktop(value: boolean);
|
|
8
13
|
get modeDesktop(): boolean;
|
|
9
|
-
set session(session: any | null);
|
|
10
14
|
get session(): any | null;
|
|
11
|
-
favoriteStoryImages: {
|
|
12
|
-
src: string | undefined;
|
|
13
|
-
color: string;
|
|
14
|
-
}[];
|
|
15
|
-
constructor();
|
|
16
|
-
get cardOptions(): any;
|
|
17
15
|
get options(): StoriesListOptions;
|
|
18
|
-
get
|
|
19
|
-
get
|
|
20
|
-
|
|
21
|
-
get cardAspectRatio(): number;
|
|
22
|
-
onStoryClick(story: any, index: number): void;
|
|
16
|
+
get hasFavoriteCard(): boolean
|
|
17
|
+
get hasUgcCard(): boolean
|
|
18
|
+
onStoryClick(story: StoryCardViewModel, index?: number): void;
|
|
23
19
|
destroy(): void;
|
|
24
|
-
getImageSrcByStory(story: any): string | undefined;
|
|
25
|
-
setOptions(options: StoriesListOptions): void;
|
|
26
20
|
reload(): void;
|
|
27
21
|
}
|