@ohioepa/oepa-ui-lib 1.2.0 → 1.2.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/esm2022/lib/account-search-input/account-search-input.component.mjs +9 -17
- package/esm2022/lib/account-search-input/account-search.service.mjs +31 -0
- package/esm2022/lib/account-search-modal/account-search-modal.component.mjs +8 -16
- package/esm2022/lib/address/oepa-address.service.mjs +11 -5
- package/esm2022/lib/common-forms.module.mjs +36 -1
- package/esm2022/lib/edoc-attachment/edoc-attachment.component.mjs +9 -8
- package/esm2022/lib/edoc-attachment/edoc-attachment.service.mjs +11 -5
- package/esm2022/lib/entity/entity.service.mjs +11 -5
- package/esm2022/lib/file-upload/file-upload.component.mjs +8 -7
- package/esm2022/lib/lynx-image-upload/lynx-image-upload.component.mjs +7 -6
- package/esm2022/lib/lynx-image-upload/lynx.service.mjs +11 -5
- package/esm2022/lib/multi-file-upload/multi-file-upload.component.mjs +8 -7
- package/esm2022/lib/oepa-account/account-service.mjs +62 -0
- package/esm2022/lib/oepa-file-utils/oepa-file-util.service.mjs +227 -0
- package/esm2022/lib/oepa-reference/oepa-reference.service.mjs +47 -0
- package/esm2022/lib/oepa-user-account/oepa-user-account.service.mjs +304 -0
- package/esm2022/lib/parameter/parameter.service.mjs +11 -5
- package/esm2022/lib/params-help-button/params-help-button.component.mjs +8 -8
- package/esm2022/lib/params-help-button/params-help.service.mjs +26 -0
- package/esm2022/lib/pin-modal/oepa-pin.service.mjs +11 -5
- package/esm2022/lib/pin-modal/pin-modal.component.mjs +2 -2
- package/esm2022/lib/server-timeout-modal/server-timeout-modal.component.mjs +2 -2
- package/esm2022/lib/shopping-cart/shopping-cart.service.mjs +11 -5
- package/esm2022/lib/table/p-table/p-table.component.mjs +9 -8
- package/esm2022/lib/table/table-export.service.mjs +14 -5
- package/esm2022/lib/table/table.component.mjs +13 -12
- package/esm2022/lib/util/oepa-custom-encoder.mjs +15 -0
- package/esm2022/lib/util/oepa-http-interceptor.mjs +64 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ohioepa-oepa-ui-lib.mjs +962 -159
- package/fesm2022/ohioepa-oepa-ui-lib.mjs.map +1 -1
- package/lib/account-search-input/account-search-input.component.d.ts +3 -4
- package/lib/account-search-input/account-search.service.d.ts +12 -0
- package/lib/account-search-modal/account-search-modal.component.d.ts +3 -5
- package/lib/address/oepa-address.service.d.ts +2 -1
- package/lib/common-forms.module.d.ts +2 -0
- package/lib/edoc-attachment/edoc-attachment.component.d.ts +2 -1
- package/lib/edoc-attachment/edoc-attachment.service.d.ts +2 -1
- package/lib/entity/entity.service.d.ts +2 -1
- package/lib/file-upload/file-upload.component.d.ts +2 -1
- package/lib/lynx-image-upload/lynx-image-upload.component.d.ts +2 -1
- package/lib/lynx-image-upload/lynx.service.d.ts +2 -1
- package/lib/multi-file-upload/multi-file-upload.component.d.ts +2 -1
- package/lib/oepa-account/account-service.d.ts +23 -0
- package/lib/oepa-file-utils/oepa-file-util.service.d.ts +53 -0
- package/lib/oepa-reference/oepa-reference.service.d.ts +26 -0
- package/lib/oepa-user-account/oepa-user-account.service.d.ts +122 -0
- package/lib/parameter/parameter.service.d.ts +2 -1
- package/lib/params-help-button/params-help-button.component.d.ts +3 -3
- package/lib/params-help-button/params-help.service.d.ts +11 -0
- package/lib/pin-modal/oepa-pin.service.d.ts +2 -1
- package/lib/pin-modal/pin-modal.component.d.ts +2 -1
- package/lib/server-timeout-modal/server-timeout-modal.component.d.ts +1 -1
- package/lib/shopping-cart/shopping-cart.service.d.ts +2 -1
- package/lib/table/p-table/p-table.component.d.ts +2 -1
- package/lib/table/table-export.service.d.ts +2 -1
- package/lib/table/table.component.d.ts +1 -1
- package/lib/util/oepa-custom-encoder.d.ts +7 -0
- package/lib/util/oepa-http-interceptor.d.ts +21 -0
- package/ohioepa-oepa-ui-lib-1.2.2.tgz +0 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/ohioepa-oepa-ui-lib-1.2.0.tgz +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Input, EventEmitter, Output, Directive, HostListener, Pipe, ViewChild, forwardRef, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Inject, Component, Input, EventEmitter, Output, Directive, HostListener, Pipe, ViewChild, forwardRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { Observable, Subject, forkJoin, EMPTY, of } from 'rxjs';
|
|
6
|
-
import { map, mergeMap, catchError, debounceTime, distinctUntilChanged, tap } from 'rxjs/operators';
|
|
5
|
+
import { Observable, Subject, forkJoin, EMPTY, of, throwError } from 'rxjs';
|
|
6
|
+
import { map, mergeMap, catchError, debounceTime, distinctUntilChanged, tap, timeout } from 'rxjs/operators';
|
|
7
7
|
import * as i1 from '@angular/common/http';
|
|
8
|
-
import { HttpHeaders } from '@angular/common/http';
|
|
8
|
+
import { HttpHeaders, HttpParams, HttpUrlEncodingCodec } from '@angular/common/http';
|
|
9
9
|
import * as i1$1 from '@ohioepa/oepa-common-lib';
|
|
10
10
|
import { CommonLibModule } from '@ohioepa/oepa-common-lib';
|
|
11
11
|
import * as i1$2 from '@angular/forms';
|
|
@@ -51,11 +51,14 @@ import * as i1$4 from '@angular/router';
|
|
|
51
51
|
*/
|
|
52
52
|
class OepaAddressService {
|
|
53
53
|
http;
|
|
54
|
+
ebizRootURL;
|
|
54
55
|
states;
|
|
55
56
|
countries;
|
|
56
57
|
statesUrl = '/ebiz/api/v1/references/states';
|
|
57
|
-
constructor(http) {
|
|
58
|
+
constructor(http, ebizRootURL) {
|
|
58
59
|
this.http = http;
|
|
60
|
+
this.ebizRootURL = ebizRootURL;
|
|
61
|
+
this.statesUrl = ebizRootURL + this.statesUrl;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
61
64
|
* Retrieve the list of applicable states. If no states have been provided
|
|
@@ -95,7 +98,7 @@ class OepaAddressService {
|
|
|
95
98
|
return this.countries;
|
|
96
99
|
}));
|
|
97
100
|
}
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaAddressService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaAddressService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
99
102
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaAddressService, providedIn: 'root' });
|
|
100
103
|
}
|
|
101
104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaAddressService, decorators: [{
|
|
@@ -103,7 +106,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
103
106
|
args: [{
|
|
104
107
|
providedIn: 'root'
|
|
105
108
|
}]
|
|
106
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
109
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
110
|
+
type: Inject,
|
|
111
|
+
args: ['ebizRootURL']
|
|
112
|
+
}] }] });
|
|
107
113
|
|
|
108
114
|
class AddressComponent {
|
|
109
115
|
addressService;
|
|
@@ -766,12 +772,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
766
772
|
|
|
767
773
|
class TableExportService {
|
|
768
774
|
http;
|
|
775
|
+
ebizRootURL;
|
|
769
776
|
downloadHTMLUrl = '/ebiz/api/v1/fileutil/tableAsHTML';
|
|
770
777
|
downloadExcelUrl = '/ebiz/api/v1/fileutil/tableAsExcel';
|
|
771
778
|
downloadDummyHTMLUrl = '/ebiz/api/v1/fileutil/dummyTableHTML';
|
|
772
779
|
downloadDummyExcelUrl = '/ebiz/api/v1/fileutil/dummyTableExcel';
|
|
773
|
-
constructor(http) {
|
|
780
|
+
constructor(http, ebizRootURL) {
|
|
774
781
|
this.http = http;
|
|
782
|
+
this.ebizRootURL = ebizRootURL;
|
|
783
|
+
this.downloadHTMLUrl = ebizRootURL + this.downloadHTMLUrl;
|
|
784
|
+
this.downloadExcelUrl = ebizRootURL + this.downloadExcelUrl;
|
|
785
|
+
this.downloadDummyHTMLUrl = ebizRootURL + this.downloadDummyHTMLUrl;
|
|
786
|
+
this.downloadDummyExcelUrl = ebizRootURL + this.downloadDummyExcelUrl;
|
|
775
787
|
}
|
|
776
788
|
/**
|
|
777
789
|
* Return a string representing the contents of table as HTML.
|
|
@@ -807,7 +819,7 @@ class TableExportService {
|
|
|
807
819
|
const headers = new HttpHeaders();
|
|
808
820
|
return this.http.get(this.downloadDummyExcelUrl, { headers: headers, responseType: 'blob' });
|
|
809
821
|
}
|
|
810
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableExportService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
822
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableExportService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
811
823
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableExportService, providedIn: 'root' });
|
|
812
824
|
}
|
|
813
825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableExportService, decorators: [{
|
|
@@ -815,7 +827,232 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
815
827
|
args: [{
|
|
816
828
|
providedIn: 'root'
|
|
817
829
|
}]
|
|
818
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
830
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
831
|
+
type: Inject,
|
|
832
|
+
args: ['ebizRootURL']
|
|
833
|
+
}] }] });
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* NOTE: Needed this because of problems importing mime or mime-types library
|
|
837
|
+
*/
|
|
838
|
+
const MIME_TYPES = {
|
|
839
|
+
'.aac': 'audio/aac',
|
|
840
|
+
'.abw': 'application/x-abiword',
|
|
841
|
+
'.arc': 'application/octet-stream',
|
|
842
|
+
'.avi': 'video/x-msvideo',
|
|
843
|
+
'.azw': 'application/vnd.amazon.ebook',
|
|
844
|
+
'.bin': 'application/octet-stream',
|
|
845
|
+
'.bmp': 'image/bmp',
|
|
846
|
+
'.bz': 'application/x-bzip',
|
|
847
|
+
'.bz2': 'application/x-bzip2',
|
|
848
|
+
'.csh': 'application/x-csh',
|
|
849
|
+
'.css': 'text/css',
|
|
850
|
+
'.csv': 'text/csv',
|
|
851
|
+
'.doc': 'application/msword',
|
|
852
|
+
'.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
853
|
+
'.eot': 'application/vnd.ms-fontobject',
|
|
854
|
+
'.epub': 'application/epub+zip',
|
|
855
|
+
'.es': 'application/ecmascript',
|
|
856
|
+
'.gif': 'image/gif',
|
|
857
|
+
'.htm': 'text/html',
|
|
858
|
+
'.html': 'text/html',
|
|
859
|
+
'.ico': 'image/x-icon',
|
|
860
|
+
'.ics': 'text/calendar',
|
|
861
|
+
'.jar': 'application/java-archive',
|
|
862
|
+
'.jpeg': 'image/jpeg',
|
|
863
|
+
'.jpg': 'image/jpeg',
|
|
864
|
+
'.js': 'application/javascript',
|
|
865
|
+
'.json': 'application/json',
|
|
866
|
+
'.mid': 'audio/midi audio/x-midi',
|
|
867
|
+
'.midi': 'audio/midi audio/x-midi',
|
|
868
|
+
'.mpeg': 'video/mpeg',
|
|
869
|
+
'.mpkg': 'application/vnd.apple.installer+xml',
|
|
870
|
+
'.odp': 'application/vnd.oasis.opendocument.presentation',
|
|
871
|
+
'.ods': 'application/vnd.oasis.opendocument.spreadsheet',
|
|
872
|
+
'.odt': 'application/vnd.oasis.opendocument.text',
|
|
873
|
+
'.oga': 'audio/ogg',
|
|
874
|
+
'.ogv': 'video/ogg',
|
|
875
|
+
'.ogx': 'application/ogg',
|
|
876
|
+
'.otf': 'font/otf',
|
|
877
|
+
'.png': 'image/png',
|
|
878
|
+
'.pdf': 'application/pdf',
|
|
879
|
+
'.ppt': 'application/vnd.ms-powerpoint',
|
|
880
|
+
'.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
881
|
+
'.rar': 'application/x-rar-compressed',
|
|
882
|
+
'.rtf': 'application/rtf',
|
|
883
|
+
'.sh': 'application/x-sh',
|
|
884
|
+
'.svg': 'image/svg+xml',
|
|
885
|
+
'.swf': 'application/x-shockwave-flash',
|
|
886
|
+
'.tar': 'application/x-tar',
|
|
887
|
+
'.tif': 'image/tiff',
|
|
888
|
+
'.tiff': 'image/tiff',
|
|
889
|
+
'.ts': 'application/typescript',
|
|
890
|
+
'.ttf': 'font/ttf',
|
|
891
|
+
'.txt': 'text/plain',
|
|
892
|
+
'.vsd': 'application/vnd.visio',
|
|
893
|
+
'.wav': 'audio/wav',
|
|
894
|
+
'.weba': 'audio/webm',
|
|
895
|
+
'.webm': 'video/webm',
|
|
896
|
+
'.webp': 'image/webp',
|
|
897
|
+
'.woff': 'font/woff',
|
|
898
|
+
'.woff2': 'font/woff2',
|
|
899
|
+
'.xhtml': 'application/xhtml+xml',
|
|
900
|
+
'.xls': 'application/vnd.ms-excel',
|
|
901
|
+
'.xlsm': 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
|
902
|
+
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
903
|
+
'.xml': 'application/xml',
|
|
904
|
+
'.xul': 'application/vnd.mozilla.xul+xml',
|
|
905
|
+
'.zip': 'application/zip',
|
|
906
|
+
'.3gp': 'video/3gpp',
|
|
907
|
+
'.7z': 'application/x-7z-compressed'
|
|
908
|
+
};
|
|
909
|
+
/**
|
|
910
|
+
* Collection of methods for uploading/downloading and displaying files.
|
|
911
|
+
*/
|
|
912
|
+
class OepaFileUtilService {
|
|
913
|
+
http;
|
|
914
|
+
ebizRootURL;
|
|
915
|
+
uploadUrl = '/file/upload/url';
|
|
916
|
+
fileUtilUrl = '/ebiz/api/v1/fileutil';
|
|
917
|
+
downloadUrl = this.fileUtilUrl + '/downloadAttachment';
|
|
918
|
+
constructor(http, ebizRootURL) {
|
|
919
|
+
this.http = http;
|
|
920
|
+
this.ebizRootURL = ebizRootURL;
|
|
921
|
+
this.uploadUrl = ebizRootURL + this.uploadUrl;
|
|
922
|
+
this.fileUtilUrl = ebizRootURL + this.fileUtilUrl;
|
|
923
|
+
this.downloadUrl = ebizRootURL + this.downloadUrl;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Return a single OepaAttachment object from the contents of file.
|
|
927
|
+
* The file will have been saved on the server if this method succeeds.
|
|
928
|
+
* @param file
|
|
929
|
+
*/
|
|
930
|
+
uploadFile(file) {
|
|
931
|
+
const attachment = {};
|
|
932
|
+
attachment.userFilename = file.name;
|
|
933
|
+
// return new Observable<OepaAttachment>((observer) => observer.next(attachment));
|
|
934
|
+
const headers = new HttpHeaders();
|
|
935
|
+
const formData = new FormData();
|
|
936
|
+
formData.append('file', file, file.name);
|
|
937
|
+
/** No need to include Content-Type in Angular 4 */
|
|
938
|
+
headers.append('Content-Type', 'multipart/form-data');
|
|
939
|
+
headers.append('Accept', 'application/json');
|
|
940
|
+
return this.http.post(this.uploadUrl, formData)
|
|
941
|
+
.pipe(map((response) => {
|
|
942
|
+
let uploadedAttachment = {};
|
|
943
|
+
const attachments = response['attachments'];
|
|
944
|
+
if (attachments.length === 1) {
|
|
945
|
+
uploadedAttachment = attachments[0];
|
|
946
|
+
}
|
|
947
|
+
return uploadedAttachment;
|
|
948
|
+
}));
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Download an attachment from the server. The location and systemFileName
|
|
952
|
+
* attributes of the attachment must be set and represent a valid file
|
|
953
|
+
* on the file system.
|
|
954
|
+
* @param attachment
|
|
955
|
+
*/
|
|
956
|
+
downloadAttachment(attachment) {
|
|
957
|
+
const headers = new HttpHeaders();
|
|
958
|
+
headers.append('Content-type', 'application/json;odata=verbose');
|
|
959
|
+
return this.http.post(this.downloadUrl, attachment, { headers: headers, responseType: 'blob' });
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Open the file represented by data in the browser.
|
|
963
|
+
* @param data binary file data.
|
|
964
|
+
* @param mimeType the file's mime type.
|
|
965
|
+
* @param fileName optional name for the downloaded file.
|
|
966
|
+
*/
|
|
967
|
+
downloadFile(data, mimeType, fileName) {
|
|
968
|
+
if (data && mimeType) {
|
|
969
|
+
const blob = new Blob([data], { type: mimeType });
|
|
970
|
+
const url = window.URL.createObjectURL(blob);
|
|
971
|
+
if (!fileName || fileName.length === 0) {
|
|
972
|
+
window.open(url);
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
this.downLoadFileWithFileName(url, fileName);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
console.log('ERROR: downloadFile: missing data or mimeType');
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Utility method for downloading a file with a specific name.
|
|
984
|
+
* @param url
|
|
985
|
+
* @param fileName
|
|
986
|
+
*/
|
|
987
|
+
downLoadFileWithFileName(url, fileName) {
|
|
988
|
+
const a = document.createElement('a');
|
|
989
|
+
document.body.appendChild(a);
|
|
990
|
+
a.setAttribute('style', 'display: none');
|
|
991
|
+
a.setAttribute('href', url);
|
|
992
|
+
a.setAttribute('download', fileName);
|
|
993
|
+
a.click();
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Helper method to see if current browser is internet explorer
|
|
997
|
+
*/
|
|
998
|
+
browserIsIE() {
|
|
999
|
+
const ua = window.navigator.userAgent;
|
|
1000
|
+
const msie = ua.indexOf('MSIE ');
|
|
1001
|
+
if (msie > -1) {
|
|
1002
|
+
return true;
|
|
1003
|
+
}
|
|
1004
|
+
const trident = ua.indexOf('Trident/');
|
|
1005
|
+
if (trident > -1) {
|
|
1006
|
+
return true;
|
|
1007
|
+
}
|
|
1008
|
+
const edge = ua.indexOf('Edge/');
|
|
1009
|
+
if (edge > -1) {
|
|
1010
|
+
return true;
|
|
1011
|
+
}
|
|
1012
|
+
return false;
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Determine the mime time for fileName (based on its extension).
|
|
1016
|
+
* @param fileName
|
|
1017
|
+
*/
|
|
1018
|
+
mimeTypeForFile(fileName) {
|
|
1019
|
+
let mimeType;
|
|
1020
|
+
if (fileName && fileName.lastIndexOf('.') > -1) {
|
|
1021
|
+
const ext = fileName.substring(fileName.lastIndexOf('.'));
|
|
1022
|
+
mimeType = MIME_TYPES[ext.toLowerCase()];
|
|
1023
|
+
}
|
|
1024
|
+
if (!mimeType) {
|
|
1025
|
+
console.log('ERROR: mimeTypeForFile: No mime type found for file: ' + fileName);
|
|
1026
|
+
}
|
|
1027
|
+
return mimeType;
|
|
1028
|
+
}
|
|
1029
|
+
mimeTypeForExtension(extension) {
|
|
1030
|
+
let mimeType;
|
|
1031
|
+
let ext;
|
|
1032
|
+
if (extension) {
|
|
1033
|
+
ext = extension.toLowerCase();
|
|
1034
|
+
if (!ext.startsWith('.')) {
|
|
1035
|
+
ext = '.' + ext;
|
|
1036
|
+
}
|
|
1037
|
+
mimeType = MIME_TYPES[ext];
|
|
1038
|
+
}
|
|
1039
|
+
if (!mimeType) {
|
|
1040
|
+
console.log('ERROR: mimeTypeForExtension: No mime type found for extension: ' + extension);
|
|
1041
|
+
}
|
|
1042
|
+
return mimeType;
|
|
1043
|
+
}
|
|
1044
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaFileUtilService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1045
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaFileUtilService, providedIn: 'root' });
|
|
1046
|
+
}
|
|
1047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaFileUtilService, decorators: [{
|
|
1048
|
+
type: Injectable,
|
|
1049
|
+
args: [{
|
|
1050
|
+
providedIn: 'root'
|
|
1051
|
+
}]
|
|
1052
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1053
|
+
type: Inject,
|
|
1054
|
+
args: ['ebizRootURL']
|
|
1055
|
+
}] }] });
|
|
819
1056
|
|
|
820
1057
|
class OepaTableSortingDirective {
|
|
821
1058
|
tableService;
|
|
@@ -1784,13 +2021,13 @@ class TableComponent {
|
|
|
1784
2021
|
onCustomBtnClick() {
|
|
1785
2022
|
this.customBtnClicked.emit();
|
|
1786
2023
|
}
|
|
1787
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, deps: [{ token: i1$3.DomSanitizer }, { token: TableService }, { token: TableExportService }, { token:
|
|
2024
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, deps: [{ token: i1$3.DomSanitizer }, { token: TableService }, { token: TableExportService }, { token: OepaFileUtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1788
2025
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableComponent, selector: "oepa-table", inputs: { tableId: "tableId", config: "config", complexHeader: "complexHeader", header: "header", customBtnLabel: "customBtnLabel", customBtnVisible: "customBtnVisible", customBtnEnabled: "customBtnEnabled", data: "data", totalRow: "totalRow" }, outputs: { cellClicked: "cellClicked", actionClicked: "actionClicked", rowSelected: "rowSelected", customBtnClicked: "customBtnClicked" }, ngImport: i0, template: "<!-- Unhide select input - only visible if one or more columns are hidden -->\n\n<form *ngIf=\"hiddenColumns.length > 0\">\n <div class=\"row mb-2\">\n <label class=\"col-sm-2 col-form-label\">Show Hidden Columns:</label>\n <div class=\"col-sm-4\">\n <select class=\"form-select\" (change)=\"unhideColumn($any($event).target.value)\" [id]=\"tableId+'_UnhideColumnSelect'\">\n <option value=\"\">Choose a column</option>\n <option *ngFor=\"let col of hiddenColumns\" [value]=\"col.id\">{{col.title}}</option>\n </select>\n </div>\n </div>\n</form>\n<!-- This is the table -->\n<div ngClass=\"{{config.divClassName || ''}}\" >\n<table *ngIf=\"!config.hideTable\" class=\"table dataTable\" ngClass=\"{{config.className || ''}}\" role=\"grid\" style=\"width: 100%;\">\n\n<!-- This is the table header -->\n<thead>\n <!-- There may be multiple header rows -->\n <tr *ngFor=\"let hdr of headerRows; let hr=index;\" role=\"row\">\n <!-- Details indicator column (if data has details) -->\n <th *ngIf=\"dataHasDetails && hr === 0\" [rowSpan]=\"headerRows.length\" class=\"detail-indicator-col\">\n <span>\n <i (click)=\"toggleAllDetails()\" [id]=\"tableId+'_ShowAllDetailsLink'\" class=\"bi\" [ngClass]=\"{'bi-chevron-down': showAllDetails, 'bi-chevron-right': !showAllDetails}\"\n [tooltip]=\"(showAllDetails ? 'Hide' : 'Show') + ' details for all rows'\" placement=\"right\">\n </i>\n </span>\n </th>\n <ng-template ngFor let-column [ngForOf]=\"hdr.columns\" let-c=\"index\">\n <!-- Header cell -->\n <th *ngIf=\"!column.hidden\" ngClass=\"{{column.className || ''}}\" [colSpan]=\"column.colspan || 1\" [rowSpan]=\"column.rowspan || 1\">\n <!-- Select all Rows Checkbox -->\n <div class=\"text-center\">\n <input *ngIf=\"column.selectColumn\" type=\"checkbox\" [checked]=\"allRowsSelected\" (change)=\"toggleAllRowsSelection()\">\n\n <!-- Header cell text with sort capability (if specified) -->\n <span [oepaTableSorting]=\"true\" [column]=\"column\" [tableId]=\"tableId\" (sortChanged)=\"onSortChanged($event)\" [id]=\"tableId+'_SortColumnLink_'+column.id\">\n <span *ngIf=\"column.sort\"><i class=\"pull-left bi\" [ngClass]=\"{'bi-chevron-down': column.sort === 'desc', 'bi-chevron-up': column.sort === 'asc'}\"></i>\n <sup *ngIf=\"column?.sortIndex || 0 > 1\">{{column.sortIndex}}</sup></span>\n {{column.title}}\n </span>\n <!-- button to allow column to be hidden (if specified) -->\n <button *ngIf=\"column.hidden === false\" type=\"button\" class=\"btn-close float-end\" aria-label=\"Hide\" (click)=\"hideColumn(column)\"\n [id]=\"tableId+'_HideColumnLink'+'_'+column.id\">\n </button>\n\n </div>\n <!-- column filter (if specified) -->\n <div *ngIf=\"((rows && rows.length > 0) || !noFilters()) && column.filterable\" >\n <input [oepaTableFiltering]=\"{ filterString: '', columnId: column.id }\" [tableId]=\"tableId\" class=\"form-control input-sm\" (tableChanged)=\"onFilterChanged($event)\"\n [id]=\"tableId+'_FilterColumn_'+column.id\" />\n </div>\n </th>\n </ng-template>\n </tr>\n</thead>\n\n<!-- This is the table body -->\n<tbody>\n <ng-template ngFor let-row [ngForOf]=\"rows\" let-r=\"index\">\n <!-- Data Row -->\n <tr>\n <td *ngIf=\"dataHasDetails\">\n <!-- Detail icon (if specified) -->\n <span *ngIf=\"row.showDetail === true || row.showDetail === false\">\n <i *ngIf=\"row.detailIconClassName\" [ngClass]=\"row.detailIconClassName\"></i>\n <i (click)=\"toggleRowDetail(row)\" [id]=\"tableId+'_ShowDetailLink_'+r\" class=\"bi\" [ngClass]=\"{'bi-chevron-down': row.showDetail, 'bi-chevron-right': !row.showDetail}\"\n [tooltip]=\"(row.showDetail ? 'Hide' : 'Show') + ' details for this row'\" placement=\"right\">\n </i>\n </span>\n </td>\n <!-- If row is a divider, it spans the whole table -->\n <!-- <td *ngIf=\"row.isDivider\" [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\" [ngClass]=\"row.dividerClassName || 'oepa-table-gray'\"> </td> -->\n <!-- Data Rows -->\n <ng-template *ngIf=\"!row.isDivider\" ngFor let-col [ngForOf]=\"dataColumns\" let-i=\"index\">\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0\" ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <!-- Data Cell -->\n <div *ngIf=\"!col.actionColumn && !col.selectColumn && !col.singleSelectColumn\">\n <!-- Template for popover 1 -->\n <ng-template #popoverTemplate>\n <div *ngIf=\"row.popover\">\n <cml-template [templateInfo]=\"row.popover.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 1 icon (if specified) -->\n <span *ngIf=\"row.popover && i === (row.popoverColumnIndex || 0) && row.popover\" tabindex=\"0\" [popoverTitle]=\"row.popover.title\" [popover]=\"popoverTemplate\"\n [containerClass]=\"row.popover.containerClass\" placement=\"right\" [triggers]=\"row.popover.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover.className\" [id]=\"tableId+'_PopoverLink_'+r\"></i>\n </span>\n\n <!-- Template for popover 2 -->\n <ng-template #popover2Template>\n <div *ngIf=\"row.popover2\">\n <cml-template [templateInfo]=\"row.popover2.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 2 icon (if specified) -->\n <span *ngIf=\"i === (row.popover2ColumnIndex || 0) && row.popover2\" tabindex=\"0\" [popoverTitle]=\"row.popover2.title\" [popover]=\"popover2Template\"\n [containerClass]=\"row.popover2.containerClass\" placement=\"right\" [triggers]=\"row.popover2.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover2.className\" [id]=\"tableId+'_Popover2Link_'+r\"></i>\n </span>\n\n <!-- Template for popover 3 -->\n <ng-template #popover3Template>\n <div *ngIf=\"row.popover3\">\n <cml-template [templateInfo]=\"row.popover3.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 3 icon (if specified) -->\n <span *ngIf=\"i === (row.popover3ColumnIndex || 0) && row.popover3\" tabindex=\"0\" [popoverTitle]=\"row.popover3.title\" [popover]=\"popover3Template\"\n [containerClass]=\"row.popover3.containerClass\" placement=\"right\" [triggers]=\"row.popover3.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover3.className\" [id]=\"tableId+'_Popover3Link_'+r\"></i>\n </span>\n\n \n <!-- <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n <span *ngIf=\"!(row|cellInnerHTML:col)\">{{row|cellValue:col}}</span> -->\n\n <!-- If col is hyperlink, display data as a hyperlink -->\n <button *ngIf=\"col.hyperlink\" type=\"button\" class=\"btn btn-link\" (click)=\"cellClick(row, col.id)\" [id]=\"tableId+'_CellClick_'+r+'_'+i\">\n <span *ngIf=\"!(row|cellInnerHTML:col)\">\n <i [ngClass]=\"row|cellIconClassname:col\"></i>\n <span *ngIf=\"row|cellImgSrc:col\"><img [src]=\"row|cellImgSrc:col\"/></span>\n {{row|cellValue:col}}\n </span>\n <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n </button>\n <!-- If col is NOT hyperlink, just display data -->\n <span *ngIf=\"!col.hyperlink\">\n <span *ngIf=\"!(row|cellInnerHTML:col)\">\n <i ngClass=\"{{row|cellIconClassname:col || ''}}\"></i>\n <span *ngIf=\"row|cellImgSrc:col\"><img [src]=\"row|cellImgSrc:col\"/></span>\n {{row|cellValue:col}}\n </span>\n <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n </span>\n </div>\n <!-- Select Cell -->\n <div *ngIf=\"col.selectColumn\" class=\"text-center\">\n <input [id]=\"tableId+'_'+r\" type=\"checkbox\" [disabled]=\"!row.selectable\" [checked]=\"row.selected\" (change)=\"toggleRowSelection(row)\">\n </div>\n <!-- Single Select Cell -->\n <div *ngIf=\"col.singleSelectColumn\" class=\"text-center\">\n <input [id]=\"tableId+'_singleSelect_'+r\" type=\"radio\" [disabled]=\"!row.selectable\" [checked]=\"row.selected\" (change)=\"singleRowSelection(row)\">\n </div>\n <!-- Action Button Cell -->\n <div *ngIf=\"col.actionColumn && row.actions\">\n <oepa-action-btn [actions]=\"row.actions\" [data]=\"row.dataSource\" (actionClicked)=\"onActionClick($event)\" [btnId]=\"tableId+'_'+r\"></oepa-action-btn>\n </div>\n </td>\n </ng-template>\n </tr>\n\n <!-- Detail Row -->\n <tr *ngIf=\"row.showDetail\" class=\"table-info\">\n <td [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\">\n <cml-template [templateInfo]=\"row.detail\"></cml-template>\n </td>\n </tr>\n </ng-template>\n <tr *ngIf=\"totalRow\">\n <td *ngIf=\"dataHasDetails\">\n </td>\n <ng-template ngFor let-totalCol [ngForOf]=\"dataColumns\">\n <td *ngIf=\"!totalCol.hidden\" ngClass=\"{{totalRow|cellClassname:totalCol || ''}}\">\n <div>\n <span><i ngClass=\"{{totalRow|cellIconClassname:totalCol || ''}}\"></i>{{totalRow|cellValue:totalCol}}</span>\n </div>\n </td>\n </ng-template>\n </tr>\n</tbody>\n</table>\n</div>\n<!-- Table footer -->\n<form *ngIf=\"!config.hideFooter || (data && pageInfo.itemsPerPage < data.length)\" class=\"form-horizontal\">\n<div class=\"form-group row text-right\">\n <!-- Table-wide filter -->\n <div class=\"col-sm-4\">\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <input *ngIf=\"!config.hideGlobalFilter\" placeholder=\"Filter all columns\" [oepaTableFiltering]=\"{ filterString: '' }\" [tableId]=\"tableId\" class=\"form-control input-sm\" (tableChanged)=\"onFilterChanged($event)\"\n [id]=\"tableId+'_FilterAllColumnsInput'\" />\n </div>\n <div class=\"col-sm-6\">\n <span *ngIf=\"config.showRowCountInFooter && _data && _data.length > 0\">\n <span class=\"badge badge-secondary\" style=\"color: #999\">{{_data.length}}</span> total rows\n </span>\n </div>\n </div>\n </div>\n <!-- Export Buttons -->\n <div class=\"col-sm-4 d-flex justify-content-center\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <button type=\"button\" *ngIf=\"config.exportToExcel\" class=\"btn btn-primary mr-1\" (click)=\"exportToExcel()\" [id]=\"tableId+'_ExportToExcelBtn'\">Export to Excel</button>\n <button type=\"button\" *ngIf=\"config.exportToHTML\" class=\"btn btn-primary mr-1\" (click)=\"exportToHTML()\" [id]=\"tableId+'_ExportToHTMLBtn'\">Export to HTML</button>\n <button *ngIf=\"customBtnVisible\" type=\"button\" class=\"btn btn-primary mr-1\" (click)=\"onCustomBtnClick()\" [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled\">{{customBtnLabel}}</button>\n </div>\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"col-sm-12 text-center\">\n <span>Export only visible data: \n <input type=\"checkbox\" [checked]=\"exportVisibleOnly\" (click)=\"toggleExportVisibleOnly()\" id=\"exportVisibleOnlyCheckbox\"/>\n </span>\n </div>\n </div>\n </div>\n <!-- Pagination -->\n <div *ngIf=\"!config.disablePagination\" class=\"col-sm-4 d-flex justify-content-end\">\n <pagination *ngIf=\"paginationOn\" class=\"pagination-sm\" [totalItems]=\"pageInfo.length\" [itemsPerPage]=\"pageInfo.itemsPerPage\" [maxSize]=\"pageInfo.maxSize\"\n [(ngModel)]=\"currentPage\" name=\"currentTablePage\"\n [boundaryLinks]=\"true\" [rotate]=\"false\" (pageChanged)=\"onPageChanged($event)\" (numPages)=\"pageInfo.numPages = $event\">\n </pagination>\n \n <button (click)=\"togglePagingation()\" type=\"button\" class=\"btn btn-default btn-sm mr-1\">{{ paginationOn ? 'Show All Rows' : 'Restore Pagination'}}</button>\n </div>\n</div>\n</form>", styles: [".pagination{margin:0}th.oepa-table-header-center{text-align:center}.oepa-table-bold{font-weight:700}.oepa-table-italic{font-style:italic}.oepa-table-line-through{text-decoration:line-through}.oepa-table-gray{background-color:#ddd}td.oepa-undeline-cell{border-bottom:1pt solid black}.detail-indicator-col{width:30px}.action-btn-col{width:90px}.select-col{width:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: i9.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: i1$1.OepaTemplateComponent, selector: "cml-template", inputs: ["templateInfo"] }, { kind: "component", type: ActionBtnComponent, selector: "oepa-action-btn", inputs: ["label", "btnId", "data", "actions", "normalSize", "dropup"], outputs: ["actionClicked"] }, { kind: "directive", type: OepaTableSortingDirective, selector: "[oepaTableSorting]", inputs: ["tableId", "oepaTableSorting", "column"], outputs: ["sortChanged"] }, { kind: "directive", type: OepaTableFilteringDirective, selector: "[oepaTableFiltering]", inputs: ["oepaTableFiltering", "tableId"], outputs: ["tableChanged"] }, { kind: "pipe", type: OepaTableCellInnerHtmlPipe, name: "cellInnerHTML" }, { kind: "pipe", type: OepaTableCellColSpanPipe, name: "cellColspan" }, { kind: "pipe", type: OepaTableCellValuePipe, name: "cellValue" }, { kind: "pipe", type: OepaTableCellClassnamePipe, name: "cellClassname" }, { kind: "pipe", type: OepaTableCellIconClassnamePipe, name: "cellIconClassname" }, { kind: "pipe", type: OepaTableCellImgSrcPipe, name: "cellImgSrc" }] });
|
|
1789
2026
|
}
|
|
1790
2027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, decorators: [{
|
|
1791
2028
|
type: Component,
|
|
1792
2029
|
args: [{ selector: 'oepa-table', template: "<!-- Unhide select input - only visible if one or more columns are hidden -->\n\n<form *ngIf=\"hiddenColumns.length > 0\">\n <div class=\"row mb-2\">\n <label class=\"col-sm-2 col-form-label\">Show Hidden Columns:</label>\n <div class=\"col-sm-4\">\n <select class=\"form-select\" (change)=\"unhideColumn($any($event).target.value)\" [id]=\"tableId+'_UnhideColumnSelect'\">\n <option value=\"\">Choose a column</option>\n <option *ngFor=\"let col of hiddenColumns\" [value]=\"col.id\">{{col.title}}</option>\n </select>\n </div>\n </div>\n</form>\n<!-- This is the table -->\n<div ngClass=\"{{config.divClassName || ''}}\" >\n<table *ngIf=\"!config.hideTable\" class=\"table dataTable\" ngClass=\"{{config.className || ''}}\" role=\"grid\" style=\"width: 100%;\">\n\n<!-- This is the table header -->\n<thead>\n <!-- There may be multiple header rows -->\n <tr *ngFor=\"let hdr of headerRows; let hr=index;\" role=\"row\">\n <!-- Details indicator column (if data has details) -->\n <th *ngIf=\"dataHasDetails && hr === 0\" [rowSpan]=\"headerRows.length\" class=\"detail-indicator-col\">\n <span>\n <i (click)=\"toggleAllDetails()\" [id]=\"tableId+'_ShowAllDetailsLink'\" class=\"bi\" [ngClass]=\"{'bi-chevron-down': showAllDetails, 'bi-chevron-right': !showAllDetails}\"\n [tooltip]=\"(showAllDetails ? 'Hide' : 'Show') + ' details for all rows'\" placement=\"right\">\n </i>\n </span>\n </th>\n <ng-template ngFor let-column [ngForOf]=\"hdr.columns\" let-c=\"index\">\n <!-- Header cell -->\n <th *ngIf=\"!column.hidden\" ngClass=\"{{column.className || ''}}\" [colSpan]=\"column.colspan || 1\" [rowSpan]=\"column.rowspan || 1\">\n <!-- Select all Rows Checkbox -->\n <div class=\"text-center\">\n <input *ngIf=\"column.selectColumn\" type=\"checkbox\" [checked]=\"allRowsSelected\" (change)=\"toggleAllRowsSelection()\">\n\n <!-- Header cell text with sort capability (if specified) -->\n <span [oepaTableSorting]=\"true\" [column]=\"column\" [tableId]=\"tableId\" (sortChanged)=\"onSortChanged($event)\" [id]=\"tableId+'_SortColumnLink_'+column.id\">\n <span *ngIf=\"column.sort\"><i class=\"pull-left bi\" [ngClass]=\"{'bi-chevron-down': column.sort === 'desc', 'bi-chevron-up': column.sort === 'asc'}\"></i>\n <sup *ngIf=\"column?.sortIndex || 0 > 1\">{{column.sortIndex}}</sup></span>\n {{column.title}}\n </span>\n <!-- button to allow column to be hidden (if specified) -->\n <button *ngIf=\"column.hidden === false\" type=\"button\" class=\"btn-close float-end\" aria-label=\"Hide\" (click)=\"hideColumn(column)\"\n [id]=\"tableId+'_HideColumnLink'+'_'+column.id\">\n </button>\n\n </div>\n <!-- column filter (if specified) -->\n <div *ngIf=\"((rows && rows.length > 0) || !noFilters()) && column.filterable\" >\n <input [oepaTableFiltering]=\"{ filterString: '', columnId: column.id }\" [tableId]=\"tableId\" class=\"form-control input-sm\" (tableChanged)=\"onFilterChanged($event)\"\n [id]=\"tableId+'_FilterColumn_'+column.id\" />\n </div>\n </th>\n </ng-template>\n </tr>\n</thead>\n\n<!-- This is the table body -->\n<tbody>\n <ng-template ngFor let-row [ngForOf]=\"rows\" let-r=\"index\">\n <!-- Data Row -->\n <tr>\n <td *ngIf=\"dataHasDetails\">\n <!-- Detail icon (if specified) -->\n <span *ngIf=\"row.showDetail === true || row.showDetail === false\">\n <i *ngIf=\"row.detailIconClassName\" [ngClass]=\"row.detailIconClassName\"></i>\n <i (click)=\"toggleRowDetail(row)\" [id]=\"tableId+'_ShowDetailLink_'+r\" class=\"bi\" [ngClass]=\"{'bi-chevron-down': row.showDetail, 'bi-chevron-right': !row.showDetail}\"\n [tooltip]=\"(row.showDetail ? 'Hide' : 'Show') + ' details for this row'\" placement=\"right\">\n </i>\n </span>\n </td>\n <!-- If row is a divider, it spans the whole table -->\n <!-- <td *ngIf=\"row.isDivider\" [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\" [ngClass]=\"row.dividerClassName || 'oepa-table-gray'\"> </td> -->\n <!-- Data Rows -->\n <ng-template *ngIf=\"!row.isDivider\" ngFor let-col [ngForOf]=\"dataColumns\" let-i=\"index\">\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0\" ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <!-- Data Cell -->\n <div *ngIf=\"!col.actionColumn && !col.selectColumn && !col.singleSelectColumn\">\n <!-- Template for popover 1 -->\n <ng-template #popoverTemplate>\n <div *ngIf=\"row.popover\">\n <cml-template [templateInfo]=\"row.popover.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 1 icon (if specified) -->\n <span *ngIf=\"row.popover && i === (row.popoverColumnIndex || 0) && row.popover\" tabindex=\"0\" [popoverTitle]=\"row.popover.title\" [popover]=\"popoverTemplate\"\n [containerClass]=\"row.popover.containerClass\" placement=\"right\" [triggers]=\"row.popover.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover.className\" [id]=\"tableId+'_PopoverLink_'+r\"></i>\n </span>\n\n <!-- Template for popover 2 -->\n <ng-template #popover2Template>\n <div *ngIf=\"row.popover2\">\n <cml-template [templateInfo]=\"row.popover2.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 2 icon (if specified) -->\n <span *ngIf=\"i === (row.popover2ColumnIndex || 0) && row.popover2\" tabindex=\"0\" [popoverTitle]=\"row.popover2.title\" [popover]=\"popover2Template\"\n [containerClass]=\"row.popover2.containerClass\" placement=\"right\" [triggers]=\"row.popover2.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover2.className\" [id]=\"tableId+'_Popover2Link_'+r\"></i>\n </span>\n\n <!-- Template for popover 3 -->\n <ng-template #popover3Template>\n <div *ngIf=\"row.popover3\">\n <cml-template [templateInfo]=\"row.popover3.content\"></cml-template>\n </div>\n </ng-template>\n <!-- Popover 3 icon (if specified) -->\n <span *ngIf=\"i === (row.popover3ColumnIndex || 0) && row.popover3\" tabindex=\"0\" [popoverTitle]=\"row.popover3.title\" [popover]=\"popover3Template\"\n [containerClass]=\"row.popover3.containerClass\" placement=\"right\" [triggers]=\"row.popover3.trigger || 'mouseenter:mouseleave'\">\n <i [ngClass]=\"row.popover3.className\" [id]=\"tableId+'_Popover3Link_'+r\"></i>\n </span>\n\n \n <!-- <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n <span *ngIf=\"!(row|cellInnerHTML:col)\">{{row|cellValue:col}}</span> -->\n\n <!-- If col is hyperlink, display data as a hyperlink -->\n <button *ngIf=\"col.hyperlink\" type=\"button\" class=\"btn btn-link\" (click)=\"cellClick(row, col.id)\" [id]=\"tableId+'_CellClick_'+r+'_'+i\">\n <span *ngIf=\"!(row|cellInnerHTML:col)\">\n <i [ngClass]=\"row|cellIconClassname:col\"></i>\n <span *ngIf=\"row|cellImgSrc:col\"><img [src]=\"row|cellImgSrc:col\"/></span>\n {{row|cellValue:col}}\n </span>\n <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n </button>\n <!-- If col is NOT hyperlink, just display data -->\n <span *ngIf=\"!col.hyperlink\">\n <span *ngIf=\"!(row|cellInnerHTML:col)\">\n <i ngClass=\"{{row|cellIconClassname:col || ''}}\"></i>\n <span *ngIf=\"row|cellImgSrc:col\"><img [src]=\"row|cellImgSrc:col\"/></span>\n {{row|cellValue:col}}\n </span>\n <div *ngIf=\"row|cellInnerHTML:col\" [innerHTML]=\"row|cellInnerHTML:col\"></div>\n </span>\n </div>\n <!-- Select Cell -->\n <div *ngIf=\"col.selectColumn\" class=\"text-center\">\n <input [id]=\"tableId+'_'+r\" type=\"checkbox\" [disabled]=\"!row.selectable\" [checked]=\"row.selected\" (change)=\"toggleRowSelection(row)\">\n </div>\n <!-- Single Select Cell -->\n <div *ngIf=\"col.singleSelectColumn\" class=\"text-center\">\n <input [id]=\"tableId+'_singleSelect_'+r\" type=\"radio\" [disabled]=\"!row.selectable\" [checked]=\"row.selected\" (change)=\"singleRowSelection(row)\">\n </div>\n <!-- Action Button Cell -->\n <div *ngIf=\"col.actionColumn && row.actions\">\n <oepa-action-btn [actions]=\"row.actions\" [data]=\"row.dataSource\" (actionClicked)=\"onActionClick($event)\" [btnId]=\"tableId+'_'+r\"></oepa-action-btn>\n </div>\n </td>\n </ng-template>\n </tr>\n\n <!-- Detail Row -->\n <tr *ngIf=\"row.showDetail\" class=\"table-info\">\n <td [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\">\n <cml-template [templateInfo]=\"row.detail\"></cml-template>\n </td>\n </tr>\n </ng-template>\n <tr *ngIf=\"totalRow\">\n <td *ngIf=\"dataHasDetails\">\n </td>\n <ng-template ngFor let-totalCol [ngForOf]=\"dataColumns\">\n <td *ngIf=\"!totalCol.hidden\" ngClass=\"{{totalRow|cellClassname:totalCol || ''}}\">\n <div>\n <span><i ngClass=\"{{totalRow|cellIconClassname:totalCol || ''}}\"></i>{{totalRow|cellValue:totalCol}}</span>\n </div>\n </td>\n </ng-template>\n </tr>\n</tbody>\n</table>\n</div>\n<!-- Table footer -->\n<form *ngIf=\"!config.hideFooter || (data && pageInfo.itemsPerPage < data.length)\" class=\"form-horizontal\">\n<div class=\"form-group row text-right\">\n <!-- Table-wide filter -->\n <div class=\"col-sm-4\">\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <input *ngIf=\"!config.hideGlobalFilter\" placeholder=\"Filter all columns\" [oepaTableFiltering]=\"{ filterString: '' }\" [tableId]=\"tableId\" class=\"form-control input-sm\" (tableChanged)=\"onFilterChanged($event)\"\n [id]=\"tableId+'_FilterAllColumnsInput'\" />\n </div>\n <div class=\"col-sm-6\">\n <span *ngIf=\"config.showRowCountInFooter && _data && _data.length > 0\">\n <span class=\"badge badge-secondary\" style=\"color: #999\">{{_data.length}}</span> total rows\n </span>\n </div>\n </div>\n </div>\n <!-- Export Buttons -->\n <div class=\"col-sm-4 d-flex justify-content-center\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <button type=\"button\" *ngIf=\"config.exportToExcel\" class=\"btn btn-primary mr-1\" (click)=\"exportToExcel()\" [id]=\"tableId+'_ExportToExcelBtn'\">Export to Excel</button>\n <button type=\"button\" *ngIf=\"config.exportToHTML\" class=\"btn btn-primary mr-1\" (click)=\"exportToHTML()\" [id]=\"tableId+'_ExportToHTMLBtn'\">Export to HTML</button>\n <button *ngIf=\"customBtnVisible\" type=\"button\" class=\"btn btn-primary mr-1\" (click)=\"onCustomBtnClick()\" [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled\">{{customBtnLabel}}</button>\n </div>\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"col-sm-12 text-center\">\n <span>Export only visible data: \n <input type=\"checkbox\" [checked]=\"exportVisibleOnly\" (click)=\"toggleExportVisibleOnly()\" id=\"exportVisibleOnlyCheckbox\"/>\n </span>\n </div>\n </div>\n </div>\n <!-- Pagination -->\n <div *ngIf=\"!config.disablePagination\" class=\"col-sm-4 d-flex justify-content-end\">\n <pagination *ngIf=\"paginationOn\" class=\"pagination-sm\" [totalItems]=\"pageInfo.length\" [itemsPerPage]=\"pageInfo.itemsPerPage\" [maxSize]=\"pageInfo.maxSize\"\n [(ngModel)]=\"currentPage\" name=\"currentTablePage\"\n [boundaryLinks]=\"true\" [rotate]=\"false\" (pageChanged)=\"onPageChanged($event)\" (numPages)=\"pageInfo.numPages = $event\">\n </pagination>\n \n <button (click)=\"togglePagingation()\" type=\"button\" class=\"btn btn-default btn-sm mr-1\">{{ paginationOn ? 'Show All Rows' : 'Restore Pagination'}}</button>\n </div>\n</div>\n</form>", styles: [".pagination{margin:0}th.oepa-table-header-center{text-align:center}.oepa-table-bold{font-weight:700}.oepa-table-italic{font-style:italic}.oepa-table-line-through{text-decoration:line-through}.oepa-table-gray{background-color:#ddd}td.oepa-undeline-cell{border-bottom:1pt solid black}.detail-indicator-col{width:30px}.action-btn-col{width:90px}.select-col{width:20px}\n"] }]
|
|
1793
|
-
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }, { type: TableService }, { type: TableExportService }, { type:
|
|
2030
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }, { type: TableService }, { type: TableExportService }, { type: OepaFileUtilService }], propDecorators: { tableId: [{
|
|
1794
2031
|
type: Input
|
|
1795
2032
|
}], config: [{
|
|
1796
2033
|
type: Input
|
|
@@ -1932,10 +2169,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1932
2169
|
type: Output
|
|
1933
2170
|
}] } });
|
|
1934
2171
|
|
|
2172
|
+
class AccountSearchService {
|
|
2173
|
+
http;
|
|
2174
|
+
ebizRootURL;
|
|
2175
|
+
constructor(http, ebizRootURL) {
|
|
2176
|
+
this.http = http;
|
|
2177
|
+
this.ebizRootURL = ebizRootURL;
|
|
2178
|
+
}
|
|
2179
|
+
searchAccountsFromDB(searchURL, filter) {
|
|
2180
|
+
const headers = new HttpHeaders();
|
|
2181
|
+
headers.append('Content-Type', 'application/json');
|
|
2182
|
+
const url = this.ebizRootURL + searchURL;
|
|
2183
|
+
console.log('URL: ' + url);
|
|
2184
|
+
return this.http.post(url, filter, { headers: headers, responseType: 'json' });
|
|
2185
|
+
}
|
|
2186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2187
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchService, providedIn: 'root' });
|
|
2188
|
+
}
|
|
2189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchService, decorators: [{
|
|
2190
|
+
type: Injectable,
|
|
2191
|
+
args: [{
|
|
2192
|
+
providedIn: 'root'
|
|
2193
|
+
}]
|
|
2194
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
2195
|
+
type: Inject,
|
|
2196
|
+
args: ['ebizRootURL']
|
|
2197
|
+
}] }] });
|
|
2198
|
+
|
|
1935
2199
|
class AccountSearchModalComponent {
|
|
1936
2200
|
fb;
|
|
1937
2201
|
bsModalRef;
|
|
1938
|
-
|
|
2202
|
+
accountSearchService;
|
|
1939
2203
|
modalFormGroup;
|
|
1940
2204
|
errorMessage;
|
|
1941
2205
|
inProgressMsg;
|
|
@@ -1950,10 +2214,10 @@ class AccountSearchModalComponent {
|
|
|
1950
2214
|
};
|
|
1951
2215
|
searchURL = '/ebiz/api/v1/accounts/revenuesSearch';
|
|
1952
2216
|
onAccountSelected = new EventEmitter();
|
|
1953
|
-
constructor(fb, bsModalRef,
|
|
2217
|
+
constructor(fb, bsModalRef, accountSearchService) {
|
|
1954
2218
|
this.fb = fb;
|
|
1955
2219
|
this.bsModalRef = bsModalRef;
|
|
1956
|
-
this.
|
|
2220
|
+
this.accountSearchService = accountSearchService;
|
|
1957
2221
|
}
|
|
1958
2222
|
ngOnInit() {
|
|
1959
2223
|
this.createForm();
|
|
@@ -1997,7 +2261,7 @@ class AccountSearchModalComponent {
|
|
|
1997
2261
|
this.inProgressMsg = 'Searching...';
|
|
1998
2262
|
this.tableData = [];
|
|
1999
2263
|
this.buildTableHeader();
|
|
2000
|
-
this.searchAccountsFromDB(filter).subscribe({
|
|
2264
|
+
this.accountSearchService.searchAccountsFromDB(this.searchURL, filter).subscribe({
|
|
2001
2265
|
next: accounts => {
|
|
2002
2266
|
this.inProgressMsg = undefined;
|
|
2003
2267
|
if (accounts && accounts.length > 0) {
|
|
@@ -2054,20 +2318,13 @@ class AccountSearchModalComponent {
|
|
|
2054
2318
|
this.onAccountSelected.emit(this.selectedAccount);
|
|
2055
2319
|
this.bsModalRef.hide();
|
|
2056
2320
|
}
|
|
2057
|
-
|
|
2058
|
-
const headers = new HttpHeaders();
|
|
2059
|
-
headers.append('Content-Type', 'application/json');
|
|
2060
|
-
const url = this.searchURL;
|
|
2061
|
-
console.log('URL: ' + url);
|
|
2062
|
-
return this.http.post(url, filter, { headers: headers, responseType: 'json' });
|
|
2063
|
-
}
|
|
2064
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchModalComponent, deps: [{ token: i1$2.FormBuilder }, { token: i2$1.BsModalRef }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
2321
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchModalComponent, deps: [{ token: i1$2.FormBuilder }, { token: i2$1.BsModalRef }, { token: AccountSearchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2065
2322
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AccountSearchModalComponent, selector: "oepa-account-search-modal", inputs: { searchURL: "searchURL" }, outputs: { onAccountSelected: "onAccountSelected" }, ngImport: i0, template: "<div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Advanced Ebiz Account Search</h4>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"bsModalRef.hide()\">\n </button>\n</div>\n<div class=\"modal-body\">\n <accordion>\n <accordion-group panelClass=\"panel-info\" #searchGroup [isOpen]=\"openSearchCriteria\">\n <div accordion-heading>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <i class=\"float-xs-right bi\" id=\"accountSearchCriteria\" name=\"accountSearchCriteria\" \n [ngClass]=\"{'bi-chevron-down': searchGroup?.isOpen, 'bi-chevron-right': !searchGroup?.isOpen}\"></i>\n <b>Ebiz Account Search Criteria</b>\n </div>\n </div>\n </div>\n <form [formGroup]=\"modalFormGroup\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>Ebiz User ID</label>\n <input type=\"search\" class=\"form-control\" id=\"userUIDInput\" formControlName=\"userID\">\n </div>\n </div>\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>First Name</label>\n <input type=\"search\" class=\"form-control\" id=\"firstNameInput\" formControlName=\"firstName\">\n </div>\n </div>\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>Last Name</label>\n <input type=\"search\" class=\"form-control\" id=\"lastNameInput\" formControlName=\"lastName\">\n </div>\n </div>\n </div>\n \n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <span *ngIf=\"inProgressMsg\" class=\"spinner-border text-primary\" role=\"status\"></span>\n <button *ngIf=\"!inProgressMsg\" type=\"submit\" class=\"btn btn-primary mr-2\" id=\"submitSearchBtn\" (click)=\"submitSearch()\">Search</button>\n <button id=\"resetSearchBtn\" type=\"button\" class=\"btn btn-primary\" (click)=\"resetSearch()\">Reset</button>\n </div>\n </div>\n </form>\n </accordion-group>\n </accordion>\n <div *ngIf=\"tableData && tableData.length > 0\" class=\"card\">\n <div class=\"card-header\">\n <b>Ebiz Account List </b><span class=\"badge bg-secondary\">{{tableData.length}}</span>\n </div>\n <div class=\"card-body\" *ngIf=\"tableHeader\">\n <oepa-table tableId=\"accountSearchTable\" [config]=\"tableConfig\" [data]=\"tableData\" [header]=\"tableHeader\" (rowSelected)=\"onRowSelect($event)\">\n </oepa-table>\n </div>\n </div>\n</div>\n<div class=\"modal-footer d-block\">\n <div *ngIf=\"errorMessage\">\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n </div>\n <div *ngIf=\"inProgressMsg\">\n <div class=\"alert alert-info\">\n {{inProgressMsg}}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <button type=\"button\" class=\"btn btn-primary mr-2\"\n id=\"SaveAccountBtn\"\n [disabled]=\"!selectedAccount || inProgressMsg\"\n (click)=\"save()\">Save</button>\n <button id=\"CancelPaymentBtn\" type=\"button\" class=\"btn btn-primary\"\n (click)=\"bsModalRef.hide()\">Cancel</button>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.AccordionComponent, selector: "accordion", inputs: ["isAnimated", "closeOthers"] }, { kind: "component", type: i6.AccordionPanelComponent, selector: "accordion-group, accordion-panel", inputs: ["heading", "panelClass", "isDisabled", "isOpen"], outputs: ["isOpenChange"] }, { kind: "component", type: TableComponent, selector: "oepa-table", inputs: ["tableId", "config", "complexHeader", "header", "customBtnLabel", "customBtnVisible", "customBtnEnabled", "data", "totalRow"], outputs: ["cellClicked", "actionClicked", "rowSelected", "customBtnClicked"] }] });
|
|
2066
2323
|
}
|
|
2067
2324
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchModalComponent, decorators: [{
|
|
2068
2325
|
type: Component,
|
|
2069
2326
|
args: [{ selector: 'oepa-account-search-modal', template: "<div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">Advanced Ebiz Account Search</h4>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"bsModalRef.hide()\">\n </button>\n</div>\n<div class=\"modal-body\">\n <accordion>\n <accordion-group panelClass=\"panel-info\" #searchGroup [isOpen]=\"openSearchCriteria\">\n <div accordion-heading>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <i class=\"float-xs-right bi\" id=\"accountSearchCriteria\" name=\"accountSearchCriteria\" \n [ngClass]=\"{'bi-chevron-down': searchGroup?.isOpen, 'bi-chevron-right': !searchGroup?.isOpen}\"></i>\n <b>Ebiz Account Search Criteria</b>\n </div>\n </div>\n </div>\n <form [formGroup]=\"modalFormGroup\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>Ebiz User ID</label>\n <input type=\"search\" class=\"form-control\" id=\"userUIDInput\" formControlName=\"userID\">\n </div>\n </div>\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>First Name</label>\n <input type=\"search\" class=\"form-control\" id=\"firstNameInput\" formControlName=\"firstName\">\n </div>\n </div>\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label>Last Name</label>\n <input type=\"search\" class=\"form-control\" id=\"lastNameInput\" formControlName=\"lastName\">\n </div>\n </div>\n </div>\n \n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <span *ngIf=\"inProgressMsg\" class=\"spinner-border text-primary\" role=\"status\"></span>\n <button *ngIf=\"!inProgressMsg\" type=\"submit\" class=\"btn btn-primary mr-2\" id=\"submitSearchBtn\" (click)=\"submitSearch()\">Search</button>\n <button id=\"resetSearchBtn\" type=\"button\" class=\"btn btn-primary\" (click)=\"resetSearch()\">Reset</button>\n </div>\n </div>\n </form>\n </accordion-group>\n </accordion>\n <div *ngIf=\"tableData && tableData.length > 0\" class=\"card\">\n <div class=\"card-header\">\n <b>Ebiz Account List </b><span class=\"badge bg-secondary\">{{tableData.length}}</span>\n </div>\n <div class=\"card-body\" *ngIf=\"tableHeader\">\n <oepa-table tableId=\"accountSearchTable\" [config]=\"tableConfig\" [data]=\"tableData\" [header]=\"tableHeader\" (rowSelected)=\"onRowSelect($event)\">\n </oepa-table>\n </div>\n </div>\n</div>\n<div class=\"modal-footer d-block\">\n <div *ngIf=\"errorMessage\">\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n </div>\n <div *ngIf=\"inProgressMsg\">\n <div class=\"alert alert-info\">\n {{inProgressMsg}}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\">\n <button type=\"button\" class=\"btn btn-primary mr-2\"\n id=\"SaveAccountBtn\"\n [disabled]=\"!selectedAccount || inProgressMsg\"\n (click)=\"save()\">Save</button>\n <button id=\"CancelPaymentBtn\" type=\"button\" class=\"btn btn-primary\"\n (click)=\"bsModalRef.hide()\">Cancel</button>\n </div>\n </div>\n</div>" }]
|
|
2070
|
-
}], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: i2$1.BsModalRef }, { type:
|
|
2327
|
+
}], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: i2$1.BsModalRef }, { type: AccountSearchService }], propDecorators: { searchURL: [{
|
|
2071
2328
|
type: Input,
|
|
2072
2329
|
args: ['searchURL']
|
|
2073
2330
|
}], onAccountSelected: [{
|
|
@@ -2077,7 +2334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2077
2334
|
class AccountSearchInputComponent {
|
|
2078
2335
|
idService;
|
|
2079
2336
|
modalService;
|
|
2080
|
-
|
|
2337
|
+
accountSearchService;
|
|
2081
2338
|
nameSearch = '';
|
|
2082
2339
|
nameSource;
|
|
2083
2340
|
componentId;
|
|
@@ -2091,10 +2348,10 @@ class AccountSearchInputComponent {
|
|
|
2091
2348
|
errorMessageAddendum = '';
|
|
2092
2349
|
rowLayout = false;
|
|
2093
2350
|
accountSelected = new EventEmitter();
|
|
2094
|
-
constructor(idService, modalService,
|
|
2351
|
+
constructor(idService, modalService, accountSearchService) {
|
|
2095
2352
|
this.idService = idService;
|
|
2096
2353
|
this.modalService = modalService;
|
|
2097
|
-
this.
|
|
2354
|
+
this.accountSearchService = accountSearchService;
|
|
2098
2355
|
this.nameSource = new Observable((observer) => {
|
|
2099
2356
|
observer.next(this.group.get(this.field)?.value);
|
|
2100
2357
|
}).pipe(mergeMap((token) => this.searchAccounts(token)));
|
|
@@ -2106,7 +2363,7 @@ class AccountSearchInputComponent {
|
|
|
2106
2363
|
userID: this.userID
|
|
2107
2364
|
};
|
|
2108
2365
|
this.searching = true;
|
|
2109
|
-
this.searchAccountsFromDB(filter).subscribe({
|
|
2366
|
+
this.accountSearchService.searchAccountsFromDB(this.searchURL, filter).subscribe({
|
|
2110
2367
|
next: accountList => {
|
|
2111
2368
|
if (accountList && accountList.length == 1) {
|
|
2112
2369
|
this.loadAccountInForm(accountList[0]);
|
|
@@ -2154,18 +2411,11 @@ class AccountSearchInputComponent {
|
|
|
2154
2411
|
const filter = {
|
|
2155
2412
|
userID: token
|
|
2156
2413
|
};
|
|
2157
|
-
return this.searchAccountsFromDB(filter).pipe(map((accounts) => {
|
|
2414
|
+
return this.accountSearchService.searchAccountsFromDB(this.searchURL, filter).pipe(map((accounts) => {
|
|
2158
2415
|
this.searching = false;
|
|
2159
2416
|
return accounts;
|
|
2160
2417
|
}));
|
|
2161
2418
|
}
|
|
2162
|
-
searchAccountsFromDB(filter) {
|
|
2163
|
-
const headers = new HttpHeaders();
|
|
2164
|
-
headers.append('Content-Type', 'application/json');
|
|
2165
|
-
const url = this.searchURL;
|
|
2166
|
-
console.log('URL: ' + url);
|
|
2167
|
-
return this.http.post(url, filter, { headers: headers, responseType: 'json' });
|
|
2168
|
-
}
|
|
2169
2419
|
advancedSearch() {
|
|
2170
2420
|
console.log('URL: ' + this.searchURL);
|
|
2171
2421
|
const initialState = {
|
|
@@ -2177,13 +2427,13 @@ class AccountSearchInputComponent {
|
|
|
2177
2427
|
this.accountSelected.emit(account);
|
|
2178
2428
|
});
|
|
2179
2429
|
}
|
|
2180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchInputComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: i2$1.BsModalService }, { token:
|
|
2430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchInputComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: i2$1.BsModalService }, { token: AccountSearchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2181
2431
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AccountSearchInputComponent, selector: "oepa-account-search-input", inputs: { group: "group", userID: "userID", field: "field", title: "title", searchURL: "searchURL", errorMessageAddendum: "errorMessageAddendum", rowLayout: "rowLayout" }, outputs: { accountSelected: "accountSelected" }, ngImport: i0, template: "<div [formGroup]=\"group\" class=\"form-group\" [ngClass]=\"{'row text-right': rowLayout}\">\n <ng-template #accountTemplate let-model=\"item\" let-index=\"index\">\n <h5>{{ (model.userID || '') +\n (' - ' + model.firstName + ' ' + model.lastName + (model.company ? ' (' + model.company + ')' : '')) }}</h5>\n </ng-template>\n <label [ngClass]=\"{'col-sm-4 col-form-label': rowLayout}\">\n {{title}}\n <span *ngIf=\"searching\" class=\"spinner-border text-primary\" role=\"status\"></span>\n <a id=\"AdvancedSearch\" href=\"javascript:void(0)\" (click)=\"advancedSearch()\">Advanced Search</a>\n </label>\n <div [ngClass]=\"{'col-sm-8': rowLayout}\">\n <input class=\"form-control\" type=\"search\"\n [ngClass]=\"{'is-invalid':group.controls[field].status === 'INVALID', 'col-sm-8': rowLayout}\"\n [formControlName]=\"field\" [typeahead]=\"nameSource\" [typeaheadScrollable]=\"true\"\n (typeaheadOnSelect)=\"onAccountSelect($event)\" [id]=\"componentId + '_AccountSearch'\"\n [typeaheadItemTemplate]=\"accountTemplate\" [typeaheadMinLength]=\"3\" placeholder=\"Search Account\">\n <small class=\"invalid-feedback\" *ngIf=\"group.controls[field]?.hasError('required')\">{{title}} is required\n {{errorMessageAddendum}}</small>\n </div>\n</div>\n<div *ngIf=\"errorMessage\" class=\"alert alert-danger\">\n {{errorMessage}}\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.TypeaheadDirective, selector: "[typeahead]", inputs: ["typeahead", "typeaheadMinLength", "adaptivePosition", "isAnimated", "typeaheadWaitMs", "typeaheadOptionsLimit", "typeaheadOptionField", "typeaheadGroupField", "typeaheadOrderBy", "typeaheadAsync", "typeaheadLatinize", "typeaheadSingleWords", "typeaheadWordDelimiters", "typeaheadMultipleSearch", "typeaheadMultipleSearchDelimiters", "typeaheadPhraseDelimiters", "typeaheadItemTemplate", "optionsListTemplate", "typeaheadScrollable", "typeaheadOptionsInScrollableView", "typeaheadHideResultsOnBlur", "typeaheadSelectFirstItem", "typeaheadIsFirstItemActive", "container", "dropup"], outputs: ["typeaheadLoading", "typeaheadNoResults", "typeaheadOnSelect", "typeaheadOnPreview", "typeaheadOnBlur"], exportAs: ["bs-typeahead"] }] });
|
|
2182
2432
|
}
|
|
2183
2433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountSearchInputComponent, decorators: [{
|
|
2184
2434
|
type: Component,
|
|
2185
2435
|
args: [{ selector: 'oepa-account-search-input', template: "<div [formGroup]=\"group\" class=\"form-group\" [ngClass]=\"{'row text-right': rowLayout}\">\n <ng-template #accountTemplate let-model=\"item\" let-index=\"index\">\n <h5>{{ (model.userID || '') +\n (' - ' + model.firstName + ' ' + model.lastName + (model.company ? ' (' + model.company + ')' : '')) }}</h5>\n </ng-template>\n <label [ngClass]=\"{'col-sm-4 col-form-label': rowLayout}\">\n {{title}}\n <span *ngIf=\"searching\" class=\"spinner-border text-primary\" role=\"status\"></span>\n <a id=\"AdvancedSearch\" href=\"javascript:void(0)\" (click)=\"advancedSearch()\">Advanced Search</a>\n </label>\n <div [ngClass]=\"{'col-sm-8': rowLayout}\">\n <input class=\"form-control\" type=\"search\"\n [ngClass]=\"{'is-invalid':group.controls[field].status === 'INVALID', 'col-sm-8': rowLayout}\"\n [formControlName]=\"field\" [typeahead]=\"nameSource\" [typeaheadScrollable]=\"true\"\n (typeaheadOnSelect)=\"onAccountSelect($event)\" [id]=\"componentId + '_AccountSearch'\"\n [typeaheadItemTemplate]=\"accountTemplate\" [typeaheadMinLength]=\"3\" placeholder=\"Search Account\">\n <small class=\"invalid-feedback\" *ngIf=\"group.controls[field]?.hasError('required')\">{{title}} is required\n {{errorMessageAddendum}}</small>\n </div>\n</div>\n<div *ngIf=\"errorMessage\" class=\"alert alert-danger\">\n {{errorMessage}}\n</div>" }]
|
|
2186
|
-
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: i2$1.BsModalService }, { type:
|
|
2436
|
+
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: i2$1.BsModalService }, { type: AccountSearchService }], propDecorators: { group: [{
|
|
2187
2437
|
type: Input,
|
|
2188
2438
|
args: ['group']
|
|
2189
2439
|
}], userID: [{
|
|
@@ -3114,13 +3364,13 @@ class PTableComponent {
|
|
|
3114
3364
|
onCustomBtn2Click() {
|
|
3115
3365
|
this.customBtn2Clicked.emit();
|
|
3116
3366
|
}
|
|
3117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PTableComponent, deps: [{ token: i1$3.DomSanitizer }, { token: TableService }, { token: TableExportService }, { token:
|
|
3367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PTableComponent, deps: [{ token: i1$3.DomSanitizer }, { token: TableService }, { token: TableExportService }, { token: OepaFileUtilService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3118
3368
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PTableComponent, selector: "oepa-p-table", inputs: { tableId: "tableId", allowEdit: "allowEdit", config: "config", complexHeader: "complexHeader", header: "header", customBtnLabel: "customBtnLabel", customBtnVisible: "customBtnVisible", customBtnEnabled: "customBtnEnabled", customBtnLabel2: "customBtnLabel2", customBtnVisible2: "customBtnVisible2", customBtnEnabled2: "customBtnEnabled2", small: "small", data: "data", totalRow: "totalRow" }, outputs: { cellClicked: "cellClicked", actionClicked: "actionClicked", rowSelected: "rowSelected", customBtnClicked: "customBtnClicked", customBtn2Clicked: "customBtn2Clicked" }, ngImport: i0, template: "<div *ngIf=\"!config.hideTable\">\n <form *ngIf=\"hiddenColumns.length > 0\">\n <div class=\"row mb-2\">\n <label class=\"col-sm-2 col-form-label\">Show Hidden Columns:</label>\n <div class=\"col-sm-4\">\n <select class=\"form-select\" (change)=\"unhideColumn($any($event).target.value)\"\n [id]=\"tableId+'_UnhideColumnSelect'\">\n <option value=\"\">Choose a column</option>\n <option *ngFor=\"let col of hiddenColumns\" [value]=\"col.id\">{{col.title}}</option>\n </select>\n </div>\n </div>\n </form>\n\n <div ngClass=\"{{config.divClassName || ''}}\">\n <p-table [columns]=\"visibleColumns\" [value]=\"rows\" \n [scrollable]=\"config.verticalScroll\" [scrollHeight]=\"config.scrollHeight\"\n [tableStyle]=\"{'min-width': '50rem'}\">\n <ng-template pTemplate=\"header\" let-columns>\n <tr *ngFor=\"let hdr of headerRows; let hr=index;\" role=\"row\">\n <th *ngIf=\"dataHasDetails && hr === 0\" [rowSpan]=\"headerRows.length\" class=\"detail-indicator-col\">\n <span>\n <i (click)=\"toggleAllDetails()\" [id]=\"tableId+'_ShowAllDetailsLink'\" class=\"bi\"\n [ngClass]=\"{'bi-chevron-down': showAllDetails, 'bi-chevron-right': !showAllDetails}\"\n [tooltip]=\"(showAllDetails ? 'Hide' : 'Show') + ' details for all rows'\" placement=\"right\">\n </i>\n </span>\n </th>\n <ng-template ngFor let-col [ngForOf]=\"hdr.columns\" let-i=\"index\">\n <th *ngIf=\"!col.hidden && col.frozenColumn\" pFrozenColumn ngClass=\"{{col.className || ''}}\"\n [colSpan]=\"col.colspan || 1\" [rowSpan]=\"col.rowspan || 1\">\n <oepa-table-header-cell [column]=\"col\" [tableId]=\"tableId\" [allRowsSelected]=\"allRowsSelected\"\n [rowCount]=\"rows.length\" [noFiltersSubject]=\"noFiltersSubject\"\n (onToggleAllRowsSelection)=\"toggleAllRowsSelection()\" (onSortChanged)=\"onSortChanged($event)\"\n (onHideColumn)=\"hideColumn($event)\" (onFilterChanged)=\"onFilterChanged($event)\">\n </oepa-table-header-cell>\n </th>\n <th *ngIf=\"!col.hidden && !col.frozenColumn\" ngClass=\"{{col.className || ''}}\"\n [colSpan]=\"col.colspan || 1\" [rowSpan]=\"col.rowspan || 1\">\n <oepa-table-header-cell [column]=\"col\" [tableId]=\"tableId\" [allRowsSelected]=\"allRowsSelected\"\n [rowCount]=\"rows.length\" [noFiltersSubject]=\"noFiltersSubject\"\n (onToggleAllRowsSelection)=\"toggleAllRowsSelection()\" (onSortChanged)=\"onSortChanged($event)\"\n (onHideColumn)=\"hideColumn($event)\" (onFilterChanged)=\"onFilterChanged($event)\">\n </oepa-table-header-cell>\n </th>\n </ng-template>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-r=\"rowIndex\" let-columns=\"columns\">\n <!-- Data Row -->\n <tr>\n <td *ngIf=\"dataHasDetails\">\n <!-- Detail icon (if specified) -->\n <span *ngIf=\"row.showDetail === true || row.showDetail === false\">\n <i *ngIf=\"row.detailIconClassName\" [ngClass]=\"row.detailIconClassName\"></i>\n <i (click)=\"toggleRowDetail(row)\" [id]=\"tableId+'_ShowDetailLink_'+r\" class=\"bi\"\n [ngClass]=\"{'bi-chevron-down': row.showDetail, 'bi-chevron-right': !row.showDetail}\"\n [tooltip]=\"(row.showDetail ? 'Hide' : 'Show') + ' details for this row'\" placement=\"right\">\n </i>\n </span>\n </td>\n <!-- If row is a divider, it spans the whole table -->\n <td *ngIf=\"row.isDivider\" [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\"\n [ngClass]=\"row.dividerClassName || 'oepa-table-gray'\"> </td>\n <!-- Data Rows -->\n <ng-template *ngIf=\"!row.isDivider\" ngFor let-col [ngForOf]=\"dataColumns\" let-i=\"index\">\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0 &&!col.frozenColumn\"\n ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <oepa-table-data-cell [col]=\"col\" [i]=\"i\" [row]=\"row\" [r]=\"r\" [tableId]=\"tableId\"\n (onActionClick)=\"onActionClick($event)\" (onCellClick)=\"cellClick($event)\"\n (onToggleRowSelection)=\"toggleRowSelection($event)\"\n (onSingleRowSelection)=\"singleRowSelection($event)\"></oepa-table-data-cell>\n </td>\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0 &&col.frozenColumn\" pFrozenColumn\n ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <oepa-table-data-cell [col]=\"col\" [i]=\"i\" [row]=\"row\" [r]=\"r\" [tableId]=\"tableId\"\n (onActionClick)=\"onActionClick($event)\" (onCellClick)=\"cellClick($event)\"\n (onToggleRowSelection)=\"toggleRowSelection($event)\"\n (onSingleRowSelection)=\"singleRowSelection($event)\"></oepa-table-data-cell>\n </td>\n </ng-template>\n </tr>\n\n <!-- Detail Row -->\n <tr *ngIf=\"row.showDetail\" class=\"table-info\">\n <td [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\">\n <cml-template [templateInfo]=\"row.detail\"></cml-template>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n <!-- Table footer -->\n <form *ngIf=\"!config.hideFooter || (data && pageInfo.itemsPerPage < data.length)\" class=\"form-horizontal\">\n <div class=\"form-group row\">\n <!-- Table-wide filter -->\n <div class=\"col-sm-5\">\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <input *ngIf=\"!config.hideGlobalFilter\" placeholder=\"Filter all columns\"\n [oepaTableFiltering]=\"{ filterString: '' }\" [tableId]=\"tableId\" class=\"form-control input-sm\"\n (tableChanged)=\"onFilterChanged($event)\" [id]=\"tableId+'_FilterAllColumnsInput'\" />\n </div>\n <div class=\"col-sm-6\">\n <span *ngIf=\"config.showRowCountInFooter && _data && _data.length > 0\">\n <span class=\"badge bg-secondary\">{{_data.length}}</span> total rows\n </span>\n </div>\n </div>\n </div>\n <!-- Export Buttons -->\n <div class=\"col-sm-2 d-flex justify-content-center\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\" *ngIf=\"allowEdit\">\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"btn-group\" dropdown>\n <button id=\"exportBtn\" dropdownToggle type=\"button\" class=\"btn btn-primary dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n Export <span class=\"caret\"></span>\n <ul id=\"export-dropdown\" *dropdownMenu class=\"dropdown-menu\">\n <li *ngIf=\"config.exportToExcel\" role=\"menuitem\"><a class=\"dropdown-item\"\n (click)=\"exportToExcel()\">Export to Excel</a></li>\n <li *ngIf=\"config.exportToHTML\" role=\"menuitem\"><a class=\"dropdown-item\"\n (click)=\"exportToHTML()\">Export\n to HTML</a></li>\n </ul>\n </button>\n </div>\n <button *ngIf=\"customBtnVisible\" type=\"button\"\n ngClass=\"{{'btn btn-primary me-1' + (small ? ' btn-sm' : '')}}\" (click)=\"onCustomBtnClick()\"\n [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled\">{{customBtnLabel}}</button>\n <button *ngIf=\"customBtnVisible2\" type=\"button\"\n ngClass=\"{{'btn btn-primary me-1' + (small ? ' btn-sm' : '')}}\" (click)=\"onCustomBtn2Click()\"\n [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled2\">{{customBtnLabel2}}</button>\n </div>\n </div>\n </div>\n <!-- Pagination -->\n <div *ngIf=\"!config.disablePagination\" class=\"col-sm-5\">\n <div class=\"row\">\n <div class=\"col-sm-9\">\n <pagination *ngIf=\"paginationOn\" class=\"pagination-sm\" [totalItems]=\"pageInfo.length\"\n [itemsPerPage]=\"pageInfo.itemsPerPage\" [maxSize]=\"pageInfo.maxSize\" [(ngModel)]=\"currentPage\"\n name=\"currentTablePage\" [boundaryLinks]=\"true\" [rotate]=\"false\" (pageChanged)=\"onPageChanged($event)\"\n (numPages)=\"pageInfo.numPages = $event\">\n </pagination>\n </div>\n <div class=\"col-sm-3\">\n <button (click)=\"togglePagingation()\" type=\"button\" class=\"btn btn-default btn-sm me-1\">{{ paginationOn ?\n 'Show All Rows' : 'Restore Pagination'}}</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"col-sm-12 text-center\">\n <span>Export only visible data: \n <input type=\"checkbox\" [checked]=\"exportVisibleOnly\" (click)=\"toggleExportVisibleOnly()\"\n id=\"exportVisibleOnlyCheckbox\" />\n </span>\n </div>\n </div>\n </form>\n</div>", styles: [".pagination{margin:0}th.oepa-table-header-center{text-align:center}.oepa-table-bold{font-weight:700}.oepa-table-italic{font-style:italic}.oepa-table-line-through{text-decoration:line-through}.oepa-table-gray{background-color:#ddd}td.oepa-undeline-cell{border-bottom:1pt solid black}.detail-indicator-col{width:30px}.action-btn-col{width:90px}.select-col{width:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i7$1.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }, { kind: "directive", type: i9.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "directive", type: i3.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i3.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i3.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i11.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i10.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i1$1.OepaTemplateComponent, selector: "cml-template", inputs: ["templateInfo"] }, { kind: "component", type: TableDataCellComponent, selector: "oepa-table-data-cell", inputs: ["col", "row", "i", "r", "tableId"], outputs: ["onCellClick", "onToggleRowSelection", "onSingleRowSelection", "onActionClick"] }, { kind: "component", type: TableHeaderCellComponent, selector: "oepa-table-header-cell", inputs: ["column", "tableId", "allRowsSelected", "rowCount", "noFiltersSubject"], outputs: ["onToggleAllRowsSelection", "onSortChanged", "onHideColumn", "onFilterChanged"] }, { kind: "directive", type: OepaTableFilteringDirective, selector: "[oepaTableFiltering]", inputs: ["oepaTableFiltering", "tableId"], outputs: ["tableChanged"] }, { kind: "pipe", type: OepaTableCellColSpanPipe, name: "cellColspan" }, { kind: "pipe", type: OepaTableCellClassnamePipe, name: "cellClassname" }] });
|
|
3119
3369
|
}
|
|
3120
3370
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PTableComponent, decorators: [{
|
|
3121
3371
|
type: Component,
|
|
3122
3372
|
args: [{ selector: 'oepa-p-table', template: "<div *ngIf=\"!config.hideTable\">\n <form *ngIf=\"hiddenColumns.length > 0\">\n <div class=\"row mb-2\">\n <label class=\"col-sm-2 col-form-label\">Show Hidden Columns:</label>\n <div class=\"col-sm-4\">\n <select class=\"form-select\" (change)=\"unhideColumn($any($event).target.value)\"\n [id]=\"tableId+'_UnhideColumnSelect'\">\n <option value=\"\">Choose a column</option>\n <option *ngFor=\"let col of hiddenColumns\" [value]=\"col.id\">{{col.title}}</option>\n </select>\n </div>\n </div>\n </form>\n\n <div ngClass=\"{{config.divClassName || ''}}\">\n <p-table [columns]=\"visibleColumns\" [value]=\"rows\" \n [scrollable]=\"config.verticalScroll\" [scrollHeight]=\"config.scrollHeight\"\n [tableStyle]=\"{'min-width': '50rem'}\">\n <ng-template pTemplate=\"header\" let-columns>\n <tr *ngFor=\"let hdr of headerRows; let hr=index;\" role=\"row\">\n <th *ngIf=\"dataHasDetails && hr === 0\" [rowSpan]=\"headerRows.length\" class=\"detail-indicator-col\">\n <span>\n <i (click)=\"toggleAllDetails()\" [id]=\"tableId+'_ShowAllDetailsLink'\" class=\"bi\"\n [ngClass]=\"{'bi-chevron-down': showAllDetails, 'bi-chevron-right': !showAllDetails}\"\n [tooltip]=\"(showAllDetails ? 'Hide' : 'Show') + ' details for all rows'\" placement=\"right\">\n </i>\n </span>\n </th>\n <ng-template ngFor let-col [ngForOf]=\"hdr.columns\" let-i=\"index\">\n <th *ngIf=\"!col.hidden && col.frozenColumn\" pFrozenColumn ngClass=\"{{col.className || ''}}\"\n [colSpan]=\"col.colspan || 1\" [rowSpan]=\"col.rowspan || 1\">\n <oepa-table-header-cell [column]=\"col\" [tableId]=\"tableId\" [allRowsSelected]=\"allRowsSelected\"\n [rowCount]=\"rows.length\" [noFiltersSubject]=\"noFiltersSubject\"\n (onToggleAllRowsSelection)=\"toggleAllRowsSelection()\" (onSortChanged)=\"onSortChanged($event)\"\n (onHideColumn)=\"hideColumn($event)\" (onFilterChanged)=\"onFilterChanged($event)\">\n </oepa-table-header-cell>\n </th>\n <th *ngIf=\"!col.hidden && !col.frozenColumn\" ngClass=\"{{col.className || ''}}\"\n [colSpan]=\"col.colspan || 1\" [rowSpan]=\"col.rowspan || 1\">\n <oepa-table-header-cell [column]=\"col\" [tableId]=\"tableId\" [allRowsSelected]=\"allRowsSelected\"\n [rowCount]=\"rows.length\" [noFiltersSubject]=\"noFiltersSubject\"\n (onToggleAllRowsSelection)=\"toggleAllRowsSelection()\" (onSortChanged)=\"onSortChanged($event)\"\n (onHideColumn)=\"hideColumn($event)\" (onFilterChanged)=\"onFilterChanged($event)\">\n </oepa-table-header-cell>\n </th>\n </ng-template>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-r=\"rowIndex\" let-columns=\"columns\">\n <!-- Data Row -->\n <tr>\n <td *ngIf=\"dataHasDetails\">\n <!-- Detail icon (if specified) -->\n <span *ngIf=\"row.showDetail === true || row.showDetail === false\">\n <i *ngIf=\"row.detailIconClassName\" [ngClass]=\"row.detailIconClassName\"></i>\n <i (click)=\"toggleRowDetail(row)\" [id]=\"tableId+'_ShowDetailLink_'+r\" class=\"bi\"\n [ngClass]=\"{'bi-chevron-down': row.showDetail, 'bi-chevron-right': !row.showDetail}\"\n [tooltip]=\"(row.showDetail ? 'Hide' : 'Show') + ' details for this row'\" placement=\"right\">\n </i>\n </span>\n </td>\n <!-- If row is a divider, it spans the whole table -->\n <td *ngIf=\"row.isDivider\" [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\"\n [ngClass]=\"row.dividerClassName || 'oepa-table-gray'\"> </td>\n <!-- Data Rows -->\n <ng-template *ngIf=\"!row.isDivider\" ngFor let-col [ngForOf]=\"dataColumns\" let-i=\"index\">\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0 &&!col.frozenColumn\"\n ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <oepa-table-data-cell [col]=\"col\" [i]=\"i\" [row]=\"row\" [r]=\"r\" [tableId]=\"tableId\"\n (onActionClick)=\"onActionClick($event)\" (onCellClick)=\"cellClick($event)\"\n (onToggleRowSelection)=\"toggleRowSelection($event)\"\n (onSingleRowSelection)=\"singleRowSelection($event)\"></oepa-table-data-cell>\n </td>\n <td *ngIf=\"!col.hidden && (row|cellColspan:col) > 0 &&col.frozenColumn\" pFrozenColumn\n ngClass=\"{{row|cellClassname:col || ''}}\" [colSpan]=\"row|cellColspan:col\">\n <oepa-table-data-cell [col]=\"col\" [i]=\"i\" [row]=\"row\" [r]=\"r\" [tableId]=\"tableId\"\n (onActionClick)=\"onActionClick($event)\" (onCellClick)=\"cellClick($event)\"\n (onToggleRowSelection)=\"toggleRowSelection($event)\"\n (onSingleRowSelection)=\"singleRowSelection($event)\"></oepa-table-data-cell>\n </td>\n </ng-template>\n </tr>\n\n <!-- Detail Row -->\n <tr *ngIf=\"row.showDetail\" class=\"table-info\">\n <td [colSpan]=\"visibleColumnCount + (dataHasDetails ? 1 : 0)\">\n <cml-template [templateInfo]=\"row.detail\"></cml-template>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n <!-- Table footer -->\n <form *ngIf=\"!config.hideFooter || (data && pageInfo.itemsPerPage < data.length)\" class=\"form-horizontal\">\n <div class=\"form-group row\">\n <!-- Table-wide filter -->\n <div class=\"col-sm-5\">\n <div class=\"row\">\n <div class=\"col-sm-6\">\n <input *ngIf=\"!config.hideGlobalFilter\" placeholder=\"Filter all columns\"\n [oepaTableFiltering]=\"{ filterString: '' }\" [tableId]=\"tableId\" class=\"form-control input-sm\"\n (tableChanged)=\"onFilterChanged($event)\" [id]=\"tableId+'_FilterAllColumnsInput'\" />\n </div>\n <div class=\"col-sm-6\">\n <span *ngIf=\"config.showRowCountInFooter && _data && _data.length > 0\">\n <span class=\"badge bg-secondary\">{{_data.length}}</span> total rows\n </span>\n </div>\n </div>\n </div>\n <!-- Export Buttons -->\n <div class=\"col-sm-2 d-flex justify-content-center\">\n <div class=\"row\">\n <div class=\"col-sm-12 text-center\" *ngIf=\"allowEdit\">\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"btn-group\" dropdown>\n <button id=\"exportBtn\" dropdownToggle type=\"button\" class=\"btn btn-primary dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n Export <span class=\"caret\"></span>\n <ul id=\"export-dropdown\" *dropdownMenu class=\"dropdown-menu\">\n <li *ngIf=\"config.exportToExcel\" role=\"menuitem\"><a class=\"dropdown-item\"\n (click)=\"exportToExcel()\">Export to Excel</a></li>\n <li *ngIf=\"config.exportToHTML\" role=\"menuitem\"><a class=\"dropdown-item\"\n (click)=\"exportToHTML()\">Export\n to HTML</a></li>\n </ul>\n </button>\n </div>\n <button *ngIf=\"customBtnVisible\" type=\"button\"\n ngClass=\"{{'btn btn-primary me-1' + (small ? ' btn-sm' : '')}}\" (click)=\"onCustomBtnClick()\"\n [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled\">{{customBtnLabel}}</button>\n <button *ngIf=\"customBtnVisible2\" type=\"button\"\n ngClass=\"{{'btn btn-primary me-1' + (small ? ' btn-sm' : '')}}\" (click)=\"onCustomBtn2Click()\"\n [id]=\"tableId+'_CustomBtn'\" [disabled]=\"!customBtnEnabled2\">{{customBtnLabel2}}</button>\n </div>\n </div>\n </div>\n <!-- Pagination -->\n <div *ngIf=\"!config.disablePagination\" class=\"col-sm-5\">\n <div class=\"row\">\n <div class=\"col-sm-9\">\n <pagination *ngIf=\"paginationOn\" class=\"pagination-sm\" [totalItems]=\"pageInfo.length\"\n [itemsPerPage]=\"pageInfo.itemsPerPage\" [maxSize]=\"pageInfo.maxSize\" [(ngModel)]=\"currentPage\"\n name=\"currentTablePage\" [boundaryLinks]=\"true\" [rotate]=\"false\" (pageChanged)=\"onPageChanged($event)\"\n (numPages)=\"pageInfo.numPages = $event\">\n </pagination>\n </div>\n <div class=\"col-sm-3\">\n <button (click)=\"togglePagingation()\" type=\"button\" class=\"btn btn-default btn-sm me-1\">{{ paginationOn ?\n 'Show All Rows' : 'Restore Pagination'}}</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"config.exportToExcel || config.exportToHTML\" class=\"col-sm-12 text-center\">\n <span>Export only visible data: \n <input type=\"checkbox\" [checked]=\"exportVisibleOnly\" (click)=\"toggleExportVisibleOnly()\"\n id=\"exportVisibleOnlyCheckbox\" />\n </span>\n </div>\n </div>\n </form>\n</div>", styles: [".pagination{margin:0}th.oepa-table-header-center{text-align:center}.oepa-table-bold{font-weight:700}.oepa-table-italic{font-style:italic}.oepa-table-line-through{text-decoration:line-through}.oepa-table-gray{background-color:#ddd}td.oepa-undeline-cell{border-bottom:1pt solid black}.detail-indicator-col{width:30px}.action-btn-col{width:90px}.select-col{width:20px}\n"] }]
|
|
3123
|
-
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }, { type: TableService }, { type: TableExportService }, { type:
|
|
3373
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }, { type: TableService }, { type: TableExportService }, { type: OepaFileUtilService }, { type: i0.ElementRef }], propDecorators: { tableId: [{
|
|
3124
3374
|
type: Input
|
|
3125
3375
|
}], allowEdit: [{
|
|
3126
3376
|
type: Input
|
|
@@ -3462,13 +3712,13 @@ class FileUploadComponent {
|
|
|
3462
3712
|
this.downloadFile(this.blankForm);
|
|
3463
3713
|
}
|
|
3464
3714
|
}
|
|
3465
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token:
|
|
3715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: OepaFileUtilService }, { token: i2$1.BsModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3466
3716
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FileUploadComponent, selector: "oepa-file-upload", inputs: { group: "group", field: "field", label: "label", errorLabel: "errorLabel", blankForm: "blankForm", blankFormUrl: "blankFormUrl", showValidation: "showValidation", domain: "domain", attachment: "attachment", accept: "accept", removeAllowed: "removeAllowed", parserName: "parserName", parserReport: "parserReport" }, outputs: { fileUploaded: "fileUploaded", fileRemoved: "fileRemoved", download: "download" }, ngImport: i0, template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!attachment || !attachment.userFilename\" class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <span *ngIf=\"blankFormUrl\"> <a href=\"{{blankFormUrl}}\" target=\"_blank\">Blank Form</a></span>\n <span *ngIf=\"blankForm\"> <a href=\"javascript:void(0)\" (click)=\"downloadBlankForm()\">Blank Form</a></span>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse… \n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\" \n type=\"text\" class=\"form-control\" placeholder=\"No file chosen\" [id]=\"componentId+'_Input'\" [name]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\"/>\n </div>\n </div>\n <div *ngIf=\"uploadError\" class=\"alert alert-danger\" role=\"alert\">{{uploadError}}</div>\n <div *ngIf=\"parserReport\">\n <div *ngIf=\"parserReport.successful\" class=\"alert alert-info\" role=\"alert\">Spreadsheet was successfully parsed.</div>\n <div *ngIf=\"!parserReport.successful\" class=\"alert alert-danger\" role=\"alert\">\n There are errors in the uploaded spreadsheet:\n <ul>\n <li *ngFor=\"let error of parserReport.errors\">{{error.message}}</li>\n </ul>\n </div>\n </div>\n </div>\n <div *ngIf=\"attachment && attachment.userFilename\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink'\" [name]=\"componentId+'_DownloadFileLink'\" \n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn'\" [name]=\"componentId+'_RemoveFileBtn'\"\n (click)=\"removeFile()\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n \n\t\t\t</span>\n </div>\n </div>\n </div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
3467
3717
|
}
|
|
3468
3718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
3469
3719
|
type: Component,
|
|
3470
3720
|
args: [{ selector: 'oepa-file-upload', template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!attachment || !attachment.userFilename\" class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <span *ngIf=\"blankFormUrl\"> <a href=\"{{blankFormUrl}}\" target=\"_blank\">Blank Form</a></span>\n <span *ngIf=\"blankForm\"> <a href=\"javascript:void(0)\" (click)=\"downloadBlankForm()\">Blank Form</a></span>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse… \n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\" \n type=\"text\" class=\"form-control\" placeholder=\"No file chosen\" [id]=\"componentId+'_Input'\" [name]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\"/>\n </div>\n </div>\n <div *ngIf=\"uploadError\" class=\"alert alert-danger\" role=\"alert\">{{uploadError}}</div>\n <div *ngIf=\"parserReport\">\n <div *ngIf=\"parserReport.successful\" class=\"alert alert-info\" role=\"alert\">Spreadsheet was successfully parsed.</div>\n <div *ngIf=\"!parserReport.successful\" class=\"alert alert-danger\" role=\"alert\">\n There are errors in the uploaded spreadsheet:\n <ul>\n <li *ngFor=\"let error of parserReport.errors\">{{error.message}}</li>\n </ul>\n </div>\n </div>\n </div>\n <div *ngIf=\"attachment && attachment.userFilename\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink'\" [name]=\"componentId+'_DownloadFileLink'\" \n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn'\" [name]=\"componentId+'_RemoveFileBtn'\"\n (click)=\"removeFile()\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n \n\t\t\t</span>\n </div>\n </div>\n </div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"] }]
|
|
3471
|
-
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type:
|
|
3721
|
+
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: OepaFileUtilService }, { type: i2$1.BsModalService }], propDecorators: { group: [{
|
|
3472
3722
|
type: Input
|
|
3473
3723
|
}], field: [{
|
|
3474
3724
|
type: Input
|
|
@@ -3595,13 +3845,13 @@ class MultiFileUploadComponent {
|
|
|
3595
3845
|
this.downloadFile(this.blankForm);
|
|
3596
3846
|
}
|
|
3597
3847
|
}
|
|
3598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MultiFileUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token:
|
|
3848
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MultiFileUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: OepaFileUtilService }, { token: i2$1.BsModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3599
3849
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MultiFileUploadComponent, selector: "oepa-multi-file-upload", inputs: { group: "group", field: "field", label: "label", errorLabel: "errorLabel", blankForm: "blankForm", blankFormUrl: "blankFormUrl", showValidation: "showValidation", domain: "domain", attachments: "attachments", removeAllowed: "removeAllowed" }, outputs: { fileUploaded: "fileUploaded", fileRemoved: "fileRemoved", download: "download" }, viewQueries: [{ propertyName: "myFileInput", first: true, predicate: ["myFileInput"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"group\">\n <div class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <span *ngIf=\"blankFormUrl\"> <a href=\"{{blankFormUrl}}\" target=\"_blank\">Blank Form</a></span>\n <span *ngIf=\"blankForm\"> <a href=\"\" (click)=\"downloadBlankForm()\">Blank Form</a></span>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse… \n <input #myFileInput type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\"\n type=\"text\" class=\"form-control\" \n [placeholder]=\"(!attachments || attachments.length === 0) ? 'No files uploaded' : (attachments.length + ' file(s) uploaded')\"\n [id]=\"componentId+'_Input'\" [name]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\"/>\n </div>\n </div>\n <div *ngIf=\"uploadError\" class=\"alert alert-danger\" role=\"alert\">{{uploadError}}</div>\n <div *ngIf=\"parserReport\">\n <div *ngIf=\"!attachments[0] && parserReport.successful\" class=\"alert alert-info\" role=\"alert\">Spreadsheet was successfully parsed.</div>\n <div [hidden]=\"parserReport.successful\" class=\"alert alert-danger\" role=\"alert\">\n There are errors in the uploaded spreadsheet:\n <ul>\n <li *ngFor=\"let error of parserReport.errors\">{{error.message}}</li>\n </ul>\n </div>\n </div>\n </div>\n <div *ngIf=\"attachments && attachments[0]\">\n <div *ngFor=\"let attachment of attachments; let i=index;\">\n <div class=\"form-group\">\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink_'+i\" [name]=\"componentId+'_DownloadFileLink_'+i\"\n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn_'+i\" [name]=\"componentId+'_RemoveFileBtn_'+i\"\n (click)=\"removeFile(attachment)\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n </span>\n </div>\n </div>\n </div>\n </div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
3600
3850
|
}
|
|
3601
3851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MultiFileUploadComponent, decorators: [{
|
|
3602
3852
|
type: Component,
|
|
3603
3853
|
args: [{ selector: 'oepa-multi-file-upload', template: "<form [formGroup]=\"group\">\n <div class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <span *ngIf=\"blankFormUrl\"> <a href=\"{{blankFormUrl}}\" target=\"_blank\">Blank Form</a></span>\n <span *ngIf=\"blankForm\"> <a href=\"\" (click)=\"downloadBlankForm()\">Blank Form</a></span>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse… \n <input #myFileInput type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\"\n type=\"text\" class=\"form-control\" \n [placeholder]=\"(!attachments || attachments.length === 0) ? 'No files uploaded' : (attachments.length + ' file(s) uploaded')\"\n [id]=\"componentId+'_Input'\" [name]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\"/>\n </div>\n </div>\n <div *ngIf=\"uploadError\" class=\"alert alert-danger\" role=\"alert\">{{uploadError}}</div>\n <div *ngIf=\"parserReport\">\n <div *ngIf=\"!attachments[0] && parserReport.successful\" class=\"alert alert-info\" role=\"alert\">Spreadsheet was successfully parsed.</div>\n <div [hidden]=\"parserReport.successful\" class=\"alert alert-danger\" role=\"alert\">\n There are errors in the uploaded spreadsheet:\n <ul>\n <li *ngFor=\"let error of parserReport.errors\">{{error.message}}</li>\n </ul>\n </div>\n </div>\n </div>\n <div *ngIf=\"attachments && attachments[0]\">\n <div *ngFor=\"let attachment of attachments; let i=index;\">\n <div class=\"form-group\">\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink_'+i\" [name]=\"componentId+'_DownloadFileLink_'+i\"\n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn_'+i\" [name]=\"componentId+'_RemoveFileBtn_'+i\"\n (click)=\"removeFile(attachment)\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n </span>\n </div>\n </div>\n </div>\n </div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"] }]
|
|
3604
|
-
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type:
|
|
3854
|
+
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: OepaFileUtilService }, { type: i2$1.BsModalService }], propDecorators: { group: [{
|
|
3605
3855
|
type: Input
|
|
3606
3856
|
}], field: [{
|
|
3607
3857
|
type: Input
|
|
@@ -3830,9 +4080,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3830
4080
|
|
|
3831
4081
|
class EntityService {
|
|
3832
4082
|
http;
|
|
4083
|
+
ebizRootURL;
|
|
3833
4084
|
entityURL = '/ebiz/api/v1/entities';
|
|
3834
|
-
constructor(http) {
|
|
4085
|
+
constructor(http, ebizRootURL) {
|
|
3835
4086
|
this.http = http;
|
|
4087
|
+
this.ebizRootURL = ebizRootURL;
|
|
4088
|
+
this.entityURL = ebizRootURL + this.entityURL;
|
|
3836
4089
|
}
|
|
3837
4090
|
searchPersons(filter) {
|
|
3838
4091
|
const headers = new HttpHeaders();
|
|
@@ -3918,7 +4171,7 @@ class EntityService {
|
|
|
3918
4171
|
const url = this.entityURL + '/programs';
|
|
3919
4172
|
return this.http.get(url, { headers: headers, responseType: 'json' });
|
|
3920
4173
|
}
|
|
3921
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EntityService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EntityService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3922
4175
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EntityService, providedIn: 'root' });
|
|
3923
4176
|
}
|
|
3924
4177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EntityService, decorators: [{
|
|
@@ -3926,7 +4179,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3926
4179
|
args: [{
|
|
3927
4180
|
providedIn: 'root'
|
|
3928
4181
|
}]
|
|
3929
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
4182
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
4183
|
+
type: Inject,
|
|
4184
|
+
args: ['ebizRootURL']
|
|
4185
|
+
}] }] });
|
|
3930
4186
|
|
|
3931
4187
|
class OrganizationCreateModalComponent {
|
|
3932
4188
|
fb;
|
|
@@ -5907,9 +6163,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5907
6163
|
|
|
5908
6164
|
class EdocAttachmentService {
|
|
5909
6165
|
http;
|
|
6166
|
+
ebizRootURL;
|
|
5910
6167
|
fileUtilUrl = '/ebiz/api/v1/fileutil';
|
|
5911
|
-
constructor(http) {
|
|
6168
|
+
constructor(http, ebizRootURL) {
|
|
5912
6169
|
this.http = http;
|
|
6170
|
+
this.ebizRootURL = ebizRootURL;
|
|
6171
|
+
this.fileUtilUrl = ebizRootURL + this.fileUtilUrl;
|
|
5913
6172
|
}
|
|
5914
6173
|
createEDocAttachment(eDocAttachment) {
|
|
5915
6174
|
let url = this.fileUtilUrl + '/eDocumentAttachments';
|
|
@@ -5929,7 +6188,7 @@ class EdocAttachmentService {
|
|
|
5929
6188
|
headers.append('Content-type', 'application/json;odata=verbose');
|
|
5930
6189
|
return this.http.get(url, { headers: headers, responseType: 'blob' });
|
|
5931
6190
|
}
|
|
5932
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5933
6192
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentService, providedIn: 'root' });
|
|
5934
6193
|
}
|
|
5935
6194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentService, decorators: [{
|
|
@@ -5937,7 +6196,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5937
6196
|
args: [{
|
|
5938
6197
|
providedIn: 'root'
|
|
5939
6198
|
}]
|
|
5940
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
6199
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
6200
|
+
type: Inject,
|
|
6201
|
+
args: ['ebizRootURL']
|
|
6202
|
+
}] }] });
|
|
5941
6203
|
|
|
5942
6204
|
class EdocAttachmentComponent {
|
|
5943
6205
|
idService;
|
|
@@ -6115,13 +6377,13 @@ class EdocAttachmentComponent {
|
|
|
6115
6377
|
}
|
|
6116
6378
|
});
|
|
6117
6379
|
}
|
|
6118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token:
|
|
6380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: OepaFileUtilService }, { token: EdocAttachmentService }, { token: i2$1.BsModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6119
6381
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: EdocAttachmentComponent, selector: "oepa-edoc-attachment", inputs: { attachment: "attachment", group: "group", field: "field", label: "label", errorLabel: "errorLabel", showValidation: "showValidation", accept: "accept", removeAllowed: "removeAllowed", okToDelete: "okToDelete" }, outputs: { fileUploaded: "fileUploaded", fileRemoved: "fileRemoved", download: "download" }, ngImport: i0, template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!attachment || !attachment.userFilename\" class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span *ngIf=\"!busy\" class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse…\n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\"\n [id]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <span *ngIf=\"busy\"> <span class=\"spinner-border text-primary\" role=\"status\"></span></span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\"\n type=\"text\" class=\"form-control\" placeholder=\"No file chosen\" [id]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\"\n *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is\n required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\" />\n </div>\n </div>\n </div>\n <div *ngIf=\"attachment && attachment.userFilename\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink'\" \n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed && !busy\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn'\"\n (click)=\"removeFile()\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n </span>\n <span *ngIf=\"busy\"> <span class=\"spinner-border text-primary\" role=\"status\"></span></span>\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMsg\" class=\"alert alert-danger\" role=\"alert\">{{errorMsg}}</div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
6120
6382
|
}
|
|
6121
6383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EdocAttachmentComponent, decorators: [{
|
|
6122
6384
|
type: Component,
|
|
6123
6385
|
args: [{ selector: 'oepa-edoc-attachment', template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!attachment || !attachment.userFilename\" class=\"form-group\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"form-group\">\n <div class=\"input-group\">\n <span *ngIf=\"!busy\" class=\"input-group-btn\">\n <label class=\"btn btn-primary btn-file\">\n Browse…\n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\"\n [id]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n </span>\n <span *ngIf=\"busy\"> <span class=\"spinner-border text-primary\" role=\"status\"></span></span>\n <input [ngClass]=\"{'is-invalid':showValidation && group.controls[field].status === 'INVALID'}\"\n type=\"text\" class=\"form-control\" placeholder=\"No file chosen\" [id]=\"componentId+'_Input'\" readonly>\n <small class=\"invalid-feedback\"\n *ngIf=\"showValidation && group.controls[field].status === 'INVALID'\">{{errorLabel || label}} is\n required</small>\n </div>\n <!-- dummy input field for validation purposes -->\n <input type=\"text\" [hidden]=\"true\" [formControlName]=\"field\" />\n </div>\n </div>\n </div>\n <div *ngIf=\"attachment && attachment.userFilename\">\n <div>\n <label *ngIf=\"label\">{{label}}</label>\n <div class=\"input-group\">\n <a (click)=\"downloadFile(attachment)\" [id]=\"componentId+'_DownloadFileLink'\" \n class=\"form-control\">{{attachment.userFilename}}</a>\n <span *ngIf=\"removeAllowed && !busy\" class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveFileBtn'\"\n (click)=\"removeFile()\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Attachment</button>\n </span>\n <span *ngIf=\"busy\"> <span class=\"spinner-border text-primary\" role=\"status\"></span></span>\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMsg\" class=\"alert alert-danger\" role=\"alert\">{{errorMsg}}</div>\n</form>", styles: ["a:hover{cursor:pointer}a{color:#3399f3!important}\n"] }]
|
|
6124
|
-
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type:
|
|
6386
|
+
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: OepaFileUtilService }, { type: EdocAttachmentService }, { type: i2$1.BsModalService }], propDecorators: { attachment: [{
|
|
6125
6387
|
type: Input
|
|
6126
6388
|
}], group: [{
|
|
6127
6389
|
type: Input
|
|
@@ -6646,13 +6908,13 @@ class LynxImageUploadComponent {
|
|
|
6646
6908
|
this.onImageRemove.emit(this.image);
|
|
6647
6909
|
});
|
|
6648
6910
|
}
|
|
6649
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxImageUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: i2$1.BsModalService }, { token:
|
|
6911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxImageUploadComponent, deps: [{ token: i1$1.OepaComponentIdService }, { token: i2$1.BsModalService }, { token: OepaFileUtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6650
6912
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LynxImageUploadComponent, selector: "oepa-lynx-image-upload", inputs: { group: "group", field: "field", projectID: "projectID", label: "label", errorLabel: "errorLabel", image: "image", showValidation: "showValidation", required: "required", accept: "accept", imageBlobUrl: "imageBlobUrl" }, outputs: { onImageUpload: "onImageUpload", onImageRemove: "onImageRemove", onImageDownload: "onImageDownload" }, ngImport: i0, template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!imageBlobUrl\">\n <label class=\"btn btn-primary btn-file\">\n Browse…\n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n <span> Click the button on the left to upload an image from your computer.</span>\n </div>\n <div *ngIf=\"imageBlobUrl\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <img [src]=\"imageBlobUrl\" [id]=\"componentId+'_Image'\" width=\"200\">\n </div>\n <br/>\n <div class=\"col-sm-12\">\n <label>{{image.userFilename}}</label>\n </div>\n <div class=\"col-sm-12\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveImageBtn'\" [name]=\"componentId+'_RemoveImageBtn'\"\n (click)=\"removeImage()\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Image</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMessage\" class=\"alert alert-danger\">{{errorMessage}}</div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
6651
6913
|
}
|
|
6652
6914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxImageUploadComponent, decorators: [{
|
|
6653
6915
|
type: Component,
|
|
6654
6916
|
args: [{ selector: 'oepa-lynx-image-upload', template: "<form [formGroup]=\"group\">\n <div *ngIf=\"!imageBlobUrl\">\n <label class=\"btn btn-primary btn-file\">\n Browse…\n <input type=\"file\" style=\"display: none;\" (change)=\"fileChange($event)\" \n [id]=\"componentId+'_BrowseBtn'\" [name]=\"componentId+'_BrowseBtn'\" class=\"form-control\"\n [attr.accept]=\"accept ? accept : null\"\n [disabled]=\"group.controls[field].status === 'DISABLED'\">\n </label>\n <span> Click the button on the left to upload an image from your computer.</span>\n </div>\n <div *ngIf=\"imageBlobUrl\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <img [src]=\"imageBlobUrl\" [id]=\"componentId+'_Image'\" width=\"200\">\n </div>\n <br/>\n <div class=\"col-sm-12\">\n <label>{{image.userFilename}}</label>\n </div>\n <div class=\"col-sm-12\">\n <button type=\"button\" class=\"btn btn-primary\" [id]=\"componentId+'_RemoveImageBtn'\" [name]=\"componentId+'_RemoveImageBtn'\"\n (click)=\"removeImage()\" [disabled]=\"group.controls[field].status === 'DISABLED'\">Remove Image</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMessage\" class=\"alert alert-danger\">{{errorMessage}}</div>\n</form>" }]
|
|
6655
|
-
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: i2$1.BsModalService }, { type:
|
|
6917
|
+
}], ctorParameters: () => [{ type: i1$1.OepaComponentIdService }, { type: i2$1.BsModalService }, { type: OepaFileUtilService }], propDecorators: { group: [{
|
|
6656
6918
|
type: Input
|
|
6657
6919
|
}], field: [{
|
|
6658
6920
|
type: Input
|
|
@@ -6848,19 +7110,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
6848
7110
|
type: Output
|
|
6849
7111
|
}] } });
|
|
6850
7112
|
|
|
7113
|
+
class ParamsHelpService {
|
|
7114
|
+
http;
|
|
7115
|
+
baseURL = '/ebiz/api/v1/gateway/helpURLs/';
|
|
7116
|
+
constructor(http, ebizRootURL) {
|
|
7117
|
+
this.http = http;
|
|
7118
|
+
this.baseURL = ebizRootURL + this.baseURL;
|
|
7119
|
+
}
|
|
7120
|
+
retrieveHelpURL(helpURLParamName) {
|
|
7121
|
+
return this.http.get(this.baseURL + helpURLParamName, { responseType: 'text' });
|
|
7122
|
+
}
|
|
7123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7124
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpService, providedIn: 'root' });
|
|
7125
|
+
}
|
|
7126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpService, decorators: [{
|
|
7127
|
+
type: Injectable,
|
|
7128
|
+
args: [{
|
|
7129
|
+
providedIn: 'root'
|
|
7130
|
+
}]
|
|
7131
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
7132
|
+
type: Inject,
|
|
7133
|
+
args: ['ebizRootURL']
|
|
7134
|
+
}] }] });
|
|
7135
|
+
|
|
6851
7136
|
class ParamsHelpButtonComponent {
|
|
6852
7137
|
router;
|
|
6853
|
-
|
|
7138
|
+
helpService;
|
|
6854
7139
|
helpURL = '';
|
|
6855
7140
|
title = 'Click here for instructions or call (614) 466-0061';
|
|
6856
7141
|
anchorClass = '';
|
|
6857
|
-
constructor(router,
|
|
7142
|
+
constructor(router, helpService) {
|
|
6858
7143
|
this.router = router;
|
|
6859
|
-
this.
|
|
7144
|
+
this.helpService = helpService;
|
|
6860
7145
|
}
|
|
6861
7146
|
ngOnInit() {
|
|
6862
7147
|
const helpURLParamName = this.router.url.replace(new RegExp('/', 'g'), '.');
|
|
6863
|
-
this.
|
|
7148
|
+
this.helpService.retrieveHelpURL(helpURLParamName).subscribe({
|
|
6864
7149
|
next: url => {
|
|
6865
7150
|
if (url && url.length > 0) {
|
|
6866
7151
|
this.helpURL = url;
|
|
@@ -6873,23 +7158,324 @@ class ParamsHelpButtonComponent {
|
|
|
6873
7158
|
}
|
|
6874
7159
|
});
|
|
6875
7160
|
}
|
|
6876
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpButtonComponent, deps: [{ token: i1$4.Router }, { token:
|
|
7161
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpButtonComponent, deps: [{ token: i1$4.Router }, { token: ParamsHelpService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6877
7162
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ParamsHelpButtonComponent, selector: "oepa-params-help-button", inputs: { title: "title", anchorClass: "anchorClass" }, ngImport: i0, template: "<a *ngIf=\"helpURL\" [href]=\"helpURL\" [class]=\"anchorClass\" target=\"_blank\" [title]=\"title\">\n <i class=\"bi bi-question-circle\"></i>\n</a>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
6878
7163
|
}
|
|
6879
7164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParamsHelpButtonComponent, decorators: [{
|
|
6880
7165
|
type: Component,
|
|
6881
7166
|
args: [{ selector: 'oepa-params-help-button', template: "<a *ngIf=\"helpURL\" [href]=\"helpURL\" [class]=\"anchorClass\" target=\"_blank\" [title]=\"title\">\n <i class=\"bi bi-question-circle\"></i>\n</a>\n" }]
|
|
6882
|
-
}], ctorParameters: () => [{ type: i1$4.Router }, { type:
|
|
7167
|
+
}], ctorParameters: () => [{ type: i1$4.Router }, { type: ParamsHelpService }], propDecorators: { title: [{
|
|
6883
7168
|
type: Input
|
|
6884
7169
|
}], anchorClass: [{
|
|
6885
7170
|
type: Input
|
|
6886
7171
|
}] } });
|
|
6887
7172
|
|
|
7173
|
+
/**
|
|
7174
|
+
* OepaUserAccountService - A collection of methods for accessing and manipulating user accounts.
|
|
7175
|
+
*/
|
|
7176
|
+
class OepaUserAccountService {
|
|
7177
|
+
http;
|
|
7178
|
+
ebizRootURL;
|
|
7179
|
+
hostUrl = '/ebiz';
|
|
7180
|
+
accountsUrl = '/api/v1/userAccounts';
|
|
7181
|
+
ebizAccountsUrl = '/api/v1/accounts';
|
|
7182
|
+
ebizSessionUrl = '/api/v1/session';
|
|
7183
|
+
account;
|
|
7184
|
+
personID = '';
|
|
7185
|
+
sessionID = '';
|
|
7186
|
+
webappsRootURL = '';
|
|
7187
|
+
logoutPath = '';
|
|
7188
|
+
idleTimerRunning = false;
|
|
7189
|
+
idleTime = 0;
|
|
7190
|
+
idleThreshold = (29 * 60); // 29 minute timeout threshold by default
|
|
7191
|
+
idleSubject = new Subject();
|
|
7192
|
+
timeoutID;
|
|
7193
|
+
constructor(http, ebizRootURL) {
|
|
7194
|
+
this.http = http;
|
|
7195
|
+
this.ebizRootURL = ebizRootURL;
|
|
7196
|
+
this.hostUrl = ebizRootURL + this.hostUrl;
|
|
7197
|
+
this.logoutPath = '/jsp/logout.jsp';
|
|
7198
|
+
}
|
|
7199
|
+
/**
|
|
7200
|
+
* Retrieve the User Account for the user userid.
|
|
7201
|
+
* @param userid
|
|
7202
|
+
*/
|
|
7203
|
+
retrieveAccountForUser(userid) {
|
|
7204
|
+
return this.http.get(this.hostUrl + this.accountsUrl + '/' + userid);
|
|
7205
|
+
}
|
|
7206
|
+
/**
|
|
7207
|
+
* Retrieve the user account for the currently logged in user.
|
|
7208
|
+
* @returns Observable<OepaUserAccount>
|
|
7209
|
+
*/
|
|
7210
|
+
retrieveAccountForCurrentUser() {
|
|
7211
|
+
return this.http.get(this.hostUrl + this.accountsUrl + '/login').pipe(map((account) => {
|
|
7212
|
+
if (!account) {
|
|
7213
|
+
if (this.personID && this.sessionID) {
|
|
7214
|
+
this.retrieveAccountForInternalSession(this.personID, this.sessionID).subscribe({
|
|
7215
|
+
next: internalAccount => {
|
|
7216
|
+
if (internalAccount) {
|
|
7217
|
+
this.account = internalAccount;
|
|
7218
|
+
}
|
|
7219
|
+
else {
|
|
7220
|
+
this.logMessageOnServer('retrieveAccountForCurrentUser - no account, redirecting to logout');
|
|
7221
|
+
this.redirectToLogout();
|
|
7222
|
+
}
|
|
7223
|
+
}, error: err => {
|
|
7224
|
+
this.logMessageOnServer('Failed retrieving internal account: ' + err);
|
|
7225
|
+
this.redirectToLogout();
|
|
7226
|
+
}
|
|
7227
|
+
});
|
|
7228
|
+
}
|
|
7229
|
+
else {
|
|
7230
|
+
this.logMessageOnServer('retrieveAccountForCurrentUser - no account, redirecting to logout');
|
|
7231
|
+
this.redirectToLogout();
|
|
7232
|
+
}
|
|
7233
|
+
}
|
|
7234
|
+
else {
|
|
7235
|
+
this.account = account;
|
|
7236
|
+
console.log('retrieveAccountForCurrentUser: ' + this.account?.loginName || '<unknown>');
|
|
7237
|
+
}
|
|
7238
|
+
return this.account;
|
|
7239
|
+
}));
|
|
7240
|
+
}
|
|
7241
|
+
/**
|
|
7242
|
+
* Redirect to logout screen if user is not found
|
|
7243
|
+
*/
|
|
7244
|
+
redirectToLogout(msg) {
|
|
7245
|
+
let logoutUrl = this.logoutPath;
|
|
7246
|
+
if (this.webappsRootURL) {
|
|
7247
|
+
logoutUrl = this.webappsRootURL + (this.logoutPath || '');
|
|
7248
|
+
}
|
|
7249
|
+
alert(msg || 'Connection lost. You will be redirected to the login page.');
|
|
7250
|
+
console.log('redirecting to logoutUrl:' + logoutUrl);
|
|
7251
|
+
window.location.href = logoutUrl;
|
|
7252
|
+
}
|
|
7253
|
+
/**
|
|
7254
|
+
* Retrieve the user account for the currently logged in user.
|
|
7255
|
+
* @param sessionID person ID for internal user
|
|
7256
|
+
* @returns Observable<OepaUserAccount>
|
|
7257
|
+
*/
|
|
7258
|
+
retrieveAccountForInternalSession(personID, sessionID) {
|
|
7259
|
+
this.account = {};
|
|
7260
|
+
const url = this.hostUrl + this.accountsUrl + '/internal/personID/' + personID + '/sessionID/' + sessionID;
|
|
7261
|
+
console.log('retrieveAccountForInternalSession: ' + url);
|
|
7262
|
+
return this.http.get(url).pipe(map((account) => {
|
|
7263
|
+
this.account = account;
|
|
7264
|
+
this.personID = personID;
|
|
7265
|
+
this.sessionID = sessionID;
|
|
7266
|
+
console.log('retrieveAccountForInternalSession: ' + this.account?.loginName || '<unknown>');
|
|
7267
|
+
return account;
|
|
7268
|
+
}));
|
|
7269
|
+
}
|
|
7270
|
+
/**
|
|
7271
|
+
* Determine whether account has the role roleName.
|
|
7272
|
+
* @param account
|
|
7273
|
+
* @param roleName
|
|
7274
|
+
*/
|
|
7275
|
+
accountHasRole(account, roleName) {
|
|
7276
|
+
let hasRole = false;
|
|
7277
|
+
const roleList = this.getRoleList(account);
|
|
7278
|
+
if (roleList && roleList.length) {
|
|
7279
|
+
hasRole = (roleList.indexOf(roleName) > -1);
|
|
7280
|
+
}
|
|
7281
|
+
return hasRole;
|
|
7282
|
+
}
|
|
7283
|
+
getRoleList(account) {
|
|
7284
|
+
const roleList = [];
|
|
7285
|
+
if (account.roleList && account.roleList.length > 0) {
|
|
7286
|
+
account.roleList.forEach((role) => {
|
|
7287
|
+
roleList.push(role.name || '');
|
|
7288
|
+
});
|
|
7289
|
+
}
|
|
7290
|
+
return roleList;
|
|
7291
|
+
}
|
|
7292
|
+
/**
|
|
7293
|
+
* Determine whether account has the privilege privilegeType.
|
|
7294
|
+
* @param account
|
|
7295
|
+
* @param privilegeType
|
|
7296
|
+
*/
|
|
7297
|
+
accountHasPrivilege(account, privilegeType) {
|
|
7298
|
+
let hasPrivilege = false;
|
|
7299
|
+
const privilegeList = this.getPrivilegeList(account);
|
|
7300
|
+
if (privilegeList && privilegeList.length) {
|
|
7301
|
+
hasPrivilege = (privilegeList.indexOf(privilegeType) > -1);
|
|
7302
|
+
}
|
|
7303
|
+
return hasPrivilege;
|
|
7304
|
+
}
|
|
7305
|
+
getPrivilegeList(account) {
|
|
7306
|
+
const privilegeList = [];
|
|
7307
|
+
if (account.roleList && account.roleList.length > 0) {
|
|
7308
|
+
account.roleList.forEach((role) => {
|
|
7309
|
+
if (role.privilegeList && role.privilegeList.length > 0) {
|
|
7310
|
+
role.privilegeList.forEach((privilege) => {
|
|
7311
|
+
privilegeList.push(privilege.type || '');
|
|
7312
|
+
});
|
|
7313
|
+
}
|
|
7314
|
+
});
|
|
7315
|
+
}
|
|
7316
|
+
return privilegeList;
|
|
7317
|
+
}
|
|
7318
|
+
/**
|
|
7319
|
+
* Retrieve the userAccount of the current user. The retrieveAccountForCurrentUser method
|
|
7320
|
+
* must be invoked prior to invoking this method.
|
|
7321
|
+
*/
|
|
7322
|
+
getCurrentUserAccount() {
|
|
7323
|
+
console.log('getCurrentUserAccount: ' + this.account?.loginName || '<unknown>');
|
|
7324
|
+
return this.account;
|
|
7325
|
+
}
|
|
7326
|
+
/**
|
|
7327
|
+
* ===========================================================================================================================
|
|
7328
|
+
* EBIZ METHODS:
|
|
7329
|
+
* The methods below currently apply only to eBiz.
|
|
7330
|
+
* ===========================================================================================================================
|
|
7331
|
+
*/
|
|
7332
|
+
getWebappsRootURL() {
|
|
7333
|
+
if (this.webappsRootURL) {
|
|
7334
|
+
return of(this.webappsRootURL);
|
|
7335
|
+
}
|
|
7336
|
+
else {
|
|
7337
|
+
const url = this.hostUrl + '/api/v1/gateway/gatewayConfig';
|
|
7338
|
+
return this.http.get(url).pipe(map((gatewayConfig) => {
|
|
7339
|
+
if (gatewayConfig) {
|
|
7340
|
+
this.webappsRootURL = gatewayConfig.webappsRootURL;
|
|
7341
|
+
}
|
|
7342
|
+
return this.webappsRootURL;
|
|
7343
|
+
}));
|
|
7344
|
+
}
|
|
7345
|
+
}
|
|
7346
|
+
/**
|
|
7347
|
+
* Return array of ProgramPrivileges matching programPrivilegeRequest.
|
|
7348
|
+
* @param programPrivilegeRequest
|
|
7349
|
+
* @returns Observable<Array<ProgramPrivilege>>
|
|
7350
|
+
*/
|
|
7351
|
+
searchPrivileges(programPrivilegeRequest, altUserID) {
|
|
7352
|
+
const url = this.hostUrl + this.ebizAccountsUrl + '/programPrivileges/search' + (altUserID ? '?userid=' + altUserID : '');
|
|
7353
|
+
return this.http.post(url, programPrivilegeRequest);
|
|
7354
|
+
}
|
|
7355
|
+
/**
|
|
7356
|
+
* Create a new ProgramPrivilege based on contents of ProgramPrivilegeRequest.
|
|
7357
|
+
* @param programPrivilegeRequest
|
|
7358
|
+
* @returns Observable<ProgramPrivilege?
|
|
7359
|
+
*/
|
|
7360
|
+
createProgramPrivilege(programPrivilegeRequest, altUserID) {
|
|
7361
|
+
return this.http.post(this.hostUrl + this.ebizAccountsUrl + '/programPrivileges' + (altUserID ? '?userid=' + altUserID : ''), programPrivilegeRequest);
|
|
7362
|
+
}
|
|
7363
|
+
/**
|
|
7364
|
+
* Delete the ProgramPrivilege identified by programPrivilegeID.
|
|
7365
|
+
* @param programPrivilegeID
|
|
7366
|
+
* @returns Observable<void>
|
|
7367
|
+
*/
|
|
7368
|
+
deleteProgramPrivilege(programPrivilegeID, altUserID) {
|
|
7369
|
+
return this.http.delete(this.hostUrl + this.ebizAccountsUrl + '/programPrivileges/' + programPrivilegeID + (altUserID ? '?userid=' + altUserID : ''), { responseType: 'text' });
|
|
7370
|
+
}
|
|
7371
|
+
/**
|
|
7372
|
+
* Delegate a program privilege based on information in delegation.
|
|
7373
|
+
* @param delegation
|
|
7374
|
+
* @returns Observable<void>
|
|
7375
|
+
*/
|
|
7376
|
+
delegateProgramPrivilege(delegation, altUserID) {
|
|
7377
|
+
return this.http.post(this.hostUrl + this.ebizAccountsUrl + '/programPrivileges/delegation' + (altUserID ? '?userid=' + altUserID : ''), delegation, { responseType: 'text' });
|
|
7378
|
+
}
|
|
7379
|
+
/**
|
|
7380
|
+
* ===========================================================================================================================
|
|
7381
|
+
* Helper METHODS:
|
|
7382
|
+
* ===========================================================================================================================
|
|
7383
|
+
*/
|
|
7384
|
+
/**
|
|
7385
|
+
* Set the user account to be used for "live reload mode"
|
|
7386
|
+
* @param userAccount
|
|
7387
|
+
*/
|
|
7388
|
+
setLiveReloadUser(userAccount) {
|
|
7389
|
+
this.account = userAccount;
|
|
7390
|
+
console.log('setLiveReloadUser: ' + this.account?.loginName || '<unknown>');
|
|
7391
|
+
return this.http.post(this.hostUrl + this.ebizAccountsUrl + '/liveReload', userAccount);
|
|
7392
|
+
}
|
|
7393
|
+
/**
|
|
7394
|
+
* Stores the given user in the eBiz session.
|
|
7395
|
+
* @param accountUserID
|
|
7396
|
+
*/
|
|
7397
|
+
storeUserInSession(accountUserID) {
|
|
7398
|
+
let acct = {};
|
|
7399
|
+
acct.accountID = accountUserID;
|
|
7400
|
+
return this.http.post(this.hostUrl + this.ebizSessionUrl + '/storeUser/' + accountUserID, null);
|
|
7401
|
+
}
|
|
7402
|
+
/**
|
|
7403
|
+
* See if the current user should be allowed to see "demo" capabilities
|
|
7404
|
+
*/
|
|
7405
|
+
demoCapabilitiesAllowed() {
|
|
7406
|
+
let demoAllowed = false;
|
|
7407
|
+
if (this.account && this.account.roleList) {
|
|
7408
|
+
this.account.roleList.forEach(role => {
|
|
7409
|
+
if (role.name === 'AllowDemo') {
|
|
7410
|
+
demoAllowed = true;
|
|
7411
|
+
}
|
|
7412
|
+
});
|
|
7413
|
+
}
|
|
7414
|
+
return demoAllowed;
|
|
7415
|
+
}
|
|
7416
|
+
startIdleTimer(threshold) {
|
|
7417
|
+
if (this.timeoutID) {
|
|
7418
|
+
clearTimeout(this.timeoutID);
|
|
7419
|
+
}
|
|
7420
|
+
this.idleThreshold = threshold || this.idleThreshold;
|
|
7421
|
+
if (!this.idleTimerRunning) {
|
|
7422
|
+
console.log('The idle timeout started with threshold: ' + this.idleThreshold);
|
|
7423
|
+
this.idleTimerRunning = true;
|
|
7424
|
+
this.checkTimeout();
|
|
7425
|
+
}
|
|
7426
|
+
}
|
|
7427
|
+
resetIdleTime() {
|
|
7428
|
+
console.log('idle timer reset');
|
|
7429
|
+
this.idleTime = 0;
|
|
7430
|
+
}
|
|
7431
|
+
checkTimeout() {
|
|
7432
|
+
this.timeoutID = setTimeout(() => {
|
|
7433
|
+
this.idleTime += 60;
|
|
7434
|
+
console.log('idle time = ' + this.idleTime + ", threshold = " + this.idleThreshold);
|
|
7435
|
+
if (this.idleTime >= this.idleThreshold) {
|
|
7436
|
+
console.log('firing next idleSubject...');
|
|
7437
|
+
this.idleTimerRunning = false;
|
|
7438
|
+
this.idleSubject.next(this.idleTime);
|
|
7439
|
+
}
|
|
7440
|
+
else {
|
|
7441
|
+
if (this.timeoutID) {
|
|
7442
|
+
clearTimeout(this.timeoutID);
|
|
7443
|
+
}
|
|
7444
|
+
this.checkTimeout();
|
|
7445
|
+
}
|
|
7446
|
+
}, 60000);
|
|
7447
|
+
}
|
|
7448
|
+
getIdleTimeout() {
|
|
7449
|
+
return this.idleSubject.asObservable();
|
|
7450
|
+
}
|
|
7451
|
+
logMessageOnServer(message) {
|
|
7452
|
+
const messageResponse = {
|
|
7453
|
+
response: message
|
|
7454
|
+
};
|
|
7455
|
+
const url = this.hostUrl + this.accountsUrl + '/logs/message';
|
|
7456
|
+
return this.http.post(url, messageResponse);
|
|
7457
|
+
}
|
|
7458
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaUserAccountService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7459
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaUserAccountService, providedIn: 'root' });
|
|
7460
|
+
}
|
|
7461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaUserAccountService, decorators: [{
|
|
7462
|
+
type: Injectable,
|
|
7463
|
+
args: [{
|
|
7464
|
+
providedIn: 'root'
|
|
7465
|
+
}]
|
|
7466
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
7467
|
+
type: Inject,
|
|
7468
|
+
args: ['ebizRootURL']
|
|
7469
|
+
}] }] });
|
|
7470
|
+
|
|
6888
7471
|
class OepaPinService {
|
|
6889
7472
|
http;
|
|
7473
|
+
ebizRootURL;
|
|
6890
7474
|
pinsUrl = '/ebiz/api/v1/pins';
|
|
6891
|
-
constructor(http) {
|
|
7475
|
+
constructor(http, ebizRootURL) {
|
|
6892
7476
|
this.http = http;
|
|
7477
|
+
this.ebizRootURL = ebizRootURL;
|
|
7478
|
+
this.pinsUrl = ebizRootURL + this.pinsUrl;
|
|
6893
7479
|
}
|
|
6894
7480
|
/**
|
|
6895
7481
|
* Retrieve an attestation by id.
|
|
@@ -6926,7 +7512,7 @@ class OepaPinService {
|
|
|
6926
7512
|
retrievePin(userID) {
|
|
6927
7513
|
return this.http.get(this.pinsUrl + '/' + userID);
|
|
6928
7514
|
}
|
|
6929
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaPinService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaPinService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6930
7516
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaPinService, providedIn: 'root' });
|
|
6931
7517
|
}
|
|
6932
7518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaPinService, decorators: [{
|
|
@@ -6934,7 +7520,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
6934
7520
|
args: [{
|
|
6935
7521
|
providedIn: 'root'
|
|
6936
7522
|
}]
|
|
6937
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
7523
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
7524
|
+
type: Inject,
|
|
7525
|
+
args: ['ebizRootURL']
|
|
7526
|
+
}] }] });
|
|
6938
7527
|
|
|
6939
7528
|
class PinModalComponent {
|
|
6940
7529
|
userAccountService;
|
|
@@ -7098,13 +7687,13 @@ class PinModalComponent {
|
|
|
7098
7687
|
console.error('Could not retrieve security question:' + JSON.stringify(err));
|
|
7099
7688
|
});
|
|
7100
7689
|
}
|
|
7101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PinModalComponent, deps: [{ token:
|
|
7690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PinModalComponent, deps: [{ token: OepaUserAccountService }, { token: i1$2.FormBuilder }, { token: OepaPinService }, { token: i2$1.BsModalRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7102
7691
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PinModalComponent, selector: "oepa-pin-modal", inputs: { attestationID: "attestationID", submitCallback: "submitCallback", submittingComponent: "submittingComponent" }, outputs: { close: "close" }, ngImport: i0, template: "<form [formGroup]=\"oepaSubmissionForm\">\n <div class=\"modal-body\">\n\n <div [hidden]=\"noPin\">\n <div class=\"card-header\">\n <div class=\"row\" *ngIf=\"pinAttestation.text\">\n <div class=\"col-md-12\">\n <div class=\"well\" [innerHTML]=\"pinAttestation.text\"></div>\n </div>\n </div>\n </div>\n <br>\n <div class=\"card-header\" *ngIf=\"serviceAttestation\">\n <div class=\"row\" *ngIf=\"serviceAttestation.text\">\n <div class=\"col-md-12\">\n <div class=\"well\" [innerHTML]=\"serviceAttestation.text\">\"</div>\n </div>\n </div>\n </div>\n </div>\n <br>\n\n <div class=\"row\" *ngIf=\"loadingAttestations\">\n <div class=\"col-md-12\">\n <div class=\"alert alert-info\">\n <span class=\"spinner-border text-primary\" role=\"status\"></span> Loading PIN information...\n </div>\n </div>\n </div>\n\n <div [hidden]=\"loadingAttestations || noPin\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label style=\"padding: 5px;\"><b>Security Question:</b></label>\n <label>{{securityQuestion.question}}</label>\n <div>\n <input [ngClass]=\"{'is-invalid':showValidation && !oepaSubmissionForm.controls['securityAnswer'].valid}\"\n formControlName=\"securityAnswer\" type=\"password\" class=\"form-control\" name=\"securityAnswer\" placeholder=\"Answer\" required>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && !oepaSubmissionForm.controls['securityAnswer'].valid\">Answer to security question is required</small>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label><b>PIN: </b></label>\n <div>\n <input [ngClass]=\"{'is-invalid':showValidation && !oepaSubmissionForm.controls['securityPIN'].valid}\"\n formControlName=\"securityPIN\" type=\"password\" class=\"form-control\" name=\"securityPIN\" placeholder=\"PIN\" required>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && !oepaSubmissionForm.controls['securityPIN'].valid\">A valid PIN is required</small>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <div >\n <div class=\"row\">\n <div class=\"col-md-12\">\n <!-- toggle hasPin message -->\n <div *ngIf=\"noPin\">\n <b>Attention:</b> Before you can submit, you first must activate your PIN. Cancel this submission, save the application/report and go back to the main eBusiness Home Page. \n Select <b>MY Account- Request New PIN</b> to get started. <br>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"row\" *ngIf=\"errorMessage\">\n <div class=\"col-md-12\">\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage }}</div>\n </div>\n </div>\n\n </div>\n\n\n <div class=\"modal-footer\">\n <span *ngIf=\"submitInProgress === true\" id=\"wait\"><span class=\"spinner-border text-primary\" role=\"status\"></span>Please wait... </span>\n <button class=\"btn btn-primary mr-1\" (click)=\"submit()\" [disabled]=\"submitInProgress || !oepaSubmissionForm.valid\">Submit</button>\n <button class=\"btn btn-primary mr-1\" (click)=\"cancel()\" [disabled]=\"submitInProgress\">Cancel</button>\n </div>\n\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
7103
7692
|
}
|
|
7104
7693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PinModalComponent, decorators: [{
|
|
7105
7694
|
type: Component,
|
|
7106
7695
|
args: [{ selector: 'oepa-pin-modal', template: "<form [formGroup]=\"oepaSubmissionForm\">\n <div class=\"modal-body\">\n\n <div [hidden]=\"noPin\">\n <div class=\"card-header\">\n <div class=\"row\" *ngIf=\"pinAttestation.text\">\n <div class=\"col-md-12\">\n <div class=\"well\" [innerHTML]=\"pinAttestation.text\"></div>\n </div>\n </div>\n </div>\n <br>\n <div class=\"card-header\" *ngIf=\"serviceAttestation\">\n <div class=\"row\" *ngIf=\"serviceAttestation.text\">\n <div class=\"col-md-12\">\n <div class=\"well\" [innerHTML]=\"serviceAttestation.text\">\"</div>\n </div>\n </div>\n </div>\n </div>\n <br>\n\n <div class=\"row\" *ngIf=\"loadingAttestations\">\n <div class=\"col-md-12\">\n <div class=\"alert alert-info\">\n <span class=\"spinner-border text-primary\" role=\"status\"></span> Loading PIN information...\n </div>\n </div>\n </div>\n\n <div [hidden]=\"loadingAttestations || noPin\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label style=\"padding: 5px;\"><b>Security Question:</b></label>\n <label>{{securityQuestion.question}}</label>\n <div>\n <input [ngClass]=\"{'is-invalid':showValidation && !oepaSubmissionForm.controls['securityAnswer'].valid}\"\n formControlName=\"securityAnswer\" type=\"password\" class=\"form-control\" name=\"securityAnswer\" placeholder=\"Answer\" required>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && !oepaSubmissionForm.controls['securityAnswer'].valid\">Answer to security question is required</small>\n </div>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"form-group\">\n <label><b>PIN: </b></label>\n <div>\n <input [ngClass]=\"{'is-invalid':showValidation && !oepaSubmissionForm.controls['securityPIN'].valid}\"\n formControlName=\"securityPIN\" type=\"password\" class=\"form-control\" name=\"securityPIN\" placeholder=\"PIN\" required>\n <small class=\"invalid-feedback\" *ngIf=\"showValidation && !oepaSubmissionForm.controls['securityPIN'].valid\">A valid PIN is required</small>\n </div>\n </div>\n </div>\n </div>\n </div>\n \n <div >\n <div class=\"row\">\n <div class=\"col-md-12\">\n <!-- toggle hasPin message -->\n <div *ngIf=\"noPin\">\n <b>Attention:</b> Before you can submit, you first must activate your PIN. Cancel this submission, save the application/report and go back to the main eBusiness Home Page. \n Select <b>MY Account- Request New PIN</b> to get started. <br>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"row\" *ngIf=\"errorMessage\">\n <div class=\"col-md-12\">\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage }}</div>\n </div>\n </div>\n\n </div>\n\n\n <div class=\"modal-footer\">\n <span *ngIf=\"submitInProgress === true\" id=\"wait\"><span class=\"spinner-border text-primary\" role=\"status\"></span>Please wait... </span>\n <button class=\"btn btn-primary mr-1\" (click)=\"submit()\" [disabled]=\"submitInProgress || !oepaSubmissionForm.valid\">Submit</button>\n <button class=\"btn btn-primary mr-1\" (click)=\"cancel()\" [disabled]=\"submitInProgress\">Cancel</button>\n </div>\n\n</form>" }]
|
|
7107
|
-
}], ctorParameters: () => [{ type:
|
|
7696
|
+
}], ctorParameters: () => [{ type: OepaUserAccountService }, { type: i1$2.FormBuilder }, { type: OepaPinService }, { type: i2$1.BsModalRef }], propDecorators: { attestationID: [{
|
|
7108
7697
|
type: Input
|
|
7109
7698
|
}], submitCallback: [{
|
|
7110
7699
|
type: Input
|
|
@@ -7233,13 +7822,13 @@ class ServerTimeoutModalComponent {
|
|
|
7233
7822
|
close() {
|
|
7234
7823
|
this.bsModalRef.hide();
|
|
7235
7824
|
}
|
|
7236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ServerTimeoutModalComponent, deps: [{ token:
|
|
7825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ServerTimeoutModalComponent, deps: [{ token: OepaUserAccountService }, { token: i2$1.BsModalRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7237
7826
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ServerTimeoutModalComponent, selector: "oepa-server-timeout-modal", inputs: { countdownSeconds: "countdownSeconds" }, outputs: { onKeepAlive: "onKeepAlive" }, ngImport: i0, template: "<div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">\n <span>Connection Timeout</span>\n <span *ngIf=\"!connectionLost\"> Pending</span>\n </h4>\n <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div *ngIf=\"!connectionLost\">\n Your connection is about to time out: {{mm}}:{{ss}}\n <!-- : <countdown [config]=\"config\" (event)=\"handleEvent($event)\"></countdown> -->\n <br/>\n Click the button below to keep from being logged out.\n </div>\n <div *ngIf=\"connectionLost\">\n Connection timeout.\n </div>\n </div>\n <div class=\"modal-footer\">\n <div class=\"row\">\n <div *ngIf=\"errorMessage\" class=\"col-sm-12\">\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n </div>\n </div>\n <div class=\"col-sm-12 text-right\">\n <button *ngIf=\"!connectionLost\" type=\"button\" class=\"btn btn-primary mr-2\" (click)=\"keepAlive()\">Stay Logged In</button>\n <button *ngIf=\"connectionLost\" type=\"button\" class=\"btn btn-primary mr-2\" (click)=\"close()\">Close</button>\n </div>\n </div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
7238
7827
|
}
|
|
7239
7828
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ServerTimeoutModalComponent, decorators: [{
|
|
7240
7829
|
type: Component,
|
|
7241
7830
|
args: [{ selector: 'oepa-server-timeout-modal', template: "<div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\">\n <span>Connection Timeout</span>\n <span *ngIf=\"!connectionLost\"> Pending</span>\n </h4>\n <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div *ngIf=\"!connectionLost\">\n Your connection is about to time out: {{mm}}:{{ss}}\n <!-- : <countdown [config]=\"config\" (event)=\"handleEvent($event)\"></countdown> -->\n <br/>\n Click the button below to keep from being logged out.\n </div>\n <div *ngIf=\"connectionLost\">\n Connection timeout.\n </div>\n </div>\n <div class=\"modal-footer\">\n <div class=\"row\">\n <div *ngIf=\"errorMessage\" class=\"col-sm-12\">\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n </div>\n </div>\n <div class=\"col-sm-12 text-right\">\n <button *ngIf=\"!connectionLost\" type=\"button\" class=\"btn btn-primary mr-2\" (click)=\"keepAlive()\">Stay Logged In</button>\n <button *ngIf=\"connectionLost\" type=\"button\" class=\"btn btn-primary mr-2\" (click)=\"close()\">Close</button>\n </div>\n </div>\n" }]
|
|
7242
|
-
}], ctorParameters: () => [{ type:
|
|
7831
|
+
}], ctorParameters: () => [{ type: OepaUserAccountService }, { type: i2$1.BsModalRef }], propDecorators: { countdownSeconds: [{
|
|
7243
7832
|
type: Input
|
|
7244
7833
|
}], onKeepAlive: [{
|
|
7245
7834
|
type: Output
|
|
@@ -7247,9 +7836,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7247
7836
|
|
|
7248
7837
|
class ShoppingCartService {
|
|
7249
7838
|
http;
|
|
7839
|
+
ebizRootURL;
|
|
7250
7840
|
paymentUrl = '/ebiz/api/v1/payment/';
|
|
7251
|
-
constructor(http) {
|
|
7841
|
+
constructor(http, ebizRootURL) {
|
|
7252
7842
|
this.http = http;
|
|
7843
|
+
this.ebizRootURL = ebizRootURL;
|
|
7844
|
+
this.paymentUrl = ebizRootURL + this.paymentUrl;
|
|
7253
7845
|
}
|
|
7254
7846
|
/**
|
|
7255
7847
|
* Retrieve a shopping cart for the current user for the provided serviceName.
|
|
@@ -7319,7 +7911,7 @@ class ShoppingCartService {
|
|
|
7319
7911
|
const url = this.paymentUrl + '/shoppingCart/' + cart.serviceName + '/checkout';
|
|
7320
7912
|
return this.http.post(url, cart, { headers: headers, responseType: 'json' });
|
|
7321
7913
|
}
|
|
7322
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShoppingCartService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7914
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShoppingCartService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7323
7915
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShoppingCartService, providedIn: 'root' });
|
|
7324
7916
|
}
|
|
7325
7917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShoppingCartService, decorators: [{
|
|
@@ -7327,7 +7919,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7327
7919
|
args: [{
|
|
7328
7920
|
providedIn: 'root'
|
|
7329
7921
|
}]
|
|
7330
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }
|
|
7922
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
7923
|
+
type: Inject,
|
|
7924
|
+
args: ['ebizRootURL']
|
|
7925
|
+
}] }] });
|
|
7331
7926
|
|
|
7332
7927
|
class ShoppingCartViewComponent {
|
|
7333
7928
|
router;
|
|
@@ -8192,7 +8787,230 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8192
8787
|
type: Input
|
|
8193
8788
|
}] } });
|
|
8194
8789
|
|
|
8790
|
+
class LynxService {
|
|
8791
|
+
http;
|
|
8792
|
+
ebizRootURL;
|
|
8793
|
+
lynxUrl = '/ebiz/api/v1/lynx/';
|
|
8794
|
+
constructor(http, ebizRootURL) {
|
|
8795
|
+
this.http = http;
|
|
8796
|
+
this.ebizRootURL = ebizRootURL;
|
|
8797
|
+
this.lynxUrl = ebizRootURL + this.lynxUrl;
|
|
8798
|
+
}
|
|
8799
|
+
retrieveProjects() {
|
|
8800
|
+
const headers = new HttpHeaders();
|
|
8801
|
+
headers.append('Content-type', 'application/json');
|
|
8802
|
+
return this.http.get(this.lynxUrl + 'projects', { headers: headers });
|
|
8803
|
+
}
|
|
8804
|
+
retrieveProjectMetadata(projectID) {
|
|
8805
|
+
const headers = new HttpHeaders();
|
|
8806
|
+
headers.append('Content-type', 'application/json');
|
|
8807
|
+
return this.http.get(this.lynxUrl + 'metadata/' + projectID, { headers: headers });
|
|
8808
|
+
}
|
|
8809
|
+
storeImage(attachment, projectID) {
|
|
8810
|
+
const headers = new HttpHeaders();
|
|
8811
|
+
headers.append('Content-type', 'application/json');
|
|
8812
|
+
let url = this.lynxUrl + 'project/' + projectID + '/' + 'image';
|
|
8813
|
+
return this.http.post(url, attachment, { headers: headers });
|
|
8814
|
+
}
|
|
8815
|
+
tagImage(imageMetadata, imageID, projectID) {
|
|
8816
|
+
const headers = new HttpHeaders();
|
|
8817
|
+
headers.append('Content-type', 'application/json');
|
|
8818
|
+
let url = this.lynxUrl + 'project/' + projectID + '/' + 'image/' + imageID + '/metadata';
|
|
8819
|
+
return this.http.post(url, imageMetadata, { headers: headers });
|
|
8820
|
+
}
|
|
8821
|
+
downloadImage(imageID) {
|
|
8822
|
+
const headers = new HttpHeaders();
|
|
8823
|
+
headers.append('Content-type', 'application/json;odata=verbose');
|
|
8824
|
+
return this.http.get(this.lynxUrl + 'image' + '/' + imageID, { headers: headers, responseType: 'blob' });
|
|
8825
|
+
}
|
|
8826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8827
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, providedIn: 'root' });
|
|
8828
|
+
}
|
|
8829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, decorators: [{
|
|
8830
|
+
type: Injectable,
|
|
8831
|
+
args: [{
|
|
8832
|
+
providedIn: 'root'
|
|
8833
|
+
}]
|
|
8834
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
8835
|
+
type: Inject,
|
|
8836
|
+
args: ['ebizRootURL']
|
|
8837
|
+
}] }] });
|
|
8838
|
+
|
|
8839
|
+
class AccountService {
|
|
8840
|
+
http;
|
|
8841
|
+
ebizRootURL;
|
|
8842
|
+
URL = '/ebiz/api/v1/accounts';
|
|
8843
|
+
constructor(http, ebizRootURL) {
|
|
8844
|
+
this.http = http;
|
|
8845
|
+
this.ebizRootURL = ebizRootURL;
|
|
8846
|
+
this.URL = ebizRootURL + this.URL;
|
|
8847
|
+
}
|
|
8848
|
+
retrieveRolesForService(serviceName) {
|
|
8849
|
+
return this.http.get(this.URL + "/roles/" + serviceName);
|
|
8850
|
+
}
|
|
8851
|
+
retrieveUsersForService(serviceName) {
|
|
8852
|
+
return this.http.get(this.URL + "/users/service/" + serviceName);
|
|
8853
|
+
}
|
|
8854
|
+
searchAccounts(criteria) {
|
|
8855
|
+
return this.http.post(this.URL + "/search", criteria);
|
|
8856
|
+
}
|
|
8857
|
+
retrieveServicesByServiceType(serviceType) {
|
|
8858
|
+
return this.http.get(`${this.URL}/services/serviceTypes/${serviceType}/list`);
|
|
8859
|
+
}
|
|
8860
|
+
retrieveServiceNamesByServiceType(serviceType) {
|
|
8861
|
+
return this.http.get(`${this.URL}/services/serviceTypes/${serviceType}/names`);
|
|
8862
|
+
}
|
|
8863
|
+
retrieveAllServices() {
|
|
8864
|
+
return this.http.get(`${this.URL}/services/serviceTypes/all`);
|
|
8865
|
+
}
|
|
8866
|
+
retrieveService(name) {
|
|
8867
|
+
return this.http.get(`${this.URL}/services/serviceTypes/${name}`);
|
|
8868
|
+
}
|
|
8869
|
+
retrieveAttestationByType(type) {
|
|
8870
|
+
return this.http.get(`${this.URL}/attestation/${type}`);
|
|
8871
|
+
}
|
|
8872
|
+
updateServiceStatus(service) {
|
|
8873
|
+
return this.http.post(this.URL + "/updateServiceStatus", service);
|
|
8874
|
+
}
|
|
8875
|
+
searchAccountServiceAllows(criteria) {
|
|
8876
|
+
return this.http.post(this.URL + "/searchAccountServiceAllows", criteria);
|
|
8877
|
+
}
|
|
8878
|
+
createAccountServiceAllow(accountServiceAllow) {
|
|
8879
|
+
return this.http.post(this.URL + '/createAccountServiceAllow/', accountServiceAllow);
|
|
8880
|
+
}
|
|
8881
|
+
deleteAccountServiceAllow(accountServiceAllow) {
|
|
8882
|
+
return this.http
|
|
8883
|
+
.delete(this.URL + '/deleteAccountServiceAllow/service/' + accountServiceAllow.serviceName + '/account/' + accountServiceAllow.userID);
|
|
8884
|
+
}
|
|
8885
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8886
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
8887
|
+
}
|
|
8888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AccountService, decorators: [{
|
|
8889
|
+
type: Injectable,
|
|
8890
|
+
args: [{
|
|
8891
|
+
providedIn: 'root'
|
|
8892
|
+
}]
|
|
8893
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
8894
|
+
type: Inject,
|
|
8895
|
+
args: ['ebizRootURL']
|
|
8896
|
+
}] }] });
|
|
8897
|
+
|
|
8898
|
+
class ParameterService {
|
|
8899
|
+
http;
|
|
8900
|
+
ebizRootURL;
|
|
8901
|
+
baseUrl = '/ebiz/api/v1/parameters';
|
|
8902
|
+
constructor(http, ebizRootURL) {
|
|
8903
|
+
this.http = http;
|
|
8904
|
+
this.ebizRootURL = ebizRootURL;
|
|
8905
|
+
this.baseUrl = ebizRootURL + this.baseUrl;
|
|
8906
|
+
}
|
|
8907
|
+
retrieveParameterByName(parameterName) {
|
|
8908
|
+
let url = this.baseUrl + '/names/' + parameterName;
|
|
8909
|
+
return this.http.get(url);
|
|
8910
|
+
}
|
|
8911
|
+
retrieveParameterByID(parameterID) {
|
|
8912
|
+
let url = this.baseUrl + '/' + parameterID;
|
|
8913
|
+
return this.http.get(url);
|
|
8914
|
+
}
|
|
8915
|
+
createParameter(parameter) {
|
|
8916
|
+
let url = this.baseUrl;
|
|
8917
|
+
return this.http.post(url, parameter);
|
|
8918
|
+
}
|
|
8919
|
+
deleteParameter(parameterID) {
|
|
8920
|
+
let url = this.baseUrl + '/' + parameterID;
|
|
8921
|
+
return this.http.delete(url);
|
|
8922
|
+
}
|
|
8923
|
+
deleteParameterByName(parameterName) {
|
|
8924
|
+
let url = this.baseUrl + '/names/' + parameterName;
|
|
8925
|
+
return this.http.delete(url);
|
|
8926
|
+
}
|
|
8927
|
+
retrieveParameterByPrefix(prefix) {
|
|
8928
|
+
let url = this.baseUrl + '/namePrefix/' + prefix;
|
|
8929
|
+
return this.http.get(url);
|
|
8930
|
+
}
|
|
8931
|
+
updateParameter(parameter) {
|
|
8932
|
+
let url = this.baseUrl + '/' + parameter.id;
|
|
8933
|
+
return this.http.put(url, parameter);
|
|
8934
|
+
}
|
|
8935
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8936
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, providedIn: 'root' });
|
|
8937
|
+
}
|
|
8938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, decorators: [{
|
|
8939
|
+
type: Injectable,
|
|
8940
|
+
args: [{
|
|
8941
|
+
providedIn: 'root'
|
|
8942
|
+
}]
|
|
8943
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
8944
|
+
type: Inject,
|
|
8945
|
+
args: ['ebizRootURL']
|
|
8946
|
+
}] }] });
|
|
8947
|
+
|
|
8948
|
+
class OepaReferenceService {
|
|
8949
|
+
http;
|
|
8950
|
+
ebizRootURL;
|
|
8951
|
+
countiesUrl = '/ebiz/api/v1/references/counties/state';
|
|
8952
|
+
districtsUrl = '/ebiz/api/v1/references/districts';
|
|
8953
|
+
doLaaTypessUrl = '/ebiz/api/v1/asbestos/references/doLaaTypes';
|
|
8954
|
+
constructor(http, ebizRootURL) {
|
|
8955
|
+
this.http = http;
|
|
8956
|
+
this.ebizRootURL = ebizRootURL;
|
|
8957
|
+
this.countiesUrl = ebizRootURL + this.countiesUrl;
|
|
8958
|
+
this.districtsUrl = ebizRootURL + this.districtsUrl;
|
|
8959
|
+
this.doLaaTypessUrl = ebizRootURL + this.doLaaTypessUrl;
|
|
8960
|
+
}
|
|
8961
|
+
/**
|
|
8962
|
+
* Retrieve counties
|
|
8963
|
+
*/
|
|
8964
|
+
getCounties(state) {
|
|
8965
|
+
return this.http.get(this.countiesUrl + '/' + state);
|
|
8966
|
+
}
|
|
8967
|
+
/**
|
|
8968
|
+
* Retrieve districts
|
|
8969
|
+
*/
|
|
8970
|
+
getDistricts() {
|
|
8971
|
+
return this.http.get(this.districtsUrl);
|
|
8972
|
+
}
|
|
8973
|
+
/**
|
|
8974
|
+
* Retrieve DO/LAAs
|
|
8975
|
+
*/
|
|
8976
|
+
getDoLaaTypes() {
|
|
8977
|
+
return this.http.get(this.doLaaTypessUrl);
|
|
8978
|
+
}
|
|
8979
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaReferenceService, deps: [{ token: i1.HttpClient }, { token: 'ebizRootURL' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8980
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaReferenceService, providedIn: 'root' });
|
|
8981
|
+
}
|
|
8982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaReferenceService, decorators: [{
|
|
8983
|
+
type: Injectable,
|
|
8984
|
+
args: [{
|
|
8985
|
+
providedIn: 'root'
|
|
8986
|
+
}]
|
|
8987
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
8988
|
+
type: Inject,
|
|
8989
|
+
args: ['ebizRootURL']
|
|
8990
|
+
}] }] });
|
|
8991
|
+
|
|
8195
8992
|
class CommonFormsModule {
|
|
8993
|
+
static forRoot(ebizRootURL) {
|
|
8994
|
+
return {
|
|
8995
|
+
ngModule: CommonFormsModule,
|
|
8996
|
+
providers: [
|
|
8997
|
+
AccountSearchService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
8998
|
+
AccountService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
8999
|
+
EdocAttachmentService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9000
|
+
EntityService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9001
|
+
LynxService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9002
|
+
OepaAddressService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9003
|
+
OepaFileUtilService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9004
|
+
OepaPinService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9005
|
+
OepaReferenceService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9006
|
+
OepaUserAccountService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9007
|
+
ParameterService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9008
|
+
ParamsHelpService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9009
|
+
ShoppingCartService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9010
|
+
TableExportService, { provide: 'ebizRootURL', useValue: ebizRootURL },
|
|
9011
|
+
]
|
|
9012
|
+
};
|
|
9013
|
+
}
|
|
8196
9014
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CommonFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8197
9015
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CommonFormsModule, declarations: [AccountSearchInputComponent, AccountSearchModalComponent,
|
|
8198
9016
|
ActionBtnComponent, ActionBtnModalComponent, AddressComponent, ZipCodeComponent,
|
|
@@ -8368,49 +9186,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8368
9186
|
args: [{ selector: 'oepa-blank', template: "\n" }]
|
|
8369
9187
|
}], ctorParameters: () => [] });
|
|
8370
9188
|
|
|
8371
|
-
class LynxService {
|
|
8372
|
-
http;
|
|
8373
|
-
lynxUrl = '/ebiz/api/v1/lynx/';
|
|
8374
|
-
constructor(http) {
|
|
8375
|
-
this.http = http;
|
|
8376
|
-
}
|
|
8377
|
-
retrieveProjects() {
|
|
8378
|
-
const headers = new HttpHeaders();
|
|
8379
|
-
headers.append('Content-type', 'application/json');
|
|
8380
|
-
return this.http.get(this.lynxUrl + 'projects', { headers: headers });
|
|
8381
|
-
}
|
|
8382
|
-
retrieveProjectMetadata(projectID) {
|
|
8383
|
-
const headers = new HttpHeaders();
|
|
8384
|
-
headers.append('Content-type', 'application/json');
|
|
8385
|
-
return this.http.get(this.lynxUrl + 'metadata/' + projectID, { headers: headers });
|
|
8386
|
-
}
|
|
8387
|
-
storeImage(attachment, projectID) {
|
|
8388
|
-
const headers = new HttpHeaders();
|
|
8389
|
-
headers.append('Content-type', 'application/json');
|
|
8390
|
-
let url = this.lynxUrl + 'project/' + projectID + '/' + 'image';
|
|
8391
|
-
return this.http.post(url, attachment, { headers: headers });
|
|
8392
|
-
}
|
|
8393
|
-
tagImage(imageMetadata, imageID, projectID) {
|
|
8394
|
-
const headers = new HttpHeaders();
|
|
8395
|
-
headers.append('Content-type', 'application/json');
|
|
8396
|
-
let url = this.lynxUrl + 'project/' + projectID + '/' + 'image/' + imageID + '/metadata';
|
|
8397
|
-
return this.http.post(url, imageMetadata, { headers: headers });
|
|
8398
|
-
}
|
|
8399
|
-
downloadImage(imageID) {
|
|
8400
|
-
const headers = new HttpHeaders();
|
|
8401
|
-
headers.append('Content-type', 'application/json;odata=verbose');
|
|
8402
|
-
return this.http.get(this.lynxUrl + 'image' + '/' + imageID, { headers: headers, responseType: 'blob' });
|
|
8403
|
-
}
|
|
8404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8405
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, providedIn: 'root' });
|
|
8406
|
-
}
|
|
8407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LynxService, decorators: [{
|
|
8408
|
-
type: Injectable,
|
|
8409
|
-
args: [{
|
|
8410
|
-
providedIn: 'root'
|
|
8411
|
-
}]
|
|
8412
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
8413
|
-
|
|
8414
9189
|
const digitRegExp = /\d/;
|
|
8415
9190
|
/**
|
|
8416
9191
|
* This function is for use with th TextMask directive and creates a mask for integers
|
|
@@ -8450,50 +9225,6 @@ function convertToMask(strNumber) {
|
|
|
8450
9225
|
.map((char) => digitRegExp);
|
|
8451
9226
|
}
|
|
8452
9227
|
|
|
8453
|
-
class ParameterService {
|
|
8454
|
-
http;
|
|
8455
|
-
baseUrl = '/ebiz/api/v1/parameters';
|
|
8456
|
-
constructor(http) {
|
|
8457
|
-
this.http = http;
|
|
8458
|
-
}
|
|
8459
|
-
retrieveParameterByName(parameterName) {
|
|
8460
|
-
let url = this.baseUrl + '/names/' + parameterName;
|
|
8461
|
-
return this.http.get(url);
|
|
8462
|
-
}
|
|
8463
|
-
retrieveParameterByID(parameterID) {
|
|
8464
|
-
let url = this.baseUrl + '/' + parameterID;
|
|
8465
|
-
return this.http.get(url);
|
|
8466
|
-
}
|
|
8467
|
-
createParameter(parameter) {
|
|
8468
|
-
let url = this.baseUrl;
|
|
8469
|
-
return this.http.post(url, parameter);
|
|
8470
|
-
}
|
|
8471
|
-
deleteParameter(parameterID) {
|
|
8472
|
-
let url = this.baseUrl + '/' + parameterID;
|
|
8473
|
-
return this.http.delete(url);
|
|
8474
|
-
}
|
|
8475
|
-
deleteParameterByName(parameterName) {
|
|
8476
|
-
let url = this.baseUrl + '/names/' + parameterName;
|
|
8477
|
-
return this.http.delete(url);
|
|
8478
|
-
}
|
|
8479
|
-
retrieveParameterByPrefix(prefix) {
|
|
8480
|
-
let url = this.baseUrl + '/namePrefix/' + prefix;
|
|
8481
|
-
return this.http.get(url);
|
|
8482
|
-
}
|
|
8483
|
-
updateParameter(parameter) {
|
|
8484
|
-
let url = this.baseUrl + '/' + parameter.id;
|
|
8485
|
-
return this.http.put(url, parameter);
|
|
8486
|
-
}
|
|
8487
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8488
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, providedIn: 'root' });
|
|
8489
|
-
}
|
|
8490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ParameterService, decorators: [{
|
|
8491
|
-
type: Injectable,
|
|
8492
|
-
args: [{
|
|
8493
|
-
providedIn: 'root'
|
|
8494
|
-
}]
|
|
8495
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
8496
|
-
|
|
8497
9228
|
class ValidationService {
|
|
8498
9229
|
constructor() { }
|
|
8499
9230
|
processValidators(form, formValidators) {
|
|
@@ -8684,6 +9415,78 @@ const TV_APP_EU_GROUP_IMG = BASE64_PREFIX + 'R0lGODlhEAAQANUAAO/v7+zqzOfn59/f39f
|
|
|
8684
9415
|
const USER_IMG = BASE64_PREFIX + 'R0lGODlhEwAQALMAAM6aMf///84AAAAEAK2qlO/r74SChAICbsbDxv/PYzFlnAAAAP///wAAAAAAAAAAACH5BAEAAAwALAAAAAATABAAAARbkMkZapXWTrm6X1i2fd0AMlkwfglypusytMkrTh1Cd6GGL7RCggCCrWjE3mXDWCAAOpsP9zR4lKqfE3DC4hSKwyLQRd2aYfCBTDkv1Ie4QrpEgxUCAbh4Tt1SEQA7';
|
|
8685
9416
|
const V_ELLIPSIS_IMG = BASE64_PREFIX + 'R0lGODlhEAAbAKEDABERESIiIkRERP///yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgADACwAAAAAEAAbAAACIJyPqcvtrwAQcEgKQ8C1+w9+V6VxThmm6uqh0Jht7EwXADs=';
|
|
8686
9417
|
|
|
9418
|
+
class CustomEncoder {
|
|
9419
|
+
encodeKey(key) {
|
|
9420
|
+
return encodeURIComponent(key);
|
|
9421
|
+
}
|
|
9422
|
+
encodeValue(value) {
|
|
9423
|
+
return encodeURIComponent(value);
|
|
9424
|
+
}
|
|
9425
|
+
decodeKey(key) {
|
|
9426
|
+
return decodeURIComponent(key);
|
|
9427
|
+
}
|
|
9428
|
+
decodeValue(value) {
|
|
9429
|
+
return decodeURIComponent(value);
|
|
9430
|
+
}
|
|
9431
|
+
}
|
|
9432
|
+
|
|
9433
|
+
class OepaHttpInterceptor {
|
|
9434
|
+
userAccountService;
|
|
9435
|
+
defaultTimeout = 5 * 60 * 1000;
|
|
9436
|
+
constructor(userAccountService) {
|
|
9437
|
+
this.userAccountService = userAccountService;
|
|
9438
|
+
}
|
|
9439
|
+
/**
|
|
9440
|
+
* Add a timestamp as a query parameter to all http requests
|
|
9441
|
+
* @param req
|
|
9442
|
+
* @param next
|
|
9443
|
+
*/
|
|
9444
|
+
intercept(req, next) {
|
|
9445
|
+
this.userAccountService.resetIdleTime();
|
|
9446
|
+
const paramsReq = req.clone({ params: req.params.set('oepats', new Date().getTime().toString()) });
|
|
9447
|
+
const params = new HttpParams({ encoder: new CustomEncoder(), fromString: paramsReq.params.toString() });
|
|
9448
|
+
const httpUrlEncoding = new HttpUrlEncodingCodec();
|
|
9449
|
+
const changedReq = req.clone({ params, url: httpUrlEncoding.encodeValue(req.url) });
|
|
9450
|
+
const timeoutValue = req.headers.get('timeout') || this.defaultTimeout;
|
|
9451
|
+
const timeoutValueNumeric = Number(timeoutValue);
|
|
9452
|
+
return next.handle(changedReq).pipe(timeout(timeoutValueNumeric), catchError((error) => {
|
|
9453
|
+
let msg = error.headers ? error.headers.get('OEPA_ERROR') : '';
|
|
9454
|
+
console.log('msg from header = ' + msg);
|
|
9455
|
+
console.log('ERROR: [' + req.url + ']: ' + JSON.stringify(error));
|
|
9456
|
+
msg = msg || error.error.message || error.error.errorMessage || 'Server error.';
|
|
9457
|
+
if (msg) {
|
|
9458
|
+
if (msg.indexOf('User account is required') > -1
|
|
9459
|
+
|| msg.toUpperCase().indexOf('USERID IS MISSING') > -1) {
|
|
9460
|
+
alert(msg);
|
|
9461
|
+
this.userAccountService.redirectToLogout();
|
|
9462
|
+
}
|
|
9463
|
+
msg = this.shortenErrorMessage(msg);
|
|
9464
|
+
}
|
|
9465
|
+
return throwError(() => msg);
|
|
9466
|
+
}));
|
|
9467
|
+
}
|
|
9468
|
+
/**
|
|
9469
|
+
* Shorten error message in the event of a JSON parse error
|
|
9470
|
+
*/
|
|
9471
|
+
shortenErrorMessage(msg) {
|
|
9472
|
+
const JSONParseMsg = 'JSON parse error:';
|
|
9473
|
+
const JSONParseIdx = msg.indexOf(JSONParseMsg);
|
|
9474
|
+
if (JSONParseIdx > -1) {
|
|
9475
|
+
const semicolonIdx = msg.indexOf(';');
|
|
9476
|
+
msg = msg.substring(JSONParseMsg.length, semicolonIdx);
|
|
9477
|
+
}
|
|
9478
|
+
return msg;
|
|
9479
|
+
}
|
|
9480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaHttpInterceptor, deps: [{ token: OepaUserAccountService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9481
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaHttpInterceptor, providedIn: 'root' });
|
|
9482
|
+
}
|
|
9483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OepaHttpInterceptor, decorators: [{
|
|
9484
|
+
type: Injectable,
|
|
9485
|
+
args: [{
|
|
9486
|
+
providedIn: 'root'
|
|
9487
|
+
}]
|
|
9488
|
+
}], ctorParameters: () => [{ type: OepaUserAccountService }] });
|
|
9489
|
+
|
|
8687
9490
|
/*
|
|
8688
9491
|
* Public API Surface of oepa-ui-lib
|
|
8689
9492
|
*/
|
|
@@ -8692,5 +9495,5 @@ const V_ELLIPSIS_IMG = BASE64_PREFIX + 'R0lGODlhEAAbAKEDABERESIiIkRERP///yH+FUNy
|
|
|
8692
9495
|
* Generated bundle index. Do not edit.
|
|
8693
9496
|
*/
|
|
8694
9497
|
|
|
8695
|
-
export { AccountSearchInputComponent, AccountSearchModalComponent, ActionBtnComponent, ActionBtnModalComponent, AddressComponent, ArrayFilterPipe, ArraySortPipe, BlankComponent, CATALOG_IMG, CAUTION_IMG, CE_IMG, CHARGE_CO_IMG, CHECK_IMG, CheckboxComponent, CheckboxInputComponent, CommentModalComponent, CommonFormsModule, ConfirmationModalComponent, ContactComponent, DEFINITIONS_IMG, DELETE_IMG, DIALOG_IMG, DOWNLOAD_IMG, DateInputComponent, DateInputModalComponent, DatepickerComponent, DaterangepickerComponent, DualListBoxComponent, ERROR_IMG, EU_CAUTION_IMG, EU_IMG, EXCLUDED_EU, EbizAddressComponent, EdocAttachmentComponent, EdocAttachmentService, EntityService, FACILITY_IMG, FOLDER_CLOSED_IMG, FOLDER_OPEN_IMG, FileUploadComponent, GLOBAL_HELP_IMG, GREEN_CHECK_IMG, GREEN_DOT_IMG, ICON_DOC_IMG, ICON_DWG_IMG, ICON_PDF_IMG, ICON_TXT_IMG, ICON_XLS_IMG, INACTIVE_USER_IMG, INSIGNIFICANT_EU_CAUTION_IMG, INSIGNIFICANT_EU_IMG, INSIGNIGICANT_EU_NO_APP_REQS_CAUTION_IMG, INSIGNIGICANT_EU_NO_APP_REQS_IMG, LOCK_ICON1_IMG, LOCK_ICON1_PARTIAL_IMG, LynxImageUploadComponent, LynxService, MessageComponent, MessageListComponent, MultiFileUploadComponent, NOT_INCLUDEABLE_EU_IMG, NotesModalComponent, NumericInputComponent, NumericInputDirective, OEPAErrorMessageComponent, OEPAWaitMessageComponent, OepaAddressService, OepaFormsService, OepaMessage, OepaMessageType, OepaPinService, OepaTableCellClassnamePipe, OepaTableCellColSpanPipe, OepaTableCellIconClassnamePipe, OepaTableCellImgSrcPipe, OepaTableCellInnerHtmlPipe, OepaTableCellValuePipe, OepaTableFilteringDirective, OepaTableSortingDirective, OrganizationCreateModalComponent, OrganizationSearchInputComponent, OrganizationSearchModalComponent, PDF_IMG, PERMIT_EU_GROUP_IMG, PERMIT_EU_IMG, PERMIT_IMG, PROCESS_IMG, PTableComponent, ParameterService, ParamsHelpButtonComponent, PersonCreateModalComponent, PersonSearchInputComponent, PersonSearchModalComponent, PhoneNumberComponent, PinModalComponent, PlaceCreateModalComponent, PlaceSearchInputComponent, PlaceSearchModalComponent, RED_DOT_IMG, REPORT_EU_GROUP_CAUTION_IMG, REPORT_EU_GROUP_IMG, REPORT_IMG, REPORT_PERIOD_CAUTION_IMG, REPORT_PERIOD_IMG, SCENARIO_IMG, SHUTDOWN_EU_IMG, SHUTDOWN_FACILITY_IMG, STACK_IMG, SelectInputComponent, ServerTimeoutModalComponent, ShoppingCartService, ShoppingCartSummaryComponent, ShoppingCartViewComponent, SortOptions, StartEndTimepickerComponent, TOWER_IMG, TRIVIAL_EU_CAUTION_IMG, TRIVIAL_EU_IMG, TV_APP_EU_GROUP_IMG, TableComponent, TableExportService, TableService, TemplateConfirmationModalComponent, TextAreaInputComponent, TextInputComponent, TimeoutModalComponent, TimepickerComponent, USER_IMG, V_ELLIPSIS_IMG, ValidationService, YesNoBooleanComponent, YesNoComponent, YesNoOtherInputComponent, ZipCodeComponent, oepaCreateIntegerMask };
|
|
9498
|
+
export { AccountSearchInputComponent, AccountSearchModalComponent, ActionBtnComponent, ActionBtnModalComponent, AddressComponent, ArrayFilterPipe, ArraySortPipe, BlankComponent, CATALOG_IMG, CAUTION_IMG, CE_IMG, CHARGE_CO_IMG, CHECK_IMG, CheckboxComponent, CheckboxInputComponent, CommentModalComponent, CommonFormsModule, ConfirmationModalComponent, ContactComponent, CustomEncoder, DEFINITIONS_IMG, DELETE_IMG, DIALOG_IMG, DOWNLOAD_IMG, DateInputComponent, DateInputModalComponent, DatepickerComponent, DaterangepickerComponent, DualListBoxComponent, ERROR_IMG, EU_CAUTION_IMG, EU_IMG, EXCLUDED_EU, EbizAddressComponent, EdocAttachmentComponent, EdocAttachmentService, EntityService, FACILITY_IMG, FOLDER_CLOSED_IMG, FOLDER_OPEN_IMG, FileUploadComponent, GLOBAL_HELP_IMG, GREEN_CHECK_IMG, GREEN_DOT_IMG, ICON_DOC_IMG, ICON_DWG_IMG, ICON_PDF_IMG, ICON_TXT_IMG, ICON_XLS_IMG, INACTIVE_USER_IMG, INSIGNIFICANT_EU_CAUTION_IMG, INSIGNIFICANT_EU_IMG, INSIGNIGICANT_EU_NO_APP_REQS_CAUTION_IMG, INSIGNIGICANT_EU_NO_APP_REQS_IMG, LOCK_ICON1_IMG, LOCK_ICON1_PARTIAL_IMG, LynxImageUploadComponent, LynxService, MessageComponent, MessageListComponent, MultiFileUploadComponent, NOT_INCLUDEABLE_EU_IMG, NotesModalComponent, NumericInputComponent, NumericInputDirective, OEPAErrorMessageComponent, OEPAWaitMessageComponent, OepaAddressService, OepaFormsService, OepaHttpInterceptor, OepaMessage, OepaMessageType, OepaPinService, OepaTableCellClassnamePipe, OepaTableCellColSpanPipe, OepaTableCellIconClassnamePipe, OepaTableCellImgSrcPipe, OepaTableCellInnerHtmlPipe, OepaTableCellValuePipe, OepaTableFilteringDirective, OepaTableSortingDirective, OrganizationCreateModalComponent, OrganizationSearchInputComponent, OrganizationSearchModalComponent, PDF_IMG, PERMIT_EU_GROUP_IMG, PERMIT_EU_IMG, PERMIT_IMG, PROCESS_IMG, PTableComponent, ParameterService, ParamsHelpButtonComponent, PersonCreateModalComponent, PersonSearchInputComponent, PersonSearchModalComponent, PhoneNumberComponent, PinModalComponent, PlaceCreateModalComponent, PlaceSearchInputComponent, PlaceSearchModalComponent, RED_DOT_IMG, REPORT_EU_GROUP_CAUTION_IMG, REPORT_EU_GROUP_IMG, REPORT_IMG, REPORT_PERIOD_CAUTION_IMG, REPORT_PERIOD_IMG, SCENARIO_IMG, SHUTDOWN_EU_IMG, SHUTDOWN_FACILITY_IMG, STACK_IMG, SelectInputComponent, ServerTimeoutModalComponent, ShoppingCartService, ShoppingCartSummaryComponent, ShoppingCartViewComponent, SortOptions, StartEndTimepickerComponent, TOWER_IMG, TRIVIAL_EU_CAUTION_IMG, TRIVIAL_EU_IMG, TV_APP_EU_GROUP_IMG, TableComponent, TableExportService, TableService, TemplateConfirmationModalComponent, TextAreaInputComponent, TextInputComponent, TimeoutModalComponent, TimepickerComponent, USER_IMG, V_ELLIPSIS_IMG, ValidationService, YesNoBooleanComponent, YesNoComponent, YesNoOtherInputComponent, ZipCodeComponent, oepaCreateIntegerMask };
|
|
8696
9499
|
//# sourceMappingURL=ohioepa-oepa-ui-lib.mjs.map
|