react-native-firework-sdk 2.6.1 → 2.7.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 (50) 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.private.swiftinterface +1 -1
  5. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  6. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.swiftinterface +1 -1
  7. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  8. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
  9. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -1
  10. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  11. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
  12. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -1
  13. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  14. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -1
  15. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +17 -17
  16. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +20 -0
  17. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +1 -1
  18. package/ios/Components/StoryBlock.swift +56 -0
  19. package/ios/Components/StoryBlockConfiguration.swift +4 -0
  20. package/ios/Components/VideoPlayerConfiguration.swift +20 -20
  21. package/ios/FireworkVideoUI/FireworkVideoUI.xcodeproj/project.pbxproj +20 -20
  22. package/ios/Modules/FWNavigatorModule/FWNavigatorModule.m +2 -0
  23. package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +65 -0
  24. package/ios/Modules/FWNavigatorModule/FWRNPresentContainerViewController.swift +33 -0
  25. package/ios/Modules/Shopping/ProductInfoViewConfiguration.swift +7 -0
  26. package/ios/Modules/Shopping/ShoppingModule.swift +18 -2
  27. package/lib/commonjs/FWNavigator.js +38 -0
  28. package/lib/commonjs/FWNavigator.js.map +1 -1
  29. package/lib/commonjs/components/StoryBlock.js +4 -0
  30. package/lib/commonjs/components/StoryBlock.js.map +1 -1
  31. package/lib/commonjs/index.js.map +1 -1
  32. package/lib/commonjs/modules/FWNavigatorModule.js.map +1 -1
  33. package/lib/module/FWNavigator.js +37 -0
  34. package/lib/module/FWNavigator.js.map +1 -1
  35. package/lib/module/components/StoryBlock.js +4 -0
  36. package/lib/module/components/StoryBlock.js.map +1 -1
  37. package/lib/module/index.js.map +1 -1
  38. package/lib/module/modules/FWNavigatorModule.js.map +1 -1
  39. package/lib/typescript/FWNavigator.d.ts +16 -0
  40. package/lib/typescript/index.d.ts +2 -2
  41. package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +15 -0
  42. package/lib/typescript/models/StoryBlockConfiguration.d.ts +28 -0
  43. package/lib/typescript/modules/FWNavigatorModule.d.ts +2 -0
  44. package/package.json +1 -1
  45. package/src/FWNavigator.ts +33 -0
  46. package/src/components/StoryBlock.tsx +4 -0
  47. package/src/index.ts +2 -0
  48. package/src/models/ProductInfoViewConfiguration.ts +16 -0
  49. package/src/models/StoryBlockConfiguration.ts +28 -0
  50. package/src/modules/FWNavigatorModule.ts +2 -0
@@ -319,7 +319,8 @@ class ShoppingModule: RCTEventEmitter, FireworkVideoShoppingDelegate {
319
319
  }
320
320
 
321
321
  extension ShoppingModule {
322
- // swiftlint:disable:next cyclomatic_complexity
322
+ // swiftlint:disable cyclomatic_complexity
323
+ // swiftlint:disable function_body_length
323
324
  fileprivate static func hydrateProductViewConfig(
324
325
  _ config: ProductInfoViewConfiguration,
325
326
  _ productInfoViewConfigurator: ProductInfoViewConfigurable
@@ -377,11 +378,26 @@ extension ShoppingModule {
377
378
  productInfoViewConfigurator.productCardConfiguration.ctaConfig.text = .buyNow
378
379
  }
379
380
  }
381
+
382
+ if let cornerRadius = productCardConfiguration.cornerRadius {
383
+ productInfoViewConfigurator.productCardConfiguration.cornerRadius = cornerRadius
384
+ }
385
+
386
+ if let priceConfiguration = productCardConfiguration.priceConfiguration {
387
+ if let isPriceHidden = priceConfiguration.isHidden {
388
+ productInfoViewConfigurator.productCardConfiguration.priceConfiguration.isHidden = isPriceHidden
389
+ }
390
+ }
391
+
392
+ if let isCtaButtonHidden = productCardConfiguration.isCtaButtonHidden {
393
+ productInfoViewConfigurator.productCardConfiguration.ctaConfig.isHidden = isCtaButtonHidden
394
+ }
380
395
  }
381
396
 
382
397
  productInfoViewConfigurator.productDetailsConfiguration = productDetailsConfiguration
383
398
  }
384
-
399
+ // swiftlint:enable cyclomatic_complexity
400
+ // swiftlint:enable function_body_length
385
401
  }
386
402
 
387
403
  extension ShoppingModule {
@@ -9,6 +9,8 @@ var _FWEventName = require("./models/FWEventName");
9
9
 
10
10
  var _FWNavigatorModule = _interopRequireWildcard(require("./modules/FWNavigatorModule"));
11
11
 
12
+ var _reactNative = require("react-native");
13
+
12
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
15
 
14
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -80,6 +82,42 @@ class FWNavigator {
80
82
  async stopFloatingPlayer() {
81
83
  await _FWNavigatorModule.default.stopFloatingPlayer();
82
84
  }
85
+ /**
86
+ * Bring the RN container to top.
87
+ * @returns {Promise<boolean>} The result of presenting the RN container.
88
+ * If the result is true, it means that the RN container is presented.
89
+ * If the result is false, it means that the RN container is not presented.
90
+ * Only supported on iOS
91
+ */
92
+
93
+
94
+ async bringRNContainerToTop() {
95
+ if (_reactNative.Platform.OS !== 'ios') {
96
+ return false;
97
+ }
98
+
99
+ return _FWNavigatorModule.default.bringRNContainerToTop();
100
+ }
101
+ /**
102
+ * Bring the RN container to bottom.
103
+ * @returns {Promise<boolean>} The result of dismissing the RN container.
104
+ * If the result is true, it means that the RN container is dismissed.
105
+ * If the result is false, it means that the RN container is not dismissed.
106
+ * Only supported on iOS
107
+ */
108
+
109
+
110
+ async bringRNContainerToBottom() {
111
+ if (_reactNative.Platform.OS !== 'ios') {
112
+ return false;
113
+ }
114
+
115
+ if (_reactNative.Platform.OS === 'ios') {
116
+ await new Promise(resolve => setTimeout(resolve, 10));
117
+ }
118
+
119
+ return _FWNavigatorModule.default.bringRNContainerToBottom();
120
+ }
83
121
 
84
122
  }
85
123
 
@@ -1 +1 @@
1
- {"version":3,"sources":["FWNavigator.ts"],"names":["FWNavigator","getInstance","_instance","constructor","FWNavigatorModuleEventEmitter","addListener","FWEventName","LogMessage","pushRNContainer","params","FWNavigatorModule","popRNContainer","popNativeContainer","startFloatingPlayer","stopFloatingPlayer"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;;;AAIA;AACA;AACA;AACA,MAAMA,WAAN,CAAkB;AAGS,SAAXC,WAAW,GAAgB;AACvC,QAAI,CAACD,WAAW,CAACE,SAAjB,EAA4B;AAC1BF,MAAAA,WAAW,CAACE,SAAZ,GAAwB,IAAIF,WAAJ,EAAxB;AACD;;AACD,WAAOA,WAAW,CAACE,SAAnB;AACD;;AAEOC,EAAAA,WAAW,GAAG;AACpBC,qDAA8BC,WAA9B,CAA0CC,yBAAYC,UAAtD,EAAkE,MAAM,CAAE,CAA1E;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,eAAe,CAACC,MAAD,EAAkD;AACtE,WAAOC,2BAAkBF,eAAlB,CAAkCC,MAAlC,CAAP;AACD;AAED;AACF;AACA;AACA;;;AACSE,EAAAA,cAAc,GAAqB;AACxC,WAAOD,2BAAkBC,cAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,kBAAkB,GAAqB;AAC5C,WAAOF,2BAAkBE,kBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACkC,QAAnBC,mBAAmB,GAAqB;AACnD,WAAOH,2BAAkBG,mBAAlB,EAAP;AACD;AAED;AACF;AACA;;;AACiC,QAAlBC,kBAAkB,GAAkB;AAC/C,UAAMJ,2BAAkBI,kBAAlB,EAAN;AACD;;AAzDe;;gBAAZd,W;;eA4DSA,W","sourcesContent":["import { FWEventName } from './models/FWEventName';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport FWNavigatorModule, {\n FWNavigatorModuleEventEmitter,\n} from './modules/FWNavigatorModule';\n\n/**\n * You can use this class for pushing RN page from the native page.\n */\nclass FWNavigator {\n private static _instance?: FWNavigator;\n\n public static getInstance(): FWNavigator {\n if (!FWNavigator._instance) {\n FWNavigator._instance = new FWNavigator();\n }\n return FWNavigator._instance!;\n }\n\n private constructor() {\n FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});\n }\n\n /**\n * Push a new RN container.\n * You could use this method to make a RN page on top of\n * SDK full-screen player.\n * @param params {PushRNContainerParams}\n * @returns {Promise<boolean>} The result of pushing a new Container.\n */\n public pushRNContainer(params: PushRNContainerParams): Promise<boolean> {\n return FWNavigatorModule.pushRNContainer(params);\n }\n\n /**\n * Pop the RN container you pushed before.\n * @returns {Promise<boolean>} The result of popping a new Container.\n */\n public popRNContainer(): Promise<boolean> {\n return FWNavigatorModule.popRNContainer();\n }\n\n /**\n * Pop the native container. You could use the method to close the fullscreen player.\n * But if the enablePictureInPicture of the associated video feed is true,\n * we can't close the fullscreen player.\n * @returns {Promise<boolean>} The result of popping the native container.\n */\n public popNativeContainer(): Promise<boolean> {\n return FWNavigatorModule.popNativeContainer();\n }\n\n /**\n * Change current fullscreen player to floating player.\n * @returns {Promise<boolean>} If the result is true, it means that the fullscreen\n * player is changed to floating player.\n */\n public async startFloatingPlayer(): Promise<boolean> {\n return FWNavigatorModule.startFloatingPlayer();\n }\n\n /**\n * Stop current floating player.\n */\n public async stopFloatingPlayer(): Promise<void> {\n await FWNavigatorModule.stopFloatingPlayer();\n }\n}\n\nexport default FWNavigator;\n"]}
1
+ {"version":3,"sources":["FWNavigator.ts"],"names":["FWNavigator","getInstance","_instance","constructor","FWNavigatorModuleEventEmitter","addListener","FWEventName","LogMessage","pushRNContainer","params","FWNavigatorModule","popRNContainer","popNativeContainer","startFloatingPlayer","stopFloatingPlayer","bringRNContainerToTop","Platform","OS","bringRNContainerToBottom","Promise","resolve","setTimeout"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;;;AAEA;AACA;AACA;AACA,MAAMA,WAAN,CAAkB;AAGS,SAAXC,WAAW,GAAgB;AACvC,QAAI,CAACD,WAAW,CAACE,SAAjB,EAA4B;AAC1BF,MAAAA,WAAW,CAACE,SAAZ,GAAwB,IAAIF,WAAJ,EAAxB;AACD;;AACD,WAAOA,WAAW,CAACE,SAAnB;AACD;;AAEOC,EAAAA,WAAW,GAAG;AACpBC,qDAA8BC,WAA9B,CAA0CC,yBAAYC,UAAtD,EAAkE,MAAM,CAAE,CAA1E;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,eAAe,CAACC,MAAD,EAAkD;AACtE,WAAOC,2BAAkBF,eAAlB,CAAkCC,MAAlC,CAAP;AACD;AAED;AACF;AACA;AACA;;;AACSE,EAAAA,cAAc,GAAqB;AACxC,WAAOD,2BAAkBC,cAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,kBAAkB,GAAqB;AAC5C,WAAOF,2BAAkBE,kBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACkC,QAAnBC,mBAAmB,GAAqB;AACnD,WAAOH,2BAAkBG,mBAAlB,EAAP;AACD;AAED;AACF;AACA;;;AACiC,QAAlBC,kBAAkB,GAAkB;AAC/C,UAAMJ,2BAAkBI,kBAAlB,EAAN;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACoC,QAArBC,qBAAqB,GAAqB;AACrD,QAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,aAAO,KAAP;AACD;;AACD,WAAOP,2BAAkBK,qBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACuC,QAAxBG,wBAAwB,GAAqB;AACxD,QAAIF,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,aAAO,KAAP;AACD;;AACD,QAAID,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzB,YAAM,IAAIE,OAAJ,CAAaC,OAAD,IAAaC,UAAU,CAACD,OAAD,EAAU,EAAV,CAAnC,CAAN;AACD;;AAED,WAAOV,2BAAkBQ,wBAAlB,EAAP;AACD;;AAzFe;;gBAAZlB,W;;eA4FSA,W","sourcesContent":["import { FWEventName } from './models/FWEventName';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport FWNavigatorModule, {\n FWNavigatorModuleEventEmitter,\n} from './modules/FWNavigatorModule';\nimport { Platform } from 'react-native';\n\n/**\n * You can use this class for pushing RN page from the native page.\n */\nclass FWNavigator {\n private static _instance?: FWNavigator;\n\n public static getInstance(): FWNavigator {\n if (!FWNavigator._instance) {\n FWNavigator._instance = new FWNavigator();\n }\n return FWNavigator._instance!;\n }\n\n private constructor() {\n FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});\n }\n\n /**\n * Push a new RN container.\n * You could use this method to make a RN page on top of\n * SDK full-screen player.\n * @param params {PushRNContainerParams}\n * @returns {Promise<boolean>} The result of pushing a new Container.\n */\n public pushRNContainer(params: PushRNContainerParams): Promise<boolean> {\n return FWNavigatorModule.pushRNContainer(params);\n }\n\n /**\n * Pop the RN container you pushed before.\n * @returns {Promise<boolean>} The result of popping a new Container.\n */\n public popRNContainer(): Promise<boolean> {\n return FWNavigatorModule.popRNContainer();\n }\n\n /**\n * Pop the native container. You could use the method to close the fullscreen player.\n * But if the enablePictureInPicture of the associated video feed is true,\n * we can't close the fullscreen player.\n * @returns {Promise<boolean>} The result of popping the native container.\n */\n public popNativeContainer(): Promise<boolean> {\n return FWNavigatorModule.popNativeContainer();\n }\n\n /**\n * Change current fullscreen player to floating player.\n * @returns {Promise<boolean>} If the result is true, it means that the fullscreen\n * player is changed to floating player.\n */\n public async startFloatingPlayer(): Promise<boolean> {\n return FWNavigatorModule.startFloatingPlayer();\n }\n\n /**\n * Stop current floating player.\n */\n public async stopFloatingPlayer(): Promise<void> {\n await FWNavigatorModule.stopFloatingPlayer();\n }\n\n /**\n * Bring the RN container to top.\n * @returns {Promise<boolean>} The result of presenting the RN container.\n * If the result is true, it means that the RN container is presented.\n * If the result is false, it means that the RN container is not presented.\n * Only supported on iOS\n */\n public async bringRNContainerToTop(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n return false;\n }\n return FWNavigatorModule.bringRNContainerToTop();\n }\n\n /**\n * Bring the RN container to bottom.\n * @returns {Promise<boolean>} The result of dismissing the RN container.\n * If the result is true, it means that the RN container is dismissed.\n * If the result is false, it means that the RN container is not dismissed.\n * Only supported on iOS\n */\n public async bringRNContainerToBottom(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n return false;\n }\n if (Platform.OS === 'ios') {\n await new Promise((resolve) => setTimeout(resolve, 10));\n }\n\n return FWNavigatorModule.bringRNContainerToBottom();\n }\n}\n\nexport default FWNavigator;\n"]}
@@ -176,9 +176,11 @@ const StoryBlock = (props, forwardedRef) => {
176
176
  adConfiguration
177
177
  } = props;
178
178
  const dynamicContentParametersString = generateDynamicContentParametersString();
179
+ const playerStyle = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.playerStyle;
179
180
  const videoCompleteAction = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.videoCompleteAction;
180
181
  const showShareButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showShareButton;
181
182
  const showPlaybackButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showPlaybackButton;
183
+ const showMuteButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showMuteButton;
182
184
  const showBranding = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showBranding;
183
185
  const ctaDelayType = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat === void 0 ? void 0 : _storyBlockConfigurat.type;
184
186
  const ctaDelayValue = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat2 = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat2 === void 0 ? void 0 : (_storyBlockConfigurat3 = _storyBlockConfigurat2.value) === null || _storyBlockConfigurat3 === void 0 ? void 0 : _storyBlockConfigurat3.toFixed(5);
@@ -216,9 +218,11 @@ const StoryBlock = (props, forwardedRef) => {
216
218
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
217
219
  key += `_cornerRadius:${cornerRadius}`;
218
220
  key += `_shareBaseURL:${shareBaseURL}`;
221
+ key += `_playerStyle:${playerStyle}`;
219
222
  key += `_videoCompleteAction:${videoCompleteAction}`;
220
223
  key += `_showShareButton:${showShareButton}`;
221
224
  key += `_showPlaybackButton:${showPlaybackButton}`;
225
+ key += `_showMuteButton:${showMuteButton}`;
222
226
  key += `_showBranding:${showBranding}`;
223
227
  key += `_ctaDelayType:${ctaDelayType}`;
224
228
  key += `_ctaDelayValue:${ctaDelayValue}`;
@@ -1 +1 @@
1
- {"version":3,"sources":["StoryBlock.tsx"],"names":["NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","sdkInitCalled","setSdkInitCalled","FWGlobalState","getInstance","forceUpdate","x","handleStoryBlockLoadFinished","event","FWLoggerUtil","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullScreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","getStoryBlockConfiguration","storyBlockConfiguration","enablePictureInPicture","resultStoryBlockConfiguration","generateKey","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","productIds","contentId","cornerRadius","dynamicContentParametersString","videoCompleteAction","showShareButton","showPlaybackButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","Platform","OS","sendCommand","command","nativeNodeHandle","current","commandId","UIManager","getViewManagerConfig","Commands","toString","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","BackHandler","addEventListener","style","otherProps","assign","borderRadius","undefined"],"mappings":";;;;;;;AACA;;AASA;;AAUA;;AAGA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG,cAA5B;;AA0EA,MAAMC,UAGL,GAAG,CAACC,KAAD,EAA0BC,YAA1B,KAA2C;AAC7C,QAAMC,kBAAkB,GAAG,mBAAO,IAAP,CAA3B;AACA,QAAM,CAACC,iBAAD,EAAoBC,oBAApB,IAA4C,qBAAkB,KAAlB,CAAlD;AACA,QAAM,CAACC,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ardRef,\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 StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';\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 * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * The corner radius of story block.\n */\n cornerRadius?: number;\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 getStoryBlockConfiguration: () =>\n | StoryBlockNativeConfiguration\n | undefined = () => {\n const { storyBlockConfiguration, enablePictureInPicture } = props;\n let resultStoryBlockConfiguration:\n | StoryBlockNativeConfiguration\n | undefined = storyBlockConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultStoryBlockConfiguration) {\n resultStoryBlockConfiguration = {};\n }\n resultStoryBlockConfiguration = {\n ...resultStoryBlockConfiguration,\n enablePictureInPicture,\n };\n }\n return resultStoryBlockConfiguration;\n };\n const storyBlockConfiguration = getStoryBlockConfiguration();\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = 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;\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n hashtagFilterExpression,\n productIds,\n contentId,\n enablePictureInPicture,\n cornerRadius,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;\n const showShareButton = storyBlockConfiguration?.showShareButton;\n const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;\n const showBranding = storyBlockConfiguration?.showBranding;\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;\n const ctaDelayValue = 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 const showVideoDetailTitle = storyBlockConfiguration?.showVideoDetailTitle;\n\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\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 += `productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n key += `_cornerRadius:${cornerRadius}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\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 key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\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 const { style, cornerRadius, ...otherProps } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...otherProps}\n cornerRadius={cornerRadius}\n style={Object.assign({ borderRadius: cornerRadius }, style)}\n storyBlockConfiguration={storyBlockConfiguration}\n enablePictureInPicture={undefined}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
1
+ {"version":3,"sources":["StoryBlock.tsx"],"names":["NativeComponentName","StoryBlock","props","forwardedRef","nativeComponentRef","isFullscreenState","setIsFullscreenState","sdkInitCalled","setSdkInitCalled","FWGlobalState","getInstance","forceUpdate","x","handleStoryBlockLoadFinished","event","FWLoggerUtil","log","nativeEvent","name","onStoryBlockLoadFinished","reason","handleStoryBlockFullScreenStateChanged","isFullScreen","generateDynamicContentParametersString","dynamicContentParameters","resultString","sortedKeyList","Object","keys","sort","key","value","valueString","join","length","generateVastAttributesString","adConfiguration","vastAttributes","attribute","getStoryBlockConfiguration","storyBlockConfiguration","enablePictureInPicture","resultStoryBlockConfiguration","generateKey","gShareBaseURL","FireworkSDK","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","productIds","contentId","cornerRadius","dynamicContentParametersString","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","showVideoDetailTitle","requiresAds","adsFetchTimeout","vastAttributesString","Platform","OS","sendCommand","command","nativeNodeHandle","current","commandId","UIManager","getViewManagerConfig","Commands","toString","dispatchViewManagerCommand","play","pause","subscriptionOfShareBaseURLUpdated","FireworkSDKModuleEventEmitter","addListener","FWEventName","ShareBaseURLUpdated","subscriptionOfAdBadgeConfigurationUpdated","AdBadgeConfigurationUpdated","subscriptionOfVideoLaunchBehaviorUpdated","VideoLaunchBehaviorUpdated","subscriptionOfAppLanguageUpdated","AppLanguageUpdated","remove","setTimeout","viewId","create","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","BackHandler","addEventListener","style","otherProps","assign","borderRadius","undefined"],"mappings":";;;;;;;AACA;;AASA;;AAUA;;AAGA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA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C;AACA,sBACE,6BAAC,qBAAD;AACE,IAAA,GAAG,EAAEE,kBADP;AAEE,IAAA,GAAG,EAAE0B;AAFP,KAGMgG,UAHN;AAIE,IAAA,YAAY,EAAE3D,YAJhB;AAKE,IAAA,KAAK,EAAExC,MAAM,CAACoG,MAAP,CAAc;AAAEC,MAAAA,YAAY,EAAE7D;AAAhB,KAAd,EAA8C0D,KAA9C,CALT;AAME,IAAA,uBAAuB,EAAErF,uBAN3B;AAOE,IAAA,sBAAsB,EAAEyF,SAP1B;AAQE,IAAA,wBAAwB,EAAEpH,4BAR5B;AASE,IAAA,kCAAkC,EAChCQ;AAVJ,KADF;AAeD,CA7UD;;4BA+Ue,uBAAWpB,UAAX,C","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 StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';\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 * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * The corner radius of story block.\n */\n cornerRadius?: number;\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 getStoryBlockConfiguration: () =>\n | StoryBlockNativeConfiguration\n | undefined = () => {\n const { storyBlockConfiguration, enablePictureInPicture } = props;\n let resultStoryBlockConfiguration:\n | StoryBlockNativeConfiguration\n | undefined = storyBlockConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultStoryBlockConfiguration) {\n resultStoryBlockConfiguration = {};\n }\n resultStoryBlockConfiguration = {\n ...resultStoryBlockConfiguration,\n enablePictureInPicture,\n };\n }\n return resultStoryBlockConfiguration;\n };\n const storyBlockConfiguration = getStoryBlockConfiguration();\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = 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;\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n hashtagFilterExpression,\n productIds,\n contentId,\n enablePictureInPicture,\n cornerRadius,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const playerStyle = storyBlockConfiguration?.playerStyle;\n const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;\n const showShareButton = storyBlockConfiguration?.showShareButton;\n const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;\n const showMuteButton = storyBlockConfiguration?.showMuteButton;\n const showBranding = storyBlockConfiguration?.showBranding;\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;\n const ctaDelayValue = 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 const showVideoDetailTitle = storyBlockConfiguration?.showVideoDetailTitle;\n\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\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 += `productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n key += `_cornerRadius:${cornerRadius}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\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 key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\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 const { style, cornerRadius, ...otherProps } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...otherProps}\n cornerRadius={cornerRadius}\n style={Object.assign({ borderRadius: cornerRadius }, style)}\n storyBlockConfiguration={storyBlockConfiguration}\n enablePictureInPicture={undefined}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AAOA;;AACA;;AAKA;;AA4BA;;AAEA;;AAiCA;;AAkBA;;;;eAEeA,oB","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 ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\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 VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\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 CustomTapProductCardCallback,\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 ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\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 VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AAEA;;AAOA;;AACA;;AAKA;;AA4BA;;AAEA;;AAkCA;;AAkBA;;;;eAEeA,oB","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 ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardPriceConfiguration,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\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 VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\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 CustomTapProductCardCallback,\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 ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardPriceConfiguration,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\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 VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["FWNavigatorModule.ts"],"names":["FWNavigatorModule","NativeModules","Proxy","get","Error","LINKING_ERROR","FWNavigatorModuleEventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA,MAAMA,iBAAiB,GAAGC,2BAAcD,iBAAd,GACtBC,2BAAcD,iBADQ,GAEtB,IAAIE,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUC,6BAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAmBA,MAAMC,6BAA6B,GAAG,IAAIC,+BAAJ,CAAuBP,iBAAvB,CAAtC;;eAEeA,iB","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type PushRNContainerParams from '../models/PushRNContainerParams';\n\nconst FWNavigatorModule = NativeModules.FWNavigatorModule\n ? NativeModules.FWNavigatorModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\ninterface IFWNavigatorModule extends NativeModule {\n pushRNContainer(params: PushRNContainerParams): Promise<boolean>;\n popRNContainer(): Promise<boolean>;\n popNativeContainer(): Promise<boolean>;\n canPopNativeContainer(): Promise<boolean>;\n startFloatingPlayer(): Promise<boolean>;\n stopFloatingPlayer(): Promise<boolean>;\n}\n\nconst FWNavigatorModuleEventEmitter = new NativeEventEmitter(FWNavigatorModule);\nexport { FWNavigatorModuleEventEmitter };\nexport default FWNavigatorModule as IFWNavigatorModule;\n"]}
1
+ {"version":3,"sources":["FWNavigatorModule.ts"],"names":["FWNavigatorModule","NativeModules","Proxy","get","Error","LINKING_ERROR","FWNavigatorModuleEventEmitter","NativeEventEmitter"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA,MAAMA,iBAAiB,GAAGC,2BAAcD,iBAAd,GACtBC,2BAAcD,iBADQ,GAEtB,IAAIE,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUC,6BAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAqBA,MAAMC,6BAA6B,GAAG,IAAIC,+BAAJ,CAAuBP,iBAAvB,CAAtC;;eAEeA,iB","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type PushRNContainerParams from '../models/PushRNContainerParams';\n\nconst FWNavigatorModule = NativeModules.FWNavigatorModule\n ? NativeModules.FWNavigatorModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\ninterface IFWNavigatorModule extends NativeModule {\n pushRNContainer(params: PushRNContainerParams): Promise<boolean>;\n popRNContainer(): Promise<boolean>;\n popNativeContainer(): Promise<boolean>;\n canPopNativeContainer(): Promise<boolean>;\n startFloatingPlayer(): Promise<boolean>;\n stopFloatingPlayer(): Promise<boolean>;\n bringRNContainerToTop(): Promise<boolean>;\n bringRNContainerToBottom(): Promise<boolean>;\n}\n\nconst FWNavigatorModuleEventEmitter = new NativeEventEmitter(FWNavigatorModule);\nexport { FWNavigatorModuleEventEmitter };\nexport default FWNavigatorModule as IFWNavigatorModule;\n"]}
@@ -2,6 +2,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  import { FWEventName } from './models/FWEventName';
4
4
  import FWNavigatorModule, { FWNavigatorModuleEventEmitter } from './modules/FWNavigatorModule';
5
+ import { Platform } from 'react-native';
5
6
  /**
6
7
  * You can use this class for pushing RN page from the native page.
7
8
  */
@@ -68,6 +69,42 @@ class FWNavigator {
68
69
  async stopFloatingPlayer() {
69
70
  await FWNavigatorModule.stopFloatingPlayer();
70
71
  }
72
+ /**
73
+ * Bring the RN container to top.
74
+ * @returns {Promise<boolean>} The result of presenting the RN container.
75
+ * If the result is true, it means that the RN container is presented.
76
+ * If the result is false, it means that the RN container is not presented.
77
+ * Only supported on iOS
78
+ */
79
+
80
+
81
+ async bringRNContainerToTop() {
82
+ if (Platform.OS !== 'ios') {
83
+ return false;
84
+ }
85
+
86
+ return FWNavigatorModule.bringRNContainerToTop();
87
+ }
88
+ /**
89
+ * Bring the RN container to bottom.
90
+ * @returns {Promise<boolean>} The result of dismissing the RN container.
91
+ * If the result is true, it means that the RN container is dismissed.
92
+ * If the result is false, it means that the RN container is not dismissed.
93
+ * Only supported on iOS
94
+ */
95
+
96
+
97
+ async bringRNContainerToBottom() {
98
+ if (Platform.OS !== 'ios') {
99
+ return false;
100
+ }
101
+
102
+ if (Platform.OS === 'ios') {
103
+ await new Promise(resolve => setTimeout(resolve, 10));
104
+ }
105
+
106
+ return FWNavigatorModule.bringRNContainerToBottom();
107
+ }
71
108
 
72
109
  }
73
110
 
@@ -1 +1 @@
1
- {"version":3,"sources":["FWNavigator.ts"],"names":["FWEventName","FWNavigatorModule","FWNavigatorModuleEventEmitter","FWNavigator","getInstance","_instance","constructor","addListener","LogMessage","pushRNContainer","params","popRNContainer","popNativeContainer","startFloatingPlayer","stopFloatingPlayer"],"mappings":";;AAAA,SAASA,WAAT,QAA4B,sBAA5B;AAEA,OAAOC,iBAAP,IACEC,6BADF,QAEO,6BAFP;AAIA;AACA;AACA;;AACA,MAAMC,WAAN,CAAkB;AAGS,SAAXC,WAAW,GAAgB;AACvC,QAAI,CAACD,WAAW,CAACE,SAAjB,EAA4B;AAC1BF,MAAAA,WAAW,CAACE,SAAZ,GAAwB,IAAIF,WAAJ,EAAxB;AACD;;AACD,WAAOA,WAAW,CAACE,SAAnB;AACD;;AAEOC,EAAAA,WAAW,GAAG;AACpBJ,IAAAA,6BAA6B,CAACK,WAA9B,CAA0CP,WAAW,CAACQ,UAAtD,EAAkE,MAAM,CAAE,CAA1E;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,eAAe,CAACC,MAAD,EAAkD;AACtE,WAAOT,iBAAiB,CAACQ,eAAlB,CAAkCC,MAAlC,CAAP;AACD;AAED;AACF;AACA;AACA;;;AACSC,EAAAA,cAAc,GAAqB;AACxC,WAAOV,iBAAiB,CAACU,cAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,kBAAkB,GAAqB;AAC5C,WAAOX,iBAAiB,CAACW,kBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACkC,QAAnBC,mBAAmB,GAAqB;AACnD,WAAOZ,iBAAiB,CAACY,mBAAlB,EAAP;AACD;AAED;AACF;AACA;;;AACiC,QAAlBC,kBAAkB,GAAkB;AAC/C,UAAMb,iBAAiB,CAACa,kBAAlB,EAAN;AACD;;AAzDe;;gBAAZX,W;;AA4DN,eAAeA,WAAf","sourcesContent":["import { FWEventName } from './models/FWEventName';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport FWNavigatorModule, {\n FWNavigatorModuleEventEmitter,\n} from './modules/FWNavigatorModule';\n\n/**\n * You can use this class for pushing RN page from the native page.\n */\nclass FWNavigator {\n private static _instance?: FWNavigator;\n\n public static getInstance(): FWNavigator {\n if (!FWNavigator._instance) {\n FWNavigator._instance = new FWNavigator();\n }\n return FWNavigator._instance!;\n }\n\n private constructor() {\n FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});\n }\n\n /**\n * Push a new RN container.\n * You could use this method to make a RN page on top of\n * SDK full-screen player.\n * @param params {PushRNContainerParams}\n * @returns {Promise<boolean>} The result of pushing a new Container.\n */\n public pushRNContainer(params: PushRNContainerParams): Promise<boolean> {\n return FWNavigatorModule.pushRNContainer(params);\n }\n\n /**\n * Pop the RN container you pushed before.\n * @returns {Promise<boolean>} The result of popping a new Container.\n */\n public popRNContainer(): Promise<boolean> {\n return FWNavigatorModule.popRNContainer();\n }\n\n /**\n * Pop the native container. You could use the method to close the fullscreen player.\n * But if the enablePictureInPicture of the associated video feed is true,\n * we can't close the fullscreen player.\n * @returns {Promise<boolean>} The result of popping the native container.\n */\n public popNativeContainer(): Promise<boolean> {\n return FWNavigatorModule.popNativeContainer();\n }\n\n /**\n * Change current fullscreen player to floating player.\n * @returns {Promise<boolean>} If the result is true, it means that the fullscreen\n * player is changed to floating player.\n */\n public async startFloatingPlayer(): Promise<boolean> {\n return FWNavigatorModule.startFloatingPlayer();\n }\n\n /**\n * Stop current floating player.\n */\n public async stopFloatingPlayer(): Promise<void> {\n await FWNavigatorModule.stopFloatingPlayer();\n }\n}\n\nexport default FWNavigator;\n"]}
1
+ {"version":3,"sources":["FWNavigator.ts"],"names":["FWEventName","FWNavigatorModule","FWNavigatorModuleEventEmitter","Platform","FWNavigator","getInstance","_instance","constructor","addListener","LogMessage","pushRNContainer","params","popRNContainer","popNativeContainer","startFloatingPlayer","stopFloatingPlayer","bringRNContainerToTop","OS","bringRNContainerToBottom","Promise","resolve","setTimeout"],"mappings":";;AAAA,SAASA,WAAT,QAA4B,sBAA5B;AAEA,OAAOC,iBAAP,IACEC,6BADF,QAEO,6BAFP;AAGA,SAASC,QAAT,QAAyB,cAAzB;AAEA;AACA;AACA;;AACA,MAAMC,WAAN,CAAkB;AAGS,SAAXC,WAAW,GAAgB;AACvC,QAAI,CAACD,WAAW,CAACE,SAAjB,EAA4B;AAC1BF,MAAAA,WAAW,CAACE,SAAZ,GAAwB,IAAIF,WAAJ,EAAxB;AACD;;AACD,WAAOA,WAAW,CAACE,SAAnB;AACD;;AAEOC,EAAAA,WAAW,GAAG;AACpBL,IAAAA,6BAA6B,CAACM,WAA9B,CAA0CR,WAAW,CAACS,UAAtD,EAAkE,MAAM,CAAE,CAA1E;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,eAAe,CAACC,MAAD,EAAkD;AACtE,WAAOV,iBAAiB,CAACS,eAAlB,CAAkCC,MAAlC,CAAP;AACD;AAED;AACF;AACA;AACA;;;AACSC,EAAAA,cAAc,GAAqB;AACxC,WAAOX,iBAAiB,CAACW,cAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;;;AACSC,EAAAA,kBAAkB,GAAqB;AAC5C,WAAOZ,iBAAiB,CAACY,kBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;;;AACkC,QAAnBC,mBAAmB,GAAqB;AACnD,WAAOb,iBAAiB,CAACa,mBAAlB,EAAP;AACD;AAED;AACF;AACA;;;AACiC,QAAlBC,kBAAkB,GAAkB;AAC/C,UAAMd,iBAAiB,CAACc,kBAAlB,EAAN;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACoC,QAArBC,qBAAqB,GAAqB;AACrD,QAAIb,QAAQ,CAACc,EAAT,KAAgB,KAApB,EAA2B;AACzB,aAAO,KAAP;AACD;;AACD,WAAOhB,iBAAiB,CAACe,qBAAlB,EAAP;AACD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;;;AACuC,QAAxBE,wBAAwB,GAAqB;AACxD,QAAIf,QAAQ,CAACc,EAAT,KAAgB,KAApB,EAA2B;AACzB,aAAO,KAAP;AACD;;AACD,QAAId,QAAQ,CAACc,EAAT,KAAgB,KAApB,EAA2B;AACzB,YAAM,IAAIE,OAAJ,CAAaC,OAAD,IAAaC,UAAU,CAACD,OAAD,EAAU,EAAV,CAAnC,CAAN;AACD;;AAED,WAAOnB,iBAAiB,CAACiB,wBAAlB,EAAP;AACD;;AAzFe;;gBAAZd,W;;AA4FN,eAAeA,WAAf","sourcesContent":["import { FWEventName } from './models/FWEventName';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport FWNavigatorModule, {\n FWNavigatorModuleEventEmitter,\n} from './modules/FWNavigatorModule';\nimport { Platform } from 'react-native';\n\n/**\n * You can use this class for pushing RN page from the native page.\n */\nclass FWNavigator {\n private static _instance?: FWNavigator;\n\n public static getInstance(): FWNavigator {\n if (!FWNavigator._instance) {\n FWNavigator._instance = new FWNavigator();\n }\n return FWNavigator._instance!;\n }\n\n private constructor() {\n FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});\n }\n\n /**\n * Push a new RN container.\n * You could use this method to make a RN page on top of\n * SDK full-screen player.\n * @param params {PushRNContainerParams}\n * @returns {Promise<boolean>} The result of pushing a new Container.\n */\n public pushRNContainer(params: PushRNContainerParams): Promise<boolean> {\n return FWNavigatorModule.pushRNContainer(params);\n }\n\n /**\n * Pop the RN container you pushed before.\n * @returns {Promise<boolean>} The result of popping a new Container.\n */\n public popRNContainer(): Promise<boolean> {\n return FWNavigatorModule.popRNContainer();\n }\n\n /**\n * Pop the native container. You could use the method to close the fullscreen player.\n * But if the enablePictureInPicture of the associated video feed is true,\n * we can't close the fullscreen player.\n * @returns {Promise<boolean>} The result of popping the native container.\n */\n public popNativeContainer(): Promise<boolean> {\n return FWNavigatorModule.popNativeContainer();\n }\n\n /**\n * Change current fullscreen player to floating player.\n * @returns {Promise<boolean>} If the result is true, it means that the fullscreen\n * player is changed to floating player.\n */\n public async startFloatingPlayer(): Promise<boolean> {\n return FWNavigatorModule.startFloatingPlayer();\n }\n\n /**\n * Stop current floating player.\n */\n public async stopFloatingPlayer(): Promise<void> {\n await FWNavigatorModule.stopFloatingPlayer();\n }\n\n /**\n * Bring the RN container to top.\n * @returns {Promise<boolean>} The result of presenting the RN container.\n * If the result is true, it means that the RN container is presented.\n * If the result is false, it means that the RN container is not presented.\n * Only supported on iOS\n */\n public async bringRNContainerToTop(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n return false;\n }\n return FWNavigatorModule.bringRNContainerToTop();\n }\n\n /**\n * Bring the RN container to bottom.\n * @returns {Promise<boolean>} The result of dismissing the RN container.\n * If the result is true, it means that the RN container is dismissed.\n * If the result is false, it means that the RN container is not dismissed.\n * Only supported on iOS\n */\n public async bringRNContainerToBottom(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n return false;\n }\n if (Platform.OS === 'ios') {\n await new Promise((resolve) => setTimeout(resolve, 10));\n }\n\n return FWNavigatorModule.bringRNContainerToBottom();\n }\n}\n\nexport default FWNavigator;\n"]}
@@ -149,9 +149,11 @@ const StoryBlock = (props, forwardedRef) => {
149
149
  adConfiguration
150
150
  } = props;
151
151
  const dynamicContentParametersString = generateDynamicContentParametersString();
152
+ const playerStyle = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.playerStyle;
152
153
  const videoCompleteAction = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.videoCompleteAction;
153
154
  const showShareButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showShareButton;
154
155
  const showPlaybackButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showPlaybackButton;
156
+ const showMuteButton = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showMuteButton;
155
157
  const showBranding = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : storyBlockConfiguration.showBranding;
156
158
  const ctaDelayType = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat === void 0 ? void 0 : _storyBlockConfigurat.type;
157
159
  const ctaDelayValue = storyBlockConfiguration === null || storyBlockConfiguration === void 0 ? void 0 : (_storyBlockConfigurat2 = storyBlockConfiguration.ctaDelay) === null || _storyBlockConfigurat2 === void 0 ? void 0 : (_storyBlockConfigurat3 = _storyBlockConfigurat2.value) === null || _storyBlockConfigurat3 === void 0 ? void 0 : _storyBlockConfigurat3.toFixed(5);
@@ -189,9 +191,11 @@ const StoryBlock = (props, forwardedRef) => {
189
191
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
190
192
  key += `_cornerRadius:${cornerRadius}`;
191
193
  key += `_shareBaseURL:${shareBaseURL}`;
194
+ key += `_playerStyle:${playerStyle}`;
192
195
  key += `_videoCompleteAction:${videoCompleteAction}`;
193
196
  key += `_showShareButton:${showShareButton}`;
194
197
  key += `_showPlaybackButton:${showPlaybackButton}`;
198
+ key += `_showMuteButton:${showMuteButton}`;
195
199
  key += `_showBranding:${showBranding}`;
196
200
  key += `_ctaDelayType:${ctaDelayType}`;
197
201
  key += `_ctaDelayValue:${ctaDelayValue}`;
@@ -1 +1 @@
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","getStoryBlockConfiguration","storyBlockConfiguration","enablePictureInPicture","resultStoryBlockConfiguration","generateKey","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","productIds","contentId","cornerRadius","dynamicContentParametersString","videoCompleteAction","showShareButton","showPlaybackButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","showVideoDetailTitle","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","sdkInitCalledPromise","then","onBackPress","navigator","popNativeContainer","subscription","addEventListener","style","otherProps","assign","borderRadius","undefined"],"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;AAIA,SAASC,6BAAT,QAA8C,8BAA9C;AACA,OAAOC,aAAP,MAA0B,wBAA1B;AACA,OAAOC,YAAP,MAAyB,uBAAzB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AAEA,MAAMC,mBAAmB,GAAG,cAA5B;;AA0EA,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,M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AAD,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 StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';\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 * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * The corner radius of story block.\n */\n cornerRadius?: number;\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 getStoryBlockConfiguration: () =>\n | StoryBlockNativeConfiguration\n | undefined = () => {\n const { storyBlockConfiguration, enablePictureInPicture } = props;\n let resultStoryBlockConfiguration:\n | StoryBlockNativeConfiguration\n | undefined = storyBlockConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultStoryBlockConfiguration) {\n resultStoryBlockConfiguration = {};\n }\n resultStoryBlockConfiguration = {\n ...resultStoryBlockConfiguration,\n enablePictureInPicture,\n };\n }\n return resultStoryBlockConfiguration;\n };\n const storyBlockConfiguration = getStoryBlockConfiguration();\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = 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;\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n hashtagFilterExpression,\n productIds,\n contentId,\n enablePictureInPicture,\n cornerRadius,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;\n const showShareButton = storyBlockConfiguration?.showShareButton;\n const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;\n const showBranding = storyBlockConfiguration?.showBranding;\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;\n const ctaDelayValue = 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 const showVideoDetailTitle = storyBlockConfiguration?.showVideoDetailTitle;\n\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\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 += `productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n key += `_cornerRadius:${cornerRadius}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\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 key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\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 const { style, cornerRadius, ...otherProps } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...otherProps}\n cornerRadius={cornerRadius}\n style={Object.assign({ borderRadius: cornerRadius }, style)}\n storyBlockConfiguration={storyBlockConfiguration}\n enablePictureInPicture={undefined}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\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","getStoryBlockConfiguration","storyBlockConfiguration","enablePictureInPicture","resultStoryBlockConfiguration","generateKey","gShareBaseURL","shareBaseURL","appLanguage","videoLaunchBehavior","adBadgeConfiguration","adBadgeTextType","badgeTextType","backgroundColorOfAdBadge","backgroundColor","textColorOfAdBadge","textColor","androidFontIsCustomOfAdBadge","androidFontInfo","isCustom","androidFontTypefaceNameOfAdBadge","typefaceName","source","channel","playlist","hashtagFilterExpression","productIds","contentId","cornerRadius","dynamicContentParametersString","playerStyle","videoCompleteAction","showShareButton","showPlaybackButton","showMuteButton","showBranding","ctaDelayType","ctaDelay","type","ctaDelayValue","toFixed","ctaHighlightDelayType","ctaHighlightDelay","ctaHighlightDelayValue","ctaWidth","showVideoDetailTitle","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","sdkInitCalledPromise","then","onBackPress","navigator","popNativeCont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;AAeD,CA7UD;;AA+UA,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 StoryBlockNativeConfiguration from '../models/StoryBlockNativeConfiguration';\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 * Product ids used to generate the sku feed\n */\n productIds?: string[];\n /**\n * The video or live stream id. Only supported on iOS.\n */\n contentId?: string;\n /**\n * Specifies if Picture in Picture is enabled. Only supported on iOS.\n */\n enablePictureInPicture?: boolean;\n /**\n * The corner radius of story block.\n */\n cornerRadius?: number;\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 getStoryBlockConfiguration: () =>\n | StoryBlockNativeConfiguration\n | undefined = () => {\n const { storyBlockConfiguration, enablePictureInPicture } = props;\n let resultStoryBlockConfiguration:\n | StoryBlockNativeConfiguration\n | undefined = storyBlockConfiguration;\n if (typeof enablePictureInPicture === 'boolean') {\n if (!resultStoryBlockConfiguration) {\n resultStoryBlockConfiguration = {};\n }\n resultStoryBlockConfiguration = {\n ...resultStoryBlockConfiguration,\n enablePictureInPicture,\n };\n }\n return resultStoryBlockConfiguration;\n };\n const storyBlockConfiguration = getStoryBlockConfiguration();\n\n const generateKey = (): string => {\n const gShareBaseURL = FireworkSDK.getInstance().shareBaseURL;\n const appLanguage = FireworkSDK.getInstance().appLanguage;\n const videoLaunchBehavior = FireworkSDK.getInstance().videoLaunchBehavior;\n const adBadgeConfiguration = 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;\n const androidFontTypefaceNameOfAdBadge =\n adBadgeConfiguration?.androidFontInfo?.typefaceName;\n\n const {\n source,\n channel,\n playlist,\n hashtagFilterExpression,\n productIds,\n contentId,\n enablePictureInPicture,\n cornerRadius,\n adConfiguration,\n } = props;\n const dynamicContentParametersString =\n generateDynamicContentParametersString();\n\n const playerStyle = storyBlockConfiguration?.playerStyle;\n const videoCompleteAction = storyBlockConfiguration?.videoCompleteAction;\n const showShareButton = storyBlockConfiguration?.showShareButton;\n const showPlaybackButton = storyBlockConfiguration?.showPlaybackButton;\n const showMuteButton = storyBlockConfiguration?.showMuteButton;\n const showBranding = storyBlockConfiguration?.showBranding;\n const ctaDelayType = storyBlockConfiguration?.ctaDelay?.type;\n const ctaDelayValue = 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 const showVideoDetailTitle = storyBlockConfiguration?.showVideoDetailTitle;\n\n const requiresAds = adConfiguration?.requiresAds;\n const adsFetchTimeout = adConfiguration?.adsFetchTimeout;\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 += `productIds:${productIds?.join(',')}`;\n key += `_contentId:${contentId}`;\n key += `_enablePictureInPicture:${enablePictureInPicture}`;\n key += `_cornerRadius:${cornerRadius}`;\n\n key += `_shareBaseURL:${shareBaseURL}`;\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 key += `_showVideoDetailTitle:${showVideoDetailTitle}`;\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 const { style, cornerRadius, ...otherProps } = props;\n return (\n <FWStoryBlock\n ref={nativeComponentRef}\n key={key}\n {...otherProps}\n cornerRadius={cornerRadius}\n style={Object.assign({ borderRadius: cornerRadius }, style)}\n storyBlockConfiguration={storyBlockConfiguration}\n enablePictureInPicture={undefined}\n onStoryBlockLoadFinished={handleStoryBlockLoadFinished}\n onStoryBlockFullScreenStateChanged={\n handleStoryBlockFullScreenStateChanged\n }\n />\n );\n};\n\nexport default forwardRef(StoryBlock);\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;AA4BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAiCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAkBA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAcEA,WAdF,EAgBEC,WAhBF,EA0BEC,UA1BF,EA4BEC,uBA5BF,EA+BEC,mBA/BF,EAsDEN,UAtDF,EA6DEC,SA7DF,EA2EEM,sBA3EF,EAqFEC,aArFF","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 ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\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 VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\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 CustomTapProductCardCallback,\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 ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\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 VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\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;AA4BA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAkCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAkBA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAcEA,WAdF,EAgBEC,WAhBF,EA0BEC,UA1BF,EA4BEC,uBA5BF,EA+BEC,mBA/BF,EAuDEN,UAvDF,EA8DEC,SA9DF,EA4EEM,sBA5EF,EAsFEC,aAtFF","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 ButtonInfo from './models/ButtonInfo';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n CustomClickLinkButtonEvent,\n CustomCTAClickEvent,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n LinkButtonConfiguration,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardPriceConfiguration,\n ProductCardTheme,\n ShoppingCTAButtonConfiguration,\n ShoppingCTAButtonText,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice, ProductUnitOption } from './models/ProductUnit';\nimport type PushRNContainerParams from './models/PushRNContainerParams';\nimport type { RNAppProps } from './models/PushRNContainerParams';\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 VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';\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 CustomTapProductCardCallback,\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 ButtonInfo,\n CustomClickCartIconCallback,\n CustomClickLinkButtonCallback,\n CustomClickLinkButtonEvent,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomTapProductCardCallback,\n CustomTapProductCardEvent,\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 OpenVideoPlayerConfiguration,\n Product,\n ProductCardConfiguration,\n ProductCardCTAButtonText,\n ProductCardPriceConfiguration,\n ProductCardTheme,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n ProductUnitOption,\n PushRNContainerParams,\n RNAppProps,\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 VideoPlayerButtonConfiguration,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTADelay,\n VideoPlayerCTADelayType,\n VideoPlayerCTAStyle,\n VideoPlayerCTAWidth,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n};\n"]}