@umituz/react-native-notifications 1.3.15 → 1.3.17
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/{infrastructure → domains/quietHours/infrastructure}/hooks/useQuietHoursActions.ts +2 -2
- package/src/{presentation → domains/quietHours/presentation}/components/QuietHoursCard.tsx +2 -1
- package/src/{infrastructure → domains/reminders/infrastructure}/config/reminderPresets.ts +1 -1
- package/src/{infrastructure → domains/reminders/infrastructure}/hooks/useReminderActions.ts +2 -7
- package/src/{infrastructure → domains/reminders/infrastructure}/storage/RemindersStore.ts +1 -1
- package/src/{presentation → domains/reminders/presentation}/components/FrequencySelector.tsx +1 -1
- package/src/{presentation → domains/reminders/presentation}/components/ReminderForm.tsx +1 -1
- package/src/{presentation → domains/reminders/presentation}/components/ReminderItem.tsx +1 -1
- package/src/{presentation → domains/reminders/presentation}/components/TimePresetSelector.tsx +1 -1
- package/src/{presentation → domains/reminders/presentation}/screens/ReminderListScreen.tsx +1 -1
- package/src/index.ts +21 -21
- package/src/presentation/hooks/useNotificationSettingsUI.ts +1 -1
- package/src/presentation/screens/NotificationSettingsScreen.tsx +2 -2
- /package/src/{presentation → domains/reminders/presentation}/components/FormButton.tsx +0 -0
- /package/src/{presentation → domains/reminders/presentation}/components/WeekdaySelector.tsx +0 -0
package/package.json
CHANGED
package/src/{infrastructure → domains/quietHours/infrastructure}/hooks/useQuietHoursActions.ts
RENAMED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { useCallback } from 'react';
|
|
7
|
-
import { useRemindersStore, useQuietHours } from '
|
|
8
|
-
import type { QuietHoursConfig } from '
|
|
7
|
+
import { useRemindersStore, useQuietHours } from '../../../reminders/infrastructure/storage/RemindersStore';
|
|
8
|
+
import type { QuietHoursConfig } from '../../../../infrastructure/services/types';
|
|
9
9
|
|
|
10
10
|
export const useQuietHoursActions = () => {
|
|
11
11
|
const quietHours = useQuietHours();
|
|
@@ -8,7 +8,8 @@ import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
|
8
8
|
import { AtomicText, AtomicIcon, AtomicCard } from '@umituz/react-native-design-system';
|
|
9
9
|
import { Switch } from 'react-native';
|
|
10
10
|
import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
11
|
-
import
|
|
11
|
+
import { SettingRow } from '../../../../presentation/components/SettingRow';
|
|
12
|
+
import type { QuietHoursConfig, QuietHoursTranslations } from '../../../../infrastructure/services/types';
|
|
12
13
|
|
|
13
14
|
export interface QuietHoursCardProps {
|
|
14
15
|
config: QuietHoursConfig;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Default time presets and frequency options for reminders
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { TimePreset, ReminderFrequency } from '
|
|
6
|
+
import type { TimePreset, ReminderFrequency } from '../../../../infrastructure/services/types';
|
|
7
7
|
|
|
8
8
|
// ============================================================================
|
|
9
9
|
// DEFAULT TIME PRESETS
|
|
@@ -5,13 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { useCallback } from 'react';
|
|
7
7
|
import { useRemindersStore } from '../storage/RemindersStore';
|
|
8
|
-
import { NotificationScheduler } from '
|
|
9
|
-
import type {
|
|
10
|
-
Reminder,
|
|
11
|
-
CreateReminderInput,
|
|
12
|
-
UpdateReminderInput,
|
|
13
|
-
NotificationTrigger,
|
|
14
|
-
} from '../services/types';
|
|
8
|
+
import { NotificationScheduler } from '../../../../infrastructure/services/NotificationScheduler';
|
|
9
|
+
import type { Reminder, CreateReminderInput, UpdateReminderInput, NotificationTrigger } from '../../../../infrastructure/services/types';
|
|
15
10
|
|
|
16
11
|
const scheduler = new NotificationScheduler();
|
|
17
12
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { create } from 'zustand';
|
|
7
7
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
8
|
-
import type { Reminder, QuietHoursConfig, NotificationPreferences } from '
|
|
8
|
+
import type { Reminder, QuietHoursConfig, NotificationPreferences } from '../../../../infrastructure/services/types';
|
|
9
9
|
|
|
10
10
|
const STORAGE_KEYS = {
|
|
11
11
|
REMINDERS: '@notifications:reminders',
|
package/src/{presentation → domains/reminders/presentation}/components/FrequencySelector.tsx
RENAMED
|
@@ -7,7 +7,7 @@ import React, { useMemo } from 'react';
|
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
8
8
|
import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
9
9
|
import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
10
|
-
import type { ReminderFrequency } from '
|
|
10
|
+
import type { ReminderFrequency } from '../../../../infrastructure/services/types';
|
|
11
11
|
import type { FrequencyOption } from '../../infrastructure/config/reminderPresets';
|
|
12
12
|
|
|
13
13
|
export interface FrequencySelectorProps {
|
|
@@ -12,7 +12,7 @@ import { FrequencySelector } from './FrequencySelector';
|
|
|
12
12
|
import { WeekdaySelector } from './WeekdaySelector';
|
|
13
13
|
import { FormButton } from './FormButton';
|
|
14
14
|
import { DEFAULT_TIME_PRESETS, FREQUENCY_OPTIONS } from '../../infrastructure/config/reminderPresets';
|
|
15
|
-
import type { Reminder, ReminderFrequency, CreateReminderInput, TimePreset } from '
|
|
15
|
+
import type { Reminder, ReminderFrequency, CreateReminderInput, TimePreset } from '../../../../infrastructure/services/types';
|
|
16
16
|
|
|
17
17
|
export interface ReminderFormTranslations {
|
|
18
18
|
titleLabel: string;
|
|
@@ -8,7 +8,7 @@ import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
|
8
8
|
import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
9
9
|
import { Switch } from 'react-native';
|
|
10
10
|
import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
11
|
-
import type { Reminder, ReminderFrequency } from '
|
|
11
|
+
import type { Reminder, ReminderFrequency } from '../../../../infrastructure/services/types';
|
|
12
12
|
|
|
13
13
|
export interface ReminderItemTranslations {
|
|
14
14
|
frequencyOnce: string;
|
package/src/{presentation → domains/reminders/presentation}/components/TimePresetSelector.tsx
RENAMED
|
@@ -7,7 +7,7 @@ import React, { useMemo } from 'react';
|
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
8
8
|
import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
9
9
|
import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
10
|
-
import type { TimePreset } from '
|
|
10
|
+
import type { TimePreset } from '../../../../infrastructure/services/types';
|
|
11
11
|
|
|
12
12
|
export interface TimePresetSelectorProps {
|
|
13
13
|
presets: TimePreset[];
|
|
@@ -10,7 +10,7 @@ import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
|
10
10
|
import { ReminderItem } from '../components/ReminderItem';
|
|
11
11
|
import { useRemindersStore, useReminders, useRemindersLoading } from '../../infrastructure/storage/RemindersStore';
|
|
12
12
|
import { useReminderActions } from '../../infrastructure/hooks/useReminderActions';
|
|
13
|
-
import type { Reminder, ReminderTranslations } from '
|
|
13
|
+
import type { Reminder, ReminderTranslations } from '../../../../infrastructure/services/types';
|
|
14
14
|
|
|
15
15
|
export interface ReminderListScreenProps {
|
|
16
16
|
translations: ReminderTranslations;
|
package/src/index.ts
CHANGED
|
@@ -41,8 +41,8 @@ export {
|
|
|
41
41
|
getTimePresetById,
|
|
42
42
|
formatTime,
|
|
43
43
|
parseTime,
|
|
44
|
-
} from './infrastructure/config/reminderPresets';
|
|
45
|
-
export type { FrequencyOption, WeekdayOption } from './infrastructure/config/reminderPresets';
|
|
44
|
+
} from './domains/reminders/infrastructure/config/reminderPresets';
|
|
45
|
+
export type { FrequencyOption, WeekdayOption } from './domains/reminders/infrastructure/config/reminderPresets';
|
|
46
46
|
|
|
47
47
|
// ============================================================================
|
|
48
48
|
// SERVICES
|
|
@@ -65,15 +65,15 @@ export {
|
|
|
65
65
|
useQuietHours,
|
|
66
66
|
useRemindersLoading,
|
|
67
67
|
useRemindersInitialized,
|
|
68
|
-
} from './infrastructure/storage/RemindersStore';
|
|
68
|
+
} from './domains/reminders/infrastructure/storage/RemindersStore';
|
|
69
69
|
|
|
70
70
|
// ============================================================================
|
|
71
71
|
// HOOKS
|
|
72
72
|
// ============================================================================
|
|
73
73
|
|
|
74
74
|
export { useNotificationSettings } from './infrastructure/hooks/useNotificationSettings';
|
|
75
|
-
export { useReminderActions } from './infrastructure/hooks/useReminderActions';
|
|
76
|
-
export { useQuietHoursActions } from './infrastructure/hooks/useQuietHoursActions';
|
|
75
|
+
export { useReminderActions } from './domains/reminders/infrastructure/hooks/useReminderActions';
|
|
76
|
+
export { useQuietHoursActions } from './domains/quietHours/infrastructure/hooks/useQuietHoursActions';
|
|
77
77
|
export { useNotificationSettingsUI } from './presentation/hooks/useNotificationSettingsUI';
|
|
78
78
|
|
|
79
79
|
// ============================================================================
|
|
@@ -86,8 +86,8 @@ export type { NotificationsScreenProps } from './presentation/screens/Notificati
|
|
|
86
86
|
export { NotificationSettingsScreen } from './presentation/screens/NotificationSettingsScreen';
|
|
87
87
|
export type { NotificationSettingsScreenProps } from './presentation/screens/NotificationSettingsScreen';
|
|
88
88
|
|
|
89
|
-
export { ReminderListScreen } from './presentation/screens/ReminderListScreen';
|
|
90
|
-
export type { ReminderListScreenProps } from './presentation/screens/ReminderListScreen';
|
|
89
|
+
export { ReminderListScreen } from './domains/reminders/presentation/screens/ReminderListScreen';
|
|
90
|
+
export type { ReminderListScreenProps } from './domains/reminders/presentation/screens/ReminderListScreen';
|
|
91
91
|
|
|
92
92
|
// ============================================================================
|
|
93
93
|
// COMPONENTS
|
|
@@ -96,26 +96,26 @@ export type { ReminderListScreenProps } from './presentation/screens/ReminderLis
|
|
|
96
96
|
export { NotificationsSection } from './presentation/components/NotificationsSection';
|
|
97
97
|
export type { NotificationsSectionProps, NotificationsSectionConfig } from './presentation/components/NotificationsSection';
|
|
98
98
|
|
|
99
|
-
export { TimePresetSelector } from './presentation/components/TimePresetSelector';
|
|
100
|
-
export type { TimePresetSelectorProps } from './presentation/components/TimePresetSelector';
|
|
99
|
+
export { TimePresetSelector } from './domains/reminders/presentation/components/TimePresetSelector';
|
|
100
|
+
export type { TimePresetSelectorProps } from './domains/reminders/presentation/components/TimePresetSelector';
|
|
101
101
|
|
|
102
|
-
export { FrequencySelector } from './presentation/components/FrequencySelector';
|
|
103
|
-
export type { FrequencySelectorProps } from './presentation/components/FrequencySelector';
|
|
102
|
+
export { FrequencySelector } from './domains/reminders/presentation/components/FrequencySelector';
|
|
103
|
+
export type { FrequencySelectorProps } from './domains/reminders/presentation/components/FrequencySelector';
|
|
104
104
|
|
|
105
|
-
export { WeekdaySelector } from './presentation/components/WeekdaySelector';
|
|
106
|
-
export type { WeekdaySelectorProps } from './presentation/components/WeekdaySelector';
|
|
105
|
+
export { WeekdaySelector } from './domains/reminders/presentation/components/WeekdaySelector';
|
|
106
|
+
export type { WeekdaySelectorProps } from './domains/reminders/presentation/components/WeekdaySelector';
|
|
107
107
|
|
|
108
|
-
export { ReminderItem } from './presentation/components/ReminderItem';
|
|
109
|
-
export type { ReminderItemProps, ReminderItemTranslations } from './presentation/components/ReminderItem';
|
|
108
|
+
export { ReminderItem } from './domains/reminders/presentation/components/ReminderItem';
|
|
109
|
+
export type { ReminderItemProps, ReminderItemTranslations } from './domains/reminders/presentation/components/ReminderItem';
|
|
110
110
|
|
|
111
|
-
export { ReminderForm } from './presentation/components/ReminderForm';
|
|
112
|
-
export type { ReminderFormProps, ReminderFormTranslations } from './presentation/components/ReminderForm';
|
|
111
|
+
export { ReminderForm } from './domains/reminders/presentation/components/ReminderForm';
|
|
112
|
+
export type { ReminderFormProps, ReminderFormTranslations } from './domains/reminders/presentation/components/ReminderForm';
|
|
113
113
|
|
|
114
|
-
export { FormButton } from './presentation/components/FormButton';
|
|
115
|
-
export type { FormButtonProps } from './presentation/components/FormButton';
|
|
114
|
+
export { FormButton } from './domains/reminders/presentation/components/FormButton';
|
|
115
|
+
export type { FormButtonProps } from './domains/reminders/presentation/components/FormButton';
|
|
116
116
|
|
|
117
|
-
export { QuietHoursCard } from './presentation/components/QuietHoursCard';
|
|
118
|
-
export type { QuietHoursCardProps } from './presentation/components/QuietHoursCard';
|
|
117
|
+
export { QuietHoursCard } from './domains/quietHours/presentation/components/QuietHoursCard';
|
|
118
|
+
export type { QuietHoursCardProps } from './domains/quietHours/presentation/components/QuietHoursCard';
|
|
119
119
|
|
|
120
120
|
export { SettingRow } from './presentation/components/SettingRow';
|
|
121
121
|
export type { SettingRowProps } from './presentation/components/SettingRow';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { useEffect, useCallback } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { useNotificationPreferences, useQuietHours, useRemindersStore } from '../../domains/reminders/infrastructure/storage/RemindersStore';
|
|
8
8
|
import { notificationService } from '../../infrastructure/services/NotificationService';
|
|
9
9
|
|
|
10
10
|
export const useNotificationSettingsUI = () => {
|
|
@@ -7,10 +7,10 @@ import React, { useMemo } from 'react';
|
|
|
7
7
|
import { View, StyleSheet, ActivityIndicator, TouchableOpacity } from 'react-native';
|
|
8
8
|
import { AtomicText, AtomicIcon, AtomicCard, ScreenLayout } from '@umituz/react-native-design-system';
|
|
9
9
|
import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
|
|
10
|
-
import { QuietHoursCard } from '
|
|
10
|
+
import { QuietHoursCard } from '../../domains/quietHours/presentation/components/QuietHoursCard';
|
|
11
11
|
import { SettingRow } from '../components/SettingRow';
|
|
12
12
|
import { useNotificationSettingsUI } from '../hooks/useNotificationSettingsUI';
|
|
13
|
-
import { useReminders } from '../../infrastructure/storage/RemindersStore';
|
|
13
|
+
import { useReminders } from '../../domains/reminders/infrastructure/storage/RemindersStore';
|
|
14
14
|
import type { NotificationSettingsTranslations, QuietHoursTranslations } from '../../infrastructure/services/types';
|
|
15
15
|
|
|
16
16
|
export interface NotificationSettingsScreenProps {
|
|
File without changes
|
|
File without changes
|