react-native-firework-sdk 2.3.0 → 2.4.0-beta.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/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
- 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/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +24 -10
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
- package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +21 -21
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +20 -0
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +1 -69
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +21 -4
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +15 -3
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +3 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +20 -15
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +45 -16
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +5 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +11 -1
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWImageLoaderUtil.kt +16 -0
- package/ios/Components/StoryBlock.swift +9 -7
- package/ios/Components/StoryBlockConfiguration.swift +13 -0
- package/ios/Components/StoryBlockManager.m +6 -1
- package/ios/Components/VideoFeed.swift +5 -10
- package/ios/Components/VideoFeedManager.m +1 -2
- package/ios/Components/VideoPlayerConfiguration.swift +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -26
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/AppLanguageManager.swift +13 -2
- package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +0 -34
- package/ios/FireworkVideoUI/Podfile +1 -1
- package/ios/FireworkVideoUI/Podfile.lock +4 -4
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +1 -0
- package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +16 -1
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +2 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +8 -4
- package/ios/Modules/Shopping/ShoppingModule.swift +6 -5
- package/ios/react_native_firework_sdk.h +0 -1
- package/package.json +2 -2
- package/react-native-firework-sdk.podspec +1 -1
- package/src/FireworkSDK.ts +2 -2
- package/src/components/StoryBlock.tsx +65 -36
- package/src/components/VideoFeed.tsx +87 -74
- package/src/index.ts +2 -0
- package/src/models/AdBadgeConfiguration.ts +3 -0
- package/src/models/AndroidFontInfo.ts +1 -1
- package/src/models/OpenVideoPlayerConfiguration.ts +9 -0
- package/src/models/Product.ts +1 -1
- package/src/models/ProductUnit.ts +1 -1
- package/src/models/StoryBlockConfiguration.ts +1 -1
- package/src/models/StoryBlockNativeConfiguration.ts +9 -0
- package/src/models/StoryBlockSource.ts +2 -1
- package/src/models/VideoFeedConfiguration.ts +29 -4
- package/src/models/VideoFeedSource.ts +2 -1
- package/src/models/VideoPlayerCTAStyle.ts +6 -0
- package/src/models/VideoPlayerConfiguration.ts +10 -1
- package/src/models/VideoPlayerNativeConfiguration.ts +9 -0
- package/src/modules/FireworkSDKModule.ts +2 -2
- package/ios/Modules/Shopping/FWCartViewController.swift +0 -14
- package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +0 -31
- package/ios/Utils/FWSwizzleLoader.h +0 -15
- package/ios/Utils/FWSwizzleLoader.m +0 -21
- package/ios/Utils/FWSwizzleLoader.swift +0 -13
- package/lib/commonjs/FWNavigator.js +0 -75
- package/lib/commonjs/FWNavigator.js.map +0 -1
- package/lib/commonjs/FireworkSDK.js +0 -341
- package/lib/commonjs/FireworkSDK.js.map +0 -1
- package/lib/commonjs/LiveStream.js +0 -66
- package/lib/commonjs/LiveStream.js.map +0 -1
- package/lib/commonjs/VideoShopping.js +0 -247
- package/lib/commonjs/VideoShopping.js.map +0 -1
- package/lib/commonjs/components/FWStoryBlock.js +0 -18
- package/lib/commonjs/components/FWStoryBlock.js.map +0 -1
- package/lib/commonjs/components/FWVideoFeed.js +0 -18
- package/lib/commonjs/components/FWVideoFeed.js.map +0 -1
- package/lib/commonjs/components/StoryBlock.js +0 -319
- package/lib/commonjs/components/StoryBlock.js.map +0 -1
- package/lib/commonjs/components/VideoFeed.js +0 -390
- package/lib/commonjs/components/VideoFeed.js.map +0 -1
- package/lib/commonjs/constants/FWErrorMessage.js +0 -15
- package/lib/commonjs/constants/FWErrorMessage.js.map +0 -1
- package/lib/commonjs/index.js +0 -84
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/models/AdBadgeConfiguration.js +0 -2
- package/lib/commonjs/models/AdBadgeConfiguration.js.map +0 -1
- package/lib/commonjs/models/AdConfiguration.js +0 -2
- package/lib/commonjs/models/AdConfiguration.js.map +0 -1
- package/lib/commonjs/models/AndroidFontInfo.js +0 -2
- package/lib/commonjs/models/AndroidFontInfo.js.map +0 -1
- package/lib/commonjs/models/FWError.js +0 -2
- package/lib/commonjs/models/FWError.js.map +0 -1
- package/lib/commonjs/models/FWEventName.js +0 -29
- package/lib/commonjs/models/FWEventName.js.map +0 -1
- package/lib/commonjs/models/FWEvents.js +0 -6
- package/lib/commonjs/models/FWEvents.js.map +0 -1
- package/lib/commonjs/models/FeedItemDetails.js +0 -2
- package/lib/commonjs/models/FeedItemDetails.js.map +0 -1
- package/lib/commonjs/models/GradientDrawable.js +0 -2
- package/lib/commonjs/models/GradientDrawable.js.map +0 -1
- package/lib/commonjs/models/IOSFontInfo.js +0 -2
- package/lib/commonjs/models/IOSFontInfo.js.map +0 -1
- package/lib/commonjs/models/LiveStreamChatEventName.js +0 -15
- package/lib/commonjs/models/LiveStreamChatEventName.js.map +0 -1
- package/lib/commonjs/models/LiveStreamEventDetails.js +0 -2
- package/lib/commonjs/models/LiveStreamEventDetails.js.map +0 -1
- package/lib/commonjs/models/LiveStreamEventName.js +0 -17
- package/lib/commonjs/models/LiveStreamEventName.js.map +0 -1
- package/lib/commonjs/models/LiveStreamMessageDetails.js +0 -2
- package/lib/commonjs/models/LiveStreamMessageDetails.js.map +0 -1
- package/lib/commonjs/models/Product.js +0 -2
- package/lib/commonjs/models/Product.js.map +0 -1
- package/lib/commonjs/models/ProductInfoViewConfiguration.js +0 -2
- package/lib/commonjs/models/ProductInfoViewConfiguration.js.map +0 -1
- package/lib/commonjs/models/ProductUnit.js +0 -2
- package/lib/commonjs/models/ProductUnit.js.map +0 -1
- package/lib/commonjs/models/SDKInitOptions.js +0 -2
- package/lib/commonjs/models/SDKInitOptions.js.map +0 -1
- package/lib/commonjs/models/ShoppingCTAResult.js +0 -2
- package/lib/commonjs/models/ShoppingCTAResult.js.map +0 -1
- package/lib/commonjs/models/StoryBlockConfiguration.js +0 -6
- package/lib/commonjs/models/StoryBlockConfiguration.js.map +0 -1
- package/lib/commonjs/models/StoryBlockSource.js +0 -2
- package/lib/commonjs/models/StoryBlockSource.js.map +0 -1
- package/lib/commonjs/models/TrackPurchaseParameters.js +0 -2
- package/lib/commonjs/models/TrackPurchaseParameters.js.map +0 -1
- package/lib/commonjs/models/VideoFeedConfiguration.js +0 -2
- package/lib/commonjs/models/VideoFeedConfiguration.js.map +0 -1
- package/lib/commonjs/models/VideoFeedSource.js +0 -2
- package/lib/commonjs/models/VideoFeedSource.js.map +0 -1
- package/lib/commonjs/models/VideoPlaybackDetails.js +0 -2
- package/lib/commonjs/models/VideoPlaybackDetails.js.map +0 -1
- package/lib/commonjs/models/VideoPlaybackEventName.js +0 -26
- package/lib/commonjs/models/VideoPlaybackEventName.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerCTADelay.js +0 -2
- package/lib/commonjs/models/VideoPlayerCTADelay.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerCTAStyle.js +0 -6
- package/lib/commonjs/models/VideoPlayerCTAStyle.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerCTAWidth.js +0 -2
- package/lib/commonjs/models/VideoPlayerCTAWidth.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerCompleteAction.js +0 -2
- package/lib/commonjs/models/VideoPlayerCompleteAction.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerConfiguration.js +0 -2
- package/lib/commonjs/models/VideoPlayerConfiguration.js.map +0 -1
- package/lib/commonjs/models/VideoPlayerStyle.js +0 -2
- package/lib/commonjs/models/VideoPlayerStyle.js.map +0 -1
- package/lib/commonjs/modules/FWNavigatorModule.js +0 -22
- package/lib/commonjs/modules/FWNavigatorModule.js.map +0 -1
- package/lib/commonjs/modules/FireworkSDKModule.js +0 -22
- package/lib/commonjs/modules/FireworkSDKModule.js.map +0 -1
- package/lib/commonjs/modules/LiveStreamModule.js +0 -22
- package/lib/commonjs/modules/LiveStreamModule.js.map +0 -1
- package/lib/commonjs/modules/ShoppingModule.js +0 -22
- package/lib/commonjs/modules/ShoppingModule.js.map +0 -1
- package/lib/commonjs/utils/FWGlobalState.js +0 -47
- package/lib/commonjs/utils/FWGlobalState.js.map +0 -1
- package/lib/commonjs/utils/FWLoggerUtil.js +0 -45
- package/lib/commonjs/utils/FWLoggerUtil.js.map +0 -1
- package/lib/module/FWNavigator.js +0 -58
- package/lib/module/FWNavigator.js.map +0 -1
- package/lib/module/FireworkSDK.js +0 -310
- package/lib/module/FireworkSDK.js.map +0 -1
- package/lib/module/LiveStream.js +0 -53
- package/lib/module/LiveStream.js.map +0 -1
- package/lib/module/VideoShopping.js +0 -222
- package/lib/module/VideoShopping.js.map +0 -1
- package/lib/module/components/FWStoryBlock.js +0 -8
- package/lib/module/components/FWStoryBlock.js.map +0 -1
- package/lib/module/components/FWVideoFeed.js +0 -8
- package/lib/module/components/FWVideoFeed.js.map +0 -1
- package/lib/module/components/StoryBlock.js +0 -282
- package/lib/module/components/StoryBlock.js.map +0 -1
- package/lib/module/components/VideoFeed.js +0 -365
- package/lib/module/components/VideoFeed.js.map +0 -1
- package/lib/module/constants/FWErrorMessage.js +0 -7
- package/lib/module/constants/FWErrorMessage.js.map +0 -1
- package/lib/module/index.js +0 -12
- package/lib/module/index.js.map +0 -1
- package/lib/module/models/AdBadgeConfiguration.js +0 -2
- package/lib/module/models/AdBadgeConfiguration.js.map +0 -1
- package/lib/module/models/AdConfiguration.js +0 -2
- package/lib/module/models/AdConfiguration.js.map +0 -1
- package/lib/module/models/AndroidFontInfo.js +0 -2
- package/lib/module/models/AndroidFontInfo.js.map +0 -1
- package/lib/module/models/FWError.js +0 -2
- package/lib/module/models/FWError.js.map +0 -1
- package/lib/module/models/FWEventName.js +0 -22
- package/lib/module/models/FWEventName.js.map +0 -1
- package/lib/module/models/FWEvents.js +0 -2
- package/lib/module/models/FWEvents.js.map +0 -1
- package/lib/module/models/FeedItemDetails.js +0 -2
- package/lib/module/models/FeedItemDetails.js.map +0 -1
- package/lib/module/models/GradientDrawable.js +0 -2
- package/lib/module/models/GradientDrawable.js.map +0 -1
- package/lib/module/models/IOSFontInfo.js +0 -2
- package/lib/module/models/IOSFontInfo.js.map +0 -1
- package/lib/module/models/LiveStreamChatEventName.js +0 -8
- package/lib/module/models/LiveStreamChatEventName.js.map +0 -1
- package/lib/module/models/LiveStreamEventDetails.js +0 -2
- package/lib/module/models/LiveStreamEventDetails.js.map +0 -1
- package/lib/module/models/LiveStreamEventName.js +0 -10
- package/lib/module/models/LiveStreamEventName.js.map +0 -1
- package/lib/module/models/LiveStreamMessageDetails.js +0 -2
- package/lib/module/models/LiveStreamMessageDetails.js.map +0 -1
- package/lib/module/models/Product.js +0 -2
- package/lib/module/models/Product.js.map +0 -1
- package/lib/module/models/ProductInfoViewConfiguration.js +0 -2
- package/lib/module/models/ProductInfoViewConfiguration.js.map +0 -1
- package/lib/module/models/ProductUnit.js +0 -2
- package/lib/module/models/ProductUnit.js.map +0 -1
- package/lib/module/models/SDKInitOptions.js +0 -2
- package/lib/module/models/SDKInitOptions.js.map +0 -1
- package/lib/module/models/ShoppingCTAResult.js +0 -2
- package/lib/module/models/ShoppingCTAResult.js.map +0 -1
- package/lib/module/models/StoryBlockConfiguration.js +0 -2
- package/lib/module/models/StoryBlockConfiguration.js.map +0 -1
- package/lib/module/models/StoryBlockSource.js +0 -2
- package/lib/module/models/StoryBlockSource.js.map +0 -1
- package/lib/module/models/TrackPurchaseParameters.js +0 -2
- package/lib/module/models/TrackPurchaseParameters.js.map +0 -1
- package/lib/module/models/VideoFeedConfiguration.js +0 -2
- package/lib/module/models/VideoFeedConfiguration.js.map +0 -1
- package/lib/module/models/VideoFeedSource.js +0 -2
- package/lib/module/models/VideoFeedSource.js.map +0 -1
- package/lib/module/models/VideoPlaybackDetails.js +0 -2
- package/lib/module/models/VideoPlaybackDetails.js.map +0 -1
- package/lib/module/models/VideoPlaybackEventName.js +0 -19
- package/lib/module/models/VideoPlaybackEventName.js.map +0 -1
- package/lib/module/models/VideoPlayerCTADelay.js +0 -2
- package/lib/module/models/VideoPlayerCTADelay.js.map +0 -1
- package/lib/module/models/VideoPlayerCTAStyle.js +0 -2
- package/lib/module/models/VideoPlayerCTAStyle.js.map +0 -1
- package/lib/module/models/VideoPlayerCTAWidth.js +0 -2
- package/lib/module/models/VideoPlayerCTAWidth.js.map +0 -1
- package/lib/module/models/VideoPlayerCompleteAction.js +0 -2
- package/lib/module/models/VideoPlayerCompleteAction.js.map +0 -1
- package/lib/module/models/VideoPlayerConfiguration.js +0 -2
- package/lib/module/models/VideoPlayerConfiguration.js.map +0 -1
- package/lib/module/models/VideoPlayerStyle.js +0 -2
- package/lib/module/models/VideoPlayerStyle.js.map +0 -1
- package/lib/module/modules/FWNavigatorModule.js +0 -13
- package/lib/module/modules/FWNavigatorModule.js.map +0 -1
- package/lib/module/modules/FireworkSDKModule.js +0 -12
- package/lib/module/modules/FireworkSDKModule.js.map +0 -1
- package/lib/module/modules/LiveStreamModule.js +0 -12
- package/lib/module/modules/LiveStreamModule.js.map +0 -1
- package/lib/module/modules/ShoppingModule.js +0 -12
- package/lib/module/modules/ShoppingModule.js.map +0 -1
- package/lib/module/utils/FWGlobalState.js +0 -39
- package/lib/module/utils/FWGlobalState.js.map +0 -1
- package/lib/module/utils/FWLoggerUtil.js +0 -36
- package/lib/module/utils/FWLoggerUtil.js.map +0 -1
- package/lib/typescript/FWNavigator.d.ts +0 -26
- package/lib/typescript/FireworkSDK.d.ts +0 -113
- package/lib/typescript/LiveStream.d.ts +0 -21
- package/lib/typescript/VideoShopping.d.ts +0 -74
- package/lib/typescript/components/FWStoryBlock.d.ts +0 -2
- package/lib/typescript/components/FWVideoFeed.d.ts +0 -2
- package/lib/typescript/components/StoryBlock.d.ts +0 -65
- package/lib/typescript/components/VideoFeed.d.ts +0 -105
- package/lib/typescript/constants/FWErrorMessage.d.ts +0 -2
- package/lib/typescript/index.d.ts +0 -52
- package/lib/typescript/models/AdBadgeConfiguration.d.ts +0 -22
- package/lib/typescript/models/AdConfiguration.d.ts +0 -22
- package/lib/typescript/models/AndroidFontInfo.d.ts +0 -14
- package/lib/typescript/models/FWError.d.ts +0 -10
- package/lib/typescript/models/FWEventName.d.ts +0 -19
- package/lib/typescript/models/FWEvents.d.ts +0 -70
- package/lib/typescript/models/FeedItemDetails.d.ts +0 -54
- package/lib/typescript/models/GradientDrawable.d.ts +0 -5
- package/lib/typescript/models/IOSFontInfo.d.ts +0 -21
- package/lib/typescript/models/LiveStreamChatEventName.d.ts +0 -7
- package/lib/typescript/models/LiveStreamEventDetails.d.ts +0 -3
- package/lib/typescript/models/LiveStreamEventName.d.ts +0 -15
- package/lib/typescript/models/LiveStreamMessageDetails.d.ts +0 -14
- package/lib/typescript/models/Product.d.ts +0 -23
- package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +0 -38
- package/lib/typescript/models/ProductUnit.d.ts +0 -38
- package/lib/typescript/models/SDKInitOptions.d.ts +0 -11
- package/lib/typescript/models/ShoppingCTAResult.d.ts +0 -11
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +0 -37
- package/lib/typescript/models/StoryBlockSource.d.ts +0 -1
- package/lib/typescript/models/TrackPurchaseParameters.d.ts +0 -26
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +0 -108
- package/lib/typescript/models/VideoFeedSource.d.ts +0 -1
- package/lib/typescript/models/VideoPlaybackDetails.d.ts +0 -47
- package/lib/typescript/models/VideoPlaybackEventName.d.ts +0 -51
- package/lib/typescript/models/VideoPlayerCTADelay.d.ts +0 -11
- package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +0 -21
- package/lib/typescript/models/VideoPlayerCTAWidth.d.ts +0 -1
- package/lib/typescript/models/VideoPlayerCompleteAction.d.ts +0 -1
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +0 -51
- package/lib/typescript/models/VideoPlayerStyle.d.ts +0 -1
- package/lib/typescript/modules/FWNavigatorModule.d.ts +0 -11
- package/lib/typescript/modules/FireworkSDKModule.d.ts +0 -19
- package/lib/typescript/modules/LiveStreamModule.d.ts +0 -8
- package/lib/typescript/modules/ShoppingModule.d.ts +0 -18
- package/lib/typescript/utils/FWGlobalState.d.ts +0 -10
- package/lib/typescript/utils/FWLoggerUtil.d.ts +0 -6
|
@@ -34,14 +34,10 @@
|
|
|
34
34
|
897523A02817DEF80070EBB6 /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
35
35
|
898873462A0A8E7E0089CD1C /* UIViewController+AttachChild.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */; };
|
|
36
36
|
898873472A0A8E7E0089CD1C /* UIView+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */; };
|
|
37
|
-
898873482A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */; };
|
|
38
37
|
898873492A0A8E7E0089CD1C /* String+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873172A0A8E7E0089CD1C /* String+Color.swift */; };
|
|
39
|
-
8988734A2A0A8E7E0089CD1C /* FWSwizzleLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */; };
|
|
40
|
-
8988734B2A0A8E7E0089CD1C /* FWSwizzleLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */; };
|
|
41
38
|
8988734D2A0A8E7E0089CD1C /* FWNavigatorModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8988731D2A0A8E7E0089CD1C /* FWNavigatorModule.swift */; };
|
|
42
39
|
8988734E2A0A8E7E0089CD1C /* FWNavigatorModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 8988731E2A0A8E7E0089CD1C /* FWNavigatorModule.m */; };
|
|
43
40
|
8988734F2A0A8E7E0089CD1C /* ShoppingModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873202A0A8E7E0089CD1C /* ShoppingModule.m */; };
|
|
44
|
-
898873502A0A8E7E0089CD1C /* FWCartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873212A0A8E7E0089CD1C /* FWCartViewController.swift */; };
|
|
45
41
|
898873512A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */; };
|
|
46
42
|
898873522A0A8E7E0089CD1C /* ShoppingCTAResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */; };
|
|
47
43
|
898873532A0A8E7E0089CD1C /* Product.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873242A0A8E7E0089CD1C /* Product.swift */; };
|
|
@@ -71,6 +67,7 @@
|
|
|
71
67
|
8988736B2A0A8E7E0089CD1C /* VideoFeed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873432A0A8E7E0089CD1C /* VideoFeed.swift */; };
|
|
72
68
|
8988736C2A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */; };
|
|
73
69
|
8988736D2A0A8E7E0089CD1C /* VideoFeedManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 898873452A0A8E7E0089CD1C /* VideoFeedManager.m */; };
|
|
70
|
+
89C4D6A62A494EB800EFB74A /* StoryBlockConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */; };
|
|
74
71
|
89D6BBF929ACE2DC00C8AA2A /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
75
72
|
89DF27DD28A53A77003F3CCB /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
76
73
|
89DF27DE28A53A77003F3CCB /* (null) in Sources */ = {isa = PBXBuildFile; };
|
|
@@ -94,17 +91,12 @@
|
|
|
94
91
|
1F6F718A2771B48100224AF3 /* FireworkSdk-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FireworkSdk-Bridging-Header.h"; sourceTree = "<group>"; };
|
|
95
92
|
894FADB229BAD571000FB51A /* libFireworkSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFireworkSdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
96
93
|
897523632817DEF80070EBB6 /* react_native_firework_sdk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = react_native_firework_sdk.h; sourceTree = "<group>"; };
|
|
97
|
-
898873112A0A8E7E0089CD1C /* FWSwizzleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FWSwizzleLoader.h; sourceTree = "<group>"; };
|
|
98
94
|
898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+AttachChild.swift"; sourceTree = "<group>"; };
|
|
99
95
|
898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Constraints.swift"; sourceTree = "<group>"; };
|
|
100
|
-
898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINavigationController+FWSwizzle.swift"; sourceTree = "<group>"; };
|
|
101
96
|
898873172A0A8E7E0089CD1C /* String+Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Color.swift"; sourceTree = "<group>"; };
|
|
102
|
-
898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FWSwizzleLoader.m; sourceTree = "<group>"; };
|
|
103
|
-
898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWSwizzleLoader.swift; sourceTree = "<group>"; };
|
|
104
97
|
8988731D2A0A8E7E0089CD1C /* FWNavigatorModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWNavigatorModule.swift; sourceTree = "<group>"; };
|
|
105
98
|
8988731E2A0A8E7E0089CD1C /* FWNavigatorModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FWNavigatorModule.m; sourceTree = "<group>"; };
|
|
106
99
|
898873202A0A8E7E0089CD1C /* ShoppingModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShoppingModule.m; sourceTree = "<group>"; };
|
|
107
|
-
898873212A0A8E7E0089CD1C /* FWCartViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWCartViewController.swift; sourceTree = "<group>"; };
|
|
108
100
|
898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductInfoViewConfiguration.swift; sourceTree = "<group>"; };
|
|
109
101
|
898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShoppingCTAResult.swift; sourceTree = "<group>"; };
|
|
110
102
|
898873242A0A8E7E0089CD1C /* Product.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Product.swift; sourceTree = "<group>"; };
|
|
@@ -134,6 +126,7 @@
|
|
|
134
126
|
898873432A0A8E7E0089CD1C /* VideoFeed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoFeed.swift; sourceTree = "<group>"; };
|
|
135
127
|
898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoPlayerConfiguration.swift; sourceTree = "<group>"; };
|
|
136
128
|
898873452A0A8E7E0089CD1C /* VideoFeedManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoFeedManager.m; sourceTree = "<group>"; };
|
|
129
|
+
89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryBlockConfiguration.swift; sourceTree = "<group>"; };
|
|
137
130
|
/* End PBXFileReference section */
|
|
138
131
|
|
|
139
132
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -163,10 +156,7 @@
|
|
|
163
156
|
898873102A0A8E7E0089CD1C /* Utils */ = {
|
|
164
157
|
isa = PBXGroup;
|
|
165
158
|
children = (
|
|
166
|
-
898873112A0A8E7E0089CD1C /* FWSwizzleLoader.h */,
|
|
167
159
|
898873122A0A8E7E0089CD1C /* Extensions */,
|
|
168
|
-
898873182A0A8E7E0089CD1C /* FWSwizzleLoader.m */,
|
|
169
|
-
898873192A0A8E7E0089CD1C /* FWSwizzleLoader.swift */,
|
|
170
160
|
);
|
|
171
161
|
path = Utils;
|
|
172
162
|
sourceTree = "<group>";
|
|
@@ -176,20 +166,11 @@
|
|
|
176
166
|
children = (
|
|
177
167
|
898873132A0A8E7E0089CD1C /* UIViewController+AttachChild.swift */,
|
|
178
168
|
898873142A0A8E7E0089CD1C /* UIView+Constraints.swift */,
|
|
179
|
-
898873152A0A8E7E0089CD1C /* Swizzle */,
|
|
180
169
|
898873172A0A8E7E0089CD1C /* String+Color.swift */,
|
|
181
170
|
);
|
|
182
171
|
path = Extensions;
|
|
183
172
|
sourceTree = "<group>";
|
|
184
173
|
};
|
|
185
|
-
898873152A0A8E7E0089CD1C /* Swizzle */ = {
|
|
186
|
-
isa = PBXGroup;
|
|
187
|
-
children = (
|
|
188
|
-
898873162A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift */,
|
|
189
|
-
);
|
|
190
|
-
path = Swizzle;
|
|
191
|
-
sourceTree = "<group>";
|
|
192
|
-
};
|
|
193
174
|
8988731A2A0A8E7E0089CD1C /* Modules */ = {
|
|
194
175
|
isa = PBXGroup;
|
|
195
176
|
children = (
|
|
@@ -214,7 +195,6 @@
|
|
|
214
195
|
isa = PBXGroup;
|
|
215
196
|
children = (
|
|
216
197
|
898873202A0A8E7E0089CD1C /* ShoppingModule.m */,
|
|
217
|
-
898873212A0A8E7E0089CD1C /* FWCartViewController.swift */,
|
|
218
198
|
898873222A0A8E7E0089CD1C /* ProductInfoViewConfiguration.swift */,
|
|
219
199
|
898873232A0A8E7E0089CD1C /* ShoppingCTAResult.swift */,
|
|
220
200
|
898873242A0A8E7E0089CD1C /* Product.swift */,
|
|
@@ -296,6 +276,7 @@
|
|
|
296
276
|
898873432A0A8E7E0089CD1C /* VideoFeed.swift */,
|
|
297
277
|
898873442A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift */,
|
|
298
278
|
898873452A0A8E7E0089CD1C /* VideoFeedManager.m */,
|
|
279
|
+
89C4D6A52A494EB800EFB74A /* StoryBlockConfiguration.swift */,
|
|
299
280
|
);
|
|
300
281
|
path = Components;
|
|
301
282
|
sourceTree = "<group>";
|
|
@@ -357,7 +338,6 @@
|
|
|
357
338
|
isa = PBXSourcesBuildPhase;
|
|
358
339
|
buildActionMask = 2147483647;
|
|
359
340
|
files = (
|
|
360
|
-
8988734B2A0A8E7E0089CD1C /* FWSwizzleLoader.swift in Sources */,
|
|
361
341
|
898873572A0A8E7E0089CD1C /* FireworkSDKModule+EventTracking.swift in Sources */,
|
|
362
342
|
8988734F2A0A8E7E0089CD1C /* ShoppingModule.m in Sources */,
|
|
363
343
|
898873612A0A8E7E0089CD1C /* RCTConvert+Shopping.swift in Sources */,
|
|
@@ -368,7 +348,6 @@
|
|
|
368
348
|
8988736C2A0A8E7E0089CD1C /* VideoPlayerConfiguration.swift in Sources */,
|
|
369
349
|
8988734D2A0A8E7E0089CD1C /* FWNavigatorModule.swift in Sources */,
|
|
370
350
|
898873692A0A8E7E0089CD1C /* StoryBlockManager.m in Sources */,
|
|
371
|
-
898873482A0A8E7E0089CD1C /* UINavigationController+FWSwizzle.swift in Sources */,
|
|
372
351
|
897523A02817DEF80070EBB6 /* (null) in Sources */,
|
|
373
352
|
8988735E2A0A8E7E0089CD1C /* FontInfo.swift in Sources */,
|
|
374
353
|
8975238E2817DEF80070EBB6 /* (null) in Sources */,
|
|
@@ -391,8 +370,8 @@
|
|
|
391
370
|
898873542A0A8E7E0089CD1C /* ShoppingModule.swift in Sources */,
|
|
392
371
|
898873622A0A8E7E0089CD1C /* RCTConvert+VideoFeed.swift in Sources */,
|
|
393
372
|
89DF27DF28A53A77003F3CCB /* (null) in Sources */,
|
|
373
|
+
89C4D6A62A494EB800EFB74A /* StoryBlockConfiguration.swift in Sources */,
|
|
394
374
|
897523932817DEF80070EBB6 /* (null) in Sources */,
|
|
395
|
-
8988734A2A0A8E7E0089CD1C /* FWSwizzleLoader.m in Sources */,
|
|
396
375
|
897523922817DEF80070EBB6 /* (null) in Sources */,
|
|
397
376
|
897523872817DEF80070EBB6 /* (null) in Sources */,
|
|
398
377
|
897523902817DEF80070EBB6 /* (null) in Sources */,
|
|
@@ -409,7 +388,6 @@
|
|
|
409
388
|
898873672A0A8E7E0089CD1C /* AdConfiguration.swift in Sources */,
|
|
410
389
|
8988735F2A0A8E7E0089CD1C /* RCTConvert+StoryBlock.swift in Sources */,
|
|
411
390
|
8975239E2817DEF80070EBB6 /* (null) in Sources */,
|
|
412
|
-
898873502A0A8E7E0089CD1C /* FWCartViewController.swift in Sources */,
|
|
413
391
|
897523962817DEF80070EBB6 /* (null) in Sources */,
|
|
414
392
|
8988735B2A0A8E7E0089CD1C /* FireworkSDKModule.m in Sources */,
|
|
415
393
|
8988736A2A0A8E7E0089CD1C /* VideoFeedConfiguration.swift in Sources */,
|
|
@@ -32,14 +32,17 @@ public class AppLanguageManager {
|
|
|
32
32
|
return LanguageUtil.getLanguageCode(language)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
private var enableAutoHorizontalFlip: Bool = true
|
|
36
|
+
|
|
35
37
|
/// Get current app language.
|
|
36
38
|
public private(set) var appLanguage: String? {
|
|
37
39
|
didSet {
|
|
38
40
|
if appLanguage != nil {
|
|
39
41
|
AppLanguageManager.swizzelMethods()
|
|
40
|
-
LayoutFlipManager.shared.enableHorizontalFlip = shouldHorizontalFlip
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
LayoutFlipManager.shared.enableHorizontalFlip = shouldHorizontalFlip
|
|
45
|
+
|
|
43
46
|
if appLanguage != oldValue {
|
|
44
47
|
NotificationCenter.default.post(name: NotificationName.AppLanguageChanged, object: nil)
|
|
45
48
|
}
|
|
@@ -70,6 +73,10 @@ public class AppLanguageManager {
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
var shouldHorizontalFlip: Bool {
|
|
76
|
+
guard enableAutoHorizontalFlip else {
|
|
77
|
+
return false
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
guard let appLanguageCode = appLanguageCode else {
|
|
74
81
|
return false
|
|
75
82
|
}
|
|
@@ -125,9 +132,13 @@ public class AppLanguageManager {
|
|
|
125
132
|
///
|
|
126
133
|
/// - Parameters:
|
|
127
134
|
/// - language: app language. We will use system langauge when language is nil.
|
|
135
|
+
/// - enableAutoHorizontalFlip: Specifies if auto horizontal flip is enabled based
|
|
136
|
+
/// on app and system language. Defaults to true.
|
|
128
137
|
/// - Returns: The result of changing app language.
|
|
129
138
|
@discardableResult
|
|
130
|
-
public func changeAppLanguage(_ language: String
|
|
139
|
+
public func changeAppLanguage(_ language: String?, _ enableAutoHorizontalFlip: Bool = true) -> Bool {
|
|
140
|
+
self.enableAutoHorizontalFlip = enableAutoHorizontalFlip
|
|
141
|
+
|
|
131
142
|
guard let language = language, language.count > 0 else {
|
|
132
143
|
appLanguage = nil
|
|
133
144
|
UserDefaults.standard.removeObject(forKey: appLanguageStorageKey)
|
|
@@ -7,17 +7,6 @@
|
|
|
7
7
|
import UIKit
|
|
8
8
|
import FireworkVideo
|
|
9
9
|
|
|
10
|
-
private let FWImageNamesWithDirections: [String] = [
|
|
11
|
-
"shopping-cart",
|
|
12
|
-
"left-arrow",
|
|
13
|
-
"right-arrow",
|
|
14
|
-
"speaker-unmute",
|
|
15
|
-
"speaker-mute",
|
|
16
|
-
"mute",
|
|
17
|
-
"mute-off",
|
|
18
|
-
"mute-on"
|
|
19
|
-
]
|
|
20
|
-
|
|
21
10
|
extension UIImageView {
|
|
22
11
|
static func swizzleImageViewMethodsForAppLanguage() {
|
|
23
12
|
Swizzle.swizzleSelector(
|
|
@@ -60,29 +49,6 @@ extension UIImageView {
|
|
|
60
49
|
return false
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
if AppLanguageManager.shared.shouldHorizontalFlip, self.isIOSSDKView {
|
|
64
|
-
let iOSSDKBundle = Bundle(for: FireworkVideoSDK.self)
|
|
65
|
-
|
|
66
|
-
for imageName in FWImageNamesWithDirections {
|
|
67
|
-
let targetImage = UIImage(named: imageName, in: iOSSDKBundle, compatibleWith: nil)
|
|
68
|
-
if image.isEqual(targetImage) {
|
|
69
|
-
return true
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if let cgImage = image.cgImage,
|
|
73
|
-
let targetCgImage = targetImage?.cgImage,
|
|
74
|
-
cgImage == targetCgImage {
|
|
75
|
-
return true
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if let ciImage = image.ciImage,
|
|
79
|
-
let targetCiImage = targetImage?.ciImage,
|
|
80
|
-
ciImage == targetCiImage {
|
|
81
|
-
return true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
52
|
if AppLanguageManager.shared.shouldHorizontalFlip,
|
|
87
53
|
image.flipsForRightToLeftLayoutDirection == true,
|
|
88
54
|
self.isIOSSDKView {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
PODS:
|
|
2
|
-
- FireworkVideo (1.
|
|
2
|
+
- FireworkVideo (1.11.0)
|
|
3
3
|
|
|
4
4
|
DEPENDENCIES:
|
|
5
|
-
- FireworkVideo (= 1.
|
|
5
|
+
- FireworkVideo (= 1.11.0)
|
|
6
6
|
|
|
7
7
|
SPEC REPOS:
|
|
8
8
|
trunk:
|
|
9
9
|
- FireworkVideo
|
|
10
10
|
|
|
11
11
|
SPEC CHECKSUMS:
|
|
12
|
-
FireworkVideo:
|
|
12
|
+
FireworkVideo: d37d9b94d8bc8069c42a3f06b4b9da97ea3b7e60
|
|
13
13
|
|
|
14
|
-
PODFILE CHECKSUM:
|
|
14
|
+
PODFILE CHECKSUM: 19727e7fd482efd91e8a58ce9db72b1ded933875
|
|
15
15
|
|
|
16
16
|
COCOAPODS: 1.12.1
|
|
@@ -13,6 +13,7 @@ extension RCTConvert {
|
|
|
13
13
|
static func videoPlayerContentConfiguration(_ config: [String: AnyObject])
|
|
14
14
|
-> VideoPlayerContentConfiguration? {
|
|
15
15
|
let videoPlayerConfig = RCTConvert.videoPlayerConfiguration(config)
|
|
16
|
+
|
|
16
17
|
let finalConfig = VideoFeed.convertToVideoPlayerContentConfiguration(videoPlayerConfig)
|
|
17
18
|
|
|
18
19
|
return finalConfig
|
|
@@ -14,7 +14,8 @@ extension StoryBlockSourceType {
|
|
|
14
14
|
"channel": .channel,
|
|
15
15
|
"playlist": .playlist,
|
|
16
16
|
"dynamicContent": .dynamicContent,
|
|
17
|
-
"hashtagPlaylist": .hashtagPlaylist
|
|
17
|
+
"hashtagPlaylist": .hashtagPlaylist,
|
|
18
|
+
"sku": .sku
|
|
18
19
|
]
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -28,4 +29,18 @@ extension RCTConvert {
|
|
|
28
29
|
|
|
29
30
|
return StoryBlockSourceType.sourceTypeMapper[rType] ?? .discover
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
public static func storyBlockConfiguration(_ config: [String: AnyObject]?)
|
|
34
|
+
-> StoryBlockConfiguration? {
|
|
35
|
+
guard let rConfig = config else {
|
|
36
|
+
return nil
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let jsonData = try? JSONSerialization.data(withJSONObject: rConfig, options: .prettyPrinted)
|
|
40
|
+
guard let rJsonData = jsonData else {
|
|
41
|
+
return nil
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return try? JSONDecoder().decode(StoryBlockConfiguration.self, from: rJsonData)
|
|
45
|
+
}
|
|
31
46
|
}
|
|
@@ -87,8 +87,8 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
87
87
|
guard let urlString = URL.init(string: url) else {
|
|
88
88
|
return
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
let vpcConfig =
|
|
90
|
+
let videoPlayerConfig = RCTConvert.videoPlayerConfiguration(config)
|
|
91
|
+
let vpcConfig = VideoFeed.convertToVideoPlayerContentConfiguration(videoPlayerConfig)
|
|
92
92
|
|
|
93
93
|
var feedContentConfig = VideoFeedContentConfiguration()
|
|
94
94
|
if let vpcConfig = vpcConfig {
|
|
@@ -103,9 +103,13 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
|
|
|
103
103
|
return
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
VideoFeedViewController.openVideoPlayer(
|
|
106
|
+
VideoFeedViewController.openVideoPlayer(
|
|
107
|
+
with: urlString,
|
|
108
|
+
feedContentConfig,
|
|
109
|
+
presentedVC,
|
|
110
|
+
videoPlayerConfig?.enablePictureInPicture ?? true) { _ in
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
@objc(setCustomCTAClickEnabled:)
|
|
@@ -11,7 +11,7 @@ import FireworkVideo
|
|
|
11
11
|
import Foundation
|
|
12
12
|
|
|
13
13
|
@objc(ShoppingModule)
|
|
14
|
-
class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate
|
|
14
|
+
class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate {
|
|
15
15
|
|
|
16
16
|
private var productInfoViewConfigurator: (Int, ProductInfoViewConfigurable)?
|
|
17
17
|
private var shoppingCTAHandlerMap: [Int: ShoppingCTAHandler] = [:]
|
|
@@ -47,7 +47,7 @@ class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate, CartViewCo
|
|
|
47
47
|
func initializeSDK(_ resolver: RCTPromiseResolveBlock,
|
|
48
48
|
rejecter: RCTPromiseRejectBlock) {
|
|
49
49
|
FireworkVideoSDK.shopping.shoppingDelegate = self
|
|
50
|
-
FireworkVideoSDK.shopping.
|
|
50
|
+
FireworkVideoSDK.shopping.cartAction = .custom
|
|
51
51
|
resolver([:])
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -291,11 +291,12 @@ class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate, CartViewCo
|
|
|
291
291
|
return customClickLinkButtonEnabled
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
func fireworkShopping(
|
|
295
|
+
_ fireworkShopping: FireworkVideoShopping,
|
|
296
|
+
didTapCartIconForVideo videoDetails: VideoDetails
|
|
297
|
+
) {
|
|
296
298
|
sendEvent(
|
|
297
299
|
withName: ShoppingEventName.clickCartIcon.rawValue, body: [:])
|
|
298
|
-
return FWCartViewController()
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-firework-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-beta.1",
|
|
4
4
|
"description": "Firework React Native SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "jest",
|
|
32
32
|
"typescript": "tsc --noEmit",
|
|
33
33
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
34
|
-
"
|
|
34
|
+
"build": "bob build",
|
|
35
35
|
"generate-doc": "rm -rf docs && npx typedoc",
|
|
36
36
|
"prettier": "npx prettier --write \"{src,example}/**/*.{ts,tsx}\""
|
|
37
37
|
},
|
package/src/FireworkSDK.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type {
|
|
|
13
13
|
import type SDKInitOptions from './models/SDKInitOptions';
|
|
14
14
|
import type { VideoLaunchBehavior } from './models/SDKInitOptions';
|
|
15
15
|
import type TrackPurchaseParameters from './models/TrackPurchaseParameters';
|
|
16
|
-
import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
|
|
17
16
|
import FireworkSDKModule, {
|
|
18
17
|
FireworkSDKModuleEventEmitter,
|
|
19
18
|
} from './modules/FireworkSDKModule';
|
|
@@ -22,6 +21,7 @@ import ShoppingModule from './modules/ShoppingModule';
|
|
|
22
21
|
import FWLoggerUtil from './utils/FWLoggerUtil';
|
|
23
22
|
import VideoShopping from './VideoShopping';
|
|
24
23
|
import FWGlobalState from './utils/FWGlobalState';
|
|
24
|
+
import type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';
|
|
25
25
|
|
|
26
26
|
export type SDKInitCallback = (event: SDKInitEvent) => Promise<void> | void;
|
|
27
27
|
export type CustomCTAClickCallback = (
|
|
@@ -256,7 +256,7 @@ class FireworkSDK {
|
|
|
256
256
|
*/
|
|
257
257
|
public async openVideoPlayer(
|
|
258
258
|
url: string,
|
|
259
|
-
config?:
|
|
259
|
+
config?: OpenVideoPlayerConfiguration
|
|
260
260
|
): Promise<void> {
|
|
261
261
|
if (!FWGlobalState.getInstance().sdkInitCalled) {
|
|
262
262
|
await FWGlobalState.getInstance().sdkInitCalledPromise;
|
|
@@ -23,6 +23,7 @@ import type AdConfiguration from '../models/AdConfiguration';
|
|
|
23
23
|
import type FWError from '../models/FWError';
|
|
24
24
|
import { FWEventName } from '../models/FWEventName';
|
|
25
25
|
import type { StoryBlockConfiguration } from '../models/StoryBlockConfiguration';
|
|
26
|
+
import type StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';
|
|
26
27
|
import type { StoryBlockSource } from '../models/StoryBlockSource';
|
|
27
28
|
import { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';
|
|
28
29
|
import FWGlobalState from '../utils/FWGlobalState';
|
|
@@ -73,10 +74,18 @@ export interface IStoryBlockProps {
|
|
|
73
74
|
* Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.
|
|
74
75
|
*/
|
|
75
76
|
hashtagFilterExpression?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Product ids used to generate the sku feed
|
|
79
|
+
*/
|
|
80
|
+
productIds?: string[];
|
|
76
81
|
/**
|
|
77
82
|
* Specifies if Picture in Picture is enabled. Only supported on iOS.
|
|
78
83
|
*/
|
|
79
84
|
enablePictureInPicture?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The corner radius of story block.
|
|
87
|
+
*/
|
|
88
|
+
cornerRadius?: number;
|
|
80
89
|
/**
|
|
81
90
|
* Ad configuration of the feed. Only supported on iOS.
|
|
82
91
|
*/
|
|
@@ -157,7 +166,7 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
157
166
|
|
|
158
167
|
const generateVastAttributesString = () => {
|
|
159
168
|
const { adConfiguration } = props;
|
|
160
|
-
const vastAttributes = adConfiguration?.vastAttributes
|
|
169
|
+
const vastAttributes = adConfiguration?.vastAttributes;
|
|
161
170
|
if (!vastAttributes) {
|
|
162
171
|
return '';
|
|
163
172
|
}
|
|
@@ -173,53 +182,67 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
173
182
|
return resultString;
|
|
174
183
|
};
|
|
175
184
|
|
|
185
|
+
const getStoryBlockConfiguration: () =>
|
|
186
|
+
| StoryBlockNativeConfiguration
|
|
187
|
+
| undefined = () => {
|
|
188
|
+
const { storyBlockConfiguration, enablePictureInPicture } = props;
|
|
189
|
+
let resultStoryBlockConfiguration:
|
|
190
|
+
| StoryBlockNativeConfiguration
|
|
191
|
+
| undefined = storyBlockConfiguration;
|
|
192
|
+
if (typeof enablePictureInPicture === 'boolean') {
|
|
193
|
+
if (!resultStoryBlockConfiguration) {
|
|
194
|
+
resultStoryBlockConfiguration = {};
|
|
195
|
+
}
|
|
196
|
+
resultStoryBlockConfiguration = {
|
|
197
|
+
...resultStoryBlockConfiguration,
|
|
198
|
+
enablePictureInPicture,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
return resultStoryBlockConfiguration;
|
|
202
|
+
};
|
|
203
|
+
const storyBlockConfiguration = getStoryBlockConfiguration();
|
|
204
|
+
|
|
176
205
|
const generateKey = (): string => {
|
|
177
|
-
const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL
|
|
178
|
-
const appLanguage = FireworkSDK.getInstance().appLanguage
|
|
179
|
-
const videoLaunchBehavior =
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';
|
|
185
|
-
const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';
|
|
206
|
+
const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;
|
|
207
|
+
const appLanguage = FireworkSDK.getInstance().appLanguage;
|
|
208
|
+
const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;
|
|
209
|
+
const adBadgeConfiguration = FireworkSDK.getInstance().adBadgeConfiguration;
|
|
210
|
+
const adBadgeTextType = adBadgeConfiguration?.badgeTextType;
|
|
211
|
+
const backgroundColorOfAdBadge = adBadgeConfiguration?.backgroundColor;
|
|
212
|
+
const textColorOfAdBadge = adBadgeConfiguration?.textColor;
|
|
186
213
|
const androidFontIsCustomOfAdBadge =
|
|
187
|
-
adBadgeConfiguration
|
|
214
|
+
adBadgeConfiguration?.androidFontInfo?.isCustom;
|
|
188
215
|
const androidFontTypefaceNameOfAdBadge =
|
|
189
|
-
adBadgeConfiguration
|
|
216
|
+
adBadgeConfiguration?.androidFontInfo?.typefaceName;
|
|
190
217
|
|
|
191
218
|
const {
|
|
192
219
|
source,
|
|
193
|
-
channel
|
|
194
|
-
playlist
|
|
195
|
-
hashtagFilterExpression
|
|
196
|
-
|
|
220
|
+
channel,
|
|
221
|
+
playlist,
|
|
222
|
+
hashtagFilterExpression,
|
|
223
|
+
productIds,
|
|
224
|
+
enablePictureInPicture,
|
|
225
|
+
cornerRadius,
|
|
197
226
|
adConfiguration,
|
|
198
|
-
storyBlockConfiguration,
|
|
199
227
|
} = props;
|
|
200
228
|
const dynamicContentParametersString =
|
|
201
229
|
generateDynamicContentParametersString();
|
|
202
230
|
|
|
203
|
-
const videoCompleteAction =
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
const showBranding =
|
|
210
|
-
storyBlockConfiguration?.showBranding?.toString() ?? '';
|
|
211
|
-
const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type ?? '';
|
|
212
|
-
const ctaDelayValue =
|
|
213
|
-
storyBlockConfiguration?.ctaDelay?.value?.toFixed(5) ?? '';
|
|
231
|
+
const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;
|
|
232
|
+
const showShareButton = storyBlockConfiguration?.showShareButton;
|
|
233
|
+
const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;
|
|
234
|
+
const showBranding = storyBlockConfiguration?.showBranding;
|
|
235
|
+
const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;
|
|
236
|
+
const ctaDelayValue = storyBlockConfiguration?.ctaDelay?.value?.toFixed(5);
|
|
214
237
|
const ctaHighlightDelayType =
|
|
215
|
-
storyBlockConfiguration?.ctaHighlightDelay?.type
|
|
238
|
+
storyBlockConfiguration?.ctaHighlightDelay?.type;
|
|
216
239
|
const ctaHighlightDelayValue =
|
|
217
|
-
storyBlockConfiguration?.ctaHighlightDelay?.value?.toFixed(5)
|
|
218
|
-
const shareBaseURL = storyBlockConfiguration?.shareBaseURL
|
|
219
|
-
const ctaWidth = storyBlockConfiguration?.ctaWidth
|
|
240
|
+
storyBlockConfiguration?.ctaHighlightDelay?.value?.toFixed(5);
|
|
241
|
+
const shareBaseURL = storyBlockConfiguration?.shareBaseURL;
|
|
242
|
+
const ctaWidth = storyBlockConfiguration?.ctaWidth;
|
|
220
243
|
|
|
221
|
-
const requiresAds = adConfiguration?.requiresAds
|
|
222
|
-
const adsFetchTimeout = adConfiguration?.adsFetchTimeout
|
|
244
|
+
const requiresAds = adConfiguration?.requiresAds;
|
|
245
|
+
const adsFetchTimeout = adConfiguration?.adsFetchTimeout;
|
|
223
246
|
const vastAttributesString = generateVastAttributesString();
|
|
224
247
|
|
|
225
248
|
let key = `gShareBaseURL:${gShareBaseURL}`;
|
|
@@ -240,7 +263,9 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
240
263
|
key += `_playlist:${playlist}`;
|
|
241
264
|
key += `_dynamicContentParameters:${dynamicContentParametersString}`;
|
|
242
265
|
key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
|
|
266
|
+
key += `productIds:${productIds?.join(',')}`;
|
|
243
267
|
key += `_enablePictureInPicture:${enablePictureInPicture}`;
|
|
268
|
+
key += `_cornerRadius:${cornerRadius}`;
|
|
244
269
|
|
|
245
270
|
key += `_shareBaseURL:${shareBaseURL}`;
|
|
246
271
|
if (Platform.OS === 'android') {
|
|
@@ -386,12 +411,16 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
386
411
|
if (!sdkInitCalled) {
|
|
387
412
|
return null;
|
|
388
413
|
}
|
|
389
|
-
|
|
414
|
+
const { style, cornerRadius, ...otherProps } = props;
|
|
390
415
|
return (
|
|
391
416
|
<FWStoryBlock
|
|
392
417
|
ref={nativeComponentRef}
|
|
393
418
|
key={key}
|
|
394
|
-
{...
|
|
419
|
+
{...otherProps}
|
|
420
|
+
cornerRadius={cornerRadius}
|
|
421
|
+
style={Object.assign({ borderRadius: cornerRadius }, style)}
|
|
422
|
+
storyBlockConfiguration={storyBlockConfiguration}
|
|
423
|
+
enablePictureInPicture={undefined}
|
|
395
424
|
onStoryBlockLoadFinished={handleStoryBlockLoadFinished}
|
|
396
425
|
onStoryBlockFullScreenStateChanged={
|
|
397
426
|
handleStoryBlockFullScreenStateChanged
|