@ngutil/data 0.0.16 → 0.0.18
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/esm2022/query/executor.mjs +1 -1
- package/esm2022/query/query-property.mjs +89 -0
- package/esm2022/query/query.mjs +5 -1
- package/esm2022/query/sorter.mjs +15 -4
- package/esm2022/source/properties/abstract.mjs +3 -3
- package/esm2022/source/properties/sorter.mjs +3 -3
- package/esm2022/source/proxy.directive.mjs +11 -10
- package/esm2022/source/source.mjs +22 -22
- package/fesm2022/ngutil-data.mjs +48 -36
- package/fesm2022/ngutil-data.mjs.map +1 -1
- package/package.json +4 -4
- package/query/query-property.d.ts +26 -0
- package/query/query.d.ts +9 -0
- package/source/properties/sorter.d.ts +1 -1
- package/source/proxy.directive.d.ts +5 -5
- package/source/source.d.ts +0 -1
package/query/query.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
1
2
|
import { type DeepReadonly } from "@ngutil/common";
|
|
2
3
|
import { type Model } from "../model";
|
|
3
4
|
import { type Filter } from "./filter";
|
|
4
5
|
import { type Grouper } from "./grouper";
|
|
6
|
+
import type { IQueryCombinedProperty } from "./query-property";
|
|
5
7
|
import { type Slice } from "./slice";
|
|
6
8
|
import { type Slimer } from "./slimer";
|
|
7
9
|
import { type Sorter } from "./sorter";
|
|
@@ -17,3 +19,10 @@ export interface QueryResult<T extends Model> {
|
|
|
17
19
|
total?: number;
|
|
18
20
|
groups?: any[];
|
|
19
21
|
}
|
|
22
|
+
export interface IQuerySubject<T extends Model> extends Observable<Query<T>> {
|
|
23
|
+
readonly filter: IQueryCombinedProperty<Filter<T>>;
|
|
24
|
+
readonly sorter: IQueryCombinedProperty<Sorter<T>>;
|
|
25
|
+
readonly slimer: IQueryCombinedProperty<Slimer<T>>;
|
|
26
|
+
readonly grouper: IQueryCombinedProperty<Grouper<T>>;
|
|
27
|
+
readonly slice: IQueryCombinedProperty<Slice>;
|
|
28
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { DeepReadonly } from "@ngutil/common";
|
|
3
|
+
import { Model } from "../../model";
|
|
3
4
|
import { sorterFind } from "../../query";
|
|
4
5
|
import { Property, PropertyCombined } from "./abstract";
|
|
5
|
-
import { Model } from "../../model";
|
|
6
6
|
export declare class SorterProperty<T> extends Property<T> {
|
|
7
7
|
update(other: T): void;
|
|
8
8
|
}
|
|
@@ -45,14 +45,14 @@ export declare class DataSourceProxy<T extends Model = Model> extends CdkDataSou
|
|
|
45
45
|
readonly items$: Observable<import("@ngutil/data").PartialCollection<T>>;
|
|
46
46
|
readonly busy$: Observable<boolean>;
|
|
47
47
|
readonly isBusy: import("@angular/core").Signal<boolean>;
|
|
48
|
-
set
|
|
49
|
-
set
|
|
50
|
-
set
|
|
51
|
-
set
|
|
48
|
+
set forcedFilterInput(value: Filter<T>);
|
|
49
|
+
set forcedSorterInput(value: Sorter<T>);
|
|
50
|
+
set forcedGrouperInput(value: Grouper<T>);
|
|
51
|
+
set forcedSlimerInput(value: Slimer<T>);
|
|
52
52
|
constructor(busy?: Busy<any>);
|
|
53
53
|
connect(collectionViewer: CollectionViewer): Observable<readonly (T | undefined)[]>;
|
|
54
54
|
disconnect(collectionViewer: CollectionViewer): void;
|
|
55
55
|
ngOnDestroy(): void;
|
|
56
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataSourceProxy<any>, [{ optional: true; }]>;
|
|
57
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DataSourceProxy<any>, "[nuDataSource]", ["nuDataSource"], { "value": { "alias": "nuDataSource"; "required": true; }; "
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DataSourceProxy<any>, "[nuDataSource]", ["nuDataSource"], { "value": { "alias": "nuDataSource"; "required": true; }; "forcedFilterInput": { "alias": "forcedFilterInput"; "required": false; }; "forcedSorterInput": { "alias": "forcedSorterInput"; "required": false; }; "forcedGrouperInput": { "alias": "forcedGrouperInput"; "required": false; }; "forcedSlimerInput": { "alias": "forcedSlimerInput"; "required": false; }; }, {}, never, never, true, never>;
|
|
58
58
|
}
|
package/source/source.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export declare class DataSource<T extends Model> extends CdkDataSource<T | undef
|
|
|
19
19
|
readonly slimer: SlimerCombined<any>;
|
|
20
20
|
readonly grouper: GrouperCombined<any>;
|
|
21
21
|
readonly slice$: Observable<Slice>;
|
|
22
|
-
readonly reset$: Observable<unknown>;
|
|
23
22
|
readonly query$: Observable<DSQuery<T>>;
|
|
24
23
|
readonly items$: Observable<PartialCollection<T>>;
|
|
25
24
|
readonly store: CollectionStore<T>;
|