ados-rcm 1.0.8 → 1.0.10

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 (32) hide show
  1. package/dist/AModule/AComponents/ABase/ABase.d.ts +51 -16
  2. package/dist/AModule/AComponents/AButton/AButton.d.ts +15 -1
  3. package/dist/AModule/AComponents/AButton/AIconButton.d.ts +21 -7
  4. package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +18 -4
  5. package/dist/AModule/AComponents/AClock/AClock.d.ts +64 -0
  6. package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +92 -0
  7. package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +36 -13
  8. package/dist/AModule/AComponents/ADialog/ADialog.d.ts +133 -12
  9. package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +30 -0
  10. package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +107 -5
  11. package/dist/AModule/AComponents/AFrames/AFrames.d.ts +35 -4
  12. package/dist/AModule/AComponents/AGrow/AGrow.d.ts +10 -0
  13. package/dist/AModule/AComponents/AIcon/AIcon.d.ts +11 -7
  14. package/dist/AModule/AComponents/AInput/AInput.d.ts +95 -2
  15. package/dist/AModule/AComponents/AListView/AListView.d.ts +60 -7
  16. package/dist/AModule/AComponents/ASelect/ASelect.d.ts +118 -21
  17. package/dist/AModule/AComponents/ASpace/ASpace.d.ts +22 -0
  18. package/dist/AModule/AComponents/AStepper/AStepper.d.ts +64 -5
  19. package/dist/AModule/AComponents/ASwitch/ASwitch.d.ts +17 -0
  20. package/dist/AModule/AComponents/ATab/ATab.d.ts +62 -0
  21. package/dist/AModule/AComponents/ATable/ATable.d.ts +545 -18
  22. package/dist/AModule/AComponents/ATable/ATableBody.d.ts +2 -2
  23. package/dist/AModule/AComponents/AText/AText.d.ts +24 -0
  24. package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +77 -1
  25. package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +29 -2
  26. package/dist/AModule/AComponents/ATree/ATree.d.ts +122 -4
  27. package/dist/AModule/AComponents/ATypes/ATypes.d.ts +10 -4
  28. package/dist/AModule/AComponents/AWrap/AWrap.d.ts +28 -2
  29. package/dist/AModule/AUtils/cbF.d.ts +3 -3
  30. package/dist/index.cjs.js +15 -41
  31. package/dist/index.es.js +4377 -7995
  32. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { TCBAble } from '../../AUtils/cbF';
1
+ import { TCanCallback } from '../../AUtils/cbF';
2
2
  import { IItem } from '../../AUtils/objF';
3
3
  import { IATablePagination, IATableSortation, IATableTRProps, TATableDefs, TATableFilteration } from './ATable';
4
4
  import { TUseValues } from '../../AHooks/useValues';
5
5
  import React from 'react';
6
6
  interface IATableBodyProps<T extends IItem> {
7
7
  defs: TATableDefs<T>;
8
- rProps?: TCBAble<IATableTRProps<T>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
8
+ rProps?: TCanCallback<IATableTRProps<T>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
9
9
  useSelect?: TUseValues<T[]>;
10
10
  isTableDisabled?: boolean;
11
11
  isSelectMulti?: boolean;
@@ -1,8 +1,32 @@
1
1
  import React from 'react';
2
2
  interface IATextProps {
3
+ /**
4
+ * text? : string
5
+ * <br/>Description : text of AText
6
+ */
3
7
  text?: string;
8
+ /**
9
+ * styled? : boolean | string
10
+ * <br/>Description : styled of AText. if true, all text is styled. if string, the matching string on text will be styled.
11
+ */
4
12
  styled?: boolean | string;
13
+ /**
14
+ * style? : 'bold' | React.CSSProperties
15
+ * <br/>Description : style of AText. if 'bold', text will be bold. if React.CSSProperties, text will be styled with the style.
16
+ */
5
17
  style?: 'bold' | React.CSSProperties;
6
18
  }
19
+ /**
20
+ * AComponent : AText
21
+ * <br/>Description : AText is a text component that can be styled.
22
+ * <br/>Basic Usage :
23
+ * <br/>(1)<AText text="This is text"/>
24
+ *
25
+ * <br/>(2)<AText text="This is text" styled/>
26
+ *
27
+ * <br/>(3)<AText text="This is text" styled="is" style='bold'/>
28
+ *
29
+ * <br/>(4)<AText text="This is text" styled="text" style={{color: 'red'}}/>
30
+ */
7
31
  export declare const AText: ({ text, styled, style }: IATextProps) => import("react/jsx-runtime").JSX.Element;
8
32
  export {};
@@ -4,18 +4,94 @@ import { IABaseProps } from '../ABase/ABase';
4
4
  import { TUseValues } from '../../AHooks/useValues';
5
5
  export type TTextAreaType = 'Primary' | 'Secondary' | 'Error';
6
6
  export interface IATextAreaProps extends IABaseProps, IAWrapProps {
7
+ /**
8
+ * onEnterPress? : (value: string) => void
9
+ * <br/>Description : onEnterPress of ATextArea
10
+ * <br/>Basic Usage :
11
+ * <br/>(1)<AInput onEnterPress={value => console.log(value)}/>
12
+ */
7
13
  onEnterPress?: (value: string) => void;
14
+ /**
15
+ * type? : TTextAreaType = 'Primary'
16
+ * <br/>Description : type of ATextArea
17
+ * <br/>Basic Usage :
18
+ * <br/>(1)<AInput type="Secondary"/>
19
+ */
8
20
  type?: TTextAreaType;
21
+ /**
22
+ * textAreaRef? : React.RefObject<HTMLTextAreaElement>
23
+ * <br/>Description : textAreaRef of ATextArea
24
+ * <br/>Basic Usage :
25
+ * <br/>(1)const textAreaRef = useRef<HTMLTextAreaElement>(null);
26
+ * <AInput textAreaRef={textAreaRef}/>
27
+ */
9
28
  textAreaRef?: React.RefObject<HTMLTextAreaElement>;
29
+ /**
30
+ * useValue? : TUseValues<string>
31
+ * <br/>Description : useValue of ATextArea
32
+ * <br/>Basic Usage :
33
+ * <br/>(1)const [value, setValue] = useState<string>('');
34
+ * <AInput useValue={[value, setValue]}/>
35
+ */
10
36
  useValue?: TUseValues<string>;
37
+ /**
38
+ * rows? : number
39
+ * <br/>Description : rows of ATextArea
40
+ * <br/>Basic Usage :
41
+ * <br/>(1)<ATextArea rows={5}/>
42
+ */
11
43
  rows?: number;
44
+ /**
45
+ * readonly? : boolean
46
+ * <br/>Description : decides whether the input is readonly or not
47
+ * <br/>Basic Usage :
48
+ * <br/>(1)<ATextArea readonly/>
49
+ */
12
50
  readonly?: boolean;
13
- onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
51
+ /**
52
+ * onChange? : (e: React.ChangeEvent<HTMLTextAreaElement>) => void
53
+ * <br/>Description : onChange of ATextArea
54
+ */
14
55
  onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
56
+ /**
57
+ * placeholder? : string
58
+ * <br/>Description : placeholder of ATextArea
59
+ * <br/>Basic Usage :
60
+ * <br/>(1)<ATextArea placeholder="Placeholder"/>
61
+ */
15
62
  placeholder?: string;
63
+ /**
64
+ * maxLength? : number
65
+ * <br/>Description : maxLength of ATextArea
66
+ * <br/>Basic Usage :
67
+ * <br/>(1)<ATextArea maxLength={10}/>
68
+ */
16
69
  maxLength?: number;
70
+ /**
71
+ * tabIndex? : number
72
+ * <br/>Description : tabIndex of ATextArea
73
+ * <br/>Basic Usage :
74
+ * <br/>(1)<ATextArea tabIndex={1}/>
75
+ */
17
76
  tabIndex?: number;
77
+ /**
78
+ * autoFocus? : boolean
79
+ * <br/>Description : decides whether the input is focused or not
80
+ * <br/>Basic Usage :
81
+ * <br/>(1)<ATextArea autoFocus/>
82
+ */
18
83
  autoFocus?: boolean;
84
+ /**
85
+ * textAreaProps? : React.TextareaHTMLAttributes<HTMLTextAreaElement>
86
+ * <br/>Description : textAreaProps of ATextArea
87
+ */
19
88
  textAreaProps?: React.TextareaHTMLAttributes<HTMLTextAreaElement>;
20
89
  }
90
+ /**
91
+ * AComponent : ATextArea
92
+ * <br/>Description : ATextArea is a textarea component. it has AWrap and ABase inside, so be careful with the styles. I recommend checking out the element hierarchy first.
93
+ * <br/>Basic Usage :
94
+ * <br/>(1)const [value, setValue] = useState<string>('');
95
+ * return <ATextArea useValue={[value, setValue]}/>
96
+ */
21
97
  export declare const ATextArea: ({ onEnterPress, type, textAreaRef, useValue, rows, readonly, placeholder, maxLength, tabIndex, autoFocus, textAreaProps, wrapProps, helperText, label, wrapType, ...abaseProps }: IATextAreaProps) => React.ReactNode;
@@ -1,9 +1,36 @@
1
1
  import { RefObject } from 'react';
2
2
  interface IATooltipProps {
3
+ /**
4
+ * tooltip : React.ReactNode
5
+ * <br/>Description : tooltip of ATooltip
6
+ */
3
7
  tooltip: React.ReactNode;
8
+ /**
9
+ * targetRef : React.RefObject<HTMLElement>
10
+ * <br/>Description : targetRef of ATooltip
11
+ */
4
12
  targetRef: RefObject<HTMLElement>;
5
- delay?: number;
6
- distance?: number;
13
+ /**
14
+ * delay? : number = 0
15
+ * <br/>Description : delay of ATooltip
16
+ */
17
+ delay: number;
18
+ /**
19
+ * distance? : number = 10
20
+ * <br/>Description : distance of ATooltip
21
+ */
22
+ distance: number;
7
23
  }
24
+ /**
25
+ * AComponent : ATooltip
26
+ * <br/>Description : ATooltip is a tooltip component that can be attached to a target element.
27
+ * <br/>Basic Usage :
28
+ * <br/>(1)const targetRef = useRef<HTMLDivElement>(null);
29
+ * return <>
30
+ * <div ref={targetRef}>Hover me</div>
31
+ * <ATooltip tooltip="This is tooltip" targetRef={targetRef}/>
32
+ * </>
33
+ *
34
+ */
8
35
  export declare const ATooltip: ({ tooltip, targetRef, delay, distance }: IATooltipProps) => import("react").ReactPortal | null;
9
36
  export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ATree
3
- * Description :
3
+ * <br/>Description :
4
4
  * - select and check is not different, check is just appeared when showCheckbox is true.
5
5
  *
6
6
  * Notice 1 : useSelect is considered as T[], so you should pass T[] to useSelect even if isSelectMulti is false.
@@ -8,47 +8,165 @@
8
8
  * Todo 2 : maybe adding defs for tree is necessary
9
9
  */
10
10
  import React from 'react';
11
- import { TIcons } from '../AIcon/AIcon';
12
11
  import { TUseValues } from '../../AHooks/useValues';
12
+ import { IItem } from '../../AUtils/objF';
13
13
  import { IABaseProps } from '../ABase/ABase';
14
+ import { TIcons } from '../AIcon/AIcon';
15
+ import { Resources } from '../AResource/AResource';
14
16
  import { TActionRef } from '../ATypes/ATypes';
15
- import { IItem } from '../../AUtils/objF';
16
17
  import { IATreeItemProps } from './ATreeItem';
17
- import { Resources } from '../AResource/AResource';
18
18
  export interface IATreeSearchResult<T> {
19
+ /**
20
+ * keyword : string
21
+ * <br/>Description : keyword of search result
22
+ */
19
23
  keyword: string;
24
+ /**
25
+ * items : T[]
26
+ * <br/>Description : items of search result
27
+ */
20
28
  items: T[];
29
+ /**
30
+ * item? : T
31
+ * <br/>Description : item of search result
32
+ */
21
33
  item?: T;
22
34
  }
23
35
  export interface IATreeItem<T> extends IItem {
36
+ /**
37
+ * children? : T[]
38
+ * <br/>Description : children of IATreeItem. tree will be rendered recursively.
39
+ */
24
40
  children?: T[];
25
41
  }
26
42
  export interface IATreeAction {
43
+ /**
44
+ * expandAll : () => void
45
+ * <br/>Description : expand all items
46
+ */
27
47
  expandAll: () => void;
48
+ /**
49
+ * collapseAll : () => void
50
+ * <br/>Description : collapse all items
51
+ */
28
52
  collapseAll: () => void;
29
53
  }
30
54
  export interface IATreeProps<T extends IATreeItem<T>> extends IABaseProps {
55
+ /**
56
+ * ItemRenderer? : (props: IATreeItemProps<T>) => React.ReactNode
57
+ * <br/>Description : ItemRenderer of ATree
58
+ */
31
59
  ItemRenderer?: (props: IATreeItemProps<T>) => React.ReactNode;
60
+ /**
61
+ * useItems? : TUseValues<T[]>
62
+ * <br/>Description : useItems of ATree. items will be changed if dragging is used
63
+ */
32
64
  useItems?: TUseValues<T[]>;
65
+ /**
66
+ * useExpand? : TUseValues<T[]>
67
+ * <br/>Description : useExpand of ATree
68
+ */
33
69
  useExpand?: TUseValues<T[]>;
70
+ /**
71
+ * useSelect? : TUseValues<T[]>
72
+ * <br/>Description : useSelect of ATree
73
+ */
34
74
  useSelect?: TUseValues<T[]>;
75
+ /**
76
+ * selectDisabled? : (item: T) => boolean | string | undefined
77
+ * <br/>Description : selectDisabled of ATree. if string is returned, it will be used as tooltip.
78
+ */
35
79
  selectDisabled?: (item: T) => boolean | string | undefined;
80
+ /**
81
+ * useSearch? : TUseValues<IATreeSearchResult<T> | undefined>
82
+ * <br/>Description : useSearch of ATree
83
+ */
36
84
  useSearch?: TUseValues<IATreeSearchResult<T> | undefined>;
85
+ /**
86
+ * showCheckbox? : boolean
87
+ * <br/>Description : showCheckbox of ATree
88
+ */
37
89
  showCheckbox?: boolean;
90
+ /**
91
+ * icons? : { noChild?: TIcons; collapsed?: TIcons; expanded?: TIcons }
92
+ * <br/>Description : icons of ATree
93
+ */
38
94
  icons?: {
39
95
  noChild?: TIcons;
40
96
  collapsed?: TIcons;
41
97
  expanded?: TIcons;
42
98
  };
99
+ /**
100
+ * iconWidth? : number
101
+ * <br/>Description : iconWidth of ATree
102
+ */
43
103
  iconWidth?: number;
104
+ /**
105
+ * isSelectMulti? : boolean
106
+ * <br/>Description : isSelectMulti of ATree
107
+ */
44
108
  isSelectMulti?: boolean;
109
+ /**
110
+ * noSearch? : boolean
111
+ * <br/>Description : noSearch of ATree. if true, search will not be rendered.
112
+ */
45
113
  noSearch?: boolean;
114
+ /**
115
+ * enableDrag? : boolean
116
+ * <br/>Description : enableDrag of ATree
117
+ */
46
118
  enableDrag?: boolean;
119
+ /**
120
+ * syncSearchSelect? : boolean
121
+ * <br/>Description : syncSearchSelect of ATree. if true, selectedItems will be synced with searchResult.
122
+ */
47
123
  syncSearchSelect?: boolean;
124
+ /**
125
+ * searchPredicate? : (inputValue: string, item: IATreeItem<T>) => any
126
+ * <br/>Description : searchPredicate of ATree.
127
+ */
48
128
  searchPredicate?: (inputValue: string, item: IATreeItem<T>) => any;
129
+ /**
130
+ * actionRef? : TActionRef<IATreeAction>
131
+ * <br/>Description : actionRef of ATree
132
+ */
49
133
  actionRef?: TActionRef<IATreeAction>;
134
+ /**
135
+ * HeaderRightAddon? : React.ReactNode
136
+ * <br/>Description : HeaderRightAddon of ATree
137
+ */
50
138
  HeaderRightAddon?: React.ReactNode;
139
+ /**
140
+ * RightStickyRenderer? : (props: IATreeItemProps<T>) => React.ReactNode
141
+ * <br/>Description : RightStickyRenderer of ATree
142
+ */
51
143
  RightStickyRenderer?: (props: IATreeItemProps<T>) => React.ReactNode;
144
+ /**
145
+ * resources? : Partial<typeof Resources.ATree>
146
+ * <br/>Description : resources of ATree
147
+ */
52
148
  resources?: Partial<typeof Resources.ATree>;
53
149
  }
150
+ /**
151
+ * AComponent : ATree
152
+ * <br/>Description : ATree component. tree will be rendered recursively.
153
+ * select and check are not different, check is just appeared when showCheckbox is true.
154
+ * select, check, expand, drag-to-move, search are available.
155
+ * <br/>Basic Usage :
156
+ * <br/>(1)const items = [{name: 'Item1', children: [{name: 'Item1-1'}]}];
157
+ * return <ATree useItems={[items, setItems]}/>
158
+ *
159
+ * <br/>(2)const items = [{name: 'Item1', children: [{name: 'Item1-1'}]}, {name: 'Item2'}, {name: 'Item3'}];
160
+ * const [selected, setSelected] = useState<typeof items[0]>(items[0]);
161
+ * return <ATree useItems={[items, setItems]} useSelect={[selected, setSelected]}/>
162
+ *
163
+ * <br/>(3)const items = [{name: 'Item1', children: [{name: 'Item1-1'}]}, {name: 'Item2'}, {name: 'Item3'}];
164
+ * const [expanded, setExpanded] = useState<typeof items[0]>(items[0]);
165
+ * return <ATree useItems={[items, setItems]} useExpand={[expanded, setExpanded]}/>
166
+ *
167
+ * <br/>(4)const items = [{name: 'Item1', children: [{name: 'Item1-1'}]}, {name: 'Item2'}, {name: 'Item3'}];
168
+ * const [searchResult, setSearchResult] = useState<IATreeSearchResult<typeof items[0]> | undefined>(undefined);
169
+ * return <ATree useItems={[items, setItems]} useSearch={[searchResult, setSearchResult]}/>
170
+ *
171
+ */
54
172
  export declare const ATree: <T extends IATreeItem<T>>({ selectDisabled, ItemRenderer, useItems, useExpand, useSelect, useSearch, showCheckbox, iconWidth, icons, isSelectMulti, noSearch, enableDrag, syncSearchSelect, actionRef, HeaderRightAddon, RightStickyRenderer, resources: extResources, searchPredicate, isDisabled, ...abaseProps }: IATreeProps<T>) => React.ReactNode;
@@ -26,8 +26,14 @@ export declare enum EDir12 {
26
26
  }
27
27
  export declare function setDir12Style(anchorRef: React.RefObject<HTMLElement>, selfRef: React.RefObject<HTMLElement>, dir: EDir12): void;
28
28
  export type TActionRef<T> = React.MutableRefObject<T | null | undefined>;
29
- /**
30
- * IFable (IFunctionable)
31
- * it has a returns R, and it can be a function that takes P and returns R
32
- */
33
29
  export type TIdx = number | string;
30
+ export interface IAEvent {
31
+ preventDefault: boolean;
32
+ }
33
+ export interface IAEventCallers {
34
+ preventDefault: () => void;
35
+ }
36
+ export declare function createEvent(): {
37
+ event: IAEvent;
38
+ e: IAEventCallers;
39
+ };
@@ -1,11 +1,37 @@
1
1
  import React from 'react';
2
2
  export interface IAWrapProps {
3
+ /**
4
+ * wrapProps? : React.HTMLAttributes<HTMLDivElement>
5
+ * <br/>Description : wrapProps of AWrap
6
+ */
3
7
  wrapProps?: React.HTMLAttributes<HTMLDivElement>;
8
+ /**
9
+ * helperText? : React.ReactNode | React.ReactNode[]
10
+ * <br/>Description : helperText of AWrap
11
+ */
4
12
  helperText?: React.ReactNode | React.ReactNode[];
13
+ /**
14
+ * wrapType? : 'Default' | 'Error' = 'Default'
15
+ * <br/>Description : wrapType of AWrap
16
+ */
5
17
  wrapType?: 'Default' | 'Error';
18
+ /**
19
+ * label? : React.ReactNode
20
+ * <br/>Description : label of AWrap
21
+ */
6
22
  label?: React.ReactNode;
7
- vspace?: number;
8
- hspace?: number;
23
+ /**
24
+ * children? : React.ReactNode
25
+ * <br/>Description : children of AWrap
26
+ */
9
27
  children?: React.ReactNode;
10
28
  }
29
+ /**
30
+ * AComponent : AWrap
31
+ * <br/>Description : AWrap is a wrap component that wraps the children with a label and helper text.
32
+ * <br/>Basic Usage :
33
+ * <br/>(1)<AWrap label="Label" helperText="Helper Text">
34
+ * <AInput/>
35
+ * </AWrap>
36
+ */
11
37
  export declare const AWrap: ({ wrapProps, helperText, wrapType, label, children }: IAWrapProps) => React.ReactNode;
@@ -7,9 +7,9 @@
7
7
  * Todo 1 : F as Function is used for typecheck-bypassing. it might make some errors
8
8
  */
9
9
  type TExcludeFunction<R> = R extends (...args: any[]) => any ? never : R;
10
- export type TCB<P, R> = (props: P) => R;
11
- export type TCBAble<P, R> = TExcludeFunction<R> | TCB<P, TExcludeFunction<R>>;
12
- declare function getContent<P, R>(F: TCBAble<P, R>, props: P): TExcludeFunction<R>;
10
+ export type TCallback<P, R> = (props: P) => R;
11
+ export type TCanCallback<P, R> = TExcludeFunction<R> | TCallback<P, TExcludeFunction<R>>;
12
+ declare function getContent<P, R>(F: TCanCallback<P, R>, props: P): TExcludeFunction<R>;
13
13
  export declare const cbF: {
14
14
  getContent: typeof getContent;
15
15
  };