@trudb/tru-common-lib 0.2.529 → 0.2.534

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.
@@ -4068,7 +4068,7 @@ class TruAuth {
4068
4068
  });
4069
4069
  }
4070
4070
  userClaims() {
4071
- if (this.appEnvironment.authType === 'session' || this.appEnvironment.authType === 'windows') {
4071
+ if (this.appEnvironment.authType === 'session') {
4072
4072
  return this.http
4073
4073
  .get(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/userClaims`)
4074
4074
  .pipe(tap((userClaims) => {
@@ -4824,35 +4824,6 @@ class TruDetailViewBase {
4824
4824
  this.desktopViewEventNotifier = desktopViewEventNotifier;
4825
4825
  this.util = util;
4826
4826
  }
4827
- onDocumentKeydown = (event) => {
4828
- if (this.view.active && this.view.window.active) {
4829
- let keySequence = this.util.getKeySequence(event);
4830
- if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
4831
- //this.onAddEntity();
4832
- event.preventDefault();
4833
- }
4834
- if (keySequence === 'ctrl+d' || keySequence === 'meta+d') {
4835
- this.onDeleteEntity();
4836
- event.preventDefault();
4837
- }
4838
- if (keySequence === 'ctrl+up' || keySequence === 'meta+up') {
4839
- this.onFirstEntity();
4840
- event.preventDefault();
4841
- }
4842
- if (keySequence === 'ctrl+left' || keySequence === 'meta+left') {
4843
- this.onPreviousEntity();
4844
- event.preventDefault();
4845
- }
4846
- if (keySequence === 'ctrl+right' || keySequence === 'meta+right') {
4847
- this.onNextEntity();
4848
- event.preventDefault();
4849
- }
4850
- if (keySequence === 'ctrl+down' || keySequence === 'meta+down') {
4851
- this.onLastEntity();
4852
- event.preventDefault();
4853
- }
4854
- }
4855
- };
4856
4827
  calculateNextIndex = () => {
4857
4828
  let nextIndex = 0;
4858
4829
  var removedRecords = this.recordsBeforeRevert - this.entities.length;
@@ -4954,7 +4925,38 @@ class TruDetailViewBase {
4954
4925
  if (this.active)
4955
4926
  this.setEntityDisplayValues(this.tableName);
4956
4927
  }));
4957
- this.subs.push(fromEvent(document, 'keydown').subscribe(this.onDocumentKeydown));
4928
+ this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
4929
+ if (this.view.active && this.view.window.active) {
4930
+ let keySequence = this.util.getKeySequence(event);
4931
+ if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
4932
+ //this.onAddEntity();
4933
+ event.preventDefault();
4934
+ }
4935
+ if (keySequence === 'ctrl+d' || keySequence === 'meta+d') {
4936
+ this.onDeleteEntity();
4937
+ event.preventDefault();
4938
+ }
4939
+ if (keySequence === 'ctrl+up' || keySequence === 'meta+up') {
4940
+ this.onFirstEntity();
4941
+ event.preventDefault();
4942
+ }
4943
+ if (keySequence === 'ctrl+left' || keySequence === 'meta+left') {
4944
+ this.onPreviousEntity();
4945
+ event.preventDefault();
4946
+ }
4947
+ if (keySequence === 'ctrl+right' || keySequence === 'meta+right') {
4948
+ this.onNextEntity();
4949
+ event.preventDefault();
4950
+ }
4951
+ if (keySequence === 'ctrl+down' || keySequence === 'meta+down') {
4952
+ this.onLastEntity();
4953
+ event.preventDefault();
4954
+ }
4955
+ var targetIsControl = this.util.targetIsControl(event.target);
4956
+ if (!targetIsControl && event.ctrlKey || event.altKey)
4957
+ event.preventDefault();
4958
+ }
4959
+ }));
4958
4960
  }
4959
4961
  setNavigationIndex(index) {
4960
4962
  this.navigationIndex = index;
@@ -6093,9 +6095,10 @@ class TruCardColumn {
6093
6095
  };
6094
6096
  updateItemsSource(newEntities, revert) {
6095
6097
  this.clear();
6096
- this.busyMessage = 'Rendering...';
6097
6098
  if (!revert)
6098
6099
  localStorage.setItem('scroll_position' + v4(), '0');
6100
+ if (newEntities.length)
6101
+ this.busyMessage = 'Rendering...';
6099
6102
  this.columnFilterChoices = [];
6100
6103
  this.columnFilterRefs = [];
6101
6104
  this.cardFilterStr = null;
@@ -6109,10 +6112,11 @@ class TruCardColumn {
6109
6112
  let columns = [];
6110
6113
  let query = new breeze.EntityQuery('Query' + this.parentTableName);
6111
6114
  let parentRefs = newEntities.map((e) => { return e[this.parentTableName + 'Ref']; });
6112
- if (this.config.resultConfig.cardColumnQuery)
6113
- query = this.config.resultConfig.cardColumnQuery(query, this.config.parentToChildRelationshipName);
6114
- else
6115
- query = query.expand(this.config.parentToChildRelationshipName);
6115
+ //if (this.config.resultConfig.cardColumnQuery)
6116
+ // query = this.config.resultConfig.cardColumnQuery(query, this.config.parentToChildRelationshipName);
6117
+ //else
6118
+ // query = query.expand(this.config.parentToChildRelationshipName);
6119
+ query = query.expand([this.config.parentToChildRelationshipName, 'oBooking', 'oSalesContract']);
6116
6120
  let uniqueParentRefs = [...new Set(parentRefs)];
6117
6121
  query = query.where(this.parentTableName + 'Ref', 'in', uniqueParentRefs);
6118
6122
  //if (this.parentQuery)
@@ -8639,30 +8643,6 @@ class TruDataGrid {
8639
8643
  this.desktopViewEventNotifier = desktopViewEventNotifier;
8640
8644
  this.tabGroupEventNotifier = tabGroupEventNotifier;
8641
8645
  }
8642
- onDocumentKeydown = (event) => {
8643
- if (this.config.view.active && this.config.view.window.active) {
8644
- if (event.code === 'Space' && event.target.classList.contains('ag-cell-value')) {
8645
- event.preventDefault();
8646
- }
8647
- let keySequence = this.util.getKeySequence(event);
8648
- if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
8649
- this.onAdd();
8650
- event.preventDefault();
8651
- }
8652
- if (keySequence === 'ctrl+d' || keySequence === 'meta+d') {
8653
- this.onDelete();
8654
- event.preventDefault();
8655
- }
8656
- if (keySequence === 'ctrl+k' || keySequence === 'meta+k') {
8657
- this.onKeep();
8658
- event.preventDefault();
8659
- }
8660
- if (keySequence === 'ctrl+r' || keySequence === 'meta+r') {
8661
- this.onRemove();
8662
- event.preventDefault();
8663
- }
8664
- }
8665
- };
8666
8646
  enhanceRowDataForEntity = (entity) => {
8667
8647
  let rowData = this.config.resultConfig.rowDataEnhancer(entity);
8668
8648
  rowData.$entity = entity;
@@ -8794,7 +8774,33 @@ class TruDataGrid {
8794
8774
  }
8795
8775
  this.api.refreshCells({ force: true });
8796
8776
  }));
8797
- this.subs.push(fromEvent(document, 'keydown').subscribe(this.onDocumentKeydown));
8777
+ this.subs.push(fromEvent(document, 'keydown').subscribe((event) => {
8778
+ if (this.config.view.active && this.config.view.window.active) {
8779
+ if (event.code === 'Space' && event.target.classList.contains('ag-cell-value')) {
8780
+ event.preventDefault();
8781
+ }
8782
+ let keySequence = this.util.getKeySequence(event);
8783
+ if (keySequence === 'ctrl+i' || keySequence === 'meta+i') {
8784
+ this.onAdd();
8785
+ event.preventDefault();
8786
+ }
8787
+ if (keySequence === 'ctrl+d' || keySequence === 'meta+d') {
8788
+ this.onDelete();
8789
+ event.preventDefault();
8790
+ }
8791
+ if (keySequence === 'ctrl+k' || keySequence === 'meta+k') {
8792
+ this.onKeep();
8793
+ event.preventDefault();
8794
+ }
8795
+ if (keySequence === 'ctrl+r' || keySequence === 'meta+r') {
8796
+ this.onRemove();
8797
+ event.preventDefault();
8798
+ }
8799
+ var targetIsControl = this.util.targetIsControl(event.target);
8800
+ if (!targetIsControl && event.ctrlKey || event.altKey)
8801
+ event.preventDefault();
8802
+ }
8803
+ }));
8798
8804
  this.subs.push(fromEvent(document, 'mousedown').subscribe((event) => {
8799
8805
  if (this.config.view.active &&
8800
8806
  this.config.view.window.active &&
@@ -9115,10 +9121,9 @@ class TruDataGrid {
9115
9121
  this.firstSearchRan = true;
9116
9122
  this.api?.hideOverlay();
9117
9123
  this.api?.showLoadingOverlay();
9118
- let parentIsUnsaved = !!this.entity && this.entity.Ref < 0;
9119
- let parentWasLoaded = !!this.entity && this.loadedEntities.indexOf(this.entity.Ref) > -1;
9120
- let canSearchLocally = this.config.resultConfig.canSearchLocally !== false;
9121
- let searchLocally = parentIsUnsaved || (canSearchLocally && parentWasLoaded);
9124
+ let searchLocally = this.entity && this.entity['Ref'] < 0 || this.loadedEntities.some((ref) => {
9125
+ return ref === this.entity['Ref'];
9126
+ });
9122
9127
  let joins = [];
9123
9128
  if (searchLocally) {
9124
9129
  joins.push(this.dataContext.entityAccess().searchCacheOnly(this.config.resultConfig.entityType, setupQuery, this.config.resultConfig.expands));
@@ -9141,7 +9146,7 @@ class TruDataGrid {
9141
9146
  },
9142
9147
  complete: () => {
9143
9148
  if (this.gridType !== TruDataGridTypes.Search)
9144
- this.loadedEntities.push(this.entity.Ref);
9149
+ this.loadedEntities.push(this.entity[this.entity.constructor.name + 'Ref']);
9145
9150
  this.api.hideOverlay();
9146
9151
  if (this.rowData === null || !this.rowData.length) {
9147
9152
  this.api.showNoRowsOverlay();
@@ -10654,6 +10659,9 @@ class TruDesktopWindow {
10654
10659
  this.lastView();
10655
10660
  event.preventDefault();
10656
10661
  }
10662
+ var targetIsControl = this.util.targetIsControl(event.target);
10663
+ if (!targetIsControl && event.ctrlKey || event.altKey)
10664
+ event.preventDefault();
10657
10665
  };
10658
10666
  /**
10659
10667
  * @tru.doc watch
@@ -11525,6 +11533,8 @@ class TruDesktop {
11525
11533
  onKeyDown = (event) => {
11526
11534
  if (event.key === 'Control' || event.key === 'Shift')
11527
11535
  return;
11536
+ if (event.altKey)
11537
+ event.preventDefault();
11528
11538
  var keySequence = this.util.getKeySequence(event);
11529
11539
  if (keySequence === 'alt+m') { //Maximize
11530
11540
  var activeWindow = this.getActiveWindow();
@@ -11588,6 +11598,10 @@ class TruDesktop {
11588
11598
  this.restoreSavedPosition(activeWindow);
11589
11599
  event.preventDefault();
11590
11600
  }
11601
+ if (keySequence === 'alt+d') { //Toggle Desktop
11602
+ //this.desktopShown = this.hideShowAll();
11603
+ event.preventDefault();
11604
+ }
11591
11605
  if (event.shiftKey)
11592
11606
  this.shiftPressed = true;
11593
11607
  if (event.altKey)
@@ -12048,26 +12062,13 @@ class TruLogin {
12048
12062
  this.appEnvironment = appEnvironment;
12049
12063
  this.title = appEnvironment.loginFormTitle;
12050
12064
  }
12051
- ngOnInit() {
12052
- if (this.isWindowsAuth)
12053
- this.loginWithWindows();
12054
- }
12055
12065
  get f() {
12056
12066
  return this.loginForm.controls;
12057
12067
  }
12058
- get isWindowsAuth() {
12059
- return this.appEnvironment.authType === 'windows';
12060
- }
12061
12068
  isDisabled = () => {
12062
- if (this.isWindowsAuth)
12063
- return this.isLoggingIn;
12064
12069
  return !this.f.username.value || !this.f.password.value || this.isLoggingIn;
12065
12070
  };
12066
12071
  onSubmit() {
12067
- if (this.isWindowsAuth) {
12068
- this.loginWithWindows();
12069
- return;
12070
- }
12071
12072
  const loginRequest = {
12072
12073
  username: this.f.username.value,
12073
12074
  password: this.f.password.value
@@ -12090,32 +12091,12 @@ class TruLogin {
12090
12091
  });
12091
12092
  }
12092
12093
  }
12093
- loginWithWindows() {
12094
- this.isLoggingIn = true;
12095
- this.auth
12096
- .login(null).pipe(finalize(() => {
12097
- this.isLoggingIn = false;
12098
- }))
12099
- .subscribe(() => {
12100
- this.isLoggingIn = false;
12101
- }, (error) => {
12102
- if (error.status === 401) {
12103
- this.loginError = "Windows authentication failed";
12104
- }
12105
- else if (error.status === 403) {
12106
- this.loginError = error.error || "Your Windows account is not authorized for this application";
12107
- }
12108
- else {
12109
- this.loginError = "Invalid Login - Error: " + error.status;
12110
- }
12111
- });
12112
- }
12113
12094
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruLogin, deps: [{ token: TruAuth }, { token: TruAppEnvironment }], target: i0.ɵɵFactoryTarget.Component });
12114
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TruLogin, isStandalone: false, selector: "tru-login", ngImport: i0, template: "<div class=\"login-wrapper\">\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-card class=\"animate-login\">\r\n <mat-card-header>\r\n <mat-card-title> {{title}} </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <ng-container *ngIf=\"isWindowsAuth; else passwordLogin\"></ng-container>\r\n <ng-template #passwordLogin>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\" [type]=\"passwordVisible ? 'text' : 'password'\">\r\n <button class=\"visibility-button\" [disableRipple]=\"true\" type=\"button\" mat-icon-button matSuffix (click)=\"passwordVisible = !passwordVisible\">\r\n <mat-icon class=\"visibility\" *ngIf=\"passwordVisible\" [svgIcon]=\"'visibility-icon'\">visibility-icon</mat-icon>\r\n <mat-icon class=\"visibility-off\" *ngIf=\"!passwordVisible\" [svgIcon]=\"'visibility-off-icon'\">visibility-off-icon</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </ng-template>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions *ngIf=\"!isWindowsAuth\">\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.login-wrapper{display:flex;justify-content:center;align-items:center;height:100vh}::ng-deep .login-wrapper .mat-mdc-text-field-wrapper{padding:0 16px!important}::ng-deep .login-wrapper .mat-mdc-icon-button.mat-mdc-button-base{height:20px;width:20px;padding:0!important}::ng-deep .login-wrapper .mat-icon{height:20px;width:30px;vertical-align:middle}::ng-deep .login-wrapper .material-icons{font-size:18px}::ng-deep .login-wrapper .visibility svg{fill:#006dcc;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-off svg{fill:#787878;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-button{--mat-text-button-state-layer-color: none}::ng-deep .login-wrapper button:focus{outline:none!important}::ng-deep .login-wrapper .mat-button-focus-overlay{display:none!important}::ng-deep .login-wrapper .mat-mdc-button-persistent-ripple{display:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i5$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i5$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.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: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
12095
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TruLogin, isStandalone: false, selector: "tru-login", ngImport: i0, template: "<div class=\"login-wrapper\">\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-card class=\"animate-login\">\r\n <mat-card-header>\r\n <mat-card-title> {{title}} </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\" [type]=\"passwordVisible ? 'text' : 'password'\">\r\n <button class=\"visibility-button\" [disableRipple]=\"true\" type=\"button\" mat-icon-button matSuffix (click)=\"passwordVisible = !passwordVisible\">\r\n <mat-icon class=\"visibility\" *ngIf=\"passwordVisible\" [svgIcon]=\"'visibility-icon'\">visibility-icon</mat-icon>\r\n <mat-icon class=\"visibility-off\" *ngIf=\"!passwordVisible\" [svgIcon]=\"'visibility-off-icon'\">visibility-off-icon</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.login-wrapper{display:flex;justify-content:center;align-items:center;height:100vh}::ng-deep .login-wrapper .mat-mdc-text-field-wrapper{padding:0 16px!important}::ng-deep .login-wrapper .mat-mdc-icon-button.mat-mdc-button-base{height:20px;width:20px;padding:0!important}::ng-deep .login-wrapper .mat-icon{height:20px;width:30px;vertical-align:middle}::ng-deep .login-wrapper .material-icons{font-size:18px}::ng-deep .login-wrapper .visibility svg{fill:#006dcc;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-off svg{fill:#787878;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-button{--mat-text-button-state-layer-color: none}::ng-deep .login-wrapper button:focus{outline:none!important}::ng-deep .login-wrapper .mat-button-focus-overlay{display:none!important}::ng-deep .login-wrapper .mat-mdc-button-persistent-ripple{display:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i5$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i5$3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i5$3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$3.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i5$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i8.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: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
12115
12096
  }
12116
12097
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruLogin, decorators: [{
12117
12098
  type: Component,
12118
- args: [{ selector: 'tru-login', standalone: false, template: "<div class=\"login-wrapper\">\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-card class=\"animate-login\">\r\n <mat-card-header>\r\n <mat-card-title> {{title}} </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <ng-container *ngIf=\"isWindowsAuth; else passwordLogin\"></ng-container>\r\n <ng-template #passwordLogin>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\" [type]=\"passwordVisible ? 'text' : 'password'\">\r\n <button class=\"visibility-button\" [disableRipple]=\"true\" type=\"button\" mat-icon-button matSuffix (click)=\"passwordVisible = !passwordVisible\">\r\n <mat-icon class=\"visibility\" *ngIf=\"passwordVisible\" [svgIcon]=\"'visibility-icon'\">visibility-icon</mat-icon>\r\n <mat-icon class=\"visibility-off\" *ngIf=\"!passwordVisible\" [svgIcon]=\"'visibility-off-icon'\">visibility-off-icon</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n </ng-template>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions *ngIf=\"!isWindowsAuth\">\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.login-wrapper{display:flex;justify-content:center;align-items:center;height:100vh}::ng-deep .login-wrapper .mat-mdc-text-field-wrapper{padding:0 16px!important}::ng-deep .login-wrapper .mat-mdc-icon-button.mat-mdc-button-base{height:20px;width:20px;padding:0!important}::ng-deep .login-wrapper .mat-icon{height:20px;width:30px;vertical-align:middle}::ng-deep .login-wrapper .material-icons{font-size:18px}::ng-deep .login-wrapper .visibility svg{fill:#006dcc;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-off svg{fill:#787878;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-button{--mat-text-button-state-layer-color: none}::ng-deep .login-wrapper button:focus{outline:none!important}::ng-deep .login-wrapper .mat-button-focus-overlay{display:none!important}::ng-deep .login-wrapper .mat-mdc-button-persistent-ripple{display:none!important}\n"] }]
12099
+ args: [{ selector: 'tru-login', standalone: false, template: "<div class=\"login-wrapper\">\r\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-card class=\"animate-login\">\r\n <mat-card-header>\r\n <mat-card-title> {{title}} </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\" [type]=\"passwordVisible ? 'text' : 'password'\">\r\n <button class=\"visibility-button\" [disableRipple]=\"true\" type=\"button\" mat-icon-button matSuffix (click)=\"passwordVisible = !passwordVisible\">\r\n <mat-icon class=\"visibility\" *ngIf=\"passwordVisible\" [svgIcon]=\"'visibility-icon'\">visibility-icon</mat-icon>\r\n <mat-icon class=\"visibility-off\" *ngIf=\"!passwordVisible\" [svgIcon]=\"'visibility-off-icon'\">visibility-off-icon</mat-icon>\r\n </button>\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.login-wrapper{display:flex;justify-content:center;align-items:center;height:100vh}::ng-deep .login-wrapper .mat-mdc-text-field-wrapper{padding:0 16px!important}::ng-deep .login-wrapper .mat-mdc-icon-button.mat-mdc-button-base{height:20px;width:20px;padding:0!important}::ng-deep .login-wrapper .mat-icon{height:20px;width:30px;vertical-align:middle}::ng-deep .login-wrapper .material-icons{font-size:18px}::ng-deep .login-wrapper .visibility svg{fill:#006dcc;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-off svg{fill:#787878;height:18px;width:18px;margin-top:5px}::ng-deep .login-wrapper .visibility-button{--mat-text-button-state-layer-color: none}::ng-deep .login-wrapper button:focus{outline:none!important}::ng-deep .login-wrapper .mat-button-focus-overlay{display:none!important}::ng-deep .login-wrapper .mat-mdc-button-persistent-ripple{display:none!important}\n"] }]
12119
12100
  }], ctorParameters: () => [{ type: TruAuth }, { type: TruAppEnvironment }] });
12120
12101
 
12121
12102
  class TruAuthJwtStrategy {
@@ -12192,7 +12173,7 @@ class TruAuthInterceptor {
12192
12173
  intercept(request, next) {
12193
12174
  if (this.appEnvironment.authType === 'jwt')
12194
12175
  request = this.addToken(request, String(this.jwt.getToken()));
12195
- if (this.appEnvironment.authType === 'session' || this.appEnvironment.authType === 'windows')
12176
+ if (this.appEnvironment.authType === 'session')
12196
12177
  request = request.clone({
12197
12178
  withCredentials: true
12198
12179
  });
@@ -12275,19 +12256,6 @@ class TruAuthSessionStrategy {
12275
12256
  }
12276
12257
  }
12277
12258
 
12278
- class TruAuthWindowsStrategy {
12279
- doLoginUser(user) {
12280
- }
12281
- doLogoutUser() {
12282
- }
12283
- createUser(user) {
12284
- return of({});
12285
- }
12286
- isLoggedIn() {
12287
- return false;
12288
- }
12289
- }
12290
-
12291
12259
  const TruAuthStrategyProvider = {
12292
12260
  provide: TRU_AUTH_STRATEGY,
12293
12261
  deps: [HttpClient, TruAppEnvironment],
@@ -12297,8 +12265,6 @@ const TruAuthStrategyProvider = {
12297
12265
  return new TruAuthSessionStrategy(http);
12298
12266
  case "jwt":
12299
12267
  return new TruAuthJwtStrategy();
12300
- case "windows":
12301
- return new TruAuthWindowsStrategy();
12302
12268
  default:
12303
12269
  throw new Error("Invalid auth strategy");
12304
12270
  }