ados-rcm 1.0.9 → 1.0.12

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.
Files changed (29) hide show
  1. package/dist/AModule/AComponents/ABase/ABase.d.ts +26 -19
  2. package/dist/AModule/AComponents/AButton/AButton.d.ts +18 -4
  3. package/dist/AModule/AComponents/AButton/AIconButton.d.ts +11 -5
  4. package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +15 -8
  5. package/dist/AModule/AComponents/AClock/AClock.d.ts +22 -28
  6. package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +25 -40
  7. package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +15 -17
  8. package/dist/AModule/AComponents/ADialog/ADialog.d.ts +35 -47
  9. package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +11 -9
  10. package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +30 -46
  11. package/dist/AModule/AComponents/AFrames/AFrames.d.ts +26 -17
  12. package/dist/AModule/AComponents/AGrow/AGrow.d.ts +9 -5
  13. package/dist/AModule/AComponents/AIcon/AIcon.d.ts +6 -3
  14. package/dist/AModule/AComponents/AInput/AInput.d.ts +21 -32
  15. package/dist/AModule/AComponents/AListView/AListView.d.ts +28 -17
  16. package/dist/AModule/AComponents/ASelect/ASelect.d.ts +39 -39
  17. package/dist/AModule/AComponents/ASpace/ASpace.d.ts +6 -8
  18. package/dist/AModule/AComponents/AStepper/AStepper.d.ts +26 -27
  19. package/dist/AModule/AComponents/ASwitch/ASwitch.d.ts +11 -8
  20. package/dist/AModule/AComponents/ATab/ATab.d.ts +25 -26
  21. package/dist/AModule/AComponents/ATable/ATable.d.ts +147 -98
  22. package/dist/AModule/AComponents/AText/AText.d.ts +19 -4
  23. package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +19 -24
  24. package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +16 -5
  25. package/dist/AModule/AComponents/ATree/ATree.d.ts +44 -11
  26. package/dist/AModule/AComponents/AWrap/AWrap.d.ts +12 -3
  27. package/dist/index.cjs.js +3 -3
  28. package/dist/index.es.js +152 -152
  29. 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
- * Description : ref of ABase *
9
- * Basic Usage :
10
- * (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
14
+ *
16
15
  * Description : if truthy, dimming is applied. if isLoading is true, spinner is dimmed as well.
17
- * Basic Usage :
18
- * (1) <ABase isDisabled/>
19
16
  */
20
17
  isDisabled?: any;
21
18
  /**
22
19
  * isLoading? : any
20
+ *
23
21
  * Description : if truthy, dimming and spinner are applied.
24
- * Basic Usage :
25
- * (1) <ABase isLoading/>
26
22
  */
27
23
  isLoading?: any;
28
24
  /**
29
25
  * tooltip? : React.ReactNode
26
+ *
30
27
  * Description : tooltip. if tooltip is truthy, tooltip is shown.
31
- * Basic Usage :
32
- * (1) <ABase tooltip="tooltip text"/>
33
- * (2) <ABase tooltip={<div>tooltip text</div>}/>
34
28
  */
35
29
  tooltip?: React.ReactNode;
36
30
  /**
37
31
  * tooltipDistance? : number = 10
32
+ *
38
33
  * Description : distance in pixels between tooltip and target.
39
- * Basic Usage :
40
- * (1) <ABase tooltipDistance={10}/>
41
34
  */
42
35
  tooltipDistance?: number;
43
36
  /**
44
37
  * tooltipDelay? : number
38
+ *
45
39
  * Description : delay in seconds of tooltip after mouse enter.
46
- * Basic Usage :
47
- * (1) <ABase tooltipDelay={100}/>
48
40
  */
49
41
  tooltipDelay?: number;
50
42
  }
51
43
  /**
52
44
  * AComponent : ABase
45
+ *
53
46
  * Description : ABase is a base component(like div) that can have isDisabled, isLoading and tooltip.
47
+ *
54
48
  * Basic Usage :
55
- * (1) return <ABase>{children}</ABase>
56
49
  *
57
- * (2) return <ABase isDisabled>{children}</ABase>
50
+ * if (case 1)
51
+ * <ABase>
52
+ * {children}
53
+ * </ABase>
54
+ *
55
+ * if (case 2)
56
+ * <ABase isDisabled>
57
+ * {children}
58
+ * </ABase>
58
59
  *
59
- * (3) return <ABase isLoading>{children}</ABase>
60
+ * if (case 3)
61
+ * <ABase isLoading>
62
+ * {children}
63
+ * </ABase>
60
64
  *
61
- * (4) return <ABase tooltip="tooltip text">{children}</ABase>
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
+ *
7
8
  * Description : type of IAButton
8
- * Basic Usage :
9
- * (1) <AButton type="Secondary"/>
10
9
  */
11
10
  type?: TAButtonType;
12
11
  }
13
12
  /**
14
13
  * AComponent : AButton
14
+ *
15
15
  * Description : AButton is a button component.
16
+ *
16
17
  * Basic Usage :
17
- * (1) <AButton onClick={onClick}>Click Me</AButton>
18
18
  *
19
- * (2) <AButton type="Secondary" onClick={onClick} isDisabled={isDisabled} tooltip={isDisabled && 'Button Disabled'}>Click Me</AButton>
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
+ *
6
7
  * Description : icon of AIconButton
7
- * Basic Usage :
8
- * (1) <AIconButton icon="Alert"/>
9
8
  */
10
9
  icon: TIcons;
11
10
  /**
12
11
  * size? : 'Small' | 'Medium' | 'Large' = 'Medium'
12
+ *
13
13
  * Description : size of AIconButton
14
- * Basic Usage :
15
- * (1) <AIconButton icon="Alert" size="Small"/>
16
14
  */
17
15
  size?: 'Small' | 'Medium' | 'Large';
18
16
  }
19
17
  /**
20
18
  * AComponent : AIconButton
19
+ *
21
20
  * Description : AIconButton is a button component with an Icon.
21
+ *
22
22
  * Basic Usage :
23
- * (1) <AIconButton icon="Alert" size="Small" onClick={onClick}/>
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<any>
5
+ * useCheck? : TUseValues&lt;any>
6
+ *
6
7
  * Description : [useCheck, setUseCheck] = useValues of ACheckBox. if useCheck is truthy, ACheckBox is checked.
7
- * Basic Usage :
8
- * (1) const [useCheck, setUseCheck] = useState(false);
9
- * <ACheckBox useCheck={[useCheck, setUseCheck]}/>
10
8
  */
11
9
  useCheck?: TUseValues<any>;
12
10
  /**
13
11
  * isIndeterminate? : boolean
12
+ *
14
13
  * Description : if true, ACheckBox is indeterminate. priority is higher than useCheck.
15
- * Basic Usage :
16
- * (1) <ACheckBox isIndeterminate/>
17
14
  */
18
15
  isIndeterminate?: boolean;
19
16
  }
20
17
  /**
21
18
  * AComponent : ACheckBox
19
+ *
22
20
  * Description : ACheckBox is a checkbox component.
21
+ *
23
22
  * Basic Usage :
24
- * (1) const [useCheck, setUseCheck] = useState(false);
25
- * <ACheckBox useCheck={[useCheck, setUseCheck]} onClick={onClick} isDisabled={isDisabled} tooltip={isDisabled && 'CheckBox Disabled'} />
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,21 +5,25 @@ 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
14
+ *
13
15
  * Description : stop clock running
14
16
  */
15
17
  stop: () => void;
16
18
  /**
17
19
  * reset : () => void
20
+ *
18
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
26
+ *
23
27
  * Description : set clock's tick to specified number
24
28
  */
25
29
  setTicks: (ticks: number) => void;
@@ -27,55 +31,45 @@ export interface IAClockActions {
27
31
  export interface IAClockProps extends IAWrapProps, IABaseProps {
28
32
  /**
29
33
  * maxTicks? : number = 300
34
+ *
30
35
  * Description : maxTicks of AClock
31
- * Basic Usage :
32
- * (1) <AClock maxTicks={180}/>
33
36
  */
34
37
  maxTicks?: number;
35
38
  /**
36
39
  * interval? : number = 1000
40
+ *
37
41
  * Description : interval in milliseconds of AClock
38
- * Basic Usage :
39
- * (1) <AClock interval={500}/>
40
42
  */
41
43
  interval?: number;
42
44
  /**
43
45
  * onFinish? : () => void
46
+ *
44
47
  * Description : onFinish of AClock
45
- * Basic Usage :
46
- * (1) <AClock onFinish={onFinish}/>
47
48
  */
48
49
  onFinish?: () => void;
49
50
  /**
50
- * actionRef? : TActionRef<IAClockActions>
51
+ * actionRef? : TActionRef&lt;IAClockActions>
52
+ *
51
53
  * Description : actionRef of AClock
52
- * Basic Usage :
53
- * (1) const actionRef = useRef<IAClockActions>();
54
- * <AClock actionRef={ref}/>
55
54
  */
56
55
  actionRef?: TActionRef<IAClockActions>;
57
56
  }
58
57
  /**
59
58
  * AComponent : AClock
59
+ *
60
60
  * Description : AClock is a clock component.
61
+ *
61
62
  * Basic Usage :
62
- * (1) const actionRef = useRef<IAClockActions>();
63
- * const onStartClick = () => {
64
- * actionRef.current?.start();
65
- * }
66
- * const onStopClick = () => {
67
- * actionRef.current?.stop();
68
- * }
69
- * const onResetClick = () => {
70
- * actionRef.current?.reset();
71
- * }
72
- * return (
73
- * <div>
74
- * <AClock onFinish={onFinish} actionRef={ref}/>
75
- * <AButton onClick={onStartClick}>Start</AButton>
76
- * <AButton onClick={onStopClick}>Stop</AButton>
77
- * <AButton onClick={onResetClick}>Reset</AButton>
78
- * </div>
79
- * )
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,20 +1,23 @@
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
14
+ *
13
15
  * Description : closes calendar when called
14
16
  */
15
17
  close: () => void;
16
18
  /**
17
19
  * toggle : () => void
20
+ *
18
21
  * Description : toggles calendar(open <> close) when called
19
22
  */
20
23
  toggle: () => void;
@@ -22,92 +25,74 @@ export interface IADatePickerActions {
22
25
  export interface IADatePickerProps {
23
26
  /**
24
27
  * className? : string
28
+ *
25
29
  * Description : className of ADatePicker
26
- * Basic Usage :
27
- * (1) <ADatePicker className="className"/>
28
30
  */
29
31
  className?: string;
30
32
  /**
31
33
  * useDate? : TUseValues<Date>
34
+ *
32
35
  * Description : useDate of ADatePicker
33
- * Basic Usage :
34
- * (1) const [date, setDate] = useState(new Date());
35
- * <ADatePicker useDate={[date, setDate]}/>
36
- * (2) const [date, setDate] = useState(new Date());
37
- * const onDateChange = (newDate: Date) => {
38
- * setDate(newDate);
39
- * }
40
- * <ADatePicker useDate={[date, onDateChange]}/>
41
36
  */
42
37
  useDate?: TUseValues<Date>;
43
38
  /**
44
39
  * position? : EDir12 = EDir12.SE
40
+ *
45
41
  * Description : position of calendar
46
- * Basic Usage :
47
- * (1) <ADatePicker position={EDir12.E}/>
48
42
  */
49
43
  position?: EDir12;
50
44
  /**
51
45
  * actionRef? : TActionRef<IADatePickerActions>
46
+ *
52
47
  * Description : actionRef of ADatePicker
53
- * Basic Usage :
54
- * (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
- * </>
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())
52
+ *
65
53
  * Description : minimum date of ADatePicker. default is a year ago from now
66
- * Basic Usage :
67
- * (1) <ADatePicker minDate={new Date(2021, 0, 1)}/>
68
54
  */
69
55
  minDate?: Date;
70
56
  /**
71
57
  * maxDate? : Date = new Date(new Date().getFullYear() + 1, new Date().getMonth(), new Date().getDate())
58
+ *
72
59
  * Description : maximum date of ADatePicker. default is a year later from now
73
- * Basic Usage :
74
- * (1) <ADatePicker maxDate={new Date(2022, 0, 1)}/>
75
60
  */
76
61
  maxDate?: Date;
77
62
  /**
78
63
  * resources? : Partial<typeof Resources.ADatePicker>
64
+ *
79
65
  * Description : language resources of ADatePicker
80
- * Basic Usage :
81
- * (1) <ADatePicker resources={{months: (x) => 'current month :' + x}}/>
82
66
  */
83
67
  resources?: Partial<typeof Resources.ADatePicker>;
84
68
  /**
85
69
  * LeftAddon? : React.ReactNode
70
+ *
86
71
  * Description : LeftAddon of ADatePicker
87
- * Basic Usage :
88
- * (1) <ADatePicker LeftAddon={<AIcon icon="Alert"/>}/>
89
72
  */
90
73
  LeftAddon?: React.ReactNode;
91
74
  /**
92
75
  * RightAddon? : React.ReactNode
76
+ *
93
77
  * Description : RightAddon of ADatePicker
94
- * Basic Usage :
95
- * (1) <ADatePicker RightAddon={<AIcon icon="Alert"/>}/>
96
78
  */
97
79
  RightAddon?: React.ReactNode;
98
80
  }
99
81
  /**
100
82
  * AComponent : ADatePicker
83
+ *
101
84
  * Description : ADatePicker is a component for selecting single date.
85
+ *
102
86
  * Basic Usage :
103
- * (1) const actionRef = useRef<IADatePickerActions>();
104
- * const [date, setDate] = useState(new Date());
105
- * return (
106
- * <>
107
- * <ADatePicker useDate={[date, setDate]} actionRef={actionRef}/>
108
- * <AButton onClick={() => actionRef.current?.open()}>Open</AButton>
109
- * <AButton onClick={() => actionRef.current?.close()}>Close</AButton>
110
- * </>
111
- * )
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,11 +3,13 @@ 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;
12
+ *
11
13
  * Description : end date of IDateRange
12
14
  */
13
15
  eDate: Date;
@@ -15,30 +17,26 @@ export interface IDateRange {
15
17
  export interface IADateRangePickerProps extends Omit<IADatePickerProps, 'useDate'> {
16
18
  /**
17
19
  * useDateRange : TUseValues<IDateRange>;
20
+ *
18
21
  * Description : useDateRange of ADateRangePicker
19
- * Basic Usage :
20
- * (1) const [useDateRange, setUseDateRange] = useState<IDateRange>({ sDate: new Date(), eDate: new Date() });
21
- * return <ADateRangePicker useDateRange={[useDateRange, setUseDateRange]} />
22
- * (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]} />
27
22
  */
28
23
  useDateRange?: TUseValues<IDateRange>;
29
24
  }
30
25
  /**
31
26
  * AComponent : ADateRangePicker
27
+ *
32
28
  * Description : ADateRangePicker is a component for selecting dateRange
29
+ *
33
30
  * Basic Usage :
34
- * (1) const actionRef = useRef<IADatePickerActions>();
35
- * const [dateRange, setDateRange] = useState<IDateRange>({ sDate: new Date(), eDate: new Date() });
36
- * return (
37
- * <>
38
- * <ADateRangePicker useDateRange={[dateRange, setDateRange]} actionRef={actionRef} />
39
- * <AButton onClick={() => actionRef.current?.open()}>Open</AButton>
40
- * <AButton onClick={() => actionRef.current?.close()}>Close</AButton>
41
- * </>
42
- * )
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;
@@ -9,26 +9,31 @@ import { IAEventCallers, TActionRef } from '../ATypes/ATypes';
9
9
  export interface IADialogActions {
10
10
  /**
11
11
  * open : () => void
12
+ *
12
13
  * Description : open dialog
13
14
  */
14
15
  open: () => void;
15
16
  /**
16
17
  * close : () => void
18
+ *
17
19
  * Description : close dialog
18
20
  */
19
21
  close: () => void;
20
22
  /**
21
23
  * toggle : () => void
24
+ *
22
25
  * Description : toggle dialog
23
26
  */
24
27
  toggle: () => void;
25
28
  /**
26
29
  * ok : () => void
30
+ *
27
31
  * Description : run ok of the dialog
28
32
  */
29
33
  ok: () => void;
30
34
  /**
31
35
  * cancel : () => void
36
+ *
32
37
  * Description : run cancel of the dialog
33
38
  */
34
39
  cancel: () => void;
@@ -37,115 +42,98 @@ export type TADialogTypes = 'okCancel' | 'cancelOk' | 'ok' | 'cancel' | 'none';
37
42
  export interface IADialogProps {
38
43
  /**
39
44
  * type? : TADialogTypes = 'okCancel'
45
+ *
40
46
  * Description : type of dialog. decides the type of action buttons
41
- * Basic Usage :
42
- * (1) <ADialog type='cancelOk'/>
43
47
  */
44
48
  type?: TADialogTypes;
45
49
  /**
46
50
  * title? : React.ReactNode
51
+ *
47
52
  * Description : title of the dialog
48
- * Basic Usage :
49
- * (1) <ADialog title='Title'/>
50
53
  */
51
54
  title?: React.ReactNode;
52
55
  /**
53
56
  * actionRef? : TActionRef<IADialogActions>
57
+ *
54
58
  * Description : actionRef of the dialog
55
- * Basic Usage :
56
- * (1) const actionRef = useRef<IADialogActions>();
57
- * return <ADialog actionRef={ref}/>
58
59
  */
59
60
  actionRef?: TActionRef<IADialogActions>;
60
61
  /**
61
62
  * children? : React.ReactNode
63
+ *
62
64
  * Description : children of the dialog
63
- * Basic Usage :
64
- * (1) <ADialog>children</ADialog>
65
65
  */
66
66
  children?: React.ReactNode;
67
67
  /**
68
68
  * onOk : (e: IAEventCallers) => void;
69
+ *
69
70
  * Description : onOk of the dialog. it closes the dialog by default
70
- * Basic Usage :
71
- * (1) <ADialog onOk={onOk}/>
72
- * (2) <ADialog onOk={(e) => e.preventDefault()}/>
73
71
  */
74
72
  onOk?: (e: IAEventCallers) => void;
75
73
  /**
76
74
  * onCancel : (e: IAEventCallers) => void;
75
+ *
77
76
  * Description : onCancel of the dialog. it closes the dialog by default
78
- * Basic Usage :
79
- * (1) <ADialog onCancel={onCancel}/>
80
- * (2) <ADialog onCancel={(e) => e.preventDefault()}/>
81
77
  */
82
78
  onCancel?: (e: IAEventCallers) => void;
83
79
  /**
84
80
  * onEnterPress : (e: IAEventCallers) => void;
81
+ *
85
82
  * Description : onEnterPress of the dialog. it runs ok by default
86
- * Basic Usage :
87
- * (1) <ADialog onEnterPress={onEnterPress}/>
88
- * (2) <ADialog onEnterPress={(e) => e.preventDefault()}/>
89
83
  */
90
84
  onEnterPress?: (e: IAEventCallers) => void;
91
85
  /**
92
86
  * onEscPress : (e: IAEventCallers) => void;
87
+ *
93
88
  * Description : onEscPress of the dialog. it runs cancel by default
94
- * Basic Usage :
95
- * (1) <ADialog onEscPress={onEscPress}/>
96
- * (2) <ADialog onEscPress={(e) => e.preventDefault()}/>
97
89
  */
98
90
  onEscPress?: (e: IAEventCallers) => void;
99
91
  /**
100
92
  * onSpacePress : (e: IAEventCallers) => void;
93
+ *
101
94
  * Description : onSpacePress of the dialog. it runs ok by default
102
- * Basic Usage :
103
- * (1) <ADialog onSpacePress={onSpacePress}/>
104
- * (2) <ADialog onSpacePress={(e) => e.preventDefault()}/>
105
95
  */
106
96
  onSpacePress?: (e: IAEventCallers) => void;
107
97
  /**
108
98
  * onPaperClick : (e: IAEventCallers) => void;
99
+ *
109
100
  * Description : onPaperClick of the dialog. it runs cancel by default
110
- * Basic Usage :
111
- * (1) <ADialog onPaperClick={onPaperClick}/>
112
- * (2) <ADialog onPaperClick={(e) => e.preventDefault()}/>
113
101
  */
114
102
  onPaperClick?: (e: IAEventCallers) => void;
115
103
  /**
116
104
  * noDim? : boolean = false
105
+ *
117
106
  * Description : decides whether the dialog has dim or not
118
- * Basic Usage :
119
- * (1) <ADialog noDim/>
120
107
  */
121
108
  noDim?: boolean;
122
109
  /**
123
110
  * resources? : Partial<typeof Resources.ADialog>
111
+ *
124
112
  * Description : language resources of the dialog
125
- * Basic Usage :
126
- * (1) <ADialog resources={{ ok: "I'm ok", cancel: "I'm Cancel" }}/>
127
113
  */
128
114
  resources?: Partial<typeof Resources.ADialog>;
129
115
  }
130
116
  /**
131
117
  * AComponent : ADialog
118
+ *
132
119
  * Description : ADialog is a dialog component.
120
+ *
121
+ *
133
122
  * Basic Usage :
134
- * (1) const actionRef = useRef<IADialogActions>();
135
- * const onOk = () => {
136
- * console.log('ok');
137
- * }
138
- * const onCancel = () => {
139
- * console.log('cancel');
140
- * }
141
- * return (
142
- * <div>
143
- * <ADialog actionRef={actionRef} title='Dialog Title onOk={onOk} onCancel={onCancel}>
144
- * <div>Content</div>
145
- * </ADialog>
146
- * <AButton onClick={actionRef.current?.open}>Open</AButton>
147
- * <AButton onClick={actionRef.current?.close}>Close</AButton>
148
- * </div>
149
- * )
123
+ *
124
+ * const actionRef = useRef<IADialogActions>();
125
+ * const onOk = () => { console.log('ok') }
126
+ * const onCancel = () => { console.log('cancel') }
127
+ *
128
+ * if (case 1)
129
+ * <ADialog actionRef={actionRef}
130
+ * title='Dialog Title'
131
+ * onOk={onOk}
132
+ * onCancel={onCancel}>
133
+ * <div>Content</div>
134
+ * </ADialog>
135
+ * <AButton onClick={actionRef.current?.open}>Open</AButton>
136
+ * <AButton onClick={actionRef.current?.close}>Close</AButton>
137
+ *
150
138
  */
151
139
  export declare const ADialog: ({ type, title, actionRef, children, onOk: extOnOk, onCancel: extOnCancel, onEnterPress: extOnEnterPress, onEscPress: extOnEscPress, onSpacePress: extOnSpacePress, onPaperClick: extOnPaperClick, noDim, resources: extResources, }: IADialogProps) => import("react").ReactPortal | null;