@umituz/react-native-firebase 2.4.2 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-firebase",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "Unified Firebase package for React Native apps - Auth and Firestore services using Firebase JS SDK (no native modules).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -26,6 +26,3 @@ export {
26
26
  reauthenticateWithApple,
27
27
  getAppleReauthCredential,
28
28
  } from './infrastructure/services/reauthentication.service';
29
-
30
- export { PasswordPromptScreen } from './presentation/components/PasswordPromptScreen';
31
- export type { PasswordPromptScreenProps } from './presentation/components/PasswordPromptScreen';
@@ -1,170 +0,0 @@
1
- /**
2
- * Password Prompt Screen
3
- * Navigation screen for password input during account deletion reauthentication
4
- */
5
-
6
- import React, { useState, useEffect } from 'react';
7
- import { View, StyleSheet, KeyboardAvoidingView, Platform, TouchableOpacity } from 'react-native';
8
- import {
9
- AtomicInput,
10
- AtomicButton,
11
- AtomicText,
12
- AtomicIcon,
13
- SafeAreaView,
14
- useAppDesignTokens
15
- } from '@umituz/react-native-design-system';
16
-
17
- export interface PasswordPromptScreenProps {
18
- route: {
19
- params: {
20
- onComplete: (password: string | null) => void;
21
- title?: string;
22
- message?: string;
23
- confirmText?: string;
24
- cancelText?: string;
25
- };
26
- };
27
- navigation: {
28
- goBack: () => void;
29
- };
30
- }
31
-
32
- export const PasswordPromptScreen: React.FC<PasswordPromptScreenProps> = ({
33
- route,
34
- navigation,
35
- }) => {
36
- const tokens = useAppDesignTokens();
37
- const [password, setPassword] = useState('');
38
- const [error, setError] = useState('');
39
-
40
- const {
41
- onComplete,
42
- title = 'Password Required',
43
- message = 'Enter your password to continue',
44
- confirmText = 'Confirm',
45
- cancelText = 'Cancel',
46
- } = route.params;
47
-
48
- useEffect(() => {
49
- return () => {
50
- onComplete(null);
51
- };
52
- }, [onComplete]);
53
-
54
- const handleConfirm = () => {
55
- if (!password.trim()) {
56
- setError('Password is required');
57
- return;
58
- }
59
- onComplete(password);
60
- navigation.goBack();
61
- };
62
-
63
- const handleCancel = () => {
64
- onComplete(null);
65
- navigation.goBack();
66
- };
67
-
68
- return (
69
- <SafeAreaView style={[styles.safeArea, { backgroundColor: tokens.colors.background }]} edges={['top', 'bottom']}>
70
- <View style={[styles.headerBar, { borderBottomColor: tokens.colors.border }]}>
71
- <TouchableOpacity onPress={handleCancel} style={styles.closeButton}>
72
- <AtomicIcon name="close" size="lg" color="textSecondary" />
73
- </TouchableOpacity>
74
- <AtomicText type="headlineLarge" fontWeight="600" color="textPrimary">
75
- {title}
76
- </AtomicText>
77
- <View style={styles.placeholder} />
78
- </View>
79
-
80
- <KeyboardAvoidingView
81
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
82
- style={styles.keyboardView}
83
- >
84
- <View style={[styles.container, { padding: tokens.spacing.xl }]}>
85
- <View style={styles.messageContainer}>
86
- <AtomicText type="bodyMedium" color="textSecondary" style={styles.message}>
87
- {message}
88
- </AtomicText>
89
- </View>
90
-
91
- <View style={styles.content}>
92
- <AtomicInput
93
- value={password}
94
- onChangeText={(text: string) => {
95
- setPassword(text);
96
- setError('');
97
- }}
98
- placeholder="Password"
99
- secureTextEntry
100
- autoFocus
101
- state={error ? 'error' : 'default'}
102
- helperText={error}
103
- style={{ marginBottom: tokens.spacing.md }}
104
- />
105
- </View>
106
-
107
- <View style={[styles.buttons, { gap: tokens.spacing.sm }]}>
108
- <AtomicButton
109
- title={cancelText}
110
- onPress={handleCancel}
111
- variant="secondary"
112
- style={styles.button}
113
- />
114
- <AtomicButton
115
- title={confirmText}
116
- onPress={handleConfirm}
117
- variant="primary"
118
- style={styles.button}
119
- />
120
- </View>
121
- </View>
122
- </KeyboardAvoidingView>
123
- </SafeAreaView>
124
- );
125
- };
126
-
127
- const styles = StyleSheet.create({
128
- safeArea: {
129
- flex: 1,
130
- },
131
- headerBar: {
132
- flexDirection: 'row',
133
- alignItems: 'center',
134
- justifyContent: 'space-between',
135
- paddingHorizontal: 16,
136
- paddingVertical: 12,
137
- borderBottomWidth: 1,
138
- },
139
- closeButton: {
140
- padding: 4,
141
- width: 40,
142
- },
143
- placeholder: {
144
- width: 40,
145
- },
146
- keyboardView: {
147
- flex: 1,
148
- },
149
- container: {
150
- flex: 1,
151
- justifyContent: 'center',
152
- },
153
- messageContainer: {
154
- marginBottom: 24,
155
- },
156
- message: {
157
- textAlign: 'center',
158
- lineHeight: 22,
159
- },
160
- content: {
161
- flex: 1,
162
- justifyContent: 'center',
163
- },
164
- buttons: {
165
- flexDirection: 'row',
166
- },
167
- button: {
168
- flex: 1,
169
- },
170
- });