@tivio/sdk-react 3.5.2 → 3.6.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.
Files changed (63) hide show
  1. package/README.md +6 -3
  2. package/README.md.bak +6 -3
  3. package/dist/index.d.ts +1729 -21
  4. package/dist/index.js +1 -2
  5. package/package.json +10 -7
  6. package/dist/components/ContextProvider.d.ts +0 -7
  7. package/dist/components/PlayerProvider.d.ts +0 -19
  8. package/dist/components/TivioProvider.d.ts +0 -16
  9. package/dist/components/TivioWidget.d.ts +0 -7
  10. package/dist/components/TivioWidgetError.d.ts +0 -10
  11. package/dist/components/TivioWidgetLoader.d.ts +0 -6
  12. package/dist/components/TvTivioProvider.d.ts +0 -7
  13. package/dist/components/context/ChannelsContext.d.ts +0 -6
  14. package/dist/components/context/RowItemsContext.d.ts +0 -7
  15. package/dist/components/context/ScreensContext.d.ts +0 -6
  16. package/dist/components/context/SectionsContext.d.ts +0 -6
  17. package/dist/components/context/VideosContext.d.ts +0 -6
  18. package/dist/components/context/index.d.ts +0 -5
  19. package/dist/components/context/types.d.ts +0 -27
  20. package/dist/components/hooks/contentHooks.d.ts +0 -68
  21. package/dist/components/hooks/index.d.ts +0 -22
  22. package/dist/components/hooks/playerHooks.d.ts +0 -28
  23. package/dist/components/hooks/useApplyInviteCode.d.ts +0 -17
  24. package/dist/components/hooks/useCancelSubscription.d.ts +0 -2
  25. package/dist/components/hooks/useError.d.ts +0 -9
  26. package/dist/components/hooks/useFreePurchase.d.ts +0 -4
  27. package/dist/components/hooks/useIsMonetizationPurchased.d.ts +0 -3
  28. package/dist/components/hooks/useItemsInRow.d.ts +0 -11
  29. package/dist/components/hooks/useLastVideoByWidgetId.d.ts +0 -5
  30. package/dist/components/hooks/useOrganizationSubscriptions.d.ts +0 -3
  31. package/dist/components/hooks/usePurchaseRecovery.d.ts +0 -14
  32. package/dist/components/hooks/usePurchaseSubscription.d.ts +0 -4
  33. package/dist/components/hooks/usePurchasesWithVideos.d.ts +0 -7
  34. package/dist/components/hooks/useRowsInScreen.d.ts +0 -6
  35. package/dist/components/hooks/useScreen.d.ts +0 -10
  36. package/dist/components/hooks/useScreens.d.ts +0 -5
  37. package/dist/components/hooks/useSearch.d.ts +0 -8
  38. package/dist/components/hooks/useTaggedVideos.d.ts +0 -11
  39. package/dist/components/hooks/useTivio.d.ts +0 -3
  40. package/dist/components/hooks/useTransactionPayment.d.ts +0 -5
  41. package/dist/components/hooks/useUser.d.ts +0 -5
  42. package/dist/components/hooks/useVoucher.d.ts +0 -42
  43. package/dist/components/hooks/useWatchWithoutAdsOffer.d.ts +0 -4
  44. package/dist/config.d.ts +0 -20
  45. package/dist/index.js.LICENSE.txt +0 -335
  46. package/dist/info.d.ts +0 -2
  47. package/dist/services/bundleLoader.d.ts +0 -15
  48. package/dist/services/bundlePromise.d.ts +0 -7
  49. package/dist/services/dependencyResolver.d.ts +0 -24
  50. package/dist/services/gdpr.d.ts +0 -1
  51. package/dist/services/localFetch/coreReactDomDist.d.ts +0 -1
  52. package/dist/services/localFetch/none.d.ts +0 -1
  53. package/dist/services/logger.d.ts +0 -26
  54. package/dist/services/login.d.ts +0 -9
  55. package/dist/services/packageLoader.d.ts +0 -6
  56. package/dist/services/pubSub.d.ts +0 -13
  57. package/dist/services/sentry.d.ts +0 -4
  58. package/dist/services/settings.d.ts +0 -13
  59. package/dist/types/bundle.types.d.ts +0 -444
  60. package/dist/types/common.d.ts +0 -6
  61. package/dist/types/config.types.d.ts +0 -0
  62. package/dist/types/customPlayer.types.d.ts +0 -171
  63. package/dist/types/types.d.ts +0 -174
@@ -1,335 +0,0 @@
1
- /*!**********************!*\
2
- !*** ./src/index.ts ***!
3
- \**********************/
4
-
5
- /*!***********************!*\
6
- !*** external "mobx" ***!
7
- \***********************/
8
-
9
- /*!************************!*\
10
- !*** external "react" ***!
11
- \************************/
12
-
13
- /*!*************************!*\
14
- !*** ./src/polyfill.ts ***!
15
- \*************************/
16
-
17
- /*!***************************!*\
18
- !*** ./src/i18n/hooks.ts ***!
19
- \***************************/
20
-
21
- /*!***************************!*\
22
- !*** ./src/i18n/index.ts ***!
23
- \***************************/
24
-
25
- /*!***************************!*\
26
- !*** ./src/i18n/types.ts ***!
27
- \***************************/
28
-
29
- /*!***************************!*\
30
- !*** ./src/i18n/utils.ts ***!
31
- \***************************/
32
-
33
- /*!***************************!*\
34
- !*** ./src/utils/math.ts ***!
35
- \***************************/
36
-
37
- /*!***************************!*\
38
- !*** ./src/utils/text.ts ***!
39
- \***************************/
40
-
41
- /*!***************************!*\
42
- !*** ./src/utils/time.ts ***!
43
- \***************************/
44
-
45
- /*!****************************!*\
46
- !*** ./src/hooks/index.ts ***!
47
- \****************************/
48
-
49
- /*!****************************!*\
50
- !*** ./src/types/index.ts ***!
51
- \****************************/
52
-
53
- /*!****************************!*\
54
- !*** ./src/utils/cache.ts ***!
55
- \****************************/
56
-
57
- /*!****************************!*\
58
- !*** ./src/utils/calls.ts ***!
59
- \****************************/
60
-
61
- /*!****************************!*\
62
- !*** ./src/utils/image.ts ***!
63
- \****************************/
64
-
65
- /*!****************************!*\
66
- !*** ./src/utils/index.ts ***!
67
- \****************************/
68
-
69
- /*!*****************************!*\
70
- !*** ./src/device/index.ts ***!
71
- \*****************************/
72
-
73
- /*!*****************************!*\
74
- !*** ./src/device/tizen.ts ***!
75
- \*****************************/
76
-
77
- /*!*****************************!*\
78
- !*** ./src/hooks/values.ts ***!
79
- \*****************************/
80
-
81
- /*!*****************************!*\
82
- !*** ./src/types/common.ts ***!
83
- \*****************************/
84
-
85
- /*!*****************************!*\
86
- !*** ./src/utils/device.ts ***!
87
- \*****************************/
88
-
89
- /*!*****************************!*\
90
- !*** ./src/utils/format.ts ***!
91
- \*****************************/
92
-
93
- /*!*****************************!*\
94
- !*** ./src/utils/logger.ts ***!
95
- \*****************************/
96
-
97
- /*!******************************!*\
98
- !*** ./src/filters/index.ts ***!
99
- \******************************/
100
-
101
- /*!*******************************!*\
102
- !*** ./src/constants/vast.ts ***!
103
- \*******************************/
104
-
105
- /*!*******************************!*\
106
- !*** ./src/device/smartTv.ts ***!
107
- \*******************************/
108
-
109
- /*!*******************************!*\
110
- !*** ./src/filters/videos.ts ***!
111
- \*******************************/
112
-
113
- /*!********************************!*\
114
- !*** ./src/constants/index.ts ***!
115
- \********************************/
116
-
117
- /*!********************************!*\
118
- !*** ./src/utils/analytics.ts ***!
119
- \********************************/
120
-
121
- /*!********************************!*\
122
- !*** ./src/utils/dom.utils.ts ***!
123
- \********************************/
124
-
125
- /*!********************************!*\
126
- !*** ./src/utils/eventLoop.ts ***!
127
- \********************************/
128
-
129
- /*!*********************************!*\
130
- !*** ./src/device/tizen.api.ts ***!
131
- \*********************************/
132
-
133
- /*!*********************************!*\
134
- !*** ./src/hooks/useLoading.ts ***!
135
- \*********************************/
136
-
137
- /*!*********************************!*\
138
- !*** ./src/i18n/components.tsx ***!
139
- \*********************************/
140
-
141
- /*!*********************************!*\
142
- !*** ./src/pagination/index.ts ***!
143
- \*********************************/
144
-
145
- /*!**********************************!*\
146
- !*** ./src/i18n/i18nContext.tsx ***!
147
- \**********************************/
148
-
149
- /*!**********************************!*\
150
- !*** ./src/types/bundle/auth.ts ***!
151
- \**********************************/
152
-
153
- /*!**********************************!*\
154
- !*** ./src/utils/array.utils.ts ***!
155
- \**********************************/
156
-
157
- /*!***********************************!*\
158
- !*** ./src/types/bundle/index.ts ***!
159
- \***********************************/
160
-
161
- /*!*************************************!*\
162
- !*** ./src/hooks/useImageLoader.ts ***!
163
- \*************************************/
164
-
165
- /*!*************************************!*\
166
- !*** ./src/types/bundle/context.ts ***!
167
- \*************************************/
168
-
169
- /*!**************************************!*\
170
- !*** ./src/i18n/languageContext.tsx ***!
171
- \**************************************/
172
-
173
- /*!**************************************!*\
174
- !*** ./src/pagination/Pagination.ts ***!
175
- \**************************************/
176
-
177
- /*!***************************************!*\
178
- !*** ./src/types/externalTypes/ad.ts ***!
179
- \***************************************/
180
-
181
- /*!****************************************!*\
182
- !*** ./src/types/bundle/components.ts ***!
183
- \****************************************/
184
-
185
- /*!****************************************!*\
186
- !*** ./src/types/externalTypes/row.ts ***!
187
- \****************************************/
188
-
189
- /*!****************************************!*\
190
- !*** ./src/types/externalTypes/tag.ts ***!
191
- \****************************************/
192
-
193
- /*!****************************************!*\
194
- !*** ./src/utils/comparators/index.ts ***!
195
- \****************************************/
196
-
197
- /*!*****************************************!*\
198
- !*** ../firebase/dist/browser/index.js ***!
199
- \*****************************************/
200
-
201
- /*!*****************************************!*\
202
- !*** ./src/types/externalTypes/user.ts ***!
203
- \*****************************************/
204
-
205
- /*!******************************************!*\
206
- !*** ./src/pagination/refsPagination.ts ***!
207
- \******************************************/
208
-
209
- /*!******************************************!*\
210
- !*** ./src/types/externalTypes/index.ts ***!
211
- \******************************************/
212
-
213
- /*!******************************************!*\
214
- !*** ./src/types/externalTypes/qerko.ts ***!
215
- \******************************************/
216
-
217
- /*!******************************************!*\
218
- !*** ./src/types/externalTypes/video.ts ***!
219
- \******************************************/
220
-
221
- /*!*******************************************!*\
222
- !*** ./src/types/bundle/subscriptions.ts ***!
223
- \*******************************************/
224
-
225
- /*!*******************************************!*\
226
- !*** ./src/types/externalTypes/config.ts ***!
227
- \*******************************************/
228
-
229
- /*!*******************************************!*\
230
- !*** ./src/types/externalTypes/screen.ts ***!
231
- \*******************************************/
232
-
233
- /*!*******************************************!*\
234
- !*** ./src/types/externalTypes/search.ts ***!
235
- \*******************************************/
236
-
237
- /*!*******************************************!*\
238
- !*** ./src/types/externalTypes/widget.ts ***!
239
- \*******************************************/
240
-
241
- /*!********************************************!*\
242
- !*** ./src/types/externalTypes/channel.ts ***!
243
- \********************************************/
244
-
245
- /*!********************************************!*\
246
- !*** ./src/types/externalTypes/section.ts ***!
247
- \********************************************/
248
-
249
- /*!**********************************************!*\
250
- !*** ./src/types/externalTypes/tvChannel.ts ***!
251
- \**********************************************/
252
-
253
- /*!***********************************************!*\
254
- !*** ../../node_modules/ga-gtag/lib/index.js ***!
255
- \***********************************************/
256
-
257
- /*!*************************************************!*\
258
- !*** ./node_modules/detect-browser/es/index.js ***!
259
- \*************************************************/
260
-
261
- /*!*************************************************!*\
262
- !*** ./src/types/externalTypes/monetization.ts ***!
263
- \*************************************************/
264
-
265
- /*!*************************************************!*\
266
- !*** ./src/types/externalTypes/organization.ts ***!
267
- \*************************************************/
268
-
269
- /*!**************************************************!*\
270
- !*** ../../node_modules/lodash.isempty/index.js ***!
271
- \**************************************************/
272
-
273
- /*!**************************************************!*\
274
- !*** ./src/types/externalTypes/subscriptions.ts ***!
275
- \**************************************************/
276
-
277
- /*!***************************************************!*\
278
- !*** ../../node_modules/date-format/lib/index.js ***!
279
- \***************************************************/
280
-
281
- /*!*****************************************************!*\
282
- !*** ./src/utils/comparators/common.comparators.ts ***!
283
- \*****************************************************/
284
-
285
- /*!******************************************************!*\
286
- !*** ../../node_modules/i18next/dist/esm/i18next.js ***!
287
- \******************************************************/
288
-
289
- /*!***********************************************************!*\
290
- !*** ./src/utils/comparators/monetization.comparators.ts ***!
291
- \***********************************************************/
292
-
293
- /*!***********************************************************!*\
294
- !*** ./src/utils/comparators/settingsItem.comparators.ts ***!
295
- \***********************************************************/
296
-
297
- /*!***************************************************************!*\
298
- !*** ../../node_modules/@babel/runtime/helpers/esm/typeof.js ***!
299
- \***************************************************************/
300
-
301
- /*!*****************************************************************!*\
302
- !*** ../../node_modules/@babel/runtime/helpers/esm/inherits.js ***!
303
- \*****************************************************************/
304
-
305
- /*!********************************************************************!*\
306
- !*** ../../node_modules/@babel/runtime/helpers/esm/createClass.js ***!
307
- \********************************************************************/
308
-
309
- /*!*********************************************************************!*\
310
- !*** ../../node_modules/@babel/runtime/helpers/esm/objectSpread.js ***!
311
- \*********************************************************************/
312
-
313
- /*!***********************************************************************!*\
314
- !*** ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
315
- \***********************************************************************/
316
-
317
- /*!***********************************************************************!*\
318
- !*** ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
319
- \***********************************************************************/
320
-
321
- /*!***********************************************************************!*\
322
- !*** ../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
323
- \***********************************************************************/
324
-
325
- /*!***********************************************************************!*\
326
- !*** ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
327
- \***********************************************************************/
328
-
329
- /*!******************************************************************************!*\
330
- !*** ../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
331
- \******************************************************************************/
332
-
333
- /*!**********************************************************************************!*\
334
- !*** ../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
335
- \**********************************************************************************/
package/dist/info.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const logInfo: () => void;
2
- export { logInfo };
@@ -1,15 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- import type { InternalConfig, RemoteBundleState, TivioBundle } from '../types/bundle.types';
6
- /**
7
- * @throws if fetch fails
8
- */
9
- declare const fetchBundle: (secret: string, conf: InternalConfig) => Promise<string>;
10
- /**
11
- * Fetch & load CommonJS remote module.
12
- */
13
- declare const createRemotePackageLoader: () => (secret: string, conf: InternalConfig) => Promise<TivioBundle>;
14
- declare const createUseRemoteBundle: () => (conf: InternalConfig) => RemoteBundleState;
15
- export { fetchBundle, createRemotePackageLoader, createUseRemoteBundle, };
@@ -1,7 +0,0 @@
1
- import { TivioBundle } from '../types/bundle.types';
2
- import type { RemoteBundleState } from '../types/bundle.types';
3
- export declare let tivioBundle: TivioBundle | null;
4
- /**
5
- * rejects when bundle is not available
6
- */
7
- export declare const bundlePromise: Promise<RemoteBundleState>;
@@ -1,24 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- import * as materialUiCore from '@material-ui/core';
6
- import * as materialUiIcons from '@material-ui/icons';
7
- import * as dayjs from 'dayjs';
8
- import firebase from 'firebase/app';
9
- import 'firebase/auth';
10
- import 'firebase/firestore';
11
- import * as formik from 'formik';
12
- import * as i18Next from 'i18next';
13
- import * as mobx from 'mobx';
14
- import * as mobxReact from 'mobx-react';
15
- import * as react from 'react';
16
- import * as reactDom from 'react-dom';
17
- import * as reactI18Next from 'react-i18next';
18
- import * as reactRouterDom from 'react-router-dom';
19
- import * as reactSpring from 'react-spring';
20
- import * as reactVirtualized from 'react-virtualized';
21
- import * as styledComponents from 'styled-components';
22
- import * as yup from 'yup';
23
- export declare type SharedDependency = typeof react | typeof reactDom | typeof mobx | typeof styledComponents | typeof firebase | typeof materialUiCore | typeof materialUiIcons | typeof formik | typeof i18Next | typeof reactI18Next | typeof reactRouterDom | typeof reactVirtualized | typeof reactSpring | typeof yup | typeof dayjs | typeof mobxReact | null;
24
- export declare const resolveShared: (name: string) => SharedDependency;
@@ -1 +0,0 @@
1
- export declare const showGdprConsentPreferences: () => Promise<void>;
@@ -1 +0,0 @@
1
- export declare const loadBundleFromDist: () => import("../../types/bundle.types").TivioBundle;
@@ -1 +0,0 @@
1
- export declare const loadBundleFromDist: () => void;
@@ -1,26 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- export declare type LoggerArgs = any[];
6
- export interface Logger {
7
- /** important messages */
8
- warn(...data: LoggerArgs): void;
9
- /** errors */
10
- error(...data: LoggerArgs): void;
11
- /** critical errors */
12
- exception(...data: LoggerArgs): void;
13
- /** metrics */
14
- info(...data: LoggerArgs): void;
15
- /** non-production messages */
16
- debug(...data: LoggerArgs): void;
17
- }
18
- export declare type LoggerConf = {
19
- isConsoleEnabled: boolean;
20
- isSentryEnabled?: boolean;
21
- };
22
- export declare type Severity = 'warn' | 'error' | 'info' | 'debug';
23
- /**
24
- * Factory
25
- **/
26
- export declare const createLogger: (conf: LoggerConf) => Logger;
@@ -1,9 +0,0 @@
1
- import type { UserPayload } from '../types/bundle.types';
2
- /**
3
- * Set user to sign in/out.
4
- *
5
- * Sign in - setUser('userID', { token: 'xxx' })
6
- * Sign out - setUser(null)
7
- */
8
- declare const setUser: (userId: string | null, payload?: UserPayload | undefined) => Promise<void>;
9
- export { setUser };
@@ -1,6 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- export declare type FetchPackage = (url: string) => Promise<string>;
6
- export declare const fetchPackage: FetchPackage;
@@ -1,13 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- /**
6
- * Export Tivio Events API
7
- */
8
- import { PubSub } from '../types/bundle.types';
9
- export declare const createPubSub: () => PubSub;
10
- /**
11
- * Share singleton instance
12
- */
13
- export declare const getPubSub: () => PubSub;
@@ -1,4 +0,0 @@
1
- import * as _Sentry from '@sentry/browser';
2
- export declare let Sentry: null | typeof _Sentry;
3
- export declare const disableSentry: () => void;
4
- export declare const initSentry: () => void;
@@ -1,13 +0,0 @@
1
- /**
2
- * Copyright (c) 2021, nangu.TV, a.s. All rights reserved.
3
- * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
- */
5
- /**
6
- * @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
7
- */
8
- export declare const createSettings: () => {
9
- /**
10
- * @deprecated TIV-994 in favour of setUser from libs/sdk-react/src/services/login.ts
11
- */
12
- setUser: (userId: string, userPayload: unknown) => Promise<void>;
13
- };