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