react-native-firework-sdk 2.4.0 → 2.4.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/FireworkVideoUI.xcframework/Info.plist +5 -5
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +1 -1
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +4 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +41 -13
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWContianerActivity.kt +61 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +0 -2
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWStoryBlockUtil.kt +30 -0
- package/android/src/main/res/layout/fw_bridge_fragment_container.xml +8 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +12 -0
- package/ios/Models/RNToNative/RCTConvert+FWNavigatorModule.swift +21 -0
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +3 -30
- package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +2 -2
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +5 -5
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.m +2 -2
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +59 -4
- package/ios/Modules/FWNavigatorModule/FWRNContainerViewController.swift +33 -0
- package/ios/Modules/FWNavigatorModule/PushRNContainerParams.swift +14 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +36 -23
- package/lib/commonjs/FWNavigator.js +21 -0
- package/lib/commonjs/FWNavigator.js.map +1 -1
- package/lib/commonjs/FireworkSDK.js +12 -1
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/PushRNContainerParams.js +2 -0
- package/lib/commonjs/models/PushRNContainerParams.js.map +1 -0
- package/lib/commonjs/modules/FWNavigatorModule.js.map +1 -1
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/FWNavigator.js +21 -0
- package/lib/module/FWNavigator.js.map +1 -1
- package/lib/module/FireworkSDK.js +12 -1
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/PushRNContainerParams.js +2 -0
- package/lib/module/models/PushRNContainerParams.js.map +1 -0
- package/lib/module/modules/FWNavigatorModule.js +1 -2
- package/lib/module/modules/FWNavigatorModule.js.map +1 -1
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/typescript/FWNavigator.d.ts +14 -0
- package/lib/typescript/FireworkSDK.d.ts +3 -1
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/models/PushRNContainerParams.d.ts +8 -0
- package/lib/typescript/modules/FWNavigatorModule.d.ts +3 -0
- package/lib/typescript/modules/FireworkSDKModule.d.ts +1 -0
- package/package.json +1 -1
- package/src/FWNavigator.ts +20 -0
- package/src/FireworkSDK.ts +10 -1
- package/src/index.ts +4 -0
- package/src/models/PushRNContainerParams.ts +9 -0
- package/src/modules/FWNavigatorModule.ts +5 -2
- package/src/modules/FireworkSDKModule.ts +1 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
1
2
|
/**
|
|
2
3
|
* You can use this class for pushing RN page from the native page.
|
|
3
4
|
*/
|
|
@@ -5,6 +6,19 @@ declare class FWNavigator {
|
|
|
5
6
|
private static _instance?;
|
|
6
7
|
static getInstance(): FWNavigator;
|
|
7
8
|
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Push a new RN container.
|
|
11
|
+
* You could use this method to make a RN page on top of
|
|
12
|
+
* SDK full-screen player.
|
|
13
|
+
* @param params {PushRNContainerParams}
|
|
14
|
+
* @returns {Promise<boolean>} The result of pushing a new Container.
|
|
15
|
+
*/
|
|
16
|
+
pushRNContainer(params: PushRNContainerParams): Promise<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Pop the RN container you pushed before.
|
|
19
|
+
* @returns {Promise<boolean>} The result of popping a new Container.
|
|
20
|
+
*/
|
|
21
|
+
popRNContainer(): Promise<boolean>;
|
|
8
22
|
/**
|
|
9
23
|
* Pop the native container. You could use the method to close the fullscreen player.
|
|
10
24
|
* But if the enablePictureInPicture of the associated video feed is true,
|
|
@@ -23,7 +23,9 @@ declare class FireworkSDK {
|
|
|
23
23
|
/**
|
|
24
24
|
* the callback of clicking Video Feed.
|
|
25
25
|
*/
|
|
26
|
-
onVideoFeedClick
|
|
26
|
+
get onVideoFeedClick(): VideoFeedClickCallback | undefined;
|
|
27
|
+
set onVideoFeedClick(value: VideoFeedClickCallback | undefined);
|
|
28
|
+
private _onVideoFeedClick?;
|
|
27
29
|
/**
|
|
28
30
|
* The callback of clicking custom CTA.
|
|
29
31
|
*/
|
|
@@ -29,6 +29,8 @@ import type ProductInfoViewConfiguration from './models/ProductInfoViewConfigura
|
|
|
29
29
|
import type { LinkButtonConfiguration, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText } from './models/ProductInfoViewConfiguration';
|
|
30
30
|
import type ProductUnit from './models/ProductUnit';
|
|
31
31
|
import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
|
|
32
|
+
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
33
|
+
import type { RNAppProps } from './models/PushRNContainerParams';
|
|
32
34
|
import type SDKInitOptions from './models/SDKInitOptions';
|
|
33
35
|
import type { VideoLaunchBehavior } from './models/SDKInitOptions';
|
|
34
36
|
import type ShoppingCTAResult from './models/ShoppingCTAResult';
|
|
@@ -50,4 +52,4 @@ import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
|
|
|
50
52
|
import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
|
|
51
53
|
import VideoShopping from './VideoShopping';
|
|
52
54
|
export default FireworkSDK;
|
|
53
|
-
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
55
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, OpenVideoPlayerConfiguration, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, PushRNContainerParams, RNAppProps, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
import type PushRNContainerParams from '../models/PushRNContainerParams';
|
|
2
3
|
interface IFWNavigatorModule extends NativeModule {
|
|
4
|
+
pushRNContainer(params: PushRNContainerParams): Promise<boolean>;
|
|
5
|
+
popRNContainer(): Promise<boolean>;
|
|
3
6
|
popNativeContainer(): Promise<boolean>;
|
|
4
7
|
canPopNativeContainer(): Promise<boolean>;
|
|
5
8
|
startFloatingPlayer(): Promise<boolean>;
|
|
@@ -6,6 +6,7 @@ import type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConf
|
|
|
6
6
|
interface IFireworkSDKModule extends NativeModule {
|
|
7
7
|
init(options?: SDKInitOptions): Promise<any>;
|
|
8
8
|
openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;
|
|
9
|
+
setVideoFeedClickCallbackEnabled(enabled: boolean): void;
|
|
9
10
|
setCustomCTAClickEnabled(enabled: boolean): void;
|
|
10
11
|
setShareBaseURL(url?: string): Promise<any>;
|
|
11
12
|
setVideoPlaybackEventEnabled(enabled: boolean): void;
|
package/package.json
CHANGED
package/src/FWNavigator.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FWEventName } from './models/FWEventName';
|
|
2
|
+
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
2
3
|
import FWNavigatorModule, {
|
|
3
4
|
FWNavigatorModuleEventEmitter,
|
|
4
5
|
} from './modules/FWNavigatorModule';
|
|
@@ -22,6 +23,25 @@ class FWNavigator {
|
|
|
22
23
|
FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Push a new RN container.
|
|
28
|
+
* You could use this method to make a RN page on top of
|
|
29
|
+
* SDK full-screen player.
|
|
30
|
+
* @param params {PushRNContainerParams}
|
|
31
|
+
* @returns {Promise<boolean>} The result of pushing a new Container.
|
|
32
|
+
*/
|
|
33
|
+
public pushRNContainer(params: PushRNContainerParams): Promise<boolean> {
|
|
34
|
+
return FWNavigatorModule.pushRNContainer(params);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Pop the RN container you pushed before.
|
|
39
|
+
* @returns {Promise<boolean>} The result of popping a new Container.
|
|
40
|
+
*/
|
|
41
|
+
public popRNContainer(): Promise<boolean> {
|
|
42
|
+
return FWNavigatorModule.popRNContainer();
|
|
43
|
+
}
|
|
44
|
+
|
|
25
45
|
/**
|
|
26
46
|
* Pop the native container. You could use the method to close the fullscreen player.
|
|
27
47
|
* But if the enablePictureInPicture of the associated video feed is true,
|
package/src/FireworkSDK.ts
CHANGED
|
@@ -48,7 +48,16 @@ class FireworkSDK {
|
|
|
48
48
|
/**
|
|
49
49
|
* the callback of clicking Video Feed.
|
|
50
50
|
*/
|
|
51
|
-
public onVideoFeedClick
|
|
51
|
+
public get onVideoFeedClick(): VideoFeedClickCallback | undefined {
|
|
52
|
+
return this._onVideoFeedClick;
|
|
53
|
+
}
|
|
54
|
+
public set onVideoFeedClick(value: VideoFeedClickCallback | undefined) {
|
|
55
|
+
this._onVideoFeedClick = value;
|
|
56
|
+
if (Platform.OS === 'ios') {
|
|
57
|
+
FireworkSDKModule.setVideoFeedClickCallbackEnabled(!!value);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
private _onVideoFeedClick?: VideoFeedClickCallback | undefined;
|
|
52
61
|
|
|
53
62
|
/**
|
|
54
63
|
* The callback of clicking custom CTA.
|
package/src/index.ts
CHANGED
|
@@ -57,6 +57,8 @@ import type {
|
|
|
57
57
|
} from './models/ProductInfoViewConfiguration';
|
|
58
58
|
import type ProductUnit from './models/ProductUnit';
|
|
59
59
|
import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
|
|
60
|
+
import type PushRNContainerParams from './models/PushRNContainerParams';
|
|
61
|
+
import type { RNAppProps } from './models/PushRNContainerParams';
|
|
60
62
|
import type SDKInitOptions from './models/SDKInitOptions';
|
|
61
63
|
import type { VideoLaunchBehavior } from './models/SDKInitOptions';
|
|
62
64
|
import type ShoppingCTAResult from './models/ShoppingCTAResult';
|
|
@@ -131,6 +133,8 @@ export {
|
|
|
131
133
|
ProductPrice,
|
|
132
134
|
ProductUnit,
|
|
133
135
|
ProductUnitOption,
|
|
136
|
+
PushRNContainerParams,
|
|
137
|
+
RNAppProps,
|
|
134
138
|
SDKInitCallback,
|
|
135
139
|
SDKInitEvent,
|
|
136
140
|
SDKInitOptions,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
-
|
|
1
|
+
import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';
|
|
2
|
+
|
|
3
3
|
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
4
|
+
import type PushRNContainerParams from '../models/PushRNContainerParams';
|
|
4
5
|
|
|
5
6
|
const FWNavigatorModule = NativeModules.FWNavigatorModule
|
|
6
7
|
? NativeModules.FWNavigatorModule
|
|
@@ -13,6 +14,8 @@ const FWNavigatorModule = NativeModules.FWNavigatorModule
|
|
|
13
14
|
}
|
|
14
15
|
);
|
|
15
16
|
interface IFWNavigatorModule extends NativeModule {
|
|
17
|
+
pushRNContainer(params: PushRNContainerParams): Promise<boolean>;
|
|
18
|
+
popRNContainer(): Promise<boolean>;
|
|
16
19
|
popNativeContainer(): Promise<boolean>;
|
|
17
20
|
canPopNativeContainer(): Promise<boolean>;
|
|
18
21
|
startFloatingPlayer(): Promise<boolean>;
|
|
@@ -20,6 +20,7 @@ const FireworkSDKModule = NativeModules.FireworkSDK
|
|
|
20
20
|
interface IFireworkSDKModule extends NativeModule {
|
|
21
21
|
init(options?: SDKInitOptions): Promise<any>;
|
|
22
22
|
openVideoPlayer(url: string, config?: VideoPlayerNativeConfiguration): void;
|
|
23
|
+
setVideoFeedClickCallbackEnabled(enabled: boolean): void; // Only supported on iOS
|
|
23
24
|
setCustomCTAClickEnabled(enabled: boolean): void;
|
|
24
25
|
setShareBaseURL(url?: string): Promise<any>;
|
|
25
26
|
setVideoPlaybackEventEnabled(enabled: boolean): void;
|