@bytexbyte/berifyme-react-native-sdk 1.0.0 → 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/lib/commonjs/BerifymeModal/index.js +48 -47
- package/lib/commonjs/BerifymeModal/index.js.map +1 -1
- package/lib/commonjs/api/api.js +9 -1
- package/lib/commonjs/api/api.js.map +1 -1
- package/lib/commonjs/components/Onboarding/Vender/Grid/index.js +228 -0
- package/lib/commonjs/components/Onboarding/Vender/Grid/index.js.map +1 -0
- package/lib/commonjs/components/Onboarding/{Vender.js → Vender/index.js} +54 -97
- package/lib/commonjs/components/Onboarding/Vender/index.js.map +1 -0
- package/lib/commonjs/countryCode.js +225 -0
- package/lib/commonjs/countryCode.js.map +1 -0
- package/lib/module/BerifymeModal/index.js +5 -4
- package/lib/module/BerifymeModal/index.js.map +1 -1
- package/lib/module/api/api.js +9 -1
- package/lib/module/api/api.js.map +1 -1
- package/lib/module/components/Onboarding/Vender/Grid/index.js +223 -0
- package/lib/module/components/Onboarding/Vender/Grid/index.js.map +1 -0
- package/lib/module/components/Onboarding/{Vender.js → Vender/index.js} +56 -99
- package/lib/module/components/Onboarding/Vender/index.js.map +1 -0
- package/lib/module/countryCode.js +219 -0
- package/lib/module/countryCode.js.map +1 -0
- package/lib/typescript/commonjs/lib/commonjs/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/commonjs/api/api.d.ts +16 -12
- package/lib/typescript/commonjs/lib/commonjs/api/api.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender/Grid/index.d.ts +10 -0
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender/index.d.ts +9 -0
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/commonjs/countryCode.d.ts +211 -0
- package/lib/typescript/commonjs/lib/commonjs/countryCode.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/module/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/module/api/api.d.ts +16 -12
- package/lib/typescript/commonjs/lib/module/api/api.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/module/components/Onboarding/Vender/Grid/index.d.ts +9 -0
- package/lib/typescript/commonjs/lib/module/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/module/components/Onboarding/{Vender.d.ts → Vender/index.d.ts} +3 -2
- package/lib/typescript/commonjs/lib/module/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/module/countryCode.d.ts +210 -0
- package/lib/typescript/commonjs/lib/module/countryCode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/api/api.d.ts +7 -0
- package/lib/typescript/commonjs/src/api/api.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Onboarding/Vender/Grid/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Onboarding/Vender/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/countryCode.d.ts +4 -0
- package/lib/typescript/commonjs/src/countryCode.d.ts.map +1 -0
- package/lib/typescript/module/lib/commonjs/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/module/lib/commonjs/api/api.d.ts +16 -12
- package/lib/typescript/module/lib/commonjs/api/api.d.ts.map +1 -1
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender/Grid/index.d.ts +10 -0
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender/index.d.ts +9 -0
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/module/lib/commonjs/countryCode.d.ts +211 -0
- package/lib/typescript/module/lib/commonjs/countryCode.d.ts.map +1 -0
- package/lib/typescript/module/lib/module/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/module/lib/module/api/api.d.ts +16 -12
- package/lib/typescript/module/lib/module/api/api.d.ts.map +1 -1
- package/lib/typescript/module/lib/module/components/Onboarding/Vender/Grid/index.d.ts +9 -0
- package/lib/typescript/module/lib/module/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/module/lib/module/components/Onboarding/{Vender.d.ts → Vender/index.d.ts} +3 -2
- package/lib/typescript/module/lib/module/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/module/lib/module/countryCode.d.ts +210 -0
- package/lib/typescript/module/lib/module/countryCode.d.ts.map +1 -0
- package/lib/typescript/module/src/BerifymeModal/index.d.ts.map +1 -1
- package/lib/typescript/module/src/api/api.d.ts +7 -0
- package/lib/typescript/module/src/api/api.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Onboarding/Vender/Grid/index.d.ts +11 -0
- package/lib/typescript/module/src/components/Onboarding/Vender/Grid/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Onboarding/Vender/index.d.ts +11 -0
- package/lib/typescript/module/src/components/Onboarding/Vender/index.d.ts.map +1 -0
- package/lib/typescript/module/src/countryCode.d.ts +4 -0
- package/lib/typescript/module/src/countryCode.d.ts.map +1 -0
- package/package.json +4 -3
- package/lib/commonjs/components/Onboarding/Vender.js.map +0 -1
- package/lib/module/components/Onboarding/Vender.js.map +0 -1
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender.d.ts +0 -8
- package/lib/typescript/commonjs/lib/commonjs/components/Onboarding/Vender.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/module/components/Onboarding/Vender.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/Onboarding/Vender.d.ts +0 -9
- package/lib/typescript/commonjs/src/components/Onboarding/Vender.d.ts.map +0 -1
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender.d.ts +0 -8
- package/lib/typescript/module/lib/commonjs/components/Onboarding/Vender.d.ts.map +0 -1
- package/lib/typescript/module/lib/module/components/Onboarding/Vender.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Onboarding/Vender.d.ts +0 -9
- package/lib/typescript/module/src/components/Onboarding/Vender.d.ts.map +0 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _libphonenumberJs = require("libphonenumber-js");
|
|
9
|
+
var _api = _interopRequireDefault(require("../../../../api/api.js"));
|
|
10
|
+
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
11
|
+
var _core = require("@react-native-material/core");
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
var _index = require("../../../../enum/index.js");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
const getCountryCodeFromPhoneNumber = phoneNumber => {
|
|
17
|
+
try {
|
|
18
|
+
const phoneNumberObj = (0, _libphonenumberJs.parsePhoneNumber)(phoneNumber);
|
|
19
|
+
return phoneNumberObj.country || null;
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error("Invalid phone number:", error);
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const VenderGrid = ({
|
|
26
|
+
setPageStatus,
|
|
27
|
+
setError,
|
|
28
|
+
user,
|
|
29
|
+
showMore,
|
|
30
|
+
setShowMore
|
|
31
|
+
}) => {
|
|
32
|
+
const [venderOrder, setVenderOrder] = (0, _react.useState)([]);
|
|
33
|
+
const getAuthIdAccountDetail = async () => {
|
|
34
|
+
const account = await _api.default.authID.getAccount({
|
|
35
|
+
token: (await _asyncStorage.default.getItem("authID_token")) ?? "",
|
|
36
|
+
phone: user?.phoneNumber ?? ""
|
|
37
|
+
});
|
|
38
|
+
return account;
|
|
39
|
+
};
|
|
40
|
+
const initializeUserCountryAndOrder = async () => {
|
|
41
|
+
if (!user?.phoneNumber) {
|
|
42
|
+
setError("Oops! Something went wrong...");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const countryCode = getCountryCodeFromPhoneNumber(`+${user.phoneNumber}`) ?? "US";
|
|
46
|
+
const orderRes = await _api.default.getOrderByCountry({
|
|
47
|
+
countryCode
|
|
48
|
+
});
|
|
49
|
+
if (orderRes.error) {
|
|
50
|
+
setError(orderRes.error);
|
|
51
|
+
} else if (orderRes.order) {
|
|
52
|
+
setVenderOrder(orderRes.order); // 设置显示顺序
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
(0, _react.useEffect)(() => {
|
|
56
|
+
initializeUserCountryAndOrder();
|
|
57
|
+
}, []);
|
|
58
|
+
const handleBerifyClick = async () => {
|
|
59
|
+
try {
|
|
60
|
+
const authIdTokenRes = await _api.default.authID.getAuthIDToken();
|
|
61
|
+
if (!authIdTokenRes.token) {
|
|
62
|
+
setError("Auth id error");
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (!user) {
|
|
66
|
+
setError("User error");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const account = await getAuthIdAccountDetail();
|
|
70
|
+
if (account.error === "User data not found.") {
|
|
71
|
+
await _api.default.authID.createAccount({
|
|
72
|
+
token: authIdTokenRes.token || "",
|
|
73
|
+
userId: user.id
|
|
74
|
+
});
|
|
75
|
+
// 保存 token 到本地存储
|
|
76
|
+
_asyncStorage.default.setItem("authID_token", authIdTokenRes.token);
|
|
77
|
+
setPageStatus(1.2);
|
|
78
|
+
} else {
|
|
79
|
+
setError("Unknown error. Please contact support.");
|
|
80
|
+
}
|
|
81
|
+
} catch (error) {
|
|
82
|
+
setError("Error processing request");
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const vendors = [{
|
|
86
|
+
key: "authid",
|
|
87
|
+
image: "https://idv.berify.me/little-berify.png",
|
|
88
|
+
title: "Berify.me",
|
|
89
|
+
subtitle: "avg. 26s completion",
|
|
90
|
+
onPress: handleBerifyClick
|
|
91
|
+
}, {
|
|
92
|
+
key: "clear",
|
|
93
|
+
image: "https://idv.berify.me/clear.png",
|
|
94
|
+
title: "CLEAR",
|
|
95
|
+
subtitle: "avg. 60s completion",
|
|
96
|
+
onPress: () => setPageStatus(2.1)
|
|
97
|
+
}, {
|
|
98
|
+
key: "incode",
|
|
99
|
+
image: "https://idv.berify.me/incode.png",
|
|
100
|
+
title: "Incode",
|
|
101
|
+
subtitle: "avg. 30s completion",
|
|
102
|
+
onPress: () => setPageStatus(_index.PageStatus.IncodeOnBoarding)
|
|
103
|
+
}
|
|
104
|
+
// {
|
|
105
|
+
// key: "sumsub",
|
|
106
|
+
// image: "https://staging.berify.me/sumsub.png",
|
|
107
|
+
// title: "Sumsub",
|
|
108
|
+
// subtitle: "avg. 30s completion",
|
|
109
|
+
// onPress: () => setPageStatus(PageStatus.SumsubOnBoarding),
|
|
110
|
+
// },
|
|
111
|
+
// {
|
|
112
|
+
// key: "veriff",
|
|
113
|
+
// image: "https://staging.berify.me/veriff.png",
|
|
114
|
+
// title: "Veriff",
|
|
115
|
+
// subtitle: "avg. 30s completion",
|
|
116
|
+
// onPress: () => setPageStatus(PageStatus.VeriffOnBoarding),
|
|
117
|
+
// },
|
|
118
|
+
// {
|
|
119
|
+
// key: "yoti",
|
|
120
|
+
// image: "https://staging.berify.me/yoti.png",
|
|
121
|
+
// title: "Yoti",
|
|
122
|
+
// subtitle: "avg. 30s completion",
|
|
123
|
+
// onPress: () => {},
|
|
124
|
+
// },
|
|
125
|
+
];
|
|
126
|
+
const displayedVendors = showMore ? vendors : vendors.slice(0, 6);
|
|
127
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
128
|
+
style: styles.container,
|
|
129
|
+
children: [displayedVendors.map(vendor => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
130
|
+
onPress: vendor.onPress,
|
|
131
|
+
activeOpacity: 0.8,
|
|
132
|
+
style: styles.item,
|
|
133
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
134
|
+
style: styles.card,
|
|
135
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
136
|
+
source: {
|
|
137
|
+
uri: vendor.image
|
|
138
|
+
},
|
|
139
|
+
resizeMode: "contain",
|
|
140
|
+
style: styles.image
|
|
141
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
142
|
+
style: styles.title,
|
|
143
|
+
children: vendor.title
|
|
144
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
145
|
+
style: styles.subtitle,
|
|
146
|
+
children: vendor.subtitle
|
|
147
|
+
})]
|
|
148
|
+
})
|
|
149
|
+
}, vendor.key)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
150
|
+
style: styles.buttonContainer,
|
|
151
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
152
|
+
onPress: () => setShowMore(prev => !prev),
|
|
153
|
+
style: styles.showMoreButton,
|
|
154
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
155
|
+
style: styles.showMoreText,
|
|
156
|
+
children: showMore ? "Show Less" : "Show More"
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const styles = _reactNative.StyleSheet.create({
|
|
163
|
+
container: {
|
|
164
|
+
flexDirection: "row",
|
|
165
|
+
flexWrap: "wrap",
|
|
166
|
+
// 自动换行
|
|
167
|
+
justifyContent: "space-between",
|
|
168
|
+
// 子项间距均匀
|
|
169
|
+
paddingHorizontal: 8
|
|
170
|
+
},
|
|
171
|
+
item: {
|
|
172
|
+
width: "48%",
|
|
173
|
+
// 每个子项占据容器宽度的 48%
|
|
174
|
+
marginBottom: 16 // 子项之间的垂直间距
|
|
175
|
+
},
|
|
176
|
+
card: {
|
|
177
|
+
backgroundColor: "#f2f2f2",
|
|
178
|
+
borderRadius: 24,
|
|
179
|
+
paddingVertical: 24,
|
|
180
|
+
alignItems: "center"
|
|
181
|
+
},
|
|
182
|
+
image: {
|
|
183
|
+
width: 36,
|
|
184
|
+
height: 36
|
|
185
|
+
},
|
|
186
|
+
title: {
|
|
187
|
+
fontSize: 16,
|
|
188
|
+
fontWeight: "bold",
|
|
189
|
+
marginTop: 8
|
|
190
|
+
},
|
|
191
|
+
subtitle: {
|
|
192
|
+
fontSize: 12,
|
|
193
|
+
color: "#696969",
|
|
194
|
+
marginTop: 4
|
|
195
|
+
},
|
|
196
|
+
buttonContainer: {
|
|
197
|
+
width: "100%",
|
|
198
|
+
// 确保容器占满整个父容器宽度
|
|
199
|
+
alignItems: "center",
|
|
200
|
+
// 水平居中
|
|
201
|
+
justifyContent: "center",
|
|
202
|
+
// 确保按钮垂直居中
|
|
203
|
+
marginTop: 16 // 按钮的上间距
|
|
204
|
+
},
|
|
205
|
+
showMoreButton: {
|
|
206
|
+
borderColor: "#000",
|
|
207
|
+
// 按钮边框颜色
|
|
208
|
+
borderWidth: 1,
|
|
209
|
+
// 按钮边框宽度
|
|
210
|
+
borderRadius: 20,
|
|
211
|
+
// 按钮圆角
|
|
212
|
+
paddingHorizontal: 16,
|
|
213
|
+
// 按钮左右内边距
|
|
214
|
+
paddingVertical: 10,
|
|
215
|
+
// 按钮上下内边距
|
|
216
|
+
width: 200 // 按钮宽度
|
|
217
|
+
},
|
|
218
|
+
showMoreText: {
|
|
219
|
+
fontSize: 16,
|
|
220
|
+
color: "#000",
|
|
221
|
+
// 按钮文本颜色
|
|
222
|
+
textTransform: "none",
|
|
223
|
+
// 保持文本不变成大写
|
|
224
|
+
textAlign: "center" // 使文本居中
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
var _default = exports.default = VenderGrid;
|
|
228
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_libphonenumberJs","_api","_interopRequireDefault","_asyncStorage","_core","_reactNative","_index","_jsxRuntime","e","__esModule","default","getCountryCodeFromPhoneNumber","phoneNumber","phoneNumberObj","parsePhoneNumber","country","error","console","VenderGrid","setPageStatus","setError","user","showMore","setShowMore","venderOrder","setVenderOrder","useState","getAuthIdAccountDetail","account","berifymeApi","authID","getAccount","token","AsyncStorage","getItem","phone","initializeUserCountryAndOrder","countryCode","orderRes","getOrderByCountry","order","useEffect","handleBerifyClick","authIdTokenRes","getAuthIDToken","createAccount","userId","id","setItem","vendors","key","image","title","subtitle","onPress","PageStatus","IncodeOnBoarding","displayedVendors","slice","jsxs","View","style","styles","container","children","map","vendor","jsx","TouchableOpacity","activeOpacity","item","card","Image","source","uri","resizeMode","Text","buttonContainer","prev","showMoreButton","showMoreText","StyleSheet","create","flexDirection","flexWrap","justifyContent","paddingHorizontal","width","marginBottom","backgroundColor","borderRadius","paddingVertical","alignItems","height","fontSize","fontWeight","marginTop","color","borderColor","borderWidth","textTransform","textAlign","_default","exports"],"sourceRoot":"../../../../../../src","sources":["components/Onboarding/Vender/Grid/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,Y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K,EAAE,KAAK;IAAE;IACdC,YAAY,EAAE,EAAE,CAAE;EACpB,CAAC;EACDjB,IAAI,EAAE;IACJkB,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,EAAE;IACnBC,UAAU,EAAE;EACd,CAAC;EACDzC,KAAK,EAAE;IACLoC,KAAK,EAAE,EAAE;IACTM,MAAM,EAAE;EACV,CAAC;EACDzC,KAAK,EAAE;IACL0C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,SAAS,EAAE;EACb,CAAC;EACD3C,QAAQ,EAAE;IACRyC,QAAQ,EAAE,EAAE;IACZG,KAAK,EAAE,SAAS;IAChBD,SAAS,EAAE;EACb,CAAC;EACDnB,eAAe,EAAE;IACfU,KAAK,EAAE,MAAM;IAAW;IACxBK,UAAU,EAAE,QAAQ;IAAI;IACxBP,cAAc,EAAE,QAAQ;IAAG;IAC3BW,SAAS,EAAE,EAAE,CAAW;EAC1B,CAAC;EACDjB,cAAc,EAAE;IACdmB,WAAW,EAAE,MAAM;IAAK;IACxBC,WAAW,EAAE,CAAC;IAAU;IACxBT,YAAY,EAAE,EAAE;IAAQ;IACxBJ,iBAAiB,EAAE,EAAE;IAAG;IACxBK,eAAe,EAAE,EAAE;IAAK;IACxBJ,KAAK,EAAE,GAAG,CAAc;EAC1B,CAAC;EACDP,YAAY,EAAE;IACZc,QAAQ,EAAE,EAAE;IACZG,KAAK,EAAE,MAAM;IAAI;IACjBG,aAAa,EAAE,MAAM;IAAE;IACvBC,SAAS,EAAE,QAAQ,CAAI;EACzB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7F,OAAA,GAEYQ,UAAU","ignoreList":[]}
|
|
@@ -8,19 +8,62 @@ var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/
|
|
|
8
8
|
var _core = require("@react-native-material/core");
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
|
-
var _api = _interopRequireDefault(require("
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _api = _interopRequireDefault(require("../../../api/api.js"));
|
|
12
|
+
var _Footer = _interopRequireDefault(require("../../Footer.js"));
|
|
13
|
+
var _countryCode = require("../../../countryCode.js");
|
|
14
|
+
var _libphonenumberJs = require("libphonenumber-js");
|
|
15
|
+
var _index = _interopRequireDefault(require("./Grid/index.js"));
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
+
const getCountryCodeFromPhoneNumber = phoneNumber => {
|
|
21
|
+
try {
|
|
22
|
+
console.log('test phoneNumber', phoneNumber);
|
|
23
|
+
const phoneNumberObj = (0, _libphonenumberJs.parsePhoneNumberFromString)(phoneNumber);
|
|
24
|
+
console.log('test phoneNumberObj country', phoneNumberObj?.country);
|
|
25
|
+
return phoneNumberObj?.country || null;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error('Invalid phone number:', error);
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
18
31
|
const Vender = ({
|
|
19
32
|
setPageStatus,
|
|
20
33
|
setError,
|
|
21
|
-
user
|
|
34
|
+
user,
|
|
35
|
+
setModalHeight
|
|
22
36
|
}) => {
|
|
23
37
|
const [loading, setLoading] = (0, _react.useState)(false);
|
|
38
|
+
const [venderOrder, setVenderOrder] = (0, _react.useState)();
|
|
39
|
+
const [userCountryName, setUserCountryName] = (0, _react.useState)('');
|
|
40
|
+
const [showMore, setShowMore] = (0, _react.useState)(false);
|
|
41
|
+
(0, _react.useEffect)(() => {
|
|
42
|
+
if (showMore) {
|
|
43
|
+
setModalHeight('100%');
|
|
44
|
+
} else {
|
|
45
|
+
setModalHeight('80%');
|
|
46
|
+
}
|
|
47
|
+
}, [showMore]);
|
|
48
|
+
const initializeUserCountryAndOrder = async () => {
|
|
49
|
+
if (!user?.phoneNumber) {
|
|
50
|
+
setError('Oops! Something went wrong...');
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const countryCode = getCountryCodeFromPhoneNumber(`+${user.phoneNumber}`) ?? 'US';
|
|
54
|
+
const countryName = (0, _countryCode.getCountryNameByCode)(countryCode);
|
|
55
|
+
setUserCountryName(countryName);
|
|
56
|
+
const orderRes = await _api.default.getOrderByCountry({
|
|
57
|
+
countryCode: countryCode
|
|
58
|
+
});
|
|
59
|
+
if (orderRes.error) setError(orderRes.error);else if (orderRes.order) setVenderOrder(orderRes.order);
|
|
60
|
+
};
|
|
61
|
+
(0, _react.useEffect)(() => {
|
|
62
|
+
initializeUserCountryAndOrder();
|
|
63
|
+
}, []);
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
65
|
+
console.log('vender order: ', venderOrder);
|
|
66
|
+
}, [venderOrder]);
|
|
24
67
|
const getAuthIdAccountDetail = async () => {
|
|
25
68
|
const account = await _api.default.authID.getAccount({
|
|
26
69
|
token: (await _asyncStorage.default.getItem('authID_token')) ?? '',
|
|
@@ -92,98 +135,12 @@ const Vender = ({
|
|
|
92
135
|
height: 70
|
|
93
136
|
}
|
|
94
137
|
})]
|
|
95
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
w: '100%',
|
|
102
|
-
bg: '#f2f2f2',
|
|
103
|
-
spacing: 8,
|
|
104
|
-
pv: 24,
|
|
105
|
-
center: true,
|
|
106
|
-
radius: 24,
|
|
107
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
108
|
-
source: {
|
|
109
|
-
uri: 'https://idv.berify.me/little-berify.png'
|
|
110
|
-
},
|
|
111
|
-
resizeMode: "contain",
|
|
112
|
-
style: styles.image
|
|
113
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
114
|
-
variant: "h6",
|
|
115
|
-
style: styles.textTitle,
|
|
116
|
-
children: "Berify.me"
|
|
117
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
118
|
-
variant: "body2",
|
|
119
|
-
style: styles.textSubTittle,
|
|
120
|
-
children: "avg. 26s completion"
|
|
121
|
-
})]
|
|
122
|
-
})
|
|
123
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_core.Stack, {
|
|
124
|
-
w: '100%',
|
|
125
|
-
direction: "row",
|
|
126
|
-
justify: "between",
|
|
127
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
128
|
-
onPress: () => setPageStatus(2.1),
|
|
129
|
-
activeOpacity: 0.8,
|
|
130
|
-
style: {
|
|
131
|
-
width: '49%'
|
|
132
|
-
},
|
|
133
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_core.Stack, {
|
|
134
|
-
bg: '#f2f2f2',
|
|
135
|
-
spacing: 8,
|
|
136
|
-
pv: 24,
|
|
137
|
-
center: true,
|
|
138
|
-
radius: 24,
|
|
139
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
140
|
-
source: {
|
|
141
|
-
uri: 'https://idv.berify.me/clear.png'
|
|
142
|
-
},
|
|
143
|
-
resizeMode: "contain",
|
|
144
|
-
style: styles.image
|
|
145
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
146
|
-
variant: "h6",
|
|
147
|
-
style: styles.textTitle,
|
|
148
|
-
children: "CLEAR"
|
|
149
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
150
|
-
variant: "body2",
|
|
151
|
-
style: styles.textSubTittle,
|
|
152
|
-
children: "avg. 60s completion"
|
|
153
|
-
})]
|
|
154
|
-
})
|
|
155
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
156
|
-
onPress: () => {
|
|
157
|
-
setPageStatus(_index.PageStatus.IncodeOnBoarding);
|
|
158
|
-
},
|
|
159
|
-
activeOpacity: 0.8,
|
|
160
|
-
style: {
|
|
161
|
-
width: '49%'
|
|
162
|
-
},
|
|
163
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_core.Stack, {
|
|
164
|
-
bg: '#f2f2f2',
|
|
165
|
-
spacing: 8,
|
|
166
|
-
pv: 24,
|
|
167
|
-
center: true,
|
|
168
|
-
radius: 24,
|
|
169
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
170
|
-
source: {
|
|
171
|
-
uri: 'https://idv.berify.me/incode.png'
|
|
172
|
-
},
|
|
173
|
-
resizeMode: "contain",
|
|
174
|
-
style: styles.image
|
|
175
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
176
|
-
variant: "h6",
|
|
177
|
-
style: styles.textTitle,
|
|
178
|
-
children: "Incode"
|
|
179
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_core.Text, {
|
|
180
|
-
variant: "body2",
|
|
181
|
-
style: styles.textSubTittle,
|
|
182
|
-
children: "avg. 30s completion"
|
|
183
|
-
})]
|
|
184
|
-
})
|
|
185
|
-
})]
|
|
186
|
-
})]
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.default, {
|
|
139
|
+
setPageStatus: setPageStatus,
|
|
140
|
+
setError: setError,
|
|
141
|
+
user: user,
|
|
142
|
+
showMore: showMore,
|
|
143
|
+
setShowMore: setShowMore
|
|
187
144
|
})]
|
|
188
145
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {})]
|
|
189
146
|
})
|
|
@@ -261,4 +218,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
261
218
|
}
|
|
262
219
|
});
|
|
263
220
|
var _default = exports.default = Vender;
|
|
264
|
-
//# sourceMappingURL=
|
|
221
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_asyncStorage","_interopRequireDefault","require","_core","_react","_interopRequireWildcard","_reactNative","_api","_Footer","_countryCode","_libphonenumberJs","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getCountryCodeFromPhoneNumber","phoneNumber","console","log","phoneNumberObj","parsePhoneNumberFromString","country","error","Vender","setPageStatus","setError","user","setModalHeight","loading","setLoading","useState","venderOrder","setVenderOrder","userCountryName","setUserCountryName","showMore","setShowMore","useEffect","initializeUserCountryAndOrder","countryCode","countryName","getCountryNameByCode","orderRes","berifymeApi","getOrderByCountry","order","getAuthIdAccountDetail","account","authID","getAccount","token","AsyncStorage","getItem","phone","handleBerifyClick","authIdTokenRes","getAuthIDToken","createAccount","userId","id","setItem","jsx","ScrollView","children","jsxs","Stack","h","ph","pv","spacing","justify","direction","items","Text","variant","style","styles","textTitle","textBody2","Image","source","uri","resizeMode","width","height","StyleSheet","create","container","flex","padding","justifyContent","image","grayBg","backgroundColor","fontSize","fontWeight","color","textSubTittle","fontStyle","textError","textBody1","lineHeight","progressText","button","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","alignItems","textInput","letterSpacing","paddingLeft","paddingRight","borderColor","borderWidth","borderRadius","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Onboarding/Vender/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,OAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAgC,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,E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AE,EAAE;IAC3BC,qBAAqB,EAAE,EAAE;IACzBxB,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE,EAAE;IACVW,UAAU,EAAE,GAAG;IACfa,UAAU,EAAE,QAAQ;IACpBlB,cAAc,EAAE;EAClB,CAAC;EACDmB,SAAS,EAAE;IACTzB,MAAM,EAAE,EAAE;IACVS,eAAe,EAAE,SAAS;IAAEG,KAAK,EAAE,OAAO;IAC1Cc,aAAa,EAAE,CAAC;IAAEf,UAAU,EAAE,KAAK;IACnCgB,WAAW,EAAE,EAAE;IAAEC,YAAY,EAAE,EAAE;IACjCC,WAAW,EAAE,SAAS;IAAEC,WAAW,EAAE,CAAC;IAAEC,YAAY,EAAE;EACxD;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApH,OAAA,GAEYsB,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.delay = exports.countryCodesToName = void 0;
|
|
7
|
+
exports.getCountryNameByCode = getCountryNameByCode;
|
|
8
|
+
const delay = n => {
|
|
9
|
+
return new Promise(resolve => {
|
|
10
|
+
setTimeout(resolve, Math.max(0, n));
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.delay = delay;
|
|
14
|
+
const countryCodesToName = exports.countryCodesToName = {
|
|
15
|
+
'AF': 'Afghanistan',
|
|
16
|
+
'AL': 'Albania',
|
|
17
|
+
'DZ': 'Algeria',
|
|
18
|
+
'AS': 'American Samoa',
|
|
19
|
+
'AD': 'Andorra',
|
|
20
|
+
'AO': 'Angola',
|
|
21
|
+
'AI': 'Anguilla',
|
|
22
|
+
'AQ': 'Antarctica',
|
|
23
|
+
'AG': 'Antigua and Barbuda',
|
|
24
|
+
'AR': 'Argentina',
|
|
25
|
+
'AM': 'Armenia',
|
|
26
|
+
'AW': 'Aruba',
|
|
27
|
+
'AU': 'Australia',
|
|
28
|
+
'AT': 'Austria',
|
|
29
|
+
'AZ': 'Azerbaijan',
|
|
30
|
+
'BS': 'Bahamas',
|
|
31
|
+
'BH': 'Bahrain',
|
|
32
|
+
'BD': 'Bangladesh',
|
|
33
|
+
'BB': 'Barbados',
|
|
34
|
+
'BY': 'Belarus',
|
|
35
|
+
'BE': 'Belgium',
|
|
36
|
+
'BZ': 'Belize',
|
|
37
|
+
'BJ': 'Benin',
|
|
38
|
+
'BM': 'Bermuda',
|
|
39
|
+
'BT': 'Bhutan',
|
|
40
|
+
'BO': 'Bolivia',
|
|
41
|
+
'BA': 'Bosnia and Herzegovina',
|
|
42
|
+
'BW': 'Botswana',
|
|
43
|
+
'BR': 'Brazil',
|
|
44
|
+
'BN': 'Brunei Darussalam',
|
|
45
|
+
'BG': 'Bulgaria',
|
|
46
|
+
'BF': 'Burkina Faso',
|
|
47
|
+
'BI': 'Burundi',
|
|
48
|
+
'KH': 'Cambodia',
|
|
49
|
+
'CM': 'Cameroon',
|
|
50
|
+
'CA': 'Canada',
|
|
51
|
+
'CV': 'Cape Verde',
|
|
52
|
+
'KY': 'Cayman Islands',
|
|
53
|
+
'CF': 'Central African Republic',
|
|
54
|
+
'TD': 'Chad',
|
|
55
|
+
'CL': 'Chile',
|
|
56
|
+
'CN': 'China',
|
|
57
|
+
'CO': 'Colombia',
|
|
58
|
+
'KM': 'Comoros',
|
|
59
|
+
'CG': 'Congo',
|
|
60
|
+
'CD': 'Congo, Democratic Republic of the',
|
|
61
|
+
'CR': 'Costa Rica',
|
|
62
|
+
'CI': 'Cote d\'Ivoire',
|
|
63
|
+
'HR': 'Croatia',
|
|
64
|
+
'CU': 'Cuba',
|
|
65
|
+
'CY': 'Cyprus',
|
|
66
|
+
'CZ': 'Czech Republic',
|
|
67
|
+
'DK': 'Denmark',
|
|
68
|
+
'DJ': 'Djibouti',
|
|
69
|
+
'DM': 'Dominica',
|
|
70
|
+
'DO': 'Dominican Republic',
|
|
71
|
+
'EC': 'Ecuador',
|
|
72
|
+
'EG': 'Egypt',
|
|
73
|
+
'SV': 'El Salvador',
|
|
74
|
+
'GQ': 'Equatorial Guinea',
|
|
75
|
+
'ER': 'Eritrea',
|
|
76
|
+
'EE': 'Estonia',
|
|
77
|
+
'ET': 'Ethiopia',
|
|
78
|
+
'FJ': 'Fiji',
|
|
79
|
+
'FI': 'Finland',
|
|
80
|
+
'FR': 'France',
|
|
81
|
+
'GA': 'Gabon',
|
|
82
|
+
'GM': 'Gambia',
|
|
83
|
+
'GE': 'Georgia',
|
|
84
|
+
'DE': 'Germany',
|
|
85
|
+
'GH': 'Ghana',
|
|
86
|
+
'GR': 'Greece',
|
|
87
|
+
'GL': 'Greenland',
|
|
88
|
+
'GD': 'Grenada',
|
|
89
|
+
'GU': 'Guam',
|
|
90
|
+
'GT': 'Guatemala',
|
|
91
|
+
'GN': 'Guinea',
|
|
92
|
+
'GW': 'Guinea-Bissau',
|
|
93
|
+
'GY': 'Guyana',
|
|
94
|
+
'HT': 'Haiti',
|
|
95
|
+
'HN': 'Honduras',
|
|
96
|
+
'HK': 'Hong Kong',
|
|
97
|
+
'HU': 'Hungary',
|
|
98
|
+
'IS': 'Iceland',
|
|
99
|
+
'IN': 'India',
|
|
100
|
+
'ID': 'Indonesia',
|
|
101
|
+
'IR': 'Iran',
|
|
102
|
+
'IQ': 'Iraq',
|
|
103
|
+
'IE': 'Ireland',
|
|
104
|
+
'IL': 'Israel',
|
|
105
|
+
'IT': 'Italy',
|
|
106
|
+
'JM': 'Jamaica',
|
|
107
|
+
'JP': 'Japan',
|
|
108
|
+
'JO': 'Jordan',
|
|
109
|
+
'KZ': 'Kazakhstan',
|
|
110
|
+
'KE': 'Kenya',
|
|
111
|
+
'KI': 'Kiribati',
|
|
112
|
+
'KP': 'Korea (North)',
|
|
113
|
+
'KR': 'Korea (South)',
|
|
114
|
+
'KW': 'Kuwait',
|
|
115
|
+
'KG': 'Kyrgyzstan',
|
|
116
|
+
'LA': 'Lao PDR',
|
|
117
|
+
'LV': 'Latvia',
|
|
118
|
+
'LB': 'Lebanon',
|
|
119
|
+
'LS': 'Lesotho',
|
|
120
|
+
'LR': 'Liberia',
|
|
121
|
+
'LY': 'Libya',
|
|
122
|
+
'LI': 'Liechtenstein',
|
|
123
|
+
'LT': 'Lithuania',
|
|
124
|
+
'LU': 'Luxembourg',
|
|
125
|
+
'MO': 'Macao',
|
|
126
|
+
'MK': 'Macedonia',
|
|
127
|
+
'MG': 'Madagascar',
|
|
128
|
+
'MW': 'Malawi',
|
|
129
|
+
'MY': 'Malaysia',
|
|
130
|
+
'MV': 'Maldives',
|
|
131
|
+
'ML': 'Mali',
|
|
132
|
+
'MT': 'Malta',
|
|
133
|
+
'MH': 'Marshall Islands',
|
|
134
|
+
'MR': 'Mauritania',
|
|
135
|
+
'MU': 'Mauritius',
|
|
136
|
+
'MX': 'Mexico',
|
|
137
|
+
'FM': 'Micronesia',
|
|
138
|
+
'MD': 'Moldova',
|
|
139
|
+
'MC': 'Monaco',
|
|
140
|
+
'MN': 'Mongolia',
|
|
141
|
+
'ME': 'Montenegro',
|
|
142
|
+
'MA': 'Morocco',
|
|
143
|
+
'MZ': 'Mozambique',
|
|
144
|
+
'MM': 'Myanmar',
|
|
145
|
+
'NA': 'Namibia',
|
|
146
|
+
'NR': 'Nauru',
|
|
147
|
+
'NP': 'Nepal',
|
|
148
|
+
'NL': 'Netherlands',
|
|
149
|
+
'NZ': 'New Zealand',
|
|
150
|
+
'NI': 'Nicaragua',
|
|
151
|
+
'NE': 'Niger',
|
|
152
|
+
'NG': 'Nigeria',
|
|
153
|
+
'NU': 'Niue',
|
|
154
|
+
'NF': 'Norfolk Island',
|
|
155
|
+
'MP': 'Northern Mariana Islands',
|
|
156
|
+
'NO': 'Norway',
|
|
157
|
+
'OM': 'Oman',
|
|
158
|
+
'PK': 'Pakistan',
|
|
159
|
+
'PW': 'Palau',
|
|
160
|
+
'PS': 'Palestine',
|
|
161
|
+
'PA': 'Panama',
|
|
162
|
+
'PG': 'Papua New Guinea',
|
|
163
|
+
'PY': 'Paraguay',
|
|
164
|
+
'PE': 'Peru',
|
|
165
|
+
'PH': 'Philippines',
|
|
166
|
+
'PL': 'Poland',
|
|
167
|
+
'PT': 'Portugal',
|
|
168
|
+
'PR': 'Puerto Rico',
|
|
169
|
+
'QA': 'Qatar',
|
|
170
|
+
'RO': 'Romania',
|
|
171
|
+
'RU': 'Russian Federation',
|
|
172
|
+
'RW': 'Rwanda',
|
|
173
|
+
'WS': 'Samoa',
|
|
174
|
+
'SM': 'San Marino',
|
|
175
|
+
'ST': 'Sao Tome and Principe',
|
|
176
|
+
'SA': 'Saudi Arabia',
|
|
177
|
+
'SN': 'Senegal',
|
|
178
|
+
'RS': 'Serbia',
|
|
179
|
+
'SC': 'Seychelles',
|
|
180
|
+
'SL': 'Sierra Leone',
|
|
181
|
+
'SG': 'Singapore',
|
|
182
|
+
'SK': 'Slovakia',
|
|
183
|
+
'SI': 'Slovenia',
|
|
184
|
+
'SB': 'Solomon Islands',
|
|
185
|
+
'SO': 'Somalia',
|
|
186
|
+
'ZA': 'South Africa',
|
|
187
|
+
'ES': 'Spain',
|
|
188
|
+
'LK': 'Sri Lanka',
|
|
189
|
+
'SD': 'Sudan',
|
|
190
|
+
'SR': 'Suriname',
|
|
191
|
+
'SZ': 'Swaziland',
|
|
192
|
+
'SE': 'Sweden',
|
|
193
|
+
'CH': 'Switzerland',
|
|
194
|
+
'SY': 'Syrian Arab Republic',
|
|
195
|
+
'TW': 'Taiwan',
|
|
196
|
+
'TJ': 'Tajikistan',
|
|
197
|
+
'TZ': 'Tanzania',
|
|
198
|
+
'TH': 'Thailand',
|
|
199
|
+
'TL': 'Timor-Leste',
|
|
200
|
+
'TG': 'Togo',
|
|
201
|
+
'TO': 'Tonga',
|
|
202
|
+
'TT': 'Trinidad and Tobago',
|
|
203
|
+
'TN': 'Tunisia',
|
|
204
|
+
'TR': 'Turkey',
|
|
205
|
+
'TM': 'Turkmenistan',
|
|
206
|
+
'TV': 'Tuvalu',
|
|
207
|
+
'UG': 'Uganda',
|
|
208
|
+
'UA': 'Ukraine',
|
|
209
|
+
'AE': 'United Arab Emirates',
|
|
210
|
+
'GB': 'United Kingdom',
|
|
211
|
+
'US': 'United States',
|
|
212
|
+
'UY': 'Uruguay',
|
|
213
|
+
'UZ': 'Uzbekistan',
|
|
214
|
+
'VU': 'Vanuatu',
|
|
215
|
+
'VE': 'Venezuela',
|
|
216
|
+
'VN': 'Viet Nam',
|
|
217
|
+
'YE': 'Yemen',
|
|
218
|
+
'ZM': 'Zambia',
|
|
219
|
+
'ZW': 'Zimbabwe'
|
|
220
|
+
};
|
|
221
|
+
function getCountryNameByCode(code) {
|
|
222
|
+
const countryName = countryCodesToName[code.toUpperCase()];
|
|
223
|
+
return countryName || code.toUpperCase();
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=countryCode.js.map
|