@igaworks/adbrix-react-native-sdk 1.0.1
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/CHANGELOG.md +31 -0
- package/LICENSE +20 -0
- package/README.md +16 -0
- package/adbrix-react-native-sdk.podspec +20 -0
- package/android/build.gradle +78 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/igaworks/adbrixreactnativesdk/AdbrixReactNativeParser.java +220 -0
- package/android/src/main/java/com/igaworks/adbrixreactnativesdk/AdbrixReactNativeSdkModule.java +166 -0
- package/android/src/main/java/com/igaworks/adbrixreactnativesdk/AdbrixReactNativeSdkPackage.java +29 -0
- package/babel.config.js +3 -0
- package/example/.bundle/config +2 -0
- package/example/.watchmanconfig +1 -0
- package/example/Gemfile +10 -0
- package/example/README.md +106 -0
- package/example/android/README.md +24 -0
- package/example/android/app/build.gradle +128 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/debug/AndroidManifest.xml +9 -0
- package/example/android/app/src/main/AndroidManifest.xml +34 -0
- package/example/android/app/src/main/ic_launcher-playstore.png +0 -0
- package/example/android/app/src/main/java/igaworks/adbrixreactnativesdk/example/MainActivity.kt +28 -0
- package/example/android/app/src/main/java/igaworks/adbrixreactnativesdk/example/MainApplication.kt +44 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/example/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/example/android/app/src/main/res/values/strings.xml +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/build.gradle +21 -0
- package/example/android/gradle.properties +39 -0
- package/example/android/settings.gradle +6 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +4 -0
- package/example/index.js +5 -0
- package/example/ios/.xcode.env +11 -0
- package/example/ios/AdbrixReactNativeSdkExample/AppDelegate.swift +53 -0
- package/example/ios/AdbrixReactNativeSdkExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/example/ios/AdbrixReactNativeSdkExample/Images.xcassets/Contents.json +6 -0
- package/example/ios/AdbrixReactNativeSdkExample/Info.plist +62 -0
- package/example/ios/AdbrixReactNativeSdkExample/LaunchScreen.storyboard +47 -0
- package/example/ios/AdbrixReactNativeSdkExample/PrivacyInfo.xcprivacy +37 -0
- package/example/ios/AdbrixReactNativeSdkExample.xcodeproj/project.pbxproj +488 -0
- package/example/ios/AdbrixReactNativeSdkExample.xcodeproj/xcshareddata/xcschemes/AdbrixReactNativeSdkExample.xcscheme +88 -0
- package/example/ios/AdbrixReactNativeSdkExample.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/Podfile +35 -0
- package/example/ios/Podfile.lock +1821 -0
- package/example/jest.config.js +3 -0
- package/example/metro.config.js +27 -0
- package/example/package.json +33 -0
- package/example/react-native.config.js +21 -0
- package/example/src/App.tsx +755 -0
- package/ios/AdbrixPropertiesParser.h +16 -0
- package/ios/AdbrixPropertiesParser.m +97 -0
- package/ios/AdbrixReactNative.swift +170 -0
- package/ios/AdbrixReactNativeSdk.h +11 -0
- package/ios/AdbrixReactNativeSdk.m +79 -0
- package/ios/AdbrixReactNativeSdk.xcodeproj/project.pbxproj +324 -0
- package/lib/commonjs/constants.js +174 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.d.js +6 -0
- package/lib/commonjs/index.d.js.map +1 -0
- package/lib/commonjs/index.js +155 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/properties.js +347 -0
- package/lib/commonjs/properties.js.map +1 -0
- package/lib/index.d.ts +312 -0
- package/lib/module/constants.js +170 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.d.js +4 -0
- package/lib/module/index.d.js.map +1 -0
- package/lib/module/index.js +121 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/properties.js +342 -0
- package/lib/module/properties.js.map +1 -0
- package/package.json +57 -0
- package/src/constants.js +175 -0
- package/src/index.d.ts +312 -0
- package/src/index.js +124 -0
- package/src/properties.js +275 -0
- package/tsconfig.json +29 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const ABEvent = {
|
|
4
|
+
LOGIN: 'abx:login',
|
|
5
|
+
LOGOUT: 'abx:logout',
|
|
6
|
+
SIGN_UP: 'abx:sign_up',
|
|
7
|
+
USE_CREDIT: 'abx:use_credit',
|
|
8
|
+
APP_UPDATE: 'abx:app_update',
|
|
9
|
+
INVITE: 'abx:invite',
|
|
10
|
+
PURCHASE: 'abx:purchase',
|
|
11
|
+
LEVEL_ACHIEVED: 'abx:level_achieved',
|
|
12
|
+
TUTORIAL_COMPLETED: 'abx:tutorial_completed',
|
|
13
|
+
CHARACTER_CREATED: 'abx:character_created',
|
|
14
|
+
STAGE_CLEARED: 'abx:stage_cleared',
|
|
15
|
+
REFUND: 'abx:refund',
|
|
16
|
+
ADD_TO_CART: 'abx:add_to_cart',
|
|
17
|
+
ADD_TO_WISHLIST: 'abx:add_to_wishlist',
|
|
18
|
+
PRODUCT_VIEW: 'abx:product_view',
|
|
19
|
+
CATEGORY_VIEW: 'abx:category_view',
|
|
20
|
+
REVIEW_ORDER: 'abx:review_order',
|
|
21
|
+
SEARCH: 'abx:search',
|
|
22
|
+
SHARE: 'abx:share',
|
|
23
|
+
VIEW_HOME: 'abx:view_home',
|
|
24
|
+
LIST_VIEW: 'abx:list_view',
|
|
25
|
+
CART_VIEW: 'abx:cart_view',
|
|
26
|
+
PAYMENT_INFO_ADDED: 'abx:paymentinfo_added'
|
|
27
|
+
};
|
|
28
|
+
export const ABEventProperty = {
|
|
29
|
+
IS_SKIP: 'abx:is_skip',
|
|
30
|
+
LEVEL: 'abx:level',
|
|
31
|
+
STAGE: 'abx:stage',
|
|
32
|
+
PREV_VER: 'abx:prev_ver',
|
|
33
|
+
CURR_VER: 'abx:curr_ver',
|
|
34
|
+
KEYWORD: 'abx:keyword',
|
|
35
|
+
SHARING_CHANNEL: 'abx:sharing_channel',
|
|
36
|
+
SIGN_CHANNEL: 'abx:sign_channel',
|
|
37
|
+
INVITE_CHANNEL: 'abx:invite_channel',
|
|
38
|
+
ORDER_ID: 'abx:order_id',
|
|
39
|
+
DELIVERY_CHARGE: 'abx:delivery_charge',
|
|
40
|
+
PENALTY_CHARGE: 'abx:penalty_charge',
|
|
41
|
+
PAYMENT_METHOD: 'abx:payment_method',
|
|
42
|
+
ORDER_SALES: 'abx:order_sales',
|
|
43
|
+
DISCOUNT: 'abx:discount',
|
|
44
|
+
CATEGORY1: 'abx:category1',
|
|
45
|
+
CATEGORY2: 'abx:category2',
|
|
46
|
+
CATEGORY3: 'abx:category3',
|
|
47
|
+
CATEGORY4: 'abx:category4',
|
|
48
|
+
CATEGORY5: 'abx:category5',
|
|
49
|
+
ITEMS: 'abx:items',
|
|
50
|
+
// Item specific properties
|
|
51
|
+
ITEM_PRODUCT_ID: 'abx:product_id',
|
|
52
|
+
ITEM_PRODUCT_NAME: 'abx:product_name',
|
|
53
|
+
ITEM_PRICE: 'abx:price',
|
|
54
|
+
ITEM_QUANTITY: 'abx:quantity',
|
|
55
|
+
ITEM_DISCOUNT: 'abx:discount',
|
|
56
|
+
ITEM_CURRENCY: 'abx:currency',
|
|
57
|
+
ITEM_CATEGORY1: 'abx:category1',
|
|
58
|
+
ITEM_CATEGORY2: 'abx:category2',
|
|
59
|
+
ITEM_CATEGORY3: 'abx:category3',
|
|
60
|
+
ITEM_CATEGORY4: 'abx:category4',
|
|
61
|
+
ITEM_CATEGORY5: 'abx:category5'
|
|
62
|
+
};
|
|
63
|
+
export const ABCurrency = {
|
|
64
|
+
KRW: 'KRW',
|
|
65
|
+
USD: 'USD',
|
|
66
|
+
JPY: 'JPY',
|
|
67
|
+
EUR: 'EUR',
|
|
68
|
+
GBP: 'GBP',
|
|
69
|
+
CNY: 'CNY',
|
|
70
|
+
TWD: 'TWD',
|
|
71
|
+
HKD: 'HKD',
|
|
72
|
+
IDR: 'IDR',
|
|
73
|
+
// Indonesia
|
|
74
|
+
INR: 'INR',
|
|
75
|
+
// India
|
|
76
|
+
RUB: 'RUB',
|
|
77
|
+
// Russia
|
|
78
|
+
THB: 'THB',
|
|
79
|
+
// Thailand
|
|
80
|
+
VND: 'VND',
|
|
81
|
+
// Vietnam
|
|
82
|
+
MYR: 'MYR' // Malaysia
|
|
83
|
+
};
|
|
84
|
+
export const ABInviteChannel = {
|
|
85
|
+
KAKAO: 'Kakao',
|
|
86
|
+
NAVER: 'Naver',
|
|
87
|
+
LINE: 'Line',
|
|
88
|
+
GOOGLE: 'Google',
|
|
89
|
+
FACEBOOK: 'Facebook',
|
|
90
|
+
TWITTER: 'Twitter',
|
|
91
|
+
WHATS_APP: 'whatsApp',
|
|
92
|
+
QQ: 'QQ',
|
|
93
|
+
WE_CHAT: 'WeChat',
|
|
94
|
+
ETC: 'ETC'
|
|
95
|
+
};
|
|
96
|
+
export const ABPaymentMethod = {
|
|
97
|
+
CREDIT_CARD: 'CreditCard',
|
|
98
|
+
BANK_TRANSFER: 'BankTransfer',
|
|
99
|
+
MOBILE_PAYMENT: 'MobilePayment',
|
|
100
|
+
ETC: 'ETC'
|
|
101
|
+
};
|
|
102
|
+
export const ABSharingChannel = {
|
|
103
|
+
FACEBOOK: 'Facebook',
|
|
104
|
+
KAKAO_TALK: 'KakaoTalk',
|
|
105
|
+
KAKAO_STORY: 'KakaoStory',
|
|
106
|
+
LINE: 'Line',
|
|
107
|
+
WHATS_APP: 'whatsApp',
|
|
108
|
+
QQ: 'QQ',
|
|
109
|
+
WE_CHAT: 'WeChat',
|
|
110
|
+
SMS: 'SMS',
|
|
111
|
+
EMAIL: 'Email',
|
|
112
|
+
COPY_URL: 'copyUrl',
|
|
113
|
+
ETC: 'ETC'
|
|
114
|
+
};
|
|
115
|
+
export const ABSignUpChannel = {
|
|
116
|
+
KAKAO: 'Kakao',
|
|
117
|
+
NAVER: 'Naver',
|
|
118
|
+
LINE: 'Line',
|
|
119
|
+
GOOGLE: 'Google',
|
|
120
|
+
FACEBOOK: 'Facebook',
|
|
121
|
+
TWITTER: 'Twitter',
|
|
122
|
+
WHATS_APP: 'whatsApp',
|
|
123
|
+
QQ: 'QQ',
|
|
124
|
+
WE_CHAT: 'WeChat',
|
|
125
|
+
ETC: 'ETC',
|
|
126
|
+
SKT_ID: 'SkTid',
|
|
127
|
+
APPLE_ID: 'AppleId',
|
|
128
|
+
USER_ID: 'UserId'
|
|
129
|
+
};
|
|
130
|
+
export const ABConfig = {
|
|
131
|
+
IOS_LOG_ENABLE: 'setLog',
|
|
132
|
+
ANDROID_LOG_ENABLE: 'android_log_enable',
|
|
133
|
+
ANDROID_LOG_LEVEL: 'android_log_level',
|
|
134
|
+
ANDROID_COLLECT_GOOGLE_ADVERTISING_ID: 'android_collect_google_advertising_id',
|
|
135
|
+
IOS_TRACKING_TIMEOUT: 'trackingAuthorizeTimeOut'
|
|
136
|
+
};
|
|
137
|
+
export const ABDeepLinkResult = {
|
|
138
|
+
PROCESSED: 0,
|
|
139
|
+
ORGANIC: 1,
|
|
140
|
+
TRACKING_LINK_SETTINGS_INCORRECTLY: 2,
|
|
141
|
+
ORGANIC_NCPI_IN_PROCESS: 3,
|
|
142
|
+
NO_CONVERSION: -1
|
|
143
|
+
};
|
|
144
|
+
export const ABAndroidLogLevel = {
|
|
145
|
+
VERBOSE: 2,
|
|
146
|
+
DEBUG: 3,
|
|
147
|
+
INFO: 4,
|
|
148
|
+
WARN: 5,
|
|
149
|
+
ERROR: 6,
|
|
150
|
+
ASSERT_LEVEL: 7
|
|
151
|
+
};
|
|
152
|
+
export const ABiOSTrackingTimeout = {
|
|
153
|
+
TIMEOUT_60: 60,
|
|
154
|
+
TIMEOUT_120: 120,
|
|
155
|
+
TIMEOUT_180: 180
|
|
156
|
+
};
|
|
157
|
+
export default {
|
|
158
|
+
ABEvent,
|
|
159
|
+
ABEventProperty,
|
|
160
|
+
ABCurrency,
|
|
161
|
+
ABInviteChannel,
|
|
162
|
+
ABPaymentMethod,
|
|
163
|
+
ABSharingChannel,
|
|
164
|
+
ABSignUpChannel,
|
|
165
|
+
ABConfig,
|
|
166
|
+
ABDeepLinkResult,
|
|
167
|
+
ABAndroidLogLevel,
|
|
168
|
+
ABiOSTrackingTimeout
|
|
169
|
+
};
|
|
170
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ABEvent","LOGIN","LOGOUT","SIGN_UP","USE_CREDIT","APP_UPDATE","INVITE","PURCHASE","LEVEL_ACHIEVED","TUTORIAL_COMPLETED","CHARACTER_CREATED","STAGE_CLEARED","REFUND","ADD_TO_CART","ADD_TO_WISHLIST","PRODUCT_VIEW","CATEGORY_VIEW","REVIEW_ORDER","SEARCH","SHARE","VIEW_HOME","LIST_VIEW","CART_VIEW","PAYMENT_INFO_ADDED","ABEventProperty","IS_SKIP","LEVEL","STAGE","PREV_VER","CURR_VER","KEYWORD","SHARING_CHANNEL","SIGN_CHANNEL","INVITE_CHANNEL","ORDER_ID","DELIVERY_CHARGE","PENALTY_CHARGE","PAYMENT_METHOD","ORDER_SALES","DISCOUNT","CATEGORY1","CATEGORY2","CATEGORY3","CATEGORY4","CATEGORY5","ITEMS","ITEM_PRODUCT_ID","ITEM_PRODUCT_NAME","ITEM_PRICE","ITEM_QUANTITY","ITEM_DISCOUNT","ITEM_CURRENCY","ITEM_CATEGORY1","ITEM_CATEGORY2","ITEM_CATEGORY3","ITEM_CATEGORY4","ITEM_CATEGORY5","ABCurrency","KRW","USD","JPY","EUR","GBP","CNY","TWD","HKD","IDR","INR","RUB","THB","VND","MYR","ABInviteChannel","KAKAO","NAVER","LINE","GOOGLE","FACEBOOK","TWITTER","WHATS_APP","QQ","WE_CHAT","ETC","ABPaymentMethod","CREDIT_CARD","BANK_TRANSFER","MOBILE_PAYMENT","ABSharingChannel","KAKAO_TALK","KAKAO_STORY","SMS","EMAIL","COPY_URL","ABSignUpChannel","SKT_ID","APPLE_ID","USER_ID","ABConfig","IOS_LOG_ENABLE","ANDROID_LOG_ENABLE","ANDROID_LOG_LEVEL","ANDROID_COLLECT_GOOGLE_ADVERTISING_ID","IOS_TRACKING_TIMEOUT","ABDeepLinkResult","PROCESSED","ORGANIC","TRACKING_LINK_SETTINGS_INCORRECTLY","ORGANIC_NCPI_IN_PROCESS","NO_CONVERSION","ABAndroidLogLevel","VERBOSE","DEBUG","INFO","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EAAE,CAAC;EACRC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,MAAMC,oBAAoB,GAAG;EAClCC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,GAAG;EAChBC,WAAW,EAAE;AACf,CAAC;AAED,eAAe;EACbvH,OAAO;EACPwB,eAAe;EACfiC,UAAU;EACVe,eAAe;EACfW,eAAe;EACfI,gBAAgB;EAChBM,eAAe;EACfI,QAAQ;EACRM,gBAAgB;EAChBM,iBAAiB;EACjBO;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
4
|
+
import { ABProperty, ABItem } from './properties';
|
|
5
|
+
const {
|
|
6
|
+
Adbrix: AdbrixNativeModule
|
|
7
|
+
} = NativeModules;
|
|
8
|
+
export class AdbrixDeepLinkCallback {
|
|
9
|
+
constructor(result, deepLink) {
|
|
10
|
+
this._result = result;
|
|
11
|
+
this._deepLink = deepLink;
|
|
12
|
+
}
|
|
13
|
+
get result() {
|
|
14
|
+
return this._result;
|
|
15
|
+
}
|
|
16
|
+
get deepLink() {
|
|
17
|
+
return this._deepLink;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class Adbrix {
|
|
21
|
+
static init({
|
|
22
|
+
applicationKey,
|
|
23
|
+
secretKey
|
|
24
|
+
}) {
|
|
25
|
+
if (!applicationKey || !secretKey) {
|
|
26
|
+
console.error('[Adbrix] init: applicationKey and secretKey are required');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (AdbrixNativeModule && AdbrixNativeModule.init) {
|
|
30
|
+
return AdbrixNativeModule.init({
|
|
31
|
+
applicationKey,
|
|
32
|
+
secretKey
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
console.warn('[Adbrix] Native module not available');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
static initWithConfig({
|
|
39
|
+
applicationKey,
|
|
40
|
+
secretKey,
|
|
41
|
+
config = null
|
|
42
|
+
}) {
|
|
43
|
+
if (!applicationKey || !secretKey) {
|
|
44
|
+
console.error('[Adbrix] initWithConfig: applicationKey and secretKey are required');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (AdbrixNativeModule && AdbrixNativeModule.initWithConfig) {
|
|
48
|
+
return AdbrixNativeModule.initWithConfig({
|
|
49
|
+
applicationKey,
|
|
50
|
+
secretKey,
|
|
51
|
+
config
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
console.warn('[Adbrix] Native module not available');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static logEvent({
|
|
58
|
+
eventName,
|
|
59
|
+
properties = null
|
|
60
|
+
}) {
|
|
61
|
+
if (!eventName) {
|
|
62
|
+
console.warn('[Adbrix] logEvent: eventName is required');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const params = {
|
|
66
|
+
eventName
|
|
67
|
+
};
|
|
68
|
+
if (properties) {
|
|
69
|
+
params.properties = properties;
|
|
70
|
+
}
|
|
71
|
+
if (AdbrixNativeModule && AdbrixNativeModule.logEvent) {
|
|
72
|
+
return AdbrixNativeModule.logEvent(params);
|
|
73
|
+
} else {
|
|
74
|
+
console.warn('[Adbrix] Native module not available');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
static enableSDK() {
|
|
78
|
+
if (AdbrixNativeModule && AdbrixNativeModule.enableSDK) {
|
|
79
|
+
return AdbrixNativeModule.enableSDK();
|
|
80
|
+
} else {
|
|
81
|
+
console.warn('[Adbrix] Native module not available');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
static disableSDK() {
|
|
85
|
+
if (AdbrixNativeModule && AdbrixNativeModule.disableSDK) {
|
|
86
|
+
return AdbrixNativeModule.disableSDK();
|
|
87
|
+
} else {
|
|
88
|
+
console.warn('[Adbrix] Native module not available');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
static async blockDeferredDeepLinkLaunch() {
|
|
92
|
+
if (AdbrixNativeModule && AdbrixNativeModule.blockDeferredDeepLinkLaunch) {
|
|
93
|
+
try {
|
|
94
|
+
const callback = await AdbrixNativeModule.blockDeferredDeepLinkLaunch();
|
|
95
|
+
if (callback == null) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return new AdbrixDeepLinkCallback(callback.result, callback.deepLink);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('[Adbrix] blockDeferredDeepLinkLaunch error:', error);
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
console.warn('[Adbrix] Native module not available');
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
static attAuthorized(authorized) {
|
|
109
|
+
if (Platform.OS === 'ios') {
|
|
110
|
+
if (AdbrixNativeModule && AdbrixNativeModule.attAuthorized) {
|
|
111
|
+
return AdbrixNativeModule.attAuthorized(authorized);
|
|
112
|
+
} else {
|
|
113
|
+
console.warn('[Adbrix] Native module not available');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
export * from './constants';
|
|
119
|
+
export { ABProperty, ABItem } from './properties';
|
|
120
|
+
export default Adbrix;
|
|
121
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","ABProperty","ABItem","Adbrix","AdbrixNativeModule","AdbrixDeepLinkCallback","constructor","result","deepLink","_result","_deepLink","init","applicationKey","secretKey","console","error","warn","initWithConfig","config","logEvent","eventName","properties","params","enableSDK","disableSDK","blockDeferredDeepLinkLaunch","callback","attAuthorized","authorized","OS"],"sourceRoot":"../../src","sources":["index.js"],"mappings":";;AACA,SAASA,aA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AQ,CAAC;MACvE,CAAC,CAAC,OAAOO,KAAK,EAAE;QACdD,OAAO,CAACC,KAAK,CAAC,6CAA6C,EAAEA,KAAK,CAAC;QACnE,OAAO,IAAI;MACb;IACF,CAAC,MAAM;MACLD,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC;MACpD,OAAO,IAAI;IACb;EACF;EAEA,OAAOW,aAAaA,CAACC,UAAU,EAAE;IAC/B,IAAI5B,QAAQ,CAAC6B,EAAE,KAAK,KAAK,EAAE;MACzB,IAAIzB,kBAAkB,IAAIA,kBAAkB,CAACuB,aAAa,EAAE;QAC1D,OAAOvB,kBAAkB,CAACuB,aAAa,CAACC,UAAU,CAAC;MACrD,CAAC,MAAM;QACLd,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC;MACtD;IACF;EACF;AAEF;AAEA,cAAc,aAAa;AAC3B,SAASf,UAAU,EAAEC,MAAM,QAAQ,cAAc;AAEjD,eAAeC,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class ItemBuilder {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.item = {};
|
|
6
|
+
}
|
|
7
|
+
productId(value) {
|
|
8
|
+
this.item['abx:product_id'] = {
|
|
9
|
+
value,
|
|
10
|
+
type: 'string'
|
|
11
|
+
};
|
|
12
|
+
return this;
|
|
13
|
+
}
|
|
14
|
+
productName(value) {
|
|
15
|
+
this.item['abx:product_name'] = {
|
|
16
|
+
value,
|
|
17
|
+
type: 'string'
|
|
18
|
+
};
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
price(value) {
|
|
22
|
+
this.item['abx:price'] = {
|
|
23
|
+
value,
|
|
24
|
+
type: 'double'
|
|
25
|
+
};
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
discount(value) {
|
|
29
|
+
this.item['abx:discount'] = {
|
|
30
|
+
value,
|
|
31
|
+
type: 'double'
|
|
32
|
+
};
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
quantity(value) {
|
|
36
|
+
this.item['abx:quantity'] = {
|
|
37
|
+
value,
|
|
38
|
+
type: 'long'
|
|
39
|
+
};
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
category1(value) {
|
|
43
|
+
this.item['abx:category1'] = {
|
|
44
|
+
value,
|
|
45
|
+
type: 'string'
|
|
46
|
+
};
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
category2(value) {
|
|
50
|
+
this.item['abx:category2'] = {
|
|
51
|
+
value,
|
|
52
|
+
type: 'string'
|
|
53
|
+
};
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
category3(value) {
|
|
57
|
+
this.item['abx:category3'] = {
|
|
58
|
+
value,
|
|
59
|
+
type: 'string'
|
|
60
|
+
};
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
category4(value) {
|
|
64
|
+
this.item['abx:category4'] = {
|
|
65
|
+
value,
|
|
66
|
+
type: 'string'
|
|
67
|
+
};
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
category5(value) {
|
|
71
|
+
this.item['abx:category5'] = {
|
|
72
|
+
value,
|
|
73
|
+
type: 'string'
|
|
74
|
+
};
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
currency(value) {
|
|
78
|
+
this.item['abx:currency'] = {
|
|
79
|
+
value,
|
|
80
|
+
type: 'string'
|
|
81
|
+
};
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
customString(key, value) {
|
|
85
|
+
this.item[key] = {
|
|
86
|
+
value,
|
|
87
|
+
type: 'string'
|
|
88
|
+
};
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
customLong(key, value) {
|
|
92
|
+
this.item[key] = {
|
|
93
|
+
value,
|
|
94
|
+
type: 'long'
|
|
95
|
+
};
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
customDouble(key, value) {
|
|
99
|
+
this.item[key] = {
|
|
100
|
+
value,
|
|
101
|
+
type: 'double'
|
|
102
|
+
};
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
customBool(key, value) {
|
|
106
|
+
this.item[key] = {
|
|
107
|
+
value,
|
|
108
|
+
type: 'boolean'
|
|
109
|
+
};
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
build() {
|
|
113
|
+
return this.item;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
class PropertiesBuilder {
|
|
117
|
+
constructor(initialProperties = {}) {
|
|
118
|
+
this.properties = {
|
|
119
|
+
...initialProperties
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
items(itemsInput) {
|
|
123
|
+
let itemsArray;
|
|
124
|
+
if (Array.isArray(itemsInput)) {
|
|
125
|
+
itemsArray = itemsInput;
|
|
126
|
+
} else if (itemsInput && typeof itemsInput === 'object') {
|
|
127
|
+
itemsArray = [itemsInput];
|
|
128
|
+
} else {
|
|
129
|
+
console.warn('[Properties] items() expects an array or single item object');
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
this.properties['abx:items'] = itemsArray;
|
|
133
|
+
return this;
|
|
134
|
+
}
|
|
135
|
+
orderId(value) {
|
|
136
|
+
this.properties['abx:order_id'] = {
|
|
137
|
+
value,
|
|
138
|
+
type: 'string'
|
|
139
|
+
};
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
orderSales(value) {
|
|
143
|
+
this.properties['abx:order_sales'] = {
|
|
144
|
+
value,
|
|
145
|
+
type: 'double'
|
|
146
|
+
};
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
deliveryCharge(value) {
|
|
150
|
+
this.properties['abx:delivery_charge'] = {
|
|
151
|
+
value,
|
|
152
|
+
type: 'double'
|
|
153
|
+
};
|
|
154
|
+
return this;
|
|
155
|
+
}
|
|
156
|
+
penaltyCharge(value) {
|
|
157
|
+
this.properties['abx:penalty_charge'] = {
|
|
158
|
+
value,
|
|
159
|
+
type: 'double'
|
|
160
|
+
};
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
paymentMethod(value) {
|
|
164
|
+
this.properties['abx:payment_method'] = {
|
|
165
|
+
value,
|
|
166
|
+
type: 'string'
|
|
167
|
+
};
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
discount(value) {
|
|
171
|
+
this.properties['abx:discount'] = {
|
|
172
|
+
value,
|
|
173
|
+
type: 'double'
|
|
174
|
+
};
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
signChannel(value) {
|
|
178
|
+
this.properties['abx:sign_channel'] = {
|
|
179
|
+
value,
|
|
180
|
+
type: 'string'
|
|
181
|
+
};
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
inviteChannel(value) {
|
|
185
|
+
this.properties['abx:invite_channel'] = {
|
|
186
|
+
value,
|
|
187
|
+
type: 'string'
|
|
188
|
+
};
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
sharingChannel(value) {
|
|
192
|
+
this.properties['abx:sharing_channel'] = {
|
|
193
|
+
value,
|
|
194
|
+
type: 'string'
|
|
195
|
+
};
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
category1(value) {
|
|
199
|
+
this.properties['abx:category1'] = {
|
|
200
|
+
value,
|
|
201
|
+
type: 'string'
|
|
202
|
+
};
|
|
203
|
+
return this;
|
|
204
|
+
}
|
|
205
|
+
category2(value) {
|
|
206
|
+
this.properties['abx:category2'] = {
|
|
207
|
+
value,
|
|
208
|
+
type: 'string'
|
|
209
|
+
};
|
|
210
|
+
return this;
|
|
211
|
+
}
|
|
212
|
+
category3(value) {
|
|
213
|
+
this.properties['abx:category3'] = {
|
|
214
|
+
value,
|
|
215
|
+
type: 'string'
|
|
216
|
+
};
|
|
217
|
+
return this;
|
|
218
|
+
}
|
|
219
|
+
category4(value) {
|
|
220
|
+
this.properties['abx:category4'] = {
|
|
221
|
+
value,
|
|
222
|
+
type: 'string'
|
|
223
|
+
};
|
|
224
|
+
return this;
|
|
225
|
+
}
|
|
226
|
+
category5(value) {
|
|
227
|
+
this.properties['abx:category5'] = {
|
|
228
|
+
value,
|
|
229
|
+
type: 'string'
|
|
230
|
+
};
|
|
231
|
+
return this;
|
|
232
|
+
}
|
|
233
|
+
keyword(value) {
|
|
234
|
+
this.properties['abx:keyword'] = {
|
|
235
|
+
value,
|
|
236
|
+
type: 'string'
|
|
237
|
+
};
|
|
238
|
+
return this;
|
|
239
|
+
}
|
|
240
|
+
prevVer(value) {
|
|
241
|
+
this.properties['abx:prev_ver'] = {
|
|
242
|
+
value,
|
|
243
|
+
type: 'string'
|
|
244
|
+
};
|
|
245
|
+
return this;
|
|
246
|
+
}
|
|
247
|
+
currVer(value) {
|
|
248
|
+
this.properties['abx:curr_ver'] = {
|
|
249
|
+
value,
|
|
250
|
+
type: 'string'
|
|
251
|
+
};
|
|
252
|
+
return this;
|
|
253
|
+
}
|
|
254
|
+
level(value) {
|
|
255
|
+
this.properties['abx:level'] = {
|
|
256
|
+
value,
|
|
257
|
+
type: 'long'
|
|
258
|
+
};
|
|
259
|
+
return this;
|
|
260
|
+
}
|
|
261
|
+
stage(value) {
|
|
262
|
+
this.properties['abx:stage'] = {
|
|
263
|
+
value,
|
|
264
|
+
type: 'string'
|
|
265
|
+
};
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
isSkip(value) {
|
|
269
|
+
this.properties['abx:is_skip'] = {
|
|
270
|
+
value,
|
|
271
|
+
type: 'boolean'
|
|
272
|
+
};
|
|
273
|
+
return this;
|
|
274
|
+
}
|
|
275
|
+
customDouble(key, value) {
|
|
276
|
+
this.properties[key] = {
|
|
277
|
+
value,
|
|
278
|
+
type: 'double'
|
|
279
|
+
};
|
|
280
|
+
return this;
|
|
281
|
+
}
|
|
282
|
+
customLong(key, value) {
|
|
283
|
+
this.properties[key] = {
|
|
284
|
+
value,
|
|
285
|
+
type: 'long'
|
|
286
|
+
};
|
|
287
|
+
return this;
|
|
288
|
+
}
|
|
289
|
+
customString(key, value) {
|
|
290
|
+
this.properties[key] = {
|
|
291
|
+
value,
|
|
292
|
+
type: 'string'
|
|
293
|
+
};
|
|
294
|
+
return this;
|
|
295
|
+
}
|
|
296
|
+
customBool(key, value) {
|
|
297
|
+
this.properties[key] = {
|
|
298
|
+
value,
|
|
299
|
+
type: 'boolean'
|
|
300
|
+
};
|
|
301
|
+
return this;
|
|
302
|
+
}
|
|
303
|
+
build() {
|
|
304
|
+
return this.properties;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
const createBuilderMethod = methodName => {
|
|
308
|
+
return function (...args) {
|
|
309
|
+
const builder = new PropertiesBuilder();
|
|
310
|
+
return builder[methodName](...args);
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
export const ABProperty = {
|
|
314
|
+
items: createBuilderMethod('items'),
|
|
315
|
+
orderId: createBuilderMethod('orderId'),
|
|
316
|
+
orderSales: createBuilderMethod('orderSales'),
|
|
317
|
+
deliveryCharge: createBuilderMethod('deliveryCharge'),
|
|
318
|
+
penaltyCharge: createBuilderMethod('penaltyCharge'),
|
|
319
|
+
paymentMethod: createBuilderMethod('paymentMethod'),
|
|
320
|
+
discount: createBuilderMethod('discount'),
|
|
321
|
+
signChannel: createBuilderMethod('signChannel'),
|
|
322
|
+
inviteChannel: createBuilderMethod('inviteChannel'),
|
|
323
|
+
sharingChannel: createBuilderMethod('sharingChannel'),
|
|
324
|
+
category1: createBuilderMethod('category1'),
|
|
325
|
+
category2: createBuilderMethod('category2'),
|
|
326
|
+
category3: createBuilderMethod('category3'),
|
|
327
|
+
category4: createBuilderMethod('category4'),
|
|
328
|
+
category5: createBuilderMethod('category5'),
|
|
329
|
+
keyword: createBuilderMethod('keyword'),
|
|
330
|
+
prevVer: createBuilderMethod('prevVer'),
|
|
331
|
+
currVer: createBuilderMethod('currVer'),
|
|
332
|
+
level: createBuilderMethod('level'),
|
|
333
|
+
stage: createBuilderMethod('stage'),
|
|
334
|
+
isSkip: createBuilderMethod('isSkip'),
|
|
335
|
+
customDouble: createBuilderMethod('customDouble'),
|
|
336
|
+
customLong: createBuilderMethod('customLong'),
|
|
337
|
+
customString: createBuilderMethod('customString'),
|
|
338
|
+
customBool: createBuilderMethod('customBool')
|
|
339
|
+
};
|
|
340
|
+
export const ABItem = () => new ItemBuilder();
|
|
341
|
+
export default ABProperty;
|
|
342
|
+
//# sourceMappingURL=properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ItemBuilder","constructor","item","productId","value","type","productName","price","discount","quantity","category1","category2","category3","category4","category5","currency","customString","key","customLong","customDouble","customBool","build","PropertiesBuilder","initialProperties","properties","items","itemsInput","itemsArray","Array","isArray","console","warn","orderId","orderSales","deliveryCharge","penaltyCharge","paymentMethod","signChannel","inviteChannel","sharingChannel","keyword","prevVer","currVer","level","stage","isSkip","createBuilderMethod","methodName","args","builder","ABProperty","ABItem"],"sourceRoot":"../../src","sources":["properties.js"],"mappings":";;AACA,MAAMA,WAAW,CAAC;EAChBC,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACC,IAAI,GAAG,CAAC,CAAC;EAChB;EAEAC,SAASA,CAACC,KAAK,EAAE;IACf,IAAI,CAACF,IAAI,CAAC,gBAAgB,CAAC,GAAG;MAAEE,KAAK;MAAEC,IAAI,EAAE;IAAS,CAAC;IACvD,OAAO,IAAI;EACb;EAEAC,WAAWA,CAACF,KAAK,EAAE;IACjB,IAAI,CAACF,IAAI,CAAC,kBAAkB,CAAC,GAAG;MAAEE,KAAK;MAAEC,IAAI,EAAE;IAAS,CAAC;IACzD,OAAO,IAAI;EACb;EAEAE,KAAKA,CAACH,KAAK,EAAE;IACX,IAAI,CAACF,IAAI,CAAC,WAAW,CAAC,GAAG;MAAEE,KAAK;MAAEC,IAAI,EAAE;IAAS,CAAC;IAClD,OAAO,IAAI;EACb;EAEAG,QAAQA,CAACJ,KAAK,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