@abp/ng.core 7.1.0 → 7.2.0-rc.1
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 +11 -1
- package/esm2020/lib/models/common.mjs +1 -1
- package/esm2020/lib/models/rest.mjs +1 -1
- package/esm2020/lib/pipes/index.mjs +2 -1
- package/esm2020/lib/pipes/safe-html.pipe.mjs +23 -0
- package/esm2020/lib/services/config-state.service.mjs +16 -9
- 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 +199 -124
- 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 +145 -72
- package/fesm2020/abp-ng.core.mjs.map +1 -1
- package/lib/core.module.d.ts +13 -12
- package/lib/models/common.d.ts +2 -0
- package/lib/models/rest.d.ts +1 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/safe-html.pipe.d.ts +9 -0
- package/lib/services/config-state.service.d.ts +6 -4
- 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/core.module.d.ts
CHANGED
|
@@ -14,16 +14,17 @@ import * as i9 from "./components/replaceable-route-container.component";
|
|
|
14
14
|
import * as i10 from "./directives/replaceable-template.directive";
|
|
15
15
|
import * as i11 from "./components/router-outlet.component";
|
|
16
16
|
import * as i12 from "./pipes/sort.pipe";
|
|
17
|
-
import * as i13 from "./
|
|
18
|
-
import * as i14 from "./
|
|
19
|
-
import * as i15 from "./pipes/
|
|
20
|
-
import * as i16 from "./pipes/short-time.pipe";
|
|
21
|
-
import * as i17 from "./pipes/short-
|
|
22
|
-
import * as i18 from "
|
|
23
|
-
import * as i19 from "@angular/common
|
|
24
|
-
import * as i20 from "@angular/
|
|
25
|
-
import * as i21 from "@angular/
|
|
26
|
-
import * as i22 from "
|
|
17
|
+
import * as i13 from "./pipes/safe-html.pipe";
|
|
18
|
+
import * as i14 from "./directives/stop-propagation.directive";
|
|
19
|
+
import * as i15 from "./pipes/to-injector.pipe";
|
|
20
|
+
import * as i16 from "./pipes/short-date-time.pipe";
|
|
21
|
+
import * as i17 from "./pipes/short-time.pipe";
|
|
22
|
+
import * as i18 from "./pipes/short-date.pipe";
|
|
23
|
+
import * as i19 from "@angular/common";
|
|
24
|
+
import * as i20 from "@angular/common/http";
|
|
25
|
+
import * as i21 from "@angular/forms";
|
|
26
|
+
import * as i22 from "@angular/router";
|
|
27
|
+
import * as i23 from "./localization.module";
|
|
27
28
|
/**
|
|
28
29
|
* BaseCoreModule is the module that holds
|
|
29
30
|
* all imports, declarations, exports, and entryComponents
|
|
@@ -32,7 +33,7 @@ import * as i22 from "./localization.module";
|
|
|
32
33
|
*/
|
|
33
34
|
export declare class BaseCoreModule {
|
|
34
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseCoreModule, never>;
|
|
35
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<BaseCoreModule, [typeof i1.AbstractNgModelComponent, typeof i2.AutofocusDirective, typeof i3.DynamicLayoutComponent, typeof i4.ForDirective, typeof i5.FormSubmitDirective, typeof i6.InitDirective, typeof i7.InputEventDebounceDirective, typeof i8.PermissionDirective, typeof i9.ReplaceableRouteContainerComponent, typeof i10.ReplaceableTemplateDirective, typeof i11.RouterOutletComponent, typeof i12.SortPipe, typeof i13.
|
|
36
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BaseCoreModule, [typeof i1.AbstractNgModelComponent, typeof i2.AutofocusDirective, typeof i3.DynamicLayoutComponent, typeof i4.ForDirective, typeof i5.FormSubmitDirective, typeof i6.InitDirective, typeof i7.InputEventDebounceDirective, typeof i8.PermissionDirective, typeof i9.ReplaceableRouteContainerComponent, typeof i10.ReplaceableTemplateDirective, typeof i11.RouterOutletComponent, typeof i12.SortPipe, typeof i13.SafeHtmlPipe, typeof i14.StopPropagationDirective, typeof i15.ToInjectorPipe, typeof i16.ShortDateTimePipe, typeof i17.ShortTimePipe, typeof i18.ShortDatePipe], [typeof i19.CommonModule, typeof i20.HttpClientModule, typeof i21.FormsModule, typeof i21.ReactiveFormsModule, typeof i22.RouterModule, typeof i23.LocalizationModule], [typeof i19.CommonModule, typeof i20.HttpClientModule, typeof i21.FormsModule, typeof i21.ReactiveFormsModule, typeof i22.RouterModule, typeof i23.LocalizationModule, typeof i1.AbstractNgModelComponent, typeof i2.AutofocusDirective, typeof i3.DynamicLayoutComponent, typeof i4.ForDirective, typeof i5.FormSubmitDirective, typeof i6.InitDirective, typeof i7.InputEventDebounceDirective, typeof i8.PermissionDirective, typeof i9.ReplaceableRouteContainerComponent, typeof i10.ReplaceableTemplateDirective, typeof i11.RouterOutletComponent, typeof i12.SortPipe, typeof i13.SafeHtmlPipe, typeof i14.StopPropagationDirective, typeof i15.ToInjectorPipe, typeof i16.ShortDateTimePipe, typeof i17.ShortTimePipe, typeof i18.ShortDatePipe]>;
|
|
36
37
|
static ɵinj: i0.ɵɵInjectorDeclaration<BaseCoreModule>;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
@@ -41,7 +42,7 @@ export declare class BaseCoreModule {
|
|
|
41
42
|
*/
|
|
42
43
|
export declare class RootCoreModule {
|
|
43
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<RootCoreModule, never>;
|
|
44
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RootCoreModule, never, [typeof BaseCoreModule, typeof
|
|
45
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RootCoreModule, never, [typeof BaseCoreModule, typeof i23.LocalizationModule, typeof i20.HttpClientXsrfModule], [typeof BaseCoreModule, typeof i23.LocalizationModule]>;
|
|
45
46
|
static ɵinj: i0.ɵɵInjectorDeclaration<RootCoreModule>;
|
|
46
47
|
}
|
|
47
48
|
/**
|
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
package/lib/pipes/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SafeHtmlPipe implements PipeTransform {
|
|
4
|
+
private readonly sanitizer;
|
|
5
|
+
transform(value: string): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "abpSafeHtml", false>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SafeHtmlPipe>;
|
|
9
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service';
|
|
3
|
+
import { AbpApplicationLocalizationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service';
|
|
2
4
|
import { ApplicationConfigurationDto, ApplicationGlobalFeatureConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export declare class ConfigStateService {
|
|
5
|
-
private readonly store;
|
|
6
|
-
private readonly includeLocalizationResources;
|
|
7
7
|
private abpConfigService;
|
|
8
8
|
private abpApplicationLocalizationService;
|
|
9
|
+
private readonly includeLocalizationResources;
|
|
10
|
+
private readonly store;
|
|
9
11
|
get createOnUpdateStream(): <Slice>(selector: (state: {
|
|
10
12
|
localization?: {
|
|
11
13
|
values?: {
|
|
@@ -176,7 +178,7 @@ export declare class ConfigStateService {
|
|
|
176
178
|
};
|
|
177
179
|
}) => Slice, filterFn?: (x: Slice) => boolean) => Observable<Slice>;
|
|
178
180
|
private updateSubject;
|
|
179
|
-
constructor();
|
|
181
|
+
constructor(abpConfigService: AbpApplicationConfigurationService, abpApplicationLocalizationService: AbpApplicationLocalizationService, includeLocalizationResources: boolean | null);
|
|
180
182
|
private initUpdateStream;
|
|
181
183
|
private getLocalizationAndCombineWithAppState;
|
|
182
184
|
private getlocalizationResource;
|
|
@@ -371,6 +373,6 @@ export declare class ConfigStateService {
|
|
|
371
373
|
private isGlobalFeatureEnabled;
|
|
372
374
|
getGlobalFeatureIsEnabled(key: string): boolean;
|
|
373
375
|
getGlobalFeatureIsEnabled$(key: string): Observable<boolean>;
|
|
374
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigStateService,
|
|
376
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigStateService, [null, null, { optional: true; }]>;
|
|
375
377
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigStateService>;
|
|
376
378
|
}
|
|
@@ -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.1",
|
|
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-rc.1",
|
|
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>;
|