@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.
@@ -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
  }>;
@@ -1,7 +1,11 @@
1
1
  export * from "./appearance-manager";
2
2
  export { StoryManager } from "./story-manager/StoryManager";
3
- export { StoryListMain as StoryList } from "./story-list/StoryList";
4
- export { UGCStoryListMain as UGCStoryList } from "./story-list/UGCStoryList";
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 StoryListMain: ({ storyManager, appearanceManager, feedSlug, useUgcCard, ugcCardClickHandler, viewModelExporter, onLoadStart, onLoadEnd }: StoryListProps) => JSX.Element;
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 UGCStoryListMain: ({ storyManager, appearanceManager, useUgcCard, filter, ugcCardClickHandler, viewModelExporter, onLoadStart, onLoadEnd }: UGCStoryListProps) => JSX.Element;
20
+ export declare const UGCStoryList: (props: UGCStoryListProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { FavoriteStoryCardViewModel, StoryCardViewModel } from ".";
2
+
3
+ export declare class FavoriteCardCompositeViewModel extends StoryCardViewModel {
4
+ public favoriteStories: FavoriteStoryCardViewModel[]
5
+ }
@@ -0,0 +1,4 @@
1
+ import { StoriesListCardOptions } from "../appearance-manager";
2
+ import { StoryCardViewModel } from "./storyCardViewModel";
3
+
4
+ export declare class FavoriteStoryCardViewModel extends StoryCardViewModel { }
@@ -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
- favoriteCell: boolean;
21
- ugcCardCell: boolean;
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
- stories: any[];
6
- get isLoading(): boolean;
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 isTitleCardInner(): boolean;
19
- get isTitleCardOutsideTop(): boolean;
20
- get isTitleCardOutsideBottom(): boolean;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inappstory/react-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.1.0-rc.0",
4
4
  "description": "React SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",