@oxyhq/services 5.21.5 → 5.21.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.
Files changed (177) hide show
  1. package/lib/commonjs/crypto/keyManager.js +67 -22
  2. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  3. package/lib/commonjs/index.js +66 -0
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/ui/components/BottomSheetRouter.js +100 -286
  6. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedItem.js +0 -3
  8. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxyProvider.js +14 -19
  10. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  11. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +57 -0
  12. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  13. package/lib/commonjs/ui/components/profile/EditBioModal.js +24 -156
  14. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -1
  15. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +28 -178
  16. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -1
  17. package/lib/commonjs/ui/components/profile/EditEmailModal.js +32 -159
  18. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -1
  19. package/lib/commonjs/ui/components/profile/EditLocationModal.js +45 -227
  20. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -1
  21. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +30 -155
  22. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -1
  23. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +177 -0
  24. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -0
  25. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -123
  26. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -32
  28. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -31
  30. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/useFileFiltering.js +76 -0
  32. package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -0
  33. package/lib/commonjs/ui/navigation/bottomSheetManager.js +43 -145
  34. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -2
  36. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/FileManagementScreen.js +2 -2
  38. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  39. package/lib/commonjs/ui/utils/authHelpers.js +164 -0
  40. package/lib/commonjs/ui/utils/authHelpers.js.map +1 -0
  41. package/lib/commonjs/ui/utils/avatarUtils.js +18 -61
  42. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  43. package/lib/module/crypto/keyManager.js +67 -22
  44. package/lib/module/crypto/keyManager.js.map +1 -1
  45. package/lib/module/index.js +6 -0
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/ui/components/BottomSheetRouter.js +102 -284
  48. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  49. package/lib/module/ui/components/GroupedItem.js +0 -3
  50. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  51. package/lib/module/ui/components/OxyProvider.js +14 -19
  52. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  53. package/lib/module/ui/components/fileManagement/AnimatedButton.js +50 -0
  54. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  55. package/lib/module/ui/components/profile/EditBioModal.js +24 -156
  56. package/lib/module/ui/components/profile/EditBioModal.js.map +1 -1
  57. package/lib/module/ui/components/profile/EditDisplayNameModal.js +28 -178
  58. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -1
  59. package/lib/module/ui/components/profile/EditEmailModal.js +32 -159
  60. package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -1
  61. package/lib/module/ui/components/profile/EditLocationModal.js +45 -227
  62. package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -1
  63. package/lib/module/ui/components/profile/EditUsernameModal.js +30 -155
  64. package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -1
  65. package/lib/module/ui/hooks/mutations/mutationFactory.js +173 -0
  66. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -0
  67. package/lib/module/ui/hooks/mutations/useAccountMutations.js +10 -122
  68. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  69. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -32
  70. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  71. package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -31
  72. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  73. package/lib/module/ui/hooks/useFileFiltering.js +72 -0
  74. package/lib/module/ui/hooks/useFileFiltering.js.map +1 -0
  75. package/lib/module/ui/navigation/bottomSheetManager.js +37 -135
  76. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  77. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -2
  78. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  79. package/lib/module/ui/screens/FileManagementScreen.js +2 -2
  80. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  81. package/lib/module/ui/utils/authHelpers.js +154 -0
  82. package/lib/module/ui/utils/authHelpers.js.map +1 -0
  83. package/lib/module/ui/utils/avatarUtils.js +18 -61
  84. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  85. package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/index.d.ts +6 -0
  87. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +2 -7
  89. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  93. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +1 -0
  98. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  101. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  103. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  105. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  107. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +29 -0
  109. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +11 -60
  111. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +99 -0
  114. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  116. package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
  117. package/lib/typescript/module/index.d.ts +6 -0
  118. package/lib/typescript/module/index.d.ts.map +1 -1
  119. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +2 -7
  120. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  121. package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +1 -1
  122. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  123. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  124. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  125. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +1 -1
  126. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
  127. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +1 -1
  128. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +1 -0
  129. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +1 -1
  130. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
  131. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  132. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  133. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  134. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  135. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  136. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  137. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  138. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  139. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +29 -0
  140. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -0
  141. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +11 -60
  142. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  144. package/lib/typescript/module/ui/utils/authHelpers.d.ts +99 -0
  145. package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -0
  146. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  147. package/package.json +2 -2
  148. package/src/crypto/keyManager.ts +23 -22
  149. package/src/index.ts +25 -0
  150. package/src/ui/components/BottomSheetRouter.tsx +97 -319
  151. package/src/ui/components/GroupedItem.tsx +0 -4
  152. package/src/ui/components/OxyProvider.tsx +13 -18
  153. package/src/ui/components/fileManagement/AnimatedButton.tsx +56 -0
  154. package/src/ui/components/profile/EditBioModal.tsx +38 -176
  155. package/src/ui/components/profile/EditDisplayNameModal.tsx +48 -195
  156. package/src/ui/components/profile/EditEmailModal.tsx +49 -180
  157. package/src/ui/components/profile/EditLocationModal.tsx +76 -263
  158. package/src/ui/components/profile/EditUsernameModal.tsx +47 -175
  159. package/src/ui/hooks/mutations/mutationFactory.ts +215 -0
  160. package/src/ui/hooks/mutations/useAccountMutations.ts +48 -136
  161. package/src/ui/hooks/queries/useAccountQueries.ts +6 -33
  162. package/src/ui/hooks/queries/useServicesQueries.ts +6 -32
  163. package/src/ui/hooks/useFileFiltering.ts +115 -0
  164. package/src/ui/navigation/bottomSheetManager.ts +43 -150
  165. package/src/ui/screens/AccountSettingsScreen.tsx +0 -2
  166. package/src/ui/screens/FileManagementScreen.tsx +2 -2
  167. package/src/ui/utils/authHelpers.ts +183 -0
  168. package/src/ui/utils/avatarUtils.ts +25 -65
  169. package/lib/commonjs/ui/hooks/use-haptic-press.js +0 -21
  170. package/lib/commonjs/ui/hooks/use-haptic-press.js.map +0 -1
  171. package/lib/module/ui/hooks/use-haptic-press.js +0 -17
  172. package/lib/module/ui/hooks/use-haptic-press.js.map +0 -1
  173. package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts +0 -8
  174. package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts.map +0 -1
  175. package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts +0 -8
  176. package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts.map +0 -1
  177. package/src/ui/hooks/use-haptic-press.ts +0 -15
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import React, { useState, useEffect } from 'react';
4
- import { View, Text, TextInput, TouchableOpacity, StyleSheet, Modal, Platform } from 'react-native';
5
- import { Ionicons } from '@expo/vector-icons';
6
- import { useThemeStyles } from "../../hooks/useThemeStyles.js";
7
- import { useColorScheme } from "../../hooks/use-color-scheme.js";
8
- import { useI18n } from "../../hooks/useI18n.js";
9
- import { fontFamilies } from "../../styles/fonts.js";
3
+ import React from 'react';
4
+ import { EditFieldModal } from "./EditFieldModal.js";
10
5
  import { useProfileEditing } from "../../hooks/useProfileEditing.js";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { useI18n } from "../../hooks/useI18n.js";
7
+ import { EMAIL_REGEX } from "../../../utils/validationUtils.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
12
9
  export const EditEmailModal = ({
13
10
  visible,
14
11
  onClose,
@@ -19,160 +16,36 @@ export const EditEmailModal = ({
19
16
  const {
20
17
  t
21
18
  } = useI18n();
22
- const colorScheme = useColorScheme();
23
- const themeStyles = useThemeStyles(theme || 'light', colorScheme);
24
- const colors = themeStyles.colors;
25
19
  const {
26
- updateField,
27
- isSaving
20
+ updateField
28
21
  } = useProfileEditing();
29
- const [email, setEmail] = useState(initialValue);
30
- useEffect(() => {
31
- if (visible) {
32
- setEmail(initialValue);
33
- }
34
- }, [visible, initialValue]);
35
- const handleSave = async () => {
36
- const success = await updateField('email', email);
37
- if (success) {
38
- onSave?.();
39
- onClose();
40
- }
41
- };
42
- const isValidEmail = email => {
43
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
44
- };
45
- return /*#__PURE__*/_jsx(Modal, {
22
+ return /*#__PURE__*/_jsx(EditFieldModal, {
46
23
  visible: visible,
47
- animationType: "slide",
48
- transparent: true,
49
- onRequestClose: onClose,
50
- children: /*#__PURE__*/_jsx(View, {
51
- style: styles.modalOverlay,
52
- children: /*#__PURE__*/_jsxs(View, {
53
- style: [styles.modalContent, {
54
- backgroundColor: colors.background
55
- }],
56
- children: [/*#__PURE__*/_jsxs(View, {
57
- style: styles.modalHeader,
58
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
59
- onPress: onClose,
60
- style: styles.closeButton,
61
- children: /*#__PURE__*/_jsx(Ionicons, {
62
- name: "close",
63
- size: 24,
64
- color: colors.text
65
- })
66
- }), /*#__PURE__*/_jsx(Text, {
67
- style: [styles.modalTitle, {
68
- color: colors.text
69
- }],
70
- children: t('editProfile.items.email.title') || 'Email'
71
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
72
- onPress: handleSave,
73
- disabled: isSaving || !isValidEmail(email),
74
- style: [styles.saveButton, {
75
- opacity: isSaving || !isValidEmail(email) ? 0.5 : 1
76
- }],
77
- children: /*#__PURE__*/_jsx(Text, {
78
- style: [styles.saveButtonText, {
79
- color: colors.tint
80
- }],
81
- children: isSaving ? 'Saving...' : 'Save'
82
- })
83
- })]
84
- }), /*#__PURE__*/_jsx(View, {
85
- style: styles.modalBody,
86
- children: /*#__PURE__*/_jsxs(View, {
87
- style: styles.inputGroup,
88
- children: [/*#__PURE__*/_jsx(Text, {
89
- style: [styles.label, {
90
- color: colors.text
91
- }],
92
- children: t('editProfile.items.email.label') || 'Email Address'
93
- }), /*#__PURE__*/_jsx(TextInput, {
94
- style: [styles.input, {
95
- backgroundColor: colors.card,
96
- color: colors.text,
97
- borderColor: colors.border
98
- }],
99
- value: email,
100
- onChangeText: setEmail,
101
- placeholder: t('editProfile.items.email.placeholder') || 'Enter your email address',
102
- placeholderTextColor: colors.secondaryText,
103
- autoFocus: true,
104
- keyboardType: "email-address",
105
- autoCapitalize: "none",
106
- autoCorrect: false,
107
- selectionColor: colors.tint
108
- })]
109
- })
110
- })]
111
- })
112
- })
24
+ onClose: onClose,
25
+ title: t('editProfile.items.email.title') || 'Email',
26
+ theme: theme,
27
+ onSave: onSave,
28
+ variant: "single",
29
+ fields: [{
30
+ key: 'email',
31
+ label: t('editProfile.items.email.label') || 'Email Address',
32
+ initialValue,
33
+ placeholder: t('editProfile.items.email.placeholder') || 'Enter your email address',
34
+ validation: value => {
35
+ if (!EMAIL_REGEX.test(value)) {
36
+ return t('editProfile.items.email.invalid') || 'Please enter a valid email address';
37
+ }
38
+ return undefined;
39
+ },
40
+ inputProps: {
41
+ keyboardType: 'email-address',
42
+ autoCapitalize: 'none',
43
+ autoCorrect: false
44
+ }
45
+ }],
46
+ onSubmit: async data => {
47
+ return await updateField('email', data.email);
48
+ }
113
49
  });
114
50
  };
115
- const styles = StyleSheet.create({
116
- modalOverlay: {
117
- flex: 1,
118
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
119
- justifyContent: 'flex-end'
120
- },
121
- modalContent: {
122
- borderTopLeftRadius: 20,
123
- borderTopRightRadius: 20,
124
- paddingTop: Platform.OS === 'ios' ? 20 : 16,
125
- maxHeight: '80%'
126
- },
127
- modalHeader: {
128
- flexDirection: 'row',
129
- alignItems: 'center',
130
- justifyContent: 'space-between',
131
- paddingHorizontal: 16,
132
- paddingBottom: 16,
133
- borderBottomWidth: StyleSheet.hairlineWidth,
134
- borderBottomColor: '#E5E5EA'
135
- },
136
- closeButton: {
137
- width: 40,
138
- height: 40,
139
- alignItems: 'center',
140
- justifyContent: 'center'
141
- },
142
- modalTitle: {
143
- fontSize: 18,
144
- fontWeight: '600',
145
- fontFamily: fontFamilies.phuduSemiBold,
146
- flex: 1,
147
- textAlign: 'center'
148
- },
149
- saveButton: {
150
- paddingHorizontal: 16,
151
- paddingVertical: 8
152
- },
153
- saveButtonText: {
154
- fontSize: 16,
155
- fontWeight: '600',
156
- fontFamily: fontFamilies.phuduSemiBold
157
- },
158
- modalBody: {
159
- padding: 16,
160
- gap: 16
161
- },
162
- inputGroup: {
163
- gap: 8
164
- },
165
- label: {
166
- fontSize: 14,
167
- fontWeight: '600',
168
- fontFamily: fontFamilies.phuduSemiBold
169
- },
170
- input: {
171
- borderWidth: StyleSheet.hairlineWidth,
172
- borderRadius: 12,
173
- padding: 16,
174
- fontSize: 16,
175
- minHeight: 52
176
- }
177
- });
178
51
  //# sourceMappingURL=EditEmailModal.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","useEffect","View","Text","TextInput","TouchableOpacity","StyleSheet","Modal","Platform","Ionicons","useThemeStyles","useColorScheme","useI18n","fontFamilies","useProfileEditing","jsx","_jsx","jsxs","_jsxs","EditEmailModal","visible","onClose","initialValue","theme","onSave","t","colorScheme","themeStyles","colors","updateField","isSaving","email","setEmail","handleSave","success","isValidEmail","test","animationType","transparent","onRequestClose","children","style","styles","modalOverlay","modalContent","backgroundColor","background","modalHeader","onPress","closeButton","name","size","color","text","modalTitle","disabled","saveButton","opacity","saveButtonText","tint","modalBody","inputGroup","label","input","card","borderColor","border","value","onChangeText","placeholder","placeholderTextColor","secondaryText","autoFocus","keyboardType","autoCapitalize","autoCorrect","selectionColor","create","flex","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingTop","OS","maxHeight","flexDirection","alignItems","paddingHorizontal","paddingBottom","borderBottomWidth","hairlineWidth","borderBottomColor","width","height","fontSize","fontWeight","fontFamily","phuduSemiBold","textAlign","paddingVertical","padding","gap","borderWidth","borderRadius","minHeight"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditEmailModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,SACIC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,gBAAgB,EAChBC,UAAU,EACVC,KAAK,EACLC,QAAQ,QACL,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,cAAc,QAAQ,+BAA4B;AAC3D,SAASC,cAAc,QAAQ,iCAA8B;AAC7D,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,iBAAiB,QAAQ,kCAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUlE,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAC1DC,OAAO;EACPC,OAAO;EACPC,YAAY,GAAG,EAAE;EACjBC,KAAK,GAAG,OAAO;EACfC;AACJ,CAAC,KAAK;EACF,MAAM;IAAEC;EAAE,CAAC,GAAGb,OAAO,CAAC,CAAC;EACvB,MAAMc,WAAW,GAAGf,cAAc,CAAC,CAAC;EACpC,MAAMgB,WAAW,GAAGjB,cAAc,CAACa,KAAK,IAAI,OAAO,EAAEG,WAAW,CAAC;EACjE,MAAME,MAAM,GAAGD,WAAW,CAACC,MAAM;EACjC,MAAM;IAAEC,WAAW;IAAEC;EAAS,CAAC,GAAGhB,iBAAiB,CAAC,CAAC;EAErD,MAAM,CAACiB,KAAK,EAAEC,QAAQ,CAAC,GAAGhC,QAAQ,CAACsB,YAAY,CAAC;EAEhDrB,SAAS,CAAC,MAAM;IACZ,IAAImB,OAAO,EAAE;MACTY,QAAQ,CAACV,YAAY,CAAC;IAC1B;EACJ,CAAC,EAAE,CAACF,OAAO,EAAEE,YAAY,CAAC,CAAC;EAE3B,MAAMW,UAAU,GAAG,MAAAA,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EnF,YAAY,CAACoF;EAC7B,CAAC;EACDrC,SAAS,EAAE;IACPwC,OAAO,EAAE,EAAE;IACXC,GAAG,EAAE;EACT,CAAC;EACDxC,UAAU,EAAE;IACRwC,GAAG,EAAE;EACT,CAAC;EACDvC,KAAK,EAAE;IACHgC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEnF,YAAY,CAACoF;EAC7B,CAAC;EACDlC,KAAK,EAAE;IACHuC,WAAW,EAAEhG,UAAU,CAACoF,aAAa;IACrCa,YAAY,EAAE,EAAE;IAChBH,OAAO,EAAE,EAAE;IACXN,QAAQ,EAAE,EAAE;IACZU,SAAS,EAAE;EACf;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","EditFieldModal","useProfileEditing","useI18n","EMAIL_REGEX","jsx","_jsx","EditEmailModal","visible","onClose","initialValue","theme","onSave","t","updateField","title","variant","fields","key","label","placeholder","validation","value","test","undefined","inputProps","keyboardType","autoCapitalize","autoCorrect","onSubmit","data","email"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditEmailModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,WAAW,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU7D,OAAO,MAAMC,cAA6C,GAAGA,CAAC;EAC5DC,OAAO;EACPC,OAAO;EACPC,YAAY,GAAG,EAAE;EACjBC,KAAK,GAAG,OAAO;EACfC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAGV,OAAO,CAAC,CAAC;EACvB,MAAM;IAAEW;EAAY,CAAC,GAAGZ,iBAAiB,CAAC,CAAC;EAE3C,oBACEI,IAAA,CAACL,cAAc;IACbO,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IACjBM,KAAK,EAAEF,CAAC,CAAC,+BAA+B,CAAC,IAAI,OAAQ;IACrDF,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfI,OAAO,EAAC,QAAQ;IAChBC,MAAM,EAAE,CACN;MACEC,GAAG,EAAE,OAAO;MACZC,KAAK,EAAEN,CAAC,CAAC,+BAA+B,CAAC,IAAI,eAAe;MAC5DH,YAAY;MACZU,WAAW,EAAEP,CAAC,CAAC,qCAAqC,CAAC,IAAI,0BAA0B;MACnFQ,UAAU,EAAGC,KAAK,IAAK;QACrB,IAAI,CAAClB,WAAW,CAACmB,IAAI,CAACD,KAAK,CAAC,EAAE;UAC5B,OAAOT,CAAC,CAAC,iCAAiC,CAAC,IAAI,oCAAoC;QACrF;QACA,OAAOW,SAAS;MAClB,CAAC;MACDC,UAAU,EAAE;QACVC,YAAY,EAAE,eAAe;QAC7BC,cAAc,EAAE,MAAM;QACtBC,WAAW,EAAE;MACf;IACF,CAAC,CACD;IACFC,QAAQ,EAAE,MAAOC,IAAI,IAAK;MACxB,OAAO,MAAMhB,WAAW,CAAC,OAAO,EAAEgB,IAAI,CAACC,KAAe,CAAC;IACzD;EAAE,CACH,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import React, { useState, useEffect } from 'react';
4
- import { View, Text, TextInput, TouchableOpacity, StyleSheet, Modal, Platform, ScrollView } from 'react-native';
3
+ import React from 'react';
4
+ import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
5
5
  import { Ionicons } from '@expo/vector-icons';
6
- import { useThemeStyles } from "../../hooks/useThemeStyles.js";
7
- import { useColorScheme } from "../../hooks/use-color-scheme.js";
8
- import { useI18n } from "../../hooks/useI18n.js";
9
- import { fontFamilies } from "../../styles/fonts.js";
6
+ import { EditFieldModal } from "./EditFieldModal.js";
10
7
  import { useProfileEditing } from "../../hooks/useProfileEditing.js";
8
+ import { useI18n } from "../../hooks/useI18n.js";
11
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
10
  export const EditLocationModal = ({
13
11
  visible,
@@ -19,242 +17,62 @@ export const EditLocationModal = ({
19
17
  const {
20
18
  t
21
19
  } = useI18n();
22
- const colorScheme = useColorScheme();
23
- const themeStyles = useThemeStyles(theme || 'light', colorScheme);
24
- const colors = themeStyles.colors;
25
20
  const {
26
- saveProfile,
27
- isSaving
21
+ saveProfile
28
22
  } = useProfileEditing();
29
- const [locations, setLocations] = useState(initialLocations);
30
- const [newLocation, setNewLocation] = useState('');
31
- useEffect(() => {
32
- if (visible) {
33
- setLocations(initialLocations);
34
- setNewLocation('');
35
- }
36
- }, [visible, initialLocations]);
37
- const handleAddLocation = () => {
38
- if (!newLocation.trim()) return;
39
- const location = {
40
- id: `location-${Date.now()}`,
41
- name: newLocation.trim()
42
- };
43
- setLocations([...locations, location]);
44
- setNewLocation('');
45
- };
46
- const handleRemoveLocation = id => {
47
- setLocations(locations.filter(loc => loc.id !== id));
48
- };
49
- const handleSave = async () => {
50
- const success = await saveProfile({
51
- locations
52
- });
53
- if (success) {
54
- onSave?.();
55
- onClose();
56
- }
57
- };
58
- return /*#__PURE__*/_jsx(Modal, {
23
+ return /*#__PURE__*/_jsx(EditFieldModal, {
59
24
  visible: visible,
60
- animationType: "slide",
61
- transparent: true,
62
- onRequestClose: onClose,
63
- children: /*#__PURE__*/_jsx(View, {
64
- style: styles.modalOverlay,
65
- children: /*#__PURE__*/_jsxs(View, {
66
- style: [styles.modalContent, {
67
- backgroundColor: colors.background
25
+ onClose: onClose,
26
+ title: t('editProfile.items.locations.title') || 'Locations',
27
+ theme: theme,
28
+ onSave: onSave,
29
+ variant: "list",
30
+ listConfig: {
31
+ items: initialLocations,
32
+ addItemLabel: t('editProfile.items.locations.add') || 'Add Location',
33
+ listTitle: t('editProfile.items.locations.yourLocations') || 'Your Locations',
34
+ addItemPlaceholder: t('editProfile.items.locations.placeholder') || 'Enter location name',
35
+ createItem: value => ({
36
+ id: `location-${Date.now()}`,
37
+ name: value.trim()
38
+ }),
39
+ renderItem: (item, onRemove, colors) => /*#__PURE__*/_jsxs(View, {
40
+ style: [styles.locationItem, {
41
+ backgroundColor: colors.card,
42
+ borderColor: colors.border
68
43
  }],
69
- children: [/*#__PURE__*/_jsxs(View, {
70
- style: styles.modalHeader,
71
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
72
- onPress: onClose,
73
- style: styles.closeButton,
74
- children: /*#__PURE__*/_jsx(Ionicons, {
75
- name: "close",
76
- size: 24,
77
- color: colors.text
78
- })
79
- }), /*#__PURE__*/_jsx(Text, {
80
- style: [styles.modalTitle, {
81
- color: colors.text
82
- }],
83
- children: t('editProfile.items.locations.title') || 'Locations'
84
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
85
- onPress: handleSave,
86
- disabled: isSaving,
87
- style: [styles.saveButton, {
88
- opacity: isSaving ? 0.5 : 1
89
- }],
90
- children: /*#__PURE__*/_jsx(Text, {
91
- style: [styles.saveButtonText, {
92
- color: colors.tint
93
- }],
94
- children: isSaving ? 'Saving...' : 'Save'
95
- })
96
- })]
97
- }), /*#__PURE__*/_jsxs(ScrollView, {
98
- style: styles.modalBody,
99
- children: [/*#__PURE__*/_jsxs(View, {
100
- style: styles.inputGroup,
101
- children: [/*#__PURE__*/_jsx(Text, {
102
- style: [styles.label, {
103
- color: colors.text
104
- }],
105
- children: t('editProfile.items.locations.add') || 'Add Location'
106
- }), /*#__PURE__*/_jsxs(View, {
107
- style: styles.addLocationRow,
108
- children: [/*#__PURE__*/_jsx(TextInput, {
109
- style: [styles.input, {
110
- backgroundColor: colors.card,
111
- color: colors.text,
112
- borderColor: colors.border,
113
- flex: 1
114
- }],
115
- value: newLocation,
116
- onChangeText: setNewLocation,
117
- placeholder: t('editProfile.items.locations.placeholder') || 'Enter location name',
118
- placeholderTextColor: colors.secondaryText,
119
- selectionColor: colors.tint
120
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
121
- style: [styles.addButton, {
122
- backgroundColor: colors.tint
123
- }],
124
- onPress: handleAddLocation,
125
- disabled: !newLocation.trim(),
126
- children: /*#__PURE__*/_jsx(Ionicons, {
127
- name: "add",
128
- size: 20,
129
- color: "#fff"
130
- })
131
- })]
132
- })]
133
- }), locations.length > 0 && /*#__PURE__*/_jsxs(View, {
134
- style: styles.locationsList,
135
- children: [/*#__PURE__*/_jsxs(Text, {
136
- style: [styles.listTitle, {
137
- color: colors.text
138
- }],
139
- children: [t('editProfile.items.locations.yourLocations') || 'Your Locations', " (", locations.length, ")"]
140
- }), locations.map((location, index) => /*#__PURE__*/_jsxs(View, {
141
- style: [styles.locationItem, {
142
- backgroundColor: colors.card,
143
- borderColor: colors.border
144
- }, index < locations.length - 1 && {
145
- borderBottomWidth: StyleSheet.hairlineWidth
146
- }],
147
- children: [/*#__PURE__*/_jsx(Text, {
148
- style: [styles.locationName, {
149
- color: colors.text
150
- }],
151
- children: location.name
152
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
153
- onPress: () => handleRemoveLocation(location.id),
154
- style: styles.removeButton,
155
- children: /*#__PURE__*/_jsx(Ionicons, {
156
- name: "trash-outline",
157
- size: 18,
158
- color: "#FF3B30"
159
- })
160
- })]
161
- }, location.id))]
162
- })]
44
+ children: [/*#__PURE__*/_jsx(Text, {
45
+ style: [styles.locationName, {
46
+ color: colors.text
47
+ }],
48
+ children: item.name
49
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
50
+ onPress: onRemove,
51
+ style: styles.removeButton,
52
+ children: /*#__PURE__*/_jsx(Ionicons, {
53
+ name: "trash-outline",
54
+ size: 18,
55
+ color: "#FF3B30"
56
+ })
163
57
  })]
164
58
  })
165
- })
59
+ },
60
+ onSubmit: async data => {
61
+ return await saveProfile({
62
+ locations: data.items
63
+ });
64
+ }
166
65
  });
167
66
  };
168
67
  const styles = StyleSheet.create({
169
- modalOverlay: {
170
- flex: 1,
171
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
172
- justifyContent: 'flex-end'
173
- },
174
- modalContent: {
175
- borderTopLeftRadius: 20,
176
- borderTopRightRadius: 20,
177
- paddingTop: Platform.OS === 'ios' ? 20 : 16,
178
- maxHeight: '80%'
179
- },
180
- modalHeader: {
181
- flexDirection: 'row',
182
- alignItems: 'center',
183
- justifyContent: 'space-between',
184
- paddingHorizontal: 16,
185
- paddingBottom: 16,
186
- borderBottomWidth: StyleSheet.hairlineWidth,
187
- borderBottomColor: '#E5E5EA'
188
- },
189
- closeButton: {
190
- width: 40,
191
- height: 40,
192
- alignItems: 'center',
193
- justifyContent: 'center'
194
- },
195
- modalTitle: {
196
- fontSize: 18,
197
- fontWeight: '600',
198
- fontFamily: fontFamilies.phuduSemiBold,
199
- flex: 1,
200
- textAlign: 'center'
201
- },
202
- saveButton: {
203
- paddingHorizontal: 16,
204
- paddingVertical: 8
205
- },
206
- saveButtonText: {
207
- fontSize: 16,
208
- fontWeight: '600',
209
- fontFamily: fontFamilies.phuduSemiBold
210
- },
211
- modalBody: {
212
- padding: 16
213
- },
214
- inputGroup: {
215
- gap: 8,
216
- marginBottom: 24
217
- },
218
- label: {
219
- fontSize: 14,
220
- fontWeight: '600',
221
- fontFamily: fontFamilies.phuduSemiBold
222
- },
223
- addLocationRow: {
224
- flexDirection: 'row',
225
- gap: 8,
226
- alignItems: 'center'
227
- },
228
- input: {
229
- borderWidth: StyleSheet.hairlineWidth,
230
- borderRadius: 12,
231
- padding: 16,
232
- fontSize: 16,
233
- minHeight: 52
234
- },
235
- addButton: {
236
- width: 52,
237
- height: 52,
238
- borderRadius: 12,
239
- alignItems: 'center',
240
- justifyContent: 'center'
241
- },
242
- locationsList: {
243
- gap: 8
244
- },
245
- listTitle: {
246
- fontSize: 16,
247
- fontWeight: '600',
248
- fontFamily: fontFamilies.phuduSemiBold,
249
- marginBottom: 8
250
- },
251
68
  locationItem: {
252
69
  flexDirection: 'row',
253
70
  alignItems: 'center',
254
71
  justifyContent: 'space-between',
255
72
  padding: 16,
256
73
  borderRadius: 12,
257
- borderWidth: StyleSheet.hairlineWidth
74
+ borderWidth: StyleSheet.hairlineWidth,
75
+ marginBottom: 8
258
76
  },
259
77
  locationName: {
260
78
  fontSize: 16,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","useEffect","View","Text","TextInput","TouchableOpacity","StyleSheet","Modal","Platform","ScrollView","Ionicons","useThemeStyles","useColorScheme","useI18n","fontFamilies","useProfileEditing","jsx","_jsx","jsxs","_jsxs","EditLocationModal","visible","onClose","initialLocations","theme","onSave","t","colorScheme","themeStyles","colors","saveProfile","isSaving","locations","setLocations","newLocation","setNewLocation","handleAddLocation","trim","location","id","Date","now","name","handleRemoveLocation","filter","loc","handleSave","success","animationType","transparent","onRequestClose","children","style","styles","modalOverlay","modalContent","backgroundColor","background","modalHeader","onPress","closeButton","size","color","text","modalTitle","disabled","saveButton","opacity","saveButtonText","tint","modalBody","inputGroup","label","addLocationRow","input","card","borderColor","border","flex","value","onChangeText","placeholder","placeholderTextColor","secondaryText","selectionColor","addButton","length","locationsList","listTitle","map","index","locationItem","borderBottomWidth","hairlineWidth","locationName","removeButton","create","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingTop","OS","maxHeight","flexDirection","alignItems","paddingHorizontal","paddingBottom","borderBottomColor","width","height","fontSize","fontWeight","fontFamily","phuduSemiBold","textAlign","paddingVertical","padding","gap","marginBottom","borderWidth","borderRadius","minHeight"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditLocationModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,SACIC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,gBAAgB,EAChBC,UAAU,EACVC,KAAK,EACLC,QAAQ,EACRC,UAAU,QACP,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,cAAc,QAAQ,+BAA4B;AAC3D,SAASC,cAAc,QAAQ,iCAA8B;AAC7D,S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AU,EAAE,QAAQ;IACpBP,cAAc,EAAE;EACpB,CAAC;EACDV,aAAa,EAAE;IACX8B,GAAG,EAAE;EACT,CAAC;EACD7B,SAAS,EAAE;IACPsB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAElG,YAAY,CAACmG,aAAa;IACtCK,YAAY,EAAE;EAClB,CAAC;EACD3B,YAAY,EAAE;IACVY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBP,cAAc,EAAE,eAAe;IAC/BmB,OAAO,EAAE,EAAE;IACXI,YAAY,EAAE,EAAE;IAChBD,WAAW,EAAEjH,UAAU,CAACuF;EAC5B,CAAC;EACDC,YAAY,EAAE;IACVgB,QAAQ,EAAE,EAAE;IACZhC,IAAI,EAAE;EACV,CAAC;EACDiB,YAAY,EAAE;IACVqB,OAAO,EAAE;EACb;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","StyleSheet","Ionicons","EditFieldModal","useProfileEditing","useI18n","jsx","_jsx","jsxs","_jsxs","EditLocationModal","visible","onClose","initialLocations","theme","onSave","t","saveProfile","title","variant","listConfig","items","addItemLabel","listTitle","addItemPlaceholder","createItem","value","id","Date","now","name","trim","renderItem","item","onRemove","colors","style","styles","locationItem","backgroundColor","card","borderColor","border","children","locationName","color","text","onPress","removeButton","size","onSubmit","data","locations","create","flexDirection","alignItems","justifyContent","padding","borderRadius","borderWidth","hairlineWidth","marginBottom","fontSize","flex"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditLocationModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AACvE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,OAAO,QA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