ados-rcm 1.0.9 → 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.
- package/dist/AModule/AComponents/ABase/ABase.d.ts +25 -25
- package/dist/AModule/AComponents/AButton/AButton.d.ts +7 -7
- package/dist/AModule/AComponents/AButton/AIconButton.d.ts +9 -9
- package/dist/AModule/AComponents/ACheckBox/ACheckBox.d.ts +9 -9
- package/dist/AModule/AComponents/AClock/AClock.d.ts +19 -19
- package/dist/AModule/AComponents/ADatePicker/ADatePicker.d.ts +34 -34
- package/dist/AModule/AComponents/ADatePicker/ADateRangePicker.d.ts +9 -9
- package/dist/AModule/AComponents/ADialog/ADialog.d.ts +50 -50
- package/dist/AModule/AComponents/AFileBox/AFileBox.d.ts +13 -13
- package/dist/AModule/AComponents/AFloatMenu/AFloatMenu.d.ts +26 -26
- package/dist/AModule/AComponents/AFrames/AFrames.d.ts +12 -12
- package/dist/AModule/AComponents/AGrow/AGrow.d.ts +3 -3
- package/dist/AModule/AComponents/AIcon/AIcon.d.ts +6 -6
- package/dist/AModule/AComponents/AInput/AInput.d.ts +45 -45
- package/dist/AModule/AComponents/AListView/AListView.d.ts +16 -16
- package/dist/AModule/AComponents/ASelect/ASelect.d.ts +43 -43
- package/dist/AModule/AComponents/ASpace/ASpace.d.ts +11 -11
- package/dist/AModule/AComponents/AStepper/AStepper.d.ts +20 -20
- package/dist/AModule/AComponents/ASwitch/ASwitch.d.ts +7 -7
- package/dist/AModule/AComponents/ATab/ATab.d.ts +25 -25
- package/dist/AModule/AComponents/ATable/ATable.d.ts +136 -136
- package/dist/AModule/AComponents/AText/AText.d.ts +9 -9
- package/dist/AModule/AComponents/ATextArea/ATextArea.d.ts +35 -35
- package/dist/AModule/AComponents/ATooltip/ATooltip.d.ts +7 -7
- package/dist/AModule/AComponents/ATree/ATree.d.ts +31 -31
- package/dist/AModule/AComponents/AWrap/AWrap.d.ts +8 -8
- package/package.json +1 -1
|
@@ -27,19 +27,19 @@ import { TIdx } from '../ATypes/ATypes';
|
|
|
27
27
|
export interface IATableTHProps<T extends IItem> {
|
|
28
28
|
/**
|
|
29
29
|
* defKey : TIdx
|
|
30
|
-
* Description : defKey of the given defs
|
|
30
|
+
* <br/>Description : defKey of the given defs
|
|
31
31
|
*/
|
|
32
32
|
defKey: TIdx;
|
|
33
33
|
/**
|
|
34
34
|
* def : IATableDef<T>
|
|
35
|
-
* Description : def of the given defs
|
|
35
|
+
* <br/>Description : def of the given defs
|
|
36
36
|
*/
|
|
37
37
|
def: IATableDef<T>;
|
|
38
38
|
}
|
|
39
39
|
export interface IATableTRProps<T extends IItem> {
|
|
40
40
|
/**
|
|
41
41
|
* item : T
|
|
42
|
-
* Description : item of the given items
|
|
42
|
+
* <br/>Description : item of the given items
|
|
43
43
|
*/
|
|
44
44
|
item: T;
|
|
45
45
|
}
|
|
@@ -48,77 +48,77 @@ export interface IATableTDProps<T extends IItem> extends IATableTHProps<T>, IATa
|
|
|
48
48
|
export interface IATableDef<T extends IItem> {
|
|
49
49
|
/**
|
|
50
50
|
* width? : TCanCallback<IATableTHProps<T>, number>
|
|
51
|
-
* Description : width of the column
|
|
51
|
+
* <br/>Description : width of the column
|
|
52
52
|
*/
|
|
53
53
|
width?: TCanCallback<IATableTHProps<T>, number>;
|
|
54
54
|
/**
|
|
55
55
|
* maxWidth? : TCanCallback<IATableTHProps<T>, number>
|
|
56
|
-
* Description : maxWidth of the column
|
|
56
|
+
* <br/>Description : maxWidth of the column
|
|
57
57
|
*/
|
|
58
58
|
maxWidth?: TCanCallback<IATableTHProps<T>, number>;
|
|
59
59
|
/**
|
|
60
60
|
* minWidth? : TCanCallback<IATableTHProps<T>, number>
|
|
61
|
-
* Description : minWidth of the column
|
|
61
|
+
* <br/>Description : minWidth of the column
|
|
62
62
|
*/
|
|
63
63
|
minWidth?: TCanCallback<IATableTHProps<T>, number>;
|
|
64
64
|
/**
|
|
65
65
|
* align? : TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>
|
|
66
|
-
* Description : align of the column. type of justifyContent
|
|
66
|
+
* <br/>Description : align of the column. type of justifyContent
|
|
67
67
|
*/
|
|
68
68
|
align?: TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>;
|
|
69
69
|
/**
|
|
70
70
|
* colSpan? : TCanCallback<IATableTHProps<T>, number>
|
|
71
|
-
* Description : colSpan of the column. headers will be not affected and td will overlap.
|
|
71
|
+
* <br/>Description : colSpan of the column. headers will be not affected and td will overlap.
|
|
72
72
|
*/
|
|
73
73
|
colSpan?: TCanCallback<IATableTHProps<T>, number>;
|
|
74
74
|
/**
|
|
75
75
|
* hContent? : TCanCallback<IATableTHProps<T>, React.ReactNode>
|
|
76
|
-
* Description : content of the th
|
|
76
|
+
* <br/>Description : content of the th
|
|
77
77
|
*/
|
|
78
78
|
hContent?: TCanCallback<IATableTHProps<T>, React.ReactNode>;
|
|
79
79
|
/**
|
|
80
80
|
* hColor? : TCanCallback<IATableTHProps<T>, React.CSSProperties['color']>
|
|
81
|
-
* Description : color of the th
|
|
81
|
+
* <br/>Description : color of the th
|
|
82
82
|
*/
|
|
83
83
|
hColor?: TCanCallback<IATableTHProps<T>, React.CSSProperties['color']>;
|
|
84
84
|
/**
|
|
85
85
|
* hBackgroundColor? : TCanCallback<IATableTHProps<T>, React.CSSProperties['backgroundColor']>
|
|
86
|
-
* Description : backgroundColor of the th
|
|
86
|
+
* <br/>Description : backgroundColor of the th
|
|
87
87
|
*/
|
|
88
88
|
hBackgroundColor?: TCanCallback<IATableTHProps<T>, React.CSSProperties['backgroundColor']>;
|
|
89
89
|
/**
|
|
90
90
|
* isSortable? : boolean
|
|
91
|
-
* Description : decides whether the column is sortable or not
|
|
91
|
+
* <br/>Description : decides whether the column is sortable or not
|
|
92
92
|
*/
|
|
93
93
|
isSortable?: boolean;
|
|
94
94
|
/**
|
|
95
95
|
* noResize? : boolean
|
|
96
|
-
* Description : decides whether the column is resizable or not
|
|
96
|
+
* <br/>Description : decides whether the column is resizable or not
|
|
97
97
|
*/
|
|
98
98
|
noResize?: boolean;
|
|
99
99
|
/**
|
|
100
100
|
* sortF? : (a: T, b: T) => number
|
|
101
|
-
* Description : sortF of the column
|
|
101
|
+
* <br/>Description : sortF of the column
|
|
102
102
|
*/
|
|
103
103
|
sortF?: (a: T, b: T) => number;
|
|
104
104
|
/**
|
|
105
105
|
* content? : TCanCallback<IATableTDProps<T>, React.ReactNode>
|
|
106
|
-
* Description : content of the td
|
|
106
|
+
* <br/>Description : content of the td
|
|
107
107
|
*/
|
|
108
108
|
content?: TCanCallback<IATableTDProps<T>, React.ReactNode>;
|
|
109
109
|
/**
|
|
110
110
|
* asText? : TCanCallback<IATableTDProps<T>, string | number>
|
|
111
|
-
* Description : for filteration. complicated contents can be filtered using asText.
|
|
111
|
+
* <br/>Description : for filteration. complicated contents can be filtered using asText.
|
|
112
112
|
*/
|
|
113
113
|
asText?: TCanCallback<IATableTDProps<T>, string | number>;
|
|
114
114
|
/**
|
|
115
115
|
* color? : TCanCallback<IATableTDProps<T>, React.CSSProperties['color']>
|
|
116
|
-
* Description : color of the td
|
|
116
|
+
* <br/>Description : color of the td
|
|
117
117
|
*/
|
|
118
118
|
color?: TCanCallback<IATableTDProps<T>, React.CSSProperties['color']>;
|
|
119
119
|
/**
|
|
120
120
|
* backgroundColor? : TCanCallback<IATableTDProps<T>, React.CSSProperties['backgroundColor']>
|
|
121
|
-
* Description : backgroundColor of the td
|
|
121
|
+
* <br/>Description : backgroundColor of the td
|
|
122
122
|
*/
|
|
123
123
|
backgroundColor?: TCanCallback<IATableTDProps<T>, React.CSSProperties['backgroundColor']>;
|
|
124
124
|
}
|
|
@@ -132,108 +132,108 @@ export interface IATableFilterDef<T extends IItem> {
|
|
|
132
132
|
String: {
|
|
133
133
|
/**
|
|
134
134
|
* type : 'String'
|
|
135
|
-
* Description : type of the String filter Def
|
|
135
|
+
* <br/>Description : type of the String filter Def
|
|
136
136
|
*/
|
|
137
137
|
type: 'String';
|
|
138
138
|
/**
|
|
139
139
|
* defKey? : keyof T | ''
|
|
140
|
-
* Description : defKey of the String filter Def
|
|
140
|
+
* <br/>Description : defKey of the String filter Def
|
|
141
141
|
*/
|
|
142
142
|
defKey?: keyof T | '';
|
|
143
143
|
/**
|
|
144
144
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
|
|
145
|
-
* Description : predicate of the String filter Def. if not provided, it will have default predicate.
|
|
145
|
+
* <br/>Description : predicate of the String filter Def. if not provided, it will have default predicate.
|
|
146
146
|
*/
|
|
147
147
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
|
|
148
148
|
/**
|
|
149
149
|
* placeholder? : string
|
|
150
|
-
* Description : placeholder of the String filter Def
|
|
150
|
+
* <br/>Description : placeholder of the String filter Def
|
|
151
151
|
*/
|
|
152
152
|
placeholder?: string;
|
|
153
153
|
};
|
|
154
154
|
Select: {
|
|
155
155
|
/**
|
|
156
156
|
* type : 'Select'
|
|
157
|
-
* Description : type of the Select filter Def
|
|
157
|
+
* <br/>Description : type of the Select filter Def
|
|
158
158
|
*/
|
|
159
159
|
type: 'Select';
|
|
160
160
|
/**
|
|
161
161
|
* defKey? : keyof T | ''
|
|
162
|
-
* Description : defKey of the Select filter Def
|
|
162
|
+
* <br/>Description : defKey of the Select filter Def
|
|
163
163
|
*/
|
|
164
164
|
defKey?: keyof T | '';
|
|
165
165
|
/**
|
|
166
166
|
* options : (string | number)[]
|
|
167
|
-
* Description : options of the Select filter Def
|
|
167
|
+
* <br/>Description : options of the Select filter Def
|
|
168
168
|
*/
|
|
169
169
|
options: (string | number)[];
|
|
170
170
|
/**
|
|
171
171
|
* placeholder : (string | number)[]
|
|
172
|
-
* Description : values of the Select filter Def
|
|
172
|
+
* <br/>Description : values of the Select filter Def
|
|
173
173
|
*/
|
|
174
174
|
placeholder?: string;
|
|
175
175
|
/**
|
|
176
176
|
* OptionRenderer? : (option: string | number) => React.ReactNode
|
|
177
|
-
* Description : OptionRenderer of the Select filter Def
|
|
177
|
+
* <br/>Description : OptionRenderer of the Select filter Def
|
|
178
178
|
*/
|
|
179
179
|
OptionRenderer?: (option: string | number) => React.ReactNode;
|
|
180
180
|
/**
|
|
181
181
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
|
|
182
|
-
* Description : predicate of the Select filter Def. if not provided, it will have default predicate.
|
|
182
|
+
* <br/>Description : predicate of the Select filter Def. if not provided, it will have default predicate.
|
|
183
183
|
*/
|
|
184
184
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
|
|
185
185
|
};
|
|
186
186
|
Date: {
|
|
187
187
|
/**
|
|
188
188
|
* type : 'Date'
|
|
189
|
-
* Description : type of the Date filter Def
|
|
189
|
+
* <br/>Description : type of the Date filter Def
|
|
190
190
|
*/
|
|
191
191
|
type: 'Date';
|
|
192
192
|
/**
|
|
193
193
|
* defKey? : keyof T | ''
|
|
194
|
-
* Description : defKey of the Date filter Def
|
|
194
|
+
* <br/>Description : defKey of the Date filter Def
|
|
195
195
|
*/
|
|
196
196
|
defKey?: keyof T | '';
|
|
197
197
|
/**
|
|
198
198
|
* minDate? : Date
|
|
199
|
-
* Description : minDate of the Date filter Def
|
|
199
|
+
* <br/>Description : minDate of the Date filter Def
|
|
200
200
|
*/
|
|
201
201
|
minDate?: Date;
|
|
202
202
|
/**
|
|
203
203
|
* maxDate? : Date
|
|
204
|
-
* Description : maxDate of the Date filter Def
|
|
204
|
+
* <br/>Description : maxDate of the Date filter Def
|
|
205
205
|
*/
|
|
206
206
|
maxDate?: Date;
|
|
207
207
|
/**
|
|
208
208
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
|
|
209
|
-
* Description : predicate of the Date filter Def. if not provided, it will have default predicate.
|
|
209
|
+
* <br/>Description : predicate of the Date filter Def. if not provided, it will have default predicate.
|
|
210
210
|
*/
|
|
211
211
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
|
|
212
212
|
};
|
|
213
213
|
DateRange: {
|
|
214
214
|
/**
|
|
215
215
|
* type : 'DateRange'
|
|
216
|
-
* Description : type of the DateRange filter Def
|
|
216
|
+
* <br/>Description : type of the DateRange filter Def
|
|
217
217
|
*/
|
|
218
218
|
type: 'DateRange';
|
|
219
219
|
/**
|
|
220
220
|
* defKey? : keyof T | ''
|
|
221
|
-
* Description : defKey of the DateRange filter Def
|
|
221
|
+
* <br/>Description : defKey of the DateRange filter Def
|
|
222
222
|
*/
|
|
223
223
|
defKey?: keyof T | '';
|
|
224
224
|
/**
|
|
225
225
|
* minDate? : Date
|
|
226
|
-
* Description : minDate of the DateRange filter Def
|
|
226
|
+
* <br/>Description : minDate of the DateRange filter Def
|
|
227
227
|
*/
|
|
228
228
|
minDate?: Date;
|
|
229
229
|
/**
|
|
230
230
|
* maxDate? : Date
|
|
231
|
-
* Description : maxDate of the DateRange filter Def
|
|
231
|
+
* <br/>Description : maxDate of the DateRange filter Def
|
|
232
232
|
*/
|
|
233
233
|
maxDate?: Date;
|
|
234
234
|
/**
|
|
235
235
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
|
|
236
|
-
* Description : predicate of the DateRange filter Def. if not provided, it will have default predicate.
|
|
236
|
+
* <br/>Description : predicate of the DateRange filter Def. if not provided, it will have default predicate.
|
|
237
237
|
*/
|
|
238
238
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
|
|
239
239
|
};
|
|
@@ -242,12 +242,12 @@ export type TATableSomeFilterDef<T extends IItem> = IATableFilterDef<T>[TATableF
|
|
|
242
242
|
export type TATableFilterationDefs<T extends IItem> = {
|
|
243
243
|
/**
|
|
244
244
|
* type : 'And' | 'Or'
|
|
245
|
-
* Description : type of the filteration Defs
|
|
245
|
+
* <br/>Description : type of the filteration Defs
|
|
246
246
|
*/
|
|
247
247
|
type: 'And' | 'Or';
|
|
248
248
|
/**
|
|
249
249
|
* defs : TATableSomeFilterDef<T>[]
|
|
250
|
-
* Description : defs of the filteration Defs
|
|
250
|
+
* <br/>Description : defs of the filteration Defs
|
|
251
251
|
*/
|
|
252
252
|
defs: TATableSomeFilterDef<T>[];
|
|
253
253
|
};
|
|
@@ -255,133 +255,133 @@ export interface IATableFilter<T extends IItem> {
|
|
|
255
255
|
String: {
|
|
256
256
|
/**
|
|
257
257
|
* type : 'String'
|
|
258
|
-
* Description : type of the String filter
|
|
258
|
+
* <br/>Description : type of the String filter
|
|
259
259
|
*/
|
|
260
260
|
type: 'String';
|
|
261
261
|
/**
|
|
262
262
|
* defKey? : keyof T | ''
|
|
263
|
-
* Description : defKey of the String filter
|
|
263
|
+
* <br/>Description : defKey of the String filter
|
|
264
264
|
*/
|
|
265
265
|
defKey: keyof T | '';
|
|
266
266
|
/**
|
|
267
267
|
* value : string
|
|
268
|
-
* Description : value of the String filter
|
|
268
|
+
* <br/>Description : value of the String filter
|
|
269
269
|
*/
|
|
270
270
|
value: string;
|
|
271
271
|
/**
|
|
272
272
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
|
|
273
|
-
* Description : predicate of the String filter
|
|
273
|
+
* <br/>Description : predicate of the String filter
|
|
274
274
|
*/
|
|
275
275
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
|
|
276
276
|
/**
|
|
277
277
|
* placeholder? : string
|
|
278
|
-
* Description : placeholder of the String filter
|
|
278
|
+
* <br/>Description : placeholder of the String filter
|
|
279
279
|
*/
|
|
280
280
|
placeholder?: string;
|
|
281
281
|
};
|
|
282
282
|
Select: {
|
|
283
283
|
/**
|
|
284
284
|
* type : 'Select'
|
|
285
|
-
* Description : type of the Select filter
|
|
285
|
+
* <br/>Description : type of the Select filter
|
|
286
286
|
*/
|
|
287
287
|
type: 'Select';
|
|
288
288
|
/**
|
|
289
289
|
* defKey : keyof T | ''
|
|
290
|
-
* Description : defKey of the Select filter
|
|
290
|
+
* <br/>Description : defKey of the Select filter
|
|
291
291
|
*/
|
|
292
292
|
defKey: keyof T | '';
|
|
293
293
|
/**
|
|
294
294
|
* values : (string | number)[]
|
|
295
|
-
* Description : values of the Select filter
|
|
295
|
+
* <br/>Description : values of the Select filter
|
|
296
296
|
*/
|
|
297
297
|
values: (string | number)[];
|
|
298
298
|
/**
|
|
299
299
|
* options : (string | number)[]
|
|
300
|
-
* Description : options of the Select filter
|
|
300
|
+
* <br/>Description : options of the Select filter
|
|
301
301
|
*/
|
|
302
302
|
options: (string | number)[];
|
|
303
303
|
/**
|
|
304
304
|
* placeholder : string
|
|
305
|
-
* Description : placeholder of the Select filter
|
|
305
|
+
* <br/>Description : placeholder of the Select filter
|
|
306
306
|
*/
|
|
307
307
|
placeholder?: string;
|
|
308
308
|
/**
|
|
309
309
|
* OptionRenderer? : (option: string | number) => React.ReactNode
|
|
310
|
-
* Description : OptionRenderer of the Select filter
|
|
310
|
+
* <br/>Description : OptionRenderer of the Select filter
|
|
311
311
|
*/
|
|
312
312
|
OptionRenderer?: (option: string | number) => React.ReactNode;
|
|
313
313
|
/**
|
|
314
314
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
|
|
315
|
-
* Description : predicate of the Select filter. if not provided, it will have default predicate.
|
|
315
|
+
* <br/>Description : predicate of the Select filter. if not provided, it will have default predicate.
|
|
316
316
|
*/
|
|
317
317
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
|
|
318
318
|
};
|
|
319
319
|
Date: {
|
|
320
320
|
/**
|
|
321
321
|
* type : 'Date'
|
|
322
|
-
* Description : type of the Date filter
|
|
322
|
+
* <br/>Description : type of the Date filter
|
|
323
323
|
*/
|
|
324
324
|
type: 'Date';
|
|
325
325
|
/**
|
|
326
326
|
* defKey : keyof T | ''
|
|
327
|
-
* Description : defKey of the Date filter
|
|
327
|
+
* <br/>Description : defKey of the Date filter
|
|
328
328
|
*/
|
|
329
329
|
defKey: keyof T;
|
|
330
330
|
/**
|
|
331
331
|
* value : Date
|
|
332
|
-
* Description : value of the Date filter
|
|
332
|
+
* <br/>Description : value of the Date filter
|
|
333
333
|
*/
|
|
334
334
|
value: Date;
|
|
335
335
|
/**
|
|
336
336
|
* minDate? : Date
|
|
337
|
-
* Description : minDate of the Date filter
|
|
337
|
+
* <br/>Description : minDate of the Date filter
|
|
338
338
|
*/
|
|
339
339
|
minDate?: Date;
|
|
340
340
|
/**
|
|
341
341
|
* maxDate? : Date
|
|
342
|
-
* Description : maxDate of the Date filter
|
|
342
|
+
* <br/>Description : maxDate of the Date filter
|
|
343
343
|
*/
|
|
344
344
|
maxDate?: Date;
|
|
345
345
|
/**
|
|
346
346
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
|
|
347
|
-
* Description : predicate of the Date filter. if not provided, it will have default predicate.
|
|
347
|
+
* <br/>Description : predicate of the Date filter. if not provided, it will have default predicate.
|
|
348
348
|
*/
|
|
349
349
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
|
|
350
350
|
};
|
|
351
351
|
DateRange: {
|
|
352
352
|
/**
|
|
353
353
|
* type : 'DateRange'
|
|
354
|
-
* Description : type of the DateRange filter
|
|
354
|
+
* <br/>Description : type of the DateRange filter
|
|
355
355
|
*/
|
|
356
356
|
type: 'DateRange';
|
|
357
357
|
/**
|
|
358
358
|
* defKey : keyof T | ''
|
|
359
|
-
* Description : defKey of the DateRange filter
|
|
359
|
+
* <br/>Description : defKey of the DateRange filter
|
|
360
360
|
*/
|
|
361
361
|
defKey: keyof T | '';
|
|
362
362
|
/**
|
|
363
363
|
* sDate : Date
|
|
364
|
-
* Description : sDate of the DateRange filter
|
|
364
|
+
* <br/>Description : sDate of the DateRange filter
|
|
365
365
|
*/
|
|
366
366
|
sDate: Date;
|
|
367
367
|
/**
|
|
368
368
|
* eDate : Date
|
|
369
|
-
* Description : eDate of the DateRange filter
|
|
369
|
+
* <br/>Description : eDate of the DateRange filter
|
|
370
370
|
*/
|
|
371
371
|
eDate: Date;
|
|
372
372
|
/**
|
|
373
373
|
* minDate? : Date
|
|
374
|
-
* Description : minDate of the DateRange filter
|
|
374
|
+
* <br/>Description : minDate of the DateRange filter
|
|
375
375
|
*/
|
|
376
376
|
minDate?: Date;
|
|
377
377
|
/**
|
|
378
378
|
* maxDate? : Date
|
|
379
|
-
* Description : maxDate of the DateRange filter
|
|
379
|
+
* <br/>Description : maxDate of the DateRange filter
|
|
380
380
|
*/
|
|
381
381
|
maxDate?: Date;
|
|
382
382
|
/**
|
|
383
383
|
* predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
|
|
384
|
-
* Description : predicate of the DateRange filter. if not provided, it will have default predicate.
|
|
384
|
+
* <br/>Description : predicate of the DateRange filter. if not provided, it will have default predicate.
|
|
385
385
|
*/
|
|
386
386
|
predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
|
|
387
387
|
};
|
|
@@ -390,12 +390,12 @@ export type TATableSomeFilter<T extends IItem> = IATableFilter<T>[TATableFilterT
|
|
|
390
390
|
export type TATableFilteration<T extends IItem> = {
|
|
391
391
|
/**
|
|
392
392
|
* type : 'And' | 'Or'
|
|
393
|
-
* Description : type of the filteration
|
|
393
|
+
* <br/>Description : type of the filteration
|
|
394
394
|
*/
|
|
395
395
|
type: 'And' | 'Or';
|
|
396
396
|
/**
|
|
397
397
|
* filters : TATableSomeFilter<T>[]
|
|
398
|
-
* Description : filters of the filteration
|
|
398
|
+
* <br/>Description : filters of the filteration
|
|
399
399
|
*/
|
|
400
400
|
filters: TATableSomeFilter<T>[];
|
|
401
401
|
};
|
|
@@ -403,65 +403,65 @@ export type TATableSortF<T extends IItem> = (a: T, b: T) => number;
|
|
|
403
403
|
export interface IATableSortation<T extends IItem> {
|
|
404
404
|
/**
|
|
405
405
|
* defKey? : keyof T
|
|
406
|
-
* Description : defKey of the sortation
|
|
406
|
+
* <br/>Description : defKey of the sortation
|
|
407
407
|
*/
|
|
408
408
|
defKey?: keyof T;
|
|
409
409
|
/**
|
|
410
410
|
* isAsc? : boolean
|
|
411
|
-
* Description : isAsc of the sortation
|
|
411
|
+
* <br/>Description : isAsc of the sortation
|
|
412
412
|
*/
|
|
413
413
|
isAsc?: boolean;
|
|
414
414
|
/**
|
|
415
415
|
* sortF? : TATableSortF<T>
|
|
416
|
-
* Description : sortF of the sortation
|
|
416
|
+
* <br/>Description : sortF of the sortation
|
|
417
417
|
*/
|
|
418
418
|
sortF?: TATableSortF<T>;
|
|
419
419
|
}
|
|
420
420
|
export interface IATablePagination {
|
|
421
421
|
/**
|
|
422
422
|
* page : number
|
|
423
|
-
* Description : page of the pagination
|
|
423
|
+
* <br/>Description : page of the pagination
|
|
424
424
|
*/
|
|
425
425
|
page: number;
|
|
426
426
|
/**
|
|
427
427
|
* pageSize : number
|
|
428
|
-
* Description : pageSize of the pagination
|
|
428
|
+
* <br/>Description : pageSize of the pagination
|
|
429
429
|
*/
|
|
430
430
|
pageSize: number;
|
|
431
431
|
/**
|
|
432
432
|
* pageRange : number
|
|
433
|
-
* Description : pageRange of the pagination
|
|
433
|
+
* <br/>Description : pageRange of the pagination
|
|
434
434
|
*/
|
|
435
435
|
pageRange: number;
|
|
436
436
|
}
|
|
437
437
|
export interface IATableState<T extends IItem> {
|
|
438
438
|
/**
|
|
439
439
|
* entireItems? : T[]
|
|
440
|
-
* Description : entireItems of the state
|
|
440
|
+
* <br/>Description : entireItems of the state
|
|
441
441
|
*/
|
|
442
442
|
entireItems?: T[];
|
|
443
443
|
/**
|
|
444
444
|
* filteration : TATableFilteration<T>
|
|
445
|
-
* Description : filteration of the state
|
|
445
|
+
* <br/>Description : filteration of the state
|
|
446
446
|
*/
|
|
447
447
|
filteration: TATableFilteration<T>;
|
|
448
448
|
/**
|
|
449
449
|
* pagination : IATablePagination
|
|
450
|
-
* Description : pagination of the state
|
|
450
|
+
* <br/>Description : pagination of the state
|
|
451
451
|
*/
|
|
452
452
|
pagination: IATablePagination;
|
|
453
453
|
/**
|
|
454
454
|
* sortation : IATableSortation<T>
|
|
455
|
-
* Description : sortation of the state
|
|
455
|
+
* <br/>Description : sortation of the state
|
|
456
456
|
*/
|
|
457
457
|
sortation: IATableSortation<T>;
|
|
458
458
|
}
|
|
459
459
|
export interface IATableProps<T extends IItem> {
|
|
460
460
|
/**
|
|
461
461
|
* defs : TATableDefs<T>
|
|
462
|
-
* Description : defs of ATable
|
|
463
|
-
* Basic Usage :
|
|
464
|
-
* (1)
|
|
462
|
+
* <br/>Description : defs of ATable
|
|
463
|
+
* <br/>Basic Usage :
|
|
464
|
+
* <br/>(1)const entireItems = [{name: 'John', age: 20}, {name: 'Jane', age: 21}];
|
|
465
465
|
* const defs = {
|
|
466
466
|
* 'name': {content: ({item}) => item.name},
|
|
467
467
|
* 'age': {content: ({item}) => item.age},
|
|
@@ -471,79 +471,79 @@ export interface IATableProps<T extends IItem> {
|
|
|
471
471
|
defs: TATableDefs<T>;
|
|
472
472
|
/**
|
|
473
473
|
* defaultDef? : IATableDef<T>
|
|
474
|
-
* Description : defaultDef of ATable
|
|
475
|
-
* Basic Usage :
|
|
476
|
-
* (1)
|
|
474
|
+
* <br/>Description : defaultDef of ATable
|
|
475
|
+
* <br/>Basic Usage :
|
|
476
|
+
* <br/>(1)const defaultDef = {content: ({item}) => item.name};
|
|
477
477
|
* <ATable defs={defs} defaultDef={defaultDef}/>
|
|
478
478
|
*/
|
|
479
479
|
defaultDef?: IATableDef<T>;
|
|
480
480
|
/**
|
|
481
481
|
* rProps? : TCanCallback<IATableTRProps<T>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>
|
|
482
|
-
* Description : rProps of ATable
|
|
483
|
-
* Basic Usage :
|
|
484
|
-
* (1)
|
|
482
|
+
* <br/>Description : rProps of ATable
|
|
483
|
+
* <br/>Basic Usage :
|
|
484
|
+
* <br/>(1)const rProps = ({item}) => ({backgroundColor : 'pink'});
|
|
485
485
|
* <ATable defs={defs} rProps={rProps}/>
|
|
486
486
|
*/
|
|
487
487
|
rProps?: TCanCallback<IATableTRProps<T>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
|
|
488
488
|
/**
|
|
489
489
|
* useSelect? : TUseValues<T>
|
|
490
|
-
* Description : useSelect of ATable.
|
|
491
|
-
* Basic Usage :
|
|
492
|
-
* (1)
|
|
490
|
+
* <br/>Description : useSelect of ATable.
|
|
491
|
+
* <br/>Basic Usage :
|
|
492
|
+
* <br/>(1)const [selectedItems, setSelectedItems] = useState<T[]>([]);
|
|
493
493
|
* <ATable defs={defs} entireItems={entireItems} useSelect={[selectedItems, setSelectedItems]}/>
|
|
494
494
|
*/
|
|
495
495
|
useSelect?: TUseValues<T[]>;
|
|
496
496
|
/**
|
|
497
497
|
* isSelectMulti? : boolean
|
|
498
|
-
* Description : isSelectMulti of ATable. if true, multiple items can be selected.
|
|
498
|
+
* <br/>Description : isSelectMulti of ATable. if true, multiple items can be selected.
|
|
499
499
|
*/
|
|
500
500
|
isSelectMulti?: boolean;
|
|
501
501
|
/**
|
|
502
502
|
* selectDisabled? : (item: T) => string | boolean | undefined
|
|
503
|
-
* Description : selectDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
|
503
|
+
* <br/>Description : selectDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
|
504
504
|
*/
|
|
505
505
|
selectDisabled?: (item: T) => string | boolean | undefined;
|
|
506
506
|
/**
|
|
507
507
|
* useCheck? : TUseValues<T[]>
|
|
508
|
-
* Description : useCheck of ATable
|
|
509
|
-
* Basic Usage :
|
|
510
|
-
* (1)
|
|
508
|
+
* <br/>Description : useCheck of ATable
|
|
509
|
+
* <br/>Basic Usage :
|
|
510
|
+
* <br/>(1)const [checkedItems, setCheckedItems] = useState<T[]>([]);
|
|
511
511
|
* <ATable defs={defs} entireItems={entireItems} useCheck={[checkedItems, setCheckedItems]}/>
|
|
512
512
|
*/
|
|
513
513
|
useCheck?: TUseValues<T[]>;
|
|
514
514
|
/**
|
|
515
515
|
* checkDisabled? : (item: T) => string | boolean | undefined
|
|
516
|
-
* Description : checkDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
|
516
|
+
* <br/>Description : checkDisabled of ATable. if string is returned, it will be displayed as tooltip.
|
|
517
517
|
*/
|
|
518
518
|
checkDisabled?: (item: T) => string | boolean | undefined;
|
|
519
519
|
/**
|
|
520
520
|
* isLoading? : boolean
|
|
521
|
-
* Description : decides whether the table is loading or not
|
|
521
|
+
* <br/>Description : decides whether the table is loading or not
|
|
522
522
|
*/
|
|
523
523
|
isLoading?: boolean;
|
|
524
524
|
/**
|
|
525
525
|
* isDisabled? : boolean
|
|
526
|
-
* Description : decides whether the table is disabled or not
|
|
526
|
+
* <br/>Description : decides whether the table is disabled or not
|
|
527
527
|
*/
|
|
528
528
|
isDisabled?: boolean;
|
|
529
529
|
/**
|
|
530
530
|
* title? : React.ReactNode
|
|
531
|
-
* Description : title of ATable
|
|
531
|
+
* <br/>Description : title of ATable
|
|
532
532
|
*/
|
|
533
533
|
title?: React.ReactNode;
|
|
534
534
|
/**
|
|
535
535
|
* entireItems? : T[]
|
|
536
|
-
* Description : entireItems of ATable. entireItems will be affected by filteration, sortation, and pagination.
|
|
537
|
-
* Basic Usage :
|
|
538
|
-
* (1)
|
|
536
|
+
* <br/>Description : entireItems of ATable. entireItems will be affected by filteration, sortation, and pagination.
|
|
537
|
+
* <br/>Basic Usage :
|
|
538
|
+
* <br/>(1)const entireItems = [{name: 'John', age: 20}, {name: 'Jane', age: 21}];
|
|
539
539
|
* <ATable defs={defs} entireItems={entireItems}/> *
|
|
540
540
|
*/
|
|
541
541
|
entireItems?: T[];
|
|
542
542
|
/**
|
|
543
543
|
* onStateChange? : (params: IATableState<T>) => void
|
|
544
|
-
* Description : onStateChange of ATable. will be called when filteration, sortation, and pagination changes.
|
|
545
|
-
* Basic Usage :
|
|
546
|
-
* (1)
|
|
544
|
+
* <br/>Description : onStateChange of ATable. will be called when filteration, sortation, and pagination changes.
|
|
545
|
+
* <br/>Basic Usage :
|
|
546
|
+
* <br/>(1)const [pagedItems, setPagedItems] = useState<T[]>([]);
|
|
547
547
|
* const [totalCount, setTotalCount] = useState<number>(0);
|
|
548
548
|
* const onStateChange = ({entireItems, filteration, pagination, sortation}) => {
|
|
549
549
|
* const {items, totalCount} = apiCall(entireItems, filteration, pagination, sortation);
|
|
@@ -555,83 +555,83 @@ export interface IATableProps<T extends IItem> {
|
|
|
555
555
|
onStateChange?: (params: IATableState<T>) => void;
|
|
556
556
|
/**
|
|
557
557
|
* pagedItems? : T[]
|
|
558
|
-
* Description : pagedItems of ATable. if provided, entireItems will be ignored. pagedItems will not be affected by filteration, sortation, and pagination.
|
|
559
|
-
* Basic Usage :
|
|
560
|
-
* (1)
|
|
558
|
+
* <br/>Description : pagedItems of ATable. if provided, entireItems will be ignored. pagedItems will not be affected by filteration, sortation, and pagination.
|
|
559
|
+
* <br/>Basic Usage :
|
|
560
|
+
* <br/>(1)const pagedItems = [{name: 'John', age: 20}, {name: 'Jane', age: 21}];
|
|
561
561
|
* <ATable defs={defs} pagedItems={pagedItems}/>
|
|
562
562
|
*/
|
|
563
563
|
pagedItems?: T[];
|
|
564
564
|
/**
|
|
565
565
|
* totalCount? : number
|
|
566
|
-
* Description : totalCount of ATable. if provided, pagination will be affected.
|
|
566
|
+
* <br/>Description : totalCount of ATable. if provided, pagination will be affected.
|
|
567
567
|
*/
|
|
568
568
|
totalCount?: number;
|
|
569
569
|
/**
|
|
570
570
|
* filterationDefs? : TATableFilterationDefs<T>
|
|
571
|
-
* Description : filterationDefs of ATable
|
|
572
|
-
* Basic Usage :
|
|
573
|
-
* (1)
|
|
571
|
+
* <br/>Description : filterationDefs of ATable
|
|
572
|
+
* <br/>Basic Usage :
|
|
573
|
+
* <br/>(1)const filterationDefs = {type: 'Or', defs: [{type: 'String', placeholder: 'Search'}]};
|
|
574
574
|
* <ATable defs={defs} entireItems={entireItems} filterationDefs={filterationDefs}/>
|
|
575
575
|
*/
|
|
576
576
|
filterationDefs?: TATableFilterationDefs<T>;
|
|
577
577
|
/**
|
|
578
578
|
* useFilteration? : TUseValues<TATableFilteration<T>>
|
|
579
|
-
* Description : useFilteration of ATable. filteration can be controlled by useFilteration.
|
|
580
|
-
* Basic Usage :
|
|
581
|
-
* (1)
|
|
579
|
+
* <br/>Description : useFilteration of ATable. filteration can be controlled by useFilteration.
|
|
580
|
+
* <br/>Basic Usage :
|
|
581
|
+
* <br/>(1)const [filteration, setFilteration] = useState<TATableFilteration<T>>({type: 'Or', filters: []});
|
|
582
582
|
* <ATable defs={defs} entireItems={entireItems} useFilteration={[filteration, setFilteration]}/>
|
|
583
583
|
*/
|
|
584
584
|
useFilteration?: TUseValues<TATableFilteration<T>>;
|
|
585
585
|
/**
|
|
586
586
|
* toggleFilterationDefs? : TATableFilterationDefs<T>
|
|
587
|
-
* Description : toggleFilterationDefs of ATable. table can have two filterations. one is main filteration, and the other is toggle filteration.
|
|
588
|
-
* Basic Usage :
|
|
589
|
-
* (1)
|
|
587
|
+
* <br/>Description : toggleFilterationDefs of ATable. table can have two filterations. one is main filteration, and the other is toggle filteration.
|
|
588
|
+
* <br/>Basic Usage :
|
|
589
|
+
* <br/>(1)const toggleFilterationDefs = {type: 'Or', defs: [{type: 'String', placeholder: 'Search'}]};
|
|
590
590
|
* <ATable defs={defs} entireItems={entireItems} toggleFilterationDefs={toggleFilterationDefs}/>
|
|
591
591
|
*/
|
|
592
592
|
toggleFilterationDefs?: TATableFilterationDefs<T>;
|
|
593
593
|
/**
|
|
594
594
|
* useToggleFilteration? : TUseValues<TATableFilteration<T>>
|
|
595
|
-
* Description : useToggleFilteration of ATable. toggleFilteration can be controlled by useToggleFilteration.
|
|
596
|
-
* Basic Usage :
|
|
597
|
-
* (1)
|
|
595
|
+
* <br/>Description : useToggleFilteration of ATable. toggleFilteration can be controlled by useToggleFilteration.
|
|
596
|
+
* <br/>Basic Usage :
|
|
597
|
+
* <br/>(1)const [toggleFilteration, setToggleFilteration] = useState<TATableFilteration<T>>({type: 'Or', filters: []});
|
|
598
598
|
* <ATable defs={defs} entireItems={entireItems} useToggleFilteration={[toggleFilteration, setToggleFilteration]}/>
|
|
599
599
|
*/
|
|
600
600
|
useToggleFilteration?: TUseValues<TATableFilteration<T>>;
|
|
601
601
|
/**
|
|
602
602
|
* usePagination? : TUseValues<IATablePagination>
|
|
603
|
-
* Description : usePagination of ATable. pagination can be controlled by usePagination.
|
|
604
|
-
* Basic Usage :
|
|
605
|
-
* (1)
|
|
603
|
+
* <br/>Description : usePagination of ATable. pagination can be controlled by usePagination.
|
|
604
|
+
* <br/>Basic Usage :
|
|
605
|
+
* <br/>(1)const [pagination, setPagination] = useState<IATablePagination>({page: 1, pageSize: 50, pageRange: 10});
|
|
606
606
|
* <ATable defs={defs} entireItems={entireItems} usePagination={[pagination, setPagination]}/>
|
|
607
607
|
*/
|
|
608
608
|
usePagination?: TUseValues<IATablePagination>;
|
|
609
609
|
/**
|
|
610
610
|
* useSortation? : TUseValues<IATableSortation<T>>
|
|
611
|
-
* Description : useSortation of ATable. sortation can be controlled by useSortation.
|
|
612
|
-
* Basic Usage :
|
|
613
|
-
* (1)
|
|
611
|
+
* <br/>Description : useSortation of ATable. sortation can be controlled by useSortation.
|
|
612
|
+
* <br/>Basic Usage :
|
|
613
|
+
* <br/>(1)const [sortation, setSortation] = useState<IATableSortation<T>>({defKey: 'name', isAsc: true});
|
|
614
614
|
* <ATable defs={defs} entireItems={entireItems} useSortation={[sortation, setSortation]}/>
|
|
615
615
|
*/
|
|
616
616
|
useSortation?: TUseValues<IATableSortation<T>>;
|
|
617
617
|
/**
|
|
618
618
|
* TopRightAddon? : React.ReactNode
|
|
619
|
-
* Description : TopRightAddon of ATable
|
|
620
|
-
* Basic Usage :
|
|
621
|
-
* (1)
|
|
619
|
+
* <br/>Description : TopRightAddon of ATable
|
|
620
|
+
* <br/>Basic Usage :
|
|
621
|
+
* <br/>(1)<ATable defs={defs} entireItems={entireItems} TopRightAddon={<AButton>Click</AButton>}/>
|
|
622
622
|
*/
|
|
623
623
|
TopRightAddon?: React.ReactNode;
|
|
624
624
|
/**
|
|
625
625
|
* resources? : Partial<typeof Resources.ATable>
|
|
626
|
-
* Description : resources of ATable
|
|
626
|
+
* <br/>Description : resources of ATable
|
|
627
627
|
*/
|
|
628
628
|
resources?: Partial<typeof Resources.ATable>;
|
|
629
629
|
}
|
|
630
630
|
/**
|
|
631
631
|
* AComponent : ATable
|
|
632
|
-
* Description : ATable is a table component. it can have defs and items to display the table. and has select, check, filteration, sortation, pagination options available.
|
|
633
|
-
* Basic Usage :
|
|
634
|
-
* (1)
|
|
632
|
+
* <br/>Description : ATable is a table component. it can have defs and items to display the table. and has select, check, filteration, sortation, pagination options available.
|
|
633
|
+
* <br/>Basic Usage :
|
|
634
|
+
* <br/>(1)const entireItems = [{name: 'John', age: 20}, {name: 'Jane', age: 21}];
|
|
635
635
|
* const defs = {
|
|
636
636
|
* 'name': {content: ({item}) => item.name},
|
|
637
637
|
* 'age': {content: ({item}) => item.age},
|
|
@@ -642,7 +642,7 @@ export interface IATableProps<T extends IItem> {
|
|
|
642
642
|
* }
|
|
643
643
|
* <ATable defs={defs} entireItems={entireItems} defaultDef={defaultDefs}/>
|
|
644
644
|
*
|
|
645
|
-
* (2)
|
|
645
|
+
* <br/>(2)const [pagedItems, setPagedItems] = useState<T[]>([{name: 'John', age: 20}, {name: 'Jane', age: 21}]);
|
|
646
646
|
* const [totalCount, setTotalCount] = useState<number>(2);
|
|
647
647
|
* const defs = {
|
|
648
648
|
* 'name': {content: ({item}) => item.name},
|
|
@@ -655,7 +655,7 @@ export interface IATableProps<T extends IItem> {
|
|
|
655
655
|
* }
|
|
656
656
|
* <ATable defs={defs} pagedItems={pagedItems} totalCount={totalCount} onStateChange={onStateChange}/>
|
|
657
657
|
*
|
|
658
|
-
* (3)
|
|
658
|
+
* <br/>(3)const [entireItems, setEntireItems] = useState<T[]>([{name: 'John', age: 20}, {name: 'Jane', age: 21}]);
|
|
659
659
|
* const [selectedItems, setSelectedItems] = useState<T[]>([]);
|
|
660
660
|
* const [checkedItems, setCheckedItems] = useState<T[]>([]);
|
|
661
661
|
* const selectDisabled = (item) => item.name === 'John' ? 'John is disabled' : false;
|
|
@@ -670,7 +670,7 @@ export interface IATableProps<T extends IItem> {
|
|
|
670
670
|
* selectDisabled={selectDisabled}
|
|
671
671
|
* checkDisabled={checkDisabled}/>
|
|
672
672
|
*
|
|
673
|
-
* (4)
|
|
673
|
+
* <br/>(4)const [entireItems, setEntireItems] = useState<T[]>([{name: 'John', age: 20}, {name: 'Jane', age: 21}]);
|
|
674
674
|
* const filterationDefs = {type: 'Or', defs: [{type: 'String', placeholder: 'Search'}]};
|
|
675
675
|
* const defaultPagination = {page: 1, pageSize: 50, pageRange: 10};
|
|
676
676
|
* const defs = {
|