@tivio/sdk-react 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/README.md.bak +5 -0
- package/dist/device/tizen.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/types/bundle.types.d.ts +39 -8
- package/package.json +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Currency, QerkoCancellationInfo, ROW_ITEM_TYPES, SubscribeToTaggedVideos,
|
1
|
+
import { Currency, ItemsInRow, PaginationInterface, PaginationOptions, QerkoCancellationInfo, Row, ROW_ITEM_TYPES, SubscribeToItemsInRowOptions, SubscribeToTaggedVideos, Tag, TilePropsPartial, UseCancelSubscription } from '@tivio/common';
|
2
2
|
import { ComponentType } from 'react';
|
3
3
|
import { Logger } from '../services/logger';
|
4
4
|
import { FetchPackage } from '../services/packageLoader';
|
@@ -54,6 +54,10 @@ declare type InternalConfig = {
|
|
54
54
|
sdkVersion: string;
|
55
55
|
secret: string | null;
|
56
56
|
verbose?: boolean;
|
57
|
+
/**
|
58
|
+
* @private
|
59
|
+
*/
|
60
|
+
forceCloudFnResolver?: boolean;
|
57
61
|
};
|
58
62
|
declare type Events = {
|
59
63
|
'on-ready': RemoteBundleState;
|
@@ -63,7 +67,7 @@ interface PubSub {
|
|
63
67
|
publish: <K extends keyof Events>(triggerName: K, payload: Events[K]) => Empty;
|
64
68
|
subscribe: <K extends keyof Events>(triggerName: K, onMessage: (data: Events[K]) => Empty) => Disposer;
|
65
69
|
}
|
66
|
-
declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currency' | 'disableUnmounting' | 'capabilitiesOptions' | 'enable' | 'enableSentry' | 'ErrorComponent' | 'language' | 'LoaderComponent' | 'logger' | 'secret' | 'verbose'> & {
|
70
|
+
declare type Config = Pick<InternalConfig, 'bundleUrlOverride' | 'currency' | 'disableUnmounting' | 'capabilitiesOptions' | 'enable' | 'enableSentry' | 'ErrorComponent' | 'language' | 'LoaderComponent' | 'logger' | 'secret' | 'verbose' | 'forceCloudFnResolver'> & {
|
67
71
|
deviceCapabilities: PlayerCapability[] | 'auto';
|
68
72
|
/**
|
69
73
|
* @private
|
@@ -194,9 +198,14 @@ interface TivioAuth {
|
|
194
198
|
signOut: () => Promise<void>;
|
195
199
|
createFreePurchase: (monetizationId: string) => Promise<void>;
|
196
200
|
}
|
197
|
-
interface
|
198
|
-
goToPlayer
|
199
|
-
|
201
|
+
export interface RouterOverrides {
|
202
|
+
goToPlayer: (videoId: string, type: ROW_ITEM_TYPES, rowId?: string) => void;
|
203
|
+
goToTagPage: (tagId: string) => void;
|
204
|
+
goToLoginScreen: () => void;
|
205
|
+
goBack: () => void;
|
206
|
+
}
|
207
|
+
export interface RouterOverridesContextState {
|
208
|
+
routerOverrides: RouterOverrides;
|
200
209
|
}
|
201
210
|
declare type TivioComponents = {
|
202
211
|
AdIndicationButtonWeb: React.ReactNode;
|
@@ -205,6 +214,9 @@ declare type TivioComponents = {
|
|
205
214
|
Provider: React.ComponentType<RemoteProviderProps>;
|
206
215
|
Recommendation: React.ReactNode;
|
207
216
|
SkipButtonWeb: React.ReactNode;
|
217
|
+
/**
|
218
|
+
* @deprecated will be removed in in @tivio/sdk-react@4
|
219
|
+
*/
|
208
220
|
VideoAdBanner: React.ReactNode;
|
209
221
|
WebPlayer: React.ComponentType<WebPlayerProps>;
|
210
222
|
Widget: React.ComponentType<TivioWidgetProps>;
|
@@ -222,9 +234,15 @@ declare type TivioComponents = {
|
|
222
234
|
TvApp: React.ComponentType<TvAppProps>;
|
223
235
|
CustomerScreen: React.ComponentType<{
|
224
236
|
screenId: string;
|
225
|
-
}
|
226
|
-
|
227
|
-
|
237
|
+
}>;
|
238
|
+
WebTagScreen: React.ComponentType<{
|
239
|
+
tagId: string;
|
240
|
+
onError?: (error: Error) => void;
|
241
|
+
}>;
|
242
|
+
WebRow: React.ReactNode;
|
243
|
+
WebTile: React.ComponentType<{
|
244
|
+
item?: Video | Tag;
|
245
|
+
} & TilePropsPartial>;
|
228
246
|
FeatureSupportCheck: React.ComponentType<{}>;
|
229
247
|
};
|
230
248
|
declare type AdSegment = {
|
@@ -250,6 +268,18 @@ declare type TivioHooks = {
|
|
250
268
|
useAd: () => [(AdSource | null)];
|
251
269
|
useAdSegment: () => AdSegment | null;
|
252
270
|
useCancelSubscription: UseCancelSubscription;
|
271
|
+
useItemsInRow: (rowId: string, options: PaginationOptions) => {
|
272
|
+
pagination: PaginationInterface<ItemsInRow> | null;
|
273
|
+
error: Error | null;
|
274
|
+
};
|
275
|
+
useRowsInScreen: (screenId: string, options: PaginationOptions) => {
|
276
|
+
pagination: PaginationInterface<Row> | null;
|
277
|
+
error: Error | null;
|
278
|
+
};
|
279
|
+
useTaggedVideos: (tagIds: string[], options: SubscribeToItemsInRowOptions) => {
|
280
|
+
pagination: PaginationInterface<Video> | null;
|
281
|
+
error: Error | null;
|
282
|
+
};
|
253
283
|
useSearch: UseSearch;
|
254
284
|
useVoucher: (voucherId: string) => any;
|
255
285
|
useLastVideoByWidgetId: (widgetId: string) => Video | null;
|
@@ -303,6 +333,7 @@ declare type TivioInternalProviders = {
|
|
303
333
|
QerkoOverlayContextProvider: React.ComponentType;
|
304
334
|
PurchasesWithVideosContextProvider: React.ComponentType;
|
305
335
|
OrganizationSubscriptionsContextProvider: React.ComponentType;
|
336
|
+
RouterOverridesContextProvider: React.ComponentType<RouterOverridesContextState>;
|
306
337
|
};
|
307
338
|
declare type TivioBundleFile = {
|
308
339
|
Tivio: TivioBundle;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tivio/sdk-react",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.2",
|
4
4
|
"main": "dist/index.js",
|
5
5
|
"typings": "dist/index.d.ts",
|
6
6
|
"source": "src/index.ts",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@material-ui/core": "^4.11.2",
|
28
28
|
"@material-ui/icons": "^4.11.2",
|
29
29
|
"@sentry/browser": "^6.1.0",
|
30
|
-
"@tivio/common": "1.1.
|
30
|
+
"@tivio/common": "1.1.78",
|
31
31
|
"firebase": "^8.2.3",
|
32
32
|
"formik": "^2.2.7",
|
33
33
|
"i18next": "^19.8.4",
|