zek 17.3.1 → 17.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/esm2022/lib/modules/loading/index.mjs +2 -2
- package/esm2022/lib/modules/loading/loading-interceptor.mjs +41 -61
- package/esm2022/lib/modules/loading/loading.mjs +33 -0
- package/esm2022/lib/modules/loading/loading.module.mjs +8 -8
- package/esm2022/lib/utils/object-helper.mjs +20 -2
- package/fesm2022/zek.mjs +73 -77
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/modules/loading/index.d.ts +1 -1
- package/lib/modules/loading/loading-interceptor.d.ts +20 -16
- package/lib/modules/loading/{loading.component.d.ts → loading.d.ts} +4 -4
- package/lib/modules/loading/loading.module.d.ts +1 -1
- package/lib/utils/object-helper.d.ts +5 -0
- package/package.json +1 -1
- package/esm2022/lib/modules/loading/loading.component.mjs +0 -35
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './loading.module';
|
|
2
|
-
export * from './loading
|
|
2
|
+
export * from './loading';
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { ExistingProvider } from '@angular/core';
|
|
2
1
|
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
export declare class ZekLoadingService {
|
|
5
|
+
private _pendingRequests;
|
|
6
|
+
private _loadingSubject$?;
|
|
7
|
+
private _onLoadingObservable?;
|
|
8
|
+
start(): void;
|
|
9
|
+
end(): void;
|
|
10
|
+
get onLoading(): Observable<boolean>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZekLoadingService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ZekLoadingService>;
|
|
13
|
+
}
|
|
14
|
+
export declare class ZekLoadingInterceptor implements HttpInterceptor {
|
|
15
|
+
private readonly _loading;
|
|
16
|
+
constructor(_loading: ZekLoadingService);
|
|
16
17
|
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
17
|
-
|
|
18
|
-
static
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LoadingInterceptor>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZekLoadingInterceptor, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ZekLoadingInterceptor>;
|
|
20
20
|
}
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const ZekLoadingInterceptorProvider: {
|
|
22
|
+
provide: import("@angular/core").InjectionToken<readonly HttpInterceptor[]>;
|
|
23
|
+
useClass: typeof ZekLoadingInterceptor;
|
|
24
|
+
multi: boolean;
|
|
25
|
+
}[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ZekLoadingService } from './loading-interceptor';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ZekLoading implements OnInit, OnDestroy {
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly _loading;
|
|
6
6
|
show: boolean;
|
|
7
7
|
private subscription?;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(_loading: ZekLoadingService);
|
|
9
9
|
ngOnInit(): void;
|
|
10
10
|
ngOnDestroy(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZekLoading, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ZekLoading, "
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ZekLoading, "app-loading", never, {}, {}, never, never, false, never>;
|
|
13
13
|
}
|
|
@@ -8,6 +8,11 @@ export declare class ObjectHelper {
|
|
|
8
8
|
*/
|
|
9
9
|
static isEmptyValue(value: any): boolean;
|
|
10
10
|
static isEmpty(obj: any): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated The method should not be used. please use deleteNullFields
|
|
13
|
+
*/
|
|
11
14
|
static deleteNullKeys(val: any): void;
|
|
15
|
+
static deleteNullFields<T extends {}>(val: T): T | undefined;
|
|
16
|
+
static assignFields<T extends {}, U extends {}>(target: T, source: U): T;
|
|
12
17
|
static deepCopy<T = any>(value: any): T;
|
|
13
18
|
}
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./loading-interceptor";
|
|
4
|
-
import * as i2 from "@angular/common";
|
|
5
|
-
export class ZekLoading {
|
|
6
|
-
constructor(loadingInterceptor) {
|
|
7
|
-
this.loadingInterceptor = loadingInterceptor;
|
|
8
|
-
this.show = false;
|
|
9
|
-
}
|
|
10
|
-
ngOnInit() {
|
|
11
|
-
this.subscription = this.loadingInterceptor.getStatus().subscribe(x => {
|
|
12
|
-
this.show = x;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
ngOnDestroy() {
|
|
16
|
-
if (this.subscription) {
|
|
17
|
-
this.subscription.unsubscribe();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ZekLoading, deps: [{ token: i1.LoadingInterceptor }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: ZekLoading, selector: "zek-loading", ngImport: i0, template: `
|
|
22
|
-
<div *ngIf="show" id="loading" class="progress">
|
|
23
|
-
<div class="progress-bar progress-bar-striped progress-bar-animated bg-danger" role="progressbar" style="width:100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
24
|
-
</div>
|
|
25
|
-
`, isInline: true, styles: ["#loading{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:fixed;inset:0;z-index:10000;background-color:#00000080;outline:0;height:3px}#loading>.progress-bar{-webkit-transition:none!important;transition:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ZekLoading, decorators: [{
|
|
28
|
-
type: Component,
|
|
29
|
-
args: [{ selector: 'zek-loading', template: `
|
|
30
|
-
<div *ngIf="show" id="loading" class="progress">
|
|
31
|
-
<div class="progress-bar progress-bar-striped progress-bar-animated bg-danger" role="progressbar" style="width:100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
|
32
|
-
</div>
|
|
33
|
-
`, styles: ["#loading{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:fixed;inset:0;z-index:10000;background-color:#00000080;outline:0;height:3px}#loading>.progress-bar{-webkit-transition:none!important;transition:none!important}\n"] }]
|
|
34
|
-
}], ctorParameters: () => [{ type: i1.LoadingInterceptor }] });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGluZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy96ZWsvc3JjL2xpYi9tb2R1bGVzL2xvYWRpbmcvbG9hZGluZy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBcUIsTUFBTSxlQUFlLENBQUM7Ozs7QUFlN0QsTUFBTSxP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