@umituz/react-native-settings 2.0.0 → 2.4.0
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 +129 -3
- package/lib/__tests__/setup.d.ts +5 -0
- package/lib/__tests__/setup.d.ts.map +1 -0
- package/lib/__tests__/setup.js +143 -0
- package/lib/__tests__/setup.js.map +1 -0
- package/lib/domain/repositories/ISettingsRepository.d.ts +51 -0
- package/lib/domain/repositories/ISettingsRepository.d.ts.map +1 -0
- package/lib/domain/repositories/ISettingsRepository.js +8 -0
- package/lib/domain/repositories/ISettingsRepository.js.map +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +32 -0
- package/lib/index.js.map +1 -0
- package/lib/infrastructure/storage/SettingsStore.d.ts +36 -0
- package/lib/infrastructure/storage/SettingsStore.d.ts.map +1 -0
- package/lib/infrastructure/storage/SettingsStore.js +144 -0
- package/lib/infrastructure/storage/SettingsStore.js.map +1 -0
- package/lib/presentation/components/CloudSyncSetting.d.ts +16 -0
- package/lib/presentation/components/CloudSyncSetting.d.ts.map +1 -0
- package/lib/presentation/components/CloudSyncSetting.js +30 -0
- package/lib/presentation/components/CloudSyncSetting.js.map +1 -0
- package/lib/presentation/components/DisclaimerCard.d.ts +15 -0
- package/lib/presentation/components/DisclaimerCard.d.ts.map +1 -0
- package/lib/presentation/components/DisclaimerCard.js +73 -0
- package/lib/presentation/components/DisclaimerCard.js.map +1 -0
- package/lib/presentation/components/DisclaimerModal.d.ts +13 -0
- package/lib/presentation/components/DisclaimerModal.d.ts.map +1 -0
- package/lib/presentation/components/DisclaimerModal.js +62 -0
- package/lib/presentation/components/DisclaimerModal.js.map +1 -0
- package/lib/presentation/components/DisclaimerSetting.d.ts +39 -0
- package/lib/presentation/components/DisclaimerSetting.d.ts.map +1 -0
- package/lib/presentation/components/DisclaimerSetting.js +59 -0
- package/lib/presentation/components/DisclaimerSetting.js.map +1 -0
- package/lib/presentation/components/SettingItem.d.ts +45 -0
- package/lib/presentation/components/SettingItem.d.ts.map +1 -0
- package/lib/presentation/components/SettingItem.js +113 -0
- package/lib/presentation/components/SettingItem.js.map +1 -0
- package/lib/presentation/components/SettingsErrorBoundary.d.ts +23 -0
- package/lib/presentation/components/SettingsErrorBoundary.d.ts.map +1 -0
- package/lib/presentation/components/SettingsErrorBoundary.js +73 -0
- package/lib/presentation/components/SettingsErrorBoundary.js.map +1 -0
- package/lib/presentation/components/SettingsFooter.d.ts +11 -0
- package/lib/presentation/components/SettingsFooter.d.ts.map +1 -0
- package/lib/presentation/components/SettingsFooter.js +31 -0
- package/lib/presentation/components/SettingsFooter.js.map +1 -0
- package/lib/presentation/components/SettingsSection.d.ts +13 -0
- package/lib/presentation/components/SettingsSection.d.ts.map +1 -0
- package/lib/presentation/components/SettingsSection.js +37 -0
- package/lib/presentation/components/SettingsSection.js.map +1 -0
- package/lib/presentation/components/StorageClearSetting.d.ts +16 -0
- package/lib/presentation/components/StorageClearSetting.d.ts.map +1 -0
- package/lib/presentation/components/StorageClearSetting.js +21 -0
- package/lib/presentation/components/StorageClearSetting.js.map +1 -0
- package/lib/presentation/components/UserProfileHeader.d.ts +30 -0
- package/lib/presentation/components/UserProfileHeader.d.ts.map +1 -0
- package/lib/presentation/components/UserProfileHeader.js +119 -0
- package/lib/presentation/components/UserProfileHeader.js.map +1 -0
- package/lib/presentation/screens/AppearanceScreen.d.ts +8 -0
- package/lib/presentation/screens/AppearanceScreen.d.ts.map +1 -0
- package/lib/presentation/screens/AppearanceScreen.js +8 -0
- package/lib/presentation/screens/AppearanceScreen.js.map +1 -0
- package/lib/presentation/screens/SettingsScreen.d.ts +38 -0
- package/lib/presentation/screens/SettingsScreen.d.ts.map +1 -0
- package/lib/presentation/screens/SettingsScreen.js +37 -0
- package/lib/presentation/screens/SettingsScreen.js.map +1 -0
- package/lib/presentation/screens/components/AboutLegalSection.d.ts +15 -0
- package/lib/presentation/screens/components/AboutLegalSection.d.ts.map +1 -0
- package/lib/presentation/screens/components/AboutLegalSection.js +28 -0
- package/lib/presentation/screens/components/AboutLegalSection.js.map +1 -0
- package/lib/presentation/screens/components/AppearanceSection.d.ts +12 -0
- package/lib/presentation/screens/components/AppearanceSection.d.ts.map +1 -0
- package/lib/presentation/screens/components/AppearanceSection.js +21 -0
- package/lib/presentation/screens/components/AppearanceSection.js.map +1 -0
- package/lib/presentation/screens/components/LanguageSection.d.ts +12 -0
- package/lib/presentation/screens/components/LanguageSection.d.ts.map +1 -0
- package/lib/presentation/screens/components/LanguageSection.js +26 -0
- package/lib/presentation/screens/components/LanguageSection.js.map +1 -0
- package/lib/presentation/screens/components/NotificationsSection.d.ts +12 -0
- package/lib/presentation/screens/components/NotificationsSection.d.ts.map +1 -0
- package/lib/presentation/screens/components/NotificationsSection.js +58 -0
- package/lib/presentation/screens/components/NotificationsSection.js.map +1 -0
- package/lib/presentation/screens/components/SettingsContent.d.ts +36 -0
- package/lib/presentation/screens/components/SettingsContent.d.ts.map +1 -0
- package/lib/presentation/screens/components/SettingsContent.js +81 -0
- package/lib/presentation/screens/components/SettingsContent.js.map +1 -0
- package/lib/presentation/screens/components/SettingsHeader.d.ts +12 -0
- package/lib/presentation/screens/components/SettingsHeader.d.ts.map +1 -0
- package/lib/presentation/screens/components/SettingsHeader.js +59 -0
- package/lib/presentation/screens/components/SettingsHeader.js.map +1 -0
- package/lib/presentation/screens/components/index.d.ts +9 -0
- package/lib/presentation/screens/components/index.d.ts.map +1 -0
- package/lib/presentation/screens/components/index.js +9 -0
- package/lib/presentation/screens/components/index.js.map +1 -0
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts +21 -0
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts.map +1 -0
- package/lib/presentation/screens/hooks/useFeatureDetection.js +82 -0
- package/lib/presentation/screens/hooks/useFeatureDetection.js.map +1 -0
- package/lib/presentation/screens/types/CustomSection.d.ts +19 -0
- package/lib/presentation/screens/types/CustomSection.d.ts.map +1 -0
- package/lib/presentation/screens/types/CustomSection.js +6 -0
- package/lib/presentation/screens/types/CustomSection.js.map +1 -0
- package/lib/presentation/screens/types/ExtendedConfig.d.ts +68 -0
- package/lib/presentation/screens/types/ExtendedConfig.d.ts.map +1 -0
- package/lib/presentation/screens/types/ExtendedConfig.js +6 -0
- package/lib/presentation/screens/types/ExtendedConfig.js.map +1 -0
- package/lib/presentation/screens/types/FeatureConfig.d.ts +95 -0
- package/lib/presentation/screens/types/FeatureConfig.d.ts.map +1 -0
- package/lib/presentation/screens/types/FeatureConfig.js +6 -0
- package/lib/presentation/screens/types/FeatureConfig.js.map +1 -0
- package/lib/presentation/screens/types/SettingsConfig.d.ts +97 -0
- package/lib/presentation/screens/types/SettingsConfig.d.ts.map +1 -0
- package/lib/presentation/screens/types/SettingsConfig.js +6 -0
- package/lib/presentation/screens/types/SettingsConfig.js.map +1 -0
- package/lib/presentation/screens/types/index.d.ts +10 -0
- package/lib/presentation/screens/types/index.d.ts.map +1 -0
- package/lib/presentation/screens/types/index.js +6 -0
- package/lib/presentation/screens/types/index.js.map +1 -0
- package/lib/presentation/screens/utils/normalizeConfig.d.ts +44 -0
- package/lib/presentation/screens/utils/normalizeConfig.d.ts.map +1 -0
- package/lib/presentation/screens/utils/normalizeConfig.js +38 -0
- package/lib/presentation/screens/utils/normalizeConfig.js.map +1 -0
- package/package.json +46 -11
- package/src/__tests__/integration.test.tsx +371 -0
- package/src/__tests__/performance.test.tsx +369 -0
- package/src/__tests__/setup.test.tsx +20 -0
- package/src/__tests__/setup.ts +157 -0
- package/src/index.ts +9 -0
- package/src/infrastructure/storage/SettingsStore.ts +90 -45
- package/src/infrastructure/storage/__tests__/SettingsStore.test.tsx +302 -0
- package/src/presentation/components/CloudSyncSetting.tsx +11 -17
- package/src/presentation/components/DisclaimerCard.tsx +115 -0
- package/src/presentation/components/DisclaimerModal.tsx +104 -0
- package/src/presentation/components/DisclaimerSetting.tsx +77 -159
- package/src/presentation/components/SettingItem.tsx +11 -2
- package/src/presentation/components/SettingsErrorBoundary.tsx +126 -0
- package/src/presentation/components/StorageClearSetting.tsx +13 -8
- package/src/presentation/components/UserProfileHeader.tsx +48 -11
- package/src/presentation/components/__tests__/CloudSyncSetting.test.tsx +78 -0
- package/src/presentation/components/__tests__/DisclaimerCard.test.tsx +208 -0
- package/src/presentation/components/__tests__/DisclaimerModal.test.tsx +236 -0
- package/src/presentation/components/__tests__/DisclaimerSetting.test.tsx +74 -0
- package/src/presentation/components/__tests__/SettingItem.test.tsx +189 -0
- package/src/presentation/components/__tests__/SettingsErrorBoundary.test.tsx +186 -0
- package/src/presentation/screens/SettingsScreen.tsx +29 -159
- package/src/presentation/screens/__tests__/SettingsScreen.test.tsx +322 -0
- package/src/presentation/screens/components/AboutLegalSection.tsx +14 -5
- package/src/presentation/screens/components/AppearanceSection.tsx +1 -1
- package/src/presentation/screens/components/LanguageSection.tsx +2 -1
- package/src/presentation/screens/components/NotificationsSection.tsx +19 -14
- package/src/presentation/screens/components/SettingsContent.tsx +167 -0
- package/src/presentation/screens/components/SettingsHeader.tsx +79 -0
- package/src/presentation/screens/hooks/__tests__/useFeatureDetection.test.tsx +261 -0
- package/src/presentation/screens/hooks/useFeatureDetection.ts +15 -5
- package/src/presentation/screens/types/CustomSection.ts +20 -0
- package/src/presentation/screens/types/ExtendedConfig.ts +68 -0
- package/src/presentation/screens/types/FeatureConfig.ts +102 -0
- package/src/presentation/screens/types/SettingsConfig.ts +116 -0
- package/src/presentation/screens/types/index.ts +20 -0
- package/src/presentation/screens/utils/normalizeConfig.ts +2 -1
- package/src/presentation/screens/types.ts +0 -263
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Footer Component
|
|
3
|
+
* Single Responsibility: Display app version information
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
export interface SettingsFooterProps {
|
|
7
|
+
/** Custom version text (optional) */
|
|
8
|
+
versionText?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SettingsFooter: React.FC<SettingsFooterProps>;
|
|
11
|
+
//# sourceMappingURL=SettingsFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsFooter.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/SettingsFooter.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkBxD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Footer Component
|
|
3
|
+
* Single Responsibility: Display app version information
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
7
|
+
import { useLocalization } from "@umituz/react-native-localization";
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
9
|
+
export const SettingsFooter = ({ versionText, }) => {
|
|
10
|
+
const { t } = useLocalization();
|
|
11
|
+
const tokens = useAppDesignTokens();
|
|
12
|
+
const colors = tokens.colors;
|
|
13
|
+
const displayText = versionText ||
|
|
14
|
+
`${t("settings.about.version")} ${t("settings.about.versionNumber")}`;
|
|
15
|
+
return (<View style={styles.container}>
|
|
16
|
+
<Text style={[styles.text, { color: colors.textSecondary }]}>
|
|
17
|
+
{displayText}
|
|
18
|
+
</Text>
|
|
19
|
+
</View>);
|
|
20
|
+
};
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container: {
|
|
23
|
+
paddingVertical: 24,
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
},
|
|
26
|
+
text: {
|
|
27
|
+
fontSize: 12,
|
|
28
|
+
fontWeight: "500",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=SettingsFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsFooter.js","sourceRoot":"","sources":["../../../src/presentation/components/SettingsFooter.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAO9E,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,WAAW,GACZ,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,MAAM,WAAW,GACf,WAAW;QACX,GAAG,CAAC,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,8BAA8B,CAAC,EAAE,CAAC;IAExE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAC1D;QAAA,CAAC,WAAW,CACd;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,QAAQ;KACrB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Section Component
|
|
3
|
+
* Single Responsibility: Render a settings section with title and container
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
export interface SettingsSectionProps {
|
|
7
|
+
/** Section title */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Section content */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const SettingsSection: React.FC<SettingsSectionProps>;
|
|
13
|
+
//# sourceMappingURL=SettingsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsSection.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/SettingsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,oBAAoB;IACnC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiB1D,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Section Component
|
|
3
|
+
* Single Responsibility: Render a settings section with title and container
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
7
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
8
|
+
export const SettingsSection = ({ title, children, }) => {
|
|
9
|
+
const tokens = useAppDesignTokens();
|
|
10
|
+
const colors = tokens.colors;
|
|
11
|
+
return (<View style={[styles.container, { backgroundColor: colors.surface }]}>
|
|
12
|
+
<Text style={[styles.title, { color: colors.textPrimary }]}>
|
|
13
|
+
{title}
|
|
14
|
+
</Text>
|
|
15
|
+
<View style={styles.content}>
|
|
16
|
+
{children}
|
|
17
|
+
</View>
|
|
18
|
+
</View>);
|
|
19
|
+
};
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
marginBottom: 16,
|
|
23
|
+
borderRadius: 12,
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
fontSize: 18,
|
|
28
|
+
fontWeight: "600",
|
|
29
|
+
paddingHorizontal: 16,
|
|
30
|
+
paddingTop: 16,
|
|
31
|
+
paddingBottom: 8,
|
|
32
|
+
},
|
|
33
|
+
content: {
|
|
34
|
+
borderRadius: 0,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=SettingsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsSection.js","sourceRoot":"","sources":["../../../src/presentation/components/SettingsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAS9E,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CACnE;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CACzD;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAC1B;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,QAAQ;KACnB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,CAAC;KACjB;IACD,OAAO,EAAE;QACP,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Clear Setting Component
|
|
3
|
+
* Single Responsibility: Display storage clear setting (DEV only)
|
|
4
|
+
* Only visible in __DEV__ mode
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export interface StorageClearSettingProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
iconColor?: string;
|
|
12
|
+
titleColor?: string;
|
|
13
|
+
isLast?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const StorageClearSetting: React.FC<StorageClearSettingProps>;
|
|
16
|
+
//# sourceMappingURL=StorageClearSetting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageClearSetting.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/StorageClearSetting.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA6BlE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Clear Setting Component
|
|
3
|
+
* Single Responsibility: Display storage clear setting (DEV only)
|
|
4
|
+
* Only visible in __DEV__ mode
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { Trash2 } from "lucide-react-native";
|
|
8
|
+
import { SettingItem } from "./SettingItem";
|
|
9
|
+
export const StorageClearSetting = ({ title, description, onPress, iconColor, titleColor, isLast = false, }) => {
|
|
10
|
+
// Default values for DEV mode
|
|
11
|
+
const defaultTitle = title || "Clear All Storage";
|
|
12
|
+
const defaultDescription = description || "Clear all local storage data (DEV only)";
|
|
13
|
+
const defaultIconColor = iconColor || "#EF4444";
|
|
14
|
+
const defaultTitleColor = titleColor || "#EF4444";
|
|
15
|
+
// Only render in DEV mode
|
|
16
|
+
if (!__DEV__) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return (<SettingItem icon={Trash2} title={defaultTitle} value={defaultDescription} onPress={onPress} iconColor={defaultIconColor} titleColor={defaultTitleColor} isLast={isLast}/>);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=StorageClearSetting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageClearSetting.js","sourceRoot":"","sources":["../../../src/presentation/components/StorageClearSetting.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAW5C,MAAM,CAAC,MAAM,mBAAmB,GAAuC,CAAC,EACtE,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,GAAG,KAAK,GACf,EAAE,EAAE;IACH,8BAA8B;IAC9B,MAAM,YAAY,GAAG,KAAK,IAAI,mBAAmB,CAAC;IAClD,MAAM,kBAAkB,GAAG,WAAW,IAAI,yCAAyC,CAAC;IACpF,MAAM,gBAAgB,GAAG,SAAS,IAAI,SAAS,CAAC;IAChD,MAAM,iBAAiB,GAAG,UAAU,IAAI,SAAS,CAAC;IAClD,0BAA0B;IAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,MAAM,CAAC,CACb,KAAK,CAAC,CAAC,YAAY,CAAC,CACpB,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User Profile Header Component
|
|
3
|
+
* Displays user avatar, name, and ID
|
|
4
|
+
* Works for both guest and authenticated users
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export interface UserProfileHeaderProps {
|
|
8
|
+
/** User display name */
|
|
9
|
+
displayName?: string;
|
|
10
|
+
/** User ID */
|
|
11
|
+
userId?: string;
|
|
12
|
+
/** Whether user is guest */
|
|
13
|
+
isGuest?: boolean;
|
|
14
|
+
/** Avatar URL (optional) */
|
|
15
|
+
avatarUrl?: string;
|
|
16
|
+
/** Navigation route for account settings */
|
|
17
|
+
accountSettingsRoute?: string;
|
|
18
|
+
/** Custom onPress handler */
|
|
19
|
+
onPress?: () => void;
|
|
20
|
+
/** Custom guest user display name */
|
|
21
|
+
guestDisplayName?: string;
|
|
22
|
+
/** Custom avatar service URL */
|
|
23
|
+
avatarServiceUrl?: string;
|
|
24
|
+
/** Default user display name when no displayName provided */
|
|
25
|
+
defaultUserDisplayName?: string;
|
|
26
|
+
/** Default guest display name */
|
|
27
|
+
defaultGuestDisplayName?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const UserProfileHeader: React.FC<UserProfileHeaderProps>;
|
|
30
|
+
//# sourceMappingURL=UserProfileHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProfileHeader.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/UserProfileHeader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,MAAM,WAAW,sBAAsB;IACrC,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC;IACjC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoG9D,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User Profile Header Component
|
|
3
|
+
* Displays user avatar, name, and ID
|
|
4
|
+
* Works for both guest and authenticated users
|
|
5
|
+
*/
|
|
6
|
+
import React, { useState, useCallback } from "react";
|
|
7
|
+
import { View, TouchableOpacity, StyleSheet, Image } from "react-native";
|
|
8
|
+
import { ChevronRight } from "lucide-react-native";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
10
|
+
import { AtomicText } from "@umituz/react-native-design-system-atoms";
|
|
11
|
+
import { useNavigation } from "@react-navigation/native";
|
|
12
|
+
export const UserProfileHeader = ({ displayName, userId, isGuest = false, avatarUrl, accountSettingsRoute, onPress, guestDisplayName, avatarServiceUrl, defaultUserDisplayName, defaultGuestDisplayName, }) => {
|
|
13
|
+
const tokens = useAppDesignTokens();
|
|
14
|
+
const navigation = useNavigation();
|
|
15
|
+
const colors = tokens.colors;
|
|
16
|
+
const spacing = tokens.spacing;
|
|
17
|
+
const [imageError, setImageError] = useState(false);
|
|
18
|
+
const finalDisplayName = displayName || (isGuest ? guestDisplayName || defaultGuestDisplayName || "Guest" : defaultUserDisplayName || "User");
|
|
19
|
+
const avatarName = isGuest ? guestDisplayName || defaultGuestDisplayName || defaultGuestDisplayName || "Guest" : finalDisplayName;
|
|
20
|
+
const defaultAvatarService = avatarServiceUrl || "https://ui-avatars.com/api";
|
|
21
|
+
const finalAvatarUrl = (imageError ? null : avatarUrl) ||
|
|
22
|
+
`${defaultAvatarService}/?name=${encodeURIComponent(avatarName)}&background=${colors.primary.replace("#", "")}&color=fff&size=64`;
|
|
23
|
+
const handlePress = useCallback(() => {
|
|
24
|
+
if (onPress) {
|
|
25
|
+
onPress();
|
|
26
|
+
}
|
|
27
|
+
else if (accountSettingsRoute) {
|
|
28
|
+
navigation.navigate(accountSettingsRoute);
|
|
29
|
+
}
|
|
30
|
+
}, [onPress, accountSettingsRoute, navigation]);
|
|
31
|
+
const shouldShowChevron = !!(onPress || accountSettingsRoute);
|
|
32
|
+
const isPressable = !!(onPress || accountSettingsRoute);
|
|
33
|
+
const containerStyle = [
|
|
34
|
+
styles.container,
|
|
35
|
+
{
|
|
36
|
+
backgroundColor: colors.surface,
|
|
37
|
+
paddingHorizontal: spacing.md,
|
|
38
|
+
paddingVertical: spacing.md,
|
|
39
|
+
marginHorizontal: spacing.md,
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
const content = (<>
|
|
43
|
+
<View style={styles.content}>
|
|
44
|
+
<View style={[styles.avatarContainer, { borderColor: `${colors.primary}30` }]}>
|
|
45
|
+
{finalAvatarUrl ? (<Image source={{ uri: finalAvatarUrl }} style={styles.avatar} onError={() => setImageError(true)}/>) : (<View style={[styles.avatarFallback, { backgroundColor: `${colors.primary}20` }]}>
|
|
46
|
+
<AtomicText type="headlineMedium" color="primary" style={styles.avatarText}>
|
|
47
|
+
{avatarName.charAt(0).toUpperCase()}
|
|
48
|
+
</AtomicText>
|
|
49
|
+
</View>)}
|
|
50
|
+
</View>
|
|
51
|
+
<View style={[styles.textContainer, { marginLeft: spacing.md }]}>
|
|
52
|
+
<AtomicText type="headlineSmall" style={[styles.name, { color: colors.textPrimary }]} numberOfLines={1}>
|
|
53
|
+
{finalDisplayName}
|
|
54
|
+
</AtomicText>
|
|
55
|
+
</View>
|
|
56
|
+
</View>
|
|
57
|
+
{shouldShowChevron && (<View style={[styles.chevronContainer, { marginLeft: spacing.sm }]}>
|
|
58
|
+
<ChevronRight size={22} color={colors.textSecondary} strokeWidth={2.5}/>
|
|
59
|
+
</View>)}
|
|
60
|
+
</>);
|
|
61
|
+
if (isPressable) {
|
|
62
|
+
return (<TouchableOpacity style={containerStyle} onPress={handlePress} activeOpacity={0.7}>
|
|
63
|
+
{content}
|
|
64
|
+
</TouchableOpacity>);
|
|
65
|
+
}
|
|
66
|
+
return <View style={containerStyle}>{content}</View>;
|
|
67
|
+
};
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
container: {
|
|
70
|
+
flexDirection: "row",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent: "space-between",
|
|
73
|
+
marginTop: 0,
|
|
74
|
+
marginBottom: 0,
|
|
75
|
+
borderRadius: 20,
|
|
76
|
+
minHeight: 80,
|
|
77
|
+
},
|
|
78
|
+
content: {
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
flex: 1,
|
|
82
|
+
},
|
|
83
|
+
avatarContainer: {
|
|
84
|
+
width: 64,
|
|
85
|
+
height: 64,
|
|
86
|
+
borderRadius: 32,
|
|
87
|
+
borderWidth: 2,
|
|
88
|
+
overflow: "hidden",
|
|
89
|
+
backgroundColor: "transparent",
|
|
90
|
+
},
|
|
91
|
+
avatar: {
|
|
92
|
+
width: "100%",
|
|
93
|
+
height: "100%",
|
|
94
|
+
},
|
|
95
|
+
avatarFallback: {
|
|
96
|
+
width: "100%",
|
|
97
|
+
height: "100%",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
},
|
|
101
|
+
avatarText: {
|
|
102
|
+
fontWeight: "700",
|
|
103
|
+
},
|
|
104
|
+
textContainer: {
|
|
105
|
+
flex: 1,
|
|
106
|
+
},
|
|
107
|
+
name: {
|
|
108
|
+
fontWeight: "700",
|
|
109
|
+
},
|
|
110
|
+
id: {
|
|
111
|
+
fontWeight: "500",
|
|
112
|
+
opacity: 0.7,
|
|
113
|
+
},
|
|
114
|
+
chevronContainer: {
|
|
115
|
+
justifyContent: "center",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
//# sourceMappingURL=UserProfileHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProfileHeader.js","sourceRoot":"","sources":["../../../src/presentation/components/UserProfileHeader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAA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IACD,EAAE,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,GAAG;KACb;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance Settings Screen
|
|
3
|
+
* Advanced appearance settings with theme customization and custom colors
|
|
4
|
+
* Uses @umituz/react-native-appearance package
|
|
5
|
+
*/
|
|
6
|
+
import { AppearanceScreen } from "@umituz/react-native-appearance";
|
|
7
|
+
export { AppearanceScreen };
|
|
8
|
+
//# sourceMappingURL=AppearanceScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceScreen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screens/AppearanceScreen.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance Settings Screen
|
|
3
|
+
* Advanced appearance settings with theme customization and custom colors
|
|
4
|
+
* Uses @umituz/react-native-appearance package
|
|
5
|
+
*/
|
|
6
|
+
import { AppearanceScreen } from "@umituz/react-native-appearance";
|
|
7
|
+
export { AppearanceScreen };
|
|
8
|
+
//# sourceMappingURL=AppearanceScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceScreen.js","sourceRoot":"","sources":["../../../src/presentation/screens/AppearanceScreen.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Screen
|
|
3
|
+
* Presentation layer - Composition only, no business logic
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { SettingsConfig, CustomSettingsSection } from "./types";
|
|
7
|
+
export interface SettingsScreenProps {
|
|
8
|
+
config?: SettingsConfig;
|
|
9
|
+
/** Show user profile header */
|
|
10
|
+
showUserProfile?: boolean;
|
|
11
|
+
/** User profile props */
|
|
12
|
+
userProfile?: {
|
|
13
|
+
displayName?: string;
|
|
14
|
+
userId?: string;
|
|
15
|
+
isGuest?: boolean;
|
|
16
|
+
avatarUrl?: string;
|
|
17
|
+
accountSettingsRoute?: string;
|
|
18
|
+
onPress?: () => void;
|
|
19
|
+
guestDisplayName?: string;
|
|
20
|
+
avatarServiceUrl?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Show footer with version */
|
|
23
|
+
showFooter?: boolean;
|
|
24
|
+
/** Custom footer text */
|
|
25
|
+
footerText?: string;
|
|
26
|
+
/** Custom sections to render */
|
|
27
|
+
customSections?: CustomSettingsSection[];
|
|
28
|
+
/** Show close button in header */
|
|
29
|
+
showCloseButton?: boolean;
|
|
30
|
+
/** Custom close handler */
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
/** Feature detection options */
|
|
33
|
+
featureOptions?: {
|
|
34
|
+
notificationServiceAvailable?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare const SettingsScreen: React.FC<SettingsScreenProps>;
|
|
38
|
+
//# sourceMappingURL=SettingsScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsScreen.d.ts","sourceRoot":"","sources":["../../../src/presentation/screens/SettingsScreen.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,+BAA+B;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,WAAW,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,+BAA+B;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACzC,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,cAAc,CAAC,EAAE;QACf,4BAA4B,CAAC,EAAE,OAAO,CAAC;KACxC,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyCxD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings Screen
|
|
3
|
+
* Presentation layer - Composition only, no business logic
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { View, StatusBar, StyleSheet } from "react-native";
|
|
7
|
+
import { useNavigation } from "@react-navigation/native";
|
|
8
|
+
import { useDesignSystemTheme, useAppDesignTokens, } from "@umituz/react-native-design-system-theme";
|
|
9
|
+
import { SettingsHeader } from "./components/SettingsHeader";
|
|
10
|
+
import { SettingsContent } from "./components/SettingsContent";
|
|
11
|
+
import { SettingsErrorBoundary } from "../components/SettingsErrorBoundary";
|
|
12
|
+
import { normalizeSettingsConfig } from "./utils/normalizeConfig";
|
|
13
|
+
import { useFeatureDetection } from "./hooks/useFeatureDetection";
|
|
14
|
+
export const SettingsScreen = ({ config = {}, showUserProfile = false, userProfile, showFooter = true, footerText, customSections = [], showCloseButton = false, onClose, featureOptions, }) => {
|
|
15
|
+
const navigation = useNavigation();
|
|
16
|
+
const { themeMode } = useDesignSystemTheme();
|
|
17
|
+
const tokens = useAppDesignTokens();
|
|
18
|
+
const isDark = themeMode === "dark";
|
|
19
|
+
const colors = tokens.colors;
|
|
20
|
+
const normalizedConfig = normalizeSettingsConfig(config);
|
|
21
|
+
const features = useFeatureDetection(normalizedConfig, navigation, featureOptions);
|
|
22
|
+
return (<View style={[styles.container, { backgroundColor: colors.backgroundPrimary }]}>
|
|
23
|
+
<StatusBar barStyle={isDark ? "light-content" : "dark-content"}/>
|
|
24
|
+
|
|
25
|
+
<SettingsHeader showCloseButton={showCloseButton} onClose={onClose}/>
|
|
26
|
+
|
|
27
|
+
<SettingsErrorBoundary>
|
|
28
|
+
<SettingsContent normalizedConfig={normalizedConfig} features={features} showUserProfile={showUserProfile} userProfile={userProfile} showFooter={showFooter} footerText={footerText} customSections={customSections} showCloseButton={showCloseButton}/>
|
|
29
|
+
</SettingsErrorBoundary>
|
|
30
|
+
</View>);
|
|
31
|
+
};
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
flex: 1,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=SettingsScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsScreen.js","sourceRoot":"","sources":["../../../src/presentation/screens/SettingsScreen.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CA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AC,cAAc,CAAC,EAE/D;;MAAA,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAEnE;;MAAA,CAAC,qBAAqB,CACpB;QAAA,CAAC,eAAe,CACd,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,eAAe,CAAC,CAAC,eAAe,CAAC,EAErC;MAAA,EAAE,qBAAqB,CACzB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* About & Legal Section Component
|
|
3
|
+
* Single Responsibility: Render about and legal settings section
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { AboutConfig, LegalConfig } from "../types";
|
|
7
|
+
interface AboutLegalSectionProps {
|
|
8
|
+
showAbout: boolean;
|
|
9
|
+
showLegal: boolean;
|
|
10
|
+
aboutConfig?: AboutConfig;
|
|
11
|
+
legalConfig?: LegalConfig;
|
|
12
|
+
}
|
|
13
|
+
export declare const AboutLegalSection: React.FC<AboutLegalSectionProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=AboutLegalSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutLegalSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AboutLegalSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD,UAAU,sBAAsB;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAUD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4C9D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* About & Legal Section Component
|
|
3
|
+
* Single Responsibility: Render about and legal settings section
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Info, FileText } from "lucide-react-native";
|
|
7
|
+
import { useNavigation } from "@react-navigation/native";
|
|
8
|
+
import { useLocalization } from "@umituz/react-native-localization";
|
|
9
|
+
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
+
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
+
export const AboutLegalSection = ({ showAbout, showLegal, aboutConfig, legalConfig, }) => {
|
|
12
|
+
const navigation = useNavigation();
|
|
13
|
+
const { t } = useLocalization();
|
|
14
|
+
if (!showAbout && !showLegal) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const aboutRoute = aboutConfig?.route || aboutConfig?.defaultRoute || "About";
|
|
18
|
+
const aboutTitle = aboutConfig?.title || t("settings.about.title");
|
|
19
|
+
const aboutDescription = aboutConfig?.description || t("settings.about.description");
|
|
20
|
+
const legalRoute = legalConfig?.route || legalConfig?.defaultRoute || "Legal";
|
|
21
|
+
const legalTitle = legalConfig?.title || t("settings.legal.title");
|
|
22
|
+
const legalDescription = legalConfig?.description || t("settings.legal.description");
|
|
23
|
+
return (<SettingsSection title={t("settings.sections.about")}>
|
|
24
|
+
{showAbout && (<SettingItem icon={Info} title={aboutTitle} value={aboutDescription} onPress={() => navigation.navigate(aboutRoute)}/>)}
|
|
25
|
+
{showLegal && (<SettingItem icon={FileText} title={legalTitle} value={legalDescription} onPress={() => navigation.navigate(legalRoute)} isLast={true}/>)}
|
|
26
|
+
</SettingsSection>);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=AboutLegalSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutLegalSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AboutLegalSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAkBnE,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAClE,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,GACZ,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAkB,CAAC;IACnD,MAAM,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,YAAY,IAAI,OAAO,CAAC;IAC9E,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACnE,MAAM,gBAAgB,GACpB,WAAW,EAAE,WAAW,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAE9D,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,YAAY,IAAI,OAAO,CAAC;IAC9E,MAAM,UAAU,GAAG,WAAW,EAAE,KAAK,IAAI,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACnE,MAAM,gBAAgB,GACpB,WAAW,EAAE,WAAW,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAE9D,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CACnD;MAAA,CAAC,SAAS,IAAI,CACZ,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAgB,CAAC,CACxB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAoB,CAAC,CAAC,EACzD,CACH,CACD;MAAA,CAAC,SAAS,IAAI,CACZ,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,KAAK,CAAC,CAAC,gBAAgB,CAAC,CACxB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAoB,CAAC,CAAC,CACzD,MAAM,CAAC,CAAC,IAAI,CAAC,EACb,CACH,CACH;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance Section Component
|
|
3
|
+
* Single Responsibility: Render appearance settings section (theme customization)
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { AppearanceConfig } from "../types";
|
|
7
|
+
interface AppearanceSectionProps {
|
|
8
|
+
config?: AppearanceConfig;
|
|
9
|
+
}
|
|
10
|
+
export declare const AppearanceSection: React.FC<AppearanceSectionProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=AppearanceSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AppearanceSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoB9D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Appearance Section Component
|
|
3
|
+
* Single Responsibility: Render appearance settings section (theme customization)
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Palette } from "lucide-react-native";
|
|
7
|
+
import { useNavigation } from "@react-navigation/native";
|
|
8
|
+
import { useLocalization } from "@umituz/react-native-localization";
|
|
9
|
+
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
+
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
+
export const AppearanceSection = ({ config, }) => {
|
|
12
|
+
const navigation = useNavigation();
|
|
13
|
+
const { t } = useLocalization();
|
|
14
|
+
const route = config?.route || config?.defaultRoute || "Appearance";
|
|
15
|
+
const title = config?.title || t("settings.appearance.title");
|
|
16
|
+
const description = config?.description || t("settings.appearance.description");
|
|
17
|
+
return (<SettingsSection title={t("settings.sections.app.title")}>
|
|
18
|
+
<SettingItem icon={Palette} title={title} value={description} onPress={() => navigation.navigate(route)}/>
|
|
19
|
+
</SettingsSection>);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=AppearanceSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/AppearanceSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAClE,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,MAAM,EAAE,YAAY,IAAI,YAAY,CAAC;IACpE,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,2BAA2B,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,CAAC,CAAC,iCAAiC,CAAC,CAAC;IAEhF,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CACvD;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,OAAO,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,WAAW,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC,EAEvD;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Section Component
|
|
3
|
+
* Single Responsibility: Render language settings section
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { LanguageConfig } from "../types";
|
|
7
|
+
interface LanguageSectionProps {
|
|
8
|
+
config?: LanguageConfig;
|
|
9
|
+
}
|
|
10
|
+
export declare const LanguageSection: React.FC<LanguageSectionProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=LanguageSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguageSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/LanguageSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0B1D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Section Component
|
|
3
|
+
* Single Responsibility: Render language settings section
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Languages } from "lucide-react-native";
|
|
7
|
+
import { useNavigation } from "@react-navigation/native";
|
|
8
|
+
import { useLocalization, getLanguageByCode } from "@umituz/react-native-localization";
|
|
9
|
+
import { SettingItem } from "../../components/SettingItem";
|
|
10
|
+
import { SettingsSection } from "../../components/SettingsSection";
|
|
11
|
+
export const LanguageSection = ({ config, }) => {
|
|
12
|
+
const navigation = useNavigation();
|
|
13
|
+
const { t, currentLanguage } = useLocalization();
|
|
14
|
+
const route = config?.route || "LanguageSelection";
|
|
15
|
+
const title = config?.title || t("settings.language");
|
|
16
|
+
const description = config?.description || "";
|
|
17
|
+
const currentLang = getLanguageByCode(currentLanguage);
|
|
18
|
+
const defaultLanguageDisplay = config?.defaultLanguageDisplay || "English";
|
|
19
|
+
const languageDisplay = currentLang
|
|
20
|
+
? `${currentLang.flag} ${currentLang.nativeName}`
|
|
21
|
+
: defaultLanguageDisplay;
|
|
22
|
+
return (<SettingsSection title={t("settings.sections.app.title")}>
|
|
23
|
+
<SettingItem icon={Languages} title={title} value={languageDisplay} onPress={() => navigation.navigate(route)}/>
|
|
24
|
+
</SettingsSection>);
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=LanguageSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguageSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/components/LanguageSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOnE,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,MAAM,GACP,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;IAEjD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,mBAAmB,CAAC;IACnD,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,EAAE,CAAC;IAE9C,MAAM,WAAW,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,sBAAsB,GAAG,MAAM,EAAE,sBAAsB,IAAI,SAAS,CAAC;IAC3E,MAAM,eAAe,GAAG,WAAW;QACjC,CAAC,CAAC,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,UAAU,EAAE;QACjD,CAAC,CAAC,sBAAsB,CAAC;IAE3B,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CACvD;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,SAAS,CAAC,CAChB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,eAAe,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAc,CAAC,CAAC,EAEvD;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notifications Section Component
|
|
3
|
+
* Single Responsibility: Render notifications settings section
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { NotificationsConfig } from "../types";
|
|
7
|
+
interface NotificationsSectionProps {
|
|
8
|
+
config?: NotificationsConfig;
|
|
9
|
+
}
|
|
10
|
+
export declare const NotificationsSection: React.FC<NotificationsSectionProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=NotificationsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/components/NotificationsSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA2C,MAAM,OAAO,CAAC;AAMhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAiBpD,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA+DpE,CAAC"}
|