react-native-firework-sdk 2.18.8 → 2.18.10
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/FWVideoFeedConfigModel.kt +8 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelDeserializer.kt +19 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModelSerializer.kt +17 -0
- 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/reactnative/module/FWVideoShoppingModule.kt +17 -3
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWConfigUtil.kt +10 -0
- package/ios/Components/StoryBlock.swift +8 -0
- package/ios/Components/StoryBlockManager.m +11 -0
- package/ios/Modules/Shopping/Product.swift +12 -0
- package/ios/Modules/Shopping/ShoppingModule.swift +35 -0
- package/lib/commonjs/components/StoryBlock.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +8 -0
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/module/components/StoryBlock.js.map +1 -1
- package/lib/module/components/VideoFeed.js +8 -0
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/typescript/commonjs/src/components/StoryBlock.d.ts +4 -3
- 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/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/VideoFeedConfiguration.d.ts +0 -1
- package/lib/typescript/commonjs/src/models/VideoFeedConfiguration.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StoryBlock.d.ts +4 -3
- 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/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/VideoFeedConfiguration.d.ts +0 -1
- package/lib/typescript/module/src/models/VideoFeedConfiguration.d.ts.map +1 -1
- package/package.json +1 -1
- package/react_native_firework_sdk.podspec +1 -1
- package/src/components/StoryBlock.tsx +4 -3
- package/src/components/VideoFeed.tsx +12 -0
- package/src/models/Product.ts +40 -0
- package/src/models/ProductUnit.ts +4 -0
- package/src/models/VideoFeedConfiguration.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoFeedConfiguration.d.ts","sourceRoot":"","sources":["../../../../../src/models/VideoFeedConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EA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3,"file":"VideoFeedConfiguration.d.ts","sourceRoot":"","sources":["../../../../../src/models/VideoFeedConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB;IAC7C;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC;;;OAGG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,8BAA8B,CAAC;IAC1C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC"}
|
package/package.json
CHANGED
|
@@ -45,19 +45,20 @@ export interface IStoryBlockMethods {
|
|
|
45
45
|
pause: () => void;
|
|
46
46
|
/**
|
|
47
47
|
* Open the fullscreen story block.
|
|
48
|
-
* Only supported on Android.
|
|
49
48
|
*/
|
|
50
49
|
openFullscreen: () => void;
|
|
51
50
|
/**
|
|
52
51
|
* Triggered when the story block enters the viewport.
|
|
52
|
+
* It is recommended to call this method when the host app detects scroll events.
|
|
53
53
|
* Only supported on iOS.
|
|
54
|
-
*
|
|
54
|
+
* Android automatically handles visibility detection during scrolling, so this API is only available on iOS.
|
|
55
55
|
*/
|
|
56
56
|
onViewportEntered: () => void;
|
|
57
57
|
/**
|
|
58
58
|
* Triggered when the story block leaves the viewport.
|
|
59
|
-
* Only supported on iOS.
|
|
60
59
|
* It is recommended that the host app is triggered when listening for scrolling.
|
|
60
|
+
* Only supported on iOS.
|
|
61
|
+
* Android automatically handles visibility detection during scrolling, so this API is only available on iOS.
|
|
61
62
|
*/
|
|
62
63
|
onViewportLeft: () => void;
|
|
63
64
|
}
|
|
@@ -445,6 +445,14 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
445
445
|
const enableAutoplay = videoFeedConfiguration?.enableAutoplay;
|
|
446
446
|
const gridColumns = videoFeedConfiguration?.gridColumns;
|
|
447
447
|
const itemSpacing = videoFeedConfiguration?.itemSpacing?.toFixed(5);
|
|
448
|
+
const contentPaddingTop =
|
|
449
|
+
videoFeedConfiguration?.contentPadding?.top?.toFixed(5);
|
|
450
|
+
const contentPaddingRight =
|
|
451
|
+
videoFeedConfiguration?.contentPadding?.right?.toFixed(5);
|
|
452
|
+
const contentPaddingBottom =
|
|
453
|
+
videoFeedConfiguration?.contentPadding?.bottom?.toFixed(5);
|
|
454
|
+
const contentPaddingLeft =
|
|
455
|
+
videoFeedConfiguration?.contentPadding?.left?.toFixed(5);
|
|
448
456
|
|
|
449
457
|
const videoPlayerConfiguration = this._getVideoPlayerConfiguration();
|
|
450
458
|
const playerStyle = videoPlayerConfiguration?.playerStyle;
|
|
@@ -535,6 +543,10 @@ class VideoFeed extends React.Component<IVideoFeedProps, IVideoFeedState> {
|
|
|
535
543
|
}
|
|
536
544
|
key += `_gridColumns:${gridColumns}`;
|
|
537
545
|
key += `_itemSpacing:${itemSpacing}`;
|
|
546
|
+
key += `_contentPaddingTop:${contentPaddingTop}`;
|
|
547
|
+
key += `_contentPaddingRight:${contentPaddingRight}`;
|
|
548
|
+
key += `_contentPaddingBottom:${contentPaddingBottom}`;
|
|
549
|
+
key += `_contentPaddingLeft:${contentPaddingLeft}`;
|
|
538
550
|
|
|
539
551
|
key += `_shareBaseURL:${shareBaseURL}`;
|
|
540
552
|
if (Platform.OS === 'android') {
|
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
|
*/
|