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.
- package/dist/AModule/AComponents/ABase/ABase.d.ts +26 -19
- package/dist/AModule/AComponents/AButton/AButton.d.ts +18 -4
- package/dist/AModule/AComponents/AButton/AIconButton.d.ts +11 -5
- package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +15 -8
- package/dist/AModule/AComponents/AClock/AClock.d.ts +22 -28
- package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +25 -40
- package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +15 -17
- package/dist/AModule/AComponents/ADialog/ADialog.d.ts +35 -47
- package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +11 -9
- package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +30 -46
- package/dist/AModule/AComponents/AFrames/AFrames.d.ts +26 -17
- package/dist/AModule/AComponents/AGrow/AGrow.d.ts +9 -5
- package/dist/AModule/AComponents/AIcon/AIcon.d.ts +6 -3
- package/dist/AModule/AComponents/AInput/AInput.d.ts +21 -32
- package/dist/AModule/AComponents/AListView/AListView.d.ts +28 -17
- package/dist/AModule/AComponents/ASelect/ASelect.d.ts +39 -39
- package/dist/AModule/AComponents/ASpace/ASpace.d.ts +6 -8
- package/dist/AModule/AComponents/AStepper/AStepper.d.ts +26 -27
- package/dist/AModule/AComponents/ASwitch/ASwitch.d.ts +11 -8
- package/dist/AModule/AComponents/ATab/ATab.d.ts +25 -26
- package/dist/AModule/AComponents/ATable/ATable.d.ts +147 -98
- package/dist/AModule/AComponents/AText/AText.d.ts +19 -4
- package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +19 -24
- package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +16 -5
- package/dist/AModule/AComponents/ATree/ATree.d.ts +44 -11
- package/dist/AModule/AComponents/AWrap/AWrap.d.ts +12 -3
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +152 -152
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { Resources } from '../AResource/AResource';
|
|
|
5
5
|
export interface IFileRendererProps {
|
|
6
6
|
/**
|
|
7
7
|
* file : File
|
|
8
|
+
*
|
|
8
9
|
* Description : file to render
|
|
9
10
|
*/
|
|
10
11
|
file: File;
|
|
@@ -12,32 +13,33 @@ export interface IFileRendererProps {
|
|
|
12
13
|
export interface IAFileBoxProps extends IABaseProps {
|
|
13
14
|
/**
|
|
14
15
|
* useFile : TUseValues<File | null>
|
|
16
|
+
*
|
|
15
17
|
* Description : useFile of AFileBox
|
|
16
|
-
* Basic Usage :
|
|
17
|
-
* (1) const [file, setFile] = useState<File | null>(null);
|
|
18
|
-
* <AFileBox useFile={[file, setFile]}/>
|
|
19
18
|
*/
|
|
20
19
|
useFile: TUseValues<File | null>;
|
|
21
20
|
/**
|
|
22
21
|
* FileRenderer? : (props: IFileRendererProps) => React.ReactNode
|
|
22
|
+
*
|
|
23
23
|
* Description : FileRenderer of AFileBox
|
|
24
|
-
* Basic Usage :
|
|
25
|
-
* (1) <AFileBox FileRenderer={file => <div>{file.name}</div>}/>
|
|
26
24
|
*/
|
|
27
25
|
FileRenderer?: (props: IFileRendererProps) => React.ReactNode;
|
|
28
26
|
/**
|
|
29
27
|
* resources? : typeof Resources.AFileBox
|
|
28
|
+
*
|
|
30
29
|
* Description : resources of AFileBox
|
|
31
|
-
* Basic Usage :
|
|
32
|
-
* (1) <AFileBox resources={{'or Drag & Drop': 'or Drag the File and Drop it here'}}/>
|
|
33
30
|
*/
|
|
34
31
|
resources?: typeof Resources.AFileBox;
|
|
35
32
|
}
|
|
36
33
|
/**
|
|
37
34
|
* AComponent : AFileBox
|
|
35
|
+
*
|
|
38
36
|
* Description : AFileBox is a file box component that can select a file.
|
|
37
|
+
*
|
|
39
38
|
* Basic Usage :
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* const [file, setFile] = useState<File | null>(null);
|
|
41
|
+
*
|
|
42
|
+
* if (case 1)
|
|
43
|
+
* <AFileBox useFile={[file, setFile]}/>
|
|
42
44
|
*/
|
|
43
45
|
export declare const AFileBox: ({ useFile, FileRenderer, resources: extResources, ...props }: IAFileBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,16 +4,19 @@ import { TCanCallback } from '../../AUtils/cbF';
|
|
|
4
4
|
export interface IAFloatMenuActions {
|
|
5
5
|
/**
|
|
6
6
|
* open : () => void
|
|
7
|
+
*
|
|
7
8
|
* Description : open AFloatMenu
|
|
8
9
|
*/
|
|
9
10
|
open: () => void;
|
|
10
11
|
/**
|
|
11
12
|
* close : () => void
|
|
13
|
+
*
|
|
12
14
|
* Description : close AFloatMenu
|
|
13
15
|
*/
|
|
14
16
|
close: () => void;
|
|
15
17
|
/**
|
|
16
18
|
* toggle : () => void
|
|
19
|
+
*
|
|
17
20
|
* Description : toggle AFloatMenu
|
|
18
21
|
*/
|
|
19
22
|
toggle: () => void;
|
|
@@ -21,11 +24,13 @@ export interface IAFloatMenuActions {
|
|
|
21
24
|
export interface IAFloatMenuContentProps {
|
|
22
25
|
/**
|
|
23
26
|
* defKey : TIdx
|
|
27
|
+
*
|
|
24
28
|
* Description : defKey of AFloatMenu
|
|
25
29
|
*/
|
|
26
30
|
defKey: TIdx;
|
|
27
31
|
/**
|
|
28
32
|
* def : IAFloatMenuDef
|
|
33
|
+
*
|
|
29
34
|
* Description : def of AFloatMenu
|
|
30
35
|
*/
|
|
31
36
|
def: IAFloatMenuDef;
|
|
@@ -33,16 +38,19 @@ export interface IAFloatMenuContentProps {
|
|
|
33
38
|
export interface IAFloatMenuDef {
|
|
34
39
|
/**
|
|
35
40
|
* noDisplay? : boolean
|
|
41
|
+
*
|
|
36
42
|
* Description : decides whether to display the menu or not
|
|
37
43
|
*/
|
|
38
44
|
noDisplay?: boolean;
|
|
39
45
|
/**
|
|
40
46
|
* isDisabled? : boolean
|
|
47
|
+
*
|
|
41
48
|
* Description : decides whether the menu is disabled or not
|
|
42
49
|
*/
|
|
43
50
|
isDisabled?: boolean;
|
|
44
51
|
/**
|
|
45
52
|
* content? : TCanCallback<IAFloatMenuContentProps, React.ReactNode>
|
|
53
|
+
*
|
|
46
54
|
* Description : content of AFloatMenu
|
|
47
55
|
*/
|
|
48
56
|
content?: TCanCallback<IAFloatMenuContentProps, React.ReactNode>;
|
|
@@ -53,79 +61,55 @@ export type TAFloatMenuDefs = {
|
|
|
53
61
|
export interface IAFloatMenuProps {
|
|
54
62
|
/**
|
|
55
63
|
* defs : TAFloatMenuDefs
|
|
64
|
+
*
|
|
56
65
|
* Description : defs of AFloatMenu
|
|
57
|
-
* Basic Usage :
|
|
58
|
-
* (1) const defs = {
|
|
59
|
-
* 'testDefKey' : {
|
|
60
|
-
* content : ({defKey, def}) => <div>{defKey}</div>,
|
|
61
|
-
* },
|
|
62
|
-
* 'testDefKey2' : {}
|
|
63
|
-
* }
|
|
64
|
-
* return <AFloatMenu defs={defs}/>
|
|
65
66
|
*/
|
|
66
67
|
defs: TAFloatMenuDefs;
|
|
67
68
|
/**
|
|
68
69
|
* defaultDef? : IAFloatMenuDef
|
|
70
|
+
*
|
|
69
71
|
* Description : defaultDef of AFloatMenu. it will affect all defs.
|
|
70
|
-
* Basic Usage :
|
|
71
|
-
* (1) const defs = {
|
|
72
|
-
* 'testDefKey' : {
|
|
73
|
-
* content : ({defKey, def}) => <div>{defKey}</div>,
|
|
74
|
-
* },
|
|
75
|
-
* 'testDefKey2' : {}
|
|
76
|
-
* }
|
|
77
|
-
* const defaultDef = {
|
|
78
|
-
* content : ({defKey, def}) => <div>I am test defaultDef!</div>,
|
|
79
|
-
* }
|
|
80
|
-
* return <AFloatMenu defs={defs} defaultDef={defaultDef}/> // testDefKey2 will render 'I am test defaultDef!'
|
|
81
72
|
*/
|
|
82
73
|
defaultDef?: IAFloatMenuDef;
|
|
83
74
|
/**
|
|
84
75
|
* anchorRef : React.RefObject<HTMLElement>
|
|
76
|
+
*
|
|
85
77
|
* Description : anchorRef of AFloatMenu
|
|
86
|
-
* Basic Usage :
|
|
87
|
-
* (1) const anchorRef = useRef<HTMLDivElement>(null);
|
|
88
|
-
* return <>
|
|
89
|
-
* <div ref={anchorRef}>I am anchor</div>
|
|
90
|
-
* <AFloatMenu anchorRef={anchorRef}/>
|
|
91
|
-
* </>
|
|
92
78
|
*/
|
|
93
79
|
anchorRef: React.RefObject<HTMLElement>;
|
|
94
80
|
/**
|
|
95
81
|
* position? : EDir12
|
|
82
|
+
*
|
|
96
83
|
* Description : position of AFloatMenu based on anchorRef
|
|
97
|
-
* Basic Usage :
|
|
98
|
-
* (1) <AFloatMenu position={EDir12.W}/>
|
|
99
84
|
*/
|
|
100
85
|
position?: EDir12;
|
|
101
86
|
/**
|
|
102
87
|
* actionRef? : TActionRef<IAFloatMenuActions>
|
|
88
|
+
*
|
|
103
89
|
* Description : actionRef of AFloatMenu
|
|
104
|
-
* Basic Usage :
|
|
105
|
-
* (1) const actionRef = useRef<IAFloatMenuActions>();
|
|
106
|
-
* return <AFloatMenu actionRef={actionRef}/>
|
|
107
90
|
*/
|
|
108
91
|
actionRef?: TActionRef<IAFloatMenuActions>;
|
|
109
92
|
}
|
|
110
93
|
/**
|
|
111
94
|
* AComponent : AFloatMenu
|
|
95
|
+
*
|
|
112
96
|
* Description : AFloatMenu is a floating component with menues to click.
|
|
97
|
+
*
|
|
113
98
|
* Basic Usage :
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* }
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* }
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* )
|
|
99
|
+
*
|
|
100
|
+
* const defs = {
|
|
101
|
+
* testDefKey : {
|
|
102
|
+
* content : ({defKey, def}) => <div>{defKey}</div>,
|
|
103
|
+
* },
|
|
104
|
+
* testDefKey2 : {}
|
|
105
|
+
* }
|
|
106
|
+
* const defaultDef = {
|
|
107
|
+
* content : ({defKey, def}) => <div>I am test defaultDef!</div>,
|
|
108
|
+
* }
|
|
109
|
+
* const anchorRef = useRef<HTMLDivElement>(null);
|
|
110
|
+
*
|
|
111
|
+
* if (case 1)
|
|
112
|
+
* <div ref={anchorRef}>I am anchor</div>
|
|
113
|
+
* <AFloatMenu defs={defs} defaultDef={defaultDef} anchorRef={anchorRef}/>
|
|
130
114
|
*/
|
|
131
115
|
export declare const AFloatMenu: ({ defs: extDefs, defaultDef: extDefaultDef, anchorRef, actionRef, position, }: IAFloatMenuProps) => import("react").ReactPortal | null;
|
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
import { IABaseProps } from '../ABase/ABase';
|
|
2
2
|
/**
|
|
3
3
|
* AComponent : AFrame : RowFrame
|
|
4
|
+
*
|
|
4
5
|
* Description : RowFrame is a frame component that is displayed as a row and aligned center.
|
|
6
|
+
*
|
|
5
7
|
* Basic Usage :
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* if (case 1)
|
|
10
|
+
* <RowFrame>
|
|
11
|
+
* Items
|
|
12
|
+
* <div>Item1</div>
|
|
13
|
+
* <AICon icon="Alert"/>
|
|
14
|
+
* </RowFrame>
|
|
11
15
|
*/
|
|
12
16
|
export declare const RowFrame: (props: IABaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
/**
|
|
14
18
|
* AComponent : AFrame : ColFrame
|
|
19
|
+
*
|
|
15
20
|
* Description : ColFrame is a frame component that is displayed as a column and aligned center.
|
|
21
|
+
*
|
|
16
22
|
* Basic Usage :
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
*
|
|
24
|
+
* if (case 1)
|
|
25
|
+
* <ColFrame>
|
|
26
|
+
* Items
|
|
27
|
+
* <div>Item1</div>
|
|
28
|
+
* <AICon icon="Alert"/>
|
|
29
|
+
* </ColFrame>
|
|
22
30
|
*/
|
|
23
31
|
export declare const ColFrame: (props: IABaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
32
|
interface IOverflowFrameProps extends IABaseProps {
|
|
25
33
|
/**
|
|
26
34
|
* noOverflowTooltip? : boolean
|
|
35
|
+
*
|
|
27
36
|
* Description : decides whether to display tooltip when overflowed or not
|
|
28
|
-
* Basic Usage :
|
|
29
|
-
* (1) <OverflowFrame noOverflowTooltip>
|
|
30
|
-
* Long TextTextTextTextTextTextTextTextTextText
|
|
31
|
-
* </OverflowFrame>
|
|
32
37
|
*/
|
|
33
38
|
noOverflowTooltip?: boolean;
|
|
34
39
|
}
|
|
35
40
|
/**
|
|
36
41
|
* AComponent : AFrame : OverflowFrame
|
|
42
|
+
*
|
|
37
43
|
* Description : OverflowFrame is a frame component that is text-ellipsis and shows tooltips when overflowed.
|
|
44
|
+
*
|
|
38
45
|
* Basic Usage :
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
46
|
+
*
|
|
47
|
+
* if (case 1)
|
|
48
|
+
* <OverflowFrame>
|
|
49
|
+
* Long TextTextTextTextTextTextTextTextTextText
|
|
50
|
+
* </OverflowFrame>
|
|
42
51
|
*/
|
|
43
52
|
export declare const OverflowFrame: ({ tooltip: extTooltip, children, abaseRef, className, noOverflowTooltip, ...props }: IOverflowFrameProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
53
|
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AComponent : AGrow
|
|
3
|
+
*
|
|
3
4
|
* Description : AGrow is a frame component that grows flexibly.
|
|
5
|
+
*
|
|
4
6
|
* Basic Usage :
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* if (case 1)
|
|
9
|
+
* <div style={{display: 'flex', flexGrow: 1}}>
|
|
10
|
+
* Left Item
|
|
11
|
+
* <AGrow/>
|
|
12
|
+
* Right Item
|
|
13
|
+
* </div>
|
|
10
14
|
*/
|
|
11
15
|
export declare const AGrow: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,17 +6,20 @@ export type TIcons = keyof typeof AIcons;
|
|
|
6
6
|
export interface IAIconProps extends IASVGProps {
|
|
7
7
|
/**
|
|
8
8
|
* icon : TIcons
|
|
9
|
+
*
|
|
9
10
|
* Description : icon to render
|
|
10
|
-
* Basic Usage :
|
|
11
|
-
* (1) <AIcon icon="Alert"/>
|
|
12
11
|
*/
|
|
13
12
|
icon: TIcons;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* AComponent : AIcon
|
|
16
|
+
*
|
|
17
17
|
* Description : AIcon is an icon component that can render icons.
|
|
18
|
+
*
|
|
18
19
|
* Basic Usage :
|
|
19
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* if (case 1)
|
|
22
|
+
* <AIcon icon="Alert"/>
|
|
20
23
|
*/
|
|
21
24
|
export declare const AIcon: ({ icon, svgRef, ...rest }: IAIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
export declare const AIcons: Readonly<{
|
|
@@ -6,110 +6,99 @@ export type TInputType = 'Primary' | 'Secondary' | 'Error';
|
|
|
6
6
|
export interface IAInputProps extends IABaseProps, IAWrapProps {
|
|
7
7
|
/**
|
|
8
8
|
* onEnterPress? : (value: string) => void
|
|
9
|
+
*
|
|
9
10
|
* Description : onEnterPress of AInput
|
|
10
|
-
* Basic Usage :
|
|
11
|
-
* (1) <AInput onEnterPress={value => console.log(value)}/>
|
|
12
11
|
*/
|
|
13
12
|
onEnterPress?: (value: string) => void;
|
|
14
13
|
/**
|
|
15
14
|
* type? : TInputType = 'Primary'
|
|
15
|
+
*
|
|
16
16
|
* Description : type of AInput
|
|
17
|
-
* Basic Usage :
|
|
18
|
-
* (1) <AInput type="Secondary"/>
|
|
19
17
|
*/
|
|
20
18
|
type?: TInputType;
|
|
21
19
|
/**
|
|
22
20
|
* inputRef? : React.RefObject<HTMLInputElement>
|
|
21
|
+
*
|
|
23
22
|
* Description : inputRef of AInput
|
|
24
|
-
* Basic Usage :
|
|
25
|
-
* (1) const inputRef = useRef<HTMLInputElement>(null);
|
|
26
|
-
* <AInput inputRef={inputRef}/>
|
|
27
23
|
*/
|
|
28
24
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
29
25
|
/**
|
|
30
26
|
* useValue? : TUseValues<string>
|
|
27
|
+
*
|
|
31
28
|
* Description : useValue of AInput
|
|
32
|
-
* Basic Usage :
|
|
33
|
-
* (1) const [value, setValue] = useState<string>('');
|
|
34
|
-
* <AInput useValue={[value, setValue]}/>
|
|
35
29
|
*/
|
|
36
30
|
useValue?: TUseValues<string>;
|
|
37
31
|
/**
|
|
38
32
|
* isReadonly? : boolean
|
|
33
|
+
*
|
|
39
34
|
* Description : decides whether the input is readonly or not
|
|
40
|
-
* Basic Usage :
|
|
41
|
-
* (1) <AInput isReadonly/>
|
|
42
35
|
*/
|
|
43
36
|
isReadonly?: boolean;
|
|
44
37
|
/**
|
|
45
38
|
* placeholder? : string
|
|
39
|
+
*
|
|
46
40
|
* Description : placeholder of AInput
|
|
47
|
-
* Basic Usage :
|
|
48
|
-
* (1) <AInput placeholder="Placeholder"/>
|
|
49
41
|
*/
|
|
50
42
|
placeholder?: string;
|
|
51
43
|
/**
|
|
52
44
|
* maxLength? : number
|
|
45
|
+
*
|
|
53
46
|
* Description : maxLength of AInput
|
|
54
|
-
* Basic Usage :
|
|
55
|
-
* (1) <AInput maxLength={10}/>
|
|
56
47
|
*/
|
|
57
48
|
maxLength?: number;
|
|
58
49
|
/**
|
|
59
50
|
* tabIndex? : number
|
|
51
|
+
*
|
|
60
52
|
* Description : tabIndex of AInput
|
|
61
|
-
* Basic Usage :
|
|
62
|
-
* (1) <AInput tabIndex={1}/>
|
|
63
53
|
*/
|
|
64
54
|
tabIndex?: number;
|
|
65
55
|
/**
|
|
66
56
|
* autoFocus? : boolean
|
|
57
|
+
*
|
|
67
58
|
* Description : decides whether the input is focused or not
|
|
68
|
-
* Basic Usage :
|
|
69
|
-
* (1) <AInput autoFocus/>
|
|
70
59
|
*/
|
|
71
60
|
autoFocus?: boolean;
|
|
72
61
|
/**
|
|
73
62
|
* isPassword? : boolean
|
|
63
|
+
*
|
|
74
64
|
* Description : decides whether the input is password or not. if true, values will be masked.
|
|
75
|
-
* Basic Usage :
|
|
76
|
-
* (1) <AInput isPassword/>
|
|
77
65
|
*/
|
|
78
66
|
isPassword?: boolean;
|
|
79
67
|
/**
|
|
80
68
|
* autoComplete? : string = 'off'
|
|
69
|
+
*
|
|
81
70
|
* Description : autoComplete of AInput
|
|
82
|
-
* Basic Usage :
|
|
83
|
-
* (1) <AInput autoComplete="on"/>
|
|
84
71
|
*/
|
|
85
72
|
autoComplete?: string;
|
|
86
73
|
/**
|
|
87
74
|
* LeftAddon? : React.ReactNode
|
|
75
|
+
*
|
|
88
76
|
* Description : LeftAddon of AInput
|
|
89
|
-
* Basic Usage :
|
|
90
|
-
* (1) <AInput LeftAddon={<AICon icon="Search"/>}/>
|
|
91
77
|
*/
|
|
92
78
|
LeftAddon?: React.ReactNode;
|
|
93
79
|
/**
|
|
94
80
|
* RightAddon? : React.ReactNode
|
|
81
|
+
*
|
|
95
82
|
* Description : RightAddon of AInput
|
|
96
|
-
* Basic Usage :
|
|
97
|
-
* (1) <AInput RightAddon={<AICon icon="Search"/>}/>
|
|
98
83
|
*/
|
|
99
84
|
RightAddon?: React.ReactNode;
|
|
100
85
|
/**
|
|
101
86
|
* inputProps? : React.InputHTMLAttributes<HTMLInputElement>
|
|
87
|
+
*
|
|
102
88
|
* Description : inputProps of AInput
|
|
103
|
-
* Basic Usage :
|
|
104
|
-
* (1) <AInput inputProps={{onFocus: () => console.log('focus')}}/>
|
|
105
89
|
*/
|
|
106
90
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
107
91
|
}
|
|
108
92
|
/**
|
|
109
93
|
* AComponent : AInput
|
|
94
|
+
*
|
|
110
95
|
* Description : AInput is an input component. it has AWrap and ABase inside, so be careful with the styles. I recommend checking out the element hierarchy first.
|
|
96
|
+
*
|
|
111
97
|
* Basic Usage :
|
|
112
|
-
*
|
|
113
|
-
*
|
|
98
|
+
*
|
|
99
|
+
* const [value, setValue] = useState<string>('');
|
|
100
|
+
*
|
|
101
|
+
* if (case 1)
|
|
102
|
+
* <AInput useValue={[value, setValue]}/>
|
|
114
103
|
*/
|
|
115
104
|
export declare const AInput: ({ onEnterPress, type, inputRef, useValue, isReadonly, placeholder, maxLength, tabIndex, autoFocus, isPassword, autoComplete, LeftAddon, RightAddon, inputProps, wrapProps, helperText, label, wrapType, ...abaseProps }: IAInputProps) => React.ReactNode;
|
|
@@ -17,16 +17,19 @@ import { TIdx } from '../ATypes/ATypes';
|
|
|
17
17
|
export interface IAListViewContentProps<T extends IObject> {
|
|
18
18
|
/**
|
|
19
19
|
* defKey : TIdx
|
|
20
|
+
*
|
|
20
21
|
* Description : defKey of AListView
|
|
21
22
|
*/
|
|
22
23
|
defKey: TIdx;
|
|
23
24
|
/**
|
|
24
25
|
* item : T
|
|
26
|
+
*
|
|
25
27
|
* Description : item of AListView
|
|
26
28
|
*/
|
|
27
29
|
item: T;
|
|
28
30
|
/**
|
|
29
31
|
* def : IAListViewDef<T>
|
|
32
|
+
*
|
|
30
33
|
* Description : def of AListView
|
|
31
34
|
*/
|
|
32
35
|
def: IAListViewDef<T>;
|
|
@@ -34,11 +37,13 @@ export interface IAListViewContentProps<T extends IObject> {
|
|
|
34
37
|
export interface IAListViewDef<T extends IObject> {
|
|
35
38
|
/**
|
|
36
39
|
* label? : TCanCallback<IAListViewContentProps<T>, React.ReactNode>
|
|
40
|
+
*
|
|
37
41
|
* Description : label of AListView
|
|
38
42
|
*/
|
|
39
43
|
label?: TCanCallback<IAListViewContentProps<T>, React.ReactNode>;
|
|
40
44
|
/**
|
|
41
45
|
* content? : TCanCallback<IAListViewContentProps<T>, React.ReactNode>
|
|
46
|
+
*
|
|
42
47
|
* Description : content of AListView
|
|
43
48
|
*/
|
|
44
49
|
content?: TCanCallback<IAListViewContentProps<T>, React.ReactNode>;
|
|
@@ -51,40 +56,46 @@ export type TAListViewDefs<T extends IObject> = {
|
|
|
51
56
|
export interface IAListViewProps<T extends IObject> extends IABaseProps {
|
|
52
57
|
/**
|
|
53
58
|
* defs : TAListViewDefs<T>
|
|
59
|
+
*
|
|
54
60
|
* Description : defs of AListView
|
|
55
|
-
* Basic Usage :
|
|
56
|
-
* const defs = {
|
|
57
|
-
* 'Name': {label: ({item}) => item.name},
|
|
58
|
-
* 'Age': {content: ({item}) => item.age},
|
|
59
|
-
* }
|
|
60
|
-
* <AListView defs={defs} item={{name: 'John', age: 20}}/>
|
|
61
61
|
*/
|
|
62
62
|
defs: TAListViewDefs<T>;
|
|
63
63
|
/**
|
|
64
64
|
* defaultDef? : IAListViewDef<T>
|
|
65
|
+
*
|
|
65
66
|
* Description : defaultDef of AListView. it affects no all defs, and can be overridden by each def.
|
|
66
|
-
* Basic Usage :
|
|
67
|
-
* (1) const defaultDef = {label: ({defKey}) => defKey};
|
|
68
|
-
* <AListView defs={{'Name': {content: ({item}) => item.name}}} defaultDef={defaultDef}/>
|
|
69
67
|
*/
|
|
70
68
|
defaultDef?: IAListViewDef<T>;
|
|
71
69
|
/**
|
|
72
70
|
* item : T
|
|
71
|
+
*
|
|
73
72
|
* Description : item of AListView
|
|
74
|
-
* Basic Usage :
|
|
75
|
-
* (1) <AListView defs={{'Name': {content: ({item}) => item.name}}} item={{name: 'John'}}/>
|
|
76
73
|
*/
|
|
77
74
|
item: T;
|
|
78
75
|
}
|
|
79
76
|
/**
|
|
80
77
|
* AComponent : AListView
|
|
78
|
+
*
|
|
81
79
|
* Description : AListView is a list view component that can show the key:values of items
|
|
80
|
+
*
|
|
82
81
|
* Basic Usage :
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* }
|
|
87
|
-
*
|
|
88
|
-
*
|
|
82
|
+
*
|
|
83
|
+
* const defs = {
|
|
84
|
+
* name : {label: 'Name~'}
|
|
85
|
+
* age : {content: ({item}) => item.age},
|
|
86
|
+
* height : {}
|
|
87
|
+
* description : {}
|
|
88
|
+
* }
|
|
89
|
+
* const defaultDef = {
|
|
90
|
+
* label: ({defKey}) => 'label is ' + defKey,
|
|
91
|
+
* content: ({defKey, item}) => 'content is ' + item[defKey]
|
|
92
|
+
* }
|
|
93
|
+
* const user = {name: 'John', age: 20, height: 180, description: 'good'}
|
|
94
|
+
*
|
|
95
|
+
* if (case 1)
|
|
96
|
+
* <AListView defs={defs} item={user}/>
|
|
97
|
+
*
|
|
98
|
+
* if (case 2)
|
|
99
|
+
* <AListView defs={defs} item={user} defaultDef={defaultDef}/>
|
|
89
100
|
*/
|
|
90
101
|
export declare const AListView: <T extends IObject>({ defs: extDefs, defaultDef: extDefaultDef, item, ...abaseProps }: IAListViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|