@tivio/sdk-react 3.1.4-alpha2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ //! moment.js
2
+
3
+ //! moment.js locale configuration
@@ -1,4 +1,4 @@
1
- import { Currency, QerkoCancellationInfo, ROW_ITEM_TYPES, SubscribeToTaggedVideos, Tag, TilePropsPartial, UseCancelSubscription } from '@tivio/common';
1
+ import { Currency, QerkoCancellationInfo, ROW_ITEM_TYPES, SubscribeToTaggedVideos, TileProps, UseCancelSubscription } from '@tivio/common';
2
2
  import { ComponentType } from 'react';
3
3
  import { Logger } from '../services/logger';
4
4
  import { FetchPackage } from '../services/packageLoader';
@@ -43,7 +43,7 @@ declare type InternalConfig = {
43
43
  error: string | null;
44
44
  }>;
45
45
  fetchPackage: FetchPackage;
46
- language?: string;
46
+ language?: Language;
47
47
  LoaderComponent?: ComponentType;
48
48
  logger?: Logger | null;
49
49
  pubSub: PubSub;
@@ -194,10 +194,9 @@ interface TivioAuth {
194
194
  signOut: () => Promise<void>;
195
195
  createFreePurchase: (monetizationId: string) => Promise<void>;
196
196
  }
197
- interface RouterOverridesContextState {
198
- goToPlayer: (videoId: string, type: ROW_ITEM_TYPES, rowId?: string) => void;
199
- goToTagPage: (tagId: string) => void;
200
- goToLoginScreen: () => void;
197
+ interface TileActionProps {
198
+ goToPlayer?: (videoId: string, type: ROW_ITEM_TYPES, rowId?: string) => void;
199
+ goToLoginScreen?: () => void;
201
200
  }
202
201
  declare type TivioComponents = {
203
202
  AdIndicationButtonWeb: React.ReactNode;
@@ -223,12 +222,9 @@ declare type TivioComponents = {
223
222
  TvApp: React.ComponentType<TvAppProps>;
224
223
  CustomerScreen: React.ComponentType<{
225
224
  screenId: string;
226
- }>;
227
- WebTagScreen: React.ReactNode;
228
- WebRow: React.ReactNode;
229
- WebTile: React.ComponentType<{
230
- item?: Video | Tag;
231
- } & TilePropsPartial>;
225
+ } & TileActionProps>;
226
+ Row: React.ReactNode;
227
+ AppTile: React.ComponentType<TileProps>;
232
228
  FeatureSupportCheck: React.ComponentType<{}>;
233
229
  };
234
230
  declare type AdSegment = {
@@ -307,7 +303,6 @@ declare type TivioInternalProviders = {
307
303
  QerkoOverlayContextProvider: React.ComponentType;
308
304
  PurchasesWithVideosContextProvider: React.ComponentType;
309
305
  OrganizationSubscriptionsContextProvider: React.ComponentType;
310
- RouterOverridesContextProvider: React.ComponentType<RouterOverridesContextState>;
311
306
  };
312
307
  declare type TivioBundleFile = {
313
308
  Tivio: TivioBundle;
@@ -12,7 +12,15 @@ declare type RemoteProviderProps = {
12
12
  disableUnmounting?: boolean;
13
13
  language?: string;
14
14
  };
15
- declare type Language = 'cs' | 'en' | 'sk' | 'de' | 'pl';
15
+ declare enum Language {
16
+ CS = "cs",
17
+ DE = "de",
18
+ EN = "en",
19
+ FR = "fr",
20
+ PL = "pl",
21
+ SK = "sk",
22
+ SP = "sp"
23
+ }
16
24
  declare type User = {
17
25
  purchases: Purchase[];
18
26
  purchasedVods: Purchase[];
@@ -173,4 +181,5 @@ declare type TivioSources = {
173
181
  VodExternalSource: any;
174
182
  VodTivioSource: any;
175
183
  };
176
- export type { RemoteProviderProps, WebPlayerProps, Marker, BetOffer, Purchase, Chapter, Language, Widget, Channel, Section, Video, TivioSources, UserData, User, Monetization, VodTivioSourcePojo, ChannelSourcePojo, };
184
+ export type { RemoteProviderProps, WebPlayerProps, Marker, BetOffer, Purchase, Chapter, Widget, Channel, Section, Video, TivioSources, UserData, User, Monetization, VodTivioSourcePojo, ChannelSourcePojo, };
185
+ export { Language };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-react",
3
- "version": "3.1.4-alpha2",
3
+ "version": "3.2.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -14,6 +14,8 @@
14
14
  "start": "yarn ts-node ./scripts/start.ts",
15
15
  "test": "jest --config=./jest.config.js --coverage",
16
16
  "clean": "rm -rf dist",
17
+ "prepublishOnly": "yarn && yarn run build && yarn ts-node ./scripts/prepublish.ts",
18
+ "postpublish": "yarn ts-node ./scripts/postpublish.ts",
17
19
  "publish:alpha": "npm publish --tag alpha",
18
20
  "check:cycles": "npx madge --circular src/**/*"
19
21
  },
@@ -25,7 +27,7 @@
25
27
  "@material-ui/core": "^4.11.2",
26
28
  "@material-ui/icons": "^4.11.2",
27
29
  "@sentry/browser": "^6.1.0",
28
- "@tivio/common": "*",
30
+ "@tivio/common": "1.1.76",
29
31
  "firebase": "^8.2.3",
30
32
  "formik": "^2.2.7",
31
33
  "i18next": "^19.8.4",