ados-rcm 1.0.328 → 1.0.330

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.
@@ -5,6 +5,7 @@ import { IItem } from '../../AUtils/objF';
5
5
  import { IABaseProps } from '../ABase/ABase';
6
6
  import { Resources } from '../AResource/AResource';
7
7
  import { TActionRef, TIdx, TPromisable } from '../ATypes/ATypes';
8
+ import { IDateRange } from '../ADatePicker/ADateRangePicker';
8
9
  export interface IATableTHProps<T extends IItem> {
9
10
  /**
10
11
  * defKey : TIdx
@@ -37,11 +38,17 @@ export interface IATableDef<T extends IItem> {
37
38
  */
38
39
  width?: number;
39
40
  /**
40
- * resizeType? : 'fixed' | 'noShrink' | 'noExpand' | 'flex'
41
+ * minWidth? : number = 25
41
42
  *
42
- * Description : decides the column width resize behavior
43
+ * Description : minWidth of the column
43
44
  */
44
- resizeType?: 'fixed' | 'noShrink' | 'noExpand' | 'flex';
45
+ minWidth?: number;
46
+ /**
47
+ * maxWidth? : number
48
+ *
49
+ * Description : maxWidth of the column
50
+ */
51
+ maxWidth?: number;
45
52
  /**
46
53
  * align? : TCanCallback<IATableTHProps<T>, React.CSSProperties['justifyContent']>
47
54
  *
@@ -111,12 +118,6 @@ export interface IATableFilter<T extends IItem> {
111
118
  * Description : type of the String filter
112
119
  */
113
120
  type: 'String';
114
- /**
115
- * defKey? : keyof T | ''
116
- *
117
- * Description : defKey of the String filter
118
- */
119
- defKey: keyof T | '';
120
121
  /**
121
122
  * value : string = ''
122
123
  *
@@ -124,11 +125,11 @@ export interface IATableFilter<T extends IItem> {
124
125
  */
125
126
  value?: string;
126
127
  /**
127
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any
128
+ * predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['String']) => any
128
129
  *
129
130
  * Description : predicate of the String filter
130
131
  */
131
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['String']) => any;
132
+ predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['String']) => any;
132
133
  /**
133
134
  * placeholder? : string
134
135
  *
@@ -149,12 +150,6 @@ export interface IATableFilter<T extends IItem> {
149
150
  * Description : type of the Select filter
150
151
  */
151
152
  type: 'Select';
152
- /**
153
- * defKey : keyof T | ''
154
- *
155
- * Description : defKey of the Select filter
156
- */
157
- defKey: keyof T | '';
158
153
  /**
159
154
  * value : string | number | null = null
160
155
  *
@@ -182,11 +177,11 @@ export interface IATableFilter<T extends IItem> {
182
177
  option: string | number | null;
183
178
  }) => React.ReactNode;
184
179
  /**
185
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any
180
+ * predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['Select']) => any
186
181
  *
187
182
  * Description : predicate of the Select filter. if not provided, it will have default predicate.
188
183
  */
189
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Select']) => any;
184
+ predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['Select']) => any;
190
185
  };
191
186
  Date: {
192
187
  /**
@@ -195,12 +190,6 @@ export interface IATableFilter<T extends IItem> {
195
190
  * Description : type of the Date filter
196
191
  */
197
192
  type: 'Date';
198
- /**
199
- * defKey : keyof T | ''
200
- *
201
- * Description : defKey of the Date filter
202
- */
203
- defKey: keyof T;
204
193
  /**
205
194
  * value : Date = new Date()
206
195
  *
@@ -220,11 +209,11 @@ export interface IATableFilter<T extends IItem> {
220
209
  */
221
210
  maxDate?: Date;
222
211
  /**
223
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any
212
+ * predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['Date']) => any
224
213
  *
225
214
  * Description : predicate of the Date filter. if not provided, it will have default predicate.
226
215
  */
227
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['Date']) => any;
216
+ predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['Date']) => any;
228
217
  };
229
218
  DateRange: {
230
219
  /**
@@ -234,23 +223,11 @@ export interface IATableFilter<T extends IItem> {
234
223
  */
235
224
  type: 'DateRange';
236
225
  /**
237
- * defKey : keyof T | ''
238
- *
239
- * Description : defKey of the DateRange filter
240
- */
241
- defKey: keyof T | '';
242
- /**
243
- * sDate : Date = new Date()
244
- *
245
- * Description : sDate of the DateRange filter
246
- */
247
- sDate?: Date;
248
- /**
249
- * eDate : Date = new Date()
226
+ * value : IDateRange
250
227
  *
251
- * Description : eDate of the DateRange filter
228
+ * Description : value of the DateRange filter
252
229
  */
253
- eDate?: Date;
230
+ value?: IDateRange;
254
231
  /**
255
232
  * minDate? : Date
256
233
  *
@@ -264,33 +241,18 @@ export interface IATableFilter<T extends IItem> {
264
241
  */
265
242
  maxDate?: Date;
266
243
  /**
267
- * predicate? : (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any
244
+ * predicate? : (item: T, defs: TATableDefs<T>, filterKey: keyof T | string, filter: IATableFilter<T>['DateRange']) => any
268
245
  *
269
246
  * Description : predicate of the DateRange filter. if not provided, it will have default predicate.
270
247
  */
271
- predicate?: (item: T, defs: TATableDefs<T>, filter: IATableFilter<T>['DateRange']) => any;
248
+ predicate?: (item: T, defs: TATableDefs<T>, filterKey: keyof T, filter: IATableFilter<T>['DateRange']) => any;
272
249
  };
273
250
  }
274
251
  export type TATableSomeFilter<T extends IItem> = IATableFilter<T>[TATableFilterType];
275
252
  export type TATableFilteration<T extends IItem> = {
276
- /**
277
- * type : 'And' | 'Or'
278
- *
279
- * Description : type of the filteration
280
- */
281
- type: 'And' | 'Or';
282
- /**
283
- * style? : React.CSSProperties
284
- *
285
- * Description : width of the String filter
286
- */
287
- style?: React.CSSProperties;
288
- /**
289
- * filters : TATableSomeFilter<T>[]
290
- *
291
- * Description : filters of the filteration
292
- */
293
- filters: TATableSomeFilter<T>[];
253
+ [key in keyof T]?: TATableSomeFilter<T>;
254
+ } & {
255
+ [key: string]: TATableSomeFilter<T>;
294
256
  };
295
257
  export type TATableSortF<T extends IItem> = (a: T, b: T) => number;
296
258
  export interface IATableSortation<T extends IItem> {