@ohioepa/oepa-ui-lib 1.2.11 → 1.2.13

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.
@@ -1750,6 +1750,8 @@ class TableComponent {
1750
1750
  const sortedData = this.sortData(filteredData);
1751
1751
  this.rows = this.changePage(sortedData);
1752
1752
  this.pageInfo.length = sortedData.length;
1753
+ this.allRowsSelected = false;
1754
+ this.rowSelected.emit([]);
1753
1755
  this.dataHasDetails = this.checkForDetails(this.rows);
1754
1756
  }
1755
1757
  updatePage() {
@@ -1892,7 +1894,12 @@ class TableComponent {
1892
1894
  toggleAllRowsSelection() {
1893
1895
  const selectedRows = [];
1894
1896
  this.allRowsSelected = !this.allRowsSelected;
1897
+ // deselect all rows
1895
1898
  this._data.forEach((r) => {
1899
+ r.selected = false;
1900
+ });
1901
+ // select only visible rows
1902
+ this.rows.forEach((r) => {
1896
1903
  if (r.selectable) {
1897
1904
  r.selected = this.allRowsSelected;
1898
1905
  }
@@ -1900,7 +1907,8 @@ class TableComponent {
1900
1907
  selectedRows.push(r);
1901
1908
  }
1902
1909
  });
1903
- this.updateTable();
1910
+ this.rows.slice();
1911
+ // this.updateTable();
1904
1912
  this.rowSelected.emit(selectedRows);
1905
1913
  }
1906
1914
  toggleRowSelection(row) {
@@ -1917,7 +1925,8 @@ class TableComponent {
1917
1925
  this.allRowsSelected = false;
1918
1926
  }
1919
1927
  });
1920
- this.updateTable();
1928
+ this.rows.slice();
1929
+ // this.updateTable();
1921
1930
  this.rowSelected.emit(selectedRows);
1922
1931
  }
1923
1932
  singleRowSelection(row) {
@@ -1936,7 +1945,8 @@ class TableComponent {
1936
1945
  dr.selected = false;
1937
1946
  }
1938
1947
  });
1939
- this.updateTable();
1948
+ this.rows.slice();
1949
+ // this.updateTable();
1940
1950
  this.rowSelected.emit(selectedRows);
1941
1951
  }
1942
1952
  prepareRowsForExport(rows) {
@@ -7184,6 +7194,7 @@ class OepaUserAccountService {
7184
7194
  personID = '';
7185
7195
  sessionID = '';
7186
7196
  webappsRootURL = '';
7197
+ ebizVersion = '';
7187
7198
  logoutPath = '';
7188
7199
  idleTimerRunning = false;
7189
7200
  idleTime = 0;
@@ -7206,7 +7217,6 @@ class OepaUserAccountService {
7206
7217
  return this.http.get(this.hostUrl + this.accountsUrl + '/' + userid);
7207
7218
  }
7208
7219
  retrieveAccountByOHID(ohid, app) {
7209
- console.log('retrieve account for: ' + ohid);
7210
7220
  const url = this.hostUrl + this.accountsUrl + '/ohid/' + ohid;
7211
7221
  return this.http.get(url, { params: { 'app': app } }).pipe(map((userAccount) => {
7212
7222
  this.userAccount$.next(userAccount);
@@ -7214,31 +7224,27 @@ class OepaUserAccountService {
7214
7224
  }));
7215
7225
  }
7216
7226
  /**
7217
- * @deprecated Should not use session user ID for Amplify apps
7218
7227
  * Retrieve the user account for the currently logged in user.
7219
7228
  * @returns Observable<OepaUserAccount>
7220
7229
  */
7221
- retrieveAccountForCurrentUser() {
7230
+ retrieveAccountForCurrentUser(app) {
7222
7231
  return this.http.get(this.hostUrl + '/api/v1/userAccounts/login').pipe(map((account) => {
7223
7232
  if (!account) {
7224
7233
  if (this.personID && this.sessionID) {
7225
- this.retrieveAccountForInternalSession(this.personID, this.sessionID).subscribe({
7234
+ this.retrieveAccountForInternalSession(this.personID, this.sessionID, app).subscribe({
7226
7235
  next: internalAccount => {
7227
7236
  if (internalAccount) {
7228
7237
  this.account = internalAccount;
7229
7238
  }
7230
7239
  else {
7231
- this.logMessageOnServer('retrieveAccountForCurrentUser - no account, redirecting to logout');
7232
7240
  this.redirectToLogout();
7233
7241
  }
7234
7242
  }, error: err => {
7235
- this.logMessageOnServer('Failed retrieving internal account: ' + err);
7236
7243
  this.redirectToLogout();
7237
7244
  }
7238
7245
  });
7239
7246
  }
7240
7247
  else {
7241
- this.logMessageOnServer('retrieveAccountForCurrentUser - no account, redirecting to logout');
7242
7248
  this.redirectToLogout();
7243
7249
  }
7244
7250
  }
@@ -7263,19 +7269,16 @@ class OepaUserAccountService {
7263
7269
  }
7264
7270
  /**
7265
7271
  * Retrieve the user account for the currently logged in user.
7266
- * @deprecated should retrieve account by OHID instead
7267
7272
  * @param sessionID person ID for internal user
7268
7273
  * @returns Observable<OepaUserAccount>
7269
7274
  */
7270
- retrieveAccountForInternalSession(personID, sessionID) {
7275
+ retrieveAccountForInternalSession(personID, sessionID, app) {
7271
7276
  this.account = {};
7272
- const url = this.hostUrl + '/api/v1/userAccounts/internal/personID/' + personID + '/sessionID/' + sessionID;
7273
- console.log('retrieveAccountForInternalSession: ' + url);
7274
- return this.http.get(url).pipe(map((account) => {
7277
+ const url = this.hostUrl + this.accountsUrl + '/internal/personID/' + personID + '/sessionID/' + sessionID;
7278
+ return this.http.get(url, { params: { 'app': app } }).pipe(map((account) => {
7275
7279
  this.account = account;
7276
7280
  this.personID = personID;
7277
7281
  this.sessionID = sessionID;
7278
- console.log('retrieveAccountForInternalSession: ' + this.account?.loginName || '<unknown>');
7279
7282
  return account;
7280
7283
  }));
7281
7284
  }
@@ -7350,13 +7353,13 @@ class OepaUserAccountService {
7350
7353
  * The methods below currently apply only to eBiz.
7351
7354
  * ===========================================================================================================================
7352
7355
  */
7353
- getWebappsRootURL() {
7356
+ getWebappsRootURL(app) {
7354
7357
  if (this.webappsRootURL) {
7355
7358
  return of(this.webappsRootURL);
7356
7359
  }
7357
7360
  else {
7358
7361
  const url = this.hostUrl + '/api/v1/gateway/gatewayConfig';
7359
- return this.http.get(url).pipe(map((gatewayConfig) => {
7362
+ return this.http.get(url, { params: { 'app': app } }).pipe(map((gatewayConfig) => {
7360
7363
  if (gatewayConfig) {
7361
7364
  this.webappsRootURL = gatewayConfig.webappsRootURL;
7362
7365
  }
@@ -7364,17 +7367,17 @@ class OepaUserAccountService {
7364
7367
  }));
7365
7368
  }
7366
7369
  }
7367
- getEBizVersion() {
7368
- if (this.webappsRootURL) {
7369
- return of(this.webappsRootURL);
7370
+ getEBizVersion(app) {
7371
+ if (this.ebizVersion) {
7372
+ return of(this.ebizVersion);
7370
7373
  }
7371
7374
  else {
7372
7375
  const url = this.hostUrl + '/api/v1/gateway/gatewayConfig';
7373
- return this.http.get(url).pipe(map((gatewayConfig) => {
7376
+ return this.http.get(url, { params: { 'app': app } }).pipe(map((gatewayConfig) => {
7374
7377
  if (gatewayConfig) {
7375
- this.webappsRootURL = gatewayConfig.versionNumber;
7378
+ this.ebizVersion = gatewayConfig.versionNumber;
7376
7379
  }
7377
- return this.webappsRootURL;
7380
+ return this.ebizVersion;
7378
7381
  }));
7379
7382
  }
7380
7383
  }
@@ -7577,6 +7580,7 @@ class PinModalComponent {
7577
7580
  }
7578
7581
  submitCallback;
7579
7582
  submittingComponent;
7583
+ app = '';
7580
7584
  close = new EventEmitter();
7581
7585
  imageRoot = '/AngularWebApp/assets/images';
7582
7586
  oepaSubmissionForm;
@@ -7607,7 +7611,7 @@ class PinModalComponent {
7607
7611
  }
7608
7612
  retrievePin() {
7609
7613
  this.errorMessage = '';
7610
- this.userAccountService.retrieveAccountForCurrentUser().subscribe(account => {
7614
+ this.userAccountService.retrieveAccountForCurrentUser(this.app).subscribe(account => {
7611
7615
  if (account) {
7612
7616
  this.userAccount = account;
7613
7617
  this.currentUserID = account.loginName;
@@ -7725,7 +7729,7 @@ class PinModalComponent {
7725
7729
  });
7726
7730
  }
7727
7731
  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 });
7728
- 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...&nbsp;&nbsp;</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"] }] });
7732
+ 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", app: "app" }, 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...&nbsp;&nbsp;</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"] }] });
7729
7733
  }
7730
7734
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PinModalComponent, decorators: [{
7731
7735
  type: Component,
@@ -7736,6 +7740,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7736
7740
  type: Input
7737
7741
  }], submittingComponent: [{
7738
7742
  type: Input
7743
+ }], app: [{
7744
+ type: Input
7739
7745
  }], close: [{
7740
7746
  type: Output
7741
7747
  }] } });