ados-rcm 1.0.64 → 1.0.66

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.
@@ -128,135 +128,139 @@ export type TATableDefs<T extends IItem> = {
128
128
  [key: TIdx]: IATableDef<T>;
129
129
  };
130
130
  export type TATableFilterType = 'String' | 'Select' | 'Date' | 'DateRange';
131
+ export interface IATableFilterStringDef<T extends IItem> {
132
+ /**
133
+ * type : 'String'
134
+ *
135
+ * Description : type of the String filter Def
136
+ */
137
+ type: 'String';
138
+ /**
139
+ * defKey? : keyof T | ''
140
+ *
141
+ * Description : defKey of the String filter Def
142
+ */
143
+ defKey?: keyof T | '';
144
+ /**
145
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
146
+ *
147
+ * Description : predicate of the String filter Def. if not provided, it will have default predicate.
148
+ */
149
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
150
+ /**
151
+ * placeholder? : string
152
+ *
153
+ * Description : placeholder of the String filter Def
154
+ */
155
+ placeholder?: string;
156
+ }
157
+ export interface IATableFilterSelectDef<T extends IItem, K> {
158
+ /**
159
+ * type : 'Select'
160
+ *
161
+ * Description : type of the Select filter Def
162
+ */
163
+ type: 'Select';
164
+ /**
165
+ * defKey? : keyof T | ''
166
+ *
167
+ * Description : defKey of the Select filter Def
168
+ */
169
+ defKey?: keyof T | '';
170
+ /**
171
+ * options : K[]
172
+ *
173
+ * Description : options of the Select filter Def
174
+ */
175
+ options: K[];
176
+ /**
177
+ * placeholder : string
178
+ *
179
+ * Description : values of the Select filter Def
180
+ */
181
+ placeholder?: string;
182
+ /**
183
+ * OptionRenderer? : (option: string | number) => React.ReactNode
184
+ *
185
+ * Description : OptionRenderer of the Select filter Def
186
+ */
187
+ OptionRenderer?: (option: K) => React.ReactNode;
188
+ /**
189
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
190
+ *
191
+ * Description : predicate of the Select filter Def. if not provided, it will have default predicate.
192
+ */
193
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
194
+ }
195
+ export interface IATableFilterDateDef<T extends IItem> {
196
+ /**
197
+ * type : 'Date'
198
+ *
199
+ * Description : type of the Date filter Def
200
+ */
201
+ type: 'Date';
202
+ /**
203
+ * defKey? : keyof T | ''
204
+ *
205
+ * Description : defKey of the Date filter Def
206
+ */
207
+ defKey?: keyof T | '';
208
+ /**
209
+ * minDate? : Date
210
+ *
211
+ * Description : minDate of the Date filter Def
212
+ */
213
+ minDate?: Date;
214
+ /**
215
+ * maxDate? : Date
216
+ *
217
+ * Description : maxDate of the Date filter Def
218
+ */
219
+ maxDate?: Date;
220
+ /**
221
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
222
+ *
223
+ * Description : predicate of the Date filter Def. if not provided, it will have default predicate.
224
+ */
225
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
226
+ }
227
+ export interface IATableFilterDateRangeDef<T extends IItem> {
228
+ /**
229
+ * type : 'DateRange'
230
+ *
231
+ * Description : type of the DateRange filter Def
232
+ */
233
+ type: 'DateRange';
234
+ /**
235
+ * defKey? : keyof T | ''
236
+ *
237
+ * Description : defKey of the DateRange filter Def
238
+ */
239
+ defKey?: keyof T | '';
240
+ /**
241
+ * minDate? : Date
242
+ *
243
+ * Description : minDate of the DateRange filter Def
244
+ */
245
+ minDate?: Date;
246
+ /**
247
+ * maxDate? : Date
248
+ *
249
+ * Description : maxDate of the DateRange filter Def
250
+ */
251
+ maxDate?: Date;
252
+ /**
253
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
254
+ *
255
+ * Description : predicate of the DateRange filter Def. if not provided, it will have default predicate.
256
+ */
257
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
258
+ }
131
259
  export interface IATableFilterDef<T extends IItem> {
132
- String: {
133
- /**
134
- * type : 'String'
135
- *
136
- * Description : type of the String filter Def
137
- */
138
- type: 'String';
139
- /**
140
- * defKey? : keyof T | ''
141
- *
142
- * Description : defKey of the String filter Def
143
- */
144
- defKey?: keyof T | '';
145
- /**
146
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
147
- *
148
- * Description : predicate of the String filter Def. if not provided, it will have default predicate.
149
- */
150
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
151
- /**
152
- * placeholder? : string
153
- *
154
- * Description : placeholder of the String filter Def
155
- */
156
- placeholder?: string;
157
- };
158
- Select: {
159
- /**
160
- * type : 'Select'
161
- *
162
- * Description : type of the Select filter Def
163
- */
164
- type: 'Select';
165
- /**
166
- * defKey? : keyof T | ''
167
- *
168
- * Description : defKey of the Select filter Def
169
- */
170
- defKey?: keyof T | '';
171
- /**
172
- * options : (string | number)[]
173
- *
174
- * Description : options of the Select filter Def
175
- */
176
- options: (string | number)[];
177
- /**
178
- * placeholder : (string | number)[]
179
- *
180
- * Description : values of the Select filter Def
181
- */
182
- placeholder?: string;
183
- /**
184
- * OptionRenderer? : (option: string | number) => React.ReactNode
185
- *
186
- * Description : OptionRenderer of the Select filter Def
187
- */
188
- OptionRenderer?: (option: string | number) => React.ReactNode;
189
- /**
190
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
191
- *
192
- * Description : predicate of the Select filter Def. if not provided, it will have default predicate.
193
- */
194
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
195
- };
196
- Date: {
197
- /**
198
- * type : 'Date'
199
- *
200
- * Description : type of the Date filter Def
201
- */
202
- type: 'Date';
203
- /**
204
- * defKey? : keyof T | ''
205
- *
206
- * Description : defKey of the Date filter Def
207
- */
208
- defKey?: keyof T | '';
209
- /**
210
- * minDate? : Date
211
- *
212
- * Description : minDate of the Date filter Def
213
- */
214
- minDate?: Date;
215
- /**
216
- * maxDate? : Date
217
- *
218
- * Description : maxDate of the Date filter Def
219
- */
220
- maxDate?: Date;
221
- /**
222
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
223
- *
224
- * Description : predicate of the Date filter Def. if not provided, it will have default predicate.
225
- */
226
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
227
- };
228
- DateRange: {
229
- /**
230
- * type : 'DateRange'
231
- *
232
- * Description : type of the DateRange filter Def
233
- */
234
- type: 'DateRange';
235
- /**
236
- * defKey? : keyof T | ''
237
- *
238
- * Description : defKey of the DateRange filter Def
239
- */
240
- defKey?: keyof T | '';
241
- /**
242
- * minDate? : Date
243
- *
244
- * Description : minDate of the DateRange filter Def
245
- */
246
- minDate?: Date;
247
- /**
248
- * maxDate? : Date
249
- *
250
- * Description : maxDate of the DateRange filter Def
251
- */
252
- maxDate?: Date;
253
- /**
254
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
255
- *
256
- * Description : predicate of the DateRange filter Def. if not provided, it will have default predicate.
257
- */
258
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
259
- };
260
+ String: IATableFilterStringDef<T>;
261
+ Select: IATableFilterSelectDef<T, string> | IATableFilterSelectDef<T, number>;
262
+ Date: IATableFilterDateDef<T>;
263
+ DateRange: IATableFilterDateRangeDef<T>;
260
264
  }
261
265
  export type TATableSomeFilterDef<T extends IItem> = IATableFilterDef<T>[TATableFilterType];
262
266
  export type TATableFilterationDefs<T extends IItem> = {
@@ -273,165 +277,169 @@ export type TATableFilterationDefs<T extends IItem> = {
273
277
  */
274
278
  defs: TATableSomeFilterDef<T>[];
275
279
  };
280
+ export interface IATableFilterString<T extends IItem> {
281
+ /**
282
+ * type : 'String'
283
+ *
284
+ * Description : type of the String filter
285
+ */
286
+ type: 'String';
287
+ /**
288
+ * defKey? : keyof T | ''
289
+ *
290
+ * Description : defKey of the String filter
291
+ */
292
+ defKey: keyof T | '';
293
+ /**
294
+ * value : string
295
+ *
296
+ * Description : value of the String filter
297
+ */
298
+ value: string;
299
+ /**
300
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
301
+ *
302
+ * Description : predicate of the String filter
303
+ */
304
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
305
+ /**
306
+ * placeholder? : string
307
+ *
308
+ * Description : placeholder of the String filter
309
+ */
310
+ placeholder?: string;
311
+ }
312
+ export interface IATableFilterSelect<T extends IItem, K> {
313
+ /**
314
+ * type : 'Select'
315
+ *
316
+ * Description : type of the Select filter
317
+ */
318
+ type: 'Select';
319
+ /**
320
+ * defKey : keyof T | ''
321
+ *
322
+ * Description : defKey of the Select filter
323
+ */
324
+ defKey: keyof T | '';
325
+ /**
326
+ * value : K | null
327
+ *
328
+ * Description : values of the Select filter
329
+ */
330
+ value: K | null;
331
+ /**
332
+ * options : K[]
333
+ *
334
+ * Description : options of the Select filter
335
+ */
336
+ options: K[];
337
+ /**
338
+ * placeholder : string
339
+ *
340
+ * Description : placeholder of the Select filter
341
+ */
342
+ placeholder?: string;
343
+ /**
344
+ * OptionRenderer? : (option: string | number) => React.ReactNode
345
+ *
346
+ * Description : OptionRenderer of the Select filter
347
+ */
348
+ OptionRenderer?: (option: string | number) => React.ReactNode;
349
+ /**
350
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
351
+ *
352
+ * Description : predicate of the Select filter. if not provided, it will have default predicate.
353
+ */
354
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
355
+ }
356
+ export interface IATableFilterDate<T extends IItem> {
357
+ /**
358
+ * type : 'Date'
359
+ *
360
+ * Description : type of the Date filter
361
+ */
362
+ type: 'Date';
363
+ /**
364
+ * defKey : keyof T | ''
365
+ *
366
+ * Description : defKey of the Date filter
367
+ */
368
+ defKey: keyof T;
369
+ /**
370
+ * value : Date
371
+ *
372
+ * Description : value of the Date filter
373
+ */
374
+ value: Date;
375
+ /**
376
+ * minDate? : Date
377
+ *
378
+ * Description : minDate of the Date filter
379
+ */
380
+ minDate?: Date;
381
+ /**
382
+ * maxDate? : Date
383
+ *
384
+ * Description : maxDate of the Date filter
385
+ */
386
+ maxDate?: Date;
387
+ /**
388
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
389
+ *
390
+ * Description : predicate of the Date filter. if not provided, it will have default predicate.
391
+ */
392
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
393
+ }
394
+ export interface IATableFilterDateRange<T extends IItem> {
395
+ /**
396
+ * type : 'DateRange'
397
+ *
398
+ * Description : type of the DateRange filter
399
+ */
400
+ type: 'DateRange';
401
+ /**
402
+ * defKey : keyof T | ''
403
+ *
404
+ * Description : defKey of the DateRange filter
405
+ */
406
+ defKey: keyof T | '';
407
+ /**
408
+ * sDate : Date
409
+ *
410
+ * Description : sDate of the DateRange filter
411
+ */
412
+ sDate: Date;
413
+ /**
414
+ * eDate : Date
415
+ *
416
+ * Description : eDate of the DateRange filter
417
+ */
418
+ eDate: Date;
419
+ /**
420
+ * minDate? : Date
421
+ *
422
+ * Description : minDate of the DateRange filter
423
+ */
424
+ minDate?: Date;
425
+ /**
426
+ * maxDate? : Date
427
+ *
428
+ * Description : maxDate of the DateRange filter
429
+ */
430
+ maxDate?: Date;
431
+ /**
432
+ * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
433
+ *
434
+ * Description : predicate of the DateRange filter. if not provided, it will have default predicate.
435
+ */
436
+ predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
437
+ }
276
438
  export interface IATableFilter<T extends IItem> {
277
- String: {
278
- /**
279
- * type : 'String'
280
- *
281
- * Description : type of the String filter
282
- */
283
- type: 'String';
284
- /**
285
- * defKey? : keyof T | ''
286
- *
287
- * Description : defKey of the String filter
288
- */
289
- defKey: keyof T | '';
290
- /**
291
- * value : string
292
- *
293
- * Description : value of the String filter
294
- */
295
- value: string;
296
- /**
297
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
298
- *
299
- * Description : predicate of the String filter
300
- */
301
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
302
- /**
303
- * placeholder? : string
304
- *
305
- * Description : placeholder of the String filter
306
- */
307
- placeholder?: string;
308
- };
309
- Select: {
310
- /**
311
- * type : 'Select'
312
- *
313
- * Description : type of the Select filter
314
- */
315
- type: 'Select';
316
- /**
317
- * defKey : keyof T | ''
318
- *
319
- * Description : defKey of the Select filter
320
- */
321
- defKey: keyof T | '';
322
- /**
323
- * values : (string | number)[]
324
- *
325
- * Description : values of the Select filter
326
- */
327
- values: (string | number)[];
328
- /**
329
- * options : (string | number)[]
330
- *
331
- * Description : options of the Select filter
332
- */
333
- options: (string | number)[];
334
- /**
335
- * placeholder : string
336
- *
337
- * Description : placeholder of the Select filter
338
- */
339
- placeholder?: string;
340
- /**
341
- * OptionRenderer? : (option: string | number) => React.ReactNode
342
- *
343
- * Description : OptionRenderer of the Select filter
344
- */
345
- OptionRenderer?: (option: string | number) => React.ReactNode;
346
- /**
347
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
348
- *
349
- * Description : predicate of the Select filter. if not provided, it will have default predicate.
350
- */
351
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
352
- };
353
- Date: {
354
- /**
355
- * type : 'Date'
356
- *
357
- * Description : type of the Date filter
358
- */
359
- type: 'Date';
360
- /**
361
- * defKey : keyof T | ''
362
- *
363
- * Description : defKey of the Date filter
364
- */
365
- defKey: keyof T;
366
- /**
367
- * value : Date
368
- *
369
- * Description : value of the Date filter
370
- */
371
- value: Date;
372
- /**
373
- * minDate? : Date
374
- *
375
- * Description : minDate of the Date filter
376
- */
377
- minDate?: Date;
378
- /**
379
- * maxDate? : Date
380
- *
381
- * Description : maxDate of the Date filter
382
- */
383
- maxDate?: Date;
384
- /**
385
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
386
- *
387
- * Description : predicate of the Date filter. if not provided, it will have default predicate.
388
- */
389
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
390
- };
391
- DateRange: {
392
- /**
393
- * type : 'DateRange'
394
- *
395
- * Description : type of the DateRange filter
396
- */
397
- type: 'DateRange';
398
- /**
399
- * defKey : keyof T | ''
400
- *
401
- * Description : defKey of the DateRange filter
402
- */
403
- defKey: keyof T | '';
404
- /**
405
- * sDate : Date
406
- *
407
- * Description : sDate of the DateRange filter
408
- */
409
- sDate: Date;
410
- /**
411
- * eDate : Date
412
- *
413
- * Description : eDate of the DateRange filter
414
- */
415
- eDate: Date;
416
- /**
417
- * minDate? : Date
418
- *
419
- * Description : minDate of the DateRange filter
420
- */
421
- minDate?: Date;
422
- /**
423
- * maxDate? : Date
424
- *
425
- * Description : maxDate of the DateRange filter
426
- */
427
- maxDate?: Date;
428
- /**
429
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
430
- *
431
- * Description : predicate of the DateRange filter. if not provided, it will have default predicate.
432
- */
433
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
434
- };
439
+ String: IATableFilterString<T>;
440
+ Select: IATableFilterSelect<T, string> | IATableFilterSelect<T, number>;
441
+ Date: IATableFilterDate<T>;
442
+ DateRange: IATableFilterDateRange<T>;
435
443
  }
436
444
  export type TATableSomeFilter<T extends IItem> = IATableFilter<T>[TATableFilterType];
437
445
  export type TATableFilteration<T extends IItem> = {