react-native-firework-sdk 1.3.1-beta.4 → 1.3.1-beta.7
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/ios/Components/VideoFeed.swift +2 -0
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +14 -2
- package/ios/Modules/Shopping/ShoppingModule.swift +30 -5
- package/lib/commonjs/FWNavigator.js +2 -0
- package/lib/commonjs/FWNavigator.js.map +1 -1
- package/lib/commonjs/FireworkSDK.js +24 -11
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/LiveStream.js +6 -0
- package/lib/commonjs/LiveStream.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +11 -0
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +16 -0
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/module/FWNavigator.js +1 -0
- package/lib/module/FWNavigator.js.map +1 -1
- package/lib/module/FireworkSDK.js +23 -11
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/LiveStream.js +2 -0
- package/lib/module/LiveStream.js.map +1 -1
- package/lib/module/VideoShopping.js +8 -0
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/VideoFeed.js +8 -0
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/typescript/FireworkSDK.d.ts +3 -0
- package/lib/typescript/modules/ShoppingModule.d.ts +1 -1
- package/package.json +1 -1
- package/src/FWNavigator.tsx +1 -0
- package/src/FireworkSDK.ts +18 -5
- package/src/LiveStream.ts +2 -0
- package/src/VideoShopping.ts +10 -0
- package/src/components/VideoFeed.tsx +20 -0
- package/src/modules/ShoppingModule.ts +3 -2
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
UIManager,
|
|
9
9
|
ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
|
+
import FWLoggerUtil from '../utils/FWLoggerUtil';
|
|
11
12
|
|
|
12
13
|
import FireworkSDK from '../FireworkSDK';
|
|
13
14
|
import type FWError from '../models/FWError';
|
|
@@ -83,6 +84,8 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
83
84
|
* Force refreshing the video feed.
|
|
84
85
|
*/
|
|
85
86
|
public refresh = () => {
|
|
87
|
+
FWLoggerUtil.log(`VideoFeed refresh ${JSON.stringify(this.props)}`);
|
|
88
|
+
|
|
86
89
|
const nativeNodeHandle = findNodeHandle(this.nativeComponentRef.current);
|
|
87
90
|
|
|
88
91
|
UIManager.dispatchViewManagerCommand(
|
|
@@ -95,7 +98,12 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
95
98
|
private _onVideoFeedLoadFinished = (
|
|
96
99
|
event: NativeSyntheticEvent<VideoFeedLoadFinishedEvent>
|
|
97
100
|
) => {
|
|
101
|
+
FWLoggerUtil.log(
|
|
102
|
+
`VideoFeed _onVideoFeedLoadFinished ${JSON.stringify(event.nativeEvent)}`
|
|
103
|
+
);
|
|
104
|
+
|
|
98
105
|
const { name, reason } = event.nativeEvent;
|
|
106
|
+
|
|
99
107
|
if (this.props.onVideoFeedLoadFinished) {
|
|
100
108
|
if (name) {
|
|
101
109
|
this.props.onVideoFeedLoadFinished({ name, reason });
|
|
@@ -106,10 +114,15 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
106
114
|
};
|
|
107
115
|
|
|
108
116
|
componentDidMount() {
|
|
117
|
+
FWLoggerUtil.log(
|
|
118
|
+
`VideoFeed componentDidMount ${JSON.stringify(this.props)}`
|
|
119
|
+
);
|
|
120
|
+
|
|
109
121
|
const subscriptionOfShareBaseURLUpdated =
|
|
110
122
|
FireworkSDKModuleEventEmitter.addListener(
|
|
111
123
|
FWEventName.ShareBaseURLUpdated,
|
|
112
124
|
() => {
|
|
125
|
+
FWLoggerUtil.log('Receive FWEventName.ShareBaseURLUpdated');
|
|
113
126
|
this.setState({});
|
|
114
127
|
}
|
|
115
128
|
);
|
|
@@ -119,6 +132,7 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
119
132
|
FireworkSDKModuleEventEmitter.addListener(
|
|
120
133
|
FWEventName.AdBadgeConfigurationUpdated,
|
|
121
134
|
() => {
|
|
135
|
+
FWLoggerUtil.log('Receive FWEventName.AdBadgeConfigurationUpdated');
|
|
122
136
|
this.setState({});
|
|
123
137
|
}
|
|
124
138
|
);
|
|
@@ -126,6 +140,10 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
126
140
|
}
|
|
127
141
|
|
|
128
142
|
componentWillUnmount() {
|
|
143
|
+
FWLoggerUtil.log(
|
|
144
|
+
`VideoFeed componentWillUnmount ${JSON.stringify(this.props)}`
|
|
145
|
+
);
|
|
146
|
+
|
|
129
147
|
this.subscriptions.forEach((value) => {
|
|
130
148
|
value.remove();
|
|
131
149
|
});
|
|
@@ -134,6 +152,8 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
|
|
|
134
152
|
}
|
|
135
153
|
|
|
136
154
|
render() {
|
|
155
|
+
FWLoggerUtil.log(`VideoFeed render ${JSON.stringify(this.props)}`);
|
|
156
|
+
|
|
137
157
|
const {
|
|
138
158
|
source,
|
|
139
159
|
channel = '',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
4
|
+
import type { NewNativeContainerProps } from '../models/NewNativeContainerProps';
|
|
2
5
|
import type Product from '../models/Product';
|
|
3
6
|
import type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';
|
|
4
|
-
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
5
|
-
import type { NewNativeContainerProps } from 'src/models/NewNativeContainerProps';
|
|
6
7
|
|
|
7
8
|
const ShoppingModule = NativeModules.ShoppingModule
|
|
8
9
|
? NativeModules.ShoppingModule
|