ados-rcm 1.0.10 → 1.0.13
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/ABase/ABase.d.ts +33 -26
- package/dist/AModule/AComponents/AButton/AButton.d.ts +21 -7
- package/dist/AModule/AComponents/AButton/AIconButton.d.ts +15 -9
- package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +19 -12
- package/dist/AModule/AComponents/AClock/AClock.d.ts +32 -38
- package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +39 -54
- package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +20 -22
- package/dist/AModule/AComponents/ADialog/ADialog.d.ts +54 -66
- package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +30 -16
- package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +45 -61
- package/dist/AModule/AComponents/AFrames/AFrames.d.ts +33 -24
- package/dist/AModule/AComponents/AGrow/AGrow.d.ts +11 -7
- package/dist/AModule/AComponents/AIcon/AIcon.d.ts +14 -8
- package/dist/AModule/AComponents/AInput/AInput.d.ts +37 -48
- package/dist/AModule/AComponents/AListView/AListView.d.ts +38 -27
- package/dist/AModule/AComponents/ASelect/ASelect.d.ts +56 -56
- package/dist/AModule/AComponents/ASpace/ASpace.d.ts +9 -11
- package/dist/AModule/AComponents/AStepper/AStepper.d.ts +34 -35
- package/dist/AModule/AComponents/ASwitch/ASwitch.d.ts +13 -10
- package/dist/AModule/AComponents/ATab/ATab.d.ts +34 -35
- package/dist/AModule/AComponents/ATable/ATable.d.ts +249 -200
- package/dist/AModule/AComponents/AText/AText.d.ts +24 -9
- package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +33 -38
- package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +22 -11
- package/dist/AModule/AComponents/ATree/ATree.d.ts +71 -38
- package/dist/AModule/AComponents/AWrap/AWrap.d.ts +19 -10
- package/dist/index.cjs.js +15 -15
- package/dist/index.es.js +2095 -2069
- package/package.json +1 -1
|
@@ -5,59 +5,66 @@ export interface IABaseProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
/**
|
|
7
7
|
* abaseRef? : React.RefObject<HTMLDivElement>
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* <br/>(1)const ref = useRef<HtmlDivElement>();
|
|
11
|
-
* <ABase abaseRef={ref}/>
|
|
8
|
+
*
|
|
9
|
+
* Description : ref of ABase
|
|
12
10
|
*/
|
|
13
11
|
abaseRef?: React.RefObject<HTMLDivElement>;
|
|
14
12
|
/**
|
|
15
13
|
* isDisabled? : any
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* <br/>(1)<ABase isDisabled/>
|
|
14
|
+
*
|
|
15
|
+
* Description : if truthy, dimming is applied. if isLoading is true, spinner is dimmed as well.
|
|
19
16
|
*/
|
|
20
17
|
isDisabled?: any;
|
|
21
18
|
/**
|
|
22
19
|
* isLoading? : any
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* <br/>(1)<ABase isLoading/>
|
|
20
|
+
*
|
|
21
|
+
* Description : if truthy, dimming and spinner are applied.
|
|
26
22
|
*/
|
|
27
23
|
isLoading?: any;
|
|
28
24
|
/**
|
|
29
25
|
* tooltip? : React.ReactNode
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* <br/>(1)<ABase tooltip="tooltip text"/>
|
|
33
|
-
* <br/>(2)<ABase tooltip={<div>tooltip text</div>}/>
|
|
26
|
+
*
|
|
27
|
+
* Description : tooltip. if tooltip is truthy, tooltip is shown.
|
|
34
28
|
*/
|
|
35
29
|
tooltip?: React.ReactNode;
|
|
36
30
|
/**
|
|
37
31
|
* tooltipDistance? : number = 10
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* <br/>(1)<ABase tooltipDistance={10}/>
|
|
32
|
+
*
|
|
33
|
+
* Description : distance in pixels between tooltip and target.
|
|
41
34
|
*/
|
|
42
35
|
tooltipDistance?: number;
|
|
43
36
|
/**
|
|
44
37
|
* tooltipDelay? : number
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* <br/>(1)<ABase tooltipDelay={100}/>
|
|
38
|
+
*
|
|
39
|
+
* Description : delay in seconds of tooltip after mouse enter.
|
|
48
40
|
*/
|
|
49
41
|
tooltipDelay?: number;
|
|
50
42
|
}
|
|
51
43
|
/**
|
|
52
44
|
* AComponent : ABase
|
|
53
|
-
* <br/>Description : ABase is a base component(like div) that can have isDisabled, isLoading and tooltip.
|
|
54
|
-
* <br/>Basic Usage :
|
|
55
|
-
* <br/>(1)return <ABase>{children}</ABase>
|
|
56
45
|
*
|
|
57
|
-
*
|
|
46
|
+
* Description : ABase is a base component(like div) that can have isDisabled, isLoading and tooltip.
|
|
58
47
|
*
|
|
59
|
-
*
|
|
48
|
+
* Basic Usage :
|
|
60
49
|
*
|
|
61
|
-
*
|
|
50
|
+
* if (case 1)
|
|
51
|
+
* <ABase>
|
|
52
|
+
* {children}
|
|
53
|
+
* </ABase>
|
|
54
|
+
*
|
|
55
|
+
* if (case 2)
|
|
56
|
+
* <ABase isDisabled>
|
|
57
|
+
* {children}
|
|
58
|
+
* </ABase>
|
|
59
|
+
*
|
|
60
|
+
* if (case 3)
|
|
61
|
+
* <ABase isLoading>
|
|
62
|
+
* {children}
|
|
63
|
+
* </ABase>
|
|
64
|
+
*
|
|
65
|
+
* if (case 4)
|
|
66
|
+
* <ABase tooltip="tooltip text">
|
|
67
|
+
* {children}
|
|
68
|
+
* </ABase>
|
|
62
69
|
*/
|
|
63
70
|
export declare const ABase: (props: IABaseProps) => React.ReactNode;
|
|
@@ -4,18 +4,32 @@ export type TAButtonType = 'Primary' | 'Secondary' | 'Undefined';
|
|
|
4
4
|
export interface IAButtonProps extends IABaseProps, IAWrapProps {
|
|
5
5
|
/**
|
|
6
6
|
* type? : TAButtonType = 'Primary'
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* <br/>(1)<AButton type="Secondary"/>
|
|
7
|
+
*
|
|
8
|
+
* Description : type of IAButton
|
|
10
9
|
*/
|
|
11
10
|
type?: TAButtonType;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* AComponent : AButton
|
|
15
|
-
* <br/>Description : AButton is a button component.
|
|
16
|
-
* <br/>Basic Usage :
|
|
17
|
-
* <br/>(1)<AButton onClick={onClick}>Click Me</AButton>
|
|
18
14
|
*
|
|
19
|
-
*
|
|
15
|
+
* Description : AButton is a button component.
|
|
16
|
+
*
|
|
17
|
+
* Basic Usage :
|
|
18
|
+
*
|
|
19
|
+
* const onClick = () => { console.log('Button Clicked') }
|
|
20
|
+
* const [isDisabled, setIsDisabled] = useState(false)
|
|
21
|
+
*
|
|
22
|
+
* if (case 1)
|
|
23
|
+
* <AButton onClick={onClick}>
|
|
24
|
+
* Click Me
|
|
25
|
+
* </AButton>
|
|
26
|
+
*
|
|
27
|
+
* if (case 2)
|
|
28
|
+
* <AButton type="Secondary"
|
|
29
|
+
* onClick={onClick}
|
|
30
|
+
* isDisabled={isDisabled}
|
|
31
|
+
* tooltip={isDisabled && 'Button Disabled'}>
|
|
32
|
+
* Click Me
|
|
33
|
+
* </AButton>
|
|
20
34
|
*/
|
|
21
35
|
export declare const AButton: (props: IAButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,24 +3,30 @@ import { TIcons } from '../AIcon/AIcon';
|
|
|
3
3
|
interface IAIconButtonProps extends IABaseProps {
|
|
4
4
|
/**
|
|
5
5
|
* icon : TIcons
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* <br/>(1)<AIconButton icon="Alert"/>
|
|
6
|
+
*
|
|
7
|
+
* Description : icon of AIconButton
|
|
9
8
|
*/
|
|
10
9
|
icon: TIcons;
|
|
11
10
|
/**
|
|
12
11
|
* size? : 'Small' | 'Medium' | 'Large' = 'Medium'
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* <br/>(1)<AIconButton icon="Alert" size="Small"/>
|
|
12
|
+
*
|
|
13
|
+
* Description : size of AIconButton
|
|
16
14
|
*/
|
|
17
15
|
size?: 'Small' | 'Medium' | 'Large';
|
|
18
16
|
}
|
|
19
17
|
/**
|
|
20
18
|
* AComponent : AIconButton
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* Description : AIconButton is a button component with an Icon.
|
|
21
|
+
*
|
|
22
|
+
* Basic Usage :
|
|
23
|
+
*
|
|
24
|
+
* const onClick = () => { console.log('Button Clicked') }
|
|
25
|
+
*
|
|
26
|
+
* if (case 1)
|
|
27
|
+
* <AIconButton icon="Alert"
|
|
28
|
+
* size="Small"
|
|
29
|
+
* onClick={onClick}/>
|
|
24
30
|
*/
|
|
25
31
|
export declare const AIconButton: (props: IAIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
32
|
export {};
|
|
@@ -2,26 +2,33 @@ import { TUseValues } from '../../AHooks/useValues';
|
|
|
2
2
|
import { IABaseProps } from '../ABase/ABase';
|
|
3
3
|
export interface IACheckBoxProps extends IABaseProps {
|
|
4
4
|
/**
|
|
5
|
-
* useCheck? : TUseValues
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* <br/>(1)const [useCheck, setUseCheck] = useState(false);
|
|
9
|
-
* <ACheckBox useCheck={[useCheck, setUseCheck]}/>
|
|
5
|
+
* useCheck? : TUseValues<any>
|
|
6
|
+
*
|
|
7
|
+
* Description : [useCheck, setUseCheck] = useValues of ACheckBox. if useCheck is truthy, ACheckBox is checked.
|
|
10
8
|
*/
|
|
11
9
|
useCheck?: TUseValues<any>;
|
|
12
10
|
/**
|
|
13
11
|
* isIndeterminate? : boolean
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* <br/>(1)<ACheckBox isIndeterminate/>
|
|
12
|
+
*
|
|
13
|
+
* Description : if true, ACheckBox is indeterminate. priority is higher than useCheck.
|
|
17
14
|
*/
|
|
18
15
|
isIndeterminate?: boolean;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* AComponent : ACheckBox
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* Description : ACheckBox is a checkbox component.
|
|
21
|
+
*
|
|
22
|
+
* Basic Usage :
|
|
23
|
+
*
|
|
24
|
+
* const onClick = () => { console.log('Button Clicked') }
|
|
25
|
+
*
|
|
26
|
+
* if (case 1)
|
|
27
|
+
* <AIconButton icon="Alert"
|
|
28
|
+
* size="Small"
|
|
29
|
+
* onClick={onClick}/>
|
|
30
|
+
*
|
|
31
|
+
* <ACheckBox useCheck={[useCheck, setUseCheck]} onClick={onClick} isDisabled={isDisabled} tooltip={isDisabled && 'CheckBox Disabled'} />
|
|
32
|
+
*
|
|
26
33
|
*/
|
|
27
34
|
export declare const ACheckBox: ({ useCheck, isIndeterminate, ...abaseProps }: IACheckBoxProps) => React.ReactNode;
|
|
@@ -5,77 +5,71 @@ import { TActionRef } from '../ATypes/ATypes';
|
|
|
5
5
|
export interface IAClockActions {
|
|
6
6
|
/**
|
|
7
7
|
* start : () => void
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* Description : start clock running
|
|
9
10
|
*/
|
|
10
11
|
start: () => void;
|
|
11
12
|
/**
|
|
12
13
|
* stop : () => void
|
|
13
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* Description : stop clock running
|
|
14
16
|
*/
|
|
15
17
|
stop: () => void;
|
|
16
18
|
/**
|
|
17
19
|
* reset : () => void
|
|
18
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* Description : set clock's tick to maxTicks and stop clock running
|
|
19
22
|
*/
|
|
20
23
|
reset: () => void;
|
|
21
24
|
/**
|
|
22
25
|
* setTicks : (ticks: number) => void
|
|
23
|
-
*
|
|
26
|
+
*
|
|
27
|
+
* Description : set clock's tick to specified number
|
|
24
28
|
*/
|
|
25
29
|
setTicks: (ticks: number) => void;
|
|
26
30
|
}
|
|
27
31
|
export interface IAClockProps extends IAWrapProps, IABaseProps {
|
|
28
32
|
/**
|
|
29
33
|
* maxTicks? : number = 300
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* <br/>(1)<AClock maxTicks={180}/>
|
|
34
|
+
*
|
|
35
|
+
* Description : maxTicks of AClock
|
|
33
36
|
*/
|
|
34
37
|
maxTicks?: number;
|
|
35
38
|
/**
|
|
36
39
|
* interval? : number = 1000
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* <br/>(1)<AClock interval={500}/>
|
|
40
|
+
*
|
|
41
|
+
* Description : interval in milliseconds of AClock
|
|
40
42
|
*/
|
|
41
43
|
interval?: number;
|
|
42
44
|
/**
|
|
43
45
|
* onFinish? : () => void
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* <br/>(1)<AClock onFinish={onFinish}/>
|
|
46
|
+
*
|
|
47
|
+
* Description : onFinish of AClock
|
|
47
48
|
*/
|
|
48
49
|
onFinish?: () => void;
|
|
49
50
|
/**
|
|
50
|
-
* actionRef? : TActionRef
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* <br/>(1)const actionRef = useRef<IAClockActions>();
|
|
54
|
-
* <AClock actionRef={ref}/>
|
|
51
|
+
* actionRef? : TActionRef<IAClockActions>
|
|
52
|
+
*
|
|
53
|
+
* Description : actionRef of AClock
|
|
55
54
|
*/
|
|
56
55
|
actionRef?: TActionRef<IAClockActions>;
|
|
57
56
|
}
|
|
58
57
|
/**
|
|
59
58
|
* AComponent : AClock
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* }
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* }
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* <AButton onClick={onStartClick}>Start</AButton>
|
|
76
|
-
* <AButton onClick={onStopClick}>Stop</AButton>
|
|
77
|
-
* <AButton onClick={onResetClick}>Reset</AButton>
|
|
78
|
-
* </div>
|
|
79
|
-
* )
|
|
59
|
+
*
|
|
60
|
+
* Description : AClock is a clock component.
|
|
61
|
+
*
|
|
62
|
+
* Basic Usage :
|
|
63
|
+
*
|
|
64
|
+
* const actionRef = useRef<IAClockActions>()
|
|
65
|
+
* const onFinish = () => { console.log('Clock Finished') }
|
|
66
|
+
* const onStartClick = () => { actionRef.current?.start() }
|
|
67
|
+
* const onStopClick = () => { actionRef.current?.stop() }
|
|
68
|
+
*
|
|
69
|
+
* if (case 1)
|
|
70
|
+
* <AClock onFinish={onFinish} actionRef={ref}/>
|
|
71
|
+
* <AButton onClick={onStartClick}>Start</AButton>
|
|
72
|
+
* <AButton onClick={onStopClick}>Stop</AButton>
|
|
73
|
+
* <AButton onClick={actionRef.current?.reset}>Reset</AButton>
|
|
80
74
|
*/
|
|
81
75
|
export declare const AClock: ({ maxTicks, interval, onFinish, actionRef, wrapProps, helperText, label, ...abaseProps }: IAClockProps) => React.ReactNode;
|
|
@@ -1,113 +1,98 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TUseValues } from '../../AHooks/useValues';
|
|
3
|
-
import { EDir12, TActionRef } from '../ATypes/ATypes';
|
|
4
3
|
import { Resources } from '../AResource/AResource';
|
|
4
|
+
import { EDir12, TActionRef } from '../ATypes/ATypes';
|
|
5
5
|
export interface IADatePickerActions {
|
|
6
6
|
/**
|
|
7
7
|
* open : () => void
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* Description : opens calendar when called
|
|
9
10
|
*/
|
|
10
11
|
open: () => void;
|
|
11
12
|
/**
|
|
12
13
|
* close : () => void
|
|
13
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* Description : closes calendar when called
|
|
14
16
|
*/
|
|
15
17
|
close: () => void;
|
|
16
18
|
/**
|
|
17
19
|
* toggle : () => void
|
|
18
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* Description : toggles calendar(open <> close) when called
|
|
19
22
|
*/
|
|
20
23
|
toggle: () => void;
|
|
21
24
|
}
|
|
22
25
|
export interface IADatePickerProps {
|
|
23
26
|
/**
|
|
24
27
|
* className? : string
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* <br/>(1)<ADatePicker className="className"/>
|
|
28
|
+
*
|
|
29
|
+
* Description : className of ADatePicker
|
|
28
30
|
*/
|
|
29
31
|
className?: string;
|
|
30
32
|
/**
|
|
31
33
|
* useDate? : TUseValues<Date>
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* <br/>(1)const [date, setDate] = useState(new Date());
|
|
35
|
-
* <ADatePicker useDate={[date, setDate]}/>
|
|
36
|
-
* <br/>(2)const [date, setDate] = useState(new Date());
|
|
37
|
-
* const onDateChange = (newDate: Date) => {
|
|
38
|
-
* setDate(newDate);
|
|
39
|
-
* }
|
|
40
|
-
* <ADatePicker useDate={[date, onDateChange]}/>
|
|
34
|
+
*
|
|
35
|
+
* Description : useDate of ADatePicker
|
|
41
36
|
*/
|
|
42
37
|
useDate?: TUseValues<Date>;
|
|
43
38
|
/**
|
|
44
39
|
* position? : EDir12 = EDir12.SE
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* <br/>(1)<ADatePicker position={EDir12.E}/>
|
|
40
|
+
*
|
|
41
|
+
* Description : position of calendar
|
|
48
42
|
*/
|
|
49
43
|
position?: EDir12;
|
|
50
44
|
/**
|
|
51
45
|
* actionRef? : TActionRef<IADatePickerActions>
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* <br/>(1)const actionRef = useRef<IADatePickerActions>();
|
|
55
|
-
* return (
|
|
56
|
-
* <>
|
|
57
|
-
* <ADatePicker actionRef={ref}/>
|
|
58
|
-
* <AButton onClick={() => ref.current?.open()}>Open</AButton>
|
|
59
|
-
* <AButton onClick={() => ref.current?.close()}>Close</AButton>
|
|
60
|
-
* </>
|
|
46
|
+
*
|
|
47
|
+
* Description : actionRef of ADatePicker
|
|
61
48
|
*/
|
|
62
49
|
actionRef?: TActionRef<IADatePickerActions>;
|
|
63
50
|
/**
|
|
64
51
|
* minDate? : Date = new Date(new Date().getFullYear() - 1, new Date().getMonth(), new Date().getDate())
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* <br/>(1)<ADatePicker minDate={new Date(2021, 0, 1)}/>
|
|
52
|
+
*
|
|
53
|
+
* Description : minimum date of ADatePicker. default is a year ago from now
|
|
68
54
|
*/
|
|
69
55
|
minDate?: Date;
|
|
70
56
|
/**
|
|
71
57
|
* maxDate? : Date = new Date(new Date().getFullYear() + 1, new Date().getMonth(), new Date().getDate())
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* <br/>(1)<ADatePicker maxDate={new Date(2022, 0, 1)}/>
|
|
58
|
+
*
|
|
59
|
+
* Description : maximum date of ADatePicker. default is a year later from now
|
|
75
60
|
*/
|
|
76
61
|
maxDate?: Date;
|
|
77
62
|
/**
|
|
78
63
|
* resources? : Partial<typeof Resources.ADatePicker>
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* <br/>(1)<ADatePicker resources={{months: (x) => 'current month :' + x}}/>
|
|
64
|
+
*
|
|
65
|
+
* Description : language resources of ADatePicker
|
|
82
66
|
*/
|
|
83
67
|
resources?: Partial<typeof Resources.ADatePicker>;
|
|
84
68
|
/**
|
|
85
69
|
* LeftAddon? : React.ReactNode
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* <br/>(1)<ADatePicker LeftAddon={<AIcon icon="Alert"/>}/>
|
|
70
|
+
*
|
|
71
|
+
* Description : LeftAddon of ADatePicker
|
|
89
72
|
*/
|
|
90
73
|
LeftAddon?: React.ReactNode;
|
|
91
74
|
/**
|
|
92
75
|
* RightAddon? : React.ReactNode
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* <br/>(1)<ADatePicker RightAddon={<AIcon icon="Alert"/>}/>
|
|
76
|
+
*
|
|
77
|
+
* Description : RightAddon of ADatePicker
|
|
96
78
|
*/
|
|
97
79
|
RightAddon?: React.ReactNode;
|
|
98
80
|
}
|
|
99
81
|
/**
|
|
100
82
|
* AComponent : ADatePicker
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
83
|
+
*
|
|
84
|
+
* Description : ADatePicker is a component for selecting single date.
|
|
85
|
+
*
|
|
86
|
+
* Basic Usage :
|
|
87
|
+
*
|
|
88
|
+
* const actionRef = useRef<IADatePickerActions>();
|
|
89
|
+
* const [date, setDate] = useState(new Date());
|
|
90
|
+
*
|
|
91
|
+
* if (case 1)
|
|
92
|
+
* <ADatePicker useDate={[date, setDate]} actionRef={actionRef}/>
|
|
93
|
+
* <AButton onClick={actionRef.current?.open}>Open</AButton>
|
|
94
|
+
* <AButton onClick={actionRef.current?.close}>Close</AButton>
|
|
95
|
+
* <AButton onClick={actionRef.current?.toggle}>Toggle</AButton>
|
|
96
|
+
*
|
|
112
97
|
*/
|
|
113
98
|
export declare const ADatePicker: ({ className, useDate, actionRef, position, minDate: exMinDate, maxDate: exMaxDate, resources: extResources, LeftAddon, RightAddon, }: IADatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,42 +3,40 @@ import { IADatePickerProps } from './ADatePicker';
|
|
|
3
3
|
export interface IDateRange {
|
|
4
4
|
/**
|
|
5
5
|
* sDate : Date;
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* Description : start date of IDateRange
|
|
7
8
|
*/
|
|
8
9
|
sDate: Date;
|
|
9
10
|
/**
|
|
10
11
|
* eDate : Date;
|
|
11
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* Description : end date of IDateRange
|
|
12
14
|
*/
|
|
13
15
|
eDate: Date;
|
|
14
16
|
}
|
|
15
17
|
export interface IADateRangePickerProps extends Omit<IADatePickerProps, 'useDate'> {
|
|
16
18
|
/**
|
|
17
19
|
* useDateRange : TUseValues<IDateRange>;
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* <br/>(1)const [useDateRange, setUseDateRange] = useState<IDateRange>({ sDate: new Date(), eDate: new Date() });
|
|
21
|
-
* return <ADateRangePicker useDateRange={[useDateRange, setUseDateRange]} />
|
|
22
|
-
* <br/>(2)const useDateRange = useValues<IDateRange>({ sDate: new Date(), eDate: new Date() });
|
|
23
|
-
* const onDateRangeChange = (newDateRange: IDateRange) => {
|
|
24
|
-
* setUseDateRange(newDateRange);
|
|
25
|
-
* };
|
|
26
|
-
* return <ADateRangePicker useDateRange={[useDateRange, onDateRangeChange]} />
|
|
20
|
+
*
|
|
21
|
+
* Description : useDateRange of ADateRangePicker
|
|
27
22
|
*/
|
|
28
23
|
useDateRange?: TUseValues<IDateRange>;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
26
|
* AComponent : ADateRangePicker
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* Description : ADateRangePicker is a component for selecting dateRange
|
|
29
|
+
*
|
|
30
|
+
* Basic Usage :
|
|
31
|
+
*
|
|
32
|
+
* const actionRef = useRef<IADatePickerActions>();
|
|
33
|
+
* const [dateRange, setDateRange] = useState<IDateRange>({ sDate: new Date(), eDate: new Date() });
|
|
34
|
+
*
|
|
35
|
+
* if (case 1)
|
|
36
|
+
* <ADateRangePicker useDateRange={[dateRange, setDateRange]} actionRef={actionRef} />
|
|
37
|
+
* <AButton onClick={actionRef.current?.open}>Open</AButton>
|
|
38
|
+
* <AButton onClick={actionRef.current?.close}>Close</AButton>
|
|
39
|
+
* <AButton onClick={actionRef.current?.toggle}>Toggle</AButton>
|
|
40
|
+
*
|
|
43
41
|
*/
|
|
44
42
|
export declare const ADateRangePicker: ({ className, useDateRange, actionRef, position, minDate: exMinDate, maxDate: exMaxDate, resources: extResources, LeftAddon, RightAddon, }: IADateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|