react-native-mytatva-rn-sdk 1.0.0 → 1.2.0
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/app/build.gradle +5 -0
- package/android/build.gradle +5 -5
- package/android/gradle.properties +13 -5
- package/android/settings.gradle +9 -0
- package/android/src/main/AndroidManifest.xml +22 -1
- package/android/src/main/AndroidManifestNew.xml +59 -1
- package/android/src/main/java/com/{visitrnsdk/VisitRnSdkPackage.kt → mytatvarnsdk/MyTatvaRnSdkPackage.kt} +2 -2
- package/android/src/main/java/com/{visitrnsdk/VisitRnSdkViewManager.kt → mytatvarnsdk/MyTatvaRnSdkViewManager.kt} +1 -1
- package/lib/commonjs/BcaDeviceListSheet.js +286 -0
- package/lib/commonjs/BcaDeviceListSheet.js.map +1 -0
- package/lib/commonjs/MainWebView.js +68 -0
- package/lib/commonjs/MainWebView.js.map +1 -0
- package/lib/commonjs/ProgressWebView.js +547 -0
- package/lib/commonjs/ProgressWebView.js.map +1 -0
- package/lib/commonjs/Services.js +27 -1
- package/lib/commonjs/Services.js.map +1 -1
- package/lib/commonjs/Sheets.js +7 -0
- package/lib/commonjs/Sheets.js.map +1 -0
- package/lib/commonjs/api/auth.js +167 -0
- package/lib/commonjs/api/auth.js.map +1 -0
- package/lib/commonjs/api/base.js +224 -0
- package/lib/commonjs/api/base.js.map +1 -0
- package/lib/commonjs/api/index.js +12 -0
- package/lib/commonjs/api/index.js.map +1 -0
- package/lib/commonjs/assets/icons/achieve.svg +3 -0
- package/lib/commonjs/assets/icons/heart.svg +3 -0
- package/lib/commonjs/assets/icons/smartWatch.svg +3 -0
- package/lib/commonjs/constants/asyncstorage.js +29 -0
- package/lib/commonjs/constants/asyncstorage.js.map +1 -0
- package/lib/commonjs/constants/constants.js +1373 -0
- package/lib/commonjs/constants/constants.js.map +1 -0
- package/lib/commonjs/constants.js +12 -2
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/helpers/Matrics.js +49 -0
- package/lib/commonjs/helpers/Matrics.js.map +1 -0
- package/lib/commonjs/helpers/bluetoothPermissionHelper.js +114 -0
- package/lib/commonjs/helpers/bluetoothPermissionHelper.js.map +1 -0
- package/lib/commonjs/helpers/colors.js +304 -0
- package/lib/commonjs/helpers/colors.js.map +1 -0
- package/lib/commonjs/helpers/common.js +46 -0
- package/lib/commonjs/helpers/common.js.map +1 -0
- package/lib/commonjs/helpers/fonts.js +33 -0
- package/lib/commonjs/helpers/fonts.js.map +1 -0
- package/lib/commonjs/helpers/globalStyles.js +188 -0
- package/lib/commonjs/helpers/globalStyles.js.map +1 -0
- package/lib/commonjs/helpers/icons.js +16 -0
- package/lib/commonjs/helpers/icons.js.map +1 -0
- package/lib/commonjs/index.android.js +163 -414
- package/lib/commonjs/index.android.js.map +1 -1
- package/lib/commonjs/index.ios.js +138 -187
- package/lib/commonjs/index.ios.js.map +1 -1
- package/lib/commonjs/redux/Store.js +42 -0
- package/lib/commonjs/redux/Store.js.map +1 -0
- package/lib/commonjs/redux/hooks.js +8 -0
- package/lib/commonjs/redux/hooks.js.map +1 -0
- package/lib/commonjs/redux/sagas/AuthSaga.js +44 -0
- package/lib/commonjs/redux/sagas/AuthSaga.js.map +1 -0
- package/lib/commonjs/redux/sagas/index.js +15 -0
- package/lib/commonjs/redux/sagas/index.js.map +1 -0
- package/lib/commonjs/redux/slices/authSlice.js +80 -0
- package/lib/commonjs/redux/slices/authSlice.js.map +1 -0
- package/lib/commonjs/redux/slices/index.js +44 -0
- package/lib/commonjs/redux/slices/index.js.map +1 -0
- package/lib/commonjs/types/auth.js +2 -0
- package/lib/commonjs/types/auth.js.map +1 -0
- package/lib/commonjs/types/common.js +2 -0
- package/lib/commonjs/types/common.js.map +1 -0
- package/lib/commonjs/types/index.js +13 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/module/BcaDeviceListSheet.js +277 -0
- package/lib/module/BcaDeviceListSheet.js.map +1 -0
- package/lib/module/MainWebView.js +61 -0
- package/lib/module/MainWebView.js.map +1 -0
- package/lib/module/ProgressWebView.js +536 -0
- package/lib/module/ProgressWebView.js.map +1 -0
- package/lib/module/Services.js +24 -0
- package/lib/module/Services.js.map +1 -1
- package/lib/module/Sheets.js +4 -0
- package/lib/module/Sheets.js.map +1 -0
- package/lib/module/api/auth.js +160 -0
- package/lib/module/api/auth.js.map +1 -0
- package/lib/module/api/base.js +212 -0
- package/lib/module/api/base.js.map +1 -0
- package/lib/module/api/index.js +5 -0
- package/lib/module/api/index.js.map +1 -0
- package/lib/module/assets/icons/achieve.svg +3 -0
- package/lib/module/assets/icons/heart.svg +3 -0
- package/lib/module/assets/icons/smartWatch.svg +3 -0
- package/lib/module/constants/asyncstorage.js +23 -0
- package/lib/module/constants/asyncstorage.js.map +1 -0
- package/lib/module/constants/constants.js +1367 -0
- package/lib/module/constants/constants.js.map +1 -0
- package/lib/module/constants.js +12 -2
- package/lib/module/constants.js.map +1 -1
- package/lib/module/helpers/Matrics.js +44 -0
- package/lib/module/helpers/Matrics.js.map +1 -0
- package/lib/module/helpers/bluetoothPermissionHelper.js +103 -0
- package/lib/module/helpers/bluetoothPermissionHelper.js.map +1 -0
- package/lib/module/helpers/colors.js +298 -0
- package/lib/module/helpers/colors.js.map +1 -0
- package/lib/module/helpers/common.js +34 -0
- package/lib/module/helpers/common.js.map +1 -0
- package/lib/module/helpers/fonts.js +27 -0
- package/lib/module/helpers/fonts.js.map +1 -0
- package/lib/module/helpers/globalStyles.js +181 -0
- package/lib/module/helpers/globalStyles.js.map +1 -0
- package/lib/module/helpers/icons.js +9 -0
- package/lib/module/helpers/icons.js.map +1 -0
- package/lib/module/index.android.js +165 -413
- package/lib/module/index.android.js.map +1 -1
- package/lib/module/index.ios.js +138 -187
- package/lib/module/index.ios.js.map +1 -1
- package/lib/module/redux/Store.js +34 -0
- package/lib/module/redux/Store.js.map +1 -0
- package/lib/module/redux/hooks.js +7 -0
- package/lib/module/redux/hooks.js.map +1 -0
- package/lib/module/redux/sagas/AuthSaga.js +34 -0
- package/lib/module/redux/sagas/AuthSaga.js.map +1 -0
- package/lib/module/redux/sagas/index.js +8 -0
- package/lib/module/redux/sagas/index.js.map +1 -0
- package/lib/module/redux/slices/authSlice.js +68 -0
- package/lib/module/redux/slices/authSlice.js.map +1 -0
- package/lib/module/redux/slices/index.js +24 -0
- package/lib/module/redux/slices/index.js.map +1 -0
- package/lib/module/types/auth.js +2 -0
- package/lib/module/types/auth.js.map +1 -0
- package/lib/module/types/common.js +2 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/typescript/BcaDeviceListSheet.d.ts +7 -0
- package/lib/typescript/BcaDeviceListSheet.d.ts.map +1 -0
- package/lib/typescript/MainWebView.d.ts +4 -0
- package/lib/typescript/MainWebView.d.ts.map +1 -0
- package/lib/typescript/ProgressWebView.d.ts +4 -0
- package/lib/typescript/ProgressWebView.d.ts.map +1 -0
- package/lib/typescript/Services.d.ts +5 -0
- package/lib/typescript/Services.d.ts.map +1 -0
- package/lib/typescript/Sheets.d.ts +2 -0
- package/lib/typescript/Sheets.d.ts.map +1 -0
- package/lib/typescript/api/auth.d.ts +33 -0
- package/lib/typescript/api/auth.d.ts.map +1 -0
- package/lib/typescript/api/base.d.ts +20 -0
- package/lib/typescript/api/base.d.ts.map +1 -0
- package/lib/typescript/api/index.d.ts +35 -0
- package/lib/typescript/api/index.d.ts.map +1 -0
- package/lib/typescript/constants/asyncstorage.d.ts +23 -0
- package/lib/typescript/constants/asyncstorage.d.ts.map +1 -0
- package/lib/typescript/constants/constants.d.ts +1081 -0
- package/lib/typescript/constants/constants.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +16 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/helpers/Matrics.d.ts +14 -0
- package/lib/typescript/helpers/Matrics.d.ts.map +1 -0
- package/lib/typescript/helpers/bluetoothPermissionHelper.d.ts +18 -0
- package/lib/typescript/helpers/bluetoothPermissionHelper.d.ts.map +1 -0
- package/lib/typescript/helpers/colors.d.ts +297 -0
- package/lib/typescript/helpers/colors.d.ts.map +1 -0
- package/lib/typescript/helpers/common.d.ts +8 -0
- package/lib/typescript/helpers/common.d.ts.map +1 -0
- package/lib/typescript/helpers/fonts.d.ts +23 -0
- package/lib/typescript/helpers/fonts.d.ts.map +1 -0
- package/lib/typescript/helpers/globalStyles.d.ts +176 -0
- package/lib/typescript/helpers/globalStyles.d.ts.map +1 -0
- package/lib/typescript/helpers/icons.d.ts +6 -0
- package/lib/typescript/helpers/icons.d.ts.map +1 -0
- package/lib/typescript/index.android.d.ts +30 -0
- package/lib/typescript/index.android.d.ts.map +1 -0
- package/lib/typescript/index.ios.d.ts +28 -0
- package/lib/typescript/index.ios.d.ts.map +1 -0
- package/lib/typescript/redux/Store.d.ts +13 -0
- package/lib/typescript/redux/Store.d.ts.map +1 -0
- package/lib/typescript/redux/hooks.d.ts +1 -0
- package/lib/typescript/redux/hooks.d.ts.map +1 -0
- package/lib/typescript/redux/sagas/AuthSaga.d.ts +3 -0
- package/lib/typescript/redux/sagas/AuthSaga.d.ts.map +1 -0
- package/lib/typescript/redux/sagas/index.d.ts +3 -0
- package/lib/typescript/redux/sagas/index.d.ts.map +1 -0
- package/lib/typescript/redux/slices/authSlice.d.ts +5 -0
- package/lib/typescript/redux/slices/authSlice.d.ts.map +1 -0
- package/lib/typescript/redux/slices/index.d.ts +6 -0
- package/lib/typescript/redux/slices/index.d.ts.map +1 -0
- package/lib/typescript/types/auth.d.ts +485 -0
- package/lib/typescript/types/auth.d.ts.map +1 -0
- package/lib/typescript/types/common.d.ts +19 -0
- package/lib/typescript/types/common.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +4 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/package.json +38 -8
- package/src/BcaDeviceListSheet.tsx +331 -0
- package/src/MainWebView.tsx +67 -0
- package/src/ProgressWebView.tsx +602 -0
- package/src/Services.js +40 -0
- package/src/Sheets.js +4 -0
- package/src/api/auth.ts +156 -0
- package/src/api/base.ts +247 -0
- package/src/api/index.ts +5 -0
- package/src/assets/icons/achieve.svg +3 -0
- package/src/assets/icons/heart.svg +3 -0
- package/src/assets/icons/smartWatch.svg +3 -0
- package/src/constants/asyncstorage.ts +23 -0
- package/src/constants/constants.ts +1204 -0
- package/src/constants.ts +14 -0
- package/src/helpers/Matrics.ts +48 -0
- package/src/helpers/bluetoothPermissionHelper.ts +198 -0
- package/src/helpers/colors.ts +320 -0
- package/src/helpers/common.ts +46 -0
- package/src/helpers/fonts.ts +28 -0
- package/src/helpers/globalStyles.ts +179 -0
- package/src/helpers/icons.ts +11 -0
- package/src/index.android.js +164 -577
- package/src/index.ios.js +147 -215
- package/src/redux/Store.ts +36 -0
- package/src/redux/hooks.ts +6 -0
- package/src/redux/sagas/AuthSaga.ts +49 -0
- package/src/redux/sagas/index.ts +9 -0
- package/src/redux/slices/authSlice.ts +81 -0
- package/src/redux/slices/index.ts +29 -0
- package/src/types/auth.ts +533 -0
- package/src/types/common.ts +19 -0
- package/src/types/index.ts +8 -0
- package/lib/typescript/index.test.d.ts +0 -1
- package/lib/typescript/index.test.d.ts.map +0 -1
- package/src/constants.js +0 -4
- /package/ios/{VisitRnSdk.xcodeproj → MyTatvaRnSdk.xcodeproj}/project.pbxproj +0 -0
- /package/ios/{VisitRnSdkViewManager.h → MyTatvaRnSdkViewManager.h} +0 -0
- /package/ios/{VisitRnSdkViewManager.m → MyTatvaRnSdkViewManager.m} +0 -0
- /package/{react-native-visit-rn-sdk.podspec → react-native-mytatva-rn-sdk.podspec} +0 -0
package/src/constants.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
STAGE_BASE_URL: 'https://api-dev.mytatva.in/api/v8',
|
|
3
|
+
PROD_BASE_URL: 'https://api.mytatva.in/api/v8',
|
|
4
|
+
PROD_ENC_KEY: "9Ddyaf6rfywpiTvTiax2iq6ykKpaxgJ6",
|
|
5
|
+
STAG_ENC_KEY: "9Ddyaf6rfywpiTvTiax2iq6ykKpaxgJ6",
|
|
6
|
+
PROD_ENC_IV: "9Ddyaf6rfywpiTvT",
|
|
7
|
+
STAGE_ENC_IV: "9Ddyaf6rfywpiTvT",
|
|
8
|
+
PROD_API_KEY: "lChjFRJce3bxmoS3TSQk5w==",
|
|
9
|
+
STAGE_API_KEY: "lChjFRJce3bxmoS3TSQk5w==",
|
|
10
|
+
STAG_GOODFLIP_URL: "https://uat.goodflip.in",
|
|
11
|
+
PROD_GOODFLIP_URL: "https://goodflip.in",
|
|
12
|
+
STAG_APP_GOODFLIP_URL: "https://app-uat.goodflip.in",
|
|
13
|
+
PROD_APP_GOODFLIP_URL: "https://app.goodflip.in"
|
|
14
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Dimensions, Platform, StatusBar } from 'react-native';
|
|
2
|
+
import { s, vs, ms, mvs } from 'react-native-size-matters';
|
|
3
|
+
|
|
4
|
+
// Grab the window object from that native screen size.
|
|
5
|
+
const window = Dimensions.get('window');
|
|
6
|
+
|
|
7
|
+
// The vertical resolution of the screen.
|
|
8
|
+
const screenHeight = window.height;
|
|
9
|
+
|
|
10
|
+
// The horizontal resolution of the screen.
|
|
11
|
+
const screenWidth = window.width;
|
|
12
|
+
|
|
13
|
+
// The average resolution of common devices, based on a ~5" mobile screen.
|
|
14
|
+
const baselineHeight = screenHeight == 812 ? 800 : 680;
|
|
15
|
+
|
|
16
|
+
// Check for ios X device
|
|
17
|
+
const X_WIDTH = 812;
|
|
18
|
+
const X_HEIGHT = 812;
|
|
19
|
+
|
|
20
|
+
const XSMAX_WIDTH = 896;
|
|
21
|
+
const XSMAX_HEIGHT = 896;
|
|
22
|
+
const isIPhoneX = () =>
|
|
23
|
+
Platform.OS === 'ios' && !Platform.isPad && !Platform.isTVOS
|
|
24
|
+
? screenWidth >= X_WIDTH ||
|
|
25
|
+
screenHeight >= X_HEIGHT ||
|
|
26
|
+
screenWidth >= XSMAX_WIDTH ||
|
|
27
|
+
screenHeight >= XSMAX_HEIGHT
|
|
28
|
+
: false;
|
|
29
|
+
|
|
30
|
+
// Scales the item based on the screen height and baselineHeight
|
|
31
|
+
const scale = (value) => Math.round((screenHeight / baselineHeight) * value);
|
|
32
|
+
const statusBarHeight = Platform.select({
|
|
33
|
+
ios: isIPhoneX() ? 44 : 20,
|
|
34
|
+
android: StatusBar.currentHeight,
|
|
35
|
+
default: 0,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
screenHeight: screenWidth < screenHeight ? screenHeight : screenWidth,
|
|
40
|
+
screenWidth: screenWidth < screenHeight ? screenWidth : screenHeight,
|
|
41
|
+
statusBarHeight,
|
|
42
|
+
isIPhoneX,
|
|
43
|
+
s, //Width
|
|
44
|
+
vs, //Height
|
|
45
|
+
ms,
|
|
46
|
+
mvs, //Font size
|
|
47
|
+
scale,
|
|
48
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import {Alert, Linking, Platform} from 'react-native';
|
|
2
|
+
import {
|
|
3
|
+
checkMultiple,
|
|
4
|
+
PERMISSIONS,
|
|
5
|
+
requestMultiple,
|
|
6
|
+
RESULTS,
|
|
7
|
+
type Permission,
|
|
8
|
+
type PermissionStatus,
|
|
9
|
+
} from 'react-native-permissions';
|
|
10
|
+
import BleManager from 'react-native-ble-manager';
|
|
11
|
+
import {isLocationEnabled} from 'react-native-device-info';
|
|
12
|
+
|
|
13
|
+
type PermissionResult = {
|
|
14
|
+
success: boolean;
|
|
15
|
+
status: PermissionStatus | string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const managePermission = async (
|
|
19
|
+
permission: PermissionResult,
|
|
20
|
+
enableRequestPermission: boolean = false,
|
|
21
|
+
callBack: () => void,
|
|
22
|
+
) => {
|
|
23
|
+
if (permission.success && permission.status === RESULTS.GRANTED) {
|
|
24
|
+
if (Platform.OS === 'android') {
|
|
25
|
+
const isLocationEnabledFlag = await isLocationEnabled();
|
|
26
|
+
if (!isLocationEnabledFlag) {
|
|
27
|
+
promptEnableLocation();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
enableBluetooth().then(() => {
|
|
31
|
+
callBack();
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
await BleManager.start({showAlert: true}).then(() => {
|
|
35
|
+
callBack();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
} else if (
|
|
39
|
+
enableRequestPermission &&
|
|
40
|
+
!permission.success &&
|
|
41
|
+
permission.status === RESULTS.DENIED
|
|
42
|
+
) {
|
|
43
|
+
const requestPermission = await requestBluetoothPermission();
|
|
44
|
+
await managePermission(requestPermission, false, callBack);
|
|
45
|
+
} else if (permission.status === RESULTS.BLOCKED) {
|
|
46
|
+
bluetoothPermissionMessageAlert();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const enableBluetooth = async () => {
|
|
50
|
+
try {
|
|
51
|
+
const res = await BleManager.enableBluetooth();
|
|
52
|
+
return {
|
|
53
|
+
success: true,
|
|
54
|
+
data: res,
|
|
55
|
+
};
|
|
56
|
+
} catch {
|
|
57
|
+
return {
|
|
58
|
+
success: false,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const bluetoothPermissionMessageAlert = () => {
|
|
64
|
+
Alert.alert('Message', 'Please allow Bluetooth permission.', [
|
|
65
|
+
{
|
|
66
|
+
text: 'Open Settings',
|
|
67
|
+
onPress: () => Linking.openSettings(),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: 'Cancel',
|
|
71
|
+
},
|
|
72
|
+
]);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const evaluatePermissions = (
|
|
76
|
+
permissionResults: Record<Permission, PermissionStatus>,
|
|
77
|
+
requiredPermissions: Permission[],
|
|
78
|
+
): PermissionResult => {
|
|
79
|
+
for (const permission of requiredPermissions) {
|
|
80
|
+
if (permissionResults[permission] !== RESULTS.GRANTED) {
|
|
81
|
+
return {
|
|
82
|
+
success: false,
|
|
83
|
+
status: permissionResults[permission],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
success: true,
|
|
90
|
+
status: RESULTS.GRANTED,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const checkMultiplePermissions = async (
|
|
95
|
+
permissions: Permission[],
|
|
96
|
+
): Promise<Record<Permission, PermissionStatus>> => {
|
|
97
|
+
return checkMultiple(permissions);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const requestMultiplePermissions = async (
|
|
101
|
+
permissions: Permission[],
|
|
102
|
+
): Promise<Record<Permission, PermissionStatus>> => {
|
|
103
|
+
return requestMultiple(permissions);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const checkBluetoothPermission = async (): Promise<PermissionResult> => {
|
|
107
|
+
return Platform.OS === 'android'
|
|
108
|
+
? await checkBluetoothPermissionForAndroid()
|
|
109
|
+
: await checkBluetoothPermissionForIos();
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const requestBluetoothPermission = async (): Promise<PermissionResult> => {
|
|
113
|
+
return Platform.OS === 'android'
|
|
114
|
+
? await requestBluetoothPermissionForAndroid()
|
|
115
|
+
: await requestBluetoothPermissionForIos();
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const checkBluetoothPermissionForIos = async (): Promise<PermissionResult> => {
|
|
119
|
+
const permissions = [PERMISSIONS.IOS.BLUETOOTH];
|
|
120
|
+
return evaluatePermissions(
|
|
121
|
+
await checkMultiplePermissions(permissions),
|
|
122
|
+
permissions,
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const checkBluetoothPermissionForAndroid =
|
|
127
|
+
async (): Promise<PermissionResult> => {
|
|
128
|
+
const androidVersion = Number(Platform.Version);
|
|
129
|
+
const permissions =
|
|
130
|
+
androidVersion >= 31
|
|
131
|
+
? [
|
|
132
|
+
PERMISSIONS.ANDROID.BLUETOOTH_SCAN,
|
|
133
|
+
PERMISSIONS.ANDROID.BLUETOOTH_CONNECT,
|
|
134
|
+
PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION,
|
|
135
|
+
]
|
|
136
|
+
: [
|
|
137
|
+
PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION,
|
|
138
|
+
PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION,
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
return evaluatePermissions(
|
|
142
|
+
await checkMultiplePermissions(permissions),
|
|
143
|
+
permissions,
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const requestBluetoothPermissionForIos =
|
|
148
|
+
async (): Promise<PermissionResult> => {
|
|
149
|
+
const permissions = [PERMISSIONS.IOS.BLUETOOTH];
|
|
150
|
+
return evaluatePermissions(
|
|
151
|
+
await requestMultiplePermissions(permissions),
|
|
152
|
+
permissions,
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const requestBluetoothPermissionForAndroid =
|
|
157
|
+
async (): Promise<PermissionResult> => {
|
|
158
|
+
const androidVersion = Number(Platform.Version);
|
|
159
|
+
const permissions =
|
|
160
|
+
androidVersion >= 31
|
|
161
|
+
? [
|
|
162
|
+
PERMISSIONS.ANDROID.BLUETOOTH_SCAN,
|
|
163
|
+
PERMISSIONS.ANDROID.BLUETOOTH_CONNECT,
|
|
164
|
+
PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION,
|
|
165
|
+
]
|
|
166
|
+
: [
|
|
167
|
+
PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION,
|
|
168
|
+
PERMISSIONS.ANDROID.ACCESS_COARSE_LOCATION,
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
return evaluatePermissions(
|
|
172
|
+
await requestMultiplePermissions(permissions),
|
|
173
|
+
permissions,
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const promptEnableLocation = () => {
|
|
178
|
+
Alert.alert(
|
|
179
|
+
'Location Services Disabled',
|
|
180
|
+
'Please enable location services to continue.',
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
text: 'Open Settings',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
text: 'Cancel',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
checkBluetoothPermission,
|
|
194
|
+
requestBluetoothPermission,
|
|
195
|
+
managePermission,
|
|
196
|
+
enableBluetooth,
|
|
197
|
+
promptEnableLocation,
|
|
198
|
+
};
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
export const colors = {
|
|
2
|
+
themePurple: '#760FB2',
|
|
3
|
+
inactiveGray: '#919191',
|
|
4
|
+
white: 'white',
|
|
5
|
+
black: 'black',
|
|
6
|
+
labelTitleDarkGray: '#41434C',
|
|
7
|
+
darkGray: '#919191',
|
|
8
|
+
subTitleLightGray: '#616161',
|
|
9
|
+
inputValueDarkGray: '#212121',
|
|
10
|
+
lightPurple: '#f9f9ff',
|
|
11
|
+
dimGray: '#222222',
|
|
12
|
+
lightGreyishBlue: '#F9F9FF',
|
|
13
|
+
veryLightGreyishBlue: '#EFEFF4',
|
|
14
|
+
inputBoxLightBorder: '#E0E0E0',
|
|
15
|
+
inputBoxDarkBorder: '#230435',
|
|
16
|
+
labelDarkGray: '#313131',
|
|
17
|
+
lightGrey: '#E0E0E0',
|
|
18
|
+
green: '#1BB333',
|
|
19
|
+
purple: '#605AE0',
|
|
20
|
+
hcChipGreen: '#EAFFE8',
|
|
21
|
+
secondaryLabel: '#999999',
|
|
22
|
+
disableButton: '#9E9E9E',
|
|
23
|
+
secondaryDisableButton: 'rgba(158, 158, 158, 0.08)',
|
|
24
|
+
darkBlue: '#1B053C',
|
|
25
|
+
lightGray: '#F8F8F8',
|
|
26
|
+
stock: '#D2D4D7',
|
|
27
|
+
titleLightGray: '#9E99B1',
|
|
28
|
+
tabTitleColor: '#9F8EAA',
|
|
29
|
+
boxLightPurple: '#f4ecf9',
|
|
30
|
+
darkBorder: '#6b4581',
|
|
31
|
+
lightBorder: '#e5e5e5',
|
|
32
|
+
darkLightGray: '#666666',
|
|
33
|
+
lightGreen: '#b5edb5',
|
|
34
|
+
lightDarkGreen: '#c9f1c9',
|
|
35
|
+
lightOrange: '#fde5d1',
|
|
36
|
+
lightPink: '#fbdbe2',
|
|
37
|
+
veryLightPurple: '#d4b1ef',
|
|
38
|
+
darkLightPurple: '#F7D7FB',
|
|
39
|
+
progressBarGray: '#e9e9ee',
|
|
40
|
+
lightSilver: '#E9E9E9',
|
|
41
|
+
borderColor: '#F0F0F0',
|
|
42
|
+
inactiveDotColor: '#C57FFA',
|
|
43
|
+
activeDotColor: '#760FB2',
|
|
44
|
+
genderActiveButton: '#f0f0f5',
|
|
45
|
+
genderActiveButtonBorder: '#b6b6b8',
|
|
46
|
+
genderInactiveButtonBorder: '#e8e8e8',
|
|
47
|
+
genderSelectedBorderColor: '#3B0859',
|
|
48
|
+
highRiskBg: 'rgb(255,232,232)',
|
|
49
|
+
mediumRisk: 'rgb(255,247,228)',
|
|
50
|
+
lowRisk: 'rgb(223,248,233)',
|
|
51
|
+
red: '#FF3333',
|
|
52
|
+
yellow: '#FAB000',
|
|
53
|
+
lightDarkbule: '#8d829d',
|
|
54
|
+
buttonBoxPlaceholder: '#c8c4d0',
|
|
55
|
+
backgroundColor: '#F9F8FD',
|
|
56
|
+
THEME_OVERLAY: 'rgba(118, 15, 178, 0.08)',
|
|
57
|
+
SECONDARY_BUTTON_OPACITY: 'rgba(158, 158, 158, 0.08)',
|
|
58
|
+
Purple: '#C57FFA',
|
|
59
|
+
Green: '#77DD77',
|
|
60
|
+
lightYellow: '#FFBD00',
|
|
61
|
+
lightRed: '#FF7F8C',
|
|
62
|
+
optionbackground: '#f4ecf9',
|
|
63
|
+
|
|
64
|
+
progressBarGreen: '#2ecc71',
|
|
65
|
+
progressBarRed: '#FF3333',
|
|
66
|
+
progressBarYellow: '#FAB000',
|
|
67
|
+
switchBackgroundColor: '#e9e9eb',
|
|
68
|
+
switchActiveBackgroundColor: '#34C759',
|
|
69
|
+
seprationLineColor: '#707070',
|
|
70
|
+
RadoiButtonColor: '#F3F3F3',
|
|
71
|
+
lightpurple: '#6E78FF',
|
|
72
|
+
lightestGreen: '#7D7',
|
|
73
|
+
lightblue: '#eee6f9',
|
|
74
|
+
|
|
75
|
+
transparent: 'transparent',
|
|
76
|
+
lightGrayBackgroundColor: '#DBDBDB',
|
|
77
|
+
OVERLAY_DARK_10: 'rgba(0,0,0,0.1)',
|
|
78
|
+
OVERLAY_DARK_20: 'rgba(0,0,0,0.2)',
|
|
79
|
+
OVERLAY_DARK_30: 'rgba(0,0,0,0.3)',
|
|
80
|
+
OVERLAY_DARK_40: 'rgba(0,0,0,0.4)',
|
|
81
|
+
OVERLAY_DARK_50: 'rgba(0,0,0,0.5)',
|
|
82
|
+
OVERLAY_DARK_60: 'rgba(0,0,0,0.6)',
|
|
83
|
+
OVERLAY_DARK_70: 'rgba(0,0,0,0.7)',
|
|
84
|
+
shadow: 'rgba(33, 33, 33, 0.5)',
|
|
85
|
+
seprator: '#e0e0e0',
|
|
86
|
+
|
|
87
|
+
orangeBg: '#FAB0001A',
|
|
88
|
+
orangeLineBg: '#F0CE7C',
|
|
89
|
+
greenBg: '#1BB3331A',
|
|
90
|
+
greenLineBg: '#9EDBA7',
|
|
91
|
+
inputUnfillBorder: '#E0E0E0',
|
|
92
|
+
inputFillBorder: '#230435',
|
|
93
|
+
darkPurple: '#281746',
|
|
94
|
+
bottomSheetIndicatorColor: '#e0e0e0',
|
|
95
|
+
disableCoachBtn: '#f3f3f3',
|
|
96
|
+
careplix: {
|
|
97
|
+
button_background_primary: '#F15223',
|
|
98
|
+
palePurple: '#ECE2F7',
|
|
99
|
+
disableButton: '#DCE4E8',
|
|
100
|
+
lightWhite: '#FDEEE9',
|
|
101
|
+
separatorGrey: '#F2F2F2',
|
|
102
|
+
darkGreyishBlack: '#1A1C1E',
|
|
103
|
+
text_primary: '#1F2933',
|
|
104
|
+
text_tertiery: '#5A6774',
|
|
105
|
+
purple_brown: '#20162B',
|
|
106
|
+
pale_green: '#B7DFB9',
|
|
107
|
+
redish_pink: '#F5B6B6',
|
|
108
|
+
light_yellow: '#FCF2BF',
|
|
109
|
+
silverGray: '#F2F2F2',
|
|
110
|
+
goldenYellow: '#F5D736',
|
|
111
|
+
RED_10: '#E64949',
|
|
112
|
+
GREEN_10: '#3D8C40',
|
|
113
|
+
RED_20: '#B73A3A',
|
|
114
|
+
GREEN_20: '#1E4620',
|
|
115
|
+
purple_background: '#EDDAFF',
|
|
116
|
+
},
|
|
117
|
+
consultExpert: {
|
|
118
|
+
darkBlue: '#213053',
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
// Onco Colors
|
|
122
|
+
onco: {
|
|
123
|
+
primaryOrange: '#F15223',
|
|
124
|
+
transparentOrange: 'rgba(241, 82, 35,0.10)',
|
|
125
|
+
borderColor: '#DCE4E8',
|
|
126
|
+
activeBlack: '#1A1C1E',
|
|
127
|
+
lightGray: '#6C7278',
|
|
128
|
+
gradientBlue: '#7284AB',
|
|
129
|
+
gradientPurple: '#A776CF',
|
|
130
|
+
red: '#E54848',
|
|
131
|
+
lightBlue: '#E6F7FF',
|
|
132
|
+
secondaryText: '#3D4854',
|
|
133
|
+
lightBlack: '#1D1B20',
|
|
134
|
+
lightPurple: '#E7D7FF',
|
|
135
|
+
backgroundPurple: '#E7D7FF',
|
|
136
|
+
purplebackground: '#EDDAFF',
|
|
137
|
+
|
|
138
|
+
INACTIVE_STEP: '#D4D4D4',
|
|
139
|
+
LOVENDER_PURPLE: '#A782CC',
|
|
140
|
+
BORDER_GRAY: '#BAC6D2',
|
|
141
|
+
BORDER_DISABLED: '#9BB1C8',
|
|
142
|
+
BORDER_PRIMARY: '#F15223',
|
|
143
|
+
BORDER_SECONDARY: '#FBEFAF',
|
|
144
|
+
SURFACE_BACKGROUND_PRIMARY: '#FFFFFF',
|
|
145
|
+
SURFACE_BACKGROUND_SECONDARY: '#F2F2F2',
|
|
146
|
+
SURFACE_BACKGROUND_TERTIARY: '#E4E7EB',
|
|
147
|
+
BUTTON_LABEL_PRIMARY: '#FFFFFF',
|
|
148
|
+
TEXT_PRIMARY: '#1F2933',
|
|
149
|
+
TEXT_SECONDARY: '#3D4854',
|
|
150
|
+
TEXT_TERTIARY: '#5A6774',
|
|
151
|
+
TEXT_DISABLED: '#9BB1C8',
|
|
152
|
+
TEXT_SUCCESS: '#008000',
|
|
153
|
+
BUTTON_BACKGROUND_PRIMARY: '#2A805A',
|
|
154
|
+
BUTTON_BACKGROUND_DISABLED: '#F2F2F2',
|
|
155
|
+
BUTTON_LABEL_DISABLED: '#9BB1C8',
|
|
156
|
+
SLAT_BLUE: '#6E8597',
|
|
157
|
+
|
|
158
|
+
ORANGE_10: '#FEEEE9',
|
|
159
|
+
ORANGE_20: '#FCDCD3',
|
|
160
|
+
ORANGE_30: '#F9BAA7',
|
|
161
|
+
ORANGE_40: '#F7977B',
|
|
162
|
+
ORANGE_50: '#F4754F',
|
|
163
|
+
ORANGE_60: '#F15233',
|
|
164
|
+
ORANGE_70: '#C1421C',
|
|
165
|
+
ORANGE_80: '#913115',
|
|
166
|
+
ORANGE_90: '#60210E',
|
|
167
|
+
ORANGE_100: '#301007',
|
|
168
|
+
|
|
169
|
+
LAVENDER_10: '#FBF6FF',
|
|
170
|
+
LAVENDER_20: '#F6EDFF',
|
|
171
|
+
LAVENDER_30: '#EDDAFE',
|
|
172
|
+
LAVENDER_40: '#E3C8FF',
|
|
173
|
+
LAVENDER_50: '#DAB5FF',
|
|
174
|
+
LAVENDER_60: '#D1A3FF',
|
|
175
|
+
LAVENDER_70: '#A682CC',
|
|
176
|
+
LAVENDER_80: '#7D6299',
|
|
177
|
+
LAVENDER_90: '#544166',
|
|
178
|
+
LAVENDER_100: '#2A2133',
|
|
179
|
+
LAVENDER_400: '#756FA9',
|
|
180
|
+
LAVENDER_45: '#ECE2F7',
|
|
181
|
+
LAVENDER_05: '#FAF6FF',
|
|
182
|
+
|
|
183
|
+
YELLOW_10: '#FEFBEB',
|
|
184
|
+
YELLOW_20: '#FDF7D7',
|
|
185
|
+
YELLOW_30: '#FBEFAE',
|
|
186
|
+
YELLOW_40: '#F9E786',
|
|
187
|
+
YELLOW_50: '#F7DF5E',
|
|
188
|
+
YELLOW_60: '#F5D737',
|
|
189
|
+
YELLOW_70: '#C4AC2B',
|
|
190
|
+
YELLOW_80: '#938120',
|
|
191
|
+
YELLOW_90: '#625616',
|
|
192
|
+
YELLOW_100: '#312B0B',
|
|
193
|
+
|
|
194
|
+
GREEN_10: '#EDF7ED',
|
|
195
|
+
GREEN_20: '#DBEFDC',
|
|
196
|
+
GREEN_30: '#B7DFB9',
|
|
197
|
+
GREEN_40: '#94CF96',
|
|
198
|
+
GREEN_50: '#70BF73',
|
|
199
|
+
GREEN_60: '#4CAF51',
|
|
200
|
+
GREEN_70: '#3E8C40',
|
|
201
|
+
GREEN_75: '#3D8C40',
|
|
202
|
+
GREEN_80: '#2E6930',
|
|
203
|
+
GREEN_90: '#1D4620',
|
|
204
|
+
GREEN_100: '#0F2310',
|
|
205
|
+
|
|
206
|
+
RED_10: '#FCEDEC',
|
|
207
|
+
RED_20: '#FADADA',
|
|
208
|
+
RED_30: '#F5B6B7',
|
|
209
|
+
RED_40: '#EF9192',
|
|
210
|
+
RED_50: '#EA6D6D',
|
|
211
|
+
RED_60: '#E54848',
|
|
212
|
+
RED_70: '#B73B3A',
|
|
213
|
+
RED_75: '#B73A3A',
|
|
214
|
+
RED_80: '#892B2B',
|
|
215
|
+
RED_90: '#5C1D1D',
|
|
216
|
+
RED_100: '#2E0E0E',
|
|
217
|
+
|
|
218
|
+
LIGHT_GRAY: '#F0F0F0',
|
|
219
|
+
lavender: '#E5C4FF',
|
|
220
|
+
deepPurple: '#5C0F8B',
|
|
221
|
+
purple: '#E1CFFF',
|
|
222
|
+
skyBlue: '#A9DDF9',
|
|
223
|
+
primaryPurple: '#6A639C',
|
|
224
|
+
|
|
225
|
+
PURPLE_10: '#F6EDFF',
|
|
226
|
+
PURPLE_20: '#DFD6FD',
|
|
227
|
+
PURPLE_30: '#B3A8D6',
|
|
228
|
+
PURPLE_40: '#9A94C7',
|
|
229
|
+
PURPLE: '#1F0039',
|
|
230
|
+
|
|
231
|
+
PINK_10: '#FCEDED',
|
|
232
|
+
|
|
233
|
+
leafGreen: '#8AE58E',
|
|
234
|
+
leafYellow: '#FFEB80',
|
|
235
|
+
leafRed: '#E58A8A',
|
|
236
|
+
leafRedTxt: '#461E1E',
|
|
237
|
+
|
|
238
|
+
logoutRed: '#D20000',
|
|
239
|
+
|
|
240
|
+
actionBg: '#F5F0FB',
|
|
241
|
+
WHITE_75: '#ffffffbf',
|
|
242
|
+
goldenYellow: '#F5D736',
|
|
243
|
+
},
|
|
244
|
+
grayLable: '#888',
|
|
245
|
+
|
|
246
|
+
primary: '#313131',
|
|
247
|
+
secondary: '#616161',
|
|
248
|
+
tertiary: '#919191',
|
|
249
|
+
border_default: '#E0E0E0',
|
|
250
|
+
border_enable: '#180324',
|
|
251
|
+
allDisableState: '#9E9E9E',
|
|
252
|
+
iconBG: '#F3F3F3',
|
|
253
|
+
brand: '#760FB2',
|
|
254
|
+
success: '#1BBB33',
|
|
255
|
+
alert: '#FAB000',
|
|
256
|
+
failure: '#FF3333',
|
|
257
|
+
informattion: '#605AE0',
|
|
258
|
+
secondaryBrand: '#BD4BFF',
|
|
259
|
+
darkGray1: '#7B7B7B',
|
|
260
|
+
gray1: '#EEEEEE',
|
|
261
|
+
yellow1: '#FEBF00',
|
|
262
|
+
green1: '#C5FFB0',
|
|
263
|
+
switchInActiveBackgroundColor: '#B2B2B2',
|
|
264
|
+
orange: '#FAB000',
|
|
265
|
+
boxBorder: '#F0F0F0',
|
|
266
|
+
joinCallBtb: '#BC88DA',
|
|
267
|
+
lightBackground: '#F1F1F1',
|
|
268
|
+
|
|
269
|
+
wallet: {
|
|
270
|
+
PINK_1: '#F594C1',
|
|
271
|
+
PINK_2: '#F17FB4',
|
|
272
|
+
GREEN_1: '#D3F8E2',
|
|
273
|
+
GREEN_2: '#B4F6CF',
|
|
274
|
+
BLUE_1: '#A9DDF9',
|
|
275
|
+
BLUE_2: '#94D3F4',
|
|
276
|
+
},
|
|
277
|
+
orengeLightBackground: '#FDEFD9',
|
|
278
|
+
orengePrimary: '#F95327',
|
|
279
|
+
goodFlip: {
|
|
280
|
+
btnPrimary: '#299D6B',
|
|
281
|
+
btnShadowPrimary: '#2A805A',
|
|
282
|
+
btnShadowSecondary: '#CBF0E0',
|
|
283
|
+
primary: '#299D6B',
|
|
284
|
+
primaryDark: '#2A805A',
|
|
285
|
+
disabledBorder: '#D0D5DD',
|
|
286
|
+
|
|
287
|
+
textDisabled: '#667085',
|
|
288
|
+
|
|
289
|
+
backgroundPrimary: '#CBF0E0',
|
|
290
|
+
backgroundDisabledLight: '#F2F4F7',
|
|
291
|
+
backgroundDisabledDark: '#E4E7EC',
|
|
292
|
+
|
|
293
|
+
input: {
|
|
294
|
+
borderPrimary: '#444CE7',
|
|
295
|
+
shadowPrimary: '#EBF2FF',
|
|
296
|
+
cursorPrimary: '#444CE7',
|
|
297
|
+
backgroundPrimary: '#F4F8FF',
|
|
298
|
+
shadowError: '#FFD7D7',
|
|
299
|
+
borderError: '#FF3333',
|
|
300
|
+
},
|
|
301
|
+
|
|
302
|
+
accent_indigo: '#EEF4FF',
|
|
303
|
+
accent_indigo_secondary: '#C7D7FE',
|
|
304
|
+
},
|
|
305
|
+
gun_powder: '#49454F',
|
|
306
|
+
mountain_meadow: '#12B76A',
|
|
307
|
+
solitude: '#E4E7EC',
|
|
308
|
+
royal_blue_goodflip: '#444CE7',
|
|
309
|
+
alice_blue: '#EEF4FF',
|
|
310
|
+
auro_metal_saurus: '#667085',
|
|
311
|
+
anti_flash_white: '#F2F4F7',
|
|
312
|
+
illuminating_emerald: '#299D6B',
|
|
313
|
+
aero_blue: '#CBF0E0',
|
|
314
|
+
honeydew: '#E6FAF1',
|
|
315
|
+
sea_green: '#2A805A',
|
|
316
|
+
dark_jungle_green: '#101828',
|
|
317
|
+
cosmic_cobalt: '#2D3282',
|
|
318
|
+
brunswick_green: '#1D4D38',
|
|
319
|
+
};
|
|
320
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
import 'react-native-get-random-values';
|
|
3
|
+
import {v4 as uuidv4} from 'uuid';
|
|
4
|
+
|
|
5
|
+
// Function to generate UUID
|
|
6
|
+
export const generateUUID = () => {
|
|
7
|
+
return uuidv4();
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const capitalize = (str = '') => {
|
|
11
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const dateConverstion = (
|
|
15
|
+
date: any,
|
|
16
|
+
dateType: string = 'YYYY-MM-DD',
|
|
17
|
+
format: string = 'YYYY-MM-DD',
|
|
18
|
+
addTime: boolean = false,
|
|
19
|
+
) => {
|
|
20
|
+
if (addTime) {
|
|
21
|
+
const currentTime = moment().format('hh:mm:ss');
|
|
22
|
+
const customDate = `${date} ${currentTime}`;
|
|
23
|
+
return moment(customDate, dateType).format(format);
|
|
24
|
+
}
|
|
25
|
+
return moment(date, dateType).format(format);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export const checkStringTypeOf = (data: any) => {
|
|
30
|
+
if(typeof data === 'string'){
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
return JSON.stringify(data);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const getTherapyArea = (userData: any) => {
|
|
37
|
+
return (
|
|
38
|
+
userData?.therapy_area?.toLowerCase() || 'metabolism'
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const getDiseaseType = (userData: any) => {
|
|
43
|
+
return (
|
|
44
|
+
userData?.disease?.toLowerCase() || 'Diabetes'
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {Platform} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
BOLD: Platform.OS == 'ios' ? 'SFProDisplay-Bold' : 'sf_bold',
|
|
5
|
+
MEDIUM: Platform.OS == 'ios' ? 'SFProDisplay-Medium' : 'sf_medium',
|
|
6
|
+
REGULAR: Platform.OS == 'ios' ? 'SFProDisplay-Regular' : 'sf_regular',
|
|
7
|
+
SEMI_BOLD: Platform.OS == 'ios' ? 'SFProDisplay-Semibold' : 'sf_semi_bold',
|
|
8
|
+
ONCO: {
|
|
9
|
+
EXTRA_LIGHT_200:
|
|
10
|
+
Platform.OS == 'ios' ? 'Manrope-ExtraLight' : 'manrope_extralight',
|
|
11
|
+
LIGHT_300: Platform.OS == 'ios' ? 'Manrope-Light' : 'manrope_light',
|
|
12
|
+
REGULAR_400: Platform.OS == 'ios' ? 'Manrope-Regular' : 'manrope_regular',
|
|
13
|
+
MEDIUM_500: Platform.OS == 'ios' ? 'Manrope-Medium' : 'manrope_medium',
|
|
14
|
+
SEMI_BOLD_600:
|
|
15
|
+
Platform.OS == 'ios' ? 'Manrope-SemiBold' : 'manrope_semibold',
|
|
16
|
+
BOLD_700: Platform.OS == 'ios' ? 'Manrope-Bold' : 'manrope_bold',
|
|
17
|
+
EXTRA_BOLD_800:
|
|
18
|
+
Platform.OS == 'ios' ? 'Manrope-ExtraBold' : 'manrope_extrabold',
|
|
19
|
+
},
|
|
20
|
+
DIGITAL: Platform.OS == 'ios' ? 'Digital' : 'digital_number',
|
|
21
|
+
ROBOTO_EXTRA_BOLD:
|
|
22
|
+
Platform.OS == 'ios' ? 'Roboto-ExtraBold' : 'roboto_extrabold', //800
|
|
23
|
+
ROBOTO_BOLD: Platform.OS == 'ios' ? 'Roboto-Bold' : 'roboto_bold', //700
|
|
24
|
+
ROBOTO_SEMI_BOLD:
|
|
25
|
+
Platform.OS == 'ios' ? 'Roboto-SemiBold' : 'roboto_semibold', //600
|
|
26
|
+
ROBOTO_MEDIUM: Platform.OS == 'ios' ? 'Roboto-Medium' : 'roboto_medium', //500
|
|
27
|
+
ROBOTO_REGULAR: Platform.OS == 'ios' ? 'Roboto-Regular' : 'roboto_regular', //400
|
|
28
|
+
};
|