@umituz/react-native-design-system 4.26.1 → 4.26.3
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/dist/molecules/navigation/components/NavigationHeader.d.ts +1 -0
- package/dist/timezone/domain/entities/TimezoneCapabilities.d.ts +2 -0
- package/dist/timezone/index.d.ts +1 -0
- package/dist/timezone/infrastructure/services/CalendarManager.d.ts +1 -0
- package/dist/timezone/infrastructure/services/TimezoneService.d.ts +1 -0
- package/dist/timezone/infrastructure/utils/TimeUtils.d.ts +40 -0
- package/package.json +1 -1
- package/src/molecules/navigation/components/NavigationHeader.tsx +1 -0
|
@@ -64,6 +64,8 @@ export interface ITimezoneManipulation {
|
|
|
64
64
|
endOfDay(date: Date | string | number): Date;
|
|
65
65
|
/** Get middle of day (12:00:00) */
|
|
66
66
|
getMiddleOfDay(date: Date | string | number): Date;
|
|
67
|
+
/** Set specific time of day (hours and minutes) */
|
|
68
|
+
setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
|
|
67
69
|
/** Convert date from one timezone to another */
|
|
68
70
|
convertTimezone(date: Date | string | number, fromTimezone: string, toTimezone: string): Date;
|
|
69
71
|
/** Add business days (skip weekends) */
|
package/dist/timezone/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export type { TimezoneInfo, TimezoneCalendarDay, ITimezoneService, } from './dom
|
|
|
10
10
|
export { timezoneService, TimezoneService } from './infrastructure/services/TimezoneService';
|
|
11
11
|
export { useTimezone } from './presentation/hooks/useTimezone';
|
|
12
12
|
export type { UseTimezoneReturn } from './presentation/hooks/useTimezone';
|
|
13
|
+
export { formatTimeComponent, parseTimeComponent, millisecondsToSeconds, } from './infrastructure/utils/TimeUtils';
|
|
@@ -14,6 +14,7 @@ export declare class CalendarManager {
|
|
|
14
14
|
addDays(date: Date | string | number, days: number): Date;
|
|
15
15
|
startOfDay(date: Date | string | number): Date;
|
|
16
16
|
endOfDay(date: Date | string | number): Date;
|
|
17
|
+
setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
|
|
17
18
|
getDifferenceInDays(date1: Date | string | number, date2: Date | string | number): number;
|
|
18
19
|
getDaysUntil(date: Date | string | number): number;
|
|
19
20
|
isFuture(date: Date | string | number): boolean;
|
|
@@ -23,6 +23,7 @@ export declare class TimezoneService implements ITimezoneService {
|
|
|
23
23
|
addDays(date: Date | string | number, days: number): Date;
|
|
24
24
|
startOfDay(date: Date | string | number): Date;
|
|
25
25
|
endOfDay(date: Date | string | number): Date;
|
|
26
|
+
setTimeOfDay(date: Date | string | number, hours: number, minutes: number): Date;
|
|
26
27
|
formatDateToString(date: Date | string | number): string;
|
|
27
28
|
getCurrentISOString(): string;
|
|
28
29
|
formatToISOString(date: Date | string | number): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time Utilities
|
|
3
|
+
* Utility functions for time formatting and conversion
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Format hours and minutes as "HH:MM" string
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* formatTimeComponent(14, 30) // Returns "14:30"
|
|
10
|
+
* formatTimeComponent(9, 5) // Returns "09:05"
|
|
11
|
+
*
|
|
12
|
+
* @param hours - Hours (0-23)
|
|
13
|
+
* @param minutes - Minutes (0-59)
|
|
14
|
+
* @returns Formatted time string
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatTimeComponent(hours: number, minutes: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Parse a time string "HH:MM" to hours and minutes
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* parseTimeComponent("14:30") // Returns { hours: 14, minutes: 30 }
|
|
22
|
+
* parseTimeComponent("09:05") // Returns { hours: 9, minutes: 5 }
|
|
23
|
+
*
|
|
24
|
+
* @param timeStr - Time string in "HH:MM" format
|
|
25
|
+
* @returns Object with hours and minutes
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseTimeComponent(timeStr: string): {
|
|
28
|
+
hours: number;
|
|
29
|
+
minutes: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Convert milliseconds to seconds
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* millisecondsToSeconds(5000) // Returns 5
|
|
36
|
+
*
|
|
37
|
+
* @param ms - Milliseconds
|
|
38
|
+
* @returns Seconds
|
|
39
|
+
*/
|
|
40
|
+
export declare function millisecondsToSeconds(ms: number): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "4.26.
|
|
3
|
+
"version": "4.26.3",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities - TanStack persistence and expo-image-manipulator now lazy loaded",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|