react-native-firework-sdk 2.18.9 → 2.18.11
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/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProduct.kt +12 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductDeserializer.kt +36 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt +24 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/enums/FWShortVideoPlayerVersion.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +17 -3
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +14 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +3 -1
- package/ios/Models/NativeToRN/FireworkEventName.swift +1 -0
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +13 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +1 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +14 -0
- package/ios/Modules/Shopping/Product.swift +12 -0
- package/ios/Modules/Shopping/ShoppingModule.swift +35 -0
- package/lib/commonjs/FireworkSDK.js +18 -0
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/components/StoryBlock.js +7 -0
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +7 -0
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/FWEventName.js +1 -0
- package/lib/commonjs/models/FWEventName.js.map +1 -1
- package/lib/commonjs/models/ShortVideoPlayerDesignVersion.js +13 -0
- package/lib/commonjs/models/ShortVideoPlayerDesignVersion.js.map +1 -0
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/FireworkSDK.js +18 -0
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/components/StoryBlock.js +7 -0
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +7 -0
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/FWEventName.js +1 -0
- package/lib/module/models/FWEventName.js.map +1 -1
- package/lib/module/models/ShortVideoPlayerDesignVersion.js +9 -0
- package/lib/module/models/ShortVideoPlayerDesignVersion.js.map +1 -0
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/typescript/commonjs/src/FireworkSDK.d.ts +7 -0
- package/lib/typescript/commonjs/src/FireworkSDK.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StoryBlock.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/VideoFeed.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/FWEventName.d.ts +1 -0
- package/lib/typescript/commonjs/src/models/FWEventName.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/Product.d.ts +40 -0
- package/lib/typescript/commonjs/src/models/Product.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/ProductUnit.d.ts +4 -0
- package/lib/typescript/commonjs/src/models/ProductUnit.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/ShortVideoPlayerDesignVersion.d.ts +6 -0
- package/lib/typescript/commonjs/src/models/ShortVideoPlayerDesignVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/FireworkSDKModule.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/FireworkSDKModule.d.ts.map +1 -1
- package/lib/typescript/module/src/FireworkSDK.d.ts +7 -0
- package/lib/typescript/module/src/FireworkSDK.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StoryBlock.d.ts.map +1 -1
- package/lib/typescript/module/src/components/VideoFeed.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +2 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/FWEventName.d.ts +1 -0
- package/lib/typescript/module/src/models/FWEventName.d.ts.map +1 -1
- package/lib/typescript/module/src/models/Product.d.ts +40 -0
- package/lib/typescript/module/src/models/Product.d.ts.map +1 -1
- package/lib/typescript/module/src/models/ProductUnit.d.ts +4 -0
- package/lib/typescript/module/src/models/ProductUnit.d.ts.map +1 -1
- package/lib/typescript/module/src/models/ShortVideoPlayerDesignVersion.d.ts +6 -0
- package/lib/typescript/module/src/models/ShortVideoPlayerDesignVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/FireworkSDKModule.d.ts +2 -0
- package/lib/typescript/module/src/modules/FireworkSDKModule.d.ts.map +1 -1
- package/package.json +1 -1
- package/react_native_firework_sdk.podspec +1 -1
- package/src/FireworkSDK.ts +23 -0
- package/src/components/StoryBlock.tsx +15 -0
- package/src/components/VideoFeed.tsx +17 -0
- package/src/index.tsx +2 -0
- package/src/models/FWEventName.ts +1 -0
- package/src/models/Product.ts +40 -0
- package/src/models/ProductUnit.ts +4 -0
- package/src/models/ShortVideoPlayerDesignVersion.ts +6 -0
- package/src/modules/FireworkSDKModule.ts +4 -0
|
@@ -8,6 +8,14 @@ export default interface Product {
|
|
|
8
8
|
* The name of the product.
|
|
9
9
|
*/
|
|
10
10
|
name?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The subtitle of the product.
|
|
13
|
+
*/
|
|
14
|
+
subtitle?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The product-level currency string (e.g. "USD", "EUR").
|
|
17
|
+
*/
|
|
18
|
+
currency?: string;
|
|
11
19
|
/**
|
|
12
20
|
* The description of the product.
|
|
13
21
|
*/
|
|
@@ -16,6 +24,38 @@ export default interface Product {
|
|
|
16
24
|
* The availability of the product.
|
|
17
25
|
*/
|
|
18
26
|
isAvailable?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The URL of the main product image.
|
|
29
|
+
*/
|
|
30
|
+
mainProductImage?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to hide the product price.
|
|
33
|
+
*/
|
|
34
|
+
hidePrice?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The translated custom CTA title.
|
|
37
|
+
*/
|
|
38
|
+
customCTATitleTranslation?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to hide the primary CTA button.
|
|
41
|
+
*/
|
|
42
|
+
hidePrimaryCTA?: boolean | null;
|
|
43
|
+
/**
|
|
44
|
+
* The custom CTA target identifier.
|
|
45
|
+
*/
|
|
46
|
+
customCTATarget?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* The custom CTA URL.
|
|
49
|
+
*/
|
|
50
|
+
customCTAUrl?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The custom CTA title.
|
|
53
|
+
*/
|
|
54
|
+
customCTATitle?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the product is hidden.
|
|
57
|
+
*/
|
|
58
|
+
hidden?: boolean | null;
|
|
19
59
|
/**
|
|
20
60
|
* The unit array of the product
|
|
21
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -27,6 +27,10 @@ export default interface ProductUnit {
|
|
|
27
27
|
* The price of the product unit.
|
|
28
28
|
*/
|
|
29
29
|
price?: ProductPrice;
|
|
30
|
+
/**
|
|
31
|
+
* The original price of the product unit (before discount).
|
|
32
|
+
*/
|
|
33
|
+
originalPrice?: ProductPrice;
|
|
30
34
|
/**
|
|
31
35
|
* The availability of the product unit.
|
|
32
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortVideoPlayerDesignVersion.d.ts","sourceRoot":"","sources":["../../../../../src/models/ShortVideoPlayerDesignVersion.ts"],"names":[],"mappings":"AAAA,aAAK,6BAA6B;IAChC,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,eAAe,6BAA6B,CAAC"}
|
|
@@ -5,6 +5,7 @@ import type TrackPurchaseParameters from '../models/TrackPurchaseParameters';
|
|
|
5
5
|
import type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';
|
|
6
6
|
import type { DataTrackingLevel } from '../models/DataTrackingLevel';
|
|
7
7
|
import type LivestreamPlayerDesignVersion from '../models/LivestreamPlayerDesignVersion';
|
|
8
|
+
import type ShortVideoPlayerDesignVersion from '../models/ShortVideoPlayerDesignVersion';
|
|
8
9
|
interface IFireworkSDKModule extends NativeModule {
|
|
9
10
|
init(options?: SDKInitOptions): Promise<any>;
|
|
10
11
|
markInitCalled(): Promise<boolean>;
|
|
@@ -20,6 +21,7 @@ interface IFireworkSDKModule extends NativeModule {
|
|
|
20
21
|
resumePlayer(callbackId: number | string): void;
|
|
21
22
|
setDataTrackingLevel(level?: DataTrackingLevel): Promise<boolean>;
|
|
22
23
|
setLivestreamPlayerDesignVersion(version: LivestreamPlayerDesignVersion): Promise<boolean>;
|
|
24
|
+
setShortVideoPlayerDesignVersion(version: ShortVideoPlayerDesignVersion): Promise<boolean>;
|
|
23
25
|
}
|
|
24
26
|
declare const FireworkSDKModuleEventEmitter: NativeEventEmitter;
|
|
25
27
|
export { FireworkSDKModuleEventEmitter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FireworkSDKModule.d.ts","sourceRoot":"","sources":["../../../../../src/modules/FireworkSDKModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,oBAAoB,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,uBAAuB,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,8BAA8B,MAAM,0CAA0C,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,6BAA6B,MAAM,yCAAyC,CAAC;AAazF,UAAU,kBAAmB,SAAQ,YAAY;IAC/C,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC5E,gCAAgC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACzD,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjD,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,uBAAuB,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACrE,aAAa,CAAC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzD,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/C,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,oBAAoB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,gCAAgC,CAC9B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAED,QAAA,MAAM,6BAA6B,oBAA4C,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,CAAC;wBACL,kBAAkB;AAAtD,wBAAuD"}
|
|
1
|
+
{"version":3,"file":"FireworkSDKModule.d.ts","sourceRoot":"","sources":["../../../../../src/modules/FireworkSDKModule.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,oBAAoB,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,uBAAuB,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,8BAA8B,MAAM,0CAA0C,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,6BAA6B,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,6BAA6B,MAAM,yCAAyC,CAAC;AAazF,UAAU,kBAAmB,SAAQ,YAAY;IAC/C,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC5E,gCAAgC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACzD,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjD,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5C,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,uBAAuB,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACrE,aAAa,CAAC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzD,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/C,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,oBAAoB,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,gCAAgC,CAC9B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,gCAAgC,CAC9B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB;AAED,QAAA,MAAM,6BAA6B,oBAA4C,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,CAAC;wBACL,kBAAkB;AAAtD,wBAAuD"}
|
package/package.json
CHANGED
package/src/FireworkSDK.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
VideoPlaybackEvent,
|
|
13
13
|
} from './models/FWEvents';
|
|
14
14
|
import LivestreamPlayerDesignVersion from './models/LivestreamPlayerDesignVersion';
|
|
15
|
+
import ShortVideoPlayerDesignVersion from './models/ShortVideoPlayerDesignVersion';
|
|
15
16
|
import type MarkInitCalledOptions from './models/MarkInitCalledOptions';
|
|
16
17
|
import type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';
|
|
17
18
|
import type SDKInitOptions from './models/SDKInitOptions';
|
|
@@ -187,6 +188,28 @@ class FireworkSDK {
|
|
|
187
188
|
private _livestreamPlayerDesignVersion: LivestreamPlayerDesignVersion =
|
|
188
189
|
LivestreamPlayerDesignVersion.v1;
|
|
189
190
|
|
|
191
|
+
/**
|
|
192
|
+
* The version of the short video player design.
|
|
193
|
+
*/
|
|
194
|
+
public get shortVideoPlayerDesignVersion(): ShortVideoPlayerDesignVersion {
|
|
195
|
+
return this._shortVideoPlayerDesignVersion;
|
|
196
|
+
}
|
|
197
|
+
public set shortVideoPlayerDesignVersion(
|
|
198
|
+
value: ShortVideoPlayerDesignVersion
|
|
199
|
+
) {
|
|
200
|
+
const valueHasChanged = this._shortVideoPlayerDesignVersion !== value;
|
|
201
|
+
this._shortVideoPlayerDesignVersion = value;
|
|
202
|
+
FireworkSDKModule.setShortVideoPlayerDesignVersion(value).then(() => {
|
|
203
|
+
if (valueHasChanged) {
|
|
204
|
+
this.eventEmitter.emit(
|
|
205
|
+
FWEventName.ShortVideoPlayerDesignVersionUpdated
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
private _shortVideoPlayerDesignVersion: ShortVideoPlayerDesignVersion =
|
|
211
|
+
ShortVideoPlayerDesignVersion.v1;
|
|
212
|
+
|
|
190
213
|
private get eventEmitter(): NativeEventEmitter {
|
|
191
214
|
return FireworkSDKModuleEventEmitter;
|
|
192
215
|
}
|
|
@@ -354,6 +354,8 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
354
354
|
const dataTrackingLevel = FireworkSDK.getInstance().dataTrackingLevel;
|
|
355
355
|
const livestreamPlayerDesignVersion =
|
|
356
356
|
FireworkSDK.getInstance().livestreamPlayerDesignVersion;
|
|
357
|
+
const shortVideoPlayerDesignVersion =
|
|
358
|
+
FireworkSDK.getInstance().shortVideoPlayerDesignVersion;
|
|
357
359
|
|
|
358
360
|
const {
|
|
359
361
|
source,
|
|
@@ -427,6 +429,7 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
427
429
|
}
|
|
428
430
|
key += `_dataTrackingLevel:${dataTrackingLevel}`;
|
|
429
431
|
key += `_livestreamPlayerDesignVersion:${livestreamPlayerDesignVersion}`;
|
|
432
|
+
key += `_shortVideoPlayerDesignVersion:${shortVideoPlayerDesignVersion}`;
|
|
430
433
|
key += `_source:${source}`;
|
|
431
434
|
key += `_channel:${channel}`;
|
|
432
435
|
key += `_playlist:${playlist}`;
|
|
@@ -603,6 +606,17 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
603
606
|
}
|
|
604
607
|
);
|
|
605
608
|
|
|
609
|
+
const subscriptionOfShortVideoPlayerDesignVersionUpdated =
|
|
610
|
+
FireworkSDKModuleEventEmitter.addListener(
|
|
611
|
+
FWEventName.ShortVideoPlayerDesignVersionUpdated,
|
|
612
|
+
() => {
|
|
613
|
+
FWLoggerUtil.log(
|
|
614
|
+
'Receive FWEventName.ShortVideoPlayerDesignVersionUpdated'
|
|
615
|
+
);
|
|
616
|
+
forceUpdate();
|
|
617
|
+
}
|
|
618
|
+
);
|
|
619
|
+
|
|
606
620
|
return () => {
|
|
607
621
|
subscriptionOfShareBaseURLUpdated.remove();
|
|
608
622
|
subscriptionOfAdBadgeConfigurationUpdated.remove();
|
|
@@ -611,6 +625,7 @@ const StoryBlock: ForwardRefRenderFunction<
|
|
|
611
625
|
subscriptionOfProductInfoViewConfigurationUpdated.remove();
|
|
612
626
|
subscriptionOfDataTrackingLevelUpdated.remove();
|
|
613
627
|
subscriptionOfLivestreamPlayerDesignVersionUpdated.remove();
|
|
628
|
+
subscriptionOfShortVideoPlayerDesignVersionUpdated.remove();
|
|
614
629
|
};
|
|
615
630
|
}, []);
|
|
616
631
|
|
|
@@ -372,6 +372,20 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
372
372
|
this._subscriptions.push(
|
|
373
373
|
subscriptionOfLivestreamPlayerDesignVersionUpdated
|
|
374
374
|
);
|
|
375
|
+
|
|
376
|
+
const subscriptionOfShortVideoPlayerDesignVersionUpdated =
|
|
377
|
+
FireworkSDKModuleEventEmitter.addListener(
|
|
378
|
+
FWEventName.ShortVideoPlayerDesignVersionUpdated,
|
|
379
|
+
() => {
|
|
380
|
+
FWLoggerUtil.log(
|
|
381
|
+
'Receive FWEventName.ShortVideoPlayerDesignVersionUpdated'
|
|
382
|
+
);
|
|
383
|
+
this.setState({});
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
this._subscriptions.push(
|
|
387
|
+
subscriptionOfShortVideoPlayerDesignVersionUpdated
|
|
388
|
+
);
|
|
375
389
|
}
|
|
376
390
|
|
|
377
391
|
/**
|
|
@@ -411,6 +425,8 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
411
425
|
const dataTrackingLevel = FireworkSDK.getInstance().dataTrackingLevel;
|
|
412
426
|
const livestreamPlayerDesignVersion =
|
|
413
427
|
FireworkSDK.getInstance().livestreamPlayerDesignVersion;
|
|
428
|
+
const shortVideoPlayerDesignVersion =
|
|
429
|
+
FireworkSDK.getInstance().shortVideoPlayerDesignVersion;
|
|
414
430
|
|
|
415
431
|
const {
|
|
416
432
|
source,
|
|
@@ -509,6 +525,7 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
509
525
|
}
|
|
510
526
|
key += `_dataTrackingLevel:${dataTrackingLevel}`;
|
|
511
527
|
key += `_livestreamPlayerDesignVersion:${livestreamPlayerDesignVersion}`;
|
|
528
|
+
key += `_shortVideoPlayerDesignVersion:${shortVideoPlayerDesignVersion}`;
|
|
512
529
|
key += `_source:${source}`;
|
|
513
530
|
key += `_channel:${channel}`;
|
|
514
531
|
key += `_playlist:${playlist}`;
|
package/src/index.tsx
CHANGED
|
@@ -60,6 +60,7 @@ import type LiveStreamEventDetails from './models/LiveStreamEventDetails';
|
|
|
60
60
|
import LiveStreamEventName from './models/LiveStreamEventName';
|
|
61
61
|
import type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';
|
|
62
62
|
import LivestreamPlayerDesignVersion from './models/LivestreamPlayerDesignVersion';
|
|
63
|
+
import ShortVideoPlayerDesignVersion from './models/ShortVideoPlayerDesignVersion';
|
|
63
64
|
import type MarkInitCalledOptions from './models/MarkInitCalledOptions';
|
|
64
65
|
import type OpenVideoPlayerConfiguration from './models/OpenVideoPlayerConfiguration';
|
|
65
66
|
import type Product from './models/Product';
|
|
@@ -141,6 +142,7 @@ export {
|
|
|
141
142
|
LiveStreamEventName,
|
|
142
143
|
LiveStreamStatus,
|
|
143
144
|
LivestreamPlayerDesignVersion,
|
|
145
|
+
ShortVideoPlayerDesignVersion,
|
|
144
146
|
PipPlacement,
|
|
145
147
|
StoryBlock,
|
|
146
148
|
VideoFeed,
|
|
@@ -21,5 +21,6 @@ export enum FWEventName {
|
|
|
21
21
|
ProductInfoViewConfigurationUpdated = 'fw:product-info-view-configuration-updated',
|
|
22
22
|
ProductClick = 'fw:shopping:product-click',
|
|
23
23
|
LivestreamPlayerDesignVersionUpdated = 'fw:livestream-player-design-version-updated',
|
|
24
|
+
ShortVideoPlayerDesignVersionUpdated = 'fw:short-video-player-design-version-updated',
|
|
24
25
|
DataTrackingLevelUpdated = 'fw:data-tracking-level-updated',
|
|
25
26
|
}
|
package/src/models/Product.ts
CHANGED
|
@@ -9,6 +9,14 @@ export default interface Product {
|
|
|
9
9
|
* The name of the product.
|
|
10
10
|
*/
|
|
11
11
|
name?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* The subtitle of the product.
|
|
14
|
+
*/
|
|
15
|
+
subtitle?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The product-level currency string (e.g. "USD", "EUR").
|
|
18
|
+
*/
|
|
19
|
+
currency?: string;
|
|
12
20
|
/**
|
|
13
21
|
* The description of the product.
|
|
14
22
|
*/
|
|
@@ -17,6 +25,38 @@ export default interface Product {
|
|
|
17
25
|
* The availability of the product.
|
|
18
26
|
*/
|
|
19
27
|
isAvailable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The URL of the main product image.
|
|
30
|
+
*/
|
|
31
|
+
mainProductImage?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to hide the product price.
|
|
34
|
+
*/
|
|
35
|
+
hidePrice?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The translated custom CTA title.
|
|
38
|
+
*/
|
|
39
|
+
customCTATitleTranslation?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to hide the primary CTA button.
|
|
42
|
+
*/
|
|
43
|
+
hidePrimaryCTA?: boolean | null;
|
|
44
|
+
/**
|
|
45
|
+
* The custom CTA target identifier.
|
|
46
|
+
*/
|
|
47
|
+
customCTATarget?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* The custom CTA URL.
|
|
50
|
+
*/
|
|
51
|
+
customCTAUrl?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* The custom CTA title.
|
|
54
|
+
*/
|
|
55
|
+
customCTATitle?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the product is hidden.
|
|
58
|
+
*/
|
|
59
|
+
hidden?: boolean | null;
|
|
20
60
|
/**
|
|
21
61
|
* The unit array of the product
|
|
22
62
|
*/
|
|
@@ -29,6 +29,10 @@ export default interface ProductUnit {
|
|
|
29
29
|
* The price of the product unit.
|
|
30
30
|
*/
|
|
31
31
|
price?: ProductPrice;
|
|
32
|
+
/**
|
|
33
|
+
* The original price of the product unit (before discount).
|
|
34
|
+
*/
|
|
35
|
+
originalPrice?: ProductPrice;
|
|
32
36
|
/**
|
|
33
37
|
* The availability of the product unit.
|
|
34
38
|
*/
|
|
@@ -11,6 +11,7 @@ import type TrackPurchaseParameters from '../models/TrackPurchaseParameters';
|
|
|
11
11
|
import type VideoPlayerNativeConfiguration from '../models/VideoPlayerNativeConfiguration';
|
|
12
12
|
import type { DataTrackingLevel } from '../models/DataTrackingLevel';
|
|
13
13
|
import type LivestreamPlayerDesignVersion from '../models/LivestreamPlayerDesignVersion';
|
|
14
|
+
import type ShortVideoPlayerDesignVersion from '../models/ShortVideoPlayerDesignVersion';
|
|
14
15
|
|
|
15
16
|
const FireworkSDKModule = NativeModules.FireworkSDK
|
|
16
17
|
? NativeModules.FireworkSDK
|
|
@@ -40,6 +41,9 @@ interface IFireworkSDKModule extends NativeModule {
|
|
|
40
41
|
setLivestreamPlayerDesignVersion(
|
|
41
42
|
version: LivestreamPlayerDesignVersion
|
|
42
43
|
): Promise<boolean>;
|
|
44
|
+
setShortVideoPlayerDesignVersion(
|
|
45
|
+
version: ShortVideoPlayerDesignVersion
|
|
46
|
+
): Promise<boolean>;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
const FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);
|