react-native-salespanda 0.7.7 → 0.8.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/dist/NativeSalespanda.js +1 -0
- package/dist/SalespandaApp.js +1 -0
- package/dist/__tests__/index.test.js +1 -0
- package/dist/assets/images/index.js +1 -0
- package/dist/components/BottomSheet.js +1 -0
- package/dist/components/ContactViaModal.js +1 -0
- package/dist/components/Loader.js +1 -0
- package/dist/components/ScreenHeader.js +1 -0
- package/dist/components/SearchBar.js +1 -0
- package/dist/components/TabsHeader.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/config/FlavorConfig.js +1 -0
- package/dist/config/SalespandaConfig.js +1 -0
- package/dist/constants/Colors.js +1 -0
- package/dist/constants/GetPlatorm.js +1 -0
- package/dist/index.js +1 -0
- package/dist/navigation/AppNavigator.js +1 -0
- package/dist/navigation/BottomTabNavigator.js +1 -0
- package/dist/navigation/DrawerNavigator.js +1 -0
- package/dist/navigation/StackNavigator.js +1 -0
- package/dist/screens/CRM/AddContactModal.js +1 -0
- package/dist/screens/CRM/CategoryTabs.js +1 -0
- package/dist/screens/CRM/ContactItem.js +1 -0
- package/dist/screens/CRM/FilterDropdown.js +1 -0
- package/dist/screens/CRM/FunnelChart.js +1 -0
- package/dist/screens/CRM/InfoCard.js +1 -0
- package/dist/screens/CRM/LeadCard.js +1 -0
- package/dist/screens/CRM/LogCallScreen.js +1 -0
- package/dist/screens/CRM/TopTabs.js +1 -0
- package/dist/screens/CRM/index.js +1 -0
- package/dist/screens/ReportsScreen.js +1 -0
- package/dist/screens/Tabs/ActivityAnalytics.js +1 -0
- package/dist/screens/Tabs/CRMScreen.js +1 -0
- package/dist/screens/Tabs/DigitalDiary.js +1 -0
- package/dist/screens/Tabs/HomeScreen.js +1 -0
- package/dist/screens/Tabs/NotificationsScreen.js +1 -0
- package/dist/screens/contentliberary/contentliberary.js +1 -0
- package/dist/services/api.js +1 -0
- package/dist/services/authService.js +1 -0
- package/dist/store/index.js +1 -0
- package/index.js +1 -0
- package/package.json +16 -168
- package/react-native.config.js +14 -7
- package/Salespanda.podspec +0 -25
- package/lib/module/NativeSalespanda.js +0 -5
- package/lib/module/NativeSalespanda.js.map +0 -1
- package/lib/module/SalespandaApp.js +0 -86
- package/lib/module/SalespandaApp.js.map +0 -1
- package/lib/module/assets/images/index.js +0 -14
- package/lib/module/assets/images/index.js.map +0 -1
- package/lib/module/components/BottomSheet.js +0 -141
- package/lib/module/components/BottomSheet.js.map +0 -1
- package/lib/module/components/ContactViaModal.js +0 -68
- package/lib/module/components/ContactViaModal.js.map +0 -1
- package/lib/module/components/Loader.js +0 -45
- package/lib/module/components/Loader.js.map +0 -1
- package/lib/module/components/ScreenHeader.js +0 -63
- package/lib/module/components/ScreenHeader.js.map +0 -1
- package/lib/module/components/SearchBar.js +0 -57
- package/lib/module/components/SearchBar.js.map +0 -1
- package/lib/module/components/TabsHeader.js +0 -80
- package/lib/module/components/TabsHeader.js.map +0 -1
- package/lib/module/components/index.js +0 -8
- package/lib/module/components/index.js.map +0 -1
- package/lib/module/config/FlavorConfig.js +0 -43
- package/lib/module/config/FlavorConfig.js.map +0 -1
- package/lib/module/config/SalespandaConfig.js +0 -85
- package/lib/module/config/SalespandaConfig.js.map +0 -1
- package/lib/module/constants/Colors.js +0 -18
- package/lib/module/constants/Colors.js.map +0 -1
- package/lib/module/constants/GetPlatorm.js +0 -23
- package/lib/module/constants/GetPlatorm.js.map +0 -1
- package/lib/module/index.js +0 -17
- package/lib/module/index.js.map +0 -1
- package/lib/module/navigation/AppNavigator.js +0 -25
- package/lib/module/navigation/AppNavigator.js.map +0 -1
- package/lib/module/navigation/BottomTabNavigator.js +0 -160
- package/lib/module/navigation/BottomTabNavigator.js.map +0 -1
- package/lib/module/navigation/DrawerNavigator.js +0 -309
- package/lib/module/navigation/DrawerNavigator.js.map +0 -1
- package/lib/module/navigation/StackNavigator.js +0 -23
- package/lib/module/navigation/StackNavigator.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/screens/CRM/AddContactModal.js +0 -49
- package/lib/module/screens/CRM/AddContactModal.js.map +0 -1
- package/lib/module/screens/CRM/CategoryTabs.js +0 -70
- package/lib/module/screens/CRM/CategoryTabs.js.map +0 -1
- package/lib/module/screens/CRM/ContactItem.js +0 -168
- package/lib/module/screens/CRM/ContactItem.js.map +0 -1
- package/lib/module/screens/CRM/FilterDropdown.js +0 -39
- package/lib/module/screens/CRM/FilterDropdown.js.map +0 -1
- package/lib/module/screens/CRM/FunnelChart.js +0 -105
- package/lib/module/screens/CRM/FunnelChart.js.map +0 -1
- package/lib/module/screens/CRM/InfoCard.js +0 -56
- package/lib/module/screens/CRM/InfoCard.js.map +0 -1
- package/lib/module/screens/CRM/LeadCard.js +0 -76
- package/lib/module/screens/CRM/LeadCard.js.map +0 -1
- package/lib/module/screens/CRM/LogCallScreen.js +0 -271
- package/lib/module/screens/CRM/LogCallScreen.js.map +0 -1
- package/lib/module/screens/CRM/TopTabs.js +0 -63
- package/lib/module/screens/CRM/TopTabs.js.map +0 -1
- package/lib/module/screens/CRM/index.js +0 -13
- package/lib/module/screens/CRM/index.js.map +0 -1
- package/lib/module/screens/ReportsScreen.js +0 -43
- package/lib/module/screens/ReportsScreen.js.map +0 -1
- package/lib/module/screens/Tabs/ActivityAnalytics.js +0 -29
- package/lib/module/screens/Tabs/ActivityAnalytics.js.map +0 -1
- package/lib/module/screens/Tabs/CRMScreen.js +0 -316
- package/lib/module/screens/Tabs/CRMScreen.js.map +0 -1
- package/lib/module/screens/Tabs/DigitalDiary.js +0 -39
- package/lib/module/screens/Tabs/DigitalDiary.js.map +0 -1
- package/lib/module/screens/Tabs/HomeScreen.js +0 -320
- package/lib/module/screens/Tabs/HomeScreen.js.map +0 -1
- package/lib/module/screens/Tabs/NotificationsScreen.js +0 -29
- package/lib/module/screens/Tabs/NotificationsScreen.js.map +0 -1
- package/lib/module/screens/contentliberary/contentliberary.js +0 -283
- package/lib/module/screens/contentliberary/contentliberary.js.map +0 -1
- package/lib/module/services/api.js +0 -132
- package/lib/module/services/api.js.map +0 -1
- package/lib/module/services/authService.js +0 -59
- package/lib/module/services/authService.js.map +0 -1
- package/lib/module/store/index.js +0 -13
- package/lib/module/store/index.js.map +0 -1
- package/lib/typescript/package.json +0 -1
- package/lib/typescript/src/NativeSalespanda.d.ts +0 -7
- package/lib/typescript/src/NativeSalespanda.d.ts.map +0 -1
- package/lib/typescript/src/SalespandaApp.d.ts +0 -49
- package/lib/typescript/src/SalespandaApp.d.ts.map +0 -1
- package/lib/typescript/src/assets/images/index.d.ts +0 -17
- package/lib/typescript/src/assets/images/index.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet.d.ts +0 -16
- package/lib/typescript/src/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/src/components/ContactViaModal.d.ts +0 -13
- package/lib/typescript/src/components/ContactViaModal.d.ts.map +0 -1
- package/lib/typescript/src/components/Loader.d.ts +0 -11
- package/lib/typescript/src/components/Loader.d.ts.map +0 -1
- package/lib/typescript/src/components/ScreenHeader.d.ts +0 -8
- package/lib/typescript/src/components/ScreenHeader.d.ts.map +0 -1
- package/lib/typescript/src/components/SearchBar.d.ts +0 -8
- package/lib/typescript/src/components/SearchBar.d.ts.map +0 -1
- package/lib/typescript/src/components/TabsHeader.d.ts +0 -8
- package/lib/typescript/src/components/TabsHeader.d.ts.map +0 -1
- package/lib/typescript/src/components/index.d.ts +0 -5
- package/lib/typescript/src/components/index.d.ts.map +0 -1
- package/lib/typescript/src/config/FlavorConfig.d.ts +0 -20
- package/lib/typescript/src/config/FlavorConfig.d.ts.map +0 -1
- package/lib/typescript/src/config/SalespandaConfig.d.ts +0 -66
- package/lib/typescript/src/config/SalespandaConfig.d.ts.map +0 -1
- package/lib/typescript/src/constants/Colors.d.ts +0 -16
- package/lib/typescript/src/constants/Colors.d.ts.map +0 -1
- package/lib/typescript/src/constants/GetPlatorm.d.ts +0 -11
- package/lib/typescript/src/constants/GetPlatorm.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -17
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts +0 -3
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts +0 -10
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts +0 -4
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +0 -1
- package/lib/typescript/src/navigation/StackNavigator.d.ts +0 -13
- package/lib/typescript/src/navigation/StackNavigator.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts +0 -11
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts +0 -7
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts +0 -19
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts +0 -6
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts +0 -17
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts +0 -7
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts +0 -9
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts +0 -12
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts +0 -12
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +0 -1
- package/lib/typescript/src/screens/CRM/index.d.ts +0 -10
- package/lib/typescript/src/screens/CRM/index.d.ts.map +0 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts +0 -3
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts +0 -3
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts +0 -3
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts +0 -3
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts +0 -4
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts +0 -3
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts +0 -2
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +0 -1
- package/lib/typescript/src/services/api.d.ts +0 -638
- package/lib/typescript/src/services/api.d.ts.map +0 -1
- package/lib/typescript/src/services/authService.d.ts +0 -13
- package/lib/typescript/src/services/authService.d.ts.map +0 -1
- package/lib/typescript/src/store/index.d.ts +0 -36
- package/lib/typescript/src/store/index.d.ts.map +0 -1
- package/src/NativeSalespanda.ts +0 -7
- package/src/SalespandaApp.tsx +0 -141
- package/src/assets/images/bottomtabs/analytics.png +0 -0
- package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
- package/src/assets/images/bottomtabs/crm.png +0 -0
- package/src/assets/images/bottomtabs/crmactive.png +0 -0
- package/src/assets/images/bottomtabs/diary.png +0 -0
- package/src/assets/images/bottomtabs/diaryactive.png +0 -0
- package/src/assets/images/bottomtabs/home.png +0 -0
- package/src/assets/images/bottomtabs/homeactive.png +0 -0
- package/src/assets/images/bottomtabs/notification.png +0 -0
- package/src/assets/images/bottomtabs/notificationactive.png +0 -0
- package/src/assets/images/index.js +0 -11
- package/src/assets/images/index.ts +0 -40
- package/src/components/BottomSheet.tsx +0 -146
- package/src/components/ContactViaModal.tsx +0 -80
- package/src/components/Loader.tsx +0 -48
- package/src/components/ScreenHeader.tsx +0 -57
- package/src/components/SearchBar.tsx +0 -59
- package/src/components/TabsHeader.tsx +0 -72
- package/src/components/index.ts +0 -5
- package/src/config/FlavorConfig.ts +0 -55
- package/src/config/SalespandaConfig.ts +0 -142
- package/src/constants/Colors.ts +0 -17
- package/src/constants/GetPlatorm.ts +0 -29
- package/src/index.tsx +0 -31
- package/src/navigation/AppNavigator.tsx +0 -24
- package/src/navigation/BottomTabNavigator.tsx +0 -181
- package/src/navigation/DrawerNavigator.tsx +0 -306
- package/src/navigation/StackNavigator.tsx +0 -32
- package/src/screens/CRM/AddContactModal.tsx +0 -57
- package/src/screens/CRM/CategoryTabs.tsx +0 -109
- package/src/screens/CRM/ContactItem.tsx +0 -168
- package/src/screens/CRM/FilterDropdown.tsx +0 -34
- package/src/screens/CRM/FunnelChart.tsx +0 -103
- package/src/screens/CRM/InfoCard.tsx +0 -51
- package/src/screens/CRM/LeadCard.tsx +0 -69
- package/src/screens/CRM/LogCallScreen.tsx +0 -318
- package/src/screens/CRM/TopTabs.tsx +0 -95
- package/src/screens/CRM/index.ts +0 -10
- package/src/screens/ReportsScreen.tsx +0 -37
- package/src/screens/Tabs/ActivityAnalytics.tsx +0 -25
- package/src/screens/Tabs/CRMScreen.tsx +0 -381
- package/src/screens/Tabs/DigitalDiary.tsx +0 -35
- package/src/screens/Tabs/HomeScreen.tsx +0 -379
- package/src/screens/Tabs/NotificationsScreen.tsx +0 -25
- package/src/screens/contentliberary/contentliberary.tsx +0 -268
- package/src/services/api.ts +0 -173
- package/src/services/authService.ts +0 -75
- package/src/store/index.ts +0 -16
- /package/{lib/module → dist}/assets/images/bottomtabs/analytics.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/analyticsactive.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/crm.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/crmactive.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/diary.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/diaryactive.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/home.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/homeactive.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/notification.png +0 -0
- /package/{lib/module → dist}/assets/images/bottomtabs/notificationactive.png +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import { useNavigation } from '@react-navigation/native';
|
|
4
|
-
import { scale, moderateScale } from 'react-native-size-matters';
|
|
5
|
-
import { Colors } from '../constants/Colors';
|
|
6
|
-
|
|
7
|
-
interface TabsHeaderProps {
|
|
8
|
-
title: string;
|
|
9
|
-
rightSlot?: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const TabsHeader: React.FC<TabsHeaderProps> = ({ title, rightSlot }) => {
|
|
13
|
-
const navigation = useNavigation<any>();
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<View style={styles.container}>
|
|
17
|
-
<TouchableOpacity
|
|
18
|
-
style={styles.toggleButton}
|
|
19
|
-
onPress={() => navigation.toggleDrawer?.()}
|
|
20
|
-
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|
|
21
|
-
accessibilityRole="button"
|
|
22
|
-
accessibilityLabel="Open navigation drawer"
|
|
23
|
-
>
|
|
24
|
-
<Text style={styles.toggleIcon}>☰</Text>
|
|
25
|
-
</TouchableOpacity>
|
|
26
|
-
<Text style={styles.title}>{title}</Text>
|
|
27
|
-
<View style={styles.rightSlot}>{rightSlot}</View>
|
|
28
|
-
</View>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default TabsHeader;
|
|
33
|
-
|
|
34
|
-
const styles = StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
flexDirection: 'row',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
paddingHorizontal: moderateScale(12),
|
|
39
|
-
paddingVertical: moderateScale(4),
|
|
40
|
-
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
41
|
-
borderBottomColor: Colors.divider,
|
|
42
|
-
backgroundColor: Colors.white,
|
|
43
|
-
},
|
|
44
|
-
toggleButton: {
|
|
45
|
-
width: scale(36),
|
|
46
|
-
height: scale(36),
|
|
47
|
-
borderRadius: moderateScale(18),
|
|
48
|
-
borderWidth: 1,
|
|
49
|
-
borderColor: Colors.border,
|
|
50
|
-
justifyContent: 'center',
|
|
51
|
-
alignItems: 'center',
|
|
52
|
-
backgroundColor: Colors.lightblue,
|
|
53
|
-
},
|
|
54
|
-
toggleIcon: {
|
|
55
|
-
fontSize: moderateScale(20),
|
|
56
|
-
color: Colors.black,
|
|
57
|
-
},
|
|
58
|
-
title: {
|
|
59
|
-
flex: 1,
|
|
60
|
-
textAlign: 'left',
|
|
61
|
-
fontSize: moderateScale(16),
|
|
62
|
-
fontWeight: '600',
|
|
63
|
-
color: Colors.black,
|
|
64
|
-
marginLeft: 12,
|
|
65
|
-
},
|
|
66
|
-
rightSlot: {
|
|
67
|
-
minWidth: scale(36),
|
|
68
|
-
minHeight: scale(36),
|
|
69
|
-
alignItems: 'flex-end',
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
},
|
|
72
|
-
});
|
package/src/components/index.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
|
|
3
|
-
interface FlavorConfig {
|
|
4
|
-
appName: string;
|
|
5
|
-
applicationId: string;
|
|
6
|
-
host: string;
|
|
7
|
-
clevertapAccountId: string;
|
|
8
|
-
clevertapToken: string;
|
|
9
|
-
twScheme: string;
|
|
10
|
-
fileProviderAuthority: string;
|
|
11
|
-
freshchatFileProviderAuthority: string;
|
|
12
|
-
defaultNotificationChannelId: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Get the current flavor configuration
|
|
17
|
-
* This reads from native build config on Android
|
|
18
|
-
* On iOS, you'll need to configure schemes and xcconfig files
|
|
19
|
-
*/
|
|
20
|
-
export const getFlavorConfig = (): FlavorConfig => {
|
|
21
|
-
if (Platform.OS === 'android') {
|
|
22
|
-
const { BuildConfig } = NativeModules;
|
|
23
|
-
|
|
24
|
-
if (BuildConfig) {
|
|
25
|
-
return {
|
|
26
|
-
appName: BuildConfig.APP_NAME || 'Salespanda',
|
|
27
|
-
applicationId: BuildConfig.APPLICATION_ID || 'com.salespanda.app',
|
|
28
|
-
host: BuildConfig.HOST || '',
|
|
29
|
-
clevertapAccountId: BuildConfig.CLEVERTAP_ACCOUNT_ID || '',
|
|
30
|
-
clevertapToken: BuildConfig.CLEVERTAP_TOKEN || '',
|
|
31
|
-
twScheme: BuildConfig.TWSCHEME || '',
|
|
32
|
-
fileProviderAuthority: BuildConfig.FILE_PROVIDER_AUTHORITY || '',
|
|
33
|
-
freshchatFileProviderAuthority:
|
|
34
|
-
BuildConfig.FRESHCHAT_FILE_PROVIDER_AUTHORITY || '',
|
|
35
|
-
defaultNotificationChannelId:
|
|
36
|
-
BuildConfig.DEFAULT_NOTIFICATION_CHANNEL_ID || '',
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Default configuration for iOS or if BuildConfig is not available
|
|
42
|
-
return {
|
|
43
|
-
appName: 'Salespanda',
|
|
44
|
-
applicationId: 'com.salespanda.app',
|
|
45
|
-
host: '',
|
|
46
|
-
clevertapAccountId: '',
|
|
47
|
-
clevertapToken: '',
|
|
48
|
-
twScheme: '',
|
|
49
|
-
fileProviderAuthority: '',
|
|
50
|
-
freshchatFileProviderAuthority: '',
|
|
51
|
-
defaultNotificationChannelId: '',
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default getFlavorConfig();
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Salespanda SDK Configuration
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface SalespandaConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Theme configuration
|
|
8
|
-
*/
|
|
9
|
-
theme?: {
|
|
10
|
-
primaryColor?: string;
|
|
11
|
-
secondaryColor?: string;
|
|
12
|
-
backgroundColor?: string;
|
|
13
|
-
textColor?: string;
|
|
14
|
-
accentColor?: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* API configuration
|
|
19
|
-
*/
|
|
20
|
-
api?: {
|
|
21
|
-
baseUrl?: string;
|
|
22
|
-
apiKey?: string;
|
|
23
|
-
timeout?: number;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Authentication info supplied by host app
|
|
28
|
-
* If provided, SDK will use these tokens instead of performing login
|
|
29
|
-
*/
|
|
30
|
-
auth?: {
|
|
31
|
-
/**
|
|
32
|
-
* Token to be sent as `Token` header for protected APIs
|
|
33
|
-
*/
|
|
34
|
-
token?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Access token used for SSO or other flows when required
|
|
37
|
-
*/
|
|
38
|
-
accessToken?: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Feature flags
|
|
43
|
-
*/
|
|
44
|
-
features?: {
|
|
45
|
-
enablePremium?: boolean;
|
|
46
|
-
enableNotifications?: boolean;
|
|
47
|
-
enableReports?: boolean;
|
|
48
|
-
enableDrawer?: boolean;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Analytics configuration
|
|
53
|
-
*/
|
|
54
|
-
analytics?: {
|
|
55
|
-
enabled?: boolean;
|
|
56
|
-
trackingId?: string;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
let globalConfig: SalespandaConfig = {
|
|
61
|
-
theme: {
|
|
62
|
-
primaryColor: '#4a148c',
|
|
63
|
-
secondaryColor: '#25D366',
|
|
64
|
-
backgroundColor: '#fff',
|
|
65
|
-
textColor: '#333',
|
|
66
|
-
accentColor: '#999',
|
|
67
|
-
},
|
|
68
|
-
features: {
|
|
69
|
-
enablePremium: true,
|
|
70
|
-
enableNotifications: true,
|
|
71
|
-
enableReports: true,
|
|
72
|
-
enableDrawer: true,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Initialize Salespanda SDK with custom configuration
|
|
78
|
-
*/
|
|
79
|
-
export function initializeSalespanda(config: SalespandaConfig): void {
|
|
80
|
-
// Debug log for toolkit usage
|
|
81
|
-
// Helps in verifying that initializeSalespanda is being called correctly from host app
|
|
82
|
-
console.log('[Salespanda][initializeSalespanda] called with config:', config);
|
|
83
|
-
|
|
84
|
-
globalConfig = {
|
|
85
|
-
...globalConfig,
|
|
86
|
-
...config,
|
|
87
|
-
theme: {
|
|
88
|
-
...globalConfig.theme,
|
|
89
|
-
...config.theme,
|
|
90
|
-
},
|
|
91
|
-
features: {
|
|
92
|
-
...globalConfig.features,
|
|
93
|
-
...config.features,
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
// If host app passes tokens, make them available runtime-wide
|
|
98
|
-
if (config.auth?.token || config.auth?.accessToken) {
|
|
99
|
-
// Lazy import to avoid circular dep
|
|
100
|
-
const { setRuntimeTokens } = require('../services/api');
|
|
101
|
-
setRuntimeTokens({
|
|
102
|
-
token: config.auth?.token || null,
|
|
103
|
-
accessToken: config.auth?.accessToken || null,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Get current Salespanda configuration
|
|
110
|
-
*/
|
|
111
|
-
export function getSalespandaConfig(): SalespandaConfig {
|
|
112
|
-
console.log(
|
|
113
|
-
'[Salespanda][getSalespandaConfig] returning config:',
|
|
114
|
-
globalConfig
|
|
115
|
-
);
|
|
116
|
-
return globalConfig;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Reset configuration to defaults
|
|
121
|
-
*/
|
|
122
|
-
export function resetSalespandaConfig(): void {
|
|
123
|
-
console.log(
|
|
124
|
-
'[Salespanda][resetSalespandaConfig] resetting config to defaults'
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
globalConfig = {
|
|
128
|
-
theme: {
|
|
129
|
-
primaryColor: '#4a148c',
|
|
130
|
-
secondaryColor: '#25D366',
|
|
131
|
-
backgroundColor: '#fff',
|
|
132
|
-
textColor: '#333',
|
|
133
|
-
accentColor: '#999',
|
|
134
|
-
},
|
|
135
|
-
features: {
|
|
136
|
-
enablePremium: true,
|
|
137
|
-
enableNotifications: true,
|
|
138
|
-
enableReports: true,
|
|
139
|
-
enableDrawer: true,
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
}
|
package/src/constants/Colors.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const Colors = {
|
|
2
|
-
// Minimal palette as requested
|
|
3
|
-
primary: '#46bdd3',
|
|
4
|
-
white: '#ffffff',
|
|
5
|
-
black: '#322F2F',
|
|
6
|
-
background: '#ffffff',
|
|
7
|
-
border: '#ffffff',
|
|
8
|
-
divider: '#e0e0e0',
|
|
9
|
-
white50: 'rgba(255, 255, 255, 0.5)',
|
|
10
|
-
black50: 'rgba(0, 0, 0, 0.2)',
|
|
11
|
-
black30: 'rgba(0, 0, 0, 0.3)',
|
|
12
|
-
black20: 'rgba(0, 0, 0, 0.2)',
|
|
13
|
-
black10: 'rgba(0, 0, 0, 0.1)',
|
|
14
|
-
lightblue: '#E1F5FE',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
export type ColorKey = keyof typeof Colors;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Platform } from 'react-native';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Returns different values based on the platform
|
|
5
|
-
* @param value - Single value to use for both platforms, or object with platform specific values
|
|
6
|
-
* @param androidValue - Optional value for Android (if not provided, uses the same value for both platforms)
|
|
7
|
-
* @returns Platform specific value
|
|
8
|
-
*/
|
|
9
|
-
export const GetPlatform = <T>(
|
|
10
|
-
value: T | { ios: T; android: T },
|
|
11
|
-
androidValue?: T
|
|
12
|
-
): T => {
|
|
13
|
-
if (
|
|
14
|
-
value &&
|
|
15
|
-
typeof value === 'object' &&
|
|
16
|
-
'ios' in value &&
|
|
17
|
-
'android' in value
|
|
18
|
-
) {
|
|
19
|
-
return Platform.select({
|
|
20
|
-
ios: value.ios,
|
|
21
|
-
android: value.android,
|
|
22
|
-
}) as T;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return Platform.select({
|
|
26
|
-
ios: value as T,
|
|
27
|
-
android: androidValue ?? (value as T),
|
|
28
|
-
}) as T;
|
|
29
|
-
};
|
package/src/index.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export { default } from './SalespandaApp';
|
|
2
|
-
export { default as SalespandaApp } from './SalespandaApp';
|
|
3
|
-
export type { SalespandaAppProps } from './SalespandaApp';
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
initializeSalespanda,
|
|
7
|
-
getSalespandaConfig,
|
|
8
|
-
resetSalespandaConfig,
|
|
9
|
-
} from './config/SalespandaConfig';
|
|
10
|
-
export type { SalespandaConfig } from './config/SalespandaConfig';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
login,
|
|
14
|
-
logout,
|
|
15
|
-
isAuthenticated,
|
|
16
|
-
getCurrentUser,
|
|
17
|
-
getCurrentToken,
|
|
18
|
-
} from './services/authService';
|
|
19
|
-
|
|
20
|
-
export { getFlavorConfig } from './config/FlavorConfig';
|
|
21
|
-
export { default as FlavorConfig } from './config/FlavorConfig';
|
|
22
|
-
|
|
23
|
-
export { default as AppNavigator } from './navigation/AppNavigator';
|
|
24
|
-
export { default as DrawerNavigator } from './navigation/DrawerNavigator';
|
|
25
|
-
export { default as BottomTabNavigator } from './navigation/BottomTabNavigator';
|
|
26
|
-
|
|
27
|
-
export { default as HomeScreen } from './screens/Tabs/HomeScreen';
|
|
28
|
-
export { default as ProfileScreen } from './screens/Tabs/ActivityAnalytics';
|
|
29
|
-
export { default as NotificationsScreen } from './screens/Tabs/NotificationsScreen';
|
|
30
|
-
export { default as ReportsScreen } from './screens/ReportsScreen';
|
|
31
|
-
export { default as PremiumScreen } from './screens/Tabs/CRMScreen';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { NavigationContainer } from '@react-navigation/native';
|
|
2
|
-
import { StyleSheet } from 'react-native';
|
|
3
|
-
import StackNavigator from './StackNavigator';
|
|
4
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
|
-
import { Colors } from '../constants/Colors';
|
|
6
|
-
|
|
7
|
-
const AppNavigator: React.FC = () => {
|
|
8
|
-
return (
|
|
9
|
-
<NavigationContainer>
|
|
10
|
-
<SafeAreaView style={styles.container} edges={['bottom', 'top']}>
|
|
11
|
-
<StackNavigator />
|
|
12
|
-
</SafeAreaView>
|
|
13
|
-
</NavigationContainer>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default AppNavigator;
|
|
18
|
-
|
|
19
|
-
const styles = StyleSheet.create({
|
|
20
|
-
container: {
|
|
21
|
-
flex: 1,
|
|
22
|
-
backgroundColor: Colors.background,
|
|
23
|
-
},
|
|
24
|
-
});
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
2
|
-
import { View, Image, StyleSheet } from 'react-native';
|
|
3
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
4
|
-
import HomeScreen from '../screens/Tabs/HomeScreen';
|
|
5
|
-
import ReportsScreen from '../screens/ReportsScreen';
|
|
6
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
7
|
-
import { Colors } from '../constants/Colors';
|
|
8
|
-
import {
|
|
9
|
-
analyticsIcon,
|
|
10
|
-
analyticsIconActive,
|
|
11
|
-
crmIcon,
|
|
12
|
-
crmIconActive,
|
|
13
|
-
diaryIcon,
|
|
14
|
-
diaryIconActive,
|
|
15
|
-
homeIcon,
|
|
16
|
-
homeIconActive,
|
|
17
|
-
notificationIcon,
|
|
18
|
-
notificationIconActive,
|
|
19
|
-
} from '../assets/images';
|
|
20
|
-
import CRMScreen from '../screens/Tabs/CRMScreen';
|
|
21
|
-
import NotificationsScreen from '../screens/Tabs/NotificationsScreen';
|
|
22
|
-
import { useNavigation } from '@react-navigation/native';
|
|
23
|
-
import ActivityAnalytics from '../screens/Tabs/ActivityAnalytics';
|
|
24
|
-
|
|
25
|
-
export type BottomTabParamList = {
|
|
26
|
-
'Home': undefined;
|
|
27
|
-
'CRM': undefined;
|
|
28
|
-
'Reports': undefined;
|
|
29
|
-
'Notifications': undefined;
|
|
30
|
-
'Activity Analytics': undefined;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const Tab = createBottomTabNavigator<BottomTabParamList>();
|
|
34
|
-
|
|
35
|
-
interface TabIconProps {
|
|
36
|
-
focused: boolean;
|
|
37
|
-
size: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface ImageIconProps {
|
|
41
|
-
inactive: any;
|
|
42
|
-
active: any;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const ImageIcon = ({ inactive, active }: ImageIconProps) => {
|
|
46
|
-
return ({ focused, size }: TabIconProps) => {
|
|
47
|
-
if (focused) {
|
|
48
|
-
return (
|
|
49
|
-
<View style={styles.activeIconContainer}>
|
|
50
|
-
<Image
|
|
51
|
-
source={active}
|
|
52
|
-
resizeMode="contain"
|
|
53
|
-
style={styles.activeIcon}
|
|
54
|
-
/>
|
|
55
|
-
</View>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
return (
|
|
59
|
-
<Image
|
|
60
|
-
source={inactive}
|
|
61
|
-
resizeMode="contain"
|
|
62
|
-
style={[styles.inactiveIcon, { width: size, height: size }]}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const BottomTabNavigator: React.FC = () => {
|
|
69
|
-
const navigation = useNavigation();
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<SafeAreaView style={styles.container} edges={['bottom']}>
|
|
73
|
-
<Tab.Navigator
|
|
74
|
-
screenOptions={{
|
|
75
|
-
headerShown: false,
|
|
76
|
-
sceneStyle: { backgroundColor: Colors.background },
|
|
77
|
-
tabBarShowLabel: false,
|
|
78
|
-
tabBarStyle: styles.tabBar,
|
|
79
|
-
tabBarItemStyle: { overflow: 'visible' },
|
|
80
|
-
}}
|
|
81
|
-
screenListeners={{
|
|
82
|
-
state: (e) => {
|
|
83
|
-
const state = e.data.state;
|
|
84
|
-
if (state && state.routes && state.index !== undefined) {
|
|
85
|
-
const currentRoute = state.routes[state.index];
|
|
86
|
-
if (currentRoute) {
|
|
87
|
-
const tabName = currentRoute.name;
|
|
88
|
-
|
|
89
|
-
// Update the drawer header title based on current tab
|
|
90
|
-
navigation.setOptions({
|
|
91
|
-
title: tabName,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
<Tab.Screen
|
|
99
|
-
name="Home"
|
|
100
|
-
component={HomeScreen}
|
|
101
|
-
options={{
|
|
102
|
-
tabBarIcon: ImageIcon({
|
|
103
|
-
inactive: homeIcon,
|
|
104
|
-
active: homeIconActive,
|
|
105
|
-
}),
|
|
106
|
-
}}
|
|
107
|
-
/>
|
|
108
|
-
<Tab.Screen
|
|
109
|
-
name="CRM"
|
|
110
|
-
component={CRMScreen}
|
|
111
|
-
options={{
|
|
112
|
-
tabBarIcon: ImageIcon({ inactive: crmIcon, active: crmIconActive }),
|
|
113
|
-
}}
|
|
114
|
-
/>
|
|
115
|
-
<Tab.Screen
|
|
116
|
-
name="Reports"
|
|
117
|
-
component={ReportsScreen}
|
|
118
|
-
options={{
|
|
119
|
-
tabBarIcon: ImageIcon({
|
|
120
|
-
inactive: diaryIcon,
|
|
121
|
-
active: diaryIconActive,
|
|
122
|
-
}),
|
|
123
|
-
}}
|
|
124
|
-
/>
|
|
125
|
-
<Tab.Screen
|
|
126
|
-
name="Notifications"
|
|
127
|
-
component={NotificationsScreen}
|
|
128
|
-
options={{
|
|
129
|
-
tabBarIcon: ImageIcon({
|
|
130
|
-
inactive: notificationIcon,
|
|
131
|
-
active: notificationIconActive,
|
|
132
|
-
}),
|
|
133
|
-
}}
|
|
134
|
-
/>
|
|
135
|
-
<Tab.Screen
|
|
136
|
-
name="Activity Analytics"
|
|
137
|
-
component={ActivityAnalytics}
|
|
138
|
-
options={{
|
|
139
|
-
tabBarIcon: ImageIcon({
|
|
140
|
-
inactive: analyticsIcon,
|
|
141
|
-
active: analyticsIconActive,
|
|
142
|
-
}),
|
|
143
|
-
}}
|
|
144
|
-
/>
|
|
145
|
-
</Tab.Navigator>
|
|
146
|
-
</SafeAreaView>
|
|
147
|
-
);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export default BottomTabNavigator;
|
|
151
|
-
|
|
152
|
-
const styles = StyleSheet.create({
|
|
153
|
-
container: {
|
|
154
|
-
flex: 1,
|
|
155
|
-
backgroundColor: Colors.background,
|
|
156
|
-
},
|
|
157
|
-
tabBar: {
|
|
158
|
-
borderTopWidth: 1,
|
|
159
|
-
borderTopColor: Colors.border,
|
|
160
|
-
backgroundColor: Colors.white,
|
|
161
|
-
height: verticalScale(40),
|
|
162
|
-
},
|
|
163
|
-
activeIconContainer: {
|
|
164
|
-
width: scale(48),
|
|
165
|
-
height: scale(48),
|
|
166
|
-
borderRadius: moderateScale(24),
|
|
167
|
-
alignItems: 'center',
|
|
168
|
-
justifyContent: 'center',
|
|
169
|
-
borderWidth: 4,
|
|
170
|
-
borderColor: Colors.white,
|
|
171
|
-
transform: [{ translateY: verticalScale(-6) }],
|
|
172
|
-
},
|
|
173
|
-
activeIcon: {
|
|
174
|
-
width: scale(42),
|
|
175
|
-
height: scale(42),
|
|
176
|
-
tintColor: Colors.primary,
|
|
177
|
-
},
|
|
178
|
-
inactiveIcon: {
|
|
179
|
-
tintColor: Colors.black30,
|
|
180
|
-
},
|
|
181
|
-
});
|