ados-rcm 1.0.10 → 1.0.12

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