@umituz/react-native-settings 5.2.20 → 5.2.22
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 +1 -1
- package/src/domains/localization/presentation/screens/LanguageSelectionScreen.tsx +1 -1
- package/src/presentation/components/SettingsNavigationItem.tsx +1 -1
- package/src/presentation/hooks/useSettingsScreenConfig.ts +2 -2
- package/src/presentation/screens/components/SettingsContent.tsx +3 -3
- package/src/presentation/screens/components/SettingsHeader.tsx +1 -1
- package/src/presentation/screens/components/sections/FeatureSettingsSection.tsx +2 -2
- package/src/presentation/screens/components/sections/IdentitySettingsSection.tsx +1 -1
- package/src/presentation/screens/components/sections/SupportSettingsSection.tsx +14 -14
- package/src/presentation/utils/screenFactory.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.22",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -69,7 +69,7 @@ export const LanguageSelectionScreen: React.FC<LanguageSelectionScreenProps> = (
|
|
|
69
69
|
|
|
70
70
|
const renderSearchComponent = () => {
|
|
71
71
|
if (renderSearchInput) {
|
|
72
|
-
return renderSearchInput(searchQuery, setSearchQuery, searchPlaceholder);
|
|
72
|
+
return renderSearchInput(searchQuery, setSearchQuery, searchPlaceholder || '');
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return (
|
|
@@ -141,8 +141,8 @@ export const useSettingsScreenConfig = (
|
|
|
141
141
|
}), [userProfileData, handleSignIn]);
|
|
142
142
|
|
|
143
143
|
const accountConfig = useMemo(() => createAccountConfig({
|
|
144
|
-
displayName: userProfileData?.displayName || user?.displayName,
|
|
145
|
-
userId: userProfileData?.userId
|
|
144
|
+
displayName: userProfileData?.displayName || user?.displayName || undefined,
|
|
145
|
+
userId: userProfileData?.userId || user?.uid || undefined,
|
|
146
146
|
photoURL: user?.photoURL,
|
|
147
147
|
isAnonymous: user?.isAnonymous,
|
|
148
148
|
avatarUrl: userProfileData?.avatarUrl,
|
|
@@ -54,7 +54,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
|
|
|
54
54
|
<CustomSettingsList customSections={customSections} />
|
|
55
55
|
|
|
56
56
|
{features.subscription && (normalizedConfig.subscription.config?.route || normalizedConfig.subscription.config?.onPress) && (
|
|
57
|
-
<SettingsSection title={translations?.sections?.subscription}>
|
|
57
|
+
<SettingsSection title={translations?.sections?.subscription || ''}>
|
|
58
58
|
<SettingsNavigationItem
|
|
59
59
|
config={normalizedConfig.subscription.config}
|
|
60
60
|
defaultIcon="star"
|
|
@@ -72,7 +72,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
|
|
|
72
72
|
<FeatureSettingsSection normalizedConfig={normalizedConfig} features={features} />
|
|
73
73
|
|
|
74
74
|
{features.gamification && (
|
|
75
|
-
<SettingsSection title={translations?.sections?.progress}>
|
|
75
|
+
<SettingsSection title={translations?.sections?.progress || ''}>
|
|
76
76
|
<SettingsNavigationItem
|
|
77
77
|
config={normalizedConfig.gamification.config || {}}
|
|
78
78
|
defaultIcon="trophy-outline"
|
|
@@ -92,7 +92,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
|
|
|
92
92
|
|
|
93
93
|
{!hasAnyFeatures && (
|
|
94
94
|
<View style={styles.emptyContainer}>
|
|
95
|
-
<SettingsSection title={emptyStateText || translations?.noOptionsAvailable}>
|
|
95
|
+
<SettingsSection title={emptyStateText || translations?.noOptionsAvailable || ''}>
|
|
96
96
|
<View />
|
|
97
97
|
</SettingsSection>
|
|
98
98
|
</View>
|
|
@@ -46,7 +46,7 @@ export const SettingsHeader: React.FC<SettingsHeaderProps> = ({
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<NavigationHeader
|
|
49
|
-
title={title}
|
|
49
|
+
title={title || ''}
|
|
50
50
|
rightElement={rightElement}
|
|
51
51
|
// If NOT showing close button, we might want a back button?
|
|
52
52
|
// But usually Settings is a root screen in a modal or stack.
|
|
@@ -47,7 +47,7 @@ export const FeatureSettingsSection: React.FC<FeatureSettingsSectionProps> = ({
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<SettingsSection
|
|
50
|
-
title={translations?.sections?.app}
|
|
50
|
+
title={translations?.sections?.app || ''}
|
|
51
51
|
>
|
|
52
52
|
{features.appearance && (
|
|
53
53
|
<AppearanceSection
|
|
@@ -63,7 +63,7 @@ export const FeatureSettingsSection: React.FC<FeatureSettingsSectionProps> = ({
|
|
|
63
63
|
|
|
64
64
|
{features.language && (
|
|
65
65
|
<SettingsItemCard
|
|
66
|
-
title={translations?.features?.language?.title}
|
|
66
|
+
title={translations?.features?.language?.title || ''}
|
|
67
67
|
description={languageDisplayName}
|
|
68
68
|
icon="globe-outline"
|
|
69
69
|
onPress={handleLanguagePress}
|
|
@@ -19,7 +19,7 @@ export const IdentitySettingsSection: React.FC<IdentitySettingsSectionProps> = (
|
|
|
19
19
|
if (!features.about && !features.legal) return null;
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<SettingsSection title={translations?.sections?.about}>
|
|
22
|
+
<SettingsSection title={translations?.sections?.about || ''}>
|
|
23
23
|
{features.about && (
|
|
24
24
|
<AboutSection
|
|
25
25
|
config={{
|
|
@@ -26,7 +26,7 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
|
|
|
26
26
|
if (!(features.feedback || features.rating || features.faqs || features.videoTutorial)) return null;
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<SettingsSection title={translations?.sections?.support}>
|
|
29
|
+
<SettingsSection title={translations?.sections?.support || ''}>
|
|
30
30
|
{(features.feedback || features.rating) && (
|
|
31
31
|
<SupportSection
|
|
32
32
|
renderSection={(props: { title: string; children: React.ReactNode }) => <>{props.children}</>}
|
|
@@ -42,7 +42,7 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
|
|
|
42
42
|
feedbackConfig={{
|
|
43
43
|
enabled: features.feedback,
|
|
44
44
|
config: {
|
|
45
|
-
title: normalizedConfig.feedback.config?.title || translations?.features?.feedback?.title,
|
|
45
|
+
title: normalizedConfig.feedback.config?.title || translations?.features?.feedback?.title || '',
|
|
46
46
|
description: normalizedConfig.feedback.config?.description || translations?.features?.feedback?.description,
|
|
47
47
|
initialType: normalizedConfig.feedback.config?.initialType,
|
|
48
48
|
onSubmit: normalizedConfig.feedback.config?.onSubmit,
|
|
@@ -52,24 +52,24 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
|
|
|
52
52
|
ratingConfig={{
|
|
53
53
|
enabled: features.rating,
|
|
54
54
|
config: {
|
|
55
|
-
title: normalizedConfig.rating.config?.title || translations?.features?.rating?.title,
|
|
55
|
+
title: normalizedConfig.rating.config?.title || translations?.features?.rating?.title || '',
|
|
56
56
|
description: normalizedConfig.rating.config?.description || translations?.features?.rating?.description,
|
|
57
57
|
storeUrl: normalizedConfig.rating.config?.storeUrl,
|
|
58
58
|
onRate: normalizedConfig.rating.config?.onRate,
|
|
59
59
|
}
|
|
60
60
|
}}
|
|
61
61
|
feedbackModalTexts={{
|
|
62
|
-
title: translations?.feedbackModal?.title,
|
|
63
|
-
ratingLabel: translations?.feedbackModal?.ratingLabel,
|
|
64
|
-
descriptionPlaceholder: translations?.feedbackModal?.descriptionPlaceholder,
|
|
65
|
-
submitButton: translations?.feedbackModal?.submitButton,
|
|
66
|
-
submittingButton: translations?.feedbackModal?.submittingButton,
|
|
62
|
+
title: translations?.feedbackModal?.title || '',
|
|
63
|
+
ratingLabel: translations?.feedbackModal?.ratingLabel || '',
|
|
64
|
+
descriptionPlaceholder: translations?.feedbackModal?.descriptionPlaceholder || '',
|
|
65
|
+
submitButton: translations?.feedbackModal?.submitButton || '',
|
|
66
|
+
submittingButton: translations?.feedbackModal?.submittingButton || '',
|
|
67
67
|
feedbackTypes: [
|
|
68
|
-
{ type: 'general', label: translations?.feedbackModal?.types?.general },
|
|
69
|
-
{ type: 'bug_report', label: translations?.feedbackModal?.types?.bugReport },
|
|
70
|
-
{ type: 'feature_request', label: translations?.feedbackModal?.types?.featureRequest },
|
|
71
|
-
{ type: 'improvement', label: translations?.feedbackModal?.types?.improvement },
|
|
72
|
-
{ type: 'other', label: translations?.feedbackModal?.types?.other },
|
|
68
|
+
{ type: 'general', label: translations?.feedbackModal?.types?.general || '' },
|
|
69
|
+
{ type: 'bug_report', label: translations?.feedbackModal?.types?.bugReport || '' },
|
|
70
|
+
{ type: 'feature_request', label: translations?.feedbackModal?.types?.featureRequest || '' },
|
|
71
|
+
{ type: 'improvement', label: translations?.feedbackModal?.types?.improvement || '' },
|
|
72
|
+
{ type: 'other', label: translations?.feedbackModal?.types?.other || '' },
|
|
73
73
|
],
|
|
74
74
|
defaultTitle: (type) => {
|
|
75
75
|
const titles: Record<string, string> = {
|
|
@@ -87,7 +87,7 @@ export const SupportSettingsSection: React.FC<SupportSettingsSectionProps> = ({
|
|
|
87
87
|
|
|
88
88
|
{features.faqs && (
|
|
89
89
|
<SettingsItemCard
|
|
90
|
-
title={normalizedConfig.faqs.config?.title || translations?.features?.faqs?.title}
|
|
90
|
+
title={normalizedConfig.faqs.config?.title || translations?.features?.faqs?.title || ''}
|
|
91
91
|
description={normalizedConfig.faqs.config?.description || translations?.features?.faqs?.description}
|
|
92
92
|
icon="help-circle-outline"
|
|
93
93
|
onPress={handleFAQPress}
|
|
@@ -45,7 +45,7 @@ export function createScreenWithProps<P>(
|
|
|
45
45
|
return {
|
|
46
46
|
name,
|
|
47
47
|
options: { headerShown: false, ...options },
|
|
48
|
-
children: (() => React.createElement(component, props)) as () => React.ReactElement,
|
|
48
|
+
children: (() => React.createElement(component as React.ComponentType, props as any)) as () => React.ReactElement,
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|