ados-rcm 1.0.329 → 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
@@ -117,12 +118,6 @@ export interface IATableFilter<T extends IItem> {
117
118
  * Description : type of the String filter
118
119
  */
119
120
  type: 'String';
120
- /**
121
- * defKey? : keyof T | ''
122
- *
123
- * Description : defKey of the String filter
124
- */
125
- defKey: keyof T | '';
126
121
  /**
127
122
  * value : string = ''
128
123
  *
@@ -130,11 +125,11 @@ export interface IATableFilter<T extends IItem> {
130
125
  */
131
126
  value?: string;
132
127
  /**
133
- * 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
134
129
  *
135
130
  * Description : predicate of the String filter
136
131
  */
137
- 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;
138
133
  /**
139
134
  * placeholder? : string
140
135
  *
@@ -155,12 +150,6 @@ export interface IATableFilter<T extends IItem> {
155
150
  * Description : type of the Select filter
156
151
  */
157
152
  type: 'Select';
158
- /**
159
- * defKey : keyof T | ''
160
- *
161
- * Description : defKey of the Select filter
162
- */
163
- defKey: keyof T | '';
164
153
  /**
165
154
  * value : string | number | null = null
166
155
  *
@@ -188,11 +177,11 @@ export interface IATableFilter<T extends IItem> {
188
177
  option: string | number | null;
189
178
  }) => React.ReactNode;
190
179
  /**
191
- * 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
192
181
  *
193
182
  * Description : predicate of the Select filter. if not provided, it will have default predicate.
194
183
  */
195
- 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;
196
185
  };
197
186
  Date: {
198
187
  /**
@@ -201,12 +190,6 @@ export interface IATableFilter<T extends IItem> {
201
190
  * Description : type of the Date filter
202
191
  */
203
192
  type: 'Date';
204
- /**
205
- * defKey : keyof T | ''
206
- *
207
- * Description : defKey of the Date filter
208
- */
209
- defKey: keyof T;
210
193
  /**
211
194
  * value : Date = new Date()
212
195
  *
@@ -226,11 +209,11 @@ export interface IATableFilter<T extends IItem> {
226
209
  */
227
210
  maxDate?: Date;
228
211
  /**
229
- * 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
230
213
  *
231
214
  * Description : predicate of the Date filter. if not provided, it will have default predicate.
232
215
  */
233
- 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;
234
217
  };
235
218
  DateRange: {
236
219
  /**
@@ -240,23 +223,11 @@ export interface IATableFilter<T extends IItem> {
240
223
  */
241
224
  type: 'DateRange';
242
225
  /**
243
- * defKey : keyof T | ''
244
- *
245
- * Description : defKey of the DateRange filter
246
- */
247
- defKey: keyof T | '';
248
- /**
249
- * sDate : Date = new Date()
226
+ * value : IDateRange
250
227
  *
251
- * Description : sDate of the DateRange filter
228
+ * Description : value of the DateRange filter
252
229
  */
253
- sDate?: Date;
254
- /**
255
- * eDate : Date = new Date()
256
- *
257
- * Description : eDate of the DateRange filter
258
- */
259
- eDate?: Date;
230
+ value?: IDateRange;
260
231
  /**
261
232
  * minDate? : Date
262
233
  *
@@ -270,33 +241,18 @@ export interface IATableFilter<T extends IItem> {
270
241
  */
271
242
  maxDate?: Date;
272
243
  /**
273
- * 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
274
245
  *
275
246
  * Description : predicate of the DateRange filter. if not provided, it will have default predicate.
276
247
  */
277
- 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;
278
249
  };
279
250
  }
280
251
  export type TATableSomeFilter<T extends IItem> = IATableFilter<T>[TATableFilterType];
281
252
  export type TATableFilteration<T extends IItem> = {
282
- /**
283
- * type : 'And' | 'Or'
284
- *
285
- * Description : type of the filteration
286
- */
287
- type: 'And' | 'Or';
288
- /**
289
- * style? : React.CSSProperties
290
- *
291
- * Description : width of the String filter
292
- */
293
- style?: React.CSSProperties;
294
- /**
295
- * filters : TATableSomeFilter<T>[]
296
- *
297
- * Description : filters of the filteration
298
- */
299
- filters: TATableSomeFilter<T>[];
253
+ [key in keyof T]?: TATableSomeFilter<T>;
254
+ } & {
255
+ [key: string]: TATableSomeFilter<T>;
300
256
  };
301
257
  export type TATableSortF<T extends IItem> = (a: T, b: T) => number;
302
258
  export interface IATableSortation<T extends IItem> {