@umituz/react-native-settings 4.23.8 → 4.23.10
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/about/domain/entities/AppInfo.ts +2 -0
- package/src/domains/appearance/types/index.ts +2 -0
- package/src/domains/dev/presentation/components/EnvViewerSetting.tsx +10 -2
- package/src/domains/dev/presentation/screens/EnvViewerScreen.tsx +3 -2
- package/src/domains/legal/domain/entities/LegalConfig.ts +2 -0
- package/src/presentation/utils/configCreators.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.10",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
|
-
import { useAppDesignTokens,
|
|
8
|
+
import { useAppDesignTokens, useAppNavigation } from "@umituz/react-native-design-system";
|
|
9
9
|
import { SettingsItemCard } from "../../../../presentation/components/SettingsItemCard";
|
|
10
10
|
import type { EnvConfig } from "../../types";
|
|
11
11
|
|
|
@@ -18,6 +18,8 @@ export interface EnvViewerSettingProps {
|
|
|
18
18
|
description?: string;
|
|
19
19
|
/** Screen name to navigate to */
|
|
20
20
|
screenName: string;
|
|
21
|
+
/** Custom navigation handler (overrides route) */
|
|
22
|
+
onPress?: () => void;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
|
|
@@ -25,11 +27,17 @@ export const EnvViewerSetting: React.FC<EnvViewerSettingProps> = ({
|
|
|
25
27
|
title = "Environment Variables",
|
|
26
28
|
description = "View app configuration",
|
|
27
29
|
screenName,
|
|
30
|
+
onPress,
|
|
28
31
|
}) => {
|
|
29
32
|
const tokens = useAppDesignTokens();
|
|
33
|
+
const navigation = useAppNavigation();
|
|
30
34
|
|
|
31
35
|
const handlePress = () => {
|
|
32
|
-
|
|
36
|
+
if (onPress) {
|
|
37
|
+
onPress();
|
|
38
|
+
} else {
|
|
39
|
+
navigation.navigate(screenName as never, { config } as never);
|
|
40
|
+
}
|
|
33
41
|
};
|
|
34
42
|
|
|
35
43
|
return (
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
AtomicTouchable,
|
|
13
13
|
useAppDesignTokens,
|
|
14
14
|
useSafeAreaInsets,
|
|
15
|
-
|
|
15
|
+
useAppNavigation,
|
|
16
16
|
AlertService,
|
|
17
17
|
NavigationHeader,
|
|
18
18
|
} from "@umituz/react-native-design-system";
|
|
@@ -27,6 +27,7 @@ export interface EnvViewerScreenProps {
|
|
|
27
27
|
export const EnvViewerScreen: React.FC<EnvViewerScreenProps> = ({ config }) => {
|
|
28
28
|
const tokens = useAppDesignTokens();
|
|
29
29
|
const { bottom } = useSafeAreaInsets();
|
|
30
|
+
const navigation = useAppNavigation();
|
|
30
31
|
const [revealedKeys, setRevealedKeys] = useState<Set<string>>(new Set());
|
|
31
32
|
|
|
32
33
|
const toggleReveal = (key: string) => {
|
|
@@ -95,7 +96,7 @@ export const EnvViewerScreen: React.FC<EnvViewerScreenProps> = ({ config }) => {
|
|
|
95
96
|
|
|
96
97
|
return (
|
|
97
98
|
<View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
|
|
98
|
-
<NavigationHeader title="Environment Variables" onBackPress={() =>
|
|
99
|
+
<NavigationHeader title="Environment Variables" onBackPress={() => navigation.goBack()} />
|
|
99
100
|
|
|
100
101
|
<ScrollView
|
|
101
102
|
showsVerticalScrollIndicator={false}
|
|
@@ -144,17 +144,16 @@ export const createRatingConfig = (
|
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Create FAQ configuration
|
|
147
|
+
* Navigation is handled internally by the package - no callback needed
|
|
147
148
|
*/
|
|
148
149
|
export const createFAQConfig = (
|
|
149
150
|
t: TranslationFunction,
|
|
150
|
-
onPress: () => void,
|
|
151
151
|
): FAQConfig => ({
|
|
152
152
|
enabled: true,
|
|
153
153
|
title: t("settings.faqs.title"),
|
|
154
154
|
description: t("settings.faqs.description"),
|
|
155
155
|
icon: "help-circle-outline",
|
|
156
156
|
sectionTitle: t("settings.sections.support").toUpperCase(),
|
|
157
|
-
onPress,
|
|
158
157
|
});
|
|
159
158
|
|
|
160
159
|
/**
|