@tivio/sdk-react 3.1.0 → 3.1.4-alpha

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
@@ -3,14 +3,23 @@
3
3
  ## Changelog
4
4
 
5
5
  * UNRELEASED
6
+ * minor: Added `capabilitiesOptions` for finer configuration of device capabilities
7
+ * v3.1.3
8
+ * patch: Hotfix made sure disabled Tivio does not break React Native
9
+ * internal: Fixed conf.bundleUrlOverride error handling
10
+ * v3.1.2
11
+ * patch: Allow `conf` prop of `TivioProvider` to be `null` or `undefined` in order to turn off Tivio
12
+ * internal: Added `runFeatureSupportCheck` to `TivioProvider`
13
+ * v3.1.1
14
+ * patch: fixed `setUser()` crash when bundle fails to load
6
15
  * v3.1.0
7
- * patch: internal refactored `useAd`, `useAdSegment`
16
+ * internal: refactored `useAd`, `useAdSegment`
8
17
  * patch: `useAdSegment()` now returns null if no monetization is configured, ad segments are not managed in that situation
9
- * patch: internal: fixed refactored `setUser()`
18
+ * internal: fixed refactored `setUser()`
10
19
  * minor: enriched `AdSegment` type from `useAdSegment()`
11
20
  * minor: Added `setUser()` function for login and logout
12
21
  * v3.0.0
13
- * minor: Added hook useWatchWithoutAdsOffer to trigger purchase dialog to "watch without ads", if available
22
+ * minor: Added hook `useWatchWithoutAdsOffer` to trigger purchase dialog to "watch without ads", if available
14
23
  * patch: fix peerDependency declaration for react, react-dom
15
24
  * major: TivioProvider requires deviceCapabilities
16
25
  * major: TivioProvider requires currency
@@ -1,3 +1,8 @@
1
1
  import React from 'react';
2
- declare const ContextProvider: React.FC;
2
+ import { RemoteBundleState } from '../services/bundleLoader';
3
+ interface Props {
4
+ bundleState: RemoteBundleState;
5
+ children: any;
6
+ }
7
+ declare const ContextProvider: React.FC<Props>;
3
8
  export { ContextProvider, };
@@ -9,7 +9,7 @@ export declare type TivioProviderProps = {
9
9
  /**
10
10
  * This prop must be set only once and not change value afterwards
11
11
  */
12
- conf: Config;
12
+ conf: Config | undefined | null;
13
13
  children: React.ReactNode;
14
14
  };
15
15
  declare const TivioContext: React.Context<RemoteBundleState | null>;
@@ -1,8 +1,5 @@
1
1
  export * from './ChannelsContext';
2
- export * from './OrganizationSubscriptionsContext';
3
- export * from './PurchasesWithVideosContext';
4
2
  export * from './ScreensContext';
5
3
  export * from './SectionsContext';
6
- export * from './UserContext';
7
4
  export * from './VideosContext';
8
5
  export * from './RowItemsContext';
@@ -1,4 +1,3 @@
1
- declare const useOrganizationSubscriptions: () => {
1
+ export declare const useOrganizationSubscriptions: () => {
2
2
  subscriptions: import("@tivio/common").Monetization[];
3
3
  };
4
- export { useOrganizationSubscriptions, };
@@ -1,5 +1,4 @@
1
- declare const useUser: () => {
1
+ export declare const useUser: () => {
2
2
  user: import("@tivio/common/dist/types/externalTypes/user").User | null;
3
3
  error: string | null;
4
4
  };
5
- export { useUser, };
package/dist/config.d.ts CHANGED
@@ -3,9 +3,11 @@
3
3
  * nangu.TV, a.s PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
4
  */
5
5
  import type { Config as ExternalConfig, InternalConfig } from './types/bundle.types';
6
+ import type { Currency } from '@tivio/common';
6
7
  export declare const defaultConf: {
7
8
  secret: null;
8
9
  resolverUrl: string;
10
+ currency: Currency;
9
11
  disableUnmounting: boolean;
10
12
  fetchPackage: import("./services/packageLoader").FetchPackage;
11
13
  pubSub: import("./types/bundle.types").PubSub;
@@ -14,4 +16,4 @@ export declare const defaultConf: {
14
16
  error: string | null;
15
17
  }>;
16
18
  };
17
- export declare const createInternalConf: (conf: ExternalConfig) => InternalConfig;
19
+ export declare const createInternalConf: (conf: ExternalConfig | undefined | null) => InternalConfig;
package/dist/index.d.ts CHANGED
@@ -15,12 +15,5 @@ export { Disposer } from './types/common';
15
15
  export { Empty } from './types/common';
16
16
  export { Nullable } from './types/common';
17
17
  export { Config } from './types/bundle.types';
18
- export { TivioBundle } from './types/bundle.types';
19
- export { TivioHooks } from './types/bundle.types';
20
- export { TivioComponents } from './types/bundle.types';
21
- export { TivioAuth } from './types/bundle.types';
22
- export { TivioGetters } from './types/bundle.types';
23
- export { TivioSubscriptions } from './types/bundle.types';
24
- export { PlayerCapability } from './types/bundle.types';
25
- export { Currency } from './types/bundle.types';
18
+ export { TivioBundle, TivioHooks, TivioComponents, TivioAuth, TivioGetters, TivioSubscriptions, PlayerCapability, Currency, TivioInternalHooks, TivioInternalProviders, } from './types/bundle.types';
26
19
  export { setUser } from './services/login';