@abp/ng.core 7.1.1 → 7.2.0-rc.2
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/esm2020/lib/core.module.mjs +6 -1
- package/esm2020/lib/models/common.mjs +1 -1
- package/esm2020/lib/models/rest.mjs +1 -1
- package/esm2020/lib/services/rest.service.mjs +14 -7
- package/esm2020/lib/services/routes.service.mjs +21 -3
- package/esm2020/lib/tokens/index.mjs +2 -1
- package/esm2020/lib/tokens/others-group.token.mjs +3 -0
- package/esm2020/lib/utils/tree-utils.mjs +17 -1
- package/esm2020/testing/lib/services/mock-rest.service.mjs +7 -6
- package/fesm2015/abp-ng.core-testing.mjs +9 -8
- package/fesm2015/abp-ng.core-testing.mjs.map +1 -1
- package/fesm2015/abp-ng.core.mjs +158 -115
- package/fesm2015/abp-ng.core.mjs.map +1 -1
- package/fesm2020/abp-ng.core-testing.mjs +9 -8
- package/fesm2020/abp-ng.core-testing.mjs.map +1 -1
- package/fesm2020/abp-ng.core.mjs +107 -64
- package/fesm2020/abp-ng.core.mjs.map +1 -1
- package/lib/models/common.d.ts +2 -0
- package/lib/models/rest.d.ts +1 -0
- package/lib/services/rest.service.d.ts +4 -1
- package/lib/services/routes.service.d.ts +6 -1
- package/lib/tokens/index.d.ts +1 -0
- package/lib/tokens/others-group.token.d.ts +2 -0
- package/lib/utils/tree-utils.d.ts +7 -0
- package/package.json +2 -2
- package/testing/lib/services/mock-rest.service.d.ts +3 -2
package/lib/models/common.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare namespace ABP {
|
|
|
11
11
|
sendNullsAsQueryParam?: boolean;
|
|
12
12
|
tenantKey?: string;
|
|
13
13
|
localizations?: Localization[];
|
|
14
|
+
othersGroup?: string;
|
|
14
15
|
}
|
|
15
16
|
interface Child {
|
|
16
17
|
localizations?: Localization[];
|
|
@@ -58,6 +59,7 @@ export declare namespace ABP {
|
|
|
58
59
|
path?: string;
|
|
59
60
|
layout?: eLayoutType;
|
|
60
61
|
iconClass?: string;
|
|
62
|
+
group?: string;
|
|
61
63
|
}
|
|
62
64
|
interface Tab extends Nav {
|
|
63
65
|
component: Type<any>;
|
package/lib/models/rest.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpClient, HttpRequest } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { ExternalHttpClient } from '../clients/http.client';
|
|
3
4
|
import { ABP } from '../models/common';
|
|
4
5
|
import { Rest } from '../models/rest';
|
|
5
6
|
import { EnvironmentService } from './environment.service';
|
|
@@ -8,12 +9,14 @@ import * as i0 from "@angular/core";
|
|
|
8
9
|
export declare class RestService {
|
|
9
10
|
protected options: ABP.Root;
|
|
10
11
|
protected http: HttpClient;
|
|
12
|
+
protected externalHttp: ExternalHttpClient;
|
|
11
13
|
protected environment: EnvironmentService;
|
|
12
14
|
protected httpErrorReporter: HttpErrorReporterService;
|
|
13
|
-
constructor(options: ABP.Root, http: HttpClient, environment: EnvironmentService, httpErrorReporter: HttpErrorReporterService);
|
|
15
|
+
constructor(options: ABP.Root, http: HttpClient, externalHttp: ExternalHttpClient, environment: EnvironmentService, httpErrorReporter: HttpErrorReporterService);
|
|
14
16
|
protected getApiFromStore(apiName: string | undefined): string;
|
|
15
17
|
handleError(err: any): Observable<any>;
|
|
16
18
|
request<T, R>(request: HttpRequest<T> | Rest.Request<T>, config?: Rest.Config, api?: string): Observable<R>;
|
|
19
|
+
private getHttpClient;
|
|
17
20
|
private getParams;
|
|
18
21
|
private removeDuplicateSlashes;
|
|
19
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Injector, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ABP } from '../models/common';
|
|
4
|
-
import { TreeNode } from '../utils/tree-utils';
|
|
4
|
+
import { TreeNode, RouteGroup } from '../utils/tree-utils';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare abstract class AbstractTreeService<T extends {
|
|
7
7
|
[key: string | number | symbol]: any;
|
|
@@ -13,6 +13,7 @@ export declare abstract class AbstractTreeService<T extends {
|
|
|
13
13
|
private _flat$;
|
|
14
14
|
private _tree$;
|
|
15
15
|
private _visible$;
|
|
16
|
+
protected othersGroup: string;
|
|
16
17
|
get flat(): T[];
|
|
17
18
|
get flat$(): Observable<T[]>;
|
|
18
19
|
get tree(): TreeNode<T>[];
|
|
@@ -20,6 +21,7 @@ export declare abstract class AbstractTreeService<T extends {
|
|
|
20
21
|
get visible(): TreeNode<T>[];
|
|
21
22
|
get visible$(): Observable<TreeNode<T>[]>;
|
|
22
23
|
protected createTree(items: T[]): TreeNode<T>[];
|
|
24
|
+
protected createGroupedTree(list: TreeNode<T>[]): RouteGroup<T>[] | undefined;
|
|
23
25
|
private filterWith;
|
|
24
26
|
private findItemsToRemove;
|
|
25
27
|
private publish;
|
|
@@ -47,6 +49,9 @@ export declare abstract class AbstractNavTreeService<T extends ABP.Nav> extends
|
|
|
47
49
|
static ɵprov: i0.ɵɵInjectableDeclaration<AbstractNavTreeService<any>>;
|
|
48
50
|
}
|
|
49
51
|
export declare class RoutesService extends AbstractNavTreeService<ABP.Route> {
|
|
52
|
+
private hasPathOrChild;
|
|
53
|
+
get groupedVisible(): RouteGroup<ABP.Route>[] | undefined;
|
|
54
|
+
get groupedVisible$(): Observable<RouteGroup<ABP.Route>[] | undefined>;
|
|
50
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<RoutesService, never>;
|
|
51
56
|
static ɵprov: i0.ɵɵInjectableDeclaration<RoutesService>;
|
|
52
57
|
}
|
package/lib/tokens/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export declare class BaseTreeNode<T extends object> {
|
|
|
8
8
|
export declare function createTreeFromList<T extends object, R>(list: T[], keySelector: (item: T) => NodeKey, parentKeySelector: typeof keySelector, valueMapper: (item: T) => R): R[];
|
|
9
9
|
export declare function createMapFromList<T extends object, R>(list: T[], keySelector: (item: T) => NodeKey, valueMapper: (item: T) => R): Map<NodeKey, R>;
|
|
10
10
|
export declare function createTreeNodeFilterCreator<T extends object>(key: keyof T, mapperFn: (value: any) => string): (search: string) => (nodes: TreeNode<T>[], matches?: TreeNode<T>[]) => TreeNode<T>[];
|
|
11
|
+
export declare function createGroupMap<T extends {
|
|
12
|
+
group?: string;
|
|
13
|
+
}>(list: TreeNode<T>[], othersGroupKey: string): Map<string, TreeNode<T>[]>;
|
|
11
14
|
export declare type TreeNode<T extends object> = {
|
|
12
15
|
[K in keyof T]: T[K];
|
|
13
16
|
} & {
|
|
@@ -15,5 +18,9 @@ export declare type TreeNode<T extends object> = {
|
|
|
15
18
|
isLeaf: boolean;
|
|
16
19
|
parent?: TreeNode<T>;
|
|
17
20
|
};
|
|
21
|
+
export declare type RouteGroup<T extends object> = {
|
|
22
|
+
readonly group: string;
|
|
23
|
+
readonly items: TreeNode<T>[];
|
|
24
|
+
};
|
|
18
25
|
export declare type NodeKey = number | string | symbol | undefined | null;
|
|
19
26
|
export declare type NodeValue<T extends object, F extends (...args: any) => any> = F extends undefined ? TreeNode<T> : ReturnType<F>;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abp/ng.core",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-rc.2",
|
|
4
4
|
"homepage": "https://abp.io",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/abpframework/abp.git"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@abp/utils": "~7.
|
|
10
|
+
"@abp/utils": "~7.2.0",
|
|
11
11
|
"angular-oauth2-oidc": "^15.0.1",
|
|
12
12
|
"just-clone": "^6.1.1",
|
|
13
13
|
"just-compare": "^2.3.0",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { ABP, EnvironmentService, RestService } from '@abp/ng.core';
|
|
1
|
+
import { ABP, EnvironmentService, ExternalHttpClient, RestService } from '@abp/ng.core';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class MockRestService extends RestService {
|
|
6
6
|
protected options: ABP.Root;
|
|
7
7
|
protected http: HttpClient;
|
|
8
|
+
protected externalhttp: ExternalHttpClient;
|
|
8
9
|
protected environment: EnvironmentService;
|
|
9
|
-
constructor(options: ABP.Root, http: HttpClient, environment: EnvironmentService);
|
|
10
|
+
constructor(options: ABP.Root, http: HttpClient, externalhttp: ExternalHttpClient, environment: EnvironmentService);
|
|
10
11
|
handleError(err: any): Observable<any>;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<MockRestService, never>;
|
|
12
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<MockRestService>;
|