@trudb/tru-common-lib 0.4.0 → 0.4.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.
|
@@ -5,7 +5,7 @@ import * as i1$1 from '@angular/common';
|
|
|
5
5
|
import { CommonModule, DatePipe, NgIf, NgClass } from '@angular/common';
|
|
6
6
|
import * as i8 from '@angular/forms';
|
|
7
7
|
import { FormsModule, FormControl, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
|
|
8
|
-
import { BehaviorSubject, merge, defer, from, of, Subject, Observable, fromEvent, Subscription, interval, skip, forkJoin, first,
|
|
8
|
+
import { BehaviorSubject, merge, defer, from, of, Subject, Observable, fromEvent, Subscription, interval, skip, forkJoin, first, throwError, finalize } from 'rxjs';
|
|
9
9
|
import * as _ from 'underscore';
|
|
10
10
|
import ___default from 'underscore';
|
|
11
11
|
import * as i1$2 from '@angular/common/http';
|
|
@@ -1005,7 +1005,7 @@ class TruPasswordDialog {
|
|
|
1005
1005
|
passwordSuggestions = [];
|
|
1006
1006
|
passwordStrengthLevels = [0, 1, 2, 3, 4];
|
|
1007
1007
|
passwordStrengthLabels = ['Very weak', 'Weak', 'Fair', 'Strong', 'Very strong'];
|
|
1008
|
-
minimumPasswordScore =
|
|
1008
|
+
minimumPasswordScore = 2;
|
|
1009
1009
|
errorMsg = null;
|
|
1010
1010
|
busy = false;
|
|
1011
1011
|
baseUrl = '';
|
|
@@ -1077,7 +1077,7 @@ class TruPasswordDialog {
|
|
|
1077
1077
|
: null;
|
|
1078
1078
|
this.passwordScore = result?.score ?? null;
|
|
1079
1079
|
this.passwordWarning = result?.feedback.warning ?? null;
|
|
1080
|
-
this.passwordSuggestions = result?.feedback.suggestions ?? [];
|
|
1080
|
+
this.passwordSuggestions = result?.feedback.suggestions.filter(suggestion => suggestion !== translations.suggestions.anotherWord) ?? [];
|
|
1081
1081
|
}));
|
|
1082
1082
|
this.userRef = this.data.userRef;
|
|
1083
1083
|
this.username = this.data.username;
|
|
@@ -1089,7 +1089,7 @@ class TruPasswordDialog {
|
|
|
1089
1089
|
this.subs.forEach((s) => s.unsubscribe());
|
|
1090
1090
|
}
|
|
1091
1091
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruPasswordDialog, deps: [{ token: i1.MatDialogRef }, { token: i1$2.HttpClient }, { token: TruAppEnvironment }, { token: TruUiNotification }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1092
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TruPasswordDialog, isStandalone: true, selector: "tru-password-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n <p class=\"tru-password-dialog-title\">{{title}}</p>\r\n <p class=\"tru-password-dialog-username\">for {{username}}</p>\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container tru-password-dialog\">\r\n <p>{{message}}</p>\r\n\r\n <div class=\"tru-password-dialog-control-wrapper\" *ngIf=\"!admin\">\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #currentInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"currentPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"newPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n <div class=\"tru-password-strength-meter score-{{passwordScore}}\"\r\n role=\"meter\"\r\n aria-label=\"Password strength\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"4\"\r\n [attr.aria-valuenow]=\"passwordScore\"\r\n [attr.aria-valuetext]=\"passwordScore === null ? 'No password entered' : passwordStrengthLabels[passwordScore]\">\r\n @for (level of passwordStrengthLevels; track level) {\r\n <span [class.active]=\"passwordScore !== null && passwordScore >= level\"></span>\r\n }\r\n </div>\r\n <div class=\"tru-password-feedback\" aria-live=\"polite\">\r\n <p>
|
|
1092
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TruPasswordDialog, isStandalone: true, selector: "tru-password-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n <p class=\"tru-password-dialog-title\">{{title}}</p>\r\n <p class=\"tru-password-dialog-username\">for {{username}}</p>\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container tru-password-dialog\">\r\n <p>{{message}}</p>\r\n\r\n <div class=\"tru-password-dialog-control-wrapper\" *ngIf=\"!admin\">\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #currentInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"currentPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"newPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n <div class=\"tru-password-strength-meter score-{{passwordScore}}\"\r\n role=\"meter\"\r\n aria-label=\"Password strength\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"4\"\r\n [attr.aria-valuenow]=\"passwordScore\"\r\n [attr.aria-valuetext]=\"passwordScore === null ? 'No password entered' : passwordStrengthLabels[passwordScore]\">\r\n @for (level of passwordStrengthLevels; track level) {\r\n <span [class.active]=\"passwordScore !== null && passwordScore >= level\"></span>\r\n }\r\n </div>\r\n <div class=\"tru-password-feedback\" aria-live=\"polite\">\r\n @if (passwordScore !== null) {\r\n <p>Strength: {{passwordStrengthLabels[passwordScore]}}.</p>\r\n @if (passwordScore < minimumPasswordScore) {\r\n <p>Use a password rated {{passwordStrengthLabels[minimumPasswordScore]}} or stronger.</p>\r\n <p *ngIf=\"passwordWarning\">{{passwordWarning}}</p>\r\n @for (suggestion of passwordSuggestions; track suggestion) {\r\n <p>{{suggestion}}</p>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>Confirm New Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"confirmNewPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <p class=\"tru-password-dialog-status\" role=\"status\">{{busy ? 'Updating password...' : validationMessage}}</p>\r\n <p class=\"tru-password-dialog-error-msg\" role=\"alert\" *ngIf=\"errorMsg\">{{errorMsg}}</p>\r\n <mat-checkbox [formControl]=\"showPasswordControl\"\r\n (click)=\"onShowPasswordClicked()\"\r\n [labelPosition]=\"'before'\">\r\n Show Password\r\n </mat-checkbox>\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: ["", "::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;overflow-x:hidden;overflow-y:auto}.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}.tru-password-dialog .tru-password-dialog-control-wrapper{margin-bottom:20px}.tru-password-dialog-title{font-size:26px}.tru-password-dialog-username{font-size:14px;margin:0;color:var(--mat-dialog-supporting-text-color, rgba(0, 0, 0, .6))}.tru-password-dialog-error-msg{color:red!important;font-size:11px!important}.tru-password-feedback,.tru-password-dialog-status{margin:8px 0}.tru-password-strength-meter{display:flex;gap:4px;margin-top:4px}.tru-password-strength-meter span{background-color:#ddd;flex:1;height:4px}.tru-password-strength-meter.score-0 span.active{background-color:#d32f2f}.tru-password-strength-meter.score-1 span.active{background-color:#f57c00}.tru-password-strength-meter.score-2 span.active{background-color:#fbc02d}.tru-password-strength-meter.score-3 span.active{background-color:#7cb342}.tru-password-strength-meter.score-4 span.active{background-color:#388e3c}mat-checkbox{float:right!important}.std-control.edit{margin-bottom:10px;margin-right:10px}::ng-deep .tru-password-dialog .mat-mdc-form-field{display:inline!important}::ng-deep .tru-password-dialog .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-password-dialog mat-label{font-size:14px;font-weight:700}::ng-deep .tru-password-dialog input{font-size:12px;padding-left:5px}::ng-deep .tru-password-dialog .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-password-dialog path{color:#a9a9a9}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MaterialModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1093
1093
|
}
|
|
1094
1094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruPasswordDialog, decorators: [{
|
|
1095
1095
|
type: Component,
|
|
@@ -1098,7 +1098,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
1098
1098
|
FormsModule,
|
|
1099
1099
|
ReactiveFormsModule,
|
|
1100
1100
|
MaterialModule,
|
|
1101
|
-
], template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n <p class=\"tru-password-dialog-title\">{{title}}</p>\r\n <p class=\"tru-password-dialog-username\">for {{username}}</p>\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container tru-password-dialog\">\r\n <p>{{message}}</p>\r\n\r\n <div class=\"tru-password-dialog-control-wrapper\" *ngIf=\"!admin\">\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #currentInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"currentPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"newPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n <div class=\"tru-password-strength-meter score-{{passwordScore}}\"\r\n role=\"meter\"\r\n aria-label=\"Password strength\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"4\"\r\n [attr.aria-valuenow]=\"passwordScore\"\r\n [attr.aria-valuetext]=\"passwordScore === null ? 'No password entered' : passwordStrengthLabels[passwordScore]\">\r\n @for (level of passwordStrengthLevels; track level) {\r\n <span [class.active]=\"passwordScore !== null && passwordScore >= level\"></span>\r\n }\r\n </div>\r\n <div class=\"tru-password-feedback\" aria-live=\"polite\">\r\n <p>
|
|
1101
|
+
], template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n <p class=\"tru-password-dialog-title\">{{title}}</p>\r\n <p class=\"tru-password-dialog-username\">for {{username}}</p>\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content tru-control-container tru-password-dialog\">\r\n <p>{{message}}</p>\r\n\r\n <div class=\"tru-password-dialog-control-wrapper\" *ngIf=\"!admin\">\r\n <mat-label>Current Password</mat-label>\r\n <mat-form-field>\r\n <input #currentInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"currentPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>New Password</mat-label>\r\n <mat-form-field>\r\n <input #newInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"newPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n <div class=\"tru-password-strength-meter score-{{passwordScore}}\"\r\n role=\"meter\"\r\n aria-label=\"Password strength\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"4\"\r\n [attr.aria-valuenow]=\"passwordScore\"\r\n [attr.aria-valuetext]=\"passwordScore === null ? 'No password entered' : passwordStrengthLabels[passwordScore]\">\r\n @for (level of passwordStrengthLevels; track level) {\r\n <span [class.active]=\"passwordScore !== null && passwordScore >= level\"></span>\r\n }\r\n </div>\r\n <div class=\"tru-password-feedback\" aria-live=\"polite\">\r\n @if (passwordScore !== null) {\r\n <p>Strength: {{passwordStrengthLabels[passwordScore]}}.</p>\r\n @if (passwordScore < minimumPasswordScore) {\r\n <p>Use a password rated {{passwordStrengthLabels[minimumPasswordScore]}} or stronger.</p>\r\n <p *ngIf=\"passwordWarning\">{{passwordWarning}}</p>\r\n @for (suggestion of passwordSuggestions; track suggestion) {\r\n <p>{{suggestion}}</p>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n <div class=\"tru-password-dialog-control-wrapper\">\r\n <mat-label>Confirm New Password</mat-label>\r\n <mat-form-field>\r\n <input #confirmInput\r\n matInput\r\n autocomplete=\"off webauthn\"\r\n [formControl]=\"confirmNewPasswordControl\"\r\n [type]=\"showPassword ? 'text' : 'password'\" />\r\n </mat-form-field>\r\n </div>\r\n <p class=\"tru-password-dialog-status\" role=\"status\">{{busy ? 'Updating password...' : validationMessage}}</p>\r\n <p class=\"tru-password-dialog-error-msg\" role=\"alert\" *ngIf=\"errorMsg\">{{errorMsg}}</p>\r\n <mat-checkbox [formControl]=\"showPasswordControl\"\r\n (click)=\"onShowPasswordClicked()\"\r\n [labelPosition]=\"'before'\">\r\n Show Password\r\n </mat-checkbox>\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: ["::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;overflow-x:hidden;overflow-y:auto}.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}.tru-password-dialog .tru-password-dialog-control-wrapper{margin-bottom:20px}.tru-password-dialog-title{font-size:26px}.tru-password-dialog-username{font-size:14px;margin:0;color:var(--mat-dialog-supporting-text-color, rgba(0, 0, 0, .6))}.tru-password-dialog-error-msg{color:red!important;font-size:11px!important}.tru-password-feedback,.tru-password-dialog-status{margin:8px 0}.tru-password-strength-meter{display:flex;gap:4px;margin-top:4px}.tru-password-strength-meter span{background-color:#ddd;flex:1;height:4px}.tru-password-strength-meter.score-0 span.active{background-color:#d32f2f}.tru-password-strength-meter.score-1 span.active{background-color:#f57c00}.tru-password-strength-meter.score-2 span.active{background-color:#fbc02d}.tru-password-strength-meter.score-3 span.active{background-color:#7cb342}.tru-password-strength-meter.score-4 span.active{background-color:#388e3c}mat-checkbox{float:right!important}.std-control.edit{margin-bottom:10px;margin-right:10px}::ng-deep .tru-password-dialog .mat-mdc-form-field{display:inline!important}::ng-deep .tru-password-dialog .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-password-dialog mat-label{font-size:14px;font-weight:700}::ng-deep .tru-password-dialog input{font-size:12px;padding-left:5px}::ng-deep .tru-password-dialog .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-password-dialog path{color:#a9a9a9}\n"] }]
|
|
1102
1102
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: i1$2.HttpClient }, { type: TruAppEnvironment }, { type: TruUiNotification }, { type: undefined, decorators: [{
|
|
1103
1103
|
type: Inject,
|
|
1104
1104
|
args: [MAT_DIALOG_DATA]
|
|
@@ -10282,9 +10282,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
10282
10282
|
|
|
10283
10283
|
class TruDesktopMenubar {
|
|
10284
10284
|
contextFilters;
|
|
10285
|
+
appEnvironment;
|
|
10285
10286
|
desktopCtrl;
|
|
10286
|
-
constructor(contextFilters) {
|
|
10287
|
+
constructor(contextFilters, appEnvironment) {
|
|
10287
10288
|
this.contextFilters = contextFilters;
|
|
10289
|
+
this.appEnvironment = appEnvironment;
|
|
10290
|
+
}
|
|
10291
|
+
get environmentWarning() {
|
|
10292
|
+
return this.appEnvironment.environmentWarning?.trim() ?? '';
|
|
10288
10293
|
}
|
|
10289
10294
|
options = null;
|
|
10290
10295
|
configs = null;
|
|
@@ -10297,8 +10302,8 @@ class TruDesktopMenubar {
|
|
|
10297
10302
|
this.configs = this.options.menubarConfig;
|
|
10298
10303
|
this.filters = this.contextFilters.filters;
|
|
10299
10304
|
}
|
|
10300
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDesktopMenubar, deps: [{ token: TruContextFilters }], target: i0.ɵɵFactoryTarget.Component });
|
|
10301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: TruDesktopMenubar, isStandalone: true, selector: "tru-desktop-menubar", inputs: { desktopCtrl: "desktopCtrl" }, ngImport: i0, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n <tru-toolbar>\r\n <tru-toolbar-app-customization></tru-toolbar-app-customization>\r\n <tru-toolbar-user-profile></tru-toolbar-user-profile>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [".desktop-main-menu
|
|
10305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDesktopMenubar, deps: [{ token: TruContextFilters }, { token: TruAppEnvironment }], target: i0.ɵɵFactoryTarget.Component });
|
|
10306
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: TruDesktopMenubar, isStandalone: true, selector: "tru-desktop-menubar", inputs: { desktopCtrl: "desktopCtrl" }, ngImport: i0, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n <span class=\"desktop-environment-warning\" *ngIf=\"environmentWarning\" [title]=\"environmentWarning\">{{environmentWarning}}</span>\r\n <tru-toolbar>\r\n <tru-toolbar-app-customization></tru-toolbar-app-customization>\r\n <tru-toolbar-user-profile></tru-toolbar-user-profile>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [".desktop-main-menu{display:flex;align-items:center}.desktop-main-menu>tru-toolbar{flex:none}.desktop-main-menu>tru-toolbar:last-child{margin-left:auto}.desktop-environment-warning{flex:1;min-width:0;color:red;font-size:20px;font-weight:700;line-height:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: ["config"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }, { kind: "component", type: TruToolbarContextFilter, selector: "tru-toolbar-context-filter" }, { kind: "component", type: TruToolbarUserProfile, selector: "tru-toolbar-user-profile" }, { kind: "component", type: TruToolbarAppCustomization, selector: "tru-toolbar-app-customization" }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
|
|
10302
10307
|
}
|
|
10303
10308
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDesktopMenubar, decorators: [{
|
|
10304
10309
|
type: Component,
|
|
@@ -10315,8 +10320,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
10315
10320
|
TruToolbarContextFilter,
|
|
10316
10321
|
TruToolbarUserProfile,
|
|
10317
10322
|
TruToolbarAppCustomization,
|
|
10318
|
-
], changeDetection: ChangeDetectionStrategy.Eager, encapsulation: ViewEncapsulation.None, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n <tru-toolbar>\r\n <tru-toolbar-app-customization></tru-toolbar-app-customization>\r\n <tru-toolbar-user-profile></tru-toolbar-user-profile>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [".desktop-main-menu
|
|
10319
|
-
}], ctorParameters: () => [{ type: TruContextFilters }], propDecorators: { desktopCtrl: [{
|
|
10323
|
+
], changeDetection: ChangeDetectionStrategy.Eager, encapsulation: ViewEncapsulation.None, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n <span class=\"desktop-environment-warning\" *ngIf=\"environmentWarning\" [title]=\"environmentWarning\">{{environmentWarning}}</span>\r\n <tru-toolbar>\r\n <tru-toolbar-app-customization></tru-toolbar-app-customization>\r\n <tru-toolbar-user-profile></tru-toolbar-user-profile>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [".desktop-main-menu{display:flex;align-items:center}.desktop-main-menu>tru-toolbar{flex:none}.desktop-main-menu>tru-toolbar:last-child{margin-left:auto}.desktop-environment-warning{flex:1;min-width:0;color:red;font-size:20px;font-weight:700;line-height:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
10324
|
+
}], ctorParameters: () => [{ type: TruContextFilters }, { type: TruAppEnvironment }], propDecorators: { desktopCtrl: [{
|
|
10320
10325
|
type: Input
|
|
10321
10326
|
}] } });
|
|
10322
10327
|
|
|
@@ -12563,40 +12568,75 @@ class TruErrorDialogConfig {
|
|
|
12563
12568
|
}
|
|
12564
12569
|
|
|
12565
12570
|
class TruServerError {
|
|
12566
|
-
id;
|
|
12567
|
-
type;
|
|
12568
|
-
code;
|
|
12571
|
+
id = '';
|
|
12572
|
+
type = '';
|
|
12573
|
+
code = 0;
|
|
12569
12574
|
title = '';
|
|
12570
12575
|
message = undefined;
|
|
12571
12576
|
data = null;
|
|
12572
|
-
stackTrace;
|
|
12577
|
+
stackTrace = '';
|
|
12573
12578
|
status;
|
|
12574
12579
|
statusText;
|
|
12575
12580
|
componentName = '';
|
|
12576
12581
|
constructor(error) {
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12582
|
+
this.status = error.status;
|
|
12583
|
+
this.statusText = error.statusText;
|
|
12584
|
+
this.type = error.name;
|
|
12585
|
+
this.message = error.message;
|
|
12586
|
+
// HttpClient already decodes JSON responses. Text error bodies must remain readable too.
|
|
12587
|
+
let parsedError = TruServerError.readBody(error.error);
|
|
12588
|
+
if (typeof parsedError === 'string') {
|
|
12589
|
+
this.message = parsedError;
|
|
12590
|
+
return;
|
|
12591
|
+
}
|
|
12592
|
+
if (!parsedError)
|
|
12593
|
+
return;
|
|
12594
|
+
if (parsedError.ExceptionType === 'tru-db-custom-exception') {
|
|
12595
|
+
const customError = TruServerError.readBody(parsedError.Message);
|
|
12596
|
+
if (typeof customError === 'string') {
|
|
12597
|
+
this.message = customError;
|
|
12598
|
+
return;
|
|
12599
|
+
}
|
|
12600
|
+
if (!customError)
|
|
12601
|
+
return;
|
|
12602
|
+
parsedError = customError;
|
|
12603
|
+
this.id = parsedError.$id ?? '';
|
|
12581
12604
|
this.type = 'tru-db-custom-exception';
|
|
12582
|
-
this.code = parsedError.Code;
|
|
12583
|
-
this.title = parsedError.data
|
|
12605
|
+
this.code = parsedError.Code ?? 0;
|
|
12606
|
+
this.title = parsedError.data?.exceptionObj?.title ?? '';
|
|
12584
12607
|
this.message = parsedError.message;
|
|
12585
|
-
this.stackTrace = parsedError.StackTrace;
|
|
12586
|
-
this.
|
|
12587
|
-
this.
|
|
12588
|
-
this.data = parsedError.data.exceptionObj;
|
|
12589
|
-
this.componentName = parsedError.componentName;
|
|
12608
|
+
this.stackTrace = parsedError.StackTrace ?? '';
|
|
12609
|
+
this.data = parsedError.data?.exceptionObj ?? null;
|
|
12610
|
+
this.componentName = parsedError.componentName ?? '';
|
|
12590
12611
|
}
|
|
12591
12612
|
else {
|
|
12592
|
-
this.id = parsedError.$id;
|
|
12593
|
-
this.type = parsedError.$type;
|
|
12594
|
-
this.code = parsedError.Code;
|
|
12595
|
-
this.message =
|
|
12596
|
-
|
|
12597
|
-
this.
|
|
12598
|
-
|
|
12613
|
+
this.id = parsedError.$id ?? '';
|
|
12614
|
+
this.type = parsedError.$type ?? error.name;
|
|
12615
|
+
this.code = parsedError.Code ?? 0;
|
|
12616
|
+
this.message =
|
|
12617
|
+
parsedError.Message ?? parsedError.message ?? error.message;
|
|
12618
|
+
this.stackTrace = parsedError.StackTrace ?? '';
|
|
12619
|
+
}
|
|
12620
|
+
}
|
|
12621
|
+
static readBody(value) {
|
|
12622
|
+
if (typeof value === 'string') {
|
|
12623
|
+
try {
|
|
12624
|
+
const decoded = JSON.parse(value);
|
|
12625
|
+
if (decoded !== null &&
|
|
12626
|
+
typeof decoded === 'object' &&
|
|
12627
|
+
!Array.isArray(decoded)) {
|
|
12628
|
+
return decoded;
|
|
12629
|
+
}
|
|
12630
|
+
return typeof decoded === 'string' ? decoded : value;
|
|
12631
|
+
}
|
|
12632
|
+
catch {
|
|
12633
|
+
// Display the original text, including malformed JSON, without hiding the HTTP error.
|
|
12634
|
+
return value;
|
|
12635
|
+
}
|
|
12599
12636
|
}
|
|
12637
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value)
|
|
12638
|
+
? value
|
|
12639
|
+
: null;
|
|
12600
12640
|
}
|
|
12601
12641
|
}
|
|
12602
12642
|
|
|
@@ -12706,7 +12746,7 @@ class TruErrorInterceptor {
|
|
|
12706
12746
|
return next.handle(request).pipe(catchError((error) => {
|
|
12707
12747
|
if (error.status !== 401 && !(error.error instanceof Blob))
|
|
12708
12748
|
this.errorManager.handleError(error);
|
|
12709
|
-
return
|
|
12749
|
+
return throwError(() => error);
|
|
12710
12750
|
}));
|
|
12711
12751
|
}
|
|
12712
12752
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruErrorInterceptor, deps: [{ token: TruErrorManager }], target: i0.ɵɵFactoryTarget.Injectable });
|