react-native-firework-sdk 2.2.5 → 2.3.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 (222) hide show
  1. package/FireworkVideoUI.xcframework/Info.plist +5 -5
  2. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  3. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
  4. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +2 -9
  5. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  6. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
  7. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +2 -9
  8. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +2 -9
  9. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +9 -9
  10. package/android/build.gradle +9 -39
  11. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  12. package/android/gradle.properties +7 -5
  13. package/android/proguard-rules.pro +5 -26
  14. package/android/src/main/AndroidManifest.xml +0 -3
  15. package/android/src/main/java/com/fireworksdk/bridge/FireworkSDKPackage.kt +1 -1
  16. package/android/src/main/java/com/fireworksdk/bridge/components/base/FWBaseFragment.kt +10 -0
  17. package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +157 -0
  18. package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFrameLayout.kt +19 -0
  19. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +15 -5
  20. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModel.kt +6 -7
  21. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt +5 -1
  22. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelSerializer.kt +22 -0
  23. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModel.kt +3 -5
  24. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelDeserializer.kt +2 -1
  25. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelSerializer.kt +18 -0
  26. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModel.kt +8 -0
  27. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelDeserializer.kt +35 -0
  28. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelSerializer.kt +27 -0
  29. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamEventDetailsModel.kt +1 -5
  30. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamMessageDetailsModel.kt +1 -5
  31. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfiguration.kt +5 -15
  32. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationDeserializer.kt +2 -9
  33. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationSerializer.kt +42 -0
  34. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModel.kt +3 -5
  35. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelDeserializer.kt +2 -1
  36. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelSerializer.kt +20 -0
  37. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResult.kt +3 -12
  38. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultDeserializer.kt +2 -13
  39. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultSerializer.kt +18 -0
  40. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +8 -9
  41. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelDeserializer.kt +17 -6
  42. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelSerializer.kt +59 -0
  43. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedItemDetailsModel.kt +1 -5
  44. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +14 -15
  45. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +14 -4
  46. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +56 -0
  47. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlaybackDetails.kt +11 -8
  48. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +11 -12
  49. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +11 -7
  50. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +63 -0
  51. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProduct.kt +4 -11
  52. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt +82 -0
  53. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWBadgeTextType.kt +18 -0
  54. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaButtonTextValue.kt +18 -0
  55. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaDelayType.kt +18 -0
  56. package/android/src/main/java/com/fireworksdk/bridge/models/{FWEventName.kt → enums/FWEventName.kt} +1 -1
  57. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWGradientDrawableOrientation.kt +24 -0
  58. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerLaunchBehavior.kt +18 -0
  59. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerStyle.kt +18 -0
  60. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWShoppingCtaResultRes.kt +19 -0
  61. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWSystemTypeface.kt +21 -0
  62. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoCompleteAction.kt +18 -0
  63. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedMode.kt +19 -0
  64. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +22 -0
  65. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedTitlePosition.kt +19 -0
  66. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoPlayerCTAWidth.kt +19 -0
  67. package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +22 -0
  68. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +61 -32
  69. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +3 -2
  70. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +0 -1
  71. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWVideoShoppingInterface.kt +0 -1
  72. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +0 -2
  73. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +2 -2
  74. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +0 -6
  75. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +25 -32
  76. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +24 -47
  77. package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +17 -44
  78. package/android/src/main/java/com/fireworksdk/bridge/utils/FWBundleUtils.kt +46 -21
  79. package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +165 -86
  80. package/android/src/main/java/com/fireworksdk/bridge/utils/FWFragmentUtil.kt +51 -0
  81. package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +1 -5
  82. package/android/src/main/java/com/fireworksdk/bridge/utils/FWLanguageUtil.kt +77 -80
  83. package/android/src/main/java/com/fireworksdk/bridge/utils/FWLiveStreamUtil.kt +17 -0
  84. package/android/src/main/java/com/fireworksdk/bridge/utils/FWSingletonHolder.kt +25 -0
  85. package/android/src/main/java/com/fireworksdk/bridge/utils/FWStatusBarUtil.kt +28 -0
  86. package/android/src/main/res/layout/fw_bridge_story_block.xml +5 -12
  87. package/ios/Components/VideoFeed.swift +39 -19
  88. package/ios/Components/VideoFeedConfiguration.swift +4 -5
  89. package/ios/Components/VideoFeedManager.swift +1 -1
  90. package/ios/Components/VideoPlayerConfiguration.swift +17 -0
  91. package/ios/FireworkSdk.xcodeproj/project.pbxproj +197 -205
  92. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/Bundle+AppLanguage.swift +23 -8
  93. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +1 -18
  94. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +4 -1
  95. package/ios/Models/NativeToRN/FireworkEventName.swift +0 -1
  96. package/ios/Models/NativeToRN/FireworkSDK+Json.swift +1 -1
  97. package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +6 -157
  98. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +1 -21
  99. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -2
  100. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +1 -12
  101. package/ios/Modules/LiveStream/LiveStreamModule.m +1 -1
  102. package/ios/Modules/LiveStream/LiveStreamModule.swift +4 -2
  103. package/ios/Modules/Shopping/FWCartViewController.swift +0 -75
  104. package/ios/Modules/Shopping/ShoppingModule.m +1 -3
  105. package/ios/Modules/Shopping/ShoppingModule.swift +12 -47
  106. package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +1 -1
  107. package/lib/commonjs/FireworkSDK.js +31 -15
  108. package/lib/commonjs/FireworkSDK.js.map +1 -1
  109. package/lib/commonjs/LiveStream.js.map +1 -1
  110. package/lib/commonjs/VideoShopping.js +43 -30
  111. package/lib/commonjs/VideoShopping.js.map +1 -1
  112. package/lib/commonjs/components/StoryBlock.js +55 -15
  113. package/lib/commonjs/components/StoryBlock.js.map +1 -1
  114. package/lib/commonjs/components/VideoFeed.js +112 -24
  115. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  116. package/lib/commonjs/index.js.map +1 -1
  117. package/lib/commonjs/models/GradientDrawable.js +2 -0
  118. package/lib/commonjs/models/GradientDrawable.js.map +1 -0
  119. package/lib/commonjs/models/StoryBlockConfiguration.js +6 -0
  120. package/lib/commonjs/models/StoryBlockConfiguration.js.map +1 -0
  121. package/lib/commonjs/models/VideoPlayerCTADelay.js +2 -0
  122. package/lib/commonjs/models/VideoPlayerCTADelay.js.map +1 -0
  123. package/lib/commonjs/models/VideoPlayerCTAStyle.js +6 -0
  124. package/lib/commonjs/models/VideoPlayerCTAStyle.js.map +1 -0
  125. package/lib/commonjs/models/VideoPlayerCTAWidth.js +2 -0
  126. package/lib/commonjs/models/VideoPlayerCTAWidth.js.map +1 -0
  127. package/lib/commonjs/models/VideoPlayerCompleteAction.js +2 -0
  128. package/lib/commonjs/models/VideoPlayerCompleteAction.js.map +1 -0
  129. package/lib/commonjs/models/VideoPlayerStyle.js +2 -0
  130. package/lib/commonjs/models/VideoPlayerStyle.js.map +1 -0
  131. package/lib/commonjs/modules/LiveStreamModule.js.map +1 -1
  132. package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
  133. package/lib/commonjs/utils/FWGlobalState.js +47 -0
  134. package/lib/commonjs/utils/FWGlobalState.js.map +1 -0
  135. package/lib/module/FireworkSDK.js +30 -14
  136. package/lib/module/FireworkSDK.js.map +1 -1
  137. package/lib/module/LiveStream.js.map +1 -1
  138. package/lib/module/VideoShopping.js +43 -29
  139. package/lib/module/VideoShopping.js.map +1 -1
  140. package/lib/module/components/StoryBlock.js +54 -15
  141. package/lib/module/components/StoryBlock.js.map +1 -1
  142. package/lib/module/components/VideoFeed.js +113 -24
  143. package/lib/module/components/VideoFeed.js.map +1 -1
  144. package/lib/module/index.js.map +1 -1
  145. package/lib/module/models/GradientDrawable.js +2 -0
  146. package/lib/module/models/GradientDrawable.js.map +1 -0
  147. package/lib/module/models/StoryBlockConfiguration.js +2 -0
  148. package/lib/module/models/StoryBlockConfiguration.js.map +1 -0
  149. package/lib/module/models/VideoPlayerCTADelay.js +2 -0
  150. package/lib/module/models/VideoPlayerCTADelay.js.map +1 -0
  151. package/lib/module/models/VideoPlayerCTAStyle.js +2 -0
  152. package/lib/module/models/VideoPlayerCTAStyle.js.map +1 -0
  153. package/lib/module/models/VideoPlayerCTAWidth.js +2 -0
  154. package/lib/module/models/VideoPlayerCTAWidth.js.map +1 -0
  155. package/lib/module/models/VideoPlayerCompleteAction.js +2 -0
  156. package/lib/module/models/VideoPlayerCompleteAction.js.map +1 -0
  157. package/lib/module/models/VideoPlayerStyle.js +2 -0
  158. package/lib/module/models/VideoPlayerStyle.js.map +1 -0
  159. package/lib/module/modules/LiveStreamModule.js.map +1 -1
  160. package/lib/module/modules/ShoppingModule.js.map +1 -1
  161. package/lib/module/utils/FWGlobalState.js +39 -0
  162. package/lib/module/utils/FWGlobalState.js.map +1 -0
  163. package/lib/typescript/FireworkSDK.d.ts +7 -7
  164. package/lib/typescript/LiveStream.d.ts +2 -2
  165. package/lib/typescript/VideoShopping.d.ts +17 -18
  166. package/lib/typescript/components/StoryBlock.d.ts +2 -0
  167. package/lib/typescript/components/VideoFeed.d.ts +7 -3
  168. package/lib/typescript/index.d.ts +10 -3
  169. package/lib/typescript/models/AdBadgeConfiguration.d.ts +9 -2
  170. package/lib/typescript/models/FWEvents.d.ts +9 -9
  171. package/lib/typescript/models/GradientDrawable.d.ts +5 -0
  172. package/lib/typescript/models/IOSFontInfo.d.ts +2 -0
  173. package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +1 -1
  174. package/lib/typescript/models/StoryBlockConfiguration.d.ts +37 -0
  175. package/lib/typescript/models/VideoFeedConfiguration.d.ts +25 -4
  176. package/lib/typescript/models/VideoPlaybackDetails.d.ts +1 -0
  177. package/lib/typescript/models/VideoPlayerCTADelay.d.ts +11 -0
  178. package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +21 -0
  179. package/lib/typescript/models/VideoPlayerCTAWidth.d.ts +1 -0
  180. package/lib/typescript/models/VideoPlayerCompleteAction.d.ts +1 -0
  181. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +9 -34
  182. package/lib/typescript/models/VideoPlayerStyle.d.ts +1 -0
  183. package/lib/typescript/modules/LiveStreamModule.d.ts +1 -1
  184. package/lib/typescript/modules/ShoppingModule.d.ts +2 -3
  185. package/lib/typescript/utils/FWGlobalState.d.ts +10 -0
  186. package/package.json +5 -3
  187. package/react-native-firework-sdk.podspec +2 -1
  188. package/src/FireworkSDK.ts +47 -19
  189. package/src/LiveStream.ts +4 -2
  190. package/src/VideoShopping.ts +47 -39
  191. package/src/components/StoryBlock.tsx +66 -9
  192. package/src/components/VideoFeed.tsx +147 -23
  193. package/src/index.ts +14 -6
  194. package/src/models/AdBadgeConfiguration.ts +10 -2
  195. package/src/models/FWEvents.ts +11 -11
  196. package/src/models/GradientDrawable.ts +14 -0
  197. package/src/models/IOSFontInfo.ts +2 -0
  198. package/src/models/ProductInfoViewConfiguration.ts +1 -1
  199. package/src/models/StoryBlockConfiguration.ts +38 -0
  200. package/src/models/VideoFeedConfiguration.ts +25 -4
  201. package/src/models/VideoPlaybackDetails.ts +1 -0
  202. package/src/models/VideoPlayerCTADelay.ts +11 -0
  203. package/src/models/VideoPlayerCTAStyle.ts +22 -0
  204. package/src/models/VideoPlayerCTAWidth.ts +1 -0
  205. package/src/models/VideoPlayerCompleteAction.ts +1 -0
  206. package/src/models/VideoPlayerConfiguration.ts +9 -36
  207. package/src/models/VideoPlayerStyle.ts +1 -0
  208. package/src/modules/LiveStreamModule.ts +1 -1
  209. package/src/modules/ShoppingModule.ts +2 -3
  210. package/src/utils/FWGlobalState.ts +31 -0
  211. package/android/publish.gradle +0 -66
  212. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFragment.kt +0 -129
  213. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFrameLayout.kt +0 -90
  214. package/android/src/main/java/com/fireworksdk/bridge/constants/FWVideoPlayerConstant.kt +0 -39
  215. package/android/src/main/java/com/fireworksdk/bridge/models/FWSystemTypeface.kt +0 -9
  216. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedModel.kt +0 -7
  217. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedSource.kt +0 -10
  218. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedTitlePosition.kt +0 -7
  219. package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWContainerActivity.kt +0 -53
  220. package/android/src/main/res/layout/fw_bridge_fragment_container.xml +0 -8
  221. package/ios/Modules/FWNavigatorModule/FWNavigatorContainerViewController.swift +0 -33
  222. package/ios/Modules/FWNavigatorModule/FWNavigatorProtocol.swift +0 -18
@@ -1 +1 @@
1
- {"version":3,"sources":["StoryBlock.tsx"],"names":["React","forwardRef","useEffect","useImperativeHandle","useReducer","useRef","useState","BackHandler","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWLoggerUtil","FWStoryBlock","NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","forceUpdate","x","handleStoryBlockLoadFinished","event","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullscreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","generateKey","gShareBaseURL","getInstance","shareBaseURL","appLanguage","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","videoLaunchBehavior","source","channel","playlist","hashtagFilterExpression","enablePictureInPicture","dynamicContentParametersString","requiresAds","adsFetchTimeout","vastAttributesString","OS","sendCommand","command","nativeNodeHandle","current","commandId","getViewManagerConfig","Commands","toString","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","onBackPress","navigator","popNativeContainer","subscription","addEventListener","style","assign","zIndex"],"mappings":";;AACA,OAAOA,KAAP,IACEC,UADF,EAEEC,SAFF,EAGEC,mBAHF,EAIEC,UAJF,EAKEC,MALF,EAMEC,QANF,QAOO,OAPP;AASA,SACEC,WADF,EAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAGA,SAASC,WAAT,QAA4B,uBAA5B;AAEA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AAEA,MAAMC,mBAAmB,GAAG,cAA5B;;AA0DA,MAAMC,UAGL,GAAG,CAACC,KAAD,EAA0BC,YAA1B,KAA2C;AAC7C,QAAMC,kBAAkB,GAAGf,MAAM,CAAC,IAAD,CAAjC;AACA,QAAM,CA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EWiB,MAFX,CAEkBhB,QAFlB,EAFF,EAKE,CAACe,MAAD,CALF;AAOD,OAVS,EAUP,GAVO,CAAV;AAWD;AACF,GAdQ,EAcN,CAACtD,GAAD,CAdM,CAAT;AAgBAvC,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIO,QAAQ,CAAC+D,EAAT,KAAgB,SAApB,EAA+B;AAC7B,YAAMyB,WAAW,GAAG,MAAM;AACxB,YAAI5E,iBAAJ,EAAuB;AACrBV,UAAAA,WAAW,CAACyC,WAAZ,GAA0B8C,SAA1B,CAAoCC,kBAApC;AACA,iBAAO,IAAP;AACD;;AACD,eAAO,KAAP;AACD,OAND;;AAOA,YAAMC,YAAY,GAAG7F,WAAW,CAAC8F,gBAAZ,CACnB,mBADmB,EAEnBJ,WAFmB,CAArB;AAIA,aAAO,MAAM;AACXG,QAAAA,YAAY,CAACP,MAAb;AACD,OAFD;AAGD;;AAED;AACD,GAnBQ,EAmBN,CAACxE,iBAAD,CAnBM,CAAT;AAqBA,QAAM;AAAEiF,IAAAA;AAAF,MAAYpF,KAAlB;AACA,sBACE,oBAAC,YAAD;AACE,IAAA,GAAG,EAAEE,kBADP;AAEE,IAAA,GAAG,EAAEqB;AAFP,KAGMvB,KAHN;AAIE,IAAA,wBAAwB,EAAEO,4BAJ5B;AAKE,IAAA,kCAAkC,EAChCO,sCANJ;AAQE,IAAA,KAAK,EAAEM,MAAM,CAACiE,MAAP,CAAc,EAAd,EAAkBD,KAAlB,EAAyB;AAAEE,MAAAA,MAAM,EAAE,CAAC;AAAX,KAAzB;AART,KADF;AAYD,CAhQD;;AAkQA,4BAAevG,UAAU,CAACgB,UAAD,CAAzB","sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useReducer,\n useRef,\n useState,\n} from 'react';\n\nimport {\n BackHandler,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type { StoryBlockSource } from '../models/StoryBlockSource';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWStoryBlock from './FWStoryBlock';\n\nconst NativeComponentName = 'FWStoryBlock';\n\nexport interface IStoryBlockMethods {\n /**\n * Play the story block.\n */\n play: () => void;\n /**\n * Pause the story block.\n */\n pause: () => void;\n}\n\n/**\n * The props type of StoryBlock component.\n */\nexport interface IStoryBlockProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of four available story block sources.\n */\n source: StoryBlockSource;\n /**\n * Channel id of the story block. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the story block. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * The dynamic content parameters of the story block. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n */\n hashtagFilterExpression?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onStoryBlockLoadFinished?: (error?: FWError) => void;\n}\n\nconst StoryBlock: ForwardRefRenderFunction<\n IStoryBlockMethods,\n IStoryBlockProps\n> = (props: IStoryBlockProps, forwardedRef) => {\n const nativeComponentRef = useRef(null);\n const [isFullscreenState, setIsFullscreenState] = useState<boolean>(false);\n const [, forceUpdate] = useReducer((x) => x + 1, 0);\n\n const handleStoryBlockLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockLoadFinished ${event.nativeEvent.name}`\n );\n\n const { onStoryBlockLoadFinished } = props;\n const { name, reason } = event.nativeEvent;\n\n if (onStoryBlockLoadFinished) {\n if (name) {\n if (reason) {\n onStoryBlockLoadFinished({ name, reason });\n } else {\n onStoryBlockLoadFinished({ name });\n }\n } else {\n onStoryBlockLoadFinished();\n }\n }\n };\n\n const handleStoryBlockFullscreenStateChanged = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockFullscreenStateChanged ${event.nativeEvent.isFullScreen}`\n );\n const { isFullScreen } = event.nativeEvent;\n setIsFullscreenState(isFullScreen);\n };\n\n const generateDynamicContentParametersString = (): string => {\n const { dynamicContentParameters } = props;\n\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n };\n\n const generateVastAttributesString = () => {\n const { adConfiguration } = props;\n const vastAttributes = adConfiguration?.vastAttributes ?? '';\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name ?? ''}:${attribute.value}`;\n }\n\n return resultString;\n };\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';\n const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';\n const adBadgeConfiguration =\n FireworkSDK.getInstance().adBadgeConfiguration ?? {};\n const adBadgeTextType = adBadgeConfiguration.badgeTextType ?? '';\n const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';\n const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';\n const videoLaunchBehavior =\n FireworkSDK.getInstance().videoLaunchBehavior ?? 'default';\n\n const {\n source,\n channel = '',\n playlist = '',\n hashtagFilterExpression = '',\n enablePictureInPicture = false,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const requiresAds = adConfiguration?.requiresAds ?? false;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\n const vastAttributesString = generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return key;\n };\n\n const key = generateKey();\n\n useImperativeHandle(\n forwardedRef,\n () => {\n const sendCommand = (command: string) => {\n const nativeNodeHandle = findNodeHandle(nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands[command];\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n return {\n play: () => {\n sendCommand('play');\n },\n pause: () => {\n sendCommand('pause');\n },\n };\n },\n []\n );\n\n useEffect(() => {\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n forceUpdate();\n }\n );\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n if (Platform.OS === 'android') {\n forceUpdate();\n }\n }\n );\n\n return () => {\n subscriptionOfShareBaseURLUpdated.remove();\n subscriptionOfAdBadgeConfigurationUpdated.remove();\n subscriptionOfVideoLaunchBehaviorUpdated.remove();\n subscriptionOfAppLanguageUpdated.remove();\n };\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n setTimeout(() => {\n const viewId = findNodeHandle(nativeComponentRef.current);\n FWLoggerUtil.log(`StoryBlock createFragment viewId: ${viewId}`);\n UIManager.dispatchViewManagerCommand(\n viewId,\n UIManager.getViewManagerConfig(\n NativeComponentName\n ).Commands.create.toString(),\n [viewId]\n );\n }, 500);\n }\n }, [key]);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n const onBackPress = () => {\n if (isFullscreenState) {\n FireworkSDK.getInstance().navigator.popNativeContainer();\n return true;\n }\n return false;\n };\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n onBackPress\n );\n return () => {\n subscription.remove();\n };\n }\n\n return;\n }, [isFullscreenState]);\n\n const { style } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...props}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullscreenStateChanged\n }\n style={Object.assign({}, style, { zIndex: -1 })}\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
1
+ {"version":3,"sources":["StoryBlock.tsx"],"names":["React","forwardRef","useEffect","useImperativeHandle","useReducer","useRef","useState","BackHandler","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWGlobalState","FWLoggerUtil","FWStoryBlock","NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","sdkInitCalled","setSdkInitCalled","getInstance","forceUpdate","x","handleStoryBlockLoadFinished","event","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullScreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","generateKey","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","toString","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","enablePictureInPicture","storyBlockConfiguration","dynamicContentParametersString","videoCompleteAction","showShareButton","showPlaybackButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","requiresAds","adsFetchTimeout","vastAttributesString","OS","sendCommand","command","nativeNodeHandle","current","commandId","getViewManagerConfig","Commands","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","addEventListener"],"mappings":";;AACA,OAAOA,KAAP,IACEC,UADF,EAEEC,SAFF,EAGEC,mBAHF,EAIEC,UAJF,EAKEC,MALF,EAMEC,QANF,QAOO,OAPP;AASA,SACEC,WADF,EAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAGA,SAASC,WAAT,QAA4B,uBAA5B;AAGA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,aAAP,MAA0B,wBAA1B;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AAEA,MAAMC,mBAAmB,GAAG,cAA5B;;AA8DA,MAAMC,UAGL,GAAG,CAACC,KAAD,EAA0BC,YAA1B,KAA2C;AAC7C,QAAMC,kBAAkB,GAAGhB,MAAM,CAAC,IAAD,CAAjC;AACA,QAAM,CAACiB,iBAAD,EAAoBC,oBAApB,IAA4CjB,QAAQ,CAAU,KAAV,CAA1D;AACA,QAAM,CAACkB,aAAD,EAAgBC,gBAAhB,IAAoCnB,QAAQ,CAChDQ,aAAa,CAACY,WAAd,GAA4BF,aADoB,CAAlD;AAGA,QAAM,GAAGG,WAAH,IAAkBvB,UAAU,CAAEwB,CAAD,IAAOA,CAAC,GAAG,CAAZ,EAAe,CAAf,CAAlC;;AAEA,QAAMC,4BAA4B,GAAIC,KAAD,IAAsC;AACzEf,IAAAA,YAAY,CAACgB,GAAb,CACG,2CAA0CD,KAAK,CAACE,WAAN,CAAkBC,IAAK,EADpE;AAIA,UAAM;AAAEC,MAAAA;AAAF,QAA+Bf,KAArC;AACA,UAAM;AAAEc,MAAAA,IAAF;AAAQE,MAAAA;AAAR,QAAmBL,KAAK,CAACE,WAA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AW,CAACsH,gBAAZ,CACnB,mBADmB,EAEnBJ,WAFmB,CAArB;AAIA,aAAO,MAAM;AACXG,QAAAA,YAAY,CAACT,MAAb;AACD,OAFD;AAGD;;AAED;AACD,GAnBQ,EAmBN,CAAC7F,iBAAD,CAnBM,CAAT;;AAqBA,MAAI,CAACE,aAAL,EAAoB;AAClB,WAAO,IAAP;AACD;;AAED,sBACE,oBAAC,YAAD;AACE,IAAA,GAAG,EAAEH,kBADP;AAEE,IAAA,GAAG,EAAEwB;AAFP,KAGM1B,KAHN;AAIE,IAAA,wBAAwB,EAAEU,4BAJ5B;AAKE,IAAA,kCAAkC,EAChCO;AANJ,KADF;AAWD,CAnTD;;AAqTA,4BAAenC,UAAU,CAACiB,UAAD,CAAzB","sourcesContent":["import type { ForwardRefRenderFunction } from 'react';\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useReducer,\n useRef,\n useState,\n} from 'react';\n\nimport {\n BackHandler,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type { StoryBlockConfiguration } from '../models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from '../models/StoryBlockSource';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWStoryBlock from './FWStoryBlock';\n\nconst NativeComponentName = 'FWStoryBlock';\n\nexport interface IStoryBlockMethods {\n /**\n * Play the story block.\n */\n play: () => void;\n /**\n * Pause the story block.\n */\n pause: () => void;\n}\n\n/**\n * The props type of StoryBlock component.\n */\nexport interface IStoryBlockProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of four available story block sources.\n */\n source: StoryBlockSource;\n /**\n * Channel id of the story block. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the story block. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * The dynamic content parameters of the story block. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n */\n hashtagFilterExpression?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n\n /* The configuration of the story block.\n Only supported on Android.*/\n storyBlockConfiguration?: StoryBlockConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined.\n */\n onStoryBlockLoadFinished?: (error?: FWError) => void;\n}\n\nconst StoryBlock: ForwardRefRenderFunction<\n IStoryBlockMethods,\n IStoryBlockProps\n> = (props: IStoryBlockProps, forwardedRef) => {\n const nativeComponentRef = useRef(null);\n const [isFullscreenState, setIsFullscreenState] = useState<boolean>(false);\n const [sdkInitCalled, setSdkInitCalled] = useState<boolean>(\n FWGlobalState.getInstance().sdkInitCalled\n );\n const [, forceUpdate] = useReducer((x) => x + 1, 0);\n\n const handleStoryBlockLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockLoadFinished ${event.nativeEvent.name}`\n );\n\n const { onStoryBlockLoadFinished } = props;\n const { name, reason } = event.nativeEvent;\n\n if (onStoryBlockLoadFinished) {\n if (name) {\n if (reason) {\n onStoryBlockLoadFinished({ name, reason });\n } else {\n onStoryBlockLoadFinished({ name });\n }\n } else {\n onStoryBlockLoadFinished();\n }\n }\n };\n\n const handleStoryBlockFullScreenStateChanged = (\n event: NativeSyntheticEvent<any>\n ) => {\n FWLoggerUtil.log(\n `StoryBlock handleStoryBlockFullScreenStateChanged ${event.nativeEvent.isFullScreen}`\n );\n const { isFullScreen } = event.nativeEvent;\n setIsFullscreenState(isFullScreen);\n };\n\n const generateDynamicContentParametersString = (): string => {\n const { dynamicContentParameters } = props;\n\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n };\n\n const generateVastAttributesString = () => {\n const { adConfiguration } = props;\n const vastAttributes = adConfiguration?.vastAttributes ?? '';\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name ?? ''}:${attribute.value}`;\n }\n\n return resultString;\n };\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';\n const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';\n const videoLaunchBehavior =\n FireworkSDK.getInstance().videoLaunchBehavior ?? '';\n const adBadgeConfiguration =\n FireworkSDK.getInstance().adBadgeConfiguration ?? {};\n const adBadgeTextType = adBadgeConfiguration.badgeTextType ?? '';\n const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';\n const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration.androidFontInfo?.isCustom?.toString() ?? '';\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration.androidFontInfo?.typefaceName ?? '';\n\n const {\n source,\n channel = '',\n playlist = '',\n hashtagFilterExpression = '',\n enablePictureInPicture = false,\n adConfiguration,\n storyBlockConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const videoCompleteAction =\n storyBlockConfiguration?.videoCompleteAction ?? '';\n const showShareButton =\n storyBlockConfiguration?.showShareButton?.toString() ?? '';\n const showPlaybackButton =\n storyBlockConfiguration?.showPlaybackButton?.toString() ?? '';\n const showBranding =\n storyBlockConfiguration?.showBranding?.toString() ?? '';\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type ?? '';\n const ctaDelayValue =\n storyBlockConfiguration?.ctaDelay?.value?.toFixed(5) ?? '';\n const ctaHighlightDelayType =\n storyBlockConfiguration?.ctaHighlightDelay?.type ?? '';\n const ctaHighlightDelayValue =\n storyBlockConfiguration?.ctaHighlightDelay?.value?.toFixed(5) ?? '';\n const shareBaseURL = storyBlockConfiguration?.shareBaseURL ?? '';\n const ctaWidth = storyBlockConfiguration?.ctaWidth ?? '';\n\n const requiresAds = adConfiguration?.requiresAds?.toString() ?? '';\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\n const vastAttributesString = generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return key;\n };\n\n const key = generateKey();\n\n useImperativeHandle(\n forwardedRef,\n () => {\n const sendCommand = (command: string) => {\n const nativeNodeHandle = findNodeHandle(nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands[command];\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n return {\n play: () => {\n sendCommand('play');\n },\n pause: () => {\n sendCommand('pause');\n },\n };\n },\n []\n );\n\n useEffect(() => {\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n forceUpdate();\n }\n );\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n forceUpdate();\n }\n );\n\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n if (Platform.OS === 'android') {\n forceUpdate();\n }\n }\n );\n\n return () => {\n subscriptionOfShareBaseURLUpdated.remove();\n subscriptionOfAdBadgeConfigurationUpdated.remove();\n subscriptionOfVideoLaunchBehaviorUpdated.remove();\n subscriptionOfAppLanguageUpdated.remove();\n };\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n setTimeout(() => {\n const viewId = findNodeHandle(nativeComponentRef.current);\n FWLoggerUtil.log(`StoryBlock createFragment viewId: ${viewId}`);\n UIManager.dispatchViewManagerCommand(\n viewId,\n UIManager.getViewManagerConfig(\n NativeComponentName\n ).Commands.create.toString(),\n [viewId]\n );\n }, 500);\n }\n }, [key]);\n\n useEffect(() => {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n setSdkInitCalled(true);\n });\n }, []);\n\n useEffect(() => {\n if (Platform.OS === 'android') {\n const onBackPress = () => {\n if (isFullscreenState) {\n FireworkSDK.getInstance().navigator.popNativeContainer();\n return true;\n }\n return false;\n };\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n onBackPress\n );\n return () => {\n subscription.remove();\n };\n }\n\n return;\n }, [isFullscreenState]);\n\n if (!sdkInitCalled) {\n return null;\n }\n\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...props}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
@@ -7,6 +7,7 @@ import { findNodeHandle, Platform, UIManager } from 'react-native';
7
7
  import FireworkSDK from '../FireworkSDK';
8
8
  import { FWEventName } from '../models/FWEventName';
9
9
  import { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';
10
+ import FWGlobalState from '../utils/FWGlobalState';
10
11
  import FWLoggerUtil from '../utils/FWLoggerUtil';
11
12
  import FWVideoFeed from './FWVideoFeed';
12
13
  const NativeComponentName = 'FWVideoFeed';
@@ -15,8 +16,11 @@ const NativeComponentName = 'FWVideoFeed';
15
16
  */
16
17
 
17
18
  class VideoFeed extends React.Component {
18
- constructor() {
19
- super(...arguments);
19
+ /**
20
+ * @ignore
21
+ */
22
+ constructor(props) {
23
+ super(props);
20
24
 
21
25
  _defineProperty(this, "_nativeComponentRef", /*#__PURE__*/React.createRef());
22
26
 
@@ -61,6 +65,10 @@ class VideoFeed extends React.Component {
61
65
  }
62
66
  }
63
67
  });
68
+
69
+ this.state = {
70
+ sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled
71
+ };
64
72
  }
65
73
 
66
74
  /**
@@ -68,6 +76,15 @@ class VideoFeed extends React.Component {
68
76
  */
69
77
  componentDidMount() {
70
78
  FWLoggerUtil.log(`VideoFeed componentDidMount ${JSON.stringify(this.props)}`);
79
+
80
+ if (!this.state.sdkInitCalled) {
81
+ FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {
82
+ this.setState({
83
+ sdkInitCalled: true
84
+ });
85
+ });
86
+ }
87
+
71
88
  const subscriptionOfShareBaseURLUpdated = FireworkSDKModuleEventEmitter.addListener(FWEventName.ShareBaseURLUpdated, () => {
72
89
  FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');
73
90
  this.setState({});
@@ -118,16 +135,23 @@ class VideoFeed extends React.Component {
118
135
 
119
136
 
120
137
  render() {
121
- var _FireworkSDK$getInsta, _FireworkSDK$getInsta2, _FireworkSDK$getInsta3, _adBadgeConfiguration, _adBadgeConfiguration2, _adBadgeConfiguration3, _FireworkSDK$getInsta4, _videoFeedConfigurati, _videoFeedConfigurati2, _videoFeedConfigurati3, _videoFeedConfigurati4, _videoFeedConfigurati5, _videoFeedConfigurati6, _videoPlayerConfigura, _adConfiguration$requ, _adConfiguration$adsF;
138
+ var _FireworkSDK$getInsta, _FireworkSDK$getInsta2, _FireworkSDK$getInsta3, _FireworkSDK$getInsta4, _adBadgeConfiguration, _adBadgeConfiguration2, _adBadgeConfiguration3, _adBadgeConfiguration4, _adBadgeConfiguration5, _adBadgeConfiguration6, _adBadgeConfiguration7, _adBadgeConfiguration8, _videoFeedConfigurati, _videoFeedConfigurati2, _videoFeedConfigurati3, _videoFeedConfigurati4, _videoFeedConfigurati5, _videoFeedConfigurati6, _videoFeedConfigurati7, _videoFeedConfigurati8, _videoFeedConfigurati9, _videoFeedConfigurati10, _videoFeedConfigurati11, _videoFeedConfigurati12, _videoFeedConfigurati13, _videoFeedConfigurati14, _videoFeedConfigurati15, _videoFeedConfigurati16, _videoFeedConfigurati17, _videoFeedConfigurati18, _videoFeedConfigurati19, _videoFeedConfigurati20, _videoFeedConfigurati21, _videoFeedConfigurati22, _videoFeedConfigurati23, _videoFeedConfigurati24, _videoFeedConfigurati25, _videoFeedConfigurati26, _videoFeedConfigurati27, _videoPlayerConfigura, _videoPlayerConfigura2, _videoPlayerConfigura3, _videoPlayerConfigura4, _videoPlayerConfigura5, _videoPlayerConfigura6, _videoPlayerConfigura7, _videoPlayerConfigura8, _videoPlayerConfigura9, _videoPlayerConfigura10, _videoPlayerConfigura11, _videoPlayerConfigura12, _videoPlayerConfigura13, _videoPlayerConfigura14, _videoPlayerConfigura15, _videoPlayerConfigura16, _videoPlayerConfigura17, _videoPlayerConfigura18, _videoPlayerConfigura19, _videoPlayerConfigura20, _adConfiguration$requ, _adConfiguration$requ2, _adConfiguration$adsF;
139
+
140
+ FWLoggerUtil.log(`VideoFeed render props ${JSON.stringify(this.props)} state ${JSON.stringify(this.state)}`);
141
+
142
+ if (!this.state.sdkInitCalled) {
143
+ return null;
144
+ }
122
145
 
123
- FWLoggerUtil.log(`VideoFeed render ${JSON.stringify(this.props)}`);
124
146
  const gShareBaseURL = (_FireworkSDK$getInsta = FireworkSDK.getInstance().shareBaseURL) !== null && _FireworkSDK$getInsta !== void 0 ? _FireworkSDK$getInsta : '';
125
147
  const appLanguage = (_FireworkSDK$getInsta2 = FireworkSDK.getInstance().appLanguage) !== null && _FireworkSDK$getInsta2 !== void 0 ? _FireworkSDK$getInsta2 : '';
126
- const adBadgeConfiguration = (_FireworkSDK$getInsta3 = FireworkSDK.getInstance().adBadgeConfiguration) !== null && _FireworkSDK$getInsta3 !== void 0 ? _FireworkSDK$getInsta3 : {};
148
+ const videoLaunchBehavior = (_FireworkSDK$getInsta3 = FireworkSDK.getInstance().videoLaunchBehavior) !== null && _FireworkSDK$getInsta3 !== void 0 ? _FireworkSDK$getInsta3 : '';
149
+ const adBadgeConfiguration = (_FireworkSDK$getInsta4 = FireworkSDK.getInstance().adBadgeConfiguration) !== null && _FireworkSDK$getInsta4 !== void 0 ? _FireworkSDK$getInsta4 : {};
127
150
  const adBadgeTextType = (_adBadgeConfiguration = adBadgeConfiguration.badgeTextType) !== null && _adBadgeConfiguration !== void 0 ? _adBadgeConfiguration : '';
128
151
  const backgroundColorOfAdBadge = (_adBadgeConfiguration2 = adBadgeConfiguration.backgroundColor) !== null && _adBadgeConfiguration2 !== void 0 ? _adBadgeConfiguration2 : '';
129
152
  const textColorOfAdBadge = (_adBadgeConfiguration3 = adBadgeConfiguration.textColor) !== null && _adBadgeConfiguration3 !== void 0 ? _adBadgeConfiguration3 : '';
130
- const videoLaunchBehavior = (_FireworkSDK$getInsta4 = FireworkSDK.getInstance().videoLaunchBehavior) !== null && _FireworkSDK$getInsta4 !== void 0 ? _FireworkSDK$getInsta4 : 'default';
153
+ const androidFontIsCustomOfAdBadge = (_adBadgeConfiguration4 = (_adBadgeConfiguration5 = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration5 === void 0 ? void 0 : (_adBadgeConfiguration6 = _adBadgeConfiguration5.isCustom) === null || _adBadgeConfiguration6 === void 0 ? void 0 : _adBadgeConfiguration6.toString()) !== null && _adBadgeConfiguration4 !== void 0 ? _adBadgeConfiguration4 : '';
154
+ const androidFontTypefaceNameOfAdBadge = (_adBadgeConfiguration7 = (_adBadgeConfiguration8 = adBadgeConfiguration.androidFontInfo) === null || _adBadgeConfiguration8 === void 0 ? void 0 : _adBadgeConfiguration8.typefaceName) !== null && _adBadgeConfiguration7 !== void 0 ? _adBadgeConfiguration7 : '';
131
155
  const {
132
156
  source,
133
157
  channel = '',
@@ -144,13 +168,32 @@ class VideoFeed extends React.Component {
144
168
 
145
169
  const videoFeedConfiguration = this._getVideoFeedConfiguration();
146
170
 
147
- const titleHidden = (_videoFeedConfigurati = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati2 = videoFeedConfiguration.title) === null || _videoFeedConfigurati2 === void 0 ? void 0 : _videoFeedConfigurati2.hidden) !== null && _videoFeedConfigurati !== void 0 ? _videoFeedConfigurati : false;
148
- const titlePosition = (_videoFeedConfigurati3 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.titlePosition) !== null && _videoFeedConfigurati3 !== void 0 ? _videoFeedConfigurati3 : 'nested';
149
- const enableAutoplay = (_videoFeedConfigurati4 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.enableAutoplay) !== null && _videoFeedConfigurati4 !== void 0 ? _videoFeedConfigurati4 : false;
150
- const gridColumns = (_videoFeedConfigurati5 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.gridColumns) !== null && _videoFeedConfigurati5 !== void 0 ? _videoFeedConfigurati5 : 2;
151
- const showAdBadge = (_videoFeedConfigurati6 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.showAdBadge) !== null && _videoFeedConfigurati6 !== void 0 ? _videoFeedConfigurati6 : false;
152
- const shareBaseURL = (_videoPlayerConfigura = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.shareBaseURL) !== null && _videoPlayerConfigura !== void 0 ? _videoPlayerConfigura : '';
153
- const requiresAds = (_adConfiguration$requ = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.requiresAds) !== null && _adConfiguration$requ !== void 0 ? _adConfiguration$requ : false;
171
+ const cornerRadius = (_videoFeedConfigurati = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati2 = videoFeedConfiguration.cornerRadius) === null || _videoFeedConfigurati2 === void 0 ? void 0 : _videoFeedConfigurati2.toFixed(5)) !== null && _videoFeedConfigurati !== void 0 ? _videoFeedConfigurati : '';
172
+ const titleHidden = (_videoFeedConfigurati3 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati4 = videoFeedConfiguration.title) === null || _videoFeedConfigurati4 === void 0 ? void 0 : (_videoFeedConfigurati5 = _videoFeedConfigurati4.hidden) === null || _videoFeedConfigurati5 === void 0 ? void 0 : _videoFeedConfigurati5.toString()) !== null && _videoFeedConfigurati3 !== void 0 ? _videoFeedConfigurati3 : '';
173
+ const titleTextColor = (_videoFeedConfigurati6 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati7 = videoFeedConfiguration.title) === null || _videoFeedConfigurati7 === void 0 ? void 0 : _videoFeedConfigurati7.textColor) !== null && _videoFeedConfigurati6 !== void 0 ? _videoFeedConfigurati6 : '';
174
+ const titleFontSize = (_videoFeedConfigurati8 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati9 = videoFeedConfiguration.title) === null || _videoFeedConfigurati9 === void 0 ? void 0 : (_videoFeedConfigurati10 = _videoFeedConfigurati9.fontSize) === null || _videoFeedConfigurati10 === void 0 ? void 0 : _videoFeedConfigurati10.toFixed(5)) !== null && _videoFeedConfigurati8 !== void 0 ? _videoFeedConfigurati8 : '';
175
+ const titleAndroidFontInfo = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati11 = videoFeedConfiguration.title) === null || _videoFeedConfigurati11 === void 0 ? void 0 : _videoFeedConfigurati11.androidFontInfo;
176
+ const titleGradientDrawable = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati12 = videoFeedConfiguration.title) === null || _videoFeedConfigurati12 === void 0 ? void 0 : _videoFeedConfigurati12.gradientDrawable;
177
+ const titlePosition = (_videoFeedConfigurati13 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : videoFeedConfiguration.titlePosition) !== null && _videoFeedConfigurati13 !== void 0 ? _videoFeedConfigurati13 : '';
178
+ const playIconHidden = (_videoFeedConfigurati14 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati15 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati15 === void 0 ? void 0 : (_videoFeedConfigurati16 = _videoFeedConfigurati15.hidden) === null || _videoFeedConfigurati16 === void 0 ? void 0 : _videoFeedConfigurati16.toString()) !== null && _videoFeedConfigurati14 !== void 0 ? _videoFeedConfigurati14 : '';
179
+ const playIconWidth = (_videoFeedConfigurati17 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati18 = videoFeedConfiguration.playIcon) === null || _videoFeedConfigurati18 === void 0 ? void 0 : (_videoFeedConfigurati19 = _videoFeedConfigurati18.iconWidth) === null || _videoFeedConfigurati19 === void 0 ? void 0 : _videoFeedConfigurati19.toFixed(5)) !== null && _videoFeedConfigurati17 !== void 0 ? _videoFeedConfigurati17 : '';
180
+ const showAdBadge = (_videoFeedConfigurati20 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati21 = videoFeedConfiguration.showAdBadge) === null || _videoFeedConfigurati21 === void 0 ? void 0 : _videoFeedConfigurati21.toString()) !== null && _videoFeedConfigurati20 !== void 0 ? _videoFeedConfigurati20 : '';
181
+ const enableAutoplay = (_videoFeedConfigurati22 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati23 = videoFeedConfiguration.enableAutoplay) === null || _videoFeedConfigurati23 === void 0 ? void 0 : _videoFeedConfigurati23.toString()) !== null && _videoFeedConfigurati22 !== void 0 ? _videoFeedConfigurati22 : '';
182
+ const gridColumns = (_videoFeedConfigurati24 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati25 = videoFeedConfiguration.gridColumns) === null || _videoFeedConfigurati25 === void 0 ? void 0 : _videoFeedConfigurati25.toFixed(5)) !== null && _videoFeedConfigurati24 !== void 0 ? _videoFeedConfigurati24 : '';
183
+ const itemSpacing = (_videoFeedConfigurati26 = videoFeedConfiguration === null || videoFeedConfiguration === void 0 ? void 0 : (_videoFeedConfigurati27 = videoFeedConfiguration.itemSpacing) === null || _videoFeedConfigurati27 === void 0 ? void 0 : _videoFeedConfigurati27.toFixed(5)) !== null && _videoFeedConfigurati26 !== void 0 ? _videoFeedConfigurati26 : '';
184
+ const playerStyle = (_videoPlayerConfigura = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.playerStyle) !== null && _videoPlayerConfigura !== void 0 ? _videoPlayerConfigura : '';
185
+ const videoCompleteAction = (_videoPlayerConfigura2 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.videoCompleteAction) !== null && _videoPlayerConfigura2 !== void 0 ? _videoPlayerConfigura2 : '';
186
+ const showShareButton = (_videoPlayerConfigura3 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura4 = videoPlayerConfiguration.showShareButton) === null || _videoPlayerConfigura4 === void 0 ? void 0 : _videoPlayerConfigura4.toString()) !== null && _videoPlayerConfigura3 !== void 0 ? _videoPlayerConfigura3 : '';
187
+ const showPlaybackButton = (_videoPlayerConfigura5 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura6 = videoPlayerConfiguration.showPlaybackButton) === null || _videoPlayerConfigura6 === void 0 ? void 0 : _videoPlayerConfigura6.toString()) !== null && _videoPlayerConfigura5 !== void 0 ? _videoPlayerConfigura5 : '';
188
+ const showMuteButton = (_videoPlayerConfigura7 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura8 = videoPlayerConfiguration.showMuteButton) === null || _videoPlayerConfigura8 === void 0 ? void 0 : _videoPlayerConfigura8.toString()) !== null && _videoPlayerConfigura7 !== void 0 ? _videoPlayerConfigura7 : '';
189
+ const showBranding = (_videoPlayerConfigura9 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura10 = videoPlayerConfiguration.showBranding) === null || _videoPlayerConfigura10 === void 0 ? void 0 : _videoPlayerConfigura10.toString()) !== null && _videoPlayerConfigura9 !== void 0 ? _videoPlayerConfigura9 : '';
190
+ const ctaDelayType = (_videoPlayerConfigura11 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura12 = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura12 === void 0 ? void 0 : _videoPlayerConfigura12.type) !== null && _videoPlayerConfigura11 !== void 0 ? _videoPlayerConfigura11 : '';
191
+ const ctaDelayValue = ((_videoPlayerConfigura13 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura14 = videoPlayerConfiguration.ctaDelay) === null || _videoPlayerConfigura14 === void 0 ? void 0 : _videoPlayerConfigura14.value) !== null && _videoPlayerConfigura13 !== void 0 ? _videoPlayerConfigura13 : 0).toFixed(5);
192
+ const ctaHighlightDelayType = (_videoPlayerConfigura15 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura16 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura16 === void 0 ? void 0 : _videoPlayerConfigura16.type) !== null && _videoPlayerConfigura15 !== void 0 ? _videoPlayerConfigura15 : '';
193
+ const ctaHighlightDelayValue = ((_videoPlayerConfigura17 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : (_videoPlayerConfigura18 = videoPlayerConfiguration.ctaHighlightDelay) === null || _videoPlayerConfigura18 === void 0 ? void 0 : _videoPlayerConfigura18.value) !== null && _videoPlayerConfigura17 !== void 0 ? _videoPlayerConfigura17 : 0).toFixed(5);
194
+ const shareBaseURL = (_videoPlayerConfigura19 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.shareBaseURL) !== null && _videoPlayerConfigura19 !== void 0 ? _videoPlayerConfigura19 : '';
195
+ const ctaWidth = (_videoPlayerConfigura20 = videoPlayerConfiguration === null || videoPlayerConfiguration === void 0 ? void 0 : videoPlayerConfiguration.ctaWidth) !== null && _videoPlayerConfigura20 !== void 0 ? _videoPlayerConfigura20 : '';
196
+ const requiresAds = (_adConfiguration$requ = adConfiguration === null || adConfiguration === void 0 ? void 0 : (_adConfiguration$requ2 = adConfiguration.requiresAds) === null || _adConfiguration$requ2 === void 0 ? void 0 : _adConfiguration$requ2.toString()) !== null && _adConfiguration$requ !== void 0 ? _adConfiguration$requ : '';
154
197
  const adsFetchTimeout = (_adConfiguration$adsF = adConfiguration === null || adConfiguration === void 0 ? void 0 : adConfiguration.adsFetchTimeout) !== null && _adConfiguration$adsF !== void 0 ? _adConfiguration$adsF : 10;
155
198
 
156
199
  const vastAttributesString = this._generateVastAttributesString();
@@ -161,10 +204,16 @@ class VideoFeed extends React.Component {
161
204
  key += `_appLanguage:${appLanguage}`;
162
205
  }
163
206
 
207
+ key += `_videoLaunchBehavior:${videoLaunchBehavior}`;
164
208
  key += `_adBadgeTextType:${adBadgeTextType}`;
165
209
  key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;
166
210
  key += `_textColorOfAdBadge:${textColorOfAdBadge}`;
167
- key += `_videoLaunchBehavior:${videoLaunchBehavior}`;
211
+
212
+ if (Platform.OS === 'android') {
213
+ key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;
214
+ key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;
215
+ }
216
+
168
217
  key += `_source:${source}`;
169
218
  key += `_channel:${channel}`;
170
219
  key += `_playlist:${playlist}`;
@@ -174,11 +223,42 @@ class VideoFeed extends React.Component {
174
223
  key += `_mode:${mode}`;
175
224
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
176
225
  key += `_titleHidden:${titleHidden}`;
226
+
227
+ if (Platform.OS === 'android') {
228
+ var _titleAndroidFontInfo, _titleAndroidFontInfo2, _titleAndroidFontInfo3, _titleGradientDrawabl, _titleGradientDrawabl2;
229
+
230
+ key += `_cornerRadius:${cornerRadius}`;
231
+ key += `_titleTextColor:${titleTextColor}`;
232
+ key += `_titleFontSize:${titleFontSize}`;
233
+ key += `_titleAndroidFontInfo.isCustom:${(_titleAndroidFontInfo = titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : (_titleAndroidFontInfo2 = titleAndroidFontInfo.isCustom) === null || _titleAndroidFontInfo2 === void 0 ? void 0 : _titleAndroidFontInfo2.toString()) !== null && _titleAndroidFontInfo !== void 0 ? _titleAndroidFontInfo : ''}`;
234
+ key += `_titleAndroidFontInfo.typefaceName:${(_titleAndroidFontInfo3 = titleAndroidFontInfo === null || titleAndroidFontInfo === void 0 ? void 0 : titleAndroidFontInfo.typefaceName) !== null && _titleAndroidFontInfo3 !== void 0 ? _titleAndroidFontInfo3 : ''}`;
235
+ key += `_titleGradientDrawable.orientation:${(_titleGradientDrawabl = titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : titleGradientDrawable.orientation) !== null && _titleGradientDrawabl !== void 0 ? _titleGradientDrawabl : ''}`;
236
+ key += `_titleGradientDrawable.colors:${((_titleGradientDrawabl2 = titleGradientDrawable === null || titleGradientDrawable === void 0 ? void 0 : titleGradientDrawable.colors) !== null && _titleGradientDrawabl2 !== void 0 ? _titleGradientDrawabl2 : []).join(',')}`;
237
+ key += `_playIconHidden:${playIconHidden}`;
238
+ key += `_playIconWidth:${playIconWidth}`;
239
+ key += `_showAdBadge:${showAdBadge}`;
240
+ }
241
+
177
242
  key += `_titlePosition:${titlePosition}`;
178
243
  key += `_enableAutoplay:${enableAutoplay}`;
179
244
  key += `_gridColumns:${gridColumns}`;
180
- key += `_showAdBadge:${showAdBadge}`;
245
+ key += `_itemSpacing:${itemSpacing}`;
181
246
  key += `_shareBaseURL:${shareBaseURL}`;
247
+
248
+ if (Platform.OS === 'android') {
249
+ key += `_playerStyle:${playerStyle}`;
250
+ key += `_videoCompleteAction:${videoCompleteAction}`;
251
+ key += `_showShareButton:${showShareButton}`;
252
+ key += `_showPlaybackButton:${showPlaybackButton}`;
253
+ key += `_showMuteButton:${showMuteButton}`;
254
+ key += `_showBranding:${showBranding}`;
255
+ key += `_ctaDelayType:${ctaDelayType}`;
256
+ key += `_ctaDelayValue:${ctaDelayValue}`;
257
+ key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;
258
+ key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;
259
+ key += `_ctaWidth:${ctaWidth}`;
260
+ }
261
+
182
262
  key += `_requiresAds:${requiresAds}`;
183
263
  key += `_adsFetchTimeout:${adsFetchTimeout}`;
184
264
  key += `_vastAttributes:${vastAttributesString}`;
@@ -188,10 +268,7 @@ class VideoFeed extends React.Component {
188
268
  videoFeedConfiguration: videoFeedConfiguration,
189
269
  ref: this._nativeComponentRef,
190
270
  onVideoFeedLoadFinished: this._onVideoFeedLoadFinished,
191
- mode: mode,
192
- style: Object.assign({}, this.props.style, {
193
- zIndex: -1
194
- })
271
+ mode: mode
195
272
  }));
196
273
  }
197
274
 
@@ -257,13 +334,25 @@ class VideoFeed extends React.Component {
257
334
  return videoFeedConfiguration;
258
335
  }
259
336
 
260
- if (videoFeedConfiguration.gridColumns && Math.floor(videoFeedConfiguration.gridColumns) !== videoFeedConfiguration.gridColumns) {
261
- return { ...videoFeedConfiguration,
262
- gridColumns: Math.floor(videoFeedConfiguration.gridColumns)
337
+ let resultVideoFeedConfiguration = videoFeedConfiguration;
338
+
339
+ if (resultVideoFeedConfiguration.gridColumns && Math.floor(resultVideoFeedConfiguration.gridColumns) !== resultVideoFeedConfiguration.gridColumns) {
340
+ const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);
341
+ resultVideoFeedConfiguration = { ...resultVideoFeedConfiguration,
342
+ gridColumns
263
343
  };
264
- } else {
265
- return videoFeedConfiguration;
266
344
  }
345
+
346
+ if (resultVideoFeedConfiguration.title && resultVideoFeedConfiguration.title.numberOfLines && Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !== resultVideoFeedConfiguration.title.numberOfLines) {
347
+ const numberOfLines = Math.floor(resultVideoFeedConfiguration.title.numberOfLines);
348
+ resultVideoFeedConfiguration = { ...resultVideoFeedConfiguration,
349
+ title: { ...resultVideoFeedConfiguration.title,
350
+ numberOfLines
351
+ }
352
+ };
353
+ }
354
+
355
+ return resultVideoFeedConfiguration;
267
356
  }
268
357
 
269
358
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","createRef","log","JSON","stringify","props","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","componentDidMount","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","setState","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","getInstance","shareBaseURL","appLanguage","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","videoLaunchBehavior","source","channel","playlist","playlistGroup","hashtagFilterExpression","mode","enablePictureInPicture","adConfiguration","videoPlayerConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","titleHidden","title","hidden","titlePosition","enableAutoplay","gridColumns","showAdBadge","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","_onVideoFeedLoadFinished","Object","assign","style","zIndex","dynamicContentParameters","resultString","sortedKeyList","keys","sort","valueString","join","length","vastAttributes","attribute","Math","floor"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAEA,SAASC,WAAT,QAA4B,uBAA5B;AAKA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAiEA,MAAMC,mBAAmB,GAAG,aAA5B;AAEA;AACA;AACA;;AACA,MAAMC,SAAN,SAAwBV,KAAK,CAACW,SAA9B,CAAyD;AAAA;AAAA;;AAAA,8DAQzBX,KAAK,CAACY,SAAN,EARyB;;AAAA,4CAUP,EAVO;;AAAA,qCAYtC,MAAM;AACrBL,MAAAA,YAAY,CAACM,GAAb,CAAkB,qBAAoBC,IAAI,CAACC,SAAL,CAAe,KAAKC,KAApB,CAA2B,EAAjE;AAEA,YAAMC,gBAAgB,GAAGhB,cAAc,CAAC,KAAKiB,mBAAL,CAAyBC,OAA1B,CAAvC;AAEA,UAAIC,SAA0B,GAC5BjB,SAAS,CAACkB,oBAAV,CAA+BZ,mBAA/B,EAAoDa,QAApD,CAA6DC,OAD/D;;AAEA,UAAIrB,QAAQ,CAACsB,EAAT,KAAgB,SAApB,EAA+B;AAC7BJ,QAAAA,SAAS,GAAGA,SAAS,CAACK,QAAV,EAAZ;A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n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n */\n hashtagFilterExpression?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined. Only supported on iOS.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n if (reason) {\n onVideoFeedLoadFinished({ name, reason });\n } else {\n onVideoFeedLoadFinished({ name });\n }\n } else {\n onVideoFeedLoadFinished();\n }\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n if (Platform.OS === 'ios') {\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n FWLoggerUtil.log(`VideoFeed render ${JSON.stringify(this.props)}`);\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';\n const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';\n const adBadgeConfiguration =\n FireworkSDK.getInstance().adBadgeConfiguration ?? {};\n const adBadgeTextType = adBadgeConfiguration.badgeTextType ?? '';\n const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';\n const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';\n const videoLaunchBehavior =\n FireworkSDK.getInstance().videoLaunchBehavior ?? 'default';\n\n const {\n source,\n channel = '',\n playlist = '',\n playlistGroup = '',\n hashtagFilterExpression = '',\n mode = 'row',\n enablePictureInPicture = false,\n adConfiguration,\n videoPlayerConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const titleHidden = videoFeedConfiguration?.title?.hidden ?? false;\n const titlePosition = videoFeedConfiguration?.titlePosition ?? 'nested';\n const enableAutoplay = videoFeedConfiguration?.enableAutoplay ?? false;\n const gridColumns = videoFeedConfiguration?.gridColumns ?? 2;\n const showAdBadge = videoFeedConfiguration?.showAdBadge ?? false;\n\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL ?? '';\n\n const requiresAds = adConfiguration?.requiresAds ?? false;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\n const vastAttributesString = this._generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n key += `_titlePosition:${titlePosition}`;\n key += `_enableAutoplay:${enableAutoplay}`;\n key += `_gridColumns:${gridColumns}`;\n key += `_showAdBadge:${showAdBadge}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n videoFeedConfiguration={videoFeedConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n mode={mode}\n style={Object.assign({}, this.props.style, { zIndex: -1 })}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes ?? '';\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name ?? ''}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n if (\n videoFeedConfiguration.gridColumns &&\n Math.floor(videoFeedConfiguration.gridColumns!) !==\n videoFeedConfiguration.gridColumns\n ) {\n return {\n ...videoFeedConfiguration,\n gridColumns: Math.floor(videoFeedConfiguration.gridColumns!),\n };\n } else {\n return videoFeedConfiguration;\n }\n }\n}\n\nexport default VideoFeed;\n"]}
1
+ {"version":3,"sources":["VideoFeed.tsx"],"names":["React","findNodeHandle","Platform","UIManager","FireworkSDK","FWEventName","FireworkSDKModuleEventEmitter","FWGlobalState","FWLoggerUtil","FWVideoFeed","NativeComponentName","VideoFeed","Component","constructor","props","createRef","log","JSON","stringify","nativeNodeHandle","_nativeComponentRef","current","commandId","getViewManagerConfig","Commands","refresh","OS","toString","dispatchViewManagerCommand","event","nativeEvent","onVideoFeedLoadFinished","name","reason","state","sdkInitCalled","getInstance","componentDidMount","sdkInitCalledPromise","then","setState","subscriptionOfShareBaseURLUpdated","addListener","ShareBaseURLUpdated","_subscriptions","push","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","componentWillUnmount","forEach","value","remove","render","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","playlistGroup","hashtagFilterExpression","mode","enablePictureInPicture","adConfiguration","videoPlayerConfiguration","dynamicContentParametersString","_generateDynamicContentParametersString","videoFeedConfiguration","_getVideoFeedConfiguration","cornerRadius","toFixed","titleHidden","title","hidden","titleTextColor","titleFontSize","fontSize","titleAndroidFontInfo","titleGradientDrawable","gradientDrawable","titlePosition","playIconHidden","playIcon","playIconWidth","iconWidth","showAdBadge","enableAutoplay","gridColumns","itemSpacing","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","requiresAds","adsFetchTimeout","vastAttributesString","_generateVastAttributesString","key","orientation","colors","join","_onVideoFeedLoadFinished","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","valueString","length","vastAttributes","attribute","resultVideoFeedConfiguration","Math","floor","numberOfLines"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAEEC,cAFF,EAIEC,QAJF,EAMEC,SANF,QAQO,cARP;AAUA,OAAOC,WAAP,MAAwB,gBAAxB;AAGA,SAASC,WAAT,QAA4B,uBAA5B;AAIA,SAASC,6BAAT,QAA8C,8BA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CAAC1G,IAAb,6DAAqB,EAAG,IAAG0G,SAAS,CAACpF,KAAM,EAA3D;AACD;;AAED,WAAO4E,YAAP;AACD;;AAEO7C,EAAAA,0BAA0B,GAAuC;AACvE,UAAM;AAAED,MAAAA;AAAF,QAA6B,KAAKtE,KAAxC;;AACA,QAAI,CAACsE,sBAAL,EAA6B;AAC3B,aAAOA,sBAAP;AACD;;AAED,QAAIuD,4BAA4B,GAAGvD,sBAAnC;;AAEA,QACEuD,4BAA4B,CAACnC,WAA7B,IACAoC,IAAI,CAACC,KAAL,CAAWF,4BAA4B,CAACnC,WAAxC,MACEmC,4BAA4B,CAACnC,WAHjC,EAIE;AACA,YAAMA,WAAW,GAAGoC,IAAI,CAACC,KAAL,CAAWF,4BAA4B,CAACnC,WAAxC,CAApB;AACAmC,MAAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7BnC,QAAAA;AAF6B,OAA/B;AAID;;AAED,QACEmC,4BAA4B,CAAClD,KAA7B,IACAkD,4BAA4B,CAAClD,KAA7B,CAAmCqD,aADnC,IAEAF,IAAI,CAACC,KAAL,CAAWF,4BAA4B,CAAClD,KAA7B,CAAmCqD,aAA9C,MACEH,4BAA4B,CAAClD,KAA7B,CAAmCqD,aAJvC,EAKE;AACA,YAAMA,aAAa,GAAGF,IAAI,CAACC,KAAL,CACpBF,4BAA4B,CAAClD,KAA7B,CAAmCqD,aADf,CAAtB;AAGAH,MAAAA,4BAA4B,GAAG,EAC7B,GAAGA,4BAD0B;AAE7BlD,QAAAA,KAAK,EAAE,EACL,GAAGkD,4BAA4B,CAAClD,KAD3B;AAELqD,UAAAA;AAFK;AAFsB,OAA/B;AAOD;;AAED,WAAOH,4BAAP;AACD;;AA1XuE;;gBAApEhI,S,kBAIkB;AACpBmE,EAAAA,IAAI,EAAE;AADc,C;;AAyXxB,eAAenE,SAAf","sourcesContent":["import React from 'react';\n\nimport {\n EmitterSubscription,\n findNodeHandle,\n NativeSyntheticEvent,\n Platform,\n StyleProp,\n UIManager,\n ViewStyle,\n} from 'react-native';\n\nimport FireworkSDK from '../FireworkSDK';\nimport type AdConfiguration from '../models/AdConfiguration';\nimport type FWError from '../models/FWError';\nimport { FWEventName } from '../models/FWEventName';\nimport type VideoFeedConfiguration from '../models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from '../models/VideoFeedSource';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\nimport { FireworkSDKModuleEventEmitter } from '../modules/FireworkSDKModule';\nimport FWGlobalState from '../utils/FWGlobalState';\nimport FWLoggerUtil from '../utils/FWLoggerUtil';\nimport FWVideoFeed from './FWVideoFeed';\n\nexport type VideoFeedMode = 'row' | 'column' | 'grid';\n\n/**\n * The props of VideoFeed component.\n */\nexport interface IVideoFeedProps {\n /**\n * Standard React Native View Style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * One of five available video feed sources.The playlistGroup is only supported on iOS\n */\n source: VideoFeedSource;\n /**\n * Channel id of the feed. Required when the source is set as channel or playlist or dynamicContent.\n */\n channel?: string;\n /**\n * Playlist id of the feed. Please note channel id is necessary. Required when the source is set as playlist.\n */\n playlist?: string;\n /**\n * PlaylistGroup id of the feed. Required when the source is set as playlistGroup. Only supported on iOS.\n */\n playlistGroup?: string;\n /**\n * The dynamic content parameters of the feed. Required when the source is set as dynamicContent.\n */\n dynamicContentParameters?: { [key: string]: string[] };\n /**\n * Hashtag filter expression is an s-expression used to provide feeds filtered by hashtags with specified criteria.\n * Queries are specified with boolean predicates on what hashtags are there on the video.\n * For instance, (and sport food) (or sport food) (and sport (or food comedy)) sport are all valid expressions.\n * Non-UTF-8 characters are not allowed. If using boolean predicates, the expression needs to be wrapped with parenthesis.\n */\n hashtagFilterExpression?: string;\n /**\n * One of three available display modes. Defaults to row.\n */\n mode?: VideoFeedMode;\n /**\n * Specifies if Picture in Picture is enabled.\n */\n enablePictureInPicture?: boolean;\n /**\n * Configuration of the feed.\n */\n videoFeedConfiguration?: VideoFeedConfiguration;\n /**\n * Configuration of the player.\n */\n videoPlayerConfiguration?: VideoPlayerConfiguration;\n /**\n * Ad configuration of the feed. Only supported on iOS.\n */\n adConfiguration?: AdConfiguration;\n /**\n * The feed loading result callback. It means loading successfully when error equals to undefined. Only supported on iOS.\n */\n onVideoFeedLoadFinished?: (error?: FWError) => void;\n}\n\ninterface IVideoFeedState {\n sdkInitCalled: boolean;\n}\n\nconst NativeComponentName = 'FWVideoFeed';\n\n/**\n * VideoFeed component.\n */\nclass VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {\n /**\n * @ignore\n */\n static defaultProps = {\n mode: 'row',\n };\n\n private _nativeComponentRef = React.createRef<any>();\n\n private _subscriptions: EmitterSubscription[] = [];\n\n constructor(props: IVideoFeedProps) {\n super(props);\n this.state = {\n sdkInitCalled: FWGlobalState.getInstance().sdkInitCalled,\n };\n }\n\n public refresh = () => {\n FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);\n\n const nativeNodeHandle = findNodeHandle(this._nativeComponentRef.current);\n\n let commandId: string | number =\n UIManager.getViewManagerConfig(NativeComponentName).Commands.refresh;\n if (Platform.OS === 'android') {\n commandId = commandId.toString();\n }\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(nativeNodeHandle),\n commandId,\n []\n );\n };\n\n private _onVideoFeedLoadFinished = (event: NativeSyntheticEvent<any>) => {\n FWLoggerUtil.log(\n `VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`\n );\n const { onVideoFeedLoadFinished } = this.props;\n\n const { name, reason } = event.nativeEvent;\n\n if (onVideoFeedLoadFinished) {\n if (name) {\n if (reason) {\n onVideoFeedLoadFinished({ name, reason });\n } else {\n onVideoFeedLoadFinished({ name });\n }\n } else {\n onVideoFeedLoadFinished();\n }\n }\n };\n\n /**\n * @ignore\n */\n componentDidMount() {\n FWLoggerUtil.log(\n `VideoFeed componentDidMount ${JSON.stringify(this.props)}`\n );\n\n if (!this.state.sdkInitCalled) {\n FWGlobalState.getInstance().sdkInitCalledPromise.then(() => {\n this.setState({ sdkInitCalled: true });\n });\n }\n\n const subscriptionOfShareBaseURLUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.ShareBaseURLUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfShareBaseURLUpdated);\n\n const subscriptionOfAdBadgeConfigurationUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AdBadgeConfigurationUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAdBadgeConfigurationUpdated);\n\n const subscriptionOfVideoLaunchBehaviorUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.VideoLaunchBehaviorUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.VideoLaunchBehaviorUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfVideoLaunchBehaviorUpdated);\n\n if (Platform.OS === 'ios') {\n const subscriptionOfAppLanguageUpdated =\n FireworkSDKModuleEventEmitter.addListener(\n FWEventName.AppLanguageUpdated,\n () => {\n FWLoggerUtil.log('Receive FWEventName.AppLanguageUpdated');\n this.setState({});\n }\n );\n this._subscriptions.push(subscriptionOfAppLanguageUpdated);\n }\n }\n\n /**\n * @ignore\n */\n componentWillUnmount() {\n FWLoggerUtil.log(\n `VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`\n );\n\n this._subscriptions.forEach((value) => {\n value.remove();\n });\n\n this._subscriptions = [];\n }\n\n /**\n * @ignore\n */\n render() {\n FWLoggerUtil.log(\n `VideoFeed render props ${JSON.stringify(\n this.props\n )} state ${JSON.stringify(this.state)}`\n );\n\n if (!this.state.sdkInitCalled) {\n return null;\n }\n\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL ?? '';\n const appLanguage = FireworkSDK.getInstance().appLanguage ?? '';\n const videoLaunchBehavior =\n FireworkSDK.getInstance().videoLaunchBehavior ?? '';\n const adBadgeConfiguration =\n FireworkSDK.getInstance().adBadgeConfiguration ?? {};\n const adBadgeTextType = adBadgeConfiguration.badgeTextType ?? '';\n const backgroundColorOfAdBadge = adBadgeConfiguration.backgroundColor ?? '';\n const textColorOfAdBadge = adBadgeConfiguration.textColor ?? '';\n const androidFontIsCustomOfAdBadge =\n adBadgeConfiguration.androidFontInfo?.isCustom?.toString() ?? '';\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration.androidFontInfo?.typefaceName ?? '';\n\n const {\n source,\n channel = '',\n playlist = '',\n playlistGroup = '',\n hashtagFilterExpression = '',\n mode = 'row',\n enablePictureInPicture = false,\n adConfiguration,\n videoPlayerConfiguration,\n } = this.props;\n const dynamicContentParametersString =\n this._generateDynamicContentParametersString();\n\n const videoFeedConfiguration = this._getVideoFeedConfiguration();\n const cornerRadius = videoFeedConfiguration?.cornerRadius?.toFixed(5) ?? '';\n\n const titleHidden = videoFeedConfiguration?.title?.hidden?.toString() ?? '';\n const titleTextColor = videoFeedConfiguration?.title?.textColor ?? '';\n const titleFontSize =\n videoFeedConfiguration?.title?.fontSize?.toFixed(5) ?? '';\n const titleAndroidFontInfo = videoFeedConfiguration?.title?.androidFontInfo;\n const titleGradientDrawable =\n videoFeedConfiguration?.title?.gradientDrawable;\n const titlePosition = videoFeedConfiguration?.titlePosition ?? '';\n const playIconHidden =\n videoFeedConfiguration?.playIcon?.hidden?.toString() ?? '';\n const playIconWidth =\n videoFeedConfiguration?.playIcon?.iconWidth?.toFixed(5) ?? '';\n const showAdBadge = videoFeedConfiguration?.showAdBadge?.toString() ?? '';\n const enableAutoplay =\n videoFeedConfiguration?.enableAutoplay?.toString() ?? '';\n const gridColumns = videoFeedConfiguration?.gridColumns?.toFixed(5) ?? '';\n const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5) ?? '';\n\n const playerStyle = videoPlayerConfiguration?.playerStyle ?? '';\n const videoCompleteAction =\n videoPlayerConfiguration?.videoCompleteAction ?? '';\n const showShareButton =\n videoPlayerConfiguration?.showShareButton?.toString() ?? '';\n const showPlaybackButton =\n videoPlayerConfiguration?.showPlaybackButton?.toString() ?? '';\n const showMuteButton =\n videoPlayerConfiguration?.showMuteButton?.toString() ?? '';\n const showBranding =\n videoPlayerConfiguration?.showBranding?.toString() ?? '';\n const ctaDelayType = videoPlayerConfiguration?.ctaDelay?.type ?? '';\n const ctaDelayValue = (\n videoPlayerConfiguration?.ctaDelay?.value ?? 0\n ).toFixed(5);\n const ctaHighlightDelayType =\n videoPlayerConfiguration?.ctaHighlightDelay?.type ?? '';\n const ctaHighlightDelayValue = (\n videoPlayerConfiguration?.ctaHighlightDelay?.value ?? 0\n ).toFixed(5);\n const shareBaseURL = videoPlayerConfiguration?.shareBaseURL ?? '';\n const ctaWidth = videoPlayerConfiguration?.ctaWidth ?? '';\n\n const requiresAds = adConfiguration?.requiresAds?.toString() ?? '';\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout ?? 10;\n const vastAttributesString = this._generateVastAttributesString();\n\n let key = `gShareBaseURL:${gShareBaseURL}`;\n if (Platform.OS === 'ios') {\n key += `_appLanguage:${appLanguage}`;\n }\n key += `_videoLaunchBehavior:${videoLaunchBehavior}`;\n key += `_adBadgeTextType:${adBadgeTextType}`;\n key += `_backgroundColorOfAdBadge:${backgroundColorOfAdBadge}`;\n key += `_textColorOfAdBadge:${textColorOfAdBadge}`;\n if (Platform.OS === 'android') {\n key += `_androidFontIsCustomOfAdBadge${androidFontIsCustomOfAdBadge}`;\n key += `_androidFontTypefaceNameOfAdBadge${androidFontTypefaceNameOfAdBadge}`;\n }\n\n key += `_source:${source}`;\n key += `_channel:${channel}`;\n key += `_playlist:${playlist}`;\n key += `_playlistGroup:${playlistGroup}`;\n key += `_dynamicContentParameters:${dynamicContentParametersString}`;\n key += `_hashtagFilterExpression:${hashtagFilterExpression}`;\n key += `_mode:${mode}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n\n key += `_titleHidden:${titleHidden}`;\n if (Platform.OS === 'android') {\n key += `_cornerRadius:${cornerRadius}`;\n key += `_titleTextColor:${titleTextColor}`;\n key += `_titleFontSize:${titleFontSize}`;\n key += `_titleAndroidFontInfo.isCustom:${\n titleAndroidFontInfo?.isCustom?.toString() ?? ''\n }`;\n key += `_titleAndroidFontInfo.typefaceName:${\n titleAndroidFontInfo?.typefaceName ?? ''\n }`;\n key += `_titleGradientDrawable.orientation:${\n titleGradientDrawable?.orientation ?? ''\n }`;\n key += `_titleGradientDrawable.colors:${(\n titleGradientDrawable?.colors ?? []\n ).join(',')}`;\n key += `_playIconHidden:${playIconHidden}`;\n key += `_playIconWidth:${playIconWidth}`;\n key += `_showAdBadge:${showAdBadge}`;\n }\n\n key += `_titlePosition:${titlePosition}`;\n key += `_enableAutoplay:${enableAutoplay}`;\n key += `_gridColumns:${gridColumns}`;\n key += `_itemSpacing:${itemSpacing}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\n if (Platform.OS === 'android') {\n key += `_playerStyle:${playerStyle}`;\n key += `_videoCompleteAction:${videoCompleteAction}`;\n key += `_showShareButton:${showShareButton}`;\n key += `_showPlaybackButton:${showPlaybackButton}`;\n key += `_showMuteButton:${showMuteButton}`;\n key += `_showBranding:${showBranding}`;\n key += `_ctaDelayType:${ctaDelayType}`;\n key += `_ctaDelayValue:${ctaDelayValue}`;\n key += `_ctaHighlightDelayType:${ctaHighlightDelayType}`;\n key += `_ctaHighlightDelayValue:${ctaHighlightDelayValue}`;\n key += `_ctaWidth:${ctaWidth}`;\n }\n\n key += `_requiresAds:${requiresAds}`;\n key += `_adsFetchTimeout:${adsFetchTimeout}`;\n key += `_vastAttributes:${vastAttributesString}`;\n\n return (\n <FWVideoFeed\n key={key}\n {...this.props}\n videoFeedConfiguration={videoFeedConfiguration}\n ref={this._nativeComponentRef}\n onVideoFeedLoadFinished={this._onVideoFeedLoadFinished}\n mode={mode}\n />\n );\n }\n\n private _generateDynamicContentParametersString(): string {\n const { dynamicContentParameters } = this.props;\n if (!dynamicContentParameters) {\n return '';\n }\n\n let resultString = '';\n const sortedKeyList = Object.keys(dynamicContentParameters).sort();\n for (const key of sortedKeyList) {\n const value = dynamicContentParameters[key];\n const valueString = value.join(',');\n if (resultString.length > 0) {\n resultString += '_';\n }\n\n resultString += `${key}:${valueString}`;\n }\n\n return resultString;\n }\n\n private _generateVastAttributesString(): string {\n const { adConfiguration } = this.props;\n const vastAttributes = adConfiguration?.vastAttributes ?? '';\n if (!vastAttributes) {\n return '';\n }\n\n let resultString = '';\n for (const attribute of vastAttributes) {\n if (resultString.length > 0) {\n resultString += '_';\n }\n resultString += `${attribute.name ?? ''}:${attribute.value}`;\n }\n\n return resultString;\n }\n\n private _getVideoFeedConfiguration(): VideoFeedConfiguration | undefined {\n const { videoFeedConfiguration } = this.props;\n if (!videoFeedConfiguration) {\n return videoFeedConfiguration;\n }\n\n let resultVideoFeedConfiguration = videoFeedConfiguration;\n\n if (\n resultVideoFeedConfiguration.gridColumns &&\n Math.floor(resultVideoFeedConfiguration.gridColumns) !==\n resultVideoFeedConfiguration.gridColumns\n ) {\n const gridColumns = Math.floor(resultVideoFeedConfiguration.gridColumns);\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n gridColumns,\n };\n }\n\n if (\n resultVideoFeedConfiguration.title &&\n resultVideoFeedConfiguration.title.numberOfLines &&\n Math.floor(resultVideoFeedConfiguration.title.numberOfLines) !==\n resultVideoFeedConfiguration.title.numberOfLines\n ) {\n const numberOfLines = Math.floor(\n resultVideoFeedConfiguration.title.numberOfLines\n );\n resultVideoFeedConfiguration = {\n ...resultVideoFeedConfiguration,\n title: {\n ...resultVideoFeedConfiguration.title,\n numberOfLines,\n },\n };\n }\n\n return resultVideoFeedConfiguration;\n }\n}\n\nexport default VideoFeed;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AAwBA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AA0BA,OAAOC,sBAAP,MAAmC,iCAAnC;AAeA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAWEA,WAXF,EAaEC,WAbF,EAqBEC,UArBF,EAuBEC,uBAvBF,EA0BEC,mBA1BF,EA2CEN,UA3CF,EAiDEC,SAjDF,EA+DEM,sBA/DF,EAuEEC,aAvEF","sourcesContent":["import type {\n IStoryBlockMethods,\n IStoryBlockProps,\n} from './components/StoryBlock';\nimport StoryBlock from './components/StoryBlock';\nimport type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AdConfiguration from './models/AdConfiguration';\nimport type { VastAttribute } from './models/AdConfiguration';\nimport type AndroidFontInfo from './models/AndroidFontInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n SDKInitEvent,\n ShoppingCTAEvent,\n UpdateProductDetailsEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type IOSFontInfo from './models/IOSFontInfo';\nimport type {\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n} from './models/IOSFontInfo';\nimport LiveStreamChatEventName from './models/LiveStreamChatEventName';\nimport type LiveStreamEventDetails from './models/LiveStreamEventDetails';\nimport LiveStreamEventName from './models/LiveStreamEventName';\nimport type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type ShoppingCTAResult from './models/ShoppingCTAResult';\nimport type { StoryBlockSource } from './models/StoryBlockSource';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedContentPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerCompleteAction,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerStyle,\n} from './models/VideoPlayerConfiguration';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n ShoppingCTACallback,\n UpdateProductDetailsCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AdConfiguration,\n AndroidFontInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n FeedItemDetails,\n FireworkSDK,\n FWError,\n FWNavigator,\n IOSFontInfo,\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n IStoryBlockMethods,\n IStoryBlockProps,\n IVideoFeedProps,\n LinkButtonConfiguration,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n SDKInitCallback,\n SDKInitEvent,\n SDKInitOptions,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n ShoppingCTACallback,\n ShoppingCTAEvent,\n ShoppingCTAResult,\n StoryBlock,\n StoryBlockSource,\n TrackPurchaseParameters,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VastAttribute,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedClickEvent,\n VideoFeedConfiguration,\n VideoFeedContentPadding,\n VideoFeedMode,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":["StoryBlock","VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AAIA,OAAOA,UAAP,MAAuB,yBAAvB;AAEA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AA0BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AA2BA,OAAOC,sBAAP,MAAmC,iCAAnC;AAgBA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAWEA,WAXF,EAaEC,WAbF,EAuBEC,UAvBF,EAyBEC,uBAzBF,EA4BEC,mBA5BF,EA6CEN,UA7CF,EAoDEC,SApDF,EAkEEM,sBAlEF,EA2EEC,aA3EF","sourcesContent":["import type {\n IStoryBlockMethods,\n IStoryBlockProps,\n} from './components/StoryBlock';\nimport StoryBlock from './components/StoryBlock';\nimport type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AdConfiguration from './models/AdConfiguration';\nimport type { VastAttribute } from './models/AdConfiguration';\nimport type AndroidFontInfo from './models/AndroidFontInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n SDKInitEvent,\n ShoppingCTAEvent,\n UpdateProductDetailsEvent,\n VideoFeedClickEvent,\n VideoPlaybackEvent,\n} from './models/FWEvents';\nimport type GradientDrawable from './models/GradientDrawable';\nimport type { GradientDrawableOrientation } from './models/GradientDrawable';\nimport type IOSFontInfo from './models/IOSFontInfo';\nimport type {\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n} from './models/IOSFontInfo';\nimport LiveStreamChatEventName from './models/LiveStreamChatEventName';\nimport type LiveStreamEventDetails from './models/LiveStreamEventDetails';\nimport LiveStreamEventName from './models/LiveStreamEventName';\nimport type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type SDKInitOptions from './models/SDKInitOptions';\nimport type { VideoLaunchBehavior } from './models/SDKInitOptions';\nimport type ShoppingCTAResult from './models/ShoppingCTAResult';\nimport type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';\nimport type { StoryBlockSource } from './models/StoryBlockSource';\nimport type TrackPurchaseParameters from './models/TrackPurchaseParameters';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n} from './models/VideoPlayerCTADelay';\nimport type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';\nimport type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';\nimport type { VideoPlayerStyle } from './models/VideoPlayerStyle';\nimport type {\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n ShoppingCTACallback,\n UpdateProductDetailsCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AdConfiguration,\n AndroidFontInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n FeedItemDetails,\n FireworkSDK,\n FWError,\n FWNavigator,\n GradientDrawable,\n GradientDrawableOrientation,\n IOSFontInfo,\n IOSSystemFontStyle,\n IOSSystemFontWeight,\n IStoryBlockMethods,\n IStoryBlockProps,\n IVideoFeedProps,\n LinkButtonConfiguration,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n SDKInitCallback,\n SDKInitEvent,\n SDKInitOptions,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n ShoppingCTACallback,\n ShoppingCTAEvent,\n ShoppingCTAResult,\n StoryBlock,\n StoryBlockConfiguration,\n StoryBlockSource,\n TrackPurchaseParameters,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VastAttribute,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedClickEvent,\n VideoFeedConfiguration,\n VideoFeedMode,\n VideoFeedPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=GradientDrawable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=StoryBlockConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlayerCTADelay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VideoPlayerCTAStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlayerCTAWidth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlayerCompleteAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlayerStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["LiveStreamModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","LiveStreamModule","Proxy","get","Error","LiveStreamModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,gBAAgB,GAAGF,aAAa,CAACE,gBAAd,GACrBF,aAAa,CAACE,gBADO,GAErB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAcA,MAAMK,4BAA4B,GAAG,IAAIP,kBAAJ,CAAuBG,gBAAvB,CAArC;AACA,SAASI,4BAAT;AAEA,eAAeJ,gBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst LiveStreamModule = NativeModules.LiveStreamModule\n ? NativeModules.LiveStreamModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface ILiveStreamModule extends NativeModule {\n init(): void;\n}\nconst LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);\nexport { LiveStreamModuleEventEmitter };\n\nexport default LiveStreamModule as ILiveStreamModule;\n"]}
1
+ {"version":3,"sources":["LiveStreamModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","LiveStreamModule","Proxy","get","Error","LiveStreamModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,gBAAgB,GAAGF,aAAa,CAACE,gBAAd,GACrBF,aAAa,CAACE,gBADO,GAErB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAcA,MAAMK,4BAA4B,GAAG,IAAIP,kBAAJ,CAAuBG,gBAAvB,CAArC;AACA,SAASI,4BAAT;AAEA,eAAeJ,gBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst LiveStreamModule = NativeModules.LiveStreamModule\n ? NativeModules.LiveStreamModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface ILiveStreamModule extends NativeModule {\n init(): Promise<any>;\n}\nconst LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);\nexport { LiveStreamModuleEventEmitter };\n\nexport default LiveStreamModule as ILiveStreamModule;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAKA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AA0BA,MAAMK,0BAA0B,GAAG,IAAIP,kBAAJ,CAAuBG,cAAvB,CAAnC;AACA,SAASI,0BAAT;AAEA,eAAeJ,cAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport type ShoppingCTAResult from '../models/ShoppingCTAResult';\n\nconst ShoppingModule = NativeModules.ShoppingModule\n ? NativeModules.ShoppingModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IShoppingModule extends NativeModule {\n init(): void;\n updateVideoProducts(products: Product[], callbackId: number | string): void;\n updateShoppingCTAResult(\n result: ShoppingCTAResult,\n callbackId: number | string\n ): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n setCustomClickCartIconEnabled(enabled: boolean): Promise<void>; // Only supported on iOS\n clearCallbackId(callbackId: number | string, eventName: string): void; // Only supported on iOS\n setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;\n setCustomClickLinkButtonEnabled(enabled: boolean): Promise<void>;\n}\n\nconst ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);\nexport { ShoppingModuleEventEmitter };\n\nexport default ShoppingModule as IShoppingModule;\n"]}
1
+ {"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAKA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAyBA,MAAMK,0BAA0B,GAAG,IAAIP,kBAAJ,CAAuBG,cAAvB,CAAnC;AACA,SAASI,0BAAT;AAEA,eAAeJ,cAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport type ShoppingCTAResult from '../models/ShoppingCTAResult';\n\nconst ShoppingModule = NativeModules.ShoppingModule\n ? NativeModules.ShoppingModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IShoppingModule extends NativeModule {\n init(): Promise<any>;\n updateVideoProducts(products: Product[], callbackId: number | string): void;\n updateShoppingCTAResult(\n result: ShoppingCTAResult,\n callbackId: number | string\n ): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n clearCallbackId(callbackId: number | string, eventName: string): void; // Only supported on iOS\n setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;\n setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;\n}\n\nconst ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);\nexport { ShoppingModuleEventEmitter };\n\nexport default ShoppingModule as IShoppingModule;\n"]}