react-native-salespanda 0.3.0 → 0.4.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.
Files changed (89) hide show
  1. package/Salespanda.podspec +4 -0
  2. package/android/build.gradle +2 -0
  3. package/lib/module/SalespandaApp.js +22 -8
  4. package/lib/module/SalespandaApp.js.map +1 -1
  5. package/lib/module/assets/images/bottomtabs/analytics.png +0 -0
  6. package/lib/module/assets/images/bottomtabs/analyticsactive.png +0 -0
  7. package/lib/module/assets/images/bottomtabs/crm.png +0 -0
  8. package/lib/module/assets/images/bottomtabs/crmactive.png +0 -0
  9. package/lib/module/assets/images/bottomtabs/diary.png +0 -0
  10. package/lib/module/assets/images/bottomtabs/diaryactive.png +0 -0
  11. package/lib/module/assets/images/bottomtabs/home.png +0 -0
  12. package/lib/module/assets/images/bottomtabs/homeactive.png +0 -0
  13. package/lib/module/assets/images/bottomtabs/notification.png +0 -0
  14. package/lib/module/assets/images/bottomtabs/notificationactive.png +0 -0
  15. package/lib/module/assets/images/index.js +35 -0
  16. package/lib/module/assets/images/index.js.map +1 -0
  17. package/lib/module/constants/Colors.js +17 -0
  18. package/lib/module/constants/Colors.js.map +1 -0
  19. package/lib/module/constants/GetPlatorm.js +23 -0
  20. package/lib/module/constants/GetPlatorm.js.map +1 -0
  21. package/lib/module/index.js +1 -1
  22. package/lib/module/index.js.map +1 -1
  23. package/lib/module/navigation/AppNavigator.js +3 -1
  24. package/lib/module/navigation/AppNavigator.js.map +1 -1
  25. package/lib/module/navigation/BottomTabNavigator.js +71 -53
  26. package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
  27. package/lib/module/navigation/DrawerNavigator.js +210 -129
  28. package/lib/module/navigation/DrawerNavigator.js.map +1 -1
  29. package/lib/module/screens/CRMScreen.js +41 -0
  30. package/lib/module/screens/CRMScreen.js.map +1 -0
  31. package/lib/module/screens/HomeScreen.js +82 -88
  32. package/lib/module/screens/HomeScreen.js.map +1 -1
  33. package/lib/module/screens/NotificationsScreen.js +11 -97
  34. package/lib/module/screens/NotificationsScreen.js.map +1 -1
  35. package/lib/module/screens/ProfileScreen.js +13 -119
  36. package/lib/module/screens/ProfileScreen.js.map +1 -1
  37. package/lib/module/screens/ReportsScreen.js +11 -187
  38. package/lib/module/screens/ReportsScreen.js.map +1 -1
  39. package/lib/typescript/src/SalespandaApp.d.ts +1 -1
  40. package/lib/typescript/src/SalespandaApp.d.ts.map +1 -1
  41. package/lib/typescript/src/assets/images/index.d.ts +17 -0
  42. package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
  43. package/lib/typescript/src/constants/Colors.d.ts +15 -0
  44. package/lib/typescript/src/constants/Colors.d.ts.map +1 -0
  45. package/lib/typescript/src/constants/GetPlatorm.d.ts +11 -0
  46. package/lib/typescript/src/constants/GetPlatorm.d.ts.map +1 -0
  47. package/lib/typescript/src/index.d.ts +1 -1
  48. package/lib/typescript/src/index.d.ts.map +1 -1
  49. package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -1
  50. package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -1
  51. package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -1
  52. package/lib/typescript/src/screens/CRMScreen.d.ts +2 -0
  53. package/lib/typescript/src/screens/CRMScreen.d.ts.map +1 -0
  54. package/lib/typescript/src/screens/HomeScreen.d.ts.map +1 -1
  55. package/lib/typescript/src/screens/NotificationsScreen.d.ts.map +1 -1
  56. package/lib/typescript/src/screens/ProfileScreen.d.ts.map +1 -1
  57. package/lib/typescript/src/screens/ReportsScreen.d.ts +1 -1
  58. package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -1
  59. package/package.json +3 -1
  60. package/react-native.config.js +9 -0
  61. package/src/SalespandaApp.tsx +28 -8
  62. package/src/assets/images/bottomtabs/analytics.png +0 -0
  63. package/src/assets/images/bottomtabs/analyticsactive.png +0 -0
  64. package/src/assets/images/bottomtabs/crm.png +0 -0
  65. package/src/assets/images/bottomtabs/crmactive.png +0 -0
  66. package/src/assets/images/bottomtabs/diary.png +0 -0
  67. package/src/assets/images/bottomtabs/diaryactive.png +0 -0
  68. package/src/assets/images/bottomtabs/home.png +0 -0
  69. package/src/assets/images/bottomtabs/homeactive.png +0 -0
  70. package/src/assets/images/bottomtabs/notification.png +0 -0
  71. package/src/assets/images/bottomtabs/notificationactive.png +0 -0
  72. package/src/assets/images/index.js +11 -0
  73. package/src/assets/images/index.ts +40 -0
  74. package/src/constants/Colors.ts +16 -0
  75. package/src/constants/GetPlatorm.ts +29 -0
  76. package/src/index.tsx +1 -1
  77. package/src/navigation/AppNavigator.tsx +5 -1
  78. package/src/navigation/BottomTabNavigator.tsx +79 -24
  79. package/src/navigation/DrawerNavigator.tsx +176 -127
  80. package/src/screens/CRMScreen.tsx +34 -0
  81. package/src/screens/HomeScreen.tsx +94 -81
  82. package/src/screens/NotificationsScreen.tsx +9 -110
  83. package/src/screens/ProfileScreen.tsx +10 -97
  84. package/src/screens/ReportsScreen.tsx +9 -166
  85. package/lib/module/screens/PremiumScreen.js +0 -222
  86. package/lib/module/screens/PremiumScreen.js.map +0 -1
  87. package/lib/typescript/src/screens/PremiumScreen.d.ts +0 -2
  88. package/lib/typescript/src/screens/PremiumScreen.d.ts.map +0 -1
  89. package/src/screens/PremiumScreen.tsx +0 -250
@@ -5,7 +5,11 @@ import {
5
5
  StyleSheet,
6
6
  TouchableOpacity,
7
7
  ScrollView,
8
+ Image,
9
+ FlatList,
10
+ Dimensions,
8
11
  } from 'react-native';
12
+ import { Colors } from '../constants/Colors';
9
13
 
10
14
  interface MenuItemProps {
11
15
  title: string;
@@ -25,35 +29,78 @@ const MenuItem: React.FC<MenuItemProps> = ({ title, icon, onPress }) => {
25
29
  };
26
30
 
27
31
  export default function HomeScreen() {
32
+ const images = [
33
+ 'https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1200&auto=format&fit=crop',
34
+ 'https://images.unsplash.com/photo-1482192596544-9eb780fc7f66?q=80&w=1200&auto=format&fit=crop',
35
+ 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=1200&auto=format&fit=crop',
36
+ 'https://images.unsplash.com/photo-1501785888041-af3ef285b470?q=80&w=1200&auto=format&fit=crop',
37
+ 'https://images.unsplash.com/photo-1460353581641-37baddab0fa2?q=80&w=1200&auto=format&fit=crop',
38
+ 'https://images.unsplash.com/photo-1496302662116-35cc4f36df92?q=80&w=1200&auto=format&fit=crop',
39
+ ];
40
+ const screenWidth = Dimensions.get('window').width;
41
+ const [activeIndex, setActiveIndex] = React.useState(0);
42
+ const flatListRef = React.useRef<any>(null);
43
+
44
+ const handleMomentumScrollEnd = (e: any) => {
45
+ const offsetX = e.nativeEvent.contentOffset.x;
46
+ const index = Math.round(offsetX / screenWidth);
47
+ setActiveIndex(index);
48
+ };
49
+ React.useEffect(() => {
50
+ const id = setInterval(() => {
51
+ setActiveIndex((prev) => {
52
+ const next = (prev + 1) % images.length;
53
+ if (flatListRef.current) {
54
+ try {
55
+ flatListRef.current.scrollToIndex({ index: next, animated: true });
56
+ } catch {
57
+ // ignore scroll failures
58
+ }
59
+ }
60
+ return next;
61
+ });
62
+ }, 2500);
63
+ return () => clearInterval(id);
64
+ }, [images.length]);
65
+
28
66
  return (
29
67
  <ScrollView style={styles.scrollView}>
30
- {/* WhatsApp Banner */}
31
- <View style={styles.banner}>
32
- <View style={styles.bannerContent}>
33
- <Text style={styles.bannerText}>
34
- Build strong relationships,{'\n'}
35
- improve relations & productivity{'\n'}
36
- by having conversations on{'\n'}
37
- WhatsAppppppppp.
38
- </Text>
39
- <TouchableOpacity style={styles.startButton}>
40
- <Text style={styles.startButtonText}>Start Sharing →</Text>
41
- </TouchableOpacity>
42
- </View>
43
- <View style={styles.whatsappIconContainer}>
44
- <View style={styles.whatsappIcon}>
45
- <Text style={styles.whatsappText}>📱</Text>
46
- </View>
68
+ {/* Edge-to-edge Image Carousel */}
69
+ <View style={styles.carouselContainer}>
70
+ <FlatList
71
+ ref={flatListRef}
72
+ data={images}
73
+ keyExtractor={(_, idx) => `${idx}`}
74
+ renderItem={({ item }) => (
75
+ <Image
76
+ source={{ uri: item }}
77
+ style={[styles.carouselImage, { width: screenWidth }]}
78
+ />
79
+ )}
80
+ horizontal
81
+ pagingEnabled
82
+ showsHorizontalScrollIndicator={false}
83
+ onMomentumScrollEnd={handleMomentumScrollEnd}
84
+ getItemLayout={(_, index) => ({
85
+ length: screenWidth,
86
+ offset: screenWidth * index,
87
+ index,
88
+ })}
89
+ />
90
+ {/* Overlay Indicators at bottom of the image */}
91
+ <View style={styles.carouselIndicatorsOverlay}>
92
+ {images.map((_, idx) => (
93
+ <View
94
+ key={idx}
95
+ style={[
96
+ styles.indicator,
97
+ idx === activeIndex ? styles.activeIndicator : null,
98
+ ]}
99
+ />
100
+ ))}
47
101
  </View>
48
102
  </View>
49
103
 
50
- {/* Carousel Indicators */}
51
- <View style={styles.carouselIndicators}>
52
- <View style={[styles.indicator, styles.activeIndicator]} />
53
- <View style={styles.indicator} />
54
- <View style={styles.indicator} />
55
- </View>
56
-
57
104
  {/* Menu Grid */}
58
105
  <View style={styles.menuGrid}>
59
106
  <MenuItem title="Content Library" icon="📚" />
@@ -79,69 +126,35 @@ export default function HomeScreen() {
79
126
  const styles = StyleSheet.create({
80
127
  scrollView: {
81
128
  flex: 1,
82
- },
83
- banner: {
84
- backgroundColor: '#4a148c',
85
- margin: 16,
86
- borderRadius: 16,
87
- padding: 20,
88
- flexDirection: 'row',
89
- justifyContent: 'space-between',
90
- alignItems: 'center',
91
- minHeight: 180,
92
- },
93
- bannerContent: {
94
- flex: 1,
95
- },
96
- bannerText: {
97
- color: '#fff',
98
- fontSize: 14,
99
- lineHeight: 20,
100
- marginBottom: 16,
101
- },
102
- startButton: {
103
- backgroundColor: 'transparent',
104
- borderWidth: 1,
105
- borderColor: '#fff',
106
- borderRadius: 20,
107
- paddingVertical: 8,
108
- paddingHorizontal: 16,
109
- alignSelf: 'flex-start',
110
- },
111
- startButtonText: {
112
- color: '#fff',
113
- fontSize: 12,
114
- fontWeight: '600',
115
- },
116
- whatsappIconContainer: {
117
- marginLeft: 16,
118
- },
119
- whatsappIcon: {
120
- width: 80,
121
- height: 80,
122
- borderRadius: 40,
123
- backgroundColor: '#25D366',
124
- justifyContent: 'center',
125
- alignItems: 'center',
126
- },
127
- whatsappText: {
128
- fontSize: 40,
129
- },
130
- carouselIndicators: {
129
+ backgroundColor: Colors.white,
130
+ },
131
+ carouselContainer: {
132
+ width: '100%',
133
+ backgroundColor: Colors.white, // subtle backplate for image load
134
+ position: 'relative',
135
+ },
136
+ carouselImage: {
137
+ height: 200,
138
+ resizeMode: 'cover',
139
+ },
140
+ carouselIndicatorsOverlay: {
141
+ position: 'absolute',
142
+ left: 0,
143
+ right: 0,
144
+ bottom: 12,
131
145
  flexDirection: 'row',
132
146
  justifyContent: 'center',
133
147
  alignItems: 'center',
134
- marginVertical: 16,
135
148
  },
136
149
  indicator: {
137
150
  width: 8,
138
151
  height: 8,
139
152
  borderRadius: 4,
140
- backgroundColor: '#d0d0d0',
153
+ backgroundColor: Colors.divider,
141
154
  marginHorizontal: 4,
142
155
  },
143
156
  activeIndicator: {
144
- backgroundColor: '#4a148c',
157
+ backgroundColor: Colors.white,
145
158
  width: 24,
146
159
  },
147
160
  menuGrid: {
@@ -153,25 +166,25 @@ const styles = StyleSheet.create({
153
166
  menuItem: {
154
167
  width: '31%',
155
168
  aspectRatio: 1,
156
- backgroundColor: '#fff',
169
+ backgroundColor: Colors.white,
157
170
  borderRadius: 16,
158
171
  padding: 12,
159
172
  marginBottom: 12,
160
173
  alignItems: 'center',
161
174
  justifyContent: 'center',
162
- shadowColor: '#000',
175
+ shadowColor: Colors.black,
163
176
  shadowOffset: { width: 0, height: 2 },
164
177
  shadowOpacity: 0.1,
165
178
  shadowRadius: 4,
166
179
  elevation: 3,
167
180
  borderWidth: 1,
168
- borderColor: '#f0f0f0',
181
+ borderColor: Colors.border,
169
182
  },
170
183
  iconContainer: {
171
184
  width: 50,
172
185
  height: 50,
173
186
  borderRadius: 25,
174
- backgroundColor: '#f5f5f5',
187
+ backgroundColor: Colors.divider,
175
188
  justifyContent: 'center',
176
189
  alignItems: 'center',
177
190
  marginBottom: 8,
@@ -182,7 +195,7 @@ const styles = StyleSheet.create({
182
195
  menuItemText: {
183
196
  fontSize: 11,
184
197
  textAlign: 'center',
185
- color: '#333',
198
+ color: Colors.black,
186
199
  fontWeight: '500',
187
200
  },
188
201
  });
@@ -1,75 +1,14 @@
1
- import React from 'react';
2
- import {
3
- View,
4
- Text,
5
- StyleSheet,
6
- SafeAreaView,
7
- ScrollView,
8
- TouchableOpacity,
9
- } from 'react-native';
10
-
11
- interface NotificationItemProps {
12
- title: string;
13
- message: string;
14
- time: string;
15
- unread?: boolean;
16
- }
17
-
18
- const NotificationItem: React.FC<NotificationItemProps> = ({
19
- title,
20
- message,
21
- time,
22
- unread = false,
23
- }) => {
24
- return (
25
- <TouchableOpacity
26
- style={[styles.notificationItem, unread && styles.unreadItem]}
27
- >
28
- <View style={styles.notificationContent}>
29
- <Text style={styles.notificationTitle}>{title}</Text>
30
- <Text style={styles.notificationMessage}>{message}</Text>
31
- <Text style={styles.notificationTime}>{time}</Text>
32
- </View>
33
- {unread && <View style={styles.unreadDot} />}
34
- </TouchableOpacity>
35
- );
36
- };
1
+ import { View, Text, StyleSheet, ScrollView } from 'react-native';
2
+ import { SafeAreaView } from 'react-native-safe-area-context';
3
+ import { Colors } from '../constants/Colors';
37
4
 
38
5
  export default function NotificationsScreen() {
39
6
  return (
40
- <SafeAreaView style={styles.container}>
7
+ <SafeAreaView style={styles.container} edges={['bottom']}>
41
8
  <View style={styles.header}>
42
- <Text style={styles.headerTitle}>Notifications</Text>
9
+ <Text style={styles.headerTitle}>Notification</Text>
43
10
  </View>
44
- <ScrollView style={styles.scrollView}>
45
- <NotificationItem
46
- title="New Message"
47
- message="You have a new message from support team"
48
- time="2 minutes ago"
49
- unread={true}
50
- />
51
- <NotificationItem
52
- title="Update Available"
53
- message="A new version of the app is available"
54
- time="1 hour ago"
55
- unread={true}
56
- />
57
- <NotificationItem
58
- title="Campaign Success"
59
- message="Your email campaign has been sent successfully"
60
- time="3 hours ago"
61
- />
62
- <NotificationItem
63
- title="Reminder"
64
- message="Don't forget to check your proposals"
65
- time="Yesterday"
66
- />
67
- <NotificationItem
68
- title="Welcome"
69
- message="Welcome to Salespanda! Get started with your first campaign"
70
- time="2 days ago"
71
- />
72
- </ScrollView>
11
+ <ScrollView style={styles.scrollView}></ScrollView>
73
12
  </SafeAreaView>
74
13
  );
75
14
  }
@@ -77,59 +16,19 @@ export default function NotificationsScreen() {
77
16
  const styles = StyleSheet.create({
78
17
  container: {
79
18
  flex: 1,
80
- backgroundColor: '#f5f5f5',
19
+ backgroundColor: Colors.background,
81
20
  },
82
21
  header: {
83
- backgroundColor: '#fff',
22
+ backgroundColor: Colors.white,
84
23
  padding: 16,
85
- borderBottomWidth: 1,
86
- borderBottomColor: '#e0e0e0',
87
24
  },
88
25
  headerTitle: {
89
26
  fontSize: 20,
90
27
  fontWeight: '600',
91
- color: '#333',
28
+ color: Colors.black,
92
29
  textAlign: 'center',
93
30
  },
94
31
  scrollView: {
95
32
  flex: 1,
96
33
  },
97
- notificationItem: {
98
- backgroundColor: '#fff',
99
- padding: 16,
100
- marginHorizontal: 16,
101
- marginTop: 16,
102
- borderRadius: 12,
103
- flexDirection: 'row',
104
- justifyContent: 'space-between',
105
- alignItems: 'center',
106
- },
107
- unreadItem: {
108
- backgroundColor: '#f0f4ff',
109
- },
110
- notificationContent: {
111
- flex: 1,
112
- },
113
- notificationTitle: {
114
- fontSize: 16,
115
- fontWeight: '600',
116
- color: '#333',
117
- marginBottom: 4,
118
- },
119
- notificationMessage: {
120
- fontSize: 14,
121
- color: '#666',
122
- marginBottom: 8,
123
- },
124
- notificationTime: {
125
- fontSize: 12,
126
- color: '#999',
127
- },
128
- unreadDot: {
129
- width: 10,
130
- height: 10,
131
- borderRadius: 5,
132
- backgroundColor: '#4a148c',
133
- marginLeft: 12,
134
- },
135
34
  });
@@ -1,55 +1,14 @@
1
- import {
2
- View,
3
- Text,
4
- StyleSheet,
5
- SafeAreaView,
6
- TouchableOpacity,
7
- Image,
8
- } from 'react-native';
1
+ import { View, Text, StyleSheet, ScrollView } from 'react-native';
2
+ import { SafeAreaView } from 'react-native-safe-area-context';
3
+ import { Colors } from '../constants/Colors';
9
4
 
10
5
  export default function ProfileScreen() {
11
6
  return (
12
- <SafeAreaView style={styles.container}>
7
+ <SafeAreaView style={styles.container} edges={['bottom']}>
13
8
  <View style={styles.header}>
14
- <Text style={styles.headerTitle}>Profile</Text>
15
- </View>
16
- <View style={styles.content}>
17
- <View style={styles.profileSection}>
18
- <Image
19
- source={{ uri: 'https://via.placeholder.com/100x100' }}
20
- style={styles.avatar}
21
- />
22
- <Text style={styles.name}>John Doe</Text>
23
- <Text style={styles.email}>john.doe@example.com</Text>
24
- </View>
25
-
26
- <View style={styles.section}>
27
- <TouchableOpacity style={styles.menuItem}>
28
- <Text style={styles.menuItemIcon}>👤</Text>
29
- <Text style={styles.menuItemText}>Edit Profile</Text>
30
- </TouchableOpacity>
31
-
32
- <TouchableOpacity style={styles.menuItem}>
33
- <Text style={styles.menuItemIcon}>⚙️</Text>
34
- <Text style={styles.menuItemText}>Settings</Text>
35
- </TouchableOpacity>
36
-
37
- <TouchableOpacity style={styles.menuItem}>
38
- <Text style={styles.menuItemIcon}>🔔</Text>
39
- <Text style={styles.menuItemText}>Notifications</Text>
40
- </TouchableOpacity>
41
-
42
- <TouchableOpacity style={styles.menuItem}>
43
- <Text style={styles.menuItemIcon}>❓</Text>
44
- <Text style={styles.menuItemText}>Help & Support</Text>
45
- </TouchableOpacity>
46
-
47
- <TouchableOpacity style={styles.menuItem}>
48
- <Text style={styles.menuItemIcon}>🚪</Text>
49
- <Text style={styles.menuItemText}>Logout</Text>
50
- </TouchableOpacity>
51
- </View>
9
+ <Text style={styles.headerTitle}>Anyaltics</Text>
52
10
  </View>
11
+ <ScrollView style={styles.scrollView}></ScrollView>
53
12
  </SafeAreaView>
54
13
  );
55
14
  }
@@ -57,65 +16,19 @@ export default function ProfileScreen() {
57
16
  const styles = StyleSheet.create({
58
17
  container: {
59
18
  flex: 1,
60
- backgroundColor: '#f5f5f5',
19
+ backgroundColor: Colors.background,
61
20
  },
62
21
  header: {
63
- backgroundColor: '#fff',
22
+ backgroundColor: Colors.white,
64
23
  padding: 16,
65
- borderBottomWidth: 1,
66
- borderBottomColor: '#e0e0e0',
67
24
  },
68
25
  headerTitle: {
69
26
  fontSize: 20,
70
27
  fontWeight: '600',
71
- color: '#333',
28
+ color: Colors.black,
72
29
  textAlign: 'center',
73
30
  },
74
- content: {
31
+ scrollView: {
75
32
  flex: 1,
76
- padding: 16,
77
- },
78
- profileSection: {
79
- backgroundColor: '#fff',
80
- borderRadius: 12,
81
- padding: 24,
82
- alignItems: 'center',
83
- marginBottom: 16,
84
- },
85
- avatar: {
86
- width: 100,
87
- height: 100,
88
- borderRadius: 50,
89
- marginBottom: 16,
90
- },
91
- name: {
92
- fontSize: 20,
93
- fontWeight: '600',
94
- color: '#333',
95
- marginBottom: 4,
96
- },
97
- email: {
98
- fontSize: 14,
99
- color: '#666',
100
- },
101
- section: {
102
- backgroundColor: '#fff',
103
- borderRadius: 12,
104
- overflow: 'hidden',
105
- },
106
- menuItem: {
107
- flexDirection: 'row',
108
- alignItems: 'center',
109
- padding: 16,
110
- borderBottomWidth: 1,
111
- borderBottomColor: '#f0f0f0',
112
- },
113
- menuItemIcon: {
114
- fontSize: 24,
115
- marginRight: 16,
116
- },
117
- menuItemText: {
118
- fontSize: 16,
119
- color: '#333',
120
33
  },
121
34
  });