react-native-firework-sdk 1.2.4-beta.2 → 1.2.6
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.
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWDataUtils.kt +2 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +33 -10
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWJsonUtils.kt +6 -1
- package/ios/Components/VideoFeed.swift +54 -19
- package/ios/Components/VideoFeedConfiguration.swift +10 -0
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/FWLoggerUtil.js +1 -1
- package/lib/commonjs/utils/FWLoggerUtil.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/FWLoggerUtil.js +1 -1
- package/lib/module/utils/FWLoggerUtil.js.map +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +23 -5
- package/package.json +1 -1
- package/react-native-firework-sdk.podspec +1 -1
- package/src/index.tsx +2 -0
- package/src/models/VideoFeedConfiguration.ts +24 -5
- package/src/utils/FWLoggerUtil.ts +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
package com.fireworksdk.bridge.reactnative.utils
|
|
2
|
+
|
|
2
3
|
import com.facebook.react.bridge.*
|
|
3
4
|
import com.fireworksdk.bridge.utils.FWJsonUtils
|
|
4
5
|
import org.json.JSONArray
|
|
5
6
|
import org.json.JSONException
|
|
6
7
|
import org.json.JSONObject
|
|
7
8
|
|
|
9
|
+
|
|
8
10
|
inline fun <reified T : Any> T.asMap(): WritableMap {
|
|
9
11
|
val jsonString = FWJsonUtils.toJson(this)
|
|
10
12
|
val jsonObject = JSONObject(jsonString)
|
|
@@ -62,16 +62,39 @@ object FWEventUtils {
|
|
|
62
62
|
|
|
63
63
|
fun sendVideoFeedClickEvent(reactContext: ReactContext, info: FWVideoFeedItemDetailsModel) {
|
|
64
64
|
val eventMap = Arguments.createMap()
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
|
|
66
|
+
val contentMap = Arguments.createMap()
|
|
67
|
+
contentMap.putInt("index", info.index?:0)
|
|
68
|
+
contentMap.putString("id", info.id)
|
|
69
|
+
contentMap.putInt("duration", info.duration?:0)
|
|
70
|
+
contentMap.putString("source", info.source)
|
|
71
|
+
contentMap.putString("title", info.title)
|
|
72
|
+
contentMap.putString("playlistGroup", info.playlistGroup)
|
|
73
|
+
contentMap.putString("playlist", info.playlist)
|
|
74
|
+
contentMap.putString("channel", info.channel)
|
|
75
|
+
|
|
76
|
+
if (!info.dynamicContentParameters.isNullOrEmpty()) {
|
|
77
|
+
val dynamicContentParametersMap = Arguments.createMap()
|
|
78
|
+
for (key in info.dynamicContentParameters.keys) {
|
|
79
|
+
val value = info.dynamicContentParameters[key]
|
|
80
|
+
val array = Arguments.createArray()
|
|
81
|
+
if (!value.isNullOrEmpty()) {
|
|
82
|
+
for(item in value) {
|
|
83
|
+
array.pushString(item)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
dynamicContentParametersMap.putArray(key, array)
|
|
87
|
+
}
|
|
88
|
+
contentMap.putMap("dynamicContentParameters", dynamicContentParametersMap)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
eventMap.putMap("info", contentMap)
|
|
92
|
+
// sendLogMessageEvent(reactContext, "[Android] Receive sendVideoFeedClickEvent event before: $info")
|
|
93
|
+
// val jsonString = FWJsonUtils.toJson(info)
|
|
94
|
+
// sendLogMessageEvent(reactContext, "[Android] Receive sendVideoFeedClickEvent event before2: $jsonString")
|
|
95
|
+
// eventMap.putMap("info", info.asMap())
|
|
96
|
+
// sendLogMessageEvent(reactContext, "[Android] Receive sendVideoFeedClickEvent event after: $eventMap")
|
|
97
|
+
|
|
75
98
|
sendEvent(reactContext, FWEventName.VideoFeedClick.rawValue, eventMap)
|
|
76
99
|
}
|
|
77
100
|
|
|
@@ -12,21 +12,6 @@ import FireworkVideo
|
|
|
12
12
|
@objc
|
|
13
13
|
public enum VideoFeedMode: Int {
|
|
14
14
|
case row, colume, grid
|
|
15
|
-
|
|
16
|
-
fileprivate var videoFeedLayout: VideoFeedLayout {
|
|
17
|
-
switch self {
|
|
18
|
-
case .row:
|
|
19
|
-
return VideoFeedHorizontalLayout()
|
|
20
|
-
case .colume:
|
|
21
|
-
let layout = VideoFeedGridLayout()
|
|
22
|
-
layout.numberOfColumns = 1
|
|
23
|
-
return layout
|
|
24
|
-
case .grid:
|
|
25
|
-
let layout = VideoFeedGridLayout()
|
|
26
|
-
layout.numberOfColumns = 2
|
|
27
|
-
return layout
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
15
|
}
|
|
31
16
|
|
|
32
17
|
@objc
|
|
@@ -56,6 +41,7 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
|
|
|
56
41
|
return
|
|
57
42
|
}
|
|
58
43
|
feedVC.viewConfiguration = convertToVideoFeedConentConfiguration()
|
|
44
|
+
feedVC.layout = videoFeedLayout
|
|
59
45
|
}
|
|
60
46
|
}
|
|
61
47
|
@objc public var playerViewConfig: VideoPlayerConfiguration? {
|
|
@@ -87,6 +73,55 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
|
|
|
87
73
|
return .dynamicContent(channelID: channel, parameters: parameters ?? [:])
|
|
88
74
|
}
|
|
89
75
|
}
|
|
76
|
+
|
|
77
|
+
private var videoFeedLayout: VideoFeedLayout {
|
|
78
|
+
var resultLayout: VideoFeedLayout?
|
|
79
|
+
switch mode {
|
|
80
|
+
case .row:
|
|
81
|
+
let layout = VideoFeedHorizontalLayout()
|
|
82
|
+
resultLayout = layout
|
|
83
|
+
break
|
|
84
|
+
case .colume:
|
|
85
|
+
let layout = VideoFeedGridLayout()
|
|
86
|
+
layout.numberOfColumns = 1
|
|
87
|
+
resultLayout = layout
|
|
88
|
+
break
|
|
89
|
+
case .grid:
|
|
90
|
+
let layout = VideoFeedGridLayout()
|
|
91
|
+
layout.numberOfColumns = 2
|
|
92
|
+
resultLayout = layout
|
|
93
|
+
break
|
|
94
|
+
}
|
|
95
|
+
if let config = feedViewConfig {
|
|
96
|
+
if let aspectRatio = config.aspectRatio {
|
|
97
|
+
if let horizontalLayout = resultLayout as? VideoFeedHorizontalLayout {
|
|
98
|
+
horizontalLayout.itemWidthRatio = aspectRatio
|
|
99
|
+
} else if let gridLayout = resultLayout as? VideoFeedGridLayout {
|
|
100
|
+
gridLayout.itemWidthRatio = aspectRatio
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if let contentPadding = config.contentPadding {
|
|
104
|
+
if let top = contentPadding.top {
|
|
105
|
+
resultLayout?.contentInsets.top = top
|
|
106
|
+
}
|
|
107
|
+
if let right = contentPadding.right {
|
|
108
|
+
resultLayout?.contentInsets.right = right
|
|
109
|
+
}
|
|
110
|
+
if let bottom = contentPadding.bottom {
|
|
111
|
+
resultLayout?.contentInsets.bottom = bottom
|
|
112
|
+
}
|
|
113
|
+
if let left = contentPadding.left {
|
|
114
|
+
resultLayout?.contentInsets.left = left
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if let itemSpacing = config.itemSpacing {
|
|
119
|
+
resultLayout?.itemSpacing = itemSpacing
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return resultLayout ?? VideoFeedHorizontalLayout()
|
|
124
|
+
}
|
|
90
125
|
|
|
91
126
|
public override func layoutSubviews() {
|
|
92
127
|
super.layoutSubviews()
|
|
@@ -103,7 +138,7 @@ public class VideoFeed: UIView, VideoFeedViewControllerDelegate {
|
|
|
103
138
|
}
|
|
104
139
|
|
|
105
140
|
let feedVC = VideoFeedViewController(
|
|
106
|
-
layout:
|
|
141
|
+
layout: videoFeedLayout,
|
|
107
142
|
source: source
|
|
108
143
|
)
|
|
109
144
|
|
|
@@ -265,13 +300,13 @@ extension VideoFeed {
|
|
|
265
300
|
}
|
|
266
301
|
if let ctaButtonStyle = config.ctaButtonStyle {
|
|
267
302
|
if let backgroundColor = ctaButtonStyle.backgroundColor {
|
|
268
|
-
vpcConfig.ctaButton.backgroundColor = backgroundColor.uicolor()
|
|
303
|
+
vpcConfig.ctaButton.contentConfiguration.backgroundColor = backgroundColor.uicolor()
|
|
269
304
|
}
|
|
270
305
|
if let textcolor = ctaButtonStyle.textColor {
|
|
271
|
-
vpcConfig.ctaButton.textColor = textcolor.uicolor()
|
|
306
|
+
vpcConfig.ctaButton.contentConfiguration.textColor = textcolor.uicolor()
|
|
272
307
|
}
|
|
273
308
|
if let fontSize = ctaButtonStyle.fontSize {
|
|
274
|
-
vpcConfig.ctaButton.font = UIFont.systemFont(ofSize: CGFloat(fontSize))
|
|
309
|
+
vpcConfig.ctaButton.contentConfiguration.font = UIFont.systemFont(ofSize: CGFloat(fontSize))
|
|
275
310
|
}
|
|
276
311
|
}
|
|
277
312
|
if let showPlaybackButton = config.showPlaybackButton {
|
|
@@ -16,6 +16,9 @@ public class VideoFeedConfiguration: NSObject, Codable {
|
|
|
16
16
|
var playIcon: VideoFeedPlayIconConfiguration?
|
|
17
17
|
var showSponsored: Bool?
|
|
18
18
|
var showAdBadge: Bool?
|
|
19
|
+
var aspectRatio: Double?
|
|
20
|
+
var contentPadding: VideoFeedContentPadding?;
|
|
21
|
+
var itemSpacing: Double?
|
|
19
22
|
|
|
20
23
|
class VideoFeedTitleConfiguration: NSObject, Codable {
|
|
21
24
|
public var hidden: Bool?
|
|
@@ -27,6 +30,13 @@ public class VideoFeedConfiguration: NSObject, Codable {
|
|
|
27
30
|
public var hidden: Bool?
|
|
28
31
|
public var iconWidth: Int?
|
|
29
32
|
}
|
|
33
|
+
|
|
34
|
+
class VideoFeedContentPadding: NSObject, Codable {
|
|
35
|
+
public var top: Double?
|
|
36
|
+
public var right: Double?
|
|
37
|
+
public var bottom: Double?
|
|
38
|
+
public var left: Double?
|
|
39
|
+
}
|
|
30
40
|
|
|
31
41
|
enum VideoFeedTitlePosition: String, Codable {
|
|
32
42
|
case stacked, nested
|
|
@@ -23,7 +23,7 @@ extension RCTConvert {
|
|
|
23
23
|
finalConfig.shareButton.isHidden = showShareButton
|
|
24
24
|
}
|
|
25
25
|
if let ctaStyle = ctaButtonStyle(config["ctaButtonStyle"] as? Dictionary) {
|
|
26
|
-
finalConfig.ctaButton = ctaStyle
|
|
26
|
+
finalConfig.ctaButton.contentConfiguration = ctaStyle
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
return finalConfig
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAQA;;AACA;;AAKA;;AAgBA;;AAEA;;
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["FireworkSDK"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAQA;;AACA;;AAKA;;AAgBA;;AAEA;;AAkBA;;AAcA;;;;eAEeA,oB","sourcesContent":["import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n CustomCTALinkContentRender,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AddToCartResult from './models/AddToCartResult';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n AddToCartEvent,\n CustomCTAClickEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n SDKInitEvent,\n UpdateProductDetailsEvent,\n VideoPlaybackEvent,\n WillDisplayProductEvent,\n} from './models/FWEvents';\nimport LiveStreamChatEventName from './models/LiveStreamChatEventName';\nimport type LiveStreamEventDetails from './models/LiveStreamEventDetails';\nimport LiveStreamEventName from './models/LiveStreamEventName';\nimport type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';\nimport type { NewNativeContainerProps } from './models/NewNativeContainerProps';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type { AddToCartButtonConfiguration } from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice } from './models/ProductUnit';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedContentPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoLaunchBehavior,\n VideoPlayerCompleteAction,\n VideoPlayerCTAStyle,\n VideoPlayerStyle,\n} from './models/VideoPlayerConfiguration';\nimport type {\n AddToCartCallback,\n ClickCartIconCallback,\n UpdateProductDetailsCallback,\n WillDisplayProductCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AddToCartButtonConfiguration,\n AddToCartCallback,\n AddToCartEvent,\n AddToCartResult,\n ClickCartIconCallback,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomCTALinkContentRender,\n FeedItemDetails,\n FWError,\n FWNavigator,\n IVideoFeedProps,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n NewNativeContainerProps,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n SDKInitCallback,\n SDKInitEvent,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedConfiguration,\n VideoFeedContentPadding,\n VideoFeedMode,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTAStyle,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n WillDisplayProductCallback,\n WillDisplayProductEvent,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FWLoggerUtil.ts"],"names":["FWLoggerUtil","log","message","enabled","process","env","NODE_ENV","currentDate","Date","console","toISOString","logNativeMessage","nativeMessage","date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneHours","Math","floor","abs","toString","padStart","timezoneMinutes","timezoneString","year","getFullYear","month","getMonth","day","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds"],"mappings":";;;;;;;;;AAAe,MAAMA,YAAN,CAAmB;AAEtB,SAAHC,GAAG,CAACC,OAAD,EAAkB;AAC1B,QAAIF,YAAY,CAACG,OAAb,IAAwBC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAArD,EAAoE;AAClE,YAAMC,WAAW,GAA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AI,CAACmB,QAAL,GAAgBX,QAAhB,GAA2BC,QAA3B,CAAoC,CAApC,EAAuC,GAAvC,CAAZ;AACA,QAAIW,OAAO,GAAGpB,IAAI,CAACqB,UAAL,GAAkBb,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIa,OAAO,GAAGtB,IAAI,CAACuB,UAAL,GAAkBf,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIe,YAAY,GAAGxB,IAAI,CAACyB,eAAL,GAAuBjB,QAAvB,GAAkCC,QAAlC,CAA2C,CAA3C,EAA8C,GAA9C,CAAnB;AAEA,WAAQ,GAAEG,IAAK,IAAGE,KAAM,IAAGE,GAAI,IAAGE,KAAM,IAAGE,OAAQ,IAAGE,OAAQ,IAAGE,YAAa,GAAEb,cAAe,EAA/F;AACD;;AAtC+B;;;;gBAAbxB,Y,aACO,
|
|
1
|
+
{"version":3,"sources":["FWLoggerUtil.ts"],"names":["FWLoggerUtil","log","message","enabled","process","env","NODE_ENV","currentDate","Date","console","toISOString","logNativeMessage","nativeMessage","date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneHours","Math","floor","abs","toString","padStart","timezoneMinutes","timezoneString","year","getFullYear","month","getMonth","day","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds"],"mappings":";;;;;;;;;AAAe,MAAMA,YAAN,CAAmB;AAEtB,SAAHC,GAAG,CAACC,OAAD,EAAkB;AAC1B,QAAIF,YAAY,CAACG,OAAb,IAAwBC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAArD,EAAoE;AAClE,YAAMC,WAAW,GAAG,IAAIC,IAAJ,EAApB;AAEAC,MAAAA,OAAO,CAACR,GAAR,CACE,6BADF,EAEG,GAAEC,OAAQ,IAAGF,YAAY,CAACU,WAAb,CAAyBH,WAAzB,CAAsC,EAFtD;AAID;AACF;;AAEsB,SAAhBI,g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AtC,EAAyC,GAAzC,CAAd;AACA,QAAIa,OAAO,GAAGtB,IAAI,CAACuB,UAAL,GAAkBf,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIe,YAAY,GAAGxB,IAAI,CAACyB,eAAL,GAAuBjB,QAAvB,GAAkCC,QAAlC,CAA2C,CAA3C,EAA8C,GAA9C,CAAnB;AAEA,WAAQ,GAAEG,IAAK,IAAGE,KAAM,IAAGE,GAAI,IAAGE,KAAM,IAAGE,OAAQ,IAAGE,OAAQ,IAAGE,YAAa,GAAEb,cAAe,EAA/F;AACD;;AAtC+B;;;;gBAAbxB,Y,aACO,K","sourcesContent":["export default class FWLoggerUtil {\n static enabled: boolean = false;\n static log(message: string) {\n if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {\n const currentDate = new Date();\n\n console.log(\n '[react-native-firework-sdk]',\n `${message} ${FWLoggerUtil.toISOString(currentDate)}`\n );\n }\n }\n\n static logNativeMessage(nativeMessage: string) {\n if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {\n console.log('[react-native-firework-sdk] [native]', nativeMessage);\n }\n }\n\n private static toISOString(date: Date): string {\n let timezoneOffset = -date.getTimezoneOffset();\n let timezoneSymbol = timezoneOffset >= 0 ? '+' : '-';\n let timezoneHours = Math.floor(Math.abs(timezoneOffset) / 60)\n .toString()\n .padStart(2, '0');\n let timezoneMinutes = (Math.abs(timezoneOffset) % 60)\n .toString()\n .padStart(2, '0');\n let timezoneString = `${timezoneSymbol}${timezoneHours}:${timezoneMinutes}`;\n let year = date.getFullYear().toString();\n let month = (date.getMonth() + 1).toString().padStart(2, '0');\n let day = date.getDate().toString().padStart(2, '0');\n let hours = date.getHours().toString().padStart(2, '0');\n let minutes = date.getMinutes().toString().padStart(2, '0');\n let seconds = date.getSeconds().toString().padStart(2, '0');\n let milliseconds = date.getMilliseconds().toString().padStart(3, '0');\n\n return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${milliseconds}${timezoneString}`;\n }\n}\n"]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AACA,OAAOA,SAAP,MAAsB,wBAAtB;AAQA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AAgBA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["VideoFeed","FireworkSDK","FWNavigator","LiveStream","LiveStreamChatEventName","LiveStreamEventName","VideoPlaybackEventName","VideoShopping"],"mappings":"AACA,OAAOA,SAAP,MAAsB,wBAAtB;AAQA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,WAAP,MAAwB,eAAxB;AAKA,OAAOC,UAAP,MAAuB,cAAvB;AAgBA,OAAOC,uBAAP,MAAoC,kCAApC;AAEA,OAAOC,mBAAP,MAAgC,8BAAhC;AAkBA,OAAOC,sBAAP,MAAmC,iCAAnC;AAcA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,eAAeN,WAAf;AAEA,SAaEC,WAbF,EAeEC,UAfF,EAiBEC,uBAjBF,EAoBEC,mBApBF,EAiCEL,SAjCF,EA8CEM,sBA9CF,EAoDEC,aApDF","sourcesContent":["import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n CustomCTALinkContentRender,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport FWNavigator from './FWNavigator';\nimport type {\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n} from './LiveStream';\nimport LiveStream from './LiveStream';\nimport type AdBadgeConfiguration from './models/AdBadgeConfiguration';\nimport type { AdBadgeTextType } from './models/AdBadgeConfiguration';\nimport type AddToCartResult from './models/AddToCartResult';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n AddToCartEvent,\n CustomCTAClickEvent,\n LiveStreamChatEvent,\n LiveStreamEvent,\n SDKInitEvent,\n UpdateProductDetailsEvent,\n VideoPlaybackEvent,\n WillDisplayProductEvent,\n} from './models/FWEvents';\nimport LiveStreamChatEventName from './models/LiveStreamChatEventName';\nimport type LiveStreamEventDetails from './models/LiveStreamEventDetails';\nimport LiveStreamEventName from './models/LiveStreamEventName';\nimport type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';\nimport type { NewNativeContainerProps } from './models/NewNativeContainerProps';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type { AddToCartButtonConfiguration } from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice } from './models/ProductUnit';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedContentPadding,\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type { VideoFeedSource } from './models/VideoFeedSource';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type { VideoPlayerSize } from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoLaunchBehavior,\n VideoPlayerCompleteAction,\n VideoPlayerCTAStyle,\n VideoPlayerStyle,\n} from './models/VideoPlayerConfiguration';\nimport type {\n AddToCartCallback,\n ClickCartIconCallback,\n UpdateProductDetailsCallback,\n WillDisplayProductCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nexport default FireworkSDK;\n\nexport {\n AdBadgeConfiguration,\n AdBadgeTextType,\n AddToCartButtonConfiguration,\n AddToCartCallback,\n AddToCartEvent,\n AddToCartResult,\n ClickCartIconCallback,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n CustomCTALinkContentRender,\n FeedItemDetails,\n FWError,\n FWNavigator,\n IVideoFeedProps,\n LiveStream,\n LiveStreamChatEvent,\n LiveStreamChatEventName,\n LiveStreamEvent,\n LiveStreamEventDetails,\n LiveStreamEventName,\n LiveStreamMessageDetails,\n NewNativeContainerProps,\n onLiveStreamChatEventCallback,\n onLiveStreamEventCallback,\n Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n SDKInitCallback,\n SDKInitEvent,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedConfiguration,\n VideoFeedContentPadding,\n VideoFeedMode,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoLaunchBehavior,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTAStyle,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n WillDisplayProductCallback,\n WillDisplayProductEvent,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FWLoggerUtil.ts"],"names":["FWLoggerUtil","log","message","enabled","process","env","NODE_ENV","currentDate","Date","console","toISOString","logNativeMessage","nativeMessage","date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneHours","Math","floor","abs","toString","padStart","timezoneMinutes","timezoneString","year","getFullYear","month","getMonth","day","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds"],"mappings":";;AAAA,eAAe,MAAMA,YAAN,CAAmB;AAEtB,SAAHC,GA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;AACA,QAAIO,GAAG,GAAGhB,IAAI,CAACiB,OAAL,GAAeT,QAAf,GAA0BC,QAA1B,CAAmC,CAAnC,EAAsC,GAAtC,CAAV;AACA,QAAIS,KAAK,GAAGlB,IAAI,CAACmB,QAAL,GAAgBX,QAAhB,GAA2BC,QAA3B,CAAoC,CAApC,EAAuC,GAAvC,CAAZ;AACA,QAAIW,OAAO,GAAGpB,IAAI,CAACqB,UAAL,GAAkBb,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIa,OAAO,GAAGtB,IAAI,CAACuB,UAAL,GAAkBf,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIe,YAAY,GAAGxB,IAAI,CAACyB,eAAL,GAAuBjB,QAAvB,GAAkCC,QAAlC,CAA2C,CAA3C,EAA8C,GAA9C,CAAnB;AAEA,WAAQ,GAAEG,IAAK,IAAGE,KAAM,IAAGE,GAAI,IAAGE,KAAM,IAAGE,OAAQ,IAAGE,OAAQ,IAAGE,YAAa,GAAEb,cAAe,EAA/F;AACD;;AAtC+B;;gBAAbxB,Y,aACO,
|
|
1
|
+
{"version":3,"sources":["FWLoggerUtil.ts"],"names":["FWLoggerUtil","log","message","enabled","process","env","NODE_ENV","currentDate","Date","console","toISOString","logNativeMessage","nativeMessage","date","timezoneOffset","getTimezoneOffset","timezoneSymbol","timezoneHours","Math","floor","abs","toString","padStart","timezoneMinutes","timezoneString","year","getFullYear","month","getMonth","day","getDate","hours","getHours","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds"],"mappings":";;AAAA,eAAe,MAAMA,YAAN,CAAmB;AAEtB,SAAHC,GAAG,CAACC,OAAD,EAAkB;AAC1B,QAAIF,YAAY,CAACG,OAAb,IAAwBC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAArD,EAAoE;AAClE,YAAMC,WAAW,GAAG,IAAIC,IAAJ,EAApB;AAEAC,MAAA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A2BC,QAA3B,CAAoC,CAApC,EAAuC,GAAvC,CAAZ;AACA,QAAIW,OAAO,GAAGpB,IAAI,CAACqB,UAAL,GAAkBb,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIa,OAAO,GAAGtB,IAAI,CAACuB,UAAL,GAAkBf,QAAlB,GAA6BC,QAA7B,CAAsC,CAAtC,EAAyC,GAAzC,CAAd;AACA,QAAIe,YAAY,GAAGxB,IAAI,CAACyB,eAAL,GAAuBjB,QAAvB,GAAkCC,QAAlC,CAA2C,CAA3C,EAA8C,GAA9C,CAAnB;AAEA,WAAQ,GAAEG,IAAK,IAAGE,KAAM,IAAGE,GAAI,IAAGE,KAAM,IAAGE,OAAQ,IAAGE,OAAQ,IAAGE,YAAa,GAAEb,cAAe,EAA/F;AACD;;AAtC+B;;gBAAbxB,Y,aACO,K","sourcesContent":["export default class FWLoggerUtil {\n static enabled: boolean = false;\n static log(message: string) {\n if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {\n const currentDate = new Date();\n\n console.log(\n '[react-native-firework-sdk]',\n `${message} ${FWLoggerUtil.toISOString(currentDate)}`\n );\n }\n }\n\n static logNativeMessage(nativeMessage: string) {\n if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {\n console.log('[react-native-firework-sdk] [native]', nativeMessage);\n }\n }\n\n private static toISOString(date: Date): string {\n let timezoneOffset = -date.getTimezoneOffset();\n let timezoneSymbol = timezoneOffset >= 0 ? '+' : '-';\n let timezoneHours = Math.floor(Math.abs(timezoneOffset) / 60)\n .toString()\n .padStart(2, '0');\n let timezoneMinutes = (Math.abs(timezoneOffset) % 60)\n .toString()\n .padStart(2, '0');\n let timezoneString = `${timezoneSymbol}${timezoneHours}:${timezoneMinutes}`;\n let year = date.getFullYear().toString();\n let month = (date.getMonth() + 1).toString().padStart(2, '0');\n let day = date.getDate().toString().padStart(2, '0');\n let hours = date.getHours().toString().padStart(2, '0');\n let minutes = date.getMinutes().toString().padStart(2, '0');\n let seconds = date.getSeconds().toString().padStart(2, '0');\n let milliseconds = date.getMilliseconds().toString().padStart(3, '0');\n\n return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${milliseconds}${timezoneString}`;\n }\n}\n"]}
|
|
@@ -22,7 +22,7 @@ import type { AddToCartButtonConfiguration } from './models/ProductInfoViewConfi
|
|
|
22
22
|
import type ProductUnit from './models/ProductUnit';
|
|
23
23
|
import type { ProductPrice } from './models/ProductUnit';
|
|
24
24
|
import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
|
|
25
|
-
import type { VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
|
|
25
|
+
import type { VideoFeedContentPadding, VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
|
|
26
26
|
import type { VideoFeedSource } from './models/VideoFeedSource';
|
|
27
27
|
import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
|
|
28
28
|
import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
|
|
@@ -32,4 +32,4 @@ import type { VideoLaunchBehavior, VideoPlayerCompleteAction, VideoPlayerCTAStyl
|
|
|
32
32
|
import type { AddToCartCallback, ClickCartIconCallback, UpdateProductDetailsCallback, WillDisplayProductCallback } from './VideoShopping';
|
|
33
33
|
import VideoShopping from './VideoShopping';
|
|
34
34
|
export default FireworkSDK;
|
|
35
|
-
export { AdBadgeConfiguration, AdBadgeTextType, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, ClickCartIconCallback, CustomCTAClickCallback, CustomCTAClickEvent, CustomCTALinkContentRender, FeedItemDetails, FWError, FWNavigator, IVideoFeedProps, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, NewNativeContainerProps, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, SDKInitCallback, SDKInitEvent, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VideoFeed, VideoFeedClickCallback, VideoFeedConfiguration, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, WillDisplayProductCallback, WillDisplayProductEvent, };
|
|
35
|
+
export { AdBadgeConfiguration, AdBadgeTextType, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, ClickCartIconCallback, CustomCTAClickCallback, CustomCTAClickEvent, CustomCTALinkContentRender, FeedItemDetails, FWError, FWNavigator, IVideoFeedProps, LiveStream, LiveStreamChatEvent, LiveStreamChatEventName, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, NewNativeContainerProps, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, SDKInitCallback, SDKInitEvent, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VideoFeed, VideoFeedClickCallback, VideoFeedConfiguration, VideoFeedContentPadding, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, WillDisplayProductCallback, WillDisplayProductEvent, };
|
|
@@ -8,33 +8,51 @@ export interface VideoFeedPlayIconConfiguration {
|
|
|
8
8
|
iconWidth?: number;
|
|
9
9
|
}
|
|
10
10
|
export declare type VideoFeedTitlePosition = 'stacked' | 'nested';
|
|
11
|
+
export interface VideoFeedContentPadding {
|
|
12
|
+
top?: number;
|
|
13
|
+
right?: number;
|
|
14
|
+
bottom?: number;
|
|
15
|
+
left?: number;
|
|
16
|
+
}
|
|
11
17
|
export default interface VideoFeedConfiguration {
|
|
12
18
|
/**
|
|
13
19
|
* Background color of video feed.
|
|
14
20
|
*/
|
|
15
21
|
backgroundColor?: string;
|
|
16
22
|
/**
|
|
17
|
-
* Corner radius of video feed. Only supported on iOS.
|
|
23
|
+
* Corner radius of video feed item. Only supported on iOS.
|
|
18
24
|
*/
|
|
19
25
|
cornerRadius?: number;
|
|
20
26
|
/**
|
|
21
|
-
* Configuration of video feed title.
|
|
27
|
+
* Configuration of video feed item title.
|
|
22
28
|
*/
|
|
23
29
|
title?: VideoFeedTitleConfiguration;
|
|
24
30
|
/**
|
|
25
|
-
* Title position of video feed.
|
|
31
|
+
* Title position of video feed item.
|
|
26
32
|
*/
|
|
27
33
|
titlePosition?: VideoFeedTitlePosition;
|
|
28
34
|
/**
|
|
29
|
-
* Configuration of video feed play icon. Only supported on iOS.
|
|
35
|
+
* Configuration of video feed item play icon. Only supported on iOS.
|
|
30
36
|
*/
|
|
31
37
|
playIcon?: VideoFeedPlayIconConfiguration;
|
|
32
38
|
/**
|
|
33
|
-
* Indicates if the video feed shows ad badge.
|
|
39
|
+
* Indicates if the video feed item shows ad badge.
|
|
34
40
|
*/
|
|
35
41
|
showAdBadge?: boolean;
|
|
36
42
|
/**
|
|
37
43
|
* Custom layout name for video feed item. Only supported on Android.
|
|
38
44
|
*/
|
|
39
45
|
customLayoutName?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The aspect ratio(width / height) for video feed item. Only supported on iOS.
|
|
48
|
+
*/
|
|
49
|
+
aspectRatio?: number;
|
|
50
|
+
/**
|
|
51
|
+
* The content padding for video feed. Only supported on iOS.
|
|
52
|
+
*/
|
|
53
|
+
contentPadding?: VideoFeedContentPadding;
|
|
54
|
+
/**
|
|
55
|
+
* The item spacing for video feed. Only supported on iOS.
|
|
56
|
+
*/
|
|
57
|
+
itemSpacing?: number;
|
|
40
58
|
}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -41,6 +41,7 @@ import type ProductUnit from './models/ProductUnit';
|
|
|
41
41
|
import type { ProductPrice } from './models/ProductUnit';
|
|
42
42
|
import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
|
|
43
43
|
import type {
|
|
44
|
+
VideoFeedContentPadding,
|
|
44
45
|
VideoFeedPlayIconConfiguration,
|
|
45
46
|
VideoFeedTitleConfiguration,
|
|
46
47
|
VideoFeedTitlePosition,
|
|
@@ -102,6 +103,7 @@ export {
|
|
|
102
103
|
VideoFeed,
|
|
103
104
|
VideoFeedClickCallback,
|
|
104
105
|
VideoFeedConfiguration,
|
|
106
|
+
VideoFeedContentPadding,
|
|
105
107
|
VideoFeedMode,
|
|
106
108
|
VideoFeedPlayIconConfiguration,
|
|
107
109
|
VideoFeedSource,
|
|
@@ -11,33 +11,52 @@ export interface VideoFeedPlayIconConfiguration {
|
|
|
11
11
|
|
|
12
12
|
export type VideoFeedTitlePosition = 'stacked' | 'nested';
|
|
13
13
|
|
|
14
|
+
export interface VideoFeedContentPadding {
|
|
15
|
+
top?: number;
|
|
16
|
+
right?: number;
|
|
17
|
+
bottom?: number;
|
|
18
|
+
left?: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export default interface VideoFeedConfiguration {
|
|
15
22
|
/**
|
|
16
23
|
* Background color of video feed.
|
|
17
24
|
*/
|
|
18
25
|
backgroundColor?: string;
|
|
19
26
|
/**
|
|
20
|
-
* Corner radius of video feed. Only supported on iOS.
|
|
27
|
+
* Corner radius of video feed item. Only supported on iOS.
|
|
21
28
|
*/
|
|
22
29
|
cornerRadius?: number;
|
|
23
30
|
/**
|
|
24
|
-
* Configuration of video feed title.
|
|
31
|
+
* Configuration of video feed item title.
|
|
25
32
|
*/
|
|
26
33
|
title?: VideoFeedTitleConfiguration;
|
|
27
34
|
/**
|
|
28
|
-
* Title position of video feed.
|
|
35
|
+
* Title position of video feed item.
|
|
29
36
|
*/
|
|
30
37
|
titlePosition?: VideoFeedTitlePosition;
|
|
31
38
|
/**
|
|
32
|
-
* Configuration of video feed play icon. Only supported on iOS.
|
|
39
|
+
* Configuration of video feed item play icon. Only supported on iOS.
|
|
33
40
|
*/
|
|
34
41
|
playIcon?: VideoFeedPlayIconConfiguration;
|
|
35
42
|
/**
|
|
36
|
-
* Indicates if the video feed shows ad badge.
|
|
43
|
+
* Indicates if the video feed item shows ad badge.
|
|
37
44
|
*/
|
|
38
45
|
showAdBadge?: boolean;
|
|
39
46
|
/**
|
|
40
47
|
* Custom layout name for video feed item. Only supported on Android.
|
|
41
48
|
*/
|
|
42
49
|
customLayoutName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The aspect ratio(width / height) for video feed item. Only supported on iOS.
|
|
52
|
+
*/
|
|
53
|
+
aspectRatio?: number;
|
|
54
|
+
/**
|
|
55
|
+
* The content padding for video feed. Only supported on iOS.
|
|
56
|
+
*/
|
|
57
|
+
contentPadding?: VideoFeedContentPadding;
|
|
58
|
+
/**
|
|
59
|
+
* The item spacing for video feed. Only supported on iOS.
|
|
60
|
+
*/
|
|
61
|
+
itemSpacing?: number;
|
|
43
62
|
}
|