ados-rcm 1.0.30 → 1.0.32
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/ASelect/ASelect.d.ts +30 -31
- package/dist/AModule/AComponents/AStepper/AStepper.d.ts +1 -1
- package/dist/AModule/AComponents/ATab/ATab.d.ts +1 -1
- package/dist/AModule/AComponents/ATable/ATableFilter.d.ts +2 -2
- package/dist/index.cjs.js +13 -13
- package/dist/index.es.js +2204 -2201
- package/package.json +1 -1
|
@@ -2,19 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { TUseValues } from '../../AHooks/useValues';
|
|
3
3
|
import { IABaseProps } from '../ABase/ABase';
|
|
4
4
|
import { IAWrapProps } from '../AWrap/AWrap';
|
|
5
|
-
export interface IASelectSelectedRendererProps<
|
|
5
|
+
export interface IASelectSelectedRendererProps<I, S extends (null | I) | I[]> {
|
|
6
6
|
/**
|
|
7
|
-
* OptionRenderer : (props: IASelectOptionRendererProps<
|
|
7
|
+
* OptionRenderer : (props: IASelectOptionRendererProps<I>) => React.ReactNode
|
|
8
8
|
*
|
|
9
9
|
* Description : OptionRenderer of ASelect
|
|
10
10
|
*/
|
|
11
|
-
OptionRenderer: (props: IASelectOptionRendererProps<
|
|
11
|
+
OptionRenderer: (props: IASelectOptionRendererProps<I>) => React.ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* selected :
|
|
13
|
+
* selected : S
|
|
14
14
|
*
|
|
15
15
|
* Description : selected items of ASelect
|
|
16
16
|
*/
|
|
17
|
-
selected:
|
|
17
|
+
selected: S;
|
|
18
18
|
/**
|
|
19
19
|
* placeholder : React.ReactNode
|
|
20
20
|
*
|
|
@@ -22,27 +22,27 @@ export interface IASelectSelectedRendererProps<TItem, TGivenSelected, TSelected
|
|
|
22
22
|
*/
|
|
23
23
|
placeholder?: React.ReactNode;
|
|
24
24
|
}
|
|
25
|
-
export interface IASelectOptionRendererProps<
|
|
25
|
+
export interface IASelectOptionRendererProps<I> {
|
|
26
26
|
/**
|
|
27
|
-
* option :
|
|
27
|
+
* option : I
|
|
28
28
|
*
|
|
29
29
|
* Description : option of ASelect
|
|
30
30
|
*/
|
|
31
|
-
option:
|
|
31
|
+
option: I;
|
|
32
32
|
}
|
|
33
|
-
export interface IASelectProps<
|
|
33
|
+
export interface IASelectProps<I, S extends (null | I) | I[]> extends IABaseProps, IAWrapProps {
|
|
34
34
|
/**
|
|
35
|
-
* options :
|
|
35
|
+
* options : I[]
|
|
36
36
|
*
|
|
37
37
|
* Description : options of ASelect
|
|
38
38
|
*/
|
|
39
|
-
options:
|
|
39
|
+
options: I[];
|
|
40
40
|
/**
|
|
41
|
-
* useSelect? : TUseValues<
|
|
41
|
+
* useSelect? : TUseValues<K>
|
|
42
42
|
*
|
|
43
43
|
* Description : useSelect of ASelect
|
|
44
44
|
*/
|
|
45
|
-
useSelect?: TUseValues<
|
|
45
|
+
useSelect?: TUseValues<S>;
|
|
46
46
|
/**
|
|
47
47
|
* type? : 'Primary' | 'Secondary' = 'Primary'
|
|
48
48
|
*
|
|
@@ -55,12 +55,6 @@ export interface IASelectProps<TItem, TGivenSelected, TSelected = TGivenSelected
|
|
|
55
55
|
* Description : placeholder of ASelect. it is shown when no option is selected
|
|
56
56
|
*/
|
|
57
57
|
placeholder?: React.ReactNode;
|
|
58
|
-
/**
|
|
59
|
-
* isSelectMulti? : boolean = false
|
|
60
|
-
*
|
|
61
|
-
* Description : isSelectMulti of ASelect. if it is true, multiple options can be selected
|
|
62
|
-
*/
|
|
63
|
-
isSelectMulti?: boolean;
|
|
64
58
|
/**
|
|
65
59
|
* onClose? : () => void
|
|
66
60
|
*
|
|
@@ -72,13 +66,13 @@ export interface IASelectProps<TItem, TGivenSelected, TSelected = TGivenSelected
|
|
|
72
66
|
*
|
|
73
67
|
* Description : Renderer of Selected Options of ASelect
|
|
74
68
|
*/
|
|
75
|
-
SelectedRenderer?: (props: IASelectSelectedRendererProps<
|
|
69
|
+
SelectedRenderer?: (props: IASelectSelectedRendererProps<I, S>) => React.ReactNode;
|
|
76
70
|
/**
|
|
77
71
|
* OptionRenderer? : (props: IASelectOptionRendererProps<T>) => React.ReactNode = DefaultOptionRenderer
|
|
78
72
|
*
|
|
79
73
|
* Description : Renderer of Options of ASelect
|
|
80
74
|
*/
|
|
81
|
-
OptionRenderer?: (props: IASelectOptionRendererProps<
|
|
75
|
+
OptionRenderer?: (props: IASelectOptionRendererProps<I>) => React.ReactNode;
|
|
82
76
|
/**
|
|
83
77
|
* minShowRows? : number = 2
|
|
84
78
|
*
|
|
@@ -102,33 +96,38 @@ export interface IASelectProps<TItem, TGivenSelected, TSelected = TGivenSelected
|
|
|
102
96
|
* AComponent : ASelect
|
|
103
97
|
*
|
|
104
98
|
* Description : ASelect is a select component. give options and useSelect to select an option.
|
|
99
|
+
* if useSelect is given for I[], it will act as a multi select, otherwise it will act as a single select.
|
|
105
100
|
*
|
|
106
101
|
* Basic Usage :
|
|
107
102
|
*
|
|
108
|
-
* const strOptions = ['Option1', 'Option2', 'Option3'];
|
|
109
103
|
* const options = [{idx : 1, name : 'option1'}, {idx : 2, name : 'option2'}, {idx : 3, name : 'option3'}];
|
|
110
|
-
* const [
|
|
111
|
-
* const [selected, setSelected] = useState<{idx : number, name : string}[]>([]);
|
|
104
|
+
* const [selected, setSelected] = useState<typeof options[0]>(options[0]);
|
|
112
105
|
* const OptionRenderer = ({option}) => <div>{option.name}</div>;
|
|
113
|
-
* const SelectedRenderer = ({selected, placeholder}) => selected
|
|
106
|
+
* const SelectedRenderer = ({selected, placeholder}) => selected ? selected.name : placeholder;
|
|
107
|
+
* const [multiSelected, setMultiSelected] = useState<(typeof options[0])[]>([options[0]]);
|
|
108
|
+
* const MultiSelectedRenderer = ({selected, placeholder}) => selected.length > 0 ? string.join(selected.map(e => e.name), ', ') : placeholder;
|
|
114
109
|
*
|
|
115
110
|
* if (case 1)
|
|
116
111
|
* <ASelect options={strOptions}
|
|
117
|
-
* useSelect={[
|
|
112
|
+
* useSelect={[selected, setSelected]}/>
|
|
118
113
|
*
|
|
119
114
|
* if (case 2)
|
|
120
115
|
* <ASelect options={options}
|
|
121
116
|
* useSelect={[selected, setSelected]}
|
|
122
|
-
* OptionRenderer={OptionRenderer}
|
|
123
|
-
* isSelectMulti
|
|
117
|
+
* OptionRenderer={OptionRenderer}/>
|
|
124
118
|
*
|
|
125
119
|
* if (case 3)
|
|
126
120
|
* <ASelect options={options}
|
|
127
121
|
* useSelect={[selected, setSelected]}
|
|
128
122
|
* OptionRenderer={OptionRenderer}
|
|
129
|
-
* SelectedRenderer={SelectedRenderer}
|
|
130
|
-
*
|
|
123
|
+
* SelectedRenderer={SelectedRenderer}/>
|
|
124
|
+
*
|
|
125
|
+
* if (case 4)
|
|
126
|
+
* <ASelect options={options}
|
|
127
|
+
* useSelect={[multiSelected, setMultiSelected]}
|
|
128
|
+
* OptionRenderer={OptionRenderer}
|
|
129
|
+
* SelectedRenderer={MultiSelectedRenderer}/>
|
|
131
130
|
*
|
|
132
131
|
*/
|
|
133
|
-
export declare const ASelect: <
|
|
132
|
+
export declare const ASelect: <I, S extends I | I[] | null>(props: IASelectProps<I, S>) => React.ReactNode;
|
|
134
133
|
export declare const DefaultOptionRenderer: <T>(props: IASelectOptionRendererProps<T>) => React.ReactNode;
|
|
@@ -68,5 +68,5 @@ export interface IAStepperProps<T> {
|
|
|
68
68
|
* ContentRenderer={ContentRenderer}/>
|
|
69
69
|
*
|
|
70
70
|
*/
|
|
71
|
-
export declare const AStepper: <T>(props: IAStepperProps<T>) => import("react/jsx-runtime").JSX.Element
|
|
71
|
+
export declare const AStepper: <T>(props: IAStepperProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
72
72
|
export {};
|
|
@@ -72,4 +72,4 @@ export interface IATabProps<T> {
|
|
|
72
72
|
* <ATab options={options}
|
|
73
73
|
* type="Secondary"/>
|
|
74
74
|
*/
|
|
75
|
-
export declare const ATab: <T>(props: IATabProps<T>) => import("react/jsx-runtime").JSX.Element
|
|
75
|
+
export declare const ATab: <T>(props: IATabProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { TUseValues } from '../../AHooks/useValues';
|
|
1
2
|
import { IItem } from '../../AUtils/objF';
|
|
3
|
+
import { Resources } from '../AResource/AResource';
|
|
2
4
|
import { TATableFilteration } from './ATable';
|
|
3
5
|
import { IATableFilterF } from './ATableHeader';
|
|
4
|
-
import { TUseValues } from '../../AHooks/useValues';
|
|
5
|
-
import { Resources } from '../AResource/AResource';
|
|
6
6
|
interface IATableFilterProps<T extends IItem> {
|
|
7
7
|
useFilteration: TUseValues<TATableFilteration<T>>;
|
|
8
8
|
filterF: IATableFilterF;
|