@sachin9822/reports-lib 0.0.70 → 0.0.72
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/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.mjs +1 -3
- package/esm2020/lib/models/acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.mjs +2 -0
- package/esm2020/lib/models/acc-gl-details-enquiry-report/journal-voucher-entry-model.mjs +2 -0
- package/esm2020/lib/reports-lib.module.mjs +6 -34
- package/esm2020/lib/services/report.service.mjs +1 -1
- package/fesm2015/sachin9822-reports-lib.mjs +9 -208
- package/fesm2015/sachin9822-reports-lib.mjs.map +1 -1
- package/fesm2020/sachin9822-reports-lib.mjs +9 -206
- package/fesm2020/sachin9822-reports-lib.mjs.map +1 -1
- package/lib/components/acc-gl-details-enquiry-report/acc-gl-details-enquiry-report.component.d.ts +1 -1
- package/lib/reports-lib.module.d.ts +7 -8
- package/lib/services/report.service.d.ts +1 -1
- package/package.json +1 -1
- package/environments/environment.d.ts +0 -5
- package/esm2020/environments/environment.mjs +0 -10
- package/esm2020/lib/interceptors/auth-http.interceptor.mjs +0 -61
- package/esm2020/lib/models/accgl-details-enquiry-reportmodel.mjs +0 -2
- package/esm2020/lib/models/journal-voucher-entry-model.mjs +0 -2
- package/esm2020/lib/models/security/authorise-profile-system-function.model.mjs +0 -2
- package/esm2020/lib/models/security/authorise-profile-system-report.model.mjs +0 -2
- package/esm2020/lib/models/security/authorise-profile-system-shortcurt.model.mjs +0 -2
- package/esm2020/lib/models/security/authorize-profile-ratesheet.model.mjs +0 -2
- package/esm2020/lib/models/security/authorize-profile.model.mjs +0 -2
- package/esm2020/lib/models/security/user-session.model.mjs +0 -6
- package/esm2020/lib/models/view-pending-queue-option.enum.mjs +0 -13
- package/esm2020/lib/services/active-x.service.mjs +0 -63
- package/esm2020/lib/services/session.service.mjs +0 -54
- package/lib/interceptors/auth-http.interceptor.d.ts +0 -15
- package/lib/models/security/authorise-profile-system-function.model.d.ts +0 -9
- package/lib/models/security/authorise-profile-system-report.model.d.ts +0 -6
- package/lib/models/security/authorise-profile-system-shortcurt.model.d.ts +0 -4
- package/lib/models/security/authorize-profile-ratesheet.model.d.ts +0 -5
- package/lib/models/security/authorize-profile.model.d.ts +0 -9
- package/lib/models/security/user-session.model.d.ts +0 -31
- package/lib/models/view-pending-queue-option.enum.d.ts +0 -10
- package/lib/services/active-x.service.d.ts +0 -23
- package/lib/services/session.service.d.ts +0 -21
- /package/lib/models/{accgl-details-enquiry-reportmodel.d.ts → acc-gl-details-enquiry-report/accgl-details-enquiry-reportmodel.d.ts} +0 -0
- /package/lib/models/{journal-voucher-entry-model.d.ts → acc-gl-details-enquiry-report/journal-voucher-entry-model.d.ts} +0 -0
@@ -1,14 +1,13 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable, Component, ErrorHandler, NgModule
|
2
|
+
import { Injectable, Component, ErrorHandler, NgModule } from '@angular/core';
|
3
3
|
import * as i6 from '@angular/common';
|
4
4
|
import { formatDate, CommonModule } from '@angular/common';
|
5
5
|
import jsPDF from 'jspdf';
|
6
6
|
import 'jspdf-autotable';
|
7
7
|
import * as ExcelJS from 'exceljs';
|
8
8
|
import * as FileSaver from 'file-saver';
|
9
|
-
import { throwError
|
9
|
+
import { throwError } from 'rxjs';
|
10
10
|
import * as i1 from '@angular/common/http';
|
11
|
-
import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
12
11
|
import * as i3 from '@angular/platform-browser';
|
13
12
|
import * as i4 from 'ag-grid-angular';
|
14
13
|
import { AgGridModule } from 'ag-grid-angular';
|
@@ -16,12 +15,9 @@ import * as i5 from '@angular/router';
|
|
16
15
|
import { RouterModule } from '@angular/router';
|
17
16
|
import * as i7 from '@angular/forms';
|
18
17
|
import { FormsModule } from '@angular/forms';
|
19
|
-
import * as
|
20
|
-
import {
|
21
|
-
import
|
22
|
-
import * as i2 from 'ngx-webstorage-service';
|
23
|
-
import { isStorageAvailable, SESSION_STORAGE } from 'ngx-webstorage-service';
|
24
|
-
import * as i1$2 from '@ng-idle/core';
|
18
|
+
import * as i2 from 'angular-oauth2-oidc';
|
19
|
+
import { OAuthModule } from 'angular-oauth2-oidc';
|
20
|
+
import * as i1$1 from '@ng-idle/core';
|
25
21
|
import { NgIdleModule } from '@ng-idle/core';
|
26
22
|
|
27
23
|
class ReportsLibService {
|
@@ -571,199 +567,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
571
567
|
}]
|
572
568
|
}] });
|
573
569
|
|
574
|
-
// The file contents for the current environment will overwrite these during build.
|
575
|
-
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
576
|
-
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
577
|
-
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
578
|
-
const environment = {
|
579
|
-
production: false,
|
580
|
-
selfHostUrl: 'http://localhost:9000/api/scriptx',
|
581
|
-
configFile: 'assets/config/app-config.json'
|
582
|
-
};
|
583
|
-
|
584
|
-
class ActiveXService {
|
585
|
-
constructor(backend) {
|
586
|
-
this.backend = backend;
|
587
|
-
this.macAddress = "";
|
588
|
-
this.ipAddress = "";
|
589
|
-
this.machineName = "";
|
590
|
-
this.processorId = "";
|
591
|
-
this.printerName = "";
|
592
|
-
this.scriptxServiceUrl = environment.selfHostUrl;
|
593
|
-
this.scriptxHttpClient = new HttpClient(backend);
|
594
|
-
this.requestSelfHostedServiceInfo()
|
595
|
-
.subscribe((responseList) => {
|
596
|
-
this.machineName = responseList[0];
|
597
|
-
this.macAddress = responseList[1];
|
598
|
-
this.ipAddress = responseList[2];
|
599
|
-
this.processorId = responseList[3];
|
600
|
-
this.isSelfHostAvailable = true;
|
601
|
-
}, err => {
|
602
|
-
this.isSelfHostAvailable = false;
|
603
|
-
console.error(err);
|
604
|
-
});
|
605
|
-
}
|
606
|
-
getMACAddress() {
|
607
|
-
return this.macAddress;
|
608
|
-
}
|
609
|
-
getIPAddress() {
|
610
|
-
return this.ipAddress;
|
611
|
-
}
|
612
|
-
getMachineName() {
|
613
|
-
return this.machineName;
|
614
|
-
}
|
615
|
-
getPrinterName() {
|
616
|
-
return this.printerName;
|
617
|
-
}
|
618
|
-
getProcessorId() {
|
619
|
-
return this.processorId;
|
620
|
-
}
|
621
|
-
requestSelfHostedServiceInfo() {
|
622
|
-
let responseGetMachineName = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetMachineName");
|
623
|
-
let responseGetMacAddress = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetMacAddress");
|
624
|
-
let responseGetIpAddress = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetIpAddress");
|
625
|
-
let responseGetProcessId = this.scriptxHttpClient.get(this.scriptxServiceUrl + "/GetProcessId");
|
626
|
-
return forkJoin([
|
627
|
-
responseGetMachineName,
|
628
|
-
responseGetMacAddress,
|
629
|
-
responseGetIpAddress,
|
630
|
-
responseGetProcessId,
|
631
|
-
]);
|
632
|
-
}
|
633
|
-
}
|
634
|
-
ActiveXService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService, deps: [{ token: i1.HttpBackend }], target: i0.ɵɵFactoryTarget.Injectable });
|
635
|
-
ActiveXService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService });
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActiveXService, decorators: [{
|
637
|
-
type: Injectable
|
638
|
-
}], ctorParameters: function () { return [{ type: i1.HttpBackend }]; } });
|
639
|
-
|
640
|
-
class SessionService {
|
641
|
-
constructor(storage, oauthService) {
|
642
|
-
this.storage = storage;
|
643
|
-
this.oauthService = oauthService;
|
644
|
-
this.userSessionKey = 'FossilUserSessionModel';
|
645
|
-
this.onSessionChanged = new BehaviorSubject(null);
|
646
|
-
}
|
647
|
-
GetObjectByKey(key) {
|
648
|
-
if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
|
649
|
-
return this.storage.get(key);
|
650
|
-
}
|
651
|
-
return null;
|
652
|
-
}
|
653
|
-
SetObject(key, value) {
|
654
|
-
if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
|
655
|
-
this.storage.set(key, value);
|
656
|
-
}
|
657
|
-
this.UpdateSession();
|
658
|
-
}
|
659
|
-
RemoveObject(key) {
|
660
|
-
if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
|
661
|
-
this.storage.remove(key);
|
662
|
-
}
|
663
|
-
this.UpdateSession();
|
664
|
-
}
|
665
|
-
GetUserSession() {
|
666
|
-
return this.GetObjectByKey(this.userSessionKey);
|
667
|
-
}
|
668
|
-
// TODO Consider if this should close the session on the server side or just reset the client session
|
669
|
-
Clear() {
|
670
|
-
if (isStorageAvailable(sessionStorage) && this.storage !== undefined) {
|
671
|
-
this.storage.remove(this.userSessionKey);
|
672
|
-
}
|
673
|
-
}
|
674
|
-
UpdateSession() {
|
675
|
-
this.session = this.GetUserSession();
|
676
|
-
this.onSessionChanged.next(this.session);
|
677
|
-
}
|
678
|
-
}
|
679
|
-
SessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService, deps: [{ token: SESSION_STORAGE }, { token: i1$1.OAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
680
|
-
SessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService });
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionService, decorators: [{
|
682
|
-
type: Injectable
|
683
|
-
}], ctorParameters: function () { return [{ type: i2.InMemoryStorageService, decorators: [{
|
684
|
-
type: Inject,
|
685
|
-
args: [SESSION_STORAGE]
|
686
|
-
}] }, { type: i1$1.OAuthService }]; } });
|
687
|
-
|
688
|
-
class AuthHttpInterceptor {
|
689
|
-
constructor(oAuthService, activeXService, session) {
|
690
|
-
this.oAuthService = oAuthService;
|
691
|
-
this.activeXService = activeXService;
|
692
|
-
this.session = session;
|
693
|
-
}
|
694
|
-
intercept(request, next) {
|
695
|
-
const token = this.oAuthService.getAccessToken();
|
696
|
-
const guid = v4().replace(/-/g, '');
|
697
|
-
let clonedRequest = request.clone({
|
698
|
-
withCredentials: true
|
699
|
-
});
|
700
|
-
if (token) {
|
701
|
-
clonedRequest = clonedRequest.clone({
|
702
|
-
setHeaders: {
|
703
|
-
Authorization: `Bearer ${token}`
|
704
|
-
},
|
705
|
-
withCredentials: true
|
706
|
-
});
|
707
|
-
}
|
708
|
-
if (!request.headers.has('request-trace-id')) {
|
709
|
-
clonedRequest = clonedRequest.clone({
|
710
|
-
setHeaders: {
|
711
|
-
'request-trace-id': guid
|
712
|
-
}
|
713
|
-
});
|
714
|
-
}
|
715
|
-
let userBranch = 'NotSelected';
|
716
|
-
let userCompany = 'NotSelected';
|
717
|
-
if (this.session) {
|
718
|
-
const userSession = this.session.GetUserSession();
|
719
|
-
userBranch = userSession?.branch || 'NotInSession';
|
720
|
-
userCompany = userSession?.companyShortCode || 'NotInSession';
|
721
|
-
}
|
722
|
-
clonedRequest = clonedRequest.clone({
|
723
|
-
setHeaders: {
|
724
|
-
'UserBranch': userBranch || ''
|
725
|
-
},
|
726
|
-
withCredentials: true
|
727
|
-
});
|
728
|
-
clonedRequest = clonedRequest.clone({
|
729
|
-
setHeaders: {
|
730
|
-
'UserCompany': userCompany || ''
|
731
|
-
},
|
732
|
-
withCredentials: true
|
733
|
-
});
|
734
|
-
return next.handle(clonedRequest);
|
735
|
-
}
|
736
|
-
}
|
737
|
-
AuthHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor, deps: [{ token: i1$1.OAuthService }, { token: ActiveXService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
738
|
-
AuthHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor });
|
739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthHttpInterceptor, decorators: [{
|
740
|
-
type: Injectable
|
741
|
-
}], ctorParameters: function () { return [{ type: i1$1.OAuthService }, { type: ActiveXService }, { type: SessionService }]; } });
|
742
|
-
|
743
570
|
class ReportsLibModule {
|
744
571
|
}
|
745
572
|
ReportsLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
746
573
|
ReportsLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, declarations: [ReportsLibComponent,
|
747
|
-
AccGlDetailsEnquiryReportComponent], imports: [
|
748
|
-
AgGridModule,
|
574
|
+
AccGlDetailsEnquiryReportComponent], imports: [AgGridModule,
|
749
575
|
ReportsLibRoutingModule,
|
750
|
-
CommonModule,
|
751
|
-
HttpClientModule, i1$2.NgIdleModule, i1$1.OAuthModule, FormsModule], exports: [ReportsLibComponent,
|
576
|
+
CommonModule, i1$1.NgIdleModule, i2.OAuthModule, FormsModule], exports: [ReportsLibComponent,
|
752
577
|
AccGlDetailsEnquiryReportComponent] });
|
753
|
-
ReportsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule,
|
754
|
-
ActiveXService,
|
755
|
-
SessionService,
|
756
|
-
{
|
757
|
-
provide: HTTP_INTERCEPTORS,
|
758
|
-
useClass: AuthHttpInterceptor,
|
759
|
-
deps: [OAuthService, ActiveXService, SessionService],
|
760
|
-
multi: true
|
761
|
-
},
|
762
|
-
], imports: [HttpClientModule,
|
763
|
-
AgGridModule,
|
578
|
+
ReportsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ReportsLibModule, imports: [AgGridModule,
|
764
579
|
ReportsLibRoutingModule,
|
765
580
|
CommonModule,
|
766
|
-
HttpClientModule,
|
767
581
|
NgIdleModule.forRoot(),
|
768
582
|
OAuthModule.forRoot(),
|
769
583
|
FormsModule] });
|
@@ -775,25 +589,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
775
589
|
AccGlDetailsEnquiryReportComponent
|
776
590
|
],
|
777
591
|
imports: [
|
778
|
-
HttpClientModule,
|
779
592
|
AgGridModule,
|
780
593
|
ReportsLibRoutingModule,
|
781
594
|
CommonModule,
|
782
|
-
HttpClientModule,
|
783
595
|
NgIdleModule.forRoot(),
|
784
596
|
OAuthModule.forRoot(),
|
785
597
|
FormsModule
|
786
598
|
],
|
787
|
-
providers: [
|
788
|
-
ActiveXService,
|
789
|
-
SessionService,
|
790
|
-
{
|
791
|
-
provide: HTTP_INTERCEPTORS,
|
792
|
-
useClass: AuthHttpInterceptor,
|
793
|
-
deps: [OAuthService, ActiveXService, SessionService],
|
794
|
-
multi: true
|
795
|
-
},
|
796
|
-
],
|
599
|
+
providers: [],
|
797
600
|
exports: [
|
798
601
|
ReportsLibComponent,
|
799
602
|
AccGlDetailsEnquiryReportComponent
|