@itrocks/list 0.3.2 → 0.3.3
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.
- package/cjs/columns.d.ts +4 -5
- package/cjs/sort.js +1 -1
- package/package.json +1 -1
package/cjs/columns.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { KeyOf } from '@itrocks/class-type';
|
|
2
1
|
import { Type } from '@itrocks/class-type';
|
|
3
2
|
import { ReflectProperty } from '@itrocks/reflect';
|
|
4
3
|
import { Request } from '@itrocks/request-response';
|
|
5
4
|
import { Option } from '@itrocks/storage';
|
|
6
5
|
import { Parameter } from './parameter';
|
|
7
6
|
export declare class Columns<T extends object> extends Parameter implements Iterable<ReflectProperty<T>> {
|
|
8
|
-
properties: ReflectProperty<T>[];
|
|
9
|
-
[Symbol.iterator](): ArrayIterator<ReflectProperty<T>>;
|
|
7
|
+
properties: ReflectProperty<T, keyof T>[];
|
|
8
|
+
[Symbol.iterator](): ArrayIterator<ReflectProperty<T, keyof T>>;
|
|
10
9
|
getParams(_request: Request, type: Type<T>): void;
|
|
11
10
|
get length(): number;
|
|
12
11
|
map(callback: (value: ReflectProperty<T>) => any): any[];
|
|
13
12
|
readOptions(options?: Option[]): Option[];
|
|
14
13
|
remove(propertyName: string): void;
|
|
15
|
-
serialize():
|
|
16
|
-
unserialize(data:
|
|
14
|
+
serialize(): (keyof T)[];
|
|
15
|
+
unserialize(data: (keyof T)[], type: Type<T>): void;
|
|
17
16
|
unshift(property: ReflectProperty<T>): number;
|
|
18
17
|
}
|
package/cjs/sort.js
CHANGED
|
@@ -50,7 +50,7 @@ class Sort extends parameter_1.Parameter {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
for (const column of this.columns) {
|
|
53
|
-
const sortIndex = sortProperties.indexOf(column.name);
|
|
53
|
+
const sortIndex = sortProperties.indexOf(column.name.toString());
|
|
54
54
|
column.reverse = !!sortReverse[sortIndex];
|
|
55
55
|
column.sort = (sortIndex + 1) || undefined;
|
|
56
56
|
}
|
package/package.json
CHANGED