@wscsports/blaze-rtn-sdk 1.19.0 → 1.21.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 (208) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/blaze/rtnblazesdk/BlazeSdkModule.kt +170 -16
  3. package/android/src/main/java/com/blaze/rtnblazesdk/BlazeSdkModuleRepo.kt +2 -0
  4. package/android/src/main/java/com/blaze/rtnblazesdk/base/BaseWidgetView.kt +151 -2
  5. package/android/src/main/java/com/blaze/rtnblazesdk/base/BlazeWidgetViewManager.kt +24 -0
  6. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactCommonMerger.kt +41 -0
  7. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactLayoutMerger.kt +128 -0
  8. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactMomentPlayerStyleMerger.kt +9 -0
  9. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactMomentsPlayerStyle.kt +10 -4
  10. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactPlayerTabsStyle.kt +9 -0
  11. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactPlayerTabsStyleMerger.kt +8 -0
  12. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactStoriesPlayerStyleMerger.kt +23 -0
  13. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactStoryPlayerStyle.kt +15 -2
  14. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactVideosPlayerStyle.kt +54 -3
  15. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactVideosPlayerStyleMerger.kt +106 -2
  16. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactWidgetCommon.kt +17 -0
  17. package/android/src/main/java/com/blaze/rtnblazesdk/customization/BlazeReactWidgetLayout.kt +51 -1
  18. package/android/src/main/java/com/blaze/rtnblazesdk/events/MomentsContainerTabsEvent.kt +10 -0
  19. package/android/src/main/java/com/blaze/rtnblazesdk/events/SdkModuleJsEvent.kt +48 -2
  20. package/android/src/main/java/com/blaze/rtnblazesdk/events/WidgetContentRestrictedEvent.kt +38 -0
  21. package/android/src/main/java/com/blaze/rtnblazesdk/events/WidgetOnTriggerInteractionLinkEvent.kt +34 -0
  22. package/android/src/main/java/com/blaze/rtnblazesdk/events/WidgetShareClickedEvent.kt +31 -0
  23. package/android/src/main/java/com/blaze/rtnblazesdk/moments/BlazeMomentsGridView.kt +27 -1
  24. package/android/src/main/java/com/blaze/rtnblazesdk/moments/BlazeMomentsRowView.kt +27 -1
  25. package/android/src/main/java/com/blaze/rtnblazesdk/moments/BlazeMomentsWidgetViewManager.kt +45 -0
  26. package/android/src/main/java/com/blaze/rtnblazesdk/stories/BlazeStoriesGridView.kt +2 -1
  27. package/android/src/main/java/com/blaze/rtnblazesdk/stories/BlazeStoriesRowView.kt +2 -1
  28. package/android/src/main/java/com/blaze/rtnblazesdk/utils/ArrayExtensions.kt +13 -0
  29. package/android/src/main/java/com/blaze/rtnblazesdk/utils/DataSourceTypeExtractUtils.kt +41 -3
  30. package/android/src/main/java/com/blaze/rtnblazesdk/utils/EventParamsBuilder.kt +93 -14
  31. package/android/src/main/java/com/blaze/rtnblazesdk/utils/FollowEntityExtractUtils.kt +55 -0
  32. package/android/src/main/java/com/blaze/rtnblazesdk/utils/GeneralExtractExtensions.kt +41 -0
  33. package/android/src/main/java/com/blaze/rtnblazesdk/utils/MapExtensions.kt +19 -0
  34. package/android/src/main/java/com/blaze/rtnblazesdk/utils/MomentsWidgetTabsConfigurationExtractUtils.kt +8 -0
  35. package/android/src/main/java/com/blaze/rtnblazesdk/utils/PlaybackConfigurationExtractUtils.kt +43 -0
  36. package/android/src/main/java/com/blaze/rtnblazesdk/utils/WidgetViewExtensions.kt +17 -0
  37. package/android/src/main/java/com/blaze/rtnblazesdk/videos/BlazeVideosGridView.kt +5 -1
  38. package/android/src/main/java/com/blaze/rtnblazesdk/videos/BlazeVideosGridViewManager.kt +1 -2
  39. package/android/src/main/java/com/blaze/rtnblazesdk/videos/BlazeVideosRowView.kt +5 -1
  40. package/android/src/main/java/com/blaze/rtnblazesdk/videos/BlazeVideosRowViewManager.kt +1 -2
  41. package/android/src/main/java/com/blaze/rtnblazesdk/videos/BlazeVideosWidgetViewManager.kt +28 -0
  42. package/blaze-rtn-sdk.podspec +1 -1
  43. package/ios/Sources/BlazeNativeSDKModule/BlazeNativeSDKModule.m +35 -3
  44. package/ios/Sources/BlazeNativeSDKModule/BlazeNativeSDKModule.swift +167 -20
  45. package/ios/Sources/BlazeNativeSDKModule/BlazeSdkModuleRepo.swift +5 -0
  46. package/ios/Sources/BlazeNativeSDKModule/RTNBlazeSdkModule+AppEvents.swift +52 -4
  47. package/ios/Sources/BlazeVideosGridWidgetManager/BlazeVideosGridWidgetManager.m +1 -0
  48. package/ios/Sources/BlazeVideosRowWidgetManager/BlazeVideosRowWidgetManager.m +1 -0
  49. package/ios/Sources/LayoutCustomization/MomentsPlayer/BlazeReactMomentsPlayerStyle.swift +7 -0
  50. package/ios/Sources/LayoutCustomization/MomentsPlayer/BlazeReactMomentsPlayerStyleMerger.swift +18 -1
  51. package/ios/Sources/LayoutCustomization/Shared/SharedStyleModels.swift +14 -0
  52. package/ios/Sources/LayoutCustomization/Shared/SharedStyleModelsMerger.swift +62 -1
  53. package/ios/Sources/LayoutCustomization/StoriesPlayer/BlazeReactStoriesPlayerStyle.swift +13 -0
  54. package/ios/Sources/LayoutCustomization/StoriesPlayer/BlazeReactStoriesPlayerStyleMerger.swift +19 -1
  55. package/ios/Sources/LayoutCustomization/TabsStyle/BlazeReactPlayerTabsStyle.swift +10 -0
  56. package/ios/Sources/LayoutCustomization/TabsStyle/BlazeReactPlayerTabsStyleMerger.swift +10 -0
  57. package/ios/Sources/LayoutCustomization/VideoPlayer/BlazeReactVideosPlayerStyle.swift +68 -0
  58. package/ios/Sources/LayoutCustomization/VideoPlayer/BlazeReactVideosPlayerStyleMerger.swift +98 -1
  59. package/ios/Sources/LayoutCustomization/WidgetLayout/BlazeReactWidgetLayout.swift +23 -0
  60. package/ios/Sources/LayoutCustomization/WidgetLayout/BlazeReactWidgetLayoutMerger.swift +44 -0
  61. package/ios/Sources/Utils/BlazeReactParamsParser.swift +112 -6
  62. package/ios/Sources/Utils/EventParamsBuilder.swift +114 -5
  63. package/ios/Sources/Utils/FollowEntityExtractUtils.swift +86 -0
  64. package/ios/Sources/Utils/PlaybackConfigurationExtractUtils.swift +15 -0
  65. package/ios/Sources/Widgets/Base/BlazeWidgetBase.swift +173 -19
  66. package/ios/Sources/Widgets/Base/BlazeWidgetBaseProtocol.swift +12 -2
  67. package/ios/Sources/Widgets/Base/BlazeWidgetViewManagerBase.h +23 -1
  68. package/ios/Sources/Widgets/Base/BlazeWidgetViewManagerBase.swift +42 -2
  69. package/ios/Sources/Widgets/BlazeMomentsGridWidget.swift +1 -0
  70. package/ios/Sources/Widgets/BlazeMomentsRowWidget.swift +1 -0
  71. package/ios/Sources/Widgets/BlazeVideosGridWidget.swift +1 -0
  72. package/ios/Sources/Widgets/BlazeVideosRowWidget.swift +1 -0
  73. package/lib/commonjs/NativeBlazeSdk.js +33 -5
  74. package/lib/commonjs/NativeBlazeSdk.js.map +1 -1
  75. package/lib/commonjs/classes/base-player-delegate.js +84 -1
  76. package/lib/commonjs/classes/base-player-delegate.js.map +1 -1
  77. package/lib/commonjs/classes/entry-point-delegate.js +33 -0
  78. package/lib/commonjs/classes/entry-point-delegate.js.map +1 -1
  79. package/lib/commonjs/classes/follow-entities-delegate.js +13 -1
  80. package/lib/commonjs/classes/follow-entities-delegate.js.map +1 -1
  81. package/lib/commonjs/index.js.map +1 -1
  82. package/lib/commonjs/interfaces/captions-style.js +6 -0
  83. package/lib/commonjs/interfaces/captions-style.js.map +1 -0
  84. package/lib/commonjs/interfaces/content-entitlements.interface.js +25 -0
  85. package/lib/commonjs/interfaces/content-entitlements.interface.js.map +1 -0
  86. package/lib/commonjs/interfaces/index.js +33 -0
  87. package/lib/commonjs/interfaces/index.js.map +1 -1
  88. package/lib/commonjs/interfaces/videos-filter-params.interface.js +2 -0
  89. package/lib/commonjs/interfaces/videos-filter-params.interface.js.map +1 -0
  90. package/lib/commonjs/widgets/BlazeBaseWidgetComponent.js +42 -8
  91. package/lib/commonjs/widgets/BlazeBaseWidgetComponent.js.map +1 -1
  92. package/lib/commonjs/widgets/BlazeMomentsGridView.js +2 -2
  93. package/lib/commonjs/widgets/BlazeMomentsGridView.js.map +1 -1
  94. package/lib/commonjs/widgets/BlazeMomentsRowView.js +2 -2
  95. package/lib/commonjs/widgets/BlazeMomentsRowView.js.map +1 -1
  96. package/lib/commonjs/widgets/BlazeMomentsTabsWidgetView.js +54 -0
  97. package/lib/commonjs/widgets/BlazeMomentsTabsWidgetView.js.map +1 -0
  98. package/lib/module/NativeBlazeSdk.js +32 -4
  99. package/lib/module/NativeBlazeSdk.js.map +1 -1
  100. package/lib/module/classes/base-player-delegate.js +84 -1
  101. package/lib/module/classes/base-player-delegate.js.map +1 -1
  102. package/lib/module/classes/entry-point-delegate.js +33 -0
  103. package/lib/module/classes/entry-point-delegate.js.map +1 -1
  104. package/lib/module/classes/follow-entities-delegate.js +14 -1
  105. package/lib/module/classes/follow-entities-delegate.js.map +1 -1
  106. package/lib/module/index.js.map +1 -1
  107. package/lib/module/interfaces/captions-style.js +2 -0
  108. package/lib/module/interfaces/captions-style.js.map +1 -0
  109. package/lib/module/interfaces/content-entitlements.interface.js +19 -0
  110. package/lib/module/interfaces/content-entitlements.interface.js.map +1 -0
  111. package/lib/module/interfaces/index.js +3 -0
  112. package/lib/module/interfaces/index.js.map +1 -1
  113. package/lib/module/interfaces/videos-filter-params.interface.js +2 -0
  114. package/lib/module/interfaces/videos-filter-params.interface.js.map +1 -0
  115. package/lib/module/widgets/BlazeBaseWidgetComponent.js +42 -8
  116. package/lib/module/widgets/BlazeBaseWidgetComponent.js.map +1 -1
  117. package/lib/module/widgets/BlazeMomentsGridView.js +2 -2
  118. package/lib/module/widgets/BlazeMomentsGridView.js.map +1 -1
  119. package/lib/module/widgets/BlazeMomentsRowView.js +2 -2
  120. package/lib/module/widgets/BlazeMomentsRowView.js.map +1 -1
  121. package/lib/module/widgets/BlazeMomentsTabsWidgetView.js +48 -0
  122. package/lib/module/widgets/BlazeMomentsTabsWidgetView.js.map +1 -0
  123. package/lib/typescript/NativeBlazeSdk.d.ts +44 -1
  124. package/lib/typescript/NativeBlazeSdk.d.ts.map +1 -1
  125. package/lib/typescript/classes/base-player-delegate.d.ts +58 -1
  126. package/lib/typescript/classes/base-player-delegate.d.ts.map +1 -1
  127. package/lib/typescript/classes/blaze-recommendations-type.d.ts +4 -3
  128. package/lib/typescript/classes/blaze-recommendations-type.d.ts.map +1 -1
  129. package/lib/typescript/classes/entry-point-delegate.d.ts +3 -0
  130. package/lib/typescript/classes/entry-point-delegate.d.ts.map +1 -1
  131. package/lib/typescript/classes/follow-entities-delegate.d.ts +35 -0
  132. package/lib/typescript/classes/follow-entities-delegate.d.ts.map +1 -1
  133. package/lib/typescript/classes/player-container-tabs-delegate.d.ts +11 -0
  134. package/lib/typescript/classes/player-container-tabs-delegate.d.ts.map +1 -1
  135. package/lib/typescript/index.d.ts +3 -3
  136. package/lib/typescript/index.d.ts.map +1 -1
  137. package/lib/typescript/interfaces/actions-options.interface.d.ts +5 -0
  138. package/lib/typescript/interfaces/actions-options.interface.d.ts.map +1 -1
  139. package/lib/typescript/interfaces/captions-style.d.ts +33 -0
  140. package/lib/typescript/interfaces/captions-style.d.ts.map +1 -0
  141. package/lib/typescript/interfaces/common.interface.d.ts +12 -0
  142. package/lib/typescript/interfaces/common.interface.d.ts.map +1 -1
  143. package/lib/typescript/interfaces/content-entitlements.interface.d.ts +26 -0
  144. package/lib/typescript/interfaces/content-entitlements.interface.d.ts.map +1 -0
  145. package/lib/typescript/interfaces/index.d.ts +3 -0
  146. package/lib/typescript/interfaces/index.d.ts.map +1 -1
  147. package/lib/typescript/interfaces/init-options.interface.d.ts +16 -0
  148. package/lib/typescript/interfaces/init-options.interface.d.ts.map +1 -1
  149. package/lib/typescript/interfaces/moments-player-style.d.ts +34 -1
  150. package/lib/typescript/interfaces/moments-player-style.d.ts.map +1 -1
  151. package/lib/typescript/interfaces/moments-widget-tabs-configuration.d.ts +37 -0
  152. package/lib/typescript/interfaces/moments-widget-tabs-configuration.d.ts.map +1 -1
  153. package/lib/typescript/interfaces/stories-playback-configuration.d.ts +15 -0
  154. package/lib/typescript/interfaces/stories-playback-configuration.d.ts.map +1 -1
  155. package/lib/typescript/interfaces/stories-player-style.d.ts +27 -1
  156. package/lib/typescript/interfaces/stories-player-style.d.ts.map +1 -1
  157. package/lib/typescript/interfaces/videos-filter-params.interface.d.ts +17 -0
  158. package/lib/typescript/interfaces/videos-filter-params.interface.d.ts.map +1 -0
  159. package/lib/typescript/interfaces/videos-playback-configuration.d.ts +5 -1
  160. package/lib/typescript/interfaces/videos-playback-configuration.d.ts.map +1 -1
  161. package/lib/typescript/interfaces/videos-player-style.d.ts +118 -1
  162. package/lib/typescript/interfaces/videos-player-style.d.ts.map +1 -1
  163. package/lib/typescript/interfaces/widget-layout.interface.d.ts +52 -1
  164. package/lib/typescript/interfaces/widget-layout.interface.d.ts.map +1 -1
  165. package/lib/typescript/interfaces/widget-presets.d.ts +6 -0
  166. package/lib/typescript/interfaces/widget-presets.d.ts.map +1 -1
  167. package/lib/typescript/interfaces/widgets-props.interface.d.ts +43 -1
  168. package/lib/typescript/interfaces/widgets-props.interface.d.ts.map +1 -1
  169. package/lib/typescript/shared/BlazeAsyncBridge.d.ts.map +1 -1
  170. package/lib/typescript/widgets/BlazeBaseWidgetComponent.d.ts +8 -0
  171. package/lib/typescript/widgets/BlazeBaseWidgetComponent.d.ts.map +1 -1
  172. package/lib/typescript/widgets/BlazeBaseWidgetViewProps.d.ts +31 -1
  173. package/lib/typescript/widgets/BlazeBaseWidgetViewProps.d.ts.map +1 -1
  174. package/lib/typescript/widgets/BlazeMomentsGridView.d.ts +2 -2
  175. package/lib/typescript/widgets/BlazeMomentsGridView.d.ts.map +1 -1
  176. package/lib/typescript/widgets/BlazeMomentsRowView.d.ts +2 -2
  177. package/lib/typescript/widgets/BlazeMomentsRowView.d.ts.map +1 -1
  178. package/lib/typescript/widgets/BlazeMomentsTabsWidgetView.d.ts +20 -0
  179. package/lib/typescript/widgets/BlazeMomentsTabsWidgetView.d.ts.map +1 -0
  180. package/package.json +5 -5
  181. package/src/NativeBlazeSdk.tsx +109 -9
  182. package/src/classes/base-player-delegate.tsx +153 -2
  183. package/src/classes/blaze-recommendations-type.tsx +4 -4
  184. package/src/classes/entry-point-delegate.tsx +55 -1
  185. package/src/classes/follow-entities-delegate.tsx +40 -1
  186. package/src/classes/player-container-tabs-delegate.tsx +11 -0
  187. package/src/index.tsx +17 -2
  188. package/src/interfaces/actions-options.interface.tsx +5 -0
  189. package/src/interfaces/captions-style.tsx +43 -0
  190. package/src/interfaces/common.interface.tsx +13 -0
  191. package/src/interfaces/content-entitlements.interface.tsx +42 -0
  192. package/src/interfaces/index.tsx +3 -0
  193. package/src/interfaces/init-options.interface.tsx +22 -0
  194. package/src/interfaces/moments-player-style.tsx +37 -0
  195. package/src/interfaces/moments-widget-tabs-configuration.tsx +38 -0
  196. package/src/interfaces/stories-playback-configuration.tsx +17 -0
  197. package/src/interfaces/stories-player-style.tsx +29 -0
  198. package/src/interfaces/videos-filter-params.interface.tsx +19 -0
  199. package/src/interfaces/videos-playback-configuration.tsx +5 -1
  200. package/src/interfaces/videos-player-style.tsx +133 -1
  201. package/src/interfaces/widget-layout.interface.tsx +56 -1
  202. package/src/interfaces/widget-presets.tsx +6 -0
  203. package/src/interfaces/widgets-props.interface.tsx +52 -0
  204. package/src/widgets/BlazeBaseWidgetComponent.tsx +77 -8
  205. package/src/widgets/BlazeBaseWidgetViewProps.tsx +36 -0
  206. package/src/widgets/BlazeMomentsGridView.tsx +3 -3
  207. package/src/widgets/BlazeMomentsRowView.tsx +6 -6
  208. package/src/widgets/BlazeMomentsTabsWidgetView.tsx +59 -0
@@ -6,7 +6,7 @@ buildscript {
6
6
  blaze_default_compileSdkVersion = 35
7
7
  blaze_default_minSdkVersion = 24
8
8
  blaze_default_kotlin_version = '2.0.21'
9
- blazesdk_version = '1.19.5'
9
+ blazesdk_version = '1.21.3'
10
10
  blaze_gson_version = '2.10.1'
11
11
  }
12
12
 
@@ -11,12 +11,16 @@ import com.blaze.blazesdk.delegates.BlazePlayerEntryPointDelegate
11
11
  import com.blaze.blazesdk.delegates.BlazeSDKDelegate
12
12
  import com.blaze.blazesdk.delegates.models.BlazeCTAActionType
13
13
  import com.blaze.blazesdk.delegates.models.BlazeFollowEntityClickedParams
14
+ import com.blaze.blazesdk.delegates.models.BlazeInteractionLinkHandleType
14
15
  import com.blaze.blazesdk.delegates.models.BlazePlaybackModificationRequest
15
16
  import com.blaze.blazesdk.delegates.models.BlazePlaybackModificationResponse
16
17
  import com.blaze.blazesdk.style.shared.models.BlazePlayerCustomActionButtonParams
17
18
  import com.blaze.blazesdk.delegates.models.BlazePlayerEvent
18
19
  import com.blaze.blazesdk.delegates.models.BlazePlayerType
19
- import com.blaze.blazesdk.follow.models.BlazeFollowEntity
20
+ import com.blaze.blazesdk.delegates.models.BlazeRestrictedContentParams
21
+ import com.blaze.blazesdk.delegates.models.BlazeShareParams
22
+ import com.blaze.blazesdk.entitlements.models.BlazeContentRestrictionHandleType
23
+ import com.blaze.blazesdk.entitlements.models.BlazeContentRestrictionReason
20
24
  import com.blaze.blazesdk.external_modules.BlazeExternalModulesBinder
21
25
  import com.blaze.blazesdk.features.moments.models.configuration.BlazeMomentsLoopBehavior
22
26
  import com.blaze.blazesdk.features.moments.models.configuration.BlazeMomentsPlaybackConfiguration
@@ -25,22 +29,32 @@ import com.blaze.blazesdk.features.shared.models.ui_shared.BlazeLinkActionHandle
25
29
  import com.blaze.blazesdk.prefetch.models.BlazeCachingLevel
26
30
  import com.blaze.blazesdk.shared.BlazeSDK
27
31
  import com.blaze.blazesdk.shared.models.BlazeEntryPointTriggerSource
32
+ import com.blaze.blazesdk.shared.models.BlazeLayoutDirection
28
33
  import com.blaze.blazesdk.shared.models.BlazePlayerSoundState
29
34
  import com.blaze.blazesdk.shared.results.BlazeResult
30
35
  import com.blaze.rtnblazesdk.events.SdkModuleJsEvent
31
36
  import com.blaze.rtnblazesdk.shared.blazeAsyncBridge
32
37
  import com.blaze.rtnblazesdk.shared.callJSMethod
33
38
  import com.blaze.rtnblazesdk.utils.extractCachingLevel
39
+ import com.blaze.rtnblazesdk.utils.extractLayoutDirection
40
+ import com.blaze.rtnblazesdk.utils.extractPlayerType
34
41
  import com.blaze.rtnblazesdk.utils.extractDataSource
42
+ import com.blaze.rtnblazesdk.utils.extractFetchedContentPolicy
43
+ import com.blaze.rtnblazesdk.utils.extractFollowEntities
44
+ import com.blaze.rtnblazesdk.utils.extractInteractionLinkHandleType
35
45
  import com.blaze.rtnblazesdk.utils.extractMomentsPlayerStyle
36
46
  import com.blaze.rtnblazesdk.utils.extractStoriesPlayerStyle
37
47
  import com.blaze.rtnblazesdk.utils.extractMomentsPlaybackConfiguration
38
48
  import com.blaze.rtnblazesdk.utils.extractStoriesPlaybackConfiguration
49
+ import com.blaze.rtnblazesdk.utils.extractVideosFilterParams
39
50
  import com.blaze.rtnblazesdk.utils.extractVideosPlaybackConfiguration
40
51
  import com.blaze.rtnblazesdk.utils.extractVideosPlayerStyle
41
52
  import com.blaze.rtnblazesdk.utils.getBooleanOrNull
53
+ import com.blaze.rtnblazesdk.utils.getStringOrNull
42
54
  import com.blaze.rtnblazesdk.utils.handleResult
43
55
  import com.blaze.rtnblazesdk.utils.rejectWith
56
+ import com.blaze.rtnblazesdk.utils.runOnWidgetView
57
+ import com.blaze.rtnblazesdk.utils.toReactValue
44
58
  import com.facebook.proguard.annotations.DoNotStrip
45
59
  import com.facebook.react.bridge.NoSuchKeyException
46
60
  import com.facebook.react.bridge.Arguments
@@ -136,6 +150,19 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
136
150
  return BlazeLinkActionHandleType.DEEPLINK
137
151
  }
138
152
 
153
+ override fun onTriggerInteractionLink(
154
+ playerType: BlazePlayerType,
155
+ sourceId: String?,
156
+ interactionId: String,
157
+ interactionType: String,
158
+ url: String
159
+ ): BlazeInteractionLinkHandleType {
160
+ val event = SdkModuleJsEvent.TriggerInteractionLink(playerType, sourceId, interactionId, interactionType, url)
161
+ sendJsEvent(event)
162
+ return BlazeSdkModuleRepo.interactionLinkHandling
163
+ ?: super.onTriggerInteractionLink(playerType, sourceId, interactionId, interactionType, url)
164
+ }
165
+
139
166
  override fun onPlayerEventTriggered(
140
167
  playerType: BlazePlayerType,
141
168
  sourceId: String?,
@@ -163,6 +190,28 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
163
190
  sendJsEvent(event)
164
191
  }
165
192
 
193
+ override fun onShareClicked(
194
+ playerType: BlazePlayerType,
195
+ sourceId: String?,
196
+ shareParams: BlazeShareParams
197
+ ): String? {
198
+ val event = SdkModuleJsEvent.ShareClicked(playerType, sourceId, shareParams)
199
+ sendJsEvent(event)
200
+ // Observer-only: not currently supported for bridging out to React side (see plan.md ## Decisions).
201
+ return null
202
+ }
203
+
204
+ override fun onContentRestricted(
205
+ playerType: BlazePlayerType,
206
+ sourceId: String?,
207
+ reason: BlazeContentRestrictionReason,
208
+ contentParams: BlazeRestrictedContentParams
209
+ ): BlazeContentRestrictionHandleType {
210
+ val event = SdkModuleJsEvent.ContentRestricted(playerType, sourceId, reason, contentParams)
211
+ sendJsEvent(event)
212
+ return super.onContentRestricted(playerType, sourceId, reason, contentParams)
213
+ }
214
+
166
215
  override fun onReadStatusChanged(
167
216
  playerType: BlazePlayerType,
168
217
  sourceId: String?,
@@ -181,7 +230,7 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
181
230
  playerType = followEntityParams.playerType,
182
231
  sourceId = followEntityParams.sourceId,
183
232
  newFollowingState = followEntityParams.newFollowingState,
184
- followEntityId = followEntityParams.followEntity.entityId
233
+ followEntity = followEntityParams.followEntity
185
234
  )
186
235
  sendJsEvent(event)
187
236
  }
@@ -222,6 +271,9 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
222
271
 
223
272
  val cachingLevel = options.extractCachingLevel() ?: BlazeCachingLevel.DEFAULT
224
273
  BlazeSdkModuleRepo.cachingLevel = cachingLevel
274
+ BlazeSdkModuleRepo.interactionLinkHandling = options.extractInteractionLinkHandleType()
275
+
276
+ val forceLayoutDirection = options.extractLayoutDirection()
225
277
 
226
278
  BlazeSDK.init(
227
279
  apiKey = options.getString(KEY_INIT_API_KEY)!!,
@@ -229,6 +281,8 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
229
281
  geoLocation = options.getString(KEY_INIT_GEO_LOCATION),
230
282
  cachingSize = options.getInt(KEY_INIT_CACHING_SIZE),
231
283
  cachingLevel = cachingLevel,
284
+ forceLayoutDirection = forceLayoutDirection,
285
+ externalUserToken = options.getString(KEY_INIT_EXTERNAL_USER_TOKEN),
232
286
  completionBlock = {
233
287
  promise.resolve(BlazeResult.Success(true).toString())
234
288
  },
@@ -266,6 +320,14 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
266
320
  return getString(KEY_INIT_CACHING_LEVEL)?.extractCachingLevel()
267
321
  }
268
322
 
323
+ private fun ReadableMap.extractLayoutDirection(): BlazeLayoutDirection? {
324
+ return getString(KEY_INIT_FORCE_LAYOUT_DIRECTION)?.extractLayoutDirection()
325
+ }
326
+
327
+ private fun ReadableMap.extractInteractionLinkHandleType(): BlazeInteractionLinkHandleType? {
328
+ return getStringOrNull(KEY_INIT_INTERACTION_LINK_HANDLING)?.extractInteractionLinkHandleType()
329
+ }
330
+
269
331
  private fun setAppOverrideCtaHandling(options: ReadableMap) {
270
332
  // getBoolean can throw exception while getString will return null if no such key
271
333
  try {
@@ -509,13 +571,16 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
509
571
  val playbackConfiguration = options.getMap(KEY_ENTRY_POINT_PLAYBACK_CONFIGURATION)
510
572
  .extractVideosPlaybackConfiguration()
511
573
  ?: BlazeSDK.getDefaultVideosPlaybackConfiguration()
574
+ val videosFilterParams = options.getMap(KEY_ENTRY_POINT_VIDEOS_FILTER_PARAMS)
575
+ .extractVideosFilterParams()
512
576
  BlazeSDK.playVideos(
513
577
  dataSource = dataSource,
514
578
  entryContentId = entryContentId,
515
579
  videosPlayerStyle = playerStyle,
516
580
  triggerSource = triggerSource,
517
581
  shouldOrderContentByReadStatus = shouldOrderContentByReadStatus,
518
- playbackConfiguration = playbackConfiguration
582
+ playbackConfiguration = playbackConfiguration,
583
+ videosFilterParams = videosFilterParams
519
584
  ) { result ->
520
585
  promise.handleResult(result)
521
586
  }
@@ -533,7 +598,13 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
533
598
  return
534
599
  }
535
600
  val entryContentId = options.getString(KEY_ENTRY_POINT_CONTENT_ID)
536
- BlazeSDK.prepareVideos(dataSource = dataSource, entryContentId = entryContentId) { result ->
601
+ val videosFilterParams = options.getMap(KEY_ENTRY_POINT_VIDEOS_FILTER_PARAMS)
602
+ .extractVideosFilterParams()
603
+ BlazeSDK.prepareVideos(
604
+ dataSource = dataSource,
605
+ entryContentId = entryContentId,
606
+ videosFilterParams = videosFilterParams
607
+ ) { result ->
537
608
  promise.handleResult(result)
538
609
  }
539
610
  } catch (e: Exception) {
@@ -642,6 +713,9 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
642
713
  val config = BlazeSDK.getDefaultStoriesPlaybackConfiguration()
643
714
  val result = Arguments.createMap().apply {
644
715
  putDouble("bufferingSpinnerDelayMs", config.bufferingSpinnerDelayMs.toDouble())
716
+ putMap("ads", Arguments.createMap().apply {
717
+ putBoolean("enablePreroll", config.ads.enablePreroll)
718
+ })
645
719
  }
646
720
  promise.resolve(result)
647
721
  } catch (e: Exception) {
@@ -678,6 +752,20 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
678
752
  }
679
753
  }
680
754
 
755
+ @ReactMethod
756
+ @DoNotStrip
757
+ fun isInColdStart(playerType: String?, promise: Promise) {
758
+ try {
759
+ val nativePlayerType = playerType?.extractPlayerType() ?: run {
760
+ promise.rejectWith("Invalid BlazePlayerType '$playerType'. Expected 'Moments', 'Stories' or 'Videos'.")
761
+ return
762
+ }
763
+ promise.resolve(BlazeSDK.isInColdStart(nativePlayerType))
764
+ } catch (e: Exception) {
765
+ promise.rejectWith(e.toString())
766
+ }
767
+ }
768
+
681
769
  @ReactMethod
682
770
  @DoNotStrip
683
771
  fun dismissPlayer(promise: Promise) {
@@ -699,6 +787,22 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
699
787
  }
700
788
  }
701
789
 
790
+ @ReactMethod
791
+ @DoNotStrip
792
+ fun setExternalUserToken(externalUserToken: String?, cachedContentPolicy: String?, promise: Promise) {
793
+ val policy = cachedContentPolicy?.extractFetchedContentPolicy() ?: run {
794
+ promise.rejectWith("Invalid cachedContentPolicy for setExternalUserToken. Expected 'Keep' or 'Evict'.")
795
+ return
796
+ }
797
+ try {
798
+ BlazeSDK.setExternalUserToken(externalUserToken, policy) { result ->
799
+ promise.handleResult(result)
800
+ }
801
+ } catch (e: Exception) {
802
+ promise.rejectWith("setExternalUserToken failed: ${e.javaClass.simpleName}")
803
+ }
804
+ }
805
+
702
806
  @ReactMethod
703
807
  @DoNotStrip
704
808
  fun setDoNotTrack(doNotTrack: Boolean, promise: Promise) {
@@ -713,6 +817,18 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
713
817
  promise.resolve(disableAnalytics)
714
818
  }
715
819
 
820
+ @ReactMethod
821
+ @DoNotStrip
822
+ fun setLiquidGlassEnabled(enabled: Boolean, promise: Promise) {
823
+ promise.resolve(null)
824
+ }
825
+
826
+ @ReactMethod
827
+ @DoNotStrip
828
+ fun isLiquidGlassEnabled(promise: Promise) {
829
+ promise.resolve(false)
830
+ }
831
+
716
832
  @ReactMethod
717
833
  @DoNotStrip
718
834
  fun handleUniversalLink(link: String, promise: Promise) {
@@ -778,10 +894,13 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
778
894
 
779
895
  @ReactMethod
780
896
  @DoNotStrip
781
- fun setFollowedEntities(entityIds: ReadableArray, promise: Promise) {
897
+ fun setFollowedEntities(entities: ReadableArray, promise: Promise) {
782
898
  try {
783
- val entities = (0 until entityIds.size()).mapNotNull { entityIds.getString(it)?.let { id -> BlazeFollowEntity(id) } }.toSet()
784
- BlazeSDK.followEntitiesManager.setFollowedEntities(entities)
899
+ val followEntities = entities.extractFollowEntities() ?: run {
900
+ promise.rejectWith("setFollowedEntities: every entry must be a string id or an object with a string id")
901
+ return
902
+ }
903
+ BlazeSDK.followEntitiesManager.setFollowedEntities(followEntities)
785
904
  promise.resolve(null)
786
905
  } catch (e: Exception) {
787
906
  promise.rejectWith(e.toString())
@@ -790,10 +909,13 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
790
909
 
791
910
  @ReactMethod
792
911
  @DoNotStrip
793
- fun insertFollowedEntities(entityIds: ReadableArray, promise: Promise) {
912
+ fun insertFollowedEntities(entities: ReadableArray, promise: Promise) {
794
913
  try {
795
- val entities = (0 until entityIds.size()).mapNotNull { entityIds.getString(it)?.let { id -> BlazeFollowEntity(id) } }.toSet()
796
- BlazeSDK.followEntitiesManager.insertFollowedEntities(entities)
914
+ val followEntities = entities.extractFollowEntities() ?: run {
915
+ promise.rejectWith("insertFollowedEntities: every entry must be a string id or an object with a string id")
916
+ return
917
+ }
918
+ BlazeSDK.followEntitiesManager.insertFollowedEntities(followEntities)
797
919
  promise.resolve(null)
798
920
  } catch (e: Exception) {
799
921
  promise.rejectWith(e.toString())
@@ -802,10 +924,13 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
802
924
 
803
925
  @ReactMethod
804
926
  @DoNotStrip
805
- fun removeFollowedEntities(entityIds: ReadableArray, promise: Promise) {
927
+ fun removeFollowedEntities(entities: ReadableArray, promise: Promise) {
806
928
  try {
807
- val entities = (0 until entityIds.size()).mapNotNull { entityIds.getString(it)?.let { id -> BlazeFollowEntity(id) } }.toSet()
808
- BlazeSDK.followEntitiesManager.removeFollowedEntities(entities)
929
+ val followEntities = entities.extractFollowEntities() ?: run {
930
+ promise.rejectWith("removeFollowedEntities: every entry must be a string id or an object with a string id")
931
+ return
932
+ }
933
+ BlazeSDK.followEntitiesManager.removeFollowedEntities(followEntities)
809
934
  promise.resolve(null)
810
935
  } catch (e: Exception) {
811
936
  promise.rejectWith(e.toString())
@@ -817,10 +942,10 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
817
942
  fun getFollowedEntities(promise: Promise) {
818
943
  try {
819
944
  val entities = BlazeSDK.followEntitiesManager.getFollowedEntities()
820
- val ids = Arguments.createArray().apply {
821
- entities.forEach { pushString(it.entityId) }
945
+ val result = Arguments.createArray().apply {
946
+ entities.forEach { pushMap(it.toReactValue()) }
822
947
  }
823
- promise.resolve(ids)
948
+ promise.resolve(result)
824
949
  } catch (e: Exception) {
825
950
  promise.rejectWith(e.toString())
826
951
  }
@@ -867,6 +992,31 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
867
992
  promise.resolve(BlazeSDK.pipManager.isActive)
868
993
  }
869
994
 
995
+ @ReactMethod
996
+ @DoNotStrip
997
+ fun reloadAllMomentsTabs(viewTag: Int) {
998
+ context.runOnWidgetView(viewTag) { it.reloadAllTabs() }
999
+ }
1000
+
1001
+ @ReactMethod
1002
+ @DoNotStrip
1003
+ fun reloadNonActiveMomentsTabs(viewTag: Int) {
1004
+ context.runOnWidgetView(viewTag) { it.reloadNonActiveTabs() }
1005
+ }
1006
+
1007
+ @ReactMethod
1008
+ @DoNotStrip
1009
+ fun reloadMomentsTab(viewTag: Int, at: Int) {
1010
+ context.runOnWidgetView(viewTag) { it.reloadTab(at = at) }
1011
+ }
1012
+
1013
+ @ReactMethod
1014
+ @DoNotStrip
1015
+ fun reloadMomentsTabByContainerId(viewTag: Int, containerId: String?) {
1016
+ val id = containerId ?: return
1017
+ context.runOnWidgetView(viewTag) { it.reloadTabByContainerId(id) }
1018
+ }
1019
+
870
1020
  companion object {
871
1021
  const val NAME = "RTNBlazeSdk"
872
1022
 
@@ -874,10 +1024,13 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
874
1024
 
875
1025
  const val KEY_INIT_API_KEY = "apiKey"
876
1026
  const val KEY_INIT_EXTERNAL_USER_ID = "externalUserId"
1027
+ const val KEY_INIT_EXTERNAL_USER_TOKEN = "externalUserToken"
877
1028
  const val KEY_INIT_GEO_LOCATION = "geoLocation"
878
1029
  const val KEY_INIT_CACHING_SIZE = "cachingSize"
879
1030
  const val KEY_INIT_CACHING_LEVEL = "cachingLevel"
1031
+ const val KEY_INIT_FORCE_LAYOUT_DIRECTION = "forceLayoutDirection"
880
1032
  const val KEY_INIT_APP_OVERRIDES_CTA_HANDLING = "appOverridesCTAHandling"
1033
+ const val KEY_INIT_INTERACTION_LINK_HANDLING = "interactionLinkHandling"
881
1034
  const val KEY_INIT_DEFAULT_STORY_PLAYER_STYLE = "defaultStoryPlayerStyle"
882
1035
  const val KEY_INIT_DEFAULT_MOMENT_PLAYER_STYLE = "defaultMomentsPlayerStyle"
883
1036
  const val KEY_INIT_DEFAULT_VIDEO_PLAYER_STYLE = "defaultVideosPlayerStyle"
@@ -890,6 +1043,7 @@ class BlazeSdkModule(private val context: ReactApplicationContext): ReactContext
890
1043
  const val KEY_ENTRY_POINT_SOURCE_ID = "sourceId"
891
1044
  const val KEY_ENTRY_POINT_CONTENT_ID = "entryContentId"
892
1045
  const val KEY_ENTRY_POINT_PLAYBACK_CONFIGURATION = "playbackConfiguration"
1046
+ const val KEY_ENTRY_POINT_VIDEOS_FILTER_PARAMS = "videosFilterParams"
893
1047
  private const val PLAYBACK_MODIFICATION_METHOD_NAME = "Blaze.GlobalDelegate.playbackModificationHandler"
894
1048
  }
895
1049
 
@@ -1,7 +1,9 @@
1
1
  package com.blaze.rtnblazesdk
2
2
 
3
+ import com.blaze.blazesdk.delegates.models.BlazeInteractionLinkHandleType
3
4
  import com.blaze.blazesdk.prefetch.models.BlazeCachingLevel
4
5
 
5
6
  object BlazeSdkModuleRepo {
6
7
  var cachingLevel: BlazeCachingLevel? = null
8
+ var interactionLinkHandling: BlazeInteractionLinkHandleType? = null
7
9
  }
@@ -9,8 +9,13 @@ import com.blaze.blazesdk.data_source.BlazeDataSourceType
9
9
  import com.blaze.blazesdk.delegates.BlazePlayerContainerTabsDelegate
10
10
  import com.blaze.blazesdk.delegates.BlazeWidgetDelegate
11
11
  import com.blaze.blazesdk.delegates.models.BlazeCTAActionType
12
+ import com.blaze.blazesdk.delegates.models.BlazeInteractionLinkHandleType
12
13
  import com.blaze.blazesdk.delegates.models.BlazePlayerEvent
13
14
  import com.blaze.blazesdk.delegates.models.BlazePlayerType
15
+ import com.blaze.blazesdk.delegates.models.BlazeRestrictedContentParams
16
+ import com.blaze.blazesdk.delegates.models.BlazeShareParams
17
+ import com.blaze.blazesdk.entitlements.models.BlazeContentRestrictionHandleType
18
+ import com.blaze.blazesdk.entitlements.models.BlazeContentRestrictionReason
14
19
  import com.blaze.blazesdk.extentions.blazeDeepCopy
15
20
  import com.blaze.blazesdk.features.shared.models.ui_shared.BlazeLinkActionHandleType
16
21
  import com.blaze.blazesdk.prefetch.models.BlazeCachingLevel
@@ -25,19 +30,23 @@ import com.blaze.rtnblazesdk.customization.mergedWith
25
30
  import com.blaze.rtnblazesdk.events.MomentsContainerTabsEvent
26
31
  import com.blaze.rtnblazesdk.events.MomentsContainerTabsEventNames
27
32
  import com.blaze.rtnblazesdk.events.WidgetCTAClickEvent
33
+ import com.blaze.rtnblazesdk.events.WidgetContentRestrictedEvent
28
34
  import com.blaze.rtnblazesdk.events.WidgetDataLoadCompletedEvent
29
35
  import com.blaze.rtnblazesdk.events.WidgetDataLoadStartedEvent
30
36
  import com.blaze.rtnblazesdk.events.WidgetHeightChangedEvent
31
37
  import com.blaze.rtnblazesdk.events.WidgetItemClickedEvent
32
38
  import com.blaze.rtnblazesdk.events.WidgetCustomActionButtonEvent
33
39
  import com.blaze.rtnblazesdk.events.WidgetOnPlayerEventTriggered
40
+ import com.blaze.rtnblazesdk.events.WidgetOnTriggerInteractionLinkEvent
34
41
  import com.blaze.rtnblazesdk.events.WidgetOnTriggerPlayerBodyTextLinkEvent
35
42
  import com.blaze.rtnblazesdk.events.WidgetPlayerDidAppearEvent
36
43
  import com.blaze.rtnblazesdk.events.WidgetPlayerDismissedEvent
44
+ import com.blaze.rtnblazesdk.events.WidgetShareClickedEvent
37
45
  import com.blaze.blazesdk.style.shared.models.BlazePlayerCustomActionButtonParams
38
46
  import com.blaze.rtnblazesdk.utils.EventParamsBuilder
39
47
  import com.blaze.rtnblazesdk.utils.extractCachingLevel
40
48
  import com.blaze.rtnblazesdk.utils.extractDataSource
49
+ import com.blaze.rtnblazesdk.utils.extractInteractionLinkHandleType
41
50
  import com.blaze.rtnblazesdk.utils.getBooleanOrNull
42
51
  import com.blaze.rtnblazesdk.utils.isNotEmpty
43
52
  import com.blaze.rtnblazesdk.utils.parsing.fromJsonString
@@ -61,9 +70,24 @@ abstract class BaseWidgetView @JvmOverloads constructor(
61
70
 
62
71
  private var dataSourceType: BlazeDataSourceType? = null
63
72
  var reactCachingLevel: String? = null
73
+
74
+ /**
75
+ * Read once by [callInitWidget] on the standard (non-tabs) initialization path — native has no
76
+ * runtime setter for this, so unlike most other props here, changing it after mount has no effect.
77
+ * Ignored on tabs-backed Moments widgets: the native tabs `initWidget` overload has no such
78
+ * parameter (hardcoded to `null` internally).
79
+ */
80
+ var reactWidgetRemoteIdentifier: String? = null
81
+
82
+ /**
83
+ * Developer-supplied override for the widget's native `widgetId`, read once per `callInitWidget`.
84
+ * When null, the auto-generated `"<Type>-<Row|Grid>: $id"` value is used.
85
+ */
86
+ var reactWidgetId: String? = null
64
87
  var perItemStyleOverridesReadableMap: ReadableMap? = null
65
88
  var presetWidgetLayoutString: String? = null
66
89
  var appOverridesCTAHandling: Boolean = false
90
+ var reactInteractionLinkHandling: String? = null
67
91
  var shouldOrderWidgetByReadStatus: Boolean = true
68
92
  var reactWidgetLayoutStyleMap: ReadableMap? = null
69
93
  var reactWidgetPlayerStyleMap: ReadableMap? = null
@@ -76,9 +100,18 @@ abstract class BaseWidgetView @JvmOverloads constructor(
76
100
  */
77
101
  var reactTabsContainerMap: ReadableMap? = null
78
102
 
103
+ /**
104
+ * Videos-only: filter by content type (regular videos vs. live streams) and live-stream state.
105
+ * Exported to the bridge only by the Videos row/grid managers; ignored by Moments/Stories.
106
+ */
107
+ var reactVideosFilterParamsMap: ReadableMap? = null
108
+
79
109
  val cachingLevel: BlazeCachingLevel
80
110
  get() = reactCachingLevel?.extractCachingLevel() ?: BlazeSdkModuleRepo.cachingLevel ?: BlazeCachingLevel.DEFAULT
81
111
 
112
+ private val declaredInteractionLinkHandling: BlazeInteractionLinkHandleType?
113
+ get() = reactInteractionLinkHandling?.extractInteractionLinkHandleType() ?: BlazeSdkModuleRepo.interactionLinkHandling
114
+
82
115
  protected val widgetDelegate =
83
116
  object : BlazeWidgetDelegate {
84
117
  override fun onDataLoadStarted(playerType: BlazePlayerType, sourceId: String?) {
@@ -169,6 +202,28 @@ abstract class BaseWidgetView @JvmOverloads constructor(
169
202
  return BlazeLinkActionHandleType.DEEPLINK
170
203
  }
171
204
 
205
+ override fun onTriggerInteractionLink(
206
+ playerType: BlazePlayerType,
207
+ sourceId: String?,
208
+ interactionId: String,
209
+ interactionType: String,
210
+ url: String
211
+ ): BlazeInteractionLinkHandleType {
212
+ dispatchEvent(
213
+ WidgetOnTriggerInteractionLinkEvent(
214
+ UIManagerHelper.getSurfaceId(context),
215
+ id,
216
+ playerType = playerType,
217
+ sourceId = sourceId,
218
+ interactionId = interactionId,
219
+ interactionType = interactionType,
220
+ url = url
221
+ )
222
+ )
223
+ return declaredInteractionLinkHandling
224
+ ?: super.onTriggerInteractionLink(playerType, sourceId, interactionId, interactionType, url)
225
+ }
226
+
172
227
  override fun onPlayerEventTriggered(
173
228
  playerType: BlazePlayerType,
174
229
  sourceId: String?,
@@ -212,6 +267,43 @@ abstract class BaseWidgetView @JvmOverloads constructor(
212
267
  )
213
268
  )
214
269
  }
270
+
271
+ override fun onShareClicked(
272
+ playerType: BlazePlayerType,
273
+ sourceId: String?,
274
+ shareParams: BlazeShareParams
275
+ ): String? {
276
+ dispatchEvent(
277
+ WidgetShareClickedEvent(
278
+ UIManagerHelper.getSurfaceId(context),
279
+ id,
280
+ playerType = playerType,
281
+ sourceId = sourceId,
282
+ shareParams = shareParams
283
+ )
284
+ )
285
+ // Observer-only: not currently supported for bridging out to React side (see plan.md ## Decisions).
286
+ return null
287
+ }
288
+
289
+ override fun onContentRestricted(
290
+ playerType: BlazePlayerType,
291
+ sourceId: String?,
292
+ reason: BlazeContentRestrictionReason,
293
+ contentParams: BlazeRestrictedContentParams
294
+ ): BlazeContentRestrictionHandleType {
295
+ dispatchEvent(
296
+ WidgetContentRestrictedEvent(
297
+ UIManagerHelper.getSurfaceId(context),
298
+ id,
299
+ playerType = playerType,
300
+ sourceId = sourceId,
301
+ reason = reason,
302
+ contentParams = contentParams
303
+ )
304
+ )
305
+ return super.onContentRestricted(playerType, sourceId, reason, contentParams)
306
+ }
215
307
  }
216
308
 
217
309
  /**
@@ -280,6 +372,21 @@ abstract class BaseWidgetView @JvmOverloads constructor(
280
372
  return BlazeLinkActionHandleType.DEEPLINK
281
373
  }
282
374
 
375
+ override fun onTriggerInteractionLink(
376
+ playerType: BlazePlayerType,
377
+ sourceId: String?,
378
+ interactionId: String,
379
+ interactionType: String,
380
+ url: String
381
+ ): BlazeInteractionLinkHandleType {
382
+ dispatchTabsEvent(
383
+ MomentsContainerTabsEventNames.TRIGGER_INTERACTION_LINK,
384
+ EventParamsBuilder.buildTriggerInteractionLinkParams(playerType, sourceId, interactionId, interactionType, url)
385
+ )
386
+ return declaredInteractionLinkHandling
387
+ ?: super.onTriggerInteractionLink(playerType, sourceId, interactionId, interactionType, url)
388
+ }
389
+
283
390
  override fun onPlayerEventTriggered(
284
391
  playerType: BlazePlayerType,
285
392
  sourceId: String?,
@@ -313,8 +420,44 @@ abstract class BaseWidgetView @JvmOverloads constructor(
313
420
  )
314
421
  }
315
422
 
316
- // `onSearchButtonClicked` (sync return) and `onShareClicked` (not bridged anywhere) are
317
- // intentionally left at their native defaults.
423
+ override fun onTabReselected(
424
+ playerType: BlazePlayerType,
425
+ sourceId: String?,
426
+ tabIndex: Int
427
+ ) {
428
+ dispatchTabsEvent(
429
+ MomentsContainerTabsEventNames.TAB_RESELECTED,
430
+ EventParamsBuilder.buildTabSelectedParams(playerType, sourceId, tabIndex)
431
+ )
432
+ }
433
+
434
+ override fun onShareClicked(
435
+ playerType: BlazePlayerType,
436
+ sourceId: String?,
437
+ shareParams: BlazeShareParams
438
+ ): String? {
439
+ dispatchTabsEvent(
440
+ MomentsContainerTabsEventNames.SHARE_CLICKED,
441
+ EventParamsBuilder.buildShareClickedParams(playerType, sourceId, shareParams)
442
+ )
443
+ // Observer-only: not currently supported for bridging out to React side (see plan.md ## Decisions).
444
+ return null
445
+ }
446
+
447
+ override fun onContentRestricted(
448
+ playerType: BlazePlayerType,
449
+ sourceId: String?,
450
+ reason: BlazeContentRestrictionReason,
451
+ contentParams: BlazeRestrictedContentParams
452
+ ): BlazeContentRestrictionHandleType {
453
+ dispatchTabsEvent(
454
+ MomentsContainerTabsEventNames.CONTENT_RESTRICTED,
455
+ EventParamsBuilder.buildContentRestrictedParams(playerType, sourceId, reason, contentParams)
456
+ )
457
+ return super.onContentRestricted(playerType, sourceId, reason, contentParams)
458
+ }
459
+
460
+ // `onSearchButtonClicked` (sync return) is intentionally left at its native default.
318
461
  }
319
462
 
320
463
  private fun dispatchTabsEvent(name: String, data: WritableMap) {
@@ -339,6 +482,12 @@ abstract class BaseWidgetView @JvmOverloads constructor(
339
482
  abstract fun updateWidgetsUi()
340
483
  abstract fun play()
341
484
 
485
+ /** Moments tabs reload, called by the SDK module and the legacy view commands; no-op unless a Moments row/grid overrides it. */
486
+ open fun reloadAllTabs() {}
487
+ open fun reloadNonActiveTabs() {}
488
+ open fun reloadTab(at: Int) {}
489
+ open fun reloadTabByContainerId(containerId: String) {}
490
+
342
491
  override fun onHeightChanged(height: Int) {
343
492
  dispatchEvent(
344
493
  WidgetHeightChangedEvent(
@@ -2,15 +2,18 @@ package com.blaze.rtnblazesdk.base
2
2
 
3
3
  import androidx.annotation.Keep
4
4
  import com.blaze.rtnblazesdk.events.WidgetCTAClickEvent
5
+ import com.blaze.rtnblazesdk.events.WidgetContentRestrictedEvent
5
6
  import com.blaze.rtnblazesdk.events.WidgetCustomActionButtonEvent
6
7
  import com.blaze.rtnblazesdk.events.WidgetDataLoadCompletedEvent
7
8
  import com.blaze.rtnblazesdk.events.WidgetDataLoadStartedEvent
8
9
  import com.blaze.rtnblazesdk.events.WidgetHeightChangedEvent
9
10
  import com.blaze.rtnblazesdk.events.WidgetItemClickedEvent
10
11
  import com.blaze.rtnblazesdk.events.WidgetOnPlayerEventTriggered
12
+ import com.blaze.rtnblazesdk.events.WidgetOnTriggerInteractionLinkEvent
11
13
  import com.blaze.rtnblazesdk.events.WidgetOnTriggerPlayerBodyTextLinkEvent
12
14
  import com.blaze.rtnblazesdk.events.WidgetPlayerDidAppearEvent
13
15
  import com.blaze.rtnblazesdk.events.WidgetPlayerDismissedEvent
16
+ import com.blaze.rtnblazesdk.events.WidgetShareClickedEvent
14
17
  import com.blaze.rtnblazesdk.stories.BlazeStoriesGridView
15
18
  import com.facebook.react.bridge.ReactApplicationContext
16
19
  import com.facebook.react.bridge.ReadableArray
@@ -42,8 +45,11 @@ abstract class BlazeWidgetViewManager<TWidget : BaseWidgetView>(
42
45
  WidgetItemClickedEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onItemClickedInternal")),
43
46
  WidgetCTAClickEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onTriggerCTAInternal")),
44
47
  WidgetOnTriggerPlayerBodyTextLinkEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onTriggerPlayerBodyTextLinkInternal")),
48
+ WidgetOnTriggerInteractionLinkEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onTriggerInteractionLinkInternal")),
45
49
  WidgetOnPlayerEventTriggered.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onPlayerEventTriggeredInternal")),
46
50
  WidgetCustomActionButtonEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onTriggerCustomActionButtonInternal")),
51
+ WidgetShareClickedEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onShareClickedInternal")),
52
+ WidgetContentRestrictedEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onContentRestrictedInternal")),
47
53
  WidgetHeightChangedEvent.EVENT_NAME to mapOf(Pair(KEY_EVENT_REGISTRATION_NAME, "onHeightChangedInternal")),
48
54
  )
49
55
  return map
@@ -100,12 +106,30 @@ abstract class BlazeWidgetViewManager<TWidget : BaseWidgetView>(
100
106
  view.appOverridesCTAHandling = value
101
107
  }
102
108
 
109
+ @Keep
110
+ @ReactProp(name = "interactionLinkHandling")
111
+ fun setInteractionLinkHandling(view: TWidget, value: String?) {
112
+ view.reactInteractionLinkHandling = value
113
+ }
114
+
103
115
  @Keep
104
116
  @ReactProp(name = "blazeWidgetLayout")
105
117
  fun setBlazeWidgetLayout(view: TWidget, value: ReadableMap?) {
106
118
  view.reactWidgetLayoutStyleMap = value
107
119
  }
108
120
 
121
+ @Keep
122
+ @ReactProp(name = "widgetRemoteIdentifier")
123
+ fun setWidgetRemoteIdentifier(view: TWidget, value: String?) {
124
+ view.reactWidgetRemoteIdentifier = value
125
+ }
126
+
127
+ @Keep
128
+ @ReactProp(name = "widgetId")
129
+ fun setWidgetId(view: TWidget, value: String?) {
130
+ view.reactWidgetId = value
131
+ }
132
+
109
133
  @Keep
110
134
  @ReactProp(name = "shouldOrderWidgetByReadStatus")
111
135
  fun setShouldOrderWidgetByReadStatus(view: TWidget, value: Boolean) {