@brggroup/share-lib 0.0.51 → 0.0.53
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.
|
@@ -10,7 +10,7 @@ import { NzNotificationService } from 'ng-zorro-antd/notification';
|
|
|
10
10
|
import * as i1 from 'ng-zorro-antd/modal';
|
|
11
11
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
12
12
|
import { jwtDecode } from 'jwt-decode';
|
|
13
|
-
import { switchMap,
|
|
13
|
+
import { switchMap, distinctUntilChanged, filter as filter$1, takeUntil } from 'rxjs/operators';
|
|
14
14
|
import * as i2$2 from '@angular/forms';
|
|
15
15
|
import { FormGroup, FormsModule, ReactiveFormsModule, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
16
16
|
import * as i1$2 from '@angular/common';
|
|
@@ -420,10 +420,10 @@ class CommonService extends HTTPService {
|
|
|
420
420
|
}));
|
|
421
421
|
}
|
|
422
422
|
ExportPdf(data) {
|
|
423
|
-
return
|
|
423
|
+
return this.postData(AppGlobals.apiEndpoint + '/api/Common/ExportPdf', data);
|
|
424
424
|
}
|
|
425
425
|
ExportDocx(data) {
|
|
426
|
-
return
|
|
426
|
+
return this.postData(AppGlobals.apiEndpoint + '/api/Common/ExportDocx', data);
|
|
427
427
|
}
|
|
428
428
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CommonService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
429
429
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CommonService, providedIn: 'root' });
|
|
@@ -711,9 +711,7 @@ class LoadingService {
|
|
|
711
711
|
/** Trả về observable loading có delay khi bật để tránh chớp nháy */
|
|
712
712
|
get loading$() {
|
|
713
713
|
return this.loadingSubject.asObservable().pipe(switchMap((loading) => {
|
|
714
|
-
return loading
|
|
715
|
-
? of(true).pipe(delay(200)) // delay khi bật
|
|
716
|
-
: of(false); // tắt thì không delay
|
|
714
|
+
return of(loading);
|
|
717
715
|
}), distinctUntilChanged());
|
|
718
716
|
}
|
|
719
717
|
/** Nếu chỉ cần giá trị hiện tại boolean (ít dùng hơn) */
|