react-native-firework-sdk 2.2.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  2. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Info.plist +0 -0
  3. package/FireworkVideoUI.xcframework/ios-arm64/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios.abi.json +2 -9
  4. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/FireworkVideoUI +0 -0
  5. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Info.plist +0 -0
  6. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json +2 -9
  7. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json +2 -9
  8. package/FireworkVideoUI.xcframework/ios-arm64_x86_64-simulator/FireworkVideoUI.framework/_CodeSignature/CodeResources +9 -9
  9. package/android/build.gradle +9 -39
  10. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  11. package/android/gradle.properties +7 -5
  12. package/android/proguard-rules.pro +5 -26
  13. package/android/src/main/AndroidManifest.xml +0 -3
  14. package/android/src/main/java/com/fireworksdk/bridge/FireworkSDKPackage.kt +1 -1
  15. package/android/src/main/java/com/fireworksdk/bridge/components/base/FWBaseFragment.kt +10 -0
  16. package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFragment.kt +157 -0
  17. package/android/src/main/java/com/fireworksdk/bridge/components/storyblock/StoryBlockFrameLayout.kt +19 -0
  18. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +15 -5
  19. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModel.kt +6 -7
  20. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelDeserializer.kt +5 -1
  21. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModelSerializer.kt +22 -0
  22. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModel.kt +3 -5
  23. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelDeserializer.kt +2 -1
  24. package/android/src/main/java/com/fireworksdk/bridge/models/FWFontInfoModelSerializer.kt +18 -0
  25. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModel.kt +8 -0
  26. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelDeserializer.kt +35 -0
  27. package/android/src/main/java/com/fireworksdk/bridge/models/FWGradientDrawableModelSerializer.kt +27 -0
  28. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamEventDetailsModel.kt +1 -5
  29. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamMessageDetailsModel.kt +1 -5
  30. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfiguration.kt +5 -15
  31. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationDeserializer.kt +2 -9
  32. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationSerializer.kt +42 -0
  33. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModel.kt +3 -5
  34. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelDeserializer.kt +2 -1
  35. package/android/src/main/java/com/fireworksdk/bridge/models/FWSDKInitOptionsModelSerializer.kt +20 -0
  36. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResult.kt +3 -12
  37. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultDeserializer.kt +2 -13
  38. package/android/src/main/java/com/fireworksdk/bridge/models/FWShoppingCtaResultSerializer.kt +18 -0
  39. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +8 -9
  40. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelDeserializer.kt +17 -6
  41. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelSerializer.kt +59 -0
  42. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedItemDetailsModel.kt +1 -5
  43. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +14 -15
  44. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +14 -4
  45. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +56 -0
  46. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlaybackDetails.kt +11 -8
  47. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +11 -12
  48. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelDeserializer.kt +11 -7
  49. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModelSerializer.kt +63 -0
  50. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProduct.kt +4 -11
  51. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt +82 -0
  52. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWBadgeTextType.kt +18 -0
  53. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaButtonTextValue.kt +18 -0
  54. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWCtaDelayType.kt +18 -0
  55. package/android/src/main/java/com/fireworksdk/bridge/models/{FWEventName.kt → enums/FWEventName.kt} +1 -1
  56. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWGradientDrawableOrientation.kt +24 -0
  57. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerLaunchBehavior.kt +18 -0
  58. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWPlayerStyle.kt +18 -0
  59. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWShoppingCtaResultRes.kt +19 -0
  60. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWSystemTypeface.kt +21 -0
  61. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoCompleteAction.kt +18 -0
  62. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedMode.kt +19 -0
  63. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +22 -0
  64. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedTitlePosition.kt +19 -0
  65. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoPlayerCTAWidth.kt +19 -0
  66. package/android/src/main/java/com/fireworksdk/bridge/reactnative/FWReactNativeSDK.kt +22 -0
  67. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +61 -32
  68. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +3 -2
  69. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +0 -1
  70. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWVideoShoppingInterface.kt +0 -1
  71. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +0 -2
  72. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +2 -2
  73. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +0 -6
  74. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +25 -32
  75. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +24 -47
  76. package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +17 -44
  77. package/android/src/main/java/com/fireworksdk/bridge/utils/FWBundleUtils.kt +46 -21
  78. package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +165 -86
  79. package/android/src/main/java/com/fireworksdk/bridge/utils/FWFragmentUtil.kt +51 -0
  80. package/android/src/main/java/com/fireworksdk/bridge/utils/FWGlobalDataUtil.kt +1 -5
  81. package/android/src/main/java/com/fireworksdk/bridge/utils/FWLanguageUtil.kt +77 -80
  82. package/android/src/main/java/com/fireworksdk/bridge/utils/FWLiveStreamUtil.kt +17 -0
  83. package/android/src/main/java/com/fireworksdk/bridge/utils/FWSingletonHolder.kt +25 -0
  84. package/android/src/main/java/com/fireworksdk/bridge/utils/FWStatusBarUtil.kt +28 -0
  85. package/android/src/main/res/layout/fw_bridge_story_block.xml +5 -12
  86. package/ios/Components/VideoFeed.swift +39 -19
  87. package/ios/Components/VideoFeedConfiguration.swift +4 -5
  88. package/ios/Components/VideoFeedManager.swift +1 -1
  89. package/ios/Components/VideoPlayerConfiguration.swift +17 -0
  90. package/ios/FireworkSdk.xcodeproj/project.pbxproj +197 -205
  91. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/Bundle+AppLanguage.swift +23 -8
  92. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/Foundation/URLSession+AppLanguage.swift +1 -18
  93. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIImageView+AppLanguage.swift +4 -1
  94. package/ios/Models/NativeToRN/FireworkEventName.swift +0 -1
  95. package/ios/Models/NativeToRN/FireworkSDK+Json.swift +1 -1
  96. package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +6 -157
  97. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +1 -21
  98. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -2
  99. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +1 -12
  100. package/ios/Modules/LiveStream/LiveStreamModule.m +1 -1
  101. package/ios/Modules/LiveStream/LiveStreamModule.swift +4 -2
  102. package/ios/Modules/Shopping/FWCartViewController.swift +0 -75
  103. package/ios/Modules/Shopping/ShoppingModule.m +1 -3
  104. package/ios/Modules/Shopping/ShoppingModule.swift +12 -47
  105. package/ios/Utils/Extensions/Swizzle/UINavigationController+FWSwizzle.swift +1 -1
  106. package/lib/commonjs/FireworkSDK.js +31 -15
  107. package/lib/commonjs/FireworkSDK.js.map +1 -1
  108. package/lib/commonjs/LiveStream.js.map +1 -1
  109. package/lib/commonjs/VideoShopping.js +43 -30
  110. package/lib/commonjs/VideoShopping.js.map +1 -1
  111. package/lib/commonjs/components/StoryBlock.js +124 -82
  112. package/lib/commonjs/components/StoryBlock.js.map +1 -1
  113. package/lib/commonjs/components/VideoFeed.js +112 -24
  114. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  115. package/lib/commonjs/index.js.map +1 -1
  116. package/lib/commonjs/models/GradientDrawable.js +2 -0
  117. package/lib/commonjs/models/GradientDrawable.js.map +1 -0
  118. package/lib/commonjs/models/StoryBlockConfiguration.js +6 -0
  119. package/lib/commonjs/models/StoryBlockConfiguration.js.map +1 -0
  120. package/lib/commonjs/models/VideoPlayerCTADelay.js +2 -0
  121. package/lib/commonjs/models/VideoPlayerCTADelay.js.map +1 -0
  122. package/lib/commonjs/models/VideoPlayerCTAStyle.js +6 -0
  123. package/lib/commonjs/models/VideoPlayerCTAStyle.js.map +1 -0
  124. package/lib/commonjs/models/VideoPlayerCTAWidth.js +2 -0
  125. package/lib/commonjs/models/VideoPlayerCTAWidth.js.map +1 -0
  126. package/lib/commonjs/models/VideoPlayerCompleteAction.js +2 -0
  127. package/lib/commonjs/models/VideoPlayerCompleteAction.js.map +1 -0
  128. package/lib/commonjs/models/VideoPlayerStyle.js +2 -0
  129. package/lib/commonjs/models/VideoPlayerStyle.js.map +1 -0
  130. package/lib/commonjs/modules/LiveStreamModule.js.map +1 -1
  131. package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
  132. package/lib/commonjs/utils/FWGlobalState.js +47 -0
  133. package/lib/commonjs/utils/FWGlobalState.js.map +1 -0
  134. package/lib/module/FireworkSDK.js +30 -14
  135. package/lib/module/FireworkSDK.js.map +1 -1
  136. package/lib/module/LiveStream.js.map +1 -1
  137. package/lib/module/VideoShopping.js +43 -29
  138. package/lib/module/VideoShopping.js.map +1 -1
  139. package/lib/module/components/StoryBlock.js +113 -73
  140. package/lib/module/components/StoryBlock.js.map +1 -1
  141. package/lib/module/components/VideoFeed.js +113 -24
  142. package/lib/module/components/VideoFeed.js.map +1 -1
  143. package/lib/module/index.js.map +1 -1
  144. package/lib/module/models/GradientDrawable.js +2 -0
  145. package/lib/module/models/GradientDrawable.js.map +1 -0
  146. package/lib/module/models/StoryBlockConfiguration.js +2 -0
  147. package/lib/module/models/StoryBlockConfiguration.js.map +1 -0
  148. package/lib/module/models/VideoPlayerCTADelay.js +2 -0
  149. package/lib/module/models/VideoPlayerCTADelay.js.map +1 -0
  150. package/lib/module/models/VideoPlayerCTAStyle.js +2 -0
  151. package/lib/module/models/VideoPlayerCTAStyle.js.map +1 -0
  152. package/lib/module/models/VideoPlayerCTAWidth.js +2 -0
  153. package/lib/module/models/VideoPlayerCTAWidth.js.map +1 -0
  154. package/lib/module/models/VideoPlayerCompleteAction.js +2 -0
  155. package/lib/module/models/VideoPlayerCompleteAction.js.map +1 -0
  156. package/lib/module/models/VideoPlayerStyle.js +2 -0
  157. package/lib/module/models/VideoPlayerStyle.js.map +1 -0
  158. package/lib/module/modules/LiveStreamModule.js.map +1 -1
  159. package/lib/module/modules/ShoppingModule.js.map +1 -1
  160. package/lib/module/utils/FWGlobalState.js +39 -0
  161. package/lib/module/utils/FWGlobalState.js.map +1 -0
  162. package/lib/typescript/FireworkSDK.d.ts +7 -7
  163. package/lib/typescript/LiveStream.d.ts +2 -2
  164. package/lib/typescript/VideoShopping.d.ts +17 -18
  165. package/lib/typescript/components/StoryBlock.d.ts +2 -0
  166. package/lib/typescript/components/VideoFeed.d.ts +7 -3
  167. package/lib/typescript/index.d.ts +10 -3
  168. package/lib/typescript/models/AdBadgeConfiguration.d.ts +9 -2
  169. package/lib/typescript/models/FWEvents.d.ts +9 -9
  170. package/lib/typescript/models/GradientDrawable.d.ts +5 -0
  171. package/lib/typescript/models/IOSFontInfo.d.ts +2 -0
  172. package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +1 -1
  173. package/lib/typescript/models/StoryBlockConfiguration.d.ts +37 -0
  174. package/lib/typescript/models/VideoFeedConfiguration.d.ts +25 -4
  175. package/lib/typescript/models/VideoPlaybackDetails.d.ts +1 -0
  176. package/lib/typescript/models/VideoPlayerCTADelay.d.ts +11 -0
  177. package/lib/typescript/models/VideoPlayerCTAStyle.d.ts +21 -0
  178. package/lib/typescript/models/VideoPlayerCTAWidth.d.ts +1 -0
  179. package/lib/typescript/models/VideoPlayerCompleteAction.d.ts +1 -0
  180. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +9 -34
  181. package/lib/typescript/models/VideoPlayerStyle.d.ts +1 -0
  182. package/lib/typescript/modules/LiveStreamModule.d.ts +1 -1
  183. package/lib/typescript/modules/ShoppingModule.d.ts +2 -3
  184. package/lib/typescript/utils/FWGlobalState.d.ts +10 -0
  185. package/package.json +5 -3
  186. package/react-native-firework-sdk.podspec +2 -1
  187. package/src/FireworkSDK.ts +47 -19
  188. package/src/LiveStream.ts +4 -2
  189. package/src/VideoShopping.ts +47 -39
  190. package/src/components/StoryBlock.tsx +161 -98
  191. package/src/components/VideoFeed.tsx +147 -23
  192. package/src/index.ts +14 -6
  193. package/src/models/AdBadgeConfiguration.ts +10 -2
  194. package/src/models/FWEvents.ts +11 -11
  195. package/src/models/GradientDrawable.ts +14 -0
  196. package/src/models/IOSFontInfo.ts +2 -0
  197. package/src/models/ProductInfoViewConfiguration.ts +1 -1
  198. package/src/models/StoryBlockConfiguration.ts +38 -0
  199. package/src/models/VideoFeedConfiguration.ts +25 -4
  200. package/src/models/VideoPlaybackDetails.ts +1 -0
  201. package/src/models/VideoPlayerCTADelay.ts +11 -0
  202. package/src/models/VideoPlayerCTAStyle.ts +22 -0
  203. package/src/models/VideoPlayerCTAWidth.ts +1 -0
  204. package/src/models/VideoPlayerCompleteAction.ts +1 -0
  205. package/src/models/VideoPlayerConfiguration.ts +9 -36
  206. package/src/models/VideoPlayerStyle.ts +1 -0
  207. package/src/modules/LiveStreamModule.ts +1 -1
  208. package/src/modules/ShoppingModule.ts +2 -3
  209. package/src/utils/FWGlobalState.ts +31 -0
  210. package/android/publish.gradle +0 -66
  211. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFragment.kt +0 -129
  212. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/StoryBlockFrameLayout.kt +0 -90
  213. package/android/src/main/java/com/fireworksdk/bridge/constants/FWVideoPlayerConstant.kt +0 -39
  214. package/android/src/main/java/com/fireworksdk/bridge/models/FWSystemTypeface.kt +0 -9
  215. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedModel.kt +0 -7
  216. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedSource.kt +0 -10
  217. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedTitlePosition.kt +0 -7
  218. package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWContainerActivity.kt +0 -53
  219. package/android/src/main/res/layout/fw_bridge_fragment_container.xml +0 -8
  220. package/ios/Modules/FWNavigatorModule/FWNavigatorContainerViewController.swift +0 -33
  221. package/ios/Modules/FWNavigatorModule/FWNavigatorProtocol.swift +0 -18
@@ -2,10 +2,11 @@ import type { CustomClickLinkButtonEvent, ShoppingCTAEvent, UpdateProductDetails
2
2
  import type Product from './models/Product';
3
3
  import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
4
4
  import type ShoppingCTAResult from './models/ShoppingCTAResult';
5
- export type ShoppingCTACallback = (event: ShoppingCTAEvent) => Promise<ShoppingCTAResult>;
6
- export type CustomClickCartIconCallback = () => Promise<void>;
7
- export type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product[] | undefined | null>;
8
- export type CustomClickLinkButtonCallback = (event: CustomClickLinkButtonEvent) => Promise<void>;
5
+ export type ShoppingCTACallback = (event: ShoppingCTAEvent) => Promise<ShoppingCTAResult> | ShoppingCTAResult;
6
+ export type CustomClickCartIconCallback = () => Promise<void> | void;
7
+ export type UpdateProductDetailsCallbackResult = Product[] | undefined | null;
8
+ export type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<UpdateProductDetailsCallbackResult> | UpdateProductDetailsCallbackResult;
9
+ export type CustomClickLinkButtonCallback = (event: CustomClickLinkButtonEvent) => Promise<void> | void;
9
10
  /**
10
11
  * The entry class of video shopping.
11
12
  */
@@ -22,15 +23,23 @@ declare class VideoShopping {
22
23
  * The host app can customize the click event processing logic of
23
24
  * the shopping cart icon by setting the callback.
24
25
  */
25
- get onCustomClickCartIcon(): CustomClickCartIconCallback | undefined;
26
- set onCustomClickCartIcon(value: CustomClickCartIconCallback | undefined);
27
- private _onCustomClickCartIcon?;
26
+ onCustomClickCartIcon?: CustomClickCartIconCallback | undefined;
28
27
  /**
29
28
  * This callback is triggered when the video will be shown.
30
29
  *
31
30
  * The host app can return a Product list to update the latest product information.
32
31
  */
33
32
  onUpdateProductDetails?: UpdateProductDetailsCallback;
33
+ /**
34
+ * This callback is triggered when the user clicks
35
+ * the link button next to Add to cart button.
36
+ *
37
+ * The host app can customize the click event processing logic of
38
+ * the link button by setting the callback.
39
+ */
40
+ get onCustomClickLinkButton(): CustomClickLinkButtonCallback | undefined;
41
+ set onCustomClickLinkButton(value: CustomClickLinkButtonCallback | undefined);
42
+ private _onCustomClickLinkButton?;
34
43
  /**
35
44
  * Defaults to true.
36
45
  * You can hide the cart icon by setting this property to false.
@@ -45,16 +54,6 @@ declare class VideoShopping {
45
54
  get productInfoViewConfiguration(): ProductInfoViewConfiguration | undefined;
46
55
  set productInfoViewConfiguration(value: ProductInfoViewConfiguration | undefined);
47
56
  private _productInfoViewConfiguration?;
48
- /**
49
- * This callback is triggered when the user clicks
50
- * the link button next to Add to cart button.
51
- *
52
- * The host app can customize the click event processing logic of
53
- * the link button by setting the callback.
54
- */
55
- get onCustomClickLinkButton(): CustomClickLinkButtonCallback | undefined;
56
- set onCustomClickLinkButton(value: CustomClickLinkButtonCallback | undefined);
57
- private _onCustomClickLinkButton?;
58
57
  private get eventEmitter();
59
58
  static getInstance(): VideoShopping;
60
59
  private constructor();
@@ -66,7 +65,7 @@ declare class VideoShopping {
66
65
  * If cound > 0, we will show the red indicator on the cart icon.
67
66
  * Otherwise, we will hide the red indicator on the cart icon.
68
67
  */
69
- setCartItemCount(count: number): void;
68
+ setCartItemCount(count: number): Promise<void>;
70
69
  private handleShoppingCTAEvent;
71
70
  private handleClickCartIconEvent;
72
71
  private handleUpdateProductDetailsEvent;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import type AdConfiguration from '../models/AdConfiguration';
4
4
  import type FWError from '../models/FWError';
5
+ import type { StoryBlockConfiguration } from '../models/StoryBlockConfiguration';
5
6
  import type { StoryBlockSource } from '../models/StoryBlockSource';
6
7
  export interface IStoryBlockMethods {
7
8
  /**
@@ -54,6 +55,7 @@ export interface IStoryBlockProps {
54
55
  * Ad configuration of the feed. Only supported on iOS.
55
56
  */
56
57
  adConfiguration?: AdConfiguration;
58
+ storyBlockConfiguration?: StoryBlockConfiguration;
57
59
  /**
58
60
  * The feed loading result callback. It means loading successfully when error equals to undefined.
59
61
  */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- import type FWError from '../models/FWError';
4
3
  import type AdConfiguration from '../models/AdConfiguration';
4
+ import type FWError from '../models/FWError';
5
5
  import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
6
6
  import type { VideoFeedSource } from '../models/VideoFeedSource';
7
7
  import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
@@ -68,10 +68,13 @@ export interface IVideoFeedProps {
68
68
  */
69
69
  onVideoFeedLoadFinished?: (error?: FWError) => void;
70
70
  }
71
+ interface IVideoFeedState {
72
+ sdkInitCalled: boolean;
73
+ }
71
74
  /**
72
75
  * VideoFeed component.
73
76
  */
74
- declare class VideoFeed extends React.Component<IVideoFeedProps> {
77
+ declare class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
75
78
  /**
76
79
  * @ignore
77
80
  */
@@ -80,6 +83,7 @@ declare class VideoFeed extends React.Component<IVideoFeedProps> {
80
83
  };
81
84
  private _nativeComponentRef;
82
85
  private _subscriptions;
86
+ constructor(props: IVideoFeedProps);
83
87
  refresh: () => void;
84
88
  private _onVideoFeedLoadFinished;
85
89
  /**
@@ -93,7 +97,7 @@ declare class VideoFeed extends React.Component<IVideoFeedProps> {
93
97
  /**
94
98
  * @ignore
95
99
  */
96
- render(): JSX.Element;
100
+ render(): JSX.Element | null;
97
101
  private _generateDynamicContentParametersString;
98
102
  private _generateVastAttributesString;
99
103
  private _getVideoFeedConfiguration;
@@ -15,6 +15,8 @@ import type AndroidFontInfo from './models/AndroidFontInfo';
15
15
  import type FeedItemDetails from './models/FeedItemDetails';
16
16
  import type FWError from './models/FWError';
17
17
  import type { CustomClickLinkButtonEvent, CustomCTAClickEvent, LiveStreamChatEvent, LiveStreamEvent, SDKInitEvent, ShoppingCTAEvent, UpdateProductDetailsEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
18
+ import type GradientDrawable from './models/GradientDrawable';
19
+ import type { GradientDrawableOrientation } from './models/GradientDrawable';
18
20
  import type IOSFontInfo from './models/IOSFontInfo';
19
21
  import type { IOSSystemFontStyle, IOSSystemFontWeight } from './models/IOSFontInfo';
20
22
  import LiveStreamChatEventName from './models/LiveStreamChatEventName';
@@ -29,17 +31,22 @@ import type { ProductPrice, ProductUnitOption } from './models/ProductUnit';
29
31
  import type SDKInitOptions from './models/SDKInitOptions';
30
32
  import type { VideoLaunchBehavior } from './models/SDKInitOptions';
31
33
  import type ShoppingCTAResult from './models/ShoppingCTAResult';
34
+ import type { StoryBlockConfiguration } from './models/StoryBlockConfiguration';
32
35
  import type { StoryBlockSource } from './models/StoryBlockSource';
33
36
  import type TrackPurchaseParameters from './models/TrackPurchaseParameters';
34
37
  import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
35
- import type { VideoFeedContentPadding, VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
38
+ import type { VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
36
39
  import type { VideoFeedSource } from './models/VideoFeedSource';
37
40
  import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
38
41
  import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
39
42
  import VideoPlaybackEventName from './models/VideoPlaybackEventName';
43
+ import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
40
44
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
41
- import type { VideoPlayerCompleteAction, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
45
+ import type { VideoPlayerCTADelay, VideoPlayerCTADelayType } from './models/VideoPlayerCTADelay';
46
+ import type { VideoPlayerCTAStyle } from './models/VideoPlayerCTAStyle';
47
+ import type { VideoPlayerCTAWidth } from './models/VideoPlayerCTAWidth';
48
+ import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
42
49
  import type { CustomClickCartIconCallback, CustomClickLinkButtonCallback, ShoppingCTACallback, UpdateProductDetailsCallback } from './VideoShopping';
43
50
  import VideoShopping from './VideoShopping';
44
51
  export default FireworkSDK;
45
- export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedContentPadding, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
52
+ export { AdBadgeConfiguration, AdBadgeTextType, AdConfiguration, AndroidFontInfo, CustomClickCartIconCallback, CustomClickLinkButtonCallback, CustomClickLinkButtonEvent, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FireworkSDK, FWError, FWNavigator, GradientDrawable, GradientDrawableOrientation, IOSFontInfo, IOSSystemFontStyle, IOSSystemFontWeight, IStoryBlockMethods, IStoryBlockProps, IVideoFeedProps, LinkButtonConfiguration, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, ProductUnitOption, SDKInitCallback, SDKInitEvent, SDKInitOptions, ShoppingCTAButtonConfiguration, ShoppingCTAButtonText, ShoppingCTACallback, ShoppingCTAEvent, ShoppingCTAResult, StoryBlock, StoryBlockConfiguration, StoryBlockSource, TrackPurchaseParameters, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VastAttribute, VideoFeed, VideoFeedClickCallback, VideoFeedClickEvent, VideoFeedConfiguration, VideoFeedMode, VideoFeedPadding, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTADelay, VideoPlayerCTADelayType, VideoPlayerCTAStyle, VideoPlayerCTAWidth, VideoPlayerSize, VideoPlayerStyle, VideoShopping, };
@@ -1,3 +1,4 @@
1
+ import type AndroidFontInfo from './AndroidFontInfo';
1
2
  export type AdBadgeTextType = 'ad' | 'sponsored';
2
3
  export default interface AdBadgeConfiguration {
3
4
  /**
@@ -5,11 +6,17 @@ export default interface AdBadgeConfiguration {
5
6
  */
6
7
  badgeTextType?: AdBadgeTextType;
7
8
  /**
8
- * The background color of the ad badge. Only supported on iOS.
9
+ * The background color of the ad badge.
9
10
  */
10
11
  backgroundColor?: string;
11
12
  /**
12
- * The color of the ad badge text. Only supported on iOS.
13
+ * The color of the ad badge text.
13
14
  */
14
15
  textColor?: string;
16
+ /**
17
+ * The Android font info of ad badge.
18
+ * The property is ignored when fontSize is not set.
19
+ * Only supported on Android.
20
+ */
21
+ androidFontInfo?: AndroidFontInfo;
15
22
  }
@@ -45,15 +45,6 @@ export interface UpdateProductDetailsEvent {
45
45
  */
46
46
  productIds: string[];
47
47
  }
48
- export interface LiveStreamEvent {
49
- eventName: LiveStreamEventName;
50
- info: LiveStreamEventDetails;
51
- }
52
- export interface LiveStreamChatEvent {
53
- eventName: LiveStreamChatEventName;
54
- message: LiveStreamMessageDetails;
55
- liveStream: LiveStreamEventDetails;
56
- }
57
48
  export interface CustomClickLinkButtonEvent {
58
49
  /**
59
50
  * The url for the product unit
@@ -68,3 +59,12 @@ export interface CustomClickLinkButtonEvent {
68
59
  */
69
60
  unitId: string;
70
61
  }
62
+ export interface LiveStreamEvent {
63
+ eventName: LiveStreamEventName;
64
+ info: LiveStreamEventDetails;
65
+ }
66
+ export interface LiveStreamChatEvent {
67
+ eventName: LiveStreamChatEventName;
68
+ message: LiveStreamMessageDetails;
69
+ liveStream: LiveStreamEventDetails;
70
+ }
@@ -0,0 +1,5 @@
1
+ export type GradientDrawableOrientation = 'TOP_BOTTOM' | 'TR_BL' | 'RIGHT_LEFT' | 'BR_TL' | 'BOTTOM_TOP' | 'BL_TR' | 'LEFT_RIGHT' | 'TL_BR';
2
+ export default interface GradientDrawable {
3
+ orientation?: GradientDrawableOrientation;
4
+ colors?: string[];
5
+ }
@@ -9,11 +9,13 @@ export default interface IOSFontInfo {
9
9
  /**
10
10
  * The iOS system font style.
11
11
  * The property is ignored when fontName is non-empty.
12
+ * Only supported on iOS.
12
13
  */
13
14
  systemFontStyle?: IOSSystemFontStyle;
14
15
  /**
15
16
  * The iOS system font weight.
16
17
  * The property is ignored when fontName is non-empty or systemFontStyle is italic.
18
+ * Only supported on iOS.
17
19
  */
18
20
  systemFontWeight?: IOSSystemFontWeight;
19
21
  }
@@ -32,7 +32,7 @@ export default interface ProductInfoViewConfiguration {
32
32
  */
33
33
  ctaButton?: ShoppingCTAButtonConfiguration;
34
34
  /**
35
- * Configuration of link button next to "Add to cart" button.
35
+ * Configuration of link button next to shopping CTA button.
36
36
  */
37
37
  linkButton?: LinkButtonConfiguration;
38
38
  }
@@ -0,0 +1,37 @@
1
+ import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
2
+ import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
3
+ import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
4
+ export interface StoryBlockConfiguration {
5
+ /**
6
+ * Behavior occurring after video is complete.
7
+ */
8
+ videoCompleteAction?: VideoPlayerCompleteAction;
9
+ /**
10
+ * Indicates if the video player shows share button.
11
+ */
12
+ showShareButton?: boolean;
13
+ /**
14
+ * Indicates if the video player shows playback button.
15
+ */
16
+ showPlaybackButton?: boolean;
17
+ /**
18
+ * Indicates if Firework branding should be showed or not.
19
+ */
20
+ showBranding?: boolean;
21
+ /**
22
+ * Specifies the delay before showing the CTA.
23
+ */
24
+ ctaDelay?: VideoPlayerCTADelay;
25
+ /**
26
+ * Specifies the delay before the highlight animation occurs. Only supported on iOS.
27
+ */
28
+ ctaHighlightDelay?: VideoPlayerCTADelay;
29
+ /**
30
+ * The share base URL of the video.
31
+ */
32
+ shareBaseURL?: string;
33
+ /**
34
+ * Specifies the desired width for the Video Player CTA button.
35
+ */
36
+ ctaWidth?: VideoPlayerCTAWidth;
37
+ }
@@ -1,5 +1,6 @@
1
1
  import type IOSFontInfo from './IOSFontInfo';
2
2
  import type AndroidFontInfo from './AndroidFontInfo';
3
+ import type GradientDrawable from './GradientDrawable';
3
4
  export interface VideoFeedTitleConfiguration {
4
5
  /**
5
6
  * Specifies if the video feed title is hidden.
@@ -13,6 +14,11 @@ export interface VideoFeedTitleConfiguration {
13
14
  * The font size of video feed title.
14
15
  */
15
16
  fontSize?: number;
17
+ /**
18
+ * Specifies the number of allowed lines for the label.
19
+ * Only supported on iOS.
20
+ */
21
+ numberOfLines?: number;
16
22
  /**
17
23
  * The iOS font info of video feed title.
18
24
  * The property is ignored when fontSize is not set.
@@ -25,13 +31,24 @@ export interface VideoFeedTitleConfiguration {
25
31
  * Only supported on Android.
26
32
  */
27
33
  androidFontInfo?: AndroidFontInfo;
34
+ /**
35
+ * The background color of video feed title.
36
+ * The property is ignored when gradientDrawable is set.
37
+ * Only supported on Android.
38
+ */
39
+ backgroundColor?: string;
40
+ /**
41
+ * The background drawable of video feed title.
42
+ * Only supported on Android.
43
+ */
44
+ gradientDrawable?: GradientDrawable;
28
45
  }
29
46
  export interface VideoFeedPlayIconConfiguration {
30
47
  hidden?: boolean;
31
48
  iconWidth?: number;
32
49
  }
33
50
  export type VideoFeedTitlePosition = 'stacked' | 'nested';
34
- export interface VideoFeedContentPadding {
51
+ export interface VideoFeedPadding {
35
52
  top?: number;
36
53
  right?: number;
37
54
  bottom?: number;
@@ -54,6 +71,10 @@ export default interface VideoFeedConfiguration {
54
71
  * Title position of video feed item.
55
72
  */
56
73
  titlePosition?: VideoFeedTitlePosition;
74
+ /**
75
+ * The padding of video feed title. Only supported on iOS.
76
+ */
77
+ titlePadding?: VideoFeedPadding;
57
78
  /**
58
79
  * Configuration of video feed item play icon.
59
80
  */
@@ -67,11 +88,11 @@ export default interface VideoFeedConfiguration {
67
88
  */
68
89
  aspectRatio?: number;
69
90
  /**
70
- * The content padding for video feed. Only supported on iOS.
91
+ * The padding of video feed content. Only supported on iOS.
71
92
  */
72
- contentPadding?: VideoFeedContentPadding;
93
+ contentPadding?: VideoFeedPadding;
73
94
  /**
74
- * The item spacing for video feed. Only supported on iOS.
95
+ * The item spacing for video feed.
75
96
  */
76
97
  itemSpacing?: number;
77
98
  /**
@@ -33,6 +33,7 @@ export default interface VideoPlaybackDetails {
33
33
  progress?: number | null;
34
34
  /**
35
35
  * The type of the CTA button clicked: "buy" "download" "view" "book".
36
+ * Only supported on iOS.
36
37
  */
37
38
  ctaActionType?: string | null;
38
39
  /**
@@ -0,0 +1,11 @@
1
+ export type VideoPlayerCTADelayType = 'constant' | 'percentage';
2
+ export interface VideoPlayerCTADelay {
3
+ type: VideoPlayerCTADelayType;
4
+ /**
5
+ * If type is constant, the value is the number of seconds of delay.
6
+ * Value should be greater than or equal to 0 and less than or equal to 10 when type is constant.
7
+ * If type is percentage, the value is a percentage based on the the total duration of the video length.
8
+ * Value must be greater than or equal to 0 and less than 1 when type is percentage.
9
+ */
10
+ value: number;
11
+ }
@@ -0,0 +1,21 @@
1
+ import type IOSFontInfo from './IOSFontInfo';
2
+ export interface VideoPlayerCTAStyle {
3
+ /**
4
+ * The background color of CTA button.
5
+ */
6
+ backgroundColor?: string;
7
+ /**
8
+ * The text color of CTA button.
9
+ */
10
+ textColor?: string;
11
+ /**
12
+ * The font size of CTA button.
13
+ */
14
+ fontSize?: number;
15
+ /**
16
+ * The iOS font info of CTA button.
17
+ * The property is ignored when fontSize is not set.
18
+ * Only supported on iOS.
19
+ */
20
+ iOSFontInfo?: IOSFontInfo;
21
+ }
@@ -0,0 +1 @@
1
+ export type VideoPlayerCTAWidth = 'fullWidth' | 'compact' | 'sizeToFit';
@@ -0,0 +1 @@
1
+ export type VideoPlayerCompleteAction = 'loop' | 'advanceToNext';
@@ -1,37 +1,8 @@
1
- import type IOSFontInfo from './IOSFontInfo';
2
- export type VideoPlayerStyle = 'full' | 'fit';
3
- export type VideoPlayerCompleteAction = 'loop' | 'advanceToNext';
4
- export interface VideoPlayerCTAStyle {
5
- /**
6
- * The background color of CTA button.
7
- */
8
- backgroundColor?: string;
9
- /**
10
- * The text color of CTA button.
11
- */
12
- textColor?: string;
13
- /**
14
- * The font size of CTA button.
15
- */
16
- fontSize?: number;
17
- /**
18
- * The iOS font info of CTA button.
19
- * The property is ignored when fontSize is not set.
20
- * Only supported on iOS.
21
- */
22
- iOSFontInfo?: IOSFontInfo;
23
- }
24
- export type VideoPlayerCTADelayType = 'constant' | 'percentage';
25
- export interface VideoPlayerCTADelay {
26
- type: VideoPlayerCTADelayType;
27
- /**
28
- * If type is constant, the value is the number of seconds of delay.
29
- * Value should be greater than or equal to 0 and less than or equal to 10 when type is constant.
30
- * If type is percentage, the value is a percentage based on the the total duration of the video length.
31
- * Value must be greater than or equal to 0 and less than 1 when type is percentage.
32
- */
33
- value: number;
34
- }
1
+ import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
2
+ import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
3
+ import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
4
+ import type { VideoPlayerCompleteAction } from './VideoPlayerCompleteAction';
5
+ import type { VideoPlayerStyle } from './VideoPlayerStyle';
35
6
  export default interface VideoPlayerConfiguration {
36
7
  /**
37
8
  * Sets the proportion of the video player to its container.
@@ -73,4 +44,8 @@ export default interface VideoPlayerConfiguration {
73
44
  * The share base URL of the video.
74
45
  */
75
46
  shareBaseURL?: string;
47
+ /**
48
+ * Specifies the desired width for the Video Player CTA button.
49
+ */
50
+ ctaWidth?: VideoPlayerCTAWidth;
76
51
  }
@@ -0,0 +1 @@
1
+ export type VideoPlayerStyle = 'full' | 'fit';
@@ -1,6 +1,6 @@
1
1
  import { NativeEventEmitter, NativeModule } from 'react-native';
2
2
  interface ILiveStreamModule extends NativeModule {
3
- init(): void;
3
+ init(): Promise<any>;
4
4
  }
5
5
  declare const LiveStreamModuleEventEmitter: NativeEventEmitter;
6
6
  export { LiveStreamModuleEventEmitter };
@@ -3,15 +3,14 @@ import type Product from '../models/Product';
3
3
  import type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';
4
4
  import type ShoppingCTAResult from '../models/ShoppingCTAResult';
5
5
  interface IShoppingModule extends NativeModule {
6
- init(): void;
6
+ init(): Promise<any>;
7
7
  updateVideoProducts(products: Product[], callbackId: number | string): void;
8
8
  updateShoppingCTAResult(result: ShoppingCTAResult, callbackId: number | string): void;
9
9
  setCartIconVisible(visible: boolean): void;
10
10
  setCartItemCount(count: number): void;
11
- setCustomClickCartIconEnabled(enabled: boolean): Promise<void>;
12
11
  clearCallbackId(callbackId: number | string, eventName: string): void;
13
12
  setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;
14
- setCustomClickLinkButtonEnabled(enabled: boolean): Promise<void>;
13
+ setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;
15
14
  }
16
15
  declare const ShoppingModuleEventEmitter: NativeEventEmitter;
17
16
  export { ShoppingModuleEventEmitter };
@@ -0,0 +1,10 @@
1
+ declare class FWGlobalState {
2
+ private static _instance?;
3
+ private sdkInitCalledResolveFunc?;
4
+ sdkInitCalledPromise: Promise<void>;
5
+ sdkInitCalled: boolean;
6
+ static getInstance(): FWGlobalState;
7
+ private constructor();
8
+ resolveSdkInitCalled(): void;
9
+ }
10
+ export default FWGlobalState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.2.4",
3
+ "version": "2.3.0",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -24,14 +24,16 @@
24
24
  "!**/__fixtures__",
25
25
  "!**/__mocks__",
26
26
  "!docs/",
27
- "!README_PUBLIC_REPO.md"
27
+ "!README_PUBLIC_REPO.md",
28
+ "!README_INTERNAL.md"
28
29
  ],
29
30
  "scripts": {
30
31
  "test": "jest",
31
32
  "typescript": "tsc --noEmit",
32
33
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
34
  "prepare": "bob build",
34
- "generate-doc": "rm -rf docs && npx typedoc"
35
+ "generate-doc": "rm -rf docs && npx typedoc",
36
+ "prettier": "npx prettier --write \"{src,example}/**/*.{ts,tsx}\""
35
37
  },
36
38
  "keywords": [
37
39
  "react-native",
@@ -33,6 +33,7 @@ fi
33
33
  s.preserve_paths = "FireworkVideoUI.xcframework"
34
34
  s.vendored_frameworks = "FireworkVideoUI.xcframework"
35
35
 
36
+ s.static_framework = true
36
37
  s.dependency 'React-Core'
37
- s.dependency 'FireworkVideo', '1.9.0'
38
+ s.dependency 'FireworkVideo', '1.10.0'
38
39
  end