@tivio/sdk-react 11.0.1 → 12.0.1

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/README.md CHANGED
@@ -4,6 +4,404 @@
4
4
  above Tivio Studio. You can comfortably manage all you videos, settings such as application's screens and rows and also monetization
5
5
  settings in the administration of Tivio Studio while having the freedom to build your own application.
6
6
 
7
+ ## Changelog
8
+
9
+ ## 12.0.1
10
+ * patch: show the current changelog on npm.
11
+
12
+ ## 12.0.0
13
+ * minor: expose `allowRepeatVotesPerQuestion`, `minSecondsBetweenVotesPerQuestion`, `canVote`, `nextAllowedVoteAt` (a `Date`), and `secondsUntilNextVote` on poll widgets. For repeatable polls, use `canVote` to enable voting again. `isSubmitted` stays true after the first accepted vote.
14
+ * major: **BREAKING** remove `Tivio.components.TvApp` and `Tivio.components.SkipButtonTv` from the remote bundle exposed through the SDK
15
+ * major: **BREAKING** remove web-application components and providers from the remote bundle exposed through the SDK; retain SDK infrastructure, `WebPlayer`, and `RemoteController`
16
+
17
+ ## 11.0.1
18
+ * patch: common version bump
19
+
20
+ ## 11.0.0
21
+ * major: interactive widgets (`usePollWidget`, `useQuizWidget`, `useInteractiveWidget`) — `widget.currentState` now transitions exactly at the delayed state's server (`currentStateWithDelay.enteredAt`) time, holding the outgoing state until then instead of flipping early. Consumers no longer need to hold/compute the displayed state against time to stay in sync with the viewer's delayed stream.
22
+ * minor: interactive widgets — expose `widget.secondsUntilStateChange`, an SDK-managed server-time (NTP) countdown to the next state (`0` when none pending). Use it for countdown UIs instead of `Date.now()`; it is reactive and re-renders at most ~1×/s. Derive "transition pending?" as `secondsUntilStateChange > 0` and the incoming state from `currentStateWithDelay.state`.
23
+
24
+ ## 10.3.0
25
+ * minor: interactive widgets (`usePollWidget`, `useQuizWidget`, `useInteractiveWidget`) — expose `activeUsers`, the live number of users active on the widget's video.
26
+ * minor: interactive widgets — expose `audienceDelayInSeconds`
27
+ * patch: interactive widgets — answer submission now calls the updated submit-answer endpoint version
28
+
29
+ ## 10.2.1
30
+ * patch: `useVoucher` — expose `voucherInfo.videoId` for both subscription and transaction vouchers (moved to `VoucherInfoBasePublic`)
31
+
32
+ ## 10.2.0
33
+ * minor: `useVoucher` — align types with bundle: `voucherInfo` (`VoucherInfoPublic`) exposed on the voucher object; extended `activateVoucher` response via `responseFormat: 'extended'`
34
+
35
+ ## 10.1.0
36
+ * minor: expose useInteractiveWidget, usePollWidget, useQuizWidget, useRemoteController
37
+ * minor: expose useRemoteController hook
38
+
39
+ ## 10.0.0
40
+ * major: **BREAKING** new purchase flow — `PurchasableMonetization.frequency` is now a structured object (`{ unit, value, title }`) instead of a plain `MONETIZATION_FREQUENCY` enum value. Replace `frequency === MONETIZATION_FREQUENCY.X` checks with `frequency?.unit === MONETIZATION_FREQUENCY.X`. The new `value` and `title` fields make it easier to render recurring prices (e.g. "9.99 € / 3 months") without hand-rolling the period label.
41
+ * major: **BREAKING** `TileProps` renamed to `TileComponentProps` to avoid a naming collision with the `TileProps` exported from row types
42
+ * minor: support Single Sign-On (SSO) across all subdomains under the same parent domain
43
+ * minor: add `getTagsByIds` method for batch tag lookup
44
+
45
+ ## 9.2.0
46
+ * minor: remove deprecated TivioWidget component
47
+ * minor: remove deprecated TivioWidgetError component
48
+ * minor: remove deprecated TivioWidgetLoader component
49
+ * patch: deprecate PurchasesWithVideosContextProvider
50
+ * minor: remove unused WebProfileScreen component
51
+ * minor: remove unused ChannelContext context
52
+ * minor: added video controller return from renderWebPlayer
53
+ * minor: update docs usage of renderWebPlayer and video controller
54
+
55
+ ## 9.2.0-alpha.4
56
+ * patch: expose getUser, resetPassword and signOut methods in RemoteBundleState type
57
+ * patch: more precise types for user profile fields and methods
58
+ * patch: add missing jsdocs for some User type fields
59
+
60
+ ## 9.2.0-alpha.0
61
+ * minor: add renderWebPlayer method for rendering outside of React
62
+ * minor: "expose createTivio"
63
+
64
+ ## 9.1.7
65
+ * patch: update remote controller component API
66
+
67
+ ## 9.1.6
68
+ * minor: add remote controller
69
+
70
+ ## 9.1.5
71
+ * patch: expose purchase loyalty points through types
72
+ * patch: enable setUser check
73
+
74
+ ## 9.1.4
75
+ * patch: disable setUser check
76
+ * patch: rollback "add renderWebPlayer method for rendering outside of React"
77
+ * patch: rollback "expose createTivio"
78
+
79
+ ## 9.1.3
80
+ * patch: add renderWebPlayer method for rendering outside of React
81
+ * patch: expose createTivio
82
+
83
+ ## 9.1.4
84
+ * patch: disable setUser check
85
+
86
+ ## 9.1.3
87
+ * minor: add renderWebPlayer method for rendering outside of React
88
+ * minor: expose createTivio
89
+
90
+ ## 9.1.2
91
+ * patch: update PurchaseEndpointPayload type (cityName, externalId, geoPoint)
92
+
93
+ ## 9.1.1
94
+ * patch: fix changelog
95
+
96
+ ## 9.1.0
97
+ * patch: add gateway to Purchase type
98
+ * minor: add QerkoPaymentWebhookByApiKeyRequest to exported types
99
+
100
+ ## 9.0.0
101
+ * patch: remove i18next and react-i18next from externals and dependencies
102
+ * patch: do not send react-spring to core-react-dom bundle, remove react-spring from dependencies
103
+ * patch: clean-up externals in webpack config
104
+ * patch: send only required dependencies to the bundle
105
+ * major: change purchase statuses lifecycle
106
+ * minor: add originalPurchaseId to PurchaseEndpointPayload
107
+
108
+ ## 8.0.0
109
+ * major: deprecated usePurchasesWithVideos hook removed
110
+ * patch: add id to user type
111
+ * patch: add @types/react to peerDependencies
112
+
113
+ ## 7.1.0
114
+ * minor: export useTvChannelHook
115
+ * patch: bump "react-i18next", "i18next" versions.
116
+
117
+ ## 7.0.1
118
+ * patch: fix dependency to @tivio/common
119
+
120
+ ## 7.0.0
121
+ * major: delete deprecated useWatchWithoutAdsOffer hook
122
+ * major: consolidate duplicated source types
123
+ * patch: add new properties to PlayerInterface
124
+ * patch: expose getSeekingMatrixPreviewByTime in Video interface
125
+ * major: delete deprecated useBetOffer hook
126
+ * major: rework of source types
127
+ * major: make useChannelSource deprecated
128
+
129
+ ## 6.0.1
130
+ * patch: fix dependency to @tivio/common
131
+
132
+ ## 6.0.0
133
+ * major: delete usePlayerEvent hook
134
+ * major: replace uri attributes in types with url
135
+ * major: delete uri attributes from types
136
+ * minor: add purchase expiration to PurchaseEndpointPayload
137
+ * minor: add optional videoId parameter to useOrganizationSubscription hook
138
+
139
+ ## 5.0.2
140
+ * patch: export hook useChannelSource
141
+
142
+ ## 5.0.1
143
+ * patch: move changelog
144
+
145
+ ## 5.0.0
146
+ * major: upgrade to React 18, change react and react-dom peer dependencies to 17.x || 18.x
147
+ * major: fix typing for useReferralInfo, now correctly showing that `null` can be returned
148
+ * major: fix typing for `WebRowProps.onTileClick`, now correctly showing that `null` can be accepted
149
+ * minor: add analytics
150
+ * minor: add getSourceUrl function to video and tv channel types
151
+ * minor: add uri property to tv channel type
152
+ * minor: add useChannelSource to hooks
153
+
154
+ ## 4.5.0
155
+ * minor: extend PurchaseEndpointPayload type with purchase previousStatus and newStatus fields
156
+
157
+ ## 4.4.1
158
+ * patch: added waitForTags param in useSearch hook for videos
159
+
160
+ ## 4.4.0
161
+ * minor: PrimaryButton component props type set to any for now
162
+ * patch: isPurchasableAsVoucher added to PurchasableMonetization
163
+ * patch: voucherPurchase flag added to purchase overlays
164
+ * patch: item added to MonetizationsSelectOverlayData
165
+ * minor: added hungarian language to `LangCode` enum
166
+
167
+ ## 4.3.0
168
+ * minor: add GetPurchaseInfoResponse and PurchaseEndpointPayload to exported types
169
+ * minor: support for disabling purchase of specified subscriptions (new param in useOrganizationSubscriptions hook)
170
+ * minor: more specific PurchasableMonetization type usage instead of Monetization
171
+ * minor: monetization property deleted from Video type
172
+ * minor: monetization now has originalPrice and promotion properties available
173
+ * patch: remove not used OrganizationSubscriptionsContext, **this change requires bundle 3.20.0 or newer**
174
+
175
+ ## 4.2.0
176
+ * minor: fix useSearch loading type
177
+ * patch: added italian language to `LangCode` enum
178
+
179
+ ## 4.1.0
180
+ * patch: added italian language to `LangCode` enum
181
+ * minor: fixed spanish language code in `LangCode` enum (`sp` -> `es`)
182
+ * minor: other misc type changes
183
+
184
+ ## 4.0.1
185
+ * patch: added setBundleVersion setter to bundle type
186
+ * patch: added setStorageManager setter to bundle type
187
+ * patch: `Purchase.isPurchased` is deprecated
188
+ * patch: fill `useSearch` field `hasNextPage` with proper value
189
+
190
+ ## 4.0.0
191
+ * minor: Types cleanup
192
+ * MAJOR: Remove deprecated and unused stuff
193
+ * auth
194
+ * changePassword
195
+ * changeUserPhoto
196
+ * removeUserPhoto
197
+ * getPurchasedVodsWithInitializedVideos
198
+ * initializeUser
199
+ * createFreePurchase
200
+ * components
201
+ * videoAdBanner
202
+ * getters
203
+ * getExportedConfig
204
+ * getChannelById
205
+ * getSectionById
206
+ * getWidgetById
207
+ * hooks
208
+ * useLastVideoByWidgetId
209
+ * useScreen
210
+ * useFreePurchase
211
+ * useWidget
212
+ * useChannel
213
+ * useSection
214
+ * useVideosInSection
215
+ * useSectionsInChannel
216
+ * useChannelsInWidget
217
+ * subscriptions
218
+ * subscribeToWidget
219
+ * subscribeToChannel
220
+ * subscribeToSection
221
+ * subscribeToVideosInSection
222
+ * subscribeToSectionsInChannel
223
+ * subscribeToChannelsInWidget
224
+ * subscribeToScreen
225
+ ---
226
+ _Versions <= v3.7.0 requires core-react-dom bundle < v3.0.0 (because sdk-react used some sdk API deleted in core-react-dom@4.0.0)_
227
+
228
+ ## 3.7.0
229
+ * minor: purchase contains created and updated
230
+
231
+ ## 3.6.3
232
+ * patch: improve README.md
233
+
234
+ ## 3.6.2
235
+ * patch: Fix types
236
+
237
+ ## 3.6.1
238
+ * patch: Fix README
239
+
240
+ ## 3.6.0
241
+ * minor: Update types
242
+
243
+ ## 3.5.2
244
+ * patch: All types are available again.
245
+
246
+ ## 3.5.1
247
+ * patch: remove incorrect dependency (@tivio/types)
248
+
249
+ ## 3.5.0
250
+ * minor: Types change - Video.price and Video.detailedPrice can be null
251
+ * minor: Types change - Video.cover is marked as deprecated
252
+
253
+ ## 3.4.0
254
+ * minor: more precise type for errors in usePurchaseRecovery and usePurchaseRecovery
255
+ * patch: jsdocs for usePurchaseRecovery and usePurchaseRecovery
256
+ * minor: inviteCodeReset in useApplyInviteCode
257
+ * minor: Reset forgotten password
258
+ * minor: Consolidating monetization logic
259
+
260
+ ## 3.3.2
261
+ * patch: Adding new optional parameters (where, orderBy) to useTaggedVideos hook
262
+
263
+ ## 3.3.1
264
+ * patch: Fixed types of `setUser`
265
+
266
+ ## 3.3.0
267
+ * minor: Add getPlayerCapabilities to getters.
268
+ * patch: Added option to log out via `setUser(null)`, requires @tivio/core-react-dom@2.17.9
269
+
270
+ ## 3.2.5
271
+ * patch: added recovery flag to QerkoPaymentInfo type
272
+ * patch: bundle.types changes - internal.components.WebVideoScreen
273
+ * patch: types changes - add new onBack prop to WebPlayerProps
274
+ * patch: Refactor useVideo hook, now uses hook from core-react
275
+
276
+ ## 3.2.4
277
+ * minor: added useApplyInviteCode
278
+ * minor: better errors from useVoucher
279
+
280
+ ## 3.2.3
281
+ * minor: added usePurchaseRecovery hook
282
+ * patch: deprecated `useLastVideoByWidgetId`
283
+
284
+ ## 3.2.2
285
+ * minor: useRowsInScreen, useItemsInRow, useTaggedVideos - hasNextPage and loading added to pagination
286
+ * minor: useRowsInScreen, useItemsInRow, useTaggedVideos - implementation moved to remote bundle
287
+ * patch: Fixed Tivio startup on Tizen 6
288
+ * minor: Added `forceCloudFnResolver` option
289
+
290
+ ## 3.2.1
291
+ * patch: fix of @tivio/common version
292
+
293
+ ## 3.2.0
294
+ * minor: Added `capabilitiesOptions` for finer configuration of device capabilities
295
+ * minor: tag names are returned in correct language (the one from tivio config); language value should be one from enum "LangCode"
296
+
297
+ ## 3.1.3
298
+ * patch: Hotfix made sure disabled Tivio does not break React Native
299
+
300
+ ## 3.1.2
301
+ * patch: Allow `conf` prop of `TivioProvider` to be `null` or `undefined` in order to turn off Tivio
302
+
303
+ ## 3.1.1
304
+ * patch: fixed `setUser()` crash when bundle fails to load
305
+
306
+ ## 3.1.0
307
+ * patch: `useAdSegment()` now returns null if no monetization is configured, ad segments are not managed in that situation
308
+ * minor: enriched `AdSegment` type from `useAdSegment()`
309
+ * minor: Added `setUser()` function for login and logout
310
+
311
+ ## 3.0.0
312
+ * minor: Added hook `useWatchWithoutAdsOffer` to trigger purchase dialog to "watch without ads", if available
313
+ * patch: fix peerDependency declaration for react, react-dom
314
+ * major: TivioProvider requires deviceCapabilities
315
+ * major: TivioProvider requires currency
316
+ * minor: add voucher support (see usePurchaseSubscription and useTransactionPayment hooks)
317
+ * minor: device limit support
318
+ * minor: drm (Widevine, PlayReady) support
319
+ * minor: watermarking support
320
+ * minor: add useSearch hook
321
+ * patch: price on video is 0 when purchased
322
+
323
+ ## 2.4.2
324
+ * patch: added back changelog
325
+
326
+ ## 2.4.1
327
+ * patch: improved doc about player wrapper
328
+
329
+ ## 2.4.0
330
+ * patch: improved Player wrapper types
331
+ * minor: added Tivio DOM events `tivio_key_input_handling_change`, `tivio_context_switch` and `tivio_request_goto`
332
+ * patch: added support for remote code on browsers that do not implement [indexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
333
+ * patch: added support for browsers that do not implement [indexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
334
+
335
+ ## 2.3.4
336
+ * patch: fix of usePurchaseSubscription not reactive
337
+
338
+ ## 2.3.3
339
+ * patch: fix of useUser not updating
340
+
341
+ ## 2.3.2
342
+ * patch: next app doesn't fail anymore due to "self is not defined"
343
+
344
+ ## 2.3.1
345
+ * patch: fix of @tivio/common dependency
346
+
347
+ ## 2.3.0
348
+ * minor: add useTaggedVideos that allows to fetch videos with given tags
349
+ * minor: add option to fetch tags (on hook useItemsInRow), useVideo always fetching videos tags
350
+
351
+ ## 2.2.1
352
+ * patch: disable Sentry when no config is supplied to `TivioProvider`
353
+
354
+ ## 2.2.0
355
+ * patch: reduced bundle size
356
+ * minor: disable Sentry when no config is supplied to `TivioProvider` or when Tivio is disabled `{ enable: false }`, or when Sentry is disabled via config `{ enableSentry: false }`
357
+
358
+ ## 2.1.5
359
+ * patch fix of `useVideosInSection` hook (fetching video's monetizations)
360
+
361
+ ## 2.1.4
362
+ * patch: fix re-rendering of `useAd` during non-skippable ads (requires core-react-dom@2.1.9)
363
+
364
+ ## 2.1.3
365
+ * patch: fix changelog
366
+
367
+ ## 2.1.2
368
+ * patch: Fixed exported types
369
+
370
+ ## 2.1.1
371
+ * patch: TivioWidget now correctly reports `false` via `onEnabled` callback when in invalid internal state
372
+
373
+ ## 2.1.0
374
+ * patch: fix of useItemsInRow hook
375
+ * patch: fix of useScreen hook
376
+ * add: useRowsInScreen hook
377
+
378
+ ## 2.0.3
379
+ * patch: fix of useItemsInRow hook
380
+
381
+ ## 2.0.2
382
+ * patch: screen and row IDs fixed
383
+ * `TivioBundle.subscriptions.subscribeToItemsInRow` now accepts user-defined ID via studio.tiv.io
384
+ * `TivioBundle.subscriptions.subscribeToScreen` now accepts user-defined ID via studio.tiv.io
385
+ * `Screen` and `Row` types returned by `useScreen()` return their user-defined IDs (`.id`) correctly
386
+
387
+ ## 2.0.1
388
+ * no changes
389
+
390
+ ## 2.0.0
391
+ * major: video.channelId can now be `string | null` used to be `string`
392
+ * minor: added data API and hooks for screens (screens, rows of screen and row items)
393
+ * hooks: `useScreen()`, `useItemsInRow()`
394
+ * api: `TivioBundle.subscriptions.subscribeToScreen`, `TivioBundle.subscriptions.subscribeToItemsInRow`
395
+
396
+ ## 1.3.6
397
+ * ?
398
+
399
+ ## 1.3.5
400
+ * minor: added WebPlayer props (canReplay, showMarkers, customShortcuts, enableKeyboardShortcuts, source.poster)
401
+
402
+ ## 1.3.4
403
+ * ...
404
+
7
405
  ## Installation
8
406
 
9
407
  Install @tivio/sdk-react along with its peer dependencies