react-native-salespanda 0.4.2 → 0.4.3
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/lib/module/SalespandaApp.js +11 -37
- package/lib/module/SalespandaApp.js.map +1 -1
- package/lib/module/components/BottomSheet.js +141 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/ContactViaModal.js +68 -0
- package/lib/module/components/ContactViaModal.js.map +1 -0
- package/lib/module/components/ScreenHeader.js +63 -0
- package/lib/module/components/ScreenHeader.js.map +1 -0
- package/lib/module/components/SearchBar.js +57 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/TabsHeader.js +80 -0
- package/lib/module/components/TabsHeader.js.map +1 -0
- package/lib/module/components/index.js +8 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/constants/Colors.js +3 -2
- package/lib/module/constants/Colors.js.map +1 -1
- package/lib/module/index.js +6 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/AppNavigator.js +5 -4
- package/lib/module/navigation/AppNavigator.js.map +1 -1
- package/lib/module/navigation/BottomTabNavigator.js +42 -23
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -1
- package/lib/module/navigation/DrawerNavigator.js +36 -34
- package/lib/module/navigation/DrawerNavigator.js.map +1 -1
- package/lib/module/navigation/StackNavigator.js +23 -0
- package/lib/module/navigation/StackNavigator.js.map +1 -0
- package/lib/module/screens/CRM/AddContactModal.js +49 -0
- package/lib/module/screens/CRM/AddContactModal.js.map +1 -0
- package/lib/module/screens/CRM/CategoryTabs.js +70 -0
- package/lib/module/screens/CRM/CategoryTabs.js.map +1 -0
- package/lib/module/screens/CRM/ContactItem.js +168 -0
- package/lib/module/screens/CRM/ContactItem.js.map +1 -0
- package/lib/module/screens/CRM/FilterDropdown.js +39 -0
- package/lib/module/screens/CRM/FilterDropdown.js.map +1 -0
- package/lib/module/screens/CRM/FunnelChart.js +105 -0
- package/lib/module/screens/CRM/FunnelChart.js.map +1 -0
- package/lib/module/screens/CRM/InfoCard.js +56 -0
- package/lib/module/screens/CRM/InfoCard.js.map +1 -0
- package/lib/module/screens/CRM/LeadCard.js +76 -0
- package/lib/module/screens/CRM/LeadCard.js.map +1 -0
- package/lib/module/screens/CRM/LogCallScreen.js +271 -0
- package/lib/module/screens/CRM/LogCallScreen.js.map +1 -0
- package/lib/module/screens/CRM/TopTabs.js +63 -0
- package/lib/module/screens/CRM/TopTabs.js.map +1 -0
- package/lib/module/screens/CRM/index.js +13 -0
- package/lib/module/screens/CRM/index.js.map +1 -0
- package/lib/module/screens/ReportsScreen.js +6 -4
- package/lib/module/screens/ReportsScreen.js.map +1 -1
- package/lib/module/screens/Tabs/ActivityAnalytics.js +29 -0
- package/lib/module/screens/Tabs/ActivityAnalytics.js.map +1 -0
- package/lib/module/screens/Tabs/CRMScreen.js +316 -0
- package/lib/module/screens/Tabs/CRMScreen.js.map +1 -0
- package/lib/module/screens/Tabs/DigitalDiary.js +39 -0
- package/lib/module/screens/Tabs/DigitalDiary.js.map +1 -0
- package/lib/module/screens/Tabs/HomeScreen.js +240 -0
- package/lib/module/screens/Tabs/HomeScreen.js.map +1 -0
- package/lib/module/screens/Tabs/NotificationsScreen.js +29 -0
- package/lib/module/screens/Tabs/NotificationsScreen.js.map +1 -0
- package/lib/module/screens/contentliberary/contentliberary.js +283 -0
- package/lib/module/screens/contentliberary/contentliberary.js.map +1 -0
- package/lib/typescript/src/SalespandaApp.d.ts +2 -2
- package/lib/typescript/src/SalespandaApp.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet.d.ts +16 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ContactViaModal.d.ts +13 -0
- package/lib/typescript/src/components/ContactViaModal.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenHeader.d.ts +8 -0
- package/lib/typescript/src/components/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/SearchBar.d.ts +8 -0
- package/lib/typescript/src/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/src/components/TabsHeader.d.ts +8 -0
- package/lib/typescript/src/components/TabsHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +5 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/Colors.d.ts +2 -1
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts +2 -1
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts +9 -1
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts +3 -1
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -1
- package/lib/typescript/src/navigation/StackNavigator.d.ts +13 -0
- package/lib/typescript/src/navigation/StackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts +11 -0
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts +7 -0
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts +19 -0
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts +6 -0
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts +17 -0
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts +7 -0
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts +9 -0
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts +12 -0
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts +12 -0
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/index.d.ts +10 -0
- package/lib/typescript/src/screens/CRM/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/ReportsScreen.d.ts +2 -1
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts +4 -0
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts +3 -0
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts +2 -0
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +1 -0
- package/package.json +5 -1
- package/src/SalespandaApp.tsx +12 -36
- package/src/components/BottomSheet.tsx +146 -0
- package/src/components/ContactViaModal.tsx +80 -0
- package/src/components/ScreenHeader.tsx +57 -0
- package/src/components/SearchBar.tsx +59 -0
- package/src/components/TabsHeader.tsx +72 -0
- package/src/components/index.ts +5 -0
- package/src/constants/Colors.ts +2 -1
- package/src/index.tsx +6 -4
- package/src/navigation/AppNavigator.tsx +6 -4
- package/src/navigation/BottomTabNavigator.tsx +51 -22
- package/src/navigation/DrawerNavigator.tsx +38 -33
- package/src/navigation/StackNavigator.tsx +32 -0
- package/src/screens/CRM/AddContactModal.tsx +57 -0
- package/src/screens/CRM/CategoryTabs.tsx +109 -0
- package/src/screens/CRM/ContactItem.tsx +168 -0
- package/src/screens/CRM/FilterDropdown.tsx +34 -0
- package/src/screens/CRM/FunnelChart.tsx +103 -0
- package/src/screens/CRM/InfoCard.tsx +51 -0
- package/src/screens/CRM/LeadCard.tsx +69 -0
- package/src/screens/CRM/LogCallScreen.tsx +318 -0
- package/src/screens/CRM/TopTabs.tsx +95 -0
- package/src/screens/CRM/index.ts +10 -0
- package/src/screens/ReportsScreen.tsx +7 -4
- package/src/screens/Tabs/ActivityAnalytics.tsx +25 -0
- package/src/screens/Tabs/CRMScreen.tsx +381 -0
- package/src/screens/Tabs/DigitalDiary.tsx +35 -0
- package/src/screens/Tabs/HomeScreen.tsx +223 -0
- package/src/screens/Tabs/NotificationsScreen.tsx +25 -0
- package/src/screens/contentliberary/contentliberary.tsx +268 -0
- package/lib/module/screens/CRMScreen.js +0 -41
- package/lib/module/screens/CRMScreen.js.map +0 -1
- package/lib/module/screens/HomeScreen.js +0 -211
- package/lib/module/screens/HomeScreen.js.map +0 -1
- package/lib/module/screens/NotificationsScreen.js +0 -41
- package/lib/module/screens/NotificationsScreen.js.map +0 -1
- package/lib/module/screens/ProfileScreen.js +0 -41
- package/lib/module/screens/ProfileScreen.js.map +0 -1
- package/lib/typescript/src/screens/CRMScreen.d.ts +0 -2
- package/lib/typescript/src/screens/CRMScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/HomeScreen.d.ts +0 -2
- package/lib/typescript/src/screens/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/NotificationsScreen.d.ts +0 -2
- package/lib/typescript/src/screens/NotificationsScreen.d.ts.map +0 -1
- package/lib/typescript/src/screens/ProfileScreen.d.ts +0 -2
- package/lib/typescript/src/screens/ProfileScreen.d.ts.map +0 -1
- package/src/screens/CRMScreen.tsx +0 -34
- package/src/screens/HomeScreen.tsx +0 -201
- package/src/screens/NotificationsScreen.tsx +0 -34
- package/src/screens/ProfileScreen.tsx +0 -34
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface LogCallScreenProps {
|
|
2
|
+
visible?: boolean;
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
contactName?: string;
|
|
5
|
+
contactAvatar?: string;
|
|
6
|
+
contactAvatarColor?: string;
|
|
7
|
+
onSave?: (outcome: string, leadStage: string, followUpDays: string) => void;
|
|
8
|
+
showCrossOnLeft?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const LogCallScreen: React.FC<LogCallScreenProps>;
|
|
11
|
+
export default LogCallScreen;
|
|
12
|
+
//# sourceMappingURL=LogCallScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogCallScreen.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/LogCallScreen.tsx"],"names":[],"mappings":"AAkBA,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAsBD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2I/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface TopTabsProps {
|
|
2
|
+
selectedTab: 'leads' | 'prospects' | 'contacts';
|
|
3
|
+
onSelectTab: (tab: 'leads' | 'prospects' | 'contacts') => void;
|
|
4
|
+
counts: {
|
|
5
|
+
leads: number;
|
|
6
|
+
prospects: number;
|
|
7
|
+
contacts: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const TopTabs: React.FC<TopTabsProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=TopTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopTabs.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/TopTabs.tsx"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,WAAW,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;IAChD,WAAW,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAsD1C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { FilterDropdown } from './FilterDropdown';
|
|
2
|
+
export { TopTabs } from './TopTabs';
|
|
3
|
+
export { InfoCard } from './InfoCard';
|
|
4
|
+
export { CategoryTabs } from './CategoryTabs';
|
|
5
|
+
export { ContactItem } from './ContactItem';
|
|
6
|
+
export { LeadCard } from './LeadCard';
|
|
7
|
+
export { FunnelChart } from './FunnelChart';
|
|
8
|
+
export { AddContactModal } from './AddContactModal';
|
|
9
|
+
export { default as LogCallScreen } from './LogCallScreen';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsScreen.d.ts","sourceRoot":"","sources":["../../../../src/screens/ReportsScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReportsScreen.d.ts","sourceRoot":"","sources":["../../../../src/screens/ReportsScreen.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAS1B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityAnalytics.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Tabs/ActivityAnalytics.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAO9B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CRMScreen.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Tabs/CRMScreen.tsx"],"names":[],"mappings":"AA8BA,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAmTtB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalDiary.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Tabs/DigitalDiary.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAWzB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeScreen.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Tabs/HomeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiC1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAuGvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/screens/Tabs/NotificationsScreen.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAOhC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentliberary.d.ts","sourceRoot":"","sources":["../../../../../src/screens/contentliberary/contentliberary.tsx"],"names":[],"mappings":"AAyCA,MAAM,CAAC,OAAO,UAAU,eAAe,4CAoEtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-salespanda",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "sdk",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -73,9 +73,11 @@
|
|
|
73
73
|
"@react-navigation/bottom-tabs": "^7.8.2",
|
|
74
74
|
"@react-navigation/drawer": "^7.7.2",
|
|
75
75
|
"@react-navigation/native": "^7.1.19",
|
|
76
|
+
"@react-navigation/native-stack": "^7.6.4",
|
|
76
77
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
77
78
|
"@types/jest": "^29.5.14",
|
|
78
79
|
"@types/react": "^19.1.0",
|
|
80
|
+
"@types/react-native-vector-icons": "^6.4.18",
|
|
79
81
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
80
82
|
"commitlint": "^19.8.1",
|
|
81
83
|
"del-cli": "^6.0.0",
|
|
@@ -91,6 +93,8 @@
|
|
|
91
93
|
"react-native-reanimated": "^3.15.4",
|
|
92
94
|
"react-native-safe-area-context": "^5.6.2",
|
|
93
95
|
"react-native-screens": "^4.18.0",
|
|
96
|
+
"react-native-size-matters": "^0.4.2",
|
|
97
|
+
"react-native-vector-icons": "^10.2.0",
|
|
94
98
|
"release-it": "^19.0.4",
|
|
95
99
|
"turbo": "^2.5.6",
|
|
96
100
|
"typescript": "^5.9.2"
|
package/src/SalespandaApp.tsx
CHANGED
|
@@ -2,8 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
|
|
3
3
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
|
-
import
|
|
6
|
-
import BottomTabNavigator from './navigation/BottomTabNavigator';
|
|
5
|
+
import StackNavigator from './navigation/StackNavigator';
|
|
7
6
|
import {
|
|
8
7
|
SafeAreaProvider,
|
|
9
8
|
initialWindowMetrics,
|
|
@@ -61,55 +60,30 @@ export interface SalespandaAppProps {
|
|
|
61
60
|
/**
|
|
62
61
|
* Render appropriate navigation based on type
|
|
63
62
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}) {
|
|
69
|
-
switch (navigationType) {
|
|
70
|
-
case 'drawer':
|
|
71
|
-
// Drawer navigation only (no tabs)
|
|
72
|
-
return <DrawerNavigator />;
|
|
73
|
-
|
|
74
|
-
case 'tabs':
|
|
75
|
-
// Bottom tabs only (no drawer)
|
|
76
|
-
return <BottomTabNavigator />;
|
|
77
|
-
|
|
78
|
-
case 'both':
|
|
79
|
-
default:
|
|
80
|
-
// Drawer wrapping bottom tabs (recommended)
|
|
81
|
-
// The DrawerNavigator will internally render BottomTabNavigator
|
|
82
|
-
return <DrawerNavigator />;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
63
|
+
const AppContent: React.FC = () => {
|
|
64
|
+
// Always wrap with StackNavigator to support modal screens like LogCall
|
|
65
|
+
return <StackNavigator />;
|
|
66
|
+
};
|
|
85
67
|
|
|
86
68
|
/**
|
|
87
69
|
* Main Salespanda App Component
|
|
88
70
|
* Can be used as a standalone app or embedded in another React Native app
|
|
89
71
|
*/
|
|
90
|
-
|
|
72
|
+
const SalespandaApp: React.FC<SalespandaAppProps> = ({
|
|
91
73
|
navigationRef,
|
|
92
74
|
theme: _customTheme,
|
|
93
75
|
standalone = false,
|
|
94
76
|
onReady,
|
|
95
|
-
navigationType = 'both',
|
|
96
|
-
useDrawer, // deprecated, kept for backward compatibility
|
|
97
77
|
wrapWithGestureHandler = true,
|
|
98
|
-
}
|
|
78
|
+
} = {}) => {
|
|
99
79
|
// TODO: Apply custom theme to app (future enhancement)
|
|
100
80
|
// Currently theme is managed through SalespandaConfig
|
|
101
81
|
// _customTheme is reserved for future use
|
|
102
82
|
|
|
103
|
-
// Handle backward compatibility with useDrawer prop
|
|
104
|
-
let finalNavigationType = navigationType;
|
|
105
|
-
if (useDrawer !== undefined) {
|
|
106
|
-
finalNavigationType = useDrawer ? 'drawer' : 'tabs';
|
|
107
|
-
}
|
|
108
|
-
|
|
109
83
|
// If standalone mode, don't wrap with NavigationContainer
|
|
110
84
|
// (parent app will provide it)
|
|
111
85
|
if (standalone) {
|
|
112
|
-
return <AppContent
|
|
86
|
+
return <AppContent />;
|
|
113
87
|
}
|
|
114
88
|
|
|
115
89
|
// Navigation content with SafeAreaProvider
|
|
@@ -132,7 +106,7 @@ export default function SalespandaApp({
|
|
|
132
106
|
onReady={onReady}
|
|
133
107
|
theme={navTheme}
|
|
134
108
|
>
|
|
135
|
-
<AppContent
|
|
109
|
+
<AppContent />
|
|
136
110
|
</NavigationContainer>
|
|
137
111
|
</SafeAreaProvider>
|
|
138
112
|
);
|
|
@@ -148,7 +122,9 @@ export default function SalespandaApp({
|
|
|
148
122
|
}
|
|
149
123
|
|
|
150
124
|
return NavigationContent;
|
|
151
|
-
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export default SalespandaApp;
|
|
152
128
|
|
|
153
129
|
const styles = StyleSheet.create({
|
|
154
130
|
container: {
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
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/constants/Colors.ts
CHANGED
|
@@ -4,13 +4,14 @@ export const Colors = {
|
|
|
4
4
|
white: '#ffffff',
|
|
5
5
|
black: '#322F2F',
|
|
6
6
|
background: '#ffffff',
|
|
7
|
-
border: '#
|
|
7
|
+
border: '#ffffff',
|
|
8
8
|
divider: '#e0e0e0',
|
|
9
9
|
white50: 'rgba(255, 255, 255, 0.5)',
|
|
10
10
|
black50: 'rgba(0, 0, 0, 0.2)',
|
|
11
11
|
black30: 'rgba(0, 0, 0, 0.3)',
|
|
12
12
|
black20: 'rgba(0, 0, 0, 0.2)',
|
|
13
13
|
black10: 'rgba(0, 0, 0, 0.1)',
|
|
14
|
+
lightblue: '#E1F5FE',
|
|
14
15
|
} as const;
|
|
15
16
|
|
|
16
17
|
export type ColorKey = keyof typeof Colors;
|