react-native-salespanda 0.5.3 → 0.7.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.
Files changed (131) hide show
  1. package/README.md +50 -102
  2. package/android/build.gradle +15 -198
  3. package/package.json +3 -4
  4. package/lib/module/NativeSalespanda.js.map +0 -1
  5. package/lib/module/SalespandaApp.js.map +0 -1
  6. package/lib/module/assets/images/index.js.map +0 -1
  7. package/lib/module/components/BottomSheet.js.map +0 -1
  8. package/lib/module/components/ContactViaModal.js.map +0 -1
  9. package/lib/module/components/Loader.js.map +0 -1
  10. package/lib/module/components/ScreenHeader.js.map +0 -1
  11. package/lib/module/components/SearchBar.js.map +0 -1
  12. package/lib/module/components/TabsHeader.js.map +0 -1
  13. package/lib/module/components/index.js.map +0 -1
  14. package/lib/module/config/FlavorConfig.js.map +0 -1
  15. package/lib/module/config/SalespandaConfig.js.map +0 -1
  16. package/lib/module/constants/Colors.js.map +0 -1
  17. package/lib/module/constants/GetPlatorm.js.map +0 -1
  18. package/lib/module/index.js.map +0 -1
  19. package/lib/module/navigation/AppNavigator.js.map +0 -1
  20. package/lib/module/navigation/BottomTabNavigator.js.map +0 -1
  21. package/lib/module/navigation/DrawerNavigator.js.map +0 -1
  22. package/lib/module/navigation/StackNavigator.js.map +0 -1
  23. package/lib/module/screens/CRM/AddContactModal.js.map +0 -1
  24. package/lib/module/screens/CRM/CategoryTabs.js.map +0 -1
  25. package/lib/module/screens/CRM/ContactItem.js.map +0 -1
  26. package/lib/module/screens/CRM/FilterDropdown.js.map +0 -1
  27. package/lib/module/screens/CRM/FunnelChart.js.map +0 -1
  28. package/lib/module/screens/CRM/InfoCard.js.map +0 -1
  29. package/lib/module/screens/CRM/LeadCard.js.map +0 -1
  30. package/lib/module/screens/CRM/LogCallScreen.js.map +0 -1
  31. package/lib/module/screens/CRM/TopTabs.js.map +0 -1
  32. package/lib/module/screens/CRM/index.js.map +0 -1
  33. package/lib/module/screens/ReportsScreen.js.map +0 -1
  34. package/lib/module/screens/Tabs/ActivityAnalytics.js.map +0 -1
  35. package/lib/module/screens/Tabs/CRMScreen.js.map +0 -1
  36. package/lib/module/screens/Tabs/DigitalDiary.js.map +0 -1
  37. package/lib/module/screens/Tabs/HomeScreen.js.map +0 -1
  38. package/lib/module/screens/Tabs/NotificationsScreen.js.map +0 -1
  39. package/lib/module/screens/contentliberary/contentliberary.js.map +0 -1
  40. package/lib/module/services/api.js.map +0 -1
  41. package/lib/module/services/authService.js.map +0 -1
  42. package/lib/module/store/index.js.map +0 -1
  43. package/lib/typescript/src/NativeSalespanda.d.ts.map +0 -1
  44. package/lib/typescript/src/SalespandaApp.d.ts.map +0 -1
  45. package/lib/typescript/src/assets/images/index.d.ts.map +0 -1
  46. package/lib/typescript/src/components/BottomSheet.d.ts.map +0 -1
  47. package/lib/typescript/src/components/ContactViaModal.d.ts.map +0 -1
  48. package/lib/typescript/src/components/Loader.d.ts.map +0 -1
  49. package/lib/typescript/src/components/ScreenHeader.d.ts.map +0 -1
  50. package/lib/typescript/src/components/SearchBar.d.ts.map +0 -1
  51. package/lib/typescript/src/components/TabsHeader.d.ts.map +0 -1
  52. package/lib/typescript/src/components/index.d.ts.map +0 -1
  53. package/lib/typescript/src/config/FlavorConfig.d.ts.map +0 -1
  54. package/lib/typescript/src/config/SalespandaConfig.d.ts.map +0 -1
  55. package/lib/typescript/src/constants/Colors.d.ts.map +0 -1
  56. package/lib/typescript/src/constants/GetPlatorm.d.ts.map +0 -1
  57. package/lib/typescript/src/index.d.ts.map +0 -1
  58. package/lib/typescript/src/navigation/AppNavigator.d.ts.map +0 -1
  59. package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +0 -1
  60. package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +0 -1
  61. package/lib/typescript/src/navigation/StackNavigator.d.ts.map +0 -1
  62. package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +0 -1
  63. package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +0 -1
  64. package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +0 -1
  65. package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +0 -1
  66. package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +0 -1
  67. package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +0 -1
  68. package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +0 -1
  69. package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +0 -1
  70. package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +0 -1
  71. package/lib/typescript/src/screens/CRM/index.d.ts.map +0 -1
  72. package/lib/typescript/src/screens/ReportsScreen.d.ts.map +0 -1
  73. package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +0 -1
  74. package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +0 -1
  75. package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +0 -1
  76. package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +0 -1
  77. package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +0 -1
  78. package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +0 -1
  79. package/lib/typescript/src/services/api.d.ts.map +0 -1
  80. package/lib/typescript/src/services/authService.d.ts.map +0 -1
  81. package/lib/typescript/src/store/index.d.ts.map +0 -1
  82. package/src/NativeSalespanda.ts +0 -7
  83. package/src/SalespandaApp.tsx +0 -141
  84. package/src/assets/images/bottomtabs/analytics.png +0 -0
  85. package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
  86. package/src/assets/images/bottomtabs/crm.png +0 -0
  87. package/src/assets/images/bottomtabs/crmactive.png +0 -0
  88. package/src/assets/images/bottomtabs/diary.png +0 -0
  89. package/src/assets/images/bottomtabs/diaryactive.png +0 -0
  90. package/src/assets/images/bottomtabs/home.png +0 -0
  91. package/src/assets/images/bottomtabs/homeactive.png +0 -0
  92. package/src/assets/images/bottomtabs/notification.png +0 -0
  93. package/src/assets/images/bottomtabs/notificationactive.png +0 -0
  94. package/src/assets/images/index.js +0 -11
  95. package/src/assets/images/index.ts +0 -40
  96. package/src/components/BottomSheet.tsx +0 -146
  97. package/src/components/ContactViaModal.tsx +0 -80
  98. package/src/components/Loader.tsx +0 -48
  99. package/src/components/ScreenHeader.tsx +0 -57
  100. package/src/components/SearchBar.tsx +0 -59
  101. package/src/components/TabsHeader.tsx +0 -72
  102. package/src/components/index.ts +0 -5
  103. package/src/config/FlavorConfig.ts +0 -55
  104. package/src/config/SalespandaConfig.ts +0 -142
  105. package/src/constants/Colors.ts +0 -17
  106. package/src/constants/GetPlatorm.ts +0 -29
  107. package/src/index.tsx +0 -31
  108. package/src/navigation/AppNavigator.tsx +0 -24
  109. package/src/navigation/BottomTabNavigator.tsx +0 -181
  110. package/src/navigation/DrawerNavigator.tsx +0 -306
  111. package/src/navigation/StackNavigator.tsx +0 -32
  112. package/src/screens/CRM/AddContactModal.tsx +0 -57
  113. package/src/screens/CRM/CategoryTabs.tsx +0 -109
  114. package/src/screens/CRM/ContactItem.tsx +0 -168
  115. package/src/screens/CRM/FilterDropdown.tsx +0 -34
  116. package/src/screens/CRM/FunnelChart.tsx +0 -103
  117. package/src/screens/CRM/InfoCard.tsx +0 -51
  118. package/src/screens/CRM/LeadCard.tsx +0 -69
  119. package/src/screens/CRM/LogCallScreen.tsx +0 -318
  120. package/src/screens/CRM/TopTabs.tsx +0 -95
  121. package/src/screens/CRM/index.ts +0 -10
  122. package/src/screens/ReportsScreen.tsx +0 -37
  123. package/src/screens/Tabs/ActivityAnalytics.tsx +0 -25
  124. package/src/screens/Tabs/CRMScreen.tsx +0 -381
  125. package/src/screens/Tabs/DigitalDiary.tsx +0 -35
  126. package/src/screens/Tabs/HomeScreen.tsx +0 -379
  127. package/src/screens/Tabs/NotificationsScreen.tsx +0 -25
  128. package/src/screens/contentliberary/contentliberary.tsx +0 -268
  129. package/src/services/api.ts +0 -173
  130. package/src/services/authService.ts +0 -75
  131. package/src/store/index.ts +0 -16
@@ -1,11 +0,0 @@
1
- // Bottom Tab Icons
2
- export const homeIcon = require('./bottomtabs/home.png');
3
- export const homeIconActive = require('./bottomtabs/homeactive.png');
4
- export const analyticsIcon = require('./bottomtabs/analytics.png');
5
- export const analyticsIconActive = require('./bottomtabs/analyticsactive.png');
6
- export const crmIcon = require('./bottomtabs/crm.png');
7
- export const crmIconActive = require('./bottomtabs/crmactive.png');
8
- export const diaryIcon = require('./bottomtabs/diary.png');
9
- export const diaryIconActive = require('./bottomtabs/diaryactive.png');
10
- export const notificationIcon = require('./bottomtabs/notification.png');
11
- export const notificationIconActive = require('./bottomtabs/notificationactive.png');
@@ -1,40 +0,0 @@
1
- import type { ImageSourcePropType } from 'react-native';
2
-
3
- export const homeIcon: ImageSourcePropType = require('./bottomtabs/home.png');
4
- export const homeIconActive: ImageSourcePropType = require('./bottomtabs/homeactive.png');
5
- export const analyticsIcon: ImageSourcePropType = require('./bottomtabs/analytics.png');
6
- export const analyticsIconActive: ImageSourcePropType = require('./bottomtabs/analyticsactive.png');
7
- export const crmIcon: ImageSourcePropType = require('./bottomtabs/crm.png');
8
- export const crmIconActive: ImageSourcePropType = require('./bottomtabs/crmactive.png');
9
- export const diaryIcon: ImageSourcePropType = require('./bottomtabs/diary.png');
10
- export const diaryIconActive: ImageSourcePropType = require('./bottomtabs/diaryactive.png');
11
- export const notificationIcon: ImageSourcePropType = require('./bottomtabs/notification.png');
12
- export const notificationIconActive: ImageSourcePropType = require('./bottomtabs/notificationactive.png');
13
-
14
- export type IconPair = {
15
- default: ImageSourcePropType;
16
- active: ImageSourcePropType;
17
- };
18
-
19
- export const bottomTabIcons: Record<string, IconPair> = {
20
- home: {
21
- default: homeIcon,
22
- active: homeIconActive,
23
- },
24
- analytics: {
25
- default: analyticsIcon,
26
- active: analyticsIconActive,
27
- },
28
- crm: {
29
- default: crmIcon,
30
- active: crmIconActive,
31
- },
32
- diary: {
33
- default: diaryIcon,
34
- active: diaryIconActive,
35
- },
36
- notification: {
37
- default: notificationIcon,
38
- active: notificationIconActive,
39
- },
40
- };
@@ -1,146 +0,0 @@
1
- import {
2
- View,
3
- Text,
4
- StyleSheet,
5
- Modal,
6
- TouchableOpacity,
7
- TouchableWithoutFeedback,
8
- } from 'react-native';
9
- import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
10
- import { Colors } from '../constants/Colors';
11
-
12
- interface BottomSheetProps {
13
- visible: boolean;
14
- onClose: () => void;
15
- title: string;
16
- children: React.ReactNode;
17
- }
18
-
19
- export const BottomSheet: React.FC<BottomSheetProps> = ({
20
- visible,
21
- onClose,
22
- title,
23
- children,
24
- }) => {
25
- return (
26
- <Modal
27
- visible={visible}
28
- transparent
29
- animationType="slide"
30
- onRequestClose={onClose}
31
- >
32
- <TouchableWithoutFeedback onPress={onClose}>
33
- <View style={styles.overlay}>
34
- <TouchableWithoutFeedback>
35
- <View style={styles.bottomSheet}>
36
- <View style={styles.header}>
37
- <Text style={styles.title}>{title}</Text>
38
- <TouchableOpacity onPress={onClose} style={styles.closeButton}>
39
- <Text style={styles.closeIcon}>✕</Text>
40
- </TouchableOpacity>
41
- </View>
42
- <View style={styles.content}>{children}</View>
43
- </View>
44
- </TouchableWithoutFeedback>
45
- </View>
46
- </TouchableWithoutFeedback>
47
- </Modal>
48
- );
49
- };
50
-
51
- interface BottomSheetOptionProps {
52
- icon: string;
53
- label: string;
54
- onPress: () => void;
55
- iconColor?: string;
56
- }
57
-
58
- export const BottomSheetOption: React.FC<BottomSheetOptionProps> = ({
59
- icon,
60
- label,
61
- onPress,
62
- iconColor,
63
- }) => {
64
- return (
65
- <TouchableOpacity style={styles.option} onPress={onPress}>
66
- <View
67
- style={[
68
- styles.iconContainer,
69
- iconColor && { backgroundColor: iconColor },
70
- ]}
71
- >
72
- <Text style={styles.optionIcon}>{icon}</Text>
73
- </View>
74
- <Text style={styles.optionLabel}>{label}</Text>
75
- <Text style={styles.arrow}>›</Text>
76
- </TouchableOpacity>
77
- );
78
- };
79
-
80
- const styles = StyleSheet.create({
81
- overlay: {
82
- flex: 1,
83
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
84
- justifyContent: 'flex-end',
85
- },
86
- bottomSheet: {
87
- backgroundColor: Colors.white,
88
- borderTopLeftRadius: moderateScale(20),
89
- borderTopRightRadius: moderateScale(20),
90
- paddingBottom: verticalScale(30),
91
- },
92
- header: {
93
- flexDirection: 'row',
94
- justifyContent: 'space-between',
95
- alignItems: 'center',
96
- padding: scale(20),
97
- borderBottomWidth: 1,
98
- borderBottomColor: '#E0E0E0',
99
- },
100
- title: {
101
- fontSize: moderateScale(20),
102
- fontWeight: '700',
103
- color: Colors.black,
104
- },
105
- closeButton: {
106
- padding: scale(4),
107
- },
108
- closeIcon: {
109
- fontSize: moderateScale(24),
110
- color: Colors.black,
111
- },
112
- content: {
113
- padding: scale(16),
114
- },
115
- option: {
116
- flexDirection: 'row',
117
- alignItems: 'center',
118
- padding: scale(16),
119
- backgroundColor: Colors.white,
120
- borderWidth: 1,
121
- borderColor: '#E0E0E0',
122
- borderRadius: moderateScale(12),
123
- marginBottom: verticalScale(12),
124
- },
125
- iconContainer: {
126
- width: scale(30),
127
- height: scale(30),
128
- borderRadius: moderateScale(20),
129
- justifyContent: 'center',
130
- alignItems: 'center',
131
- marginRight: scale(12),
132
- },
133
- optionIcon: {
134
- fontSize: moderateScale(16),
135
- },
136
- optionLabel: {
137
- flex: 1,
138
- fontSize: moderateScale(12),
139
- fontWeight: '600',
140
- color: Colors.black,
141
- },
142
- arrow: {
143
- fontSize: moderateScale(24),
144
- color: '#999',
145
- },
146
- });
@@ -1,80 +0,0 @@
1
- import { BottomSheet, BottomSheetOption } from './BottomSheet';
2
-
3
- interface ContactViaModalProps {
4
- visible: boolean;
5
- onClose: () => void;
6
- onCall?: () => void;
7
- onWhatsapp?: () => void;
8
- onEmail?: () => void;
9
- onSMS?: () => void;
10
- onAddTask?: () => void;
11
- onAddNote?: () => void;
12
- }
13
-
14
- export const ContactViaModal: React.FC<ContactViaModalProps> = ({
15
- visible,
16
- onClose,
17
- onCall,
18
- onWhatsapp,
19
- onEmail,
20
- onSMS,
21
- onAddTask,
22
- onAddNote,
23
- }) => {
24
- return (
25
- <BottomSheet visible={visible} onClose={onClose} title="Contact Via">
26
- <BottomSheetOption
27
- icon="📞"
28
- label="Call"
29
- iconColor="#FF6B6B"
30
- onPress={() => {
31
- onClose();
32
- onCall?.();
33
- }}
34
- />
35
- <BottomSheetOption
36
- icon="💬"
37
- label="Whatsapp"
38
- iconColor="#25D366"
39
- onPress={() => {
40
- onClose();
41
- onWhatsapp?.();
42
- }}
43
- />
44
- <BottomSheetOption
45
- icon="✉️"
46
- label="E-mail"
47
- iconColor="#9B59B6"
48
- onPress={() => {
49
- onClose();
50
- onEmail?.();
51
- }}
52
- />
53
- <BottomSheetOption
54
- icon="💬"
55
- label="SMS"
56
- iconColor="#3498DB"
57
- onPress={() => {
58
- onClose();
59
- onSMS?.();
60
- }}
61
- />
62
- <BottomSheetOption
63
- icon="📋"
64
- label="Add Task"
65
- onPress={() => {
66
- onClose();
67
- onAddTask?.();
68
- }}
69
- />
70
- <BottomSheetOption
71
- icon="📝"
72
- label="Add Note"
73
- onPress={() => {
74
- onClose();
75
- onAddNote?.();
76
- }}
77
- />
78
- </BottomSheet>
79
- );
80
- };
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import { View, Text, ActivityIndicator, StyleSheet } from 'react-native';
3
- import type { ViewStyle } from 'react-native';
4
- import { Colors } from '../constants/Colors';
5
- import { verticalScale, moderateScale, scale } from 'react-native-size-matters';
6
-
7
- type LoaderProps = {
8
- message?: string;
9
- overlay?: boolean;
10
- color?: string;
11
- style?: ViewStyle;
12
- };
13
-
14
- const Loader: React.FC<LoaderProps> = ({
15
- message = 'Loading...',
16
- overlay = false,
17
- color = Colors.primary,
18
- style,
19
- }) => {
20
- return (
21
- <View style={[styles.container, overlay ? styles.overlay : null, style]}>
22
- <ActivityIndicator size="large" color={color} />
23
- {message ? <Text style={styles.text}>{message}</Text> : null}
24
- </View>
25
- );
26
- };
27
-
28
- export default Loader;
29
-
30
- const styles = StyleSheet.create({
31
- container: {
32
- paddingVertical: verticalScale(16),
33
- paddingHorizontal: scale(12),
34
- alignItems: 'center',
35
- justifyContent: 'center',
36
- backgroundColor: Colors.white,
37
- },
38
- overlay: {
39
- ...StyleSheet.absoluteFillObject,
40
- zIndex: 10,
41
- backgroundColor: Colors.white50,
42
- },
43
- text: {
44
- marginTop: verticalScale(8),
45
- fontSize: moderateScale(12),
46
- color: Colors.black,
47
- },
48
- });
@@ -1,57 +0,0 @@
1
- import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
2
- import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
3
- import { Colors } from '../constants/Colors';
4
-
5
- interface ScreenHeaderProps {
6
- title?: string;
7
- onBackPress: () => void;
8
- showCrossOnLeft?: boolean; // If true, shows cross icon instead of back arrow on left
9
- }
10
-
11
- export const ScreenHeader: React.FC<ScreenHeaderProps> = ({
12
- title,
13
- onBackPress,
14
- showCrossOnLeft = false,
15
- }) => {
16
- return (
17
- <View style={styles.header}>
18
- <TouchableOpacity onPress={onBackPress} style={styles.iconButton}>
19
- <Text style={styles.icon}>{showCrossOnLeft ? '✕' : '←'}</Text>
20
- </TouchableOpacity>
21
- {title && <Text style={styles.title}>{title}</Text>}
22
- <TouchableOpacity onPress={onBackPress} style={styles.iconButton}>
23
- <Text style={styles.icon}>✕</Text>
24
- </TouchableOpacity>
25
- </View>
26
- );
27
- };
28
-
29
- const styles = StyleSheet.create({
30
- header: {
31
- flexDirection: 'row',
32
- alignItems: 'center',
33
- justifyContent: 'space-between',
34
- paddingHorizontal: scale(16),
35
- paddingVertical: verticalScale(12),
36
- backgroundColor: Colors.white,
37
- borderBottomWidth: 1,
38
- borderBottomColor: '#e0e0e0',
39
- },
40
- iconButton: {
41
- width: scale(40),
42
- height: scale(40),
43
- justifyContent: 'center',
44
- alignItems: 'center',
45
- },
46
- icon: {
47
- fontSize: moderateScale(24),
48
- color: Colors.black,
49
- },
50
- title: {
51
- fontSize: moderateScale(18),
52
- fontWeight: '600',
53
- color: Colors.black,
54
- flex: 1,
55
- textAlign: 'center',
56
- },
57
- });
@@ -1,59 +0,0 @@
1
- import { View, Text, StyleSheet, TextInput } from 'react-native';
2
- import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
3
- import { Colors } from '../constants/Colors';
4
-
5
- interface SearchBarProps {
6
- placeholder?: string;
7
- onChangeText?: (text: string) => void;
8
- value?: string;
9
- }
10
-
11
- export const SearchBar: React.FC<SearchBarProps> = ({
12
- placeholder = 'Search by name',
13
- onChangeText,
14
- value,
15
- }) => {
16
- return (
17
- <View style={styles.searchContainer}>
18
- <View style={styles.searchBar}>
19
- <Text style={styles.searchIcon}>🔍</Text>
20
- <TextInput
21
- style={styles.searchInput}
22
- placeholder={placeholder}
23
- placeholderTextColor="#ccc"
24
- onChangeText={onChangeText}
25
- value={value}
26
- />
27
- </View>
28
- </View>
29
- );
30
- };
31
-
32
- const styles = StyleSheet.create({
33
- searchContainer: {
34
- backgroundColor: Colors.white,
35
- paddingHorizontal: scale(16),
36
- paddingVertical: verticalScale(12),
37
- },
38
- searchBar: {
39
- flexDirection: 'row',
40
- alignItems: 'center',
41
- backgroundColor: Colors.white,
42
- borderWidth: 1,
43
- borderColor: '#E0E0E0',
44
- borderRadius: moderateScale(8),
45
- paddingHorizontal: scale(12),
46
- paddingVertical: verticalScale(8),
47
- },
48
- searchIcon: {
49
- fontSize: moderateScale(18),
50
- marginRight: scale(8),
51
- color: '#999',
52
- },
53
- searchInput: {
54
- flex: 1,
55
- fontSize: moderateScale(16),
56
- color: Colors.black,
57
- padding: 0,
58
- },
59
- });
@@ -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
- });
@@ -1,5 +0,0 @@
1
- // Reusable Components
2
- export { SearchBar } from './SearchBar';
3
- export { BottomSheet, BottomSheetOption } from './BottomSheet';
4
- export { ContactViaModal } from './ContactViaModal';
5
- export { ScreenHeader } from './ScreenHeader';
@@ -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();