ados-rcm 1.1.457 → 1.1.459
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 +21 -21
- package/dist/AModule/AComponents/AButton/AButton.d.ts +6 -6
- package/dist/AModule/AComponents/AButton/AIconButton.d.ts +6 -6
- package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +6 -6
- package/dist/AModule/AComponents/AChip/AChip.d.ts +24 -24
- package/dist/AModule/AComponents/AClock/AClock.d.ts +21 -21
- package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +36 -36
- package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +15 -15
- package/dist/AModule/AComponents/ADialog/ADialog.d.ts +93 -93
- package/dist/AModule/AComponents/AEditor/AEditor.d.ts +22 -14
- package/dist/AModule/AComponents/AEditor/modules/TableUI.d.ts +2 -2
- package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +24 -24
- package/dist/AModule/AComponents/AFileUploder/AFileUploader.d.ts +7 -7
- package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +35 -35
- package/dist/AModule/AComponents/AFrame/AFrame.d.ts +45 -45
- package/dist/AModule/AComponents/AIcon/AIcon.d.ts +1 -1
- package/dist/AModule/AComponents/AInput/AInput.d.ts +45 -45
- package/dist/AModule/AComponents/AInput/ANumInput.d.ts +3 -3
- package/dist/AModule/AComponents/AListView/AListView.d.ts +26 -26
- package/dist/AModule/AComponents/AProgressBar/AProgressBar.d.ts +27 -27
- package/dist/AModule/AComponents/ARadioSelect/ARadioSelect.d.ts +5 -5
- package/dist/AModule/AComponents/ASelect/AMultiSelect.d.ts +39 -39
- package/dist/AModule/AComponents/ASelect/ASelect.d.ts +39 -39
- package/dist/AModule/AComponents/AStepper/AStepper.d.ts +12 -12
- package/dist/AModule/AComponents/ATab/ATab.d.ts +36 -36
- package/dist/AModule/AComponents/ATable/ATable.d.ts +281 -281
- package/dist/AModule/AComponents/ATable/ATableBody.d.ts +19 -19
- package/dist/AModule/AComponents/ATable/ATableFilter.d.ts +5 -5
- package/dist/AModule/AComponents/ATable/ATableFooter.d.ts +4 -4
- package/dist/AModule/AComponents/ATable/ATableHeader.d.ts +12 -12
- package/dist/AModule/AComponents/AText/AText.d.ts +6 -6
- package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +36 -36
- package/dist/AModule/AComponents/ATheme/ATheme.d.ts +10 -10
- package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +15 -15
- package/dist/AModule/AComponents/ATree/ATree.d.ts +111 -111
- package/dist/AModule/AComponents/ATree/ATreeItem.d.ts +25 -25
- package/dist/AModule/AComponents/ATree/ATreeSearch.d.ts +7 -7
- package/dist/AModule/AComponents/ATypes/ATypes.d.ts +8 -8
- package/dist/AModule/AComponents/AWrap/AWrap.d.ts +21 -21
- package/dist/AModule/AHooks/useDB.d.ts +1 -1
- package/dist/AModule/ANetwork/APIContext.d.ts +6 -6
- package/dist/AModule/AUtils/bound.d.ts +3 -3
- package/dist/AModule/AUtils/dbF.d.ts +1 -1
- package/dist/index.cjs.js +119 -119
- package/dist/index.es.js +9478 -9388
- package/package.json +12 -10
@@ -9,18 +9,18 @@ import { Resources } from '../AResource/AResource';
|
|
9
9
|
import { TActionRef, TIdx, TPromisable } from '../ATypes/ATypes';
|
10
10
|
import { IATableRowProps } from './ATableBody';
|
11
11
|
export interface IATableTHProps<T extends IItem> {
|
12
|
-
/**
|
13
|
-
* defKey : TIdx
|
14
|
-
*
|
15
|
-
* Description : defKey of the given defs
|
16
|
-
*/
|
17
|
-
defKey: TIdx;
|
18
12
|
/**
|
19
13
|
* def : IATableDef<T>
|
20
14
|
*
|
21
15
|
* Description : def of the given defs
|
22
16
|
*/
|
23
17
|
def: IATableDef<T>;
|
18
|
+
/**
|
19
|
+
* defKey : TIdx
|
20
|
+
*
|
21
|
+
* Description : defKey of the given defs
|
22
|
+
*/
|
23
|
+
defKey: TIdx;
|
24
24
|
}
|
25
25
|
export interface IATableTRProps<T extends IItem> {
|
26
26
|
/**
|
@@ -34,62 +34,47 @@ export interface IATableTDProps<T extends IItem> extends IATableTHProps<T>, IATa
|
|
34
34
|
}
|
35
35
|
export interface IATableDef<T extends IItem> {
|
36
36
|
/**
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
* align? : TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>
|
38
|
+
*
|
39
|
+
* Description : align of the column. type of justifyContent
|
40
|
+
*/
|
41
|
+
align?: TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>;
|
42
42
|
/**
|
43
|
-
*
|
43
|
+
* asText? : TCanCallback<IATableTDProps<T>, string | number>
|
44
44
|
*
|
45
|
-
* Description :
|
45
|
+
* Description : for filteration. complicated contents can be filtered using asText.
|
46
46
|
*/
|
47
|
-
|
47
|
+
asText?: TCanCallback<IATableTDProps<T>, string | number>;
|
48
48
|
/**
|
49
|
-
*
|
49
|
+
* colSpan? : TCanCallback<IATableTHProps<T>, number>
|
50
50
|
*
|
51
|
-
* Description :
|
51
|
+
* Description : colSpan of the column. headers will be not affected and td will overlap.
|
52
52
|
*/
|
53
|
-
|
53
|
+
colSpan?: TCanCallback<IATableTHProps<T>, number>;
|
54
54
|
/**
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
* content? : TCanCallback<IATableTDProps<T>, React.ReactNode>
|
56
|
+
*
|
57
|
+
* Description : content of the td
|
58
|
+
*/
|
59
|
+
content?: TCanCallback<IATableTDProps<T>, React.ReactNode>;
|
60
60
|
/**
|
61
|
-
*
|
61
|
+
* hAlign? : TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>
|
62
62
|
*
|
63
|
-
* Description :
|
63
|
+
* Description : align of the th. type of justifyContent
|
64
64
|
*/
|
65
|
-
|
65
|
+
hAlign?: TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>;
|
66
66
|
/**
|
67
67
|
* hContent? : TCanCallback<IATableTHProps<T>, React.ReactNode>
|
68
68
|
*
|
69
69
|
* Description : content of the th
|
70
70
|
*/
|
71
71
|
hContent?: TCanCallback<IATableTHProps<T>, React.ReactNode>;
|
72
|
-
/**
|
73
|
-
* name? : string
|
74
|
-
*
|
75
|
-
* Description : name of the column. if proivded, it will be used as the followings.
|
76
|
-
* - hContent (but hContent will be first in priority)
|
77
|
-
* - filter placeholder
|
78
|
-
* - filter iconTooltip
|
79
|
-
*/
|
80
|
-
name?: string;
|
81
72
|
/**
|
82
73
|
* hStyle? : TCanCallback<IATableTHProps<T>, React.CSSProperties>
|
83
74
|
*
|
84
75
|
* Description : style of the th. I woudn't touch width, minWidth, maxWidth if I were you.
|
85
76
|
*/
|
86
77
|
hStyle?: TCanCallback<IATableTHProps<T>, React.CSSProperties>;
|
87
|
-
/**
|
88
|
-
* hAlign? : TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>
|
89
|
-
*
|
90
|
-
* Description : align of the th. type of justifyContent
|
91
|
-
*/
|
92
|
-
hAlign?: TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>;
|
93
78
|
/**
|
94
79
|
* isSortable? : boolean
|
95
80
|
*
|
@@ -97,29 +82,44 @@ export interface IATableDef<T extends IItem> {
|
|
97
82
|
*/
|
98
83
|
isSortable?: boolean;
|
99
84
|
/**
|
100
|
-
*
|
85
|
+
* maxWidth? : number
|
101
86
|
*
|
102
|
-
* Description :
|
87
|
+
* Description : maxWidth of the column
|
103
88
|
*/
|
104
|
-
|
89
|
+
maxWidth?: number;
|
105
90
|
/**
|
106
|
-
*
|
91
|
+
* minWidth? : number = 25
|
107
92
|
*
|
108
|
-
* Description :
|
93
|
+
* Description : minWidth of the column
|
109
94
|
*/
|
110
|
-
|
95
|
+
minWidth?: number;
|
111
96
|
/**
|
112
|
-
*
|
97
|
+
* name? : string
|
113
98
|
*
|
114
|
-
* Description :
|
99
|
+
* Description : name of the column. if proivded, it will be used as the followings.
|
100
|
+
* - hContent (but hContent will be first in priority)
|
101
|
+
* - filter placeholder
|
102
|
+
* - filter iconTooltip
|
115
103
|
*/
|
116
|
-
|
104
|
+
name?: string;
|
105
|
+
/**
|
106
|
+
* sortF? : (a: T, b: T, isAsc?: boolean) => number
|
107
|
+
*
|
108
|
+
* Description : sortF of the column
|
109
|
+
*/
|
110
|
+
sortF?: (a: T, b: T, isAsc?: boolean) => number;
|
117
111
|
/**
|
118
112
|
* style? : TCanCallback<IATableTDProps<T>, React.CSSProperties>
|
119
113
|
*
|
120
114
|
* Description : style of the td. I woudn't touch width, minWidth, maxWidth, flexGrow if I were you.
|
121
115
|
*/
|
122
116
|
style?: TCanCallback<IATableTDProps<T>, React.CSSProperties>;
|
117
|
+
/**
|
118
|
+
* width? : number = 80
|
119
|
+
*
|
120
|
+
* Description : width of the column
|
121
|
+
*/
|
122
|
+
width?: number;
|
123
123
|
}
|
124
124
|
export type TATableDefs<T extends IItem> = {
|
125
125
|
[key in Exclude<keyof T, symbol>]?: IATableDef<T>;
|
@@ -128,21 +128,15 @@ export type TATableDefs<T extends IItem> = {
|
|
128
128
|
};
|
129
129
|
export type TATableFilterType = 'String' | 'Select' | 'Date' | 'DateRange';
|
130
130
|
export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
131
|
-
|
132
|
-
/**
|
133
|
-
* type : 'String'
|
134
|
-
*
|
135
|
-
* Description : type of the String filter
|
136
|
-
*/
|
137
|
-
type: 'String';
|
131
|
+
Date: {
|
138
132
|
/**
|
139
|
-
*
|
133
|
+
* filterKey? : keyof K = [key of this filter]
|
140
134
|
*
|
141
|
-
* Description :
|
135
|
+
* Description : filterKey of the filter. if not provided, it will use the key of the filter. This is used when to make apiParams using tableF.getFilterParams()
|
142
136
|
*/
|
143
|
-
|
137
|
+
filterKey?: keyof K;
|
144
138
|
/**
|
145
|
-
* icon? : TIcons | Exclude<React.ReactNode, string> = '
|
139
|
+
* icon? : TIcons | Exclude<React.ReactNode, string> = 'CalerdarDay'
|
146
140
|
*
|
147
141
|
* Description : icon of the String filter
|
148
142
|
*/
|
@@ -154,58 +148,57 @@ export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
|
154
148
|
*/
|
155
149
|
iconTooltip?: React.ReactNode;
|
156
150
|
/**
|
157
|
-
*
|
151
|
+
* maxDate? : Date
|
158
152
|
*
|
159
|
-
* Description :
|
153
|
+
* Description : maxDate of the Date filter
|
160
154
|
*/
|
161
|
-
|
155
|
+
maxDate?: Date;
|
162
156
|
/**
|
163
|
-
*
|
157
|
+
* minDate? : Date
|
164
158
|
*
|
165
|
-
* Description :
|
159
|
+
* Description : minDate of the Date filter
|
166
160
|
*/
|
167
|
-
|
161
|
+
minDate?: Date;
|
168
162
|
/**
|
169
|
-
* placeholder
|
163
|
+
* placeholder : string = def.Name
|
170
164
|
*
|
171
|
-
* Description : placeholder of the
|
172
|
-
* default is tableDef.HContent
|
165
|
+
* Description : placeholder of the Date filter
|
173
166
|
*/
|
174
167
|
placeholder?: string;
|
175
168
|
/**
|
176
|
-
*
|
169
|
+
* predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['Date']) => any
|
177
170
|
*
|
178
|
-
* Description :
|
171
|
+
* Description : predicate of the Date filter. if not provided, it will have default predicate.
|
179
172
|
*/
|
180
|
-
|
173
|
+
predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['Date']) => any;
|
181
174
|
/**
|
182
|
-
*
|
175
|
+
* type : 'Date'
|
183
176
|
*
|
184
|
-
* Description :
|
177
|
+
* Description : type of the Date filter
|
185
178
|
*/
|
186
|
-
|
179
|
+
type: 'Date';
|
187
180
|
/**
|
188
|
-
* validation? : (value?:
|
181
|
+
* validation? : (value?: Date) => string | undefined
|
189
182
|
*
|
190
|
-
* Description : validation of the
|
183
|
+
* Description : validation of the Date filter
|
191
184
|
*/
|
192
|
-
validation?: (value
|
193
|
-
};
|
194
|
-
Select: {
|
185
|
+
validation?: (value?: Date) => string;
|
195
186
|
/**
|
196
|
-
*
|
187
|
+
* value : Date = new Date()
|
197
188
|
*
|
198
|
-
* Description :
|
189
|
+
* Description : value of the Date filter
|
199
190
|
*/
|
200
|
-
|
191
|
+
value?: Date;
|
192
|
+
};
|
193
|
+
DateRange: {
|
201
194
|
/**
|
202
|
-
*
|
195
|
+
* eFilterKey : keyof K
|
203
196
|
*
|
204
|
-
* Description :
|
197
|
+
* Description : filterKey of the filter.value.eDate. This is used when to make apiParams using tableF.getFilterParams()
|
205
198
|
*/
|
206
|
-
|
199
|
+
eFilterKey: keyof K;
|
207
200
|
/**
|
208
|
-
* icon? : TIcons | Exclude<React.ReactNode, string> = '
|
201
|
+
* icon? : TIcons | Exclude<React.ReactNode, string> = 'CalendarDay'
|
209
202
|
*
|
210
203
|
* Description : icon of the String filter
|
211
204
|
*/
|
@@ -217,17 +210,23 @@ export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
|
217
210
|
*/
|
218
211
|
iconTooltip?: React.ReactNode;
|
219
212
|
/**
|
220
|
-
*
|
213
|
+
* maxDate? : Date
|
221
214
|
*
|
222
|
-
* Description :
|
215
|
+
* Description : maxDate of the DateRange filter
|
223
216
|
*/
|
224
|
-
|
217
|
+
maxDate?: Date;
|
225
218
|
/**
|
226
|
-
*
|
219
|
+
* minDate? : Date
|
227
220
|
*
|
228
|
-
* Description :
|
221
|
+
* Description : minDate of the DateRange filter
|
229
222
|
*/
|
230
|
-
|
223
|
+
minDate?: Date;
|
224
|
+
/**
|
225
|
+
* noDefaultChoices? : boolean
|
226
|
+
*
|
227
|
+
* Description : if true, default choices will not be shown.
|
228
|
+
*/
|
229
|
+
noDefaultChoices?: boolean;
|
231
230
|
/**
|
232
231
|
* placeholder : string = def.Name
|
233
232
|
*
|
@@ -235,35 +234,53 @@ export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
|
235
234
|
*/
|
236
235
|
placeholder?: string;
|
237
236
|
/**
|
238
|
-
*
|
237
|
+
* predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['DateRange']) => any
|
239
238
|
*
|
240
|
-
* Description :
|
239
|
+
* Description : predicate of the DateRange filter. if not provided, it will have default predicate.
|
241
240
|
*/
|
242
|
-
|
243
|
-
option: string | number | null;
|
244
|
-
}) => React.ReactNode;
|
241
|
+
predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['DateRange']) => any;
|
245
242
|
/**
|
246
|
-
*
|
243
|
+
* sFilterKey : keyof K
|
247
244
|
*
|
248
|
-
* Description :
|
245
|
+
* Description : filterKey of the filter.value.sDate. This is used when to make apiParams using tableF.getFilterParams()
|
249
246
|
*/
|
250
|
-
|
247
|
+
sFilterKey: keyof K;
|
248
|
+
/**
|
249
|
+
* type : 'DateRange'
|
250
|
+
*
|
251
|
+
* Description : type of the DateRange filter
|
252
|
+
*/
|
253
|
+
type: 'DateRange';
|
254
|
+
/**
|
255
|
+
* validation? : (value?: IDateRange) => string | undefined
|
256
|
+
*
|
257
|
+
* Description : validation of the DateRange filter
|
258
|
+
*/
|
259
|
+
validation?: (value?: IDateRange) => string;
|
260
|
+
/**
|
261
|
+
* value : IDateRange
|
262
|
+
*
|
263
|
+
* Description : value of the DateRange filter
|
264
|
+
*/
|
265
|
+
value?: IDateRange;
|
251
266
|
};
|
252
|
-
|
267
|
+
Select: {
|
253
268
|
/**
|
254
|
-
*
|
269
|
+
* OptionRenderer? : (props: { option: string | number }) => React.ReactNode;
|
255
270
|
*
|
256
|
-
* Description :
|
271
|
+
* Description : OptionRenderer of the Select filter
|
257
272
|
*/
|
258
|
-
|
273
|
+
OptionRenderer?: (props: {
|
274
|
+
option: string | number | null;
|
275
|
+
}) => React.ReactNode;
|
259
276
|
/**
|
260
|
-
*
|
277
|
+
* filterKey? : keyof K = [key of this filter]
|
261
278
|
*
|
262
|
-
* Description :
|
279
|
+
* Description : filterKey of the filter. if not provided, it will use the key of the filter. This is used when to make apiParams using tableF.getFilterParams()
|
263
280
|
*/
|
264
|
-
|
281
|
+
filterKey?: keyof K;
|
265
282
|
/**
|
266
|
-
* icon? : TIcons | Exclude<React.ReactNode, string> = '
|
283
|
+
* icon? : TIcons | Exclude<React.ReactNode, string> = 'Info'
|
267
284
|
*
|
268
285
|
* Description : icon of the String filter
|
269
286
|
*/
|
@@ -275,57 +292,51 @@ export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
|
275
292
|
*/
|
276
293
|
iconTooltip?: React.ReactNode;
|
277
294
|
/**
|
278
|
-
*
|
295
|
+
* options :
|
279
296
|
*
|
280
|
-
* Description :
|
297
|
+
* Description : options of the Select filter
|
281
298
|
*/
|
282
|
-
|
299
|
+
options: string[] | number[];
|
283
300
|
/**
|
284
301
|
* placeholder : string = def.Name
|
285
302
|
*
|
286
|
-
* Description : placeholder of the
|
303
|
+
* Description : placeholder of the Select filter
|
287
304
|
*/
|
288
305
|
placeholder?: string;
|
289
306
|
/**
|
290
|
-
*
|
291
|
-
*
|
292
|
-
* Description : minDate of the Date filter
|
293
|
-
*/
|
294
|
-
minDate?: Date;
|
295
|
-
/**
|
296
|
-
* maxDate? : Date
|
307
|
+
* predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['Select']) => any
|
297
308
|
*
|
298
|
-
* Description :
|
309
|
+
* Description : predicate of the Select filter. if not provided, it will have default predicate.
|
299
310
|
*/
|
300
|
-
|
311
|
+
predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['Select']) => any;
|
301
312
|
/**
|
302
|
-
*
|
313
|
+
* type : 'Select'
|
303
314
|
*
|
304
|
-
* Description :
|
315
|
+
* Description : type of the Select filter
|
305
316
|
*/
|
306
|
-
|
317
|
+
type: 'Select';
|
307
318
|
/**
|
308
|
-
*
|
319
|
+
* value : string | number | null = null
|
309
320
|
*
|
310
|
-
* Description :
|
321
|
+
* Description : values of the Select filter
|
311
322
|
*/
|
312
|
-
|
323
|
+
value?: string | number | null;
|
313
324
|
};
|
314
|
-
|
325
|
+
String: {
|
315
326
|
/**
|
316
|
-
*
|
327
|
+
* autoFocus? : boolean
|
317
328
|
*
|
318
|
-
* Description :
|
329
|
+
* Description : decides whether the input is focused or not
|
319
330
|
*/
|
320
|
-
|
331
|
+
autoFocus?: boolean;
|
321
332
|
/**
|
322
|
-
*
|
333
|
+
* filterKey? : keyof K = [key of this filter]
|
323
334
|
*
|
324
|
-
* Description :
|
335
|
+
* Description : filterKey of the filter. if not provided, it will use the key of the filter. This is used when to make apiParams using tableF.getFilterParams()
|
325
336
|
*/
|
326
|
-
|
337
|
+
filterKey?: keyof K;
|
327
338
|
/**
|
328
|
-
* icon? : TIcons | Exclude<React.ReactNode, string> = '
|
339
|
+
* icon? : TIcons | Exclude<React.ReactNode, string> = 'Info'
|
329
340
|
*
|
330
341
|
* Description : icon of the String filter
|
331
342
|
*/
|
@@ -337,53 +348,42 @@ export interface IATableFilter<T extends IItem, K extends IItem = any> {
|
|
337
348
|
*/
|
338
349
|
iconTooltip?: React.ReactNode;
|
339
350
|
/**
|
340
|
-
*
|
341
|
-
*
|
342
|
-
* Description : placeholder of the Select filter
|
343
|
-
*/
|
344
|
-
placeholder?: string;
|
345
|
-
/**
|
346
|
-
* sFilterKey : keyof K
|
347
|
-
*
|
348
|
-
* Description : filterKey of the filter.value.sDate. This is used when to make apiParams using tableF.getFilterParams()
|
349
|
-
*/
|
350
|
-
sFilterKey: keyof K;
|
351
|
-
/**
|
352
|
-
* eFilterKey : keyof K
|
351
|
+
* maxLength? : number
|
353
352
|
*
|
354
|
-
* Description :
|
353
|
+
* Description : maxLength of the String filter
|
355
354
|
*/
|
356
|
-
|
355
|
+
maxLength?: number;
|
357
356
|
/**
|
358
|
-
*
|
357
|
+
* placeholder? : string = def.Name
|
359
358
|
*
|
360
|
-
* Description :
|
359
|
+
* Description : placeholder of the String filter
|
360
|
+
* default is tableDef.HContent
|
361
361
|
*/
|
362
|
-
|
362
|
+
placeholder?: string;
|
363
363
|
/**
|
364
|
-
*
|
364
|
+
* predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['String']) => any
|
365
365
|
*
|
366
|
-
* Description :
|
366
|
+
* Description : predicate of the String filter
|
367
367
|
*/
|
368
|
-
|
368
|
+
predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['String']) => any;
|
369
369
|
/**
|
370
|
-
*
|
370
|
+
* type : 'String'
|
371
371
|
*
|
372
|
-
* Description :
|
372
|
+
* Description : type of the String filter
|
373
373
|
*/
|
374
|
-
|
374
|
+
type: 'String';
|
375
375
|
/**
|
376
|
-
*
|
376
|
+
* validation? : (value?: string) => string | undefined
|
377
377
|
*
|
378
|
-
* Description :
|
378
|
+
* Description : validation of the String filter
|
379
379
|
*/
|
380
|
-
|
380
|
+
validation?: (value: string) => string;
|
381
381
|
/**
|
382
|
-
*
|
382
|
+
* value : string = ''
|
383
383
|
*
|
384
|
-
* Description :
|
384
|
+
* Description : value of the String filter
|
385
385
|
*/
|
386
|
-
|
386
|
+
value?: string;
|
387
387
|
};
|
388
388
|
}
|
389
389
|
export type TATableSomeFilter<T extends IItem, K extends IItem = any> = IATableFilter<T, K>[TATableFilterType];
|
@@ -420,18 +420,18 @@ export interface IATablePagination {
|
|
420
420
|
* Description : page of the pagination
|
421
421
|
*/
|
422
422
|
page: number;
|
423
|
-
/**
|
424
|
-
* pageSize : number
|
425
|
-
*
|
426
|
-
* Description : pageSize of the pagination
|
427
|
-
*/
|
428
|
-
pageSize: number;
|
429
423
|
/**
|
430
424
|
* pageRange : number
|
431
425
|
*
|
432
426
|
* Description : pageRange of the pagination
|
433
427
|
*/
|
434
428
|
pageRange: number;
|
429
|
+
/**
|
430
|
+
* pageSize : number
|
431
|
+
*
|
432
|
+
* Description : pageSize of the pagination
|
433
|
+
*/
|
434
|
+
pageSize: number;
|
435
435
|
}
|
436
436
|
/**
|
437
437
|
* IATableState<T extends IItem, K extends IItem = any>
|
@@ -465,70 +465,64 @@ export interface IATableState<T extends IItem, K extends IItem = any> {
|
|
465
465
|
sortation?: IATableSortation<T>;
|
466
466
|
}
|
467
467
|
export interface IATableActions<T extends IItem> {
|
468
|
-
fireOnStateChange: (cb?: (oldState: IATableState<T>) => IATableState<T>) => TPromisable<void>;
|
469
468
|
applyFilteration: (cb?: (oldFilteration: TATableFilteration<T>) => TATableFilteration<T>) => TPromisable<void>;
|
469
|
+
fireOnStateChange: (cb?: (oldState: IATableState<T>) => IATableState<T>) => TPromisable<void>;
|
470
470
|
}
|
471
471
|
export interface IATableProps<T extends IItem> {
|
472
472
|
/**
|
473
|
-
*
|
474
|
-
*
|
475
|
-
* Description : defs of ATable
|
476
|
-
*/
|
477
|
-
defs: TATableDefs<T>;
|
478
|
-
/**
|
479
|
-
* pk? : keyof T | (keyof T)[]
|
473
|
+
* RowRenderer? : (props: IATableRowProps<T>) => React.ReactNode
|
480
474
|
*
|
481
|
-
* Description :
|
475
|
+
* Description : RowRenderer of ATable
|
482
476
|
*/
|
483
|
-
|
477
|
+
RowRenderer?: (props: IATableRowProps<T>) => React.ReactNode;
|
484
478
|
/**
|
485
|
-
*
|
479
|
+
* TopLeftAddon? : React.ReactNode
|
486
480
|
*
|
487
|
-
* Description :
|
481
|
+
* Description : TopLeftAddon of ATable
|
488
482
|
*/
|
489
|
-
|
483
|
+
TopLeftAddon?: React.ReactNode;
|
490
484
|
/**
|
491
|
-
*
|
485
|
+
* TopRightAddon? : React.ReactNode
|
492
486
|
*
|
493
|
-
* Description :
|
487
|
+
* Description : TopRightAddon of ATable
|
494
488
|
*/
|
495
|
-
|
489
|
+
TopRightAddon?: React.ReactNode;
|
496
490
|
/**
|
497
|
-
*
|
491
|
+
* actionRef? : TActionRef<IATableActions<T>>
|
498
492
|
*
|
499
|
-
* Description :
|
493
|
+
* Description : actionRef of ATable
|
500
494
|
*/
|
501
|
-
|
495
|
+
actionRef?: TActionRef<IATableActions<T>>;
|
502
496
|
/**
|
503
|
-
*
|
497
|
+
* checkDisabled? : (item: T) => string | boolean | undefined
|
504
498
|
*
|
505
|
-
* Description :
|
499
|
+
* Description : checkDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
506
500
|
*/
|
507
|
-
|
501
|
+
checkDisabled?: (item: T) => string | boolean | undefined;
|
508
502
|
/**
|
509
|
-
*
|
503
|
+
* defaultDef? : IATableDef<T>
|
510
504
|
*
|
511
|
-
* Description :
|
505
|
+
* Description : defaultDef of ATable
|
512
506
|
*/
|
513
|
-
|
507
|
+
defaultDef?: IATableDef<T>;
|
514
508
|
/**
|
515
|
-
*
|
509
|
+
* defs : TATableDefs<T>
|
516
510
|
*
|
517
|
-
* Description :
|
511
|
+
* Description : defs of ATable
|
518
512
|
*/
|
519
|
-
|
513
|
+
defs: TATableDefs<T>;
|
520
514
|
/**
|
521
|
-
*
|
515
|
+
* entireItems? : T[]
|
522
516
|
*
|
523
|
-
* Description :
|
517
|
+
* Description : entireItems of ATable. entireItems will be affected by filteration, sortation, and pagination.
|
524
518
|
*/
|
525
|
-
|
519
|
+
entireItems?: T[];
|
526
520
|
/**
|
527
|
-
*
|
521
|
+
* filterType? : 'Default' | 'Select'
|
528
522
|
*
|
529
|
-
* Description :
|
523
|
+
* Description : filterType of ATable. When 'Select', it behaves like the old useSelectFilteration.
|
530
524
|
*/
|
531
|
-
|
525
|
+
filterType?: 'Default' | 'Select';
|
532
526
|
/**
|
533
527
|
* isDisabled? : boolean
|
534
528
|
*
|
@@ -536,155 +530,161 @@ export interface IATableProps<T extends IItem> {
|
|
536
530
|
*/
|
537
531
|
isDisabled?: string | boolean;
|
538
532
|
/**
|
539
|
-
*
|
533
|
+
* isLoading? : boolean
|
540
534
|
*
|
541
|
-
* Description :
|
535
|
+
* Description : decides whether the table is loading or not
|
542
536
|
*/
|
543
|
-
|
537
|
+
isLoading?: boolean;
|
544
538
|
/**
|
545
|
-
*
|
539
|
+
* isSelectMulti? : boolean
|
546
540
|
*
|
547
|
-
* Description :
|
541
|
+
* Description : isSelectMulti of ATable. if true, multiple items can be selected.
|
548
542
|
*/
|
549
|
-
|
543
|
+
isSelectMulti?: boolean;
|
550
544
|
/**
|
551
|
-
*
|
545
|
+
* noCount? : boolean
|
552
546
|
*
|
553
|
-
* Description :
|
547
|
+
* Description : hides count if set to true
|
554
548
|
*/
|
555
|
-
|
549
|
+
noCount?: boolean;
|
556
550
|
/**
|
557
|
-
*
|
551
|
+
* noDefHeader? : boolean
|
558
552
|
*
|
559
|
-
* Description :
|
553
|
+
* Description : hides defHeader if set to true
|
560
554
|
*/
|
561
|
-
|
555
|
+
noDefHeader?: boolean;
|
562
556
|
/**
|
563
|
-
*
|
557
|
+
* noFilter? : boolean
|
564
558
|
*
|
565
|
-
* Description :
|
559
|
+
* Description : hides filter if set to true
|
566
560
|
*/
|
567
|
-
|
561
|
+
noFilter?: boolean;
|
568
562
|
/**
|
569
|
-
*
|
563
|
+
* noFooter? : boolean
|
570
564
|
*
|
571
|
-
* Description :
|
565
|
+
* Description : hides footer if set to true
|
572
566
|
*/
|
573
|
-
|
567
|
+
noFooter?: boolean;
|
574
568
|
/**
|
575
|
-
*
|
569
|
+
* noHeader? : boolean
|
576
570
|
*
|
577
|
-
* Description :
|
571
|
+
* Description : hides header if set to true
|
578
572
|
*/
|
579
|
-
|
573
|
+
noHeader?: boolean;
|
580
574
|
/**
|
581
|
-
*
|
575
|
+
* noMarking? : boolean
|
582
576
|
*
|
583
|
-
* Description :
|
577
|
+
* Description : hides marking if set to true
|
584
578
|
*/
|
585
|
-
|
579
|
+
noMarking?: boolean;
|
586
580
|
/**
|
587
|
-
*
|
581
|
+
* noStateChangeOnMount? : boolean
|
588
582
|
*
|
589
|
-
* Description :
|
583
|
+
* Description : if true, onStateChange will not be called on render.
|
590
584
|
*/
|
591
|
-
|
585
|
+
noStateChangeOnMount?: boolean;
|
592
586
|
/**
|
593
|
-
*
|
587
|
+
* onStateChange? : (params: IATableState<T>) => void
|
594
588
|
*
|
595
|
-
* Description :
|
589
|
+
* Description : onStateChange of ATable. will be called when filteration, sortation, and pagination changes.
|
596
590
|
*/
|
597
|
-
|
591
|
+
onStateChange?: (params: IATableState<T>) => TPromisable<void>;
|
598
592
|
/**
|
599
|
-
*
|
593
|
+
* pagedItems? : T[]
|
600
594
|
*
|
601
|
-
* Description :
|
595
|
+
* Description : pagedItems of ATable. if provided, entireItems will be ignored. pagedItems will not be affected by filteration, sortation, and pagination.
|
602
596
|
*/
|
603
|
-
|
597
|
+
pagedItems?: T[];
|
604
598
|
/**
|
605
|
-
*
|
599
|
+
* pk? : keyof T | (keyof T)[]
|
606
600
|
*
|
607
|
-
* Description :
|
601
|
+
* Description : pk of ATable
|
608
602
|
*/
|
609
|
-
|
603
|
+
pk?: keyof T | (keyof T)[];
|
610
604
|
/**
|
611
|
-
*
|
605
|
+
* placeholder? : string
|
612
606
|
*
|
613
|
-
* Description :
|
607
|
+
* Description : placeholder of ATable.
|
614
608
|
*/
|
615
|
-
|
609
|
+
placeholder?: string;
|
616
610
|
/**
|
617
|
-
*
|
611
|
+
* rProps? : TCanCallback<IATableTRProps<T>, IABaseProps>
|
618
612
|
*
|
619
|
-
* Description :
|
613
|
+
* Description : rProps of ATable
|
620
614
|
*/
|
621
|
-
|
615
|
+
rProps?: TCanCallback<IATableTRProps<T>, IABaseProps>;
|
622
616
|
/**
|
623
|
-
*
|
617
|
+
* resources? : Partial<typeof Resources.ATable>
|
624
618
|
*
|
625
|
-
* Description :
|
619
|
+
* Description : resources of ATable
|
626
620
|
*/
|
627
|
-
|
621
|
+
resources?: Partial<typeof Resources.ATable>;
|
628
622
|
/**
|
629
|
-
*
|
623
|
+
* rowHeight? : number
|
630
624
|
*
|
631
|
-
* Description :
|
625
|
+
* Description : rowHeight of ATable.
|
632
626
|
*/
|
633
|
-
|
627
|
+
rowHeight?: number;
|
634
628
|
/**
|
635
|
-
*
|
629
|
+
* selectDisabled? : (item: T) => string | boolean | undefined
|
636
630
|
*
|
637
|
-
* Description :
|
631
|
+
* Description : selectDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
638
632
|
*/
|
639
|
-
|
633
|
+
selectDisabled?: (item: T) => string | boolean | undefined;
|
640
634
|
/**
|
641
|
-
*
|
635
|
+
* showRows? : number
|
642
636
|
*
|
643
|
-
* Description :
|
637
|
+
* Description : showRows of ATable. if provided, it will show the rows of the table.
|
644
638
|
*/
|
645
|
-
|
639
|
+
showRows?: number;
|
646
640
|
/**
|
647
|
-
*
|
641
|
+
* title? : React.ReactNode
|
648
642
|
*
|
649
|
-
* Description :
|
643
|
+
* Description : title of ATable
|
650
644
|
*/
|
651
|
-
|
645
|
+
title?: React.ReactNode;
|
652
646
|
/**
|
653
|
-
*
|
647
|
+
* totalCount? : number
|
654
648
|
*
|
655
|
-
* Description : if
|
649
|
+
* Description : totalCount of ATable. if provided, pagination will be affected.
|
656
650
|
*/
|
657
|
-
|
651
|
+
totalCount?: number;
|
658
652
|
/**
|
659
|
-
*
|
653
|
+
* useCheck? : TUseValues<T[]>
|
660
654
|
*
|
661
|
-
* Description :
|
655
|
+
* Description : useCheck of ATable
|
662
656
|
*/
|
663
|
-
|
657
|
+
useCheck?: TUseValues<T[]>;
|
664
658
|
/**
|
665
|
-
*
|
659
|
+
* useFilteration? : TUseValues<TATableFilteration<T>>
|
666
660
|
*
|
667
|
-
* Description :
|
661
|
+
* Description : useFilteration of ATable. filteration can be controlled by useFilteration.
|
668
662
|
*/
|
669
|
-
|
663
|
+
useFilteration?: TUseValues<TATableFilteration<T>>;
|
670
664
|
/**
|
671
|
-
*
|
665
|
+
* usePagination? : TUseValues<IATablePagination>
|
672
666
|
*
|
673
|
-
* Description :
|
667
|
+
* Description : usePagination of ATable. pagination can be controlled by usePagination.
|
674
668
|
*/
|
675
|
-
|
669
|
+
usePagination?: TUseValues<Partial<IATablePagination>, IATablePagination>;
|
676
670
|
/**
|
677
|
-
*
|
671
|
+
* useSelect? : TUseValues<T[]>
|
678
672
|
*
|
679
|
-
* Description :
|
673
|
+
* Description : useSelect of ATable.
|
680
674
|
*/
|
681
|
-
|
675
|
+
useSelect?: TUseValues<T[]>;
|
682
676
|
/**
|
683
|
-
*
|
677
|
+
* useSortation? : TUseValues<IATableSortation<T> | undefined>;
|
684
678
|
*
|
685
|
-
* Description :
|
679
|
+
* Description : useSortation of ATable. sortation can be controlled by useSortation.
|
686
680
|
*/
|
687
|
-
|
681
|
+
useSortation?: TUseValues<IATableSortation<T> | undefined>;
|
682
|
+
/**
|
683
|
+
* useToggleFilteration? : TUseValues<TATableFilteration<T>>
|
684
|
+
*
|
685
|
+
* Description : useToggleFilteration of ATable. toggleFilteration can be controlled by useToggleFilteration.
|
686
|
+
*/
|
687
|
+
useToggleFilteration?: TUseValues<TATableFilteration<T>>;
|
688
688
|
}
|
689
689
|
/**
|
690
690
|
* AComponent : ATable
|