ados-rcm 1.1.777 → 1.1.778
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/AModule/AComponents/ADatePicker/ADatePicker.d.ts +2 -0
- package/dist/AModule/AComponents/ADatePicker/ADatePickerUtil.d.ts +107 -29
- package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +1 -4
- package/dist/AModule/AComponents/ATable/ATable.d.ts +1 -1
- package/dist/AModule/AUtils/tableF.d.ts +1 -1
- package/dist/index.cjs.js +206 -206
- package/dist/index.es.js +21212 -20828
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TUseValues } from '../../AHooks/useValues';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IABaseProps } from '../ABase/ABase';
|
|
4
|
+
import { TIconSize } from '../AIcon/AIcon';
|
|
4
5
|
import { Resources } from '../AResource/AResource';
|
|
5
6
|
import { EDir12, TActionRef } from '../ATypes/ATypes';
|
|
6
7
|
import { IAWrapProps } from '../AWrap/AWrap';
|
|
@@ -17,6 +18,7 @@ export interface IADatePickerProps extends IABaseProps, IAWrapProps {
|
|
|
17
18
|
actionRef?: TActionRef<IADatePickerActions>;
|
|
18
19
|
canTabOpen?: boolean;
|
|
19
20
|
className?: string;
|
|
21
|
+
iconSize?: TIconSize;
|
|
20
22
|
inputProps?: React.HTMLAttributes<HTMLInputElement>;
|
|
21
23
|
maxDate?: Date;
|
|
22
24
|
minDate?: Date;
|
|
@@ -21,20 +21,105 @@ export declare function moveMonth(currentMonth: number, currentYear: number, del
|
|
|
21
21
|
} | null;
|
|
22
22
|
export declare function parseAndNormalizeDateString(str: string | undefined | null, minDate?: Date, maxDate?: Date): Date | null;
|
|
23
23
|
export declare function adjustMonthForYear(newYear: number, currentMonth: number, minDate?: Date, maxDate?: Date): number;
|
|
24
|
+
export declare const formatDate: (date?: Date) => string;
|
|
25
|
+
export declare function sortDateRange(sDate: Date, eDate: Date): {
|
|
26
|
+
eDate: Date;
|
|
27
|
+
sDate: Date;
|
|
28
|
+
};
|
|
29
|
+
export declare function normalizeDateRange(dr: IDateRange): IDateRange;
|
|
30
|
+
export declare function useCalendarLogic(selectedDate: Date | undefined, minDate: Date | undefined, maxDate: Date | undefined): {
|
|
31
|
+
page: ICalendarPage;
|
|
32
|
+
setPage: React.Dispatch<React.SetStateAction<ICalendarPage>>;
|
|
33
|
+
handleYearChange: (newYear: number) => void;
|
|
34
|
+
handleMonthChange: (newMonth: number) => void;
|
|
35
|
+
calendarDays: IDayObject[];
|
|
36
|
+
resetPage: () => void;
|
|
37
|
+
};
|
|
38
|
+
export declare function useLocalDateSync<T extends Date | IDateRange | undefined>(externalDate: T): [T, (date: T) => void];
|
|
39
|
+
export declare function useDateInputSync(localDate: Date | undefined, isOpen?: boolean): readonly [string, React.Dispatch<React.SetStateAction<string>>];
|
|
40
|
+
interface IDateInputHandlersConfig {
|
|
41
|
+
inputValue: string;
|
|
42
|
+
maxDate?: Date;
|
|
43
|
+
minDate?: Date;
|
|
44
|
+
onError?: (message: string) => void;
|
|
45
|
+
setExternalDate?: (date: Date | undefined) => void;
|
|
46
|
+
setInputValue: (value: string) => void;
|
|
47
|
+
setLocalDate: (date: Date | undefined) => void;
|
|
48
|
+
setPage: React.Dispatch<React.SetStateAction<ICalendarPage>>;
|
|
49
|
+
}
|
|
50
|
+
export declare function useDateInputHandlers(config: IDateInputHandlersConfig): {
|
|
51
|
+
hasError: boolean;
|
|
52
|
+
handleStringChange: (val: string) => void;
|
|
53
|
+
handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
54
|
+
handleBlur: () => void;
|
|
55
|
+
handlePaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
56
|
+
};
|
|
57
|
+
export declare function useDateRangeInputSync(localDr?: {
|
|
58
|
+
eDate?: Date;
|
|
59
|
+
sDate?: Date;
|
|
60
|
+
}, isOpen?: boolean): {
|
|
61
|
+
readonly startInputValue: string;
|
|
62
|
+
readonly setStartInputValue: React.Dispatch<React.SetStateAction<string>>;
|
|
63
|
+
readonly endInputValue: string;
|
|
64
|
+
readonly setEndInputValue: React.Dispatch<React.SetStateAction<string>>;
|
|
65
|
+
};
|
|
66
|
+
export interface IDateRange {
|
|
67
|
+
eDate: Date;
|
|
68
|
+
sDate: Date;
|
|
69
|
+
}
|
|
70
|
+
interface IDateRangeInputHandlersConfig {
|
|
71
|
+
calculateDateRange: (newDate: Date, isStart: boolean) => {
|
|
72
|
+
e: Date;
|
|
73
|
+
s: Date;
|
|
74
|
+
};
|
|
75
|
+
endInputValue: string;
|
|
76
|
+
handleEmptyValue: (isStart: boolean) => void;
|
|
77
|
+
localDr?: IDateRange;
|
|
78
|
+
maxDate?: Date;
|
|
79
|
+
minDate?: Date;
|
|
80
|
+
setEndInputValue: (value: string) => void;
|
|
81
|
+
setLocalDr: (dr?: IDateRange) => void;
|
|
82
|
+
setPage: (page: ICalendarPage) => void;
|
|
83
|
+
setStartInputValue: (value: string) => void;
|
|
84
|
+
showDateError: () => void;
|
|
85
|
+
startInputValue: string;
|
|
86
|
+
updateDateRange: (newDr?: IDateRange) => void;
|
|
87
|
+
}
|
|
88
|
+
export declare function calculateDateRangeFromLocal(newDate: Date, isStart: boolean, localDr?: IDateRange): {
|
|
89
|
+
e: Date;
|
|
90
|
+
s: Date;
|
|
91
|
+
};
|
|
92
|
+
export declare function useDateRangeInputHandlers(config: IDateRangeInputHandlersConfig): {
|
|
93
|
+
hasStartError: boolean;
|
|
94
|
+
hasEndError: boolean;
|
|
95
|
+
handleStartStringChange: (val: string) => void;
|
|
96
|
+
handleEndStringChange: (val: string) => void;
|
|
97
|
+
handleStartKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
98
|
+
handleEndKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
99
|
+
handleStartBlur: () => void;
|
|
100
|
+
handleEndBlur: () => void;
|
|
101
|
+
handleStartPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
102
|
+
handleEndPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
103
|
+
applyStartDateString: () => void;
|
|
104
|
+
applyEndDateString: () => void;
|
|
105
|
+
};
|
|
106
|
+
export declare function useDateRangeLogic(dr: IDateRange | undefined, changeDr: (val?: IDateRange) => void, minDate?: Date, maxDate?: Date): {
|
|
107
|
+
page: ICalendarPage;
|
|
108
|
+
setPage: React.Dispatch<React.SetStateAction<ICalendarPage>>;
|
|
109
|
+
calendarDays: IDayObject[];
|
|
110
|
+
handleDateClick: (date: Date) => void;
|
|
111
|
+
resetPage: () => void;
|
|
112
|
+
handleYearChange: (newYear: number) => void;
|
|
113
|
+
handleMonthChange: (newMonth: number) => void;
|
|
114
|
+
};
|
|
24
115
|
export interface IDayObject {
|
|
25
116
|
date: Date;
|
|
26
117
|
day: number;
|
|
27
118
|
isCurrentMonth: boolean;
|
|
28
119
|
isDisabled: boolean;
|
|
29
120
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
* dayjs 기반 단일 루프로 달력 일자를 생성합니다.
|
|
34
|
-
* - 이전 달: 첫 주를 채우기 위한 날짜
|
|
35
|
-
* - 현재 달: 1일 ~ 말일
|
|
36
|
-
* - 다음 달: 마지막 주를 토요일까지 채우기 위한 날짜
|
|
37
|
-
*/
|
|
121
|
+
export declare const isSameDate: (date1?: Date | null, date2?: Date | null) => boolean;
|
|
122
|
+
export declare const isSameRange: (a?: IDateRange, b?: IDateRange) => boolean;
|
|
38
123
|
export declare function generateCalendarDays(year: number, month: number, { minDate, maxDate }?: {
|
|
39
124
|
maxDate?: Date;
|
|
40
125
|
minDate?: Date;
|
|
@@ -46,15 +131,22 @@ interface ICalendarGridProps {
|
|
|
46
131
|
sDate?: Date;
|
|
47
132
|
};
|
|
48
133
|
days: IDayObject[];
|
|
49
|
-
onDateClick: (
|
|
50
|
-
onHover?: (date: Date | null) => void;
|
|
51
|
-
onLeave?: () => void;
|
|
52
|
-
onMouseDown?: (date: Date) => void;
|
|
53
|
-
onMouseUp?: () => void;
|
|
54
|
-
resources: typeof Resources.ADatePicker | typeof Resources.ADateRangePicker;
|
|
134
|
+
onDateClick: (d: Date) => void;
|
|
55
135
|
selectedDate?: Date;
|
|
56
136
|
}
|
|
57
|
-
export declare const CalendarGrid: React.
|
|
137
|
+
export declare const CalendarGrid: React.MemoExoticComponent<({ days, selectedDate, dateRange, onDateClick, S }: ICalendarGridProps) => import("react/jsx-runtime").JSX.Element>;
|
|
138
|
+
interface ICalendarHeaderProps {
|
|
139
|
+
S: CSSModuleClasses;
|
|
140
|
+
handleMonthChange: (m: number) => void;
|
|
141
|
+
handleYearChange: (y: number) => void;
|
|
142
|
+
maxDate?: Date;
|
|
143
|
+
minDate?: Date;
|
|
144
|
+
page: ICalendarPage;
|
|
145
|
+
resources: typeof Resources.ADatePicker | typeof Resources.ADateRangePicker;
|
|
146
|
+
setPage: (p: ICalendarPage) => void;
|
|
147
|
+
yearSize?: number;
|
|
148
|
+
}
|
|
149
|
+
export declare const CalendarHeader: ({ page, setPage, handleYearChange, handleMonthChange, minDate, maxDate, yearSize, resources, S, }: ICalendarHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
150
|
export declare function usePortalKeyboardNavigation(isOpen: boolean, close: () => void, portalRef: React.RefObject<HTMLElement | null>, anchorRef: React.RefObject<HTMLElement | null>): void;
|
|
59
151
|
export interface IPortalRefs {
|
|
60
152
|
anchorRef: React.RefObject<HTMLElement | null>;
|
|
@@ -71,18 +163,4 @@ export declare function usePortalManager(refs: IPortalRefs, position: EDir12, is
|
|
|
71
163
|
toggle: () => void;
|
|
72
164
|
calculatePosition: () => void;
|
|
73
165
|
};
|
|
74
|
-
export declare function useOutsideClick(isOpen: boolean, close: () => void, refs: IPortalRefs): void;
|
|
75
|
-
export interface ICalendarHeaderProps {
|
|
76
|
-
S: CSSModuleClasses;
|
|
77
|
-
endRef?: React.RefObject<HTMLDivElement | null>;
|
|
78
|
-
handleYearChange: (year: number) => void;
|
|
79
|
-
maxDate?: Date;
|
|
80
|
-
minDate?: Date;
|
|
81
|
-
page: ICalendarPage;
|
|
82
|
-
resources: typeof Resources.ADatePicker | typeof Resources.ADateRangePicker;
|
|
83
|
-
setPage: (page: ICalendarPage) => void;
|
|
84
|
-
startRef?: React.RefObject<HTMLDivElement | null>;
|
|
85
|
-
yearSize?: number;
|
|
86
|
-
}
|
|
87
|
-
export declare const CalendarHeader: React.MemoExoticComponent<({ page, setPage, handleYearChange, minDate, maxDate, resources, yearSize, startRef, endRef, S }: ICalendarHeaderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
88
166
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TUseValues } from '../../AHooks/useValues';
|
|
2
2
|
import { Resources } from '../AResource/AResource';
|
|
3
3
|
import { IADatePickerProps } from './ADatePicker';
|
|
4
|
-
|
|
5
|
-
eDate: Date;
|
|
6
|
-
sDate: Date;
|
|
7
|
-
}
|
|
4
|
+
import { IDateRange } from './ADatePickerUtil';
|
|
8
5
|
export interface IADateRangePickerProps extends Omit<IADatePickerProps, 'useDate'> {
|
|
9
6
|
noDefaultChoices?: boolean;
|
|
10
7
|
resources?: Partial<typeof Resources.ADateRangePicker>;
|
|
@@ -3,10 +3,10 @@ import { TUseValues } from '../../AHooks/useValues';
|
|
|
3
3
|
import { TCanCallback } from '../../AUtils/cbF';
|
|
4
4
|
import { IItem } from '../../AUtils/objF';
|
|
5
5
|
import { IABaseProps } from '../ABase/ABase';
|
|
6
|
-
import { IDateRange } from '../ADatePicker/ADateRangePicker';
|
|
7
6
|
import { TIcons } from '../AIcon/AIcon';
|
|
8
7
|
import { Resources } from '../AResource/AResource';
|
|
9
8
|
import { TActionRef, TIdx, TPromisable } from '../ATypes/ATypes';
|
|
9
|
+
import { IDateRange } from '../ADatePicker/ADatePickerUtil';
|
|
10
10
|
import { IATableRowProps } from './ATableBody';
|
|
11
11
|
export interface IATableTHProps<T extends IItem> {
|
|
12
12
|
/**
|
|
@@ -24,7 +24,7 @@ export declare const tableF: {
|
|
|
24
24
|
value: undefined;
|
|
25
25
|
} | {
|
|
26
26
|
selectedKey: string | number | keyof T;
|
|
27
|
-
value: string | number | Date | import('
|
|
27
|
+
value: string | number | Date | import('../AComponents/ADatePicker/ADatePickerUtil').IDateRange;
|
|
28
28
|
} | undefined;
|
|
29
29
|
};
|
|
30
30
|
export {};
|