react-native-firework-sdk 2.4.2 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) 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_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/_CodeSignature/CodeResources +1 -1
  7. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfiguration.kt +8 -0
  8. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationDeserializer.kt +25 -5
  9. package/android/src/main/java/com/fireworksdk/bridge/models/FWProductInfoViewConfigurationSerializer.kt +17 -4
  10. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +1 -0
  11. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelDeserializer.kt +4 -0
  12. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModelSerializer.kt +2 -0
  13. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWProductCardCtaButtonTextValue.kt +18 -0
  14. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWProductCardTheme.kt +18 -0
  15. package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWVideoFeedSource.kt +2 -1
  16. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt +7 -0
  17. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +7 -0
  18. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +1 -1
  19. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +2 -0
  20. package/android/src/main/java/com/fireworksdk/bridge/utils/FWColorUtil.kt +65 -0
  21. package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +7 -8
  22. package/ios/Components/StoryBlock.swift +4 -1
  23. package/ios/Components/StoryBlockManager.m +1 -0
  24. package/ios/Components/VideoFeed.swift +39 -10
  25. package/ios/Components/VideoFeedManager.m +1 -0
  26. package/ios/Components/VideoPlayerConfiguration.swift +10 -0
  27. package/ios/FireworkSdk.xcodeproj/project.pbxproj +4 -0
  28. package/ios/FireworkVideoUI/FireworkVideoUI/Sources/AppLanguage/Extensions/UIKit/UIView+AppLanguage.swift +6 -6
  29. package/ios/FireworkVideoUI/Podfile +1 -1
  30. package/ios/FireworkVideoUI/Podfile.lock +4 -4
  31. package/ios/Models/Common/ButtonInfo.swift +37 -0
  32. package/ios/Models/NativeToRN/FireworkEventName.swift +1 -0
  33. package/ios/Models/NativeToRN/FireworkSDK+Json.swift +11 -1
  34. package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +18 -0
  35. package/ios/Models/RNToNative/RCTConvert+StoryBlock.swift +2 -1
  36. package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +2 -1
  37. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +4 -4
  38. package/ios/Modules/Shopping/ProductInfoViewConfiguration.swift +16 -0
  39. package/ios/Modules/Shopping/ShoppingModule.m +1 -0
  40. package/ios/Modules/Shopping/ShoppingModule.swift +58 -17
  41. package/ios/Utils/Extensions/String+Color.swift +53 -27
  42. package/lib/commonjs/FWNavigator.js +0 -6
  43. package/lib/commonjs/FWNavigator.js.map +1 -1
  44. package/lib/commonjs/VideoShopping.js +32 -0
  45. package/lib/commonjs/VideoShopping.js.map +1 -1
  46. package/lib/commonjs/components/StoryBlock.js +2 -0
  47. package/lib/commonjs/components/StoryBlock.js.map +1 -1
  48. package/lib/commonjs/components/VideoFeed.js +2 -0
  49. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/commonjs/models/ButtonInfo.js +2 -0
  52. package/lib/commonjs/models/ButtonInfo.js.map +1 -0
  53. package/lib/commonjs/models/FWEventName.js +1 -0
  54. package/lib/commonjs/models/FWEventName.js.map +1 -1
  55. package/lib/commonjs/models/VideoPlayerButtonConfiguration.js +2 -0
  56. package/lib/commonjs/models/VideoPlayerButtonConfiguration.js.map +1 -0
  57. package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
  58. package/lib/module/FWNavigator.js +0 -2
  59. package/lib/module/FWNavigator.js.map +1 -1
  60. package/lib/module/VideoShopping.js +31 -0
  61. package/lib/module/VideoShopping.js.map +1 -1
  62. package/lib/module/components/StoryBlock.js +2 -0
  63. package/lib/module/components/StoryBlock.js.map +1 -1
  64. package/lib/module/components/VideoFeed.js +2 -0
  65. package/lib/module/components/VideoFeed.js.map +1 -1
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/module/models/ButtonInfo.js +2 -0
  68. package/lib/module/models/ButtonInfo.js.map +1 -0
  69. package/lib/module/models/FWEventName.js +1 -0
  70. package/lib/module/models/FWEventName.js.map +1 -1
  71. package/lib/module/models/VideoPlayerButtonConfiguration.js +2 -0
  72. package/lib/module/models/VideoPlayerButtonConfiguration.js.map +1 -0
  73. package/lib/module/modules/ShoppingModule.js.map +1 -1
  74. package/lib/typescript/VideoShopping.d.ts +13 -1
  75. package/lib/typescript/components/StoryBlock.d.ts +4 -0
  76. package/lib/typescript/components/VideoFeed.d.ts +4 -0
  77. package/lib/typescript/index.d.ts +6 -4
  78. package/lib/typescript/models/ButtonInfo.d.ts +18 -0
  79. package/lib/typescript/models/FWEventName.d.ts +2 -1
  80. package/lib/typescript/models/FWEvents.d.ts +18 -0
  81. package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +16 -0
  82. package/lib/typescript/models/StoryBlockSource.d.ts +1 -1
  83. package/lib/typescript/models/VideoFeedSource.d.ts +1 -1
  84. package/lib/typescript/models/VideoPlayerButtonConfiguration.d.ts +39 -0
  85. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +6 -0
  86. package/lib/typescript/modules/ShoppingModule.d.ts +1 -0
  87. package/package.json +1 -1
  88. package/react-native-firework-sdk.podspec +1 -1
  89. package/src/FWNavigator.ts +0 -2
  90. package/src/VideoShopping.ts +40 -0
  91. package/src/components/StoryBlock.tsx +6 -0
  92. package/src/components/VideoFeed.tsx +6 -0
  93. package/src/index.ts +14 -0
  94. package/src/models/ButtonInfo.ts +18 -0
  95. package/src/models/FWEventName.ts +1 -0
  96. package/src/models/FWEvents.ts +19 -0
  97. package/src/models/ProductInfoViewConfiguration.ts +19 -0
  98. package/src/models/StoryBlockSource.ts +2 -1
  99. package/src/models/VideoFeedSource.ts +2 -1
  100. package/src/models/VideoPlayerButtonConfiguration.ts +40 -0
  101. package/src/models/VideoPlayerConfiguration.ts +6 -0
  102. package/src/modules/ShoppingModule.ts +1 -0
@@ -0,0 +1,18 @@
1
+ export default interface ButtonInfo {
2
+ /**
3
+ * The name of image in the asset catalogs.
4
+ * For example, you need to add the image in the Images.xcassets(or Assets.xcassets etc.)
5
+ * Only supported on iOS.
6
+ */
7
+ imageName?: string;
8
+ /**
9
+ * The system image name.
10
+ * Only supported on iOS.
11
+ */
12
+ systemImageName?: string;
13
+ /**
14
+ * This applies only to system image.
15
+ * Only supported on iOS.
16
+ */
17
+ tintColor?: string;
18
+ }
@@ -15,5 +15,6 @@ export declare enum FWEventName {
15
15
  AppLanguageUpdated = "fw:app-language-updated",
16
16
  NativeAppLanguageUpdated = "fw:native-app-language-updated",
17
17
  LogMessage = "fw:log-message",
18
- CustomLinkButtonClick = "fw:shopping:custom-link-button-click"
18
+ CustomLinkButtonClick = "fw:shopping:custom-link-button-click",
19
+ CustomProductCardTap = "fw:shopping:custom-product-card-tap"
19
20
  }
@@ -59,6 +59,24 @@ export interface CustomClickLinkButtonEvent {
59
59
  */
60
60
  unitId: string;
61
61
  }
62
+ export interface CustomTapProductCardEvent {
63
+ /**
64
+ * The url for the product unit
65
+ */
66
+ url: string;
67
+ /**
68
+ * A unique identifier of the product.
69
+ */
70
+ productId: string;
71
+ /**
72
+ * A unique identifier of the product unit.
73
+ */
74
+ unitId: string;
75
+ /**
76
+ * the video playback details that the product unit belongs to.
77
+ */
78
+ video: VideoPlaybackDetails;
79
+ }
62
80
  export interface LiveStreamEvent {
63
81
  eventName: LiveStreamEventName;
64
82
  info: LiveStreamEventDetails;
@@ -26,6 +26,18 @@ export interface ShoppingCTAButtonConfiguration {
26
26
  export interface LinkButtonConfiguration {
27
27
  isHidden?: boolean;
28
28
  }
29
+ export type ProductCardCTAButtonText = 'shopNow' | 'buyNow';
30
+ export type ProductCardTheme = 'dark' | 'light';
31
+ export interface ProductCardConfiguration {
32
+ /**
33
+ * The text of shopping CTA button.
34
+ */
35
+ ctaButtonText?: ProductCardCTAButtonText;
36
+ /**
37
+ * The theme of product card.
38
+ */
39
+ theme?: ProductCardTheme;
40
+ }
29
41
  export default interface ProductInfoViewConfiguration {
30
42
  /**
31
43
  * Configuration of shopping CTA button. Only supported on iOS.
@@ -35,4 +47,8 @@ export default interface ProductInfoViewConfiguration {
35
47
  * Configuration of link button next to shopping CTA button.
36
48
  */
37
49
  linkButton?: LinkButtonConfiguration;
50
+ /**
51
+ * Configuration of product card. Only supported on iOS.
52
+ */
53
+ productCard?: ProductCardConfiguration;
38
54
  }
@@ -1 +1 @@
1
- export type StoryBlockSource = 'discover' | 'channel' | 'playlist' | 'dynamicContent' | 'hashtagPlaylist' | 'sku';
1
+ export type StoryBlockSource = 'discover' | 'channel' | 'playlist' | 'dynamicContent' | 'hashtagPlaylist' | 'sku' | 'singleContent';
@@ -1 +1 @@
1
- export type VideoFeedSource = 'discover' | 'channel' | 'playlist' | 'playlistGroup' | 'dynamicContent' | 'hashtagPlaylist' | 'sku';
1
+ export type VideoFeedSource = 'discover' | 'channel' | 'playlist' | 'playlistGroup' | 'dynamicContent' | 'hashtagPlaylist' | 'sku' | 'singleContent';
@@ -0,0 +1,39 @@
1
+ import type ButtonInfo from './ButtonInfo';
2
+ export default interface VideoPlayerButtonConfiguration {
3
+ /**
4
+ * Specifies the video detail button info.
5
+ * Image will be drawn in a 40pt x 40pt frame.
6
+ * Only supported on iOS.
7
+ */
8
+ videoDetailButton?: ButtonInfo;
9
+ /**
10
+ * Specifies the close button info.
11
+ * Image will be drawn in a 40pt x 40pt frame.
12
+ * Only supported on iOS.
13
+ */
14
+ closeButton?: ButtonInfo;
15
+ /**
16
+ * Specifies the mute button info.
17
+ * Image will be drawn in a 40pt x 40pt frame.
18
+ * Only supported on iOS.
19
+ */
20
+ muteButton?: ButtonInfo;
21
+ /**
22
+ * Specifies the unmute button info.
23
+ * Image will be drawn in a 40pt x 40pt frame.
24
+ * Only supported on iOS.
25
+ */
26
+ unmuteButton?: ButtonInfo;
27
+ /**
28
+ * Specifies the play info.
29
+ * Image will be drawn at the center of the player view.
30
+ * Only supported on iOS.
31
+ */
32
+ playButton?: ButtonInfo;
33
+ /**
34
+ * Specifies the pause info.
35
+ * Image will be drawn at the center of the player view.
36
+ * Only supported on iOS.
37
+ */
38
+ pauseButton?: ButtonInfo;
39
+ }
@@ -1,3 +1,4 @@
1
+ import type VideoPlayerButtonConfiguration from './VideoPlayerButtonConfiguration';
1
2
  import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
2
3
  import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
3
4
  import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
@@ -57,4 +58,9 @@ export default interface VideoPlayerConfiguration {
57
58
  * Defaults to fullWidth.
58
59
  */
59
60
  ctaWidth?: VideoPlayerCTAWidth;
61
+ /**
62
+ * The host app could use this property to customize the button images of the video player.
63
+ * Only supported on iOS.
64
+ */
65
+ buttonConfiguration?: VideoPlayerButtonConfiguration;
60
66
  }
@@ -11,6 +11,7 @@ interface IShoppingModule extends NativeModule {
11
11
  clearCallbackId(callbackId: number | string, eventName: string): void;
12
12
  setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;
13
13
  setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;
14
+ setCustomTapProductCardEnabled(enabled: boolean): Promise<any>;
14
15
  }
15
16
  declare const ShoppingModuleEventEmitter: NativeEventEmitter;
16
17
  export { ShoppingModuleEventEmitter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.4.2",
3
+ "version": "2.5.1",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -35,5 +35,5 @@ fi
35
35
 
36
36
  s.static_framework = true
37
37
  s.dependency 'React-Core'
38
- s.dependency 'FireworkVideo', '1.11.0'
38
+ s.dependency 'FireworkVideo', '1.12.0'
39
39
  end
@@ -3,7 +3,6 @@ import type PushRNContainerParams from './models/PushRNContainerParams';
3
3
  import FWNavigatorModule, {
4
4
  FWNavigatorModuleEventEmitter,
5
5
  } from './modules/FWNavigatorModule';
6
- import FWLoggerUtil from './utils/FWLoggerUtil';
7
6
 
8
7
  /**
9
8
  * You can use this class for pushing RN page from the native page.
@@ -19,7 +18,6 @@ class FWNavigator {
19
18
  }
20
19
 
21
20
  private constructor() {
22
- FWLoggerUtil.log('FWNavigator constructor');
23
21
  FWNavigatorModuleEventEmitter.addListener(FWEventName.LogMessage, () => {});
24
22
  }
25
23
 
@@ -3,6 +3,7 @@ import { NativeEventEmitter, Platform } from 'react-native';
3
3
  import { FWEventName } from './models/FWEventName';
4
4
  import type {
5
5
  CustomClickLinkButtonEvent,
6
+ CustomTapProductCardEvent,
6
7
  ShoppingCTAEvent,
7
8
  UpdateProductDetailsEvent,
8
9
  } from './models/FWEvents';
@@ -32,6 +33,10 @@ export type CustomClickLinkButtonCallback = (
32
33
  event: CustomClickLinkButtonEvent
33
34
  ) => Promise<void> | void;
34
35
 
36
+ export type CustomTapProductCardCallback = (
37
+ event: CustomTapProductCardEvent
38
+ ) => Promise<void> | void;
39
+
35
40
  /**
36
41
  * The entry class of video shopping.
37
42
  */
@@ -79,6 +84,28 @@ class VideoShopping {
79
84
  }
80
85
  private _onCustomClickLinkButton?: CustomClickLinkButtonCallback | undefined;
81
86
 
87
+ /**
88
+ * This callback is triggered when the user clicks product card.
89
+ * Only supported on iOS.
90
+ *
91
+ * The host app can customize the tap event processing logic of
92
+ * the product card by setting the callback.
93
+ */
94
+ public get onCustomTapProductCard():
95
+ | CustomTapProductCardCallback
96
+ | undefined {
97
+ return this._onCustomTapProductCard;
98
+ }
99
+ public set onCustomTapProductCard(
100
+ value: CustomTapProductCardCallback | undefined
101
+ ) {
102
+ this._onCustomTapProductCard = value;
103
+ if (Platform.OS === 'ios') {
104
+ ShoppingModule.setCustomTapProductCardEnabled(!!value);
105
+ }
106
+ }
107
+ private _onCustomTapProductCard?: CustomTapProductCardCallback | undefined;
108
+
82
109
  /**
83
110
  * Defaults to true.
84
111
  * You can hide the cart icon by setting this property to false.
@@ -172,6 +199,11 @@ class VideoShopping {
172
199
  this.handleCustomLinkButtonClickEvent(event);
173
200
  }
174
201
  );
202
+
203
+ this.eventEmitter.addListener(FWEventName.CustomProductCardTap, (event) => {
204
+ FWLoggerUtil.log(`Receive CustomProductCardTap event url: ${event?.url}`);
205
+ this.handleCustomProductCardTapEvent(event);
206
+ });
175
207
  }
176
208
 
177
209
  /**
@@ -271,6 +303,14 @@ class VideoShopping {
271
303
  this.onCustomClickLinkButton(event);
272
304
  }
273
305
  }
306
+
307
+ private async handleCustomProductCardTapEvent(
308
+ event: CustomTapProductCardEvent
309
+ ) {
310
+ if (this.onCustomTapProductCard) {
311
+ this.onCustomTapProductCard(event);
312
+ }
313
+ }
274
314
  }
275
315
 
276
316
  export default VideoShopping;
@@ -78,6 +78,10 @@ export interface IStoryBlockProps {
78
78
  * Product ids used to generate the sku feed
79
79
  */
80
80
  productIds?: string[];
81
+ /**
82
+ * The video or live stream id. Only supported on iOS.
83
+ */
84
+ contentId?: string;
81
85
  /**
82
86
  * Specifies if Picture in Picture is enabled. Only supported on iOS.
83
87
  */
@@ -221,6 +225,7 @@ const StoryBlock: ForwardRefRenderFunction<
221
225
  playlist,
222
226
  hashtagFilterExpression,
223
227
  productIds,
228
+ contentId,
224
229
  enablePictureInPicture,
225
230
  cornerRadius,
226
231
  adConfiguration,
@@ -264,6 +269,7 @@ const StoryBlock: ForwardRefRenderFunction<
264
269
  key += `_dynamicContentParameters:${dynamicContentParametersString}`;
265
270
  key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
266
271
  key += `productIds:${productIds?.join(',')}`;
272
+ key += `_contentId:${contentId}`;
267
273
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
268
274
  key += `_cornerRadius:${cornerRadius}`;
269
275
 
@@ -66,6 +66,10 @@ export interface IVideoFeedProps {
66
66
  * Product ids used to generate the sku feed
67
67
  */
68
68
  productIds?: string[];
69
+ /**
70
+ * The video or live stream id. Only supported on iOS.
71
+ */
72
+ contentId?: string;
69
73
  /**
70
74
  * One of three available display modes. Defaults to row.
71
75
  */
@@ -264,6 +268,7 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
264
268
  playlistGroup,
265
269
  hashtagFilterExpression,
266
270
  productIds,
271
+ contentId,
267
272
  mode,
268
273
  enablePictureInPicture,
269
274
  adConfiguration,
@@ -329,6 +334,7 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
329
334
  key += `_dynamicContentParameters:${dynamicContentParametersString}`;
330
335
  key += `_hashtagFilterExpression:${hashtagFilterExpression}`;
331
336
  key += `_productIds:${productIds?.join(',')}`;
337
+ key += `_contentId:${contentId}`;
332
338
  key += `_mode:${mode}`;
333
339
  key += `_enablePictureInPicture:${enablePictureInPicture}`;
334
340
 
package/src/index.ts CHANGED
@@ -23,11 +23,13 @@ import type { AdBadgeTextType } from './models/AdBadgeConfiguration';
23
23
  import type AdConfiguration from './models/AdConfiguration';
24
24
  import type { VastAttribute } from './models/AdConfiguration';
25
25
  import type AndroidFontInfo from './models/AndroidFontInfo';
26
+ import type ButtonInfo from './models/ButtonInfo';
26
27
  import type FeedItemDetails from './models/FeedItemDetails';
27
28
  import type FWError from './models/FWError';
28
29
  import type {
29
30
  CustomClickLinkButtonEvent,
30
31
  CustomCTAClickEvent,
32
+ CustomTapProductCardEvent,
31
33
  LiveStreamChatEvent,
32
34
  LiveStreamEvent,
33
35
  SDKInitEvent,
@@ -52,6 +54,9 @@ import type Product from './models/Product';
52
54
  import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
53
55
  import type {
54
56
  LinkButtonConfiguration,
57
+ ProductCardConfiguration,
58
+ ProductCardCTAButtonText,
59
+ ProductCardTheme,
55
60
  ShoppingCTAButtonConfiguration,
56
61
  ShoppingCTAButtonText,
57
62
  } from './models/ProductInfoViewConfiguration';
@@ -76,6 +81,7 @@ import type { VideoFeedSource } from './models/VideoFeedSource';
76
81
  import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
77
82
  import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
78
83
  import VideoPlaybackEventName from './models/VideoPlaybackEventName';
84
+ import type VideoPlayerButtonConfiguration from './models/VideoPlayerButtonConfiguration';
79
85
  import type { VideoPlayerCompleteAction } from './models/VideoPlayerCompleteAction';
80
86
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
81
87
  import type {
@@ -88,6 +94,7 @@ import type { VideoPlayerStyle } from './models/VideoPlayerStyle';
88
94
  import type {
89
95
  CustomClickCartIconCallback,
90
96
  CustomClickLinkButtonCallback,
97
+ CustomTapProductCardCallback,
91
98
  ShoppingCTACallback,
92
99
  UpdateProductDetailsCallback,
93
100
  } from './VideoShopping';
@@ -100,11 +107,14 @@ export {
100
107
  AdBadgeTextType,
101
108
  AdConfiguration,
102
109
  AndroidFontInfo,
110
+ ButtonInfo,
103
111
  CustomClickCartIconCallback,
104
112
  CustomClickLinkButtonCallback,
105
113
  CustomClickLinkButtonEvent,
106
114
  CustomCTAClickCallback,
107
115
  CustomCTAClickEvent,
116
+ CustomTapProductCardCallback,
117
+ CustomTapProductCardEvent,
108
118
  FeedItemDetails,
109
119
  FireworkSDK,
110
120
  FWError,
@@ -129,6 +139,9 @@ export {
129
139
  onLiveStreamEventCallback,
130
140
  OpenVideoPlayerConfiguration,
131
141
  Product,
142
+ ProductCardConfiguration,
143
+ ProductCardCTAButtonText,
144
+ ProductCardTheme,
132
145
  ProductInfoViewConfiguration,
133
146
  ProductPrice,
134
147
  ProductUnit,
@@ -165,6 +178,7 @@ export {
165
178
  VideoPlaybackDetails,
166
179
  VideoPlaybackEvent,
167
180
  VideoPlaybackEventName,
181
+ VideoPlayerButtonConfiguration,
168
182
  VideoPlayerCompleteAction,
169
183
  VideoPlayerConfiguration,
170
184
  VideoPlayerCTADelay,
@@ -0,0 +1,18 @@
1
+ export default interface ButtonInfo {
2
+ /**
3
+ * The name of image in the asset catalogs.
4
+ * For example, you need to add the image in the Images.xcassets(or Assets.xcassets etc.)
5
+ * Only supported on iOS.
6
+ */
7
+ imageName?: string;
8
+ /**
9
+ * The system image name.
10
+ * Only supported on iOS.
11
+ */
12
+ systemImageName?: string;
13
+ /**
14
+ * This applies only to system image.
15
+ * Only supported on iOS.
16
+ */
17
+ tintColor?: string;
18
+ }
@@ -16,4 +16,5 @@ export enum FWEventName {
16
16
  NativeAppLanguageUpdated = 'fw:native-app-language-updated',
17
17
  LogMessage = 'fw:log-message',
18
18
  CustomLinkButtonClick = 'fw:shopping:custom-link-button-click',
19
+ CustomProductCardTap = 'fw:shopping:custom-product-card-tap',
19
20
  }
@@ -67,6 +67,25 @@ export interface CustomClickLinkButtonEvent {
67
67
  unitId: string;
68
68
  }
69
69
 
70
+ export interface CustomTapProductCardEvent {
71
+ /**
72
+ * The url for the product unit
73
+ */
74
+ url: string;
75
+ /**
76
+ * A unique identifier of the product.
77
+ */
78
+ productId: string;
79
+ /**
80
+ * A unique identifier of the product unit.
81
+ */
82
+ unitId: string;
83
+ /**
84
+ * the video playback details that the product unit belongs to.
85
+ */
86
+ video: VideoPlaybackDetails;
87
+ }
88
+
70
89
  export interface LiveStreamEvent {
71
90
  eventName: LiveStreamEventName;
72
91
  info: LiveStreamEventDetails;
@@ -30,6 +30,21 @@ export interface LinkButtonConfiguration {
30
30
  isHidden?: boolean;
31
31
  }
32
32
 
33
+ export type ProductCardCTAButtonText = 'shopNow' | 'buyNow';
34
+
35
+ export type ProductCardTheme = 'dark' | 'light';
36
+
37
+ export interface ProductCardConfiguration {
38
+ /**
39
+ * The text of shopping CTA button.
40
+ */
41
+ ctaButtonText?: ProductCardCTAButtonText;
42
+ /**
43
+ * The theme of product card.
44
+ */
45
+ theme?: ProductCardTheme;
46
+ }
47
+
33
48
  export default interface ProductInfoViewConfiguration {
34
49
  /**
35
50
  * Configuration of shopping CTA button. Only supported on iOS.
@@ -39,4 +54,8 @@ export default interface ProductInfoViewConfiguration {
39
54
  * Configuration of link button next to shopping CTA button.
40
55
  */
41
56
  linkButton?: LinkButtonConfiguration;
57
+ /**
58
+ * Configuration of product card. Only supported on iOS.
59
+ */
60
+ productCard?: ProductCardConfiguration;
42
61
  }
@@ -4,4 +4,5 @@ export type StoryBlockSource =
4
4
  | 'playlist'
5
5
  | 'dynamicContent'
6
6
  | 'hashtagPlaylist'
7
- | 'sku';
7
+ | 'sku'
8
+ | 'singleContent';
@@ -5,4 +5,5 @@ export type VideoFeedSource =
5
5
  | 'playlistGroup'
6
6
  | 'dynamicContent'
7
7
  | 'hashtagPlaylist'
8
- | 'sku';
8
+ | 'sku'
9
+ | 'singleContent';
@@ -0,0 +1,40 @@
1
+ import type ButtonInfo from './ButtonInfo';
2
+
3
+ export default interface VideoPlayerButtonConfiguration {
4
+ /**
5
+ * Specifies the video detail button info.
6
+ * Image will be drawn in a 40pt x 40pt frame.
7
+ * Only supported on iOS.
8
+ */
9
+ videoDetailButton?: ButtonInfo;
10
+ /**
11
+ * Specifies the close button info.
12
+ * Image will be drawn in a 40pt x 40pt frame.
13
+ * Only supported on iOS.
14
+ */
15
+ closeButton?: ButtonInfo;
16
+ /**
17
+ * Specifies the mute button info.
18
+ * Image will be drawn in a 40pt x 40pt frame.
19
+ * Only supported on iOS.
20
+ */
21
+ muteButton?: ButtonInfo;
22
+ /**
23
+ * Specifies the unmute button info.
24
+ * Image will be drawn in a 40pt x 40pt frame.
25
+ * Only supported on iOS.
26
+ */
27
+ unmuteButton?: ButtonInfo;
28
+ /**
29
+ * Specifies the play info.
30
+ * Image will be drawn at the center of the player view.
31
+ * Only supported on iOS.
32
+ */
33
+ playButton?: ButtonInfo;
34
+ /**
35
+ * Specifies the pause info.
36
+ * Image will be drawn at the center of the player view.
37
+ * Only supported on iOS.
38
+ */
39
+ pauseButton?: ButtonInfo;
40
+ }
@@ -1,3 +1,4 @@
1
+ import type VideoPlayerButtonConfiguration from './VideoPlayerButtonConfiguration';
1
2
  import type { VideoPlayerCTADelay } from './VideoPlayerCTADelay';
2
3
  import type { VideoPlayerCTAStyle } from './VideoPlayerCTAStyle';
3
4
  import type { VideoPlayerCTAWidth } from './VideoPlayerCTAWidth';
@@ -58,4 +59,9 @@ export default interface VideoPlayerConfiguration {
58
59
  * Defaults to fullWidth.
59
60
  */
60
61
  ctaWidth?: VideoPlayerCTAWidth;
62
+ /**
63
+ * The host app could use this property to customize the button images of the video player.
64
+ * Only supported on iOS.
65
+ */
66
+ buttonConfiguration?: VideoPlayerButtonConfiguration;
61
67
  }
@@ -28,6 +28,7 @@ interface IShoppingModule extends NativeModule {
28
28
  clearCallbackId(callbackId: number | string, eventName: string): void; // Only supported on iOS
29
29
  setProductInfoViewConfiguration(config: ProductInfoViewConfiguration): void;
30
30
  setCustomClickLinkButtonEnabled(enabled: boolean): Promise<any>;
31
+ setCustomTapProductCardEnabled(enabled: boolean): Promise<any>; // Only supported on iOS
31
32
  }
32
33
 
33
34
  const ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);