ados-rcm 1.1.457 → 1.1.458

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