react-native-firework-sdk 1.2.0-beta.1 → 1.2.0-beta.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/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +0 -4
- package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +19 -6
- package/android/src/main/java/com/fireworksdk/bridge/models/FWEventName.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedSource.kt +1 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +6 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWNavigatorInterface.kt +2 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWVideoShoppingInterface.kt +2 -2
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FireworkSDKInterface.kt +3 -1
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWNavigatorModule.kt +3 -14
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +4 -19
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FireworkSDKModule.kt +41 -4
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWContainerActivity.kt +22 -10
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWDataUtils.kt +119 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/utils/FWEventUtils.kt +50 -3
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWBundleUtils.kt +86 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWDateUtils.kt +15 -0
- package/android/src/main/java/com/fireworksdk/bridge/utils/FWVideoPlayerUtils.kt +12 -2
- package/ios/Components/VideoFeed.swift +6 -25
- package/ios/Components/VideoFeedManager.m +1 -0
- package/ios/FireworkSdk.xcodeproj/project.pbxproj +0 -4
- package/ios/Models/NativeToRN/FireworkEventName.swift +1 -0
- package/ios/Models/RNToNative/RCTConvert+FireworkSDKModule.swift +0 -20
- package/ios/Models/RNToNative/RCTConvert+VideoFeed.swift +2 -1
- package/ios/Modules/FWNavigatorModule/FWNavigatorContainerViewController.swift +4 -12
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.m +2 -2
- package/ios/Modules/FWNavigatorModule/FWNavigatorModule.swift +41 -11
- package/ios/Modules/FWNavigatorModule/FWNavigatorProtocol.swift +2 -2
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +24 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +3 -1
- package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +51 -31
- package/ios/Modules/Shopping/CartViewController.swift +6 -1
- package/ios/Modules/Shopping/ShoppingModule.m +1 -2
- package/ios/Modules/Shopping/ShoppingModule.swift +10 -12
- package/lib/commonjs/FWNavigator.js +21 -15
- package/lib/commonjs/FWNavigator.js.map +1 -1
- package/lib/commonjs/FireworkSDK.js +49 -5
- package/lib/commonjs/FireworkSDK.js.map +1 -1
- package/lib/commonjs/LiveStream.js +2 -2
- package/lib/commonjs/LiveStream.js.map +1 -1
- package/lib/commonjs/VideoShopping.js +4 -18
- package/lib/commonjs/VideoShopping.js.map +1 -1
- package/lib/commonjs/components/FWVideoFeed.js.map +1 -1
- package/lib/commonjs/components/VideoFeed.js +33 -1
- package/lib/commonjs/components/VideoFeed.js.map +1 -1
- package/lib/commonjs/constants/FWErrorMessage.js.map +1 -1
- package/lib/commonjs/index.js +0 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/FWEventName.js +3 -2
- package/lib/commonjs/models/FWEventName.js.map +1 -1
- package/lib/commonjs/models/NewNativeContainerProps.js +2 -0
- package/lib/commonjs/models/{AdConfig.js.map → NewNativeContainerProps.js.map} +0 -0
- package/lib/commonjs/models/VideoFeedSource.js +0 -4
- package/lib/commonjs/modules/FWNavigatorModule.js.map +1 -1
- package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
- package/lib/commonjs/modules/LiveStreamModule.js.map +1 -1
- package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
- package/lib/commonjs/utils/FWLoggerUtil.js +45 -0
- package/lib/commonjs/utils/FWLoggerUtil.js.map +1 -0
- package/lib/module/FWNavigator.js +15 -16
- package/lib/module/FWNavigator.js.map +1 -1
- package/lib/module/FireworkSDK.js +45 -5
- package/lib/module/FireworkSDK.js.map +1 -1
- package/lib/module/LiveStream.js +4 -4
- package/lib/module/LiveStream.js.map +1 -1
- package/lib/module/VideoShopping.js +4 -18
- package/lib/module/VideoShopping.js.map +1 -1
- package/lib/module/components/FWVideoFeed.js +1 -1
- package/lib/module/components/FWVideoFeed.js.map +1 -1
- package/lib/module/components/VideoFeed.js +33 -1
- package/lib/module/components/VideoFeed.js.map +1 -1
- package/lib/module/constants/FWErrorMessage.js.map +1 -1
- package/lib/module/index.js +0 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/FWEventName.js +3 -2
- package/lib/module/models/FWEventName.js.map +1 -1
- package/lib/module/models/NewNativeContainerProps.js +2 -0
- package/lib/module/models/{AdConfig.js.map → NewNativeContainerProps.js.map} +0 -0
- package/lib/module/models/VideoFeedSource.js +1 -1
- package/lib/module/modules/FWNavigatorModule.js.map +1 -1
- package/lib/module/modules/FireworkSDKModule.js.map +1 -1
- package/lib/module/modules/LiveStreamModule.js.map +1 -1
- package/lib/module/modules/ShoppingModule.js.map +1 -1
- package/lib/module/utils/FWLoggerUtil.js +36 -0
- package/lib/module/utils/FWLoggerUtil.js.map +1 -0
- package/lib/typescript/FWNavigator.d.ts +9 -7
- package/lib/typescript/FireworkSDK.d.ts +16 -4
- package/lib/typescript/LiveStream.d.ts +1 -1
- package/lib/typescript/VideoShopping.d.ts +2 -9
- package/lib/typescript/components/VideoFeed.d.ts +8 -1
- package/lib/typescript/constants/FWErrorMessage.d.ts +1 -1
- package/lib/typescript/index.d.ts +4 -4
- package/lib/typescript/models/FWEventName.d.ts +4 -3
- package/lib/typescript/models/FeedItemDetails.d.ts +1 -1
- package/lib/typescript/models/NewNativeContainerProps.d.ts +6 -0
- package/lib/typescript/models/VideoFeedConfiguration.d.ts +4 -0
- package/lib/typescript/models/VideoFeedSource.d.ts +1 -2
- package/lib/typescript/modules/FWNavigatorModule.d.ts +3 -1
- package/lib/typescript/modules/FireworkSDKModule.d.ts +5 -4
- package/lib/typescript/modules/ShoppingModule.d.ts +2 -2
- package/lib/typescript/utils/FWLoggerUtil.d.ts +6 -0
- package/package.json +3 -1
- package/react-native-firework-sdk.podspec +1 -1
- package/src/FWNavigator.tsx +22 -12
- package/src/FireworkSDK.ts +46 -7
- package/src/LiveStream.ts +9 -7
- package/src/VideoShopping.ts +10 -21
- package/src/components/FWVideoFeed.tsx +5 -5
- package/src/components/VideoFeed.tsx +48 -14
- package/src/constants/FWErrorMessage.ts +1 -3
- package/src/index.tsx +5 -13
- package/src/models/AdBadgeConfiguration.ts +1 -1
- package/src/models/FWError.ts +1 -1
- package/src/models/FWEventName.ts +3 -2
- package/src/models/FWEvents.ts +1 -1
- package/src/models/FeedItemDetails.ts +2 -2
- package/src/models/LiveStreamEventDetails.ts +1 -1
- package/src/models/LiveStreamMessageDetails.ts +1 -1
- package/src/models/NewNativeContainerProps.ts +4 -0
- package/src/models/VideoFeedConfiguration.ts +6 -2
- package/src/models/VideoFeedSource.ts +6 -2
- package/src/models/VideoPlayerConfiguration.ts +2 -2
- package/src/modules/FWNavigatorModule.ts +1 -1
- package/src/modules/FireworkSDKModule.ts +5 -6
- package/src/modules/LiveStreamModule.ts +1 -5
- package/src/modules/ShoppingModule.ts +5 -2
- package/src/utils/FWLoggerUtil.ts +40 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/pages/FWVideoShoppingCartActivity.kt +0 -43
- package/ios/Modules/FireworkSDKModule/MobileADConfiguration.swift +0 -17
- package/lib/commonjs/components/CartContainer.js +0 -35
- package/lib/commonjs/components/CartContainer.js.map +0 -1
- package/lib/commonjs/components/NavigationContainer.js +0 -36
- package/lib/commonjs/components/NavigationContainer.js.map +0 -1
- package/lib/commonjs/models/AdConfig.js +0 -2
- package/lib/module/components/CartContainer.js +0 -18
- package/lib/module/components/CartContainer.js.map +0 -1
- package/lib/module/components/NavigationContainer.js +0 -21
- package/lib/module/components/NavigationContainer.js.map +0 -1
- package/lib/module/models/AdConfig.js +0 -2
- package/lib/typescript/components/CartContainer.d.ts +0 -3
- package/lib/typescript/components/NavigationContainer.d.ts +0 -6
- package/lib/typescript/models/AdConfig.d.ts +0 -10
- package/src/components/CartContainer.tsx +0 -20
- package/src/components/NavigationContainer.tsx +0 -22
- package/src/models/AdConfig.ts +0 -10
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
2
|
import { NativeModules } from 'react-native';
|
|
3
|
-
import type AdBadgeConfiguration from '
|
|
3
|
+
import type AdBadgeConfiguration from '../models/AdBadgeConfiguration';
|
|
4
4
|
|
|
5
5
|
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
6
|
-
import type AdConfig from '../models/AdConfig';
|
|
7
6
|
import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
|
|
8
7
|
|
|
9
8
|
const FireworkSDKModule = NativeModules.FireworkSDK
|
|
@@ -18,16 +17,16 @@ const FireworkSDKModule = NativeModules.FireworkSDK
|
|
|
18
17
|
);
|
|
19
18
|
|
|
20
19
|
interface IFireworkSDKModule extends NativeModule {
|
|
21
|
-
init(userId?: string
|
|
20
|
+
init(userId?: string): void;
|
|
22
21
|
openVideoPlayer(url: string, config?: VideoPlayerConfiguration): void;
|
|
23
22
|
setCustomCTAClickEnabled(enabled: boolean): void;
|
|
23
|
+
setCustomCTALinkContentPageRouteName(name?: string): Promise<any>;
|
|
24
24
|
setShareBaseURL(url?: string): Promise<any>;
|
|
25
25
|
setVideoPlaybackEventEnabled(enabled: boolean): void;
|
|
26
26
|
setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;
|
|
27
|
+
setAppComponentName(name?: string): Promise<any>;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
const FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);
|
|
30
|
-
export {
|
|
31
|
-
FireworkSDKModuleEventEmitter,
|
|
32
|
-
}
|
|
31
|
+
export { FireworkSDKModuleEventEmitter };
|
|
33
32
|
export default FireworkSDKModule as IFireworkSDKModule;
|
|
@@ -2,6 +2,7 @@ import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';
|
|
|
2
2
|
import type Product from '../models/Product';
|
|
3
3
|
import type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';
|
|
4
4
|
import { LINKING_ERROR } from '../constants/FWErrorMessage';
|
|
5
|
+
import type { NewNativeContainerProps } from 'src/models/NewNativeContainerProps';
|
|
5
6
|
|
|
6
7
|
const ShoppingModule = NativeModules.ShoppingModule
|
|
7
8
|
? NativeModules.ShoppingModule
|
|
@@ -26,8 +27,10 @@ interface IShoppingModule extends NativeModule {
|
|
|
26
27
|
tips: string,
|
|
27
28
|
callbackId: number | string
|
|
28
29
|
): void;
|
|
29
|
-
jumpToCartPage(
|
|
30
|
-
|
|
30
|
+
jumpToCartPage(
|
|
31
|
+
callbackId: number | string,
|
|
32
|
+
props: NewNativeContainerProps
|
|
33
|
+
): void;
|
|
31
34
|
setCartIconVisible(visible: boolean): void;
|
|
32
35
|
setCartItemCount(count: number): void;
|
|
33
36
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default class FWLoggerUtil {
|
|
2
|
+
static enabled: boolean = false;
|
|
3
|
+
static log(message: string) {
|
|
4
|
+
if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {
|
|
5
|
+
const currentDate = new Date();
|
|
6
|
+
|
|
7
|
+
console.log(
|
|
8
|
+
'[react-native-firework-sdk]',
|
|
9
|
+
`${message} ${FWLoggerUtil.toISOString(currentDate)}`
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static logNativeMessage(nativeMessage: string) {
|
|
15
|
+
if (FWLoggerUtil.enabled && process.env.NODE_ENV === 'development') {
|
|
16
|
+
console.log('[react-native-firework-sdk] [native]', nativeMessage);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private static toISOString(date: Date): string {
|
|
21
|
+
let timezoneOffset = -date.getTimezoneOffset();
|
|
22
|
+
let timezoneSymbol = timezoneOffset >= 0 ? '+' : '-';
|
|
23
|
+
let timezoneHours = Math.floor(Math.abs(timezoneOffset) / 60)
|
|
24
|
+
.toString()
|
|
25
|
+
.padStart(2, '0');
|
|
26
|
+
let timezoneMinutes = (Math.abs(timezoneOffset) % 60)
|
|
27
|
+
.toString()
|
|
28
|
+
.padStart(2, '0');
|
|
29
|
+
let timezoneString = `${timezoneSymbol}${timezoneHours}:${timezoneMinutes}`;
|
|
30
|
+
let year = date.getFullYear().toString();
|
|
31
|
+
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
32
|
+
let day = date.getDate().toString().padStart(2, '0');
|
|
33
|
+
let hours = date.getHours().toString().padStart(2, '0');
|
|
34
|
+
let minutes = date.getMinutes().toString().padStart(2, '0');
|
|
35
|
+
let seconds = date.getSeconds().toString().padStart(2, '0');
|
|
36
|
+
let milliseconds = date.getMilliseconds().toString().padStart(3, '0');
|
|
37
|
+
|
|
38
|
+
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${milliseconds}${timezoneString}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
package com.fireworksdk.bridge.reactnative.pages
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import android.content.Intent
|
|
5
|
-
import android.os.Bundle
|
|
6
|
-
import androidx.appcompat.app.AppCompatActivity
|
|
7
|
-
import androidx.fragment.app.Fragment
|
|
8
|
-
import com.fireworksdk.bridge.R
|
|
9
|
-
import com.facebook.react.ReactFragment
|
|
10
|
-
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class FWVideoShoppingCartActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler {
|
|
14
|
-
|
|
15
|
-
override fun onCreate(savedInstanceState: Bundle?) {
|
|
16
|
-
super.onCreate(savedInstanceState)
|
|
17
|
-
setContentView(R.layout.fw_bridge_fragment_shoppingcart)
|
|
18
|
-
|
|
19
|
-
val reactNativeFragment: Fragment = ReactFragment.Builder()
|
|
20
|
-
.setComponentName("FWShoppingCartPage")
|
|
21
|
-
.setLaunchOptions(null)
|
|
22
|
-
.build()
|
|
23
|
-
|
|
24
|
-
supportFragmentManager
|
|
25
|
-
.beginTransaction()
|
|
26
|
-
.add(R.id.fw_bridge_shopping_cart_container, reactNativeFragment)
|
|
27
|
-
.commit()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
companion object {
|
|
31
|
-
|
|
32
|
-
fun createIntent(activity: Activity): Intent {
|
|
33
|
-
val intent = Intent(activity, FWVideoShoppingCartActivity::class.java)
|
|
34
|
-
intent.flags = Intent.FLAG_ACTIVITY_NO_ANIMATION
|
|
35
|
-
activity.overridePendingTransition(0, 0)
|
|
36
|
-
return intent
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
override fun invokeDefaultOnBackPressed() {
|
|
41
|
-
super.onBackPressed();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// MobileADConfiguration.swift
|
|
3
|
-
// react-native-firework-sdk
|
|
4
|
-
//
|
|
5
|
-
// Created by Jeff Zheng on 2022/1/5.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import Foundation
|
|
9
|
-
|
|
10
|
-
struct MobileADConfiguration: Codable {
|
|
11
|
-
var type: ADType = .none
|
|
12
|
-
var startMobileAds: Bool? = true
|
|
13
|
-
|
|
14
|
-
enum ADType: String, Codable {
|
|
15
|
-
case none, admob, ima
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _VideoShopping = _interopRequireDefault(require("../VideoShopping"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
const CartContainer = () => {
|
|
21
|
-
const [cartPage, _] = (0, _react.useState)(_VideoShopping.default.getInstance().currentCartPage);
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
23
|
-
style: styles.container
|
|
24
|
-
}, cartPage);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const styles = _reactNative.StyleSheet.create({
|
|
28
|
-
container: {
|
|
29
|
-
flex: 1
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var _default = CartContainer;
|
|
34
|
-
exports.default = _default;
|
|
35
|
-
//# sourceMappingURL=CartContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["CartContainer.tsx"],"names":["CartContainer","cartPage","_","VideoShopping","getInstance","currentCartPage","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;;;;;AAEA,MAAMA,aAAa,GAAG,MAAM;AAC1B,QAAM,CAACC,QAAD,EAAWC,CAAX,IAAgB,qBACpBC,uBAAcC,WAAd,GAA4BC,eADR,CAAtB;AAGA,sBAAO,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KAAgCN,QAAhC,CAAP;AACD,CALD;;AAOA,MAAMK,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AACTG,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf;;eAMeV,a","sourcesContent":["import React, { useState } from 'react';\n\nimport { StyleSheet, View } from 'react-native';\n\nimport VideoShopping from '../VideoShopping';\n\nconst CartContainer = () => {\n const [cartPage, _] = useState<React.ReactNode>(\n VideoShopping.getInstance().currentCartPage\n );\n return <View style={styles.container}>{cartPage}</View>;\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\nexport default CartContainer;\n"]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
|
-
var _FWNavigator = _interopRequireDefault(require("../FWNavigator"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const NavigationContainer = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
callbackId
|
|
19
|
-
} = _ref;
|
|
20
|
-
|
|
21
|
-
const page = _FWNavigator.default.getInstance().navigatorPages.get(callbackId !== null && callbackId !== void 0 ? callbackId : '');
|
|
22
|
-
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
24
|
-
style: styles.container
|
|
25
|
-
}, page);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const styles = _reactNative.StyleSheet.create({
|
|
29
|
-
container: {
|
|
30
|
-
flex: 1
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
var _default = NavigationContainer;
|
|
35
|
-
exports.default = _default;
|
|
36
|
-
//# sourceMappingURL=NavigationContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["NavigationContainer.tsx"],"names":["NavigationContainer","callbackId","page","FWNavigator","getInstance","navigatorPages","get","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;AAMA,MAAMA,mBAAmB,GAAG,QAA+C;AAAA,MAA9C;AAAEC,IAAAA;AAAF,GAA8C;;AACzE,QAAMC,IAAI,GAAGC,qBAAYC,WAAZ,GAA0BC,cAA1B,CAAyCC,GAAzC,CAA6CL,UAA7C,aAA6CA,UAA7C,cAA6CA,UAA7C,GAA2D,EAA3D,CAAb;;AACA,sBAAO,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAEM,MAAM,CAACC;AAApB,KAAgCN,IAAhC,CAAP;AACD,CAHD;;AAKA,MAAMK,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AACTG,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf;;eAMeX,mB","sourcesContent":["import React from 'react';\n\nimport { StyleSheet, View } from 'react-native';\n\nimport FWNavigator from '../FWNavigator';\n\nexport interface INavigationContainerProps {\n callbackId?: string;\n}\n\nconst NavigationContainer = ({ callbackId }: INavigationContainerProps) => {\n const page = FWNavigator.getInstance().navigatorPages.get(callbackId ?? '');\n return <View style={styles.container}>{page}</View>;\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\nexport default NavigationContainer;\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import VideoShopping from '../VideoShopping';
|
|
4
|
-
|
|
5
|
-
const CartContainer = () => {
|
|
6
|
-
const [cartPage, _] = useState(VideoShopping.getInstance().currentCartPage);
|
|
7
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
8
|
-
style: styles.container
|
|
9
|
-
}, cartPage);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const styles = StyleSheet.create({
|
|
13
|
-
container: {
|
|
14
|
-
flex: 1
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
export default CartContainer;
|
|
18
|
-
//# sourceMappingURL=CartContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["CartContainer.tsx"],"names":["React","useState","StyleSheet","View","VideoShopping","CartContainer","cartPage","_","getInstance","currentCartPage","styles","container","create","flex"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AAEA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AAEA,OAAOC,aAAP,MAA0B,kBAA1B;;AAEA,MAAMC,aAAa,GAAG,MAAM;AAC1B,QAAM,CAACC,QAAD,EAAWC,CAAX,IAAgBN,QAAQ,CAC5BG,aAAa,CAACI,WAAd,GAA4BC,eADA,CAA9B;AAGA,sBAAO,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KAAgCL,QAAhC,CAAP;AACD,CALD;;AAOA,MAAMI,MAAM,GAAGR,UAAU,CAACU,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AACTE,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf;AAMA,eAAeR,aAAf","sourcesContent":["import React, { useState } from 'react';\n\nimport { StyleSheet, View } from 'react-native';\n\nimport VideoShopping from '../VideoShopping';\n\nconst CartContainer = () => {\n const [cartPage, _] = useState<React.ReactNode>(\n VideoShopping.getInstance().currentCartPage\n );\n return <View style={styles.container}>{cartPage}</View>;\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\nexport default CartContainer;\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import FWNavigator from '../FWNavigator';
|
|
4
|
-
|
|
5
|
-
const NavigationContainer = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
callbackId
|
|
8
|
-
} = _ref;
|
|
9
|
-
const page = FWNavigator.getInstance().navigatorPages.get(callbackId !== null && callbackId !== void 0 ? callbackId : '');
|
|
10
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
11
|
-
style: styles.container
|
|
12
|
-
}, page);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const styles = StyleSheet.create({
|
|
16
|
-
container: {
|
|
17
|
-
flex: 1
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export default NavigationContainer;
|
|
21
|
-
//# sourceMappingURL=NavigationContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["NavigationContainer.tsx"],"names":["React","StyleSheet","View","FWNavigator","NavigationContainer","callbackId","page","getInstance","navigatorPages","get","styles","container","create","flex"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AAEA,OAAOC,WAAP,MAAwB,gBAAxB;;AAMA,MAAMC,mBAAmB,GAAG,QAA+C;AAAA,MAA9C;AAAEC,IAAAA;AAAF,GAA8C;AACzE,QAAMC,IAAI,GAAGH,WAAW,CAACI,WAAZ,GAA0BC,cAA1B,CAAyCC,GAAzC,CAA6CJ,UAA7C,aAA6CA,UAA7C,cAA6CA,UAA7C,GAA2D,EAA3D,CAAb;AACA,sBAAO,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEK,MAAM,CAACC;AAApB,KAAgCL,IAAhC,CAAP;AACD,CAHD;;AAKA,MAAMI,MAAM,GAAGT,UAAU,CAACW,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AACTE,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf;AAMA,eAAeT,mBAAf","sourcesContent":["import React from 'react';\n\nimport { StyleSheet, View } from 'react-native';\n\nimport FWNavigator from '../FWNavigator';\n\nexport interface INavigationContainerProps {\n callbackId?: string;\n}\n\nconst NavigationContainer = ({ callbackId }: INavigationContainerProps) => {\n const page = FWNavigator.getInstance().navigatorPages.get(callbackId ?? '');\n return <View style={styles.container}>{page}</View>;\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n\nexport default NavigationContainer;\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default interface AdConfig {
|
|
2
|
-
/**
|
|
3
|
-
* Defaults to none. Only supported on iOS.
|
|
4
|
-
*/
|
|
5
|
-
type?: 'none' | 'admob' | 'ima';
|
|
6
|
-
/**
|
|
7
|
-
* Defaults to true. The property only takes effect when type is admob. Only supported on iOS.
|
|
8
|
-
*/
|
|
9
|
-
startMobileAds?: boolean;
|
|
10
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { StyleSheet, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import VideoShopping from '../VideoShopping';
|
|
6
|
-
|
|
7
|
-
const CartContainer = () => {
|
|
8
|
-
const [cartPage, _] = useState<React.ReactNode>(
|
|
9
|
-
VideoShopping.getInstance().currentCartPage
|
|
10
|
-
);
|
|
11
|
-
return <View style={styles.container}>{cartPage}</View>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const styles = StyleSheet.create({
|
|
15
|
-
container: {
|
|
16
|
-
flex: 1,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export default CartContainer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { StyleSheet, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import FWNavigator from '../FWNavigator';
|
|
6
|
-
|
|
7
|
-
export interface INavigationContainerProps {
|
|
8
|
-
callbackId?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const NavigationContainer = ({ callbackId }: INavigationContainerProps) => {
|
|
12
|
-
const page = FWNavigator.getInstance().navigatorPages.get(callbackId ?? '');
|
|
13
|
-
return <View style={styles.container}>{page}</View>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const styles = StyleSheet.create({
|
|
17
|
-
container: {
|
|
18
|
-
flex: 1,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default NavigationContainer;
|
package/src/models/AdConfig.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default interface AdConfig {
|
|
2
|
-
/**
|
|
3
|
-
* Defaults to none. Only supported on iOS.
|
|
4
|
-
*/
|
|
5
|
-
type?: 'none' | 'admob' | 'ima',
|
|
6
|
-
/**
|
|
7
|
-
* Defaults to true. The property only takes effect when type is admob. Only supported on iOS.
|
|
8
|
-
*/
|
|
9
|
-
startMobileAds?: boolean,
|
|
10
|
-
}
|