-
Notifications
You must be signed in to change notification settings - Fork 7
/
constants.ios.js
58 lines (48 loc) · 1.14 KB
/
constants.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var HOME_FAX = "_$!<HomeFAX>!$_";
var WORK_FAX = "_$!<WorkFAX>!$_";
var MAIN = "_$!<Main>!$_";
exports.getGenericLabel = (nativeLabel) => {
var genericLabel = nativeLabel;
switch (nativeLabel) {
case CNLabelHome:
genericLabel = 'home';
break;
case CNLabelWork:
genericLabel = 'work';
break;
case CNLabelOther:
genericLabel = 'other';
break;
};
return genericLabel;
};
exports.getPhoneLabel = (nativeLabel) => {
var phoneLabel = exports.getGenericLabel(nativeLabel);
switch (nativeLabel) {
case kABPersonPhoneMobileLabel:
phoneLabel = "mobile";
break;
case HOME_FAX:
phoneLabel = 'fax_home';
break;
case WORK_FAX:
phoneLabel = 'fax_work';
break;
case kABPersonPhonePagerLabel:
phoneLabel = 'pager';
break;
case MAIN:
phoneLabel = 'main';
break;
};
return phoneLabel;
};
exports.getWebsiteLabel = (nativeLabel) => {
var websiteLabel = exports.getGenericLabel(nativeLabel);
switch (nativeLabel) {
case CNLabelURLAddressHomePage:
websiteLabel = "homepage";
break;
};
return websiteLabel;
};