@trudb/tru-common-lib 0.0.725 → 0.0.726
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/login/services/tru-auth-interceptor.mjs +2 -2
- package/esm2020/lib/components/password-dialog/tru-password-dialog.mjs +9 -5
- package/fesm2015/trudb-tru-common-lib.mjs +9 -5
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +9 -5
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/password-dialog/tru-password-dialog.d.ts +2 -1
- package/package.json +1 -1
|
@@ -594,11 +594,15 @@ class TruPasswordDialog {
|
|
|
594
594
|
this.user = user;
|
|
595
595
|
this.appEnvironment = appEnvironment;
|
|
596
596
|
this.data = data;
|
|
597
|
+
this.currentPasswordControl = new FormControl('', []);
|
|
597
598
|
this.newPasswordControl = new FormControl('', []);
|
|
598
|
-
this.
|
|
599
|
+
this.confirmNewPasswordControl = new FormControl('', []);
|
|
599
600
|
this.message = null;
|
|
600
601
|
this.canSubmit = () => {
|
|
601
|
-
return this.
|
|
602
|
+
return this.currentPasswordControl.value &&
|
|
603
|
+
this.newPasswordControl.value &&
|
|
604
|
+
this.confirmNewPasswordControl.value &&
|
|
605
|
+
(this.newPasswordControl.value === this.confirmNewPasswordControl.value);
|
|
602
606
|
};
|
|
603
607
|
}
|
|
604
608
|
ngOnInit() {
|
|
@@ -612,10 +616,10 @@ class TruPasswordDialog {
|
|
|
612
616
|
}
|
|
613
617
|
}
|
|
614
618
|
TruPasswordDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruPasswordDialog, deps: [{ token: i1.MatDialogRef }, { token: TruUser }, { token: TruAppEnvironment }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
615
|
-
TruPasswordDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruPasswordDialog, selector: "tru-password-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n Change Password\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container\">\r\n <p>{{message}}</p>\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"newPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>Confirm Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n [formControl]=\"
|
|
619
|
+
TruPasswordDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruPasswordDialog, selector: "tru-password-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n Change Password\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container\">\r\n <p>{{message}}</p>\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"currentPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"newPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>Confirm New Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n [formControl]=\"confirmNewPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button mat-raised-button (click)=\"onDismiss()\">Cancel</button>\r\n <button [disabled]=\"canSubmit()\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Submit</button>\r\n</div>\r\n", styles: [".tru-control-container{margin-bottom:10px;margin-right:10px}::ng-deep .tru-control-container .mat-mdc-form-field{display:inline!important}::ng-deep .tru-control-container .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-control-container mat-label{font-size:14px;font-weight:700}::ng-deep .tru-control-container input{font-size:12px;padding-left:5px}::ng-deep .tru-control-container mat-select{font-size:12px;padding-left:5px}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__leading{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__notch{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__trailing{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-control-container path{color:#a9a9a9}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid+div:before{border-color:red}\n", "::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:0 0 10px!important}.mdc-dialog__title{padding:20px 0 10px!important}.mdc-dialog__content{padding:10px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$1.MatLabel, selector: "mat-label" }] });
|
|
616
620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruPasswordDialog, decorators: [{
|
|
617
621
|
type: Component,
|
|
618
|
-
args: [{ selector: 'tru-password-dialog', template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n Change Password\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container\">\r\n <p>{{message}}</p>\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"newPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>Confirm Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n [formControl]=\"
|
|
622
|
+
args: [{ selector: 'tru-password-dialog', template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n Change Password\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container\">\r\n <p>{{message}}</p>\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"currentPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n [formControl]=\"newPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n <mat-label>Confirm New Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n [formControl]=\"confirmNewPasswordControl\"\r\n type=\"password\" />\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button mat-raised-button (click)=\"onDismiss()\">Cancel</button>\r\n <button [disabled]=\"canSubmit()\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Submit</button>\r\n</div>\r\n", styles: [".tru-control-container{margin-bottom:10px;margin-right:10px}::ng-deep .tru-control-container .mat-mdc-form-field{display:inline!important}::ng-deep .tru-control-container .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-control-container mat-label{font-size:14px;font-weight:700}::ng-deep .tru-control-container input{font-size:12px;padding-left:5px}::ng-deep .tru-control-container mat-select{font-size:12px;padding-left:5px}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__leading{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__notch{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__trailing{border-color:#bd362f}::ng-deep .tru-control-container .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-control-container path{color:#a9a9a9}::ng-deep .tru-control-container .mat-mdc-form-field-flex.invalid+div:before{border-color:red}\n", "::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:0 0 10px!important}.mdc-dialog__title{padding:20px 0 10px!important}.mdc-dialog__content{padding:10px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"] }]
|
|
619
623
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: TruUser }, { type: TruAppEnvironment }, { type: TruPasswordDialog, decorators: [{
|
|
620
624
|
type: Inject,
|
|
621
625
|
args: [MAT_DIALOG_DATA]
|
|
@@ -6064,7 +6068,7 @@ class TruAuthInterceptor {
|
|
|
6064
6068
|
withCredentials: true
|
|
6065
6069
|
});
|
|
6066
6070
|
return next.handle(request).pipe(catchError((error) => {
|
|
6067
|
-
if (error.status === 401
|
|
6071
|
+
if (error.status === 401) {
|
|
6068
6072
|
this.auth.doLogoutAndRedirectToLogin();
|
|
6069
6073
|
}
|
|
6070
6074
|
return throwError(error);
|