@oxyhq/services 5.3.11 → 5.4.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.
- package/README.md +21 -0
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/core/index.js +119 -23
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner.js +15 -11
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/node/index.js +2 -0
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +95 -112
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +6 -6
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +20 -3
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +190 -207
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +669 -401
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +695 -498
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +451 -488
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +498 -185
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2497 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +117 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +1 -1
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/core/index.js +119 -23
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner.js +13 -1
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/node/index.js +3 -0
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +97 -114
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +2 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -1
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +20 -3
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +191 -208
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +671 -403
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +698 -501
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +450 -488
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +498 -186
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2492 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +118 -14
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +1 -1
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +1 -1
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +26 -1
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/lib/sonner.d.ts +5 -1
- package/lib/typescript/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -2
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +1 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -2
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +8 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -4
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +11 -3
- package/src/__tests__/polyfills.test.ts +30 -0
- package/src/__tests__/setup.ts +43 -0
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
- package/src/assets/icons/OxyServices.tsx +67 -0
- package/src/assets/icons/logo_OxyServices.svg +1 -0
- package/src/core/index.ts +127 -19
- package/src/index.ts +3 -0
- package/src/lib/sonner.ts +10 -1
- package/src/models/interfaces.ts +1 -2
- package/src/node/index.ts +3 -0
- package/src/ui/components/GroupedItem.tsx +118 -0
- package/src/ui/components/GroupedSection.tsx +45 -0
- package/src/ui/components/OxyProvider.tsx +95 -120
- package/src/ui/components/ProfileCard.tsx +129 -0
- package/src/ui/components/QuickActions.tsx +90 -0
- package/src/ui/components/Section.tsx +37 -0
- package/src/ui/components/SectionTitle.tsx +31 -0
- package/src/ui/components/bottomSheet/index.tsx +13 -11
- package/src/ui/components/index.ts +15 -0
- package/src/ui/navigation/OxyRouter.tsx +20 -3
- package/src/ui/navigation/types.ts +10 -1
- package/src/ui/screens/AccountCenterScreen.tsx +188 -159
- package/src/ui/screens/AccountManagementDemo.tsx +297 -0
- package/src/ui/screens/AccountOverviewScreen.tsx +474 -310
- package/src/ui/screens/AccountSettingsScreen.tsx +648 -463
- package/src/ui/screens/AccountSwitcherScreen.tsx +385 -449
- package/src/ui/screens/AppInfoScreen.tsx +571 -140
- package/src/ui/screens/BillingManagementScreen.tsx +589 -0
- package/src/ui/screens/FileManagementScreen.tsx +2513 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1628 -0
- package/src/ui/screens/ProfileScreen.tsx +101 -7
- package/src/ui/screens/SessionManagementScreen.tsx +1 -0
- package/src/ui/screens/SignInScreen.tsx +1 -1
- package/src/ui/screens/SignUpScreen.tsx +1 -1
- package/src/utils/polyfills.ts +34 -0
- package/lib/commonjs/lib/sonner.web.js +0 -17
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -4
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts +0 -2
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts.map +0 -1
- package/lib/typescript/lib/sonner.web.d.ts +0 -2
- package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
- package/src/lib/sonner.web.ts +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
+
|
|
5
|
+
interface QuickAction {
|
|
6
|
+
id: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
iconColor: string;
|
|
9
|
+
title: string;
|
|
10
|
+
onPress: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface QuickActionsProps {
|
|
14
|
+
actions: QuickAction[];
|
|
15
|
+
theme: 'light' | 'dark';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const QuickActions: React.FC<QuickActionsProps> = ({ actions, theme }) => {
|
|
19
|
+
const isDarkTheme = theme === 'dark';
|
|
20
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
21
|
+
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#FFFFFF';
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<View style={[
|
|
25
|
+
styles.quickActionsContainer,
|
|
26
|
+
styles.firstGroupedItem,
|
|
27
|
+
styles.lastGroupedItem,
|
|
28
|
+
{ backgroundColor: secondaryBackgroundColor }
|
|
29
|
+
]}>
|
|
30
|
+
<View style={styles.quickActionsRow}>
|
|
31
|
+
{actions.map((action) => (
|
|
32
|
+
<View key={action.id} style={styles.quickActionItem}>
|
|
33
|
+
<TouchableOpacity
|
|
34
|
+
style={[
|
|
35
|
+
styles.quickActionCircle,
|
|
36
|
+
{ backgroundColor: isDarkTheme ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.03)' }
|
|
37
|
+
]}
|
|
38
|
+
onPress={action.onPress}
|
|
39
|
+
>
|
|
40
|
+
<Ionicons name={action.icon as any} size={24} color={action.iconColor} />
|
|
41
|
+
</TouchableOpacity>
|
|
42
|
+
<Text style={[styles.quickActionText, { color: textColor }]}>{action.title}</Text>
|
|
43
|
+
</View>
|
|
44
|
+
))}
|
|
45
|
+
</View>
|
|
46
|
+
</View>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const styles = StyleSheet.create({
|
|
51
|
+
quickActionsContainer: {
|
|
52
|
+
padding: 16,
|
|
53
|
+
marginBottom: 8,
|
|
54
|
+
},
|
|
55
|
+
firstGroupedItem: {
|
|
56
|
+
borderTopLeftRadius: 24,
|
|
57
|
+
borderTopRightRadius: 24,
|
|
58
|
+
},
|
|
59
|
+
lastGroupedItem: {
|
|
60
|
+
borderBottomLeftRadius: 24,
|
|
61
|
+
borderBottomRightRadius: 24,
|
|
62
|
+
marginBottom: 8,
|
|
63
|
+
},
|
|
64
|
+
quickActionsRow: {
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
alignItems: 'flex-start',
|
|
67
|
+
justifyContent: 'space-around',
|
|
68
|
+
flexWrap: 'wrap',
|
|
69
|
+
},
|
|
70
|
+
quickActionItem: {
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
minWidth: 70,
|
|
73
|
+
marginBottom: 8,
|
|
74
|
+
},
|
|
75
|
+
quickActionCircle: {
|
|
76
|
+
width: 50,
|
|
77
|
+
height: 50,
|
|
78
|
+
borderRadius: 25,
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
marginBottom: 8,
|
|
82
|
+
},
|
|
83
|
+
quickActionText: {
|
|
84
|
+
fontSize: 12,
|
|
85
|
+
fontWeight: '500',
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default QuickActions;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import SectionTitle from './SectionTitle';
|
|
4
|
+
|
|
5
|
+
interface SectionProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
isFirst?: boolean;
|
|
10
|
+
style?: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const Section: React.FC<SectionProps> = ({
|
|
14
|
+
title,
|
|
15
|
+
theme,
|
|
16
|
+
children,
|
|
17
|
+
isFirst = false,
|
|
18
|
+
style
|
|
19
|
+
}) => {
|
|
20
|
+
return (
|
|
21
|
+
<View style={[styles.section, isFirst && styles.firstSection, style]}>
|
|
22
|
+
{title && <SectionTitle title={title} theme={theme} />}
|
|
23
|
+
{children}
|
|
24
|
+
</View>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
section: {
|
|
30
|
+
marginBottom: 24,
|
|
31
|
+
},
|
|
32
|
+
firstSection: {
|
|
33
|
+
marginTop: 8,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export default Section;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { fontFamilies } from '../styles/fonts';
|
|
4
|
+
|
|
5
|
+
interface SectionTitleProps {
|
|
6
|
+
title: string;
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
style?: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const SectionTitle: React.FC<SectionTitleProps> = ({ title, theme, style }) => {
|
|
12
|
+
const isDarkTheme = theme === 'dark';
|
|
13
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Text style={[styles.sectionTitle, { color: textColor }, style]}>
|
|
17
|
+
{title}
|
|
18
|
+
</Text>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
sectionTitle: {
|
|
24
|
+
fontSize: 16,
|
|
25
|
+
fontWeight: '600',
|
|
26
|
+
fontFamily: fontFamilies.phuduSemiBold,
|
|
27
|
+
marginBottom: 12,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export default SectionTitle;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { BottomSheetModal, BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModalProvider, BottomSheetView } from '@gorhom/bottom-sheet';
|
|
3
|
-
|
|
4
|
-
// Re-export components from @gorhom/bottom-sheet
|
|
5
|
-
// This allows us to use these components internally without requiring the consumer to install @gorhom/bottom-sheet
|
|
1
|
+
// Re-export bottom sheet components from @gorhom/bottom-sheet
|
|
6
2
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
3
|
+
BottomSheetModal,
|
|
4
|
+
BottomSheetBackdrop,
|
|
5
|
+
BottomSheetModalProvider,
|
|
6
|
+
BottomSheetView,
|
|
7
|
+
BottomSheetScrollView,
|
|
8
|
+
} from '@gorhom/bottom-sheet';
|
|
9
|
+
|
|
10
|
+
export type {
|
|
11
|
+
BottomSheetModalProps,
|
|
12
|
+
BottomSheetBackdropProps,
|
|
13
|
+
} from '@gorhom/bottom-sheet';
|
|
14
|
+
export type { BottomSheetModalMethods as BottomSheetModalRef } from '@gorhom/bottom-sheet/lib/typescript/types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Re-export all reusable UI components
|
|
2
|
+
export { default as ProfileCard } from './ProfileCard';
|
|
3
|
+
export { default as Section } from './Section';
|
|
4
|
+
export { default as SectionTitle } from './SectionTitle';
|
|
5
|
+
export { default as GroupedItem } from './GroupedItem';
|
|
6
|
+
export { default as GroupedSection } from './GroupedSection';
|
|
7
|
+
export { default as QuickActions } from './QuickActions';
|
|
8
|
+
|
|
9
|
+
// Re-export existing components
|
|
10
|
+
export { default as Avatar } from './Avatar';
|
|
11
|
+
export { default as FollowButton } from './FollowButton';
|
|
12
|
+
export { FontLoader, setupFonts } from './FontLoader';
|
|
13
|
+
export { default as OxyLogo } from './OxyLogo';
|
|
14
|
+
export { default as OxyProvider } from './OxyProvider';
|
|
15
|
+
export { default as OxySignInButton } from './OxySignInButton';
|
|
@@ -10,6 +10,8 @@ import AccountSwitcherScreen from '../screens/AccountSwitcherScreen';
|
|
|
10
10
|
import SessionManagementScreen from '../screens/SessionManagementScreen';
|
|
11
11
|
import AccountOverviewScreen from '../screens/AccountOverviewScreen';
|
|
12
12
|
import AccountSettingsScreen from '../screens/AccountSettingsScreen';
|
|
13
|
+
import PremiumSubscriptionScreen from '../screens/PremiumSubscriptionScreen';
|
|
14
|
+
import BillingManagementScreen from '../screens/BillingManagementScreen';
|
|
13
15
|
import AppInfoScreen from '../screens/AppInfoScreen';
|
|
14
16
|
import KarmaCenterScreen from '../screens/karma/KarmaCenterScreen';
|
|
15
17
|
import KarmaLeaderboardScreen from '../screens/karma/KarmaLeaderboardScreen';
|
|
@@ -18,6 +20,7 @@ import KarmaAboutScreen from '../screens/karma/KarmaAboutScreen';
|
|
|
18
20
|
import KarmaRewardsScreen from '../screens/karma/KarmaRewardsScreen';
|
|
19
21
|
import KarmaFAQScreen from '../screens/karma/KarmaFAQScreen';
|
|
20
22
|
import ProfileScreen from '../screens/ProfileScreen';
|
|
23
|
+
import FileManagementScreen from '../screens/FileManagementScreen';
|
|
21
24
|
|
|
22
25
|
// Import types
|
|
23
26
|
import { OxyRouterProps, RouteConfig } from './types';
|
|
@@ -52,6 +55,14 @@ const routes: Record<string, RouteConfig> = {
|
|
|
52
55
|
component: AccountSettingsScreen,
|
|
53
56
|
snapPoints: ['60%', '100%'],
|
|
54
57
|
},
|
|
58
|
+
PremiumSubscription: {
|
|
59
|
+
component: PremiumSubscriptionScreen,
|
|
60
|
+
snapPoints: ['70%', '100%'],
|
|
61
|
+
},
|
|
62
|
+
BillingManagement: {
|
|
63
|
+
component: BillingManagementScreen,
|
|
64
|
+
snapPoints: ['70%', '100%'],
|
|
65
|
+
},
|
|
55
66
|
AppInfo: {
|
|
56
67
|
component: AppInfoScreen,
|
|
57
68
|
snapPoints: ['60%', '90%'],
|
|
@@ -84,6 +95,10 @@ const routes: Record<string, RouteConfig> = {
|
|
|
84
95
|
component: ProfileScreen,
|
|
85
96
|
snapPoints: ['60%', '90%'],
|
|
86
97
|
},
|
|
98
|
+
FileManagement: {
|
|
99
|
+
component: FileManagementScreen,
|
|
100
|
+
snapPoints: ['70%', '100%'],
|
|
101
|
+
},
|
|
87
102
|
};
|
|
88
103
|
|
|
89
104
|
const OxyRouter: React.FC<OxyRouterProps> = ({
|
|
@@ -94,6 +109,7 @@ const OxyRouter: React.FC<OxyRouterProps> = ({
|
|
|
94
109
|
theme,
|
|
95
110
|
adjustSnapPoints,
|
|
96
111
|
navigationRef,
|
|
112
|
+
containerWidth,
|
|
97
113
|
}) => {
|
|
98
114
|
const [currentScreen, setCurrentScreen] = useState<string>(initialScreen);
|
|
99
115
|
const [screenHistory, setScreenHistory] = useState<string[]>([initialScreen]);
|
|
@@ -149,7 +165,7 @@ const OxyRouter: React.FC<OxyRouterProps> = ({
|
|
|
149
165
|
};
|
|
150
166
|
|
|
151
167
|
// For React Native - check for global navigation events
|
|
152
|
-
let intervalId:
|
|
168
|
+
let intervalId: any = null;
|
|
153
169
|
|
|
154
170
|
if (typeof document !== 'undefined') {
|
|
155
171
|
// Web - use custom event listener
|
|
@@ -157,14 +173,14 @@ const OxyRouter: React.FC<OxyRouterProps> = ({
|
|
|
157
173
|
} else {
|
|
158
174
|
// React Native - poll for global navigation events
|
|
159
175
|
intervalId = setInterval(() => {
|
|
160
|
-
const globalNav = (
|
|
176
|
+
const globalNav = (globalThis as any).oxyNavigateEvent;
|
|
161
177
|
if (globalNav) {
|
|
162
178
|
console.log(`RN Navigation event received:`, globalNav);
|
|
163
179
|
if (globalNav.screen) {
|
|
164
180
|
navigate(globalNav.screen, globalNav.props || {});
|
|
165
181
|
}
|
|
166
182
|
// Clear the event after processing
|
|
167
|
-
(
|
|
183
|
+
(globalThis as any).oxyNavigateEvent = null;
|
|
168
184
|
}
|
|
169
185
|
}, 100); // Check every 100ms
|
|
170
186
|
}
|
|
@@ -217,6 +233,7 @@ const OxyRouter: React.FC<OxyRouterProps> = ({
|
|
|
217
233
|
onClose={onClose}
|
|
218
234
|
onAuthenticated={onAuthenticated}
|
|
219
235
|
theme={theme}
|
|
236
|
+
containerWidth={containerWidth}
|
|
220
237
|
{...screenProps}
|
|
221
238
|
/>
|
|
222
239
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OxyServices } from '../../core';
|
|
2
2
|
import { User } from '../../models/interfaces';
|
|
3
3
|
import { ComponentType, ReactNode } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { BottomSheetModalRef } from '../components/bottomSheet';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Base props for all screens in the Oxy UI system
|
|
@@ -13,6 +13,7 @@ export interface BaseScreenProps {
|
|
|
13
13
|
onClose?: () => void;
|
|
14
14
|
onAuthenticated?: (user: User) => void;
|
|
15
15
|
theme: 'light' | 'dark';
|
|
16
|
+
containerWidth?: number;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -34,6 +35,7 @@ export interface OxyRouterProps {
|
|
|
34
35
|
theme: 'light' | 'dark';
|
|
35
36
|
adjustSnapPoints: (snapPoints: string[]) => void;
|
|
36
37
|
navigationRef?: React.MutableRefObject<((screen: string, props?: Record<string, any>) => void) | null>;
|
|
38
|
+
containerWidth?: number;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
@@ -122,4 +124,11 @@ export interface OxyProviderProps {
|
|
|
122
124
|
* @default "oxy"
|
|
123
125
|
*/
|
|
124
126
|
storageKeyPrefix?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Whether to show the internal toaster in the bottom sheet
|
|
130
|
+
* If false, only the provider's global toaster will be shown
|
|
131
|
+
* @default true
|
|
132
|
+
*/
|
|
133
|
+
showInternalToaster?: boolean;
|
|
125
134
|
}
|