react-native-salespanda 0.7.5 → 0.7.7
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/ios/Salespanda.mm +12 -6
- package/lib/module/NativeSalespanda.js.map +1 -0
- package/lib/module/SalespandaApp.js.map +1 -0
- package/lib/module/assets/images/index.js +0 -20
- package/lib/module/assets/images/index.js.map +1 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/ContactViaModal.js.map +1 -0
- package/lib/module/components/Loader.js.map +1 -0
- package/lib/module/components/ScreenHeader.js.map +1 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/TabsHeader.js.map +1 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/config/FlavorConfig.js.map +1 -0
- package/lib/module/config/SalespandaConfig.js.map +1 -0
- package/lib/module/constants/Colors.js.map +1 -0
- package/lib/module/constants/GetPlatorm.js.map +1 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/navigation/AppNavigator.js.map +1 -0
- package/lib/module/navigation/BottomTabNavigator.js.map +1 -0
- package/lib/module/navigation/DrawerNavigator.js.map +1 -0
- package/lib/module/navigation/StackNavigator.js.map +1 -0
- package/lib/module/screens/CRM/AddContactModal.js.map +1 -0
- package/lib/module/screens/CRM/CategoryTabs.js.map +1 -0
- package/lib/module/screens/CRM/ContactItem.js.map +1 -0
- package/lib/module/screens/CRM/FilterDropdown.js.map +1 -0
- package/lib/module/screens/CRM/FunnelChart.js.map +1 -0
- package/lib/module/screens/CRM/InfoCard.js.map +1 -0
- package/lib/module/screens/CRM/LeadCard.js.map +1 -0
- package/lib/module/screens/CRM/LogCallScreen.js.map +1 -0
- package/lib/module/screens/CRM/TopTabs.js.map +1 -0
- package/lib/module/screens/CRM/index.js.map +1 -0
- package/lib/module/screens/ReportsScreen.js.map +1 -0
- package/lib/module/screens/Tabs/ActivityAnalytics.js.map +1 -0
- package/lib/module/screens/Tabs/CRMScreen.js.map +1 -0
- package/lib/module/screens/Tabs/DigitalDiary.js.map +1 -0
- package/lib/module/screens/Tabs/HomeScreen.js.map +1 -0
- package/lib/module/screens/Tabs/NotificationsScreen.js.map +1 -0
- package/lib/module/screens/contentliberary/contentliberary.js.map +1 -0
- package/lib/module/services/api.js.map +1 -0
- package/lib/module/services/authService.js.map +1 -0
- package/lib/module/store/index.js.map +1 -0
- package/lib/typescript/src/NativeSalespanda.d.ts.map +1 -0
- package/lib/typescript/src/SalespandaApp.d.ts.map +1 -0
- package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ContactViaModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Loader.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/src/components/TabsHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/config/FlavorConfig.d.ts.map +1 -0
- package/lib/typescript/src/config/SalespandaConfig.d.ts.map +1 -0
- package/lib/typescript/src/constants/Colors.d.ts.map +1 -0
- package/lib/typescript/src/constants/GetPlatorm.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/navigation/AppNavigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/BottomTabNavigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/DrawerNavigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/StackNavigator.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/AddContactModal.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/CategoryTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/ContactItem.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FilterDropdown.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/FunnelChart.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/InfoCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LeadCard.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/LogCallScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/TopTabs.d.ts.map +1 -0
- package/lib/typescript/src/screens/CRM/index.d.ts.map +1 -0
- package/lib/typescript/src/screens/ReportsScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/ActivityAnalytics.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/CRMScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/DigitalDiary.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/HomeScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/Tabs/NotificationsScreen.d.ts.map +1 -0
- package/lib/typescript/src/screens/contentliberary/contentliberary.d.ts.map +1 -0
- package/lib/typescript/src/services/api.d.ts.map +1 -0
- package/lib/typescript/src/services/authService.d.ts.map +1 -0
- package/lib/typescript/src/store/index.d.ts.map +1 -0
- package/package.json +4 -3
- package/react-native.config.js +3 -4
- package/src/NativeSalespanda.ts +7 -0
- package/src/SalespandaApp.tsx +141 -0
- 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 +11 -0
- package/src/assets/images/index.ts +40 -0
- package/src/components/BottomSheet.tsx +146 -0
- package/src/components/ContactViaModal.tsx +80 -0
- package/src/components/Loader.tsx +48 -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/config/FlavorConfig.ts +55 -0
- package/src/config/SalespandaConfig.ts +142 -0
- package/src/constants/Colors.ts +17 -0
- package/src/constants/GetPlatorm.ts +29 -0
- package/src/index.tsx +31 -0
- package/src/navigation/AppNavigator.tsx +24 -0
- package/src/navigation/BottomTabNavigator.tsx +181 -0
- package/src/navigation/DrawerNavigator.tsx +306 -0
- 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 +37 -0
- 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 +379 -0
- package/src/screens/Tabs/NotificationsScreen.tsx +25 -0
- package/src/screens/contentliberary/contentliberary.tsx +268 -0
- package/src/services/api.ts +173 -0
- package/src/services/authService.ts +75 -0
- package/src/store/index.ts +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunnelChart.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/FunnelChart.tsx"],"names":[],"mappings":"AAYA,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoCard.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/InfoCard.tsx"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAY5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeadCard.d.ts","sourceRoot":"","sources":["../../../../../src/screens/CRM/LeadCard.tsx"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAe5C,CAAC"}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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;AAsD1B,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAsNvB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/services/api.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authService.d.ts","sourceRoot":"","sources":["../../../../src/services/authService.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAIF,eAAO,MAAM,KAAK,GAChB,OAAO,QAAQ,EACf,QAAQ,MAAM,EACd,cAAc,MAAM,kBAgBrB,CAAC;AAEF,eAAO,MAAM,MAAM,qBAQlB,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,OAGlC,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,QAAQ,GAAG,IAAI,CAc9D,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,MAAM,GAAG,IAG3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/store/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAMhB,CAAC;AAIH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-salespanda",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "React Native SDK for multi-tenant enterprise applications with product flavors support",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
9
10
|
"types": "./lib/typescript/src/index.d.ts",
|
|
10
11
|
"default": "./lib/module/index.js"
|
|
11
12
|
},
|
|
12
13
|
"./package.json": "./package.json"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
16
|
+
"src",
|
|
15
17
|
"lib",
|
|
16
18
|
"android",
|
|
17
19
|
"ios",
|
|
18
20
|
"cpp",
|
|
19
21
|
"*.podspec",
|
|
20
22
|
"react-native.config.js",
|
|
21
|
-
"!**/*.map",
|
|
22
23
|
"!ios/build",
|
|
23
24
|
"!android/build",
|
|
24
25
|
"!android/gradle",
|
|
@@ -178,7 +179,7 @@
|
|
|
178
179
|
"codegenConfig": {
|
|
179
180
|
"name": "SalespandaSpec",
|
|
180
181
|
"type": "modules",
|
|
181
|
-
"jsSrcsDir": "
|
|
182
|
+
"jsSrcsDir": "src",
|
|
182
183
|
"android": {
|
|
183
184
|
"javaPackageName": "com.salespanda"
|
|
184
185
|
}
|
package/react-native.config.js
CHANGED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
|
|
3
|
+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import StackNavigator from './navigation/StackNavigator';
|
|
6
|
+
import { Provider } from 'react-redux';
|
|
7
|
+
import { store } from './store';
|
|
8
|
+
import {
|
|
9
|
+
SafeAreaProvider,
|
|
10
|
+
initialWindowMetrics,
|
|
11
|
+
} from 'react-native-safe-area-context';
|
|
12
|
+
import { Colors } from './constants/Colors';
|
|
13
|
+
|
|
14
|
+
export interface SalespandaAppProps {
|
|
15
|
+
/**
|
|
16
|
+
* Custom navigation container ref for external navigation control
|
|
17
|
+
*/
|
|
18
|
+
navigationRef?: React.RefObject<any>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional theme configuration
|
|
22
|
+
*/
|
|
23
|
+
theme?: {
|
|
24
|
+
primaryColor?: string;
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* If true, the app will not render NavigationContainer
|
|
30
|
+
* (useful when embedding in an existing navigation structure)
|
|
31
|
+
*/
|
|
32
|
+
standalone?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Callback when app is ready
|
|
36
|
+
*/
|
|
37
|
+
onReady?: () => void;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Navigation type configuration
|
|
41
|
+
* - 'drawer': Drawer navigation only
|
|
42
|
+
* - 'tabs': Bottom tabs only
|
|
43
|
+
* - 'both': Drawer wrapping bottom tabs (default)
|
|
44
|
+
* @default 'both'
|
|
45
|
+
*/
|
|
46
|
+
navigationType?: 'drawer' | 'tabs' | 'both';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use navigationType instead
|
|
50
|
+
* If true, uses drawer navigation, otherwise uses bottom tabs only
|
|
51
|
+
*/
|
|
52
|
+
useDrawer?: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* If false, will not wrap with GestureHandlerRootView
|
|
56
|
+
* Set to false if your app already has gesture handler imported at the entry point
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
wrapWithGestureHandler?: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Render appropriate navigation based on type
|
|
64
|
+
*/
|
|
65
|
+
const AppContent: React.FC = () => {
|
|
66
|
+
// Always wrap with StackNavigator to support modal screens like LogCall
|
|
67
|
+
return <StackNavigator />;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Main Salespanda App Component
|
|
72
|
+
* Can be used as a standalone app or embedded in another React Native app
|
|
73
|
+
*/
|
|
74
|
+
const SalespandaApp: React.FC<SalespandaAppProps> = ({
|
|
75
|
+
navigationRef,
|
|
76
|
+
theme: _customTheme,
|
|
77
|
+
standalone = false,
|
|
78
|
+
onReady,
|
|
79
|
+
wrapWithGestureHandler = true,
|
|
80
|
+
} = {}) => {
|
|
81
|
+
// TODO: Apply custom theme to app (future enhancement)
|
|
82
|
+
// Currently theme is managed through SalespandaConfig
|
|
83
|
+
// _customTheme is reserved for future use
|
|
84
|
+
|
|
85
|
+
// If standalone mode, don't wrap with NavigationContainer
|
|
86
|
+
// (parent app will provide it)
|
|
87
|
+
if (standalone) {
|
|
88
|
+
return (
|
|
89
|
+
<Provider store={store}>
|
|
90
|
+
<AppContent />
|
|
91
|
+
</Provider>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Navigation content with SafeAreaProvider
|
|
96
|
+
const navTheme = {
|
|
97
|
+
...DefaultTheme,
|
|
98
|
+
colors: {
|
|
99
|
+
...DefaultTheme.colors,
|
|
100
|
+
background: Colors.background,
|
|
101
|
+
primary: Colors.primary,
|
|
102
|
+
card: Colors.white,
|
|
103
|
+
text: Colors.black,
|
|
104
|
+
border: Colors.border,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const NavigationContent = (
|
|
109
|
+
<Provider store={store}>
|
|
110
|
+
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
|
|
111
|
+
<NavigationContainer
|
|
112
|
+
ref={navigationRef}
|
|
113
|
+
onReady={onReady}
|
|
114
|
+
theme={navTheme}
|
|
115
|
+
>
|
|
116
|
+
<AppContent />
|
|
117
|
+
</NavigationContainer>
|
|
118
|
+
</SafeAreaProvider>
|
|
119
|
+
</Provider>
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
// Wrap with GestureHandlerRootView only if requested
|
|
123
|
+
// (default is false since most apps already have gesture handler imported)
|
|
124
|
+
if (wrapWithGestureHandler) {
|
|
125
|
+
return (
|
|
126
|
+
<GestureHandlerRootView style={styles.container}>
|
|
127
|
+
{NavigationContent}
|
|
128
|
+
</GestureHandlerRootView>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return NavigationContent;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default SalespandaApp;
|
|
136
|
+
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
container: {
|
|
139
|
+
flex: 1,
|
|
140
|
+
},
|
|
141
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
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');
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
};
|
|
@@ -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,48 @@
|
|
|
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
|
+
});
|