@umituz/react-native-settings 2.4.1 → 3.0.1
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 +5 -13
- package/src/presentation/components/CloudSyncSetting.tsx +2 -2
- package/src/presentation/components/SettingItem.tsx +4 -4
- package/src/presentation/components/StorageClearSetting.tsx +2 -2
- package/src/presentation/components/UserProfileHeader.tsx +3 -3
- package/src/presentation/screens/components/AboutLegalSection.tsx +3 -3
- package/src/presentation/screens/components/AppearanceSection.tsx +2 -2
- package/src/presentation/screens/components/LanguageSection.tsx +2 -2
- package/src/presentation/screens/components/NotificationsSection.tsx +3 -3
- package/lib/__tests__/setup.d.ts +0 -5
- package/lib/__tests__/setup.d.ts.map +0 -1
- package/lib/__tests__/setup.js +0 -143
- package/lib/__tests__/setup.js.map +0 -1
- package/lib/domain/repositories/ISettingsRepository.d.ts +0 -51
- package/lib/domain/repositories/ISettingsRepository.d.ts.map +0 -1
- package/lib/domain/repositories/ISettingsRepository.js +0 -8
- package/lib/domain/repositories/ISettingsRepository.js.map +0 -1
- package/lib/index.d.ts +0 -35
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -32
- package/lib/index.js.map +0 -1
- package/lib/infrastructure/storage/SettingsStore.d.ts +0 -36
- package/lib/infrastructure/storage/SettingsStore.d.ts.map +0 -1
- package/lib/infrastructure/storage/SettingsStore.js +0 -144
- package/lib/infrastructure/storage/SettingsStore.js.map +0 -1
- package/lib/presentation/components/CloudSyncSetting.d.ts +0 -16
- package/lib/presentation/components/CloudSyncSetting.d.ts.map +0 -1
- package/lib/presentation/components/CloudSyncSetting.js +0 -30
- package/lib/presentation/components/CloudSyncSetting.js.map +0 -1
- package/lib/presentation/components/DisclaimerCard.d.ts +0 -15
- package/lib/presentation/components/DisclaimerCard.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerCard.js +0 -73
- package/lib/presentation/components/DisclaimerCard.js.map +0 -1
- package/lib/presentation/components/DisclaimerModal.d.ts +0 -13
- package/lib/presentation/components/DisclaimerModal.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerModal.js +0 -62
- package/lib/presentation/components/DisclaimerModal.js.map +0 -1
- package/lib/presentation/components/DisclaimerSetting.d.ts +0 -39
- package/lib/presentation/components/DisclaimerSetting.d.ts.map +0 -1
- package/lib/presentation/components/DisclaimerSetting.js +0 -59
- package/lib/presentation/components/DisclaimerSetting.js.map +0 -1
- package/lib/presentation/components/SettingItem.d.ts +0 -45
- package/lib/presentation/components/SettingItem.d.ts.map +0 -1
- package/lib/presentation/components/SettingItem.js +0 -113
- package/lib/presentation/components/SettingItem.js.map +0 -1
- package/lib/presentation/components/SettingsErrorBoundary.d.ts +0 -23
- package/lib/presentation/components/SettingsErrorBoundary.d.ts.map +0 -1
- package/lib/presentation/components/SettingsErrorBoundary.js +0 -73
- package/lib/presentation/components/SettingsErrorBoundary.js.map +0 -1
- package/lib/presentation/components/SettingsFooter.d.ts +0 -11
- package/lib/presentation/components/SettingsFooter.d.ts.map +0 -1
- package/lib/presentation/components/SettingsFooter.js +0 -31
- package/lib/presentation/components/SettingsFooter.js.map +0 -1
- package/lib/presentation/components/SettingsSection.d.ts +0 -13
- package/lib/presentation/components/SettingsSection.d.ts.map +0 -1
- package/lib/presentation/components/SettingsSection.js +0 -37
- package/lib/presentation/components/SettingsSection.js.map +0 -1
- package/lib/presentation/components/StorageClearSetting.d.ts +0 -16
- package/lib/presentation/components/StorageClearSetting.d.ts.map +0 -1
- package/lib/presentation/components/StorageClearSetting.js +0 -21
- package/lib/presentation/components/StorageClearSetting.js.map +0 -1
- package/lib/presentation/components/UserProfileHeader.d.ts +0 -30
- package/lib/presentation/components/UserProfileHeader.d.ts.map +0 -1
- package/lib/presentation/components/UserProfileHeader.js +0 -119
- package/lib/presentation/components/UserProfileHeader.js.map +0 -1
- package/lib/presentation/screens/AppearanceScreen.d.ts +0 -8
- package/lib/presentation/screens/AppearanceScreen.d.ts.map +0 -1
- package/lib/presentation/screens/AppearanceScreen.js +0 -8
- package/lib/presentation/screens/AppearanceScreen.js.map +0 -1
- package/lib/presentation/screens/SettingsScreen.d.ts +0 -38
- package/lib/presentation/screens/SettingsScreen.d.ts.map +0 -1
- package/lib/presentation/screens/SettingsScreen.js +0 -37
- package/lib/presentation/screens/SettingsScreen.js.map +0 -1
- package/lib/presentation/screens/components/AboutLegalSection.d.ts +0 -15
- package/lib/presentation/screens/components/AboutLegalSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/AboutLegalSection.js +0 -28
- package/lib/presentation/screens/components/AboutLegalSection.js.map +0 -1
- package/lib/presentation/screens/components/AppearanceSection.d.ts +0 -12
- package/lib/presentation/screens/components/AppearanceSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/AppearanceSection.js +0 -21
- package/lib/presentation/screens/components/AppearanceSection.js.map +0 -1
- package/lib/presentation/screens/components/LanguageSection.d.ts +0 -12
- package/lib/presentation/screens/components/LanguageSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/LanguageSection.js +0 -26
- package/lib/presentation/screens/components/LanguageSection.js.map +0 -1
- package/lib/presentation/screens/components/NotificationsSection.d.ts +0 -12
- package/lib/presentation/screens/components/NotificationsSection.d.ts.map +0 -1
- package/lib/presentation/screens/components/NotificationsSection.js +0 -58
- package/lib/presentation/screens/components/NotificationsSection.js.map +0 -1
- package/lib/presentation/screens/components/SettingsContent.d.ts +0 -36
- package/lib/presentation/screens/components/SettingsContent.d.ts.map +0 -1
- package/lib/presentation/screens/components/SettingsContent.js +0 -81
- package/lib/presentation/screens/components/SettingsContent.js.map +0 -1
- package/lib/presentation/screens/components/SettingsHeader.d.ts +0 -12
- package/lib/presentation/screens/components/SettingsHeader.d.ts.map +0 -1
- package/lib/presentation/screens/components/SettingsHeader.js +0 -59
- package/lib/presentation/screens/components/SettingsHeader.js.map +0 -1
- package/lib/presentation/screens/components/index.d.ts +0 -9
- package/lib/presentation/screens/components/index.d.ts.map +0 -1
- package/lib/presentation/screens/components/index.js +0 -9
- package/lib/presentation/screens/components/index.js.map +0 -1
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts +0 -21
- package/lib/presentation/screens/hooks/useFeatureDetection.d.ts.map +0 -1
- package/lib/presentation/screens/hooks/useFeatureDetection.js +0 -82
- package/lib/presentation/screens/hooks/useFeatureDetection.js.map +0 -1
- package/lib/presentation/screens/types/CustomSection.d.ts +0 -19
- package/lib/presentation/screens/types/CustomSection.d.ts.map +0 -1
- package/lib/presentation/screens/types/CustomSection.js +0 -6
- package/lib/presentation/screens/types/CustomSection.js.map +0 -1
- package/lib/presentation/screens/types/ExtendedConfig.d.ts +0 -68
- package/lib/presentation/screens/types/ExtendedConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/ExtendedConfig.js +0 -6
- package/lib/presentation/screens/types/ExtendedConfig.js.map +0 -1
- package/lib/presentation/screens/types/FeatureConfig.d.ts +0 -95
- package/lib/presentation/screens/types/FeatureConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/FeatureConfig.js +0 -6
- package/lib/presentation/screens/types/FeatureConfig.js.map +0 -1
- package/lib/presentation/screens/types/SettingsConfig.d.ts +0 -97
- package/lib/presentation/screens/types/SettingsConfig.d.ts.map +0 -1
- package/lib/presentation/screens/types/SettingsConfig.js +0 -6
- package/lib/presentation/screens/types/SettingsConfig.js.map +0 -1
- package/lib/presentation/screens/types/index.d.ts +0 -10
- package/lib/presentation/screens/types/index.d.ts.map +0 -1
- package/lib/presentation/screens/types/index.js +0 -6
- package/lib/presentation/screens/types/index.js.map +0 -1
- package/lib/presentation/screens/utils/normalizeConfig.d.ts +0 -44
- package/lib/presentation/screens/utils/normalizeConfig.d.ts.map +0 -1
- package/lib/presentation/screens/utils/normalizeConfig.js +0 -38
- package/lib/presentation/screens/utils/normalizeConfig.js.map +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature Detection Hook
|
|
3
|
-
* Single Responsibility: Detect which features should be shown
|
|
4
|
-
*/
|
|
5
|
-
import { useMemo } from "react";
|
|
6
|
-
// Optional notification service
|
|
7
|
-
let notificationService = null;
|
|
8
|
-
try {
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
-
const module = require("@umituz/react-native-notifications");
|
|
11
|
-
if (module?.notificationService && typeof module.notificationService === 'object') {
|
|
12
|
-
notificationService = module.notificationService;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
// Package not available
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Check if navigation screen exists
|
|
20
|
-
*/
|
|
21
|
-
function hasNavigationScreen(navigation, screenName) {
|
|
22
|
-
try {
|
|
23
|
-
const state = navigation.getState();
|
|
24
|
-
if (!state)
|
|
25
|
-
return false;
|
|
26
|
-
const checkRoutes = (routes) => {
|
|
27
|
-
if (!routes || !Array.isArray(routes))
|
|
28
|
-
return false;
|
|
29
|
-
for (const route of routes) {
|
|
30
|
-
if (route.name === screenName)
|
|
31
|
-
return true;
|
|
32
|
-
if (route.state?.routes && checkRoutes(route.state.routes)) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
};
|
|
38
|
-
return checkRoutes(state.routes || []);
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Hook to detect which features should be shown
|
|
46
|
-
*/
|
|
47
|
-
export function useFeatureDetection(normalizedConfig, navigation, options) {
|
|
48
|
-
return useMemo(() => {
|
|
49
|
-
const { appearance, language, notifications, about, legal, account, support, developer } = normalizedConfig;
|
|
50
|
-
const notificationServiceAvailable = options?.notificationServiceAvailable ?? notificationService !== null;
|
|
51
|
-
return {
|
|
52
|
-
appearance: appearance.enabled &&
|
|
53
|
-
(appearance.config?.enabled === true ||
|
|
54
|
-
(appearance.config?.enabled !== false &&
|
|
55
|
-
hasNavigationScreen(navigation, appearance.config?.route || "Appearance"))),
|
|
56
|
-
language: language.enabled &&
|
|
57
|
-
(language.config?.enabled === true ||
|
|
58
|
-
(language.config?.enabled !== false &&
|
|
59
|
-
hasNavigationScreen(navigation, language.config?.route || "LanguageSelection"))),
|
|
60
|
-
notifications: notifications.enabled &&
|
|
61
|
-
(notifications.config?.enabled === true ||
|
|
62
|
-
(notifications.config?.enabled !== false &&
|
|
63
|
-
notificationServiceAvailable &&
|
|
64
|
-
hasNavigationScreen(navigation, notifications.config?.route || "Notifications"))),
|
|
65
|
-
about: about.enabled &&
|
|
66
|
-
(about.config?.enabled === true ||
|
|
67
|
-
(about.config?.enabled !== false &&
|
|
68
|
-
hasNavigationScreen(navigation, about.config?.route || "About"))),
|
|
69
|
-
legal: legal.enabled &&
|
|
70
|
-
(legal.config?.enabled === true ||
|
|
71
|
-
(legal.config?.enabled !== false &&
|
|
72
|
-
hasNavigationScreen(navigation, legal.config?.route || "Legal"))),
|
|
73
|
-
account: account.enabled &&
|
|
74
|
-
(account.config?.enabled === true ||
|
|
75
|
-
(account.config?.enabled !== false &&
|
|
76
|
-
hasNavigationScreen(navigation, account.config?.route || "AccountSettings"))),
|
|
77
|
-
support: support.enabled,
|
|
78
|
-
developer: developer.enabled && __DEV__,
|
|
79
|
-
};
|
|
80
|
-
}, [normalizedConfig, navigation, options]);
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=useFeatureDetection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureDetection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/hooks/useFeatureDetection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,gCAAgC;AAChC,IAAI,mBAAmB,GAGZ,IAAI,CAAC;AAChB,IAAI,CAAC;IACH,iEAAiE;IACjE,MAAM,MAAM,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;I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AmB,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC;YACvE,OAAO,EACL,OAAO,CAAC,OAAO;gBACf,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI;oBAC/B,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK;wBAChC,mBAAmB,CACjB,UAAU,EACV,OAAO,CAAC,MAAM,EAAE,KAAK,IAAI,iBAAiB,CAC3C,CAAC,CAAC;YACT,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO;SACxC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom Settings Section Type
|
|
3
|
-
* Allows apps to add custom sections to the settings screen
|
|
4
|
-
*/
|
|
5
|
-
import type { ReactNode } from "react";
|
|
6
|
-
/**
|
|
7
|
-
* Custom Settings Section
|
|
8
|
-
*/
|
|
9
|
-
export interface CustomSettingsSection {
|
|
10
|
-
/** Section title */
|
|
11
|
-
title: string;
|
|
12
|
-
/** Section content (React nodes) */
|
|
13
|
-
content: ReactNode;
|
|
14
|
-
/** Section order (lower = higher in list) */
|
|
15
|
-
order?: number;
|
|
16
|
-
/** Section ID for identification */
|
|
17
|
-
id?: string;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=CustomSection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomSection.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/types/CustomSection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,EAAE,SAAS,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomSection.js","sourceRoot":"","sources":["../../../../src/presentation/screens/types/CustomSection.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extended Configuration Types
|
|
3
|
-
* Account, Support, and Developer configurations
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentType } from "react";
|
|
6
|
-
import type { FeatureVisibility } from "./FeatureConfig";
|
|
7
|
-
/**
|
|
8
|
-
* Account Settings Configuration
|
|
9
|
-
*/
|
|
10
|
-
export interface AccountConfig {
|
|
11
|
-
/** Show account section */
|
|
12
|
-
enabled?: FeatureVisibility;
|
|
13
|
-
/** Custom navigation route for account screen */
|
|
14
|
-
route?: string;
|
|
15
|
-
/** Custom account title */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Custom account description */
|
|
18
|
-
description?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Support Settings Configuration
|
|
22
|
-
*/
|
|
23
|
-
export interface SupportConfig {
|
|
24
|
-
/** Show support section */
|
|
25
|
-
enabled?: FeatureVisibility;
|
|
26
|
-
/** Support items configuration */
|
|
27
|
-
items?: {
|
|
28
|
-
/** Live support configuration */
|
|
29
|
-
liveSupport?: {
|
|
30
|
-
enabled?: boolean;
|
|
31
|
-
route?: string;
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
};
|
|
35
|
-
/** Help support configuration */
|
|
36
|
-
helpSupport?: {
|
|
37
|
-
enabled?: boolean;
|
|
38
|
-
route?: string;
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
/** Custom support section title */
|
|
44
|
-
title?: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Developer Settings Configuration
|
|
48
|
-
*/
|
|
49
|
-
export interface DeveloperConfig {
|
|
50
|
-
/** Show developer section (only in __DEV__ mode) */
|
|
51
|
-
enabled?: boolean;
|
|
52
|
-
/** Developer settings items */
|
|
53
|
-
items?: Array<{
|
|
54
|
-
title: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
route?: string;
|
|
57
|
-
onPress?: () => void;
|
|
58
|
-
icon?: ComponentType<{
|
|
59
|
-
size?: number;
|
|
60
|
-
color?: string;
|
|
61
|
-
}>;
|
|
62
|
-
iconColor?: string;
|
|
63
|
-
titleColor?: string;
|
|
64
|
-
}>;
|
|
65
|
-
/** Custom developer section title */
|
|
66
|
-
title?: string;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=ExtendedConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExtendedConfig.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/types/ExtendedConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,kCAAkC;IAClC,KAAK,CAAC,EAAE;QACN,iCAAiC;QACjC,WAAW,CAAC,EAAE;YACZ,OAAO,CAAC,EAAE,OAAO,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,iCAAiC;QACjC,WAAW,CAAC,EAAE;YACZ,OAAO,CAAC,EAAE,OAAO,CAAC;YAClB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;KACH,CAAC;IACF,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,IAAI,CAAC,EAAE,aAAa,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACxD,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExtendedConfig.js","sourceRoot":"","sources":["../../../../src/presentation/screens/types/ExtendedConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Feature Configuration Types
|
|
3
|
-
* Core types for feature visibility and configuration
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Feature visibility configuration
|
|
7
|
-
* - true: Always show (if navigation screen exists)
|
|
8
|
-
* - false: Never show
|
|
9
|
-
* - 'auto': Automatically detect (check if navigation screen exists and package is available)
|
|
10
|
-
*/
|
|
11
|
-
export type FeatureVisibility = boolean | "auto";
|
|
12
|
-
/**
|
|
13
|
-
* Appearance Settings Configuration
|
|
14
|
-
*/
|
|
15
|
-
export interface AppearanceConfig {
|
|
16
|
-
/** Show appearance section */
|
|
17
|
-
enabled?: FeatureVisibility;
|
|
18
|
-
/** Custom navigation route for appearance screen */
|
|
19
|
-
route?: string;
|
|
20
|
-
/** Show theme toggle */
|
|
21
|
-
showTheme?: boolean;
|
|
22
|
-
/** Custom appearance title */
|
|
23
|
-
title?: string;
|
|
24
|
-
/** Custom appearance description */
|
|
25
|
-
description?: string;
|
|
26
|
-
/** Default route name when no custom route provided */
|
|
27
|
-
defaultRoute?: string;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Language Settings Configuration
|
|
31
|
-
*/
|
|
32
|
-
export interface LanguageConfig {
|
|
33
|
-
/** Show language section */
|
|
34
|
-
enabled?: FeatureVisibility;
|
|
35
|
-
/** Custom navigation route for language selection screen */
|
|
36
|
-
route?: string;
|
|
37
|
-
/** Custom language title */
|
|
38
|
-
title?: string;
|
|
39
|
-
/** Custom language description */
|
|
40
|
-
description?: string;
|
|
41
|
-
/** Default language display when no language is detected */
|
|
42
|
-
defaultLanguageDisplay?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Notifications Settings Configuration
|
|
46
|
-
*/
|
|
47
|
-
export interface NotificationsConfig {
|
|
48
|
-
/** Show notifications section */
|
|
49
|
-
enabled?: FeatureVisibility;
|
|
50
|
-
/** Show notification toggle switch */
|
|
51
|
-
showToggle?: boolean;
|
|
52
|
-
/** Initial toggle value */
|
|
53
|
-
initialValue?: boolean;
|
|
54
|
-
/** Toggle change handler */
|
|
55
|
-
onToggleChange?: (value: boolean) => void;
|
|
56
|
-
/** Custom navigation route for notifications screen */
|
|
57
|
-
route?: string;
|
|
58
|
-
/** Custom notifications title */
|
|
59
|
-
title?: string;
|
|
60
|
-
/** Custom notifications description */
|
|
61
|
-
description?: string;
|
|
62
|
-
/** Default route name when no custom route provided */
|
|
63
|
-
defaultRoute?: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* About Settings Configuration
|
|
67
|
-
*/
|
|
68
|
-
export interface AboutConfig {
|
|
69
|
-
/** Show about section */
|
|
70
|
-
enabled?: FeatureVisibility;
|
|
71
|
-
/** Custom navigation route for about screen */
|
|
72
|
-
route?: string;
|
|
73
|
-
/** Custom about title */
|
|
74
|
-
title?: string;
|
|
75
|
-
/** Custom about description */
|
|
76
|
-
description?: string;
|
|
77
|
-
/** Default route name when no custom route provided */
|
|
78
|
-
defaultRoute?: string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Legal Settings Configuration
|
|
82
|
-
*/
|
|
83
|
-
export interface LegalConfig {
|
|
84
|
-
/** Show legal section */
|
|
85
|
-
enabled?: FeatureVisibility;
|
|
86
|
-
/** Custom navigation route for legal screen */
|
|
87
|
-
route?: string;
|
|
88
|
-
/** Custom legal title */
|
|
89
|
-
title?: string;
|
|
90
|
-
/** Custom legal description */
|
|
91
|
-
description?: string;
|
|
92
|
-
/** Default route name when no custom route provided */
|
|
93
|
-
defaultRoute?: string;
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=FeatureConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureConfig.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/types/FeatureConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8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;IACf,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureConfig.js","sourceRoot":"","sources":["../../../../src/presentation/screens/types/FeatureConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Main Settings Configuration Type
|
|
3
|
-
* Combines all feature configurations
|
|
4
|
-
*/
|
|
5
|
-
import type { FeatureVisibility } from "./FeatureConfig";
|
|
6
|
-
import type { AppearanceConfig, LanguageConfig, NotificationsConfig, AboutConfig, LegalConfig } from "./FeatureConfig";
|
|
7
|
-
import type { AccountConfig, SupportConfig, DeveloperConfig } from "./ExtendedConfig";
|
|
8
|
-
/**
|
|
9
|
-
* Main Settings Configuration
|
|
10
|
-
*
|
|
11
|
-
* Controls which settings features are visible in the SettingsScreen.
|
|
12
|
-
* Each feature can be configured with:
|
|
13
|
-
* - Simple: boolean | 'auto' (quick setup)
|
|
14
|
-
* - Advanced: Detailed config object (full control)
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* // Simple configuration
|
|
18
|
-
* const config: SettingsConfig = {
|
|
19
|
-
* appearance: true,
|
|
20
|
-
* notifications: 'auto',
|
|
21
|
-
* about: false,
|
|
22
|
-
* };
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* // Advanced configuration
|
|
26
|
-
* const config: SettingsConfig = {
|
|
27
|
-
* appearance: {
|
|
28
|
-
* enabled: true,
|
|
29
|
-
* route: 'CustomAppearance',
|
|
30
|
-
* showLanguage: true,
|
|
31
|
-
* showTheme: true,
|
|
32
|
-
* },
|
|
33
|
-
* notifications: {
|
|
34
|
-
* enabled: 'auto',
|
|
35
|
-
* showToggle: true,
|
|
36
|
-
* initialValue: false,
|
|
37
|
-
* onToggleChange: (value) => console.log(value),
|
|
38
|
-
* },
|
|
39
|
-
* support: {
|
|
40
|
-
* enabled: true,
|
|
41
|
-
* items: {
|
|
42
|
-
* liveSupport: {
|
|
43
|
-
* enabled: true,
|
|
44
|
-
* route: 'ChatSupport',
|
|
45
|
-
* title: 'Live Chat',
|
|
46
|
-
* },
|
|
47
|
-
* },
|
|
48
|
-
* },
|
|
49
|
-
* };
|
|
50
|
-
*/
|
|
51
|
-
export interface SettingsConfig {
|
|
52
|
-
/**
|
|
53
|
-
* Appearance settings (Theme customization)
|
|
54
|
-
* @default 'auto'
|
|
55
|
-
*/
|
|
56
|
-
appearance?: FeatureVisibility | AppearanceConfig;
|
|
57
|
-
/**
|
|
58
|
-
* Language settings
|
|
59
|
-
* @default 'auto'
|
|
60
|
-
*/
|
|
61
|
-
language?: FeatureVisibility | LanguageConfig;
|
|
62
|
-
/**
|
|
63
|
-
* Notifications settings
|
|
64
|
-
* @default 'auto'
|
|
65
|
-
*/
|
|
66
|
-
notifications?: FeatureVisibility | NotificationsConfig;
|
|
67
|
-
/**
|
|
68
|
-
* About settings
|
|
69
|
-
* @default 'auto'
|
|
70
|
-
*/
|
|
71
|
-
about?: FeatureVisibility | AboutConfig;
|
|
72
|
-
/**
|
|
73
|
-
* Legal settings (Terms, Privacy Policy)
|
|
74
|
-
* @default 'auto'
|
|
75
|
-
*/
|
|
76
|
-
legal?: FeatureVisibility | LegalConfig;
|
|
77
|
-
/**
|
|
78
|
-
* Account settings
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
account?: FeatureVisibility | AccountConfig;
|
|
82
|
-
/**
|
|
83
|
-
* Support settings
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
support?: FeatureVisibility | SupportConfig;
|
|
87
|
-
/**
|
|
88
|
-
* Developer settings (only shown in __DEV__ mode)
|
|
89
|
-
* @default false
|
|
90
|
-
*/
|
|
91
|
-
developer?: boolean | DeveloperConfig;
|
|
92
|
-
/**
|
|
93
|
-
* Custom empty state text when no settings are available
|
|
94
|
-
*/
|
|
95
|
-
emptyStateText?: string;
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=SettingsConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsConfig.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/types/SettingsConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;IAElD;;;OAGG;IACH,QAAQ,CAAC,EAAE,iBAAiB,GAAG,cAAc,CAAC;IAE9C;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAExD;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAAC;IAExC;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,GAAG,WAAW,CAAC;IAExC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC;IAE5C;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC;IAE5C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAEtC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsConfig.js","sourceRoot":"","sources":["../../../../src/presentation/screens/types/SettingsConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings Types - Public API
|
|
3
|
-
* Exports all settings-related types
|
|
4
|
-
*/
|
|
5
|
-
export type { FeatureVisibility } from "./FeatureConfig";
|
|
6
|
-
export type { AppearanceConfig, LanguageConfig, NotificationsConfig, AboutConfig, LegalConfig, } from "./FeatureConfig";
|
|
7
|
-
export type { AccountConfig, SupportConfig, DeveloperConfig, } from "./ExtendedConfig";
|
|
8
|
-
export type { SettingsConfig } from "./SettingsConfig";
|
|
9
|
-
export type { CustomSettingsSection } from "./CustomSection";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/presentation/screens/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config Normalization Utilities
|
|
3
|
-
* Single Responsibility: Normalize config values to consistent format
|
|
4
|
-
*/
|
|
5
|
-
import type { AppearanceConfig, LanguageConfig, NotificationsConfig, AboutConfig, LegalConfig, AccountConfig, SupportConfig, DeveloperConfig, SettingsConfig } from "../types";
|
|
6
|
-
export interface NormalizedConfig {
|
|
7
|
-
appearance: {
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
config?: AppearanceConfig;
|
|
10
|
-
};
|
|
11
|
-
language: {
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
config?: LanguageConfig;
|
|
14
|
-
};
|
|
15
|
-
notifications: {
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
config?: NotificationsConfig;
|
|
18
|
-
};
|
|
19
|
-
about: {
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
config?: AboutConfig;
|
|
22
|
-
};
|
|
23
|
-
legal: {
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
config?: LegalConfig;
|
|
26
|
-
};
|
|
27
|
-
account: {
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
config?: AccountConfig;
|
|
30
|
-
};
|
|
31
|
-
support: {
|
|
32
|
-
enabled: boolean;
|
|
33
|
-
config?: SupportConfig;
|
|
34
|
-
};
|
|
35
|
-
developer: {
|
|
36
|
-
enabled: boolean;
|
|
37
|
-
config?: DeveloperConfig;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Normalize entire SettingsConfig to consistent format
|
|
42
|
-
*/
|
|
43
|
-
export declare function normalizeSettingsConfig(config: SettingsConfig | undefined): NormalizedConfig;
|
|
44
|
-
//# sourceMappingURL=normalizeConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeConfig.d.ts","sourceRoot":"","sources":["../../../../src/presentation/screens/utils/normalizeConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAEV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;KAC3B,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,cAAc,CAAC;KACzB,CAAC;IACF,aAAa,EAAE;QACb,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,mBAAmB,CAAC;KAC9B,CAAC;IACF,KAAK,EAAE;QACL,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,KAAK,EAAE;QACL,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,CAAC;IACF,OAAO,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,aAAa,CAAC;KACxB,CAAC;IACF,SAAS,EAAE;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,eAAe,CAAC;KAC1B,CAAC;CACH;AA2BD;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,GAAG,SAAS,GACjC,gBAAgB,CAWlB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Config Normalization Utilities
|
|
3
|
-
* Single Responsibility: Normalize config values to consistent format
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Normalize a config value to enabled boolean and optional config object
|
|
7
|
-
*/
|
|
8
|
-
function normalizeConfigValue(value, defaultValue) {
|
|
9
|
-
if (value === undefined) {
|
|
10
|
-
return { enabled: defaultValue === true };
|
|
11
|
-
}
|
|
12
|
-
if (typeof value === "boolean" || value === "auto") {
|
|
13
|
-
return { enabled: value === true };
|
|
14
|
-
}
|
|
15
|
-
// It's a config object
|
|
16
|
-
const config = value;
|
|
17
|
-
const enabled = config?.enabled ?? defaultValue;
|
|
18
|
-
return {
|
|
19
|
-
enabled: enabled === true,
|
|
20
|
-
config,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Normalize entire SettingsConfig to consistent format
|
|
25
|
-
*/
|
|
26
|
-
export function normalizeSettingsConfig(config) {
|
|
27
|
-
return {
|
|
28
|
-
appearance: normalizeConfigValue(config?.appearance, "auto"),
|
|
29
|
-
language: normalizeConfigValue(config?.language, "auto"),
|
|
30
|
-
notifications: normalizeConfigValue(config?.notifications, "auto"),
|
|
31
|
-
about: normalizeConfigValue(config?.about, "auto"),
|
|
32
|
-
legal: normalizeConfigValue(config?.legal, "auto"),
|
|
33
|
-
account: normalizeConfigValue(config?.account, false),
|
|
34
|
-
support: normalizeConfigValue(config?.support, false),
|
|
35
|
-
developer: normalizeConfigValue(config?.developer, false),
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=normalizeConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeConfig.js","sourceRoot":"","sources":["../../../../src/presentation/screens/utils/normalizeConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkDH;;GAEG;AACH,SAAS,oBAAoB,CAC3B,KAAwC,EACxC,YAA+B;IAE/B,IAAI,KAAK,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